@php-wasm/node 0.1.19 → 0.1.20
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.
- package/index.cjs +13 -13
- package/index.d.ts +10 -4
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";var mf=Object.create;var va=Object.defineProperty;var ks=Object.getOwnPropertyDescriptor;var pf=Object.getOwnPropertyNames;var hf=Object.getPrototypeOf,yf=Object.prototype.hasOwnProperty;var Ki=(R,O)=>()=>(R&&(O=R(R=0)),O);var Li=(R,O)=>()=>(O||R((O={exports:{}}).exports,O),O.exports),Hi=(R,O)=>{for(var F in O)va(R,F,{get:O[F],enumerable:!0})},Ds=(R,O,F,l)=>{if(O&&typeof O=="object"||typeof O=="function")for(let W of pf(O))!yf.call(R,W)&&W!==F&&va(R,W,{get:()=>O[W],enumerable:!(l=ks(O,W))||l.enumerable});return R};var zi=(R,O,F)=>(F=R!=null?mf(hf(R)):{},Ds(O||!R||!R.__esModule?va(F,"default",{value:R,enumerable:!0}):F,R)),wf=R=>Ds(va({},"__esModule",{value:!0}),R),Wi=(R,O,F,l)=>{for(var W=l>1?void 0:l?ks(O,F):O,Y=R.length-1,J;Y>=0;Y--)(J=R[Y])&&(W=(l?J(O,F,W):J(W))||W);return l&&W&&va(O,F,W),W};var ea=Li((jl,Cs)=>{"use strict";Cs.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var ya=Li((Yl,Ra)=>{"use strict";var{EMPTY_BUFFER:kf}=ea(),ts=Buffer[Symbol.species];function Df(R,O){if(R.length===0)return kf;if(R.length===1)return R[0];let F=Buffer.allocUnsafe(O),l=0;for(let W=0;W<R.length;W++){let Y=R[W];F.set(Y,l),l+=Y.length}return l<O?new ts(F.buffer,F.byteOffset,l):F}function Fs(R,O,F,l,W){for(let Y=0;Y<W;Y++)F[l+Y]=R[Y]^O[Y&3]}function As(R,O){for(let F=0;F<R.length;F++)R[F]^=O[F&3]}function Of(R){return R.length===R.buffer.byteLength?R.buffer:R.buffer.slice(R.byteOffset,R.byteOffset+R.length)}function ns(R){if(ns.readOnly=!0,Buffer.isBuffer(R))return R;let O;return R instanceof ArrayBuffer?O=new ts(R):ArrayBuffer.isView(R)?O=new ts(R.buffer,R.byteOffset,R.byteLength):(O=Buffer.from(R),ns.readOnly=!1),O}Ra.exports={concat:Df,mask:Fs,toArrayBuffer:Of,toBuffer:ns,unmask:As};if(!process.env.WS_NO_BUFFER_UTIL)try{let R=require("bufferutil");Ra.exports.mask=function(O,F,l,W,Y){Y<48?Fs(O,F,l,W,Y):R.mask(O,F,l,W,Y)},Ra.exports.unmask=function(O,F){O.length<32?As(O,F):R.unmask(O,F)}}catch{}});var Ms=Li((ql,Rs)=>{"use strict";var Ps=Symbol("kDone"),os=Symbol("kRun"),is=class{constructor(O){this[Ps]=()=>{this.pending--,this[os]()},this.concurrency=O||1/0,this.jobs=[],this.pending=0}add(O){this.jobs.push(O),this[os]()}[os](){if(this.pending!==this.concurrency&&this.jobs.length){let O=this.jobs.shift();this.pending++,O(this[Ps])}}};Rs.exports=is});var ga=Li((Vl,Bs)=>{"use strict";var wa=require("zlib"),Ls=ya(),Nf=Ms(),{kStatusCode:Is}=ea(),Tf=Buffer[Symbol.species],Cf=Buffer.from([0,0,255,255]),Ia=Symbol("permessage-deflate"),Gi=Symbol("total-length"),Ea=Symbol("callback"),ra=Symbol("buffers"),La=Symbol("error"),Ma,as=class{constructor(O,F,l){if(this._maxPayload=l|0,this._options=O||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!F,this._deflate=null,this._inflate=null,this.params=null,!Ma){let W=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ma=new Nf(W)}}static get extensionName(){return"permessage-deflate"}offer(){let O={};return this._options.serverNoContextTakeover&&(O.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(O.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(O.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?O.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(O.client_max_window_bits=!0),O}accept(O){return O=this.normalizeParams(O),this.params=this._isServer?this.acceptAsServer(O):this.acceptAsClient(O),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let O=this._deflate[Ea];this._deflate.close(),this._deflate=null,O&&O(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(O){let F=this._options,l=O.find(W=>!(F.serverNoContextTakeover===!1&&W.server_no_context_takeover||W.server_max_window_bits&&(F.serverMaxWindowBits===!1||typeof F.serverMaxWindowBits=="number"&&F.serverMaxWindowBits>W.server_max_window_bits)||typeof F.clientMaxWindowBits=="number"&&!W.client_max_window_bits));if(!l)throw new Error("None of the extension offers can be accepted");return F.serverNoContextTakeover&&(l.server_no_context_takeover=!0),F.clientNoContextTakeover&&(l.client_no_context_takeover=!0),typeof F.serverMaxWindowBits=="number"&&(l.server_max_window_bits=F.serverMaxWindowBits),typeof F.clientMaxWindowBits=="number"?l.client_max_window_bits=F.clientMaxWindowBits:(l.client_max_window_bits===!0||F.clientMaxWindowBits===!1)&&delete l.client_max_window_bits,l}acceptAsClient(O){let F=O[0];if(this._options.clientNoContextTakeover===!1&&F.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!F.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(F.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&F.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return F}normalizeParams(O){return O.forEach(F=>{Object.keys(F).forEach(l=>{let W=F[l];if(W.length>1)throw new Error(`Parameter "${l}" must have only a single value`);if(W=W[0],l==="client_max_window_bits"){if(W!==!0){let Y=+W;if(!Number.isInteger(Y)||Y<8||Y>15)throw new TypeError(`Invalid value for parameter "${l}": ${W}`);W=Y}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${l}": ${W}`)}else if(l==="server_max_window_bits"){let Y=+W;if(!Number.isInteger(Y)||Y<8||Y>15)throw new TypeError(`Invalid value for parameter "${l}": ${W}`);W=Y}else if(l==="client_no_context_takeover"||l==="server_no_context_takeover"){if(W!==!0)throw new TypeError(`Invalid value for parameter "${l}": ${W}`)}else throw new Error(`Unknown parameter "${l}"`);F[l]=W})}),O}decompress(O,F,l){Ma.add(W=>{this._decompress(O,F,(Y,J)=>{W(),l(Y,J)})})}compress(O,F,l){Ma.add(W=>{this._compress(O,F,(Y,J)=>{W(),l(Y,J)})})}_decompress(O,F,l){let W=this._isServer?"client":"server";if(!this._inflate){let Y=`${W}_max_window_bits`,J=typeof this.params[Y]!="number"?wa.Z_DEFAULT_WINDOWBITS:this.params[Y];this._inflate=wa.createInflateRaw({...this._options.zlibInflateOptions,windowBits:J}),this._inflate[Ia]=this,this._inflate[Gi]=0,this._inflate[ra]=[],this._inflate.on("error",Af),this._inflate.on("data",Us)}this._inflate[Ea]=l,this._inflate.write(O),F&&this._inflate.write(Cf),this._inflate.flush(()=>{let Y=this._inflate[La];if(Y){this._inflate.close(),this._inflate=null,l(Y);return}let J=Ls.concat(this._inflate[ra],this._inflate[Gi]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Gi]=0,this._inflate[ra]=[],F&&this.params[`${W}_no_context_takeover`]&&this._inflate.reset()),l(null,J)})}_compress(O,F,l){let W=this._isServer?"server":"client";if(!this._deflate){let Y=`${W}_max_window_bits`,J=typeof this.params[Y]!="number"?wa.Z_DEFAULT_WINDOWBITS:this.params[Y];this._deflate=wa.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:J}),this._deflate[Gi]=0,this._deflate[ra]=[],this._deflate.on("data",Ff)}this._deflate[Ea]=l,this._deflate.write(O),this._deflate.flush(wa.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let Y=Ls.concat(this._deflate[ra],this._deflate[Gi]);F&&(Y=new Tf(Y.buffer,Y.byteOffset,Y.length-4)),this._deflate[Ea]=null,this._deflate[Gi]=0,this._deflate[ra]=[],F&&this.params[`${W}_no_context_takeover`]&&this._deflate.reset(),l(null,Y)})}};Bs.exports=as;function Ff(R){this[ra].push(R),this[Gi]+=R.length}function Us(R){if(this[Gi]+=R.length,this[Ia]._maxPayload<1||this[Gi]<=this[Ia]._maxPayload){this[ra].push(R);return}this[La]=new RangeError("Max payload size exceeded"),this[La].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[La][Is]=1009,this.removeListener("data",Us),this.reset()}function Af(R){this[Ia]._inflate=null,R[Is]=1007,this[Ea](R)}});var Sa=Li((Kl,Ua)=>{"use strict";var{isUtf8:xs}=require("buffer"),Pf=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Rf(R){return R>=1e3&&R<=1014&&R!==1004&&R!==1005&&R!==1006||R>=3e3&&R<=4999}function ss(R){let O=R.length,F=0;for(;F<O;)if(!(R[F]&128))F++;else if((R[F]&224)===192){if(F+1===O||(R[F+1]&192)!==128||(R[F]&254)===192)return!1;F+=2}else if((R[F]&240)===224){if(F+2>=O||(R[F+1]&192)!==128||(R[F+2]&192)!==128||R[F]===224&&(R[F+1]&224)===128||R[F]===237&&(R[F+1]&224)===160)return!1;F+=3}else if((R[F]&248)===240){if(F+3>=O||(R[F+1]&192)!==128||(R[F+2]&192)!==128||(R[F+3]&192)!==128||R[F]===240&&(R[F+1]&240)===128||R[F]===244&&R[F+1]>143||R[F]>244)return!1;F+=4}else return!1;return!0}Ua.exports={isValidStatusCode:Rf,isValidUTF8:ss,tokenChars:Pf};if(xs)Ua.exports.isValidUTF8=function(R){return R.length<24?ss(R):xs(R)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let R=require("utf-8-validate");Ua.exports.isValidUTF8=function(O){return O.length<32?ss(O):R(O)}}catch{}});var xa=Li((Gl,Vs)=>{"use strict";var{Writable:Mf}=require("stream"),Hs=ga(),{BINARY_TYPES:Lf,EMPTY_BUFFER:zs,kStatusCode:If,kWebSocket:Uf}=ea(),{concat:us,toArrayBuffer:Bf,unmask:xf}=ya(),{isValidStatusCode:Hf,isValidUTF8:Ws}=Sa(),Ba=Buffer[Symbol.species],ba=0,js=1,Ys=2,qs=3,fs=4,zf=5,cs=class extends Mf{constructor(O={}){super(),this._binaryType=O.binaryType||Lf[0],this._extensions=O.extensions||{},this._isServer=!!O.isServer,this._maxPayload=O.maxPayload|0,this._skipUTF8Validation=!!O.skipUTF8Validation,this[Uf]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=ba,this._loop=!1}_write(O,F,l){if(this._opcode===8&&this._state==ba)return l();this._bufferedBytes+=O.length,this._buffers.push(O),this.startLoop(l)}consume(O){if(this._bufferedBytes-=O,O===this._buffers[0].length)return this._buffers.shift();if(O<this._buffers[0].length){let l=this._buffers[0];return this._buffers[0]=new Ba(l.buffer,l.byteOffset+O,l.length-O),new Ba(l.buffer,l.byteOffset,O)}let F=Buffer.allocUnsafe(O);do{let l=this._buffers[0],W=F.length-O;O>=l.length?F.set(this._buffers.shift(),W):(F.set(new Uint8Array(l.buffer,l.byteOffset,O),W),this._buffers[0]=new Ba(l.buffer,l.byteOffset+O,l.length-O)),O-=l.length}while(O>0);return F}startLoop(O){let F;this._loop=!0;do switch(this._state){case ba:F=this.getInfo();break;case js:F=this.getPayloadLength16();break;case Ys:F=this.getPayloadLength64();break;case qs:this.getMask();break;case fs:F=this.getData(O);break;default:this._loop=!1;return}while(this._loop);O(F)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let O=this.consume(2);if(O[0]&48)return this._loop=!1,Un(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");let F=(O[0]&64)===64;if(F&&!this._extensions[Hs.extensionName])return this._loop=!1,Un(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=(O[0]&128)===128,this._opcode=O[0]&15,this._payloadLength=O[1]&127,this._opcode===0){if(F)return this._loop=!1,Un(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Un(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,Un(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=F}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,Un(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(F)return this._loop=!1,Un(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1)return this._loop=!1,Un(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,Un(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(O[1]&128)===128,this._isServer){if(!this._masked)return this._loop=!1,Un(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Un(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=js;else if(this._payloadLength===127)this._state=Ys;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let O=this.consume(8),F=O.readUInt32BE(0);return F>Math.pow(2,53-32)-1?(this._loop=!1,Un(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=F*Math.pow(2,32)+O.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Un(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=qs:this._state=fs}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=fs}getData(O){let F=zs;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}F=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&xf(F,this._mask)}if(this._opcode>7)return this.controlMessage(F);if(this._compressed){this._state=zf,this.decompress(F,O);return}return F.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(F)),this.dataMessage()}decompress(O,F){this._extensions[Hs.extensionName].decompress(O,this._fin,(W,Y)=>{if(W)return F(W);if(Y.length){if(this._messageLength+=Y.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return F(Un(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(Y)}let J=this.dataMessage();if(J)return F(J);this.startLoop(F)})}dataMessage(){if(this._fin){let O=this._messageLength,F=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let l;this._binaryType==="nodebuffer"?l=us(F,O):this._binaryType==="arraybuffer"?l=Bf(us(F,O)):l=F,this.emit("message",l,!0)}else{let l=us(F,O);if(!this._skipUTF8Validation&&!Ws(l))return this._loop=!1,Un(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",l,!1)}}this._state=ba}controlMessage(O){if(this._opcode===8)if(this._loop=!1,O.length===0)this.emit("conclude",1005,zs),this.end();else{let F=O.readUInt16BE(0);if(!Hf(F))return Un(RangeError,`invalid status code ${F}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let l=new Ba(O.buffer,O.byteOffset+2,O.length-2);if(!this._skipUTF8Validation&&!Ws(l))return Un(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",F,l),this.end()}else this._opcode===9?this.emit("ping",O):this.emit("pong",O);this._state=ba}};Vs.exports=cs;function Un(R,O,F,l,W){let Y=new R(F?`Invalid WebSocket frame: ${O}`:O);return Error.captureStackTrace(Y,Un),Y.code=W,Y[If]=l,Y}});var Ha=Li((Zl,Xs)=>{"use strict";var Xl=require("net"),$l=require("tls"),{randomFillSync:Wf}=require("crypto"),Ks=ga(),{EMPTY_BUFFER:jf}=ea(),{isValidStatusCode:Yf}=Sa(),{mask:Gs,toBuffer:ca}=ya(),xi=Symbol("kByteLength"),qf=Buffer.alloc(4),qi=class{constructor(O,F,l){this._extensions=F||{},l&&(this._generateMask=l,this._maskBuffer=Buffer.alloc(4)),this._socket=O,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(O,F){let l,W=!1,Y=2,J=!1;F.mask&&(l=F.maskBuffer||qf,F.generateMask?F.generateMask(l):Wf(l,0,4),J=(l[0]|l[1]|l[2]|l[3])===0,Y=6);let te;typeof O=="string"?(!F.mask||J)&&F[xi]!==void 0?te=F[xi]:(O=Buffer.from(O),te=O.length):(te=O.length,W=F.mask&&F.readOnly&&!J);let me=te;te>=65536?(Y+=8,me=127):te>125&&(Y+=2,me=126);let fe=Buffer.allocUnsafe(W?te+Y:Y);return fe[0]=F.fin?F.opcode|128:F.opcode,F.rsv1&&(fe[0]|=64),fe[1]=me,me===126?fe.writeUInt16BE(te,2):me===127&&(fe[2]=fe[3]=0,fe.writeUIntBE(te,4,6)),F.mask?(fe[1]|=128,fe[Y-4]=l[0],fe[Y-3]=l[1],fe[Y-2]=l[2],fe[Y-1]=l[3],J?[fe,O]:W?(Gs(O,l,fe,Y,te),[fe]):(Gs(O,l,O,0,te),[fe,O])):[fe,O]}close(O,F,l,W){let Y;if(O===void 0)Y=jf;else{if(typeof O!="number"||!Yf(O))throw new TypeError("First argument must be a valid error code number");if(F===void 0||!F.length)Y=Buffer.allocUnsafe(2),Y.writeUInt16BE(O,0);else{let te=Buffer.byteLength(F);if(te>123)throw new RangeError("The message must not be greater than 123 bytes");Y=Buffer.allocUnsafe(2+te),Y.writeUInt16BE(O,0),typeof F=="string"?Y.write(F,2):Y.set(F,2)}}let J={[xi]:Y.length,fin:!0,generateMask:this._generateMask,mask:l,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,Y,!1,J,W]):this.sendFrame(qi.frame(Y,J),W)}ping(O,F,l){let W,Y;if(typeof O=="string"?(W=Buffer.byteLength(O),Y=!1):(O=ca(O),W=O.length,Y=ca.readOnly),W>125)throw new RangeError("The data size must not be greater than 125 bytes");let J={[xi]:W,fin:!0,generateMask:this._generateMask,mask:F,maskBuffer:this._maskBuffer,opcode:9,readOnly:Y,rsv1:!1};this._deflating?this.enqueue([this.dispatch,O,!1,J,l]):this.sendFrame(qi.frame(O,J),l)}pong(O,F,l){let W,Y;if(typeof O=="string"?(W=Buffer.byteLength(O),Y=!1):(O=ca(O),W=O.length,Y=ca.readOnly),W>125)throw new RangeError("The data size must not be greater than 125 bytes");let J={[xi]:W,fin:!0,generateMask:this._generateMask,mask:F,maskBuffer:this._maskBuffer,opcode:10,readOnly:Y,rsv1:!1};this._deflating?this.enqueue([this.dispatch,O,!1,J,l]):this.sendFrame(qi.frame(O,J),l)}send(O,F,l){let W=this._extensions[Ks.extensionName],Y=F.binary?2:1,J=F.compress,te,me;if(typeof O=="string"?(te=Buffer.byteLength(O),me=!1):(O=ca(O),te=O.length,me=ca.readOnly),this._firstFragment?(this._firstFragment=!1,J&&W&&W.params[W._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(J=te>=W._threshold),this._compress=J):(J=!1,Y=0),F.fin&&(this._firstFragment=!0),W){let fe={[xi]:te,fin:F.fin,generateMask:this._generateMask,mask:F.mask,maskBuffer:this._maskBuffer,opcode:Y,readOnly:me,rsv1:J};this._deflating?this.enqueue([this.dispatch,O,this._compress,fe,l]):this.dispatch(O,this._compress,fe,l)}else this.sendFrame(qi.frame(O,{[xi]:te,fin:F.fin,generateMask:this._generateMask,mask:F.mask,maskBuffer:this._maskBuffer,opcode:Y,readOnly:me,rsv1:!1}),l)}dispatch(O,F,l,W){if(!F){this.sendFrame(qi.frame(O,l),W);return}let Y=this._extensions[Ks.extensionName];this._bufferedBytes+=l[xi],this._deflating=!0,Y.compress(O,l.fin,(J,te)=>{if(this._socket.destroyed){let me=new Error("The socket was closed while data was being compressed");typeof W=="function"&&W(me);for(let fe=0;fe<this._queue.length;fe++){let Z=this._queue[fe],ae=Z[Z.length-1];typeof ae=="function"&&ae(me)}return}this._bufferedBytes-=l[xi],this._deflating=!1,l.readOnly=!1,this.sendFrame(qi.frame(te,l),W),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let O=this._queue.shift();this._bufferedBytes-=O[3][xi],Reflect.apply(O[0],this,O.slice(1))}}enqueue(O){this._bufferedBytes+=O[3][xi],this._queue.push(O)}sendFrame(O,F){O.length===2?(this._socket.cork(),this._socket.write(O[0]),this._socket.write(O[1],F),this._socket.uncork()):this._socket.write(O[0],F)}};Xs.exports=qi});var ou=Li((Jl,nu)=>{"use strict";var{kForOnEventAttribute:ka,kListener:ls}=ea(),$s=Symbol("kCode"),Zs=Symbol("kData"),Js=Symbol("kError"),Qs=Symbol("kMessage"),eu=Symbol("kReason"),la=Symbol("kTarget"),ru=Symbol("kType"),tu=Symbol("kWasClean"),Xi=class{constructor(O){this[la]=null,this[ru]=O}get target(){return this[la]}get type(){return this[ru]}};Object.defineProperty(Xi.prototype,"target",{enumerable:!0});Object.defineProperty(Xi.prototype,"type",{enumerable:!0});var oa=class extends Xi{constructor(O,F={}){super(O),this[$s]=F.code===void 0?0:F.code,this[eu]=F.reason===void 0?"":F.reason,this[tu]=F.wasClean===void 0?!1:F.wasClean}get code(){return this[$s]}get reason(){return this[eu]}get wasClean(){return this[tu]}};Object.defineProperty(oa.prototype,"code",{enumerable:!0});Object.defineProperty(oa.prototype,"reason",{enumerable:!0});Object.defineProperty(oa.prototype,"wasClean",{enumerable:!0});var da=class extends Xi{constructor(O,F={}){super(O),this[Js]=F.error===void 0?null:F.error,this[Qs]=F.message===void 0?"":F.message}get error(){return this[Js]}get message(){return this[Qs]}};Object.defineProperty(da.prototype,"error",{enumerable:!0});Object.defineProperty(da.prototype,"message",{enumerable:!0});var Da=class extends Xi{constructor(O,F={}){super(O),this[Zs]=F.data===void 0?null:F.data}get data(){return this[Zs]}};Object.defineProperty(Da.prototype,"data",{enumerable:!0});var Vf={addEventListener(R,O,F={}){for(let W of this.listeners(R))if(!F[ka]&&W[ls]===O&&!W[ka])return;let l;if(R==="message")l=function(Y,J){let te=new Da("message",{data:J?Y:Y.toString()});te[la]=this,za(O,this,te)};else if(R==="close")l=function(Y,J){let te=new oa("close",{code:Y,reason:J.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});te[la]=this,za(O,this,te)};else if(R==="error")l=function(Y){let J=new da("error",{error:Y,message:Y.message});J[la]=this,za(O,this,J)};else if(R==="open")l=function(){let Y=new Xi("open");Y[la]=this,za(O,this,Y)};else return;l[ka]=!!F[ka],l[ls]=O,F.once?this.once(R,l):this.on(R,l)},removeEventListener(R,O){for(let F of this.listeners(R))if(F[ls]===O&&!F[ka]){this.removeListener(R,F);break}}};nu.exports={CloseEvent:oa,ErrorEvent:da,Event:Xi,EventTarget:Vf,MessageEvent:Da};function za(R,O,F){typeof R=="object"&&R.handleEvent?R.handleEvent.call(R,F):R.call(O,F)}});var ds=Li((Ql,iu)=>{"use strict";var{tokenChars:Oa}=Sa();function Vi(R,O,F){R[O]===void 0?R[O]=[F]:R[O].push(F)}function Kf(R){let O=Object.create(null),F=Object.create(null),l=!1,W=!1,Y=!1,J,te,me=-1,fe=-1,Z=-1,ae=0;for(;ae<R.length;ae++)if(fe=R.charCodeAt(ae),J===void 0)if(Z===-1&&Oa[fe]===1)me===-1&&(me=ae);else if(ae!==0&&(fe===32||fe===9))Z===-1&&me!==-1&&(Z=ae);else if(fe===59||fe===44){if(me===-1)throw new SyntaxError(`Unexpected character at index ${ae}`);Z===-1&&(Z=ae);let Ye=R.slice(me,Z);fe===44?(Vi(O,Ye,F),F=Object.create(null)):J=Ye,me=Z=-1}else throw new SyntaxError(`Unexpected character at index ${ae}`);else if(te===void 0)if(Z===-1&&Oa[fe]===1)me===-1&&(me=ae);else if(fe===32||fe===9)Z===-1&&me!==-1&&(Z=ae);else if(fe===59||fe===44){if(me===-1)throw new SyntaxError(`Unexpected character at index ${ae}`);Z===-1&&(Z=ae),Vi(F,R.slice(me,Z),!0),fe===44&&(Vi(O,J,F),F=Object.create(null),J=void 0),me=Z=-1}else if(fe===61&&me!==-1&&Z===-1)te=R.slice(me,ae),me=Z=-1;else throw new SyntaxError(`Unexpected character at index ${ae}`);else if(W){if(Oa[fe]!==1)throw new SyntaxError(`Unexpected character at index ${ae}`);me===-1?me=ae:l||(l=!0),W=!1}else if(Y)if(Oa[fe]===1)me===-1&&(me=ae);else if(fe===34&&me!==-1)Y=!1,Z=ae;else if(fe===92)W=!0;else throw new SyntaxError(`Unexpected character at index ${ae}`);else if(fe===34&&R.charCodeAt(ae-1)===61)Y=!0;else if(Z===-1&&Oa[fe]===1)me===-1&&(me=ae);else if(me!==-1&&(fe===32||fe===9))Z===-1&&(Z=ae);else if(fe===59||fe===44){if(me===-1)throw new SyntaxError(`Unexpected character at index ${ae}`);Z===-1&&(Z=ae);let Ye=R.slice(me,Z);l&&(Ye=Ye.replace(/\\/g,""),l=!1),Vi(F,te,Ye),fe===44&&(Vi(O,J,F),F=Object.create(null),J=void 0),te=void 0,me=Z=-1}else throw new SyntaxError(`Unexpected character at index ${ae}`);if(me===-1||Y||fe===32||fe===9)throw new SyntaxError("Unexpected end of input");Z===-1&&(Z=ae);let cr=R.slice(me,Z);return J===void 0?Vi(O,cr,F):(te===void 0?Vi(F,cr,!0):l?Vi(F,te,cr.replace(/\\/g,"")):Vi(F,te,cr),Vi(O,J,F)),O}function Gf(R){return Object.keys(R).map(O=>{let F=R[O];return Array.isArray(F)||(F=[F]),F.map(l=>[O].concat(Object.keys(l).map(W=>{let Y=l[W];return Array.isArray(Y)||(Y=[Y]),Y.map(J=>J===!0?W:`${W}=${J}`).join("; ")})).join("; ")).join(", ")}).join(", ")}iu.exports={format:Gf,parse:Kf}});var qa=Li((rd,pu)=>{"use strict";var Xf=require("events"),$f=require("https"),Zf=require("http"),uu=require("net"),Jf=require("tls"),{randomBytes:Qf,createHash:ec}=require("crypto"),{Readable:ed}=require("stream"),{URL:_s}=require("url"),ta=ga(),rc=xa(),tc=Ha(),{BINARY_TYPES:au,EMPTY_BUFFER:Wa,GUID:nc,kForOnEventAttribute:vs,kListener:oc,kStatusCode:ic,kWebSocket:Mi,NOOP:fu}=ea(),{EventTarget:{addEventListener:ac,removeEventListener:sc}}=ou(),{format:uc,parse:fc}=ds(),{toBuffer:cc}=ya(),lc=30*1e3,cu=Symbol("kAborted"),ms=[8,13],$i=["CONNECTING","OPEN","CLOSING","CLOSED"],dc=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,hr=class extends Xf{constructor(O,F,l){super(),this._binaryType=au[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Wa,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=hr.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,O!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,F===void 0?F=[]:Array.isArray(F)||(typeof F=="object"&&F!==null?(l=F,F=[]):F=[F]),lu(this,O,F,l)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(O){au.includes(O)&&(this._binaryType=O,this._receiver&&(this._receiver._binaryType=O))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(O,F,l){let W=new rc({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:l.maxPayload,skipUTF8Validation:l.skipUTF8Validation});this._sender=new tc(O,this._extensions,l.generateMask),this._receiver=W,this._socket=O,W[Mi]=this,O[Mi]=this,W.on("conclude",mc),W.on("drain",pc),W.on("error",hc),W.on("message",yc),W.on("ping",wc),W.on("pong",Ec),O.setTimeout(0),O.setNoDelay(),F.length>0&&O.unshift(F),O.on("close",_u),O.on("data",Ya),O.on("end",vu),O.on("error",mu),this._readyState=hr.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=hr.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ta.extensionName]&&this._extensions[ta.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=hr.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(O,F){if(this.readyState!==hr.CLOSED){if(this.readyState===hr.CONNECTING){let l="WebSocket was closed before the connection was established";Ui(this,this._req,l);return}if(this.readyState===hr.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=hr.CLOSING,this._sender.close(O,F,!this._isServer,l=>{l||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),lc)}}pause(){this.readyState===hr.CONNECTING||this.readyState===hr.CLOSED||(this._paused=!0,this._socket.pause())}ping(O,F,l){if(this.readyState===hr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof O=="function"?(l=O,O=F=void 0):typeof F=="function"&&(l=F,F=void 0),typeof O=="number"&&(O=O.toString()),this.readyState!==hr.OPEN){ps(this,O,l);return}F===void 0&&(F=!this._isServer),this._sender.ping(O||Wa,F,l)}pong(O,F,l){if(this.readyState===hr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof O=="function"?(l=O,O=F=void 0):typeof F=="function"&&(l=F,F=void 0),typeof O=="number"&&(O=O.toString()),this.readyState!==hr.OPEN){ps(this,O,l);return}F===void 0&&(F=!this._isServer),this._sender.pong(O||Wa,F,l)}resume(){this.readyState===hr.CONNECTING||this.readyState===hr.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(O,F,l){if(this.readyState===hr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof F=="function"&&(l=F,F={}),typeof O=="number"&&(O=O.toString()),this.readyState!==hr.OPEN){ps(this,O,l);return}let W={binary:typeof O!="string",mask:!this._isServer,compress:!0,fin:!0,...F};this._extensions[ta.extensionName]||(W.compress=!1),this._sender.send(O||Wa,W,l)}terminate(){if(this.readyState!==hr.CLOSED){if(this.readyState===hr.CONNECTING){let O="WebSocket was closed before the connection was established";Ui(this,this._req,O);return}this._socket&&(this._readyState=hr.CLOSING,this._socket.destroy())}}};Object.defineProperty(hr,"CONNECTING",{enumerable:!0,value:$i.indexOf("CONNECTING")});Object.defineProperty(hr.prototype,"CONNECTING",{enumerable:!0,value:$i.indexOf("CONNECTING")});Object.defineProperty(hr,"OPEN",{enumerable:!0,value:$i.indexOf("OPEN")});Object.defineProperty(hr.prototype,"OPEN",{enumerable:!0,value:$i.indexOf("OPEN")});Object.defineProperty(hr,"CLOSING",{enumerable:!0,value:$i.indexOf("CLOSING")});Object.defineProperty(hr.prototype,"CLOSING",{enumerable:!0,value:$i.indexOf("CLOSING")});Object.defineProperty(hr,"CLOSED",{enumerable:!0,value:$i.indexOf("CLOSED")});Object.defineProperty(hr.prototype,"CLOSED",{enumerable:!0,value:$i.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(R=>{Object.defineProperty(hr.prototype,R,{enumerable:!0})});["open","error","close","message"].forEach(R=>{Object.defineProperty(hr.prototype,`on${R}`,{enumerable:!0,get(){for(let O of this.listeners(R))if(O[vs])return O[oc];return null},set(O){for(let F of this.listeners(R))if(F[vs]){this.removeListener(R,F);break}typeof O=="function"&&this.addEventListener(R,O,{[vs]:!0})}})});hr.prototype.addEventListener=ac;hr.prototype.removeEventListener=sc;pu.exports=hr;function lu(R,O,F,l){let W={protocolVersion:ms[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...l,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!ms.includes(W.protocolVersion))throw new RangeError(`Unsupported protocol version: ${W.protocolVersion} (supported versions: ${ms.join(", ")})`);let Y;if(O instanceof _s)Y=O,R._url=O.href;else{try{Y=new _s(O)}catch{throw new SyntaxError(`Invalid URL: ${O}`)}R._url=O}let J=Y.protocol==="wss:",te=Y.protocol==="ws+unix:",me;if(Y.protocol!=="ws:"&&!J&&!te?me=`The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"`:te&&!Y.pathname?me="The URL's pathname is empty":Y.hash&&(me="The URL contains a fragment identifier"),me){let Me=new SyntaxError(me);if(R._redirects===0)throw Me;ja(R,Me);return}let fe=J?443:80,Z=Qf(16).toString("base64"),ae=J?$f.request:Zf.request,cr=new Set,Ye;if(W.createConnection=J?vc:_c,W.defaultPort=W.defaultPort||fe,W.port=Y.port||fe,W.host=Y.hostname.startsWith("[")?Y.hostname.slice(1,-1):Y.hostname,W.headers={...W.headers,"Sec-WebSocket-Version":W.protocolVersion,"Sec-WebSocket-Key":Z,Connection:"Upgrade",Upgrade:"websocket"},W.path=Y.pathname+Y.search,W.timeout=W.handshakeTimeout,W.perMessageDeflate&&(Ye=new ta(W.perMessageDeflate!==!0?W.perMessageDeflate:{},!1,W.maxPayload),W.headers["Sec-WebSocket-Extensions"]=uc({[ta.extensionName]:Ye.offer()})),F.length){for(let Me of F){if(typeof Me!="string"||!dc.test(Me)||cr.has(Me))throw new SyntaxError("An invalid or duplicated subprotocol was specified");cr.add(Me)}W.headers["Sec-WebSocket-Protocol"]=F.join(",")}if(W.origin&&(W.protocolVersion<13?W.headers["Sec-WebSocket-Origin"]=W.origin:W.headers.Origin=W.origin),(Y.username||Y.password)&&(W.auth=`${Y.username}:${Y.password}`),te){let Me=W.path.split(":");W.socketPath=Me[0],W.path=Me[1]}let nr;if(W.followRedirects){if(R._redirects===0){R._originalIpc=te,R._originalSecure=J,R._originalHostOrSocketPath=te?W.socketPath:Y.host;let Me=l&&l.headers;if(l={...l,headers:{}},Me)for(let[Lr,V]of Object.entries(Me))l.headers[Lr.toLowerCase()]=V}else if(R.listenerCount("redirect")===0){let Me=te?R._originalIpc?W.socketPath===R._originalHostOrSocketPath:!1:R._originalIpc?!1:Y.host===R._originalHostOrSocketPath;(!Me||R._originalSecure&&!J)&&(delete W.headers.authorization,delete W.headers.cookie,Me||delete W.headers.host,W.auth=void 0)}W.auth&&!l.headers.authorization&&(l.headers.authorization="Basic "+Buffer.from(W.auth).toString("base64")),nr=R._req=ae(W),R._redirects&&R.emit("redirect",R.url,nr)}else nr=R._req=ae(W);W.timeout&&nr.on("timeout",()=>{Ui(R,nr,"Opening handshake has timed out")}),nr.on("error",Me=>{nr===null||nr[cu]||(nr=R._req=null,ja(R,Me))}),nr.on("response",Me=>{let Lr=Me.headers.location,V=Me.statusCode;if(Lr&&W.followRedirects&&V>=300&&V<400){if(++R._redirects>W.maxRedirects){Ui(R,nr,"Maximum redirects exceeded");return}nr.abort();let Le;try{Le=new _s(Lr,O)}catch{let Qe=new SyntaxError(`Invalid URL: ${Lr}`);ja(R,Qe);return}lu(R,Le,F,l)}else R.emit("unexpected-response",nr,Me)||Ui(R,nr,`Unexpected server response: ${Me.statusCode}`)}),nr.on("upgrade",(Me,Lr,V)=>{if(R.emit("upgrade",Me),R.readyState!==hr.CONNECTING)return;if(nr=R._req=null,Me.headers.upgrade.toLowerCase()!=="websocket"){Ui(R,Lr,"Invalid Upgrade header");return}let Le=ec("sha1").update(Z+nc).digest("base64");if(Me.headers["sec-websocket-accept"]!==Le){Ui(R,Lr,"Invalid Sec-WebSocket-Accept header");return}let wr=Me.headers["sec-websocket-protocol"],Qe;if(wr!==void 0?cr.size?cr.has(wr)||(Qe="Server sent an invalid subprotocol"):Qe="Server sent a subprotocol but none was requested":cr.size&&(Qe="Server sent no subprotocol"),Qe){Ui(R,Lr,Qe);return}wr&&(R._protocol=wr);let ce=Me.headers["sec-websocket-extensions"];if(ce!==void 0){if(!Ye){Ui(R,Lr,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Ke;try{Ke=fc(ce)}catch{Ui(R,Lr,"Invalid Sec-WebSocket-Extensions header");return}let yn=Object.keys(Ke);if(yn.length!==1||yn[0]!==ta.extensionName){Ui(R,Lr,"Server indicated an extension that was not requested");return}try{Ye.accept(Ke[ta.extensionName])}catch{Ui(R,Lr,"Invalid Sec-WebSocket-Extensions header");return}R._extensions[ta.extensionName]=Ye}R.setSocket(Lr,V,{generateMask:W.generateMask,maxPayload:W.maxPayload,skipUTF8Validation:W.skipUTF8Validation})}),W.finishRequest?W.finishRequest(nr,R):nr.end()}function ja(R,O){R._readyState=hr.CLOSING,R.emit("error",O),R.emitClose()}function _c(R){return R.path=R.socketPath,uu.connect(R)}function vc(R){return R.path=void 0,!R.servername&&R.servername!==""&&(R.servername=uu.isIP(R.host)?"":R.host),Jf.connect(R)}function Ui(R,O,F){R._readyState=hr.CLOSING;let l=new Error(F);Error.captureStackTrace(l,Ui),O.setHeader?(O[cu]=!0,O.abort(),O.socket&&!O.socket.destroyed&&O.socket.destroy(),process.nextTick(ja,R,l)):(O.destroy(l),O.once("error",R.emit.bind(R,"error")),O.once("close",R.emitClose.bind(R)))}function ps(R,O,F){if(O){let l=cc(O).length;R._socket?R._sender._bufferedBytes+=l:R._bufferedAmount+=l}if(F){let l=new Error(`WebSocket is not open: readyState ${R.readyState} (${$i[R.readyState]})`);process.nextTick(F,l)}}function mc(R,O){let F=this[Mi];F._closeFrameReceived=!0,F._closeMessage=O,F._closeCode=R,F._socket[Mi]!==void 0&&(F._socket.removeListener("data",Ya),process.nextTick(du,F._socket),R===1005?F.close():F.close(R,O))}function pc(){let R=this[Mi];R.isPaused||R._socket.resume()}function hc(R){let O=this[Mi];O._socket[Mi]!==void 0&&(O._socket.removeListener("data",Ya),process.nextTick(du,O._socket),O.close(R[ic])),O.emit("error",R)}function su(){this[Mi].emitClose()}function yc(R,O){this[Mi].emit("message",R,O)}function wc(R){let O=this[Mi];O.pong(R,!O._isServer,fu),O.emit("ping",R)}function Ec(R){this[Mi].emit("pong",R)}function du(R){R.resume()}function _u(){let R=this[Mi];this.removeListener("close",_u),this.removeListener("data",Ya),this.removeListener("end",vu),R._readyState=hr.CLOSING;let O;!this._readableState.endEmitted&&!R._closeFrameReceived&&!R._receiver._writableState.errorEmitted&&(O=R._socket.read())!==null&&R._receiver.write(O),R._receiver.end(),this[Mi]=void 0,clearTimeout(R._closeTimer),R._receiver._writableState.finished||R._receiver._writableState.errorEmitted?R.emitClose():(R._receiver.on("error",su),R._receiver.on("finish",su))}function Ya(R){this[Mi]._receiver.write(R)||this.pause()}function vu(){let R=this[Mi];R._readyState=hr.CLOSING,R._receiver.end(),this.end()}function mu(){let R=this[Mi];this.removeListener("error",mu),this.on("error",fu),R&&(R._readyState=hr.CLOSING,this.destroy())}});var hs=Li((td,wu)=>{"use strict";var{Duplex:gc}=require("stream");function hu(R){R.emit("close")}function Sc(){!this.destroyed&&this._writableState.finished&&this.destroy()}function yu(R){this.removeListener("error",yu),this.destroy(),this.listenerCount("error")===0&&this.emit("error",R)}function bc(R,O){let F=!0,l=new gc({...O,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return R.on("message",function(Y,J){let te=!J&&l._readableState.objectMode?Y.toString():Y;l.push(te)||R.pause()}),R.once("error",function(Y){l.destroyed||(F=!1,l.destroy(Y))}),R.once("close",function(){l.destroyed||l.push(null)}),l._destroy=function(W,Y){if(R.readyState===R.CLOSED){Y(W),process.nextTick(hu,l);return}let J=!1;R.once("error",function(me){J=!0,Y(me)}),R.once("close",function(){J||Y(W),process.nextTick(hu,l)}),F&&R.terminate()},l._final=function(W){if(R.readyState===R.CONNECTING){R.once("open",function(){l._final(W)});return}R._socket!==null&&(R._socket._writableState.finished?(W(),l._readableState.endEmitted&&l.destroy()):(R._socket.once("finish",function(){W()}),R.close()))},l._read=function(){R.isPaused&&R.resume()},l._write=function(W,Y,J){if(R.readyState===R.CONNECTING){R.once("open",function(){l._write(W,Y,J)});return}R.send(W,J)},l.on("end",Sc),l.on("error",yu),l}wu.exports=bc});var gu=Li((nd,Eu)=>{"use strict";var{tokenChars:kc}=Sa();function Dc(R){let O=new Set,F=-1,l=-1,W=0;for(W;W<R.length;W++){let J=R.charCodeAt(W);if(l===-1&&kc[J]===1)F===-1&&(F=W);else if(W!==0&&(J===32||J===9))l===-1&&F!==-1&&(l=W);else if(J===44){if(F===-1)throw new SyntaxError(`Unexpected character at index ${W}`);l===-1&&(l=W);let te=R.slice(F,l);if(O.has(te))throw new SyntaxError(`The "${te}" subprotocol is duplicated`);O.add(te),F=l=-1}else throw new SyntaxError(`Unexpected character at index ${W}`)}if(F===-1||l!==-1)throw new SyntaxError("Unexpected end of input");let Y=R.slice(F,W);if(O.has(Y))throw new SyntaxError(`The "${Y}" subprotocol is duplicated`);return O.add(Y),O}Eu.exports={parse:Dc}});var ws=Li((sd,Nu)=>{"use strict";var Oc=require("events"),Va=require("http"),od=require("https"),id=require("net"),ad=require("tls"),{createHash:Nc}=require("crypto"),Su=ds(),ia=ga(),Tc=gu(),Cc=qa(),{GUID:Fc,kWebSocket:Ac}=ea(),Pc=/^[+/0-9A-Za-z]{22}==$/,bu=0,ku=1,Ou=2,ys=class extends Oc{constructor(O,F){if(super(),O={maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Cc,...O},O.port==null&&!O.server&&!O.noServer||O.port!=null&&(O.server||O.noServer)||O.server&&O.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(O.port!=null?(this._server=Va.createServer((l,W)=>{let Y=Va.STATUS_CODES[426];W.writeHead(426,{"Content-Length":Y.length,"Content-Type":"text/plain"}),W.end(Y)}),this._server.listen(O.port,O.host,O.backlog,F)):O.server&&(this._server=O.server),this._server){let l=this.emit.bind(this,"connection");this._removeListeners=Rc(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(W,Y,J)=>{this.handleUpgrade(W,Y,J,l)}})}O.perMessageDeflate===!0&&(O.perMessageDeflate={}),O.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=O,this._state=bu}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(O){if(this._state===Ou){O&&this.once("close",()=>{O(new Error("The server is not running"))}),process.nextTick(Na,this);return}if(O&&this.once("close",O),this._state!==ku)if(this._state=ku,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Na,this):process.nextTick(Na,this);else{let F=this._server;this._removeListeners(),this._removeListeners=this._server=null,F.close(()=>{Na(this)})}}shouldHandle(O){if(this.options.path){let F=O.url.indexOf("?");if((F!==-1?O.url.slice(0,F):O.url)!==this.options.path)return!1}return!0}handleUpgrade(O,F,l,W){F.on("error",Du);let Y=O.headers["sec-websocket-key"],J=+O.headers["sec-websocket-version"];if(O.method!=="GET"){aa(this,O,F,405,"Invalid HTTP method");return}if(O.headers.upgrade.toLowerCase()!=="websocket"){aa(this,O,F,400,"Invalid Upgrade header");return}if(!Y||!Pc.test(Y)){aa(this,O,F,400,"Missing or invalid Sec-WebSocket-Key header");return}if(J!==8&&J!==13){aa(this,O,F,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(O)){Ta(F,400);return}let te=O.headers["sec-websocket-protocol"],me=new Set;if(te!==void 0)try{me=Tc.parse(te)}catch{aa(this,O,F,400,"Invalid Sec-WebSocket-Protocol header");return}let fe=O.headers["sec-websocket-extensions"],Z={};if(this.options.perMessageDeflate&&fe!==void 0){let ae=new ia(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let cr=Su.parse(fe);cr[ia.extensionName]&&(ae.accept(cr[ia.extensionName]),Z[ia.extensionName]=ae)}catch{aa(this,O,F,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let ae={origin:O.headers[`${J===8?"sec-websocket-origin":"origin"}`],secure:!!(O.socket.authorized||O.socket.encrypted),req:O};if(this.options.verifyClient.length===2){this.options.verifyClient(ae,(cr,Ye,nr,Me)=>{if(!cr)return Ta(F,Ye||401,nr,Me);this.completeUpgrade(Z,Y,me,O,F,l,W)});return}if(!this.options.verifyClient(ae))return Ta(F,401)}this.completeUpgrade(Z,Y,me,O,F,l,W)}completeUpgrade(O,F,l,W,Y,J,te){if(!Y.readable||!Y.writable)return Y.destroy();if(Y[Ac])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>bu)return Ta(Y,503);let fe=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Nc("sha1").update(F+Fc).digest("base64")}`],Z=new this.options.WebSocket(null);if(l.size){let ae=this.options.handleProtocols?this.options.handleProtocols(l,W):l.values().next().value;ae&&(fe.push(`Sec-WebSocket-Protocol: ${ae}`),Z._protocol=ae)}if(O[ia.extensionName]){let ae=O[ia.extensionName].params,cr=Su.format({[ia.extensionName]:[ae]});fe.push(`Sec-WebSocket-Extensions: ${cr}`),Z._extensions=O}this.emit("headers",fe,W),Y.write(fe.concat(`\r
|
|
1
|
+
"use strict";var mf=Object.create;var va=Object.defineProperty;var ks=Object.getOwnPropertyDescriptor;var pf=Object.getOwnPropertyNames;var hf=Object.getPrototypeOf,yf=Object.prototype.hasOwnProperty;var Ki=(R,O)=>()=>(R&&(O=R(R=0)),O);var Ii=(R,O)=>()=>(O||R((O={exports:{}}).exports,O),O.exports),Wi=(R,O)=>{for(var F in O)va(R,F,{get:O[F],enumerable:!0})},Ds=(R,O,F,l)=>{if(O&&typeof O=="object"||typeof O=="function")for(let W of pf(O))!yf.call(R,W)&&W!==F&&va(R,W,{get:()=>O[W],enumerable:!(l=ks(O,W))||l.enumerable});return R};var ji=(R,O,F)=>(F=R!=null?mf(hf(R)):{},Ds(O||!R||!R.__esModule?va(F,"default",{value:R,enumerable:!0}):F,R)),wf=R=>Ds(va({},"__esModule",{value:!0}),R),xi=(R,O,F,l)=>{for(var W=l>1?void 0:l?ks(O,F):O,Y=R.length-1,J;Y>=0;Y--)(J=R[Y])&&(W=(l?J(O,F,W):J(W))||W);return l&&W&&va(O,F,W),W};var ea=Ii((jl,Cs)=>{"use strict";Cs.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var ya=Ii((Yl,Ra)=>{"use strict";var{EMPTY_BUFFER:kf}=ea(),ts=Buffer[Symbol.species];function Df(R,O){if(R.length===0)return kf;if(R.length===1)return R[0];let F=Buffer.allocUnsafe(O),l=0;for(let W=0;W<R.length;W++){let Y=R[W];F.set(Y,l),l+=Y.length}return l<O?new ts(F.buffer,F.byteOffset,l):F}function Fs(R,O,F,l,W){for(let Y=0;Y<W;Y++)F[l+Y]=R[Y]^O[Y&3]}function As(R,O){for(let F=0;F<R.length;F++)R[F]^=O[F&3]}function Of(R){return R.length===R.buffer.byteLength?R.buffer:R.buffer.slice(R.byteOffset,R.byteOffset+R.length)}function ns(R){if(ns.readOnly=!0,Buffer.isBuffer(R))return R;let O;return R instanceof ArrayBuffer?O=new ts(R):ArrayBuffer.isView(R)?O=new ts(R.buffer,R.byteOffset,R.byteLength):(O=Buffer.from(R),ns.readOnly=!1),O}Ra.exports={concat:Df,mask:Fs,toArrayBuffer:Of,toBuffer:ns,unmask:As};if(!process.env.WS_NO_BUFFER_UTIL)try{let R=require("bufferutil");Ra.exports.mask=function(O,F,l,W,Y){Y<48?Fs(O,F,l,W,Y):R.mask(O,F,l,W,Y)},Ra.exports.unmask=function(O,F){O.length<32?As(O,F):R.unmask(O,F)}}catch{}});var Ms=Ii((ql,Rs)=>{"use strict";var Ps=Symbol("kDone"),os=Symbol("kRun"),is=class{constructor(O){this[Ps]=()=>{this.pending--,this[os]()},this.concurrency=O||1/0,this.jobs=[],this.pending=0}add(O){this.jobs.push(O),this[os]()}[os](){if(this.pending!==this.concurrency&&this.jobs.length){let O=this.jobs.shift();this.pending++,O(this[Ps])}}};Rs.exports=is});var ga=Ii((Vl,Bs)=>{"use strict";var wa=require("zlib"),Ls=ya(),Nf=Ms(),{kStatusCode:Is}=ea(),Tf=Buffer[Symbol.species],Cf=Buffer.from([0,0,255,255]),Ia=Symbol("permessage-deflate"),Gi=Symbol("total-length"),Ea=Symbol("callback"),ra=Symbol("buffers"),La=Symbol("error"),Ma,as=class{constructor(O,F,l){if(this._maxPayload=l|0,this._options=O||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!F,this._deflate=null,this._inflate=null,this.params=null,!Ma){let W=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ma=new Nf(W)}}static get extensionName(){return"permessage-deflate"}offer(){let O={};return this._options.serverNoContextTakeover&&(O.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(O.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(O.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?O.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(O.client_max_window_bits=!0),O}accept(O){return O=this.normalizeParams(O),this.params=this._isServer?this.acceptAsServer(O):this.acceptAsClient(O),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let O=this._deflate[Ea];this._deflate.close(),this._deflate=null,O&&O(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(O){let F=this._options,l=O.find(W=>!(F.serverNoContextTakeover===!1&&W.server_no_context_takeover||W.server_max_window_bits&&(F.serverMaxWindowBits===!1||typeof F.serverMaxWindowBits=="number"&&F.serverMaxWindowBits>W.server_max_window_bits)||typeof F.clientMaxWindowBits=="number"&&!W.client_max_window_bits));if(!l)throw new Error("None of the extension offers can be accepted");return F.serverNoContextTakeover&&(l.server_no_context_takeover=!0),F.clientNoContextTakeover&&(l.client_no_context_takeover=!0),typeof F.serverMaxWindowBits=="number"&&(l.server_max_window_bits=F.serverMaxWindowBits),typeof F.clientMaxWindowBits=="number"?l.client_max_window_bits=F.clientMaxWindowBits:(l.client_max_window_bits===!0||F.clientMaxWindowBits===!1)&&delete l.client_max_window_bits,l}acceptAsClient(O){let F=O[0];if(this._options.clientNoContextTakeover===!1&&F.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!F.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(F.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&F.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return F}normalizeParams(O){return O.forEach(F=>{Object.keys(F).forEach(l=>{let W=F[l];if(W.length>1)throw new Error(`Parameter "${l}" must have only a single value`);if(W=W[0],l==="client_max_window_bits"){if(W!==!0){let Y=+W;if(!Number.isInteger(Y)||Y<8||Y>15)throw new TypeError(`Invalid value for parameter "${l}": ${W}`);W=Y}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${l}": ${W}`)}else if(l==="server_max_window_bits"){let Y=+W;if(!Number.isInteger(Y)||Y<8||Y>15)throw new TypeError(`Invalid value for parameter "${l}": ${W}`);W=Y}else if(l==="client_no_context_takeover"||l==="server_no_context_takeover"){if(W!==!0)throw new TypeError(`Invalid value for parameter "${l}": ${W}`)}else throw new Error(`Unknown parameter "${l}"`);F[l]=W})}),O}decompress(O,F,l){Ma.add(W=>{this._decompress(O,F,(Y,J)=>{W(),l(Y,J)})})}compress(O,F,l){Ma.add(W=>{this._compress(O,F,(Y,J)=>{W(),l(Y,J)})})}_decompress(O,F,l){let W=this._isServer?"client":"server";if(!this._inflate){let Y=`${W}_max_window_bits`,J=typeof this.params[Y]!="number"?wa.Z_DEFAULT_WINDOWBITS:this.params[Y];this._inflate=wa.createInflateRaw({...this._options.zlibInflateOptions,windowBits:J}),this._inflate[Ia]=this,this._inflate[Gi]=0,this._inflate[ra]=[],this._inflate.on("error",Af),this._inflate.on("data",Us)}this._inflate[Ea]=l,this._inflate.write(O),F&&this._inflate.write(Cf),this._inflate.flush(()=>{let Y=this._inflate[La];if(Y){this._inflate.close(),this._inflate=null,l(Y);return}let J=Ls.concat(this._inflate[ra],this._inflate[Gi]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Gi]=0,this._inflate[ra]=[],F&&this.params[`${W}_no_context_takeover`]&&this._inflate.reset()),l(null,J)})}_compress(O,F,l){let W=this._isServer?"server":"client";if(!this._deflate){let Y=`${W}_max_window_bits`,J=typeof this.params[Y]!="number"?wa.Z_DEFAULT_WINDOWBITS:this.params[Y];this._deflate=wa.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:J}),this._deflate[Gi]=0,this._deflate[ra]=[],this._deflate.on("data",Ff)}this._deflate[Ea]=l,this._deflate.write(O),this._deflate.flush(wa.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let Y=Ls.concat(this._deflate[ra],this._deflate[Gi]);F&&(Y=new Tf(Y.buffer,Y.byteOffset,Y.length-4)),this._deflate[Ea]=null,this._deflate[Gi]=0,this._deflate[ra]=[],F&&this.params[`${W}_no_context_takeover`]&&this._deflate.reset(),l(null,Y)})}};Bs.exports=as;function Ff(R){this[ra].push(R),this[Gi]+=R.length}function Us(R){if(this[Gi]+=R.length,this[Ia]._maxPayload<1||this[Gi]<=this[Ia]._maxPayload){this[ra].push(R);return}this[La]=new RangeError("Max payload size exceeded"),this[La].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[La][Is]=1009,this.removeListener("data",Us),this.reset()}function Af(R){this[Ia]._inflate=null,R[Is]=1007,this[Ea](R)}});var Sa=Ii((Kl,Ua)=>{"use strict";var{isUtf8:xs}=require("buffer"),Pf=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Rf(R){return R>=1e3&&R<=1014&&R!==1004&&R!==1005&&R!==1006||R>=3e3&&R<=4999}function ss(R){let O=R.length,F=0;for(;F<O;)if(!(R[F]&128))F++;else if((R[F]&224)===192){if(F+1===O||(R[F+1]&192)!==128||(R[F]&254)===192)return!1;F+=2}else if((R[F]&240)===224){if(F+2>=O||(R[F+1]&192)!==128||(R[F+2]&192)!==128||R[F]===224&&(R[F+1]&224)===128||R[F]===237&&(R[F+1]&224)===160)return!1;F+=3}else if((R[F]&248)===240){if(F+3>=O||(R[F+1]&192)!==128||(R[F+2]&192)!==128||(R[F+3]&192)!==128||R[F]===240&&(R[F+1]&240)===128||R[F]===244&&R[F+1]>143||R[F]>244)return!1;F+=4}else return!1;return!0}Ua.exports={isValidStatusCode:Rf,isValidUTF8:ss,tokenChars:Pf};if(xs)Ua.exports.isValidUTF8=function(R){return R.length<24?ss(R):xs(R)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let R=require("utf-8-validate");Ua.exports.isValidUTF8=function(O){return O.length<32?ss(O):R(O)}}catch{}});var xa=Ii((Gl,Vs)=>{"use strict";var{Writable:Mf}=require("stream"),Hs=ga(),{BINARY_TYPES:Lf,EMPTY_BUFFER:zs,kStatusCode:If,kWebSocket:Uf}=ea(),{concat:us,toArrayBuffer:Bf,unmask:xf}=ya(),{isValidStatusCode:Hf,isValidUTF8:Ws}=Sa(),Ba=Buffer[Symbol.species],ba=0,js=1,Ys=2,qs=3,fs=4,zf=5,cs=class extends Mf{constructor(O={}){super(),this._binaryType=O.binaryType||Lf[0],this._extensions=O.extensions||{},this._isServer=!!O.isServer,this._maxPayload=O.maxPayload|0,this._skipUTF8Validation=!!O.skipUTF8Validation,this[Uf]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=ba,this._loop=!1}_write(O,F,l){if(this._opcode===8&&this._state==ba)return l();this._bufferedBytes+=O.length,this._buffers.push(O),this.startLoop(l)}consume(O){if(this._bufferedBytes-=O,O===this._buffers[0].length)return this._buffers.shift();if(O<this._buffers[0].length){let l=this._buffers[0];return this._buffers[0]=new Ba(l.buffer,l.byteOffset+O,l.length-O),new Ba(l.buffer,l.byteOffset,O)}let F=Buffer.allocUnsafe(O);do{let l=this._buffers[0],W=F.length-O;O>=l.length?F.set(this._buffers.shift(),W):(F.set(new Uint8Array(l.buffer,l.byteOffset,O),W),this._buffers[0]=new Ba(l.buffer,l.byteOffset+O,l.length-O)),O-=l.length}while(O>0);return F}startLoop(O){let F;this._loop=!0;do switch(this._state){case ba:F=this.getInfo();break;case js:F=this.getPayloadLength16();break;case Ys:F=this.getPayloadLength64();break;case qs:this.getMask();break;case fs:F=this.getData(O);break;default:this._loop=!1;return}while(this._loop);O(F)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let O=this.consume(2);if(O[0]&48)return this._loop=!1,Un(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");let F=(O[0]&64)===64;if(F&&!this._extensions[Hs.extensionName])return this._loop=!1,Un(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=(O[0]&128)===128,this._opcode=O[0]&15,this._payloadLength=O[1]&127,this._opcode===0){if(F)return this._loop=!1,Un(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Un(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,Un(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=F}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,Un(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(F)return this._loop=!1,Un(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1)return this._loop=!1,Un(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}else return this._loop=!1,Un(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(O[1]&128)===128,this._isServer){if(!this._masked)return this._loop=!1,Un(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Un(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(this._payloadLength===126)this._state=js;else if(this._payloadLength===127)this._state=Ys;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let O=this.consume(8),F=O.readUInt32BE(0);return F>Math.pow(2,53-32)-1?(this._loop=!1,Un(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=F*Math.pow(2,32)+O.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Un(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=qs:this._state=fs}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=fs}getData(O){let F=zs;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}F=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&xf(F,this._mask)}if(this._opcode>7)return this.controlMessage(F);if(this._compressed){this._state=zf,this.decompress(F,O);return}return F.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(F)),this.dataMessage()}decompress(O,F){this._extensions[Hs.extensionName].decompress(O,this._fin,(W,Y)=>{if(W)return F(W);if(Y.length){if(this._messageLength+=Y.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return F(Un(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(Y)}let J=this.dataMessage();if(J)return F(J);this.startLoop(F)})}dataMessage(){if(this._fin){let O=this._messageLength,F=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let l;this._binaryType==="nodebuffer"?l=us(F,O):this._binaryType==="arraybuffer"?l=Bf(us(F,O)):l=F,this.emit("message",l,!0)}else{let l=us(F,O);if(!this._skipUTF8Validation&&!Ws(l))return this._loop=!1,Un(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",l,!1)}}this._state=ba}controlMessage(O){if(this._opcode===8)if(this._loop=!1,O.length===0)this.emit("conclude",1005,zs),this.end();else{let F=O.readUInt16BE(0);if(!Hf(F))return Un(RangeError,`invalid status code ${F}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");let l=new Ba(O.buffer,O.byteOffset+2,O.length-2);if(!this._skipUTF8Validation&&!Ws(l))return Un(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",F,l),this.end()}else this._opcode===9?this.emit("ping",O):this.emit("pong",O);this._state=ba}};Vs.exports=cs;function Un(R,O,F,l,W){let Y=new R(F?`Invalid WebSocket frame: ${O}`:O);return Error.captureStackTrace(Y,Un),Y.code=W,Y[If]=l,Y}});var Ha=Ii((Zl,Xs)=>{"use strict";var Xl=require("net"),$l=require("tls"),{randomFillSync:Wf}=require("crypto"),Ks=ga(),{EMPTY_BUFFER:jf}=ea(),{isValidStatusCode:Yf}=Sa(),{mask:Gs,toBuffer:ca}=ya(),zi=Symbol("kByteLength"),qf=Buffer.alloc(4),qi=class{constructor(O,F,l){this._extensions=F||{},l&&(this._generateMask=l,this._maskBuffer=Buffer.alloc(4)),this._socket=O,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(O,F){let l,W=!1,Y=2,J=!1;F.mask&&(l=F.maskBuffer||qf,F.generateMask?F.generateMask(l):Wf(l,0,4),J=(l[0]|l[1]|l[2]|l[3])===0,Y=6);let te;typeof O=="string"?(!F.mask||J)&&F[zi]!==void 0?te=F[zi]:(O=Buffer.from(O),te=O.length):(te=O.length,W=F.mask&&F.readOnly&&!J);let me=te;te>=65536?(Y+=8,me=127):te>125&&(Y+=2,me=126);let fe=Buffer.allocUnsafe(W?te+Y:Y);return fe[0]=F.fin?F.opcode|128:F.opcode,F.rsv1&&(fe[0]|=64),fe[1]=me,me===126?fe.writeUInt16BE(te,2):me===127&&(fe[2]=fe[3]=0,fe.writeUIntBE(te,4,6)),F.mask?(fe[1]|=128,fe[Y-4]=l[0],fe[Y-3]=l[1],fe[Y-2]=l[2],fe[Y-1]=l[3],J?[fe,O]:W?(Gs(O,l,fe,Y,te),[fe]):(Gs(O,l,O,0,te),[fe,O])):[fe,O]}close(O,F,l,W){let Y;if(O===void 0)Y=jf;else{if(typeof O!="number"||!Yf(O))throw new TypeError("First argument must be a valid error code number");if(F===void 0||!F.length)Y=Buffer.allocUnsafe(2),Y.writeUInt16BE(O,0);else{let te=Buffer.byteLength(F);if(te>123)throw new RangeError("The message must not be greater than 123 bytes");Y=Buffer.allocUnsafe(2+te),Y.writeUInt16BE(O,0),typeof F=="string"?Y.write(F,2):Y.set(F,2)}}let J={[zi]:Y.length,fin:!0,generateMask:this._generateMask,mask:l,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,Y,!1,J,W]):this.sendFrame(qi.frame(Y,J),W)}ping(O,F,l){let W,Y;if(typeof O=="string"?(W=Buffer.byteLength(O),Y=!1):(O=ca(O),W=O.length,Y=ca.readOnly),W>125)throw new RangeError("The data size must not be greater than 125 bytes");let J={[zi]:W,fin:!0,generateMask:this._generateMask,mask:F,maskBuffer:this._maskBuffer,opcode:9,readOnly:Y,rsv1:!1};this._deflating?this.enqueue([this.dispatch,O,!1,J,l]):this.sendFrame(qi.frame(O,J),l)}pong(O,F,l){let W,Y;if(typeof O=="string"?(W=Buffer.byteLength(O),Y=!1):(O=ca(O),W=O.length,Y=ca.readOnly),W>125)throw new RangeError("The data size must not be greater than 125 bytes");let J={[zi]:W,fin:!0,generateMask:this._generateMask,mask:F,maskBuffer:this._maskBuffer,opcode:10,readOnly:Y,rsv1:!1};this._deflating?this.enqueue([this.dispatch,O,!1,J,l]):this.sendFrame(qi.frame(O,J),l)}send(O,F,l){let W=this._extensions[Ks.extensionName],Y=F.binary?2:1,J=F.compress,te,me;if(typeof O=="string"?(te=Buffer.byteLength(O),me=!1):(O=ca(O),te=O.length,me=ca.readOnly),this._firstFragment?(this._firstFragment=!1,J&&W&&W.params[W._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(J=te>=W._threshold),this._compress=J):(J=!1,Y=0),F.fin&&(this._firstFragment=!0),W){let fe={[zi]:te,fin:F.fin,generateMask:this._generateMask,mask:F.mask,maskBuffer:this._maskBuffer,opcode:Y,readOnly:me,rsv1:J};this._deflating?this.enqueue([this.dispatch,O,this._compress,fe,l]):this.dispatch(O,this._compress,fe,l)}else this.sendFrame(qi.frame(O,{[zi]:te,fin:F.fin,generateMask:this._generateMask,mask:F.mask,maskBuffer:this._maskBuffer,opcode:Y,readOnly:me,rsv1:!1}),l)}dispatch(O,F,l,W){if(!F){this.sendFrame(qi.frame(O,l),W);return}let Y=this._extensions[Ks.extensionName];this._bufferedBytes+=l[zi],this._deflating=!0,Y.compress(O,l.fin,(J,te)=>{if(this._socket.destroyed){let me=new Error("The socket was closed while data was being compressed");typeof W=="function"&&W(me);for(let fe=0;fe<this._queue.length;fe++){let Z=this._queue[fe],ae=Z[Z.length-1];typeof ae=="function"&&ae(me)}return}this._bufferedBytes-=l[zi],this._deflating=!1,l.readOnly=!1,this.sendFrame(qi.frame(te,l),W),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let O=this._queue.shift();this._bufferedBytes-=O[3][zi],Reflect.apply(O[0],this,O.slice(1))}}enqueue(O){this._bufferedBytes+=O[3][zi],this._queue.push(O)}sendFrame(O,F){O.length===2?(this._socket.cork(),this._socket.write(O[0]),this._socket.write(O[1],F),this._socket.uncork()):this._socket.write(O[0],F)}};Xs.exports=qi});var ou=Ii((Jl,nu)=>{"use strict";var{kForOnEventAttribute:ka,kListener:ls}=ea(),$s=Symbol("kCode"),Zs=Symbol("kData"),Js=Symbol("kError"),Qs=Symbol("kMessage"),eu=Symbol("kReason"),la=Symbol("kTarget"),ru=Symbol("kType"),tu=Symbol("kWasClean"),Xi=class{constructor(O){this[la]=null,this[ru]=O}get target(){return this[la]}get type(){return this[ru]}};Object.defineProperty(Xi.prototype,"target",{enumerable:!0});Object.defineProperty(Xi.prototype,"type",{enumerable:!0});var oa=class extends Xi{constructor(O,F={}){super(O),this[$s]=F.code===void 0?0:F.code,this[eu]=F.reason===void 0?"":F.reason,this[tu]=F.wasClean===void 0?!1:F.wasClean}get code(){return this[$s]}get reason(){return this[eu]}get wasClean(){return this[tu]}};Object.defineProperty(oa.prototype,"code",{enumerable:!0});Object.defineProperty(oa.prototype,"reason",{enumerable:!0});Object.defineProperty(oa.prototype,"wasClean",{enumerable:!0});var da=class extends Xi{constructor(O,F={}){super(O),this[Js]=F.error===void 0?null:F.error,this[Qs]=F.message===void 0?"":F.message}get error(){return this[Js]}get message(){return this[Qs]}};Object.defineProperty(da.prototype,"error",{enumerable:!0});Object.defineProperty(da.prototype,"message",{enumerable:!0});var Da=class extends Xi{constructor(O,F={}){super(O),this[Zs]=F.data===void 0?null:F.data}get data(){return this[Zs]}};Object.defineProperty(Da.prototype,"data",{enumerable:!0});var Vf={addEventListener(R,O,F={}){for(let W of this.listeners(R))if(!F[ka]&&W[ls]===O&&!W[ka])return;let l;if(R==="message")l=function(Y,J){let te=new Da("message",{data:J?Y:Y.toString()});te[la]=this,za(O,this,te)};else if(R==="close")l=function(Y,J){let te=new oa("close",{code:Y,reason:J.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});te[la]=this,za(O,this,te)};else if(R==="error")l=function(Y){let J=new da("error",{error:Y,message:Y.message});J[la]=this,za(O,this,J)};else if(R==="open")l=function(){let Y=new Xi("open");Y[la]=this,za(O,this,Y)};else return;l[ka]=!!F[ka],l[ls]=O,F.once?this.once(R,l):this.on(R,l)},removeEventListener(R,O){for(let F of this.listeners(R))if(F[ls]===O&&!F[ka]){this.removeListener(R,F);break}}};nu.exports={CloseEvent:oa,ErrorEvent:da,Event:Xi,EventTarget:Vf,MessageEvent:Da};function za(R,O,F){typeof R=="object"&&R.handleEvent?R.handleEvent.call(R,F):R.call(O,F)}});var ds=Ii((Ql,iu)=>{"use strict";var{tokenChars:Oa}=Sa();function Vi(R,O,F){R[O]===void 0?R[O]=[F]:R[O].push(F)}function Kf(R){let O=Object.create(null),F=Object.create(null),l=!1,W=!1,Y=!1,J,te,me=-1,fe=-1,Z=-1,ae=0;for(;ae<R.length;ae++)if(fe=R.charCodeAt(ae),J===void 0)if(Z===-1&&Oa[fe]===1)me===-1&&(me=ae);else if(ae!==0&&(fe===32||fe===9))Z===-1&&me!==-1&&(Z=ae);else if(fe===59||fe===44){if(me===-1)throw new SyntaxError(`Unexpected character at index ${ae}`);Z===-1&&(Z=ae);let Ye=R.slice(me,Z);fe===44?(Vi(O,Ye,F),F=Object.create(null)):J=Ye,me=Z=-1}else throw new SyntaxError(`Unexpected character at index ${ae}`);else if(te===void 0)if(Z===-1&&Oa[fe]===1)me===-1&&(me=ae);else if(fe===32||fe===9)Z===-1&&me!==-1&&(Z=ae);else if(fe===59||fe===44){if(me===-1)throw new SyntaxError(`Unexpected character at index ${ae}`);Z===-1&&(Z=ae),Vi(F,R.slice(me,Z),!0),fe===44&&(Vi(O,J,F),F=Object.create(null),J=void 0),me=Z=-1}else if(fe===61&&me!==-1&&Z===-1)te=R.slice(me,ae),me=Z=-1;else throw new SyntaxError(`Unexpected character at index ${ae}`);else if(W){if(Oa[fe]!==1)throw new SyntaxError(`Unexpected character at index ${ae}`);me===-1?me=ae:l||(l=!0),W=!1}else if(Y)if(Oa[fe]===1)me===-1&&(me=ae);else if(fe===34&&me!==-1)Y=!1,Z=ae;else if(fe===92)W=!0;else throw new SyntaxError(`Unexpected character at index ${ae}`);else if(fe===34&&R.charCodeAt(ae-1)===61)Y=!0;else if(Z===-1&&Oa[fe]===1)me===-1&&(me=ae);else if(me!==-1&&(fe===32||fe===9))Z===-1&&(Z=ae);else if(fe===59||fe===44){if(me===-1)throw new SyntaxError(`Unexpected character at index ${ae}`);Z===-1&&(Z=ae);let Ye=R.slice(me,Z);l&&(Ye=Ye.replace(/\\/g,""),l=!1),Vi(F,te,Ye),fe===44&&(Vi(O,J,F),F=Object.create(null),J=void 0),te=void 0,me=Z=-1}else throw new SyntaxError(`Unexpected character at index ${ae}`);if(me===-1||Y||fe===32||fe===9)throw new SyntaxError("Unexpected end of input");Z===-1&&(Z=ae);let cr=R.slice(me,Z);return J===void 0?Vi(O,cr,F):(te===void 0?Vi(F,cr,!0):l?Vi(F,te,cr.replace(/\\/g,"")):Vi(F,te,cr),Vi(O,J,F)),O}function Gf(R){return Object.keys(R).map(O=>{let F=R[O];return Array.isArray(F)||(F=[F]),F.map(l=>[O].concat(Object.keys(l).map(W=>{let Y=l[W];return Array.isArray(Y)||(Y=[Y]),Y.map(J=>J===!0?W:`${W}=${J}`).join("; ")})).join("; ")).join(", ")}).join(", ")}iu.exports={format:Gf,parse:Kf}});var qa=Ii((rd,pu)=>{"use strict";var Xf=require("events"),$f=require("https"),Zf=require("http"),uu=require("net"),Jf=require("tls"),{randomBytes:Qf,createHash:ec}=require("crypto"),{Readable:ed}=require("stream"),{URL:_s}=require("url"),ta=ga(),rc=xa(),tc=Ha(),{BINARY_TYPES:au,EMPTY_BUFFER:Wa,GUID:nc,kForOnEventAttribute:vs,kListener:oc,kStatusCode:ic,kWebSocket:Mi,NOOP:fu}=ea(),{EventTarget:{addEventListener:ac,removeEventListener:sc}}=ou(),{format:uc,parse:fc}=ds(),{toBuffer:cc}=ya(),lc=30*1e3,cu=Symbol("kAborted"),ms=[8,13],$i=["CONNECTING","OPEN","CLOSING","CLOSED"],dc=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,hr=class extends Xf{constructor(O,F,l){super(),this._binaryType=au[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Wa,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=hr.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,O!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,F===void 0?F=[]:Array.isArray(F)||(typeof F=="object"&&F!==null?(l=F,F=[]):F=[F]),lu(this,O,F,l)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(O){au.includes(O)&&(this._binaryType=O,this._receiver&&(this._receiver._binaryType=O))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(O,F,l){let W=new rc({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:l.maxPayload,skipUTF8Validation:l.skipUTF8Validation});this._sender=new tc(O,this._extensions,l.generateMask),this._receiver=W,this._socket=O,W[Mi]=this,O[Mi]=this,W.on("conclude",mc),W.on("drain",pc),W.on("error",hc),W.on("message",yc),W.on("ping",wc),W.on("pong",Ec),O.setTimeout(0),O.setNoDelay(),F.length>0&&O.unshift(F),O.on("close",_u),O.on("data",Ya),O.on("end",vu),O.on("error",mu),this._readyState=hr.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=hr.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ta.extensionName]&&this._extensions[ta.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=hr.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(O,F){if(this.readyState!==hr.CLOSED){if(this.readyState===hr.CONNECTING){let l="WebSocket was closed before the connection was established";Ui(this,this._req,l);return}if(this.readyState===hr.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=hr.CLOSING,this._sender.close(O,F,!this._isServer,l=>{l||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),lc)}}pause(){this.readyState===hr.CONNECTING||this.readyState===hr.CLOSED||(this._paused=!0,this._socket.pause())}ping(O,F,l){if(this.readyState===hr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof O=="function"?(l=O,O=F=void 0):typeof F=="function"&&(l=F,F=void 0),typeof O=="number"&&(O=O.toString()),this.readyState!==hr.OPEN){ps(this,O,l);return}F===void 0&&(F=!this._isServer),this._sender.ping(O||Wa,F,l)}pong(O,F,l){if(this.readyState===hr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof O=="function"?(l=O,O=F=void 0):typeof F=="function"&&(l=F,F=void 0),typeof O=="number"&&(O=O.toString()),this.readyState!==hr.OPEN){ps(this,O,l);return}F===void 0&&(F=!this._isServer),this._sender.pong(O||Wa,F,l)}resume(){this.readyState===hr.CONNECTING||this.readyState===hr.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(O,F,l){if(this.readyState===hr.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof F=="function"&&(l=F,F={}),typeof O=="number"&&(O=O.toString()),this.readyState!==hr.OPEN){ps(this,O,l);return}let W={binary:typeof O!="string",mask:!this._isServer,compress:!0,fin:!0,...F};this._extensions[ta.extensionName]||(W.compress=!1),this._sender.send(O||Wa,W,l)}terminate(){if(this.readyState!==hr.CLOSED){if(this.readyState===hr.CONNECTING){let O="WebSocket was closed before the connection was established";Ui(this,this._req,O);return}this._socket&&(this._readyState=hr.CLOSING,this._socket.destroy())}}};Object.defineProperty(hr,"CONNECTING",{enumerable:!0,value:$i.indexOf("CONNECTING")});Object.defineProperty(hr.prototype,"CONNECTING",{enumerable:!0,value:$i.indexOf("CONNECTING")});Object.defineProperty(hr,"OPEN",{enumerable:!0,value:$i.indexOf("OPEN")});Object.defineProperty(hr.prototype,"OPEN",{enumerable:!0,value:$i.indexOf("OPEN")});Object.defineProperty(hr,"CLOSING",{enumerable:!0,value:$i.indexOf("CLOSING")});Object.defineProperty(hr.prototype,"CLOSING",{enumerable:!0,value:$i.indexOf("CLOSING")});Object.defineProperty(hr,"CLOSED",{enumerable:!0,value:$i.indexOf("CLOSED")});Object.defineProperty(hr.prototype,"CLOSED",{enumerable:!0,value:$i.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(R=>{Object.defineProperty(hr.prototype,R,{enumerable:!0})});["open","error","close","message"].forEach(R=>{Object.defineProperty(hr.prototype,`on${R}`,{enumerable:!0,get(){for(let O of this.listeners(R))if(O[vs])return O[oc];return null},set(O){for(let F of this.listeners(R))if(F[vs]){this.removeListener(R,F);break}typeof O=="function"&&this.addEventListener(R,O,{[vs]:!0})}})});hr.prototype.addEventListener=ac;hr.prototype.removeEventListener=sc;pu.exports=hr;function lu(R,O,F,l){let W={protocolVersion:ms[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...l,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!ms.includes(W.protocolVersion))throw new RangeError(`Unsupported protocol version: ${W.protocolVersion} (supported versions: ${ms.join(", ")})`);let Y;if(O instanceof _s)Y=O,R._url=O.href;else{try{Y=new _s(O)}catch{throw new SyntaxError(`Invalid URL: ${O}`)}R._url=O}let J=Y.protocol==="wss:",te=Y.protocol==="ws+unix:",me;if(Y.protocol!=="ws:"&&!J&&!te?me=`The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"`:te&&!Y.pathname?me="The URL's pathname is empty":Y.hash&&(me="The URL contains a fragment identifier"),me){let Me=new SyntaxError(me);if(R._redirects===0)throw Me;ja(R,Me);return}let fe=J?443:80,Z=Qf(16).toString("base64"),ae=J?$f.request:Zf.request,cr=new Set,Ye;if(W.createConnection=J?vc:_c,W.defaultPort=W.defaultPort||fe,W.port=Y.port||fe,W.host=Y.hostname.startsWith("[")?Y.hostname.slice(1,-1):Y.hostname,W.headers={...W.headers,"Sec-WebSocket-Version":W.protocolVersion,"Sec-WebSocket-Key":Z,Connection:"Upgrade",Upgrade:"websocket"},W.path=Y.pathname+Y.search,W.timeout=W.handshakeTimeout,W.perMessageDeflate&&(Ye=new ta(W.perMessageDeflate!==!0?W.perMessageDeflate:{},!1,W.maxPayload),W.headers["Sec-WebSocket-Extensions"]=uc({[ta.extensionName]:Ye.offer()})),F.length){for(let Me of F){if(typeof Me!="string"||!dc.test(Me)||cr.has(Me))throw new SyntaxError("An invalid or duplicated subprotocol was specified");cr.add(Me)}W.headers["Sec-WebSocket-Protocol"]=F.join(",")}if(W.origin&&(W.protocolVersion<13?W.headers["Sec-WebSocket-Origin"]=W.origin:W.headers.Origin=W.origin),(Y.username||Y.password)&&(W.auth=`${Y.username}:${Y.password}`),te){let Me=W.path.split(":");W.socketPath=Me[0],W.path=Me[1]}let nr;if(W.followRedirects){if(R._redirects===0){R._originalIpc=te,R._originalSecure=J,R._originalHostOrSocketPath=te?W.socketPath:Y.host;let Me=l&&l.headers;if(l={...l,headers:{}},Me)for(let[Lr,V]of Object.entries(Me))l.headers[Lr.toLowerCase()]=V}else if(R.listenerCount("redirect")===0){let Me=te?R._originalIpc?W.socketPath===R._originalHostOrSocketPath:!1:R._originalIpc?!1:Y.host===R._originalHostOrSocketPath;(!Me||R._originalSecure&&!J)&&(delete W.headers.authorization,delete W.headers.cookie,Me||delete W.headers.host,W.auth=void 0)}W.auth&&!l.headers.authorization&&(l.headers.authorization="Basic "+Buffer.from(W.auth).toString("base64")),nr=R._req=ae(W),R._redirects&&R.emit("redirect",R.url,nr)}else nr=R._req=ae(W);W.timeout&&nr.on("timeout",()=>{Ui(R,nr,"Opening handshake has timed out")}),nr.on("error",Me=>{nr===null||nr[cu]||(nr=R._req=null,ja(R,Me))}),nr.on("response",Me=>{let Lr=Me.headers.location,V=Me.statusCode;if(Lr&&W.followRedirects&&V>=300&&V<400){if(++R._redirects>W.maxRedirects){Ui(R,nr,"Maximum redirects exceeded");return}nr.abort();let Le;try{Le=new _s(Lr,O)}catch{let Qe=new SyntaxError(`Invalid URL: ${Lr}`);ja(R,Qe);return}lu(R,Le,F,l)}else R.emit("unexpected-response",nr,Me)||Ui(R,nr,`Unexpected server response: ${Me.statusCode}`)}),nr.on("upgrade",(Me,Lr,V)=>{if(R.emit("upgrade",Me),R.readyState!==hr.CONNECTING)return;if(nr=R._req=null,Me.headers.upgrade.toLowerCase()!=="websocket"){Ui(R,Lr,"Invalid Upgrade header");return}let Le=ec("sha1").update(Z+nc).digest("base64");if(Me.headers["sec-websocket-accept"]!==Le){Ui(R,Lr,"Invalid Sec-WebSocket-Accept header");return}let wr=Me.headers["sec-websocket-protocol"],Qe;if(wr!==void 0?cr.size?cr.has(wr)||(Qe="Server sent an invalid subprotocol"):Qe="Server sent a subprotocol but none was requested":cr.size&&(Qe="Server sent no subprotocol"),Qe){Ui(R,Lr,Qe);return}wr&&(R._protocol=wr);let ce=Me.headers["sec-websocket-extensions"];if(ce!==void 0){if(!Ye){Ui(R,Lr,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Ke;try{Ke=fc(ce)}catch{Ui(R,Lr,"Invalid Sec-WebSocket-Extensions header");return}let yn=Object.keys(Ke);if(yn.length!==1||yn[0]!==ta.extensionName){Ui(R,Lr,"Server indicated an extension that was not requested");return}try{Ye.accept(Ke[ta.extensionName])}catch{Ui(R,Lr,"Invalid Sec-WebSocket-Extensions header");return}R._extensions[ta.extensionName]=Ye}R.setSocket(Lr,V,{generateMask:W.generateMask,maxPayload:W.maxPayload,skipUTF8Validation:W.skipUTF8Validation})}),W.finishRequest?W.finishRequest(nr,R):nr.end()}function ja(R,O){R._readyState=hr.CLOSING,R.emit("error",O),R.emitClose()}function _c(R){return R.path=R.socketPath,uu.connect(R)}function vc(R){return R.path=void 0,!R.servername&&R.servername!==""&&(R.servername=uu.isIP(R.host)?"":R.host),Jf.connect(R)}function Ui(R,O,F){R._readyState=hr.CLOSING;let l=new Error(F);Error.captureStackTrace(l,Ui),O.setHeader?(O[cu]=!0,O.abort(),O.socket&&!O.socket.destroyed&&O.socket.destroy(),process.nextTick(ja,R,l)):(O.destroy(l),O.once("error",R.emit.bind(R,"error")),O.once("close",R.emitClose.bind(R)))}function ps(R,O,F){if(O){let l=cc(O).length;R._socket?R._sender._bufferedBytes+=l:R._bufferedAmount+=l}if(F){let l=new Error(`WebSocket is not open: readyState ${R.readyState} (${$i[R.readyState]})`);process.nextTick(F,l)}}function mc(R,O){let F=this[Mi];F._closeFrameReceived=!0,F._closeMessage=O,F._closeCode=R,F._socket[Mi]!==void 0&&(F._socket.removeListener("data",Ya),process.nextTick(du,F._socket),R===1005?F.close():F.close(R,O))}function pc(){let R=this[Mi];R.isPaused||R._socket.resume()}function hc(R){let O=this[Mi];O._socket[Mi]!==void 0&&(O._socket.removeListener("data",Ya),process.nextTick(du,O._socket),O.close(R[ic])),O.emit("error",R)}function su(){this[Mi].emitClose()}function yc(R,O){this[Mi].emit("message",R,O)}function wc(R){let O=this[Mi];O.pong(R,!O._isServer,fu),O.emit("ping",R)}function Ec(R){this[Mi].emit("pong",R)}function du(R){R.resume()}function _u(){let R=this[Mi];this.removeListener("close",_u),this.removeListener("data",Ya),this.removeListener("end",vu),R._readyState=hr.CLOSING;let O;!this._readableState.endEmitted&&!R._closeFrameReceived&&!R._receiver._writableState.errorEmitted&&(O=R._socket.read())!==null&&R._receiver.write(O),R._receiver.end(),this[Mi]=void 0,clearTimeout(R._closeTimer),R._receiver._writableState.finished||R._receiver._writableState.errorEmitted?R.emitClose():(R._receiver.on("error",su),R._receiver.on("finish",su))}function Ya(R){this[Mi]._receiver.write(R)||this.pause()}function vu(){let R=this[Mi];R._readyState=hr.CLOSING,R._receiver.end(),this.end()}function mu(){let R=this[Mi];this.removeListener("error",mu),this.on("error",fu),R&&(R._readyState=hr.CLOSING,this.destroy())}});var hs=Ii((td,wu)=>{"use strict";var{Duplex:gc}=require("stream");function hu(R){R.emit("close")}function Sc(){!this.destroyed&&this._writableState.finished&&this.destroy()}function yu(R){this.removeListener("error",yu),this.destroy(),this.listenerCount("error")===0&&this.emit("error",R)}function bc(R,O){let F=!0,l=new gc({...O,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return R.on("message",function(Y,J){let te=!J&&l._readableState.objectMode?Y.toString():Y;l.push(te)||R.pause()}),R.once("error",function(Y){l.destroyed||(F=!1,l.destroy(Y))}),R.once("close",function(){l.destroyed||l.push(null)}),l._destroy=function(W,Y){if(R.readyState===R.CLOSED){Y(W),process.nextTick(hu,l);return}let J=!1;R.once("error",function(me){J=!0,Y(me)}),R.once("close",function(){J||Y(W),process.nextTick(hu,l)}),F&&R.terminate()},l._final=function(W){if(R.readyState===R.CONNECTING){R.once("open",function(){l._final(W)});return}R._socket!==null&&(R._socket._writableState.finished?(W(),l._readableState.endEmitted&&l.destroy()):(R._socket.once("finish",function(){W()}),R.close()))},l._read=function(){R.isPaused&&R.resume()},l._write=function(W,Y,J){if(R.readyState===R.CONNECTING){R.once("open",function(){l._write(W,Y,J)});return}R.send(W,J)},l.on("end",Sc),l.on("error",yu),l}wu.exports=bc});var gu=Ii((nd,Eu)=>{"use strict";var{tokenChars:kc}=Sa();function Dc(R){let O=new Set,F=-1,l=-1,W=0;for(W;W<R.length;W++){let J=R.charCodeAt(W);if(l===-1&&kc[J]===1)F===-1&&(F=W);else if(W!==0&&(J===32||J===9))l===-1&&F!==-1&&(l=W);else if(J===44){if(F===-1)throw new SyntaxError(`Unexpected character at index ${W}`);l===-1&&(l=W);let te=R.slice(F,l);if(O.has(te))throw new SyntaxError(`The "${te}" subprotocol is duplicated`);O.add(te),F=l=-1}else throw new SyntaxError(`Unexpected character at index ${W}`)}if(F===-1||l!==-1)throw new SyntaxError("Unexpected end of input");let Y=R.slice(F,W);if(O.has(Y))throw new SyntaxError(`The "${Y}" subprotocol is duplicated`);return O.add(Y),O}Eu.exports={parse:Dc}});var ws=Ii((sd,Nu)=>{"use strict";var Oc=require("events"),Va=require("http"),od=require("https"),id=require("net"),ad=require("tls"),{createHash:Nc}=require("crypto"),Su=ds(),ia=ga(),Tc=gu(),Cc=qa(),{GUID:Fc,kWebSocket:Ac}=ea(),Pc=/^[+/0-9A-Za-z]{22}==$/,bu=0,ku=1,Ou=2,ys=class extends Oc{constructor(O,F){if(super(),O={maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Cc,...O},O.port==null&&!O.server&&!O.noServer||O.port!=null&&(O.server||O.noServer)||O.server&&O.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(O.port!=null?(this._server=Va.createServer((l,W)=>{let Y=Va.STATUS_CODES[426];W.writeHead(426,{"Content-Length":Y.length,"Content-Type":"text/plain"}),W.end(Y)}),this._server.listen(O.port,O.host,O.backlog,F)):O.server&&(this._server=O.server),this._server){let l=this.emit.bind(this,"connection");this._removeListeners=Rc(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(W,Y,J)=>{this.handleUpgrade(W,Y,J,l)}})}O.perMessageDeflate===!0&&(O.perMessageDeflate={}),O.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=O,this._state=bu}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(O){if(this._state===Ou){O&&this.once("close",()=>{O(new Error("The server is not running"))}),process.nextTick(Na,this);return}if(O&&this.once("close",O),this._state!==ku)if(this._state=ku,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Na,this):process.nextTick(Na,this);else{let F=this._server;this._removeListeners(),this._removeListeners=this._server=null,F.close(()=>{Na(this)})}}shouldHandle(O){if(this.options.path){let F=O.url.indexOf("?");if((F!==-1?O.url.slice(0,F):O.url)!==this.options.path)return!1}return!0}handleUpgrade(O,F,l,W){F.on("error",Du);let Y=O.headers["sec-websocket-key"],J=+O.headers["sec-websocket-version"];if(O.method!=="GET"){aa(this,O,F,405,"Invalid HTTP method");return}if(O.headers.upgrade.toLowerCase()!=="websocket"){aa(this,O,F,400,"Invalid Upgrade header");return}if(!Y||!Pc.test(Y)){aa(this,O,F,400,"Missing or invalid Sec-WebSocket-Key header");return}if(J!==8&&J!==13){aa(this,O,F,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(O)){Ta(F,400);return}let te=O.headers["sec-websocket-protocol"],me=new Set;if(te!==void 0)try{me=Tc.parse(te)}catch{aa(this,O,F,400,"Invalid Sec-WebSocket-Protocol header");return}let fe=O.headers["sec-websocket-extensions"],Z={};if(this.options.perMessageDeflate&&fe!==void 0){let ae=new ia(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let cr=Su.parse(fe);cr[ia.extensionName]&&(ae.accept(cr[ia.extensionName]),Z[ia.extensionName]=ae)}catch{aa(this,O,F,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let ae={origin:O.headers[`${J===8?"sec-websocket-origin":"origin"}`],secure:!!(O.socket.authorized||O.socket.encrypted),req:O};if(this.options.verifyClient.length===2){this.options.verifyClient(ae,(cr,Ye,nr,Me)=>{if(!cr)return Ta(F,Ye||401,nr,Me);this.completeUpgrade(Z,Y,me,O,F,l,W)});return}if(!this.options.verifyClient(ae))return Ta(F,401)}this.completeUpgrade(Z,Y,me,O,F,l,W)}completeUpgrade(O,F,l,W,Y,J,te){if(!Y.readable||!Y.writable)return Y.destroy();if(Y[Ac])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>bu)return Ta(Y,503);let fe=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Nc("sha1").update(F+Fc).digest("base64")}`],Z=new this.options.WebSocket(null);if(l.size){let ae=this.options.handleProtocols?this.options.handleProtocols(l,W):l.values().next().value;ae&&(fe.push(`Sec-WebSocket-Protocol: ${ae}`),Z._protocol=ae)}if(O[ia.extensionName]){let ae=O[ia.extensionName].params,cr=Su.format({[ia.extensionName]:[ae]});fe.push(`Sec-WebSocket-Extensions: ${cr}`),Z._extensions=O}this.emit("headers",fe,W),Y.write(fe.concat(`\r
|
|
2
2
|
`).join(`\r
|
|
3
3
|
`)),Y.removeListener("error",Du),Z.setSocket(Y,J,{maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(Z),Z.on("close",()=>{this.clients.delete(Z),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Na,this)})),te(Z,W)}};Nu.exports=ys;function Rc(R,O){for(let F of Object.keys(O))R.on(F,O[F]);return function(){for(let l of Object.keys(O))R.removeListener(l,O[l])}}function Na(R){R._state=Ou,R.emit("close")}function Du(){this.destroy()}function Ta(R,O,F,l){F=F||Va.STATUS_CODES[O],l={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(F),...l},R.once("finish",R.destroy),R.end(`HTTP/1.1 ${O} ${Va.STATUS_CODES[O]}\r
|
|
4
4
|
`+Object.keys(l).map(W=>`${W}: ${l[W]}`).join(`\r
|
|
5
5
|
`)+`\r
|
|
6
6
|
\r
|
|
7
|
-
`+F)}function aa(R,O,F,l,W){if(R.listenerCount("wsClientError")){let Y=new Error(W);Error.captureStackTrace(Y,aa),R.emit("wsClientError",Y,F,O)}else Ta(F,l,W)}});var Fn=
|
|
7
|
+
`+F)}function aa(R,O,F,l,W){if(R.listenerCount("wsClientError")){let Y=new Error(W);Error.captureStackTrace(Y,aa),R.emit("wsClientError",Y,F,O)}else Ta(F,l,W)}});var Fn=Ii((ud,Tu)=>{"use strict";var Zi=qa();Zi.createWebSocketStream=hs();Zi.Server=ws();Zi.Receiver=xa();Zi.Sender=Ha();Zi.WebSocket=Zi;Zi.WebSocketServer=Zi.Server;Tu.exports=Zi});var Fu={};Wi(Fu,{dependenciesTotalSize:()=>Mc,dependencyFilename:()=>Cu,init:()=>Lc});function Lc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(o,c)=>{throw c},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(o){return l.locateFile?l.locateFile(o,ae):ae+o}var Ye,nr,Me;function Lr(o){if(o instanceof mr)return;ce("exiting due to exception: "+o)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(o,c)=>(wr(),o=Le.normalize(o),V.readFileSync(o,c?void 0:"utf8")),Me=o=>{var c=Ye(o,!0);return c.buffer||(c=new Uint8Array(c)),c},nr=(o,c,_)=>{wr(),o=Le.normalize(o),V.readFile(o,function(m,p){m?_(m):c(p.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(o){if(!(o instanceof mr))throw o}),process.on("unhandledRejection",function(o){throw o}),te=(o,c)=>{if(_r())throw process.exitCode=o,c;Lr(c),process.exit(o)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(o,c){o||ue(c)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(o,c,_){for(var m=c+_,p=c;o[p]&&!(p>=m);)++p;if(p-c>16&&o.buffer&&at)return at.decode(o.subarray(c,p));for(var y="";c<p;){var E=o[c++];if(!(E&128)){y+=String.fromCharCode(E);continue}var S=o[c++]&63;if((E&224)==192){y+=String.fromCharCode((E&31)<<6|S);continue}var b=o[c++]&63;if((E&240)==224?E=(E&15)<<12|S<<6|b:E=(E&7)<<18|S<<12|b<<6|o[c++]&63,E<65536)y+=String.fromCharCode(E);else{var k=E-65536;y+=String.fromCharCode(55296|k>>10,56320|k&1023)}}return y}function ne(o,c){return o?We(de,o,c):""}function Xe(o,c,_,m){if(!(m>0))return 0;for(var p=_,y=_+m-1,E=0;E<o.length;++E){var S=o.charCodeAt(E);if(S>=55296&&S<=57343){var b=o.charCodeAt(++E);S=65536+((S&1023)<<10)|b&1023}if(S<=127){if(_>=y)break;c[_++]=S}else if(S<=2047){if(_+1>=y)break;c[_++]=192|S>>6,c[_++]=128|S&63}else if(S<=65535){if(_+2>=y)break;c[_++]=224|S>>12,c[_++]=128|S>>6&63,c[_++]=128|S&63}else{if(_+3>=y)break;c[_++]=240|S>>18,c[_++]=128|S>>12&63,c[_++]=128|S>>6&63,c[_++]=128|S&63}}return c[_]=0,_-p}function Ae(o,c,_){return Xe(o,de,c,_)}function Pe(o){for(var c=0,_=0;_<o.length;++_){var m=o.charCodeAt(_);m<=127?c++:m<=2047?c+=2:m>=55296&&m<=57343?(c+=4,++_):c+=3}return c}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(o){Cr=o,l.HEAP8=$=new Int8Array(o),l.HEAP16=Ee=new Int16Array(o),l.HEAP32=h=new Int32Array(o),l.HEAPU8=de=new Uint8Array(o),l.HEAPU16=st=new Uint16Array(o),l.HEAPU32=H=new Uint32Array(o),l.HEAPF32=Bn=new Float32Array(o),l.HEAPF64=ut=new Float64Array(o)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),pe.root=e.mount(pe,{},null),pr(lt)}function Yn(){Ie(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(o){ct.unshift(o)}function Kn(o){lt.unshift(o)}function Gn(o){dt.unshift(o)}var Re=0,Ar=null,$e=null;function Qi(o){return o}function vr(o){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(o){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var c=$e;$e=null,c()}}function ue(o){l.onAbort&&l.onAbort(o),o="Aborted("+o+")",ce(o),Ce=!0,Ge=1,o+=". Build with -sASSERTIONS for more info.";var c=new WebAssembly.RuntimeError(o);throw c}var Xn="data:application/octet-stream;base64,";function vt(o){return o.startsWith(Xn)}var _e;_e=Cu,vt(_e)||(_e=cr(_e));function mt(o){try{if(o==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(o);throw"both async and sync fetching of the wasm failed"}catch(c){ue(c)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+_e+"'";return o.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var o={a:Pn};function c(E,S){var b=E.exports;b=Te.instrumentWasmExports(b),l.asm=b,or=l.asm.$a,ft(or.buffer),xn=l.asm.lb,Kn(l.asm.ab),Ze("wasm-instantiate")}vr("wasm-instantiate");function _(E){c(E.instance)}function m(E){return $n().then(function(S){return WebAssembly.instantiate(S,o)}).then(function(S){return S}).then(E,function(S){ce("failed to asynchronously prepare wasm: "+S),ue(S)})}function p(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(E){var S=WebAssembly.instantiateStreaming(E,o);return S.then(_,function(b){return ce("wasm streaming compile failed: "+b),ce("falling back to ArrayBuffer instantiation"),m(_)})}):m(_)}if(l.instantiateWasm)try{var y=l.instantiateWasm(o,c);return y=Te.instrumentWasmExports(y),y}catch(E){return ce("Module.instantiateWasm callback failed with error: "+E),!1}return p(),{}}var P,q;function mr(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}function pr(o){for(;o.length>0;)o.shift()(l)}function pt(o){if(o instanceof mr||o=="unwind")return Ge;te(1,o)}function ht(o,c){$.set(o,c)}function Jn(o,c,_,m){ue("Assertion failed: "+ne(o)+", at: "+[c?ne(c):"unknown filename",_,m?ne(m):"unknown function"])}function Qn(o,c){(function(_){it.apply(null,[o,_])})(c)}var U={isAbs:o=>o.charAt(0)==="/",splitPath:o=>{var c=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return c.exec(o).slice(1)},normalizeArray:(o,c)=>{for(var _=0,m=o.length-1;m>=0;m--){var p=o[m];p==="."?o.splice(m,1):p===".."?(o.splice(m,1),_++):_&&(o.splice(m,1),_--)}if(c)for(;_;_--)o.unshift("..");return o},normalize:o=>{var c=U.isAbs(o),_=o.substr(-1)==="/";return o=U.normalizeArray(o.split("/").filter(m=>!!m),!c).join("/"),!o&&!c&&(o="."),o&&_&&(o+="/"),(c?"/":"")+o},dirname:o=>{var c=U.splitPath(o),_=c[0],m=c[1];return!_&&!m?".":(m&&(m=m.substr(0,m.length-1)),_+m)},basename:o=>{if(o==="/")return"/";o=U.normalize(o),o=o.replace(/\/$/,"");var c=o.lastIndexOf("/");return c===-1?o:o.substr(c+1)},join:function(){var o=Array.prototype.slice.call(arguments);return U.normalize(o.join("/"))},join2:(o,c)=>U.normalize(o+"/"+c)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return()=>(crypto.getRandomValues(o),o[0])}else if(Z)try{var c=require("crypto");return()=>c.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var o="",c=!1,_=arguments.length-1;_>=-1&&!c;_--){var m=_>=0?arguments[_]:e.cwd();if(typeof m!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!m)return"";o=m+"/"+o,c=U.isAbs(m)}return o=U.normalizeArray(o.split("/").filter(p=>!!p),!c).join("/"),(c?"/":"")+o||"."},relative:(o,c)=>{o=ge.resolve(o).substr(1),c=ge.resolve(c).substr(1);function _(k){for(var D=0;D<k.length&&k[D]==="";D++);for(var T=k.length-1;T>=0&&k[T]==="";T--);return D>T?[]:k.slice(D,T-D+1)}for(var m=_(o.split("/")),p=_(c.split("/")),y=Math.min(m.length,p.length),E=y,S=0;S<y;S++)if(m[S]!==p[S]){E=S;break}for(var b=[],S=E;S<m.length;S++)b.push("..");return b=b.concat(p.slice(E)),b.join("/")}};function Je(o,c,_){var m=_>0?_:Pe(o)+1,p=new Array(m),y=Xe(o,p,0,p.length);return c&&(p.length=y),p}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(o,c){Se.ttys[o]={input:[],output:[],ops:c},e.registerDevice(o,Se.stream_ops)},stream_ops:{open:function(o){var c=Se.ttys[o.node.rdev];if(!c)throw new e.ErrnoError(43);o.tty=c,o.seekable=!1},close:function(o){o.tty.ops.fsync(o.tty)},fsync:function(o){o.tty.ops.fsync(o.tty)},read:function(o,c,_,m,p){if(!o.tty||!o.tty.ops.get_char)throw new e.ErrnoError(60);for(var y=0,E=0;E<m;E++){var S;try{S=o.tty.ops.get_char(o.tty)}catch{throw new e.ErrnoError(29)}if(S===void 0&&y===0)throw new e.ErrnoError(6);if(S==null)break;y++,c[_+E]=S}return y&&(o.node.timestamp=Date.now()),y},write:function(o,c,_,m,p){if(!o.tty||!o.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var y=0;y<m;y++)o.tty.ops.put_char(o.tty,c[_+y])}catch{throw new e.ErrnoError(29)}return m&&(o.node.timestamp=Date.now()),y}},default_tty_ops:{get_char:function(o){if(!o.input.length){var c=null;if(Z){var _=256,m=Buffer.alloc(_),p=0;try{p=V.readSync(process.stdin.fd,m,0,_,-1)}catch(y){if(y.toString().includes("EOF"))p=0;else throw y}p>0?c=m.slice(0,p).toString("utf-8"):c=null}else typeof window<"u"&&typeof window.prompt=="function"?(c=window.prompt("Input: "),c!==null&&(c+=`
|
|
8
8
|
`)):typeof readline=="function"&&(c=readline(),c!==null&&(c+=`
|
|
9
9
|
`));if(!c)return null;o.input=Je(c,!0)}return o.input.shift()},put_char:function(o,c){c===null||c===10?(Qe(We(o.output,0)),o.output=[]):c!=0&&o.output.push(c)},fsync:function(o){o.output&&o.output.length>0&&(Qe(We(o.output,0)),o.output=[])}},default_tty1_ops:{put_char:function(o,c){c===null||c===10?(ce(We(o.output,0)),o.output=[]):c!=0&&o.output.push(c)},fsync:function(o){o.output&&o.output.length>0&&(ce(We(o.output,0)),o.output=[])}}};function Pr(o,c){return de.fill(0,o,o+c),o}function ro(o,c){return Math.ceil(o/c)*c}function Rr(o){o=ro(o,65536);var c=ar(65536,o);return c?Pr(c,o):0}var L={ops_table:null,mount:function(o){return L.createNode(null,"/",16895,0)},createNode:function(o,c,_,m){if(e.isBlkdev(_)||e.isFIFO(_))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var p=e.createNode(o,c,_,m);return e.isDir(p.mode)?(p.node_ops=L.ops_table.dir.node,p.stream_ops=L.ops_table.dir.stream,p.contents={}):e.isFile(p.mode)?(p.node_ops=L.ops_table.file.node,p.stream_ops=L.ops_table.file.stream,p.usedBytes=0,p.contents=null):e.isLink(p.mode)?(p.node_ops=L.ops_table.link.node,p.stream_ops=L.ops_table.link.stream):e.isChrdev(p.mode)&&(p.node_ops=L.ops_table.chrdev.node,p.stream_ops=L.ops_table.chrdev.stream),p.timestamp=Date.now(),o&&(o.contents[c]=p,o.timestamp=p.timestamp),p},getFileDataAsTypedArray:function(o){return o.contents?o.contents.subarray?o.contents.subarray(0,o.usedBytes):new Uint8Array(o.contents):new Uint8Array(0)},expandFileStorage:function(o,c){var _=o.contents?o.contents.length:0;if(!(_>=c)){var m=1024*1024;c=Math.max(c,_*(_<m?2:1.125)>>>0),_!=0&&(c=Math.max(c,256));var p=o.contents;o.contents=new Uint8Array(c),o.usedBytes>0&&o.contents.set(p.subarray(0,o.usedBytes),0)}},resizeFileStorage:function(o,c){if(o.usedBytes!=c)if(c==0)o.contents=null,o.usedBytes=0;else{var _=o.contents;o.contents=new Uint8Array(c),_&&o.contents.set(_.subarray(0,Math.min(c,o.usedBytes))),o.usedBytes=c}},node_ops:{getattr:function(o){var c={};return c.dev=e.isChrdev(o.mode)?o.id:1,c.ino=o.id,c.mode=o.mode,c.nlink=1,c.uid=0,c.gid=0,c.rdev=o.rdev,e.isDir(o.mode)?c.size=4096:e.isFile(o.mode)?c.size=o.usedBytes:e.isLink(o.mode)?c.size=o.link.length:c.size=0,c.atime=new Date(o.timestamp),c.mtime=new Date(o.timestamp),c.ctime=new Date(o.timestamp),c.blksize=4096,c.blocks=Math.ceil(c.size/c.blksize),c},setattr:function(o,c){c.mode!==void 0&&(o.mode=c.mode),c.timestamp!==void 0&&(o.timestamp=c.timestamp),c.size!==void 0&&L.resizeFileStorage(o,c.size)},lookup:function(o,c){throw e.genericErrors[44]},mknod:function(o,c,_,m){return L.createNode(o,c,_,m)},rename:function(o,c,_){if(e.isDir(o.mode)){var m;try{m=e.lookupNode(c,_)}catch{}if(m)for(var p in m.contents)throw new e.ErrnoError(55)}delete o.parent.contents[o.name],o.parent.timestamp=Date.now(),o.name=_,c.contents[_]=o,c.timestamp=o.parent.timestamp,o.parent=c},unlink:function(o,c){delete o.contents[c],o.timestamp=Date.now()},rmdir:function(o,c){var _=e.lookupNode(o,c);for(var m in _.contents)throw new e.ErrnoError(55);delete o.contents[c],o.timestamp=Date.now()},readdir:function(o){var c=[".",".."];for(var _ in o.contents)o.contents.hasOwnProperty(_)&&c.push(_);return c},symlink:function(o,c,_){var m=L.createNode(o,c,41471,0);return m.link=_,m},readlink:function(o){if(!e.isLink(o.mode))throw new e.ErrnoError(28);return o.link}},stream_ops:{read:function(o,c,_,m,p){var y=o.node.contents;if(p>=o.node.usedBytes)return 0;var E=Math.min(o.node.usedBytes-p,m);if(E>8&&y.subarray)c.set(y.subarray(p,p+E),_);else for(var S=0;S<E;S++)c[_+S]=y[p+S];return E},write:function(o,c,_,m,p,y){if(c.buffer===$.buffer&&(y=!1),!m)return 0;var E=o.node;if(E.timestamp=Date.now(),c.subarray&&(!E.contents||E.contents.subarray)){if(y)return E.contents=c.subarray(_,_+m),E.usedBytes=m,m;if(E.usedBytes===0&&p===0)return E.contents=c.slice(_,_+m),E.usedBytes=m,m;if(p+m<=E.usedBytes)return E.contents.set(c.subarray(_,_+m),p),m}if(L.expandFileStorage(E,p+m),E.contents.subarray&&c.subarray)E.contents.set(c.subarray(_,_+m),p);else for(var S=0;S<m;S++)E.contents[p+S]=c[_+S];return E.usedBytes=Math.max(E.usedBytes,p+m),m},llseek:function(o,c,_){var m=c;if(_===1?m+=o.position:_===2&&e.isFile(o.node.mode)&&(m+=o.node.usedBytes),m<0)throw new e.ErrnoError(28);return m},allocate:function(o,c,_){L.expandFileStorage(o.node,c+_),o.node.usedBytes=Math.max(o.node.usedBytes,c+_)},mmap:function(o,c,_,m,p){if(!e.isFile(o.node.mode))throw new e.ErrnoError(43);var y,E,S=o.node.contents;if(!(p&2)&&S.buffer===Cr)E=!1,y=S.byteOffset;else{if((_>0||_+c<S.length)&&(S.subarray?S=S.subarray(_,_+c):S=Array.prototype.slice.call(S,_,_+c)),E=!0,y=Rr(c),!y)throw new e.ErrnoError(48);$.set(S,y)}return{ptr:y,allocated:E}},msync:function(o,c,_,m,p){return L.stream_ops.write(o,c,0,m,_,!1),0}}};function to(o,c,_,m){var p=m?"":"al "+o;nr(o,y=>{Ne(y,'Loading data file "'+o+'" failed (no arrayBuffer).'),c(new Uint8Array(y)),p&&Ze(p)},y=>{if(_)_();else throw'Loading data file "'+o+'" failed.'}),p&&vr(p)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var o=process.binding("constants");o.fs&&(o=o.fs),M.flagsForNodeMap={1024:o.O_APPEND,64:o.O_CREAT,128:o.O_EXCL,256:o.O_NOCTTY,0:o.O_RDONLY,2:o.O_RDWR,4096:o.O_SYNC,512:o.O_TRUNC,1:o.O_WRONLY,131072:o.O_NOFOLLOW}},convertNodeCode:o=>{var c=o.code;return yt[c]},mount:o=>M.createNode(null,"/",M.getMode(o.opts.root),0),createNode:(o,c,_,m)=>{if(!e.isDir(_)&&!e.isFile(_)&&!e.isLink(_))throw new e.ErrnoError(28);var p=e.createNode(o,c,_);return p.node_ops=M.node_ops,p.stream_ops=M.stream_ops,p},getMode:o=>{var c;try{c=V.lstatSync(o),M.isWindows&&(c.mode=c.mode|(c.mode&292)>>2)}catch(_){throw _.code?new e.ErrnoError(M.convertNodeCode(_)):_}return c.mode},realPath:o=>{for(var c=[];o.parent!==o;)c.push(o.name),o=o.parent;return c.push(o.mount.opts.root),c.reverse(),U.join.apply(null,c)},flagsForNode:o=>{o&=-2097153,o&=-2049,o&=-32769,o&=-524289,o&=-65537;var c=0;for(var _ in M.flagsForNodeMap)o&_&&(c|=M.flagsForNodeMap[_],o^=_);if(o)throw new e.ErrnoError(28);return c},node_ops:{getattr:o=>{var c=M.realPath(o),_;try{_=V.lstatSync(c)}catch(m){throw m.code?new e.ErrnoError(M.convertNodeCode(m)):m}return M.isWindows&&!_.blksize&&(_.blksize=4096),M.isWindows&&!_.blocks&&(_.blocks=(_.size+_.blksize-1)/_.blksize|0),{dev:_.dev,ino:_.ino,mode:_.mode,nlink:_.nlink,uid:_.uid,gid:_.gid,rdev:_.rdev,size:_.size,atime:_.atime,mtime:_.mtime,ctime:_.ctime,blksize:_.blksize,blocks:_.blocks}},setattr:(o,c)=>{var _=M.realPath(o);try{if(c.mode!==void 0&&(V.chmodSync(_,c.mode),o.mode=c.mode),c.timestamp!==void 0){var m=new Date(c.timestamp);V.utimesSync(_,m,m)}c.size!==void 0&&V.truncateSync(_,c.size)}catch(p){throw p.code?new e.ErrnoError(M.convertNodeCode(p)):p}},lookup:(o,c)=>{var _=U.join2(M.realPath(o),c),m=M.getMode(_);return M.createNode(o,c,m)},mknod:(o,c,_,m)=>{var p=M.createNode(o,c,_,m),y=M.realPath(p);try{e.isDir(p.mode)?V.mkdirSync(y,p.mode):V.writeFileSync(y,"",{mode:p.mode})}catch(E){throw E.code?new e.ErrnoError(M.convertNodeCode(E)):E}return p},rename:(o,c,_)=>{var m=M.realPath(o),p=U.join2(M.realPath(c),_);try{V.renameSync(m,p)}catch(y){throw y.code?new e.ErrnoError(M.convertNodeCode(y)):y}o.name=_},unlink:(o,c)=>{var _=U.join2(M.realPath(o),c);try{V.unlinkSync(_)}catch(m){throw m.code?new e.ErrnoError(M.convertNodeCode(m)):m}},rmdir:(o,c)=>{var _=U.join2(M.realPath(o),c);try{V.rmdirSync(_)}catch(m){throw m.code?new e.ErrnoError(M.convertNodeCode(m)):m}},readdir:o=>{var c=M.realPath(o);try{return V.readdirSync(c)}catch(_){throw _.code?new e.ErrnoError(M.convertNodeCode(_)):_}},symlink:(o,c,_)=>{var m=U.join2(M.realPath(o),c);try{V.symlinkSync(_,m)}catch(p){throw p.code?new e.ErrnoError(M.convertNodeCode(p)):p}},readlink:o=>{var c=M.realPath(o);try{return c=V.readlinkSync(c),c=Le.relative(Le.resolve(o.mount.opts.root),c),c}catch(_){throw _.code?_.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(_)):_}}},stream_ops:{open:o=>{var c=M.realPath(o.node);try{e.isFile(o.node.mode)&&(o.nfd=V.openSync(c,M.flagsForNode(o.flags)))}catch(_){throw _.code?new e.ErrnoError(M.convertNodeCode(_)):_}},close:o=>{try{e.isFile(o.node.mode)&&o.nfd&&V.closeSync(o.nfd)}catch(c){throw c.code?new e.ErrnoError(M.convertNodeCode(c)):c}},read:(o,c,_,m,p)=>{if(m===0)return 0;try{return V.readSync(o.nfd,Buffer.from(c.buffer),_,m,p)}catch(y){throw new e.ErrnoError(M.convertNodeCode(y))}},write:(o,c,_,m,p)=>{try{return V.writeSync(o.nfd,Buffer.from(c.buffer),_,m,p)}catch(y){throw new e.ErrnoError(M.convertNodeCode(y))}},llseek:(o,c,_)=>{var m=c;if(_===1)m+=o.position;else if(_===2&&e.isFile(o.node.mode))try{var p=V.fstatSync(o.nfd);m+=p.size}catch(y){throw new e.ErrnoError(M.convertNodeCode(y))}if(m<0)throw new e.ErrnoError(28);return m},mmap:(o,c,_,m,p)=>{if(!e.isFile(o.node.mode))throw new e.ErrnoError(43);var y=Rr(c);return M.stream_ops.read(o,$,y,c,_),{ptr:y,allocated:!0}},msync:(o,c,_,m,p)=>(M.stream_ops.write(o,c,0,m,_,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(o,c={})=>{if(o=ge.resolve(e.cwd(),o),!o)return{path:"",node:null};var _={follow_mount:!0,recurse_count:0};if(c=Object.assign(_,c),c.recurse_count>8)throw new e.ErrnoError(32);for(var m=U.normalizeArray(o.split("/").filter(T=>!!T),!1),p=e.root,y="/",E=0;E<m.length;E++){var S=E===m.length-1;if(S&&c.parent)break;if(p=e.lookupNode(p,m[E]),y=U.join2(y,m[E]),e.isMountpoint(p)&&(!S||S&&c.follow_mount)&&(p=p.mounted.root),!S||c.follow)for(var b=0;e.isLink(p.mode);){var k=e.readlink(y);y=ge.resolve(U.dirname(y),k);var D=e.lookupPath(y,{recurse_count:c.recurse_count+1});if(p=D.node,b++>40)throw new e.ErrnoError(32)}}return{path:y,node:p}},getPath:o=>{for(var c;;){if(e.isRoot(o)){var _=o.mount.mountpoint;return c?_[_.length-1]!=="/"?_+"/"+c:_+c:_}c=c?o.name+"/"+c:o.name,o=o.parent}},hashName:(o,c)=>{for(var _=0,m=0;m<c.length;m++)_=(_<<5)-_+c.charCodeAt(m)|0;return(o+_>>>0)%e.nameTable.length},hashAddNode:o=>{var c=e.hashName(o.parent.id,o.name);o.name_next=e.nameTable[c],e.nameTable[c]=o},hashRemoveNode:o=>{var c=e.hashName(o.parent.id,o.name);if(e.nameTable[c]===o)e.nameTable[c]=o.name_next;else for(var _=e.nameTable[c];_;){if(_.name_next===o){_.name_next=o.name_next;break}_=_.name_next}},lookupNode:(o,c)=>{var _=e.mayLookup(o);if(_)throw new e.ErrnoError(_,o);for(var m=e.hashName(o.id,c),p=e.nameTable[m];p;p=p.name_next){var y=p.name;if(p.parent.id===o.id&&y===c)return p}return e.lookup(o,c)},createNode:(o,c,_,m)=>{var p=new e.FSNode(o,c,_,m);return e.hashAddNode(p),p},destroyNode:o=>{e.hashRemoveNode(o)},isRoot:o=>o===o.parent,isMountpoint:o=>!!o.mounted,isFile:o=>(o&61440)===32768,isDir:o=>(o&61440)===16384,isLink:o=>(o&61440)===40960,isChrdev:o=>(o&61440)===8192,isBlkdev:o=>(o&61440)===24576,isFIFO:o=>(o&61440)===4096,isSocket:o=>(o&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:o=>{var c=e.flagModes[o];if(typeof c>"u")throw new Error("Unknown file open mode: "+o);return c},flagsToPermissionString:o=>{var c=["r","w","rw"][o&3];return o&512&&(c+="w"),c},nodePermissions:(o,c)=>e.ignorePermissions?0:c.includes("r")&&!(o.mode&292)||c.includes("w")&&!(o.mode&146)||c.includes("x")&&!(o.mode&73)?2:0,mayLookup:o=>{var c=e.nodePermissions(o,"x");return c||(o.node_ops.lookup?0:2)},mayCreate:(o,c)=>{try{var _=e.lookupNode(o,c);return 20}catch{}return e.nodePermissions(o,"wx")},mayDelete:(o,c,_)=>{var m;try{m=e.lookupNode(o,c)}catch(y){return y.errno}var p=e.nodePermissions(o,"wx");if(p)return p;if(_){if(!e.isDir(m.mode))return 54;if(e.isRoot(m)||e.getPath(m)===e.cwd())return 10}else if(e.isDir(m.mode))return 31;return 0},mayOpen:(o,c)=>o?e.isLink(o.mode)?32:e.isDir(o.mode)&&(e.flagsToPermissionString(c)!=="r"||c&512)?31:e.nodePermissions(o,e.flagsToPermissionString(c)):44,MAX_OPEN_FDS:4096,nextfd:(o=0,c=e.MAX_OPEN_FDS)=>{for(var _=o;_<=c;_++)if(!e.streams[_])return _;throw new e.ErrnoError(33)},getStream:o=>e.streams[o],createStream:(o,c,_)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(p){this.node=p}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(p){this.shared.flags=p}},position:{get:function(){return this.shared.position},set:function(p){this.shared.position=p}}})),o=Object.assign(new e.FSStream,o);var m=e.nextfd(c,_);return o.fd=m,e.streams[m]=o,o},closeStream:o=>{e.streams[o]=null},chrdev_stream_ops:{open:o=>{var c=e.getDevice(o.node.rdev);o.stream_ops=c.stream_ops,o.stream_ops.open&&o.stream_ops.open(o)},llseek:()=>{throw new e.ErrnoError(70)}},major:o=>o>>8,minor:o=>o&255,makedev:(o,c)=>o<<8|c,registerDevice:(o,c)=>{e.devices[o]={stream_ops:c}},getDevice:o=>e.devices[o],getMounts:o=>{for(var c=[],_=[o];_.length;){var m=_.pop();c.push(m),_.push.apply(_,m.mounts)}return c},syncfs:(o,c)=>{typeof o=="function"&&(c=o,o=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var _=e.getMounts(e.root.mount),m=0;function p(E){return e.syncFSRequests--,c(E)}function y(E){if(E)return y.errored?void 0:(y.errored=!0,p(E));++m>=_.length&&p(null)}_.forEach(E=>{if(!E.type.syncfs)return y(null);E.type.syncfs(E,o,y)})},mount:(o,c,_)=>{var m=_==="/",p=!_,y;if(m&&e.root)throw new e.ErrnoError(10);if(!m&&!p){var E=e.lookupPath(_,{follow_mount:!1});if(_=E.path,y=E.node,e.isMountpoint(y))throw new e.ErrnoError(10);if(!e.isDir(y.mode))throw new e.ErrnoError(54)}var S={type:o,opts:c,mountpoint:_,mounts:[]},b=o.mount(S);return b.mount=S,S.root=b,m?e.root=b:y&&(y.mounted=S,y.mount&&y.mount.mounts.push(S)),b},unmount:o=>{var c=e.lookupPath(o,{follow_mount:!1});if(!e.isMountpoint(c.node))throw new e.ErrnoError(28);var _=c.node,m=_.mounted,p=e.getMounts(m);Object.keys(e.nameTable).forEach(E=>{for(var S=e.nameTable[E];S;){var b=S.name_next;p.includes(S.mount)&&e.destroyNode(S),S=b}}),_.mounted=null;var y=_.mount.mounts.indexOf(m);_.mount.mounts.splice(y,1)},lookup:(o,c)=>o.node_ops.lookup(o,c),mknod:(o,c,_)=>{var m=e.lookupPath(o,{parent:!0}),p=m.node,y=U.basename(o);if(!y||y==="."||y==="..")throw new e.ErrnoError(28);var E=e.mayCreate(p,y);if(E)throw new e.ErrnoError(E);if(!p.node_ops.mknod)throw new e.ErrnoError(63);return p.node_ops.mknod(p,y,c,_)},create:(o,c)=>(c=c!==void 0?c:438,c&=4095,c|=32768,e.mknod(o,c,0)),mkdir:(o,c)=>(c=c!==void 0?c:511,c&=1023,c|=16384,e.mknod(o,c,0)),mkdirTree:(o,c)=>{for(var _=o.split("/"),m="",p=0;p<_.length;++p)if(_[p]){m+="/"+_[p];try{e.mkdir(m,c)}catch(y){if(y.errno!=20)throw y}}},mkdev:(o,c,_)=>(typeof _>"u"&&(_=c,c=438),c|=8192,e.mknod(o,c,_)),symlink:(o,c)=>{if(!ge.resolve(o))throw new e.ErrnoError(44);var _=e.lookupPath(c,{parent:!0}),m=_.node;if(!m)throw new e.ErrnoError(44);var p=U.basename(c),y=e.mayCreate(m,p);if(y)throw new e.ErrnoError(y);if(!m.node_ops.symlink)throw new e.ErrnoError(63);return m.node_ops.symlink(m,p,o)},rename:(o,c)=>{var _=U.dirname(o),m=U.dirname(c),p=U.basename(o),y=U.basename(c),E,S,b;if(E=e.lookupPath(o,{parent:!0}),S=E.node,E=e.lookupPath(c,{parent:!0}),b=E.node,!S||!b)throw new e.ErrnoError(44);if(S.mount!==b.mount)throw new e.ErrnoError(75);var k=e.lookupNode(S,p),D=ge.relative(o,m);if(D.charAt(0)!==".")throw new e.ErrnoError(28);if(D=ge.relative(c,_),D.charAt(0)!==".")throw new e.ErrnoError(55);var T;try{T=e.lookupNode(b,y)}catch{}if(k!==T){var C=e.isDir(k.mode),A=e.mayDelete(S,p,C);if(A)throw new e.ErrnoError(A);if(A=T?e.mayDelete(b,y,C):e.mayCreate(b,y),A)throw new e.ErrnoError(A);if(!S.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(k)||T&&e.isMountpoint(T))throw new e.ErrnoError(10);if(b!==S&&(A=e.nodePermissions(S,"w"),A))throw new e.ErrnoError(A);e.hashRemoveNode(k);try{S.node_ops.rename(k,b,y)}catch(I){throw I}finally{e.hashAddNode(k)}}},rmdir:o=>{var c=e.lookupPath(o,{parent:!0}),_=c.node,m=U.basename(o),p=e.lookupNode(_,m),y=e.mayDelete(_,m,!0);if(y)throw new e.ErrnoError(y);if(!_.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(p))throw new e.ErrnoError(10);_.node_ops.rmdir(_,m),e.destroyNode(p)},readdir:o=>{var c=e.lookupPath(o,{follow:!0}),_=c.node;if(!_.node_ops.readdir)throw new e.ErrnoError(54);return _.node_ops.readdir(_)},unlink:o=>{var c=e.lookupPath(o,{parent:!0}),_=c.node;if(!_)throw new e.ErrnoError(44);var m=U.basename(o),p=e.lookupNode(_,m),y=e.mayDelete(_,m,!1);if(y)throw new e.ErrnoError(y);if(!_.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(p))throw new e.ErrnoError(10);_.node_ops.unlink(_,m),e.destroyNode(p)},readlink:o=>{var c=e.lookupPath(o),_=c.node;if(!_)throw new e.ErrnoError(44);if(!_.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(_.parent),_.node_ops.readlink(_))},stat:(o,c)=>{var _=e.lookupPath(o,{follow:!c}),m=_.node;if(!m)throw new e.ErrnoError(44);if(!m.node_ops.getattr)throw new e.ErrnoError(63);return m.node_ops.getattr(m)},lstat:o=>e.stat(o,!0),chmod:(o,c,_)=>{var m;if(typeof o=="string"){var p=e.lookupPath(o,{follow:!_});m=p.node}else m=o;if(!m.node_ops.setattr)throw new e.ErrnoError(63);m.node_ops.setattr(m,{mode:c&4095|m.mode&-4096,timestamp:Date.now()})},lchmod:(o,c)=>{e.chmod(o,c,!0)},fchmod:(o,c)=>{var _=e.getStream(o);if(!_)throw new e.ErrnoError(8);e.chmod(_.node,c)},chown:(o,c,_,m)=>{var p;if(typeof o=="string"){var y=e.lookupPath(o,{follow:!m});p=y.node}else p=o;if(!p.node_ops.setattr)throw new e.ErrnoError(63);p.node_ops.setattr(p,{timestamp:Date.now()})},lchown:(o,c,_)=>{e.chown(o,c,_,!0)},fchown:(o,c,_)=>{var m=e.getStream(o);if(!m)throw new e.ErrnoError(8);e.chown(m.node,c,_)},truncate:(o,c)=>{if(c<0)throw new e.ErrnoError(28);var _;if(typeof o=="string"){var m=e.lookupPath(o,{follow:!0});_=m.node}else _=o;if(!_.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(_.mode))throw new e.ErrnoError(31);if(!e.isFile(_.mode))throw new e.ErrnoError(28);var p=e.nodePermissions(_,"w");if(p)throw new e.ErrnoError(p);_.node_ops.setattr(_,{size:c,timestamp:Date.now()})},ftruncate:(o,c)=>{var _=e.getStream(o);if(!_)throw new e.ErrnoError(8);if(!(_.flags&2097155))throw new e.ErrnoError(28);e.truncate(_.node,c)},utime:(o,c,_)=>{var m=e.lookupPath(o,{follow:!0}),p=m.node;p.node_ops.setattr(p,{timestamp:Math.max(c,_)})},open:(o,c,_)=>{if(o==="")throw new e.ErrnoError(44);c=typeof c=="string"?e.modeStringToFlags(c):c,_=typeof _>"u"?438:_,c&64?_=_&4095|32768:_=0;var m;if(typeof o=="object")m=o;else{o=U.normalize(o);try{var p=e.lookupPath(o,{follow:!(c&131072)});m=p.node}catch{}}var y=!1;if(c&64)if(m){if(c&128)throw new e.ErrnoError(20)}else m=e.mknod(o,_,0),y=!0;if(!m)throw new e.ErrnoError(44);if(e.isChrdev(m.mode)&&(c&=-513),c&65536&&!e.isDir(m.mode))throw new e.ErrnoError(54);if(!y){var E=e.mayOpen(m,c);if(E)throw new e.ErrnoError(E)}c&512&&!y&&e.truncate(m,0),c&=-131713;var S=e.createStream({node:m,path:e.getPath(m),flags:c,seekable:!0,position:0,stream_ops:m.stream_ops,ungotten:[],error:!1});return S.stream_ops.open&&S.stream_ops.open(S),l.logReadFiles&&!(c&1)&&(e.readFiles||(e.readFiles={}),o in e.readFiles||(e.readFiles[o]=1)),S},close:o=>{if(e.isClosed(o))throw new e.ErrnoError(8);o.getdents&&(o.getdents=null);try{o.stream_ops.close&&o.stream_ops.close(o)}catch(c){throw c}finally{e.closeStream(o.fd)}o.fd=null},isClosed:o=>o.fd===null,llseek:(o,c,_)=>{if(e.isClosed(o))throw new e.ErrnoError(8);if(!o.seekable||!o.stream_ops.llseek)throw new e.ErrnoError(70);if(_!=0&&_!=1&&_!=2)throw new e.ErrnoError(28);return o.position=o.stream_ops.llseek(o,c,_),o.ungotten=[],o.position},read:(o,c,_,m,p)=>{if(m<0||p<0)throw new e.ErrnoError(28);if(e.isClosed(o))throw new e.ErrnoError(8);if((o.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(o.node.mode))throw new e.ErrnoError(31);if(!o.stream_ops.read)throw new e.ErrnoError(28);var y=typeof p<"u";if(!y)p=o.position;else if(!o.seekable)throw new e.ErrnoError(70);var E=o.stream_ops.read(o,c,_,m,p);return y||(o.position+=E),E},write:(o,c,_,m,p,y)=>{if(m<0||p<0)throw new e.ErrnoError(28);if(e.isClosed(o))throw new e.ErrnoError(8);if(!(o.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(o.node.mode))throw new e.ErrnoError(31);if(!o.stream_ops.write)throw new e.ErrnoError(28);o.seekable&&o.flags&1024&&e.llseek(o,0,2);var E=typeof p<"u";if(!E)p=o.position;else if(!o.seekable)throw new e.ErrnoError(70);var S=o.stream_ops.write(o,c,_,m,p,y);return E||(o.position+=S),S},allocate:(o,c,_)=>{if(e.isClosed(o))throw new e.ErrnoError(8);if(c<0||_<=0)throw new e.ErrnoError(28);if(!(o.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(o.node.mode)&&!e.isDir(o.node.mode))throw new e.ErrnoError(43);if(!o.stream_ops.allocate)throw new e.ErrnoError(138);o.stream_ops.allocate(o,c,_)},mmap:(o,c,_,m,p)=>{if(m&2&&!(p&2)&&(o.flags&2097155)!==2)throw new e.ErrnoError(2);if((o.flags&2097155)===1)throw new e.ErrnoError(2);if(!o.stream_ops.mmap)throw new e.ErrnoError(43);return o.stream_ops.mmap(o,c,_,m,p)},msync:(o,c,_,m,p)=>o.stream_ops.msync?o.stream_ops.msync(o,c,_,m,p):0,munmap:o=>0,ioctl:(o,c,_)=>{if(!o.stream_ops.ioctl)throw new e.ErrnoError(59);return o.stream_ops.ioctl(o,c,_)},readFile:(o,c={})=>{if(c.flags=c.flags||0,c.encoding=c.encoding||"binary",c.encoding!=="utf8"&&c.encoding!=="binary")throw new Error('Invalid encoding type "'+c.encoding+'"');var _,m=e.open(o,c.flags),p=e.stat(o),y=p.size,E=new Uint8Array(y);return e.read(m,E,0,y,0),c.encoding==="utf8"?_=We(E,0):c.encoding==="binary"&&(_=E),e.close(m),_},writeFile:(o,c,_={})=>{_.flags=_.flags||577;var m=e.open(o,_.flags,_.mode);if(typeof c=="string"){var p=new Uint8Array(Pe(c)+1),y=Xe(c,p,0,p.length);e.write(m,p,0,y,void 0,_.canOwn)}else if(ArrayBuffer.isView(c))e.write(m,c,0,c.byteLength,void 0,_.canOwn);else throw new Error("Unsupported data type");e.close(m)},cwd:()=>e.currentPath,chdir:o=>{var c=e.lookupPath(o,{follow:!0});if(c.node===null)throw new e.ErrnoError(44);if(!e.isDir(c.node.mode))throw new e.ErrnoError(54);var _=e.nodePermissions(c.node,"x");if(_)throw new e.ErrnoError(_);e.currentPath=c.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(c,_,m,p,y)=>p}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var o=eo();e.createDevice("/dev","random",o),e.createDevice("/dev","urandom",o),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var o=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var c=e.createNode(o,"fd",16895,73);return c.node_ops={lookup:(_,m)=>{var p=+m,y=e.getStream(p);if(!y)throw new e.ErrnoError(8);var E={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>y.path}};return E.parent=E,E}},c}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var o=e.open("/dev/stdin",0),c=e.open("/dev/stdout",1),_=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(c,_){this.node=_,this.setErrno=function(m){this.errno=m},this.setErrno(c),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(o=>{e.genericErrors[o]=new e.ErrnoError(o),e.genericErrors[o].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(o,c,_)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=o||l.stdin,l.stdout=c||l.stdout,l.stderr=_||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,mn(0);for(var o=0;o<e.streams.length;o++){var c=e.streams[o];c&&e.close(c)}},getMode:(o,c)=>{var _=0;return o&&(_|=365),c&&(_|=146),_},findObject:(o,c)=>{var _=e.analyzePath(o,c);return _.exists?_.object:null},analyzePath:(o,c)=>{try{var _=e.lookupPath(o,{follow:!c});o=_.path}catch{}var m={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var _=e.lookupPath(o,{parent:!0});m.parentExists=!0,m.parentPath=_.path,m.parentObject=_.node,m.name=U.basename(o),_=e.lookupPath(o,{follow:!c}),m.exists=!0,m.path=_.path,m.object=_.node,m.name=_.node.name,m.isRoot=_.path==="/"}catch(p){m.error=p.errno}return m},createPath:(o,c,_,m)=>{o=typeof o=="string"?o:e.getPath(o);for(var p=c.split("/").reverse();p.length;){var y=p.pop();if(y){var E=U.join2(o,y);try{e.mkdir(E)}catch{}o=E}}return E},createFile:(o,c,_,m,p)=>{var y=U.join2(typeof o=="string"?o:e.getPath(o),c),E=e.getMode(m,p);return e.create(y,E)},createDataFile:(o,c,_,m,p,y)=>{var E=c;o&&(o=typeof o=="string"?o:e.getPath(o),E=c?U.join2(o,c):o);var S=e.getMode(m,p),b=e.create(E,S);if(_){if(typeof _=="string"){for(var k=new Array(_.length),D=0,T=_.length;D<T;++D)k[D]=_.charCodeAt(D);_=k}e.chmod(b,S|146);var C=e.open(b,577);e.write(C,_,0,_.length,0,y),e.close(C),e.chmod(b,S)}return b},createDevice:(o,c,_,m)=>{var p=U.join2(typeof o=="string"?o:e.getPath(o),c),y=e.getMode(!!_,!!m);e.createDevice.major||(e.createDevice.major=64);var E=e.makedev(e.createDevice.major++,0);return e.registerDevice(E,{open:S=>{S.seekable=!1},close:S=>{m&&m.buffer&&m.buffer.length&&m(10)},read:(S,b,k,D,T)=>{for(var C=0,A=0;A<D;A++){var I;try{I=_()}catch{throw new e.ErrnoError(29)}if(I===void 0&&C===0)throw new e.ErrnoError(6);if(I==null)break;C++,b[k+A]=I}return C&&(S.node.timestamp=Date.now()),C},write:(S,b,k,D,T)=>{for(var C=0;C<D;C++)try{m(b[k+C])}catch{throw new e.ErrnoError(29)}return D&&(S.node.timestamp=Date.now()),C}}),e.mkdev(p,y,E)},forceLoadFile:o=>{if(o.isDevice||o.isFolder||o.link||o.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{o.contents=Je(Ye(o.url),!0),o.usedBytes=o.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(o,c,_,m,p)=>{function y(){this.lengthKnown=!1,this.chunks=[]}if(y.prototype.get=function(A){if(!(A>this.length-1||A<0)){var I=A%this.chunkSize,z=A/this.chunkSize|0;return this.getter(z)[I]}},y.prototype.setDataGetter=function(A){this.getter=A},y.prototype.cacheLength=function(){var A=new XMLHttpRequest;if(A.open("HEAD",_,!1),A.send(null),!(A.status>=200&&A.status<300||A.status===304))throw new Error("Couldn't load "+_+". Status: "+A.status);var I=Number(A.getResponseHeader("Content-length")),z,K=(z=A.getResponseHeader("Accept-Ranges"))&&z==="bytes",B=(z=A.getResponseHeader("Content-Encoding"))&&z==="gzip",x=1024*1024;K||(x=I);var G=(oe,le)=>{if(oe>le)throw new Error("invalid range ("+oe+", "+le+") or no bytes requested!");if(le>I-1)throw new Error("only "+I+" bytes available! programmer error!");var he=new XMLHttpRequest;if(he.open("GET",_,!1),I!==x&&he.setRequestHeader("Range","bytes="+oe+"-"+le),he.responseType="arraybuffer",he.overrideMimeType&&he.overrideMimeType("text/plain; charset=x-user-defined"),he.send(null),!(he.status>=200&&he.status<300||he.status===304))throw new Error("Couldn't load "+_+". Status: "+he.status);return he.response!==void 0?new Uint8Array(he.response||[]):Je(he.responseText||"",!0)},re=this;re.setDataGetter(oe=>{var le=oe*x,he=(oe+1)*x-1;if(he=Math.min(he,I-1),typeof re.chunks[oe]>"u"&&(re.chunks[oe]=G(le,he)),typeof re.chunks[oe]>"u")throw new Error("doXHR failed!");return re.chunks[oe]}),(B||!I)&&(x=I=1,I=this.getter(0).length,x=I,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=I,this._chunkSize=x,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var E=new y;Object.defineProperties(E,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var S={isDevice:!1,contents:E}}else var S={isDevice:!1,url:_};var b=e.createFile(o,c,S,m,p);S.contents?b.contents=S.contents:S.url&&(b.contents=null,b.url=S.url),Object.defineProperties(b,{usedBytes:{get:function(){return this.contents.length}}});var k={},D=Object.keys(b.stream_ops);D.forEach(C=>{var A=b.stream_ops[C];k[C]=function(){return e.forceLoadFile(b),A.apply(null,arguments)}});function T(C,A,I,z,K){var B=C.node.contents;if(K>=B.length)return 0;var x=Math.min(B.length-K,z);if(B.slice)for(var G=0;G<x;G++)A[I+G]=B[K+G];else for(var G=0;G<x;G++)A[I+G]=B.get(K+G);return x}return k.read=(C,A,I,z,K)=>(e.forceLoadFile(b),T(C,A,I,z,K)),k.mmap=(C,A,I,z,K)=>{e.forceLoadFile(b);var B=Rr(A);if(!B)throw new e.ErrnoError(48);return T(C,$,B,A,I),{ptr:B,allocated:!0}},b.stream_ops=k,b},createPreloadedFile:(o,c,_,m,p,y,E,S,b,k)=>{var D=c?ge.resolve(U.join2(o,c)):o,T="cp "+D;function C(A){function I(z){k&&k(),S||e.createDataFile(o,c,z,m,p,b),y&&y(),Ze(T)}Browser.handledByPreloadPlugin(A,D,I,()=>{E&&E(),Ze(T)})||I(A)}vr(T),typeof _=="string"?to(_,A=>C(A),E):C(_)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(o,c,_)=>{c=c||(()=>{}),_=_||(()=>{});var m=e.indexedDB();try{var p=m.open(e.DB_NAME(),e.DB_VERSION)}catch(y){return _(y)}p.onupgradeneeded=()=>{Qe("creating db");var y=p.result;y.createObjectStore(e.DB_STORE_NAME)},p.onsuccess=()=>{var y=p.result,E=y.transaction([e.DB_STORE_NAME],"readwrite"),S=E.objectStore(e.DB_STORE_NAME),b=0,k=0,D=o.length;function T(){k==0?c():_()}o.forEach(C=>{var A=S.put(e.analyzePath(C).object.contents,C);A.onsuccess=()=>{b++,b+k==D&&T()},A.onerror=()=>{k++,b+k==D&&T()}}),E.onerror=_},p.onerror=_},loadFilesFromDB:(o,c,_)=>{c=c||(()=>{}),_=_||(()=>{});var m=e.indexedDB();try{var p=m.open(e.DB_NAME(),e.DB_VERSION)}catch(y){return _(y)}p.onupgradeneeded=_,p.onsuccess=()=>{var y=p.result;try{var E=y.transaction([e.DB_STORE_NAME],"readonly")}catch(C){_(C);return}var S=E.objectStore(e.DB_STORE_NAME),b=0,k=0,D=o.length;function T(){k==0?c():_()}o.forEach(C=>{var A=S.get(C);A.onsuccess=()=>{e.analyzePath(C).exists&&e.unlink(C),e.createDataFile(U.dirname(C),U.basename(C),A.result,!0,!0,!0),b++,b+k==D&&T()},A.onerror=()=>{k++,b+k==D&&T()}}),E.onerror=_},p.onerror=_}},N={DEFAULT_POLLMASK:5,calculateAt:function(o,c,_){if(U.isAbs(c))return c;var m;if(o===-100)m=e.cwd();else{var p=N.getStreamFromFD(o);m=p.path}if(c.length==0){if(!_)throw new e.ErrnoError(44);return m}return U.join2(m,c)},doStat:function(o,c,_){try{var m=o(c)}catch(p){if(p&&p.node&&U.normalize(c)!==U.normalize(e.getPath(p.node)))return-54;throw p}return h[_>>2]=m.dev,h[_+8>>2]=m.ino,h[_+12>>2]=m.mode,H[_+16>>2]=m.nlink,h[_+20>>2]=m.uid,h[_+24>>2]=m.gid,h[_+28>>2]=m.rdev,q=[m.size>>>0,(P=m.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[_+40>>2]=q[0],h[_+44>>2]=q[1],h[_+48>>2]=4096,h[_+52>>2]=m.blocks,q=[Math.floor(m.atime.getTime()/1e3)>>>0,(P=Math.floor(m.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[_+56>>2]=q[0],h[_+60>>2]=q[1],H[_+64>>2]=0,q=[Math.floor(m.mtime.getTime()/1e3)>>>0,(P=Math.floor(m.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[_+72>>2]=q[0],h[_+76>>2]=q[1],H[_+80>>2]=0,q=[Math.floor(m.ctime.getTime()/1e3)>>>0,(P=Math.floor(m.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[_+88>>2]=q[0],h[_+92>>2]=q[1],H[_+96>>2]=0,q=[m.ino>>>0,(P=m.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[_+104>>2]=q[0],h[_+108>>2]=q[1],0},doMsync:function(o,c,_,m,p){if(!e.isFile(c.node.mode))throw new e.ErrnoError(43);if(m&2)return 0;var y=de.slice(o,o+_);e.msync(c,y,p,_,m)},varargs:void 0,get:function(){N.varargs+=4;var o=h[N.varargs-4>>2];return o},getStr:function(o){var c=ne(o);return c},getStreamFromFD:function(o){var c=e.getStream(o);if(!c)throw new e.ErrnoError(8);return c}};function no(o,c,_,m,p){try{for(var y=0,E=c?h[c>>2]:0,S=c?h[c+4>>2]:0,b=_?h[_>>2]:0,k=_?h[_+4>>2]:0,D=m?h[m>>2]:0,T=m?h[m+4>>2]:0,C=0,A=0,I=0,z=0,K=0,B=0,x=(c?h[c>>2]:0)|(_?h[_>>2]:0)|(m?h[m>>2]:0),G=(c?h[c+4>>2]:0)|(_?h[_+4>>2]:0)|(m?h[m+4>>2]:0),re=function(Ve,Dr,yr,Vr){return Ve<32?Dr&Vr:yr&Vr},oe=0;oe<o;oe++){var le=1<<oe%32;if(re(oe,x,G,le)){var he=N.getStreamFromFD(oe),ze=N.DEFAULT_POLLMASK;he.stream_ops?.poll&&(ze=he.stream_ops.poll(he)),ze&1&&re(oe,E,S,le)&&(oe<32?C=C|le:A=A|le,y++),ze&4&&re(oe,b,k,le)&&(oe<32?I=I|le:z=z|le,y++),ze&2&&re(oe,D,T,le)&&(oe<32?K=K|le:B=B|le,y++)}}return c&&(h[c>>2]=C,h[c+4>>2]=A),_&&(h[_>>2]=I,h[_+4>>2]=z),m&&(h[m>>2]=K,h[m+4>>2]=B),y}catch(Ve){if(typeof e>"u"||!(Ve instanceof e.ErrnoError))throw Ve;return-Ve.errno}}var j={mount:function(o){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(c,_){return typeof _=="function"&&(this._callbacks[c]=_),this},l.websocket.emit=function(c,_){typeof this._callbacks[c]=="function"&&this._callbacks[c].call(this,_)},e.createNode(null,"/",16895,0)},createSocket:function(o,c,_){c&=-526337;var m=c==1;if(m&&_&&_!=6)throw new e.ErrnoError(66);var p={family:o,type:c,protocol:_,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},y=j.nextname(),E=e.createNode(j.root,y,49152,0);E.sock=p;var S=e.createStream({path:y,node:E,flags:2,seekable:!1,stream_ops:j.stream_ops});return p.stream=S,p},getSocket:function(o){var c=e.getStream(o);return!c||!e.isSocket(c.node.mode)?null:c.node.sock},stream_ops:{poll:function(o){var c=o.node.sock;return c.sock_ops.poll(c)},ioctl:function(o,c,_){var m=o.node.sock;return m.sock_ops.ioctl(m,c,_)},read:function(o,c,_,m,p){var y=o.node.sock,E=y.sock_ops.recvmsg(y,m);return E?(c.set(E.buffer,_),E.buffer.length):0},write:function(o,c,_,m,p){var y=o.node.sock;return y.sock_ops.sendmsg(y,c,_,m)},close:function(o){var c=o.node.sock;c.sock_ops.close(c)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(o,c,_){var m;if(typeof c=="object"&&(m=c,c=null,_=null),m)if(m._socket)c=m._socket.remoteAddress,_=m._socket.remotePort;else{var p=/ws[s]?:\/\/([^:]+):(\d+)/.exec(m.url);if(!p)throw new Error("WebSocket URL must be in the format ws(s)://address:port");c=p[1],_=parseInt(p[2],10)}else try{var y=l.websocket&&typeof l.websocket=="object",E="ws:#".replace("#","//");if(y&&(typeof l.websocket.url=="function"?E=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(E=l.websocket.url)),E==="ws://"||E==="wss://"){var S=c.split("/");E=E+S[0]+":"+_+"/"+S.slice(1).join("/")}var b="binary";y&&typeof l.websocket.subprotocol=="string"&&(b=l.websocket.subprotocol);var k=void 0;b!=="null"&&(b=b.replace(/^ +| +$/g,"").split(/ *, */),k=b),y&&l.websocket.subprotocol===null&&(b="null",k=void 0);var D;Z?D=Fn():D=WebSocket,l.websocket.decorator&&(D=l.websocket.decorator(D)),m=new D(E,k),m.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var T={addr:c,port:_,socket:m,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(o,T),j.websocket_sock_ops.handlePeerEvents(o,T),o.type===2&&typeof o.sport<"u"&&T.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(o.sport&65280)>>8,o.sport&255])),T},getPeer:function(o,c,_){return o.peers[c+":"+_]},addPeer:function(o,c){o.peers[c.addr+":"+c.port]=c},removePeer:function(o,c){delete o.peers[c.addr+":"+c.port]},handlePeerEvents:function(o,c){var _=!0,m=function(){l.websocket.emit("open",o.stream.fd);try{for(var y=c.dgram_send_queue.shift();y;)c.socket.send(y),y=c.dgram_send_queue.shift()}catch{c.socket.close()}};function p(y){if(typeof y=="string"){var E=new TextEncoder;y=E.encode(y)}else{if(Ne(y.byteLength!==void 0),y.byteLength==0)return;y=new Uint8Array(y)}var S=_;if(_=!1,S&&y.length===10&&y[0]===255&&y[1]===255&&y[2]===255&&y[3]===255&&y[4]==="p".charCodeAt(0)&&y[5]==="o".charCodeAt(0)&&y[6]==="r".charCodeAt(0)&&y[7]==="t".charCodeAt(0)){var b=y[8]<<8|y[9];j.websocket_sock_ops.removePeer(o,c),c.port=b,j.websocket_sock_ops.addPeer(o,c);return}o.recv_queue.push({addr:c.addr,port:c.port,data:y}),l.websocket.emit("message",o.stream.fd)}Z?(c.socket.on("open",m),c.socket.on("message",function(y,E){E&&p(new Uint8Array(y).buffer)}),c.socket.on("close",function(){l.websocket.emit("close",o.stream.fd)}),c.socket.on("error",function(y){o.error=14,l.websocket.emit("error",[o.stream.fd,o.error,"ECONNREFUSED: Connection refused"])})):(c.socket.onopen=m,c.socket.onclose=function(){l.websocket.emit("close",o.stream.fd)},c.socket.onmessage=function(E){p(E.data)},c.socket.onerror=function(y){o.error=14,l.websocket.emit("error",[o.stream.fd,o.error,"ECONNREFUSED: Connection refused"])})},poll:function(o){if(o.type===1&&o.server)return o.pending.length?65:0;var c=0,_=o.type===1?j.websocket_sock_ops.getPeer(o,o.daddr,o.dport):null;return(o.recv_queue.length||!_||_&&_.socket.readyState===_.socket.CLOSING||_&&_.socket.readyState===_.socket.CLOSED)&&(c|=65),(!_||_&&_.socket.readyState===_.socket.OPEN)&&(c|=4),(_&&_.socket.readyState===_.socket.CLOSING||_&&_.socket.readyState===_.socket.CLOSED)&&(c|=16),c},ioctl:function(o,c,_){switch(c){case 21531:var m=0;return o.recv_queue.length&&(m=o.recv_queue[0].data.length),h[_>>2]=m,0;default:return 28}},close:function(o){if(o.server){try{o.server.close()}catch{}o.server=null}for(var c=Object.keys(o.peers),_=0;_<c.length;_++){var m=o.peers[c[_]];try{m.socket.close()}catch{}j.websocket_sock_ops.removePeer(o,m)}return 0},bind:function(o,c,_){if(typeof o.saddr<"u"||typeof o.sport<"u")throw new e.ErrnoError(28);if(o.saddr=c,o.sport=_,o.type===2){o.server&&(o.server.close(),o.server=null);try{o.sock_ops.listen(o,0)}catch(m){if(!(m instanceof e.ErrnoError)||m.errno!==138)throw m}}},connect:function(o,c,_){if(o.server)throw new e.ErrnoError(138);if(typeof o.daddr<"u"&&typeof o.dport<"u"){var m=j.websocket_sock_ops.getPeer(o,o.daddr,o.dport);if(m)throw m.socket.readyState===m.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var p=j.websocket_sock_ops.createPeer(o,c,_);throw o.daddr=p.addr,o.dport=p.port,new e.ErrnoError(26)},listen:function(o,c){if(!Z)throw new e.ErrnoError(138);if(o.server)throw new e.ErrnoError(28);var _=Fn().Server,m=o.saddr;l.websocket.serverDecorator&&(_=l.websocket.serverDecorator(_)),o.server=new _({host:m,port:o.sport}),l.websocket.emit("listen",o.stream.fd),o.server.on("connection",function(p){if(o.type===1){var y=j.createSocket(o.family,o.type,o.protocol),E=j.websocket_sock_ops.createPeer(y,p);y.daddr=E.addr,y.dport=E.port,o.pending.push(y),l.websocket.emit("connection",y.stream.fd)}else j.websocket_sock_ops.createPeer(o,p),l.websocket.emit("connection",o.stream.fd)}),o.server.on("close",function(){l.websocket.emit("close",o.stream.fd),o.server=null}),o.server.on("error",function(p){o.error=23,l.websocket.emit("error",[o.stream.fd,o.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(o){if(!o.server||!o.pending.length)throw new e.ErrnoError(28);var c=o.pending.shift();return c.stream.flags=o.stream.flags,c},getname:function(o,c){var _,m;if(c){if(o.daddr===void 0||o.dport===void 0)throw new e.ErrnoError(53);_=o.daddr,m=o.dport}else _=o.saddr||0,m=o.sport||0;return{addr:_,port:m}},sendmsg:function(o,c,_,m,p,y){if(o.type===2){if((p===void 0||y===void 0)&&(p=o.daddr,y=o.dport),p===void 0||y===void 0)throw new e.ErrnoError(17)}else p=o.daddr,y=o.dport;var E=j.websocket_sock_ops.getPeer(o,p,y);if(o.type===1){if(!E||E.socket.readyState===E.socket.CLOSING||E.socket.readyState===E.socket.CLOSED)throw new e.ErrnoError(53);if(E.socket.readyState===E.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(c)&&(_+=c.byteOffset,c=c.buffer);var S;if(S=c.slice(_,_+m),o.type===2&&(!E||E.socket.readyState!==E.socket.OPEN))return(!E||E.socket.readyState===E.socket.CLOSING||E.socket.readyState===E.socket.CLOSED)&&(E=j.websocket_sock_ops.createPeer(o,p,y)),E.dgram_send_queue.push(S),m;try{return E.socket.send(S),m}catch{throw new e.ErrnoError(28)}},recvmsg:function(o,c,_){if(o.type===1&&o.server)throw new e.ErrnoError(53);var m=o.recv_queue.shift();if(!m){if(o.type===1){var p=j.websocket_sock_ops.getPeer(o,o.daddr,o.dport);if(!p)throw new e.ErrnoError(53);if(p.socket.readyState===p.socket.CLOSING||p.socket.readyState===p.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var y=m.data.byteLength||m.data.length,E=m.data.byteOffset||0,S=m.data.buffer||m.data,b=Math.min(c,y),k={buffer:new Uint8Array(S,E,b),addr:m.addr,port:m.port};if(_&2&&(b=0),o.type===1&&b<y){var D=y-b;m.data=new Uint8Array(S,E+b,D),o.recv_queue.unshift(m)}return k}}};function ve(o){var c=j.getSocket(o);if(!c)throw new e.ErrnoError(8);return c}function Kt(o){return h[Qt()>>2]=o,o}function lr(o){for(var c=o.split("."),_=0;_<4;_++){var m=Number(c[_]);if(isNaN(m))return null;c[_]=m}return(c[0]|c[1]<<8|c[2]<<16|c[3]<<24)>>>0}function Q(o){return parseInt(o)}function Hr(o){var c,_,m,p,y=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,E=[];if(!y.test(o))return null;if(o==="::")return[0,0,0,0,0,0,0,0];for(o.startsWith("::")?o=o.replace("::","Z:"):o=o.replace("::",":Z:"),o.indexOf(".")>0?(o=o.replace(new RegExp("[.]","g"),":"),c=o.split(":"),c[c.length-4]=Q(c[c.length-4])+Q(c[c.length-3])*256,c[c.length-3]=Q(c[c.length-2])+Q(c[c.length-1])*256,c=c.slice(0,c.length-2)):c=o.split(":"),m=0,p=0,_=0;_<c.length;_++)if(typeof c[_]=="string")if(c[_]==="Z"){for(p=0;p<8-c.length+1;p++)E[_+p]=0;m=p-1}else E[_+m]=un(parseInt(c[_],16));else E[_+m]=c[_];return[E[1]<<16|E[0],E[3]<<16|E[2],E[5]<<16|E[4],E[7]<<16|E[6]]}function rr(o,c,_,m,p){switch(c){case 2:_=lr(_),Pr(o,16),p&&(h[p>>2]=16),Ee[o>>1]=c,h[o+4>>2]=_,Ee[o+2>>1]=un(m);break;case 10:_=Hr(_),Pr(o,28),p&&(h[p>>2]=28),h[o>>2]=c,h[o+8>>2]=_[0],h[o+12>>2]=_[1],h[o+16>>2]=_[2],h[o+20>>2]=_[3],Ee[o+2>>1]=un(m);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(o){var c=lr(o);if(c!==null||(c=Hr(o),c!==null))return o;var _;if(ee.address_map.addrs[o])_=ee.address_map.addrs[o];else{var m=ee.address_map.id++;Ne(m<65535,"exceeded max address mappings of 65535"),_="172.29."+(m&255)+"."+(m&65280),ee.address_map.names[_]=o,ee.address_map.addrs[o]=_}return _},lookup_addr:function(o){return ee.address_map.names[o]?ee.address_map.names[o]:null}};function oo(o,c,_,m){try{var p=ve(o),y=p.sock_ops.accept(p);if(c)var E=rr(c,y.family,ee.lookup_name(y.daddr),y.dport,_);return y.stream.fd}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function Or(o){return(o&255)+"."+(o>>8&255)+"."+(o>>16&255)+"."+(o>>24&255)}function en(o){var c="",_=0,m=0,p=0,y=0,E=0,S=0,b=[o[0]&65535,o[0]>>16,o[1]&65535,o[1]>>16,o[2]&65535,o[2]>>16,o[3]&65535,o[3]>>16],k=!0,D="";for(S=0;S<5;S++)if(b[S]!==0){k=!1;break}if(k){if(D=Or(b[6]|b[7]<<16),b[5]===-1)return c="::ffff:",c+=D,c;if(b[5]===0)return c="::",D==="0.0.0.0"&&(D=""),D==="0.0.0.1"&&(D="1"),c+=D,c}for(_=0;_<8;_++)b[_]===0&&(_-p>1&&(E=0),p=_,E++),E>m&&(m=E,y=_-m+1);for(_=0;_<8;_++){if(m>1&&b[_]===0&&_>=y&&_<y+m){_===y&&(c+=":",y===0&&(c+=":"));continue}c+=Number(fn(b[_]&65535)).toString(16),c+=_<7?":":""}return c}function wt(o,c){var _=Ee[o>>1],m=fn(st[o+2>>1]),p;switch(_){case 2:if(c!==16)return{errno:28};p=h[o+4>>2],p=Or(p);break;case 10:if(c!==28)return{errno:28};p=[h[o+8>>2],h[o+12>>2],h[o+16>>2],h[o+20>>2]],p=en(p);break;default:return{errno:5}}return{family:_,addr:p,port:m}}function Mr(o,c,_){if(_&&o===0)return null;var m=wt(o,c);if(m.errno)throw new e.ErrnoError(m.errno);return m.addr=ee.lookup_addr(m.addr)||m.addr,m}function io(o,c,_){try{var m=ve(o),p=Mr(c,_);return m.sock_ops.bind(m,p.addr,p.port),0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function ao(o){try{return o=N.getStr(o),e.chdir(o),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function so(o,c){try{return o=N.getStr(o),e.chmod(o,c),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function uo(o,c,_){try{var m=ve(o),p=Mr(c,_);return m.sock_ops.connect(m,p.addr,p.port),0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function fo(o){try{var c=N.getStreamFromFD(o);return e.createStream(c,0).fd}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function co(o,c,_){try{var m=N.getStreamFromFD(o);if(m.fd===c)return-28;var p=e.getStream(c);return p&&e.close(p),e.createStream(m,c,c+1).fd}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function lo(o,c,_,m){try{if(c=N.getStr(c),c=N.calculateAt(o,c),_&-8)return-28;var p=e.lookupPath(c,{follow:!0}),y=p.node;if(!y)return-44;var E="";return _&4&&(E+="r"),_&2&&(E+="w"),_&1&&(E+="x"),E&&e.nodePermissions(y,E)?-2:0}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function Xr(o,c){return c+2097152>>>0<4194305-!!o?(o>>>0)+c*4294967296:NaN}function _o(o,c,_,m,p,y){try{var E=Xr(_,m);if(isNaN(E))return-61;var S=Xr(p,y);if(isNaN(S))return-61;var b=N.getStreamFromFD(o);return e.allocate(b,E,S),0}catch(k){if(typeof e>"u"||!(k instanceof e.ErrnoError))throw k;return-k.errno}}function vo(o,c){try{return e.fchmod(o,c),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function mo(o,c,_){try{return e.fchown(o,c,_),0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function po(o,c,_,m,p){try{c=N.getStr(c);var y=p&256;return p=p&-257,c=N.calculateAt(o,c),(y?e.lchown:e.chown)(c,_,m),0}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function rn(o,c,_){N.varargs=_;try{var m=N.getStreamFromFD(o);switch(c){case 0:{var p=N.get();if(p<0)return-28;var y;return y=e.createStream(m,p),y.fd}case 1:case 2:return 0;case 3:return m.flags;case 4:{var p=N.get();return m.flags|=p,0}case 5:{var p=N.get(),E=0;return Ee[p+E>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function ho(o){try{var c=N.getStreamFromFD(o);return 0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function yo(o,c){try{var _=N.getStreamFromFD(o);return N.doStat(e.stat,_.path,c)}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function wo(o,c,_){try{var m=Xr(c,_);return isNaN(m)?-61:(e.ftruncate(o,m),0)}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function Eo(o,c){try{if(c===0)return-28;var _=e.cwd(),m=Pe(_)+1;return c<m?-68:(Ae(_,o,c),m)}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function go(o,c,_){try{var m=N.getStreamFromFD(o);m.getdents||(m.getdents=e.readdir(m.path));for(var p=280,y=0,E=e.llseek(m,0,1),S=Math.floor(E/p);S<m.getdents.length&&y+p<=_;){var b,k,D=m.getdents[S];if(D===".")b=m.node.id,k=4;else if(D===".."){var T=e.lookupPath(m.path,{parent:!0});b=T.node.id,k=4}else{var C=e.lookupNode(m.node,D);b=C.id,k=e.isChrdev(C.mode)?2:e.isDir(C.mode)?4:e.isLink(C.mode)?10:8}q=[b>>>0,(P=b,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[c+y>>2]=q[0],h[c+y+4>>2]=q[1],q=[(S+1)*p>>>0,(P=(S+1)*p,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[c+y+8>>2]=q[0],h[c+y+12>>2]=q[1],Ee[c+y+16>>1]=280,$[c+y+18>>0]=k,Ae(D,c+y+19,256),y+=p,S+=1}return e.llseek(m,S*p,0),y}catch(A){if(typeof e>"u"||!(A instanceof e.ErrnoError))throw A;return-A.errno}}function So(o,c,_){try{var m=ve(o);if(!m.daddr)return-53;var p=rr(c,m.family,ee.lookup_name(m.daddr),m.dport,_);return 0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function bo(o,c,_){try{ce("__syscall_getsockname "+o);var m=ve(o),p=rr(c,m.family,ee.lookup_name(m.saddr||"0.0.0.0"),m.sport,_);return 0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function ko(o,c,_,m,p){try{var y=ve(o);return c===1&&_===4?(h[m>>2]=y.error,h[p>>2]=4,y.error=null,0):-50}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function Do(o,c,_){N.varargs=_;try{var m=N.getStreamFromFD(o);switch(c){case 21509:case 21505:return m.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return m.tty?0:-59;case 21519:{if(!m.tty)return-59;var p=N.get();return h[p>>2]=0,0}case 21520:return m.tty?-28:-59;case 21531:{var p=N.get();return e.ioctl(m,c,p)}case 21523:return m.tty?0:-59;case 21524:return m.tty?0:-59;default:return-28}}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function Oo(o,c){try{var _=ve(o);return _.sock_ops.listen(_,c),0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function No(o,c){try{return o=N.getStr(o),N.doStat(e.lstat,o,c)}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function To(o,c,_){try{return c=N.getStr(c),c=N.calculateAt(o,c),c=U.normalize(c),c[c.length-1]==="/"&&(c=c.substr(0,c.length-1)),e.mkdir(c,_,0),0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function se(o,c,_,m){try{c=N.getStr(c);var p=m&256,y=m&4096;return m=m&-4353,c=N.calculateAt(o,c,y),N.doStat(p?e.lstat:e.stat,c,_)}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function Co(o,c,_,m){N.varargs=m;try{c=N.getStr(c),c=N.calculateAt(o,c);var p=m?N.get():0;return e.open(c,_,p).fd}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}var pe={BUCKET_BUFFER_SIZE:8192,mount:function(o){return e.createNode(null,"/",16895,0)},createPipe:function(){var o={buckets:[],refcnt:2};o.buckets.push({buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var c=pe.nextname(),_=pe.nextname(),m=e.createNode(pe.root,c,4096,0),p=e.createNode(pe.root,_,4096,0);m.pipe=o,p.pipe=o;var y=e.createStream({path:c,node:m,flags:0,seekable:!1,stream_ops:pe.stream_ops});m.stream=y;var E=e.createStream({path:_,node:p,flags:1,seekable:!1,stream_ops:pe.stream_ops});return p.stream=E,{readable_fd:y.fd,writable_fd:E.fd}},stream_ops:{poll:function(o){var c=o.node.pipe;if((o.flags&2097155)===1)return 260;if(c.buckets.length>0)for(var _=0;_<c.buckets.length;_++){var m=c.buckets[_];if(m.offset-m.roffset>0)return 65}return 0},ioctl:function(o,c,_){return 28},fsync:function(o){return 28},read:function(o,c,_,m,p){for(var y=o.node.pipe,E=0,S=0;S<y.buckets.length;S++){var b=y.buckets[S];E+=b.offset-b.roffset}Ne(c instanceof ArrayBuffer||ArrayBuffer.isView(c));var k=c.subarray(_,_+m);if(m<=0)return 0;if(E==0)throw new e.ErrnoError(6);for(var D=Math.min(E,m),T=D,C=0,S=0;S<y.buckets.length;S++){var A=y.buckets[S],I=A.offset-A.roffset;if(D<=I){var z=A.buffer.subarray(A.roffset,A.offset);D<I?(z=z.subarray(0,D),A.roffset+=D):C++,k.set(z);break}else{var z=A.buffer.subarray(A.roffset,A.offset);k.set(z),k=k.subarray(z.byteLength),D-=z.byteLength,C++}}return C&&C==y.buckets.length&&(C--,y.buckets[C].offset=0,y.buckets[C].roffset=0),y.buckets.splice(0,C),T},write:function(o,c,_,m,p){var y=o.node.pipe;Ne(c instanceof ArrayBuffer||ArrayBuffer.isView(c));var E=c.subarray(_,_+m),S=E.byteLength;if(S<=0)return 0;var b=null;y.buckets.length==0?(b={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0},y.buckets.push(b)):b=y.buckets[y.buckets.length-1],Ne(b.offset<=pe.BUCKET_BUFFER_SIZE);var k=pe.BUCKET_BUFFER_SIZE-b.offset;if(k>=S)return b.buffer.set(E,b.offset),b.offset+=S,S;k>0&&(b.buffer.set(E.subarray(0,k),b.offset),b.offset+=k,E=E.subarray(k,E.byteLength));for(var D=E.byteLength/pe.BUCKET_BUFFER_SIZE|0,T=E.byteLength%pe.BUCKET_BUFFER_SIZE,C=0;C<D;C++){var A={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:pe.BUCKET_BUFFER_SIZE,roffset:0};y.buckets.push(A),A.buffer.set(E.subarray(0,pe.BUCKET_BUFFER_SIZE)),E=E.subarray(pe.BUCKET_BUFFER_SIZE,E.byteLength)}if(T>0){var A={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:E.byteLength,roffset:0};y.buckets.push(A),A.buffer.set(E)}return S},close:function(o){var c=o.node.pipe;c.refcnt--,c.refcnt===0&&(c.buckets=null)}},nextname:function(){return pe.nextname.current||(pe.nextname.current=0),"pipe["+pe.nextname.current+++"]"}};function Fo(o){try{if(o==0)throw new e.ErrnoError(21);var c=pe.createPipe();return h[o>>2]=c.readable_fd,h[o+4>>2]=c.writable_fd,0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Ao(o,c,_){try{for(var m=0,p=0;p<c;p++){var y=o+8*p,E=h[y>>2],S=Ee[y+4>>1],b=32,k=e.getStream(E);k&&(b=N.DEFAULT_POLLMASK,k.stream_ops?.poll&&(b=k.stream_ops.poll(k))),b&=S|8|16,b&&m++,Ee[y+6>>1]=b}return m}catch(D){if(typeof e>"u"||!(D instanceof e.ErrnoError))throw D;return-D.errno}}function Po(o,c,_,m){try{if(c=N.getStr(c),c=N.calculateAt(o,c),m<=0)return-28;var p=e.readlink(c),y=Math.min(m,Pe(p)),E=$[_+y];return Ae(p,_,m+1),$[_+y]=E,y}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function Ro(o,c,_,m,p,y){try{var E=ve(o),S=E.sock_ops.recvmsg(E,_,typeof m<"u"?m:0);if(!S)return 0;if(p)var b=rr(p,E.family,ee.lookup_name(S.addr),S.port,y);return de.set(S.buffer,c),S.buffer.byteLength}catch(k){if(typeof e>"u"||!(k instanceof e.ErrnoError))throw k;return-k.errno}}function Mo(o,c,_,m){try{return c=N.getStr(c),m=N.getStr(m),c=N.calculateAt(o,c),m=N.calculateAt(_,m),e.rename(c,m),0}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function Lo(o){try{return o=N.getStr(o),e.rmdir(o),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Io(o,c,_,m,p,y){try{var E=ve(o),S=Mr(p,y,!0);return S?E.sock_ops.sendmsg(E,$,c,_,S.addr,S.port):e.write(E.stream,$,c,_)}catch(b){if(typeof e>"u"||!(b instanceof e.ErrnoError))throw b;return-b.errno}}function Uo(o,c,_){try{var m=j.createSocket(o,c,_);return m.stream.fd}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function Bo(o,c){try{return o=N.getStr(o),N.doStat(e.stat,o,c)}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function xo(o,c,_){try{return o=N.getStr(o),h[_+4>>2]=4096,h[_+40>>2]=4096,h[_+8>>2]=1e6,h[_+12>>2]=5e5,h[_+16>>2]=5e5,h[_+20>>2]=e.nextInode,h[_+24>>2]=1e6,h[_+28>>2]=42,h[_+44>>2]=2,h[_+36>>2]=255,0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Br(o,c){try{return o=N.getStr(o),c=N.getStr(c),e.symlink(o,c),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Ho(o,c,_){try{return c=N.getStr(c),c=N.calculateAt(o,c),_===0?e.unlink(c):_===512?e.rmdir(c):ue("Invalid flags passed to unlinkat"),0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function $r(o){return H[o>>2]+h[o+4>>2]*4294967296}function tn(o,c,_,m){try{if(c=N.getStr(c),c=N.calculateAt(o,c,!0),_){var E=$r(_),S=h[_+8>>2];p=E*1e3+S/(1e3*1e3),_+=16,E=$r(_),S=h[_+8>>2],y=E*1e3+S/(1e3*1e3)}else var p=Date.now(),y=p;return e.utime(c,p,y),0}catch(b){if(typeof e>"u"||!(b instanceof e.ErrnoError))throw b;return-b.errno}}function zo(o){}var _n="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function Wo(o,c){ue(_n)}function jo(o,c){ue(_n)}var Yo=!0;function qo(){return Yo}function Vo(){throw 1/0}function Ko(o,c){var _=new Date($r(o)*1e3);h[c>>2]=_.getUTCSeconds(),h[c+4>>2]=_.getUTCMinutes(),h[c+8>>2]=_.getUTCHours(),h[c+12>>2]=_.getUTCDate(),h[c+16>>2]=_.getUTCMonth(),h[c+20>>2]=_.getUTCFullYear()-1900,h[c+24>>2]=_.getUTCDay();var m=Date.UTC(_.getUTCFullYear(),0,1,0,0,0,0),p=(_.getTime()-m)/(1e3*60*60*24)|0;h[c+28>>2]=p}function Go(o,c){var _=new Date($r(o)*1e3);h[c>>2]=_.getSeconds(),h[c+4>>2]=_.getMinutes(),h[c+8>>2]=_.getHours(),h[c+12>>2]=_.getDate(),h[c+16>>2]=_.getMonth(),h[c+20>>2]=_.getFullYear()-1900,h[c+24>>2]=_.getDay();var m=new Date(_.getFullYear(),0,1),p=(_.getTime()-m.getTime())/(1e3*60*60*24)|0;h[c+28>>2]=p,h[c+36>>2]=-(_.getTimezoneOffset()*60);var y=new Date(_.getFullYear(),6,1).getTimezoneOffset(),E=m.getTimezoneOffset(),S=(y!=E&&_.getTimezoneOffset()==Math.min(E,y))|0;h[c+32>>2]=S}function Xo(o){var c=new Date(h[o+20>>2]+1900,h[o+16>>2],h[o+12>>2],h[o+8>>2],h[o+4>>2],h[o>>2],0),_=h[o+32>>2],m=c.getTimezoneOffset(),p=new Date(c.getFullYear(),0,1),y=new Date(c.getFullYear(),6,1).getTimezoneOffset(),E=p.getTimezoneOffset(),S=Math.min(E,y);if(_<0)h[o+32>>2]=+(y!=E&&S==m);else if(_>0!=(S==m)){var b=Math.max(E,y),k=_>0?S:b;c.setTime(c.getTime()+(k-m)*6e4)}h[o+24>>2]=c.getDay();var D=(c.getTime()-p.getTime())/(1e3*60*60*24)|0;return h[o+28>>2]=D,h[o>>2]=c.getSeconds(),h[o+4>>2]=c.getMinutes(),h[o+8>>2]=c.getHours(),h[o+12>>2]=c.getDate(),h[o+16>>2]=c.getMonth(),h[o+20>>2]=c.getYear(),c.getTime()/1e3|0}function nn(o,c,_,m,p,y){try{var E=N.getStreamFromFD(m),S=e.mmap(E,o,p,c,_),b=S.ptr;return h[y>>2]=S.allocated,b}catch(k){if(typeof e>"u"||!(k instanceof e.ErrnoError))throw k;return-k.errno}}function $o(o,c,_,m,p,y){try{var E=N.getStreamFromFD(p);_&2&&N.doMsync(o,E,c,m,y),e.munmap(E)}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function zr(o){var c=Pe(o)+1,_=Ur(c);return _&&Xe(o,$,_,c),_}function Zo(o,c,_){var m=new Date().getFullYear(),p=new Date(m,0,1),y=new Date(m,6,1),E=p.getTimezoneOffset(),S=y.getTimezoneOffset(),b=Math.max(E,S);h[o>>2]=b*60,h[c>>2]=+(E!=S);function k(I){var z=I.toTimeString().match(/\(([A-Za-z ]+)\)$/);return z?z[1]:"GMT"}var D=k(p),T=k(y),C=zr(D),A=zr(T);S<E?(H[_>>2]=C,H[_+4>>2]=A):(H[_>>2]=A,H[_+4>>2]=C)}function It(o,c,_){It.called||(It.called=!0,Zo(o,c,_))}function on(){ue("")}function Jo(){return Date.now()}function Wr(){return 2147483648}function Qo(){return Wr()}var Ut;Z?Ut=()=>{var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:Ut=()=>performance.now();function ei(o,c,_){de.copyWithin(o,c,c+_)}function wn(o){try{return or.grow(o-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ri(o){var c=de.length;o=o>>>0;var _=Wr();if(o>_)return!1;let m=(b,k)=>b+(k-b%k)%k;for(var p=1;p<=4;p*=2){var y=c*(1+.2/p);y=Math.min(y,o+100663296);var E=Math.min(_,m(Math.max(o,y),65536)),S=wn(E);if(S)return!0}return!1}function Et(o){Ge=o,_r()||(l.onExit&&l.onExit(o),Ce=!0),te(o,new mr(o))}function ti(o,c){Ge=o,_r()||Yn(),Et(o)}var gt=ti;function et(){if(!_r())try{gt(Ge)}catch(o){pt(o)}}function jr(o){if(!(_t||Ce))try{o(),et()}catch(c){pt(c)}}function Bt(){Fr+=1}function xt(){Fr-=1}function rt(o,c){return Bt(),setTimeout(function(){xt(),jr(o)},c)}function ni(o){return Te.handleSleep(c=>rt(c,o))}var dr=O.ENV||{};function tt(){return J||"./this.program"}function Ir(){if(!Ir.strings){var o=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",c={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:o,_:tt()};for(var _ in dr)dr[_]===void 0?delete c[_]:c[_]=dr[_];var m=[];for(var _ in c)m.push(_+"="+c[_]);Ir.strings=m}return Ir.strings}function Ht(o,c,_){for(var m=0;m<o.length;++m)$[c++>>0]=o.charCodeAt(m);_||($[c>>0]=0)}function oi(o,c){var _=0;return Ir().forEach(function(m,p){var y=c+_;H[o+p*4>>2]=y,Ht(m,y),_+=m.length+1}),0}function ii(o,c){var _=Ir();H[o>>2]=_.length;var m=0;return _.forEach(function(p){m+=p.length+1}),H[c>>2]=m,0}function ai(o){try{var c=N.getStreamFromFD(o);return e.close(c),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return _.errno}}function si(o,c){try{var _=N.getStreamFromFD(o),m=_.tty?2:e.isDir(_.mode)?3:e.isLink(_.mode)?7:4;return $[c>>0]=m,0}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return p.errno}}function ui(o,c,_,m){for(var p=0,y=0;y<_;y++){var E=H[c>>2],S=H[c+4>>2];c+=8;var b=e.read(o,$,E,S,m);if(b<0)return-1;if(p+=b,b<S)break}return p}function fi(o,c,_,m){try{var p=N.getStreamFromFD(o),y=ui(p,c,_);return H[m>>2]=y,0}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return E.errno}}function ci(o,c,_,m,p){try{var y=Xr(c,_);if(isNaN(y))return 61;var E=N.getStreamFromFD(o);return e.llseek(E,y,m),q=[E.position>>>0,(P=E.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[p>>2]=q[0],h[p+4>>2]=q[1],E.getdents&&y===0&&m===0&&(E.getdents=null),0}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return S.errno}}function li(o){try{var c=N.getStreamFromFD(o);return Te.handleSleep(function(_){var m=c.node.mount;if(!m.type.syncfs){_(0);return}m.type.syncfs(m,!1,function(p){if(p){_(function(){return 29});return}_(0)})})}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return _.errno}}function vn(o,c,_,m){for(var p=0,y=0;y<_;y++){var E=H[c>>2],S=H[c+4>>2];c+=8;var b=e.write(o,$,E,S,m);if(b<0)return-1;p+=b}return p}function An(o,c,_,m){try{var p=N.getStreamFromFD(o),y=vn(p,c,_);return H[m>>2]=y,0}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return E.errno}}function Dn(o,c,_,m){var p=0,y=0,E=0,S=0,b=0,k=0,D;function T(C,A,I,z,K,B){var x,G,re,oe;return G=C===10?28:16,K=C===10?en(K):Or(K),x=Ur(G),oe=rr(x,C,K,B),Ne(!oe),re=Ur(32),h[re+4>>2]=C,h[re+8>>2]=A,h[re+12>>2]=I,h[re+24>>2]=z,H[re+20>>2]=x,C===10?h[re+16>>2]=28:h[re+16>>2]=16,h[re+28>>2]=0,re}if(_&&(E=h[_>>2],S=h[_+4>>2],b=h[_+8>>2],k=h[_+12>>2]),b&&!k&&(k=b===2?17:6),!b&&k&&(b=k===17?2:1),k===0&&(k=6),b===0&&(b=1),!o&&!c)return-2;if(E&-1088||_!==0&&h[_>>2]&2&&!o)return-1;if(E&32)return-2;if(b!==0&&b!==1&&b!==2)return-7;if(S!==0&&S!==2&&S!==10)return-6;if(c&&(c=ne(c),y=parseInt(c,10),isNaN(y)))return E&1024?-2:-8;if(!o)return S===0&&(S=2),E&1||(S===2?p=Sn(2130706433):p=[0,0,0,1]),D=T(S,b,k,null,p,y),H[m>>2]=D,0;if(o=ne(o),p=lr(o),p!==null)if(S===0||S===2)S=2;else if(S===10&&E&8)p=[0,0,Sn(65535),p],S=10;else return-2;else if(p=Hr(o),p!==null)if(S===0||S===10)S=10;else return-2;return p!=null?(D=T(S,b,k,o,p,y),H[m>>2]=D,0):E&4?-2:(o=ee.lookup_name(o),p=lr(o),S===0?S=2:S===10&&(p=[0,0,Sn(65535),p]),D=T(S,b,k,null,p,y),H[m>>2]=D,0)}function di(){ce("missing function: getcontext"),ue(-1)}function _i(){ce("missing function: getdtablesize"),ue(-1)}function En(o){var c=Ur(20),_=Ur(o.length+1);Ae(o,_,o.length+1),H[c>>2]=_;var m=Ur(4);H[m>>2]=0,H[c+4>>2]=m;var p=2;h[c+8>>2]=p,h[c+12>>2]=4;var y=Ur(12);return H[y>>2]=y+8,H[y+4>>2]=0,h[y+8>>2]=lr(ee.lookup_name(o)),H[c+16>>2]=y,c}function Jr(o){return En(ne(o))}function St(o,c,_,m,p,y){var E=Jr(o);return Zt(c,E,20),kt(E),h[y>>2]=0,H[p>>2]=c,0}function zt(o,c){for(var _=Math.min(c,3),m=8,p=0;p<_;p++)ut[o+p*m>>3]=.1;return _}function Wt(o,c,_,m,p,y,E){var S=wt(o,c);if(S.errno)return-6;var b=S.port,k=S.addr,D=!1;if(_&&m){var T;if(E&1||!(T=ee.lookup_addr(k))){if(E&8)return-2}else k=T;var C=Ae(k,_,m);C+1>=m&&(D=!0)}if(p&&y){b=""+b;var C=Ae(b,p,y);C+1>=y&&(D=!0)}return D?-12:0}var br={list:[],map:{}};function je(o){function c(y,E,S){var b=Ur(y.length+1);Ht(y,b);for(var k=0,D=S.length,T=Ur((D+1)*4),C=0;C<D;C++,k+=4){var A=S[C],I=Ur(A.length+1);Ht(A,I),H[T+k>>2]=I}H[T+k>>2]=0;var z=Ur(12);return H[z>>2]=b,H[z+4>>2]=T,h[z+8>>2]=E,z}var _=br.list,m=br.map;if(_.length===0){var p=c("tcp",6,["TCP"]);_.push(p),m.tcp=m[6]=p,p=c("udp",17,["UDP"]),_.push(p),m.udp=m[17]=p}je.index=0}function Nr(o){o=ne(o),je(!0);var c=br.map[o];return c}function Ue(o){je(!0);var c=br.map[o];return c}function ir(o){var c=Pe(o)+1,_=Qr(c);return Xe(o,$,_,c),_}var qe={getAllWebSockets:function(o){let c=new Set;o.server&&o.server.clients.forEach(_=>{c.add(_)});for(let _ of qe.getAllPeers(o))c.add(_.socket);return Array.from(c)},getAllPeers:function(o){let c=new Set;if(o.server&&o.pending.filter(_=>_.peers).forEach(_=>{for(let m of Object.values(_.peers))c.add(m)}),o.peers)for(let _ of Object.values(o.peers))c.add(_);return Array.from(c)},awaitData:function(o){return qe.awaitWsEvent(o,"message")},awaitConnection:function(o){return o.OPEN===o.readyState?[Promise.resolve(),qe.noop]:qe.awaitWsEvent(o,"open")},awaitClose:function(o){return[o.CLOSING,o.CLOSED].includes(o.readyState)?[Promise.resolve(),qe.noop]:qe.awaitWsEvent(o,"close")},awaitError:function(o){return[o.CLOSING,o.CLOSED].includes(o.readyState)?[Promise.resolve(),qe.noop]:qe.awaitWsEvent(o,"error")},awaitWsEvent:function(o,c){let _,m=()=>{_()};return[new Promise(function(E){_=E,o.once(c,m)}),()=>{o.removeListener(c,m),setTimeout(_)}]},noop:function(){},shutdownSocket:function(o,c){let _=ve(o),m=Object.values(_.peers)[0];if(!m)return-1;try{return m.socket.close(),j.websocket_sock_ops.removePeer(_,m),0}catch(p){return console.log("Socket shutdown error",p),-1}}};function Er(o,c,_){if(!o)return 1;let m=ne(o);if(!m.length)return 0;let p=ne(c);if(!p.length)return 0;if(l.popen_to_file){let{path:y,exitCode:E}=l.popen_to_file(m,p);return de[_]=E,ir(y)}if(Z){let y=require("os").tmpdir(),E="php-process-stream",S=y+"/"+E,b=require("child_process"),k;if(p==="r")k=b.spawnSync(m,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[_]=k.status,require("fs").writeFileSync(S,k.stdout,{encoding:"utf8",flag:"w+"});else return p==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+p+" (should be r or w)"),_W_EXITCODE(0,2));return ir(S)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function fr(){ce("missing function: makecontext"),ue(-1)}function Tr(o){return o%4===0&&(o%100!==0||o%400===0)}function Yr(o,c){for(var _=0,m=0;m<=c;_+=o[m++]);return _}var jt=[31,29,31,30,31,30,31,31,30,31,30,31],Yt=[31,28,31,30,31,30,31,31,30,31,30,31];function Gt(o,c){for(var _=new Date(o.getTime());c>0;){var m=Tr(_.getFullYear()),p=_.getMonth(),y=(m?jt:Yt)[p];if(c>y-_.getDate())c-=y-_.getDate()+1,_.setDate(1),p<11?_.setMonth(p+1):(_.setMonth(0),_.setFullYear(_.getFullYear()+1));else return _.setDate(_.getDate()+c),_}return _}function be(o,c,_,m){var p=h[m+40>>2],y={tm_sec:h[m>>2],tm_min:h[m+4>>2],tm_hour:h[m+8>>2],tm_mday:h[m+12>>2],tm_mon:h[m+16>>2],tm_year:h[m+20>>2],tm_wday:h[m+24>>2],tm_yday:h[m+28>>2],tm_isdst:h[m+32>>2],tm_gmtoff:h[m+36>>2],tm_zone:p?ne(p):""},E=ne(_),S={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var b in S)E=E.replace(new RegExp(b,"g"),S[b]);var k=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],D=["January","February","March","April","May","June","July","August","September","October","November","December"];function T(x,G,re){for(var oe=typeof x=="number"?x.toString():x||"";oe.length<G;)oe=re[0]+oe;return oe}function C(x,G){return T(x,G,"0")}function A(x,G){function re(le){return le<0?-1:le>0?1:0}var oe;return(oe=re(x.getFullYear()-G.getFullYear()))===0&&(oe=re(x.getMonth()-G.getMonth()))===0&&(oe=re(x.getDate()-G.getDate())),oe}function I(x){switch(x.getDay()){case 0:return new Date(x.getFullYear()-1,11,29);case 1:return x;case 2:return new Date(x.getFullYear(),0,3);case 3:return new Date(x.getFullYear(),0,2);case 4:return new Date(x.getFullYear(),0,1);case 5:return new Date(x.getFullYear()-1,11,31);case 6:return new Date(x.getFullYear()-1,11,30)}}function z(x){var G=Gt(new Date(x.tm_year+1900,0,1),x.tm_yday),re=new Date(G.getFullYear(),0,4),oe=new Date(G.getFullYear()+1,0,4),le=I(re),he=I(oe);return A(le,G)<=0?A(he,G)<=0?G.getFullYear()+1:G.getFullYear():G.getFullYear()-1}var K={"%a":function(x){return k[x.tm_wday].substring(0,3)},"%A":function(x){return k[x.tm_wday]},"%b":function(x){return D[x.tm_mon].substring(0,3)},"%B":function(x){return D[x.tm_mon]},"%C":function(x){var G=x.tm_year+1900;return C(G/100|0,2)},"%d":function(x){return C(x.tm_mday,2)},"%e":function(x){return T(x.tm_mday,2," ")},"%g":function(x){return z(x).toString().substring(2)},"%G":function(x){return z(x)},"%H":function(x){return C(x.tm_hour,2)},"%I":function(x){var G=x.tm_hour;return G==0?G=12:G>12&&(G-=12),C(G,2)},"%j":function(x){return C(x.tm_mday+Yr(Tr(x.tm_year+1900)?jt:Yt,x.tm_mon-1),3)},"%m":function(x){return C(x.tm_mon+1,2)},"%M":function(x){return C(x.tm_min,2)},"%n":function(){return`
|
|
10
|
-
`},"%p":function(x){return x.tm_hour>=0&&x.tm_hour<12?"AM":"PM"},"%S":function(x){return C(x.tm_sec,2)},"%t":function(){return" "},"%u":function(x){return x.tm_wday||7},"%U":function(x){var G=x.tm_yday+7-x.tm_wday;return C(Math.floor(G/7),2)},"%V":function(x){var G=Math.floor((x.tm_yday+7-(x.tm_wday+6)%7)/7);if((x.tm_wday+371-x.tm_yday-2)%7<=2&&G++,G){if(G==53){var oe=(x.tm_wday+371-x.tm_yday)%7;oe!=4&&(oe!=3||!Tr(x.tm_year))&&(G=1)}}else{G=52;var re=(x.tm_wday+7-x.tm_yday-1)%7;(re==4||re==5&&Tr(x.tm_year%400-1))&&G++}return C(G,2)},"%w":function(x){return x.tm_wday},"%W":function(x){var G=x.tm_yday+7-(x.tm_wday+6)%7;return C(Math.floor(G/7),2)},"%y":function(x){return(x.tm_year+1900).toString().substring(2)},"%Y":function(x){return x.tm_year+1900},"%z":function(x){var G=x.tm_gmtoff,re=G>=0;return G=Math.abs(G)/60,G=G/60*100+G%60,(re?"+":"-")+("0000"+G).slice(-4)},"%Z":function(x){return x.tm_zone},"%%":function(){return"%"}};E=E.replace(/%%/g,"\0\0");for(var b in K)E.includes(b)&&(E=E.replace(new RegExp(b,"g"),K[b](y)));E=E.replace(/\0\0/g,"%");var B=Je(E,!1);return B.length>c?0:(ht(B,o),B.length-1)}function X(o,c,_){for(var m=ne(c),p="\\!@#$^&*()+=-[]/{}|:<>?,.",y=0,E=p.length;y<E;++y)m=m.replace(new RegExp("\\"+p[y],"g"),"\\"+p[y]);var S={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var b in S)m=m.replace(b,S[b]);var k={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},D={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},T={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},C={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var A in k)m=m.replace(A,"("+A+k[A]+")");for(var I=[],y=m.indexOf("%");y>=0;y=m.indexOf("%"))I.push(m[y+1]),m=m.replace(new RegExp("\\%"+m[y+1],"g"),"");var z=new RegExp("^"+m,"i").exec(ne(o));function K(){function Pi(Bi,ua,bs){return typeof Bi!="number"||isNaN(Bi)?ua:Bi>=ua?Bi<=bs?Bi:bs:ua}return{year:Pi(h[_+20>>2]+1900,1970,9999),month:Pi(h[_+16>>2],0,11),day:Pi(h[_+12>>2],1,31),hour:Pi(h[_+8>>2],0,23),min:Pi(h[_+4>>2],0,59),sec:Pi(h[_>>2],0,59)}}if(z){var B=K(),x,G=Pi=>{var Bi=I.indexOf(Pi);if(Bi>=0)return z[Bi+1]};if((x=G("S"))&&(B.sec=Q(x)),(x=G("M"))&&(B.min=Q(x)),x=G("H"))B.hour=Q(x);else if(x=G("I")){var re=Q(x);(x=G("p"))&&(re+=x.toUpperCase()[0]==="P"?12:0),B.hour=re}if(x=G("Y"))B.year=Q(x);else if(x=G("y")){var oe=Q(x);(x=G("C"))?oe+=Q(x)*100:oe+=oe<69?2e3:1900,B.year=oe}if((x=G("m"))?B.month=Q(x)-1:(x=G("b"))&&(B.month=D[x.substring(0,3).toUpperCase()]||0),x=G("d"))B.day=Q(x);else if(x=G("j"))for(var le=Q(x),he=Tr(B.year),ze=0;ze<12;++ze){var Ve=Yr(he?jt:Yt,ze-1);le<=Ve+(he?jt:Yt)[ze]&&(B.day=le-Ve)}else if(x=G("a")){var Dr=x.substring(0,3).toUpperCase();if(x=G("U")){var yr=T[Dr],Vr=Q(x),Kr=new Date(B.year,0,1),Jt;Kr.getDay()===0?Jt=Gt(Kr,yr+7*(Vr-1)):Jt=Gt(Kr,7-Kr.getDay()+yr+7*(Vr-1)),B.day=Jt.getDate(),B.month=Jt.getMonth()}else if(x=G("W")){var yr=C[Dr],Vr=Q(x),Kr=new Date(B.year,0,1),Jt;Kr.getDay()===1?Jt=Gt(Kr,yr+7*(Vr-1)):Jt=Gt(Kr,7-Kr.getDay()+1+yr+7*(Vr-1)),B.day=Jt.getDate(),B.month=Jt.getMonth()}}var dn=new Date(B.year,B.month,B.day,B.hour,B.min,B.sec,0);return h[_>>2]=dn.getSeconds(),h[_+4>>2]=dn.getMinutes(),h[_+8>>2]=dn.getHours(),h[_+12>>2]=dn.getDate(),h[_+16>>2]=dn.getMonth(),h[_+20>>2]=dn.getFullYear()-1900,h[_+24>>2]=dn.getDay(),h[_+28>>2]=Yr(Tr(dn.getFullYear())?jt:Yt,dn.getMonth()-1)+dn.getDate()-1,h[_+32>>2]=0,o+Je(z[0]).length-1}return 0}function Fe(){ce("missing function: swapcontext"),ue(-1)}function Xt(o){return qe.shutdownSocket(o,2)}function ie(o,c,_){if(typeof Te>"u")return 0;let m=1,p=2,y=4,E=8,S=16,b=32;return Te.handleSleep(k=>{let D=ve(o);if(!D){k(0);return}let T=[],C=new Set;if(c&m||c&p){if(D.server){for(let x of D.pending)if((x.recv_queue||[]).length>0){k(1);return}}else if((D.recv_queue||[]).length>0){k(1);return}}let A=qe.getAllWebSockets(D);if(!A.length){k(0);return}for(let x of A)(c&m||c&p)&&(T.push(qe.awaitData(x)),C.add("POLLIN")),c&y&&(T.push(qe.awaitConnection(x)),C.add("POLLOUT")),c&S&&(T.push(qe.awaitClose(x)),C.add("POLLHUP")),(c&E||c&b)&&(T.push(qe.awaitError(x)),C.add("POLLERR"));if(T.length===0){console.warn("Unsupported poll event "+c+", defaulting to setTimeout()."),setTimeout(function(){k(0)},_);return}let I=T.map(([x])=>x),z=()=>T.forEach(([,x])=>x()),K=!1;Promise.race(I).then(function(x){K||(K=!0,k(1),clearTimeout(B),z())});let B=setTimeout(function(){K||(K=!0,k(0),z())},_)})}function Gr(o,c,_,m,p){let y=de[m];if(!(c===1&&_===9||c===6&&_===1))return console.warn(`Unsupported socket option: ${c}, ${_}, ${y}`),-1;let T=qe.getAllWebSockets(o)[0];return T?(T.setSocketOpt(c,_,m),0):-1}function xr(o,c){return qe.shutdownSocket(o,c)}function ke(o){try{return o()}catch(c){ue(c)}}var Te={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(o){var c=Te.callStackNameToId[o];return c===void 0&&(c=Te.callStackId++,Te.callStackNameToId[o]=c,Te.callStackIdToName[c]=o),c},instrumentWasmImports:function(o){var c=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(m=>m.split(".")[1]);for(var _ in o)(function(m){var p=o[m],y=p.sig;if(typeof p=="function")var E=c.indexOf(m)>=0||m.startsWith("__asyncjs__")})(_)},instrumentWasmExports:function(o){var c={};for(var _ in o)(function(m){var p=o[m];typeof p=="function"?c[m]=function(){Te.exportCallStack.push(m);try{return p.apply(null,arguments)}finally{if(!Ce){var y=Te.exportCallStack.pop();Ne(y===m),Te.maybeStopUnwind()}}}:c[m]=p})(_);return c},maybeStopUnwind:function(){Te.currData&&Te.state===Te.State.Unwinding&&Te.exportCallStack.length===0&&(Te.state=Te.State.Normal,Bt(),ke(Tn),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((o,c)=>{Te.asyncPromiseHandlers={resolve:o,reject:c}})},allocateData:function(){var o=Ur(12+Te.StackSize);return Te.setDataHeader(o,o+12,Te.StackSize),Te.setDataRewindFunc(o),o},setDataHeader:function(o,c,_){h[o>>2]=c,h[o+4>>2]=c+_},setDataRewindFunc:function(o){var c=Te.exportCallStack[0],_=Te.getCallStackId(c);h[o+8>>2]=_},getDataRewindFunc:function(o){var c=h[o+8>>2],_=Te.callStackIdToName[c],m=l.asm[_];return m},doRewind:function(o){var c=Te.getDataRewindFunc(o);return xt(),c()},handleSleep:function(o){if(!Ce){if(Te.state===Te.State.Normal){var c=!1,_=!1;o(m=>{if(!Ce&&(Te.handleSleepReturnValue=m||0,c=!0,!!_)){Te.state=Te.State.Rewinding,ke(()=>Cn(Te.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var p,y=!1;try{p=Te.doRewind(Te.currData)}catch(b){p=b,y=!0}var E=!1;if(!Te.currData){var S=Te.asyncPromiseHandlers;S&&(Te.asyncPromiseHandlers=null,(y?S.reject:S.resolve)(p),E=!0)}if(y&&!E)throw p}}),_=!0,c||(Te.state=Te.State.Unwinding,Te.currData=Te.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),ke(()=>Nn(Te.currData)))}else Te.state===Te.State.Rewinding?(Te.state=Te.State.Normal,ke(Ln),kt(Te.currData),Te.currData=null,Te.sleepCallbacks.forEach(m=>jr(m))):ue("invalid state: "+Te.state);return Te.handleSleepReturnValue}},handleAsync:function(o){return Te.handleSleep(c=>{o().then(c)})}};function an(o){var c=l["_"+o];return c}function On(o,c,_,m,p){var y={string:K=>{var B=0;if(K!=null&&K!==0){var x=(K.length<<2)+1;B=Qr(x),Ae(K,B,x)}return B},array:K=>{var B=Qr(K.length);return ht(K,B),B}};function E(K){return c==="string"?ne(K):c==="boolean"?!!K:K}var S=an(o),b=[],k=0;if(m)for(var D=0;D<m.length;D++){var T=y[_[D]];T?(k===0&&(k=He()),b[D]=T(m[D])):b[D]=m[D]}var C=Te.currData,A=S.apply(null,b);function I(K){return xt(),k!==0&&ur(k),E(K)}Bt();var z=p&&p.async;return Te.currData!=C?Te.whenDone().then(I):(A=I(A),z?Promise.resolve(A):A)}var sn=function(o,c,_,m){o||(o=this),this.parent=o,this.mount=o.mount,this.mounted=null,this.id=e.nextInode++,this.name=c,this.mode=_,this.node_ops={},this.stream_ops={},this.rdev=m},$t=365,gn=146;Object.defineProperties(sn.prototype,{read:{get:function(){return(this.mode&$t)===$t},set:function(o){o?this.mode|=$t:this.mode&=~$t}},write:{get:function(){return(this.mode&gn)===gn},set:function(o){o?this.mode|=gn:this.mode&=~gn}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=sn,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Pn={m:Jn,_a:Qn,Za:no,Ya:oo,Xa:io,Wa:ao,O:so,Va:uo,Ua:fo,Ta:co,Sa:lo,V:_o,Ra:vo,Qa:mo,N:po,p:rn,Pa:ho,Oa:yo,U:wo,Na:Eo,Ma:go,La:So,Ka:bo,Ja:ko,M:Do,Ia:Oo,Ha:No,Ga:To,Fa:se,x:Co,Ea:Fo,Da:Ao,Ca:Po,Ba:Ro,Aa:Mo,L:Lo,za:Io,K:Uo,ya:Bo,xa:xo,wa:Br,E:Ho,va:tn,qa:zo,pa:Wo,oa:jo,na:qo,ma:Vo,la:Ko,ka:Go,ja:Xo,ia:nn,ha:$o,ga:It,l:on,C:Jo,fa:Qo,B:Ut,ea:ei,da:ri,ca:ni,ua:oi,ta:ii,r:gt,t:ai,J:si,I:fi,T:ci,sa:li,D:An,ba:Dn,aa:di,$:_i,H:St,_:zt,w:Wt,Z:Nr,Y:Ue,i:In,c:Fi,b:Ti,f:Ni,h:d,q:s,s:Di,v:n,G:r,e:kn,a:Oi,d:Ci,A:t,g:Ai,k:w,n:g,j:i,X:f,z:a,W:Er,S:fr,ra:Et,F:be,R:X,Q:Fe,u:Xt,y:ie,o:Gr,P:xr},bt=Zn(),sr=l.___wasm_call_ctors=function(){return(sr=l.___wasm_call_ctors=l.asm.ab).apply(null,arguments)},qr=l._wasm_popen=function(){return(qr=l._wasm_popen=l.asm.bb).apply(null,arguments)},Qt=l.___errno_location=function(){return(Qt=l.___errno_location=l.asm.cb).apply(null,arguments)},er=l._wasm_pclose=function(){return(er=l._wasm_pclose=l.asm.db).apply(null,arguments)},qt=l._php_pollfd_for=function(){return(qt=l._php_pollfd_for=l.asm.eb).apply(null,arguments)},Zr=l._wasm_select=function(){return(Zr=l._wasm_select=l.asm.fb).apply(null,arguments)},kr=l._wasm_add_cli_arg=function(){return(kr=l._wasm_add_cli_arg=l.asm.gb).apply(null,arguments)},Ur=l._malloc=function(){return(Ur=l._malloc=l.asm.hb).apply(null,arguments)},nt=l._run_cli=function(){return(nt=l._run_cli=l.asm.ib).apply(null,arguments)},Zt=l._memcpy=function(){return(Zt=l._memcpy=l.asm.jb).apply(null,arguments)},kt=l._free=function(){return(kt=l._free=l.asm.kb).apply(null,arguments)},mn=l._fflush=function(){return(mn=l._fflush=l.asm.mb).apply(null,arguments)},un=l._htons=function(){return(un=l._htons=l.asm.nb).apply(null,arguments)},fn=l._ntohs=function(){return(fn=l._ntohs=l.asm.ob).apply(null,arguments)},Sn=l._htonl=function(){return(Sn=l._htonl=l.asm.pb).apply(null,arguments)},vi=l._wasm_set_phpini_path=function(){return(vi=l._wasm_set_phpini_path=l.asm.qb).apply(null,arguments)},mi=l._wasm_set_phpini_entries=function(){return(mi=l._wasm_set_phpini_entries=l.asm.rb).apply(null,arguments)},pi=l._wasm_add_SERVER_entry=function(){return(pi=l._wasm_add_SERVER_entry=l.asm.sb).apply(null,arguments)},hi=l._wasm_add_uploaded_file=function(){return(hi=l._wasm_add_uploaded_file=l.asm.tb).apply(null,arguments)},yi=l._wasm_set_query_string=function(){return(yi=l._wasm_set_query_string=l.asm.ub).apply(null,arguments)},wi=l._wasm_set_path_translated=function(){return(wi=l._wasm_set_path_translated=l.asm.vb).apply(null,arguments)},Ei=l._wasm_set_skip_shebang=function(){return(Ei=l._wasm_set_skip_shebang=l.asm.wb).apply(null,arguments)},gi=l._wasm_set_request_uri=function(){return(gi=l._wasm_set_request_uri=l.asm.xb).apply(null,arguments)},Si=l._wasm_set_request_method=function(){return(Si=l._wasm_set_request_method=l.asm.yb).apply(null,arguments)},bi=l._wasm_set_request_host=function(){return(bi=l._wasm_set_request_host=l.asm.zb).apply(null,arguments)},ki=l._wasm_set_content_type=function(){return(ki=l._wasm_set_content_type=l.asm.Ab).apply(null,arguments)},Rn=l._wasm_set_request_body=function(){return(Rn=l._wasm_set_request_body=l.asm.Bb).apply(null,arguments)},Mn=l._wasm_set_content_length=function(){return(Mn=l._wasm_set_content_length=l.asm.Cb).apply(null,arguments)},Sr=l._wasm_set_cookies=function(){return(Sr=l._wasm_set_cookies=l.asm.Db).apply(null,arguments)},gr=l._wasm_set_php_code=function(){return(gr=l._wasm_set_php_code=l.asm.Eb).apply(null,arguments)},we=l._wasm_set_request_port=function(){return(we=l._wasm_set_request_port=l.asm.Fb).apply(null,arguments)},Oe=l._phpwasm_init_uploaded_files_hash=function(){return(Oe=l._phpwasm_init_uploaded_files_hash=l.asm.Gb).apply(null,arguments)},ye=l._phpwasm_register_uploaded_file=function(){return(ye=l._phpwasm_register_uploaded_file=l.asm.Hb).apply(null,arguments)},tr=l._phpwasm_destroy_uploaded_files_hash=function(){return(tr=l._phpwasm_destroy_uploaded_files_hash=l.asm.Ib).apply(null,arguments)},De=l._wasm_sapi_handle_request=function(){return(De=l._wasm_sapi_handle_request=l.asm.Jb).apply(null,arguments)},xe=l._php_wasm_init=function(){return(xe=l._php_wasm_init=l.asm.Kb).apply(null,arguments)},Ie=l.___funcs_on_exit=function(){return(Ie=l.___funcs_on_exit=l.asm.Lb).apply(null,arguments)},ar=l._emscripten_builtin_memalign=function(){return(ar=l._emscripten_builtin_memalign=l.asm.Mb).apply(null,arguments)},Be=l._setThrew=function(){return(Be=l._setThrew=l.asm.Nb).apply(null,arguments)},He=l.stackSave=function(){return(He=l.stackSave=l.asm.Ob).apply(null,arguments)},ur=l.stackRestore=function(){return(ur=l.stackRestore=l.asm.Pb).apply(null,arguments)},Qr=l.stackAlloc=function(){return(Qr=l.stackAlloc=l.asm.Qb).apply(null,arguments)},ot=l.dynCall_vii=function(){return(ot=l.dynCall_vii=l.asm.Rb).apply(null,arguments)},it=l.dynCall_vi=function(){return(it=l.dynCall_vi=l.asm.Sb).apply(null,arguments)},Dt=l.dynCall_iii=function(){return(Dt=l.dynCall_iii=l.asm.Tb).apply(null,arguments)},Ot=l.dynCall_viiiii=function(){return(Ot=l.dynCall_viiiii=l.asm.Ub).apply(null,arguments)},Nt=l.dynCall_iiii=function(){return(Nt=l.dynCall_iiii=l.asm.Vb).apply(null,arguments)},Tt=l.dynCall_ii=function(){return(Tt=l.dynCall_ii=l.asm.Wb).apply(null,arguments)},Ct=l.dynCall_iiiii=function(){return(Ct=l.dynCall_iiiii=l.asm.Xb).apply(null,arguments)},Ft=l.dynCall_iiiiii=function(){return(Ft=l.dynCall_iiiiii=l.asm.Yb).apply(null,arguments)},At=l.dynCall_viii=function(){return(At=l.dynCall_viii=l.asm.Zb).apply(null,arguments)},Pt=l.dynCall_v=function(){return(Pt=l.dynCall_v=l.asm._b).apply(null,arguments)},Rt=l.dynCall_i=function(){return(Rt=l.dynCall_i=l.asm.$b).apply(null,arguments)},Mt=l.dynCall_viiii=function(){return(Mt=l.dynCall_viiii=l.asm.ac).apply(null,arguments)},Lt=l.dynCall_iiiiiii=function(){return(Lt=l.dynCall_iiiiiii=l.asm.bc).apply(null,arguments)},Vt=l.dynCall_iiiiiiiiii=function(){return(Vt=l.dynCall_iiiiiiiiii=l.asm.cc).apply(null,arguments)},cn=l.dynCall_viiiiiiiii=function(){return(cn=l.dynCall_viiiiiiiii=l.asm.dc).apply(null,arguments)},ln=l.dynCall_viiiiiii=function(){return(ln=l.dynCall_viiiiiii=l.asm.ec).apply(null,arguments)},pn=l.dynCall_viiiiii=function(){return(pn=l.dynCall_viiiiii=l.asm.fc).apply(null,arguments)},hn=l.dynCall_iiiiiiii=function(){return(hn=l.dynCall_iiiiiiii=l.asm.gc).apply(null,arguments)},bn=l.dynCall_viidii=function(){return(bn=l.dynCall_viidii=l.asm.hc).apply(null,arguments)},Nn=l._asyncify_start_unwind=function(){return(Nn=l._asyncify_start_unwind=l.asm.ic).apply(null,arguments)},Tn=l._asyncify_stop_unwind=function(){return(Tn=l._asyncify_stop_unwind=l.asm.jc).apply(null,arguments)},Cn=l._asyncify_start_rewind=function(){return(Cn=l._asyncify_start_rewind=l.asm.kc).apply(null,arguments)},Ln=l._asyncify_stop_rewind=function(){return(Ln=l._asyncify_stop_rewind=l.asm.lc).apply(null,arguments)};function Di(o,c,_,m,p,y,E){var S=He();try{return Lt(o,c,_,m,p,y,E)}catch(b){if(ur(S),b!==b+0)throw b;Be(1,0)}}function Oi(o,c){var _=He();try{it(o,c)}catch(m){if(ur(_),m!==m+0)throw m;Be(1,0)}}function Ni(o,c,_,m){var p=He();try{return Nt(o,c,_,m)}catch(y){if(ur(p),y!==y+0)throw y;Be(1,0)}}function Ti(o,c,_){var m=He();try{return Dt(o,c,_)}catch(p){if(ur(m),p!==p+0)throw p;Be(1,0)}}function Ci(o,c,_){var m=He();try{ot(o,c,_)}catch(p){if(ur(m),p!==p+0)throw p;Be(1,0)}}function Fi(o,c){var _=He();try{return Tt(o,c)}catch(m){if(ur(_),m!==m+0)throw m;Be(1,0)}}function Ai(o,c,_,m){var p=He();try{At(o,c,_,m)}catch(y){if(ur(p),y!==y+0)throw y;Be(1,0)}}function kn(o){var c=He();try{Pt(o)}catch(_){if(ur(c),_!==_+0)throw _;Be(1,0)}}function In(o){var c=He();try{return Rt(o)}catch(_){if(ur(c),_!==_+0)throw _;Be(1,0)}}function w(o,c,_,m,p){var y=He();try{Mt(o,c,_,m,p)}catch(E){if(ur(y),E!==E+0)throw E;Be(1,0)}}function g(o,c,_,m,p,y){var E=He();try{Ot(o,c,_,m,p,y)}catch(S){if(ur(E),S!==S+0)throw S;Be(1,0)}}function s(o,c,_,m,p,y){var E=He();try{return Ft(o,c,_,m,p,y)}catch(S){if(ur(E),S!==S+0)throw S;Be(1,0)}}function d(o,c,_,m,p){var y=He();try{return Ct(o,c,_,m,p)}catch(E){if(ur(y),E!==E+0)throw E;Be(1,0)}}function r(o,c,_,m,p,y,E,S,b,k){var D=He();try{return Vt(o,c,_,m,p,y,E,S,b,k)}catch(T){if(ur(D),T!==T+0)throw T;Be(1,0)}}function i(o,c,_,m,p,y,E){var S=He();try{pn(o,c,_,m,p,y,E)}catch(b){if(ur(S),b!==b+0)throw b;Be(1,0)}}function t(o,c,_,m,p,y){var E=He();try{bn(o,c,_,m,p,y)}catch(S){if(ur(E),S!==S+0)throw S;Be(1,0)}}function a(o,c,_,m,p,y,E,S,b,k){var D=He();try{cn(o,c,_,m,p,y,E,S,b,k)}catch(T){if(ur(D),T!==T+0)throw T;Be(1,0)}}function n(o,c,_,m,p,y,E,S){var b=He();try{return hn(o,c,_,m,p,y,E,S)}catch(k){if(ur(b),k!==k+0)throw k;Be(1,0)}}function f(o,c,_,m,p,y,E,S){var b=He();try{ln(o,c,_,m,p,y,E,S)}catch(k){if(ur(b),k!==k+0)throw k;Be(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=On,l.FS=e;var v;$e=function o(){v||u(),v||($e=o)};function u(o){if(o=o||Y,Re>0||(Wn(),Re>0))return;function c(){v||(v=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),c()},1)):c()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return u(),O}var Mc,Cu,Au=Ki(()=>{"use strict";Mc=10290895,Cu=__dirname+"/php_8_2.wasm"});var Ru={};Hi(Ru,{dependenciesTotalSize:()=>Ic,dependencyFilename:()=>Pu,init:()=>Uc});function Uc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(u,o)=>{throw o},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(u){return l.locateFile?l.locateFile(u,ae):ae+u}var Ye,nr,Me;function Lr(u){if(u instanceof mr)return;ce("exiting due to exception: "+u)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(u,o)=>(wr(),u=Le.normalize(u),V.readFileSync(u,o?void 0:"utf8")),Me=u=>{var o=Ye(u,!0);return o.buffer||(o=new Uint8Array(o)),o},nr=(u,o,c)=>{wr(),u=Le.normalize(u),V.readFile(u,function(_,m){_?c(_):o(m.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(u){if(!(u instanceof mr))throw u}),process.on("unhandledRejection",function(u){throw u}),te=(u,o)=>{if(_r())throw process.exitCode=u,o;Lr(o),process.exit(u)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(u,o){u||ue(o)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(u,o,c){for(var _=o+c,m=o;u[m]&&!(m>=_);)++m;if(m-o>16&&u.buffer&&at)return at.decode(u.subarray(o,m));for(var p="";o<m;){var y=u[o++];if(!(y&128)){p+=String.fromCharCode(y);continue}var E=u[o++]&63;if((y&224)==192){p+=String.fromCharCode((y&31)<<6|E);continue}var S=u[o++]&63;if((y&240)==224?y=(y&15)<<12|E<<6|S:y=(y&7)<<18|E<<12|S<<6|u[o++]&63,y<65536)p+=String.fromCharCode(y);else{var b=y-65536;p+=String.fromCharCode(55296|b>>10,56320|b&1023)}}return p}function ne(u,o){return u?We(de,u,o):""}function Xe(u,o,c,_){if(!(_>0))return 0;for(var m=c,p=c+_-1,y=0;y<u.length;++y){var E=u.charCodeAt(y);if(E>=55296&&E<=57343){var S=u.charCodeAt(++y);E=65536+((E&1023)<<10)|S&1023}if(E<=127){if(c>=p)break;o[c++]=E}else if(E<=2047){if(c+1>=p)break;o[c++]=192|E>>6,o[c++]=128|E&63}else if(E<=65535){if(c+2>=p)break;o[c++]=224|E>>12,o[c++]=128|E>>6&63,o[c++]=128|E&63}else{if(c+3>=p)break;o[c++]=240|E>>18,o[c++]=128|E>>12&63,o[c++]=128|E>>6&63,o[c++]=128|E&63}}return o[c]=0,c-m}function Ae(u,o,c){return Xe(u,de,o,c)}function Pe(u){for(var o=0,c=0;c<u.length;++c){var _=u.charCodeAt(c);_<=127?o++:_<=2047?o+=2:_>=55296&&_<=57343?(o+=4,++c):o+=3}return o}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(u){Cr=u,l.HEAP8=$=new Int8Array(u),l.HEAP16=Ee=new Int16Array(u),l.HEAP32=h=new Int32Array(u),l.HEAPU8=de=new Uint8Array(u),l.HEAPU16=st=new Uint16Array(u),l.HEAPU32=H=new Uint32Array(u),l.HEAPF32=Bn=new Float32Array(u),l.HEAPF64=ut=new Float64Array(u)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),pe.root=e.mount(pe,{},null),pr(lt)}function Yn(){xe(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(u){ct.unshift(u)}function Kn(u){lt.unshift(u)}function Gn(u){dt.unshift(u)}var Re=0,Ar=null,$e=null;function Qi(u){return u}function vr(u){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(u){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var o=$e;$e=null,o()}}function ue(u){l.onAbort&&l.onAbort(u),u="Aborted("+u+")",ce(u),Ce=!0,Ge=1,u+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(u);throw o}var Xn="data:application/octet-stream;base64,";function vt(u){return u.startsWith(Xn)}var _e;_e=Pu,vt(_e)||(_e=cr(_e));function mt(u){try{if(u==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(u);throw"both async and sync fetching of the wasm failed"}catch(o){ue(o)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(u){if(!u.ok)throw"failed to load wasm binary file at '"+_e+"'";return u.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var u={a:gn};function o(y,E){var S=y.exports;S=ke.instrumentWasmExports(S),l.asm=S,or=l.asm._a,ft(or.buffer),xn=l.asm.kb,Kn(l.asm.$a),Ze("wasm-instantiate")}vr("wasm-instantiate");function c(y){o(y.instance)}function _(y){return $n().then(function(E){return WebAssembly.instantiate(E,u)}).then(function(E){return E}).then(y,function(E){ce("failed to asynchronously prepare wasm: "+E),ue(E)})}function m(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(y){var E=WebAssembly.instantiateStreaming(y,u);return E.then(c,function(S){return ce("wasm streaming compile failed: "+S),ce("falling back to ArrayBuffer instantiation"),_(c)})}):_(c)}if(l.instantiateWasm)try{var p=l.instantiateWasm(u,o);return p=ke.instrumentWasmExports(p),p}catch(y){return ce("Module.instantiateWasm callback failed with error: "+y),!1}return m(),{}}var P,q;function mr(u){this.name="ExitStatus",this.message="Program terminated with exit("+u+")",this.status=u}function pr(u){for(;u.length>0;)u.shift()(l)}function pt(u){if(u instanceof mr||u=="unwind")return Ge;te(1,u)}function ht(u,o){$.set(u,o)}function Jn(u,o,c,_){ue("Assertion failed: "+ne(u)+", at: "+[o?ne(o):"unknown filename",c,_?ne(_):"unknown function"])}function Qn(u,o){(function(c){ot.apply(null,[u,c])})(o)}var U={isAbs:u=>u.charAt(0)==="/",splitPath:u=>{var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return o.exec(u).slice(1)},normalizeArray:(u,o)=>{for(var c=0,_=u.length-1;_>=0;_--){var m=u[_];m==="."?u.splice(_,1):m===".."?(u.splice(_,1),c++):c&&(u.splice(_,1),c--)}if(o)for(;c;c--)u.unshift("..");return u},normalize:u=>{var o=U.isAbs(u),c=u.substr(-1)==="/";return u=U.normalizeArray(u.split("/").filter(_=>!!_),!o).join("/"),!u&&!o&&(u="."),u&&c&&(u+="/"),(o?"/":"")+u},dirname:u=>{var o=U.splitPath(u),c=o[0],_=o[1];return!c&&!_?".":(_&&(_=_.substr(0,_.length-1)),c+_)},basename:u=>{if(u==="/")return"/";u=U.normalize(u),u=u.replace(/\/$/,"");var o=u.lastIndexOf("/");return o===-1?u:u.substr(o+1)},join:function(){var u=Array.prototype.slice.call(arguments);return U.normalize(u.join("/"))},join2:(u,o)=>U.normalize(u+"/"+o)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var u=new Uint8Array(1);return()=>(crypto.getRandomValues(u),u[0])}else if(Z)try{var o=require("crypto");return()=>o.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var u="",o=!1,c=arguments.length-1;c>=-1&&!o;c--){var _=c>=0?arguments[c]:e.cwd();if(typeof _!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!_)return"";u=_+"/"+u,o=U.isAbs(_)}return u=U.normalizeArray(u.split("/").filter(m=>!!m),!o).join("/"),(o?"/":"")+u||"."},relative:(u,o)=>{u=ge.resolve(u).substr(1),o=ge.resolve(o).substr(1);function c(b){for(var k=0;k<b.length&&b[k]==="";k++);for(var D=b.length-1;D>=0&&b[D]==="";D--);return k>D?[]:b.slice(k,D-k+1)}for(var _=c(u.split("/")),m=c(o.split("/")),p=Math.min(_.length,m.length),y=p,E=0;E<p;E++)if(_[E]!==m[E]){y=E;break}for(var S=[],E=y;E<_.length;E++)S.push("..");return S=S.concat(m.slice(y)),S.join("/")}};function Je(u,o,c){var _=c>0?c:Pe(u)+1,m=new Array(_),p=Xe(u,m,0,m.length);return o&&(m.length=p),m}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(u,o){Se.ttys[u]={input:[],output:[],ops:o},e.registerDevice(u,Se.stream_ops)},stream_ops:{open:function(u){var o=Se.ttys[u.node.rdev];if(!o)throw new e.ErrnoError(43);u.tty=o,u.seekable=!1},close:function(u){u.tty.ops.fsync(u.tty)},fsync:function(u){u.tty.ops.fsync(u.tty)},read:function(u,o,c,_,m){if(!u.tty||!u.tty.ops.get_char)throw new e.ErrnoError(60);for(var p=0,y=0;y<_;y++){var E;try{E=u.tty.ops.get_char(u.tty)}catch{throw new e.ErrnoError(29)}if(E===void 0&&p===0)throw new e.ErrnoError(6);if(E==null)break;p++,o[c+y]=E}return p&&(u.node.timestamp=Date.now()),p},write:function(u,o,c,_,m){if(!u.tty||!u.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var p=0;p<_;p++)u.tty.ops.put_char(u.tty,o[c+p])}catch{throw new e.ErrnoError(29)}return _&&(u.node.timestamp=Date.now()),p}},default_tty_ops:{get_char:function(u){if(!u.input.length){var o=null;if(Z){var c=256,_=Buffer.alloc(c),m=0;try{m=V.readSync(process.stdin.fd,_,0,c,-1)}catch(p){if(p.toString().includes("EOF"))m=0;else throw p}m>0?o=_.slice(0,m).toString("utf-8"):o=null}else typeof window<"u"&&typeof window.prompt=="function"?(o=window.prompt("Input: "),o!==null&&(o+=`
|
|
10
|
+
`},"%p":function(x){return x.tm_hour>=0&&x.tm_hour<12?"AM":"PM"},"%S":function(x){return C(x.tm_sec,2)},"%t":function(){return" "},"%u":function(x){return x.tm_wday||7},"%U":function(x){var G=x.tm_yday+7-x.tm_wday;return C(Math.floor(G/7),2)},"%V":function(x){var G=Math.floor((x.tm_yday+7-(x.tm_wday+6)%7)/7);if((x.tm_wday+371-x.tm_yday-2)%7<=2&&G++,G){if(G==53){var oe=(x.tm_wday+371-x.tm_yday)%7;oe!=4&&(oe!=3||!Tr(x.tm_year))&&(G=1)}}else{G=52;var re=(x.tm_wday+7-x.tm_yday-1)%7;(re==4||re==5&&Tr(x.tm_year%400-1))&&G++}return C(G,2)},"%w":function(x){return x.tm_wday},"%W":function(x){var G=x.tm_yday+7-(x.tm_wday+6)%7;return C(Math.floor(G/7),2)},"%y":function(x){return(x.tm_year+1900).toString().substring(2)},"%Y":function(x){return x.tm_year+1900},"%z":function(x){var G=x.tm_gmtoff,re=G>=0;return G=Math.abs(G)/60,G=G/60*100+G%60,(re?"+":"-")+("0000"+G).slice(-4)},"%Z":function(x){return x.tm_zone},"%%":function(){return"%"}};E=E.replace(/%%/g,"\0\0");for(var b in K)E.includes(b)&&(E=E.replace(new RegExp(b,"g"),K[b](y)));E=E.replace(/\0\0/g,"%");var B=Je(E,!1);return B.length>c?0:(ht(B,o),B.length-1)}function X(o,c,_){for(var m=ne(c),p="\\!@#$^&*()+=-[]/{}|:<>?,.",y=0,E=p.length;y<E;++y)m=m.replace(new RegExp("\\"+p[y],"g"),"\\"+p[y]);var S={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var b in S)m=m.replace(b,S[b]);var k={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},D={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},T={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},C={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var A in k)m=m.replace(A,"("+A+k[A]+")");for(var I=[],y=m.indexOf("%");y>=0;y=m.indexOf("%"))I.push(m[y+1]),m=m.replace(new RegExp("\\%"+m[y+1],"g"),"");var z=new RegExp("^"+m,"i").exec(ne(o));function K(){function Pi(Bi,ua,bs){return typeof Bi!="number"||isNaN(Bi)?ua:Bi>=ua?Bi<=bs?Bi:bs:ua}return{year:Pi(h[_+20>>2]+1900,1970,9999),month:Pi(h[_+16>>2],0,11),day:Pi(h[_+12>>2],1,31),hour:Pi(h[_+8>>2],0,23),min:Pi(h[_+4>>2],0,59),sec:Pi(h[_>>2],0,59)}}if(z){var B=K(),x,G=Pi=>{var Bi=I.indexOf(Pi);if(Bi>=0)return z[Bi+1]};if((x=G("S"))&&(B.sec=Q(x)),(x=G("M"))&&(B.min=Q(x)),x=G("H"))B.hour=Q(x);else if(x=G("I")){var re=Q(x);(x=G("p"))&&(re+=x.toUpperCase()[0]==="P"?12:0),B.hour=re}if(x=G("Y"))B.year=Q(x);else if(x=G("y")){var oe=Q(x);(x=G("C"))?oe+=Q(x)*100:oe+=oe<69?2e3:1900,B.year=oe}if((x=G("m"))?B.month=Q(x)-1:(x=G("b"))&&(B.month=D[x.substring(0,3).toUpperCase()]||0),x=G("d"))B.day=Q(x);else if(x=G("j"))for(var le=Q(x),he=Tr(B.year),ze=0;ze<12;++ze){var Ve=Yr(he?jt:Yt,ze-1);le<=Ve+(he?jt:Yt)[ze]&&(B.day=le-Ve)}else if(x=G("a")){var Dr=x.substring(0,3).toUpperCase();if(x=G("U")){var yr=T[Dr],Vr=Q(x),Kr=new Date(B.year,0,1),Jt;Kr.getDay()===0?Jt=Gt(Kr,yr+7*(Vr-1)):Jt=Gt(Kr,7-Kr.getDay()+yr+7*(Vr-1)),B.day=Jt.getDate(),B.month=Jt.getMonth()}else if(x=G("W")){var yr=C[Dr],Vr=Q(x),Kr=new Date(B.year,0,1),Jt;Kr.getDay()===1?Jt=Gt(Kr,yr+7*(Vr-1)):Jt=Gt(Kr,7-Kr.getDay()+1+yr+7*(Vr-1)),B.day=Jt.getDate(),B.month=Jt.getMonth()}}var dn=new Date(B.year,B.month,B.day,B.hour,B.min,B.sec,0);return h[_>>2]=dn.getSeconds(),h[_+4>>2]=dn.getMinutes(),h[_+8>>2]=dn.getHours(),h[_+12>>2]=dn.getDate(),h[_+16>>2]=dn.getMonth(),h[_+20>>2]=dn.getFullYear()-1900,h[_+24>>2]=dn.getDay(),h[_+28>>2]=Yr(Tr(dn.getFullYear())?jt:Yt,dn.getMonth()-1)+dn.getDate()-1,h[_+32>>2]=0,o+Je(z[0]).length-1}return 0}function Fe(){ce("missing function: swapcontext"),ue(-1)}function Xt(o){return qe.shutdownSocket(o,2)}function ie(o,c,_){if(typeof Te>"u")return 0;let m=1,p=2,y=4,E=8,S=16,b=32;return Te.handleSleep(k=>{let D=ve(o);if(!D){k(0);return}let T=[],C=new Set;if(c&m||c&p){if(D.server){for(let x of D.pending)if((x.recv_queue||[]).length>0){k(1);return}}else if((D.recv_queue||[]).length>0){k(1);return}}let A=qe.getAllWebSockets(D);if(!A.length){k(0);return}for(let x of A)(c&m||c&p)&&(T.push(qe.awaitData(x)),C.add("POLLIN")),c&y&&(T.push(qe.awaitConnection(x)),C.add("POLLOUT")),c&S&&(T.push(qe.awaitClose(x)),C.add("POLLHUP")),(c&E||c&b)&&(T.push(qe.awaitError(x)),C.add("POLLERR"));if(T.length===0){console.warn("Unsupported poll event "+c+", defaulting to setTimeout()."),setTimeout(function(){k(0)},_);return}let I=T.map(([x])=>x),z=()=>T.forEach(([,x])=>x()),K=!1;Promise.race(I).then(function(x){K||(K=!0,k(1),clearTimeout(B),z())});let B=setTimeout(function(){K||(K=!0,k(0),z())},_)})}function Gr(o,c,_,m,p){let y=de[m];if(!(c===1&&_===9||c===6&&_===1))return console.warn(`Unsupported socket option: ${c}, ${_}, ${y}`),-1;let T=qe.getAllWebSockets(o)[0];return T?(T.setSocketOpt(c,_,m),0):-1}function xr(o,c){return qe.shutdownSocket(o,c)}function ke(o){try{return o()}catch(c){ue(c)}}var Te={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(o){var c=Te.callStackNameToId[o];return c===void 0&&(c=Te.callStackId++,Te.callStackNameToId[o]=c,Te.callStackIdToName[c]=o),c},instrumentWasmImports:function(o){var c=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(m=>m.split(".")[1]);for(var _ in o)(function(m){var p=o[m],y=p.sig;if(typeof p=="function")var E=c.indexOf(m)>=0||m.startsWith("__asyncjs__")})(_)},instrumentWasmExports:function(o){var c={};for(var _ in o)(function(m){var p=o[m];typeof p=="function"?c[m]=function(){Te.exportCallStack.push(m);try{return p.apply(null,arguments)}finally{if(!Ce){var y=Te.exportCallStack.pop();Ne(y===m),Te.maybeStopUnwind()}}}:c[m]=p})(_);return c},maybeStopUnwind:function(){Te.currData&&Te.state===Te.State.Unwinding&&Te.exportCallStack.length===0&&(Te.state=Te.State.Normal,Bt(),ke(Tn),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((o,c)=>{Te.asyncPromiseHandlers={resolve:o,reject:c}})},allocateData:function(){var o=Ur(12+Te.StackSize);return Te.setDataHeader(o,o+12,Te.StackSize),Te.setDataRewindFunc(o),o},setDataHeader:function(o,c,_){h[o>>2]=c,h[o+4>>2]=c+_},setDataRewindFunc:function(o){var c=Te.exportCallStack[0],_=Te.getCallStackId(c);h[o+8>>2]=_},getDataRewindFunc:function(o){var c=h[o+8>>2],_=Te.callStackIdToName[c],m=l.asm[_];return m},doRewind:function(o){var c=Te.getDataRewindFunc(o);return xt(),c()},handleSleep:function(o){if(!Ce){if(Te.state===Te.State.Normal){var c=!1,_=!1;o(m=>{if(!Ce&&(Te.handleSleepReturnValue=m||0,c=!0,!!_)){Te.state=Te.State.Rewinding,ke(()=>Cn(Te.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var p,y=!1;try{p=Te.doRewind(Te.currData)}catch(b){p=b,y=!0}var E=!1;if(!Te.currData){var S=Te.asyncPromiseHandlers;S&&(Te.asyncPromiseHandlers=null,(y?S.reject:S.resolve)(p),E=!0)}if(y&&!E)throw p}}),_=!0,c||(Te.state=Te.State.Unwinding,Te.currData=Te.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),ke(()=>Nn(Te.currData)))}else Te.state===Te.State.Rewinding?(Te.state=Te.State.Normal,ke(Ln),kt(Te.currData),Te.currData=null,Te.sleepCallbacks.forEach(m=>jr(m))):ue("invalid state: "+Te.state);return Te.handleSleepReturnValue}},handleAsync:function(o){return Te.handleSleep(c=>{o().then(c)})}};function an(o){var c=l["_"+o];return c}function On(o,c,_,m,p){var y={string:K=>{var B=0;if(K!=null&&K!==0){var x=(K.length<<2)+1;B=Qr(x),Ae(K,B,x)}return B},array:K=>{var B=Qr(K.length);return ht(K,B),B}};function E(K){return c==="string"?ne(K):c==="boolean"?!!K:K}var S=an(o),b=[],k=0;if(m)for(var D=0;D<m.length;D++){var T=y[_[D]];T?(k===0&&(k=He()),b[D]=T(m[D])):b[D]=m[D]}var C=Te.currData,A=S.apply(null,b);function I(K){return xt(),k!==0&&ur(k),E(K)}Bt();var z=p&&p.async;return Te.currData!=C?Te.whenDone().then(I):(A=I(A),z?Promise.resolve(A):A)}var sn=function(o,c,_,m){o||(o=this),this.parent=o,this.mount=o.mount,this.mounted=null,this.id=e.nextInode++,this.name=c,this.mode=_,this.node_ops={},this.stream_ops={},this.rdev=m},$t=365,gn=146;Object.defineProperties(sn.prototype,{read:{get:function(){return(this.mode&$t)===$t},set:function(o){o?this.mode|=$t:this.mode&=~$t}},write:{get:function(){return(this.mode&gn)===gn},set:function(o){o?this.mode|=gn:this.mode&=~gn}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=sn,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Pn={m:Jn,_a:Qn,Za:no,Ya:oo,Xa:io,Wa:ao,O:so,Va:uo,Ua:fo,Ta:co,Sa:lo,V:_o,Ra:vo,Qa:mo,N:po,p:rn,Pa:ho,Oa:yo,U:wo,Na:Eo,Ma:go,La:So,Ka:bo,Ja:ko,M:Do,Ia:Oo,Ha:No,Ga:To,Fa:se,x:Co,Ea:Fo,Da:Ao,Ca:Po,Ba:Ro,Aa:Mo,L:Lo,za:Io,K:Uo,ya:Bo,xa:xo,wa:Br,E:Ho,va:tn,qa:zo,pa:Wo,oa:jo,na:qo,ma:Vo,la:Ko,ka:Go,ja:Xo,ia:nn,ha:$o,ga:It,l:on,C:Jo,fa:Qo,B:Ut,ea:ei,da:ri,ca:ni,ua:oi,ta:ii,r:gt,t:ai,J:si,I:fi,T:ci,sa:li,D:An,ba:Dn,aa:di,$:_i,H:St,_:zt,w:Wt,Z:Nr,Y:Ue,i:In,c:Fi,b:Ti,f:Ni,h:d,q:s,s:Di,v:n,G:r,e:kn,a:Oi,d:Ci,A:t,g:Ai,k:w,n:g,j:i,X:f,z:a,W:Er,S:fr,ra:Et,F:be,R:X,Q:Fe,u:Xt,y:ie,o:Gr,P:xr},bt=Zn(),sr=l.___wasm_call_ctors=function(){return(sr=l.___wasm_call_ctors=l.asm.ab).apply(null,arguments)},qr=l._wasm_popen=function(){return(qr=l._wasm_popen=l.asm.bb).apply(null,arguments)},Qt=l.___errno_location=function(){return(Qt=l.___errno_location=l.asm.cb).apply(null,arguments)},er=l._wasm_pclose=function(){return(er=l._wasm_pclose=l.asm.db).apply(null,arguments)},qt=l._php_pollfd_for=function(){return(qt=l._php_pollfd_for=l.asm.eb).apply(null,arguments)},Zr=l._wasm_select=function(){return(Zr=l._wasm_select=l.asm.fb).apply(null,arguments)},kr=l._wasm_add_cli_arg=function(){return(kr=l._wasm_add_cli_arg=l.asm.gb).apply(null,arguments)},Ur=l._malloc=function(){return(Ur=l._malloc=l.asm.hb).apply(null,arguments)},nt=l._run_cli=function(){return(nt=l._run_cli=l.asm.ib).apply(null,arguments)},Zt=l._memcpy=function(){return(Zt=l._memcpy=l.asm.jb).apply(null,arguments)},kt=l._free=function(){return(kt=l._free=l.asm.kb).apply(null,arguments)},mn=l._fflush=function(){return(mn=l._fflush=l.asm.mb).apply(null,arguments)},un=l._htons=function(){return(un=l._htons=l.asm.nb).apply(null,arguments)},fn=l._ntohs=function(){return(fn=l._ntohs=l.asm.ob).apply(null,arguments)},Sn=l._htonl=function(){return(Sn=l._htonl=l.asm.pb).apply(null,arguments)},vi=l._wasm_set_phpini_path=function(){return(vi=l._wasm_set_phpini_path=l.asm.qb).apply(null,arguments)},mi=l._wasm_set_phpini_entries=function(){return(mi=l._wasm_set_phpini_entries=l.asm.rb).apply(null,arguments)},pi=l._wasm_add_SERVER_entry=function(){return(pi=l._wasm_add_SERVER_entry=l.asm.sb).apply(null,arguments)},hi=l._wasm_add_uploaded_file=function(){return(hi=l._wasm_add_uploaded_file=l.asm.tb).apply(null,arguments)},yi=l._wasm_set_query_string=function(){return(yi=l._wasm_set_query_string=l.asm.ub).apply(null,arguments)},wi=l._wasm_set_path_translated=function(){return(wi=l._wasm_set_path_translated=l.asm.vb).apply(null,arguments)},Ei=l._wasm_set_skip_shebang=function(){return(Ei=l._wasm_set_skip_shebang=l.asm.wb).apply(null,arguments)},gi=l._wasm_set_request_uri=function(){return(gi=l._wasm_set_request_uri=l.asm.xb).apply(null,arguments)},Si=l._wasm_set_request_method=function(){return(Si=l._wasm_set_request_method=l.asm.yb).apply(null,arguments)},bi=l._wasm_set_request_host=function(){return(bi=l._wasm_set_request_host=l.asm.zb).apply(null,arguments)},ki=l._wasm_set_content_type=function(){return(ki=l._wasm_set_content_type=l.asm.Ab).apply(null,arguments)},Rn=l._wasm_set_request_body=function(){return(Rn=l._wasm_set_request_body=l.asm.Bb).apply(null,arguments)},Mn=l._wasm_set_content_length=function(){return(Mn=l._wasm_set_content_length=l.asm.Cb).apply(null,arguments)},Sr=l._wasm_set_cookies=function(){return(Sr=l._wasm_set_cookies=l.asm.Db).apply(null,arguments)},gr=l._wasm_set_php_code=function(){return(gr=l._wasm_set_php_code=l.asm.Eb).apply(null,arguments)},we=l._wasm_set_request_port=function(){return(we=l._wasm_set_request_port=l.asm.Fb).apply(null,arguments)},Oe=l._phpwasm_init_uploaded_files_hash=function(){return(Oe=l._phpwasm_init_uploaded_files_hash=l.asm.Gb).apply(null,arguments)},ye=l._phpwasm_register_uploaded_file=function(){return(ye=l._phpwasm_register_uploaded_file=l.asm.Hb).apply(null,arguments)},tr=l._phpwasm_destroy_uploaded_files_hash=function(){return(tr=l._phpwasm_destroy_uploaded_files_hash=l.asm.Ib).apply(null,arguments)},De=l._wasm_sapi_handle_request=function(){return(De=l._wasm_sapi_handle_request=l.asm.Jb).apply(null,arguments)},xe=l._php_wasm_init=function(){return(xe=l._php_wasm_init=l.asm.Kb).apply(null,arguments)},Ie=l.___funcs_on_exit=function(){return(Ie=l.___funcs_on_exit=l.asm.Lb).apply(null,arguments)},ar=l._emscripten_builtin_memalign=function(){return(ar=l._emscripten_builtin_memalign=l.asm.Mb).apply(null,arguments)},Be=l._setThrew=function(){return(Be=l._setThrew=l.asm.Nb).apply(null,arguments)},He=l.stackSave=function(){return(He=l.stackSave=l.asm.Ob).apply(null,arguments)},ur=l.stackRestore=function(){return(ur=l.stackRestore=l.asm.Pb).apply(null,arguments)},Qr=l.stackAlloc=function(){return(Qr=l.stackAlloc=l.asm.Qb).apply(null,arguments)},ot=l.dynCall_vii=function(){return(ot=l.dynCall_vii=l.asm.Rb).apply(null,arguments)},it=l.dynCall_vi=function(){return(it=l.dynCall_vi=l.asm.Sb).apply(null,arguments)},Dt=l.dynCall_iii=function(){return(Dt=l.dynCall_iii=l.asm.Tb).apply(null,arguments)},Ot=l.dynCall_viiiii=function(){return(Ot=l.dynCall_viiiii=l.asm.Ub).apply(null,arguments)},Nt=l.dynCall_iiii=function(){return(Nt=l.dynCall_iiii=l.asm.Vb).apply(null,arguments)},Tt=l.dynCall_ii=function(){return(Tt=l.dynCall_ii=l.asm.Wb).apply(null,arguments)},Ct=l.dynCall_iiiii=function(){return(Ct=l.dynCall_iiiii=l.asm.Xb).apply(null,arguments)},Ft=l.dynCall_iiiiii=function(){return(Ft=l.dynCall_iiiiii=l.asm.Yb).apply(null,arguments)},At=l.dynCall_viii=function(){return(At=l.dynCall_viii=l.asm.Zb).apply(null,arguments)},Pt=l.dynCall_v=function(){return(Pt=l.dynCall_v=l.asm._b).apply(null,arguments)},Rt=l.dynCall_i=function(){return(Rt=l.dynCall_i=l.asm.$b).apply(null,arguments)},Mt=l.dynCall_viiii=function(){return(Mt=l.dynCall_viiii=l.asm.ac).apply(null,arguments)},Lt=l.dynCall_iiiiiii=function(){return(Lt=l.dynCall_iiiiiii=l.asm.bc).apply(null,arguments)},Vt=l.dynCall_iiiiiiiiii=function(){return(Vt=l.dynCall_iiiiiiiiii=l.asm.cc).apply(null,arguments)},cn=l.dynCall_viiiiiiiii=function(){return(cn=l.dynCall_viiiiiiiii=l.asm.dc).apply(null,arguments)},ln=l.dynCall_viiiiiii=function(){return(ln=l.dynCall_viiiiiii=l.asm.ec).apply(null,arguments)},pn=l.dynCall_viiiiii=function(){return(pn=l.dynCall_viiiiii=l.asm.fc).apply(null,arguments)},hn=l.dynCall_iiiiiiii=function(){return(hn=l.dynCall_iiiiiiii=l.asm.gc).apply(null,arguments)},bn=l.dynCall_viidii=function(){return(bn=l.dynCall_viidii=l.asm.hc).apply(null,arguments)},Nn=l._asyncify_start_unwind=function(){return(Nn=l._asyncify_start_unwind=l.asm.ic).apply(null,arguments)},Tn=l._asyncify_stop_unwind=function(){return(Tn=l._asyncify_stop_unwind=l.asm.jc).apply(null,arguments)},Cn=l._asyncify_start_rewind=function(){return(Cn=l._asyncify_start_rewind=l.asm.kc).apply(null,arguments)},Ln=l._asyncify_stop_rewind=function(){return(Ln=l._asyncify_stop_rewind=l.asm.lc).apply(null,arguments)};function Di(o,c,_,m,p,y,E){var S=He();try{return Lt(o,c,_,m,p,y,E)}catch(b){if(ur(S),b!==b+0)throw b;Be(1,0)}}function Oi(o,c){var _=He();try{it(o,c)}catch(m){if(ur(_),m!==m+0)throw m;Be(1,0)}}function Ni(o,c,_,m){var p=He();try{return Nt(o,c,_,m)}catch(y){if(ur(p),y!==y+0)throw y;Be(1,0)}}function Ti(o,c,_){var m=He();try{return Dt(o,c,_)}catch(p){if(ur(m),p!==p+0)throw p;Be(1,0)}}function Ci(o,c,_){var m=He();try{ot(o,c,_)}catch(p){if(ur(m),p!==p+0)throw p;Be(1,0)}}function Fi(o,c){var _=He();try{return Tt(o,c)}catch(m){if(ur(_),m!==m+0)throw m;Be(1,0)}}function Ai(o,c,_,m){var p=He();try{At(o,c,_,m)}catch(y){if(ur(p),y!==y+0)throw y;Be(1,0)}}function kn(o){var c=He();try{Pt(o)}catch(_){if(ur(c),_!==_+0)throw _;Be(1,0)}}function In(o){var c=He();try{return Rt(o)}catch(_){if(ur(c),_!==_+0)throw _;Be(1,0)}}function w(o,c,_,m,p){var y=He();try{Mt(o,c,_,m,p)}catch(E){if(ur(y),E!==E+0)throw E;Be(1,0)}}function g(o,c,_,m,p,y){var E=He();try{Ot(o,c,_,m,p,y)}catch(S){if(ur(E),S!==S+0)throw S;Be(1,0)}}function s(o,c,_,m,p,y){var E=He();try{return Ft(o,c,_,m,p,y)}catch(S){if(ur(E),S!==S+0)throw S;Be(1,0)}}function d(o,c,_,m,p){var y=He();try{return Ct(o,c,_,m,p)}catch(E){if(ur(y),E!==E+0)throw E;Be(1,0)}}function r(o,c,_,m,p,y,E,S,b,k){var D=He();try{return Vt(o,c,_,m,p,y,E,S,b,k)}catch(T){if(ur(D),T!==T+0)throw T;Be(1,0)}}function i(o,c,_,m,p,y,E){var S=He();try{pn(o,c,_,m,p,y,E)}catch(b){if(ur(S),b!==b+0)throw b;Be(1,0)}}function t(o,c,_,m,p,y){var E=He();try{bn(o,c,_,m,p,y)}catch(S){if(ur(E),S!==S+0)throw S;Be(1,0)}}function a(o,c,_,m,p,y,E,S,b,k){var D=He();try{cn(o,c,_,m,p,y,E,S,b,k)}catch(T){if(ur(D),T!==T+0)throw T;Be(1,0)}}function n(o,c,_,m,p,y,E,S){var b=He();try{return hn(o,c,_,m,p,y,E,S)}catch(k){if(ur(b),k!==k+0)throw k;Be(1,0)}}function f(o,c,_,m,p,y,E,S){var b=He();try{ln(o,c,_,m,p,y,E,S)}catch(k){if(ur(b),k!==k+0)throw k;Be(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=On,l.FS=e;var v;$e=function o(){v||u(),v||($e=o)};function u(o){if(o=o||Y,Re>0||(Wn(),Re>0))return;function c(){v||(v=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),c()},1)):c()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return u(),O}var Mc,Cu,Au=Ki(()=>{"use strict";Mc=10290895,Cu=__dirname+"/php_8_2.wasm"});var Ru={};Wi(Ru,{dependenciesTotalSize:()=>Ic,dependencyFilename:()=>Pu,init:()=>Uc});function Uc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(u,o)=>{throw o},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(u){return l.locateFile?l.locateFile(u,ae):ae+u}var Ye,nr,Me;function Lr(u){if(u instanceof mr)return;ce("exiting due to exception: "+u)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(u,o)=>(wr(),u=Le.normalize(u),V.readFileSync(u,o?void 0:"utf8")),Me=u=>{var o=Ye(u,!0);return o.buffer||(o=new Uint8Array(o)),o},nr=(u,o,c)=>{wr(),u=Le.normalize(u),V.readFile(u,function(_,m){_?c(_):o(m.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(u){if(!(u instanceof mr))throw u}),process.on("unhandledRejection",function(u){throw u}),te=(u,o)=>{if(_r())throw process.exitCode=u,o;Lr(o),process.exit(u)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(u,o){u||ue(o)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(u,o,c){for(var _=o+c,m=o;u[m]&&!(m>=_);)++m;if(m-o>16&&u.buffer&&at)return at.decode(u.subarray(o,m));for(var p="";o<m;){var y=u[o++];if(!(y&128)){p+=String.fromCharCode(y);continue}var E=u[o++]&63;if((y&224)==192){p+=String.fromCharCode((y&31)<<6|E);continue}var S=u[o++]&63;if((y&240)==224?y=(y&15)<<12|E<<6|S:y=(y&7)<<18|E<<12|S<<6|u[o++]&63,y<65536)p+=String.fromCharCode(y);else{var b=y-65536;p+=String.fromCharCode(55296|b>>10,56320|b&1023)}}return p}function ne(u,o){return u?We(de,u,o):""}function Xe(u,o,c,_){if(!(_>0))return 0;for(var m=c,p=c+_-1,y=0;y<u.length;++y){var E=u.charCodeAt(y);if(E>=55296&&E<=57343){var S=u.charCodeAt(++y);E=65536+((E&1023)<<10)|S&1023}if(E<=127){if(c>=p)break;o[c++]=E}else if(E<=2047){if(c+1>=p)break;o[c++]=192|E>>6,o[c++]=128|E&63}else if(E<=65535){if(c+2>=p)break;o[c++]=224|E>>12,o[c++]=128|E>>6&63,o[c++]=128|E&63}else{if(c+3>=p)break;o[c++]=240|E>>18,o[c++]=128|E>>12&63,o[c++]=128|E>>6&63,o[c++]=128|E&63}}return o[c]=0,c-m}function Ae(u,o,c){return Xe(u,de,o,c)}function Pe(u){for(var o=0,c=0;c<u.length;++c){var _=u.charCodeAt(c);_<=127?o++:_<=2047?o+=2:_>=55296&&_<=57343?(o+=4,++c):o+=3}return o}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(u){Cr=u,l.HEAP8=$=new Int8Array(u),l.HEAP16=Ee=new Int16Array(u),l.HEAP32=h=new Int32Array(u),l.HEAPU8=de=new Uint8Array(u),l.HEAPU16=st=new Uint16Array(u),l.HEAPU32=H=new Uint32Array(u),l.HEAPF32=Bn=new Float32Array(u),l.HEAPF64=ut=new Float64Array(u)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),pe.root=e.mount(pe,{},null),pr(lt)}function Yn(){xe(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(u){ct.unshift(u)}function Kn(u){lt.unshift(u)}function Gn(u){dt.unshift(u)}var Re=0,Ar=null,$e=null;function Qi(u){return u}function vr(u){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(u){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var o=$e;$e=null,o()}}function ue(u){l.onAbort&&l.onAbort(u),u="Aborted("+u+")",ce(u),Ce=!0,Ge=1,u+=". Build with -sASSERTIONS for more info.";var o=new WebAssembly.RuntimeError(u);throw o}var Xn="data:application/octet-stream;base64,";function vt(u){return u.startsWith(Xn)}var _e;_e=Pu,vt(_e)||(_e=cr(_e));function mt(u){try{if(u==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(u);throw"both async and sync fetching of the wasm failed"}catch(o){ue(o)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(u){if(!u.ok)throw"failed to load wasm binary file at '"+_e+"'";return u.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var u={a:gn};function o(y,E){var S=y.exports;S=ke.instrumentWasmExports(S),l.asm=S,or=l.asm._a,ft(or.buffer),xn=l.asm.kb,Kn(l.asm.$a),Ze("wasm-instantiate")}vr("wasm-instantiate");function c(y){o(y.instance)}function _(y){return $n().then(function(E){return WebAssembly.instantiate(E,u)}).then(function(E){return E}).then(y,function(E){ce("failed to asynchronously prepare wasm: "+E),ue(E)})}function m(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(y){var E=WebAssembly.instantiateStreaming(y,u);return E.then(c,function(S){return ce("wasm streaming compile failed: "+S),ce("falling back to ArrayBuffer instantiation"),_(c)})}):_(c)}if(l.instantiateWasm)try{var p=l.instantiateWasm(u,o);return p=ke.instrumentWasmExports(p),p}catch(y){return ce("Module.instantiateWasm callback failed with error: "+y),!1}return m(),{}}var P,q;function mr(u){this.name="ExitStatus",this.message="Program terminated with exit("+u+")",this.status=u}function pr(u){for(;u.length>0;)u.shift()(l)}function pt(u){if(u instanceof mr||u=="unwind")return Ge;te(1,u)}function ht(u,o){$.set(u,o)}function Jn(u,o,c,_){ue("Assertion failed: "+ne(u)+", at: "+[o?ne(o):"unknown filename",c,_?ne(_):"unknown function"])}function Qn(u,o){(function(c){ot.apply(null,[u,c])})(o)}var U={isAbs:u=>u.charAt(0)==="/",splitPath:u=>{var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return o.exec(u).slice(1)},normalizeArray:(u,o)=>{for(var c=0,_=u.length-1;_>=0;_--){var m=u[_];m==="."?u.splice(_,1):m===".."?(u.splice(_,1),c++):c&&(u.splice(_,1),c--)}if(o)for(;c;c--)u.unshift("..");return u},normalize:u=>{var o=U.isAbs(u),c=u.substr(-1)==="/";return u=U.normalizeArray(u.split("/").filter(_=>!!_),!o).join("/"),!u&&!o&&(u="."),u&&c&&(u+="/"),(o?"/":"")+u},dirname:u=>{var o=U.splitPath(u),c=o[0],_=o[1];return!c&&!_?".":(_&&(_=_.substr(0,_.length-1)),c+_)},basename:u=>{if(u==="/")return"/";u=U.normalize(u),u=u.replace(/\/$/,"");var o=u.lastIndexOf("/");return o===-1?u:u.substr(o+1)},join:function(){var u=Array.prototype.slice.call(arguments);return U.normalize(u.join("/"))},join2:(u,o)=>U.normalize(u+"/"+o)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var u=new Uint8Array(1);return()=>(crypto.getRandomValues(u),u[0])}else if(Z)try{var o=require("crypto");return()=>o.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var u="",o=!1,c=arguments.length-1;c>=-1&&!o;c--){var _=c>=0?arguments[c]:e.cwd();if(typeof _!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!_)return"";u=_+"/"+u,o=U.isAbs(_)}return u=U.normalizeArray(u.split("/").filter(m=>!!m),!o).join("/"),(o?"/":"")+u||"."},relative:(u,o)=>{u=ge.resolve(u).substr(1),o=ge.resolve(o).substr(1);function c(b){for(var k=0;k<b.length&&b[k]==="";k++);for(var D=b.length-1;D>=0&&b[D]==="";D--);return k>D?[]:b.slice(k,D-k+1)}for(var _=c(u.split("/")),m=c(o.split("/")),p=Math.min(_.length,m.length),y=p,E=0;E<p;E++)if(_[E]!==m[E]){y=E;break}for(var S=[],E=y;E<_.length;E++)S.push("..");return S=S.concat(m.slice(y)),S.join("/")}};function Je(u,o,c){var _=c>0?c:Pe(u)+1,m=new Array(_),p=Xe(u,m,0,m.length);return o&&(m.length=p),m}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(u,o){Se.ttys[u]={input:[],output:[],ops:o},e.registerDevice(u,Se.stream_ops)},stream_ops:{open:function(u){var o=Se.ttys[u.node.rdev];if(!o)throw new e.ErrnoError(43);u.tty=o,u.seekable=!1},close:function(u){u.tty.ops.fsync(u.tty)},fsync:function(u){u.tty.ops.fsync(u.tty)},read:function(u,o,c,_,m){if(!u.tty||!u.tty.ops.get_char)throw new e.ErrnoError(60);for(var p=0,y=0;y<_;y++){var E;try{E=u.tty.ops.get_char(u.tty)}catch{throw new e.ErrnoError(29)}if(E===void 0&&p===0)throw new e.ErrnoError(6);if(E==null)break;p++,o[c+y]=E}return p&&(u.node.timestamp=Date.now()),p},write:function(u,o,c,_,m){if(!u.tty||!u.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var p=0;p<_;p++)u.tty.ops.put_char(u.tty,o[c+p])}catch{throw new e.ErrnoError(29)}return _&&(u.node.timestamp=Date.now()),p}},default_tty_ops:{get_char:function(u){if(!u.input.length){var o=null;if(Z){var c=256,_=Buffer.alloc(c),m=0;try{m=V.readSync(process.stdin.fd,_,0,c,-1)}catch(p){if(p.toString().includes("EOF"))m=0;else throw p}m>0?o=_.slice(0,m).toString("utf-8"):o=null}else typeof window<"u"&&typeof window.prompt=="function"?(o=window.prompt("Input: "),o!==null&&(o+=`
|
|
11
11
|
`)):typeof readline=="function"&&(o=readline(),o!==null&&(o+=`
|
|
12
12
|
`));if(!o)return null;u.input=Je(o,!0)}return u.input.shift()},put_char:function(u,o){o===null||o===10?(Qe(We(u.output,0)),u.output=[]):o!=0&&u.output.push(o)},fsync:function(u){u.output&&u.output.length>0&&(Qe(We(u.output,0)),u.output=[])}},default_tty1_ops:{put_char:function(u,o){o===null||o===10?(ce(We(u.output,0)),u.output=[]):o!=0&&u.output.push(o)},fsync:function(u){u.output&&u.output.length>0&&(ce(We(u.output,0)),u.output=[])}}};function Pr(u,o){return de.fill(0,u,u+o),u}function ro(u,o){return Math.ceil(u/o)*o}function Rr(u){u=ro(u,65536);var o=Ie(65536,u);return o?Pr(o,u):0}var L={ops_table:null,mount:function(u){return L.createNode(null,"/",16895,0)},createNode:function(u,o,c,_){if(e.isBlkdev(c)||e.isFIFO(c))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var m=e.createNode(u,o,c,_);return e.isDir(m.mode)?(m.node_ops=L.ops_table.dir.node,m.stream_ops=L.ops_table.dir.stream,m.contents={}):e.isFile(m.mode)?(m.node_ops=L.ops_table.file.node,m.stream_ops=L.ops_table.file.stream,m.usedBytes=0,m.contents=null):e.isLink(m.mode)?(m.node_ops=L.ops_table.link.node,m.stream_ops=L.ops_table.link.stream):e.isChrdev(m.mode)&&(m.node_ops=L.ops_table.chrdev.node,m.stream_ops=L.ops_table.chrdev.stream),m.timestamp=Date.now(),u&&(u.contents[o]=m,u.timestamp=m.timestamp),m},getFileDataAsTypedArray:function(u){return u.contents?u.contents.subarray?u.contents.subarray(0,u.usedBytes):new Uint8Array(u.contents):new Uint8Array(0)},expandFileStorage:function(u,o){var c=u.contents?u.contents.length:0;if(!(c>=o)){var _=1024*1024;o=Math.max(o,c*(c<_?2:1.125)>>>0),c!=0&&(o=Math.max(o,256));var m=u.contents;u.contents=new Uint8Array(o),u.usedBytes>0&&u.contents.set(m.subarray(0,u.usedBytes),0)}},resizeFileStorage:function(u,o){if(u.usedBytes!=o)if(o==0)u.contents=null,u.usedBytes=0;else{var c=u.contents;u.contents=new Uint8Array(o),c&&u.contents.set(c.subarray(0,Math.min(o,u.usedBytes))),u.usedBytes=o}},node_ops:{getattr:function(u){var o={};return o.dev=e.isChrdev(u.mode)?u.id:1,o.ino=u.id,o.mode=u.mode,o.nlink=1,o.uid=0,o.gid=0,o.rdev=u.rdev,e.isDir(u.mode)?o.size=4096:e.isFile(u.mode)?o.size=u.usedBytes:e.isLink(u.mode)?o.size=u.link.length:o.size=0,o.atime=new Date(u.timestamp),o.mtime=new Date(u.timestamp),o.ctime=new Date(u.timestamp),o.blksize=4096,o.blocks=Math.ceil(o.size/o.blksize),o},setattr:function(u,o){o.mode!==void 0&&(u.mode=o.mode),o.timestamp!==void 0&&(u.timestamp=o.timestamp),o.size!==void 0&&L.resizeFileStorage(u,o.size)},lookup:function(u,o){throw e.genericErrors[44]},mknod:function(u,o,c,_){return L.createNode(u,o,c,_)},rename:function(u,o,c){if(e.isDir(u.mode)){var _;try{_=e.lookupNode(o,c)}catch{}if(_)for(var m in _.contents)throw new e.ErrnoError(55)}delete u.parent.contents[u.name],u.parent.timestamp=Date.now(),u.name=c,o.contents[c]=u,o.timestamp=u.parent.timestamp,u.parent=o},unlink:function(u,o){delete u.contents[o],u.timestamp=Date.now()},rmdir:function(u,o){var c=e.lookupNode(u,o);for(var _ in c.contents)throw new e.ErrnoError(55);delete u.contents[o],u.timestamp=Date.now()},readdir:function(u){var o=[".",".."];for(var c in u.contents)u.contents.hasOwnProperty(c)&&o.push(c);return o},symlink:function(u,o,c){var _=L.createNode(u,o,41471,0);return _.link=c,_},readlink:function(u){if(!e.isLink(u.mode))throw new e.ErrnoError(28);return u.link}},stream_ops:{read:function(u,o,c,_,m){var p=u.node.contents;if(m>=u.node.usedBytes)return 0;var y=Math.min(u.node.usedBytes-m,_);if(y>8&&p.subarray)o.set(p.subarray(m,m+y),c);else for(var E=0;E<y;E++)o[c+E]=p[m+E];return y},write:function(u,o,c,_,m,p){if(o.buffer===$.buffer&&(p=!1),!_)return 0;var y=u.node;if(y.timestamp=Date.now(),o.subarray&&(!y.contents||y.contents.subarray)){if(p)return y.contents=o.subarray(c,c+_),y.usedBytes=_,_;if(y.usedBytes===0&&m===0)return y.contents=o.slice(c,c+_),y.usedBytes=_,_;if(m+_<=y.usedBytes)return y.contents.set(o.subarray(c,c+_),m),_}if(L.expandFileStorage(y,m+_),y.contents.subarray&&o.subarray)y.contents.set(o.subarray(c,c+_),m);else for(var E=0;E<_;E++)y.contents[m+E]=o[c+E];return y.usedBytes=Math.max(y.usedBytes,m+_),_},llseek:function(u,o,c){var _=o;if(c===1?_+=u.position:c===2&&e.isFile(u.node.mode)&&(_+=u.node.usedBytes),_<0)throw new e.ErrnoError(28);return _},allocate:function(u,o,c){L.expandFileStorage(u.node,o+c),u.node.usedBytes=Math.max(u.node.usedBytes,o+c)},mmap:function(u,o,c,_,m){if(!e.isFile(u.node.mode))throw new e.ErrnoError(43);var p,y,E=u.node.contents;if(!(m&2)&&E.buffer===Cr)y=!1,p=E.byteOffset;else{if((c>0||c+o<E.length)&&(E.subarray?E=E.subarray(c,c+o):E=Array.prototype.slice.call(E,c,c+o)),y=!0,p=Rr(o),!p)throw new e.ErrnoError(48);$.set(E,p)}return{ptr:p,allocated:y}},msync:function(u,o,c,_,m){return L.stream_ops.write(u,o,0,_,c,!1),0}}};function to(u,o,c,_){var m=_?"":"al "+u;nr(u,p=>{Ne(p,'Loading data file "'+u+'" failed (no arrayBuffer).'),o(new Uint8Array(p)),m&&Ze(m)},p=>{if(c)c();else throw'Loading data file "'+u+'" failed.'}),m&&vr(m)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var u=process.binding("constants");u.fs&&(u=u.fs),M.flagsForNodeMap={1024:u.O_APPEND,64:u.O_CREAT,128:u.O_EXCL,256:u.O_NOCTTY,0:u.O_RDONLY,2:u.O_RDWR,4096:u.O_SYNC,512:u.O_TRUNC,1:u.O_WRONLY,131072:u.O_NOFOLLOW}},convertNodeCode:u=>{var o=u.code;return yt[o]},mount:u=>M.createNode(null,"/",M.getMode(u.opts.root),0),createNode:(u,o,c,_)=>{if(!e.isDir(c)&&!e.isFile(c)&&!e.isLink(c))throw new e.ErrnoError(28);var m=e.createNode(u,o,c);return m.node_ops=M.node_ops,m.stream_ops=M.stream_ops,m},getMode:u=>{var o;try{o=V.lstatSync(u),M.isWindows&&(o.mode=o.mode|(o.mode&292)>>2)}catch(c){throw c.code?new e.ErrnoError(M.convertNodeCode(c)):c}return o.mode},realPath:u=>{for(var o=[];u.parent!==u;)o.push(u.name),u=u.parent;return o.push(u.mount.opts.root),o.reverse(),U.join.apply(null,o)},flagsForNode:u=>{u&=-2097153,u&=-2049,u&=-32769,u&=-524289,u&=-65537;var o=0;for(var c in M.flagsForNodeMap)u&c&&(o|=M.flagsForNodeMap[c],u^=c);if(u)throw new e.ErrnoError(28);return o},node_ops:{getattr:u=>{var o=M.realPath(u),c;try{c=V.lstatSync(o)}catch(_){throw _.code?new e.ErrnoError(M.convertNodeCode(_)):_}return M.isWindows&&!c.blksize&&(c.blksize=4096),M.isWindows&&!c.blocks&&(c.blocks=(c.size+c.blksize-1)/c.blksize|0),{dev:c.dev,ino:c.ino,mode:c.mode,nlink:c.nlink,uid:c.uid,gid:c.gid,rdev:c.rdev,size:c.size,atime:c.atime,mtime:c.mtime,ctime:c.ctime,blksize:c.blksize,blocks:c.blocks}},setattr:(u,o)=>{var c=M.realPath(u);try{if(o.mode!==void 0&&(V.chmodSync(c,o.mode),u.mode=o.mode),o.timestamp!==void 0){var _=new Date(o.timestamp);V.utimesSync(c,_,_)}o.size!==void 0&&V.truncateSync(c,o.size)}catch(m){throw m.code?new e.ErrnoError(M.convertNodeCode(m)):m}},lookup:(u,o)=>{var c=U.join2(M.realPath(u),o),_=M.getMode(c);return M.createNode(u,o,_)},mknod:(u,o,c,_)=>{var m=M.createNode(u,o,c,_),p=M.realPath(m);try{e.isDir(m.mode)?V.mkdirSync(p,m.mode):V.writeFileSync(p,"",{mode:m.mode})}catch(y){throw y.code?new e.ErrnoError(M.convertNodeCode(y)):y}return m},rename:(u,o,c)=>{var _=M.realPath(u),m=U.join2(M.realPath(o),c);try{V.renameSync(_,m)}catch(p){throw p.code?new e.ErrnoError(M.convertNodeCode(p)):p}u.name=c},unlink:(u,o)=>{var c=U.join2(M.realPath(u),o);try{V.unlinkSync(c)}catch(_){throw _.code?new e.ErrnoError(M.convertNodeCode(_)):_}},rmdir:(u,o)=>{var c=U.join2(M.realPath(u),o);try{V.rmdirSync(c)}catch(_){throw _.code?new e.ErrnoError(M.convertNodeCode(_)):_}},readdir:u=>{var o=M.realPath(u);try{return V.readdirSync(o)}catch(c){throw c.code?new e.ErrnoError(M.convertNodeCode(c)):c}},symlink:(u,o,c)=>{var _=U.join2(M.realPath(u),o);try{V.symlinkSync(c,_)}catch(m){throw m.code?new e.ErrnoError(M.convertNodeCode(m)):m}},readlink:u=>{var o=M.realPath(u);try{return o=V.readlinkSync(o),o=Le.relative(Le.resolve(u.mount.opts.root),o),o}catch(c){throw c.code?c.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(c)):c}}},stream_ops:{open:u=>{var o=M.realPath(u.node);try{e.isFile(u.node.mode)&&(u.nfd=V.openSync(o,M.flagsForNode(u.flags)))}catch(c){throw c.code?new e.ErrnoError(M.convertNodeCode(c)):c}},close:u=>{try{e.isFile(u.node.mode)&&u.nfd&&V.closeSync(u.nfd)}catch(o){throw o.code?new e.ErrnoError(M.convertNodeCode(o)):o}},read:(u,o,c,_,m)=>{if(_===0)return 0;try{return V.readSync(u.nfd,Buffer.from(o.buffer),c,_,m)}catch(p){throw new e.ErrnoError(M.convertNodeCode(p))}},write:(u,o,c,_,m)=>{try{return V.writeSync(u.nfd,Buffer.from(o.buffer),c,_,m)}catch(p){throw new e.ErrnoError(M.convertNodeCode(p))}},llseek:(u,o,c)=>{var _=o;if(c===1)_+=u.position;else if(c===2&&e.isFile(u.node.mode))try{var m=V.fstatSync(u.nfd);_+=m.size}catch(p){throw new e.ErrnoError(M.convertNodeCode(p))}if(_<0)throw new e.ErrnoError(28);return _},mmap:(u,o,c,_,m)=>{if(!e.isFile(u.node.mode))throw new e.ErrnoError(43);var p=Rr(o);return M.stream_ops.read(u,$,p,o,c),{ptr:p,allocated:!0}},msync:(u,o,c,_,m)=>(M.stream_ops.write(u,o,0,_,c,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(u,o={})=>{if(u=ge.resolve(e.cwd(),u),!u)return{path:"",node:null};var c={follow_mount:!0,recurse_count:0};if(o=Object.assign(c,o),o.recurse_count>8)throw new e.ErrnoError(32);for(var _=U.normalizeArray(u.split("/").filter(D=>!!D),!1),m=e.root,p="/",y=0;y<_.length;y++){var E=y===_.length-1;if(E&&o.parent)break;if(m=e.lookupNode(m,_[y]),p=U.join2(p,_[y]),e.isMountpoint(m)&&(!E||E&&o.follow_mount)&&(m=m.mounted.root),!E||o.follow)for(var S=0;e.isLink(m.mode);){var b=e.readlink(p);p=ge.resolve(U.dirname(p),b);var k=e.lookupPath(p,{recurse_count:o.recurse_count+1});if(m=k.node,S++>40)throw new e.ErrnoError(32)}}return{path:p,node:m}},getPath:u=>{for(var o;;){if(e.isRoot(u)){var c=u.mount.mountpoint;return o?c[c.length-1]!=="/"?c+"/"+o:c+o:c}o=o?u.name+"/"+o:u.name,u=u.parent}},hashName:(u,o)=>{for(var c=0,_=0;_<o.length;_++)c=(c<<5)-c+o.charCodeAt(_)|0;return(u+c>>>0)%e.nameTable.length},hashAddNode:u=>{var o=e.hashName(u.parent.id,u.name);u.name_next=e.nameTable[o],e.nameTable[o]=u},hashRemoveNode:u=>{var o=e.hashName(u.parent.id,u.name);if(e.nameTable[o]===u)e.nameTable[o]=u.name_next;else for(var c=e.nameTable[o];c;){if(c.name_next===u){c.name_next=u.name_next;break}c=c.name_next}},lookupNode:(u,o)=>{var c=e.mayLookup(u);if(c)throw new e.ErrnoError(c,u);for(var _=e.hashName(u.id,o),m=e.nameTable[_];m;m=m.name_next){var p=m.name;if(m.parent.id===u.id&&p===o)return m}return e.lookup(u,o)},createNode:(u,o,c,_)=>{var m=new e.FSNode(u,o,c,_);return e.hashAddNode(m),m},destroyNode:u=>{e.hashRemoveNode(u)},isRoot:u=>u===u.parent,isMountpoint:u=>!!u.mounted,isFile:u=>(u&61440)===32768,isDir:u=>(u&61440)===16384,isLink:u=>(u&61440)===40960,isChrdev:u=>(u&61440)===8192,isBlkdev:u=>(u&61440)===24576,isFIFO:u=>(u&61440)===4096,isSocket:u=>(u&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:u=>{var o=e.flagModes[u];if(typeof o>"u")throw new Error("Unknown file open mode: "+u);return o},flagsToPermissionString:u=>{var o=["r","w","rw"][u&3];return u&512&&(o+="w"),o},nodePermissions:(u,o)=>e.ignorePermissions?0:o.includes("r")&&!(u.mode&292)||o.includes("w")&&!(u.mode&146)||o.includes("x")&&!(u.mode&73)?2:0,mayLookup:u=>{var o=e.nodePermissions(u,"x");return o||(u.node_ops.lookup?0:2)},mayCreate:(u,o)=>{try{var c=e.lookupNode(u,o);return 20}catch{}return e.nodePermissions(u,"wx")},mayDelete:(u,o,c)=>{var _;try{_=e.lookupNode(u,o)}catch(p){return p.errno}var m=e.nodePermissions(u,"wx");if(m)return m;if(c){if(!e.isDir(_.mode))return 54;if(e.isRoot(_)||e.getPath(_)===e.cwd())return 10}else if(e.isDir(_.mode))return 31;return 0},mayOpen:(u,o)=>u?e.isLink(u.mode)?32:e.isDir(u.mode)&&(e.flagsToPermissionString(o)!=="r"||o&512)?31:e.nodePermissions(u,e.flagsToPermissionString(o)):44,MAX_OPEN_FDS:4096,nextfd:(u=0,o=e.MAX_OPEN_FDS)=>{for(var c=u;c<=o;c++)if(!e.streams[c])return c;throw new e.ErrnoError(33)},getStream:u=>e.streams[u],createStream:(u,o,c)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(m){this.node=m}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(m){this.shared.flags=m}},position:{get:function(){return this.shared.position},set:function(m){this.shared.position=m}}})),u=Object.assign(new e.FSStream,u);var _=e.nextfd(o,c);return u.fd=_,e.streams[_]=u,u},closeStream:u=>{e.streams[u]=null},chrdev_stream_ops:{open:u=>{var o=e.getDevice(u.node.rdev);u.stream_ops=o.stream_ops,u.stream_ops.open&&u.stream_ops.open(u)},llseek:()=>{throw new e.ErrnoError(70)}},major:u=>u>>8,minor:u=>u&255,makedev:(u,o)=>u<<8|o,registerDevice:(u,o)=>{e.devices[u]={stream_ops:o}},getDevice:u=>e.devices[u],getMounts:u=>{for(var o=[],c=[u];c.length;){var _=c.pop();o.push(_),c.push.apply(c,_.mounts)}return o},syncfs:(u,o)=>{typeof u=="function"&&(o=u,u=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var c=e.getMounts(e.root.mount),_=0;function m(y){return e.syncFSRequests--,o(y)}function p(y){if(y)return p.errored?void 0:(p.errored=!0,m(y));++_>=c.length&&m(null)}c.forEach(y=>{if(!y.type.syncfs)return p(null);y.type.syncfs(y,u,p)})},mount:(u,o,c)=>{var _=c==="/",m=!c,p;if(_&&e.root)throw new e.ErrnoError(10);if(!_&&!m){var y=e.lookupPath(c,{follow_mount:!1});if(c=y.path,p=y.node,e.isMountpoint(p))throw new e.ErrnoError(10);if(!e.isDir(p.mode))throw new e.ErrnoError(54)}var E={type:u,opts:o,mountpoint:c,mounts:[]},S=u.mount(E);return S.mount=E,E.root=S,_?e.root=S:p&&(p.mounted=E,p.mount&&p.mount.mounts.push(E)),S},unmount:u=>{var o=e.lookupPath(u,{follow_mount:!1});if(!e.isMountpoint(o.node))throw new e.ErrnoError(28);var c=o.node,_=c.mounted,m=e.getMounts(_);Object.keys(e.nameTable).forEach(y=>{for(var E=e.nameTable[y];E;){var S=E.name_next;m.includes(E.mount)&&e.destroyNode(E),E=S}}),c.mounted=null;var p=c.mount.mounts.indexOf(_);c.mount.mounts.splice(p,1)},lookup:(u,o)=>u.node_ops.lookup(u,o),mknod:(u,o,c)=>{var _=e.lookupPath(u,{parent:!0}),m=_.node,p=U.basename(u);if(!p||p==="."||p==="..")throw new e.ErrnoError(28);var y=e.mayCreate(m,p);if(y)throw new e.ErrnoError(y);if(!m.node_ops.mknod)throw new e.ErrnoError(63);return m.node_ops.mknod(m,p,o,c)},create:(u,o)=>(o=o!==void 0?o:438,o&=4095,o|=32768,e.mknod(u,o,0)),mkdir:(u,o)=>(o=o!==void 0?o:511,o&=1023,o|=16384,e.mknod(u,o,0)),mkdirTree:(u,o)=>{for(var c=u.split("/"),_="",m=0;m<c.length;++m)if(c[m]){_+="/"+c[m];try{e.mkdir(_,o)}catch(p){if(p.errno!=20)throw p}}},mkdev:(u,o,c)=>(typeof c>"u"&&(c=o,o=438),o|=8192,e.mknod(u,o,c)),symlink:(u,o)=>{if(!ge.resolve(u))throw new e.ErrnoError(44);var c=e.lookupPath(o,{parent:!0}),_=c.node;if(!_)throw new e.ErrnoError(44);var m=U.basename(o),p=e.mayCreate(_,m);if(p)throw new e.ErrnoError(p);if(!_.node_ops.symlink)throw new e.ErrnoError(63);return _.node_ops.symlink(_,m,u)},rename:(u,o)=>{var c=U.dirname(u),_=U.dirname(o),m=U.basename(u),p=U.basename(o),y,E,S;if(y=e.lookupPath(u,{parent:!0}),E=y.node,y=e.lookupPath(o,{parent:!0}),S=y.node,!E||!S)throw new e.ErrnoError(44);if(E.mount!==S.mount)throw new e.ErrnoError(75);var b=e.lookupNode(E,m),k=ge.relative(u,_);if(k.charAt(0)!==".")throw new e.ErrnoError(28);if(k=ge.relative(o,c),k.charAt(0)!==".")throw new e.ErrnoError(55);var D;try{D=e.lookupNode(S,p)}catch{}if(b!==D){var T=e.isDir(b.mode),C=e.mayDelete(E,m,T);if(C)throw new e.ErrnoError(C);if(C=D?e.mayDelete(S,p,T):e.mayCreate(S,p),C)throw new e.ErrnoError(C);if(!E.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(b)||D&&e.isMountpoint(D))throw new e.ErrnoError(10);if(S!==E&&(C=e.nodePermissions(E,"w"),C))throw new e.ErrnoError(C);e.hashRemoveNode(b);try{E.node_ops.rename(b,S,p)}catch(A){throw A}finally{e.hashAddNode(b)}}},rmdir:u=>{var o=e.lookupPath(u,{parent:!0}),c=o.node,_=U.basename(u),m=e.lookupNode(c,_),p=e.mayDelete(c,_,!0);if(p)throw new e.ErrnoError(p);if(!c.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(m))throw new e.ErrnoError(10);c.node_ops.rmdir(c,_),e.destroyNode(m)},readdir:u=>{var o=e.lookupPath(u,{follow:!0}),c=o.node;if(!c.node_ops.readdir)throw new e.ErrnoError(54);return c.node_ops.readdir(c)},unlink:u=>{var o=e.lookupPath(u,{parent:!0}),c=o.node;if(!c)throw new e.ErrnoError(44);var _=U.basename(u),m=e.lookupNode(c,_),p=e.mayDelete(c,_,!1);if(p)throw new e.ErrnoError(p);if(!c.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(m))throw new e.ErrnoError(10);c.node_ops.unlink(c,_),e.destroyNode(m)},readlink:u=>{var o=e.lookupPath(u),c=o.node;if(!c)throw new e.ErrnoError(44);if(!c.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(c.parent),c.node_ops.readlink(c))},stat:(u,o)=>{var c=e.lookupPath(u,{follow:!o}),_=c.node;if(!_)throw new e.ErrnoError(44);if(!_.node_ops.getattr)throw new e.ErrnoError(63);return _.node_ops.getattr(_)},lstat:u=>e.stat(u,!0),chmod:(u,o,c)=>{var _;if(typeof u=="string"){var m=e.lookupPath(u,{follow:!c});_=m.node}else _=u;if(!_.node_ops.setattr)throw new e.ErrnoError(63);_.node_ops.setattr(_,{mode:o&4095|_.mode&-4096,timestamp:Date.now()})},lchmod:(u,o)=>{e.chmod(u,o,!0)},fchmod:(u,o)=>{var c=e.getStream(u);if(!c)throw new e.ErrnoError(8);e.chmod(c.node,o)},chown:(u,o,c,_)=>{var m;if(typeof u=="string"){var p=e.lookupPath(u,{follow:!_});m=p.node}else m=u;if(!m.node_ops.setattr)throw new e.ErrnoError(63);m.node_ops.setattr(m,{timestamp:Date.now()})},lchown:(u,o,c)=>{e.chown(u,o,c,!0)},fchown:(u,o,c)=>{var _=e.getStream(u);if(!_)throw new e.ErrnoError(8);e.chown(_.node,o,c)},truncate:(u,o)=>{if(o<0)throw new e.ErrnoError(28);var c;if(typeof u=="string"){var _=e.lookupPath(u,{follow:!0});c=_.node}else c=u;if(!c.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(c.mode))throw new e.ErrnoError(31);if(!e.isFile(c.mode))throw new e.ErrnoError(28);var m=e.nodePermissions(c,"w");if(m)throw new e.ErrnoError(m);c.node_ops.setattr(c,{size:o,timestamp:Date.now()})},ftruncate:(u,o)=>{var c=e.getStream(u);if(!c)throw new e.ErrnoError(8);if(!(c.flags&2097155))throw new e.ErrnoError(28);e.truncate(c.node,o)},utime:(u,o,c)=>{var _=e.lookupPath(u,{follow:!0}),m=_.node;m.node_ops.setattr(m,{timestamp:Math.max(o,c)})},open:(u,o,c)=>{if(u==="")throw new e.ErrnoError(44);o=typeof o=="string"?e.modeStringToFlags(o):o,c=typeof c>"u"?438:c,o&64?c=c&4095|32768:c=0;var _;if(typeof u=="object")_=u;else{u=U.normalize(u);try{var m=e.lookupPath(u,{follow:!(o&131072)});_=m.node}catch{}}var p=!1;if(o&64)if(_){if(o&128)throw new e.ErrnoError(20)}else _=e.mknod(u,c,0),p=!0;if(!_)throw new e.ErrnoError(44);if(e.isChrdev(_.mode)&&(o&=-513),o&65536&&!e.isDir(_.mode))throw new e.ErrnoError(54);if(!p){var y=e.mayOpen(_,o);if(y)throw new e.ErrnoError(y)}o&512&&!p&&e.truncate(_,0),o&=-131713;var E=e.createStream({node:_,path:e.getPath(_),flags:o,seekable:!0,position:0,stream_ops:_.stream_ops,ungotten:[],error:!1});return E.stream_ops.open&&E.stream_ops.open(E),l.logReadFiles&&!(o&1)&&(e.readFiles||(e.readFiles={}),u in e.readFiles||(e.readFiles[u]=1)),E},close:u=>{if(e.isClosed(u))throw new e.ErrnoError(8);u.getdents&&(u.getdents=null);try{u.stream_ops.close&&u.stream_ops.close(u)}catch(o){throw o}finally{e.closeStream(u.fd)}u.fd=null},isClosed:u=>u.fd===null,llseek:(u,o,c)=>{if(e.isClosed(u))throw new e.ErrnoError(8);if(!u.seekable||!u.stream_ops.llseek)throw new e.ErrnoError(70);if(c!=0&&c!=1&&c!=2)throw new e.ErrnoError(28);return u.position=u.stream_ops.llseek(u,o,c),u.ungotten=[],u.position},read:(u,o,c,_,m)=>{if(_<0||m<0)throw new e.ErrnoError(28);if(e.isClosed(u))throw new e.ErrnoError(8);if((u.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(u.node.mode))throw new e.ErrnoError(31);if(!u.stream_ops.read)throw new e.ErrnoError(28);var p=typeof m<"u";if(!p)m=u.position;else if(!u.seekable)throw new e.ErrnoError(70);var y=u.stream_ops.read(u,o,c,_,m);return p||(u.position+=y),y},write:(u,o,c,_,m,p)=>{if(_<0||m<0)throw new e.ErrnoError(28);if(e.isClosed(u))throw new e.ErrnoError(8);if(!(u.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(u.node.mode))throw new e.ErrnoError(31);if(!u.stream_ops.write)throw new e.ErrnoError(28);u.seekable&&u.flags&1024&&e.llseek(u,0,2);var y=typeof m<"u";if(!y)m=u.position;else if(!u.seekable)throw new e.ErrnoError(70);var E=u.stream_ops.write(u,o,c,_,m,p);return y||(u.position+=E),E},allocate:(u,o,c)=>{if(e.isClosed(u))throw new e.ErrnoError(8);if(o<0||c<=0)throw new e.ErrnoError(28);if(!(u.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(u.node.mode)&&!e.isDir(u.node.mode))throw new e.ErrnoError(43);if(!u.stream_ops.allocate)throw new e.ErrnoError(138);u.stream_ops.allocate(u,o,c)},mmap:(u,o,c,_,m)=>{if(_&2&&!(m&2)&&(u.flags&2097155)!==2)throw new e.ErrnoError(2);if((u.flags&2097155)===1)throw new e.ErrnoError(2);if(!u.stream_ops.mmap)throw new e.ErrnoError(43);return u.stream_ops.mmap(u,o,c,_,m)},msync:(u,o,c,_,m)=>u.stream_ops.msync?u.stream_ops.msync(u,o,c,_,m):0,munmap:u=>0,ioctl:(u,o,c)=>{if(!u.stream_ops.ioctl)throw new e.ErrnoError(59);return u.stream_ops.ioctl(u,o,c)},readFile:(u,o={})=>{if(o.flags=o.flags||0,o.encoding=o.encoding||"binary",o.encoding!=="utf8"&&o.encoding!=="binary")throw new Error('Invalid encoding type "'+o.encoding+'"');var c,_=e.open(u,o.flags),m=e.stat(u),p=m.size,y=new Uint8Array(p);return e.read(_,y,0,p,0),o.encoding==="utf8"?c=We(y,0):o.encoding==="binary"&&(c=y),e.close(_),c},writeFile:(u,o,c={})=>{c.flags=c.flags||577;var _=e.open(u,c.flags,c.mode);if(typeof o=="string"){var m=new Uint8Array(Pe(o)+1),p=Xe(o,m,0,m.length);e.write(_,m,0,p,void 0,c.canOwn)}else if(ArrayBuffer.isView(o))e.write(_,o,0,o.byteLength,void 0,c.canOwn);else throw new Error("Unsupported data type");e.close(_)},cwd:()=>e.currentPath,chdir:u=>{var o=e.lookupPath(u,{follow:!0});if(o.node===null)throw new e.ErrnoError(44);if(!e.isDir(o.node.mode))throw new e.ErrnoError(54);var c=e.nodePermissions(o.node,"x");if(c)throw new e.ErrnoError(c);e.currentPath=o.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(o,c,_,m,p)=>m}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var u=eo();e.createDevice("/dev","random",u),e.createDevice("/dev","urandom",u),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var u=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var o=e.createNode(u,"fd",16895,73);return o.node_ops={lookup:(c,_)=>{var m=+_,p=e.getStream(m);if(!p)throw new e.ErrnoError(8);var y={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>p.path}};return y.parent=y,y}},o}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var u=e.open("/dev/stdin",0),o=e.open("/dev/stdout",1),c=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(o,c){this.node=c,this.setErrno=function(_){this.errno=_},this.setErrno(o),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(u=>{e.genericErrors[u]=new e.ErrnoError(u),e.genericErrors[u].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(u,o,c)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=u||l.stdin,l.stdout=o||l.stdout,l.stderr=c||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,kt(0);for(var u=0;u<e.streams.length;u++){var o=e.streams[u];o&&e.close(o)}},getMode:(u,o)=>{var c=0;return u&&(c|=365),o&&(c|=146),c},findObject:(u,o)=>{var c=e.analyzePath(u,o);return c.exists?c.object:null},analyzePath:(u,o)=>{try{var c=e.lookupPath(u,{follow:!o});u=c.path}catch{}var _={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var c=e.lookupPath(u,{parent:!0});_.parentExists=!0,_.parentPath=c.path,_.parentObject=c.node,_.name=U.basename(u),c=e.lookupPath(u,{follow:!o}),_.exists=!0,_.path=c.path,_.object=c.node,_.name=c.node.name,_.isRoot=c.path==="/"}catch(m){_.error=m.errno}return _},createPath:(u,o,c,_)=>{u=typeof u=="string"?u:e.getPath(u);for(var m=o.split("/").reverse();m.length;){var p=m.pop();if(p){var y=U.join2(u,p);try{e.mkdir(y)}catch{}u=y}}return y},createFile:(u,o,c,_,m)=>{var p=U.join2(typeof u=="string"?u:e.getPath(u),o),y=e.getMode(_,m);return e.create(p,y)},createDataFile:(u,o,c,_,m,p)=>{var y=o;u&&(u=typeof u=="string"?u:e.getPath(u),y=o?U.join2(u,o):u);var E=e.getMode(_,m),S=e.create(y,E);if(c){if(typeof c=="string"){for(var b=new Array(c.length),k=0,D=c.length;k<D;++k)b[k]=c.charCodeAt(k);c=b}e.chmod(S,E|146);var T=e.open(S,577);e.write(T,c,0,c.length,0,p),e.close(T),e.chmod(S,E)}return S},createDevice:(u,o,c,_)=>{var m=U.join2(typeof u=="string"?u:e.getPath(u),o),p=e.getMode(!!c,!!_);e.createDevice.major||(e.createDevice.major=64);var y=e.makedev(e.createDevice.major++,0);return e.registerDevice(y,{open:E=>{E.seekable=!1},close:E=>{_&&_.buffer&&_.buffer.length&&_(10)},read:(E,S,b,k,D)=>{for(var T=0,C=0;C<k;C++){var A;try{A=c()}catch{throw new e.ErrnoError(29)}if(A===void 0&&T===0)throw new e.ErrnoError(6);if(A==null)break;T++,S[b+C]=A}return T&&(E.node.timestamp=Date.now()),T},write:(E,S,b,k,D)=>{for(var T=0;T<k;T++)try{_(S[b+T])}catch{throw new e.ErrnoError(29)}return k&&(E.node.timestamp=Date.now()),T}}),e.mkdev(m,p,y)},forceLoadFile:u=>{if(u.isDevice||u.isFolder||u.link||u.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{u.contents=Je(Ye(u.url),!0),u.usedBytes=u.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(u,o,c,_,m)=>{function p(){this.lengthKnown=!1,this.chunks=[]}if(p.prototype.get=function(C){if(!(C>this.length-1||C<0)){var A=C%this.chunkSize,I=C/this.chunkSize|0;return this.getter(I)[A]}},p.prototype.setDataGetter=function(C){this.getter=C},p.prototype.cacheLength=function(){var C=new XMLHttpRequest;if(C.open("HEAD",c,!1),C.send(null),!(C.status>=200&&C.status<300||C.status===304))throw new Error("Couldn't load "+c+". Status: "+C.status);var A=Number(C.getResponseHeader("Content-length")),I,z=(I=C.getResponseHeader("Accept-Ranges"))&&I==="bytes",K=(I=C.getResponseHeader("Content-Encoding"))&&I==="gzip",B=1024*1024;z||(B=A);var x=(re,oe)=>{if(re>oe)throw new Error("invalid range ("+re+", "+oe+") or no bytes requested!");if(oe>A-1)throw new Error("only "+A+" bytes available! programmer error!");var le=new XMLHttpRequest;if(le.open("GET",c,!1),A!==B&&le.setRequestHeader("Range","bytes="+re+"-"+oe),le.responseType="arraybuffer",le.overrideMimeType&&le.overrideMimeType("text/plain; charset=x-user-defined"),le.send(null),!(le.status>=200&&le.status<300||le.status===304))throw new Error("Couldn't load "+c+". Status: "+le.status);return le.response!==void 0?new Uint8Array(le.response||[]):Je(le.responseText||"",!0)},G=this;G.setDataGetter(re=>{var oe=re*B,le=(re+1)*B-1;if(le=Math.min(le,A-1),typeof G.chunks[re]>"u"&&(G.chunks[re]=x(oe,le)),typeof G.chunks[re]>"u")throw new Error("doXHR failed!");return G.chunks[re]}),(K||!A)&&(B=A=1,A=this.getter(0).length,B=A,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=A,this._chunkSize=B,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var y=new p;Object.defineProperties(y,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var E={isDevice:!1,contents:y}}else var E={isDevice:!1,url:c};var S=e.createFile(u,o,E,_,m);E.contents?S.contents=E.contents:E.url&&(S.contents=null,S.url=E.url),Object.defineProperties(S,{usedBytes:{get:function(){return this.contents.length}}});var b={},k=Object.keys(S.stream_ops);k.forEach(T=>{var C=S.stream_ops[T];b[T]=function(){return e.forceLoadFile(S),C.apply(null,arguments)}});function D(T,C,A,I,z){var K=T.node.contents;if(z>=K.length)return 0;var B=Math.min(K.length-z,I);if(K.slice)for(var x=0;x<B;x++)C[A+x]=K[z+x];else for(var x=0;x<B;x++)C[A+x]=K.get(z+x);return B}return b.read=(T,C,A,I,z)=>(e.forceLoadFile(S),D(T,C,A,I,z)),b.mmap=(T,C,A,I,z)=>{e.forceLoadFile(S);var K=Rr(C);if(!K)throw new e.ErrnoError(48);return D(T,$,K,C,A),{ptr:K,allocated:!0}},S.stream_ops=b,S},createPreloadedFile:(u,o,c,_,m,p,y,E,S,b)=>{var k=o?ge.resolve(U.join2(u,o)):u,D="cp "+k;function T(C){function A(I){b&&b(),E||e.createDataFile(u,o,I,_,m,S),p&&p(),Ze(D)}Browser.handledByPreloadPlugin(C,k,A,()=>{y&&y(),Ze(D)})||A(C)}vr(D),typeof c=="string"?to(c,C=>T(C),y):T(c)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(u,o,c)=>{o=o||(()=>{}),c=c||(()=>{});var _=e.indexedDB();try{var m=_.open(e.DB_NAME(),e.DB_VERSION)}catch(p){return c(p)}m.onupgradeneeded=()=>{Qe("creating db");var p=m.result;p.createObjectStore(e.DB_STORE_NAME)},m.onsuccess=()=>{var p=m.result,y=p.transaction([e.DB_STORE_NAME],"readwrite"),E=y.objectStore(e.DB_STORE_NAME),S=0,b=0,k=u.length;function D(){b==0?o():c()}u.forEach(T=>{var C=E.put(e.analyzePath(T).object.contents,T);C.onsuccess=()=>{S++,S+b==k&&D()},C.onerror=()=>{b++,S+b==k&&D()}}),y.onerror=c},m.onerror=c},loadFilesFromDB:(u,o,c)=>{o=o||(()=>{}),c=c||(()=>{});var _=e.indexedDB();try{var m=_.open(e.DB_NAME(),e.DB_VERSION)}catch(p){return c(p)}m.onupgradeneeded=c,m.onsuccess=()=>{var p=m.result;try{var y=p.transaction([e.DB_STORE_NAME],"readonly")}catch(T){c(T);return}var E=y.objectStore(e.DB_STORE_NAME),S=0,b=0,k=u.length;function D(){b==0?o():c()}u.forEach(T=>{var C=E.get(T);C.onsuccess=()=>{e.analyzePath(T).exists&&e.unlink(T),e.createDataFile(U.dirname(T),U.basename(T),C.result,!0,!0,!0),S++,S+b==k&&D()},C.onerror=()=>{b++,S+b==k&&D()}}),y.onerror=c},m.onerror=c}},N={DEFAULT_POLLMASK:5,calculateAt:function(u,o,c){if(U.isAbs(o))return o;var _;if(u===-100)_=e.cwd();else{var m=N.getStreamFromFD(u);_=m.path}if(o.length==0){if(!c)throw new e.ErrnoError(44);return _}return U.join2(_,o)},doStat:function(u,o,c){try{var _=u(o)}catch(m){if(m&&m.node&&U.normalize(o)!==U.normalize(e.getPath(m.node)))return-54;throw m}return h[c>>2]=_.dev,h[c+8>>2]=_.ino,h[c+12>>2]=_.mode,H[c+16>>2]=_.nlink,h[c+20>>2]=_.uid,h[c+24>>2]=_.gid,h[c+28>>2]=_.rdev,q=[_.size>>>0,(P=_.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[c+40>>2]=q[0],h[c+44>>2]=q[1],h[c+48>>2]=4096,h[c+52>>2]=_.blocks,q=[Math.floor(_.atime.getTime()/1e3)>>>0,(P=Math.floor(_.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[c+56>>2]=q[0],h[c+60>>2]=q[1],H[c+64>>2]=0,q=[Math.floor(_.mtime.getTime()/1e3)>>>0,(P=Math.floor(_.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[c+72>>2]=q[0],h[c+76>>2]=q[1],H[c+80>>2]=0,q=[Math.floor(_.ctime.getTime()/1e3)>>>0,(P=Math.floor(_.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[c+88>>2]=q[0],h[c+92>>2]=q[1],H[c+96>>2]=0,q=[_.ino>>>0,(P=_.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[c+104>>2]=q[0],h[c+108>>2]=q[1],0},doMsync:function(u,o,c,_,m){if(!e.isFile(o.node.mode))throw new e.ErrnoError(43);if(_&2)return 0;var p=de.slice(u,u+c);e.msync(o,p,m,c,_)},varargs:void 0,get:function(){N.varargs+=4;var u=h[N.varargs-4>>2];return u},getStr:function(u){var o=ne(u);return o},getStreamFromFD:function(u){var o=e.getStream(u);if(!o)throw new e.ErrnoError(8);return o}};function no(u,o,c,_,m){try{for(var p=0,y=o?h[o>>2]:0,E=o?h[o+4>>2]:0,S=c?h[c>>2]:0,b=c?h[c+4>>2]:0,k=_?h[_>>2]:0,D=_?h[_+4>>2]:0,T=0,C=0,A=0,I=0,z=0,K=0,B=(o?h[o>>2]:0)|(c?h[c>>2]:0)|(_?h[_>>2]:0),x=(o?h[o+4>>2]:0)|(c?h[c+4>>2]:0)|(_?h[_+4>>2]:0),G=function(ze,Ve,Dr,yr){return ze<32?Ve&yr:Dr&yr},re=0;re<u;re++){var oe=1<<re%32;if(G(re,B,x,oe)){var le=N.getStreamFromFD(re),he=N.DEFAULT_POLLMASK;le.stream_ops?.poll&&(he=le.stream_ops.poll(le)),he&1&&G(re,y,E,oe)&&(re<32?T=T|oe:C=C|oe,p++),he&4&&G(re,S,b,oe)&&(re<32?A=A|oe:I=I|oe,p++),he&2&&G(re,k,D,oe)&&(re<32?z=z|oe:K=K|oe,p++)}}return o&&(h[o>>2]=T,h[o+4>>2]=C),c&&(h[c>>2]=A,h[c+4>>2]=I),_&&(h[_>>2]=z,h[_+4>>2]=K),p}catch(ze){if(typeof e>"u"||!(ze instanceof e.ErrnoError))throw ze;return-ze.errno}}var j={mount:function(u){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(o,c){return typeof c=="function"&&(this._callbacks[o]=c),this},l.websocket.emit=function(o,c){typeof this._callbacks[o]=="function"&&this._callbacks[o].call(this,c)},e.createNode(null,"/",16895,0)},createSocket:function(u,o,c){o&=-526337;var _=o==1;if(_&&c&&c!=6)throw new e.ErrnoError(66);var m={family:u,type:o,protocol:c,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},p=j.nextname(),y=e.createNode(j.root,p,49152,0);y.sock=m;var E=e.createStream({path:p,node:y,flags:2,seekable:!1,stream_ops:j.stream_ops});return m.stream=E,m},getSocket:function(u){var o=e.getStream(u);return!o||!e.isSocket(o.node.mode)?null:o.node.sock},stream_ops:{poll:function(u){var o=u.node.sock;return o.sock_ops.poll(o)},ioctl:function(u,o,c){var _=u.node.sock;return _.sock_ops.ioctl(_,o,c)},read:function(u,o,c,_,m){var p=u.node.sock,y=p.sock_ops.recvmsg(p,_);return y?(o.set(y.buffer,c),y.buffer.length):0},write:function(u,o,c,_,m){var p=u.node.sock;return p.sock_ops.sendmsg(p,o,c,_)},close:function(u){var o=u.node.sock;o.sock_ops.close(o)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(u,o,c){var _;if(typeof o=="object"&&(_=o,o=null,c=null),_)if(_._socket)o=_._socket.remoteAddress,c=_._socket.remotePort;else{var m=/ws[s]?:\/\/([^:]+):(\d+)/.exec(_.url);if(!m)throw new Error("WebSocket URL must be in the format ws(s)://address:port");o=m[1],c=parseInt(m[2],10)}else try{var p=l.websocket&&typeof l.websocket=="object",y="ws:#".replace("#","//");if(p&&(typeof l.websocket.url=="function"?y=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(y=l.websocket.url)),y==="ws://"||y==="wss://"){var E=o.split("/");y=y+E[0]+":"+c+"/"+E.slice(1).join("/")}var S="binary";p&&typeof l.websocket.subprotocol=="string"&&(S=l.websocket.subprotocol);var b=void 0;S!=="null"&&(S=S.replace(/^ +| +$/g,"").split(/ *, */),b=S),p&&l.websocket.subprotocol===null&&(S="null",b=void 0);var k;Z?k=Fn():k=WebSocket,l.websocket.decorator&&(k=l.websocket.decorator(k)),_=new k(y,b),_.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var D={addr:o,port:c,socket:_,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(u,D),j.websocket_sock_ops.handlePeerEvents(u,D),u.type===2&&typeof u.sport<"u"&&D.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(u.sport&65280)>>8,u.sport&255])),D},getPeer:function(u,o,c){return u.peers[o+":"+c]},addPeer:function(u,o){u.peers[o.addr+":"+o.port]=o},removePeer:function(u,o){delete u.peers[o.addr+":"+o.port]},handlePeerEvents:function(u,o){var c=!0,_=function(){l.websocket.emit("open",u.stream.fd);try{for(var p=o.dgram_send_queue.shift();p;)o.socket.send(p),p=o.dgram_send_queue.shift()}catch{o.socket.close()}};function m(p){if(typeof p=="string"){var y=new TextEncoder;p=y.encode(p)}else{if(Ne(p.byteLength!==void 0),p.byteLength==0)return;p=new Uint8Array(p)}var E=c;if(c=!1,E&&p.length===10&&p[0]===255&&p[1]===255&&p[2]===255&&p[3]===255&&p[4]==="p".charCodeAt(0)&&p[5]==="o".charCodeAt(0)&&p[6]==="r".charCodeAt(0)&&p[7]==="t".charCodeAt(0)){var S=p[8]<<8|p[9];j.websocket_sock_ops.removePeer(u,o),o.port=S,j.websocket_sock_ops.addPeer(u,o);return}u.recv_queue.push({addr:o.addr,port:o.port,data:p}),l.websocket.emit("message",u.stream.fd)}Z?(o.socket.on("open",_),o.socket.on("message",function(p,y){y&&m(new Uint8Array(p).buffer)}),o.socket.on("close",function(){l.websocket.emit("close",u.stream.fd)}),o.socket.on("error",function(p){u.error=14,l.websocket.emit("error",[u.stream.fd,u.error,"ECONNREFUSED: Connection refused"])})):(o.socket.onopen=_,o.socket.onclose=function(){l.websocket.emit("close",u.stream.fd)},o.socket.onmessage=function(y){m(y.data)},o.socket.onerror=function(p){u.error=14,l.websocket.emit("error",[u.stream.fd,u.error,"ECONNREFUSED: Connection refused"])})},poll:function(u){if(u.type===1&&u.server)return u.pending.length?65:0;var o=0,c=u.type===1?j.websocket_sock_ops.getPeer(u,u.daddr,u.dport):null;return(u.recv_queue.length||!c||c&&c.socket.readyState===c.socket.CLOSING||c&&c.socket.readyState===c.socket.CLOSED)&&(o|=65),(!c||c&&c.socket.readyState===c.socket.OPEN)&&(o|=4),(c&&c.socket.readyState===c.socket.CLOSING||c&&c.socket.readyState===c.socket.CLOSED)&&(o|=16),o},ioctl:function(u,o,c){switch(o){case 21531:var _=0;return u.recv_queue.length&&(_=u.recv_queue[0].data.length),h[c>>2]=_,0;default:return 28}},close:function(u){if(u.server){try{u.server.close()}catch{}u.server=null}for(var o=Object.keys(u.peers),c=0;c<o.length;c++){var _=u.peers[o[c]];try{_.socket.close()}catch{}j.websocket_sock_ops.removePeer(u,_)}return 0},bind:function(u,o,c){if(typeof u.saddr<"u"||typeof u.sport<"u")throw new e.ErrnoError(28);if(u.saddr=o,u.sport=c,u.type===2){u.server&&(u.server.close(),u.server=null);try{u.sock_ops.listen(u,0)}catch(_){if(!(_ instanceof e.ErrnoError)||_.errno!==138)throw _}}},connect:function(u,o,c){if(u.server)throw new e.ErrnoError(138);if(typeof u.daddr<"u"&&typeof u.dport<"u"){var _=j.websocket_sock_ops.getPeer(u,u.daddr,u.dport);if(_)throw _.socket.readyState===_.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var m=j.websocket_sock_ops.createPeer(u,o,c);throw u.daddr=m.addr,u.dport=m.port,new e.ErrnoError(26)},listen:function(u,o){if(!Z)throw new e.ErrnoError(138);if(u.server)throw new e.ErrnoError(28);var c=Fn().Server,_=u.saddr;l.websocket.serverDecorator&&(c=l.websocket.serverDecorator(c)),u.server=new c({host:_,port:u.sport}),l.websocket.emit("listen",u.stream.fd),u.server.on("connection",function(m){if(u.type===1){var p=j.createSocket(u.family,u.type,u.protocol),y=j.websocket_sock_ops.createPeer(p,m);p.daddr=y.addr,p.dport=y.port,u.pending.push(p),l.websocket.emit("connection",p.stream.fd)}else j.websocket_sock_ops.createPeer(u,m),l.websocket.emit("connection",u.stream.fd)}),u.server.on("close",function(){l.websocket.emit("close",u.stream.fd),u.server=null}),u.server.on("error",function(m){u.error=23,l.websocket.emit("error",[u.stream.fd,u.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(u){if(!u.server||!u.pending.length)throw new e.ErrnoError(28);var o=u.pending.shift();return o.stream.flags=u.stream.flags,o},getname:function(u,o){var c,_;if(o){if(u.daddr===void 0||u.dport===void 0)throw new e.ErrnoError(53);c=u.daddr,_=u.dport}else c=u.saddr||0,_=u.sport||0;return{addr:c,port:_}},sendmsg:function(u,o,c,_,m,p){if(u.type===2){if((m===void 0||p===void 0)&&(m=u.daddr,p=u.dport),m===void 0||p===void 0)throw new e.ErrnoError(17)}else m=u.daddr,p=u.dport;var y=j.websocket_sock_ops.getPeer(u,m,p);if(u.type===1){if(!y||y.socket.readyState===y.socket.CLOSING||y.socket.readyState===y.socket.CLOSED)throw new e.ErrnoError(53);if(y.socket.readyState===y.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(o)&&(c+=o.byteOffset,o=o.buffer);var E;if(E=o.slice(c,c+_),u.type===2&&(!y||y.socket.readyState!==y.socket.OPEN))return(!y||y.socket.readyState===y.socket.CLOSING||y.socket.readyState===y.socket.CLOSED)&&(y=j.websocket_sock_ops.createPeer(u,m,p)),y.dgram_send_queue.push(E),_;try{return y.socket.send(E),_}catch{throw new e.ErrnoError(28)}},recvmsg:function(u,o,c){if(u.type===1&&u.server)throw new e.ErrnoError(53);var _=u.recv_queue.shift();if(!_){if(u.type===1){var m=j.websocket_sock_ops.getPeer(u,u.daddr,u.dport);if(!m)throw new e.ErrnoError(53);if(m.socket.readyState===m.socket.CLOSING||m.socket.readyState===m.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var p=_.data.byteLength||_.data.length,y=_.data.byteOffset||0,E=_.data.buffer||_.data,S=Math.min(o,p),b={buffer:new Uint8Array(E,y,S),addr:_.addr,port:_.port};if(c&2&&(S=0),u.type===1&&S<p){var k=p-S;_.data=new Uint8Array(E,y+S,k),u.recv_queue.unshift(_)}return b}}};function ve(u){var o=j.getSocket(u);if(!o)throw new e.ErrnoError(8);return o}function Kt(u){return h[qr()>>2]=u,u}function lr(u){for(var o=u.split("."),c=0;c<4;c++){var _=Number(o[c]);if(isNaN(_))return null;o[c]=_}return(o[0]|o[1]<<8|o[2]<<16|o[3]<<24)>>>0}function Q(u){return parseInt(u)}function Hr(u){var o,c,_,m,p=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,y=[];if(!p.test(u))return null;if(u==="::")return[0,0,0,0,0,0,0,0];for(u.startsWith("::")?u=u.replace("::","Z:"):u=u.replace("::",":Z:"),u.indexOf(".")>0?(u=u.replace(new RegExp("[.]","g"),":"),o=u.split(":"),o[o.length-4]=Q(o[o.length-4])+Q(o[o.length-3])*256,o[o.length-3]=Q(o[o.length-2])+Q(o[o.length-1])*256,o=o.slice(0,o.length-2)):o=u.split(":"),_=0,m=0,c=0;c<o.length;c++)if(typeof o[c]=="string")if(o[c]==="Z"){for(m=0;m<8-o.length+1;m++)y[c+m]=0;_=m-1}else y[c+_]=mn(parseInt(o[c],16));else y[c+_]=o[c];return[y[1]<<16|y[0],y[3]<<16|y[2],y[5]<<16|y[4],y[7]<<16|y[6]]}function rr(u,o,c,_,m){switch(o){case 2:c=lr(c),Pr(u,16),m&&(h[m>>2]=16),Ee[u>>1]=o,h[u+4>>2]=c,Ee[u+2>>1]=mn(_);break;case 10:c=Hr(c),Pr(u,28),m&&(h[m>>2]=28),h[u>>2]=o,h[u+8>>2]=c[0],h[u+12>>2]=c[1],h[u+16>>2]=c[2],h[u+20>>2]=c[3],Ee[u+2>>1]=mn(_);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(u){var o=lr(u);if(o!==null||(o=Hr(u),o!==null))return u;var c;if(ee.address_map.addrs[u])c=ee.address_map.addrs[u];else{var _=ee.address_map.id++;Ne(_<65535,"exceeded max address mappings of 65535"),c="172.29."+(_&255)+"."+(_&65280),ee.address_map.names[c]=u,ee.address_map.addrs[u]=c}return c},lookup_addr:function(u){return ee.address_map.names[u]?ee.address_map.names[u]:null}};function oo(u,o,c,_){try{var m=ve(u),p=m.sock_ops.accept(m);if(o)var y=rr(o,p.family,ee.lookup_name(p.daddr),p.dport,c);return p.stream.fd}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function Or(u){return(u&255)+"."+(u>>8&255)+"."+(u>>16&255)+"."+(u>>24&255)}function en(u){var o="",c=0,_=0,m=0,p=0,y=0,E=0,S=[u[0]&65535,u[0]>>16,u[1]&65535,u[1]>>16,u[2]&65535,u[2]>>16,u[3]&65535,u[3]>>16],b=!0,k="";for(E=0;E<5;E++)if(S[E]!==0){b=!1;break}if(b){if(k=Or(S[6]|S[7]<<16),S[5]===-1)return o="::ffff:",o+=k,o;if(S[5]===0)return o="::",k==="0.0.0.0"&&(k=""),k==="0.0.0.1"&&(k="1"),o+=k,o}for(c=0;c<8;c++)S[c]===0&&(c-m>1&&(y=0),m=c,y++),y>_&&(_=y,p=c-_+1);for(c=0;c<8;c++){if(_>1&&S[c]===0&&c>=p&&c<p+_){c===p&&(o+=":",p===0&&(o+=":"));continue}o+=Number(un(S[c]&65535)).toString(16),o+=c<7?":":""}return o}function wt(u,o){var c=Ee[u>>1],_=un(st[u+2>>1]),m;switch(c){case 2:if(o!==16)return{errno:28};m=h[u+4>>2],m=Or(m);break;case 10:if(o!==28)return{errno:28};m=[h[u+8>>2],h[u+12>>2],h[u+16>>2],h[u+20>>2]],m=en(m);break;default:return{errno:5}}return{family:c,addr:m,port:_}}function Mr(u,o,c){if(c&&u===0)return null;var _=wt(u,o);if(_.errno)throw new e.ErrnoError(_.errno);return _.addr=ee.lookup_addr(_.addr)||_.addr,_}function io(u,o,c){try{var _=ve(u),m=Mr(o,c);return _.sock_ops.bind(_,m.addr,m.port),0}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function ao(u){try{return u=N.getStr(u),e.chdir(u),0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function so(u,o){try{return u=N.getStr(u),e.chmod(u,o),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function uo(u,o,c){try{var _=ve(u),m=Mr(o,c);return _.sock_ops.connect(_,m.addr,m.port),0}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function fo(u){try{var o=N.getStreamFromFD(u);return e.createStream(o,0).fd}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function co(u,o,c){try{var _=N.getStreamFromFD(u);if(_.fd===o)return-28;var m=e.getStream(o);return m&&e.close(m),e.createStream(_,o,o+1).fd}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function lo(u,o,c,_){try{if(o=N.getStr(o),o=N.calculateAt(u,o),c&-8)return-28;var m=e.lookupPath(o,{follow:!0}),p=m.node;if(!p)return-44;var y="";return c&4&&(y+="r"),c&2&&(y+="w"),c&1&&(y+="x"),y&&e.nodePermissions(p,y)?-2:0}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function Xr(u,o){return o+2097152>>>0<4194305-!!u?(u>>>0)+o*4294967296:NaN}function _o(u,o,c,_,m,p){try{var y=Xr(c,_);if(isNaN(y))return-61;var E=Xr(m,p);if(isNaN(E))return-61;var S=N.getStreamFromFD(u);return e.allocate(S,y,E),0}catch(b){if(typeof e>"u"||!(b instanceof e.ErrnoError))throw b;return-b.errno}}function vo(u,o){try{return e.fchmod(u,o),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function mo(u,o,c){try{return e.fchown(u,o,c),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function po(u,o,c,_,m){try{o=N.getStr(o);var p=m&256;return m=m&-257,o=N.calculateAt(u,o),(p?e.lchown:e.chown)(o,c,_),0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function rn(u,o,c){N.varargs=c;try{var _=N.getStreamFromFD(u);switch(o){case 0:{var m=N.get();if(m<0)return-28;var p;return p=e.createStream(_,m),p.fd}case 1:case 2:return 0;case 3:return _.flags;case 4:{var m=N.get();return _.flags|=m,0}case 5:{var m=N.get(),y=0;return Ee[m+y>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function ho(u){try{var o=N.getStreamFromFD(u);return 0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function yo(u,o){try{var c=N.getStreamFromFD(u);return N.doStat(e.stat,c.path,o)}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function wo(u,o,c){try{var _=Xr(o,c);return isNaN(_)?-61:(e.ftruncate(u,_),0)}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Eo(u,o){try{if(o===0)return-28;var c=e.cwd(),_=Pe(c)+1;return o<_?-68:(Ae(c,u,o),_)}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function go(u,o,c){try{var _=N.getStreamFromFD(u);_.getdents||(_.getdents=e.readdir(_.path));for(var m=280,p=0,y=e.llseek(_,0,1),E=Math.floor(y/m);E<_.getdents.length&&p+m<=c;){var S,b,k=_.getdents[E];if(k===".")S=_.node.id,b=4;else if(k===".."){var D=e.lookupPath(_.path,{parent:!0});S=D.node.id,b=4}else{var T=e.lookupNode(_.node,k);S=T.id,b=e.isChrdev(T.mode)?2:e.isDir(T.mode)?4:e.isLink(T.mode)?10:8}q=[S>>>0,(P=S,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[o+p>>2]=q[0],h[o+p+4>>2]=q[1],q=[(E+1)*m>>>0,(P=(E+1)*m,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[o+p+8>>2]=q[0],h[o+p+12>>2]=q[1],Ee[o+p+16>>1]=280,$[o+p+18>>0]=b,Ae(k,o+p+19,256),p+=m,E+=1}return e.llseek(_,E*m,0),p}catch(C){if(typeof e>"u"||!(C instanceof e.ErrnoError))throw C;return-C.errno}}function So(u,o,c){try{var _=ve(u);if(!_.daddr)return-53;var m=rr(o,_.family,ee.lookup_name(_.daddr),_.dport,c);return 0}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function bo(u,o,c){try{ce("__syscall_getsockname "+u);var _=ve(u),m=rr(o,_.family,ee.lookup_name(_.saddr||"0.0.0.0"),_.sport,c);return 0}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function ko(u,o,c,_,m){try{var p=ve(u);return o===1&&c===4?(h[_>>2]=p.error,h[m>>2]=4,p.error=null,0):-50}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function Do(u,o,c){N.varargs=c;try{var _=N.getStreamFromFD(u);switch(o){case 21509:case 21505:return _.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return _.tty?0:-59;case 21519:{if(!_.tty)return-59;var m=N.get();return h[m>>2]=0,0}case 21520:return _.tty?-28:-59;case 21531:{var m=N.get();return e.ioctl(_,o,m)}case 21523:return _.tty?0:-59;case 21524:return _.tty?0:-59;default:return-28}}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function Oo(u,o){try{var c=ve(u);return c.sock_ops.listen(c,o),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function No(u,o){try{return u=N.getStr(u),N.doStat(e.lstat,u,o)}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function To(u,o,c){try{return o=N.getStr(o),o=N.calculateAt(u,o),o=U.normalize(o),o[o.length-1]==="/"&&(o=o.substr(0,o.length-1)),e.mkdir(o,c,0),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function se(u,o,c,_){try{o=N.getStr(o);var m=_&256,p=_&4096;return _=_&-4353,o=N.calculateAt(u,o,p),N.doStat(m?e.lstat:e.stat,o,c)}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function Co(u,o,c,_){N.varargs=_;try{o=N.getStr(o),o=N.calculateAt(u,o);var m=_?N.get():0;return e.open(o,c,m).fd}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}var pe={BUCKET_BUFFER_SIZE:8192,mount:function(u){return e.createNode(null,"/",16895,0)},createPipe:function(){var u={buckets:[],refcnt:2};u.buckets.push({buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var o=pe.nextname(),c=pe.nextname(),_=e.createNode(pe.root,o,4096,0),m=e.createNode(pe.root,c,4096,0);_.pipe=u,m.pipe=u;var p=e.createStream({path:o,node:_,flags:0,seekable:!1,stream_ops:pe.stream_ops});_.stream=p;var y=e.createStream({path:c,node:m,flags:1,seekable:!1,stream_ops:pe.stream_ops});return m.stream=y,{readable_fd:p.fd,writable_fd:y.fd}},stream_ops:{poll:function(u){var o=u.node.pipe;if((u.flags&2097155)===1)return 260;if(o.buckets.length>0)for(var c=0;c<o.buckets.length;c++){var _=o.buckets[c];if(_.offset-_.roffset>0)return 65}return 0},ioctl:function(u,o,c){return 28},fsync:function(u){return 28},read:function(u,o,c,_,m){for(var p=u.node.pipe,y=0,E=0;E<p.buckets.length;E++){var S=p.buckets[E];y+=S.offset-S.roffset}Ne(o instanceof ArrayBuffer||ArrayBuffer.isView(o));var b=o.subarray(c,c+_);if(_<=0)return 0;if(y==0)throw new e.ErrnoError(6);for(var k=Math.min(y,_),D=k,T=0,E=0;E<p.buckets.length;E++){var C=p.buckets[E],A=C.offset-C.roffset;if(k<=A){var I=C.buffer.subarray(C.roffset,C.offset);k<A?(I=I.subarray(0,k),C.roffset+=k):T++,b.set(I);break}else{var I=C.buffer.subarray(C.roffset,C.offset);b.set(I),b=b.subarray(I.byteLength),k-=I.byteLength,T++}}return T&&T==p.buckets.length&&(T--,p.buckets[T].offset=0,p.buckets[T].roffset=0),p.buckets.splice(0,T),D},write:function(u,o,c,_,m){var p=u.node.pipe;Ne(o instanceof ArrayBuffer||ArrayBuffer.isView(o));var y=o.subarray(c,c+_),E=y.byteLength;if(E<=0)return 0;var S=null;p.buckets.length==0?(S={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0},p.buckets.push(S)):S=p.buckets[p.buckets.length-1],Ne(S.offset<=pe.BUCKET_BUFFER_SIZE);var b=pe.BUCKET_BUFFER_SIZE-S.offset;if(b>=E)return S.buffer.set(y,S.offset),S.offset+=E,E;b>0&&(S.buffer.set(y.subarray(0,b),S.offset),S.offset+=b,y=y.subarray(b,y.byteLength));for(var k=y.byteLength/pe.BUCKET_BUFFER_SIZE|0,D=y.byteLength%pe.BUCKET_BUFFER_SIZE,T=0;T<k;T++){var C={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:pe.BUCKET_BUFFER_SIZE,roffset:0};p.buckets.push(C),C.buffer.set(y.subarray(0,pe.BUCKET_BUFFER_SIZE)),y=y.subarray(pe.BUCKET_BUFFER_SIZE,y.byteLength)}if(D>0){var C={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:y.byteLength,roffset:0};p.buckets.push(C),C.buffer.set(y)}return E},close:function(u){var o=u.node.pipe;o.refcnt--,o.refcnt===0&&(o.buckets=null)}},nextname:function(){return pe.nextname.current||(pe.nextname.current=0),"pipe["+pe.nextname.current+++"]"}};function Fo(u){try{if(u==0)throw new e.ErrnoError(21);var o=pe.createPipe();return h[u>>2]=o.readable_fd,h[u+4>>2]=o.writable_fd,0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Ao(u,o,c){try{for(var _=0,m=0;m<o;m++){var p=u+8*m,y=h[p>>2],E=Ee[p+4>>1],S=32,b=e.getStream(y);b&&(S=N.DEFAULT_POLLMASK,b.stream_ops?.poll&&(S=b.stream_ops.poll(b))),S&=E|8|16,S&&_++,Ee[p+6>>1]=S}return _}catch(k){if(typeof e>"u"||!(k instanceof e.ErrnoError))throw k;return-k.errno}}function Po(u,o,c,_){try{if(o=N.getStr(o),o=N.calculateAt(u,o),_<=0)return-28;var m=e.readlink(o),p=Math.min(_,Pe(m)),y=$[c+p];return Ae(m,c,_+1),$[c+p]=y,p}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function Ro(u,o,c,_,m,p){try{var y=ve(u),E=y.sock_ops.recvmsg(y,c,typeof _<"u"?_:0);if(!E)return 0;if(m)var S=rr(m,y.family,ee.lookup_name(E.addr),E.port,p);return de.set(E.buffer,o),E.buffer.byteLength}catch(b){if(typeof e>"u"||!(b instanceof e.ErrnoError))throw b;return-b.errno}}function Mo(u,o,c,_){try{return o=N.getStr(o),_=N.getStr(_),o=N.calculateAt(u,o),_=N.calculateAt(c,_),e.rename(o,_),0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Lo(u){try{return u=N.getStr(u),e.rmdir(u),0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Io(u,o,c,_,m,p){try{var y=ve(u),E=Mr(m,p,!0);return E?y.sock_ops.sendmsg(y,$,o,c,E.addr,E.port):e.write(y.stream,$,o,c)}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function Uo(u,o,c){try{var _=j.createSocket(u,o,c);return _.stream.fd}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Bo(u,o){try{return u=N.getStr(u),N.doStat(e.stat,u,o)}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function xo(u,o,c){try{return u=N.getStr(u),h[c+4>>2]=4096,h[c+40>>2]=4096,h[c+8>>2]=1e6,h[c+12>>2]=5e5,h[c+16>>2]=5e5,h[c+20>>2]=e.nextInode,h[c+24>>2]=1e6,h[c+28>>2]=42,h[c+44>>2]=2,h[c+36>>2]=255,0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Br(u,o){try{return u=N.getStr(u),o=N.getStr(o),e.symlink(u,o),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Ho(u,o,c){try{return o=N.getStr(o),o=N.calculateAt(u,o),c===0?e.unlink(o):c===512?e.rmdir(o):ue("Invalid flags passed to unlinkat"),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function $r(u){return H[u>>2]+h[u+4>>2]*4294967296}function tn(u,o,c,_){try{if(o=N.getStr(o),o=N.calculateAt(u,o,!0),c){var y=$r(c),E=h[c+8>>2];m=y*1e3+E/(1e3*1e3),c+=16,y=$r(c),E=h[c+8>>2],p=y*1e3+E/(1e3*1e3)}else var m=Date.now(),p=m;return e.utime(o,m,p),0}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function zo(u){}var _n="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function Wo(u,o){ue(_n)}function jo(u,o){ue(_n)}var Yo=!0;function qo(){return Yo}function Vo(){throw 1/0}function Ko(u,o){var c=new Date($r(u)*1e3);h[o>>2]=c.getUTCSeconds(),h[o+4>>2]=c.getUTCMinutes(),h[o+8>>2]=c.getUTCHours(),h[o+12>>2]=c.getUTCDate(),h[o+16>>2]=c.getUTCMonth(),h[o+20>>2]=c.getUTCFullYear()-1900,h[o+24>>2]=c.getUTCDay();var _=Date.UTC(c.getUTCFullYear(),0,1,0,0,0,0),m=(c.getTime()-_)/(1e3*60*60*24)|0;h[o+28>>2]=m}function Go(u,o){var c=new Date($r(u)*1e3);h[o>>2]=c.getSeconds(),h[o+4>>2]=c.getMinutes(),h[o+8>>2]=c.getHours(),h[o+12>>2]=c.getDate(),h[o+16>>2]=c.getMonth(),h[o+20>>2]=c.getFullYear()-1900,h[o+24>>2]=c.getDay();var _=new Date(c.getFullYear(),0,1),m=(c.getTime()-_.getTime())/(1e3*60*60*24)|0;h[o+28>>2]=m,h[o+36>>2]=-(c.getTimezoneOffset()*60);var p=new Date(c.getFullYear(),6,1).getTimezoneOffset(),y=_.getTimezoneOffset(),E=(p!=y&&c.getTimezoneOffset()==Math.min(y,p))|0;h[o+32>>2]=E}function Xo(u){var o=new Date(h[u+20>>2]+1900,h[u+16>>2],h[u+12>>2],h[u+8>>2],h[u+4>>2],h[u>>2],0),c=h[u+32>>2],_=o.getTimezoneOffset(),m=new Date(o.getFullYear(),0,1),p=new Date(o.getFullYear(),6,1).getTimezoneOffset(),y=m.getTimezoneOffset(),E=Math.min(y,p);if(c<0)h[u+32>>2]=+(p!=y&&E==_);else if(c>0!=(E==_)){var S=Math.max(y,p),b=c>0?E:S;o.setTime(o.getTime()+(b-_)*6e4)}h[u+24>>2]=o.getDay();var k=(o.getTime()-m.getTime())/(1e3*60*60*24)|0;return h[u+28>>2]=k,h[u>>2]=o.getSeconds(),h[u+4>>2]=o.getMinutes(),h[u+8>>2]=o.getHours(),h[u+12>>2]=o.getDate(),h[u+16>>2]=o.getMonth(),h[u+20>>2]=o.getYear(),o.getTime()/1e3|0}function nn(u,o,c,_,m,p){try{var y=N.getStreamFromFD(_),E=e.mmap(y,u,m,o,c),S=E.ptr;return h[p>>2]=E.allocated,S}catch(b){if(typeof e>"u"||!(b instanceof e.ErrnoError))throw b;return-b.errno}}function $o(u,o,c,_,m,p){try{var y=N.getStreamFromFD(m);c&2&&N.doMsync(u,y,o,_,p),e.munmap(y)}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function zr(u){var o=Pe(u)+1,c=kr(o);return c&&Xe(u,$,c,o),c}function Zo(u,o,c){var _=new Date().getFullYear(),m=new Date(_,0,1),p=new Date(_,6,1),y=m.getTimezoneOffset(),E=p.getTimezoneOffset(),S=Math.max(y,E);h[u>>2]=S*60,h[o>>2]=+(y!=E);function b(A){var I=A.toTimeString().match(/\(([A-Za-z ]+)\)$/);return I?I[1]:"GMT"}var k=b(m),D=b(p),T=zr(k),C=zr(D);E<y?(H[c>>2]=T,H[c+4>>2]=C):(H[c>>2]=C,H[c+4>>2]=T)}function It(u,o,c){It.called||(It.called=!0,Zo(u,o,c))}function on(){ue("")}function Jo(){return Date.now()}function Wr(){return 2147483648}function Qo(){return Wr()}var Ut;Z?Ut=()=>{var u=process.hrtime();return u[0]*1e3+u[1]/1e6}:Ut=()=>performance.now();function ei(u,o,c){de.copyWithin(u,o,o+c)}function wn(u){try{return or.grow(u-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ri(u){var o=de.length;u=u>>>0;var c=Wr();if(u>c)return!1;let _=(S,b)=>S+(b-S%b)%b;for(var m=1;m<=4;m*=2){var p=o*(1+.2/m);p=Math.min(p,u+100663296);var y=Math.min(c,_(Math.max(u,p),65536)),E=wn(y);if(E)return!0}return!1}function Et(u){Ge=u,_r()||(l.onExit&&l.onExit(u),Ce=!0),te(u,new mr(u))}function ti(u,o){Ge=u,_r()||Yn(),Et(u)}var gt=ti;function et(){if(!_r())try{gt(Ge)}catch(u){pt(u)}}function jr(u){if(!(_t||Ce))try{u(),et()}catch(o){pt(o)}}function Bt(){Fr+=1}function xt(){Fr-=1}function rt(u,o){return Bt(),setTimeout(function(){xt(),jr(u)},o)}function ni(u){return ke.handleSleep(o=>rt(o,u))}var dr=O.ENV||{};function tt(){return J||"./this.program"}function Ir(){if(!Ir.strings){var u=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",o={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:u,_:tt()};for(var c in dr)dr[c]===void 0?delete o[c]:o[c]=dr[c];var _=[];for(var c in o)_.push(c+"="+o[c]);Ir.strings=_}return Ir.strings}function Ht(u,o,c){for(var _=0;_<u.length;++_)$[o++>>0]=u.charCodeAt(_);c||($[o>>0]=0)}function oi(u,o){var c=0;return Ir().forEach(function(_,m){var p=o+c;H[u+m*4>>2]=p,Ht(_,p),c+=_.length+1}),0}function ii(u,o){var c=Ir();H[u>>2]=c.length;var _=0;return c.forEach(function(m){_+=m.length+1}),H[o>>2]=_,0}function ai(u){try{var o=N.getStreamFromFD(u);return e.close(o),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return c.errno}}function si(u,o){try{var c=N.getStreamFromFD(u),_=c.tty?2:e.isDir(c.mode)?3:e.isLink(c.mode)?7:4;return $[o>>0]=_,0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return m.errno}}function ui(u,o,c,_){for(var m=0,p=0;p<c;p++){var y=H[o>>2],E=H[o+4>>2];o+=8;var S=e.read(u,$,y,E,_);if(S<0)return-1;if(m+=S,S<E)break}return m}function fi(u,o,c,_){try{var m=N.getStreamFromFD(u),p=ui(m,o,c);return H[_>>2]=p,0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return y.errno}}function ci(u,o,c,_,m){try{var p=Xr(o,c);if(isNaN(p))return 61;var y=N.getStreamFromFD(u);return e.llseek(y,p,_),q=[y.position>>>0,(P=y.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[m>>2]=q[0],h[m+4>>2]=q[1],y.getdents&&p===0&&_===0&&(y.getdents=null),0}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return E.errno}}function li(u){try{var o=N.getStreamFromFD(u);return ke.handleSleep(function(c){var _=o.node.mount;if(!_.type.syncfs){c(0);return}_.type.syncfs(_,!1,function(m){if(m){c(function(){return 29});return}c(0)})})}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return c.errno}}function vn(u,o,c,_){for(var m=0,p=0;p<c;p++){var y=H[o>>2],E=H[o+4>>2];o+=8;var S=e.write(u,$,y,E,_);if(S<0)return-1;m+=S}return m}function An(u,o,c,_){try{var m=N.getStreamFromFD(u),p=vn(m,o,c);return H[_>>2]=p,0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return y.errno}}function Dn(u,o,c,_){var m=0,p=0,y=0,E=0,S=0,b=0,k;function D(T,C,A,I,z,K){var B,x,G,re;return x=T===10?28:16,z=T===10?en(z):Or(z),B=kr(x),re=rr(B,T,z,K),Ne(!re),G=kr(32),h[G+4>>2]=T,h[G+8>>2]=C,h[G+12>>2]=A,h[G+24>>2]=I,H[G+20>>2]=B,T===10?h[G+16>>2]=28:h[G+16>>2]=16,h[G+28>>2]=0,G}if(c&&(y=h[c>>2],E=h[c+4>>2],S=h[c+8>>2],b=h[c+12>>2]),S&&!b&&(b=S===2?17:6),!S&&b&&(S=b===17?2:1),b===0&&(b=6),S===0&&(S=1),!u&&!o)return-2;if(y&-1088||c!==0&&h[c>>2]&2&&!u)return-1;if(y&32)return-2;if(S!==0&&S!==1&&S!==2)return-7;if(E!==0&&E!==2&&E!==10)return-6;if(o&&(o=ne(o),p=parseInt(o,10),isNaN(p)))return y&1024?-2:-8;if(!u)return E===0&&(E=2),y&1||(E===2?m=fn(2130706433):m=[0,0,0,1]),k=D(E,S,b,null,m,p),H[_>>2]=k,0;if(u=ne(u),m=lr(u),m!==null)if(E===0||E===2)E=2;else if(E===10&&y&8)m=[0,0,fn(65535),m],E=10;else return-2;else if(m=Hr(u),m!==null)if(E===0||E===10)E=10;else return-2;return m!=null?(k=D(E,S,b,u,m,p),H[_>>2]=k,0):y&4?-2:(u=ee.lookup_name(u),m=lr(u),E===0?E=2:E===10&&(m=[0,0,fn(65535),m]),k=D(E,S,b,null,m,p),H[_>>2]=k,0)}function di(){ce("missing function: getcontext"),ue(-1)}function _i(u){var o=kr(20),c=kr(u.length+1);Ae(u,c,u.length+1),H[o>>2]=c;var _=kr(4);H[_>>2]=0,H[o+4>>2]=_;var m=2;h[o+8>>2]=m,h[o+12>>2]=4;var p=kr(12);return H[p>>2]=p+8,H[p+4>>2]=0,h[p+8>>2]=lr(ee.lookup_name(u)),H[o+16>>2]=p,o}function En(u){return _i(ne(u))}function Jr(u,o,c,_,m,p){var y=En(u);return nt(o,y,20),Zt(y),h[p>>2]=0,H[m>>2]=o,0}function St(u,o){for(var c=Math.min(o,3),_=8,m=0;m<c;m++)ut[u+m*_>>3]=.1;return c}function zt(u,o,c,_,m,p,y){var E=wt(u,o);if(E.errno)return-6;var S=E.port,b=E.addr,k=!1;if(c&&_){var D;if(y&1||!(D=ee.lookup_addr(b))){if(y&8)return-2}else b=D;var T=Ae(b,c,_);T+1>=_&&(k=!0)}if(m&&p){S=""+S;var T=Ae(S,m,p);T+1>=p&&(k=!0)}return k?-12:0}var Wt={list:[],map:{}};function br(u){function o(p,y,E){var S=kr(p.length+1);Ht(p,S);for(var b=0,k=E.length,D=kr((k+1)*4),T=0;T<k;T++,b+=4){var C=E[T],A=kr(C.length+1);Ht(C,A),H[D+b>>2]=A}H[D+b>>2]=0;var I=kr(12);return H[I>>2]=S,H[I+4>>2]=D,h[I+8>>2]=y,I}var c=Wt.list,_=Wt.map;if(c.length===0){var m=o("tcp",6,["TCP"]);c.push(m),_.tcp=_[6]=m,m=o("udp",17,["UDP"]),c.push(m),_.udp=_[17]=m}br.index=0}function je(u){u=ne(u),br(!0);var o=Wt.map[u];return o}function Nr(u){br(!0);var o=Wt.map[u];return o}function Ue(u){var o=Pe(u)+1,c=ur(o);return Xe(u,$,c,o),c}var ir={getAllWebSockets:function(u){let o=new Set;u.server&&u.server.clients.forEach(c=>{o.add(c)});for(let c of ir.getAllPeers(u))o.add(c.socket);return Array.from(o)},getAllPeers:function(u){let o=new Set;if(u.server&&u.pending.filter(c=>c.peers).forEach(c=>{for(let _ of Object.values(c.peers))o.add(_)}),u.peers)for(let c of Object.values(u.peers))o.add(c);return Array.from(o)},awaitData:function(u){return ir.awaitWsEvent(u,"message")},awaitConnection:function(u){return u.OPEN===u.readyState?[Promise.resolve(),ir.noop]:ir.awaitWsEvent(u,"open")},awaitClose:function(u){return[u.CLOSING,u.CLOSED].includes(u.readyState)?[Promise.resolve(),ir.noop]:ir.awaitWsEvent(u,"close")},awaitError:function(u){return[u.CLOSING,u.CLOSED].includes(u.readyState)?[Promise.resolve(),ir.noop]:ir.awaitWsEvent(u,"error")},awaitWsEvent:function(u,o){let c,_=()=>{c()};return[new Promise(function(y){c=y,u.once(o,_)}),()=>{u.removeListener(o,_),setTimeout(c)}]},noop:function(){},shutdownSocket:function(u,o){let c=ve(u),_=Object.values(c.peers)[0];if(!_)return-1;try{return _.socket.close(),j.websocket_sock_ops.removePeer(c,_),0}catch(m){return console.log("Socket shutdown error",m),-1}}};function qe(u,o,c){if(!u)return 1;let _=ne(u);if(!_.length)return 0;let m=ne(o);if(!m.length)return 0;if(l.popen_to_file){let{path:p,exitCode:y}=l.popen_to_file(_,m);return de[c]=y,Ue(p)}if(Z){let p=require("os").tmpdir(),y="php-process-stream",E=p+"/"+y,S=require("child_process"),b;if(m==="r")b=S.spawnSync(_,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[c]=b.status,require("fs").writeFileSync(E,b.stdout,{encoding:"utf8",flag:"w+"});else return m==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+m+" (should be r or w)"),_W_EXITCODE(0,2));return Ue(E)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function Er(){ce("missing function: makecontext"),ue(-1)}function fr(u){return u%4===0&&(u%100!==0||u%400===0)}function Tr(u,o){for(var c=0,_=0;_<=o;c+=u[_++]);return c}var Yr=[31,29,31,30,31,30,31,31,30,31,30,31],jt=[31,28,31,30,31,30,31,31,30,31,30,31];function Yt(u,o){for(var c=new Date(u.getTime());o>0;){var _=fr(c.getFullYear()),m=c.getMonth(),p=(_?Yr:jt)[m];if(o>p-c.getDate())o-=p-c.getDate()+1,c.setDate(1),m<11?c.setMonth(m+1):(c.setMonth(0),c.setFullYear(c.getFullYear()+1));else return c.setDate(c.getDate()+o),c}return c}function Gt(u,o,c,_){var m=h[_+40>>2],p={tm_sec:h[_>>2],tm_min:h[_+4>>2],tm_hour:h[_+8>>2],tm_mday:h[_+12>>2],tm_mon:h[_+16>>2],tm_year:h[_+20>>2],tm_wday:h[_+24>>2],tm_yday:h[_+28>>2],tm_isdst:h[_+32>>2],tm_gmtoff:h[_+36>>2],tm_zone:m?ne(m):""},y=ne(c),E={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var S in E)y=y.replace(new RegExp(S,"g"),E[S]);var b=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],k=["January","February","March","April","May","June","July","August","September","October","November","December"];function D(B,x,G){for(var re=typeof B=="number"?B.toString():B||"";re.length<x;)re=G[0]+re;return re}function T(B,x){return D(B,x,"0")}function C(B,x){function G(oe){return oe<0?-1:oe>0?1:0}var re;return(re=G(B.getFullYear()-x.getFullYear()))===0&&(re=G(B.getMonth()-x.getMonth()))===0&&(re=G(B.getDate()-x.getDate())),re}function A(B){switch(B.getDay()){case 0:return new Date(B.getFullYear()-1,11,29);case 1:return B;case 2:return new Date(B.getFullYear(),0,3);case 3:return new Date(B.getFullYear(),0,2);case 4:return new Date(B.getFullYear(),0,1);case 5:return new Date(B.getFullYear()-1,11,31);case 6:return new Date(B.getFullYear()-1,11,30)}}function I(B){var x=Yt(new Date(B.tm_year+1900,0,1),B.tm_yday),G=new Date(x.getFullYear(),0,4),re=new Date(x.getFullYear()+1,0,4),oe=A(G),le=A(re);return C(oe,x)<=0?C(le,x)<=0?x.getFullYear()+1:x.getFullYear():x.getFullYear()-1}var z={"%a":function(B){return b[B.tm_wday].substring(0,3)},"%A":function(B){return b[B.tm_wday]},"%b":function(B){return k[B.tm_mon].substring(0,3)},"%B":function(B){return k[B.tm_mon]},"%C":function(B){var x=B.tm_year+1900;return T(x/100|0,2)},"%d":function(B){return T(B.tm_mday,2)},"%e":function(B){return D(B.tm_mday,2," ")},"%g":function(B){return I(B).toString().substring(2)},"%G":function(B){return I(B)},"%H":function(B){return T(B.tm_hour,2)},"%I":function(B){var x=B.tm_hour;return x==0?x=12:x>12&&(x-=12),T(x,2)},"%j":function(B){return T(B.tm_mday+Tr(fr(B.tm_year+1900)?Yr:jt,B.tm_mon-1),3)},"%m":function(B){return T(B.tm_mon+1,2)},"%M":function(B){return T(B.tm_min,2)},"%n":function(){return`
|
|
13
|
-
`},"%p":function(B){return B.tm_hour>=0&&B.tm_hour<12?"AM":"PM"},"%S":function(B){return T(B.tm_sec,2)},"%t":function(){return" "},"%u":function(B){return B.tm_wday||7},"%U":function(B){var x=B.tm_yday+7-B.tm_wday;return T(Math.floor(x/7),2)},"%V":function(B){var x=Math.floor((B.tm_yday+7-(B.tm_wday+6)%7)/7);if((B.tm_wday+371-B.tm_yday-2)%7<=2&&x++,x){if(x==53){var re=(B.tm_wday+371-B.tm_yday)%7;re!=4&&(re!=3||!fr(B.tm_year))&&(x=1)}}else{x=52;var G=(B.tm_wday+7-B.tm_yday-1)%7;(G==4||G==5&&fr(B.tm_year%400-1))&&x++}return T(x,2)},"%w":function(B){return B.tm_wday},"%W":function(B){var x=B.tm_yday+7-(B.tm_wday+6)%7;return T(Math.floor(x/7),2)},"%y":function(B){return(B.tm_year+1900).toString().substring(2)},"%Y":function(B){return B.tm_year+1900},"%z":function(B){var x=B.tm_gmtoff,G=x>=0;return x=Math.abs(x)/60,x=x/60*100+x%60,(G?"+":"-")+("0000"+x).slice(-4)},"%Z":function(B){return B.tm_zone},"%%":function(){return"%"}};y=y.replace(/%%/g,"\0\0");for(var S in z)y.includes(S)&&(y=y.replace(new RegExp(S,"g"),z[S](p)));y=y.replace(/\0\0/g,"%");var K=Je(y,!1);return K.length>o?0:(ht(K,u),K.length-1)}function be(u,o,c){for(var _=ne(o),m="\\!@#$^&*()+=-[]/{}|:<>?,.",p=0,y=m.length;p<y;++p)_=_.replace(new RegExp("\\"+m[p],"g"),"\\"+m[p]);var E={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var S in E)_=_.replace(S,E[S]);var b={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},k={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},D={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},T={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var C in b)_=_.replace(C,"("+C+b[C]+")");for(var A=[],p=_.indexOf("%");p>=0;p=_.indexOf("%"))A.push(_[p+1]),_=_.replace(new RegExp("\\%"+_[p+1],"g"),"");var I=new RegExp("^"+_,"i").exec(ne(u));function z(){function dn(Pi,Bi,ua){return typeof Pi!="number"||isNaN(Pi)?Bi:Pi>=Bi?Pi<=ua?Pi:ua:Bi}return{year:dn(h[c+20>>2]+1900,1970,9999),month:dn(h[c+16>>2],0,11),day:dn(h[c+12>>2],1,31),hour:dn(h[c+8>>2],0,23),min:dn(h[c+4>>2],0,59),sec:dn(h[c>>2],0,59)}}if(I){var K=z(),B,x=dn=>{var Pi=A.indexOf(dn);if(Pi>=0)return I[Pi+1]};if((B=x("S"))&&(K.sec=Q(B)),(B=x("M"))&&(K.min=Q(B)),B=x("H"))K.hour=Q(B);else if(B=x("I")){var G=Q(B);(B=x("p"))&&(G+=B.toUpperCase()[0]==="P"?12:0),K.hour=G}if(B=x("Y"))K.year=Q(B);else if(B=x("y")){var re=Q(B);(B=x("C"))?re+=Q(B)*100:re+=re<69?2e3:1900,K.year=re}if((B=x("m"))?K.month=Q(B)-1:(B=x("b"))&&(K.month=k[B.substring(0,3).toUpperCase()]||0),B=x("d"))K.day=Q(B);else if(B=x("j"))for(var oe=Q(B),le=fr(K.year),he=0;he<12;++he){var ze=Tr(le?Yr:jt,he-1);oe<=ze+(le?Yr:jt)[he]&&(K.day=oe-ze)}else if(B=x("a")){var Ve=B.substring(0,3).toUpperCase();if(B=x("U")){var Dr=D[Ve],yr=Q(B),Vr=new Date(K.year,0,1),Kr;Vr.getDay()===0?Kr=Yt(Vr,Dr+7*(yr-1)):Kr=Yt(Vr,7-Vr.getDay()+Dr+7*(yr-1)),K.day=Kr.getDate(),K.month=Kr.getMonth()}else if(B=x("W")){var Dr=T[Ve],yr=Q(B),Vr=new Date(K.year,0,1),Kr;Vr.getDay()===1?Kr=Yt(Vr,Dr+7*(yr-1)):Kr=Yt(Vr,7-Vr.getDay()+1+Dr+7*(yr-1)),K.day=Kr.getDate(),K.month=Kr.getMonth()}}var Jt=new Date(K.year,K.month,K.day,K.hour,K.min,K.sec,0);return h[c>>2]=Jt.getSeconds(),h[c+4>>2]=Jt.getMinutes(),h[c+8>>2]=Jt.getHours(),h[c+12>>2]=Jt.getDate(),h[c+16>>2]=Jt.getMonth(),h[c+20>>2]=Jt.getFullYear()-1900,h[c+24>>2]=Jt.getDay(),h[c+28>>2]=Tr(fr(Jt.getFullYear())?Yr:jt,Jt.getMonth()-1)+Jt.getDate()-1,h[c+32>>2]=0,u+Je(I[0]).length-1}return 0}function X(){ce("missing function: swapcontext"),ue(-1)}function Fe(u){return ir.shutdownSocket(u,2)}function Xt(u,o,c){if(typeof ke>"u")return 0;let _=1,m=2,p=4,y=8,E=16,S=32;return ke.handleSleep(b=>{let k=ve(u);if(!k){b(0);return}let D=[],T=new Set;if(o&_||o&m){if(k.server){for(let B of k.pending)if((B.recv_queue||[]).length>0){b(1);return}}else if((k.recv_queue||[]).length>0){b(1);return}}let C=ir.getAllWebSockets(k);if(!C.length){b(0);return}for(let B of C)(o&_||o&m)&&(D.push(ir.awaitData(B)),T.add("POLLIN")),o&p&&(D.push(ir.awaitConnection(B)),T.add("POLLOUT")),o&E&&(D.push(ir.awaitClose(B)),T.add("POLLHUP")),(o&y||o&S)&&(D.push(ir.awaitError(B)),T.add("POLLERR"));if(D.length===0){console.warn("Unsupported poll event "+o+", defaulting to setTimeout()."),setTimeout(function(){b(0)},c);return}let A=D.map(([B])=>B),I=()=>D.forEach(([,B])=>B()),z=!1;Promise.race(A).then(function(B){z||(z=!0,b(1),clearTimeout(K),I())});let K=setTimeout(function(){z||(z=!0,b(0),I())},c)})}function ie(u,o,c,_,m){let p=de[_];if(!(o===1&&c===9||o===6&&c===1))return console.warn(`Unsupported socket option: ${o}, ${c}, ${p}`),-1;let D=ir.getAllWebSockets(u)[0];return D?(D.setSocketOpt(o,c,_),0):-1}function Gr(u,o){return ir.shutdownSocket(u,o)}function xr(u){try{return u()}catch(o){ue(o)}}var ke={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(u){var o=ke.callStackNameToId[u];return o===void 0&&(o=ke.callStackId++,ke.callStackNameToId[u]=o,ke.callStackIdToName[o]=u),o},instrumentWasmImports:function(u){var o=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(_=>_.split(".")[1]);for(var c in u)(function(_){var m=u[_],p=m.sig;if(typeof m=="function")var y=o.indexOf(_)>=0||_.startsWith("__asyncjs__")})(c)},instrumentWasmExports:function(u){var o={};for(var c in u)(function(_){var m=u[_];typeof m=="function"?o[_]=function(){ke.exportCallStack.push(_);try{return m.apply(null,arguments)}finally{if(!Ce){var p=ke.exportCallStack.pop();Ne(p===_),ke.maybeStopUnwind()}}}:o[_]=m})(c);return o},maybeStopUnwind:function(){ke.currData&&ke.state===ke.State.Unwinding&&ke.exportCallStack.length===0&&(ke.state=ke.State.Normal,Bt(),xr(Nn),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((u,o)=>{ke.asyncPromiseHandlers={resolve:u,reject:o}})},allocateData:function(){var u=kr(12+ke.StackSize);return ke.setDataHeader(u,u+12,ke.StackSize),ke.setDataRewindFunc(u),u},setDataHeader:function(u,o,c){h[u>>2]=o,h[u+4>>2]=o+c},setDataRewindFunc:function(u){var o=ke.exportCallStack[0],c=ke.getCallStackId(o);h[u+8>>2]=c},getDataRewindFunc:function(u){var o=h[u+8>>2],c=ke.callStackIdToName[o],_=l.asm[c];return _},doRewind:function(u){var o=ke.getDataRewindFunc(u);return xt(),o()},handleSleep:function(u){if(!Ce){if(ke.state===ke.State.Normal){var o=!1,c=!1;u(_=>{if(!Ce&&(ke.handleSleepReturnValue=_||0,o=!0,!!c)){ke.state=ke.State.Rewinding,xr(()=>Tn(ke.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var m,p=!1;try{m=ke.doRewind(ke.currData)}catch(S){m=S,p=!0}var y=!1;if(!ke.currData){var E=ke.asyncPromiseHandlers;E&&(ke.asyncPromiseHandlers=null,(p?E.reject:E.resolve)(m),y=!0)}if(p&&!y)throw m}}),c=!0,o||(ke.state=ke.State.Unwinding,ke.currData=ke.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),xr(()=>bn(ke.currData)))}else ke.state===ke.State.Rewinding?(ke.state=ke.State.Normal,xr(Cn),Zt(ke.currData),ke.currData=null,ke.sleepCallbacks.forEach(_=>jr(_))):ue("invalid state: "+ke.state);return ke.handleSleepReturnValue}},handleAsync:function(u){return ke.handleSleep(o=>{u().then(o)})}};function Te(u){var o=l["_"+u];return o}function an(u,o,c,_,m){var p={string:z=>{var K=0;if(z!=null&&z!==0){var B=(z.length<<2)+1;K=ur(B),Ae(z,K,B)}return K},array:z=>{var K=ur(z.length);return ht(z,K),K}};function y(z){return o==="string"?ne(z):o==="boolean"?!!z:z}var E=Te(u),S=[],b=0;if(_)for(var k=0;k<_.length;k++){var D=p[c[k]];D?(b===0&&(b=Be()),S[k]=D(_[k])):S[k]=_[k]}var T=ke.currData,C=E.apply(null,S);function A(z){return xt(),b!==0&&He(b),y(z)}Bt();var I=m&&m.async;return ke.currData!=T?ke.whenDone().then(A):(C=A(C),I?Promise.resolve(C):C)}var On=function(u,o,c,_){u||(u=this),this.parent=u,this.mount=u.mount,this.mounted=null,this.id=e.nextInode++,this.name=o,this.mode=c,this.node_ops={},this.stream_ops={},this.rdev=_},sn=365,$t=146;Object.defineProperties(On.prototype,{read:{get:function(){return(this.mode&sn)===sn},set:function(u){u?this.mode|=sn:this.mode&=~sn}},write:{get:function(){return(this.mode&$t)===$t},set:function(u){u?this.mode|=$t:this.mode&=~$t}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=On,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var gn={l:Jn,Za:Qn,Ya:no,Xa:oo,Wa:io,Va:ao,O:so,Ua:uo,Ta:fo,Sa:co,Ra:lo,V:_o,Qa:vo,Pa:mo,N:po,o:rn,Oa:ho,Na:yo,U:wo,Ma:Eo,La:go,Ka:So,Ja:bo,Ia:ko,M:Do,Ha:Oo,Ga:No,Fa:To,Ea:se,x:Co,Da:Fo,Ca:Ao,Ba:Po,Aa:Ro,za:Mo,L:Lo,ya:Io,K:Uo,xa:Bo,wa:xo,va:Br,E:Ho,ua:tn,pa:zo,oa:Wo,na:jo,ma:qo,la:Vo,ka:Ko,ja:Go,ia:Xo,ha:nn,ga:$o,fa:It,n:on,C:Jo,ea:Qo,B:Ut,da:ei,ca:ri,ba:ni,ta:oi,sa:ii,q:gt,t:ai,J:si,I:fi,T:ci,ra:li,D:An,aa:Dn,$:di,H:Jr,_:St,w:zt,Z:je,Y:Nr,i:kn,c:Ci,b:Ni,f:Oi,h:g,s,r:Ln,v:a,G:d,e:Ai,a:Di,d:Ti,A:i,g:Fi,k:In,m:w,j:r,X:n,z:t,W:qe,S:Er,qa:Et,F:Gt,R:be,Q:X,u:Fe,y:Xt,p:ie,P:Gr},Pn=Zn(),bt=l.___wasm_call_ctors=function(){return(bt=l.___wasm_call_ctors=l.asm.$a).apply(null,arguments)},sr=l._wasm_popen=function(){return(sr=l._wasm_popen=l.asm.ab).apply(null,arguments)},qr=l.___errno_location=function(){return(qr=l.___errno_location=l.asm.bb).apply(null,arguments)},Qt=l._wasm_pclose=function(){return(Qt=l._wasm_pclose=l.asm.cb).apply(null,arguments)},er=l._php_pollfd_for=function(){return(er=l._php_pollfd_for=l.asm.db).apply(null,arguments)},qt=l._wasm_select=function(){return(qt=l._wasm_select=l.asm.eb).apply(null,arguments)},Zr=l._wasm_add_cli_arg=function(){return(Zr=l._wasm_add_cli_arg=l.asm.fb).apply(null,arguments)},kr=l._malloc=function(){return(kr=l._malloc=l.asm.gb).apply(null,arguments)},Ur=l._run_cli=function(){return(Ur=l._run_cli=l.asm.hb).apply(null,arguments)},nt=l._memcpy=function(){return(nt=l._memcpy=l.asm.ib).apply(null,arguments)},Zt=l._free=function(){return(Zt=l._free=l.asm.jb).apply(null,arguments)},kt=l._fflush=function(){return(kt=l._fflush=l.asm.lb).apply(null,arguments)},mn=l._htons=function(){return(mn=l._htons=l.asm.mb).apply(null,arguments)},un=l._ntohs=function(){return(un=l._ntohs=l.asm.nb).apply(null,arguments)},fn=l._htonl=function(){return(fn=l._htonl=l.asm.ob).apply(null,arguments)},Sn=l._wasm_set_phpini_path=function(){return(Sn=l._wasm_set_phpini_path=l.asm.pb).apply(null,arguments)},vi=l._wasm_set_phpini_entries=function(){return(vi=l._wasm_set_phpini_entries=l.asm.qb).apply(null,arguments)},mi=l._wasm_add_SERVER_entry=function(){return(mi=l._wasm_add_SERVER_entry=l.asm.rb).apply(null,arguments)},pi=l._wasm_add_uploaded_file=function(){return(pi=l._wasm_add_uploaded_file=l.asm.sb).apply(null,arguments)},hi=l._wasm_set_query_string=function(){return(hi=l._wasm_set_query_string=l.asm.tb).apply(null,arguments)},yi=l._wasm_set_path_translated=function(){return(yi=l._wasm_set_path_translated=l.asm.ub).apply(null,arguments)},wi=l._wasm_set_skip_shebang=function(){return(wi=l._wasm_set_skip_shebang=l.asm.vb).apply(null,arguments)},Ei=l._wasm_set_request_uri=function(){return(Ei=l._wasm_set_request_uri=l.asm.wb).apply(null,arguments)},gi=l._wasm_set_request_method=function(){return(gi=l._wasm_set_request_method=l.asm.xb).apply(null,arguments)},Si=l._wasm_set_request_host=function(){return(Si=l._wasm_set_request_host=l.asm.yb).apply(null,arguments)},bi=l._wasm_set_content_type=function(){return(bi=l._wasm_set_content_type=l.asm.zb).apply(null,arguments)},ki=l._wasm_set_request_body=function(){return(ki=l._wasm_set_request_body=l.asm.Ab).apply(null,arguments)},Rn=l._wasm_set_content_length=function(){return(Rn=l._wasm_set_content_length=l.asm.Bb).apply(null,arguments)},Mn=l._wasm_set_cookies=function(){return(Mn=l._wasm_set_cookies=l.asm.Cb).apply(null,arguments)},Sr=l._wasm_set_php_code=function(){return(Sr=l._wasm_set_php_code=l.asm.Db).apply(null,arguments)},gr=l._wasm_set_request_port=function(){return(gr=l._wasm_set_request_port=l.asm.Eb).apply(null,arguments)},we=l._phpwasm_init_uploaded_files_hash=function(){return(we=l._phpwasm_init_uploaded_files_hash=l.asm.Fb).apply(null,arguments)},Oe=l._phpwasm_register_uploaded_file=function(){return(Oe=l._phpwasm_register_uploaded_file=l.asm.Gb).apply(null,arguments)},ye=l._phpwasm_destroy_uploaded_files_hash=function(){return(ye=l._phpwasm_destroy_uploaded_files_hash=l.asm.Hb).apply(null,arguments)},tr=l._wasm_sapi_handle_request=function(){return(tr=l._wasm_sapi_handle_request=l.asm.Ib).apply(null,arguments)},De=l._php_wasm_init=function(){return(De=l._php_wasm_init=l.asm.Jb).apply(null,arguments)},xe=l.___funcs_on_exit=function(){return(xe=l.___funcs_on_exit=l.asm.Kb).apply(null,arguments)},Ie=l._emscripten_builtin_memalign=function(){return(Ie=l._emscripten_builtin_memalign=l.asm.Lb).apply(null,arguments)},ar=l._setThrew=function(){return(ar=l._setThrew=l.asm.Mb).apply(null,arguments)},Be=l.stackSave=function(){return(Be=l.stackSave=l.asm.Nb).apply(null,arguments)},He=l.stackRestore=function(){return(He=l.stackRestore=l.asm.Ob).apply(null,arguments)},ur=l.stackAlloc=function(){return(ur=l.stackAlloc=l.asm.Pb).apply(null,arguments)},Qr=l.dynCall_vii=function(){return(Qr=l.dynCall_vii=l.asm.Qb).apply(null,arguments)},ot=l.dynCall_vi=function(){return(ot=l.dynCall_vi=l.asm.Rb).apply(null,arguments)},it=l.dynCall_iii=function(){return(it=l.dynCall_iii=l.asm.Sb).apply(null,arguments)},Dt=l.dynCall_viiiii=function(){return(Dt=l.dynCall_viiiii=l.asm.Tb).apply(null,arguments)},Ot=l.dynCall_iiii=function(){return(Ot=l.dynCall_iiii=l.asm.Ub).apply(null,arguments)},Nt=l.dynCall_ii=function(){return(Nt=l.dynCall_ii=l.asm.Vb).apply(null,arguments)},Tt=l.dynCall_iiiii=function(){return(Tt=l.dynCall_iiiii=l.asm.Wb).apply(null,arguments)},Ct=l.dynCall_iiiiii=function(){return(Ct=l.dynCall_iiiiii=l.asm.Xb).apply(null,arguments)},Ft=l.dynCall_viii=function(){return(Ft=l.dynCall_viii=l.asm.Yb).apply(null,arguments)},At=l.dynCall_v=function(){return(At=l.dynCall_v=l.asm.Zb).apply(null,arguments)},Pt=l.dynCall_i=function(){return(Pt=l.dynCall_i=l.asm._b).apply(null,arguments)},Rt=l.dynCall_viiii=function(){return(Rt=l.dynCall_viiii=l.asm.$b).apply(null,arguments)},Mt=l.dynCall_iiiiiii=function(){return(Mt=l.dynCall_iiiiiii=l.asm.ac).apply(null,arguments)},Lt=l.dynCall_iiiiiiiiii=function(){return(Lt=l.dynCall_iiiiiiiiii=l.asm.bc).apply(null,arguments)},Vt=l.dynCall_viiiiiiiii=function(){return(Vt=l.dynCall_viiiiiiiii=l.asm.cc).apply(null,arguments)},cn=l.dynCall_viiiiiii=function(){return(cn=l.dynCall_viiiiiii=l.asm.dc).apply(null,arguments)},ln=l.dynCall_viiiiii=function(){return(ln=l.dynCall_viiiiii=l.asm.ec).apply(null,arguments)},pn=l.dynCall_iiiiiiii=function(){return(pn=l.dynCall_iiiiiiii=l.asm.fc).apply(null,arguments)},hn=l.dynCall_viidii=function(){return(hn=l.dynCall_viidii=l.asm.gc).apply(null,arguments)},bn=l._asyncify_start_unwind=function(){return(bn=l._asyncify_start_unwind=l.asm.hc).apply(null,arguments)},Nn=l._asyncify_stop_unwind=function(){return(Nn=l._asyncify_stop_unwind=l.asm.ic).apply(null,arguments)},Tn=l._asyncify_start_rewind=function(){return(Tn=l._asyncify_start_rewind=l.asm.jc).apply(null,arguments)},Cn=l._asyncify_stop_rewind=function(){return(Cn=l._asyncify_stop_rewind=l.asm.kc).apply(null,arguments)};function Ln(u,o,c,_,m,p,y){var E=Be();try{return Mt(u,o,c,_,m,p,y)}catch(S){if(He(E),S!==S+0)throw S;ar(1,0)}}function Di(u,o){var c=Be();try{ot(u,o)}catch(_){if(He(c),_!==_+0)throw _;ar(1,0)}}function Oi(u,o,c,_){var m=Be();try{return Ot(u,o,c,_)}catch(p){if(He(m),p!==p+0)throw p;ar(1,0)}}function Ni(u,o,c){var _=Be();try{return it(u,o,c)}catch(m){if(He(_),m!==m+0)throw m;ar(1,0)}}function Ti(u,o,c){var _=Be();try{Qr(u,o,c)}catch(m){if(He(_),m!==m+0)throw m;ar(1,0)}}function Ci(u,o){var c=Be();try{return Nt(u,o)}catch(_){if(He(c),_!==_+0)throw _;ar(1,0)}}function Fi(u,o,c,_){var m=Be();try{Ft(u,o,c,_)}catch(p){if(He(m),p!==p+0)throw p;ar(1,0)}}function Ai(u){var o=Be();try{At(u)}catch(c){if(He(o),c!==c+0)throw c;ar(1,0)}}function kn(u){var o=Be();try{return Pt(u)}catch(c){if(He(o),c!==c+0)throw c;ar(1,0)}}function In(u,o,c,_,m){var p=Be();try{Rt(u,o,c,_,m)}catch(y){if(He(p),y!==y+0)throw y;ar(1,0)}}function w(u,o,c,_,m,p){var y=Be();try{Dt(u,o,c,_,m,p)}catch(E){if(He(y),E!==E+0)throw E;ar(1,0)}}function g(u,o,c,_,m){var p=Be();try{return Tt(u,o,c,_,m)}catch(y){if(He(p),y!==y+0)throw y;ar(1,0)}}function s(u,o,c,_,m,p){var y=Be();try{return Ct(u,o,c,_,m,p)}catch(E){if(He(y),E!==E+0)throw E;ar(1,0)}}function d(u,o,c,_,m,p,y,E,S,b){var k=Be();try{return Lt(u,o,c,_,m,p,y,E,S,b)}catch(D){if(He(k),D!==D+0)throw D;ar(1,0)}}function r(u,o,c,_,m,p,y){var E=Be();try{ln(u,o,c,_,m,p,y)}catch(S){if(He(E),S!==S+0)throw S;ar(1,0)}}function i(u,o,c,_,m,p){var y=Be();try{hn(u,o,c,_,m,p)}catch(E){if(He(y),E!==E+0)throw E;ar(1,0)}}function t(u,o,c,_,m,p,y,E,S,b){var k=Be();try{Vt(u,o,c,_,m,p,y,E,S,b)}catch(D){if(He(k),D!==D+0)throw D;ar(1,0)}}function a(u,o,c,_,m,p,y,E){var S=Be();try{return pn(u,o,c,_,m,p,y,E)}catch(b){if(He(S),b!==b+0)throw b;ar(1,0)}}function n(u,o,c,_,m,p,y,E){var S=Be();try{cn(u,o,c,_,m,p,y,E)}catch(b){if(He(S),b!==b+0)throw b;ar(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=an,l.FS=e;var f;$e=function u(){f||v(),f||($e=u)};function v(u){if(u=u||Y,Re>0||(Wn(),Re>0))return;function o(){f||(f=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),o()},1)):o()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return v(),O}var Ic,Pu,Mu=Ki(()=>{"use strict";Ic=10032078,Pu=__dirname+"/php_8_1.wasm"});var Iu={};Hi(Iu,{dependenciesTotalSize:()=>Bc,dependencyFilename:()=>Lu,init:()=>xc});function xc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(n,f)=>{throw f},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(n){return l.locateFile?l.locateFile(n,ae):ae+n}var Ye,nr,Me;function Lr(n){if(n instanceof mr)return;ce("exiting due to exception: "+n)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(n,f)=>(wr(),n=Le.normalize(n),V.readFileSync(n,f?void 0:"utf8")),Me=n=>{var f=Ye(n,!0);return f.buffer||(f=new Uint8Array(f)),f},nr=(n,f,v)=>{wr(),n=Le.normalize(n),V.readFile(n,function(u,o){u?v(u):f(o.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(n){if(!(n instanceof mr))throw n}),process.on("unhandledRejection",function(n){throw n}),te=(n,f)=>{if(_r())throw process.exitCode=n,f;Lr(f),process.exit(n)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(n,f){n||ue(f)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(n,f,v){for(var u=f+v,o=f;n[o]&&!(o>=u);)++o;if(o-f>16&&n.buffer&&at)return at.decode(n.subarray(f,o));for(var c="";f<o;){var _=n[f++];if(!(_&128)){c+=String.fromCharCode(_);continue}var m=n[f++]&63;if((_&224)==192){c+=String.fromCharCode((_&31)<<6|m);continue}var p=n[f++]&63;if((_&240)==224?_=(_&15)<<12|m<<6|p:_=(_&7)<<18|m<<12|p<<6|n[f++]&63,_<65536)c+=String.fromCharCode(_);else{var y=_-65536;c+=String.fromCharCode(55296|y>>10,56320|y&1023)}}return c}function ne(n,f){return n?We(de,n,f):""}function Xe(n,f,v,u){if(!(u>0))return 0;for(var o=v,c=v+u-1,_=0;_<n.length;++_){var m=n.charCodeAt(_);if(m>=55296&&m<=57343){var p=n.charCodeAt(++_);m=65536+((m&1023)<<10)|p&1023}if(m<=127){if(v>=c)break;f[v++]=m}else if(m<=2047){if(v+1>=c)break;f[v++]=192|m>>6,f[v++]=128|m&63}else if(m<=65535){if(v+2>=c)break;f[v++]=224|m>>12,f[v++]=128|m>>6&63,f[v++]=128|m&63}else{if(v+3>=c)break;f[v++]=240|m>>18,f[v++]=128|m>>12&63,f[v++]=128|m>>6&63,f[v++]=128|m&63}}return f[v]=0,v-o}function Ae(n,f,v){return Xe(n,de,f,v)}function Pe(n){for(var f=0,v=0;v<n.length;++v){var u=n.charCodeAt(v);u<=127?f++:u<=2047?f+=2:u>=55296&&u<=57343?(f+=4,++v):f+=3}return f}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(n){Cr=n,l.HEAP8=$=new Int8Array(n),l.HEAP16=Ee=new Int16Array(n),l.HEAP32=h=new Int32Array(n),l.HEAPU8=de=new Uint8Array(n),l.HEAPU16=st=new Uint16Array(n),l.HEAPU32=H=new Uint32Array(n),l.HEAPF32=Bn=new Float32Array(n),l.HEAPF64=ut=new Float64Array(n)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),pe.root=e.mount(pe,{},null),pr(lt)}function Yn(){ye(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(n){ct.unshift(n)}function Kn(n){lt.unshift(n)}function Gn(n){dt.unshift(n)}var Re=0,Ar=null,$e=null;function Qi(n){return n}function vr(n){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(n){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var f=$e;$e=null,f()}}function ue(n){l.onAbort&&l.onAbort(n),n="Aborted("+n+")",ce(n),Ce=!0,Ge=1,n+=". Build with -sASSERTIONS for more info.";var f=new WebAssembly.RuntimeError(n);throw f}var Xn="data:application/octet-stream;base64,";function vt(n){return n.startsWith(Xn)}var _e;_e=Lu,vt(_e)||(_e=cr(_e));function mt(n){try{if(n==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(n);throw"both async and sync fetching of the wasm failed"}catch(f){ue(f)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(n){if(!n.ok)throw"failed to load wasm binary file at '"+_e+"'";return n.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var n={a:On};function f(_,m){var p=_.exports;p=ie.instrumentWasmExports(p),l.asm=p,or=l.asm.Xa,ft(or.buffer),xn=l.asm.hb,Kn(l.asm.Ya),Ze("wasm-instantiate")}vr("wasm-instantiate");function v(_){f(_.instance)}function u(_){return $n().then(function(m){return WebAssembly.instantiate(m,n)}).then(function(m){return m}).then(_,function(m){ce("failed to asynchronously prepare wasm: "+m),ue(m)})}function o(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(_){var m=WebAssembly.instantiateStreaming(_,n);return m.then(v,function(p){return ce("wasm streaming compile failed: "+p),ce("falling back to ArrayBuffer instantiation"),u(v)})}):u(v)}if(l.instantiateWasm)try{var c=l.instantiateWasm(n,f);return c=ie.instrumentWasmExports(c),c}catch(_){return ce("Module.instantiateWasm callback failed with error: "+_),!1}return o(),{}}var P,q;function mr(n){this.name="ExitStatus",this.message="Program terminated with exit("+n+")",this.status=n}function pr(n){for(;n.length>0;)n.shift()(l)}function pt(n){if(n instanceof mr||n=="unwind")return Ge;te(1,n)}function ht(n,f){$.set(n,f)}function Jn(n,f,v,u){ue("Assertion failed: "+ne(n)+", at: "+[f?ne(f):"unknown filename",v,u?ne(u):"unknown function"])}function Qn(n,f){(function(v){Be.apply(null,[n,v])})(f)}var U={isAbs:n=>n.charAt(0)==="/",splitPath:n=>{var f=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return f.exec(n).slice(1)},normalizeArray:(n,f)=>{for(var v=0,u=n.length-1;u>=0;u--){var o=n[u];o==="."?n.splice(u,1):o===".."?(n.splice(u,1),v++):v&&(n.splice(u,1),v--)}if(f)for(;v;v--)n.unshift("..");return n},normalize:n=>{var f=U.isAbs(n),v=n.substr(-1)==="/";return n=U.normalizeArray(n.split("/").filter(u=>!!u),!f).join("/"),!n&&!f&&(n="."),n&&v&&(n+="/"),(f?"/":"")+n},dirname:n=>{var f=U.splitPath(n),v=f[0],u=f[1];return!v&&!u?".":(u&&(u=u.substr(0,u.length-1)),v+u)},basename:n=>{if(n==="/")return"/";n=U.normalize(n),n=n.replace(/\/$/,"");var f=n.lastIndexOf("/");return f===-1?n:n.substr(f+1)},join:function(){var n=Array.prototype.slice.call(arguments);return U.normalize(n.join("/"))},join2:(n,f)=>U.normalize(n+"/"+f)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var n=new Uint8Array(1);return()=>(crypto.getRandomValues(n),n[0])}else if(Z)try{var f=require("crypto");return()=>f.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var n="",f=!1,v=arguments.length-1;v>=-1&&!f;v--){var u=v>=0?arguments[v]:e.cwd();if(typeof u!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!u)return"";n=u+"/"+n,f=U.isAbs(u)}return n=U.normalizeArray(n.split("/").filter(o=>!!o),!f).join("/"),(f?"/":"")+n||"."},relative:(n,f)=>{n=ge.resolve(n).substr(1),f=ge.resolve(f).substr(1);function v(y){for(var E=0;E<y.length&&y[E]==="";E++);for(var S=y.length-1;S>=0&&y[S]==="";S--);return E>S?[]:y.slice(E,S-E+1)}for(var u=v(n.split("/")),o=v(f.split("/")),c=Math.min(u.length,o.length),_=c,m=0;m<c;m++)if(u[m]!==o[m]){_=m;break}for(var p=[],m=_;m<u.length;m++)p.push("..");return p=p.concat(o.slice(_)),p.join("/")}};function Je(n,f,v){var u=v>0?v:Pe(n)+1,o=new Array(u),c=Xe(n,o,0,o.length);return f&&(o.length=c),o}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(n,f){Se.ttys[n]={input:[],output:[],ops:f},e.registerDevice(n,Se.stream_ops)},stream_ops:{open:function(n){var f=Se.ttys[n.node.rdev];if(!f)throw new e.ErrnoError(43);n.tty=f,n.seekable=!1},close:function(n){n.tty.ops.fsync(n.tty)},fsync:function(n){n.tty.ops.fsync(n.tty)},read:function(n,f,v,u,o){if(!n.tty||!n.tty.ops.get_char)throw new e.ErrnoError(60);for(var c=0,_=0;_<u;_++){var m;try{m=n.tty.ops.get_char(n.tty)}catch{throw new e.ErrnoError(29)}if(m===void 0&&c===0)throw new e.ErrnoError(6);if(m==null)break;c++,f[v+_]=m}return c&&(n.node.timestamp=Date.now()),c},write:function(n,f,v,u,o){if(!n.tty||!n.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var c=0;c<u;c++)n.tty.ops.put_char(n.tty,f[v+c])}catch{throw new e.ErrnoError(29)}return u&&(n.node.timestamp=Date.now()),c}},default_tty_ops:{get_char:function(n){if(!n.input.length){var f=null;if(Z){var v=256,u=Buffer.alloc(v),o=0;try{o=V.readSync(process.stdin.fd,u,0,v,-1)}catch(c){if(c.toString().includes("EOF"))o=0;else throw c}o>0?f=u.slice(0,o).toString("utf-8"):f=null}else typeof window<"u"&&typeof window.prompt=="function"?(f=window.prompt("Input: "),f!==null&&(f+=`
|
|
13
|
+
`},"%p":function(B){return B.tm_hour>=0&&B.tm_hour<12?"AM":"PM"},"%S":function(B){return T(B.tm_sec,2)},"%t":function(){return" "},"%u":function(B){return B.tm_wday||7},"%U":function(B){var x=B.tm_yday+7-B.tm_wday;return T(Math.floor(x/7),2)},"%V":function(B){var x=Math.floor((B.tm_yday+7-(B.tm_wday+6)%7)/7);if((B.tm_wday+371-B.tm_yday-2)%7<=2&&x++,x){if(x==53){var re=(B.tm_wday+371-B.tm_yday)%7;re!=4&&(re!=3||!fr(B.tm_year))&&(x=1)}}else{x=52;var G=(B.tm_wday+7-B.tm_yday-1)%7;(G==4||G==5&&fr(B.tm_year%400-1))&&x++}return T(x,2)},"%w":function(B){return B.tm_wday},"%W":function(B){var x=B.tm_yday+7-(B.tm_wday+6)%7;return T(Math.floor(x/7),2)},"%y":function(B){return(B.tm_year+1900).toString().substring(2)},"%Y":function(B){return B.tm_year+1900},"%z":function(B){var x=B.tm_gmtoff,G=x>=0;return x=Math.abs(x)/60,x=x/60*100+x%60,(G?"+":"-")+("0000"+x).slice(-4)},"%Z":function(B){return B.tm_zone},"%%":function(){return"%"}};y=y.replace(/%%/g,"\0\0");for(var S in z)y.includes(S)&&(y=y.replace(new RegExp(S,"g"),z[S](p)));y=y.replace(/\0\0/g,"%");var K=Je(y,!1);return K.length>o?0:(ht(K,u),K.length-1)}function be(u,o,c){for(var _=ne(o),m="\\!@#$^&*()+=-[]/{}|:<>?,.",p=0,y=m.length;p<y;++p)_=_.replace(new RegExp("\\"+m[p],"g"),"\\"+m[p]);var E={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var S in E)_=_.replace(S,E[S]);var b={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},k={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},D={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},T={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var C in b)_=_.replace(C,"("+C+b[C]+")");for(var A=[],p=_.indexOf("%");p>=0;p=_.indexOf("%"))A.push(_[p+1]),_=_.replace(new RegExp("\\%"+_[p+1],"g"),"");var I=new RegExp("^"+_,"i").exec(ne(u));function z(){function dn(Pi,Bi,ua){return typeof Pi!="number"||isNaN(Pi)?Bi:Pi>=Bi?Pi<=ua?Pi:ua:Bi}return{year:dn(h[c+20>>2]+1900,1970,9999),month:dn(h[c+16>>2],0,11),day:dn(h[c+12>>2],1,31),hour:dn(h[c+8>>2],0,23),min:dn(h[c+4>>2],0,59),sec:dn(h[c>>2],0,59)}}if(I){var K=z(),B,x=dn=>{var Pi=A.indexOf(dn);if(Pi>=0)return I[Pi+1]};if((B=x("S"))&&(K.sec=Q(B)),(B=x("M"))&&(K.min=Q(B)),B=x("H"))K.hour=Q(B);else if(B=x("I")){var G=Q(B);(B=x("p"))&&(G+=B.toUpperCase()[0]==="P"?12:0),K.hour=G}if(B=x("Y"))K.year=Q(B);else if(B=x("y")){var re=Q(B);(B=x("C"))?re+=Q(B)*100:re+=re<69?2e3:1900,K.year=re}if((B=x("m"))?K.month=Q(B)-1:(B=x("b"))&&(K.month=k[B.substring(0,3).toUpperCase()]||0),B=x("d"))K.day=Q(B);else if(B=x("j"))for(var oe=Q(B),le=fr(K.year),he=0;he<12;++he){var ze=Tr(le?Yr:jt,he-1);oe<=ze+(le?Yr:jt)[he]&&(K.day=oe-ze)}else if(B=x("a")){var Ve=B.substring(0,3).toUpperCase();if(B=x("U")){var Dr=D[Ve],yr=Q(B),Vr=new Date(K.year,0,1),Kr;Vr.getDay()===0?Kr=Yt(Vr,Dr+7*(yr-1)):Kr=Yt(Vr,7-Vr.getDay()+Dr+7*(yr-1)),K.day=Kr.getDate(),K.month=Kr.getMonth()}else if(B=x("W")){var Dr=T[Ve],yr=Q(B),Vr=new Date(K.year,0,1),Kr;Vr.getDay()===1?Kr=Yt(Vr,Dr+7*(yr-1)):Kr=Yt(Vr,7-Vr.getDay()+1+Dr+7*(yr-1)),K.day=Kr.getDate(),K.month=Kr.getMonth()}}var Jt=new Date(K.year,K.month,K.day,K.hour,K.min,K.sec,0);return h[c>>2]=Jt.getSeconds(),h[c+4>>2]=Jt.getMinutes(),h[c+8>>2]=Jt.getHours(),h[c+12>>2]=Jt.getDate(),h[c+16>>2]=Jt.getMonth(),h[c+20>>2]=Jt.getFullYear()-1900,h[c+24>>2]=Jt.getDay(),h[c+28>>2]=Tr(fr(Jt.getFullYear())?Yr:jt,Jt.getMonth()-1)+Jt.getDate()-1,h[c+32>>2]=0,u+Je(I[0]).length-1}return 0}function X(){ce("missing function: swapcontext"),ue(-1)}function Fe(u){return ir.shutdownSocket(u,2)}function Xt(u,o,c){if(typeof ke>"u")return 0;let _=1,m=2,p=4,y=8,E=16,S=32;return ke.handleSleep(b=>{let k=ve(u);if(!k){b(0);return}let D=[],T=new Set;if(o&_||o&m){if(k.server){for(let B of k.pending)if((B.recv_queue||[]).length>0){b(1);return}}else if((k.recv_queue||[]).length>0){b(1);return}}let C=ir.getAllWebSockets(k);if(!C.length){b(0);return}for(let B of C)(o&_||o&m)&&(D.push(ir.awaitData(B)),T.add("POLLIN")),o&p&&(D.push(ir.awaitConnection(B)),T.add("POLLOUT")),o&E&&(D.push(ir.awaitClose(B)),T.add("POLLHUP")),(o&y||o&S)&&(D.push(ir.awaitError(B)),T.add("POLLERR"));if(D.length===0){console.warn("Unsupported poll event "+o+", defaulting to setTimeout()."),setTimeout(function(){b(0)},c);return}let A=D.map(([B])=>B),I=()=>D.forEach(([,B])=>B()),z=!1;Promise.race(A).then(function(B){z||(z=!0,b(1),clearTimeout(K),I())});let K=setTimeout(function(){z||(z=!0,b(0),I())},c)})}function ie(u,o,c,_,m){let p=de[_];if(!(o===1&&c===9||o===6&&c===1))return console.warn(`Unsupported socket option: ${o}, ${c}, ${p}`),-1;let D=ir.getAllWebSockets(u)[0];return D?(D.setSocketOpt(o,c,_),0):-1}function Gr(u,o){return ir.shutdownSocket(u,o)}function xr(u){try{return u()}catch(o){ue(o)}}var ke={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(u){var o=ke.callStackNameToId[u];return o===void 0&&(o=ke.callStackId++,ke.callStackNameToId[u]=o,ke.callStackIdToName[o]=u),o},instrumentWasmImports:function(u){var o=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(_=>_.split(".")[1]);for(var c in u)(function(_){var m=u[_],p=m.sig;if(typeof m=="function")var y=o.indexOf(_)>=0||_.startsWith("__asyncjs__")})(c)},instrumentWasmExports:function(u){var o={};for(var c in u)(function(_){var m=u[_];typeof m=="function"?o[_]=function(){ke.exportCallStack.push(_);try{return m.apply(null,arguments)}finally{if(!Ce){var p=ke.exportCallStack.pop();Ne(p===_),ke.maybeStopUnwind()}}}:o[_]=m})(c);return o},maybeStopUnwind:function(){ke.currData&&ke.state===ke.State.Unwinding&&ke.exportCallStack.length===0&&(ke.state=ke.State.Normal,Bt(),xr(Nn),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((u,o)=>{ke.asyncPromiseHandlers={resolve:u,reject:o}})},allocateData:function(){var u=kr(12+ke.StackSize);return ke.setDataHeader(u,u+12,ke.StackSize),ke.setDataRewindFunc(u),u},setDataHeader:function(u,o,c){h[u>>2]=o,h[u+4>>2]=o+c},setDataRewindFunc:function(u){var o=ke.exportCallStack[0],c=ke.getCallStackId(o);h[u+8>>2]=c},getDataRewindFunc:function(u){var o=h[u+8>>2],c=ke.callStackIdToName[o],_=l.asm[c];return _},doRewind:function(u){var o=ke.getDataRewindFunc(u);return xt(),o()},handleSleep:function(u){if(!Ce){if(ke.state===ke.State.Normal){var o=!1,c=!1;u(_=>{if(!Ce&&(ke.handleSleepReturnValue=_||0,o=!0,!!c)){ke.state=ke.State.Rewinding,xr(()=>Tn(ke.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var m,p=!1;try{m=ke.doRewind(ke.currData)}catch(S){m=S,p=!0}var y=!1;if(!ke.currData){var E=ke.asyncPromiseHandlers;E&&(ke.asyncPromiseHandlers=null,(p?E.reject:E.resolve)(m),y=!0)}if(p&&!y)throw m}}),c=!0,o||(ke.state=ke.State.Unwinding,ke.currData=ke.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),xr(()=>bn(ke.currData)))}else ke.state===ke.State.Rewinding?(ke.state=ke.State.Normal,xr(Cn),Zt(ke.currData),ke.currData=null,ke.sleepCallbacks.forEach(_=>jr(_))):ue("invalid state: "+ke.state);return ke.handleSleepReturnValue}},handleAsync:function(u){return ke.handleSleep(o=>{u().then(o)})}};function Te(u){var o=l["_"+u];return o}function an(u,o,c,_,m){var p={string:z=>{var K=0;if(z!=null&&z!==0){var B=(z.length<<2)+1;K=ur(B),Ae(z,K,B)}return K},array:z=>{var K=ur(z.length);return ht(z,K),K}};function y(z){return o==="string"?ne(z):o==="boolean"?!!z:z}var E=Te(u),S=[],b=0;if(_)for(var k=0;k<_.length;k++){var D=p[c[k]];D?(b===0&&(b=Be()),S[k]=D(_[k])):S[k]=_[k]}var T=ke.currData,C=E.apply(null,S);function A(z){return xt(),b!==0&&He(b),y(z)}Bt();var I=m&&m.async;return ke.currData!=T?ke.whenDone().then(A):(C=A(C),I?Promise.resolve(C):C)}var On=function(u,o,c,_){u||(u=this),this.parent=u,this.mount=u.mount,this.mounted=null,this.id=e.nextInode++,this.name=o,this.mode=c,this.node_ops={},this.stream_ops={},this.rdev=_},sn=365,$t=146;Object.defineProperties(On.prototype,{read:{get:function(){return(this.mode&sn)===sn},set:function(u){u?this.mode|=sn:this.mode&=~sn}},write:{get:function(){return(this.mode&$t)===$t},set:function(u){u?this.mode|=$t:this.mode&=~$t}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=On,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var gn={l:Jn,Za:Qn,Ya:no,Xa:oo,Wa:io,Va:ao,O:so,Ua:uo,Ta:fo,Sa:co,Ra:lo,V:_o,Qa:vo,Pa:mo,N:po,o:rn,Oa:ho,Na:yo,U:wo,Ma:Eo,La:go,Ka:So,Ja:bo,Ia:ko,M:Do,Ha:Oo,Ga:No,Fa:To,Ea:se,x:Co,Da:Fo,Ca:Ao,Ba:Po,Aa:Ro,za:Mo,L:Lo,ya:Io,K:Uo,xa:Bo,wa:xo,va:Br,E:Ho,ua:tn,pa:zo,oa:Wo,na:jo,ma:qo,la:Vo,ka:Ko,ja:Go,ia:Xo,ha:nn,ga:$o,fa:It,n:on,C:Jo,ea:Qo,B:Ut,da:ei,ca:ri,ba:ni,ta:oi,sa:ii,q:gt,t:ai,J:si,I:fi,T:ci,ra:li,D:An,aa:Dn,$:di,H:Jr,_:St,w:zt,Z:je,Y:Nr,i:kn,c:Ci,b:Ni,f:Oi,h:g,s,r:Ln,v:a,G:d,e:Ai,a:Di,d:Ti,A:i,g:Fi,k:In,m:w,j:r,X:n,z:t,W:qe,S:Er,qa:Et,F:Gt,R:be,Q:X,u:Fe,y:Xt,p:ie,P:Gr},Pn=Zn(),bt=l.___wasm_call_ctors=function(){return(bt=l.___wasm_call_ctors=l.asm.$a).apply(null,arguments)},sr=l._wasm_popen=function(){return(sr=l._wasm_popen=l.asm.ab).apply(null,arguments)},qr=l.___errno_location=function(){return(qr=l.___errno_location=l.asm.bb).apply(null,arguments)},Qt=l._wasm_pclose=function(){return(Qt=l._wasm_pclose=l.asm.cb).apply(null,arguments)},er=l._php_pollfd_for=function(){return(er=l._php_pollfd_for=l.asm.db).apply(null,arguments)},qt=l._wasm_select=function(){return(qt=l._wasm_select=l.asm.eb).apply(null,arguments)},Zr=l._wasm_add_cli_arg=function(){return(Zr=l._wasm_add_cli_arg=l.asm.fb).apply(null,arguments)},kr=l._malloc=function(){return(kr=l._malloc=l.asm.gb).apply(null,arguments)},Ur=l._run_cli=function(){return(Ur=l._run_cli=l.asm.hb).apply(null,arguments)},nt=l._memcpy=function(){return(nt=l._memcpy=l.asm.ib).apply(null,arguments)},Zt=l._free=function(){return(Zt=l._free=l.asm.jb).apply(null,arguments)},kt=l._fflush=function(){return(kt=l._fflush=l.asm.lb).apply(null,arguments)},mn=l._htons=function(){return(mn=l._htons=l.asm.mb).apply(null,arguments)},un=l._ntohs=function(){return(un=l._ntohs=l.asm.nb).apply(null,arguments)},fn=l._htonl=function(){return(fn=l._htonl=l.asm.ob).apply(null,arguments)},Sn=l._wasm_set_phpini_path=function(){return(Sn=l._wasm_set_phpini_path=l.asm.pb).apply(null,arguments)},vi=l._wasm_set_phpini_entries=function(){return(vi=l._wasm_set_phpini_entries=l.asm.qb).apply(null,arguments)},mi=l._wasm_add_SERVER_entry=function(){return(mi=l._wasm_add_SERVER_entry=l.asm.rb).apply(null,arguments)},pi=l._wasm_add_uploaded_file=function(){return(pi=l._wasm_add_uploaded_file=l.asm.sb).apply(null,arguments)},hi=l._wasm_set_query_string=function(){return(hi=l._wasm_set_query_string=l.asm.tb).apply(null,arguments)},yi=l._wasm_set_path_translated=function(){return(yi=l._wasm_set_path_translated=l.asm.ub).apply(null,arguments)},wi=l._wasm_set_skip_shebang=function(){return(wi=l._wasm_set_skip_shebang=l.asm.vb).apply(null,arguments)},Ei=l._wasm_set_request_uri=function(){return(Ei=l._wasm_set_request_uri=l.asm.wb).apply(null,arguments)},gi=l._wasm_set_request_method=function(){return(gi=l._wasm_set_request_method=l.asm.xb).apply(null,arguments)},Si=l._wasm_set_request_host=function(){return(Si=l._wasm_set_request_host=l.asm.yb).apply(null,arguments)},bi=l._wasm_set_content_type=function(){return(bi=l._wasm_set_content_type=l.asm.zb).apply(null,arguments)},ki=l._wasm_set_request_body=function(){return(ki=l._wasm_set_request_body=l.asm.Ab).apply(null,arguments)},Rn=l._wasm_set_content_length=function(){return(Rn=l._wasm_set_content_length=l.asm.Bb).apply(null,arguments)},Mn=l._wasm_set_cookies=function(){return(Mn=l._wasm_set_cookies=l.asm.Cb).apply(null,arguments)},Sr=l._wasm_set_php_code=function(){return(Sr=l._wasm_set_php_code=l.asm.Db).apply(null,arguments)},gr=l._wasm_set_request_port=function(){return(gr=l._wasm_set_request_port=l.asm.Eb).apply(null,arguments)},we=l._phpwasm_init_uploaded_files_hash=function(){return(we=l._phpwasm_init_uploaded_files_hash=l.asm.Fb).apply(null,arguments)},Oe=l._phpwasm_register_uploaded_file=function(){return(Oe=l._phpwasm_register_uploaded_file=l.asm.Gb).apply(null,arguments)},ye=l._phpwasm_destroy_uploaded_files_hash=function(){return(ye=l._phpwasm_destroy_uploaded_files_hash=l.asm.Hb).apply(null,arguments)},tr=l._wasm_sapi_handle_request=function(){return(tr=l._wasm_sapi_handle_request=l.asm.Ib).apply(null,arguments)},De=l._php_wasm_init=function(){return(De=l._php_wasm_init=l.asm.Jb).apply(null,arguments)},xe=l.___funcs_on_exit=function(){return(xe=l.___funcs_on_exit=l.asm.Kb).apply(null,arguments)},Ie=l._emscripten_builtin_memalign=function(){return(Ie=l._emscripten_builtin_memalign=l.asm.Lb).apply(null,arguments)},ar=l._setThrew=function(){return(ar=l._setThrew=l.asm.Mb).apply(null,arguments)},Be=l.stackSave=function(){return(Be=l.stackSave=l.asm.Nb).apply(null,arguments)},He=l.stackRestore=function(){return(He=l.stackRestore=l.asm.Ob).apply(null,arguments)},ur=l.stackAlloc=function(){return(ur=l.stackAlloc=l.asm.Pb).apply(null,arguments)},Qr=l.dynCall_vii=function(){return(Qr=l.dynCall_vii=l.asm.Qb).apply(null,arguments)},ot=l.dynCall_vi=function(){return(ot=l.dynCall_vi=l.asm.Rb).apply(null,arguments)},it=l.dynCall_iii=function(){return(it=l.dynCall_iii=l.asm.Sb).apply(null,arguments)},Dt=l.dynCall_viiiii=function(){return(Dt=l.dynCall_viiiii=l.asm.Tb).apply(null,arguments)},Ot=l.dynCall_iiii=function(){return(Ot=l.dynCall_iiii=l.asm.Ub).apply(null,arguments)},Nt=l.dynCall_ii=function(){return(Nt=l.dynCall_ii=l.asm.Vb).apply(null,arguments)},Tt=l.dynCall_iiiii=function(){return(Tt=l.dynCall_iiiii=l.asm.Wb).apply(null,arguments)},Ct=l.dynCall_iiiiii=function(){return(Ct=l.dynCall_iiiiii=l.asm.Xb).apply(null,arguments)},Ft=l.dynCall_viii=function(){return(Ft=l.dynCall_viii=l.asm.Yb).apply(null,arguments)},At=l.dynCall_v=function(){return(At=l.dynCall_v=l.asm.Zb).apply(null,arguments)},Pt=l.dynCall_i=function(){return(Pt=l.dynCall_i=l.asm._b).apply(null,arguments)},Rt=l.dynCall_viiii=function(){return(Rt=l.dynCall_viiii=l.asm.$b).apply(null,arguments)},Mt=l.dynCall_iiiiiii=function(){return(Mt=l.dynCall_iiiiiii=l.asm.ac).apply(null,arguments)},Lt=l.dynCall_iiiiiiiiii=function(){return(Lt=l.dynCall_iiiiiiiiii=l.asm.bc).apply(null,arguments)},Vt=l.dynCall_viiiiiiiii=function(){return(Vt=l.dynCall_viiiiiiiii=l.asm.cc).apply(null,arguments)},cn=l.dynCall_viiiiiii=function(){return(cn=l.dynCall_viiiiiii=l.asm.dc).apply(null,arguments)},ln=l.dynCall_viiiiii=function(){return(ln=l.dynCall_viiiiii=l.asm.ec).apply(null,arguments)},pn=l.dynCall_iiiiiiii=function(){return(pn=l.dynCall_iiiiiiii=l.asm.fc).apply(null,arguments)},hn=l.dynCall_viidii=function(){return(hn=l.dynCall_viidii=l.asm.gc).apply(null,arguments)},bn=l._asyncify_start_unwind=function(){return(bn=l._asyncify_start_unwind=l.asm.hc).apply(null,arguments)},Nn=l._asyncify_stop_unwind=function(){return(Nn=l._asyncify_stop_unwind=l.asm.ic).apply(null,arguments)},Tn=l._asyncify_start_rewind=function(){return(Tn=l._asyncify_start_rewind=l.asm.jc).apply(null,arguments)},Cn=l._asyncify_stop_rewind=function(){return(Cn=l._asyncify_stop_rewind=l.asm.kc).apply(null,arguments)};function Ln(u,o,c,_,m,p,y){var E=Be();try{return Mt(u,o,c,_,m,p,y)}catch(S){if(He(E),S!==S+0)throw S;ar(1,0)}}function Di(u,o){var c=Be();try{ot(u,o)}catch(_){if(He(c),_!==_+0)throw _;ar(1,0)}}function Oi(u,o,c,_){var m=Be();try{return Ot(u,o,c,_)}catch(p){if(He(m),p!==p+0)throw p;ar(1,0)}}function Ni(u,o,c){var _=Be();try{return it(u,o,c)}catch(m){if(He(_),m!==m+0)throw m;ar(1,0)}}function Ti(u,o,c){var _=Be();try{Qr(u,o,c)}catch(m){if(He(_),m!==m+0)throw m;ar(1,0)}}function Ci(u,o){var c=Be();try{return Nt(u,o)}catch(_){if(He(c),_!==_+0)throw _;ar(1,0)}}function Fi(u,o,c,_){var m=Be();try{Ft(u,o,c,_)}catch(p){if(He(m),p!==p+0)throw p;ar(1,0)}}function Ai(u){var o=Be();try{At(u)}catch(c){if(He(o),c!==c+0)throw c;ar(1,0)}}function kn(u){var o=Be();try{return Pt(u)}catch(c){if(He(o),c!==c+0)throw c;ar(1,0)}}function In(u,o,c,_,m){var p=Be();try{Rt(u,o,c,_,m)}catch(y){if(He(p),y!==y+0)throw y;ar(1,0)}}function w(u,o,c,_,m,p){var y=Be();try{Dt(u,o,c,_,m,p)}catch(E){if(He(y),E!==E+0)throw E;ar(1,0)}}function g(u,o,c,_,m){var p=Be();try{return Tt(u,o,c,_,m)}catch(y){if(He(p),y!==y+0)throw y;ar(1,0)}}function s(u,o,c,_,m,p){var y=Be();try{return Ct(u,o,c,_,m,p)}catch(E){if(He(y),E!==E+0)throw E;ar(1,0)}}function d(u,o,c,_,m,p,y,E,S,b){var k=Be();try{return Lt(u,o,c,_,m,p,y,E,S,b)}catch(D){if(He(k),D!==D+0)throw D;ar(1,0)}}function r(u,o,c,_,m,p,y){var E=Be();try{ln(u,o,c,_,m,p,y)}catch(S){if(He(E),S!==S+0)throw S;ar(1,0)}}function i(u,o,c,_,m,p){var y=Be();try{hn(u,o,c,_,m,p)}catch(E){if(He(y),E!==E+0)throw E;ar(1,0)}}function t(u,o,c,_,m,p,y,E,S,b){var k=Be();try{Vt(u,o,c,_,m,p,y,E,S,b)}catch(D){if(He(k),D!==D+0)throw D;ar(1,0)}}function a(u,o,c,_,m,p,y,E){var S=Be();try{return pn(u,o,c,_,m,p,y,E)}catch(b){if(He(S),b!==b+0)throw b;ar(1,0)}}function n(u,o,c,_,m,p,y,E){var S=Be();try{cn(u,o,c,_,m,p,y,E)}catch(b){if(He(S),b!==b+0)throw b;ar(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=an,l.FS=e;var f;$e=function u(){f||v(),f||($e=u)};function v(u){if(u=u||Y,Re>0||(Wn(),Re>0))return;function o(){f||(f=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),o()},1)):o()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return v(),O}var Ic,Pu,Mu=Ki(()=>{"use strict";Ic=10032078,Pu=__dirname+"/php_8_1.wasm"});var Iu={};Wi(Iu,{dependenciesTotalSize:()=>Bc,dependencyFilename:()=>Lu,init:()=>xc});function xc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(n,f)=>{throw f},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(n){return l.locateFile?l.locateFile(n,ae):ae+n}var Ye,nr,Me;function Lr(n){if(n instanceof mr)return;ce("exiting due to exception: "+n)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(n,f)=>(wr(),n=Le.normalize(n),V.readFileSync(n,f?void 0:"utf8")),Me=n=>{var f=Ye(n,!0);return f.buffer||(f=new Uint8Array(f)),f},nr=(n,f,v)=>{wr(),n=Le.normalize(n),V.readFile(n,function(u,o){u?v(u):f(o.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(n){if(!(n instanceof mr))throw n}),process.on("unhandledRejection",function(n){throw n}),te=(n,f)=>{if(_r())throw process.exitCode=n,f;Lr(f),process.exit(n)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(n,f){n||ue(f)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(n,f,v){for(var u=f+v,o=f;n[o]&&!(o>=u);)++o;if(o-f>16&&n.buffer&&at)return at.decode(n.subarray(f,o));for(var c="";f<o;){var _=n[f++];if(!(_&128)){c+=String.fromCharCode(_);continue}var m=n[f++]&63;if((_&224)==192){c+=String.fromCharCode((_&31)<<6|m);continue}var p=n[f++]&63;if((_&240)==224?_=(_&15)<<12|m<<6|p:_=(_&7)<<18|m<<12|p<<6|n[f++]&63,_<65536)c+=String.fromCharCode(_);else{var y=_-65536;c+=String.fromCharCode(55296|y>>10,56320|y&1023)}}return c}function ne(n,f){return n?We(de,n,f):""}function Xe(n,f,v,u){if(!(u>0))return 0;for(var o=v,c=v+u-1,_=0;_<n.length;++_){var m=n.charCodeAt(_);if(m>=55296&&m<=57343){var p=n.charCodeAt(++_);m=65536+((m&1023)<<10)|p&1023}if(m<=127){if(v>=c)break;f[v++]=m}else if(m<=2047){if(v+1>=c)break;f[v++]=192|m>>6,f[v++]=128|m&63}else if(m<=65535){if(v+2>=c)break;f[v++]=224|m>>12,f[v++]=128|m>>6&63,f[v++]=128|m&63}else{if(v+3>=c)break;f[v++]=240|m>>18,f[v++]=128|m>>12&63,f[v++]=128|m>>6&63,f[v++]=128|m&63}}return f[v]=0,v-o}function Ae(n,f,v){return Xe(n,de,f,v)}function Pe(n){for(var f=0,v=0;v<n.length;++v){var u=n.charCodeAt(v);u<=127?f++:u<=2047?f+=2:u>=55296&&u<=57343?(f+=4,++v):f+=3}return f}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(n){Cr=n,l.HEAP8=$=new Int8Array(n),l.HEAP16=Ee=new Int16Array(n),l.HEAP32=h=new Int32Array(n),l.HEAPU8=de=new Uint8Array(n),l.HEAPU16=st=new Uint16Array(n),l.HEAPU32=H=new Uint32Array(n),l.HEAPF32=Bn=new Float32Array(n),l.HEAPF64=ut=new Float64Array(n)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),pe.root=e.mount(pe,{},null),pr(lt)}function Yn(){ye(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(n){ct.unshift(n)}function Kn(n){lt.unshift(n)}function Gn(n){dt.unshift(n)}var Re=0,Ar=null,$e=null;function Qi(n){return n}function vr(n){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(n){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var f=$e;$e=null,f()}}function ue(n){l.onAbort&&l.onAbort(n),n="Aborted("+n+")",ce(n),Ce=!0,Ge=1,n+=". Build with -sASSERTIONS for more info.";var f=new WebAssembly.RuntimeError(n);throw f}var Xn="data:application/octet-stream;base64,";function vt(n){return n.startsWith(Xn)}var _e;_e=Lu,vt(_e)||(_e=cr(_e));function mt(n){try{if(n==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(n);throw"both async and sync fetching of the wasm failed"}catch(f){ue(f)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(n){if(!n.ok)throw"failed to load wasm binary file at '"+_e+"'";return n.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var n={a:On};function f(_,m){var p=_.exports;p=ie.instrumentWasmExports(p),l.asm=p,or=l.asm.Xa,ft(or.buffer),xn=l.asm.hb,Kn(l.asm.Ya),Ze("wasm-instantiate")}vr("wasm-instantiate");function v(_){f(_.instance)}function u(_){return $n().then(function(m){return WebAssembly.instantiate(m,n)}).then(function(m){return m}).then(_,function(m){ce("failed to asynchronously prepare wasm: "+m),ue(m)})}function o(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(_){var m=WebAssembly.instantiateStreaming(_,n);return m.then(v,function(p){return ce("wasm streaming compile failed: "+p),ce("falling back to ArrayBuffer instantiation"),u(v)})}):u(v)}if(l.instantiateWasm)try{var c=l.instantiateWasm(n,f);return c=ie.instrumentWasmExports(c),c}catch(_){return ce("Module.instantiateWasm callback failed with error: "+_),!1}return o(),{}}var P,q;function mr(n){this.name="ExitStatus",this.message="Program terminated with exit("+n+")",this.status=n}function pr(n){for(;n.length>0;)n.shift()(l)}function pt(n){if(n instanceof mr||n=="unwind")return Ge;te(1,n)}function ht(n,f){$.set(n,f)}function Jn(n,f,v,u){ue("Assertion failed: "+ne(n)+", at: "+[f?ne(f):"unknown filename",v,u?ne(u):"unknown function"])}function Qn(n,f){(function(v){Be.apply(null,[n,v])})(f)}var U={isAbs:n=>n.charAt(0)==="/",splitPath:n=>{var f=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return f.exec(n).slice(1)},normalizeArray:(n,f)=>{for(var v=0,u=n.length-1;u>=0;u--){var o=n[u];o==="."?n.splice(u,1):o===".."?(n.splice(u,1),v++):v&&(n.splice(u,1),v--)}if(f)for(;v;v--)n.unshift("..");return n},normalize:n=>{var f=U.isAbs(n),v=n.substr(-1)==="/";return n=U.normalizeArray(n.split("/").filter(u=>!!u),!f).join("/"),!n&&!f&&(n="."),n&&v&&(n+="/"),(f?"/":"")+n},dirname:n=>{var f=U.splitPath(n),v=f[0],u=f[1];return!v&&!u?".":(u&&(u=u.substr(0,u.length-1)),v+u)},basename:n=>{if(n==="/")return"/";n=U.normalize(n),n=n.replace(/\/$/,"");var f=n.lastIndexOf("/");return f===-1?n:n.substr(f+1)},join:function(){var n=Array.prototype.slice.call(arguments);return U.normalize(n.join("/"))},join2:(n,f)=>U.normalize(n+"/"+f)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var n=new Uint8Array(1);return()=>(crypto.getRandomValues(n),n[0])}else if(Z)try{var f=require("crypto");return()=>f.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var n="",f=!1,v=arguments.length-1;v>=-1&&!f;v--){var u=v>=0?arguments[v]:e.cwd();if(typeof u!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!u)return"";n=u+"/"+n,f=U.isAbs(u)}return n=U.normalizeArray(n.split("/").filter(o=>!!o),!f).join("/"),(f?"/":"")+n||"."},relative:(n,f)=>{n=ge.resolve(n).substr(1),f=ge.resolve(f).substr(1);function v(y){for(var E=0;E<y.length&&y[E]==="";E++);for(var S=y.length-1;S>=0&&y[S]==="";S--);return E>S?[]:y.slice(E,S-E+1)}for(var u=v(n.split("/")),o=v(f.split("/")),c=Math.min(u.length,o.length),_=c,m=0;m<c;m++)if(u[m]!==o[m]){_=m;break}for(var p=[],m=_;m<u.length;m++)p.push("..");return p=p.concat(o.slice(_)),p.join("/")}};function Je(n,f,v){var u=v>0?v:Pe(n)+1,o=new Array(u),c=Xe(n,o,0,o.length);return f&&(o.length=c),o}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(n,f){Se.ttys[n]={input:[],output:[],ops:f},e.registerDevice(n,Se.stream_ops)},stream_ops:{open:function(n){var f=Se.ttys[n.node.rdev];if(!f)throw new e.ErrnoError(43);n.tty=f,n.seekable=!1},close:function(n){n.tty.ops.fsync(n.tty)},fsync:function(n){n.tty.ops.fsync(n.tty)},read:function(n,f,v,u,o){if(!n.tty||!n.tty.ops.get_char)throw new e.ErrnoError(60);for(var c=0,_=0;_<u;_++){var m;try{m=n.tty.ops.get_char(n.tty)}catch{throw new e.ErrnoError(29)}if(m===void 0&&c===0)throw new e.ErrnoError(6);if(m==null)break;c++,f[v+_]=m}return c&&(n.node.timestamp=Date.now()),c},write:function(n,f,v,u,o){if(!n.tty||!n.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var c=0;c<u;c++)n.tty.ops.put_char(n.tty,f[v+c])}catch{throw new e.ErrnoError(29)}return u&&(n.node.timestamp=Date.now()),c}},default_tty_ops:{get_char:function(n){if(!n.input.length){var f=null;if(Z){var v=256,u=Buffer.alloc(v),o=0;try{o=V.readSync(process.stdin.fd,u,0,v,-1)}catch(c){if(c.toString().includes("EOF"))o=0;else throw c}o>0?f=u.slice(0,o).toString("utf-8"):f=null}else typeof window<"u"&&typeof window.prompt=="function"?(f=window.prompt("Input: "),f!==null&&(f+=`
|
|
14
14
|
`)):typeof readline=="function"&&(f=readline(),f!==null&&(f+=`
|
|
15
15
|
`));if(!f)return null;n.input=Je(f,!0)}return n.input.shift()},put_char:function(n,f){f===null||f===10?(Qe(We(n.output,0)),n.output=[]):f!=0&&n.output.push(f)},fsync:function(n){n.output&&n.output.length>0&&(Qe(We(n.output,0)),n.output=[])}},default_tty1_ops:{put_char:function(n,f){f===null||f===10?(ce(We(n.output,0)),n.output=[]):f!=0&&n.output.push(f)},fsync:function(n){n.output&&n.output.length>0&&(ce(We(n.output,0)),n.output=[])}}};function Pr(n,f){return de.fill(0,n,n+f),n}function ro(n,f){return Math.ceil(n/f)*f}function Rr(n){n=ro(n,65536);var f=tr(65536,n);return f?Pr(f,n):0}var L={ops_table:null,mount:function(n){return L.createNode(null,"/",16895,0)},createNode:function(n,f,v,u){if(e.isBlkdev(v)||e.isFIFO(v))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var o=e.createNode(n,f,v,u);return e.isDir(o.mode)?(o.node_ops=L.ops_table.dir.node,o.stream_ops=L.ops_table.dir.stream,o.contents={}):e.isFile(o.mode)?(o.node_ops=L.ops_table.file.node,o.stream_ops=L.ops_table.file.stream,o.usedBytes=0,o.contents=null):e.isLink(o.mode)?(o.node_ops=L.ops_table.link.node,o.stream_ops=L.ops_table.link.stream):e.isChrdev(o.mode)&&(o.node_ops=L.ops_table.chrdev.node,o.stream_ops=L.ops_table.chrdev.stream),o.timestamp=Date.now(),n&&(n.contents[f]=o,n.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(n){return n.contents?n.contents.subarray?n.contents.subarray(0,n.usedBytes):new Uint8Array(n.contents):new Uint8Array(0)},expandFileStorage:function(n,f){var v=n.contents?n.contents.length:0;if(!(v>=f)){var u=1024*1024;f=Math.max(f,v*(v<u?2:1.125)>>>0),v!=0&&(f=Math.max(f,256));var o=n.contents;n.contents=new Uint8Array(f),n.usedBytes>0&&n.contents.set(o.subarray(0,n.usedBytes),0)}},resizeFileStorage:function(n,f){if(n.usedBytes!=f)if(f==0)n.contents=null,n.usedBytes=0;else{var v=n.contents;n.contents=new Uint8Array(f),v&&n.contents.set(v.subarray(0,Math.min(f,n.usedBytes))),n.usedBytes=f}},node_ops:{getattr:function(n){var f={};return f.dev=e.isChrdev(n.mode)?n.id:1,f.ino=n.id,f.mode=n.mode,f.nlink=1,f.uid=0,f.gid=0,f.rdev=n.rdev,e.isDir(n.mode)?f.size=4096:e.isFile(n.mode)?f.size=n.usedBytes:e.isLink(n.mode)?f.size=n.link.length:f.size=0,f.atime=new Date(n.timestamp),f.mtime=new Date(n.timestamp),f.ctime=new Date(n.timestamp),f.blksize=4096,f.blocks=Math.ceil(f.size/f.blksize),f},setattr:function(n,f){f.mode!==void 0&&(n.mode=f.mode),f.timestamp!==void 0&&(n.timestamp=f.timestamp),f.size!==void 0&&L.resizeFileStorage(n,f.size)},lookup:function(n,f){throw e.genericErrors[44]},mknod:function(n,f,v,u){return L.createNode(n,f,v,u)},rename:function(n,f,v){if(e.isDir(n.mode)){var u;try{u=e.lookupNode(f,v)}catch{}if(u)for(var o in u.contents)throw new e.ErrnoError(55)}delete n.parent.contents[n.name],n.parent.timestamp=Date.now(),n.name=v,f.contents[v]=n,f.timestamp=n.parent.timestamp,n.parent=f},unlink:function(n,f){delete n.contents[f],n.timestamp=Date.now()},rmdir:function(n,f){var v=e.lookupNode(n,f);for(var u in v.contents)throw new e.ErrnoError(55);delete n.contents[f],n.timestamp=Date.now()},readdir:function(n){var f=[".",".."];for(var v in n.contents)n.contents.hasOwnProperty(v)&&f.push(v);return f},symlink:function(n,f,v){var u=L.createNode(n,f,41471,0);return u.link=v,u},readlink:function(n){if(!e.isLink(n.mode))throw new e.ErrnoError(28);return n.link}},stream_ops:{read:function(n,f,v,u,o){var c=n.node.contents;if(o>=n.node.usedBytes)return 0;var _=Math.min(n.node.usedBytes-o,u);if(_>8&&c.subarray)f.set(c.subarray(o,o+_),v);else for(var m=0;m<_;m++)f[v+m]=c[o+m];return _},write:function(n,f,v,u,o,c){if(f.buffer===$.buffer&&(c=!1),!u)return 0;var _=n.node;if(_.timestamp=Date.now(),f.subarray&&(!_.contents||_.contents.subarray)){if(c)return _.contents=f.subarray(v,v+u),_.usedBytes=u,u;if(_.usedBytes===0&&o===0)return _.contents=f.slice(v,v+u),_.usedBytes=u,u;if(o+u<=_.usedBytes)return _.contents.set(f.subarray(v,v+u),o),u}if(L.expandFileStorage(_,o+u),_.contents.subarray&&f.subarray)_.contents.set(f.subarray(v,v+u),o);else for(var m=0;m<u;m++)_.contents[o+m]=f[v+m];return _.usedBytes=Math.max(_.usedBytes,o+u),u},llseek:function(n,f,v){var u=f;if(v===1?u+=n.position:v===2&&e.isFile(n.node.mode)&&(u+=n.node.usedBytes),u<0)throw new e.ErrnoError(28);return u},allocate:function(n,f,v){L.expandFileStorage(n.node,f+v),n.node.usedBytes=Math.max(n.node.usedBytes,f+v)},mmap:function(n,f,v,u,o){if(!e.isFile(n.node.mode))throw new e.ErrnoError(43);var c,_,m=n.node.contents;if(!(o&2)&&m.buffer===Cr)_=!1,c=m.byteOffset;else{if((v>0||v+f<m.length)&&(m.subarray?m=m.subarray(v,v+f):m=Array.prototype.slice.call(m,v,v+f)),_=!0,c=Rr(f),!c)throw new e.ErrnoError(48);$.set(m,c)}return{ptr:c,allocated:_}},msync:function(n,f,v,u,o){return L.stream_ops.write(n,f,0,u,v,!1),0}}};function to(n,f,v,u){var o=u?"":"al "+n;nr(n,c=>{Ne(c,'Loading data file "'+n+'" failed (no arrayBuffer).'),f(new Uint8Array(c)),o&&Ze(o)},c=>{if(v)v();else throw'Loading data file "'+n+'" failed.'}),o&&vr(o)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var n=process.binding("constants");n.fs&&(n=n.fs),M.flagsForNodeMap={1024:n.O_APPEND,64:n.O_CREAT,128:n.O_EXCL,256:n.O_NOCTTY,0:n.O_RDONLY,2:n.O_RDWR,4096:n.O_SYNC,512:n.O_TRUNC,1:n.O_WRONLY,131072:n.O_NOFOLLOW}},convertNodeCode:n=>{var f=n.code;return yt[f]},mount:n=>M.createNode(null,"/",M.getMode(n.opts.root),0),createNode:(n,f,v,u)=>{if(!e.isDir(v)&&!e.isFile(v)&&!e.isLink(v))throw new e.ErrnoError(28);var o=e.createNode(n,f,v);return o.node_ops=M.node_ops,o.stream_ops=M.stream_ops,o},getMode:n=>{var f;try{f=V.lstatSync(n),M.isWindows&&(f.mode=f.mode|(f.mode&292)>>2)}catch(v){throw v.code?new e.ErrnoError(M.convertNodeCode(v)):v}return f.mode},realPath:n=>{for(var f=[];n.parent!==n;)f.push(n.name),n=n.parent;return f.push(n.mount.opts.root),f.reverse(),U.join.apply(null,f)},flagsForNode:n=>{n&=-2097153,n&=-2049,n&=-32769,n&=-524289,n&=-65537;var f=0;for(var v in M.flagsForNodeMap)n&v&&(f|=M.flagsForNodeMap[v],n^=v);if(n)throw new e.ErrnoError(28);return f},node_ops:{getattr:n=>{var f=M.realPath(n),v;try{v=V.lstatSync(f)}catch(u){throw u.code?new e.ErrnoError(M.convertNodeCode(u)):u}return M.isWindows&&!v.blksize&&(v.blksize=4096),M.isWindows&&!v.blocks&&(v.blocks=(v.size+v.blksize-1)/v.blksize|0),{dev:v.dev,ino:v.ino,mode:v.mode,nlink:v.nlink,uid:v.uid,gid:v.gid,rdev:v.rdev,size:v.size,atime:v.atime,mtime:v.mtime,ctime:v.ctime,blksize:v.blksize,blocks:v.blocks}},setattr:(n,f)=>{var v=M.realPath(n);try{if(f.mode!==void 0&&(V.chmodSync(v,f.mode),n.mode=f.mode),f.timestamp!==void 0){var u=new Date(f.timestamp);V.utimesSync(v,u,u)}f.size!==void 0&&V.truncateSync(v,f.size)}catch(o){throw o.code?new e.ErrnoError(M.convertNodeCode(o)):o}},lookup:(n,f)=>{var v=U.join2(M.realPath(n),f),u=M.getMode(v);return M.createNode(n,f,u)},mknod:(n,f,v,u)=>{var o=M.createNode(n,f,v,u),c=M.realPath(o);try{e.isDir(o.mode)?V.mkdirSync(c,o.mode):V.writeFileSync(c,"",{mode:o.mode})}catch(_){throw _.code?new e.ErrnoError(M.convertNodeCode(_)):_}return o},rename:(n,f,v)=>{var u=M.realPath(n),o=U.join2(M.realPath(f),v);try{V.renameSync(u,o)}catch(c){throw c.code?new e.ErrnoError(M.convertNodeCode(c)):c}n.name=v},unlink:(n,f)=>{var v=U.join2(M.realPath(n),f);try{V.unlinkSync(v)}catch(u){throw u.code?new e.ErrnoError(M.convertNodeCode(u)):u}},rmdir:(n,f)=>{var v=U.join2(M.realPath(n),f);try{V.rmdirSync(v)}catch(u){throw u.code?new e.ErrnoError(M.convertNodeCode(u)):u}},readdir:n=>{var f=M.realPath(n);try{return V.readdirSync(f)}catch(v){throw v.code?new e.ErrnoError(M.convertNodeCode(v)):v}},symlink:(n,f,v)=>{var u=U.join2(M.realPath(n),f);try{V.symlinkSync(v,u)}catch(o){throw o.code?new e.ErrnoError(M.convertNodeCode(o)):o}},readlink:n=>{var f=M.realPath(n);try{return f=V.readlinkSync(f),f=Le.relative(Le.resolve(n.mount.opts.root),f),f}catch(v){throw v.code?v.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(v)):v}}},stream_ops:{open:n=>{var f=M.realPath(n.node);try{e.isFile(n.node.mode)&&(n.nfd=V.openSync(f,M.flagsForNode(n.flags)))}catch(v){throw v.code?new e.ErrnoError(M.convertNodeCode(v)):v}},close:n=>{try{e.isFile(n.node.mode)&&n.nfd&&V.closeSync(n.nfd)}catch(f){throw f.code?new e.ErrnoError(M.convertNodeCode(f)):f}},read:(n,f,v,u,o)=>{if(u===0)return 0;try{return V.readSync(n.nfd,Buffer.from(f.buffer),v,u,o)}catch(c){throw new e.ErrnoError(M.convertNodeCode(c))}},write:(n,f,v,u,o)=>{try{return V.writeSync(n.nfd,Buffer.from(f.buffer),v,u,o)}catch(c){throw new e.ErrnoError(M.convertNodeCode(c))}},llseek:(n,f,v)=>{var u=f;if(v===1)u+=n.position;else if(v===2&&e.isFile(n.node.mode))try{var o=V.fstatSync(n.nfd);u+=o.size}catch(c){throw new e.ErrnoError(M.convertNodeCode(c))}if(u<0)throw new e.ErrnoError(28);return u},mmap:(n,f,v,u,o)=>{if(!e.isFile(n.node.mode))throw new e.ErrnoError(43);var c=Rr(f);return M.stream_ops.read(n,$,c,f,v),{ptr:c,allocated:!0}},msync:(n,f,v,u,o)=>(M.stream_ops.write(n,f,0,u,v,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(n,f={})=>{if(n=ge.resolve(e.cwd(),n),!n)return{path:"",node:null};var v={follow_mount:!0,recurse_count:0};if(f=Object.assign(v,f),f.recurse_count>8)throw new e.ErrnoError(32);for(var u=U.normalizeArray(n.split("/").filter(S=>!!S),!1),o=e.root,c="/",_=0;_<u.length;_++){var m=_===u.length-1;if(m&&f.parent)break;if(o=e.lookupNode(o,u[_]),c=U.join2(c,u[_]),e.isMountpoint(o)&&(!m||m&&f.follow_mount)&&(o=o.mounted.root),!m||f.follow)for(var p=0;e.isLink(o.mode);){var y=e.readlink(c);c=ge.resolve(U.dirname(c),y);var E=e.lookupPath(c,{recurse_count:f.recurse_count+1});if(o=E.node,p++>40)throw new e.ErrnoError(32)}}return{path:c,node:o}},getPath:n=>{for(var f;;){if(e.isRoot(n)){var v=n.mount.mountpoint;return f?v[v.length-1]!=="/"?v+"/"+f:v+f:v}f=f?n.name+"/"+f:n.name,n=n.parent}},hashName:(n,f)=>{for(var v=0,u=0;u<f.length;u++)v=(v<<5)-v+f.charCodeAt(u)|0;return(n+v>>>0)%e.nameTable.length},hashAddNode:n=>{var f=e.hashName(n.parent.id,n.name);n.name_next=e.nameTable[f],e.nameTable[f]=n},hashRemoveNode:n=>{var f=e.hashName(n.parent.id,n.name);if(e.nameTable[f]===n)e.nameTable[f]=n.name_next;else for(var v=e.nameTable[f];v;){if(v.name_next===n){v.name_next=n.name_next;break}v=v.name_next}},lookupNode:(n,f)=>{var v=e.mayLookup(n);if(v)throw new e.ErrnoError(v,n);for(var u=e.hashName(n.id,f),o=e.nameTable[u];o;o=o.name_next){var c=o.name;if(o.parent.id===n.id&&c===f)return o}return e.lookup(n,f)},createNode:(n,f,v,u)=>{var o=new e.FSNode(n,f,v,u);return e.hashAddNode(o),o},destroyNode:n=>{e.hashRemoveNode(n)},isRoot:n=>n===n.parent,isMountpoint:n=>!!n.mounted,isFile:n=>(n&61440)===32768,isDir:n=>(n&61440)===16384,isLink:n=>(n&61440)===40960,isChrdev:n=>(n&61440)===8192,isBlkdev:n=>(n&61440)===24576,isFIFO:n=>(n&61440)===4096,isSocket:n=>(n&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:n=>{var f=e.flagModes[n];if(typeof f>"u")throw new Error("Unknown file open mode: "+n);return f},flagsToPermissionString:n=>{var f=["r","w","rw"][n&3];return n&512&&(f+="w"),f},nodePermissions:(n,f)=>e.ignorePermissions?0:f.includes("r")&&!(n.mode&292)||f.includes("w")&&!(n.mode&146)||f.includes("x")&&!(n.mode&73)?2:0,mayLookup:n=>{var f=e.nodePermissions(n,"x");return f||(n.node_ops.lookup?0:2)},mayCreate:(n,f)=>{try{var v=e.lookupNode(n,f);return 20}catch{}return e.nodePermissions(n,"wx")},mayDelete:(n,f,v)=>{var u;try{u=e.lookupNode(n,f)}catch(c){return c.errno}var o=e.nodePermissions(n,"wx");if(o)return o;if(v){if(!e.isDir(u.mode))return 54;if(e.isRoot(u)||e.getPath(u)===e.cwd())return 10}else if(e.isDir(u.mode))return 31;return 0},mayOpen:(n,f)=>n?e.isLink(n.mode)?32:e.isDir(n.mode)&&(e.flagsToPermissionString(f)!=="r"||f&512)?31:e.nodePermissions(n,e.flagsToPermissionString(f)):44,MAX_OPEN_FDS:4096,nextfd:(n=0,f=e.MAX_OPEN_FDS)=>{for(var v=n;v<=f;v++)if(!e.streams[v])return v;throw new e.ErrnoError(33)},getStream:n=>e.streams[n],createStream:(n,f,v)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(o){this.node=o}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(o){this.shared.flags=o}},position:{get:function(){return this.shared.position},set:function(o){this.shared.position=o}}})),n=Object.assign(new e.FSStream,n);var u=e.nextfd(f,v);return n.fd=u,e.streams[u]=n,n},closeStream:n=>{e.streams[n]=null},chrdev_stream_ops:{open:n=>{var f=e.getDevice(n.node.rdev);n.stream_ops=f.stream_ops,n.stream_ops.open&&n.stream_ops.open(n)},llseek:()=>{throw new e.ErrnoError(70)}},major:n=>n>>8,minor:n=>n&255,makedev:(n,f)=>n<<8|f,registerDevice:(n,f)=>{e.devices[n]={stream_ops:f}},getDevice:n=>e.devices[n],getMounts:n=>{for(var f=[],v=[n];v.length;){var u=v.pop();f.push(u),v.push.apply(v,u.mounts)}return f},syncfs:(n,f)=>{typeof n=="function"&&(f=n,n=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var v=e.getMounts(e.root.mount),u=0;function o(_){return e.syncFSRequests--,f(_)}function c(_){if(_)return c.errored?void 0:(c.errored=!0,o(_));++u>=v.length&&o(null)}v.forEach(_=>{if(!_.type.syncfs)return c(null);_.type.syncfs(_,n,c)})},mount:(n,f,v)=>{var u=v==="/",o=!v,c;if(u&&e.root)throw new e.ErrnoError(10);if(!u&&!o){var _=e.lookupPath(v,{follow_mount:!1});if(v=_.path,c=_.node,e.isMountpoint(c))throw new e.ErrnoError(10);if(!e.isDir(c.mode))throw new e.ErrnoError(54)}var m={type:n,opts:f,mountpoint:v,mounts:[]},p=n.mount(m);return p.mount=m,m.root=p,u?e.root=p:c&&(c.mounted=m,c.mount&&c.mount.mounts.push(m)),p},unmount:n=>{var f=e.lookupPath(n,{follow_mount:!1});if(!e.isMountpoint(f.node))throw new e.ErrnoError(28);var v=f.node,u=v.mounted,o=e.getMounts(u);Object.keys(e.nameTable).forEach(_=>{for(var m=e.nameTable[_];m;){var p=m.name_next;o.includes(m.mount)&&e.destroyNode(m),m=p}}),v.mounted=null;var c=v.mount.mounts.indexOf(u);v.mount.mounts.splice(c,1)},lookup:(n,f)=>n.node_ops.lookup(n,f),mknod:(n,f,v)=>{var u=e.lookupPath(n,{parent:!0}),o=u.node,c=U.basename(n);if(!c||c==="."||c==="..")throw new e.ErrnoError(28);var _=e.mayCreate(o,c);if(_)throw new e.ErrnoError(_);if(!o.node_ops.mknod)throw new e.ErrnoError(63);return o.node_ops.mknod(o,c,f,v)},create:(n,f)=>(f=f!==void 0?f:438,f&=4095,f|=32768,e.mknod(n,f,0)),mkdir:(n,f)=>(f=f!==void 0?f:511,f&=1023,f|=16384,e.mknod(n,f,0)),mkdirTree:(n,f)=>{for(var v=n.split("/"),u="",o=0;o<v.length;++o)if(v[o]){u+="/"+v[o];try{e.mkdir(u,f)}catch(c){if(c.errno!=20)throw c}}},mkdev:(n,f,v)=>(typeof v>"u"&&(v=f,f=438),f|=8192,e.mknod(n,f,v)),symlink:(n,f)=>{if(!ge.resolve(n))throw new e.ErrnoError(44);var v=e.lookupPath(f,{parent:!0}),u=v.node;if(!u)throw new e.ErrnoError(44);var o=U.basename(f),c=e.mayCreate(u,o);if(c)throw new e.ErrnoError(c);if(!u.node_ops.symlink)throw new e.ErrnoError(63);return u.node_ops.symlink(u,o,n)},rename:(n,f)=>{var v=U.dirname(n),u=U.dirname(f),o=U.basename(n),c=U.basename(f),_,m,p;if(_=e.lookupPath(n,{parent:!0}),m=_.node,_=e.lookupPath(f,{parent:!0}),p=_.node,!m||!p)throw new e.ErrnoError(44);if(m.mount!==p.mount)throw new e.ErrnoError(75);var y=e.lookupNode(m,o),E=ge.relative(n,u);if(E.charAt(0)!==".")throw new e.ErrnoError(28);if(E=ge.relative(f,v),E.charAt(0)!==".")throw new e.ErrnoError(55);var S;try{S=e.lookupNode(p,c)}catch{}if(y!==S){var b=e.isDir(y.mode),k=e.mayDelete(m,o,b);if(k)throw new e.ErrnoError(k);if(k=S?e.mayDelete(p,c,b):e.mayCreate(p,c),k)throw new e.ErrnoError(k);if(!m.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(y)||S&&e.isMountpoint(S))throw new e.ErrnoError(10);if(p!==m&&(k=e.nodePermissions(m,"w"),k))throw new e.ErrnoError(k);e.hashRemoveNode(y);try{m.node_ops.rename(y,p,c)}catch(D){throw D}finally{e.hashAddNode(y)}}},rmdir:n=>{var f=e.lookupPath(n,{parent:!0}),v=f.node,u=U.basename(n),o=e.lookupNode(v,u),c=e.mayDelete(v,u,!0);if(c)throw new e.ErrnoError(c);if(!v.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(o))throw new e.ErrnoError(10);v.node_ops.rmdir(v,u),e.destroyNode(o)},readdir:n=>{var f=e.lookupPath(n,{follow:!0}),v=f.node;if(!v.node_ops.readdir)throw new e.ErrnoError(54);return v.node_ops.readdir(v)},unlink:n=>{var f=e.lookupPath(n,{parent:!0}),v=f.node;if(!v)throw new e.ErrnoError(44);var u=U.basename(n),o=e.lookupNode(v,u),c=e.mayDelete(v,u,!1);if(c)throw new e.ErrnoError(c);if(!v.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(o))throw new e.ErrnoError(10);v.node_ops.unlink(v,u),e.destroyNode(o)},readlink:n=>{var f=e.lookupPath(n),v=f.node;if(!v)throw new e.ErrnoError(44);if(!v.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(v.parent),v.node_ops.readlink(v))},stat:(n,f)=>{var v=e.lookupPath(n,{follow:!f}),u=v.node;if(!u)throw new e.ErrnoError(44);if(!u.node_ops.getattr)throw new e.ErrnoError(63);return u.node_ops.getattr(u)},lstat:n=>e.stat(n,!0),chmod:(n,f,v)=>{var u;if(typeof n=="string"){var o=e.lookupPath(n,{follow:!v});u=o.node}else u=n;if(!u.node_ops.setattr)throw new e.ErrnoError(63);u.node_ops.setattr(u,{mode:f&4095|u.mode&-4096,timestamp:Date.now()})},lchmod:(n,f)=>{e.chmod(n,f,!0)},fchmod:(n,f)=>{var v=e.getStream(n);if(!v)throw new e.ErrnoError(8);e.chmod(v.node,f)},chown:(n,f,v,u)=>{var o;if(typeof n=="string"){var c=e.lookupPath(n,{follow:!u});o=c.node}else o=n;if(!o.node_ops.setattr)throw new e.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(n,f,v)=>{e.chown(n,f,v,!0)},fchown:(n,f,v)=>{var u=e.getStream(n);if(!u)throw new e.ErrnoError(8);e.chown(u.node,f,v)},truncate:(n,f)=>{if(f<0)throw new e.ErrnoError(28);var v;if(typeof n=="string"){var u=e.lookupPath(n,{follow:!0});v=u.node}else v=n;if(!v.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(v.mode))throw new e.ErrnoError(31);if(!e.isFile(v.mode))throw new e.ErrnoError(28);var o=e.nodePermissions(v,"w");if(o)throw new e.ErrnoError(o);v.node_ops.setattr(v,{size:f,timestamp:Date.now()})},ftruncate:(n,f)=>{var v=e.getStream(n);if(!v)throw new e.ErrnoError(8);if(!(v.flags&2097155))throw new e.ErrnoError(28);e.truncate(v.node,f)},utime:(n,f,v)=>{var u=e.lookupPath(n,{follow:!0}),o=u.node;o.node_ops.setattr(o,{timestamp:Math.max(f,v)})},open:(n,f,v)=>{if(n==="")throw new e.ErrnoError(44);f=typeof f=="string"?e.modeStringToFlags(f):f,v=typeof v>"u"?438:v,f&64?v=v&4095|32768:v=0;var u;if(typeof n=="object")u=n;else{n=U.normalize(n);try{var o=e.lookupPath(n,{follow:!(f&131072)});u=o.node}catch{}}var c=!1;if(f&64)if(u){if(f&128)throw new e.ErrnoError(20)}else u=e.mknod(n,v,0),c=!0;if(!u)throw new e.ErrnoError(44);if(e.isChrdev(u.mode)&&(f&=-513),f&65536&&!e.isDir(u.mode))throw new e.ErrnoError(54);if(!c){var _=e.mayOpen(u,f);if(_)throw new e.ErrnoError(_)}f&512&&!c&&e.truncate(u,0),f&=-131713;var m=e.createStream({node:u,path:e.getPath(u),flags:f,seekable:!0,position:0,stream_ops:u.stream_ops,ungotten:[],error:!1});return m.stream_ops.open&&m.stream_ops.open(m),l.logReadFiles&&!(f&1)&&(e.readFiles||(e.readFiles={}),n in e.readFiles||(e.readFiles[n]=1)),m},close:n=>{if(e.isClosed(n))throw new e.ErrnoError(8);n.getdents&&(n.getdents=null);try{n.stream_ops.close&&n.stream_ops.close(n)}catch(f){throw f}finally{e.closeStream(n.fd)}n.fd=null},isClosed:n=>n.fd===null,llseek:(n,f,v)=>{if(e.isClosed(n))throw new e.ErrnoError(8);if(!n.seekable||!n.stream_ops.llseek)throw new e.ErrnoError(70);if(v!=0&&v!=1&&v!=2)throw new e.ErrnoError(28);return n.position=n.stream_ops.llseek(n,f,v),n.ungotten=[],n.position},read:(n,f,v,u,o)=>{if(u<0||o<0)throw new e.ErrnoError(28);if(e.isClosed(n))throw new e.ErrnoError(8);if((n.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(n.node.mode))throw new e.ErrnoError(31);if(!n.stream_ops.read)throw new e.ErrnoError(28);var c=typeof o<"u";if(!c)o=n.position;else if(!n.seekable)throw new e.ErrnoError(70);var _=n.stream_ops.read(n,f,v,u,o);return c||(n.position+=_),_},write:(n,f,v,u,o,c)=>{if(u<0||o<0)throw new e.ErrnoError(28);if(e.isClosed(n))throw new e.ErrnoError(8);if(!(n.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(n.node.mode))throw new e.ErrnoError(31);if(!n.stream_ops.write)throw new e.ErrnoError(28);n.seekable&&n.flags&1024&&e.llseek(n,0,2);var _=typeof o<"u";if(!_)o=n.position;else if(!n.seekable)throw new e.ErrnoError(70);var m=n.stream_ops.write(n,f,v,u,o,c);return _||(n.position+=m),m},allocate:(n,f,v)=>{if(e.isClosed(n))throw new e.ErrnoError(8);if(f<0||v<=0)throw new e.ErrnoError(28);if(!(n.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(n.node.mode)&&!e.isDir(n.node.mode))throw new e.ErrnoError(43);if(!n.stream_ops.allocate)throw new e.ErrnoError(138);n.stream_ops.allocate(n,f,v)},mmap:(n,f,v,u,o)=>{if(u&2&&!(o&2)&&(n.flags&2097155)!==2)throw new e.ErrnoError(2);if((n.flags&2097155)===1)throw new e.ErrnoError(2);if(!n.stream_ops.mmap)throw new e.ErrnoError(43);return n.stream_ops.mmap(n,f,v,u,o)},msync:(n,f,v,u,o)=>n.stream_ops.msync?n.stream_ops.msync(n,f,v,u,o):0,munmap:n=>0,ioctl:(n,f,v)=>{if(!n.stream_ops.ioctl)throw new e.ErrnoError(59);return n.stream_ops.ioctl(n,f,v)},readFile:(n,f={})=>{if(f.flags=f.flags||0,f.encoding=f.encoding||"binary",f.encoding!=="utf8"&&f.encoding!=="binary")throw new Error('Invalid encoding type "'+f.encoding+'"');var v,u=e.open(n,f.flags),o=e.stat(n),c=o.size,_=new Uint8Array(c);return e.read(u,_,0,c,0),f.encoding==="utf8"?v=We(_,0):f.encoding==="binary"&&(v=_),e.close(u),v},writeFile:(n,f,v={})=>{v.flags=v.flags||577;var u=e.open(n,v.flags,v.mode);if(typeof f=="string"){var o=new Uint8Array(Pe(f)+1),c=Xe(f,o,0,o.length);e.write(u,o,0,c,void 0,v.canOwn)}else if(ArrayBuffer.isView(f))e.write(u,f,0,f.byteLength,void 0,v.canOwn);else throw new Error("Unsupported data type");e.close(u)},cwd:()=>e.currentPath,chdir:n=>{var f=e.lookupPath(n,{follow:!0});if(f.node===null)throw new e.ErrnoError(44);if(!e.isDir(f.node.mode))throw new e.ErrnoError(54);var v=e.nodePermissions(f.node,"x");if(v)throw new e.ErrnoError(v);e.currentPath=f.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(f,v,u,o,c)=>o}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var n=eo();e.createDevice("/dev","random",n),e.createDevice("/dev","urandom",n),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var n=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var f=e.createNode(n,"fd",16895,73);return f.node_ops={lookup:(v,u)=>{var o=+u,c=e.getStream(o);if(!c)throw new e.ErrnoError(8);var _={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>c.path}};return _.parent=_,_}},f}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var n=e.open("/dev/stdin",0),f=e.open("/dev/stdout",1),v=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(f,v){this.node=v,this.setErrno=function(u){this.errno=u},this.setErrno(f),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(n=>{e.genericErrors[n]=new e.ErrnoError(n),e.genericErrors[n].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(n,f,v)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=n||l.stdin,l.stdout=f||l.stdout,l.stderr=v||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,Ur(0);for(var n=0;n<e.streams.length;n++){var f=e.streams[n];f&&e.close(f)}},getMode:(n,f)=>{var v=0;return n&&(v|=365),f&&(v|=146),v},findObject:(n,f)=>{var v=e.analyzePath(n,f);return v.exists?v.object:null},analyzePath:(n,f)=>{try{var v=e.lookupPath(n,{follow:!f});n=v.path}catch{}var u={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var v=e.lookupPath(n,{parent:!0});u.parentExists=!0,u.parentPath=v.path,u.parentObject=v.node,u.name=U.basename(n),v=e.lookupPath(n,{follow:!f}),u.exists=!0,u.path=v.path,u.object=v.node,u.name=v.node.name,u.isRoot=v.path==="/"}catch(o){u.error=o.errno}return u},createPath:(n,f,v,u)=>{n=typeof n=="string"?n:e.getPath(n);for(var o=f.split("/").reverse();o.length;){var c=o.pop();if(c){var _=U.join2(n,c);try{e.mkdir(_)}catch{}n=_}}return _},createFile:(n,f,v,u,o)=>{var c=U.join2(typeof n=="string"?n:e.getPath(n),f),_=e.getMode(u,o);return e.create(c,_)},createDataFile:(n,f,v,u,o,c)=>{var _=f;n&&(n=typeof n=="string"?n:e.getPath(n),_=f?U.join2(n,f):n);var m=e.getMode(u,o),p=e.create(_,m);if(v){if(typeof v=="string"){for(var y=new Array(v.length),E=0,S=v.length;E<S;++E)y[E]=v.charCodeAt(E);v=y}e.chmod(p,m|146);var b=e.open(p,577);e.write(b,v,0,v.length,0,c),e.close(b),e.chmod(p,m)}return p},createDevice:(n,f,v,u)=>{var o=U.join2(typeof n=="string"?n:e.getPath(n),f),c=e.getMode(!!v,!!u);e.createDevice.major||(e.createDevice.major=64);var _=e.makedev(e.createDevice.major++,0);return e.registerDevice(_,{open:m=>{m.seekable=!1},close:m=>{u&&u.buffer&&u.buffer.length&&u(10)},read:(m,p,y,E,S)=>{for(var b=0,k=0;k<E;k++){var D;try{D=v()}catch{throw new e.ErrnoError(29)}if(D===void 0&&b===0)throw new e.ErrnoError(6);if(D==null)break;b++,p[y+k]=D}return b&&(m.node.timestamp=Date.now()),b},write:(m,p,y,E,S)=>{for(var b=0;b<E;b++)try{u(p[y+b])}catch{throw new e.ErrnoError(29)}return E&&(m.node.timestamp=Date.now()),b}}),e.mkdev(o,c,_)},forceLoadFile:n=>{if(n.isDevice||n.isFolder||n.link||n.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{n.contents=Je(Ye(n.url),!0),n.usedBytes=n.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(n,f,v,u,o)=>{function c(){this.lengthKnown=!1,this.chunks=[]}if(c.prototype.get=function(k){if(!(k>this.length-1||k<0)){var D=k%this.chunkSize,T=k/this.chunkSize|0;return this.getter(T)[D]}},c.prototype.setDataGetter=function(k){this.getter=k},c.prototype.cacheLength=function(){var k=new XMLHttpRequest;if(k.open("HEAD",v,!1),k.send(null),!(k.status>=200&&k.status<300||k.status===304))throw new Error("Couldn't load "+v+". Status: "+k.status);var D=Number(k.getResponseHeader("Content-length")),T,C=(T=k.getResponseHeader("Accept-Ranges"))&&T==="bytes",A=(T=k.getResponseHeader("Content-Encoding"))&&T==="gzip",I=1024*1024;C||(I=D);var z=(B,x)=>{if(B>x)throw new Error("invalid range ("+B+", "+x+") or no bytes requested!");if(x>D-1)throw new Error("only "+D+" bytes available! programmer error!");var G=new XMLHttpRequest;if(G.open("GET",v,!1),D!==I&&G.setRequestHeader("Range","bytes="+B+"-"+x),G.responseType="arraybuffer",G.overrideMimeType&&G.overrideMimeType("text/plain; charset=x-user-defined"),G.send(null),!(G.status>=200&&G.status<300||G.status===304))throw new Error("Couldn't load "+v+". Status: "+G.status);return G.response!==void 0?new Uint8Array(G.response||[]):Je(G.responseText||"",!0)},K=this;K.setDataGetter(B=>{var x=B*I,G=(B+1)*I-1;if(G=Math.min(G,D-1),typeof K.chunks[B]>"u"&&(K.chunks[B]=z(x,G)),typeof K.chunks[B]>"u")throw new Error("doXHR failed!");return K.chunks[B]}),(A||!D)&&(I=D=1,D=this.getter(0).length,I=D,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=D,this._chunkSize=I,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var _=new c;Object.defineProperties(_,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var m={isDevice:!1,contents:_}}else var m={isDevice:!1,url:v};var p=e.createFile(n,f,m,u,o);m.contents?p.contents=m.contents:m.url&&(p.contents=null,p.url=m.url),Object.defineProperties(p,{usedBytes:{get:function(){return this.contents.length}}});var y={},E=Object.keys(p.stream_ops);E.forEach(b=>{var k=p.stream_ops[b];y[b]=function(){return e.forceLoadFile(p),k.apply(null,arguments)}});function S(b,k,D,T,C){var A=b.node.contents;if(C>=A.length)return 0;var I=Math.min(A.length-C,T);if(A.slice)for(var z=0;z<I;z++)k[D+z]=A[C+z];else for(var z=0;z<I;z++)k[D+z]=A.get(C+z);return I}return y.read=(b,k,D,T,C)=>(e.forceLoadFile(p),S(b,k,D,T,C)),y.mmap=(b,k,D,T,C)=>{e.forceLoadFile(p);var A=Rr(k);if(!A)throw new e.ErrnoError(48);return S(b,$,A,k,D),{ptr:A,allocated:!0}},p.stream_ops=y,p},createPreloadedFile:(n,f,v,u,o,c,_,m,p,y)=>{var E=f?ge.resolve(U.join2(n,f)):n,S="cp "+E;function b(k){function D(T){y&&y(),m||e.createDataFile(n,f,T,u,o,p),c&&c(),Ze(S)}Browser.handledByPreloadPlugin(k,E,D,()=>{_&&_(),Ze(S)})||D(k)}vr(S),typeof v=="string"?to(v,k=>b(k),_):b(v)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(n,f,v)=>{f=f||(()=>{}),v=v||(()=>{});var u=e.indexedDB();try{var o=u.open(e.DB_NAME(),e.DB_VERSION)}catch(c){return v(c)}o.onupgradeneeded=()=>{Qe("creating db");var c=o.result;c.createObjectStore(e.DB_STORE_NAME)},o.onsuccess=()=>{var c=o.result,_=c.transaction([e.DB_STORE_NAME],"readwrite"),m=_.objectStore(e.DB_STORE_NAME),p=0,y=0,E=n.length;function S(){y==0?f():v()}n.forEach(b=>{var k=m.put(e.analyzePath(b).object.contents,b);k.onsuccess=()=>{p++,p+y==E&&S()},k.onerror=()=>{y++,p+y==E&&S()}}),_.onerror=v},o.onerror=v},loadFilesFromDB:(n,f,v)=>{f=f||(()=>{}),v=v||(()=>{});var u=e.indexedDB();try{var o=u.open(e.DB_NAME(),e.DB_VERSION)}catch(c){return v(c)}o.onupgradeneeded=v,o.onsuccess=()=>{var c=o.result;try{var _=c.transaction([e.DB_STORE_NAME],"readonly")}catch(b){v(b);return}var m=_.objectStore(e.DB_STORE_NAME),p=0,y=0,E=n.length;function S(){y==0?f():v()}n.forEach(b=>{var k=m.get(b);k.onsuccess=()=>{e.analyzePath(b).exists&&e.unlink(b),e.createDataFile(U.dirname(b),U.basename(b),k.result,!0,!0,!0),p++,p+y==E&&S()},k.onerror=()=>{y++,p+y==E&&S()}}),_.onerror=v},o.onerror=v}},N={DEFAULT_POLLMASK:5,calculateAt:function(n,f,v){if(U.isAbs(f))return f;var u;if(n===-100)u=e.cwd();else{var o=N.getStreamFromFD(n);u=o.path}if(f.length==0){if(!v)throw new e.ErrnoError(44);return u}return U.join2(u,f)},doStat:function(n,f,v){try{var u=n(f)}catch(o){if(o&&o.node&&U.normalize(f)!==U.normalize(e.getPath(o.node)))return-54;throw o}return h[v>>2]=u.dev,h[v+8>>2]=u.ino,h[v+12>>2]=u.mode,H[v+16>>2]=u.nlink,h[v+20>>2]=u.uid,h[v+24>>2]=u.gid,h[v+28>>2]=u.rdev,q=[u.size>>>0,(P=u.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[v+40>>2]=q[0],h[v+44>>2]=q[1],h[v+48>>2]=4096,h[v+52>>2]=u.blocks,q=[Math.floor(u.atime.getTime()/1e3)>>>0,(P=Math.floor(u.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[v+56>>2]=q[0],h[v+60>>2]=q[1],H[v+64>>2]=0,q=[Math.floor(u.mtime.getTime()/1e3)>>>0,(P=Math.floor(u.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[v+72>>2]=q[0],h[v+76>>2]=q[1],H[v+80>>2]=0,q=[Math.floor(u.ctime.getTime()/1e3)>>>0,(P=Math.floor(u.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[v+88>>2]=q[0],h[v+92>>2]=q[1],H[v+96>>2]=0,q=[u.ino>>>0,(P=u.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[v+104>>2]=q[0],h[v+108>>2]=q[1],0},doMsync:function(n,f,v,u,o){if(!e.isFile(f.node.mode))throw new e.ErrnoError(43);if(u&2)return 0;var c=de.slice(n,n+v);e.msync(f,c,o,v,u)},varargs:void 0,get:function(){N.varargs+=4;var n=h[N.varargs-4>>2];return n},getStr:function(n){var f=ne(n);return f},getStreamFromFD:function(n){var f=e.getStream(n);if(!f)throw new e.ErrnoError(8);return f}};function no(n,f,v,u,o){try{for(var c=0,_=f?h[f>>2]:0,m=f?h[f+4>>2]:0,p=v?h[v>>2]:0,y=v?h[v+4>>2]:0,E=u?h[u>>2]:0,S=u?h[u+4>>2]:0,b=0,k=0,D=0,T=0,C=0,A=0,I=(f?h[f>>2]:0)|(v?h[v>>2]:0)|(u?h[u>>2]:0),z=(f?h[f+4>>2]:0)|(v?h[v+4>>2]:0)|(u?h[u+4>>2]:0),K=function(oe,le,he,ze){return oe<32?le&ze:he&ze},B=0;B<n;B++){var x=1<<B%32;if(K(B,I,z,x)){var G=N.getStreamFromFD(B),re=N.DEFAULT_POLLMASK;G.stream_ops?.poll&&(re=G.stream_ops.poll(G)),re&1&&K(B,_,m,x)&&(B<32?b=b|x:k=k|x,c++),re&4&&K(B,p,y,x)&&(B<32?D=D|x:T=T|x,c++),re&2&&K(B,E,S,x)&&(B<32?C=C|x:A=A|x,c++)}}return f&&(h[f>>2]=b,h[f+4>>2]=k),v&&(h[v>>2]=D,h[v+4>>2]=T),u&&(h[u>>2]=C,h[u+4>>2]=A),c}catch(oe){if(typeof e>"u"||!(oe instanceof e.ErrnoError))throw oe;return-oe.errno}}var j={mount:function(n){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(f,v){return typeof v=="function"&&(this._callbacks[f]=v),this},l.websocket.emit=function(f,v){typeof this._callbacks[f]=="function"&&this._callbacks[f].call(this,v)},e.createNode(null,"/",16895,0)},createSocket:function(n,f,v){f&=-526337;var u=f==1;if(u&&v&&v!=6)throw new e.ErrnoError(66);var o={family:n,type:f,protocol:v,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},c=j.nextname(),_=e.createNode(j.root,c,49152,0);_.sock=o;var m=e.createStream({path:c,node:_,flags:2,seekable:!1,stream_ops:j.stream_ops});return o.stream=m,o},getSocket:function(n){var f=e.getStream(n);return!f||!e.isSocket(f.node.mode)?null:f.node.sock},stream_ops:{poll:function(n){var f=n.node.sock;return f.sock_ops.poll(f)},ioctl:function(n,f,v){var u=n.node.sock;return u.sock_ops.ioctl(u,f,v)},read:function(n,f,v,u,o){var c=n.node.sock,_=c.sock_ops.recvmsg(c,u);return _?(f.set(_.buffer,v),_.buffer.length):0},write:function(n,f,v,u,o){var c=n.node.sock;return c.sock_ops.sendmsg(c,f,v,u)},close:function(n){var f=n.node.sock;f.sock_ops.close(f)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(n,f,v){var u;if(typeof f=="object"&&(u=f,f=null,v=null),u)if(u._socket)f=u._socket.remoteAddress,v=u._socket.remotePort;else{var o=/ws[s]?:\/\/([^:]+):(\d+)/.exec(u.url);if(!o)throw new Error("WebSocket URL must be in the format ws(s)://address:port");f=o[1],v=parseInt(o[2],10)}else try{var c=l.websocket&&typeof l.websocket=="object",_="ws:#".replace("#","//");if(c&&(typeof l.websocket.url=="function"?_=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(_=l.websocket.url)),_==="ws://"||_==="wss://"){var m=f.split("/");_=_+m[0]+":"+v+"/"+m.slice(1).join("/")}var p="binary";c&&typeof l.websocket.subprotocol=="string"&&(p=l.websocket.subprotocol);var y=void 0;p!=="null"&&(p=p.replace(/^ +| +$/g,"").split(/ *, */),y=p),c&&l.websocket.subprotocol===null&&(p="null",y=void 0);var E;Z?E=Fn():E=WebSocket,l.websocket.decorator&&(E=l.websocket.decorator(E)),u=new E(_,y),u.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var S={addr:f,port:v,socket:u,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(n,S),j.websocket_sock_ops.handlePeerEvents(n,S),n.type===2&&typeof n.sport<"u"&&S.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(n.sport&65280)>>8,n.sport&255])),S},getPeer:function(n,f,v){return n.peers[f+":"+v]},addPeer:function(n,f){n.peers[f.addr+":"+f.port]=f},removePeer:function(n,f){delete n.peers[f.addr+":"+f.port]},handlePeerEvents:function(n,f){var v=!0,u=function(){l.websocket.emit("open",n.stream.fd);try{for(var c=f.dgram_send_queue.shift();c;)f.socket.send(c),c=f.dgram_send_queue.shift()}catch{f.socket.close()}};function o(c){if(typeof c=="string"){var _=new TextEncoder;c=_.encode(c)}else{if(Ne(c.byteLength!==void 0),c.byteLength==0)return;c=new Uint8Array(c)}var m=v;if(v=!1,m&&c.length===10&&c[0]===255&&c[1]===255&&c[2]===255&&c[3]===255&&c[4]==="p".charCodeAt(0)&&c[5]==="o".charCodeAt(0)&&c[6]==="r".charCodeAt(0)&&c[7]==="t".charCodeAt(0)){var p=c[8]<<8|c[9];j.websocket_sock_ops.removePeer(n,f),f.port=p,j.websocket_sock_ops.addPeer(n,f);return}n.recv_queue.push({addr:f.addr,port:f.port,data:c}),l.websocket.emit("message",n.stream.fd)}Z?(f.socket.on("open",u),f.socket.on("message",function(c,_){_&&o(new Uint8Array(c).buffer)}),f.socket.on("close",function(){l.websocket.emit("close",n.stream.fd)}),f.socket.on("error",function(c){n.error=14,l.websocket.emit("error",[n.stream.fd,n.error,"ECONNREFUSED: Connection refused"])})):(f.socket.onopen=u,f.socket.onclose=function(){l.websocket.emit("close",n.stream.fd)},f.socket.onmessage=function(_){o(_.data)},f.socket.onerror=function(c){n.error=14,l.websocket.emit("error",[n.stream.fd,n.error,"ECONNREFUSED: Connection refused"])})},poll:function(n){if(n.type===1&&n.server)return n.pending.length?65:0;var f=0,v=n.type===1?j.websocket_sock_ops.getPeer(n,n.daddr,n.dport):null;return(n.recv_queue.length||!v||v&&v.socket.readyState===v.socket.CLOSING||v&&v.socket.readyState===v.socket.CLOSED)&&(f|=65),(!v||v&&v.socket.readyState===v.socket.OPEN)&&(f|=4),(v&&v.socket.readyState===v.socket.CLOSING||v&&v.socket.readyState===v.socket.CLOSED)&&(f|=16),f},ioctl:function(n,f,v){switch(f){case 21531:var u=0;return n.recv_queue.length&&(u=n.recv_queue[0].data.length),h[v>>2]=u,0;default:return 28}},close:function(n){if(n.server){try{n.server.close()}catch{}n.server=null}for(var f=Object.keys(n.peers),v=0;v<f.length;v++){var u=n.peers[f[v]];try{u.socket.close()}catch{}j.websocket_sock_ops.removePeer(n,u)}return 0},bind:function(n,f,v){if(typeof n.saddr<"u"||typeof n.sport<"u")throw new e.ErrnoError(28);if(n.saddr=f,n.sport=v,n.type===2){n.server&&(n.server.close(),n.server=null);try{n.sock_ops.listen(n,0)}catch(u){if(!(u instanceof e.ErrnoError)||u.errno!==138)throw u}}},connect:function(n,f,v){if(n.server)throw new e.ErrnoError(138);if(typeof n.daddr<"u"&&typeof n.dport<"u"){var u=j.websocket_sock_ops.getPeer(n,n.daddr,n.dport);if(u)throw u.socket.readyState===u.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var o=j.websocket_sock_ops.createPeer(n,f,v);throw n.daddr=o.addr,n.dport=o.port,new e.ErrnoError(26)},listen:function(n,f){if(!Z)throw new e.ErrnoError(138);if(n.server)throw new e.ErrnoError(28);var v=Fn().Server,u=n.saddr;l.websocket.serverDecorator&&(v=l.websocket.serverDecorator(v)),n.server=new v({host:u,port:n.sport}),l.websocket.emit("listen",n.stream.fd),n.server.on("connection",function(o){if(n.type===1){var c=j.createSocket(n.family,n.type,n.protocol),_=j.websocket_sock_ops.createPeer(c,o);c.daddr=_.addr,c.dport=_.port,n.pending.push(c),l.websocket.emit("connection",c.stream.fd)}else j.websocket_sock_ops.createPeer(n,o),l.websocket.emit("connection",n.stream.fd)}),n.server.on("close",function(){l.websocket.emit("close",n.stream.fd),n.server=null}),n.server.on("error",function(o){n.error=23,l.websocket.emit("error",[n.stream.fd,n.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(n){if(!n.server||!n.pending.length)throw new e.ErrnoError(28);var f=n.pending.shift();return f.stream.flags=n.stream.flags,f},getname:function(n,f){var v,u;if(f){if(n.daddr===void 0||n.dport===void 0)throw new e.ErrnoError(53);v=n.daddr,u=n.dport}else v=n.saddr||0,u=n.sport||0;return{addr:v,port:u}},sendmsg:function(n,f,v,u,o,c){if(n.type===2){if((o===void 0||c===void 0)&&(o=n.daddr,c=n.dport),o===void 0||c===void 0)throw new e.ErrnoError(17)}else o=n.daddr,c=n.dport;var _=j.websocket_sock_ops.getPeer(n,o,c);if(n.type===1){if(!_||_.socket.readyState===_.socket.CLOSING||_.socket.readyState===_.socket.CLOSED)throw new e.ErrnoError(53);if(_.socket.readyState===_.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(f)&&(v+=f.byteOffset,f=f.buffer);var m;if(m=f.slice(v,v+u),n.type===2&&(!_||_.socket.readyState!==_.socket.OPEN))return(!_||_.socket.readyState===_.socket.CLOSING||_.socket.readyState===_.socket.CLOSED)&&(_=j.websocket_sock_ops.createPeer(n,o,c)),_.dgram_send_queue.push(m),u;try{return _.socket.send(m),u}catch{throw new e.ErrnoError(28)}},recvmsg:function(n,f,v){if(n.type===1&&n.server)throw new e.ErrnoError(53);var u=n.recv_queue.shift();if(!u){if(n.type===1){var o=j.websocket_sock_ops.getPeer(n,n.daddr,n.dport);if(!o)throw new e.ErrnoError(53);if(o.socket.readyState===o.socket.CLOSING||o.socket.readyState===o.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var c=u.data.byteLength||u.data.length,_=u.data.byteOffset||0,m=u.data.buffer||u.data,p=Math.min(f,c),y={buffer:new Uint8Array(m,_,p),addr:u.addr,port:u.port};if(v&2&&(p=0),n.type===1&&p<c){var E=c-p;u.data=new Uint8Array(m,_+p,E),n.recv_queue.unshift(u)}return y}}};function ve(n){var f=j.getSocket(n);if(!f)throw new e.ErrnoError(8);return f}function Kt(n){return h[Pn()>>2]=n,n}function lr(n){for(var f=n.split("."),v=0;v<4;v++){var u=Number(f[v]);if(isNaN(u))return null;f[v]=u}return(f[0]|f[1]<<8|f[2]<<16|f[3]<<24)>>>0}function Q(n){return parseInt(n)}function Hr(n){var f,v,u,o,c=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,_=[];if(!c.test(n))return null;if(n==="::")return[0,0,0,0,0,0,0,0];for(n.startsWith("::")?n=n.replace("::","Z:"):n=n.replace("::",":Z:"),n.indexOf(".")>0?(n=n.replace(new RegExp("[.]","g"),":"),f=n.split(":"),f[f.length-4]=Q(f[f.length-4])+Q(f[f.length-3])*256,f[f.length-3]=Q(f[f.length-2])+Q(f[f.length-1])*256,f=f.slice(0,f.length-2)):f=n.split(":"),u=0,o=0,v=0;v<f.length;v++)if(typeof f[v]=="string")if(f[v]==="Z"){for(o=0;o<8-f.length+1;o++)_[v+o]=0;u=o-1}else _[v+u]=nt(parseInt(f[v],16));else _[v+u]=f[v];return[_[1]<<16|_[0],_[3]<<16|_[2],_[5]<<16|_[4],_[7]<<16|_[6]]}function rr(n,f,v,u,o){switch(f){case 2:v=lr(v),Pr(n,16),o&&(h[o>>2]=16),Ee[n>>1]=f,h[n+4>>2]=v,Ee[n+2>>1]=nt(u);break;case 10:v=Hr(v),Pr(n,28),o&&(h[o>>2]=28),h[n>>2]=f,h[n+8>>2]=v[0],h[n+12>>2]=v[1],h[n+16>>2]=v[2],h[n+20>>2]=v[3],Ee[n+2>>1]=nt(u);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(n){var f=lr(n);if(f!==null||(f=Hr(n),f!==null))return n;var v;if(ee.address_map.addrs[n])v=ee.address_map.addrs[n];else{var u=ee.address_map.id++;Ne(u<65535,"exceeded max address mappings of 65535"),v="172.29."+(u&255)+"."+(u&65280),ee.address_map.names[v]=n,ee.address_map.addrs[n]=v}return v},lookup_addr:function(n){return ee.address_map.names[n]?ee.address_map.names[n]:null}};function oo(n,f,v,u){try{var o=ve(n),c=o.sock_ops.accept(o);if(f)var _=rr(f,c.family,ee.lookup_name(c.daddr),c.dport,v);return c.stream.fd}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Or(n){return(n&255)+"."+(n>>8&255)+"."+(n>>16&255)+"."+(n>>24&255)}function en(n){var f="",v=0,u=0,o=0,c=0,_=0,m=0,p=[n[0]&65535,n[0]>>16,n[1]&65535,n[1]>>16,n[2]&65535,n[2]>>16,n[3]&65535,n[3]>>16],y=!0,E="";for(m=0;m<5;m++)if(p[m]!==0){y=!1;break}if(y){if(E=Or(p[6]|p[7]<<16),p[5]===-1)return f="::ffff:",f+=E,f;if(p[5]===0)return f="::",E==="0.0.0.0"&&(E=""),E==="0.0.0.1"&&(E="1"),f+=E,f}for(v=0;v<8;v++)p[v]===0&&(v-o>1&&(_=0),o=v,_++),_>u&&(u=_,c=v-u+1);for(v=0;v<8;v++){if(u>1&&p[v]===0&&v>=c&&v<c+u){v===c&&(f+=":",c===0&&(f+=":"));continue}f+=Number(Zt(p[v]&65535)).toString(16),f+=v<7?":":""}return f}function wt(n,f){var v=Ee[n>>1],u=Zt(st[n+2>>1]),o;switch(v){case 2:if(f!==16)return{errno:28};o=h[n+4>>2],o=Or(o);break;case 10:if(f!==28)return{errno:28};o=[h[n+8>>2],h[n+12>>2],h[n+16>>2],h[n+20>>2]],o=en(o);break;default:return{errno:5}}return{family:v,addr:o,port:u}}function Mr(n,f,v){if(v&&n===0)return null;var u=wt(n,f);if(u.errno)throw new e.ErrnoError(u.errno);return u.addr=ee.lookup_addr(u.addr)||u.addr,u}function io(n,f,v){try{var u=ve(n),o=Mr(f,v);return u.sock_ops.bind(u,o.addr,o.port),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function ao(n){try{return n=N.getStr(n),e.chdir(n),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function so(n,f){try{return n=N.getStr(n),e.chmod(n,f),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function uo(n,f,v){try{var u=ve(n),o=Mr(f,v);return u.sock_ops.connect(u,o.addr,o.port),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function fo(n){try{var f=N.getStreamFromFD(n);return e.createStream(f,0).fd}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function co(n,f,v){try{var u=N.getStreamFromFD(n);if(u.fd===f)return-28;var o=e.getStream(f);return o&&e.close(o),e.createStream(u,f,f+1).fd}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function lo(n,f,v,u){try{if(f=N.getStr(f),f=N.calculateAt(n,f),v&-8)return-28;var o=e.lookupPath(f,{follow:!0}),c=o.node;if(!c)return-44;var _="";return v&4&&(_+="r"),v&2&&(_+="w"),v&1&&(_+="x"),_&&e.nodePermissions(c,_)?-2:0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Xr(n,f){return f+2097152>>>0<4194305-!!n?(n>>>0)+f*4294967296:NaN}function _o(n,f,v,u,o,c){try{var _=Xr(v,u);if(isNaN(_))return-61;var m=Xr(o,c);if(isNaN(m))return-61;var p=N.getStreamFromFD(n);return e.allocate(p,_,m),0}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function vo(n,f){try{return e.fchmod(n,f),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function mo(n,f,v){try{return e.fchown(n,f,v),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function po(n,f,v,u,o){try{f=N.getStr(f);var c=o&256;return o=o&-257,f=N.calculateAt(n,f),(c?e.lchown:e.chown)(f,v,u),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function rn(n,f,v){N.varargs=v;try{var u=N.getStreamFromFD(n);switch(f){case 0:{var o=N.get();if(o<0)return-28;var c;return c=e.createStream(u,o),c.fd}case 1:case 2:return 0;case 3:return u.flags;case 4:{var o=N.get();return u.flags|=o,0}case 5:{var o=N.get(),_=0;return Ee[o+_>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function ho(n){try{var f=N.getStreamFromFD(n);return 0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function yo(n,f){try{var v=N.getStreamFromFD(n);return N.doStat(e.stat,v.path,f)}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function wo(n,f,v){try{var u=Xr(f,v);return isNaN(u)?-61:(e.ftruncate(n,u),0)}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Eo(n,f){try{if(f===0)return-28;var v=e.cwd(),u=Pe(v)+1;return f<u?-68:(Ae(v,n,f),u)}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function go(n,f,v){try{var u=N.getStreamFromFD(n);u.getdents||(u.getdents=e.readdir(u.path));for(var o=280,c=0,_=e.llseek(u,0,1),m=Math.floor(_/o);m<u.getdents.length&&c+o<=v;){var p,y,E=u.getdents[m];if(E===".")p=u.node.id,y=4;else if(E===".."){var S=e.lookupPath(u.path,{parent:!0});p=S.node.id,y=4}else{var b=e.lookupNode(u.node,E);p=b.id,y=e.isChrdev(b.mode)?2:e.isDir(b.mode)?4:e.isLink(b.mode)?10:8}q=[p>>>0,(P=p,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[f+c>>2]=q[0],h[f+c+4>>2]=q[1],q=[(m+1)*o>>>0,(P=(m+1)*o,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[f+c+8>>2]=q[0],h[f+c+12>>2]=q[1],Ee[f+c+16>>1]=280,$[f+c+18>>0]=y,Ae(E,f+c+19,256),c+=o,m+=1}return e.llseek(u,m*o,0),c}catch(k){if(typeof e>"u"||!(k instanceof e.ErrnoError))throw k;return-k.errno}}function So(n,f,v){try{var u=ve(n);if(!u.daddr)return-53;var o=rr(f,u.family,ee.lookup_name(u.daddr),u.dport,v);return 0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function bo(n,f,v){try{ce("__syscall_getsockname "+n);var u=ve(n),o=rr(f,u.family,ee.lookup_name(u.saddr||"0.0.0.0"),u.sport,v);return 0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function ko(n,f,v,u,o){try{var c=ve(n);return f===1&&v===4?(h[u>>2]=c.error,h[o>>2]=4,c.error=null,0):-50}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Do(n,f,v){N.varargs=v;try{var u=N.getStreamFromFD(n);switch(f){case 21509:case 21505:return u.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return u.tty?0:-59;case 21519:{if(!u.tty)return-59;var o=N.get();return h[o>>2]=0,0}case 21520:return u.tty?-28:-59;case 21531:{var o=N.get();return e.ioctl(u,f,o)}case 21523:return u.tty?0:-59;case 21524:return u.tty?0:-59;default:return-28}}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Oo(n,f){try{var v=ve(n);return v.sock_ops.listen(v,f),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function No(n,f){try{return n=N.getStr(n),N.doStat(e.lstat,n,f)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function To(n,f,v){try{return f=N.getStr(f),f=N.calculateAt(n,f),f=U.normalize(f),f[f.length-1]==="/"&&(f=f.substr(0,f.length-1)),e.mkdir(f,v,0),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function se(n,f,v,u){try{f=N.getStr(f);var o=u&256,c=u&4096;return u=u&-4353,f=N.calculateAt(n,f,c),N.doStat(o?e.lstat:e.stat,f,v)}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Co(n,f,v,u){N.varargs=u;try{f=N.getStr(f),f=N.calculateAt(n,f);var o=u?N.get():0;return e.open(f,v,o).fd}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}var pe={BUCKET_BUFFER_SIZE:8192,mount:function(n){return e.createNode(null,"/",16895,0)},createPipe:function(){var n={buckets:[],refcnt:2};n.buckets.push({buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var f=pe.nextname(),v=pe.nextname(),u=e.createNode(pe.root,f,4096,0),o=e.createNode(pe.root,v,4096,0);u.pipe=n,o.pipe=n;var c=e.createStream({path:f,node:u,flags:0,seekable:!1,stream_ops:pe.stream_ops});u.stream=c;var _=e.createStream({path:v,node:o,flags:1,seekable:!1,stream_ops:pe.stream_ops});return o.stream=_,{readable_fd:c.fd,writable_fd:_.fd}},stream_ops:{poll:function(n){var f=n.node.pipe;if((n.flags&2097155)===1)return 260;if(f.buckets.length>0)for(var v=0;v<f.buckets.length;v++){var u=f.buckets[v];if(u.offset-u.roffset>0)return 65}return 0},ioctl:function(n,f,v){return 28},fsync:function(n){return 28},read:function(n,f,v,u,o){for(var c=n.node.pipe,_=0,m=0;m<c.buckets.length;m++){var p=c.buckets[m];_+=p.offset-p.roffset}Ne(f instanceof ArrayBuffer||ArrayBuffer.isView(f));var y=f.subarray(v,v+u);if(u<=0)return 0;if(_==0)throw new e.ErrnoError(6);for(var E=Math.min(_,u),S=E,b=0,m=0;m<c.buckets.length;m++){var k=c.buckets[m],D=k.offset-k.roffset;if(E<=D){var T=k.buffer.subarray(k.roffset,k.offset);E<D?(T=T.subarray(0,E),k.roffset+=E):b++,y.set(T);break}else{var T=k.buffer.subarray(k.roffset,k.offset);y.set(T),y=y.subarray(T.byteLength),E-=T.byteLength,b++}}return b&&b==c.buckets.length&&(b--,c.buckets[b].offset=0,c.buckets[b].roffset=0),c.buckets.splice(0,b),S},write:function(n,f,v,u,o){var c=n.node.pipe;Ne(f instanceof ArrayBuffer||ArrayBuffer.isView(f));var _=f.subarray(v,v+u),m=_.byteLength;if(m<=0)return 0;var p=null;c.buckets.length==0?(p={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0},c.buckets.push(p)):p=c.buckets[c.buckets.length-1],Ne(p.offset<=pe.BUCKET_BUFFER_SIZE);var y=pe.BUCKET_BUFFER_SIZE-p.offset;if(y>=m)return p.buffer.set(_,p.offset),p.offset+=m,m;y>0&&(p.buffer.set(_.subarray(0,y),p.offset),p.offset+=y,_=_.subarray(y,_.byteLength));for(var E=_.byteLength/pe.BUCKET_BUFFER_SIZE|0,S=_.byteLength%pe.BUCKET_BUFFER_SIZE,b=0;b<E;b++){var k={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:pe.BUCKET_BUFFER_SIZE,roffset:0};c.buckets.push(k),k.buffer.set(_.subarray(0,pe.BUCKET_BUFFER_SIZE)),_=_.subarray(pe.BUCKET_BUFFER_SIZE,_.byteLength)}if(S>0){var k={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:_.byteLength,roffset:0};c.buckets.push(k),k.buffer.set(_)}return m},close:function(n){var f=n.node.pipe;f.refcnt--,f.refcnt===0&&(f.buckets=null)}},nextname:function(){return pe.nextname.current||(pe.nextname.current=0),"pipe["+pe.nextname.current+++"]"}};function Fo(n){try{if(n==0)throw new e.ErrnoError(21);var f=pe.createPipe();return h[n>>2]=f.readable_fd,h[n+4>>2]=f.writable_fd,0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Ao(n,f,v){try{for(var u=0,o=0;o<f;o++){var c=n+8*o,_=h[c>>2],m=Ee[c+4>>1],p=32,y=e.getStream(_);y&&(p=N.DEFAULT_POLLMASK,y.stream_ops?.poll&&(p=y.stream_ops.poll(y))),p&=m|8|16,p&&u++,Ee[c+6>>1]=p}return u}catch(E){if(typeof e>"u"||!(E instanceof e.ErrnoError))throw E;return-E.errno}}function Po(n,f,v,u){try{if(f=N.getStr(f),f=N.calculateAt(n,f),u<=0)return-28;var o=e.readlink(f),c=Math.min(u,Pe(o)),_=$[v+c];return Ae(o,v,u+1),$[v+c]=_,c}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Ro(n,f,v,u,o,c){try{var _=ve(n),m=_.sock_ops.recvmsg(_,v,typeof u<"u"?u:0);if(!m)return 0;if(o)var p=rr(o,_.family,ee.lookup_name(m.addr),m.port,c);return de.set(m.buffer,f),m.buffer.byteLength}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function Mo(n,f,v,u){try{return f=N.getStr(f),u=N.getStr(u),f=N.calculateAt(n,f),u=N.calculateAt(v,u),e.rename(f,u),0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Lo(n){try{return n=N.getStr(n),e.rmdir(n),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Io(n,f,v,u,o,c){try{var _=ve(n),m=Mr(o,c,!0);return m?_.sock_ops.sendmsg(_,$,f,v,m.addr,m.port):e.write(_.stream,$,f,v)}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function Uo(n,f,v){try{var u=j.createSocket(n,f,v);return u.stream.fd}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Bo(n,f){try{return n=N.getStr(n),N.doStat(e.stat,n,f)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function xo(n,f,v){try{return n=N.getStr(n),h[v+4>>2]=4096,h[v+40>>2]=4096,h[v+8>>2]=1e6,h[v+12>>2]=5e5,h[v+16>>2]=5e5,h[v+20>>2]=e.nextInode,h[v+24>>2]=1e6,h[v+28>>2]=42,h[v+44>>2]=2,h[v+36>>2]=255,0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Br(n,f){try{return n=N.getStr(n),f=N.getStr(f),e.symlink(n,f),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Ho(n,f,v){try{return f=N.getStr(f),f=N.calculateAt(n,f),v===0?e.unlink(f):v===512?e.rmdir(f):ue("Invalid flags passed to unlinkat"),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function $r(n){return H[n>>2]+h[n+4>>2]*4294967296}function tn(n,f,v,u){try{if(f=N.getStr(f),f=N.calculateAt(n,f,!0),v){var _=$r(v),m=h[v+8>>2];o=_*1e3+m/(1e3*1e3),v+=16,_=$r(v),m=h[v+8>>2],c=_*1e3+m/(1e3*1e3)}else var o=Date.now(),c=o;return e.utime(f,o,c),0}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function zo(n){}var _n="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function Wo(n,f){ue(_n)}function jo(n,f){ue(_n)}var Yo=!0;function qo(){return Yo}function Vo(){throw 1/0}function Ko(n,f){var v=new Date($r(n)*1e3);h[f>>2]=v.getUTCSeconds(),h[f+4>>2]=v.getUTCMinutes(),h[f+8>>2]=v.getUTCHours(),h[f+12>>2]=v.getUTCDate(),h[f+16>>2]=v.getUTCMonth(),h[f+20>>2]=v.getUTCFullYear()-1900,h[f+24>>2]=v.getUTCDay();var u=Date.UTC(v.getUTCFullYear(),0,1,0,0,0,0),o=(v.getTime()-u)/(1e3*60*60*24)|0;h[f+28>>2]=o}function Go(n,f){var v=new Date($r(n)*1e3);h[f>>2]=v.getSeconds(),h[f+4>>2]=v.getMinutes(),h[f+8>>2]=v.getHours(),h[f+12>>2]=v.getDate(),h[f+16>>2]=v.getMonth(),h[f+20>>2]=v.getFullYear()-1900,h[f+24>>2]=v.getDay();var u=new Date(v.getFullYear(),0,1),o=(v.getTime()-u.getTime())/(1e3*60*60*24)|0;h[f+28>>2]=o,h[f+36>>2]=-(v.getTimezoneOffset()*60);var c=new Date(v.getFullYear(),6,1).getTimezoneOffset(),_=u.getTimezoneOffset(),m=(c!=_&&v.getTimezoneOffset()==Math.min(_,c))|0;h[f+32>>2]=m}function Xo(n){var f=new Date(h[n+20>>2]+1900,h[n+16>>2],h[n+12>>2],h[n+8>>2],h[n+4>>2],h[n>>2],0),v=h[n+32>>2],u=f.getTimezoneOffset(),o=new Date(f.getFullYear(),0,1),c=new Date(f.getFullYear(),6,1).getTimezoneOffset(),_=o.getTimezoneOffset(),m=Math.min(_,c);if(v<0)h[n+32>>2]=+(c!=_&&m==u);else if(v>0!=(m==u)){var p=Math.max(_,c),y=v>0?m:p;f.setTime(f.getTime()+(y-u)*6e4)}h[n+24>>2]=f.getDay();var E=(f.getTime()-o.getTime())/(1e3*60*60*24)|0;return h[n+28>>2]=E,h[n>>2]=f.getSeconds(),h[n+4>>2]=f.getMinutes(),h[n+8>>2]=f.getHours(),h[n+12>>2]=f.getDate(),h[n+16>>2]=f.getMonth(),h[n+20>>2]=f.getYear(),f.getTime()/1e3|0}function nn(n,f,v,u,o,c){try{var _=N.getStreamFromFD(u),m=e.mmap(_,n,o,f,v),p=m.ptr;return h[c>>2]=m.allocated,p}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function $o(n,f,v,u,o,c){try{var _=N.getStreamFromFD(o);v&2&&N.doMsync(n,_,f,u,c),e.munmap(_)}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function zr(n){var f=Pe(n)+1,v=er(f);return v&&Xe(n,$,v,f),v}function Zo(n,f,v){var u=new Date().getFullYear(),o=new Date(u,0,1),c=new Date(u,6,1),_=o.getTimezoneOffset(),m=c.getTimezoneOffset(),p=Math.max(_,m);h[n>>2]=p*60,h[f>>2]=+(_!=m);function y(D){var T=D.toTimeString().match(/\(([A-Za-z ]+)\)$/);return T?T[1]:"GMT"}var E=y(o),S=y(c),b=zr(E),k=zr(S);m<_?(H[v>>2]=b,H[v+4>>2]=k):(H[v>>2]=k,H[v+4>>2]=b)}function It(n,f,v){It.called||(It.called=!0,Zo(n,f,v))}function on(){ue("")}function Jo(){return Date.now()}function Wr(){return 2147483648}function Qo(){return Wr()}var Ut;Z?Ut=()=>{var n=process.hrtime();return n[0]*1e3+n[1]/1e6}:Ut=()=>performance.now();function ei(n,f,v){de.copyWithin(n,f,f+v)}function wn(n){try{return or.grow(n-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ri(n){var f=de.length;n=n>>>0;var v=Wr();if(n>v)return!1;let u=(p,y)=>p+(y-p%y)%y;for(var o=1;o<=4;o*=2){var c=f*(1+.2/o);c=Math.min(c,n+100663296);var _=Math.min(v,u(Math.max(n,c),65536)),m=wn(_);if(m)return!0}return!1}function Et(n){Ge=n,_r()||(l.onExit&&l.onExit(n),Ce=!0),te(n,new mr(n))}function ti(n,f){Ge=n,_r()||Yn(),Et(n)}var gt=ti;function et(){if(!_r())try{gt(Ge)}catch(n){pt(n)}}function jr(n){if(!(_t||Ce))try{n(),et()}catch(f){pt(f)}}function Bt(){Fr+=1}function xt(){Fr-=1}function rt(n,f){return Bt(),setTimeout(function(){xt(),jr(n)},f)}function ni(n){return ie.handleSleep(f=>rt(f,n))}var dr=O.ENV||{};function tt(){return J||"./this.program"}function Ir(){if(!Ir.strings){var n=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",f={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:n,_:tt()};for(var v in dr)dr[v]===void 0?delete f[v]:f[v]=dr[v];var u=[];for(var v in f)u.push(v+"="+f[v]);Ir.strings=u}return Ir.strings}function Ht(n,f,v){for(var u=0;u<n.length;++u)$[f++>>0]=n.charCodeAt(u);v||($[f>>0]=0)}function oi(n,f){var v=0;return Ir().forEach(function(u,o){var c=f+v;H[n+o*4>>2]=c,Ht(u,c),v+=u.length+1}),0}function ii(n,f){var v=Ir();H[n>>2]=v.length;var u=0;return v.forEach(function(o){u+=o.length+1}),H[f>>2]=u,0}function ai(n){try{var f=N.getStreamFromFD(n);return e.close(f),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return v.errno}}function si(n,f){try{var v=N.getStreamFromFD(n),u=v.tty?2:e.isDir(v.mode)?3:e.isLink(v.mode)?7:4;return $[f>>0]=u,0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return o.errno}}function ui(n,f,v,u){for(var o=0,c=0;c<v;c++){var _=H[f>>2],m=H[f+4>>2];f+=8;var p=e.read(n,$,_,m,u);if(p<0)return-1;if(o+=p,p<m)break}return o}function fi(n,f,v,u){try{var o=N.getStreamFromFD(n),c=ui(o,f,v);return H[u>>2]=c,0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return _.errno}}function ci(n,f,v,u,o){try{var c=Xr(f,v);if(isNaN(c))return 61;var _=N.getStreamFromFD(n);return e.llseek(_,c,u),q=[_.position>>>0,(P=_.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[o>>2]=q[0],h[o+4>>2]=q[1],_.getdents&&c===0&&u===0&&(_.getdents=null),0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return m.errno}}function li(n,f,v,u){for(var o=0,c=0;c<v;c++){var _=H[f>>2],m=H[f+4>>2];f+=8;var p=e.write(n,$,_,m,u);if(p<0)return-1;o+=p}return o}function vn(n,f,v,u){try{var o=N.getStreamFromFD(n),c=li(o,f,v);return H[u>>2]=c,0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return _.errno}}function An(n,f,v,u){var o=0,c=0,_=0,m=0,p=0,y=0,E;function S(b,k,D,T,C,A){var I,z,K,B;return z=b===10?28:16,C=b===10?en(C):Or(C),I=er(z),B=rr(I,b,C,A),Ne(!B),K=er(32),h[K+4>>2]=b,h[K+8>>2]=k,h[K+12>>2]=D,h[K+24>>2]=T,H[K+20>>2]=I,b===10?h[K+16>>2]=28:h[K+16>>2]=16,h[K+28>>2]=0,K}if(v&&(_=h[v>>2],m=h[v+4>>2],p=h[v+8>>2],y=h[v+12>>2]),p&&!y&&(y=p===2?17:6),!p&&y&&(p=y===17?2:1),y===0&&(y=6),p===0&&(p=1),!n&&!f)return-2;if(_&-1088||v!==0&&h[v>>2]&2&&!n)return-1;if(_&32)return-2;if(p!==0&&p!==1&&p!==2)return-7;if(m!==0&&m!==2&&m!==10)return-6;if(f&&(f=ne(f),c=parseInt(f,10),isNaN(c)))return _&1024?-2:-8;if(!n)return m===0&&(m=2),_&1||(m===2?o=kt(2130706433):o=[0,0,0,1]),E=S(m,p,y,null,o,c),H[u>>2]=E,0;if(n=ne(n),o=lr(n),o!==null)if(m===0||m===2)m=2;else if(m===10&&_&8)o=[0,0,kt(65535),o],m=10;else return-2;else if(o=Hr(n),o!==null)if(m===0||m===10)m=10;else return-2;return o!=null?(E=S(m,p,y,n,o,c),H[u>>2]=E,0):_&4?-2:(n=ee.lookup_name(n),o=lr(n),m===0?m=2:m===10&&(o=[0,0,kt(65535),o]),E=S(m,p,y,null,o,c),H[u>>2]=E,0)}function Dn(n){var f=er(20),v=er(n.length+1);Ae(n,v,n.length+1),H[f>>2]=v;var u=er(4);H[u>>2]=0,H[f+4>>2]=u;var o=2;h[f+8>>2]=o,h[f+12>>2]=4;var c=er(12);return H[c>>2]=c+8,H[c+4>>2]=0,h[c+8>>2]=lr(ee.lookup_name(n)),H[f+16>>2]=c,f}function di(n,f,v){if(v!==2)return Kt(5),null;n=h[n>>2];var u=Or(n),o=ee.lookup_addr(u);return o&&(u=o),Dn(u)}function _i(n){return Dn(ne(n))}function En(n,f,v,u,o,c){var _=_i(n);return Zr(f,_,20),kr(_),h[c>>2]=0,H[o>>2]=f,0}function Jr(n,f){for(var v=Math.min(f,3),u=8,o=0;o<v;o++)ut[n+o*u>>3]=.1;return v}function St(n,f,v,u,o,c,_){var m=wt(n,f);if(m.errno)return-6;var p=m.port,y=m.addr,E=!1;if(v&&u){var S;if(_&1||!(S=ee.lookup_addr(y))){if(_&8)return-2}else y=S;var b=Ae(y,v,u);b+1>=u&&(E=!0)}if(o&&c){p=""+p;var b=Ae(p,o,c);b+1>=c&&(E=!0)}return E?-12:0}var zt={list:[],map:{}};function Wt(n){function f(c,_,m){var p=er(c.length+1);Ht(c,p);for(var y=0,E=m.length,S=er((E+1)*4),b=0;b<E;b++,y+=4){var k=m[b],D=er(k.length+1);Ht(k,D),H[S+y>>2]=D}H[S+y>>2]=0;var T=er(12);return H[T>>2]=p,H[T+4>>2]=S,h[T+8>>2]=_,T}var v=zt.list,u=zt.map;if(v.length===0){var o=f("tcp",6,["TCP"]);v.push(o),u.tcp=u[6]=o,o=f("udp",17,["UDP"]),v.push(o),u.udp=u[17]=o}Wt.index=0}function br(n){n=ne(n),Wt(!0);var f=zt.map[n];return f}function je(n){Wt(!0);var f=zt.map[n];return f}function Nr(n){var f=Pe(n)+1,v=ar(f);return Xe(n,$,v,f),v}var Ue={getAllWebSockets:function(n){let f=new Set;n.server&&n.server.clients.forEach(v=>{f.add(v)});for(let v of Ue.getAllPeers(n))f.add(v.socket);return Array.from(f)},getAllPeers:function(n){let f=new Set;if(n.server&&n.pending.filter(v=>v.peers).forEach(v=>{for(let u of Object.values(v.peers))f.add(u)}),n.peers)for(let v of Object.values(n.peers))f.add(v);return Array.from(f)},awaitData:function(n){return Ue.awaitWsEvent(n,"message")},awaitConnection:function(n){return n.OPEN===n.readyState?[Promise.resolve(),Ue.noop]:Ue.awaitWsEvent(n,"open")},awaitClose:function(n){return[n.CLOSING,n.CLOSED].includes(n.readyState)?[Promise.resolve(),Ue.noop]:Ue.awaitWsEvent(n,"close")},awaitError:function(n){return[n.CLOSING,n.CLOSED].includes(n.readyState)?[Promise.resolve(),Ue.noop]:Ue.awaitWsEvent(n,"error")},awaitWsEvent:function(n,f){let v,u=()=>{v()};return[new Promise(function(_){v=_,n.once(f,u)}),()=>{n.removeListener(f,u),setTimeout(v)}]},noop:function(){},shutdownSocket:function(n,f){let v=ve(n),u=Object.values(v.peers)[0];if(!u)return-1;try{return u.socket.close(),j.websocket_sock_ops.removePeer(v,u),0}catch(o){return console.log("Socket shutdown error",o),-1}}};function ir(n,f,v){if(!n)return 1;let u=ne(n);if(!u.length)return 0;let o=ne(f);if(!o.length)return 0;if(l.popen_to_file){let{path:c,exitCode:_}=l.popen_to_file(u,o);return de[v]=_,Nr(c)}if(Z){let c=require("os").tmpdir(),_="php-process-stream",m=c+"/"+_,p=require("child_process"),y;if(o==="r")y=p.spawnSync(u,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[v]=y.status,require("fs").writeFileSync(m,y.stdout,{encoding:"utf8",flag:"w+"});else return o==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+o+" (should be r or w)"),_W_EXITCODE(0,2));return Nr(m)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function qe(n){return n%4===0&&(n%100!==0||n%400===0)}function Er(n,f){for(var v=0,u=0;u<=f;v+=n[u++]);return v}var fr=[31,29,31,30,31,30,31,31,30,31,30,31],Tr=[31,28,31,30,31,30,31,31,30,31,30,31];function Yr(n,f){for(var v=new Date(n.getTime());f>0;){var u=qe(v.getFullYear()),o=v.getMonth(),c=(u?fr:Tr)[o];if(f>c-v.getDate())f-=c-v.getDate()+1,v.setDate(1),o<11?v.setMonth(o+1):(v.setMonth(0),v.setFullYear(v.getFullYear()+1));else return v.setDate(v.getDate()+f),v}return v}function jt(n,f,v,u){var o=h[u+40>>2],c={tm_sec:h[u>>2],tm_min:h[u+4>>2],tm_hour:h[u+8>>2],tm_mday:h[u+12>>2],tm_mon:h[u+16>>2],tm_year:h[u+20>>2],tm_wday:h[u+24>>2],tm_yday:h[u+28>>2],tm_isdst:h[u+32>>2],tm_gmtoff:h[u+36>>2],tm_zone:o?ne(o):""},_=ne(v),m={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var p in m)_=_.replace(new RegExp(p,"g"),m[p]);var y=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],E=["January","February","March","April","May","June","July","August","September","October","November","December"];function S(I,z,K){for(var B=typeof I=="number"?I.toString():I||"";B.length<z;)B=K[0]+B;return B}function b(I,z){return S(I,z,"0")}function k(I,z){function K(x){return x<0?-1:x>0?1:0}var B;return(B=K(I.getFullYear()-z.getFullYear()))===0&&(B=K(I.getMonth()-z.getMonth()))===0&&(B=K(I.getDate()-z.getDate())),B}function D(I){switch(I.getDay()){case 0:return new Date(I.getFullYear()-1,11,29);case 1:return I;case 2:return new Date(I.getFullYear(),0,3);case 3:return new Date(I.getFullYear(),0,2);case 4:return new Date(I.getFullYear(),0,1);case 5:return new Date(I.getFullYear()-1,11,31);case 6:return new Date(I.getFullYear()-1,11,30)}}function T(I){var z=Yr(new Date(I.tm_year+1900,0,1),I.tm_yday),K=new Date(z.getFullYear(),0,4),B=new Date(z.getFullYear()+1,0,4),x=D(K),G=D(B);return k(x,z)<=0?k(G,z)<=0?z.getFullYear()+1:z.getFullYear():z.getFullYear()-1}var C={"%a":function(I){return y[I.tm_wday].substring(0,3)},"%A":function(I){return y[I.tm_wday]},"%b":function(I){return E[I.tm_mon].substring(0,3)},"%B":function(I){return E[I.tm_mon]},"%C":function(I){var z=I.tm_year+1900;return b(z/100|0,2)},"%d":function(I){return b(I.tm_mday,2)},"%e":function(I){return S(I.tm_mday,2," ")},"%g":function(I){return T(I).toString().substring(2)},"%G":function(I){return T(I)},"%H":function(I){return b(I.tm_hour,2)},"%I":function(I){var z=I.tm_hour;return z==0?z=12:z>12&&(z-=12),b(z,2)},"%j":function(I){return b(I.tm_mday+Er(qe(I.tm_year+1900)?fr:Tr,I.tm_mon-1),3)},"%m":function(I){return b(I.tm_mon+1,2)},"%M":function(I){return b(I.tm_min,2)},"%n":function(){return`
|
|
16
|
-
`},"%p":function(I){return I.tm_hour>=0&&I.tm_hour<12?"AM":"PM"},"%S":function(I){return b(I.tm_sec,2)},"%t":function(){return" "},"%u":function(I){return I.tm_wday||7},"%U":function(I){var z=I.tm_yday+7-I.tm_wday;return b(Math.floor(z/7),2)},"%V":function(I){var z=Math.floor((I.tm_yday+7-(I.tm_wday+6)%7)/7);if((I.tm_wday+371-I.tm_yday-2)%7<=2&&z++,z){if(z==53){var B=(I.tm_wday+371-I.tm_yday)%7;B!=4&&(B!=3||!qe(I.tm_year))&&(z=1)}}else{z=52;var K=(I.tm_wday+7-I.tm_yday-1)%7;(K==4||K==5&&qe(I.tm_year%400-1))&&z++}return b(z,2)},"%w":function(I){return I.tm_wday},"%W":function(I){var z=I.tm_yday+7-(I.tm_wday+6)%7;return b(Math.floor(z/7),2)},"%y":function(I){return(I.tm_year+1900).toString().substring(2)},"%Y":function(I){return I.tm_year+1900},"%z":function(I){var z=I.tm_gmtoff,K=z>=0;return z=Math.abs(z)/60,z=z/60*100+z%60,(K?"+":"-")+("0000"+z).slice(-4)},"%Z":function(I){return I.tm_zone},"%%":function(){return"%"}};_=_.replace(/%%/g,"\0\0");for(var p in C)_.includes(p)&&(_=_.replace(new RegExp(p,"g"),C[p](c)));_=_.replace(/\0\0/g,"%");var A=Je(_,!1);return A.length>f?0:(ht(A,n),A.length-1)}function Yt(n,f,v){for(var u=ne(f),o="\\!@#$^&*()+=-[]/{}|:<>?,.",c=0,_=o.length;c<_;++c)u=u.replace(new RegExp("\\"+o[c],"g"),"\\"+o[c]);var m={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var p in m)u=u.replace(p,m[p]);var y={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},E={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},S={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},b={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var k in y)u=u.replace(k,"("+k+y[k]+")");for(var D=[],c=u.indexOf("%");c>=0;c=u.indexOf("%"))D.push(u[c+1]),u=u.replace(new RegExp("\\%"+u[c+1],"g"),"");var T=new RegExp("^"+u,"i").exec(ne(n));function C(){function Vr(Kr,Jt,dn){return typeof Kr!="number"||isNaN(Kr)?Jt:Kr>=Jt?Kr<=dn?Kr:dn:Jt}return{year:Vr(h[v+20>>2]+1900,1970,9999),month:Vr(h[v+16>>2],0,11),day:Vr(h[v+12>>2],1,31),hour:Vr(h[v+8>>2],0,23),min:Vr(h[v+4>>2],0,59),sec:Vr(h[v>>2],0,59)}}if(T){var A=C(),I,z=Vr=>{var Kr=D.indexOf(Vr);if(Kr>=0)return T[Kr+1]};if((I=z("S"))&&(A.sec=Q(I)),(I=z("M"))&&(A.min=Q(I)),I=z("H"))A.hour=Q(I);else if(I=z("I")){var K=Q(I);(I=z("p"))&&(K+=I.toUpperCase()[0]==="P"?12:0),A.hour=K}if(I=z("Y"))A.year=Q(I);else if(I=z("y")){var B=Q(I);(I=z("C"))?B+=Q(I)*100:B+=B<69?2e3:1900,A.year=B}if((I=z("m"))?A.month=Q(I)-1:(I=z("b"))&&(A.month=E[I.substring(0,3).toUpperCase()]||0),I=z("d"))A.day=Q(I);else if(I=z("j"))for(var x=Q(I),G=qe(A.year),re=0;re<12;++re){var oe=Er(G?fr:Tr,re-1);x<=oe+(G?fr:Tr)[re]&&(A.day=x-oe)}else if(I=z("a")){var le=I.substring(0,3).toUpperCase();if(I=z("U")){var he=S[le],ze=Q(I),Ve=new Date(A.year,0,1),Dr;Ve.getDay()===0?Dr=Yr(Ve,he+7*(ze-1)):Dr=Yr(Ve,7-Ve.getDay()+he+7*(ze-1)),A.day=Dr.getDate(),A.month=Dr.getMonth()}else if(I=z("W")){var he=b[le],ze=Q(I),Ve=new Date(A.year,0,1),Dr;Ve.getDay()===1?Dr=Yr(Ve,he+7*(ze-1)):Dr=Yr(Ve,7-Ve.getDay()+1+he+7*(ze-1)),A.day=Dr.getDate(),A.month=Dr.getMonth()}}var yr=new Date(A.year,A.month,A.day,A.hour,A.min,A.sec,0);return h[v>>2]=yr.getSeconds(),h[v+4>>2]=yr.getMinutes(),h[v+8>>2]=yr.getHours(),h[v+12>>2]=yr.getDate(),h[v+16>>2]=yr.getMonth(),h[v+20>>2]=yr.getFullYear()-1900,h[v+24>>2]=yr.getDay(),h[v+28>>2]=Er(qe(yr.getFullYear())?fr:Tr,yr.getMonth()-1)+yr.getDate()-1,h[v+32>>2]=0,n+Je(T[0]).length-1}return 0}function Gt(n){return Ue.shutdownSocket(n,2)}function be(n,f,v){if(typeof ie>"u")return 0;let u=1,o=2,c=4,_=8,m=16,p=32;return ie.handleSleep(y=>{let E=ve(n);if(!E){y(0);return}let S=[],b=new Set;if(f&u||f&o){if(E.server){for(let I of E.pending)if((I.recv_queue||[]).length>0){y(1);return}}else if((E.recv_queue||[]).length>0){y(1);return}}let k=Ue.getAllWebSockets(E);if(!k.length){y(0);return}for(let I of k)(f&u||f&o)&&(S.push(Ue.awaitData(I)),b.add("POLLIN")),f&c&&(S.push(Ue.awaitConnection(I)),b.add("POLLOUT")),f&m&&(S.push(Ue.awaitClose(I)),b.add("POLLHUP")),(f&_||f&p)&&(S.push(Ue.awaitError(I)),b.add("POLLERR"));if(S.length===0){console.warn("Unsupported poll event "+f+", defaulting to setTimeout()."),setTimeout(function(){y(0)},v);return}let D=S.map(([I])=>I),T=()=>S.forEach(([,I])=>I()),C=!1;Promise.race(D).then(function(I){C||(C=!0,y(1),clearTimeout(A),T())});let A=setTimeout(function(){C||(C=!0,y(0),T())},v)})}function X(n,f,v,u,o){let c=de[u];if(!(f===1&&v===9||f===6&&v===1))return console.warn(`Unsupported socket option: ${f}, ${v}, ${c}`),-1;let S=Ue.getAllWebSockets(n)[0];return S?(S.setSocketOpt(f,v,u),0):-1}function Fe(n,f){return Ue.shutdownSocket(n,f)}function Xt(n){try{return n()}catch(f){ue(f)}}var ie={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(n){var f=ie.callStackNameToId[n];return f===void 0&&(f=ie.callStackId++,ie.callStackNameToId[n]=f,ie.callStackIdToName[f]=n),f},instrumentWasmImports:function(n){var f=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(u=>u.split(".")[1]);for(var v in n)(function(u){var o=n[u],c=o.sig;if(typeof o=="function")var _=f.indexOf(u)>=0||u.startsWith("__asyncjs__")})(v)},instrumentWasmExports:function(n){var f={};for(var v in n)(function(u){var o=n[u];typeof o=="function"?f[u]=function(){ie.exportCallStack.push(u);try{return o.apply(null,arguments)}finally{if(!Ce){var c=ie.exportCallStack.pop();Ne(c===u),ie.maybeStopUnwind()}}}:f[u]=o})(v);return f},maybeStopUnwind:function(){ie.currData&&ie.state===ie.State.Unwinding&&ie.exportCallStack.length===0&&(ie.state=ie.State.Normal,Bt(),Xt(pn),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((n,f)=>{ie.asyncPromiseHandlers={resolve:n,reject:f}})},allocateData:function(){var n=er(12+ie.StackSize);return ie.setDataHeader(n,n+12,ie.StackSize),ie.setDataRewindFunc(n),n},setDataHeader:function(n,f,v){h[n>>2]=f,h[n+4>>2]=f+v},setDataRewindFunc:function(n){var f=ie.exportCallStack[0],v=ie.getCallStackId(f);h[n+8>>2]=v},getDataRewindFunc:function(n){var f=h[n+8>>2],v=ie.callStackIdToName[f],u=l.asm[v];return u},doRewind:function(n){var f=ie.getDataRewindFunc(n);return xt(),f()},handleSleep:function(n){if(!Ce){if(ie.state===ie.State.Normal){var f=!1,v=!1;n(u=>{if(!Ce&&(ie.handleSleepReturnValue=u||0,f=!0,!!v)){ie.state=ie.State.Rewinding,Xt(()=>hn(ie.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var o,c=!1;try{o=ie.doRewind(ie.currData)}catch(p){o=p,c=!0}var _=!1;if(!ie.currData){var m=ie.asyncPromiseHandlers;m&&(ie.asyncPromiseHandlers=null,(c?m.reject:m.resolve)(o),_=!0)}if(c&&!_)throw o}}),v=!0,f||(ie.state=ie.State.Unwinding,ie.currData=ie.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),Xt(()=>ln(ie.currData)))}else ie.state===ie.State.Rewinding?(ie.state=ie.State.Normal,Xt(bn),kr(ie.currData),ie.currData=null,ie.sleepCallbacks.forEach(u=>jr(u))):ue("invalid state: "+ie.state);return ie.handleSleepReturnValue}},handleAsync:function(n){return ie.handleSleep(f=>{n().then(f)})}};function Gr(n){var f=l["_"+n];return f}function xr(n,f,v,u,o){var c={string:C=>{var A=0;if(C!=null&&C!==0){var I=(C.length<<2)+1;A=ar(I),Ae(C,A,I)}return A},array:C=>{var A=ar(C.length);return ht(C,A),A}};function _(C){return f==="string"?ne(C):f==="boolean"?!!C:C}var m=Gr(n),p=[],y=0;if(u)for(var E=0;E<u.length;E++){var S=c[v[E]];S?(y===0&&(y=xe()),p[E]=S(u[E])):p[E]=u[E]}var b=ie.currData,k=m.apply(null,p);function D(C){return xt(),y!==0&&Ie(y),_(C)}Bt();var T=o&&o.async;return ie.currData!=b?ie.whenDone().then(D):(k=D(k),T?Promise.resolve(k):k)}var ke=function(n,f,v,u){n||(n=this),this.parent=n,this.mount=n.mount,this.mounted=null,this.id=e.nextInode++,this.name=f,this.mode=v,this.node_ops={},this.stream_ops={},this.rdev=u},Te=365,an=146;Object.defineProperties(ke.prototype,{read:{get:function(){return(this.mode&Te)===Te},set:function(n){n?this.mode|=Te:this.mode&=~Te}},write:{get:function(){return(this.mode&an)===an},set:function(n){n?this.mode|=an:this.mode&=~an}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ke,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var On={k:Jn,Wa:Qn,Va:no,Ua:oo,Ta:io,Sa:ao,O:so,Ra:uo,Qa:fo,Pa:co,Oa:lo,T:_o,Na:vo,Ma:mo,N:po,o:rn,La:ho,Ka:yo,S:wo,Ja:Eo,Ia:go,Ha:So,Ga:bo,Fa:ko,M:Do,Ea:Oo,Da:No,Ca:To,Ba:se,w:Co,Aa:Fo,za:Ao,ya:Po,xa:Ro,wa:Mo,L:Lo,va:Io,K:Uo,ua:Bo,ta:xo,sa:Br,D:Ho,ra:tn,na:zo,ma:Wo,la:jo,ka:qo,ja:Vo,ia:Ko,ha:Go,ga:Xo,fa:nn,ea:$o,da:It,m:on,B:Jo,ca:Qo,A:Ut,ba:ei,aa:ri,$:ni,qa:oi,pa:ii,p:gt,s:ai,J:si,I:fi,R:ci,C:vn,_:An,H:di,G:En,Z:Jr,F:St,Y:br,X:je,h:Di,d:Ni,b:Cn,f:Ai,g:Ti,u:s,r:Nn,v:r,W:g,e:Fi,a:Tn,c:Ci,z:w,j:Oi,l:Ln,n:In,i:kn,V:i,y:d,U:ir,oa:Et,E:jt,Q:Yt,t:Gt,x:be,q:X,P:Fe},sn=Zn(),$t=l.___wasm_call_ctors=function(){return($t=l.___wasm_call_ctors=l.asm.Ya).apply(null,arguments)},gn=l._wasm_popen=function(){return(gn=l._wasm_popen=l.asm.Za).apply(null,arguments)},Pn=l.___errno_location=function(){return(Pn=l.___errno_location=l.asm._a).apply(null,arguments)},bt=l._wasm_pclose=function(){return(bt=l._wasm_pclose=l.asm.$a).apply(null,arguments)},sr=l._php_pollfd_for=function(){return(sr=l._php_pollfd_for=l.asm.ab).apply(null,arguments)},qr=l._wasm_select=function(){return(qr=l._wasm_select=l.asm.bb).apply(null,arguments)},Qt=l._wasm_add_cli_arg=function(){return(Qt=l._wasm_add_cli_arg=l.asm.cb).apply(null,arguments)},er=l._malloc=function(){return(er=l._malloc=l.asm.db).apply(null,arguments)},qt=l._run_cli=function(){return(qt=l._run_cli=l.asm.eb).apply(null,arguments)},Zr=l._memcpy=function(){return(Zr=l._memcpy=l.asm.fb).apply(null,arguments)},kr=l._free=function(){return(kr=l._free=l.asm.gb).apply(null,arguments)},Ur=l._fflush=function(){return(Ur=l._fflush=l.asm.ib).apply(null,arguments)},nt=l._htons=function(){return(nt=l._htons=l.asm.jb).apply(null,arguments)},Zt=l._ntohs=function(){return(Zt=l._ntohs=l.asm.kb).apply(null,arguments)},kt=l._htonl=function(){return(kt=l._htonl=l.asm.lb).apply(null,arguments)},mn=l._wasm_set_phpini_path=function(){return(mn=l._wasm_set_phpini_path=l.asm.mb).apply(null,arguments)},un=l._wasm_set_phpini_entries=function(){return(un=l._wasm_set_phpini_entries=l.asm.nb).apply(null,arguments)},fn=l._wasm_add_SERVER_entry=function(){return(fn=l._wasm_add_SERVER_entry=l.asm.ob).apply(null,arguments)},Sn=l._wasm_add_uploaded_file=function(){return(Sn=l._wasm_add_uploaded_file=l.asm.pb).apply(null,arguments)},vi=l._wasm_set_query_string=function(){return(vi=l._wasm_set_query_string=l.asm.qb).apply(null,arguments)},mi=l._wasm_set_path_translated=function(){return(mi=l._wasm_set_path_translated=l.asm.rb).apply(null,arguments)},pi=l._wasm_set_skip_shebang=function(){return(pi=l._wasm_set_skip_shebang=l.asm.sb).apply(null,arguments)},hi=l._wasm_set_request_uri=function(){return(hi=l._wasm_set_request_uri=l.asm.tb).apply(null,arguments)},yi=l._wasm_set_request_method=function(){return(yi=l._wasm_set_request_method=l.asm.ub).apply(null,arguments)},wi=l._wasm_set_request_host=function(){return(wi=l._wasm_set_request_host=l.asm.vb).apply(null,arguments)},Ei=l._wasm_set_content_type=function(){return(Ei=l._wasm_set_content_type=l.asm.wb).apply(null,arguments)},gi=l._wasm_set_request_body=function(){return(gi=l._wasm_set_request_body=l.asm.xb).apply(null,arguments)},Si=l._wasm_set_content_length=function(){return(Si=l._wasm_set_content_length=l.asm.yb).apply(null,arguments)},bi=l._wasm_set_cookies=function(){return(bi=l._wasm_set_cookies=l.asm.zb).apply(null,arguments)},ki=l._wasm_set_php_code=function(){return(ki=l._wasm_set_php_code=l.asm.Ab).apply(null,arguments)},Rn=l._wasm_set_request_port=function(){return(Rn=l._wasm_set_request_port=l.asm.Bb).apply(null,arguments)},Mn=l._phpwasm_init_uploaded_files_hash=function(){return(Mn=l._phpwasm_init_uploaded_files_hash=l.asm.Cb).apply(null,arguments)},Sr=l._phpwasm_register_uploaded_file=function(){return(Sr=l._phpwasm_register_uploaded_file=l.asm.Db).apply(null,arguments)},gr=l._phpwasm_destroy_uploaded_files_hash=function(){return(gr=l._phpwasm_destroy_uploaded_files_hash=l.asm.Eb).apply(null,arguments)},we=l._wasm_sapi_handle_request=function(){return(we=l._wasm_sapi_handle_request=l.asm.Fb).apply(null,arguments)},Oe=l._php_wasm_init=function(){return(Oe=l._php_wasm_init=l.asm.Gb).apply(null,arguments)},ye=l.___funcs_on_exit=function(){return(ye=l.___funcs_on_exit=l.asm.Hb).apply(null,arguments)},tr=l._emscripten_builtin_memalign=function(){return(tr=l._emscripten_builtin_memalign=l.asm.Ib).apply(null,arguments)},De=l._setThrew=function(){return(De=l._setThrew=l.asm.Jb).apply(null,arguments)},xe=l.stackSave=function(){return(xe=l.stackSave=l.asm.Kb).apply(null,arguments)},Ie=l.stackRestore=function(){return(Ie=l.stackRestore=l.asm.Lb).apply(null,arguments)},ar=l.stackAlloc=function(){return(ar=l.stackAlloc=l.asm.Mb).apply(null,arguments)},Be=l.dynCall_vi=function(){return(Be=l.dynCall_vi=l.asm.Nb).apply(null,arguments)},He=l.dynCall_vii=function(){return(He=l.dynCall_vii=l.asm.Ob).apply(null,arguments)},ur=l.dynCall_iii=function(){return(ur=l.dynCall_iii=l.asm.Pb).apply(null,arguments)},Qr=l.dynCall_ii=function(){return(Qr=l.dynCall_ii=l.asm.Qb).apply(null,arguments)},ot=l.dynCall_iiii=function(){return(ot=l.dynCall_iiii=l.asm.Rb).apply(null,arguments)},it=l.dynCall_iiiiii=function(){return(it=l.dynCall_iiiiii=l.asm.Sb).apply(null,arguments)},Dt=l.dynCall_iiiii=function(){return(Dt=l.dynCall_iiiii=l.asm.Tb).apply(null,arguments)},Ot=l.dynCall_viii=function(){return(Ot=l.dynCall_viii=l.asm.Ub).apply(null,arguments)},Nt=l.dynCall_viiiii=function(){return(Nt=l.dynCall_viiiii=l.asm.Vb).apply(null,arguments)},Tt=l.dynCall_iiiiiii=function(){return(Tt=l.dynCall_iiiiiii=l.asm.Wb).apply(null,arguments)},Ct=l.dynCall_i=function(){return(Ct=l.dynCall_i=l.asm.Xb).apply(null,arguments)},Ft=l.dynCall_viiii=function(){return(Ft=l.dynCall_viiii=l.asm.Yb).apply(null,arguments)},At=l.dynCall_iiiiiiiiii=function(){return(At=l.dynCall_iiiiiiiiii=l.asm.Zb).apply(null,arguments)},Pt=l.dynCall_v=function(){return(Pt=l.dynCall_v=l.asm._b).apply(null,arguments)},Rt=l.dynCall_viiiiiiiii=function(){return(Rt=l.dynCall_viiiiiiiii=l.asm.$b).apply(null,arguments)},Mt=l.dynCall_viiiiiii=function(){return(Mt=l.dynCall_viiiiiii=l.asm.ac).apply(null,arguments)},Lt=l.dynCall_viiiiii=function(){return(Lt=l.dynCall_viiiiii=l.asm.bc).apply(null,arguments)},Vt=l.dynCall_iiiiiiii=function(){return(Vt=l.dynCall_iiiiiiii=l.asm.cc).apply(null,arguments)},cn=l.dynCall_viidii=function(){return(cn=l.dynCall_viidii=l.asm.dc).apply(null,arguments)},ln=l._asyncify_start_unwind=function(){return(ln=l._asyncify_start_unwind=l.asm.ec).apply(null,arguments)},pn=l._asyncify_stop_unwind=function(){return(pn=l._asyncify_stop_unwind=l.asm.fc).apply(null,arguments)},hn=l._asyncify_start_rewind=function(){return(hn=l._asyncify_start_rewind=l.asm.gc).apply(null,arguments)},bn=l._asyncify_stop_rewind=function(){return(bn=l._asyncify_stop_rewind=l.asm.hc).apply(null,arguments)};function Nn(n,f,v,u,o,c,_){var m=xe();try{return Tt(n,f,v,u,o,c,_)}catch(p){if(Ie(m),p!==p+0)throw p;De(1,0)}}function Tn(n,f){var v=xe();try{Be(n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Cn(n,f,v){var u=xe();try{return ur(n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Ln(n,f,v,u,o){var c=xe();try{Ft(n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function Di(n){var f=xe();try{return Ct(n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Oi(n,f,v,u){var o=xe();try{Ot(n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function Ni(n,f){var v=xe();try{return Qr(n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Ti(n,f,v,u,o){var c=xe();try{return Dt(n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function Ci(n,f,v){var u=xe();try{He(n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Fi(n){var f=xe();try{Pt(n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Ai(n,f,v,u){var o=xe();try{return ot(n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function kn(n,f,v,u,o,c,_){var m=xe();try{Lt(n,f,v,u,o,c,_)}catch(p){if(Ie(m),p!==p+0)throw p;De(1,0)}}function In(n,f,v,u,o,c){var _=xe();try{Nt(n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}function w(n,f,v,u,o,c){var _=xe();try{cn(n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}function g(n,f,v,u,o,c,_,m,p,y){var E=xe();try{return At(n,f,v,u,o,c,_,m,p,y)}catch(S){if(Ie(E),S!==S+0)throw S;De(1,0)}}function s(n,f,v,u,o,c){var _=xe();try{return it(n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}function d(n,f,v,u,o,c,_,m,p,y){var E=xe();try{Rt(n,f,v,u,o,c,_,m,p,y)}catch(S){if(Ie(E),S!==S+0)throw S;De(1,0)}}function r(n,f,v,u,o,c,_,m){var p=xe();try{return Vt(n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}function i(n,f,v,u,o,c,_,m){var p=xe();try{Mt(n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=xr,l.FS=e;var t;$e=function n(){t||a(),t||($e=n)};function a(n){if(n=n||Y,Re>0||(Wn(),Re>0))return;function f(){t||(t=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),f()},1)):f()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return a(),O}var Bc,Lu,Uu=Ki(()=>{"use strict";Bc=10160442,Lu=__dirname+"/php_8_0.wasm"});var xu={};Hi(xu,{dependenciesTotalSize:()=>Hc,dependencyFilename:()=>Bu,init:()=>zc});function zc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(t,a)=>{throw a},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(t){return l.locateFile?l.locateFile(t,ae):ae+t}var Ye,nr,Me;function Lr(t){if(t instanceof mr)return;ce("exiting due to exception: "+t)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(t,a)=>(wr(),t=Le.normalize(t),V.readFileSync(t,a?void 0:"utf8")),Me=t=>{var a=Ye(t,!0);return a.buffer||(a=new Uint8Array(a)),a},nr=(t,a,n)=>{wr(),t=Le.normalize(t),V.readFile(t,function(f,v){f?n(f):a(v.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(t){if(!(t instanceof mr))throw t}),process.on("unhandledRejection",function(t){throw t}),te=(t,a)=>{if(_r())throw process.exitCode=t,a;Lr(a),process.exit(t)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(t,a){t||ue(a)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(t,a,n){for(var f=a+n,v=a;t[v]&&!(v>=f);)++v;if(v-a>16&&t.buffer&&at)return at.decode(t.subarray(a,v));for(var u="";a<v;){var o=t[a++];if(!(o&128)){u+=String.fromCharCode(o);continue}var c=t[a++]&63;if((o&224)==192){u+=String.fromCharCode((o&31)<<6|c);continue}var _=t[a++]&63;if((o&240)==224?o=(o&15)<<12|c<<6|_:o=(o&7)<<18|c<<12|_<<6|t[a++]&63,o<65536)u+=String.fromCharCode(o);else{var m=o-65536;u+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return u}function ne(t,a){return t?We(de,t,a):""}function Xe(t,a,n,f){if(!(f>0))return 0;for(var v=n,u=n+f-1,o=0;o<t.length;++o){var c=t.charCodeAt(o);if(c>=55296&&c<=57343){var _=t.charCodeAt(++o);c=65536+((c&1023)<<10)|_&1023}if(c<=127){if(n>=u)break;a[n++]=c}else if(c<=2047){if(n+1>=u)break;a[n++]=192|c>>6,a[n++]=128|c&63}else if(c<=65535){if(n+2>=u)break;a[n++]=224|c>>12,a[n++]=128|c>>6&63,a[n++]=128|c&63}else{if(n+3>=u)break;a[n++]=240|c>>18,a[n++]=128|c>>12&63,a[n++]=128|c>>6&63,a[n++]=128|c&63}}return a[n]=0,n-v}function Ae(t,a,n){return Xe(t,de,a,n)}function Pe(t){for(var a=0,n=0;n<t.length;++n){var f=t.charCodeAt(n);f<=127?a++:f<=2047?a+=2:f>=55296&&f<=57343?(a+=4,++n):a+=3}return a}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(t){Cr=t,l.HEAP8=$=new Int8Array(t),l.HEAP16=Ee=new Int16Array(t),l.HEAP32=h=new Int32Array(t),l.HEAPU8=de=new Uint8Array(t),l.HEAPU16=st=new Uint16Array(t),l.HEAPU32=H=new Uint32Array(t),l.HEAPF32=Bn=new Float32Array(t),l.HEAPF64=ut=new Float64Array(t)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),pe.root=e.mount(pe,{},null),pr(lt)}function Yn(){ye(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(t){ct.unshift(t)}function Kn(t){lt.unshift(t)}function Gn(t){dt.unshift(t)}var Re=0,Ar=null,$e=null;function Qi(t){return t}function vr(t){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(t){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var a=$e;$e=null,a()}}function ue(t){l.onAbort&&l.onAbort(t),t="Aborted("+t+")",ce(t),Ce=!0,Ge=1,t+=". Build with -sASSERTIONS for more info.";var a=new WebAssembly.RuntimeError(t);throw a}var Xn="data:application/octet-stream;base64,";function vt(t){return t.startsWith(Xn)}var _e;_e=Bu,vt(_e)||(_e=cr(_e));function mt(t){try{if(t==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(t);throw"both async and sync fetching of the wasm failed"}catch(a){ue(a)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw"failed to load wasm binary file at '"+_e+"'";return t.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var t={a:On};function a(o,c){var _=o.exports;_=ie.instrumentWasmExports(_),l.asm=_,or=l.asm.Wa,ft(or.buffer),xn=l.asm.gb,Kn(l.asm.Xa),Ze("wasm-instantiate")}vr("wasm-instantiate");function n(o){a(o.instance)}function f(o){return $n().then(function(c){return WebAssembly.instantiate(c,t)}).then(function(c){return c}).then(o,function(c){ce("failed to asynchronously prepare wasm: "+c),ue(c)})}function v(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(o){var c=WebAssembly.instantiateStreaming(o,t);return c.then(n,function(_){return ce("wasm streaming compile failed: "+_),ce("falling back to ArrayBuffer instantiation"),f(n)})}):f(n)}if(l.instantiateWasm)try{var u=l.instantiateWasm(t,a);return u=ie.instrumentWasmExports(u),u}catch(o){return ce("Module.instantiateWasm callback failed with error: "+o),!1}return v(),{}}var P,q;function mr(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function pr(t){for(;t.length>0;)t.shift()(l)}function pt(t){if(t instanceof mr||t=="unwind")return Ge;te(1,t)}function ht(t,a){$.set(t,a)}function Jn(t,a,n,f){ue("Assertion failed: "+ne(t)+", at: "+[a?ne(a):"unknown filename",n,f?ne(f):"unknown function"])}function Qn(t,a){(function(n){Be.apply(null,[t,n])})(a)}var U={isAbs:t=>t.charAt(0)==="/",splitPath:t=>{var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return a.exec(t).slice(1)},normalizeArray:(t,a)=>{for(var n=0,f=t.length-1;f>=0;f--){var v=t[f];v==="."?t.splice(f,1):v===".."?(t.splice(f,1),n++):n&&(t.splice(f,1),n--)}if(a)for(;n;n--)t.unshift("..");return t},normalize:t=>{var a=U.isAbs(t),n=t.substr(-1)==="/";return t=U.normalizeArray(t.split("/").filter(f=>!!f),!a).join("/"),!t&&!a&&(t="."),t&&n&&(t+="/"),(a?"/":"")+t},dirname:t=>{var a=U.splitPath(t),n=a[0],f=a[1];return!n&&!f?".":(f&&(f=f.substr(0,f.length-1)),n+f)},basename:t=>{if(t==="/")return"/";t=U.normalize(t),t=t.replace(/\/$/,"");var a=t.lastIndexOf("/");return a===-1?t:t.substr(a+1)},join:function(){var t=Array.prototype.slice.call(arguments);return U.normalize(t.join("/"))},join2:(t,a)=>U.normalize(t+"/"+a)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var t=new Uint8Array(1);return()=>(crypto.getRandomValues(t),t[0])}else if(Z)try{var a=require("crypto");return()=>a.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var t="",a=!1,n=arguments.length-1;n>=-1&&!a;n--){var f=n>=0?arguments[n]:e.cwd();if(typeof f!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!f)return"";t=f+"/"+t,a=U.isAbs(f)}return t=U.normalizeArray(t.split("/").filter(v=>!!v),!a).join("/"),(a?"/":"")+t||"."},relative:(t,a)=>{t=ge.resolve(t).substr(1),a=ge.resolve(a).substr(1);function n(m){for(var p=0;p<m.length&&m[p]==="";p++);for(var y=m.length-1;y>=0&&m[y]==="";y--);return p>y?[]:m.slice(p,y-p+1)}for(var f=n(t.split("/")),v=n(a.split("/")),u=Math.min(f.length,v.length),o=u,c=0;c<u;c++)if(f[c]!==v[c]){o=c;break}for(var _=[],c=o;c<f.length;c++)_.push("..");return _=_.concat(v.slice(o)),_.join("/")}};function Je(t,a,n){var f=n>0?n:Pe(t)+1,v=new Array(f),u=Xe(t,v,0,v.length);return a&&(v.length=u),v}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(t,a){Se.ttys[t]={input:[],output:[],ops:a},e.registerDevice(t,Se.stream_ops)},stream_ops:{open:function(t){var a=Se.ttys[t.node.rdev];if(!a)throw new e.ErrnoError(43);t.tty=a,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,a,n,f,v){if(!t.tty||!t.tty.ops.get_char)throw new e.ErrnoError(60);for(var u=0,o=0;o<f;o++){var c;try{c=t.tty.ops.get_char(t.tty)}catch{throw new e.ErrnoError(29)}if(c===void 0&&u===0)throw new e.ErrnoError(6);if(c==null)break;u++,a[n+o]=c}return u&&(t.node.timestamp=Date.now()),u},write:function(t,a,n,f,v){if(!t.tty||!t.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var u=0;u<f;u++)t.tty.ops.put_char(t.tty,a[n+u])}catch{throw new e.ErrnoError(29)}return f&&(t.node.timestamp=Date.now()),u}},default_tty_ops:{get_char:function(t){if(!t.input.length){var a=null;if(Z){var n=256,f=Buffer.alloc(n),v=0;try{v=V.readSync(process.stdin.fd,f,0,n,-1)}catch(u){if(u.toString().includes("EOF"))v=0;else throw u}v>0?a=f.slice(0,v).toString("utf-8"):a=null}else typeof window<"u"&&typeof window.prompt=="function"?(a=window.prompt("Input: "),a!==null&&(a+=`
|
|
16
|
+
`},"%p":function(I){return I.tm_hour>=0&&I.tm_hour<12?"AM":"PM"},"%S":function(I){return b(I.tm_sec,2)},"%t":function(){return" "},"%u":function(I){return I.tm_wday||7},"%U":function(I){var z=I.tm_yday+7-I.tm_wday;return b(Math.floor(z/7),2)},"%V":function(I){var z=Math.floor((I.tm_yday+7-(I.tm_wday+6)%7)/7);if((I.tm_wday+371-I.tm_yday-2)%7<=2&&z++,z){if(z==53){var B=(I.tm_wday+371-I.tm_yday)%7;B!=4&&(B!=3||!qe(I.tm_year))&&(z=1)}}else{z=52;var K=(I.tm_wday+7-I.tm_yday-1)%7;(K==4||K==5&&qe(I.tm_year%400-1))&&z++}return b(z,2)},"%w":function(I){return I.tm_wday},"%W":function(I){var z=I.tm_yday+7-(I.tm_wday+6)%7;return b(Math.floor(z/7),2)},"%y":function(I){return(I.tm_year+1900).toString().substring(2)},"%Y":function(I){return I.tm_year+1900},"%z":function(I){var z=I.tm_gmtoff,K=z>=0;return z=Math.abs(z)/60,z=z/60*100+z%60,(K?"+":"-")+("0000"+z).slice(-4)},"%Z":function(I){return I.tm_zone},"%%":function(){return"%"}};_=_.replace(/%%/g,"\0\0");for(var p in C)_.includes(p)&&(_=_.replace(new RegExp(p,"g"),C[p](c)));_=_.replace(/\0\0/g,"%");var A=Je(_,!1);return A.length>f?0:(ht(A,n),A.length-1)}function Yt(n,f,v){for(var u=ne(f),o="\\!@#$^&*()+=-[]/{}|:<>?,.",c=0,_=o.length;c<_;++c)u=u.replace(new RegExp("\\"+o[c],"g"),"\\"+o[c]);var m={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var p in m)u=u.replace(p,m[p]);var y={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},E={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},S={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},b={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var k in y)u=u.replace(k,"("+k+y[k]+")");for(var D=[],c=u.indexOf("%");c>=0;c=u.indexOf("%"))D.push(u[c+1]),u=u.replace(new RegExp("\\%"+u[c+1],"g"),"");var T=new RegExp("^"+u,"i").exec(ne(n));function C(){function Vr(Kr,Jt,dn){return typeof Kr!="number"||isNaN(Kr)?Jt:Kr>=Jt?Kr<=dn?Kr:dn:Jt}return{year:Vr(h[v+20>>2]+1900,1970,9999),month:Vr(h[v+16>>2],0,11),day:Vr(h[v+12>>2],1,31),hour:Vr(h[v+8>>2],0,23),min:Vr(h[v+4>>2],0,59),sec:Vr(h[v>>2],0,59)}}if(T){var A=C(),I,z=Vr=>{var Kr=D.indexOf(Vr);if(Kr>=0)return T[Kr+1]};if((I=z("S"))&&(A.sec=Q(I)),(I=z("M"))&&(A.min=Q(I)),I=z("H"))A.hour=Q(I);else if(I=z("I")){var K=Q(I);(I=z("p"))&&(K+=I.toUpperCase()[0]==="P"?12:0),A.hour=K}if(I=z("Y"))A.year=Q(I);else if(I=z("y")){var B=Q(I);(I=z("C"))?B+=Q(I)*100:B+=B<69?2e3:1900,A.year=B}if((I=z("m"))?A.month=Q(I)-1:(I=z("b"))&&(A.month=E[I.substring(0,3).toUpperCase()]||0),I=z("d"))A.day=Q(I);else if(I=z("j"))for(var x=Q(I),G=qe(A.year),re=0;re<12;++re){var oe=Er(G?fr:Tr,re-1);x<=oe+(G?fr:Tr)[re]&&(A.day=x-oe)}else if(I=z("a")){var le=I.substring(0,3).toUpperCase();if(I=z("U")){var he=S[le],ze=Q(I),Ve=new Date(A.year,0,1),Dr;Ve.getDay()===0?Dr=Yr(Ve,he+7*(ze-1)):Dr=Yr(Ve,7-Ve.getDay()+he+7*(ze-1)),A.day=Dr.getDate(),A.month=Dr.getMonth()}else if(I=z("W")){var he=b[le],ze=Q(I),Ve=new Date(A.year,0,1),Dr;Ve.getDay()===1?Dr=Yr(Ve,he+7*(ze-1)):Dr=Yr(Ve,7-Ve.getDay()+1+he+7*(ze-1)),A.day=Dr.getDate(),A.month=Dr.getMonth()}}var yr=new Date(A.year,A.month,A.day,A.hour,A.min,A.sec,0);return h[v>>2]=yr.getSeconds(),h[v+4>>2]=yr.getMinutes(),h[v+8>>2]=yr.getHours(),h[v+12>>2]=yr.getDate(),h[v+16>>2]=yr.getMonth(),h[v+20>>2]=yr.getFullYear()-1900,h[v+24>>2]=yr.getDay(),h[v+28>>2]=Er(qe(yr.getFullYear())?fr:Tr,yr.getMonth()-1)+yr.getDate()-1,h[v+32>>2]=0,n+Je(T[0]).length-1}return 0}function Gt(n){return Ue.shutdownSocket(n,2)}function be(n,f,v){if(typeof ie>"u")return 0;let u=1,o=2,c=4,_=8,m=16,p=32;return ie.handleSleep(y=>{let E=ve(n);if(!E){y(0);return}let S=[],b=new Set;if(f&u||f&o){if(E.server){for(let I of E.pending)if((I.recv_queue||[]).length>0){y(1);return}}else if((E.recv_queue||[]).length>0){y(1);return}}let k=Ue.getAllWebSockets(E);if(!k.length){y(0);return}for(let I of k)(f&u||f&o)&&(S.push(Ue.awaitData(I)),b.add("POLLIN")),f&c&&(S.push(Ue.awaitConnection(I)),b.add("POLLOUT")),f&m&&(S.push(Ue.awaitClose(I)),b.add("POLLHUP")),(f&_||f&p)&&(S.push(Ue.awaitError(I)),b.add("POLLERR"));if(S.length===0){console.warn("Unsupported poll event "+f+", defaulting to setTimeout()."),setTimeout(function(){y(0)},v);return}let D=S.map(([I])=>I),T=()=>S.forEach(([,I])=>I()),C=!1;Promise.race(D).then(function(I){C||(C=!0,y(1),clearTimeout(A),T())});let A=setTimeout(function(){C||(C=!0,y(0),T())},v)})}function X(n,f,v,u,o){let c=de[u];if(!(f===1&&v===9||f===6&&v===1))return console.warn(`Unsupported socket option: ${f}, ${v}, ${c}`),-1;let S=Ue.getAllWebSockets(n)[0];return S?(S.setSocketOpt(f,v,u),0):-1}function Fe(n,f){return Ue.shutdownSocket(n,f)}function Xt(n){try{return n()}catch(f){ue(f)}}var ie={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(n){var f=ie.callStackNameToId[n];return f===void 0&&(f=ie.callStackId++,ie.callStackNameToId[n]=f,ie.callStackIdToName[f]=n),f},instrumentWasmImports:function(n){var f=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(u=>u.split(".")[1]);for(var v in n)(function(u){var o=n[u],c=o.sig;if(typeof o=="function")var _=f.indexOf(u)>=0||u.startsWith("__asyncjs__")})(v)},instrumentWasmExports:function(n){var f={};for(var v in n)(function(u){var o=n[u];typeof o=="function"?f[u]=function(){ie.exportCallStack.push(u);try{return o.apply(null,arguments)}finally{if(!Ce){var c=ie.exportCallStack.pop();Ne(c===u),ie.maybeStopUnwind()}}}:f[u]=o})(v);return f},maybeStopUnwind:function(){ie.currData&&ie.state===ie.State.Unwinding&&ie.exportCallStack.length===0&&(ie.state=ie.State.Normal,Bt(),Xt(pn),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((n,f)=>{ie.asyncPromiseHandlers={resolve:n,reject:f}})},allocateData:function(){var n=er(12+ie.StackSize);return ie.setDataHeader(n,n+12,ie.StackSize),ie.setDataRewindFunc(n),n},setDataHeader:function(n,f,v){h[n>>2]=f,h[n+4>>2]=f+v},setDataRewindFunc:function(n){var f=ie.exportCallStack[0],v=ie.getCallStackId(f);h[n+8>>2]=v},getDataRewindFunc:function(n){var f=h[n+8>>2],v=ie.callStackIdToName[f],u=l.asm[v];return u},doRewind:function(n){var f=ie.getDataRewindFunc(n);return xt(),f()},handleSleep:function(n){if(!Ce){if(ie.state===ie.State.Normal){var f=!1,v=!1;n(u=>{if(!Ce&&(ie.handleSleepReturnValue=u||0,f=!0,!!v)){ie.state=ie.State.Rewinding,Xt(()=>hn(ie.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var o,c=!1;try{o=ie.doRewind(ie.currData)}catch(p){o=p,c=!0}var _=!1;if(!ie.currData){var m=ie.asyncPromiseHandlers;m&&(ie.asyncPromiseHandlers=null,(c?m.reject:m.resolve)(o),_=!0)}if(c&&!_)throw o}}),v=!0,f||(ie.state=ie.State.Unwinding,ie.currData=ie.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),Xt(()=>ln(ie.currData)))}else ie.state===ie.State.Rewinding?(ie.state=ie.State.Normal,Xt(bn),kr(ie.currData),ie.currData=null,ie.sleepCallbacks.forEach(u=>jr(u))):ue("invalid state: "+ie.state);return ie.handleSleepReturnValue}},handleAsync:function(n){return ie.handleSleep(f=>{n().then(f)})}};function Gr(n){var f=l["_"+n];return f}function xr(n,f,v,u,o){var c={string:C=>{var A=0;if(C!=null&&C!==0){var I=(C.length<<2)+1;A=ar(I),Ae(C,A,I)}return A},array:C=>{var A=ar(C.length);return ht(C,A),A}};function _(C){return f==="string"?ne(C):f==="boolean"?!!C:C}var m=Gr(n),p=[],y=0;if(u)for(var E=0;E<u.length;E++){var S=c[v[E]];S?(y===0&&(y=xe()),p[E]=S(u[E])):p[E]=u[E]}var b=ie.currData,k=m.apply(null,p);function D(C){return xt(),y!==0&&Ie(y),_(C)}Bt();var T=o&&o.async;return ie.currData!=b?ie.whenDone().then(D):(k=D(k),T?Promise.resolve(k):k)}var ke=function(n,f,v,u){n||(n=this),this.parent=n,this.mount=n.mount,this.mounted=null,this.id=e.nextInode++,this.name=f,this.mode=v,this.node_ops={},this.stream_ops={},this.rdev=u},Te=365,an=146;Object.defineProperties(ke.prototype,{read:{get:function(){return(this.mode&Te)===Te},set:function(n){n?this.mode|=Te:this.mode&=~Te}},write:{get:function(){return(this.mode&an)===an},set:function(n){n?this.mode|=an:this.mode&=~an}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ke,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var On={k:Jn,Wa:Qn,Va:no,Ua:oo,Ta:io,Sa:ao,O:so,Ra:uo,Qa:fo,Pa:co,Oa:lo,T:_o,Na:vo,Ma:mo,N:po,o:rn,La:ho,Ka:yo,S:wo,Ja:Eo,Ia:go,Ha:So,Ga:bo,Fa:ko,M:Do,Ea:Oo,Da:No,Ca:To,Ba:se,w:Co,Aa:Fo,za:Ao,ya:Po,xa:Ro,wa:Mo,L:Lo,va:Io,K:Uo,ua:Bo,ta:xo,sa:Br,D:Ho,ra:tn,na:zo,ma:Wo,la:jo,ka:qo,ja:Vo,ia:Ko,ha:Go,ga:Xo,fa:nn,ea:$o,da:It,m:on,B:Jo,ca:Qo,A:Ut,ba:ei,aa:ri,$:ni,qa:oi,pa:ii,p:gt,s:ai,J:si,I:fi,R:ci,C:vn,_:An,H:di,G:En,Z:Jr,F:St,Y:br,X:je,h:Di,d:Ni,b:Cn,f:Ai,g:Ti,u:s,r:Nn,v:r,W:g,e:Fi,a:Tn,c:Ci,z:w,j:Oi,l:Ln,n:In,i:kn,V:i,y:d,U:ir,oa:Et,E:jt,Q:Yt,t:Gt,x:be,q:X,P:Fe},sn=Zn(),$t=l.___wasm_call_ctors=function(){return($t=l.___wasm_call_ctors=l.asm.Ya).apply(null,arguments)},gn=l._wasm_popen=function(){return(gn=l._wasm_popen=l.asm.Za).apply(null,arguments)},Pn=l.___errno_location=function(){return(Pn=l.___errno_location=l.asm._a).apply(null,arguments)},bt=l._wasm_pclose=function(){return(bt=l._wasm_pclose=l.asm.$a).apply(null,arguments)},sr=l._php_pollfd_for=function(){return(sr=l._php_pollfd_for=l.asm.ab).apply(null,arguments)},qr=l._wasm_select=function(){return(qr=l._wasm_select=l.asm.bb).apply(null,arguments)},Qt=l._wasm_add_cli_arg=function(){return(Qt=l._wasm_add_cli_arg=l.asm.cb).apply(null,arguments)},er=l._malloc=function(){return(er=l._malloc=l.asm.db).apply(null,arguments)},qt=l._run_cli=function(){return(qt=l._run_cli=l.asm.eb).apply(null,arguments)},Zr=l._memcpy=function(){return(Zr=l._memcpy=l.asm.fb).apply(null,arguments)},kr=l._free=function(){return(kr=l._free=l.asm.gb).apply(null,arguments)},Ur=l._fflush=function(){return(Ur=l._fflush=l.asm.ib).apply(null,arguments)},nt=l._htons=function(){return(nt=l._htons=l.asm.jb).apply(null,arguments)},Zt=l._ntohs=function(){return(Zt=l._ntohs=l.asm.kb).apply(null,arguments)},kt=l._htonl=function(){return(kt=l._htonl=l.asm.lb).apply(null,arguments)},mn=l._wasm_set_phpini_path=function(){return(mn=l._wasm_set_phpini_path=l.asm.mb).apply(null,arguments)},un=l._wasm_set_phpini_entries=function(){return(un=l._wasm_set_phpini_entries=l.asm.nb).apply(null,arguments)},fn=l._wasm_add_SERVER_entry=function(){return(fn=l._wasm_add_SERVER_entry=l.asm.ob).apply(null,arguments)},Sn=l._wasm_add_uploaded_file=function(){return(Sn=l._wasm_add_uploaded_file=l.asm.pb).apply(null,arguments)},vi=l._wasm_set_query_string=function(){return(vi=l._wasm_set_query_string=l.asm.qb).apply(null,arguments)},mi=l._wasm_set_path_translated=function(){return(mi=l._wasm_set_path_translated=l.asm.rb).apply(null,arguments)},pi=l._wasm_set_skip_shebang=function(){return(pi=l._wasm_set_skip_shebang=l.asm.sb).apply(null,arguments)},hi=l._wasm_set_request_uri=function(){return(hi=l._wasm_set_request_uri=l.asm.tb).apply(null,arguments)},yi=l._wasm_set_request_method=function(){return(yi=l._wasm_set_request_method=l.asm.ub).apply(null,arguments)},wi=l._wasm_set_request_host=function(){return(wi=l._wasm_set_request_host=l.asm.vb).apply(null,arguments)},Ei=l._wasm_set_content_type=function(){return(Ei=l._wasm_set_content_type=l.asm.wb).apply(null,arguments)},gi=l._wasm_set_request_body=function(){return(gi=l._wasm_set_request_body=l.asm.xb).apply(null,arguments)},Si=l._wasm_set_content_length=function(){return(Si=l._wasm_set_content_length=l.asm.yb).apply(null,arguments)},bi=l._wasm_set_cookies=function(){return(bi=l._wasm_set_cookies=l.asm.zb).apply(null,arguments)},ki=l._wasm_set_php_code=function(){return(ki=l._wasm_set_php_code=l.asm.Ab).apply(null,arguments)},Rn=l._wasm_set_request_port=function(){return(Rn=l._wasm_set_request_port=l.asm.Bb).apply(null,arguments)},Mn=l._phpwasm_init_uploaded_files_hash=function(){return(Mn=l._phpwasm_init_uploaded_files_hash=l.asm.Cb).apply(null,arguments)},Sr=l._phpwasm_register_uploaded_file=function(){return(Sr=l._phpwasm_register_uploaded_file=l.asm.Db).apply(null,arguments)},gr=l._phpwasm_destroy_uploaded_files_hash=function(){return(gr=l._phpwasm_destroy_uploaded_files_hash=l.asm.Eb).apply(null,arguments)},we=l._wasm_sapi_handle_request=function(){return(we=l._wasm_sapi_handle_request=l.asm.Fb).apply(null,arguments)},Oe=l._php_wasm_init=function(){return(Oe=l._php_wasm_init=l.asm.Gb).apply(null,arguments)},ye=l.___funcs_on_exit=function(){return(ye=l.___funcs_on_exit=l.asm.Hb).apply(null,arguments)},tr=l._emscripten_builtin_memalign=function(){return(tr=l._emscripten_builtin_memalign=l.asm.Ib).apply(null,arguments)},De=l._setThrew=function(){return(De=l._setThrew=l.asm.Jb).apply(null,arguments)},xe=l.stackSave=function(){return(xe=l.stackSave=l.asm.Kb).apply(null,arguments)},Ie=l.stackRestore=function(){return(Ie=l.stackRestore=l.asm.Lb).apply(null,arguments)},ar=l.stackAlloc=function(){return(ar=l.stackAlloc=l.asm.Mb).apply(null,arguments)},Be=l.dynCall_vi=function(){return(Be=l.dynCall_vi=l.asm.Nb).apply(null,arguments)},He=l.dynCall_vii=function(){return(He=l.dynCall_vii=l.asm.Ob).apply(null,arguments)},ur=l.dynCall_iii=function(){return(ur=l.dynCall_iii=l.asm.Pb).apply(null,arguments)},Qr=l.dynCall_ii=function(){return(Qr=l.dynCall_ii=l.asm.Qb).apply(null,arguments)},ot=l.dynCall_iiii=function(){return(ot=l.dynCall_iiii=l.asm.Rb).apply(null,arguments)},it=l.dynCall_iiiiii=function(){return(it=l.dynCall_iiiiii=l.asm.Sb).apply(null,arguments)},Dt=l.dynCall_iiiii=function(){return(Dt=l.dynCall_iiiii=l.asm.Tb).apply(null,arguments)},Ot=l.dynCall_viii=function(){return(Ot=l.dynCall_viii=l.asm.Ub).apply(null,arguments)},Nt=l.dynCall_viiiii=function(){return(Nt=l.dynCall_viiiii=l.asm.Vb).apply(null,arguments)},Tt=l.dynCall_iiiiiii=function(){return(Tt=l.dynCall_iiiiiii=l.asm.Wb).apply(null,arguments)},Ct=l.dynCall_i=function(){return(Ct=l.dynCall_i=l.asm.Xb).apply(null,arguments)},Ft=l.dynCall_viiii=function(){return(Ft=l.dynCall_viiii=l.asm.Yb).apply(null,arguments)},At=l.dynCall_iiiiiiiiii=function(){return(At=l.dynCall_iiiiiiiiii=l.asm.Zb).apply(null,arguments)},Pt=l.dynCall_v=function(){return(Pt=l.dynCall_v=l.asm._b).apply(null,arguments)},Rt=l.dynCall_viiiiiiiii=function(){return(Rt=l.dynCall_viiiiiiiii=l.asm.$b).apply(null,arguments)},Mt=l.dynCall_viiiiiii=function(){return(Mt=l.dynCall_viiiiiii=l.asm.ac).apply(null,arguments)},Lt=l.dynCall_viiiiii=function(){return(Lt=l.dynCall_viiiiii=l.asm.bc).apply(null,arguments)},Vt=l.dynCall_iiiiiiii=function(){return(Vt=l.dynCall_iiiiiiii=l.asm.cc).apply(null,arguments)},cn=l.dynCall_viidii=function(){return(cn=l.dynCall_viidii=l.asm.dc).apply(null,arguments)},ln=l._asyncify_start_unwind=function(){return(ln=l._asyncify_start_unwind=l.asm.ec).apply(null,arguments)},pn=l._asyncify_stop_unwind=function(){return(pn=l._asyncify_stop_unwind=l.asm.fc).apply(null,arguments)},hn=l._asyncify_start_rewind=function(){return(hn=l._asyncify_start_rewind=l.asm.gc).apply(null,arguments)},bn=l._asyncify_stop_rewind=function(){return(bn=l._asyncify_stop_rewind=l.asm.hc).apply(null,arguments)};function Nn(n,f,v,u,o,c,_){var m=xe();try{return Tt(n,f,v,u,o,c,_)}catch(p){if(Ie(m),p!==p+0)throw p;De(1,0)}}function Tn(n,f){var v=xe();try{Be(n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Cn(n,f,v){var u=xe();try{return ur(n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Ln(n,f,v,u,o){var c=xe();try{Ft(n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function Di(n){var f=xe();try{return Ct(n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Oi(n,f,v,u){var o=xe();try{Ot(n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function Ni(n,f){var v=xe();try{return Qr(n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Ti(n,f,v,u,o){var c=xe();try{return Dt(n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function Ci(n,f,v){var u=xe();try{He(n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Fi(n){var f=xe();try{Pt(n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Ai(n,f,v,u){var o=xe();try{return ot(n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function kn(n,f,v,u,o,c,_){var m=xe();try{Lt(n,f,v,u,o,c,_)}catch(p){if(Ie(m),p!==p+0)throw p;De(1,0)}}function In(n,f,v,u,o,c){var _=xe();try{Nt(n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}function w(n,f,v,u,o,c){var _=xe();try{cn(n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}function g(n,f,v,u,o,c,_,m,p,y){var E=xe();try{return At(n,f,v,u,o,c,_,m,p,y)}catch(S){if(Ie(E),S!==S+0)throw S;De(1,0)}}function s(n,f,v,u,o,c){var _=xe();try{return it(n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}function d(n,f,v,u,o,c,_,m,p,y){var E=xe();try{Rt(n,f,v,u,o,c,_,m,p,y)}catch(S){if(Ie(E),S!==S+0)throw S;De(1,0)}}function r(n,f,v,u,o,c,_,m){var p=xe();try{return Vt(n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}function i(n,f,v,u,o,c,_,m){var p=xe();try{Mt(n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=xr,l.FS=e;var t;$e=function n(){t||a(),t||($e=n)};function a(n){if(n=n||Y,Re>0||(Wn(),Re>0))return;function f(){t||(t=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),f()},1)):f()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return a(),O}var Bc,Lu,Uu=Ki(()=>{"use strict";Bc=10160442,Lu=__dirname+"/php_8_0.wasm"});var xu={};Wi(xu,{dependenciesTotalSize:()=>Hc,dependencyFilename:()=>Bu,init:()=>zc});function zc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(t,a)=>{throw a},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(t){return l.locateFile?l.locateFile(t,ae):ae+t}var Ye,nr,Me;function Lr(t){if(t instanceof mr)return;ce("exiting due to exception: "+t)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(t,a)=>(wr(),t=Le.normalize(t),V.readFileSync(t,a?void 0:"utf8")),Me=t=>{var a=Ye(t,!0);return a.buffer||(a=new Uint8Array(a)),a},nr=(t,a,n)=>{wr(),t=Le.normalize(t),V.readFile(t,function(f,v){f?n(f):a(v.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(t){if(!(t instanceof mr))throw t}),process.on("unhandledRejection",function(t){throw t}),te=(t,a)=>{if(_r())throw process.exitCode=t,a;Lr(a),process.exit(t)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(t,a){t||ue(a)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(t,a,n){for(var f=a+n,v=a;t[v]&&!(v>=f);)++v;if(v-a>16&&t.buffer&&at)return at.decode(t.subarray(a,v));for(var u="";a<v;){var o=t[a++];if(!(o&128)){u+=String.fromCharCode(o);continue}var c=t[a++]&63;if((o&224)==192){u+=String.fromCharCode((o&31)<<6|c);continue}var _=t[a++]&63;if((o&240)==224?o=(o&15)<<12|c<<6|_:o=(o&7)<<18|c<<12|_<<6|t[a++]&63,o<65536)u+=String.fromCharCode(o);else{var m=o-65536;u+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return u}function ne(t,a){return t?We(de,t,a):""}function Xe(t,a,n,f){if(!(f>0))return 0;for(var v=n,u=n+f-1,o=0;o<t.length;++o){var c=t.charCodeAt(o);if(c>=55296&&c<=57343){var _=t.charCodeAt(++o);c=65536+((c&1023)<<10)|_&1023}if(c<=127){if(n>=u)break;a[n++]=c}else if(c<=2047){if(n+1>=u)break;a[n++]=192|c>>6,a[n++]=128|c&63}else if(c<=65535){if(n+2>=u)break;a[n++]=224|c>>12,a[n++]=128|c>>6&63,a[n++]=128|c&63}else{if(n+3>=u)break;a[n++]=240|c>>18,a[n++]=128|c>>12&63,a[n++]=128|c>>6&63,a[n++]=128|c&63}}return a[n]=0,n-v}function Ae(t,a,n){return Xe(t,de,a,n)}function Pe(t){for(var a=0,n=0;n<t.length;++n){var f=t.charCodeAt(n);f<=127?a++:f<=2047?a+=2:f>=55296&&f<=57343?(a+=4,++n):a+=3}return a}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(t){Cr=t,l.HEAP8=$=new Int8Array(t),l.HEAP16=Ee=new Int16Array(t),l.HEAP32=h=new Int32Array(t),l.HEAPU8=de=new Uint8Array(t),l.HEAPU16=st=new Uint16Array(t),l.HEAPU32=H=new Uint32Array(t),l.HEAPF32=Bn=new Float32Array(t),l.HEAPF64=ut=new Float64Array(t)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),pe.root=e.mount(pe,{},null),pr(lt)}function Yn(){ye(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(t){ct.unshift(t)}function Kn(t){lt.unshift(t)}function Gn(t){dt.unshift(t)}var Re=0,Ar=null,$e=null;function Qi(t){return t}function vr(t){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(t){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var a=$e;$e=null,a()}}function ue(t){l.onAbort&&l.onAbort(t),t="Aborted("+t+")",ce(t),Ce=!0,Ge=1,t+=". Build with -sASSERTIONS for more info.";var a=new WebAssembly.RuntimeError(t);throw a}var Xn="data:application/octet-stream;base64,";function vt(t){return t.startsWith(Xn)}var _e;_e=Bu,vt(_e)||(_e=cr(_e));function mt(t){try{if(t==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(t);throw"both async and sync fetching of the wasm failed"}catch(a){ue(a)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw"failed to load wasm binary file at '"+_e+"'";return t.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var t={a:On};function a(o,c){var _=o.exports;_=ie.instrumentWasmExports(_),l.asm=_,or=l.asm.Wa,ft(or.buffer),xn=l.asm.gb,Kn(l.asm.Xa),Ze("wasm-instantiate")}vr("wasm-instantiate");function n(o){a(o.instance)}function f(o){return $n().then(function(c){return WebAssembly.instantiate(c,t)}).then(function(c){return c}).then(o,function(c){ce("failed to asynchronously prepare wasm: "+c),ue(c)})}function v(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(o){var c=WebAssembly.instantiateStreaming(o,t);return c.then(n,function(_){return ce("wasm streaming compile failed: "+_),ce("falling back to ArrayBuffer instantiation"),f(n)})}):f(n)}if(l.instantiateWasm)try{var u=l.instantiateWasm(t,a);return u=ie.instrumentWasmExports(u),u}catch(o){return ce("Module.instantiateWasm callback failed with error: "+o),!1}return v(),{}}var P,q;function mr(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function pr(t){for(;t.length>0;)t.shift()(l)}function pt(t){if(t instanceof mr||t=="unwind")return Ge;te(1,t)}function ht(t,a){$.set(t,a)}function Jn(t,a,n,f){ue("Assertion failed: "+ne(t)+", at: "+[a?ne(a):"unknown filename",n,f?ne(f):"unknown function"])}function Qn(t,a){(function(n){Be.apply(null,[t,n])})(a)}var U={isAbs:t=>t.charAt(0)==="/",splitPath:t=>{var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return a.exec(t).slice(1)},normalizeArray:(t,a)=>{for(var n=0,f=t.length-1;f>=0;f--){var v=t[f];v==="."?t.splice(f,1):v===".."?(t.splice(f,1),n++):n&&(t.splice(f,1),n--)}if(a)for(;n;n--)t.unshift("..");return t},normalize:t=>{var a=U.isAbs(t),n=t.substr(-1)==="/";return t=U.normalizeArray(t.split("/").filter(f=>!!f),!a).join("/"),!t&&!a&&(t="."),t&&n&&(t+="/"),(a?"/":"")+t},dirname:t=>{var a=U.splitPath(t),n=a[0],f=a[1];return!n&&!f?".":(f&&(f=f.substr(0,f.length-1)),n+f)},basename:t=>{if(t==="/")return"/";t=U.normalize(t),t=t.replace(/\/$/,"");var a=t.lastIndexOf("/");return a===-1?t:t.substr(a+1)},join:function(){var t=Array.prototype.slice.call(arguments);return U.normalize(t.join("/"))},join2:(t,a)=>U.normalize(t+"/"+a)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var t=new Uint8Array(1);return()=>(crypto.getRandomValues(t),t[0])}else if(Z)try{var a=require("crypto");return()=>a.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var t="",a=!1,n=arguments.length-1;n>=-1&&!a;n--){var f=n>=0?arguments[n]:e.cwd();if(typeof f!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!f)return"";t=f+"/"+t,a=U.isAbs(f)}return t=U.normalizeArray(t.split("/").filter(v=>!!v),!a).join("/"),(a?"/":"")+t||"."},relative:(t,a)=>{t=ge.resolve(t).substr(1),a=ge.resolve(a).substr(1);function n(m){for(var p=0;p<m.length&&m[p]==="";p++);for(var y=m.length-1;y>=0&&m[y]==="";y--);return p>y?[]:m.slice(p,y-p+1)}for(var f=n(t.split("/")),v=n(a.split("/")),u=Math.min(f.length,v.length),o=u,c=0;c<u;c++)if(f[c]!==v[c]){o=c;break}for(var _=[],c=o;c<f.length;c++)_.push("..");return _=_.concat(v.slice(o)),_.join("/")}};function Je(t,a,n){var f=n>0?n:Pe(t)+1,v=new Array(f),u=Xe(t,v,0,v.length);return a&&(v.length=u),v}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(t,a){Se.ttys[t]={input:[],output:[],ops:a},e.registerDevice(t,Se.stream_ops)},stream_ops:{open:function(t){var a=Se.ttys[t.node.rdev];if(!a)throw new e.ErrnoError(43);t.tty=a,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,a,n,f,v){if(!t.tty||!t.tty.ops.get_char)throw new e.ErrnoError(60);for(var u=0,o=0;o<f;o++){var c;try{c=t.tty.ops.get_char(t.tty)}catch{throw new e.ErrnoError(29)}if(c===void 0&&u===0)throw new e.ErrnoError(6);if(c==null)break;u++,a[n+o]=c}return u&&(t.node.timestamp=Date.now()),u},write:function(t,a,n,f,v){if(!t.tty||!t.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var u=0;u<f;u++)t.tty.ops.put_char(t.tty,a[n+u])}catch{throw new e.ErrnoError(29)}return f&&(t.node.timestamp=Date.now()),u}},default_tty_ops:{get_char:function(t){if(!t.input.length){var a=null;if(Z){var n=256,f=Buffer.alloc(n),v=0;try{v=V.readSync(process.stdin.fd,f,0,n,-1)}catch(u){if(u.toString().includes("EOF"))v=0;else throw u}v>0?a=f.slice(0,v).toString("utf-8"):a=null}else typeof window<"u"&&typeof window.prompt=="function"?(a=window.prompt("Input: "),a!==null&&(a+=`
|
|
17
17
|
`)):typeof readline=="function"&&(a=readline(),a!==null&&(a+=`
|
|
18
18
|
`));if(!a)return null;t.input=Je(a,!0)}return t.input.shift()},put_char:function(t,a){a===null||a===10?(Qe(We(t.output,0)),t.output=[]):a!=0&&t.output.push(a)},fsync:function(t){t.output&&t.output.length>0&&(Qe(We(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,a){a===null||a===10?(ce(We(t.output,0)),t.output=[]):a!=0&&t.output.push(a)},fsync:function(t){t.output&&t.output.length>0&&(ce(We(t.output,0)),t.output=[])}}};function Pr(t,a){return de.fill(0,t,t+a),t}function ro(t,a){return Math.ceil(t/a)*a}function Rr(t){t=ro(t,65536);var a=tr(65536,t);return a?Pr(a,t):0}var L={ops_table:null,mount:function(t){return L.createNode(null,"/",16895,0)},createNode:function(t,a,n,f){if(e.isBlkdev(n)||e.isFIFO(n))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var v=e.createNode(t,a,n,f);return e.isDir(v.mode)?(v.node_ops=L.ops_table.dir.node,v.stream_ops=L.ops_table.dir.stream,v.contents={}):e.isFile(v.mode)?(v.node_ops=L.ops_table.file.node,v.stream_ops=L.ops_table.file.stream,v.usedBytes=0,v.contents=null):e.isLink(v.mode)?(v.node_ops=L.ops_table.link.node,v.stream_ops=L.ops_table.link.stream):e.isChrdev(v.mode)&&(v.node_ops=L.ops_table.chrdev.node,v.stream_ops=L.ops_table.chrdev.stream),v.timestamp=Date.now(),t&&(t.contents[a]=v,t.timestamp=v.timestamp),v},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,a){var n=t.contents?t.contents.length:0;if(!(n>=a)){var f=1024*1024;a=Math.max(a,n*(n<f?2:1.125)>>>0),n!=0&&(a=Math.max(a,256));var v=t.contents;t.contents=new Uint8Array(a),t.usedBytes>0&&t.contents.set(v.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,a){if(t.usedBytes!=a)if(a==0)t.contents=null,t.usedBytes=0;else{var n=t.contents;t.contents=new Uint8Array(a),n&&t.contents.set(n.subarray(0,Math.min(a,t.usedBytes))),t.usedBytes=a}},node_ops:{getattr:function(t){var a={};return a.dev=e.isChrdev(t.mode)?t.id:1,a.ino=t.id,a.mode=t.mode,a.nlink=1,a.uid=0,a.gid=0,a.rdev=t.rdev,e.isDir(t.mode)?a.size=4096:e.isFile(t.mode)?a.size=t.usedBytes:e.isLink(t.mode)?a.size=t.link.length:a.size=0,a.atime=new Date(t.timestamp),a.mtime=new Date(t.timestamp),a.ctime=new Date(t.timestamp),a.blksize=4096,a.blocks=Math.ceil(a.size/a.blksize),a},setattr:function(t,a){a.mode!==void 0&&(t.mode=a.mode),a.timestamp!==void 0&&(t.timestamp=a.timestamp),a.size!==void 0&&L.resizeFileStorage(t,a.size)},lookup:function(t,a){throw e.genericErrors[44]},mknod:function(t,a,n,f){return L.createNode(t,a,n,f)},rename:function(t,a,n){if(e.isDir(t.mode)){var f;try{f=e.lookupNode(a,n)}catch{}if(f)for(var v in f.contents)throw new e.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=n,a.contents[n]=t,a.timestamp=t.parent.timestamp,t.parent=a},unlink:function(t,a){delete t.contents[a],t.timestamp=Date.now()},rmdir:function(t,a){var n=e.lookupNode(t,a);for(var f in n.contents)throw new e.ErrnoError(55);delete t.contents[a],t.timestamp=Date.now()},readdir:function(t){var a=[".",".."];for(var n in t.contents)t.contents.hasOwnProperty(n)&&a.push(n);return a},symlink:function(t,a,n){var f=L.createNode(t,a,41471,0);return f.link=n,f},readlink:function(t){if(!e.isLink(t.mode))throw new e.ErrnoError(28);return t.link}},stream_ops:{read:function(t,a,n,f,v){var u=t.node.contents;if(v>=t.node.usedBytes)return 0;var o=Math.min(t.node.usedBytes-v,f);if(o>8&&u.subarray)a.set(u.subarray(v,v+o),n);else for(var c=0;c<o;c++)a[n+c]=u[v+c];return o},write:function(t,a,n,f,v,u){if(a.buffer===$.buffer&&(u=!1),!f)return 0;var o=t.node;if(o.timestamp=Date.now(),a.subarray&&(!o.contents||o.contents.subarray)){if(u)return o.contents=a.subarray(n,n+f),o.usedBytes=f,f;if(o.usedBytes===0&&v===0)return o.contents=a.slice(n,n+f),o.usedBytes=f,f;if(v+f<=o.usedBytes)return o.contents.set(a.subarray(n,n+f),v),f}if(L.expandFileStorage(o,v+f),o.contents.subarray&&a.subarray)o.contents.set(a.subarray(n,n+f),v);else for(var c=0;c<f;c++)o.contents[v+c]=a[n+c];return o.usedBytes=Math.max(o.usedBytes,v+f),f},llseek:function(t,a,n){var f=a;if(n===1?f+=t.position:n===2&&e.isFile(t.node.mode)&&(f+=t.node.usedBytes),f<0)throw new e.ErrnoError(28);return f},allocate:function(t,a,n){L.expandFileStorage(t.node,a+n),t.node.usedBytes=Math.max(t.node.usedBytes,a+n)},mmap:function(t,a,n,f,v){if(!e.isFile(t.node.mode))throw new e.ErrnoError(43);var u,o,c=t.node.contents;if(!(v&2)&&c.buffer===Cr)o=!1,u=c.byteOffset;else{if((n>0||n+a<c.length)&&(c.subarray?c=c.subarray(n,n+a):c=Array.prototype.slice.call(c,n,n+a)),o=!0,u=Rr(a),!u)throw new e.ErrnoError(48);$.set(c,u)}return{ptr:u,allocated:o}},msync:function(t,a,n,f,v){return L.stream_ops.write(t,a,0,f,n,!1),0}}};function to(t,a,n,f){var v=f?"":"al "+t;nr(t,u=>{Ne(u,'Loading data file "'+t+'" failed (no arrayBuffer).'),a(new Uint8Array(u)),v&&Ze(v)},u=>{if(n)n();else throw'Loading data file "'+t+'" failed.'}),v&&vr(v)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var t=process.binding("constants");t.fs&&(t=t.fs),M.flagsForNodeMap={1024:t.O_APPEND,64:t.O_CREAT,128:t.O_EXCL,256:t.O_NOCTTY,0:t.O_RDONLY,2:t.O_RDWR,4096:t.O_SYNC,512:t.O_TRUNC,1:t.O_WRONLY,131072:t.O_NOFOLLOW}},convertNodeCode:t=>{var a=t.code;return yt[a]},mount:t=>M.createNode(null,"/",M.getMode(t.opts.root),0),createNode:(t,a,n,f)=>{if(!e.isDir(n)&&!e.isFile(n)&&!e.isLink(n))throw new e.ErrnoError(28);var v=e.createNode(t,a,n);return v.node_ops=M.node_ops,v.stream_ops=M.stream_ops,v},getMode:t=>{var a;try{a=V.lstatSync(t),M.isWindows&&(a.mode=a.mode|(a.mode&292)>>2)}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}return a.mode},realPath:t=>{for(var a=[];t.parent!==t;)a.push(t.name),t=t.parent;return a.push(t.mount.opts.root),a.reverse(),U.join.apply(null,a)},flagsForNode:t=>{t&=-2097153,t&=-2049,t&=-32769,t&=-524289,t&=-65537;var a=0;for(var n in M.flagsForNodeMap)t&n&&(a|=M.flagsForNodeMap[n],t^=n);if(t)throw new e.ErrnoError(28);return a},node_ops:{getattr:t=>{var a=M.realPath(t),n;try{n=V.lstatSync(a)}catch(f){throw f.code?new e.ErrnoError(M.convertNodeCode(f)):f}return M.isWindows&&!n.blksize&&(n.blksize=4096),M.isWindows&&!n.blocks&&(n.blocks=(n.size+n.blksize-1)/n.blksize|0),{dev:n.dev,ino:n.ino,mode:n.mode,nlink:n.nlink,uid:n.uid,gid:n.gid,rdev:n.rdev,size:n.size,atime:n.atime,mtime:n.mtime,ctime:n.ctime,blksize:n.blksize,blocks:n.blocks}},setattr:(t,a)=>{var n=M.realPath(t);try{if(a.mode!==void 0&&(V.chmodSync(n,a.mode),t.mode=a.mode),a.timestamp!==void 0){var f=new Date(a.timestamp);V.utimesSync(n,f,f)}a.size!==void 0&&V.truncateSync(n,a.size)}catch(v){throw v.code?new e.ErrnoError(M.convertNodeCode(v)):v}},lookup:(t,a)=>{var n=U.join2(M.realPath(t),a),f=M.getMode(n);return M.createNode(t,a,f)},mknod:(t,a,n,f)=>{var v=M.createNode(t,a,n,f),u=M.realPath(v);try{e.isDir(v.mode)?V.mkdirSync(u,v.mode):V.writeFileSync(u,"",{mode:v.mode})}catch(o){throw o.code?new e.ErrnoError(M.convertNodeCode(o)):o}return v},rename:(t,a,n)=>{var f=M.realPath(t),v=U.join2(M.realPath(a),n);try{V.renameSync(f,v)}catch(u){throw u.code?new e.ErrnoError(M.convertNodeCode(u)):u}t.name=n},unlink:(t,a)=>{var n=U.join2(M.realPath(t),a);try{V.unlinkSync(n)}catch(f){throw f.code?new e.ErrnoError(M.convertNodeCode(f)):f}},rmdir:(t,a)=>{var n=U.join2(M.realPath(t),a);try{V.rmdirSync(n)}catch(f){throw f.code?new e.ErrnoError(M.convertNodeCode(f)):f}},readdir:t=>{var a=M.realPath(t);try{return V.readdirSync(a)}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}},symlink:(t,a,n)=>{var f=U.join2(M.realPath(t),a);try{V.symlinkSync(n,f)}catch(v){throw v.code?new e.ErrnoError(M.convertNodeCode(v)):v}},readlink:t=>{var a=M.realPath(t);try{return a=V.readlinkSync(a),a=Le.relative(Le.resolve(t.mount.opts.root),a),a}catch(n){throw n.code?n.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(n)):n}}},stream_ops:{open:t=>{var a=M.realPath(t.node);try{e.isFile(t.node.mode)&&(t.nfd=V.openSync(a,M.flagsForNode(t.flags)))}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}},close:t=>{try{e.isFile(t.node.mode)&&t.nfd&&V.closeSync(t.nfd)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}},read:(t,a,n,f,v)=>{if(f===0)return 0;try{return V.readSync(t.nfd,Buffer.from(a.buffer),n,f,v)}catch(u){throw new e.ErrnoError(M.convertNodeCode(u))}},write:(t,a,n,f,v)=>{try{return V.writeSync(t.nfd,Buffer.from(a.buffer),n,f,v)}catch(u){throw new e.ErrnoError(M.convertNodeCode(u))}},llseek:(t,a,n)=>{var f=a;if(n===1)f+=t.position;else if(n===2&&e.isFile(t.node.mode))try{var v=V.fstatSync(t.nfd);f+=v.size}catch(u){throw new e.ErrnoError(M.convertNodeCode(u))}if(f<0)throw new e.ErrnoError(28);return f},mmap:(t,a,n,f,v)=>{if(!e.isFile(t.node.mode))throw new e.ErrnoError(43);var u=Rr(a);return M.stream_ops.read(t,$,u,a,n),{ptr:u,allocated:!0}},msync:(t,a,n,f,v)=>(M.stream_ops.write(t,a,0,f,n,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(t,a={})=>{if(t=ge.resolve(e.cwd(),t),!t)return{path:"",node:null};var n={follow_mount:!0,recurse_count:0};if(a=Object.assign(n,a),a.recurse_count>8)throw new e.ErrnoError(32);for(var f=U.normalizeArray(t.split("/").filter(y=>!!y),!1),v=e.root,u="/",o=0;o<f.length;o++){var c=o===f.length-1;if(c&&a.parent)break;if(v=e.lookupNode(v,f[o]),u=U.join2(u,f[o]),e.isMountpoint(v)&&(!c||c&&a.follow_mount)&&(v=v.mounted.root),!c||a.follow)for(var _=0;e.isLink(v.mode);){var m=e.readlink(u);u=ge.resolve(U.dirname(u),m);var p=e.lookupPath(u,{recurse_count:a.recurse_count+1});if(v=p.node,_++>40)throw new e.ErrnoError(32)}}return{path:u,node:v}},getPath:t=>{for(var a;;){if(e.isRoot(t)){var n=t.mount.mountpoint;return a?n[n.length-1]!=="/"?n+"/"+a:n+a:n}a=a?t.name+"/"+a:t.name,t=t.parent}},hashName:(t,a)=>{for(var n=0,f=0;f<a.length;f++)n=(n<<5)-n+a.charCodeAt(f)|0;return(t+n>>>0)%e.nameTable.length},hashAddNode:t=>{var a=e.hashName(t.parent.id,t.name);t.name_next=e.nameTable[a],e.nameTable[a]=t},hashRemoveNode:t=>{var a=e.hashName(t.parent.id,t.name);if(e.nameTable[a]===t)e.nameTable[a]=t.name_next;else for(var n=e.nameTable[a];n;){if(n.name_next===t){n.name_next=t.name_next;break}n=n.name_next}},lookupNode:(t,a)=>{var n=e.mayLookup(t);if(n)throw new e.ErrnoError(n,t);for(var f=e.hashName(t.id,a),v=e.nameTable[f];v;v=v.name_next){var u=v.name;if(v.parent.id===t.id&&u===a)return v}return e.lookup(t,a)},createNode:(t,a,n,f)=>{var v=new e.FSNode(t,a,n,f);return e.hashAddNode(v),v},destroyNode:t=>{e.hashRemoveNode(t)},isRoot:t=>t===t.parent,isMountpoint:t=>!!t.mounted,isFile:t=>(t&61440)===32768,isDir:t=>(t&61440)===16384,isLink:t=>(t&61440)===40960,isChrdev:t=>(t&61440)===8192,isBlkdev:t=>(t&61440)===24576,isFIFO:t=>(t&61440)===4096,isSocket:t=>(t&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:t=>{var a=e.flagModes[t];if(typeof a>"u")throw new Error("Unknown file open mode: "+t);return a},flagsToPermissionString:t=>{var a=["r","w","rw"][t&3];return t&512&&(a+="w"),a},nodePermissions:(t,a)=>e.ignorePermissions?0:a.includes("r")&&!(t.mode&292)||a.includes("w")&&!(t.mode&146)||a.includes("x")&&!(t.mode&73)?2:0,mayLookup:t=>{var a=e.nodePermissions(t,"x");return a||(t.node_ops.lookup?0:2)},mayCreate:(t,a)=>{try{var n=e.lookupNode(t,a);return 20}catch{}return e.nodePermissions(t,"wx")},mayDelete:(t,a,n)=>{var f;try{f=e.lookupNode(t,a)}catch(u){return u.errno}var v=e.nodePermissions(t,"wx");if(v)return v;if(n){if(!e.isDir(f.mode))return 54;if(e.isRoot(f)||e.getPath(f)===e.cwd())return 10}else if(e.isDir(f.mode))return 31;return 0},mayOpen:(t,a)=>t?e.isLink(t.mode)?32:e.isDir(t.mode)&&(e.flagsToPermissionString(a)!=="r"||a&512)?31:e.nodePermissions(t,e.flagsToPermissionString(a)):44,MAX_OPEN_FDS:4096,nextfd:(t=0,a=e.MAX_OPEN_FDS)=>{for(var n=t;n<=a;n++)if(!e.streams[n])return n;throw new e.ErrnoError(33)},getStream:t=>e.streams[t],createStream:(t,a,n)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(v){this.node=v}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(v){this.shared.flags=v}},position:{get:function(){return this.shared.position},set:function(v){this.shared.position=v}}})),t=Object.assign(new e.FSStream,t);var f=e.nextfd(a,n);return t.fd=f,e.streams[f]=t,t},closeStream:t=>{e.streams[t]=null},chrdev_stream_ops:{open:t=>{var a=e.getDevice(t.node.rdev);t.stream_ops=a.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:()=>{throw new e.ErrnoError(70)}},major:t=>t>>8,minor:t=>t&255,makedev:(t,a)=>t<<8|a,registerDevice:(t,a)=>{e.devices[t]={stream_ops:a}},getDevice:t=>e.devices[t],getMounts:t=>{for(var a=[],n=[t];n.length;){var f=n.pop();a.push(f),n.push.apply(n,f.mounts)}return a},syncfs:(t,a)=>{typeof t=="function"&&(a=t,t=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=e.getMounts(e.root.mount),f=0;function v(o){return e.syncFSRequests--,a(o)}function u(o){if(o)return u.errored?void 0:(u.errored=!0,v(o));++f>=n.length&&v(null)}n.forEach(o=>{if(!o.type.syncfs)return u(null);o.type.syncfs(o,t,u)})},mount:(t,a,n)=>{var f=n==="/",v=!n,u;if(f&&e.root)throw new e.ErrnoError(10);if(!f&&!v){var o=e.lookupPath(n,{follow_mount:!1});if(n=o.path,u=o.node,e.isMountpoint(u))throw new e.ErrnoError(10);if(!e.isDir(u.mode))throw new e.ErrnoError(54)}var c={type:t,opts:a,mountpoint:n,mounts:[]},_=t.mount(c);return _.mount=c,c.root=_,f?e.root=_:u&&(u.mounted=c,u.mount&&u.mount.mounts.push(c)),_},unmount:t=>{var a=e.lookupPath(t,{follow_mount:!1});if(!e.isMountpoint(a.node))throw new e.ErrnoError(28);var n=a.node,f=n.mounted,v=e.getMounts(f);Object.keys(e.nameTable).forEach(o=>{for(var c=e.nameTable[o];c;){var _=c.name_next;v.includes(c.mount)&&e.destroyNode(c),c=_}}),n.mounted=null;var u=n.mount.mounts.indexOf(f);n.mount.mounts.splice(u,1)},lookup:(t,a)=>t.node_ops.lookup(t,a),mknod:(t,a,n)=>{var f=e.lookupPath(t,{parent:!0}),v=f.node,u=U.basename(t);if(!u||u==="."||u==="..")throw new e.ErrnoError(28);var o=e.mayCreate(v,u);if(o)throw new e.ErrnoError(o);if(!v.node_ops.mknod)throw new e.ErrnoError(63);return v.node_ops.mknod(v,u,a,n)},create:(t,a)=>(a=a!==void 0?a:438,a&=4095,a|=32768,e.mknod(t,a,0)),mkdir:(t,a)=>(a=a!==void 0?a:511,a&=1023,a|=16384,e.mknod(t,a,0)),mkdirTree:(t,a)=>{for(var n=t.split("/"),f="",v=0;v<n.length;++v)if(n[v]){f+="/"+n[v];try{e.mkdir(f,a)}catch(u){if(u.errno!=20)throw u}}},mkdev:(t,a,n)=>(typeof n>"u"&&(n=a,a=438),a|=8192,e.mknod(t,a,n)),symlink:(t,a)=>{if(!ge.resolve(t))throw new e.ErrnoError(44);var n=e.lookupPath(a,{parent:!0}),f=n.node;if(!f)throw new e.ErrnoError(44);var v=U.basename(a),u=e.mayCreate(f,v);if(u)throw new e.ErrnoError(u);if(!f.node_ops.symlink)throw new e.ErrnoError(63);return f.node_ops.symlink(f,v,t)},rename:(t,a)=>{var n=U.dirname(t),f=U.dirname(a),v=U.basename(t),u=U.basename(a),o,c,_;if(o=e.lookupPath(t,{parent:!0}),c=o.node,o=e.lookupPath(a,{parent:!0}),_=o.node,!c||!_)throw new e.ErrnoError(44);if(c.mount!==_.mount)throw new e.ErrnoError(75);var m=e.lookupNode(c,v),p=ge.relative(t,f);if(p.charAt(0)!==".")throw new e.ErrnoError(28);if(p=ge.relative(a,n),p.charAt(0)!==".")throw new e.ErrnoError(55);var y;try{y=e.lookupNode(_,u)}catch{}if(m!==y){var E=e.isDir(m.mode),S=e.mayDelete(c,v,E);if(S)throw new e.ErrnoError(S);if(S=y?e.mayDelete(_,u,E):e.mayCreate(_,u),S)throw new e.ErrnoError(S);if(!c.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(m)||y&&e.isMountpoint(y))throw new e.ErrnoError(10);if(_!==c&&(S=e.nodePermissions(c,"w"),S))throw new e.ErrnoError(S);e.hashRemoveNode(m);try{c.node_ops.rename(m,_,u)}catch(b){throw b}finally{e.hashAddNode(m)}}},rmdir:t=>{var a=e.lookupPath(t,{parent:!0}),n=a.node,f=U.basename(t),v=e.lookupNode(n,f),u=e.mayDelete(n,f,!0);if(u)throw new e.ErrnoError(u);if(!n.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(v))throw new e.ErrnoError(10);n.node_ops.rmdir(n,f),e.destroyNode(v)},readdir:t=>{var a=e.lookupPath(t,{follow:!0}),n=a.node;if(!n.node_ops.readdir)throw new e.ErrnoError(54);return n.node_ops.readdir(n)},unlink:t=>{var a=e.lookupPath(t,{parent:!0}),n=a.node;if(!n)throw new e.ErrnoError(44);var f=U.basename(t),v=e.lookupNode(n,f),u=e.mayDelete(n,f,!1);if(u)throw new e.ErrnoError(u);if(!n.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(v))throw new e.ErrnoError(10);n.node_ops.unlink(n,f),e.destroyNode(v)},readlink:t=>{var a=e.lookupPath(t),n=a.node;if(!n)throw new e.ErrnoError(44);if(!n.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(n.parent),n.node_ops.readlink(n))},stat:(t,a)=>{var n=e.lookupPath(t,{follow:!a}),f=n.node;if(!f)throw new e.ErrnoError(44);if(!f.node_ops.getattr)throw new e.ErrnoError(63);return f.node_ops.getattr(f)},lstat:t=>e.stat(t,!0),chmod:(t,a,n)=>{var f;if(typeof t=="string"){var v=e.lookupPath(t,{follow:!n});f=v.node}else f=t;if(!f.node_ops.setattr)throw new e.ErrnoError(63);f.node_ops.setattr(f,{mode:a&4095|f.mode&-4096,timestamp:Date.now()})},lchmod:(t,a)=>{e.chmod(t,a,!0)},fchmod:(t,a)=>{var n=e.getStream(t);if(!n)throw new e.ErrnoError(8);e.chmod(n.node,a)},chown:(t,a,n,f)=>{var v;if(typeof t=="string"){var u=e.lookupPath(t,{follow:!f});v=u.node}else v=t;if(!v.node_ops.setattr)throw new e.ErrnoError(63);v.node_ops.setattr(v,{timestamp:Date.now()})},lchown:(t,a,n)=>{e.chown(t,a,n,!0)},fchown:(t,a,n)=>{var f=e.getStream(t);if(!f)throw new e.ErrnoError(8);e.chown(f.node,a,n)},truncate:(t,a)=>{if(a<0)throw new e.ErrnoError(28);var n;if(typeof t=="string"){var f=e.lookupPath(t,{follow:!0});n=f.node}else n=t;if(!n.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(n.mode))throw new e.ErrnoError(31);if(!e.isFile(n.mode))throw new e.ErrnoError(28);var v=e.nodePermissions(n,"w");if(v)throw new e.ErrnoError(v);n.node_ops.setattr(n,{size:a,timestamp:Date.now()})},ftruncate:(t,a)=>{var n=e.getStream(t);if(!n)throw new e.ErrnoError(8);if(!(n.flags&2097155))throw new e.ErrnoError(28);e.truncate(n.node,a)},utime:(t,a,n)=>{var f=e.lookupPath(t,{follow:!0}),v=f.node;v.node_ops.setattr(v,{timestamp:Math.max(a,n)})},open:(t,a,n)=>{if(t==="")throw new e.ErrnoError(44);a=typeof a=="string"?e.modeStringToFlags(a):a,n=typeof n>"u"?438:n,a&64?n=n&4095|32768:n=0;var f;if(typeof t=="object")f=t;else{t=U.normalize(t);try{var v=e.lookupPath(t,{follow:!(a&131072)});f=v.node}catch{}}var u=!1;if(a&64)if(f){if(a&128)throw new e.ErrnoError(20)}else f=e.mknod(t,n,0),u=!0;if(!f)throw new e.ErrnoError(44);if(e.isChrdev(f.mode)&&(a&=-513),a&65536&&!e.isDir(f.mode))throw new e.ErrnoError(54);if(!u){var o=e.mayOpen(f,a);if(o)throw new e.ErrnoError(o)}a&512&&!u&&e.truncate(f,0),a&=-131713;var c=e.createStream({node:f,path:e.getPath(f),flags:a,seekable:!0,position:0,stream_ops:f.stream_ops,ungotten:[],error:!1});return c.stream_ops.open&&c.stream_ops.open(c),l.logReadFiles&&!(a&1)&&(e.readFiles||(e.readFiles={}),t in e.readFiles||(e.readFiles[t]=1)),c},close:t=>{if(e.isClosed(t))throw new e.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(a){throw a}finally{e.closeStream(t.fd)}t.fd=null},isClosed:t=>t.fd===null,llseek:(t,a,n)=>{if(e.isClosed(t))throw new e.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new e.ErrnoError(70);if(n!=0&&n!=1&&n!=2)throw new e.ErrnoError(28);return t.position=t.stream_ops.llseek(t,a,n),t.ungotten=[],t.position},read:(t,a,n,f,v)=>{if(f<0||v<0)throw new e.ErrnoError(28);if(e.isClosed(t))throw new e.ErrnoError(8);if((t.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(t.node.mode))throw new e.ErrnoError(31);if(!t.stream_ops.read)throw new e.ErrnoError(28);var u=typeof v<"u";if(!u)v=t.position;else if(!t.seekable)throw new e.ErrnoError(70);var o=t.stream_ops.read(t,a,n,f,v);return u||(t.position+=o),o},write:(t,a,n,f,v,u)=>{if(f<0||v<0)throw new e.ErrnoError(28);if(e.isClosed(t))throw new e.ErrnoError(8);if(!(t.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(t.node.mode))throw new e.ErrnoError(31);if(!t.stream_ops.write)throw new e.ErrnoError(28);t.seekable&&t.flags&1024&&e.llseek(t,0,2);var o=typeof v<"u";if(!o)v=t.position;else if(!t.seekable)throw new e.ErrnoError(70);var c=t.stream_ops.write(t,a,n,f,v,u);return o||(t.position+=c),c},allocate:(t,a,n)=>{if(e.isClosed(t))throw new e.ErrnoError(8);if(a<0||n<=0)throw new e.ErrnoError(28);if(!(t.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(t.node.mode)&&!e.isDir(t.node.mode))throw new e.ErrnoError(43);if(!t.stream_ops.allocate)throw new e.ErrnoError(138);t.stream_ops.allocate(t,a,n)},mmap:(t,a,n,f,v)=>{if(f&2&&!(v&2)&&(t.flags&2097155)!==2)throw new e.ErrnoError(2);if((t.flags&2097155)===1)throw new e.ErrnoError(2);if(!t.stream_ops.mmap)throw new e.ErrnoError(43);return t.stream_ops.mmap(t,a,n,f,v)},msync:(t,a,n,f,v)=>t.stream_ops.msync?t.stream_ops.msync(t,a,n,f,v):0,munmap:t=>0,ioctl:(t,a,n)=>{if(!t.stream_ops.ioctl)throw new e.ErrnoError(59);return t.stream_ops.ioctl(t,a,n)},readFile:(t,a={})=>{if(a.flags=a.flags||0,a.encoding=a.encoding||"binary",a.encoding!=="utf8"&&a.encoding!=="binary")throw new Error('Invalid encoding type "'+a.encoding+'"');var n,f=e.open(t,a.flags),v=e.stat(t),u=v.size,o=new Uint8Array(u);return e.read(f,o,0,u,0),a.encoding==="utf8"?n=We(o,0):a.encoding==="binary"&&(n=o),e.close(f),n},writeFile:(t,a,n={})=>{n.flags=n.flags||577;var f=e.open(t,n.flags,n.mode);if(typeof a=="string"){var v=new Uint8Array(Pe(a)+1),u=Xe(a,v,0,v.length);e.write(f,v,0,u,void 0,n.canOwn)}else if(ArrayBuffer.isView(a))e.write(f,a,0,a.byteLength,void 0,n.canOwn);else throw new Error("Unsupported data type");e.close(f)},cwd:()=>e.currentPath,chdir:t=>{var a=e.lookupPath(t,{follow:!0});if(a.node===null)throw new e.ErrnoError(44);if(!e.isDir(a.node.mode))throw new e.ErrnoError(54);var n=e.nodePermissions(a.node,"x");if(n)throw new e.ErrnoError(n);e.currentPath=a.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(a,n,f,v,u)=>v}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var t=eo();e.createDevice("/dev","random",t),e.createDevice("/dev","urandom",t),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var t=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var a=e.createNode(t,"fd",16895,73);return a.node_ops={lookup:(n,f)=>{var v=+f,u=e.getStream(v);if(!u)throw new e.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>u.path}};return o.parent=o,o}},a}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var t=e.open("/dev/stdin",0),a=e.open("/dev/stdout",1),n=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(a,n){this.node=n,this.setErrno=function(f){this.errno=f},this.setErrno(a),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(t=>{e.genericErrors[t]=new e.ErrnoError(t),e.genericErrors[t].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(t,a,n)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=t||l.stdin,l.stdout=a||l.stdout,l.stderr=n||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,Ur(0);for(var t=0;t<e.streams.length;t++){var a=e.streams[t];a&&e.close(a)}},getMode:(t,a)=>{var n=0;return t&&(n|=365),a&&(n|=146),n},findObject:(t,a)=>{var n=e.analyzePath(t,a);return n.exists?n.object:null},analyzePath:(t,a)=>{try{var n=e.lookupPath(t,{follow:!a});t=n.path}catch{}var f={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=e.lookupPath(t,{parent:!0});f.parentExists=!0,f.parentPath=n.path,f.parentObject=n.node,f.name=U.basename(t),n=e.lookupPath(t,{follow:!a}),f.exists=!0,f.path=n.path,f.object=n.node,f.name=n.node.name,f.isRoot=n.path==="/"}catch(v){f.error=v.errno}return f},createPath:(t,a,n,f)=>{t=typeof t=="string"?t:e.getPath(t);for(var v=a.split("/").reverse();v.length;){var u=v.pop();if(u){var o=U.join2(t,u);try{e.mkdir(o)}catch{}t=o}}return o},createFile:(t,a,n,f,v)=>{var u=U.join2(typeof t=="string"?t:e.getPath(t),a),o=e.getMode(f,v);return e.create(u,o)},createDataFile:(t,a,n,f,v,u)=>{var o=a;t&&(t=typeof t=="string"?t:e.getPath(t),o=a?U.join2(t,a):t);var c=e.getMode(f,v),_=e.create(o,c);if(n){if(typeof n=="string"){for(var m=new Array(n.length),p=0,y=n.length;p<y;++p)m[p]=n.charCodeAt(p);n=m}e.chmod(_,c|146);var E=e.open(_,577);e.write(E,n,0,n.length,0,u),e.close(E),e.chmod(_,c)}return _},createDevice:(t,a,n,f)=>{var v=U.join2(typeof t=="string"?t:e.getPath(t),a),u=e.getMode(!!n,!!f);e.createDevice.major||(e.createDevice.major=64);var o=e.makedev(e.createDevice.major++,0);return e.registerDevice(o,{open:c=>{c.seekable=!1},close:c=>{f&&f.buffer&&f.buffer.length&&f(10)},read:(c,_,m,p,y)=>{for(var E=0,S=0;S<p;S++){var b;try{b=n()}catch{throw new e.ErrnoError(29)}if(b===void 0&&E===0)throw new e.ErrnoError(6);if(b==null)break;E++,_[m+S]=b}return E&&(c.node.timestamp=Date.now()),E},write:(c,_,m,p,y)=>{for(var E=0;E<p;E++)try{f(_[m+E])}catch{throw new e.ErrnoError(29)}return p&&(c.node.timestamp=Date.now()),E}}),e.mkdev(v,u,o)},forceLoadFile:t=>{if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{t.contents=Je(Ye(t.url),!0),t.usedBytes=t.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(t,a,n,f,v)=>{function u(){this.lengthKnown=!1,this.chunks=[]}if(u.prototype.get=function(S){if(!(S>this.length-1||S<0)){var b=S%this.chunkSize,k=S/this.chunkSize|0;return this.getter(k)[b]}},u.prototype.setDataGetter=function(S){this.getter=S},u.prototype.cacheLength=function(){var S=new XMLHttpRequest;if(S.open("HEAD",n,!1),S.send(null),!(S.status>=200&&S.status<300||S.status===304))throw new Error("Couldn't load "+n+". Status: "+S.status);var b=Number(S.getResponseHeader("Content-length")),k,D=(k=S.getResponseHeader("Accept-Ranges"))&&k==="bytes",T=(k=S.getResponseHeader("Content-Encoding"))&&k==="gzip",C=1024*1024;D||(C=b);var A=(z,K)=>{if(z>K)throw new Error("invalid range ("+z+", "+K+") or no bytes requested!");if(K>b-1)throw new Error("only "+b+" bytes available! programmer error!");var B=new XMLHttpRequest;if(B.open("GET",n,!1),b!==C&&B.setRequestHeader("Range","bytes="+z+"-"+K),B.responseType="arraybuffer",B.overrideMimeType&&B.overrideMimeType("text/plain; charset=x-user-defined"),B.send(null),!(B.status>=200&&B.status<300||B.status===304))throw new Error("Couldn't load "+n+". Status: "+B.status);return B.response!==void 0?new Uint8Array(B.response||[]):Je(B.responseText||"",!0)},I=this;I.setDataGetter(z=>{var K=z*C,B=(z+1)*C-1;if(B=Math.min(B,b-1),typeof I.chunks[z]>"u"&&(I.chunks[z]=A(K,B)),typeof I.chunks[z]>"u")throw new Error("doXHR failed!");return I.chunks[z]}),(T||!b)&&(C=b=1,b=this.getter(0).length,C=b,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=b,this._chunkSize=C,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new u;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var c={isDevice:!1,contents:o}}else var c={isDevice:!1,url:n};var _=e.createFile(t,a,c,f,v);c.contents?_.contents=c.contents:c.url&&(_.contents=null,_.url=c.url),Object.defineProperties(_,{usedBytes:{get:function(){return this.contents.length}}});var m={},p=Object.keys(_.stream_ops);p.forEach(E=>{var S=_.stream_ops[E];m[E]=function(){return e.forceLoadFile(_),S.apply(null,arguments)}});function y(E,S,b,k,D){var T=E.node.contents;if(D>=T.length)return 0;var C=Math.min(T.length-D,k);if(T.slice)for(var A=0;A<C;A++)S[b+A]=T[D+A];else for(var A=0;A<C;A++)S[b+A]=T.get(D+A);return C}return m.read=(E,S,b,k,D)=>(e.forceLoadFile(_),y(E,S,b,k,D)),m.mmap=(E,S,b,k,D)=>{e.forceLoadFile(_);var T=Rr(S);if(!T)throw new e.ErrnoError(48);return y(E,$,T,S,b),{ptr:T,allocated:!0}},_.stream_ops=m,_},createPreloadedFile:(t,a,n,f,v,u,o,c,_,m)=>{var p=a?ge.resolve(U.join2(t,a)):t,y="cp "+p;function E(S){function b(k){m&&m(),c||e.createDataFile(t,a,k,f,v,_),u&&u(),Ze(y)}Browser.handledByPreloadPlugin(S,p,b,()=>{o&&o(),Ze(y)})||b(S)}vr(y),typeof n=="string"?to(n,S=>E(S),o):E(n)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(t,a,n)=>{a=a||(()=>{}),n=n||(()=>{});var f=e.indexedDB();try{var v=f.open(e.DB_NAME(),e.DB_VERSION)}catch(u){return n(u)}v.onupgradeneeded=()=>{Qe("creating db");var u=v.result;u.createObjectStore(e.DB_STORE_NAME)},v.onsuccess=()=>{var u=v.result,o=u.transaction([e.DB_STORE_NAME],"readwrite"),c=o.objectStore(e.DB_STORE_NAME),_=0,m=0,p=t.length;function y(){m==0?a():n()}t.forEach(E=>{var S=c.put(e.analyzePath(E).object.contents,E);S.onsuccess=()=>{_++,_+m==p&&y()},S.onerror=()=>{m++,_+m==p&&y()}}),o.onerror=n},v.onerror=n},loadFilesFromDB:(t,a,n)=>{a=a||(()=>{}),n=n||(()=>{});var f=e.indexedDB();try{var v=f.open(e.DB_NAME(),e.DB_VERSION)}catch(u){return n(u)}v.onupgradeneeded=n,v.onsuccess=()=>{var u=v.result;try{var o=u.transaction([e.DB_STORE_NAME],"readonly")}catch(E){n(E);return}var c=o.objectStore(e.DB_STORE_NAME),_=0,m=0,p=t.length;function y(){m==0?a():n()}t.forEach(E=>{var S=c.get(E);S.onsuccess=()=>{e.analyzePath(E).exists&&e.unlink(E),e.createDataFile(U.dirname(E),U.basename(E),S.result,!0,!0,!0),_++,_+m==p&&y()},S.onerror=()=>{m++,_+m==p&&y()}}),o.onerror=n},v.onerror=n}},N={DEFAULT_POLLMASK:5,calculateAt:function(t,a,n){if(U.isAbs(a))return a;var f;if(t===-100)f=e.cwd();else{var v=N.getStreamFromFD(t);f=v.path}if(a.length==0){if(!n)throw new e.ErrnoError(44);return f}return U.join2(f,a)},doStat:function(t,a,n){try{var f=t(a)}catch(v){if(v&&v.node&&U.normalize(a)!==U.normalize(e.getPath(v.node)))return-54;throw v}return h[n>>2]=f.dev,h[n+8>>2]=f.ino,h[n+12>>2]=f.mode,H[n+16>>2]=f.nlink,h[n+20>>2]=f.uid,h[n+24>>2]=f.gid,h[n+28>>2]=f.rdev,q=[f.size>>>0,(P=f.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[n+40>>2]=q[0],h[n+44>>2]=q[1],h[n+48>>2]=4096,h[n+52>>2]=f.blocks,q=[Math.floor(f.atime.getTime()/1e3)>>>0,(P=Math.floor(f.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[n+56>>2]=q[0],h[n+60>>2]=q[1],H[n+64>>2]=0,q=[Math.floor(f.mtime.getTime()/1e3)>>>0,(P=Math.floor(f.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[n+72>>2]=q[0],h[n+76>>2]=q[1],H[n+80>>2]=0,q=[Math.floor(f.ctime.getTime()/1e3)>>>0,(P=Math.floor(f.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[n+88>>2]=q[0],h[n+92>>2]=q[1],H[n+96>>2]=0,q=[f.ino>>>0,(P=f.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[n+104>>2]=q[0],h[n+108>>2]=q[1],0},doMsync:function(t,a,n,f,v){if(!e.isFile(a.node.mode))throw new e.ErrnoError(43);if(f&2)return 0;var u=de.slice(t,t+n);e.msync(a,u,v,n,f)},varargs:void 0,get:function(){N.varargs+=4;var t=h[N.varargs-4>>2];return t},getStr:function(t){var a=ne(t);return a},getStreamFromFD:function(t){var a=e.getStream(t);if(!a)throw new e.ErrnoError(8);return a}};function no(t,a,n,f,v){try{for(var u=0,o=a?h[a>>2]:0,c=a?h[a+4>>2]:0,_=n?h[n>>2]:0,m=n?h[n+4>>2]:0,p=f?h[f>>2]:0,y=f?h[f+4>>2]:0,E=0,S=0,b=0,k=0,D=0,T=0,C=(a?h[a>>2]:0)|(n?h[n>>2]:0)|(f?h[f>>2]:0),A=(a?h[a+4>>2]:0)|(n?h[n+4>>2]:0)|(f?h[f+4>>2]:0),I=function(G,re,oe,le){return G<32?re&le:oe&le},z=0;z<t;z++){var K=1<<z%32;if(I(z,C,A,K)){var B=N.getStreamFromFD(z),x=N.DEFAULT_POLLMASK;B.stream_ops?.poll&&(x=B.stream_ops.poll(B)),x&1&&I(z,o,c,K)&&(z<32?E=E|K:S=S|K,u++),x&4&&I(z,_,m,K)&&(z<32?b=b|K:k=k|K,u++),x&2&&I(z,p,y,K)&&(z<32?D=D|K:T=T|K,u++)}}return a&&(h[a>>2]=E,h[a+4>>2]=S),n&&(h[n>>2]=b,h[n+4>>2]=k),f&&(h[f>>2]=D,h[f+4>>2]=T),u}catch(G){if(typeof e>"u"||!(G instanceof e.ErrnoError))throw G;return-G.errno}}var j={mount:function(t){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(a,n){return typeof n=="function"&&(this._callbacks[a]=n),this},l.websocket.emit=function(a,n){typeof this._callbacks[a]=="function"&&this._callbacks[a].call(this,n)},e.createNode(null,"/",16895,0)},createSocket:function(t,a,n){a&=-526337;var f=a==1;if(f&&n&&n!=6)throw new e.ErrnoError(66);var v={family:t,type:a,protocol:n,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},u=j.nextname(),o=e.createNode(j.root,u,49152,0);o.sock=v;var c=e.createStream({path:u,node:o,flags:2,seekable:!1,stream_ops:j.stream_ops});return v.stream=c,v},getSocket:function(t){var a=e.getStream(t);return!a||!e.isSocket(a.node.mode)?null:a.node.sock},stream_ops:{poll:function(t){var a=t.node.sock;return a.sock_ops.poll(a)},ioctl:function(t,a,n){var f=t.node.sock;return f.sock_ops.ioctl(f,a,n)},read:function(t,a,n,f,v){var u=t.node.sock,o=u.sock_ops.recvmsg(u,f);return o?(a.set(o.buffer,n),o.buffer.length):0},write:function(t,a,n,f,v){var u=t.node.sock;return u.sock_ops.sendmsg(u,a,n,f)},close:function(t){var a=t.node.sock;a.sock_ops.close(a)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(t,a,n){var f;if(typeof a=="object"&&(f=a,a=null,n=null),f)if(f._socket)a=f._socket.remoteAddress,n=f._socket.remotePort;else{var v=/ws[s]?:\/\/([^:]+):(\d+)/.exec(f.url);if(!v)throw new Error("WebSocket URL must be in the format ws(s)://address:port");a=v[1],n=parseInt(v[2],10)}else try{var u=l.websocket&&typeof l.websocket=="object",o="ws:#".replace("#","//");if(u&&(typeof l.websocket.url=="function"?o=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(o=l.websocket.url)),o==="ws://"||o==="wss://"){var c=a.split("/");o=o+c[0]+":"+n+"/"+c.slice(1).join("/")}var _="binary";u&&typeof l.websocket.subprotocol=="string"&&(_=l.websocket.subprotocol);var m=void 0;_!=="null"&&(_=_.replace(/^ +| +$/g,"").split(/ *, */),m=_),u&&l.websocket.subprotocol===null&&(_="null",m=void 0);var p;Z?p=Fn():p=WebSocket,l.websocket.decorator&&(p=l.websocket.decorator(p)),f=new p(o,m),f.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var y={addr:a,port:n,socket:f,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(t,y),j.websocket_sock_ops.handlePeerEvents(t,y),t.type===2&&typeof t.sport<"u"&&y.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(t.sport&65280)>>8,t.sport&255])),y},getPeer:function(t,a,n){return t.peers[a+":"+n]},addPeer:function(t,a){t.peers[a.addr+":"+a.port]=a},removePeer:function(t,a){delete t.peers[a.addr+":"+a.port]},handlePeerEvents:function(t,a){var n=!0,f=function(){l.websocket.emit("open",t.stream.fd);try{for(var u=a.dgram_send_queue.shift();u;)a.socket.send(u),u=a.dgram_send_queue.shift()}catch{a.socket.close()}};function v(u){if(typeof u=="string"){var o=new TextEncoder;u=o.encode(u)}else{if(Ne(u.byteLength!==void 0),u.byteLength==0)return;u=new Uint8Array(u)}var c=n;if(n=!1,c&&u.length===10&&u[0]===255&&u[1]===255&&u[2]===255&&u[3]===255&&u[4]==="p".charCodeAt(0)&&u[5]==="o".charCodeAt(0)&&u[6]==="r".charCodeAt(0)&&u[7]==="t".charCodeAt(0)){var _=u[8]<<8|u[9];j.websocket_sock_ops.removePeer(t,a),a.port=_,j.websocket_sock_ops.addPeer(t,a);return}t.recv_queue.push({addr:a.addr,port:a.port,data:u}),l.websocket.emit("message",t.stream.fd)}Z?(a.socket.on("open",f),a.socket.on("message",function(u,o){o&&v(new Uint8Array(u).buffer)}),a.socket.on("close",function(){l.websocket.emit("close",t.stream.fd)}),a.socket.on("error",function(u){t.error=14,l.websocket.emit("error",[t.stream.fd,t.error,"ECONNREFUSED: Connection refused"])})):(a.socket.onopen=f,a.socket.onclose=function(){l.websocket.emit("close",t.stream.fd)},a.socket.onmessage=function(o){v(o.data)},a.socket.onerror=function(u){t.error=14,l.websocket.emit("error",[t.stream.fd,t.error,"ECONNREFUSED: Connection refused"])})},poll:function(t){if(t.type===1&&t.server)return t.pending.length?65:0;var a=0,n=t.type===1?j.websocket_sock_ops.getPeer(t,t.daddr,t.dport):null;return(t.recv_queue.length||!n||n&&n.socket.readyState===n.socket.CLOSING||n&&n.socket.readyState===n.socket.CLOSED)&&(a|=65),(!n||n&&n.socket.readyState===n.socket.OPEN)&&(a|=4),(n&&n.socket.readyState===n.socket.CLOSING||n&&n.socket.readyState===n.socket.CLOSED)&&(a|=16),a},ioctl:function(t,a,n){switch(a){case 21531:var f=0;return t.recv_queue.length&&(f=t.recv_queue[0].data.length),h[n>>2]=f,0;default:return 28}},close:function(t){if(t.server){try{t.server.close()}catch{}t.server=null}for(var a=Object.keys(t.peers),n=0;n<a.length;n++){var f=t.peers[a[n]];try{f.socket.close()}catch{}j.websocket_sock_ops.removePeer(t,f)}return 0},bind:function(t,a,n){if(typeof t.saddr<"u"||typeof t.sport<"u")throw new e.ErrnoError(28);if(t.saddr=a,t.sport=n,t.type===2){t.server&&(t.server.close(),t.server=null);try{t.sock_ops.listen(t,0)}catch(f){if(!(f instanceof e.ErrnoError)||f.errno!==138)throw f}}},connect:function(t,a,n){if(t.server)throw new e.ErrnoError(138);if(typeof t.daddr<"u"&&typeof t.dport<"u"){var f=j.websocket_sock_ops.getPeer(t,t.daddr,t.dport);if(f)throw f.socket.readyState===f.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var v=j.websocket_sock_ops.createPeer(t,a,n);throw t.daddr=v.addr,t.dport=v.port,new e.ErrnoError(26)},listen:function(t,a){if(!Z)throw new e.ErrnoError(138);if(t.server)throw new e.ErrnoError(28);var n=Fn().Server,f=t.saddr;l.websocket.serverDecorator&&(n=l.websocket.serverDecorator(n)),t.server=new n({host:f,port:t.sport}),l.websocket.emit("listen",t.stream.fd),t.server.on("connection",function(v){if(t.type===1){var u=j.createSocket(t.family,t.type,t.protocol),o=j.websocket_sock_ops.createPeer(u,v);u.daddr=o.addr,u.dport=o.port,t.pending.push(u),l.websocket.emit("connection",u.stream.fd)}else j.websocket_sock_ops.createPeer(t,v),l.websocket.emit("connection",t.stream.fd)}),t.server.on("close",function(){l.websocket.emit("close",t.stream.fd),t.server=null}),t.server.on("error",function(v){t.error=23,l.websocket.emit("error",[t.stream.fd,t.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(t){if(!t.server||!t.pending.length)throw new e.ErrnoError(28);var a=t.pending.shift();return a.stream.flags=t.stream.flags,a},getname:function(t,a){var n,f;if(a){if(t.daddr===void 0||t.dport===void 0)throw new e.ErrnoError(53);n=t.daddr,f=t.dport}else n=t.saddr||0,f=t.sport||0;return{addr:n,port:f}},sendmsg:function(t,a,n,f,v,u){if(t.type===2){if((v===void 0||u===void 0)&&(v=t.daddr,u=t.dport),v===void 0||u===void 0)throw new e.ErrnoError(17)}else v=t.daddr,u=t.dport;var o=j.websocket_sock_ops.getPeer(t,v,u);if(t.type===1){if(!o||o.socket.readyState===o.socket.CLOSING||o.socket.readyState===o.socket.CLOSED)throw new e.ErrnoError(53);if(o.socket.readyState===o.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(a)&&(n+=a.byteOffset,a=a.buffer);var c;if(c=a.slice(n,n+f),t.type===2&&(!o||o.socket.readyState!==o.socket.OPEN))return(!o||o.socket.readyState===o.socket.CLOSING||o.socket.readyState===o.socket.CLOSED)&&(o=j.websocket_sock_ops.createPeer(t,v,u)),o.dgram_send_queue.push(c),f;try{return o.socket.send(c),f}catch{throw new e.ErrnoError(28)}},recvmsg:function(t,a,n){if(t.type===1&&t.server)throw new e.ErrnoError(53);var f=t.recv_queue.shift();if(!f){if(t.type===1){var v=j.websocket_sock_ops.getPeer(t,t.daddr,t.dport);if(!v)throw new e.ErrnoError(53);if(v.socket.readyState===v.socket.CLOSING||v.socket.readyState===v.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var u=f.data.byteLength||f.data.length,o=f.data.byteOffset||0,c=f.data.buffer||f.data,_=Math.min(a,u),m={buffer:new Uint8Array(c,o,_),addr:f.addr,port:f.port};if(n&2&&(_=0),t.type===1&&_<u){var p=u-_;f.data=new Uint8Array(c,o+_,p),t.recv_queue.unshift(f)}return m}}};function ve(t){var a=j.getSocket(t);if(!a)throw new e.ErrnoError(8);return a}function Kt(t){return h[Pn()>>2]=t,t}function lr(t){for(var a=t.split("."),n=0;n<4;n++){var f=Number(a[n]);if(isNaN(f))return null;a[n]=f}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}function Q(t){return parseInt(t)}function Hr(t){var a,n,f,v,u=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,o=[];if(!u.test(t))return null;if(t==="::")return[0,0,0,0,0,0,0,0];for(t.startsWith("::")?t=t.replace("::","Z:"):t=t.replace("::",":Z:"),t.indexOf(".")>0?(t=t.replace(new RegExp("[.]","g"),":"),a=t.split(":"),a[a.length-4]=Q(a[a.length-4])+Q(a[a.length-3])*256,a[a.length-3]=Q(a[a.length-2])+Q(a[a.length-1])*256,a=a.slice(0,a.length-2)):a=t.split(":"),f=0,v=0,n=0;n<a.length;n++)if(typeof a[n]=="string")if(a[n]==="Z"){for(v=0;v<8-a.length+1;v++)o[n+v]=0;f=v-1}else o[n+f]=nt(parseInt(a[n],16));else o[n+f]=a[n];return[o[1]<<16|o[0],o[3]<<16|o[2],o[5]<<16|o[4],o[7]<<16|o[6]]}function rr(t,a,n,f,v){switch(a){case 2:n=lr(n),Pr(t,16),v&&(h[v>>2]=16),Ee[t>>1]=a,h[t+4>>2]=n,Ee[t+2>>1]=nt(f);break;case 10:n=Hr(n),Pr(t,28),v&&(h[v>>2]=28),h[t>>2]=a,h[t+8>>2]=n[0],h[t+12>>2]=n[1],h[t+16>>2]=n[2],h[t+20>>2]=n[3],Ee[t+2>>1]=nt(f);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(t){var a=lr(t);if(a!==null||(a=Hr(t),a!==null))return t;var n;if(ee.address_map.addrs[t])n=ee.address_map.addrs[t];else{var f=ee.address_map.id++;Ne(f<65535,"exceeded max address mappings of 65535"),n="172.29."+(f&255)+"."+(f&65280),ee.address_map.names[n]=t,ee.address_map.addrs[t]=n}return n},lookup_addr:function(t){return ee.address_map.names[t]?ee.address_map.names[t]:null}};function oo(t,a,n,f){try{var v=ve(t),u=v.sock_ops.accept(v);if(a)var o=rr(a,u.family,ee.lookup_name(u.daddr),u.dport,n);return u.stream.fd}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Or(t){return(t&255)+"."+(t>>8&255)+"."+(t>>16&255)+"."+(t>>24&255)}function en(t){var a="",n=0,f=0,v=0,u=0,o=0,c=0,_=[t[0]&65535,t[0]>>16,t[1]&65535,t[1]>>16,t[2]&65535,t[2]>>16,t[3]&65535,t[3]>>16],m=!0,p="";for(c=0;c<5;c++)if(_[c]!==0){m=!1;break}if(m){if(p=Or(_[6]|_[7]<<16),_[5]===-1)return a="::ffff:",a+=p,a;if(_[5]===0)return a="::",p==="0.0.0.0"&&(p=""),p==="0.0.0.1"&&(p="1"),a+=p,a}for(n=0;n<8;n++)_[n]===0&&(n-v>1&&(o=0),v=n,o++),o>f&&(f=o,u=n-f+1);for(n=0;n<8;n++){if(f>1&&_[n]===0&&n>=u&&n<u+f){n===u&&(a+=":",u===0&&(a+=":"));continue}a+=Number(Zt(_[n]&65535)).toString(16),a+=n<7?":":""}return a}function wt(t,a){var n=Ee[t>>1],f=Zt(st[t+2>>1]),v;switch(n){case 2:if(a!==16)return{errno:28};v=h[t+4>>2],v=Or(v);break;case 10:if(a!==28)return{errno:28};v=[h[t+8>>2],h[t+12>>2],h[t+16>>2],h[t+20>>2]],v=en(v);break;default:return{errno:5}}return{family:n,addr:v,port:f}}function Mr(t,a,n){if(n&&t===0)return null;var f=wt(t,a);if(f.errno)throw new e.ErrnoError(f.errno);return f.addr=ee.lookup_addr(f.addr)||f.addr,f}function io(t,a,n){try{var f=ve(t),v=Mr(a,n);return f.sock_ops.bind(f,v.addr,v.port),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function ao(t){try{return t=N.getStr(t),e.chdir(t),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function so(t,a){try{return t=N.getStr(t),e.chmod(t,a),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function uo(t,a,n){try{var f=ve(t),v=Mr(a,n);return f.sock_ops.connect(f,v.addr,v.port),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function fo(t){try{var a=N.getStreamFromFD(t);return e.createStream(a,0).fd}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function co(t,a,n){try{var f=N.getStreamFromFD(t);if(f.fd===a)return-28;var v=e.getStream(a);return v&&e.close(v),e.createStream(f,a,a+1).fd}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function lo(t,a,n,f){try{if(a=N.getStr(a),a=N.calculateAt(t,a),n&-8)return-28;var v=e.lookupPath(a,{follow:!0}),u=v.node;if(!u)return-44;var o="";return n&4&&(o+="r"),n&2&&(o+="w"),n&1&&(o+="x"),o&&e.nodePermissions(u,o)?-2:0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Xr(t,a){return a+2097152>>>0<4194305-!!t?(t>>>0)+a*4294967296:NaN}function _o(t,a,n,f,v,u){try{var o=Xr(n,f);if(isNaN(o))return-61;var c=Xr(v,u);if(isNaN(c))return-61;var _=N.getStreamFromFD(t);return e.allocate(_,o,c),0}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function vo(t,a){try{return e.fchmod(t,a),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function mo(t,a,n){try{return e.fchown(t,a,n),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function po(t,a,n,f,v){try{a=N.getStr(a);var u=v&256;return v=v&-257,a=N.calculateAt(t,a),(u?e.lchown:e.chown)(a,n,f),0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function rn(t,a,n){N.varargs=n;try{var f=N.getStreamFromFD(t);switch(a){case 0:{var v=N.get();if(v<0)return-28;var u;return u=e.createStream(f,v),u.fd}case 1:case 2:return 0;case 3:return f.flags;case 4:{var v=N.get();return f.flags|=v,0}case 5:{var v=N.get(),o=0;return Ee[v+o>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function ho(t){try{var a=N.getStreamFromFD(t);return 0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function yo(t,a){try{var n=N.getStreamFromFD(t);return N.doStat(e.stat,n.path,a)}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function wo(t,a,n){try{var f=Xr(a,n);return isNaN(f)?-61:(e.ftruncate(t,f),0)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Eo(t,a){try{if(a===0)return-28;var n=e.cwd(),f=Pe(n)+1;return a<f?-68:(Ae(n,t,a),f)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function go(t,a,n){try{var f=N.getStreamFromFD(t);f.getdents||(f.getdents=e.readdir(f.path));for(var v=280,u=0,o=e.llseek(f,0,1),c=Math.floor(o/v);c<f.getdents.length&&u+v<=n;){var _,m,p=f.getdents[c];if(p===".")_=f.node.id,m=4;else if(p===".."){var y=e.lookupPath(f.path,{parent:!0});_=y.node.id,m=4}else{var E=e.lookupNode(f.node,p);_=E.id,m=e.isChrdev(E.mode)?2:e.isDir(E.mode)?4:e.isLink(E.mode)?10:8}q=[_>>>0,(P=_,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[a+u>>2]=q[0],h[a+u+4>>2]=q[1],q=[(c+1)*v>>>0,(P=(c+1)*v,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[a+u+8>>2]=q[0],h[a+u+12>>2]=q[1],Ee[a+u+16>>1]=280,$[a+u+18>>0]=m,Ae(p,a+u+19,256),u+=v,c+=1}return e.llseek(f,c*v,0),u}catch(S){if(typeof e>"u"||!(S instanceof e.ErrnoError))throw S;return-S.errno}}function So(t,a,n){try{var f=ve(t);if(!f.daddr)return-53;var v=rr(a,f.family,ee.lookup_name(f.daddr),f.dport,n);return 0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function bo(t,a,n){try{ce("__syscall_getsockname "+t);var f=ve(t),v=rr(a,f.family,ee.lookup_name(f.saddr||"0.0.0.0"),f.sport,n);return 0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function ko(t,a,n,f,v){try{var u=ve(t);return a===1&&n===4?(h[f>>2]=u.error,h[v>>2]=4,u.error=null,0):-50}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Do(t,a,n){N.varargs=n;try{var f=N.getStreamFromFD(t);switch(a){case 21509:case 21505:return f.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return f.tty?0:-59;case 21519:{if(!f.tty)return-59;var v=N.get();return h[v>>2]=0,0}case 21520:return f.tty?-28:-59;case 21531:{var v=N.get();return e.ioctl(f,a,v)}case 21523:return f.tty?0:-59;case 21524:return f.tty?0:-59;default:return-28}}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Oo(t,a){try{var n=ve(t);return n.sock_ops.listen(n,a),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function No(t,a){try{return t=N.getStr(t),N.doStat(e.lstat,t,a)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function To(t,a,n){try{return a=N.getStr(a),a=N.calculateAt(t,a),a=U.normalize(a),a[a.length-1]==="/"&&(a=a.substr(0,a.length-1)),e.mkdir(a,n,0),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function se(t,a,n,f){try{a=N.getStr(a);var v=f&256,u=f&4096;return f=f&-4353,a=N.calculateAt(t,a,u),N.doStat(v?e.lstat:e.stat,a,n)}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Co(t,a,n,f){N.varargs=f;try{a=N.getStr(a),a=N.calculateAt(t,a);var v=f?N.get():0;return e.open(a,n,v).fd}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}var pe={BUCKET_BUFFER_SIZE:8192,mount:function(t){return e.createNode(null,"/",16895,0)},createPipe:function(){var t={buckets:[],refcnt:2};t.buckets.push({buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var a=pe.nextname(),n=pe.nextname(),f=e.createNode(pe.root,a,4096,0),v=e.createNode(pe.root,n,4096,0);f.pipe=t,v.pipe=t;var u=e.createStream({path:a,node:f,flags:0,seekable:!1,stream_ops:pe.stream_ops});f.stream=u;var o=e.createStream({path:n,node:v,flags:1,seekable:!1,stream_ops:pe.stream_ops});return v.stream=o,{readable_fd:u.fd,writable_fd:o.fd}},stream_ops:{poll:function(t){var a=t.node.pipe;if((t.flags&2097155)===1)return 260;if(a.buckets.length>0)for(var n=0;n<a.buckets.length;n++){var f=a.buckets[n];if(f.offset-f.roffset>0)return 65}return 0},ioctl:function(t,a,n){return 28},fsync:function(t){return 28},read:function(t,a,n,f,v){for(var u=t.node.pipe,o=0,c=0;c<u.buckets.length;c++){var _=u.buckets[c];o+=_.offset-_.roffset}Ne(a instanceof ArrayBuffer||ArrayBuffer.isView(a));var m=a.subarray(n,n+f);if(f<=0)return 0;if(o==0)throw new e.ErrnoError(6);for(var p=Math.min(o,f),y=p,E=0,c=0;c<u.buckets.length;c++){var S=u.buckets[c],b=S.offset-S.roffset;if(p<=b){var k=S.buffer.subarray(S.roffset,S.offset);p<b?(k=k.subarray(0,p),S.roffset+=p):E++,m.set(k);break}else{var k=S.buffer.subarray(S.roffset,S.offset);m.set(k),m=m.subarray(k.byteLength),p-=k.byteLength,E++}}return E&&E==u.buckets.length&&(E--,u.buckets[E].offset=0,u.buckets[E].roffset=0),u.buckets.splice(0,E),y},write:function(t,a,n,f,v){var u=t.node.pipe;Ne(a instanceof ArrayBuffer||ArrayBuffer.isView(a));var o=a.subarray(n,n+f),c=o.byteLength;if(c<=0)return 0;var _=null;u.buckets.length==0?(_={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:0,roffset:0},u.buckets.push(_)):_=u.buckets[u.buckets.length-1],Ne(_.offset<=pe.BUCKET_BUFFER_SIZE);var m=pe.BUCKET_BUFFER_SIZE-_.offset;if(m>=c)return _.buffer.set(o,_.offset),_.offset+=c,c;m>0&&(_.buffer.set(o.subarray(0,m),_.offset),_.offset+=m,o=o.subarray(m,o.byteLength));for(var p=o.byteLength/pe.BUCKET_BUFFER_SIZE|0,y=o.byteLength%pe.BUCKET_BUFFER_SIZE,E=0;E<p;E++){var S={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:pe.BUCKET_BUFFER_SIZE,roffset:0};u.buckets.push(S),S.buffer.set(o.subarray(0,pe.BUCKET_BUFFER_SIZE)),o=o.subarray(pe.BUCKET_BUFFER_SIZE,o.byteLength)}if(y>0){var S={buffer:new Uint8Array(pe.BUCKET_BUFFER_SIZE),offset:o.byteLength,roffset:0};u.buckets.push(S),S.buffer.set(o)}return c},close:function(t){var a=t.node.pipe;a.refcnt--,a.refcnt===0&&(a.buckets=null)}},nextname:function(){return pe.nextname.current||(pe.nextname.current=0),"pipe["+pe.nextname.current+++"]"}};function Fo(t){try{if(t==0)throw new e.ErrnoError(21);var a=pe.createPipe();return h[t>>2]=a.readable_fd,h[t+4>>2]=a.writable_fd,0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function Ao(t,a,n){try{for(var f=0,v=0;v<a;v++){var u=t+8*v,o=h[u>>2],c=Ee[u+4>>1],_=32,m=e.getStream(o);m&&(_=N.DEFAULT_POLLMASK,m.stream_ops?.poll&&(_=m.stream_ops.poll(m))),_&=c|8|16,_&&f++,Ee[u+6>>1]=_}return f}catch(p){if(typeof e>"u"||!(p instanceof e.ErrnoError))throw p;return-p.errno}}function Po(t,a,n,f){try{if(a=N.getStr(a),a=N.calculateAt(t,a),f<=0)return-28;var v=e.readlink(a),u=Math.min(f,Pe(v)),o=$[n+u];return Ae(v,n,f+1),$[n+u]=o,u}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Ro(t,a,n,f,v,u){try{var o=ve(t),c=o.sock_ops.recvmsg(o,n,typeof f<"u"?f:0);if(!c)return 0;if(v)var _=rr(v,o.family,ee.lookup_name(c.addr),c.port,u);return de.set(c.buffer,a),c.buffer.byteLength}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Mo(t,a,n,f){try{return a=N.getStr(a),f=N.getStr(f),a=N.calculateAt(t,a),f=N.calculateAt(n,f),e.rename(a,f),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Lo(t){try{return t=N.getStr(t),e.rmdir(t),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Io(t,a,n,f,v,u){try{var o=ve(t),c=Mr(v,u,!0);return c?o.sock_ops.sendmsg(o,$,a,n,c.addr,c.port):e.write(o.stream,$,a,n)}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Uo(t,a,n){try{var f=j.createSocket(t,a,n);return f.stream.fd}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Bo(t,a){try{return t=N.getStr(t),N.doStat(e.stat,t,a)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function xo(t,a,n){try{return t=N.getStr(t),h[n+4>>2]=4096,h[n+40>>2]=4096,h[n+8>>2]=1e6,h[n+12>>2]=5e5,h[n+16>>2]=5e5,h[n+20>>2]=e.nextInode,h[n+24>>2]=1e6,h[n+28>>2]=42,h[n+44>>2]=2,h[n+36>>2]=255,0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Br(t,a){try{return t=N.getStr(t),a=N.getStr(a),e.symlink(t,a),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function Ho(t,a,n){try{return a=N.getStr(a),a=N.calculateAt(t,a),n===0?e.unlink(a):n===512?e.rmdir(a):ue("Invalid flags passed to unlinkat"),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function $r(t){return H[t>>2]+h[t+4>>2]*4294967296}function tn(t,a,n,f){try{if(a=N.getStr(a),a=N.calculateAt(t,a,!0),n){var o=$r(n),c=h[n+8>>2];v=o*1e3+c/(1e3*1e3),n+=16,o=$r(n),c=h[n+8>>2],u=o*1e3+c/(1e3*1e3)}else var v=Date.now(),u=v;return e.utime(a,v,u),0}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function zo(t){}var _n="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function Wo(t,a){ue(_n)}function jo(t,a){ue(_n)}var Yo=!0;function qo(){return Yo}function Vo(){throw 1/0}function Ko(t,a){var n=new Date($r(t)*1e3);h[a>>2]=n.getUTCSeconds(),h[a+4>>2]=n.getUTCMinutes(),h[a+8>>2]=n.getUTCHours(),h[a+12>>2]=n.getUTCDate(),h[a+16>>2]=n.getUTCMonth(),h[a+20>>2]=n.getUTCFullYear()-1900,h[a+24>>2]=n.getUTCDay();var f=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),v=(n.getTime()-f)/(1e3*60*60*24)|0;h[a+28>>2]=v}function Go(t,a){var n=new Date($r(t)*1e3);h[a>>2]=n.getSeconds(),h[a+4>>2]=n.getMinutes(),h[a+8>>2]=n.getHours(),h[a+12>>2]=n.getDate(),h[a+16>>2]=n.getMonth(),h[a+20>>2]=n.getFullYear()-1900,h[a+24>>2]=n.getDay();var f=new Date(n.getFullYear(),0,1),v=(n.getTime()-f.getTime())/(1e3*60*60*24)|0;h[a+28>>2]=v,h[a+36>>2]=-(n.getTimezoneOffset()*60);var u=new Date(n.getFullYear(),6,1).getTimezoneOffset(),o=f.getTimezoneOffset(),c=(u!=o&&n.getTimezoneOffset()==Math.min(o,u))|0;h[a+32>>2]=c}function Xo(t){var a=new Date(h[t+20>>2]+1900,h[t+16>>2],h[t+12>>2],h[t+8>>2],h[t+4>>2],h[t>>2],0),n=h[t+32>>2],f=a.getTimezoneOffset(),v=new Date(a.getFullYear(),0,1),u=new Date(a.getFullYear(),6,1).getTimezoneOffset(),o=v.getTimezoneOffset(),c=Math.min(o,u);if(n<0)h[t+32>>2]=+(u!=o&&c==f);else if(n>0!=(c==f)){var _=Math.max(o,u),m=n>0?c:_;a.setTime(a.getTime()+(m-f)*6e4)}h[t+24>>2]=a.getDay();var p=(a.getTime()-v.getTime())/(1e3*60*60*24)|0;return h[t+28>>2]=p,h[t>>2]=a.getSeconds(),h[t+4>>2]=a.getMinutes(),h[t+8>>2]=a.getHours(),h[t+12>>2]=a.getDate(),h[t+16>>2]=a.getMonth(),h[t+20>>2]=a.getYear(),a.getTime()/1e3|0}function nn(t,a,n,f,v,u){try{var o=N.getStreamFromFD(f),c=e.mmap(o,t,v,a,n),_=c.ptr;return h[u>>2]=c.allocated,_}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function $o(t,a,n,f,v,u){try{var o=N.getStreamFromFD(v);n&2&&N.doMsync(t,o,a,f,u),e.munmap(o)}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function zr(t){var a=Pe(t)+1,n=er(a);return n&&Xe(t,$,n,a),n}function Zo(t,a,n){var f=new Date().getFullYear(),v=new Date(f,0,1),u=new Date(f,6,1),o=v.getTimezoneOffset(),c=u.getTimezoneOffset(),_=Math.max(o,c);h[t>>2]=_*60,h[a>>2]=+(o!=c);function m(b){var k=b.toTimeString().match(/\(([A-Za-z ]+)\)$/);return k?k[1]:"GMT"}var p=m(v),y=m(u),E=zr(p),S=zr(y);c<o?(H[n>>2]=E,H[n+4>>2]=S):(H[n>>2]=S,H[n+4>>2]=E)}function It(t,a,n){It.called||(It.called=!0,Zo(t,a,n))}function on(){ue("")}function Jo(){return Date.now()}function Wr(){return 2147483648}function Qo(){return Wr()}var Ut;Z?Ut=()=>{var t=process.hrtime();return t[0]*1e3+t[1]/1e6}:Ut=()=>performance.now();function ei(t,a,n){de.copyWithin(t,a,a+n)}function wn(t){try{return or.grow(t-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ri(t){var a=de.length;t=t>>>0;var n=Wr();if(t>n)return!1;let f=(_,m)=>_+(m-_%m)%m;for(var v=1;v<=4;v*=2){var u=a*(1+.2/v);u=Math.min(u,t+100663296);var o=Math.min(n,f(Math.max(t,u),65536)),c=wn(o);if(c)return!0}return!1}function Et(t){Ge=t,_r()||(l.onExit&&l.onExit(t),Ce=!0),te(t,new mr(t))}function ti(t,a){Ge=t,_r()||Yn(),Et(t)}var gt=ti;function et(){if(!_r())try{gt(Ge)}catch(t){pt(t)}}function jr(t){if(!(_t||Ce))try{t(),et()}catch(a){pt(a)}}function Bt(){Fr+=1}function xt(){Fr-=1}function rt(t,a){return Bt(),setTimeout(function(){xt(),jr(t)},a)}function ni(t){return ie.handleSleep(a=>rt(a,t))}var dr=O.ENV||{};function tt(){return J||"./this.program"}function Ir(){if(!Ir.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:tt()};for(var n in dr)dr[n]===void 0?delete a[n]:a[n]=dr[n];var f=[];for(var n in a)f.push(n+"="+a[n]);Ir.strings=f}return Ir.strings}function Ht(t,a,n){for(var f=0;f<t.length;++f)$[a++>>0]=t.charCodeAt(f);n||($[a>>0]=0)}function oi(t,a){var n=0;return Ir().forEach(function(f,v){var u=a+n;H[t+v*4>>2]=u,Ht(f,u),n+=f.length+1}),0}function ii(t,a){var n=Ir();H[t>>2]=n.length;var f=0;return n.forEach(function(v){f+=v.length+1}),H[a>>2]=f,0}function ai(t){try{var a=N.getStreamFromFD(t);return e.close(a),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return n.errno}}function si(t,a){try{var n=N.getStreamFromFD(t),f=n.tty?2:e.isDir(n.mode)?3:e.isLink(n.mode)?7:4;return $[a>>0]=f,0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return v.errno}}function ui(t,a,n,f){for(var v=0,u=0;u<n;u++){var o=H[a>>2],c=H[a+4>>2];a+=8;var _=e.read(t,$,o,c,f);if(_<0)return-1;if(v+=_,_<c)break}return v}function fi(t,a,n,f){try{var v=N.getStreamFromFD(t),u=ui(v,a,n);return H[f>>2]=u,0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return o.errno}}function ci(t,a,n,f,v){try{var u=Xr(a,n);if(isNaN(u))return 61;var o=N.getStreamFromFD(t);return e.llseek(o,u,f),q=[o.position>>>0,(P=o.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[v>>2]=q[0],h[v+4>>2]=q[1],o.getdents&&u===0&&f===0&&(o.getdents=null),0}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return c.errno}}function li(t,a,n,f){for(var v=0,u=0;u<n;u++){var o=H[a>>2],c=H[a+4>>2];a+=8;var _=e.write(t,$,o,c,f);if(_<0)return-1;v+=_}return v}function vn(t,a,n,f){try{var v=N.getStreamFromFD(t),u=li(v,a,n);return H[f>>2]=u,0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return o.errno}}function An(t,a,n,f){var v=0,u=0,o=0,c=0,_=0,m=0,p;function y(E,S,b,k,D,T){var C,A,I,z;return A=E===10?28:16,D=E===10?en(D):Or(D),C=er(A),z=rr(C,E,D,T),Ne(!z),I=er(32),h[I+4>>2]=E,h[I+8>>2]=S,h[I+12>>2]=b,h[I+24>>2]=k,H[I+20>>2]=C,E===10?h[I+16>>2]=28:h[I+16>>2]=16,h[I+28>>2]=0,I}if(n&&(o=h[n>>2],c=h[n+4>>2],_=h[n+8>>2],m=h[n+12>>2]),_&&!m&&(m=_===2?17:6),!_&&m&&(_=m===17?2:1),m===0&&(m=6),_===0&&(_=1),!t&&!a)return-2;if(o&-1088||n!==0&&h[n>>2]&2&&!t)return-1;if(o&32)return-2;if(_!==0&&_!==1&&_!==2)return-7;if(c!==0&&c!==2&&c!==10)return-6;if(a&&(a=ne(a),u=parseInt(a,10),isNaN(u)))return o&1024?-2:-8;if(!t)return c===0&&(c=2),o&1||(c===2?v=kt(2130706433):v=[0,0,0,1]),p=y(c,_,m,null,v,u),H[f>>2]=p,0;if(t=ne(t),v=lr(t),v!==null)if(c===0||c===2)c=2;else if(c===10&&o&8)v=[0,0,kt(65535),v],c=10;else return-2;else if(v=Hr(t),v!==null)if(c===0||c===10)c=10;else return-2;return v!=null?(p=y(c,_,m,t,v,u),H[f>>2]=p,0):o&4?-2:(t=ee.lookup_name(t),v=lr(t),c===0?c=2:c===10&&(v=[0,0,kt(65535),v]),p=y(c,_,m,null,v,u),H[f>>2]=p,0)}function Dn(t){var a=er(20),n=er(t.length+1);Ae(t,n,t.length+1),H[a>>2]=n;var f=er(4);H[f>>2]=0,H[a+4>>2]=f;var v=2;h[a+8>>2]=v,h[a+12>>2]=4;var u=er(12);return H[u>>2]=u+8,H[u+4>>2]=0,h[u+8>>2]=lr(ee.lookup_name(t)),H[a+16>>2]=u,a}function di(t,a,n){if(n!==2)return Kt(5),null;t=h[t>>2];var f=Or(t),v=ee.lookup_addr(f);return v&&(f=v),Dn(f)}function _i(t){return Dn(ne(t))}function En(t,a,n,f,v,u){var o=_i(t);return Zr(a,o,20),kr(o),h[u>>2]=0,H[v>>2]=a,0}function Jr(t,a){for(var n=Math.min(a,3),f=8,v=0;v<n;v++)ut[t+v*f>>3]=.1;return n}function St(t,a,n,f,v,u,o){var c=wt(t,a);if(c.errno)return-6;var _=c.port,m=c.addr,p=!1;if(n&&f){var y;if(o&1||!(y=ee.lookup_addr(m))){if(o&8)return-2}else m=y;var E=Ae(m,n,f);E+1>=f&&(p=!0)}if(v&&u){_=""+_;var E=Ae(_,v,u);E+1>=u&&(p=!0)}return p?-12:0}var zt={list:[],map:{}};function Wt(t){function a(u,o,c){var _=er(u.length+1);Ht(u,_);for(var m=0,p=c.length,y=er((p+1)*4),E=0;E<p;E++,m+=4){var S=c[E],b=er(S.length+1);Ht(S,b),H[y+m>>2]=b}H[y+m>>2]=0;var k=er(12);return H[k>>2]=_,H[k+4>>2]=y,h[k+8>>2]=o,k}var n=zt.list,f=zt.map;if(n.length===0){var v=a("tcp",6,["TCP"]);n.push(v),f.tcp=f[6]=v,v=a("udp",17,["UDP"]),n.push(v),f.udp=f[17]=v}Wt.index=0}function br(t){t=ne(t),Wt(!0);var a=zt.map[t];return a}function je(t){Wt(!0);var a=zt.map[t];return a}function Nr(t){var a=Pe(t)+1,n=ar(a);return Xe(t,$,n,a),n}var Ue={getAllWebSockets:function(t){let a=new Set;t.server&&t.server.clients.forEach(n=>{a.add(n)});for(let n of Ue.getAllPeers(t))a.add(n.socket);return Array.from(a)},getAllPeers:function(t){let a=new Set;if(t.server&&t.pending.filter(n=>n.peers).forEach(n=>{for(let f of Object.values(n.peers))a.add(f)}),t.peers)for(let n of Object.values(t.peers))a.add(n);return Array.from(a)},awaitData:function(t){return Ue.awaitWsEvent(t,"message")},awaitConnection:function(t){return t.OPEN===t.readyState?[Promise.resolve(),Ue.noop]:Ue.awaitWsEvent(t,"open")},awaitClose:function(t){return[t.CLOSING,t.CLOSED].includes(t.readyState)?[Promise.resolve(),Ue.noop]:Ue.awaitWsEvent(t,"close")},awaitError:function(t){return[t.CLOSING,t.CLOSED].includes(t.readyState)?[Promise.resolve(),Ue.noop]:Ue.awaitWsEvent(t,"error")},awaitWsEvent:function(t,a){let n,f=()=>{n()};return[new Promise(function(o){n=o,t.once(a,f)}),()=>{t.removeListener(a,f),setTimeout(n)}]},noop:function(){},shutdownSocket:function(t,a){let n=ve(t),f=Object.values(n.peers)[0];if(!f)return-1;try{return f.socket.close(),j.websocket_sock_ops.removePeer(n,f),0}catch(v){return console.log("Socket shutdown error",v),-1}}};function ir(t,a,n){if(!t)return 1;let f=ne(t);if(!f.length)return 0;let v=ne(a);if(!v.length)return 0;if(l.popen_to_file){let{path:u,exitCode:o}=l.popen_to_file(f,v);return de[n]=o,Nr(u)}if(Z){let u=require("os").tmpdir(),o="php-process-stream",c=u+"/"+o,_=require("child_process"),m;if(v==="r")m=_.spawnSync(f,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[n]=m.status,require("fs").writeFileSync(c,m.stdout,{encoding:"utf8",flag:"w+"});else return v==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+v+" (should be r or w)"),_W_EXITCODE(0,2));return Nr(c)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function qe(t){return t%4===0&&(t%100!==0||t%400===0)}function Er(t,a){for(var n=0,f=0;f<=a;n+=t[f++]);return n}var fr=[31,29,31,30,31,30,31,31,30,31,30,31],Tr=[31,28,31,30,31,30,31,31,30,31,30,31];function Yr(t,a){for(var n=new Date(t.getTime());a>0;){var f=qe(n.getFullYear()),v=n.getMonth(),u=(f?fr:Tr)[v];if(a>u-n.getDate())a-=u-n.getDate()+1,n.setDate(1),v<11?n.setMonth(v+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+a),n}return n}function jt(t,a,n,f){var v=h[f+40>>2],u={tm_sec:h[f>>2],tm_min:h[f+4>>2],tm_hour:h[f+8>>2],tm_mday:h[f+12>>2],tm_mon:h[f+16>>2],tm_year:h[f+20>>2],tm_wday:h[f+24>>2],tm_yday:h[f+28>>2],tm_isdst:h[f+32>>2],tm_gmtoff:h[f+36>>2],tm_zone:v?ne(v):""},o=ne(n),c={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var _ in c)o=o.replace(new RegExp(_,"g"),c[_]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(C,A,I){for(var z=typeof C=="number"?C.toString():C||"";z.length<A;)z=I[0]+z;return z}function E(C,A){return y(C,A,"0")}function S(C,A){function I(K){return K<0?-1:K>0?1:0}var z;return(z=I(C.getFullYear()-A.getFullYear()))===0&&(z=I(C.getMonth()-A.getMonth()))===0&&(z=I(C.getDate()-A.getDate())),z}function b(C){switch(C.getDay()){case 0:return new Date(C.getFullYear()-1,11,29);case 1:return C;case 2:return new Date(C.getFullYear(),0,3);case 3:return new Date(C.getFullYear(),0,2);case 4:return new Date(C.getFullYear(),0,1);case 5:return new Date(C.getFullYear()-1,11,31);case 6:return new Date(C.getFullYear()-1,11,30)}}function k(C){var A=Yr(new Date(C.tm_year+1900,0,1),C.tm_yday),I=new Date(A.getFullYear(),0,4),z=new Date(A.getFullYear()+1,0,4),K=b(I),B=b(z);return S(K,A)<=0?S(B,A)<=0?A.getFullYear()+1:A.getFullYear():A.getFullYear()-1}var D={"%a":function(C){return m[C.tm_wday].substring(0,3)},"%A":function(C){return m[C.tm_wday]},"%b":function(C){return p[C.tm_mon].substring(0,3)},"%B":function(C){return p[C.tm_mon]},"%C":function(C){var A=C.tm_year+1900;return E(A/100|0,2)},"%d":function(C){return E(C.tm_mday,2)},"%e":function(C){return y(C.tm_mday,2," ")},"%g":function(C){return k(C).toString().substring(2)},"%G":function(C){return k(C)},"%H":function(C){return E(C.tm_hour,2)},"%I":function(C){var A=C.tm_hour;return A==0?A=12:A>12&&(A-=12),E(A,2)},"%j":function(C){return E(C.tm_mday+Er(qe(C.tm_year+1900)?fr:Tr,C.tm_mon-1),3)},"%m":function(C){return E(C.tm_mon+1,2)},"%M":function(C){return E(C.tm_min,2)},"%n":function(){return`
|
|
19
|
-
`},"%p":function(C){return C.tm_hour>=0&&C.tm_hour<12?"AM":"PM"},"%S":function(C){return E(C.tm_sec,2)},"%t":function(){return" "},"%u":function(C){return C.tm_wday||7},"%U":function(C){var A=C.tm_yday+7-C.tm_wday;return E(Math.floor(A/7),2)},"%V":function(C){var A=Math.floor((C.tm_yday+7-(C.tm_wday+6)%7)/7);if((C.tm_wday+371-C.tm_yday-2)%7<=2&&A++,A){if(A==53){var z=(C.tm_wday+371-C.tm_yday)%7;z!=4&&(z!=3||!qe(C.tm_year))&&(A=1)}}else{A=52;var I=(C.tm_wday+7-C.tm_yday-1)%7;(I==4||I==5&&qe(C.tm_year%400-1))&&A++}return E(A,2)},"%w":function(C){return C.tm_wday},"%W":function(C){var A=C.tm_yday+7-(C.tm_wday+6)%7;return E(Math.floor(A/7),2)},"%y":function(C){return(C.tm_year+1900).toString().substring(2)},"%Y":function(C){return C.tm_year+1900},"%z":function(C){var A=C.tm_gmtoff,I=A>=0;return A=Math.abs(A)/60,A=A/60*100+A%60,(I?"+":"-")+("0000"+A).slice(-4)},"%Z":function(C){return C.tm_zone},"%%":function(){return"%"}};o=o.replace(/%%/g,"\0\0");for(var _ in D)o.includes(_)&&(o=o.replace(new RegExp(_,"g"),D[_](u)));o=o.replace(/\0\0/g,"%");var T=Je(o,!1);return T.length>a?0:(ht(T,t),T.length-1)}function Yt(t,a,n){for(var f=ne(a),v="\\!@#$^&*()+=-[]/{}|:<>?,.",u=0,o=v.length;u<o;++u)f=f.replace(new RegExp("\\"+v[u],"g"),"\\"+v[u]);var c={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var _ in c)f=f.replace(_,c[_]);var m={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},p={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},y={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},E={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var S in m)f=f.replace(S,"("+S+m[S]+")");for(var b=[],u=f.indexOf("%");u>=0;u=f.indexOf("%"))b.push(f[u+1]),f=f.replace(new RegExp("\\%"+f[u+1],"g"),"");var k=new RegExp("^"+f,"i").exec(ne(t));function D(){function Dr(yr,Vr,Kr){return typeof yr!="number"||isNaN(yr)?Vr:yr>=Vr?yr<=Kr?yr:Kr:Vr}return{year:Dr(h[n+20>>2]+1900,1970,9999),month:Dr(h[n+16>>2],0,11),day:Dr(h[n+12>>2],1,31),hour:Dr(h[n+8>>2],0,23),min:Dr(h[n+4>>2],0,59),sec:Dr(h[n>>2],0,59)}}if(k){var T=D(),C,A=Dr=>{var yr=b.indexOf(Dr);if(yr>=0)return k[yr+1]};if((C=A("S"))&&(T.sec=Q(C)),(C=A("M"))&&(T.min=Q(C)),C=A("H"))T.hour=Q(C);else if(C=A("I")){var I=Q(C);(C=A("p"))&&(I+=C.toUpperCase()[0]==="P"?12:0),T.hour=I}if(C=A("Y"))T.year=Q(C);else if(C=A("y")){var z=Q(C);(C=A("C"))?z+=Q(C)*100:z+=z<69?2e3:1900,T.year=z}if((C=A("m"))?T.month=Q(C)-1:(C=A("b"))&&(T.month=p[C.substring(0,3).toUpperCase()]||0),C=A("d"))T.day=Q(C);else if(C=A("j"))for(var K=Q(C),B=qe(T.year),x=0;x<12;++x){var G=Er(B?fr:Tr,x-1);K<=G+(B?fr:Tr)[x]&&(T.day=K-G)}else if(C=A("a")){var re=C.substring(0,3).toUpperCase();if(C=A("U")){var oe=y[re],le=Q(C),he=new Date(T.year,0,1),ze;he.getDay()===0?ze=Yr(he,oe+7*(le-1)):ze=Yr(he,7-he.getDay()+oe+7*(le-1)),T.day=ze.getDate(),T.month=ze.getMonth()}else if(C=A("W")){var oe=E[re],le=Q(C),he=new Date(T.year,0,1),ze;he.getDay()===1?ze=Yr(he,oe+7*(le-1)):ze=Yr(he,7-he.getDay()+1+oe+7*(le-1)),T.day=ze.getDate(),T.month=ze.getMonth()}}var Ve=new Date(T.year,T.month,T.day,T.hour,T.min,T.sec,0);return h[n>>2]=Ve.getSeconds(),h[n+4>>2]=Ve.getMinutes(),h[n+8>>2]=Ve.getHours(),h[n+12>>2]=Ve.getDate(),h[n+16>>2]=Ve.getMonth(),h[n+20>>2]=Ve.getFullYear()-1900,h[n+24>>2]=Ve.getDay(),h[n+28>>2]=Er(qe(Ve.getFullYear())?fr:Tr,Ve.getMonth()-1)+Ve.getDate()-1,h[n+32>>2]=0,t+Je(k[0]).length-1}return 0}function Gt(t){return Ue.shutdownSocket(t,2)}function be(t,a,n){if(typeof ie>"u")return 0;let f=1,v=2,u=4,o=8,c=16,_=32;return ie.handleSleep(m=>{let p=ve(t);if(!p){m(0);return}let y=[],E=new Set;if(a&f||a&v){if(p.server){for(let C of p.pending)if((C.recv_queue||[]).length>0){m(1);return}}else if((p.recv_queue||[]).length>0){m(1);return}}let S=Ue.getAllWebSockets(p);if(!S.length){m(0);return}for(let C of S)(a&f||a&v)&&(y.push(Ue.awaitData(C)),E.add("POLLIN")),a&u&&(y.push(Ue.awaitConnection(C)),E.add("POLLOUT")),a&c&&(y.push(Ue.awaitClose(C)),E.add("POLLHUP")),(a&o||a&_)&&(y.push(Ue.awaitError(C)),E.add("POLLERR"));if(y.length===0){console.warn("Unsupported poll event "+a+", defaulting to setTimeout()."),setTimeout(function(){m(0)},n);return}let b=y.map(([C])=>C),k=()=>y.forEach(([,C])=>C()),D=!1;Promise.race(b).then(function(C){D||(D=!0,m(1),clearTimeout(T),k())});let T=setTimeout(function(){D||(D=!0,m(0),k())},n)})}function X(t,a,n,f,v){let u=de[f];if(!(a===1&&n===9||a===6&&n===1))return console.warn(`Unsupported socket option: ${a}, ${n}, ${u}`),-1;let y=Ue.getAllWebSockets(t)[0];return y?(y.setSocketOpt(a,n,f),0):-1}function Fe(t,a){return Ue.shutdownSocket(t,a)}function Xt(t){try{return t()}catch(a){ue(a)}}var ie={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(t){var a=ie.callStackNameToId[t];return a===void 0&&(a=ie.callStackId++,ie.callStackNameToId[t]=a,ie.callStackIdToName[a]=t),a},instrumentWasmImports:function(t){var a=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(f=>f.split(".")[1]);for(var n in t)(function(f){var v=t[f],u=v.sig;if(typeof v=="function")var o=a.indexOf(f)>=0||f.startsWith("__asyncjs__")})(n)},instrumentWasmExports:function(t){var a={};for(var n in t)(function(f){var v=t[f];typeof v=="function"?a[f]=function(){ie.exportCallStack.push(f);try{return v.apply(null,arguments)}finally{if(!Ce){var u=ie.exportCallStack.pop();Ne(u===f),ie.maybeStopUnwind()}}}:a[f]=v})(n);return a},maybeStopUnwind:function(){ie.currData&&ie.state===ie.State.Unwinding&&ie.exportCallStack.length===0&&(ie.state=ie.State.Normal,Bt(),Xt(ln),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((t,a)=>{ie.asyncPromiseHandlers={resolve:t,reject:a}})},allocateData:function(){var t=er(12+ie.StackSize);return ie.setDataHeader(t,t+12,ie.StackSize),ie.setDataRewindFunc(t),t},setDataHeader:function(t,a,n){h[t>>2]=a,h[t+4>>2]=a+n},setDataRewindFunc:function(t){var a=ie.exportCallStack[0],n=ie.getCallStackId(a);h[t+8>>2]=n},getDataRewindFunc:function(t){var a=h[t+8>>2],n=ie.callStackIdToName[a],f=l.asm[n];return f},doRewind:function(t){var a=ie.getDataRewindFunc(t);return xt(),a()},handleSleep:function(t){if(!Ce){if(ie.state===ie.State.Normal){var a=!1,n=!1;t(f=>{if(!Ce&&(ie.handleSleepReturnValue=f||0,a=!0,!!n)){ie.state=ie.State.Rewinding,Xt(()=>pn(ie.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var v,u=!1;try{v=ie.doRewind(ie.currData)}catch(_){v=_,u=!0}var o=!1;if(!ie.currData){var c=ie.asyncPromiseHandlers;c&&(ie.asyncPromiseHandlers=null,(u?c.reject:c.resolve)(v),o=!0)}if(u&&!o)throw v}}),n=!0,a||(ie.state=ie.State.Unwinding,ie.currData=ie.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),Xt(()=>cn(ie.currData)))}else ie.state===ie.State.Rewinding?(ie.state=ie.State.Normal,Xt(hn),kr(ie.currData),ie.currData=null,ie.sleepCallbacks.forEach(f=>jr(f))):ue("invalid state: "+ie.state);return ie.handleSleepReturnValue}},handleAsync:function(t){return ie.handleSleep(a=>{t().then(a)})}};function Gr(t){var a=l["_"+t];return a}function xr(t,a,n,f,v){var u={string:D=>{var T=0;if(D!=null&&D!==0){var C=(D.length<<2)+1;T=ar(C),Ae(D,T,C)}return T},array:D=>{var T=ar(D.length);return ht(D,T),T}};function o(D){return a==="string"?ne(D):a==="boolean"?!!D:D}var c=Gr(t),_=[],m=0;if(f)for(var p=0;p<f.length;p++){var y=u[n[p]];y?(m===0&&(m=xe()),_[p]=y(f[p])):_[p]=f[p]}var E=ie.currData,S=c.apply(null,_);function b(D){return xt(),m!==0&&Ie(m),o(D)}Bt();var k=v&&v.async;return ie.currData!=E?ie.whenDone().then(b):(S=b(S),k?Promise.resolve(S):S)}var ke=function(t,a,n,f){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=e.nextInode++,this.name=a,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=f},Te=365,an=146;Object.defineProperties(ke.prototype,{read:{get:function(){return(this.mode&Te)===Te},set:function(t){t?this.mode|=Te:this.mode&=~Te}},write:{get:function(){return(this.mode&an)===an},set:function(t){t?this.mode|=an:this.mode&=~an}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ke,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var On={j:Jn,Va:Qn,Ua:no,Ta:oo,Sa:io,Ra:ao,P:so,Qa:uo,Pa:fo,Oa:co,Na:lo,U:_o,Ma:vo,La:mo,O:po,o:rn,Ka:ho,Ja:yo,T:wo,Ia:Eo,Ha:go,Ga:So,Fa:bo,Ea:ko,N:Do,Da:Oo,Ca:No,Ba:To,Aa:se,w:Co,za:Fo,ya:Ao,xa:Po,wa:Ro,va:Mo,M:Lo,ua:Io,L:Uo,ta:Bo,sa:xo,ra:Br,D:Ho,qa:tn,ma:zo,la:Wo,ka:jo,ja:qo,ia:Vo,ha:Ko,ga:Go,fa:Xo,ea:nn,da:$o,ca:It,m:on,B:Jo,ba:Qo,A:Ut,aa:ei,$:ri,_:ni,pa:oi,oa:ii,p:gt,r:ai,K:si,J:fi,S:ci,C:vn,Z:An,I:di,H:En,Y:Jr,G:St,X:br,W:je,h:Ln,d:Ni,b:Tn,f:Fi,g:Ci,u:g,t:bn,v:d,F:w,e:Oi,a:Nn,c:Cn,z:In,l:Di,k:Ti,n:kn,i:Ai,y:s,V:ir,na:Et,E:jt,R:Yt,s:Gt,x:be,q:X,Q:Fe},sn=Zn(),$t=l.___wasm_call_ctors=function(){return($t=l.___wasm_call_ctors=l.asm.Xa).apply(null,arguments)},gn=l._wasm_popen=function(){return(gn=l._wasm_popen=l.asm.Ya).apply(null,arguments)},Pn=l.___errno_location=function(){return(Pn=l.___errno_location=l.asm.Za).apply(null,arguments)},bt=l._wasm_pclose=function(){return(bt=l._wasm_pclose=l.asm._a).apply(null,arguments)},sr=l._php_pollfd_for=function(){return(sr=l._php_pollfd_for=l.asm.$a).apply(null,arguments)},qr=l._wasm_select=function(){return(qr=l._wasm_select=l.asm.ab).apply(null,arguments)},Qt=l._wasm_add_cli_arg=function(){return(Qt=l._wasm_add_cli_arg=l.asm.bb).apply(null,arguments)},er=l._malloc=function(){return(er=l._malloc=l.asm.cb).apply(null,arguments)},qt=l._run_cli=function(){return(qt=l._run_cli=l.asm.db).apply(null,arguments)},Zr=l._memcpy=function(){return(Zr=l._memcpy=l.asm.eb).apply(null,arguments)},kr=l._free=function(){return(kr=l._free=l.asm.fb).apply(null,arguments)},Ur=l._fflush=function(){return(Ur=l._fflush=l.asm.hb).apply(null,arguments)},nt=l._htons=function(){return(nt=l._htons=l.asm.ib).apply(null,arguments)},Zt=l._ntohs=function(){return(Zt=l._ntohs=l.asm.jb).apply(null,arguments)},kt=l._htonl=function(){return(kt=l._htonl=l.asm.kb).apply(null,arguments)},mn=l._wasm_set_phpini_path=function(){return(mn=l._wasm_set_phpini_path=l.asm.lb).apply(null,arguments)},un=l._wasm_set_phpini_entries=function(){return(un=l._wasm_set_phpini_entries=l.asm.mb).apply(null,arguments)},fn=l._wasm_add_SERVER_entry=function(){return(fn=l._wasm_add_SERVER_entry=l.asm.nb).apply(null,arguments)},Sn=l._wasm_add_uploaded_file=function(){return(Sn=l._wasm_add_uploaded_file=l.asm.ob).apply(null,arguments)},vi=l._wasm_set_query_string=function(){return(vi=l._wasm_set_query_string=l.asm.pb).apply(null,arguments)},mi=l._wasm_set_path_translated=function(){return(mi=l._wasm_set_path_translated=l.asm.qb).apply(null,arguments)},pi=l._wasm_set_skip_shebang=function(){return(pi=l._wasm_set_skip_shebang=l.asm.rb).apply(null,arguments)},hi=l._wasm_set_request_uri=function(){return(hi=l._wasm_set_request_uri=l.asm.sb).apply(null,arguments)},yi=l._wasm_set_request_method=function(){return(yi=l._wasm_set_request_method=l.asm.tb).apply(null,arguments)},wi=l._wasm_set_request_host=function(){return(wi=l._wasm_set_request_host=l.asm.ub).apply(null,arguments)},Ei=l._wasm_set_content_type=function(){return(Ei=l._wasm_set_content_type=l.asm.vb).apply(null,arguments)},gi=l._wasm_set_request_body=function(){return(gi=l._wasm_set_request_body=l.asm.wb).apply(null,arguments)},Si=l._wasm_set_content_length=function(){return(Si=l._wasm_set_content_length=l.asm.xb).apply(null,arguments)},bi=l._wasm_set_cookies=function(){return(bi=l._wasm_set_cookies=l.asm.yb).apply(null,arguments)},ki=l._wasm_set_php_code=function(){return(ki=l._wasm_set_php_code=l.asm.zb).apply(null,arguments)},Rn=l._wasm_set_request_port=function(){return(Rn=l._wasm_set_request_port=l.asm.Ab).apply(null,arguments)},Mn=l._phpwasm_init_uploaded_files_hash=function(){return(Mn=l._phpwasm_init_uploaded_files_hash=l.asm.Bb).apply(null,arguments)},Sr=l._phpwasm_register_uploaded_file=function(){return(Sr=l._phpwasm_register_uploaded_file=l.asm.Cb).apply(null,arguments)},gr=l._phpwasm_destroy_uploaded_files_hash=function(){return(gr=l._phpwasm_destroy_uploaded_files_hash=l.asm.Db).apply(null,arguments)},we=l._wasm_sapi_handle_request=function(){return(we=l._wasm_sapi_handle_request=l.asm.Eb).apply(null,arguments)},Oe=l._php_wasm_init=function(){return(Oe=l._php_wasm_init=l.asm.Fb).apply(null,arguments)},ye=l.___funcs_on_exit=function(){return(ye=l.___funcs_on_exit=l.asm.Gb).apply(null,arguments)},tr=l._emscripten_builtin_memalign=function(){return(tr=l._emscripten_builtin_memalign=l.asm.Hb).apply(null,arguments)},De=l._setThrew=function(){return(De=l._setThrew=l.asm.Ib).apply(null,arguments)},xe=l.stackSave=function(){return(xe=l.stackSave=l.asm.Jb).apply(null,arguments)},Ie=l.stackRestore=function(){return(Ie=l.stackRestore=l.asm.Kb).apply(null,arguments)},ar=l.stackAlloc=function(){return(ar=l.stackAlloc=l.asm.Lb).apply(null,arguments)},Be=l.dynCall_vi=function(){return(Be=l.dynCall_vi=l.asm.Mb).apply(null,arguments)},He=l.dynCall_iiii=function(){return(He=l.dynCall_iiii=l.asm.Nb).apply(null,arguments)},ur=l.dynCall_ii=function(){return(ur=l.dynCall_ii=l.asm.Ob).apply(null,arguments)},Qr=l.dynCall_iiiiii=function(){return(Qr=l.dynCall_iiiiii=l.asm.Pb).apply(null,arguments)},ot=l.dynCall_iiiii=function(){return(ot=l.dynCall_iiiii=l.asm.Qb).apply(null,arguments)},it=l.dynCall_viii=function(){return(it=l.dynCall_viii=l.asm.Rb).apply(null,arguments)},Dt=l.dynCall_vii=function(){return(Dt=l.dynCall_vii=l.asm.Sb).apply(null,arguments)},Ot=l.dynCall_iii=function(){return(Ot=l.dynCall_iii=l.asm.Tb).apply(null,arguments)},Nt=l.dynCall_viiiii=function(){return(Nt=l.dynCall_viiiii=l.asm.Ub).apply(null,arguments)},Tt=l.dynCall_iiiiiii=function(){return(Tt=l.dynCall_iiiiiii=l.asm.Vb).apply(null,arguments)},Ct=l.dynCall_i=function(){return(Ct=l.dynCall_i=l.asm.Wb).apply(null,arguments)},Ft=l.dynCall_v=function(){return(Ft=l.dynCall_v=l.asm.Xb).apply(null,arguments)},At=l.dynCall_viiii=function(){return(At=l.dynCall_viiii=l.asm.Yb).apply(null,arguments)},Pt=l.dynCall_iiiiiiiiii=function(){return(Pt=l.dynCall_iiiiiiiiii=l.asm.Zb).apply(null,arguments)},Rt=l.dynCall_viiiiiiiii=function(){return(Rt=l.dynCall_viiiiiiiii=l.asm._b).apply(null,arguments)},Mt=l.dynCall_viiiiii=function(){return(Mt=l.dynCall_viiiiii=l.asm.$b).apply(null,arguments)},Lt=l.dynCall_iiiiiiii=function(){return(Lt=l.dynCall_iiiiiiii=l.asm.ac).apply(null,arguments)},Vt=l.dynCall_viidii=function(){return(Vt=l.dynCall_viidii=l.asm.bc).apply(null,arguments)},cn=l._asyncify_start_unwind=function(){return(cn=l._asyncify_start_unwind=l.asm.cc).apply(null,arguments)},ln=l._asyncify_stop_unwind=function(){return(ln=l._asyncify_stop_unwind=l.asm.dc).apply(null,arguments)},pn=l._asyncify_start_rewind=function(){return(pn=l._asyncify_start_rewind=l.asm.ec).apply(null,arguments)},hn=l._asyncify_stop_rewind=function(){return(hn=l._asyncify_stop_rewind=l.asm.fc).apply(null,arguments)};function bn(t,a,n,f,v,u,o){var c=xe();try{return Tt(t,a,n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function Nn(t,a){var n=xe();try{Be(t,a)}catch(f){if(Ie(n),f!==f+0)throw f;De(1,0)}}function Tn(t,a,n){var f=xe();try{return Ot(t,a,n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Cn(t,a,n){var f=xe();try{Dt(t,a,n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Ln(t){var a=xe();try{return Ct(t)}catch(n){if(Ie(a),n!==n+0)throw n;De(1,0)}}function Di(t,a,n,f){var v=xe();try{it(t,a,n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Oi(t){var a=xe();try{Ft(t)}catch(n){if(Ie(a),n!==n+0)throw n;De(1,0)}}function Ni(t,a){var n=xe();try{return ur(t,a)}catch(f){if(Ie(n),f!==f+0)throw f;De(1,0)}}function Ti(t,a,n,f,v){var u=xe();try{At(t,a,n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Ci(t,a,n,f,v){var u=xe();try{return ot(t,a,n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Fi(t,a,n,f){var v=xe();try{return He(t,a,n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Ai(t,a,n,f,v,u,o){var c=xe();try{Mt(t,a,n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function kn(t,a,n,f,v,u){var o=xe();try{Nt(t,a,n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function In(t,a,n,f,v,u){var o=xe();try{Vt(t,a,n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function w(t,a,n,f,v,u,o,c,_,m){var p=xe();try{return Pt(t,a,n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}function g(t,a,n,f,v,u){var o=xe();try{return Qr(t,a,n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function s(t,a,n,f,v,u,o,c,_,m){var p=xe();try{Rt(t,a,n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}function d(t,a,n,f,v,u,o,c){var _=xe();try{return Lt(t,a,n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=xr,l.FS=e;var r;$e=function t(){r||i(),r||($e=t)};function i(t){if(t=t||Y,Re>0||(Wn(),Re>0))return;function a(){r||(r=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),a()},1)):a()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return i(),O}var Hc,Bu,Hu=Ki(()=>{"use strict";Hc=10998462,Bu=__dirname+"/php_7_4.wasm"});var Wu={};Hi(Wu,{dependenciesTotalSize:()=>Wc,dependencyFilename:()=>zu,init:()=>jc});function jc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(r,i)=>{throw i},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(r){return l.locateFile?l.locateFile(r,ae):ae+r}var Ye,nr,Me;function Lr(r){if(r instanceof mr)return;ce("exiting due to exception: "+r)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(r,i)=>(wr(),r=Le.normalize(r),V.readFileSync(r,i?void 0:"utf8")),Me=r=>{var i=Ye(r,!0);return i.buffer||(i=new Uint8Array(i)),i},nr=(r,i,t)=>{wr(),r=Le.normalize(r),V.readFile(r,function(a,n){a?t(a):i(n.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(r){if(!(r instanceof mr))throw r}),process.on("unhandledRejection",function(r){throw r}),te=(r,i)=>{if(_r())throw process.exitCode=r,i;Lr(i),process.exit(r)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(r,i){r||ue(i)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(r,i,t){for(var a=i+t,n=i;r[n]&&!(n>=a);)++n;if(n-i>16&&r.buffer&&at)return at.decode(r.subarray(i,n));for(var f="";i<n;){var v=r[i++];if(!(v&128)){f+=String.fromCharCode(v);continue}var u=r[i++]&63;if((v&224)==192){f+=String.fromCharCode((v&31)<<6|u);continue}var o=r[i++]&63;if((v&240)==224?v=(v&15)<<12|u<<6|o:v=(v&7)<<18|u<<12|o<<6|r[i++]&63,v<65536)f+=String.fromCharCode(v);else{var c=v-65536;f+=String.fromCharCode(55296|c>>10,56320|c&1023)}}return f}function ne(r,i){return r?We(de,r,i):""}function Xe(r,i,t,a){if(!(a>0))return 0;for(var n=t,f=t+a-1,v=0;v<r.length;++v){var u=r.charCodeAt(v);if(u>=55296&&u<=57343){var o=r.charCodeAt(++v);u=65536+((u&1023)<<10)|o&1023}if(u<=127){if(t>=f)break;i[t++]=u}else if(u<=2047){if(t+1>=f)break;i[t++]=192|u>>6,i[t++]=128|u&63}else if(u<=65535){if(t+2>=f)break;i[t++]=224|u>>12,i[t++]=128|u>>6&63,i[t++]=128|u&63}else{if(t+3>=f)break;i[t++]=240|u>>18,i[t++]=128|u>>12&63,i[t++]=128|u>>6&63,i[t++]=128|u&63}}return i[t]=0,t-n}function Ae(r,i,t){return Xe(r,de,i,t)}function Pe(r){for(var i=0,t=0;t<r.length;++t){var a=r.charCodeAt(t);a<=127?i++:a<=2047?i+=2:a>=55296&&a<=57343?(i+=4,++t):i+=3}return i}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(r){Cr=r,l.HEAP8=$=new Int8Array(r),l.HEAP16=Ee=new Int16Array(r),l.HEAP32=h=new Int32Array(r),l.HEAPU8=de=new Uint8Array(r),l.HEAPU16=st=new Uint16Array(r),l.HEAPU32=H=new Uint32Array(r),l.HEAPF32=Bn=new Float32Array(r),l.HEAPF64=ut=new Float64Array(r)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){we(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(r){ct.unshift(r)}function Kn(r){lt.unshift(r)}function Gn(r){dt.unshift(r)}var Re=0,Ar=null,$e=null;function Qi(r){return r}function vr(r){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(r){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var i=$e;$e=null,i()}}function ue(r){l.onAbort&&l.onAbort(r),r="Aborted("+r+")",ce(r),Ce=!0,Ge=1,r+=". Build with -sASSERTIONS for more info.";var i=new WebAssembly.RuntimeError(r);throw i}var Xn="data:application/octet-stream;base64,";function vt(r){return r.startsWith(Xn)}var _e;_e=zu,vt(_e)||(_e=cr(_e));function mt(r){try{if(r==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(r);throw"both async and sync fetching of the wasm failed"}catch(i){ue(i)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+_e+"'";return r.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var r={a:Te};function i(v,u){var o=v.exports;o=Fe.instrumentWasmExports(o),l.asm=o,or=l.asm.Ua,ft(or.buffer),xn=l.asm.eb,Kn(l.asm.Va),Ze("wasm-instantiate")}vr("wasm-instantiate");function t(v){i(v.instance)}function a(v){return $n().then(function(u){return WebAssembly.instantiate(u,r)}).then(function(u){return u}).then(v,function(u){ce("failed to asynchronously prepare wasm: "+u),ue(u)})}function n(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(v){var u=WebAssembly.instantiateStreaming(v,r);return u.then(t,function(o){return ce("wasm streaming compile failed: "+o),ce("falling back to ArrayBuffer instantiation"),a(t)})}):a(t)}if(l.instantiateWasm)try{var f=l.instantiateWasm(r,i);return f=Fe.instrumentWasmExports(f),f}catch(v){return ce("Module.instantiateWasm callback failed with error: "+v),!1}return n(),{}}var P,q;function mr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function pr(r){for(;r.length>0;)r.shift()(l)}function pt(r){if(r instanceof mr||r=="unwind")return Ge;te(1,r)}function ht(r,i){$.set(r,i)}function Jn(r,i,t,a){ue("Assertion failed: "+ne(r)+", at: "+[i?ne(i):"unknown filename",t,a?ne(a):"unknown function"])}function Qn(r,i){(function(t){Ie.apply(null,[r,t])})(i)}var U={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return i.exec(r).slice(1)},normalizeArray:(r,i)=>{for(var t=0,a=r.length-1;a>=0;a--){var n=r[a];n==="."?r.splice(a,1):n===".."?(r.splice(a,1),t++):t&&(r.splice(a,1),t--)}if(i)for(;t;t--)r.unshift("..");return r},normalize:r=>{var i=U.isAbs(r),t=r.substr(-1)==="/";return r=U.normalizeArray(r.split("/").filter(a=>!!a),!i).join("/"),!r&&!i&&(r="."),r&&t&&(r+="/"),(i?"/":"")+r},dirname:r=>{var i=U.splitPath(r),t=i[0],a=i[1];return!t&&!a?".":(a&&(a=a.substr(0,a.length-1)),t+a)},basename:r=>{if(r==="/")return"/";r=U.normalize(r),r=r.replace(/\/$/,"");var i=r.lastIndexOf("/");return i===-1?r:r.substr(i+1)},join:function(){var r=Array.prototype.slice.call(arguments);return U.normalize(r.join("/"))},join2:(r,i)=>U.normalize(r+"/"+i)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}else if(Z)try{var i=require("crypto");return()=>i.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var r="",i=!1,t=arguments.length-1;t>=-1&&!i;t--){var a=t>=0?arguments[t]:e.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";r=a+"/"+r,i=U.isAbs(a)}return r=U.normalizeArray(r.split("/").filter(n=>!!n),!i).join("/"),(i?"/":"")+r||"."},relative:(r,i)=>{r=ge.resolve(r).substr(1),i=ge.resolve(i).substr(1);function t(c){for(var _=0;_<c.length&&c[_]==="";_++);for(var m=c.length-1;m>=0&&c[m]==="";m--);return _>m?[]:c.slice(_,m-_+1)}for(var a=t(r.split("/")),n=t(i.split("/")),f=Math.min(a.length,n.length),v=f,u=0;u<f;u++)if(a[u]!==n[u]){v=u;break}for(var o=[],u=v;u<a.length;u++)o.push("..");return o=o.concat(n.slice(v)),o.join("/")}};function Je(r,i,t){var a=t>0?t:Pe(r)+1,n=new Array(a),f=Xe(r,n,0,n.length);return i&&(n.length=f),n}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(r,i){Se.ttys[r]={input:[],output:[],ops:i},e.registerDevice(r,Se.stream_ops)},stream_ops:{open:function(r){var i=Se.ttys[r.node.rdev];if(!i)throw new e.ErrnoError(43);r.tty=i,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.get_char)throw new e.ErrnoError(60);for(var f=0,v=0;v<a;v++){var u;try{u=r.tty.ops.get_char(r.tty)}catch{throw new e.ErrnoError(29)}if(u===void 0&&f===0)throw new e.ErrnoError(6);if(u==null)break;f++,i[t+v]=u}return f&&(r.node.timestamp=Date.now()),f},write:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var f=0;f<a;f++)r.tty.ops.put_char(r.tty,i[t+f])}catch{throw new e.ErrnoError(29)}return a&&(r.node.timestamp=Date.now()),f}},default_tty_ops:{get_char:function(r){if(!r.input.length){var i=null;if(Z){var t=256,a=Buffer.alloc(t),n=0;try{n=V.readSync(process.stdin.fd,a,0,t,-1)}catch(f){if(f.toString().includes("EOF"))n=0;else throw f}n>0?i=a.slice(0,n).toString("utf-8"):i=null}else typeof window<"u"&&typeof window.prompt=="function"?(i=window.prompt("Input: "),i!==null&&(i+=`
|
|
19
|
+
`},"%p":function(C){return C.tm_hour>=0&&C.tm_hour<12?"AM":"PM"},"%S":function(C){return E(C.tm_sec,2)},"%t":function(){return" "},"%u":function(C){return C.tm_wday||7},"%U":function(C){var A=C.tm_yday+7-C.tm_wday;return E(Math.floor(A/7),2)},"%V":function(C){var A=Math.floor((C.tm_yday+7-(C.tm_wday+6)%7)/7);if((C.tm_wday+371-C.tm_yday-2)%7<=2&&A++,A){if(A==53){var z=(C.tm_wday+371-C.tm_yday)%7;z!=4&&(z!=3||!qe(C.tm_year))&&(A=1)}}else{A=52;var I=(C.tm_wday+7-C.tm_yday-1)%7;(I==4||I==5&&qe(C.tm_year%400-1))&&A++}return E(A,2)},"%w":function(C){return C.tm_wday},"%W":function(C){var A=C.tm_yday+7-(C.tm_wday+6)%7;return E(Math.floor(A/7),2)},"%y":function(C){return(C.tm_year+1900).toString().substring(2)},"%Y":function(C){return C.tm_year+1900},"%z":function(C){var A=C.tm_gmtoff,I=A>=0;return A=Math.abs(A)/60,A=A/60*100+A%60,(I?"+":"-")+("0000"+A).slice(-4)},"%Z":function(C){return C.tm_zone},"%%":function(){return"%"}};o=o.replace(/%%/g,"\0\0");for(var _ in D)o.includes(_)&&(o=o.replace(new RegExp(_,"g"),D[_](u)));o=o.replace(/\0\0/g,"%");var T=Je(o,!1);return T.length>a?0:(ht(T,t),T.length-1)}function Yt(t,a,n){for(var f=ne(a),v="\\!@#$^&*()+=-[]/{}|:<>?,.",u=0,o=v.length;u<o;++u)f=f.replace(new RegExp("\\"+v[u],"g"),"\\"+v[u]);var c={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var _ in c)f=f.replace(_,c[_]);var m={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},p={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},y={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},E={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var S in m)f=f.replace(S,"("+S+m[S]+")");for(var b=[],u=f.indexOf("%");u>=0;u=f.indexOf("%"))b.push(f[u+1]),f=f.replace(new RegExp("\\%"+f[u+1],"g"),"");var k=new RegExp("^"+f,"i").exec(ne(t));function D(){function Dr(yr,Vr,Kr){return typeof yr!="number"||isNaN(yr)?Vr:yr>=Vr?yr<=Kr?yr:Kr:Vr}return{year:Dr(h[n+20>>2]+1900,1970,9999),month:Dr(h[n+16>>2],0,11),day:Dr(h[n+12>>2],1,31),hour:Dr(h[n+8>>2],0,23),min:Dr(h[n+4>>2],0,59),sec:Dr(h[n>>2],0,59)}}if(k){var T=D(),C,A=Dr=>{var yr=b.indexOf(Dr);if(yr>=0)return k[yr+1]};if((C=A("S"))&&(T.sec=Q(C)),(C=A("M"))&&(T.min=Q(C)),C=A("H"))T.hour=Q(C);else if(C=A("I")){var I=Q(C);(C=A("p"))&&(I+=C.toUpperCase()[0]==="P"?12:0),T.hour=I}if(C=A("Y"))T.year=Q(C);else if(C=A("y")){var z=Q(C);(C=A("C"))?z+=Q(C)*100:z+=z<69?2e3:1900,T.year=z}if((C=A("m"))?T.month=Q(C)-1:(C=A("b"))&&(T.month=p[C.substring(0,3).toUpperCase()]||0),C=A("d"))T.day=Q(C);else if(C=A("j"))for(var K=Q(C),B=qe(T.year),x=0;x<12;++x){var G=Er(B?fr:Tr,x-1);K<=G+(B?fr:Tr)[x]&&(T.day=K-G)}else if(C=A("a")){var re=C.substring(0,3).toUpperCase();if(C=A("U")){var oe=y[re],le=Q(C),he=new Date(T.year,0,1),ze;he.getDay()===0?ze=Yr(he,oe+7*(le-1)):ze=Yr(he,7-he.getDay()+oe+7*(le-1)),T.day=ze.getDate(),T.month=ze.getMonth()}else if(C=A("W")){var oe=E[re],le=Q(C),he=new Date(T.year,0,1),ze;he.getDay()===1?ze=Yr(he,oe+7*(le-1)):ze=Yr(he,7-he.getDay()+1+oe+7*(le-1)),T.day=ze.getDate(),T.month=ze.getMonth()}}var Ve=new Date(T.year,T.month,T.day,T.hour,T.min,T.sec,0);return h[n>>2]=Ve.getSeconds(),h[n+4>>2]=Ve.getMinutes(),h[n+8>>2]=Ve.getHours(),h[n+12>>2]=Ve.getDate(),h[n+16>>2]=Ve.getMonth(),h[n+20>>2]=Ve.getFullYear()-1900,h[n+24>>2]=Ve.getDay(),h[n+28>>2]=Er(qe(Ve.getFullYear())?fr:Tr,Ve.getMonth()-1)+Ve.getDate()-1,h[n+32>>2]=0,t+Je(k[0]).length-1}return 0}function Gt(t){return Ue.shutdownSocket(t,2)}function be(t,a,n){if(typeof ie>"u")return 0;let f=1,v=2,u=4,o=8,c=16,_=32;return ie.handleSleep(m=>{let p=ve(t);if(!p){m(0);return}let y=[],E=new Set;if(a&f||a&v){if(p.server){for(let C of p.pending)if((C.recv_queue||[]).length>0){m(1);return}}else if((p.recv_queue||[]).length>0){m(1);return}}let S=Ue.getAllWebSockets(p);if(!S.length){m(0);return}for(let C of S)(a&f||a&v)&&(y.push(Ue.awaitData(C)),E.add("POLLIN")),a&u&&(y.push(Ue.awaitConnection(C)),E.add("POLLOUT")),a&c&&(y.push(Ue.awaitClose(C)),E.add("POLLHUP")),(a&o||a&_)&&(y.push(Ue.awaitError(C)),E.add("POLLERR"));if(y.length===0){console.warn("Unsupported poll event "+a+", defaulting to setTimeout()."),setTimeout(function(){m(0)},n);return}let b=y.map(([C])=>C),k=()=>y.forEach(([,C])=>C()),D=!1;Promise.race(b).then(function(C){D||(D=!0,m(1),clearTimeout(T),k())});let T=setTimeout(function(){D||(D=!0,m(0),k())},n)})}function X(t,a,n,f,v){let u=de[f];if(!(a===1&&n===9||a===6&&n===1))return console.warn(`Unsupported socket option: ${a}, ${n}, ${u}`),-1;let y=Ue.getAllWebSockets(t)[0];return y?(y.setSocketOpt(a,n,f),0):-1}function Fe(t,a){return Ue.shutdownSocket(t,a)}function Xt(t){try{return t()}catch(a){ue(a)}}var ie={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(t){var a=ie.callStackNameToId[t];return a===void 0&&(a=ie.callStackId++,ie.callStackNameToId[t]=a,ie.callStackIdToName[a]=t),a},instrumentWasmImports:function(t){var a=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(f=>f.split(".")[1]);for(var n in t)(function(f){var v=t[f],u=v.sig;if(typeof v=="function")var o=a.indexOf(f)>=0||f.startsWith("__asyncjs__")})(n)},instrumentWasmExports:function(t){var a={};for(var n in t)(function(f){var v=t[f];typeof v=="function"?a[f]=function(){ie.exportCallStack.push(f);try{return v.apply(null,arguments)}finally{if(!Ce){var u=ie.exportCallStack.pop();Ne(u===f),ie.maybeStopUnwind()}}}:a[f]=v})(n);return a},maybeStopUnwind:function(){ie.currData&&ie.state===ie.State.Unwinding&&ie.exportCallStack.length===0&&(ie.state=ie.State.Normal,Bt(),Xt(ln),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((t,a)=>{ie.asyncPromiseHandlers={resolve:t,reject:a}})},allocateData:function(){var t=er(12+ie.StackSize);return ie.setDataHeader(t,t+12,ie.StackSize),ie.setDataRewindFunc(t),t},setDataHeader:function(t,a,n){h[t>>2]=a,h[t+4>>2]=a+n},setDataRewindFunc:function(t){var a=ie.exportCallStack[0],n=ie.getCallStackId(a);h[t+8>>2]=n},getDataRewindFunc:function(t){var a=h[t+8>>2],n=ie.callStackIdToName[a],f=l.asm[n];return f},doRewind:function(t){var a=ie.getDataRewindFunc(t);return xt(),a()},handleSleep:function(t){if(!Ce){if(ie.state===ie.State.Normal){var a=!1,n=!1;t(f=>{if(!Ce&&(ie.handleSleepReturnValue=f||0,a=!0,!!n)){ie.state=ie.State.Rewinding,Xt(()=>pn(ie.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var v,u=!1;try{v=ie.doRewind(ie.currData)}catch(_){v=_,u=!0}var o=!1;if(!ie.currData){var c=ie.asyncPromiseHandlers;c&&(ie.asyncPromiseHandlers=null,(u?c.reject:c.resolve)(v),o=!0)}if(u&&!o)throw v}}),n=!0,a||(ie.state=ie.State.Unwinding,ie.currData=ie.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),Xt(()=>cn(ie.currData)))}else ie.state===ie.State.Rewinding?(ie.state=ie.State.Normal,Xt(hn),kr(ie.currData),ie.currData=null,ie.sleepCallbacks.forEach(f=>jr(f))):ue("invalid state: "+ie.state);return ie.handleSleepReturnValue}},handleAsync:function(t){return ie.handleSleep(a=>{t().then(a)})}};function Gr(t){var a=l["_"+t];return a}function xr(t,a,n,f,v){var u={string:D=>{var T=0;if(D!=null&&D!==0){var C=(D.length<<2)+1;T=ar(C),Ae(D,T,C)}return T},array:D=>{var T=ar(D.length);return ht(D,T),T}};function o(D){return a==="string"?ne(D):a==="boolean"?!!D:D}var c=Gr(t),_=[],m=0;if(f)for(var p=0;p<f.length;p++){var y=u[n[p]];y?(m===0&&(m=xe()),_[p]=y(f[p])):_[p]=f[p]}var E=ie.currData,S=c.apply(null,_);function b(D){return xt(),m!==0&&Ie(m),o(D)}Bt();var k=v&&v.async;return ie.currData!=E?ie.whenDone().then(b):(S=b(S),k?Promise.resolve(S):S)}var ke=function(t,a,n,f){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=e.nextInode++,this.name=a,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=f},Te=365,an=146;Object.defineProperties(ke.prototype,{read:{get:function(){return(this.mode&Te)===Te},set:function(t){t?this.mode|=Te:this.mode&=~Te}},write:{get:function(){return(this.mode&an)===an},set:function(t){t?this.mode|=an:this.mode&=~an}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ke,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var On={j:Jn,Va:Qn,Ua:no,Ta:oo,Sa:io,Ra:ao,P:so,Qa:uo,Pa:fo,Oa:co,Na:lo,U:_o,Ma:vo,La:mo,O:po,o:rn,Ka:ho,Ja:yo,T:wo,Ia:Eo,Ha:go,Ga:So,Fa:bo,Ea:ko,N:Do,Da:Oo,Ca:No,Ba:To,Aa:se,w:Co,za:Fo,ya:Ao,xa:Po,wa:Ro,va:Mo,M:Lo,ua:Io,L:Uo,ta:Bo,sa:xo,ra:Br,D:Ho,qa:tn,ma:zo,la:Wo,ka:jo,ja:qo,ia:Vo,ha:Ko,ga:Go,fa:Xo,ea:nn,da:$o,ca:It,m:on,B:Jo,ba:Qo,A:Ut,aa:ei,$:ri,_:ni,pa:oi,oa:ii,p:gt,r:ai,K:si,J:fi,S:ci,C:vn,Z:An,I:di,H:En,Y:Jr,G:St,X:br,W:je,h:Ln,d:Ni,b:Tn,f:Fi,g:Ci,u:g,t:bn,v:d,F:w,e:Oi,a:Nn,c:Cn,z:In,l:Di,k:Ti,n:kn,i:Ai,y:s,V:ir,na:Et,E:jt,R:Yt,s:Gt,x:be,q:X,Q:Fe},sn=Zn(),$t=l.___wasm_call_ctors=function(){return($t=l.___wasm_call_ctors=l.asm.Xa).apply(null,arguments)},gn=l._wasm_popen=function(){return(gn=l._wasm_popen=l.asm.Ya).apply(null,arguments)},Pn=l.___errno_location=function(){return(Pn=l.___errno_location=l.asm.Za).apply(null,arguments)},bt=l._wasm_pclose=function(){return(bt=l._wasm_pclose=l.asm._a).apply(null,arguments)},sr=l._php_pollfd_for=function(){return(sr=l._php_pollfd_for=l.asm.$a).apply(null,arguments)},qr=l._wasm_select=function(){return(qr=l._wasm_select=l.asm.ab).apply(null,arguments)},Qt=l._wasm_add_cli_arg=function(){return(Qt=l._wasm_add_cli_arg=l.asm.bb).apply(null,arguments)},er=l._malloc=function(){return(er=l._malloc=l.asm.cb).apply(null,arguments)},qt=l._run_cli=function(){return(qt=l._run_cli=l.asm.db).apply(null,arguments)},Zr=l._memcpy=function(){return(Zr=l._memcpy=l.asm.eb).apply(null,arguments)},kr=l._free=function(){return(kr=l._free=l.asm.fb).apply(null,arguments)},Ur=l._fflush=function(){return(Ur=l._fflush=l.asm.hb).apply(null,arguments)},nt=l._htons=function(){return(nt=l._htons=l.asm.ib).apply(null,arguments)},Zt=l._ntohs=function(){return(Zt=l._ntohs=l.asm.jb).apply(null,arguments)},kt=l._htonl=function(){return(kt=l._htonl=l.asm.kb).apply(null,arguments)},mn=l._wasm_set_phpini_path=function(){return(mn=l._wasm_set_phpini_path=l.asm.lb).apply(null,arguments)},un=l._wasm_set_phpini_entries=function(){return(un=l._wasm_set_phpini_entries=l.asm.mb).apply(null,arguments)},fn=l._wasm_add_SERVER_entry=function(){return(fn=l._wasm_add_SERVER_entry=l.asm.nb).apply(null,arguments)},Sn=l._wasm_add_uploaded_file=function(){return(Sn=l._wasm_add_uploaded_file=l.asm.ob).apply(null,arguments)},vi=l._wasm_set_query_string=function(){return(vi=l._wasm_set_query_string=l.asm.pb).apply(null,arguments)},mi=l._wasm_set_path_translated=function(){return(mi=l._wasm_set_path_translated=l.asm.qb).apply(null,arguments)},pi=l._wasm_set_skip_shebang=function(){return(pi=l._wasm_set_skip_shebang=l.asm.rb).apply(null,arguments)},hi=l._wasm_set_request_uri=function(){return(hi=l._wasm_set_request_uri=l.asm.sb).apply(null,arguments)},yi=l._wasm_set_request_method=function(){return(yi=l._wasm_set_request_method=l.asm.tb).apply(null,arguments)},wi=l._wasm_set_request_host=function(){return(wi=l._wasm_set_request_host=l.asm.ub).apply(null,arguments)},Ei=l._wasm_set_content_type=function(){return(Ei=l._wasm_set_content_type=l.asm.vb).apply(null,arguments)},gi=l._wasm_set_request_body=function(){return(gi=l._wasm_set_request_body=l.asm.wb).apply(null,arguments)},Si=l._wasm_set_content_length=function(){return(Si=l._wasm_set_content_length=l.asm.xb).apply(null,arguments)},bi=l._wasm_set_cookies=function(){return(bi=l._wasm_set_cookies=l.asm.yb).apply(null,arguments)},ki=l._wasm_set_php_code=function(){return(ki=l._wasm_set_php_code=l.asm.zb).apply(null,arguments)},Rn=l._wasm_set_request_port=function(){return(Rn=l._wasm_set_request_port=l.asm.Ab).apply(null,arguments)},Mn=l._phpwasm_init_uploaded_files_hash=function(){return(Mn=l._phpwasm_init_uploaded_files_hash=l.asm.Bb).apply(null,arguments)},Sr=l._phpwasm_register_uploaded_file=function(){return(Sr=l._phpwasm_register_uploaded_file=l.asm.Cb).apply(null,arguments)},gr=l._phpwasm_destroy_uploaded_files_hash=function(){return(gr=l._phpwasm_destroy_uploaded_files_hash=l.asm.Db).apply(null,arguments)},we=l._wasm_sapi_handle_request=function(){return(we=l._wasm_sapi_handle_request=l.asm.Eb).apply(null,arguments)},Oe=l._php_wasm_init=function(){return(Oe=l._php_wasm_init=l.asm.Fb).apply(null,arguments)},ye=l.___funcs_on_exit=function(){return(ye=l.___funcs_on_exit=l.asm.Gb).apply(null,arguments)},tr=l._emscripten_builtin_memalign=function(){return(tr=l._emscripten_builtin_memalign=l.asm.Hb).apply(null,arguments)},De=l._setThrew=function(){return(De=l._setThrew=l.asm.Ib).apply(null,arguments)},xe=l.stackSave=function(){return(xe=l.stackSave=l.asm.Jb).apply(null,arguments)},Ie=l.stackRestore=function(){return(Ie=l.stackRestore=l.asm.Kb).apply(null,arguments)},ar=l.stackAlloc=function(){return(ar=l.stackAlloc=l.asm.Lb).apply(null,arguments)},Be=l.dynCall_vi=function(){return(Be=l.dynCall_vi=l.asm.Mb).apply(null,arguments)},He=l.dynCall_iiii=function(){return(He=l.dynCall_iiii=l.asm.Nb).apply(null,arguments)},ur=l.dynCall_ii=function(){return(ur=l.dynCall_ii=l.asm.Ob).apply(null,arguments)},Qr=l.dynCall_iiiiii=function(){return(Qr=l.dynCall_iiiiii=l.asm.Pb).apply(null,arguments)},ot=l.dynCall_iiiii=function(){return(ot=l.dynCall_iiiii=l.asm.Qb).apply(null,arguments)},it=l.dynCall_viii=function(){return(it=l.dynCall_viii=l.asm.Rb).apply(null,arguments)},Dt=l.dynCall_vii=function(){return(Dt=l.dynCall_vii=l.asm.Sb).apply(null,arguments)},Ot=l.dynCall_iii=function(){return(Ot=l.dynCall_iii=l.asm.Tb).apply(null,arguments)},Nt=l.dynCall_viiiii=function(){return(Nt=l.dynCall_viiiii=l.asm.Ub).apply(null,arguments)},Tt=l.dynCall_iiiiiii=function(){return(Tt=l.dynCall_iiiiiii=l.asm.Vb).apply(null,arguments)},Ct=l.dynCall_i=function(){return(Ct=l.dynCall_i=l.asm.Wb).apply(null,arguments)},Ft=l.dynCall_v=function(){return(Ft=l.dynCall_v=l.asm.Xb).apply(null,arguments)},At=l.dynCall_viiii=function(){return(At=l.dynCall_viiii=l.asm.Yb).apply(null,arguments)},Pt=l.dynCall_iiiiiiiiii=function(){return(Pt=l.dynCall_iiiiiiiiii=l.asm.Zb).apply(null,arguments)},Rt=l.dynCall_viiiiiiiii=function(){return(Rt=l.dynCall_viiiiiiiii=l.asm._b).apply(null,arguments)},Mt=l.dynCall_viiiiii=function(){return(Mt=l.dynCall_viiiiii=l.asm.$b).apply(null,arguments)},Lt=l.dynCall_iiiiiiii=function(){return(Lt=l.dynCall_iiiiiiii=l.asm.ac).apply(null,arguments)},Vt=l.dynCall_viidii=function(){return(Vt=l.dynCall_viidii=l.asm.bc).apply(null,arguments)},cn=l._asyncify_start_unwind=function(){return(cn=l._asyncify_start_unwind=l.asm.cc).apply(null,arguments)},ln=l._asyncify_stop_unwind=function(){return(ln=l._asyncify_stop_unwind=l.asm.dc).apply(null,arguments)},pn=l._asyncify_start_rewind=function(){return(pn=l._asyncify_start_rewind=l.asm.ec).apply(null,arguments)},hn=l._asyncify_stop_rewind=function(){return(hn=l._asyncify_stop_rewind=l.asm.fc).apply(null,arguments)};function bn(t,a,n,f,v,u,o){var c=xe();try{return Tt(t,a,n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function Nn(t,a){var n=xe();try{Be(t,a)}catch(f){if(Ie(n),f!==f+0)throw f;De(1,0)}}function Tn(t,a,n){var f=xe();try{return Ot(t,a,n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Cn(t,a,n){var f=xe();try{Dt(t,a,n)}catch(v){if(Ie(f),v!==v+0)throw v;De(1,0)}}function Ln(t){var a=xe();try{return Ct(t)}catch(n){if(Ie(a),n!==n+0)throw n;De(1,0)}}function Di(t,a,n,f){var v=xe();try{it(t,a,n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Oi(t){var a=xe();try{Ft(t)}catch(n){if(Ie(a),n!==n+0)throw n;De(1,0)}}function Ni(t,a){var n=xe();try{return ur(t,a)}catch(f){if(Ie(n),f!==f+0)throw f;De(1,0)}}function Ti(t,a,n,f,v){var u=xe();try{At(t,a,n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Ci(t,a,n,f,v){var u=xe();try{return ot(t,a,n,f,v)}catch(o){if(Ie(u),o!==o+0)throw o;De(1,0)}}function Fi(t,a,n,f){var v=xe();try{return He(t,a,n,f)}catch(u){if(Ie(v),u!==u+0)throw u;De(1,0)}}function Ai(t,a,n,f,v,u,o){var c=xe();try{Mt(t,a,n,f,v,u,o)}catch(_){if(Ie(c),_!==_+0)throw _;De(1,0)}}function kn(t,a,n,f,v,u){var o=xe();try{Nt(t,a,n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function In(t,a,n,f,v,u){var o=xe();try{Vt(t,a,n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function w(t,a,n,f,v,u,o,c,_,m){var p=xe();try{return Pt(t,a,n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}function g(t,a,n,f,v,u){var o=xe();try{return Qr(t,a,n,f,v,u)}catch(c){if(Ie(o),c!==c+0)throw c;De(1,0)}}function s(t,a,n,f,v,u,o,c,_,m){var p=xe();try{Rt(t,a,n,f,v,u,o,c,_,m)}catch(y){if(Ie(p),y!==y+0)throw y;De(1,0)}}function d(t,a,n,f,v,u,o,c){var _=xe();try{return Lt(t,a,n,f,v,u,o,c)}catch(m){if(Ie(_),m!==m+0)throw m;De(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=xr,l.FS=e;var r;$e=function t(){r||i(),r||($e=t)};function i(t){if(t=t||Y,Re>0||(Wn(),Re>0))return;function a(){r||(r=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),a()},1)):a()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return i(),O}var Hc,Bu,Hu=Ki(()=>{"use strict";Hc=10998462,Bu=__dirname+"/php_7_4.wasm"});var Wu={};Wi(Wu,{dependenciesTotalSize:()=>Wc,dependencyFilename:()=>zu,init:()=>jc});function jc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(r,i)=>{throw i},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(r){return l.locateFile?l.locateFile(r,ae):ae+r}var Ye,nr,Me;function Lr(r){if(r instanceof mr)return;ce("exiting due to exception: "+r)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(r,i)=>(wr(),r=Le.normalize(r),V.readFileSync(r,i?void 0:"utf8")),Me=r=>{var i=Ye(r,!0);return i.buffer||(i=new Uint8Array(i)),i},nr=(r,i,t)=>{wr(),r=Le.normalize(r),V.readFile(r,function(a,n){a?t(a):i(n.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(r){if(!(r instanceof mr))throw r}),process.on("unhandledRejection",function(r){throw r}),te=(r,i)=>{if(_r())throw process.exitCode=r,i;Lr(i),process.exit(r)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(r,i){r||ue(i)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(r,i,t){for(var a=i+t,n=i;r[n]&&!(n>=a);)++n;if(n-i>16&&r.buffer&&at)return at.decode(r.subarray(i,n));for(var f="";i<n;){var v=r[i++];if(!(v&128)){f+=String.fromCharCode(v);continue}var u=r[i++]&63;if((v&224)==192){f+=String.fromCharCode((v&31)<<6|u);continue}var o=r[i++]&63;if((v&240)==224?v=(v&15)<<12|u<<6|o:v=(v&7)<<18|u<<12|o<<6|r[i++]&63,v<65536)f+=String.fromCharCode(v);else{var c=v-65536;f+=String.fromCharCode(55296|c>>10,56320|c&1023)}}return f}function ne(r,i){return r?We(de,r,i):""}function Xe(r,i,t,a){if(!(a>0))return 0;for(var n=t,f=t+a-1,v=0;v<r.length;++v){var u=r.charCodeAt(v);if(u>=55296&&u<=57343){var o=r.charCodeAt(++v);u=65536+((u&1023)<<10)|o&1023}if(u<=127){if(t>=f)break;i[t++]=u}else if(u<=2047){if(t+1>=f)break;i[t++]=192|u>>6,i[t++]=128|u&63}else if(u<=65535){if(t+2>=f)break;i[t++]=224|u>>12,i[t++]=128|u>>6&63,i[t++]=128|u&63}else{if(t+3>=f)break;i[t++]=240|u>>18,i[t++]=128|u>>12&63,i[t++]=128|u>>6&63,i[t++]=128|u&63}}return i[t]=0,t-n}function Ae(r,i,t){return Xe(r,de,i,t)}function Pe(r){for(var i=0,t=0;t<r.length;++t){var a=r.charCodeAt(t);a<=127?i++:a<=2047?i+=2:a>=55296&&a<=57343?(i+=4,++t):i+=3}return i}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(r){Cr=r,l.HEAP8=$=new Int8Array(r),l.HEAP16=Ee=new Int16Array(r),l.HEAP32=h=new Int32Array(r),l.HEAPU8=de=new Uint8Array(r),l.HEAPU16=st=new Uint16Array(r),l.HEAPU32=H=new Uint32Array(r),l.HEAPF32=Bn=new Float32Array(r),l.HEAPF64=ut=new Float64Array(r)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){we(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(r){ct.unshift(r)}function Kn(r){lt.unshift(r)}function Gn(r){dt.unshift(r)}var Re=0,Ar=null,$e=null;function Qi(r){return r}function vr(r){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(r){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var i=$e;$e=null,i()}}function ue(r){l.onAbort&&l.onAbort(r),r="Aborted("+r+")",ce(r),Ce=!0,Ge=1,r+=". Build with -sASSERTIONS for more info.";var i=new WebAssembly.RuntimeError(r);throw i}var Xn="data:application/octet-stream;base64,";function vt(r){return r.startsWith(Xn)}var _e;_e=zu,vt(_e)||(_e=cr(_e));function mt(r){try{if(r==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(r);throw"both async and sync fetching of the wasm failed"}catch(i){ue(i)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+_e+"'";return r.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var r={a:Te};function i(v,u){var o=v.exports;o=Fe.instrumentWasmExports(o),l.asm=o,or=l.asm.Ua,ft(or.buffer),xn=l.asm.eb,Kn(l.asm.Va),Ze("wasm-instantiate")}vr("wasm-instantiate");function t(v){i(v.instance)}function a(v){return $n().then(function(u){return WebAssembly.instantiate(u,r)}).then(function(u){return u}).then(v,function(u){ce("failed to asynchronously prepare wasm: "+u),ue(u)})}function n(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(v){var u=WebAssembly.instantiateStreaming(v,r);return u.then(t,function(o){return ce("wasm streaming compile failed: "+o),ce("falling back to ArrayBuffer instantiation"),a(t)})}):a(t)}if(l.instantiateWasm)try{var f=l.instantiateWasm(r,i);return f=Fe.instrumentWasmExports(f),f}catch(v){return ce("Module.instantiateWasm callback failed with error: "+v),!1}return n(),{}}var P,q;function mr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function pr(r){for(;r.length>0;)r.shift()(l)}function pt(r){if(r instanceof mr||r=="unwind")return Ge;te(1,r)}function ht(r,i){$.set(r,i)}function Jn(r,i,t,a){ue("Assertion failed: "+ne(r)+", at: "+[i?ne(i):"unknown filename",t,a?ne(a):"unknown function"])}function Qn(r,i){(function(t){Ie.apply(null,[r,t])})(i)}var U={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return i.exec(r).slice(1)},normalizeArray:(r,i)=>{for(var t=0,a=r.length-1;a>=0;a--){var n=r[a];n==="."?r.splice(a,1):n===".."?(r.splice(a,1),t++):t&&(r.splice(a,1),t--)}if(i)for(;t;t--)r.unshift("..");return r},normalize:r=>{var i=U.isAbs(r),t=r.substr(-1)==="/";return r=U.normalizeArray(r.split("/").filter(a=>!!a),!i).join("/"),!r&&!i&&(r="."),r&&t&&(r+="/"),(i?"/":"")+r},dirname:r=>{var i=U.splitPath(r),t=i[0],a=i[1];return!t&&!a?".":(a&&(a=a.substr(0,a.length-1)),t+a)},basename:r=>{if(r==="/")return"/";r=U.normalize(r),r=r.replace(/\/$/,"");var i=r.lastIndexOf("/");return i===-1?r:r.substr(i+1)},join:function(){var r=Array.prototype.slice.call(arguments);return U.normalize(r.join("/"))},join2:(r,i)=>U.normalize(r+"/"+i)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}else if(Z)try{var i=require("crypto");return()=>i.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var r="",i=!1,t=arguments.length-1;t>=-1&&!i;t--){var a=t>=0?arguments[t]:e.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";r=a+"/"+r,i=U.isAbs(a)}return r=U.normalizeArray(r.split("/").filter(n=>!!n),!i).join("/"),(i?"/":"")+r||"."},relative:(r,i)=>{r=ge.resolve(r).substr(1),i=ge.resolve(i).substr(1);function t(c){for(var _=0;_<c.length&&c[_]==="";_++);for(var m=c.length-1;m>=0&&c[m]==="";m--);return _>m?[]:c.slice(_,m-_+1)}for(var a=t(r.split("/")),n=t(i.split("/")),f=Math.min(a.length,n.length),v=f,u=0;u<f;u++)if(a[u]!==n[u]){v=u;break}for(var o=[],u=v;u<a.length;u++)o.push("..");return o=o.concat(n.slice(v)),o.join("/")}};function Je(r,i,t){var a=t>0?t:Pe(r)+1,n=new Array(a),f=Xe(r,n,0,n.length);return i&&(n.length=f),n}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(r,i){Se.ttys[r]={input:[],output:[],ops:i},e.registerDevice(r,Se.stream_ops)},stream_ops:{open:function(r){var i=Se.ttys[r.node.rdev];if(!i)throw new e.ErrnoError(43);r.tty=i,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.get_char)throw new e.ErrnoError(60);for(var f=0,v=0;v<a;v++){var u;try{u=r.tty.ops.get_char(r.tty)}catch{throw new e.ErrnoError(29)}if(u===void 0&&f===0)throw new e.ErrnoError(6);if(u==null)break;f++,i[t+v]=u}return f&&(r.node.timestamp=Date.now()),f},write:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var f=0;f<a;f++)r.tty.ops.put_char(r.tty,i[t+f])}catch{throw new e.ErrnoError(29)}return a&&(r.node.timestamp=Date.now()),f}},default_tty_ops:{get_char:function(r){if(!r.input.length){var i=null;if(Z){var t=256,a=Buffer.alloc(t),n=0;try{n=V.readSync(process.stdin.fd,a,0,t,-1)}catch(f){if(f.toString().includes("EOF"))n=0;else throw f}n>0?i=a.slice(0,n).toString("utf-8"):i=null}else typeof window<"u"&&typeof window.prompt=="function"?(i=window.prompt("Input: "),i!==null&&(i+=`
|
|
20
20
|
`)):typeof readline=="function"&&(i=readline(),i!==null&&(i+=`
|
|
21
21
|
`));if(!i)return null;r.input=Je(i,!0)}return r.input.shift()},put_char:function(r,i){i===null||i===10?(Qe(We(r.output,0)),r.output=[]):i!=0&&r.output.push(i)},fsync:function(r){r.output&&r.output.length>0&&(Qe(We(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,i){i===null||i===10?(ce(We(r.output,0)),r.output=[]):i!=0&&r.output.push(i)},fsync:function(r){r.output&&r.output.length>0&&(ce(We(r.output,0)),r.output=[])}}};function Pr(r,i){return de.fill(0,r,r+i),r}function ro(r,i){return Math.ceil(r/i)*i}function Rr(r){r=ro(r,65536);var i=Oe(65536,r);return i?Pr(i,r):0}var L={ops_table:null,mount:function(r){return L.createNode(null,"/",16895,0)},createNode:function(r,i,t,a){if(e.isBlkdev(t)||e.isFIFO(t))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var n=e.createNode(r,i,t,a);return e.isDir(n.mode)?(n.node_ops=L.ops_table.dir.node,n.stream_ops=L.ops_table.dir.stream,n.contents={}):e.isFile(n.mode)?(n.node_ops=L.ops_table.file.node,n.stream_ops=L.ops_table.file.stream,n.usedBytes=0,n.contents=null):e.isLink(n.mode)?(n.node_ops=L.ops_table.link.node,n.stream_ops=L.ops_table.link.stream):e.isChrdev(n.mode)&&(n.node_ops=L.ops_table.chrdev.node,n.stream_ops=L.ops_table.chrdev.stream),n.timestamp=Date.now(),r&&(r.contents[i]=n,r.timestamp=n.timestamp),n},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,i){var t=r.contents?r.contents.length:0;if(!(t>=i)){var a=1024*1024;i=Math.max(i,t*(t<a?2:1.125)>>>0),t!=0&&(i=Math.max(i,256));var n=r.contents;r.contents=new Uint8Array(i),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,i){if(r.usedBytes!=i)if(i==0)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(i),t&&r.contents.set(t.subarray(0,Math.min(i,r.usedBytes))),r.usedBytes=i}},node_ops:{getattr:function(r){var i={};return i.dev=e.isChrdev(r.mode)?r.id:1,i.ino=r.id,i.mode=r.mode,i.nlink=1,i.uid=0,i.gid=0,i.rdev=r.rdev,e.isDir(r.mode)?i.size=4096:e.isFile(r.mode)?i.size=r.usedBytes:e.isLink(r.mode)?i.size=r.link.length:i.size=0,i.atime=new Date(r.timestamp),i.mtime=new Date(r.timestamp),i.ctime=new Date(r.timestamp),i.blksize=4096,i.blocks=Math.ceil(i.size/i.blksize),i},setattr:function(r,i){i.mode!==void 0&&(r.mode=i.mode),i.timestamp!==void 0&&(r.timestamp=i.timestamp),i.size!==void 0&&L.resizeFileStorage(r,i.size)},lookup:function(r,i){throw e.genericErrors[44]},mknod:function(r,i,t,a){return L.createNode(r,i,t,a)},rename:function(r,i,t){if(e.isDir(r.mode)){var a;try{a=e.lookupNode(i,t)}catch{}if(a)for(var n in a.contents)throw new e.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,i.contents[t]=r,i.timestamp=r.parent.timestamp,r.parent=i},unlink:function(r,i){delete r.contents[i],r.timestamp=Date.now()},rmdir:function(r,i){var t=e.lookupNode(r,i);for(var a in t.contents)throw new e.ErrnoError(55);delete r.contents[i],r.timestamp=Date.now()},readdir:function(r){var i=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&i.push(t);return i},symlink:function(r,i,t){var a=L.createNode(r,i,41471,0);return a.link=t,a},readlink:function(r){if(!e.isLink(r.mode))throw new e.ErrnoError(28);return r.link}},stream_ops:{read:function(r,i,t,a,n){var f=r.node.contents;if(n>=r.node.usedBytes)return 0;var v=Math.min(r.node.usedBytes-n,a);if(v>8&&f.subarray)i.set(f.subarray(n,n+v),t);else for(var u=0;u<v;u++)i[t+u]=f[n+u];return v},write:function(r,i,t,a,n,f){if(i.buffer===$.buffer&&(f=!1),!a)return 0;var v=r.node;if(v.timestamp=Date.now(),i.subarray&&(!v.contents||v.contents.subarray)){if(f)return v.contents=i.subarray(t,t+a),v.usedBytes=a,a;if(v.usedBytes===0&&n===0)return v.contents=i.slice(t,t+a),v.usedBytes=a,a;if(n+a<=v.usedBytes)return v.contents.set(i.subarray(t,t+a),n),a}if(L.expandFileStorage(v,n+a),v.contents.subarray&&i.subarray)v.contents.set(i.subarray(t,t+a),n);else for(var u=0;u<a;u++)v.contents[n+u]=i[t+u];return v.usedBytes=Math.max(v.usedBytes,n+a),a},llseek:function(r,i,t){var a=i;if(t===1?a+=r.position:t===2&&e.isFile(r.node.mode)&&(a+=r.node.usedBytes),a<0)throw new e.ErrnoError(28);return a},allocate:function(r,i,t){L.expandFileStorage(r.node,i+t),r.node.usedBytes=Math.max(r.node.usedBytes,i+t)},mmap:function(r,i,t,a,n){if(!e.isFile(r.node.mode))throw new e.ErrnoError(43);var f,v,u=r.node.contents;if(!(n&2)&&u.buffer===Cr)v=!1,f=u.byteOffset;else{if((t>0||t+i<u.length)&&(u.subarray?u=u.subarray(t,t+i):u=Array.prototype.slice.call(u,t,t+i)),v=!0,f=Rr(i),!f)throw new e.ErrnoError(48);$.set(u,f)}return{ptr:f,allocated:v}},msync:function(r,i,t,a,n){return L.stream_ops.write(r,i,0,a,t,!1),0}}};function to(r,i,t,a){var n=a?"":"al "+r;nr(r,f=>{Ne(f,'Loading data file "'+r+'" failed (no arrayBuffer).'),i(new Uint8Array(f)),n&&Ze(n)},f=>{if(t)t();else throw'Loading data file "'+r+'" failed.'}),n&&vr(n)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var r=process.binding("constants");r.fs&&(r=r.fs),M.flagsForNodeMap={1024:r.O_APPEND,64:r.O_CREAT,128:r.O_EXCL,256:r.O_NOCTTY,0:r.O_RDONLY,2:r.O_RDWR,4096:r.O_SYNC,512:r.O_TRUNC,1:r.O_WRONLY,131072:r.O_NOFOLLOW}},convertNodeCode:r=>{var i=r.code;return yt[i]},mount:r=>M.createNode(null,"/",M.getMode(r.opts.root),0),createNode:(r,i,t,a)=>{if(!e.isDir(t)&&!e.isFile(t)&&!e.isLink(t))throw new e.ErrnoError(28);var n=e.createNode(r,i,t);return n.node_ops=M.node_ops,n.stream_ops=M.stream_ops,n},getMode:r=>{var i;try{i=V.lstatSync(r),M.isWindows&&(i.mode=i.mode|(i.mode&292)>>2)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}return i.mode},realPath:r=>{for(var i=[];r.parent!==r;)i.push(r.name),r=r.parent;return i.push(r.mount.opts.root),i.reverse(),U.join.apply(null,i)},flagsForNode:r=>{r&=-2097153,r&=-2049,r&=-32769,r&=-524289,r&=-65537;var i=0;for(var t in M.flagsForNodeMap)r&t&&(i|=M.flagsForNodeMap[t],r^=t);if(r)throw new e.ErrnoError(28);return i},node_ops:{getattr:r=>{var i=M.realPath(r),t;try{t=V.lstatSync(i)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}return M.isWindows&&!t.blksize&&(t.blksize=4096),M.isWindows&&!t.blocks&&(t.blocks=(t.size+t.blksize-1)/t.blksize|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,blksize:t.blksize,blocks:t.blocks}},setattr:(r,i)=>{var t=M.realPath(r);try{if(i.mode!==void 0&&(V.chmodSync(t,i.mode),r.mode=i.mode),i.timestamp!==void 0){var a=new Date(i.timestamp);V.utimesSync(t,a,a)}i.size!==void 0&&V.truncateSync(t,i.size)}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}},lookup:(r,i)=>{var t=U.join2(M.realPath(r),i),a=M.getMode(t);return M.createNode(r,i,a)},mknod:(r,i,t,a)=>{var n=M.createNode(r,i,t,a),f=M.realPath(n);try{e.isDir(n.mode)?V.mkdirSync(f,n.mode):V.writeFileSync(f,"",{mode:n.mode})}catch(v){throw v.code?new e.ErrnoError(M.convertNodeCode(v)):v}return n},rename:(r,i,t)=>{var a=M.realPath(r),n=U.join2(M.realPath(i),t);try{V.renameSync(a,n)}catch(f){throw f.code?new e.ErrnoError(M.convertNodeCode(f)):f}r.name=t},unlink:(r,i)=>{var t=U.join2(M.realPath(r),i);try{V.unlinkSync(t)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}},rmdir:(r,i)=>{var t=U.join2(M.realPath(r),i);try{V.rmdirSync(t)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}},readdir:r=>{var i=M.realPath(r);try{return V.readdirSync(i)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},symlink:(r,i,t)=>{var a=U.join2(M.realPath(r),i);try{V.symlinkSync(t,a)}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}},readlink:r=>{var i=M.realPath(r);try{return i=V.readlinkSync(i),i=Le.relative(Le.resolve(r.mount.opts.root),i),i}catch(t){throw t.code?t.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(t)):t}}},stream_ops:{open:r=>{var i=M.realPath(r.node);try{e.isFile(r.node.mode)&&(r.nfd=V.openSync(i,M.flagsForNode(r.flags)))}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},close:r=>{try{e.isFile(r.node.mode)&&r.nfd&&V.closeSync(r.nfd)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}},read:(r,i,t,a,n)=>{if(a===0)return 0;try{return V.readSync(r.nfd,Buffer.from(i.buffer),t,a,n)}catch(f){throw new e.ErrnoError(M.convertNodeCode(f))}},write:(r,i,t,a,n)=>{try{return V.writeSync(r.nfd,Buffer.from(i.buffer),t,a,n)}catch(f){throw new e.ErrnoError(M.convertNodeCode(f))}},llseek:(r,i,t)=>{var a=i;if(t===1)a+=r.position;else if(t===2&&e.isFile(r.node.mode))try{var n=V.fstatSync(r.nfd);a+=n.size}catch(f){throw new e.ErrnoError(M.convertNodeCode(f))}if(a<0)throw new e.ErrnoError(28);return a},mmap:(r,i,t,a,n)=>{if(!e.isFile(r.node.mode))throw new e.ErrnoError(43);var f=Rr(i);return M.stream_ops.read(r,$,f,i,t),{ptr:f,allocated:!0}},msync:(r,i,t,a,n)=>(M.stream_ops.write(r,i,0,a,t,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,i={})=>{if(r=ge.resolve(e.cwd(),r),!r)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(i=Object.assign(t,i),i.recurse_count>8)throw new e.ErrnoError(32);for(var a=U.normalizeArray(r.split("/").filter(m=>!!m),!1),n=e.root,f="/",v=0;v<a.length;v++){var u=v===a.length-1;if(u&&i.parent)break;if(n=e.lookupNode(n,a[v]),f=U.join2(f,a[v]),e.isMountpoint(n)&&(!u||u&&i.follow_mount)&&(n=n.mounted.root),!u||i.follow)for(var o=0;e.isLink(n.mode);){var c=e.readlink(f);f=ge.resolve(U.dirname(f),c);var _=e.lookupPath(f,{recurse_count:i.recurse_count+1});if(n=_.node,o++>40)throw new e.ErrnoError(32)}}return{path:f,node:n}},getPath:r=>{for(var i;;){if(e.isRoot(r)){var t=r.mount.mountpoint;return i?t[t.length-1]!=="/"?t+"/"+i:t+i:t}i=i?r.name+"/"+i:r.name,r=r.parent}},hashName:(r,i)=>{for(var t=0,a=0;a<i.length;a++)t=(t<<5)-t+i.charCodeAt(a)|0;return(r+t>>>0)%e.nameTable.length},hashAddNode:r=>{var i=e.hashName(r.parent.id,r.name);r.name_next=e.nameTable[i],e.nameTable[i]=r},hashRemoveNode:r=>{var i=e.hashName(r.parent.id,r.name);if(e.nameTable[i]===r)e.nameTable[i]=r.name_next;else for(var t=e.nameTable[i];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,i)=>{var t=e.mayLookup(r);if(t)throw new e.ErrnoError(t,r);for(var a=e.hashName(r.id,i),n=e.nameTable[a];n;n=n.name_next){var f=n.name;if(n.parent.id===r.id&&f===i)return n}return e.lookup(r,i)},createNode:(r,i,t,a)=>{var n=new e.FSNode(r,i,t,a);return e.hashAddNode(n),n},destroyNode:r=>{e.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>(r&61440)===32768,isDir:r=>(r&61440)===16384,isLink:r=>(r&61440)===40960,isChrdev:r=>(r&61440)===8192,isBlkdev:r=>(r&61440)===24576,isFIFO:r=>(r&61440)===4096,isSocket:r=>(r&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var i=e.flagModes[r];if(typeof i>"u")throw new Error("Unknown file open mode: "+r);return i},flagsToPermissionString:r=>{var i=["r","w","rw"][r&3];return r&512&&(i+="w"),i},nodePermissions:(r,i)=>e.ignorePermissions?0:i.includes("r")&&!(r.mode&292)||i.includes("w")&&!(r.mode&146)||i.includes("x")&&!(r.mode&73)?2:0,mayLookup:r=>{var i=e.nodePermissions(r,"x");return i||(r.node_ops.lookup?0:2)},mayCreate:(r,i)=>{try{var t=e.lookupNode(r,i);return 20}catch{}return e.nodePermissions(r,"wx")},mayDelete:(r,i,t)=>{var a;try{a=e.lookupNode(r,i)}catch(f){return f.errno}var n=e.nodePermissions(r,"wx");if(n)return n;if(t){if(!e.isDir(a.mode))return 54;if(e.isRoot(a)||e.getPath(a)===e.cwd())return 10}else if(e.isDir(a.mode))return 31;return 0},mayOpen:(r,i)=>r?e.isLink(r.mode)?32:e.isDir(r.mode)&&(e.flagsToPermissionString(i)!=="r"||i&512)?31:e.nodePermissions(r,e.flagsToPermissionString(i)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,i=e.MAX_OPEN_FDS)=>{for(var t=r;t<=i;t++)if(!e.streams[t])return t;throw new e.ErrnoError(33)},getStream:r=>e.streams[r],createStream:(r,i,t)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(n){this.node=n}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(n){this.shared.flags=n}},position:{get:function(){return this.shared.position},set:function(n){this.shared.position=n}}})),r=Object.assign(new e.FSStream,r);var a=e.nextfd(i,t);return r.fd=a,e.streams[a]=r,r},closeStream:r=>{e.streams[r]=null},chrdev_stream_ops:{open:r=>{var i=e.getDevice(r.node.rdev);r.stream_ops=i.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new e.ErrnoError(70)}},major:r=>r>>8,minor:r=>r&255,makedev:(r,i)=>r<<8|i,registerDevice:(r,i)=>{e.devices[r]={stream_ops:i}},getDevice:r=>e.devices[r],getMounts:r=>{for(var i=[],t=[r];t.length;){var a=t.pop();i.push(a),t.push.apply(t,a.mounts)}return i},syncfs:(r,i)=>{typeof r=="function"&&(i=r,r=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=e.getMounts(e.root.mount),a=0;function n(v){return e.syncFSRequests--,i(v)}function f(v){if(v)return f.errored?void 0:(f.errored=!0,n(v));++a>=t.length&&n(null)}t.forEach(v=>{if(!v.type.syncfs)return f(null);v.type.syncfs(v,r,f)})},mount:(r,i,t)=>{var a=t==="/",n=!t,f;if(a&&e.root)throw new e.ErrnoError(10);if(!a&&!n){var v=e.lookupPath(t,{follow_mount:!1});if(t=v.path,f=v.node,e.isMountpoint(f))throw new e.ErrnoError(10);if(!e.isDir(f.mode))throw new e.ErrnoError(54)}var u={type:r,opts:i,mountpoint:t,mounts:[]},o=r.mount(u);return o.mount=u,u.root=o,a?e.root=o:f&&(f.mounted=u,f.mount&&f.mount.mounts.push(u)),o},unmount:r=>{var i=e.lookupPath(r,{follow_mount:!1});if(!e.isMountpoint(i.node))throw new e.ErrnoError(28);var t=i.node,a=t.mounted,n=e.getMounts(a);Object.keys(e.nameTable).forEach(v=>{for(var u=e.nameTable[v];u;){var o=u.name_next;n.includes(u.mount)&&e.destroyNode(u),u=o}}),t.mounted=null;var f=t.mount.mounts.indexOf(a);t.mount.mounts.splice(f,1)},lookup:(r,i)=>r.node_ops.lookup(r,i),mknod:(r,i,t)=>{var a=e.lookupPath(r,{parent:!0}),n=a.node,f=U.basename(r);if(!f||f==="."||f==="..")throw new e.ErrnoError(28);var v=e.mayCreate(n,f);if(v)throw new e.ErrnoError(v);if(!n.node_ops.mknod)throw new e.ErrnoError(63);return n.node_ops.mknod(n,f,i,t)},create:(r,i)=>(i=i!==void 0?i:438,i&=4095,i|=32768,e.mknod(r,i,0)),mkdir:(r,i)=>(i=i!==void 0?i:511,i&=1023,i|=16384,e.mknod(r,i,0)),mkdirTree:(r,i)=>{for(var t=r.split("/"),a="",n=0;n<t.length;++n)if(t[n]){a+="/"+t[n];try{e.mkdir(a,i)}catch(f){if(f.errno!=20)throw f}}},mkdev:(r,i,t)=>(typeof t>"u"&&(t=i,i=438),i|=8192,e.mknod(r,i,t)),symlink:(r,i)=>{if(!ge.resolve(r))throw new e.ErrnoError(44);var t=e.lookupPath(i,{parent:!0}),a=t.node;if(!a)throw new e.ErrnoError(44);var n=U.basename(i),f=e.mayCreate(a,n);if(f)throw new e.ErrnoError(f);if(!a.node_ops.symlink)throw new e.ErrnoError(63);return a.node_ops.symlink(a,n,r)},rename:(r,i)=>{var t=U.dirname(r),a=U.dirname(i),n=U.basename(r),f=U.basename(i),v,u,o;if(v=e.lookupPath(r,{parent:!0}),u=v.node,v=e.lookupPath(i,{parent:!0}),o=v.node,!u||!o)throw new e.ErrnoError(44);if(u.mount!==o.mount)throw new e.ErrnoError(75);var c=e.lookupNode(u,n),_=ge.relative(r,a);if(_.charAt(0)!==".")throw new e.ErrnoError(28);if(_=ge.relative(i,t),_.charAt(0)!==".")throw new e.ErrnoError(55);var m;try{m=e.lookupNode(o,f)}catch{}if(c!==m){var p=e.isDir(c.mode),y=e.mayDelete(u,n,p);if(y)throw new e.ErrnoError(y);if(y=m?e.mayDelete(o,f,p):e.mayCreate(o,f),y)throw new e.ErrnoError(y);if(!u.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(c)||m&&e.isMountpoint(m))throw new e.ErrnoError(10);if(o!==u&&(y=e.nodePermissions(u,"w"),y))throw new e.ErrnoError(y);e.hashRemoveNode(c);try{u.node_ops.rename(c,o,f)}catch(E){throw E}finally{e.hashAddNode(c)}}},rmdir:r=>{var i=e.lookupPath(r,{parent:!0}),t=i.node,a=U.basename(r),n=e.lookupNode(t,a),f=e.mayDelete(t,a,!0);if(f)throw new e.ErrnoError(f);if(!t.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(n))throw new e.ErrnoError(10);t.node_ops.rmdir(t,a),e.destroyNode(n)},readdir:r=>{var i=e.lookupPath(r,{follow:!0}),t=i.node;if(!t.node_ops.readdir)throw new e.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var i=e.lookupPath(r,{parent:!0}),t=i.node;if(!t)throw new e.ErrnoError(44);var a=U.basename(r),n=e.lookupNode(t,a),f=e.mayDelete(t,a,!1);if(f)throw new e.ErrnoError(f);if(!t.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(n))throw new e.ErrnoError(10);t.node_ops.unlink(t,a),e.destroyNode(n)},readlink:r=>{var i=e.lookupPath(r),t=i.node;if(!t)throw new e.ErrnoError(44);if(!t.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,i)=>{var t=e.lookupPath(r,{follow:!i}),a=t.node;if(!a)throw new e.ErrnoError(44);if(!a.node_ops.getattr)throw new e.ErrnoError(63);return a.node_ops.getattr(a)},lstat:r=>e.stat(r,!0),chmod:(r,i,t)=>{var a;if(typeof r=="string"){var n=e.lookupPath(r,{follow:!t});a=n.node}else a=r;if(!a.node_ops.setattr)throw new e.ErrnoError(63);a.node_ops.setattr(a,{mode:i&4095|a.mode&-4096,timestamp:Date.now()})},lchmod:(r,i)=>{e.chmod(r,i,!0)},fchmod:(r,i)=>{var t=e.getStream(r);if(!t)throw new e.ErrnoError(8);e.chmod(t.node,i)},chown:(r,i,t,a)=>{var n;if(typeof r=="string"){var f=e.lookupPath(r,{follow:!a});n=f.node}else n=r;if(!n.node_ops.setattr)throw new e.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:(r,i,t)=>{e.chown(r,i,t,!0)},fchown:(r,i,t)=>{var a=e.getStream(r);if(!a)throw new e.ErrnoError(8);e.chown(a.node,i,t)},truncate:(r,i)=>{if(i<0)throw new e.ErrnoError(28);var t;if(typeof r=="string"){var a=e.lookupPath(r,{follow:!0});t=a.node}else t=r;if(!t.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(t.mode))throw new e.ErrnoError(31);if(!e.isFile(t.mode))throw new e.ErrnoError(28);var n=e.nodePermissions(t,"w");if(n)throw new e.ErrnoError(n);t.node_ops.setattr(t,{size:i,timestamp:Date.now()})},ftruncate:(r,i)=>{var t=e.getStream(r);if(!t)throw new e.ErrnoError(8);if(!(t.flags&2097155))throw new e.ErrnoError(28);e.truncate(t.node,i)},utime:(r,i,t)=>{var a=e.lookupPath(r,{follow:!0}),n=a.node;n.node_ops.setattr(n,{timestamp:Math.max(i,t)})},open:(r,i,t)=>{if(r==="")throw new e.ErrnoError(44);i=typeof i=="string"?e.modeStringToFlags(i):i,t=typeof t>"u"?438:t,i&64?t=t&4095|32768:t=0;var a;if(typeof r=="object")a=r;else{r=U.normalize(r);try{var n=e.lookupPath(r,{follow:!(i&131072)});a=n.node}catch{}}var f=!1;if(i&64)if(a){if(i&128)throw new e.ErrnoError(20)}else a=e.mknod(r,t,0),f=!0;if(!a)throw new e.ErrnoError(44);if(e.isChrdev(a.mode)&&(i&=-513),i&65536&&!e.isDir(a.mode))throw new e.ErrnoError(54);if(!f){var v=e.mayOpen(a,i);if(v)throw new e.ErrnoError(v)}i&512&&!f&&e.truncate(a,0),i&=-131713;var u=e.createStream({node:a,path:e.getPath(a),flags:i,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),l.logReadFiles&&!(i&1)&&(e.readFiles||(e.readFiles={}),r in e.readFiles||(e.readFiles[r]=1)),u},close:r=>{if(e.isClosed(r))throw new e.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(i){throw i}finally{e.closeStream(r.fd)}r.fd=null},isClosed:r=>r.fd===null,llseek:(r,i,t)=>{if(e.isClosed(r))throw new e.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new e.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new e.ErrnoError(28);return r.position=r.stream_ops.llseek(r,i,t),r.ungotten=[],r.position},read:(r,i,t,a,n)=>{if(a<0||n<0)throw new e.ErrnoError(28);if(e.isClosed(r))throw new e.ErrnoError(8);if((r.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(r.node.mode))throw new e.ErrnoError(31);if(!r.stream_ops.read)throw new e.ErrnoError(28);var f=typeof n<"u";if(!f)n=r.position;else if(!r.seekable)throw new e.ErrnoError(70);var v=r.stream_ops.read(r,i,t,a,n);return f||(r.position+=v),v},write:(r,i,t,a,n,f)=>{if(a<0||n<0)throw new e.ErrnoError(28);if(e.isClosed(r))throw new e.ErrnoError(8);if(!(r.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(r.node.mode))throw new e.ErrnoError(31);if(!r.stream_ops.write)throw new e.ErrnoError(28);r.seekable&&r.flags&1024&&e.llseek(r,0,2);var v=typeof n<"u";if(!v)n=r.position;else if(!r.seekable)throw new e.ErrnoError(70);var u=r.stream_ops.write(r,i,t,a,n,f);return v||(r.position+=u),u},allocate:(r,i,t)=>{if(e.isClosed(r))throw new e.ErrnoError(8);if(i<0||t<=0)throw new e.ErrnoError(28);if(!(r.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(r.node.mode)&&!e.isDir(r.node.mode))throw new e.ErrnoError(43);if(!r.stream_ops.allocate)throw new e.ErrnoError(138);r.stream_ops.allocate(r,i,t)},mmap:(r,i,t,a,n)=>{if(a&2&&!(n&2)&&(r.flags&2097155)!==2)throw new e.ErrnoError(2);if((r.flags&2097155)===1)throw new e.ErrnoError(2);if(!r.stream_ops.mmap)throw new e.ErrnoError(43);return r.stream_ops.mmap(r,i,t,a,n)},msync:(r,i,t,a,n)=>r.stream_ops.msync?r.stream_ops.msync(r,i,t,a,n):0,munmap:r=>0,ioctl:(r,i,t)=>{if(!r.stream_ops.ioctl)throw new e.ErrnoError(59);return r.stream_ops.ioctl(r,i,t)},readFile:(r,i={})=>{if(i.flags=i.flags||0,i.encoding=i.encoding||"binary",i.encoding!=="utf8"&&i.encoding!=="binary")throw new Error('Invalid encoding type "'+i.encoding+'"');var t,a=e.open(r,i.flags),n=e.stat(r),f=n.size,v=new Uint8Array(f);return e.read(a,v,0,f,0),i.encoding==="utf8"?t=We(v,0):i.encoding==="binary"&&(t=v),e.close(a),t},writeFile:(r,i,t={})=>{t.flags=t.flags||577;var a=e.open(r,t.flags,t.mode);if(typeof i=="string"){var n=new Uint8Array(Pe(i)+1),f=Xe(i,n,0,n.length);e.write(a,n,0,f,void 0,t.canOwn)}else if(ArrayBuffer.isView(i))e.write(a,i,0,i.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");e.close(a)},cwd:()=>e.currentPath,chdir:r=>{var i=e.lookupPath(r,{follow:!0});if(i.node===null)throw new e.ErrnoError(44);if(!e.isDir(i.node.mode))throw new e.ErrnoError(54);var t=e.nodePermissions(i.node,"x");if(t)throw new e.ErrnoError(t);e.currentPath=i.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(i,t,a,n,f)=>n}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var r=eo();e.createDevice("/dev","random",r),e.createDevice("/dev","urandom",r),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var r=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var i=e.createNode(r,"fd",16895,73);return i.node_ops={lookup:(t,a)=>{var n=+a,f=e.getStream(n);if(!f)throw new e.ErrnoError(8);var v={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>f.path}};return v.parent=v,v}},i}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var r=e.open("/dev/stdin",0),i=e.open("/dev/stdout",1),t=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(i,t){this.node=t,this.setErrno=function(a){this.errno=a},this.setErrno(i),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(r=>{e.genericErrors[r]=new e.ErrnoError(r),e.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(r,i,t)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=r||l.stdin,l.stdout=i||l.stdout,l.stderr=t||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,Zr(0);for(var r=0;r<e.streams.length;r++){var i=e.streams[r];i&&e.close(i)}},getMode:(r,i)=>{var t=0;return r&&(t|=365),i&&(t|=146),t},findObject:(r,i)=>{var t=e.analyzePath(r,i);return t.exists?t.object:null},analyzePath:(r,i)=>{try{var t=e.lookupPath(r,{follow:!i});r=t.path}catch{}var a={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=e.lookupPath(r,{parent:!0});a.parentExists=!0,a.parentPath=t.path,a.parentObject=t.node,a.name=U.basename(r),t=e.lookupPath(r,{follow:!i}),a.exists=!0,a.path=t.path,a.object=t.node,a.name=t.node.name,a.isRoot=t.path==="/"}catch(n){a.error=n.errno}return a},createPath:(r,i,t,a)=>{r=typeof r=="string"?r:e.getPath(r);for(var n=i.split("/").reverse();n.length;){var f=n.pop();if(f){var v=U.join2(r,f);try{e.mkdir(v)}catch{}r=v}}return v},createFile:(r,i,t,a,n)=>{var f=U.join2(typeof r=="string"?r:e.getPath(r),i),v=e.getMode(a,n);return e.create(f,v)},createDataFile:(r,i,t,a,n,f)=>{var v=i;r&&(r=typeof r=="string"?r:e.getPath(r),v=i?U.join2(r,i):r);var u=e.getMode(a,n),o=e.create(v,u);if(t){if(typeof t=="string"){for(var c=new Array(t.length),_=0,m=t.length;_<m;++_)c[_]=t.charCodeAt(_);t=c}e.chmod(o,u|146);var p=e.open(o,577);e.write(p,t,0,t.length,0,f),e.close(p),e.chmod(o,u)}return o},createDevice:(r,i,t,a)=>{var n=U.join2(typeof r=="string"?r:e.getPath(r),i),f=e.getMode(!!t,!!a);e.createDevice.major||(e.createDevice.major=64);var v=e.makedev(e.createDevice.major++,0);return e.registerDevice(v,{open:u=>{u.seekable=!1},close:u=>{a&&a.buffer&&a.buffer.length&&a(10)},read:(u,o,c,_,m)=>{for(var p=0,y=0;y<_;y++){var E;try{E=t()}catch{throw new e.ErrnoError(29)}if(E===void 0&&p===0)throw new e.ErrnoError(6);if(E==null)break;p++,o[c+y]=E}return p&&(u.node.timestamp=Date.now()),p},write:(u,o,c,_,m)=>{for(var p=0;p<_;p++)try{a(o[c+p])}catch{throw new e.ErrnoError(29)}return _&&(u.node.timestamp=Date.now()),p}}),e.mkdev(n,f,v)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{r.contents=Je(Ye(r.url),!0),r.usedBytes=r.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(r,i,t,a,n)=>{function f(){this.lengthKnown=!1,this.chunks=[]}if(f.prototype.get=function(y){if(!(y>this.length-1||y<0)){var E=y%this.chunkSize,S=y/this.chunkSize|0;return this.getter(S)[E]}},f.prototype.setDataGetter=function(y){this.getter=y},f.prototype.cacheLength=function(){var y=new XMLHttpRequest;if(y.open("HEAD",t,!1),y.send(null),!(y.status>=200&&y.status<300||y.status===304))throw new Error("Couldn't load "+t+". Status: "+y.status);var E=Number(y.getResponseHeader("Content-length")),S,b=(S=y.getResponseHeader("Accept-Ranges"))&&S==="bytes",k=(S=y.getResponseHeader("Content-Encoding"))&&S==="gzip",D=1024*1024;b||(D=E);var T=(A,I)=>{if(A>I)throw new Error("invalid range ("+A+", "+I+") or no bytes requested!");if(I>E-1)throw new Error("only "+E+" bytes available! programmer error!");var z=new XMLHttpRequest;if(z.open("GET",t,!1),E!==D&&z.setRequestHeader("Range","bytes="+A+"-"+I),z.responseType="arraybuffer",z.overrideMimeType&&z.overrideMimeType("text/plain; charset=x-user-defined"),z.send(null),!(z.status>=200&&z.status<300||z.status===304))throw new Error("Couldn't load "+t+". Status: "+z.status);return z.response!==void 0?new Uint8Array(z.response||[]):Je(z.responseText||"",!0)},C=this;C.setDataGetter(A=>{var I=A*D,z=(A+1)*D-1;if(z=Math.min(z,E-1),typeof C.chunks[A]>"u"&&(C.chunks[A]=T(I,z)),typeof C.chunks[A]>"u")throw new Error("doXHR failed!");return C.chunks[A]}),(k||!E)&&(D=E=1,E=this.getter(0).length,D=E,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=E,this._chunkSize=D,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var v=new f;Object.defineProperties(v,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:v}}else var u={isDevice:!1,url:t};var o=e.createFile(r,i,u,a,n);u.contents?o.contents=u.contents:u.url&&(o.contents=null,o.url=u.url),Object.defineProperties(o,{usedBytes:{get:function(){return this.contents.length}}});var c={},_=Object.keys(o.stream_ops);_.forEach(p=>{var y=o.stream_ops[p];c[p]=function(){return e.forceLoadFile(o),y.apply(null,arguments)}});function m(p,y,E,S,b){var k=p.node.contents;if(b>=k.length)return 0;var D=Math.min(k.length-b,S);if(k.slice)for(var T=0;T<D;T++)y[E+T]=k[b+T];else for(var T=0;T<D;T++)y[E+T]=k.get(b+T);return D}return c.read=(p,y,E,S,b)=>(e.forceLoadFile(o),m(p,y,E,S,b)),c.mmap=(p,y,E,S,b)=>{e.forceLoadFile(o);var k=Rr(y);if(!k)throw new e.ErrnoError(48);return m(p,$,k,y,E),{ptr:k,allocated:!0}},o.stream_ops=c,o},createPreloadedFile:(r,i,t,a,n,f,v,u,o,c)=>{var _=i?ge.resolve(U.join2(r,i)):r,m="cp "+_;function p(y){function E(S){c&&c(),u||e.createDataFile(r,i,S,a,n,o),f&&f(),Ze(m)}Browser.handledByPreloadPlugin(y,_,E,()=>{v&&v(),Ze(m)})||E(y)}vr(m),typeof t=="string"?to(t,y=>p(y),v):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,i,t)=>{i=i||(()=>{}),t=t||(()=>{});var a=e.indexedDB();try{var n=a.open(e.DB_NAME(),e.DB_VERSION)}catch(f){return t(f)}n.onupgradeneeded=()=>{Qe("creating db");var f=n.result;f.createObjectStore(e.DB_STORE_NAME)},n.onsuccess=()=>{var f=n.result,v=f.transaction([e.DB_STORE_NAME],"readwrite"),u=v.objectStore(e.DB_STORE_NAME),o=0,c=0,_=r.length;function m(){c==0?i():t()}r.forEach(p=>{var y=u.put(e.analyzePath(p).object.contents,p);y.onsuccess=()=>{o++,o+c==_&&m()},y.onerror=()=>{c++,o+c==_&&m()}}),v.onerror=t},n.onerror=t},loadFilesFromDB:(r,i,t)=>{i=i||(()=>{}),t=t||(()=>{});var a=e.indexedDB();try{var n=a.open(e.DB_NAME(),e.DB_VERSION)}catch(f){return t(f)}n.onupgradeneeded=t,n.onsuccess=()=>{var f=n.result;try{var v=f.transaction([e.DB_STORE_NAME],"readonly")}catch(p){t(p);return}var u=v.objectStore(e.DB_STORE_NAME),o=0,c=0,_=r.length;function m(){c==0?i():t()}r.forEach(p=>{var y=u.get(p);y.onsuccess=()=>{e.analyzePath(p).exists&&e.unlink(p),e.createDataFile(U.dirname(p),U.basename(p),y.result,!0,!0,!0),o++,o+c==_&&m()},y.onerror=()=>{c++,o+c==_&&m()}}),v.onerror=t},n.onerror=t}},N={DEFAULT_POLLMASK:5,calculateAt:function(r,i,t){if(U.isAbs(i))return i;var a;if(r===-100)a=e.cwd();else{var n=N.getStreamFromFD(r);a=n.path}if(i.length==0){if(!t)throw new e.ErrnoError(44);return a}return U.join2(a,i)},doStat:function(r,i,t){try{var a=r(i)}catch(n){if(n&&n.node&&U.normalize(i)!==U.normalize(e.getPath(n.node)))return-54;throw n}return h[t>>2]=a.dev,h[t+8>>2]=a.ino,h[t+12>>2]=a.mode,H[t+16>>2]=a.nlink,h[t+20>>2]=a.uid,h[t+24>>2]=a.gid,h[t+28>>2]=a.rdev,q=[a.size>>>0,(P=a.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+40>>2]=q[0],h[t+44>>2]=q[1],h[t+48>>2]=4096,h[t+52>>2]=a.blocks,q=[Math.floor(a.atime.getTime()/1e3)>>>0,(P=Math.floor(a.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+56>>2]=q[0],h[t+60>>2]=q[1],H[t+64>>2]=0,q=[Math.floor(a.mtime.getTime()/1e3)>>>0,(P=Math.floor(a.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+72>>2]=q[0],h[t+76>>2]=q[1],H[t+80>>2]=0,q=[Math.floor(a.ctime.getTime()/1e3)>>>0,(P=Math.floor(a.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+88>>2]=q[0],h[t+92>>2]=q[1],H[t+96>>2]=0,q=[a.ino>>>0,(P=a.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+104>>2]=q[0],h[t+108>>2]=q[1],0},doMsync:function(r,i,t,a,n){if(!e.isFile(i.node.mode))throw new e.ErrnoError(43);if(a&2)return 0;var f=de.slice(r,r+t);e.msync(i,f,n,t,a)},varargs:void 0,get:function(){N.varargs+=4;var r=h[N.varargs-4>>2];return r},getStr:function(r){var i=ne(r);return i},getStreamFromFD:function(r){var i=e.getStream(r);if(!i)throw new e.ErrnoError(8);return i}};function no(r,i,t,a,n){try{for(var f=0,v=i?h[i>>2]:0,u=i?h[i+4>>2]:0,o=t?h[t>>2]:0,c=t?h[t+4>>2]:0,_=a?h[a>>2]:0,m=a?h[a+4>>2]:0,p=0,y=0,E=0,S=0,b=0,k=0,D=(i?h[i>>2]:0)|(t?h[t>>2]:0)|(a?h[a>>2]:0),T=(i?h[i+4>>2]:0)|(t?h[t+4>>2]:0)|(a?h[a+4>>2]:0),C=function(B,x,G,re){return B<32?x&re:G&re},A=0;A<r;A++){var I=1<<A%32;if(C(A,D,T,I)){var z=N.getStreamFromFD(A),K=N.DEFAULT_POLLMASK;z.stream_ops?.poll&&(K=z.stream_ops.poll(z)),K&1&&C(A,v,u,I)&&(A<32?p=p|I:y=y|I,f++),K&4&&C(A,o,c,I)&&(A<32?E=E|I:S=S|I,f++),K&2&&C(A,_,m,I)&&(A<32?b=b|I:k=k|I,f++)}}return i&&(h[i>>2]=p,h[i+4>>2]=y),t&&(h[t>>2]=E,h[t+4>>2]=S),a&&(h[a>>2]=b,h[a+4>>2]=k),f}catch(B){if(typeof e>"u"||!(B instanceof e.ErrnoError))throw B;return-B.errno}}var j={mount:function(r){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(i,t){return typeof t=="function"&&(this._callbacks[i]=t),this},l.websocket.emit=function(i,t){typeof this._callbacks[i]=="function"&&this._callbacks[i].call(this,t)},e.createNode(null,"/",16895,0)},createSocket:function(r,i,t){i&=-526337;var a=i==1;if(a&&t&&t!=6)throw new e.ErrnoError(66);var n={family:r,type:i,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},f=j.nextname(),v=e.createNode(j.root,f,49152,0);v.sock=n;var u=e.createStream({path:f,node:v,flags:2,seekable:!1,stream_ops:j.stream_ops});return n.stream=u,n},getSocket:function(r){var i=e.getStream(r);return!i||!e.isSocket(i.node.mode)?null:i.node.sock},stream_ops:{poll:function(r){var i=r.node.sock;return i.sock_ops.poll(i)},ioctl:function(r,i,t){var a=r.node.sock;return a.sock_ops.ioctl(a,i,t)},read:function(r,i,t,a,n){var f=r.node.sock,v=f.sock_ops.recvmsg(f,a);return v?(i.set(v.buffer,t),v.buffer.length):0},write:function(r,i,t,a,n){var f=r.node.sock;return f.sock_ops.sendmsg(f,i,t,a)},close:function(r){var i=r.node.sock;i.sock_ops.close(i)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(r,i,t){var a;if(typeof i=="object"&&(a=i,i=null,t=null),a)if(a._socket)i=a._socket.remoteAddress,t=a._socket.remotePort;else{var n=/ws[s]?:\/\/([^:]+):(\d+)/.exec(a.url);if(!n)throw new Error("WebSocket URL must be in the format ws(s)://address:port");i=n[1],t=parseInt(n[2],10)}else try{var f=l.websocket&&typeof l.websocket=="object",v="ws:#".replace("#","//");if(f&&(typeof l.websocket.url=="function"?v=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(v=l.websocket.url)),v==="ws://"||v==="wss://"){var u=i.split("/");v=v+u[0]+":"+t+"/"+u.slice(1).join("/")}var o="binary";f&&typeof l.websocket.subprotocol=="string"&&(o=l.websocket.subprotocol);var c=void 0;o!=="null"&&(o=o.replace(/^ +| +$/g,"").split(/ *, */),c=o),f&&l.websocket.subprotocol===null&&(o="null",c=void 0);var _;Z?_=Fn():_=WebSocket,l.websocket.decorator&&(_=l.websocket.decorator(_)),a=new _(v,c),a.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var m={addr:i,port:t,socket:a,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(r,m),j.websocket_sock_ops.handlePeerEvents(r,m),r.type===2&&typeof r.sport<"u"&&m.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(r.sport&65280)>>8,r.sport&255])),m},getPeer:function(r,i,t){return r.peers[i+":"+t]},addPeer:function(r,i){r.peers[i.addr+":"+i.port]=i},removePeer:function(r,i){delete r.peers[i.addr+":"+i.port]},handlePeerEvents:function(r,i){var t=!0,a=function(){l.websocket.emit("open",r.stream.fd);try{for(var f=i.dgram_send_queue.shift();f;)i.socket.send(f),f=i.dgram_send_queue.shift()}catch{i.socket.close()}};function n(f){if(typeof f=="string"){var v=new TextEncoder;f=v.encode(f)}else{if(Ne(f.byteLength!==void 0),f.byteLength==0)return;f=new Uint8Array(f)}var u=t;if(t=!1,u&&f.length===10&&f[0]===255&&f[1]===255&&f[2]===255&&f[3]===255&&f[4]==="p".charCodeAt(0)&&f[5]==="o".charCodeAt(0)&&f[6]==="r".charCodeAt(0)&&f[7]==="t".charCodeAt(0)){var o=f[8]<<8|f[9];j.websocket_sock_ops.removePeer(r,i),i.port=o,j.websocket_sock_ops.addPeer(r,i);return}r.recv_queue.push({addr:i.addr,port:i.port,data:f}),l.websocket.emit("message",r.stream.fd)}Z?(i.socket.on("open",a),i.socket.on("message",function(f,v){v&&n(new Uint8Array(f).buffer)}),i.socket.on("close",function(){l.websocket.emit("close",r.stream.fd)}),i.socket.on("error",function(f){r.error=14,l.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])})):(i.socket.onopen=a,i.socket.onclose=function(){l.websocket.emit("close",r.stream.fd)},i.socket.onmessage=function(v){n(v.data)},i.socket.onerror=function(f){r.error=14,l.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])})},poll:function(r){if(r.type===1&&r.server)return r.pending.length?65:0;var i=0,t=r.type===1?j.websocket_sock_ops.getPeer(r,r.daddr,r.dport):null;return(r.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(i|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(i|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(i|=16),i},ioctl:function(r,i,t){switch(i){case 21531:var a=0;return r.recv_queue.length&&(a=r.recv_queue[0].data.length),h[t>>2]=a,0;default:return 28}},close:function(r){if(r.server){try{r.server.close()}catch{}r.server=null}for(var i=Object.keys(r.peers),t=0;t<i.length;t++){var a=r.peers[i[t]];try{a.socket.close()}catch{}j.websocket_sock_ops.removePeer(r,a)}return 0},bind:function(r,i,t){if(typeof r.saddr<"u"||typeof r.sport<"u")throw new e.ErrnoError(28);if(r.saddr=i,r.sport=t,r.type===2){r.server&&(r.server.close(),r.server=null);try{r.sock_ops.listen(r,0)}catch(a){if(!(a instanceof e.ErrnoError)||a.errno!==138)throw a}}},connect:function(r,i,t){if(r.server)throw new e.ErrnoError(138);if(typeof r.daddr<"u"&&typeof r.dport<"u"){var a=j.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(a)throw a.socket.readyState===a.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var n=j.websocket_sock_ops.createPeer(r,i,t);throw r.daddr=n.addr,r.dport=n.port,new e.ErrnoError(26)},listen:function(r,i){if(!Z)throw new e.ErrnoError(138);if(r.server)throw new e.ErrnoError(28);var t=Fn().Server,a=r.saddr;l.websocket.serverDecorator&&(t=l.websocket.serverDecorator(t)),r.server=new t({host:a,port:r.sport}),l.websocket.emit("listen",r.stream.fd),r.server.on("connection",function(n){if(r.type===1){var f=j.createSocket(r.family,r.type,r.protocol),v=j.websocket_sock_ops.createPeer(f,n);f.daddr=v.addr,f.dport=v.port,r.pending.push(f),l.websocket.emit("connection",f.stream.fd)}else j.websocket_sock_ops.createPeer(r,n),l.websocket.emit("connection",r.stream.fd)}),r.server.on("close",function(){l.websocket.emit("close",r.stream.fd),r.server=null}),r.server.on("error",function(n){r.error=23,l.websocket.emit("error",[r.stream.fd,r.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(r){if(!r.server||!r.pending.length)throw new e.ErrnoError(28);var i=r.pending.shift();return i.stream.flags=r.stream.flags,i},getname:function(r,i){var t,a;if(i){if(r.daddr===void 0||r.dport===void 0)throw new e.ErrnoError(53);t=r.daddr,a=r.dport}else t=r.saddr||0,a=r.sport||0;return{addr:t,port:a}},sendmsg:function(r,i,t,a,n,f){if(r.type===2){if((n===void 0||f===void 0)&&(n=r.daddr,f=r.dport),n===void 0||f===void 0)throw new e.ErrnoError(17)}else n=r.daddr,f=r.dport;var v=j.websocket_sock_ops.getPeer(r,n,f);if(r.type===1){if(!v||v.socket.readyState===v.socket.CLOSING||v.socket.readyState===v.socket.CLOSED)throw new e.ErrnoError(53);if(v.socket.readyState===v.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(i)&&(t+=i.byteOffset,i=i.buffer);var u;if(u=i.slice(t,t+a),r.type===2&&(!v||v.socket.readyState!==v.socket.OPEN))return(!v||v.socket.readyState===v.socket.CLOSING||v.socket.readyState===v.socket.CLOSED)&&(v=j.websocket_sock_ops.createPeer(r,n,f)),v.dgram_send_queue.push(u),a;try{return v.socket.send(u),a}catch{throw new e.ErrnoError(28)}},recvmsg:function(r,i,t){if(r.type===1&&r.server)throw new e.ErrnoError(53);var a=r.recv_queue.shift();if(!a){if(r.type===1){var n=j.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(!n)throw new e.ErrnoError(53);if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var f=a.data.byteLength||a.data.length,v=a.data.byteOffset||0,u=a.data.buffer||a.data,o=Math.min(i,f),c={buffer:new Uint8Array(u,v,o),addr:a.addr,port:a.port};if(t&2&&(o=0),r.type===1&&o<f){var _=f-o;a.data=new Uint8Array(u,v+o,_),r.recv_queue.unshift(a)}return c}}};function ve(r){var i=j.getSocket(r);if(!i)throw new e.ErrnoError(8);return i}function Kt(r){return h[$t()>>2]=r,r}function lr(r){for(var i=r.split("."),t=0;t<4;t++){var a=Number(i[t]);if(isNaN(a))return null;i[t]=a}return(i[0]|i[1]<<8|i[2]<<16|i[3]<<24)>>>0}function Q(r){return parseInt(r)}function Hr(r){var i,t,a,n,f=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,v=[];if(!f.test(r))return null;if(r==="::")return[0,0,0,0,0,0,0,0];for(r.startsWith("::")?r=r.replace("::","Z:"):r=r.replace("::",":Z:"),r.indexOf(".")>0?(r=r.replace(new RegExp("[.]","g"),":"),i=r.split(":"),i[i.length-4]=Q(i[i.length-4])+Q(i[i.length-3])*256,i[i.length-3]=Q(i[i.length-2])+Q(i[i.length-1])*256,i=i.slice(0,i.length-2)):i=r.split(":"),a=0,n=0,t=0;t<i.length;t++)if(typeof i[t]=="string")if(i[t]==="Z"){for(n=0;n<8-i.length+1;n++)v[t+n]=0;a=n-1}else v[t+a]=kr(parseInt(i[t],16));else v[t+a]=i[t];return[v[1]<<16|v[0],v[3]<<16|v[2],v[5]<<16|v[4],v[7]<<16|v[6]]}function rr(r,i,t,a,n){switch(i){case 2:t=lr(t),Pr(r,16),n&&(h[n>>2]=16),Ee[r>>1]=i,h[r+4>>2]=t,Ee[r+2>>1]=kr(a);break;case 10:t=Hr(t),Pr(r,28),n&&(h[n>>2]=28),h[r>>2]=i,h[r+8>>2]=t[0],h[r+12>>2]=t[1],h[r+16>>2]=t[2],h[r+20>>2]=t[3],Ee[r+2>>1]=kr(a);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(r){var i=lr(r);if(i!==null||(i=Hr(r),i!==null))return r;var t;if(ee.address_map.addrs[r])t=ee.address_map.addrs[r];else{var a=ee.address_map.id++;Ne(a<65535,"exceeded max address mappings of 65535"),t="172.29."+(a&255)+"."+(a&65280),ee.address_map.names[t]=r,ee.address_map.addrs[r]=t}return t},lookup_addr:function(r){return ee.address_map.names[r]?ee.address_map.names[r]:null}};function oo(r,i,t,a){try{var n=ve(r),f=n.sock_ops.accept(n);if(i)var v=rr(i,f.family,ee.lookup_name(f.daddr),f.dport,t);return f.stream.fd}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Or(r){return(r&255)+"."+(r>>8&255)+"."+(r>>16&255)+"."+(r>>24&255)}function en(r){var i="",t=0,a=0,n=0,f=0,v=0,u=0,o=[r[0]&65535,r[0]>>16,r[1]&65535,r[1]>>16,r[2]&65535,r[2]>>16,r[3]&65535,r[3]>>16],c=!0,_="";for(u=0;u<5;u++)if(o[u]!==0){c=!1;break}if(c){if(_=Or(o[6]|o[7]<<16),o[5]===-1)return i="::ffff:",i+=_,i;if(o[5]===0)return i="::",_==="0.0.0.0"&&(_=""),_==="0.0.0.1"&&(_="1"),i+=_,i}for(t=0;t<8;t++)o[t]===0&&(t-n>1&&(v=0),n=t,v++),v>a&&(a=v,f=t-a+1);for(t=0;t<8;t++){if(a>1&&o[t]===0&&t>=f&&t<f+a){t===f&&(i+=":",f===0&&(i+=":"));continue}i+=Number(Ur(o[t]&65535)).toString(16),i+=t<7?":":""}return i}function wt(r,i){var t=Ee[r>>1],a=Ur(st[r+2>>1]),n;switch(t){case 2:if(i!==16)return{errno:28};n=h[r+4>>2],n=Or(n);break;case 10:if(i!==28)return{errno:28};n=[h[r+8>>2],h[r+12>>2],h[r+16>>2],h[r+20>>2]],n=en(n);break;default:return{errno:5}}return{family:t,addr:n,port:a}}function Mr(r,i,t){if(t&&r===0)return null;var a=wt(r,i);if(a.errno)throw new e.ErrnoError(a.errno);return a.addr=ee.lookup_addr(a.addr)||a.addr,a}function io(r,i,t){try{var a=ve(r),n=Mr(i,t);return a.sock_ops.bind(a,n.addr,n.port),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function ao(r){try{return r=N.getStr(r),e.chdir(r),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function so(r,i){try{return r=N.getStr(r),e.chmod(r,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function uo(r,i,t){try{var a=ve(r),n=Mr(i,t);return a.sock_ops.connect(a,n.addr,n.port),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function fo(r){try{var i=N.getStreamFromFD(r);return e.createStream(i,0).fd}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function co(r,i,t){try{var a=N.getStreamFromFD(r);if(a.fd===i)return-28;var n=e.getStream(i);return n&&e.close(n),e.createStream(a,i,i+1).fd}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function lo(r,i,t,a){try{if(i=N.getStr(i),i=N.calculateAt(r,i),t&-8)return-28;var n=e.lookupPath(i,{follow:!0}),f=n.node;if(!f)return-44;var v="";return t&4&&(v+="r"),t&2&&(v+="w"),t&1&&(v+="x"),v&&e.nodePermissions(f,v)?-2:0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Xr(r,i){try{return e.fchmod(r,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function _o(r,i,t){try{return e.fchown(r,i,t),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function vo(r,i,t,a,n){try{i=N.getStr(i);var f=n&256;return n=n&-257,i=N.calculateAt(r,i),(f?e.lchown:e.chown)(i,t,a),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function mo(r,i,t){N.varargs=t;try{var a=N.getStreamFromFD(r);switch(i){case 0:{var n=N.get();if(n<0)return-28;var f;return f=e.createStream(a,n),f.fd}case 1:case 2:return 0;case 3:return a.flags;case 4:{var n=N.get();return a.flags|=n,0}case 5:{var n=N.get(),v=0;return Ee[n+v>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function po(r,i){try{var t=N.getStreamFromFD(r);return N.doStat(e.stat,t.path,i)}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function rn(r,i){return i+2097152>>>0<4194305-!!r?(r>>>0)+i*4294967296:NaN}function ho(r,i,t){try{var a=rn(i,t);return isNaN(a)?-61:(e.ftruncate(r,a),0)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function yo(r,i){try{if(i===0)return-28;var t=e.cwd(),a=Pe(t)+1;return i<a?-68:(Ae(t,r,i),a)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function wo(r,i,t){try{var a=N.getStreamFromFD(r);a.getdents||(a.getdents=e.readdir(a.path));for(var n=280,f=0,v=e.llseek(a,0,1),u=Math.floor(v/n);u<a.getdents.length&&f+n<=t;){var o,c,_=a.getdents[u];if(_===".")o=a.node.id,c=4;else if(_===".."){var m=e.lookupPath(a.path,{parent:!0});o=m.node.id,c=4}else{var p=e.lookupNode(a.node,_);o=p.id,c=e.isChrdev(p.mode)?2:e.isDir(p.mode)?4:e.isLink(p.mode)?10:8}q=[o>>>0,(P=o,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[i+f>>2]=q[0],h[i+f+4>>2]=q[1],q=[(u+1)*n>>>0,(P=(u+1)*n,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[i+f+8>>2]=q[0],h[i+f+12>>2]=q[1],Ee[i+f+16>>1]=280,$[i+f+18>>0]=c,Ae(_,i+f+19,256),f+=n,u+=1}return e.llseek(a,u*n,0),f}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function Eo(r,i,t){try{var a=ve(r);if(!a.daddr)return-53;var n=rr(i,a.family,ee.lookup_name(a.daddr),a.dport,t);return 0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function go(r,i,t){try{ce("__syscall_getsockname "+r);var a=ve(r),n=rr(i,a.family,ee.lookup_name(a.saddr||"0.0.0.0"),a.sport,t);return 0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function So(r,i,t,a,n){try{var f=ve(r);return i===1&&t===4?(h[a>>2]=f.error,h[n>>2]=4,f.error=null,0):-50}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function bo(r,i,t){N.varargs=t;try{var a=N.getStreamFromFD(r);switch(i){case 21509:case 21505:return a.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return a.tty?0:-59;case 21519:{if(!a.tty)return-59;var n=N.get();return h[n>>2]=0,0}case 21520:return a.tty?-28:-59;case 21531:{var n=N.get();return e.ioctl(a,i,n)}case 21523:return a.tty?0:-59;case 21524:return a.tty?0:-59;default:return-28}}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function ko(r,i){try{var t=ve(r);return t.sock_ops.listen(t,i),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Do(r,i){try{return r=N.getStr(r),N.doStat(e.lstat,r,i)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Oo(r,i,t){try{return i=N.getStr(i),i=N.calculateAt(r,i),i=U.normalize(i),i[i.length-1]==="/"&&(i=i.substr(0,i.length-1)),e.mkdir(i,t,0),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function No(r,i,t,a){try{i=N.getStr(i);var n=a&256,f=a&4096;return a=a&-4353,i=N.calculateAt(r,i,f),N.doStat(n?e.lstat:e.stat,i,t)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function To(r,i,t,a){N.varargs=a;try{i=N.getStr(i),i=N.calculateAt(r,i);var n=a?N.get():0;return e.open(i,t,n).fd}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}var se={BUCKET_BUFFER_SIZE:8192,mount:function(r){return e.createNode(null,"/",16895,0)},createPipe:function(){var r={buckets:[],refcnt:2};r.buckets.push({buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var i=se.nextname(),t=se.nextname(),a=e.createNode(se.root,i,4096,0),n=e.createNode(se.root,t,4096,0);a.pipe=r,n.pipe=r;var f=e.createStream({path:i,node:a,flags:0,seekable:!1,stream_ops:se.stream_ops});a.stream=f;var v=e.createStream({path:t,node:n,flags:1,seekable:!1,stream_ops:se.stream_ops});return n.stream=v,{readable_fd:f.fd,writable_fd:v.fd}},stream_ops:{poll:function(r){var i=r.node.pipe;if((r.flags&2097155)===1)return 260;if(i.buckets.length>0)for(var t=0;t<i.buckets.length;t++){var a=i.buckets[t];if(a.offset-a.roffset>0)return 65}return 0},ioctl:function(r,i,t){return 28},fsync:function(r){return 28},read:function(r,i,t,a,n){for(var f=r.node.pipe,v=0,u=0;u<f.buckets.length;u++){var o=f.buckets[u];v+=o.offset-o.roffset}Ne(i instanceof ArrayBuffer||ArrayBuffer.isView(i));var c=i.subarray(t,t+a);if(a<=0)return 0;if(v==0)throw new e.ErrnoError(6);for(var _=Math.min(v,a),m=_,p=0,u=0;u<f.buckets.length;u++){var y=f.buckets[u],E=y.offset-y.roffset;if(_<=E){var S=y.buffer.subarray(y.roffset,y.offset);_<E?(S=S.subarray(0,_),y.roffset+=_):p++,c.set(S);break}else{var S=y.buffer.subarray(y.roffset,y.offset);c.set(S),c=c.subarray(S.byteLength),_-=S.byteLength,p++}}return p&&p==f.buckets.length&&(p--,f.buckets[p].offset=0,f.buckets[p].roffset=0),f.buckets.splice(0,p),m},write:function(r,i,t,a,n){var f=r.node.pipe;Ne(i instanceof ArrayBuffer||ArrayBuffer.isView(i));var v=i.subarray(t,t+a),u=v.byteLength;if(u<=0)return 0;var o=null;f.buckets.length==0?(o={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0},f.buckets.push(o)):o=f.buckets[f.buckets.length-1],Ne(o.offset<=se.BUCKET_BUFFER_SIZE);var c=se.BUCKET_BUFFER_SIZE-o.offset;if(c>=u)return o.buffer.set(v,o.offset),o.offset+=u,u;c>0&&(o.buffer.set(v.subarray(0,c),o.offset),o.offset+=c,v=v.subarray(c,v.byteLength));for(var _=v.byteLength/se.BUCKET_BUFFER_SIZE|0,m=v.byteLength%se.BUCKET_BUFFER_SIZE,p=0;p<_;p++){var y={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:se.BUCKET_BUFFER_SIZE,roffset:0};f.buckets.push(y),y.buffer.set(v.subarray(0,se.BUCKET_BUFFER_SIZE)),v=v.subarray(se.BUCKET_BUFFER_SIZE,v.byteLength)}if(m>0){var y={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:v.byteLength,roffset:0};f.buckets.push(y),y.buffer.set(v)}return u},close:function(r){var i=r.node.pipe;i.refcnt--,i.refcnt===0&&(i.buckets=null)}},nextname:function(){return se.nextname.current||(se.nextname.current=0),"pipe["+se.nextname.current+++"]"}};function Co(r){try{if(r==0)throw new e.ErrnoError(21);var i=se.createPipe();return h[r>>2]=i.readable_fd,h[r+4>>2]=i.writable_fd,0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function pe(r,i,t){try{for(var a=0,n=0;n<i;n++){var f=r+8*n,v=h[f>>2],u=Ee[f+4>>1],o=32,c=e.getStream(v);c&&(o=N.DEFAULT_POLLMASK,c.stream_ops?.poll&&(o=c.stream_ops.poll(c))),o&=u|8|16,o&&a++,Ee[f+6>>1]=o}return a}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Fo(r,i,t,a){try{if(i=N.getStr(i),i=N.calculateAt(r,i),a<=0)return-28;var n=e.readlink(i),f=Math.min(a,Pe(n)),v=$[t+f];return Ae(n,t,a+1),$[t+f]=v,f}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Ao(r,i,t,a,n,f){try{var v=ve(r),u=v.sock_ops.recvmsg(v,t,typeof a<"u"?a:0);if(!u)return 0;if(n)var o=rr(n,v.family,ee.lookup_name(u.addr),u.port,f);return de.set(u.buffer,i),u.buffer.byteLength}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Po(r,i,t,a){try{return i=N.getStr(i),a=N.getStr(a),i=N.calculateAt(r,i),a=N.calculateAt(t,a),e.rename(i,a),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function Ro(r){try{return r=N.getStr(r),e.rmdir(r),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Mo(r,i,t,a,n,f){try{var v=ve(r),u=Mr(n,f,!0);return u?v.sock_ops.sendmsg(v,$,i,t,u.addr,u.port):e.write(v.stream,$,i,t)}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Lo(r,i,t){try{var a=j.createSocket(r,i,t);return a.stream.fd}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function Io(r,i){try{return r=N.getStr(r),N.doStat(e.stat,r,i)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Uo(r,i,t){try{return r=N.getStr(r),h[t+4>>2]=4096,h[t+40>>2]=4096,h[t+8>>2]=1e6,h[t+12>>2]=5e5,h[t+16>>2]=5e5,h[t+20>>2]=e.nextInode,h[t+24>>2]=1e6,h[t+28>>2]=42,h[t+44>>2]=2,h[t+36>>2]=255,0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Bo(r,i){try{return r=N.getStr(r),i=N.getStr(i),e.symlink(r,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function xo(r,i,t){try{return i=N.getStr(i),i=N.calculateAt(r,i),t===0?e.unlink(i):t===512?e.rmdir(i):ue("Invalid flags passed to unlinkat"),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Br(r){return H[r>>2]+h[r+4>>2]*4294967296}function Ho(r,i,t,a){try{if(i=N.getStr(i),i=N.calculateAt(r,i,!0),t){var v=Br(t),u=h[t+8>>2];n=v*1e3+u/(1e3*1e3),t+=16,v=Br(t),u=h[t+8>>2],f=v*1e3+u/(1e3*1e3)}else var n=Date.now(),f=n;return e.utime(i,n,f),0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function $r(r){}var tn="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function zo(r,i){ue(tn)}function _n(r,i){ue(tn)}var Wo=!0;function jo(){return Wo}function Yo(){throw 1/0}function qo(r,i){var t=new Date(Br(r)*1e3);h[i>>2]=t.getUTCSeconds(),h[i+4>>2]=t.getUTCMinutes(),h[i+8>>2]=t.getUTCHours(),h[i+12>>2]=t.getUTCDate(),h[i+16>>2]=t.getUTCMonth(),h[i+20>>2]=t.getUTCFullYear()-1900,h[i+24>>2]=t.getUTCDay();var a=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),n=(t.getTime()-a)/(1e3*60*60*24)|0;h[i+28>>2]=n}function Vo(r,i){var t=new Date(Br(r)*1e3);h[i>>2]=t.getSeconds(),h[i+4>>2]=t.getMinutes(),h[i+8>>2]=t.getHours(),h[i+12>>2]=t.getDate(),h[i+16>>2]=t.getMonth(),h[i+20>>2]=t.getFullYear()-1900,h[i+24>>2]=t.getDay();var a=new Date(t.getFullYear(),0,1),n=(t.getTime()-a.getTime())/(1e3*60*60*24)|0;h[i+28>>2]=n,h[i+36>>2]=-(t.getTimezoneOffset()*60);var f=new Date(t.getFullYear(),6,1).getTimezoneOffset(),v=a.getTimezoneOffset(),u=(f!=v&&t.getTimezoneOffset()==Math.min(v,f))|0;h[i+32>>2]=u}function Ko(r){var i=new Date(h[r+20>>2]+1900,h[r+16>>2],h[r+12>>2],h[r+8>>2],h[r+4>>2],h[r>>2],0),t=h[r+32>>2],a=i.getTimezoneOffset(),n=new Date(i.getFullYear(),0,1),f=new Date(i.getFullYear(),6,1).getTimezoneOffset(),v=n.getTimezoneOffset(),u=Math.min(v,f);if(t<0)h[r+32>>2]=+(f!=v&&u==a);else if(t>0!=(u==a)){var o=Math.max(v,f),c=t>0?u:o;i.setTime(i.getTime()+(c-a)*6e4)}h[r+24>>2]=i.getDay();var _=(i.getTime()-n.getTime())/(1e3*60*60*24)|0;return h[r+28>>2]=_,h[r>>2]=i.getSeconds(),h[r+4>>2]=i.getMinutes(),h[r+8>>2]=i.getHours(),h[r+12>>2]=i.getDate(),h[r+16>>2]=i.getMonth(),h[r+20>>2]=i.getYear(),i.getTime()/1e3|0}function Go(r,i,t,a,n,f){try{var v=N.getStreamFromFD(a),u=e.mmap(v,r,n,i,t),o=u.ptr;return h[f>>2]=u.allocated,o}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Xo(r,i,t,a,n,f){try{var v=N.getStreamFromFD(n);t&2&&N.doMsync(r,v,i,a,f),e.munmap(v)}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function nn(r){var i=Pe(r)+1,t=qr(i);return t&&Xe(r,$,t,i),t}function $o(r,i,t){var a=new Date().getFullYear(),n=new Date(a,0,1),f=new Date(a,6,1),v=n.getTimezoneOffset(),u=f.getTimezoneOffset(),o=Math.max(v,u);h[r>>2]=o*60,h[i>>2]=+(v!=u);function c(E){var S=E.toTimeString().match(/\(([A-Za-z ]+)\)$/);return S?S[1]:"GMT"}var _=c(n),m=c(f),p=nn(_),y=nn(m);u<v?(H[t>>2]=p,H[t+4>>2]=y):(H[t>>2]=y,H[t+4>>2]=p)}function zr(r,i,t){zr.called||(zr.called=!0,$o(r,i,t))}function Zo(){ue("")}function It(){return Date.now()}function on(){return 2147483648}function Jo(){return on()}var Wr;Z?Wr=()=>{var r=process.hrtime();return r[0]*1e3+r[1]/1e6}:Wr=()=>performance.now();function Qo(r,i,t){de.copyWithin(r,i,i+t)}function Ut(r){try{return or.grow(r-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ei(r){var i=de.length;r=r>>>0;var t=on();if(r>t)return!1;let a=(o,c)=>o+(c-o%c)%c;for(var n=1;n<=4;n*=2){var f=i*(1+.2/n);f=Math.min(f,r+100663296);var v=Math.min(t,a(Math.max(r,f),65536)),u=Ut(v);if(u)return!0}return!1}function wn(r){Ge=r,_r()||(l.onExit&&l.onExit(r),Ce=!0),te(r,new mr(r))}function ri(r,i){Ge=r,_r()||Yn(),wn(r)}var Et=ri;function ti(){if(!_r())try{Et(Ge)}catch(r){pt(r)}}function gt(r){if(!(_t||Ce))try{r(),ti()}catch(i){pt(i)}}function et(){Fr+=1}function jr(){Fr-=1}function Bt(r,i){return et(),setTimeout(function(){jr(),gt(r)},i)}function xt(r){return Fe.handleSleep(i=>Bt(i,r))}var rt=O.ENV||{};function ni(){return J||"./this.program"}function dr(){if(!dr.strings){var r=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",i={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ni()};for(var t in rt)rt[t]===void 0?delete i[t]:i[t]=rt[t];var a=[];for(var t in i)a.push(t+"="+i[t]);dr.strings=a}return dr.strings}function tt(r,i,t){for(var a=0;a<r.length;++a)$[i++>>0]=r.charCodeAt(a);t||($[i>>0]=0)}function Ir(r,i){var t=0;return dr().forEach(function(a,n){var f=i+t;H[r+n*4>>2]=f,tt(a,f),t+=a.length+1}),0}function Ht(r,i){var t=dr();H[r>>2]=t.length;var a=0;return t.forEach(function(n){a+=n.length+1}),H[i>>2]=a,0}function oi(r){try{var i=N.getStreamFromFD(r);return e.close(i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function ii(r,i){try{var t=N.getStreamFromFD(r),a=t.tty?2:e.isDir(t.mode)?3:e.isLink(t.mode)?7:4;return $[i>>0]=a,0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return n.errno}}function ai(r,i,t,a){for(var n=0,f=0;f<t;f++){var v=H[i>>2],u=H[i+4>>2];i+=8;var o=e.read(r,$,v,u,a);if(o<0)return-1;if(n+=o,o<u)break}return n}function si(r,i,t,a){try{var n=N.getStreamFromFD(r),f=ai(n,i,t);return H[a>>2]=f,0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return v.errno}}function ui(r,i,t,a,n){try{var f=rn(i,t);if(isNaN(f))return 61;var v=N.getStreamFromFD(r);return e.llseek(v,f,a),q=[v.position>>>0,(P=v.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[n>>2]=q[0],h[n+4>>2]=q[1],v.getdents&&f===0&&a===0&&(v.getdents=null),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return u.errno}}function fi(r){try{var i=N.getStreamFromFD(r);return Fe.handleSleep(function(t){var a=i.node.mount;if(!a.type.syncfs){t(0);return}a.type.syncfs(a,!1,function(n){if(n){t(function(){return 29});return}t(0)})})}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function ci(r,i,t,a){for(var n=0,f=0;f<t;f++){var v=H[i>>2],u=H[i+4>>2];i+=8;var o=e.write(r,$,v,u,a);if(o<0)return-1;n+=o}return n}function li(r,i,t,a){try{var n=N.getStreamFromFD(r),f=ci(n,i,t);return H[a>>2]=f,0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return v.errno}}function vn(r,i,t,a){var n=0,f=0,v=0,u=0,o=0,c=0,_;function m(p,y,E,S,b,k){var D,T,C,A;return T=p===10?28:16,b=p===10?en(b):Or(b),D=qr(T),A=rr(D,p,b,k),Ne(!A),C=qr(32),h[C+4>>2]=p,h[C+8>>2]=y,h[C+12>>2]=E,h[C+24>>2]=S,H[C+20>>2]=D,p===10?h[C+16>>2]=28:h[C+16>>2]=16,h[C+28>>2]=0,C}if(t&&(v=h[t>>2],u=h[t+4>>2],o=h[t+8>>2],c=h[t+12>>2]),o&&!c&&(c=o===2?17:6),!o&&c&&(o=c===17?2:1),c===0&&(c=6),o===0&&(o=1),!r&&!i)return-2;if(v&-1088||t!==0&&h[t>>2]&2&&!r)return-1;if(v&32)return-2;if(o!==0&&o!==1&&o!==2)return-7;if(u!==0&&u!==2&&u!==10)return-6;if(i&&(i=ne(i),f=parseInt(i,10),isNaN(f)))return v&1024?-2:-8;if(!r)return u===0&&(u=2),v&1||(u===2?n=nt(2130706433):n=[0,0,0,1]),_=m(u,o,c,null,n,f),H[a>>2]=_,0;if(r=ne(r),n=lr(r),n!==null)if(u===0||u===2)u=2;else if(u===10&&v&8)n=[0,0,nt(65535),n],u=10;else return-2;else if(n=Hr(r),n!==null)if(u===0||u===10)u=10;else return-2;return n!=null?(_=m(u,o,c,r,n,f),H[a>>2]=_,0):v&4?-2:(r=ee.lookup_name(r),n=lr(r),u===0?u=2:u===10&&(n=[0,0,nt(65535),n]),_=m(u,o,c,null,n,f),H[a>>2]=_,0)}function An(r){var i=qr(20),t=qr(r.length+1);Ae(r,t,r.length+1),H[i>>2]=t;var a=qr(4);H[a>>2]=0,H[i+4>>2]=a;var n=2;h[i+8>>2]=n,h[i+12>>2]=4;var f=qr(12);return H[f>>2]=f+8,H[f+4>>2]=0,h[f+8>>2]=lr(ee.lookup_name(r)),H[i+16>>2]=f,i}function Dn(r,i,t){if(t!==2)return Kt(5),null;r=h[r>>2];var a=Or(r),n=ee.lookup_addr(a);return n&&(a=n),An(a)}function di(r){return An(ne(r))}function _i(r,i,t,a,n,f){var v=di(r);return qt(i,v,20),er(v),h[f>>2]=0,H[n>>2]=i,0}function En(r,i){for(var t=Math.min(i,3),a=8,n=0;n<t;n++)ut[r+n*a>>3]=.1;return t}function Jr(r,i,t,a,n,f,v){var u=wt(r,i);if(u.errno)return-6;var o=u.port,c=u.addr,_=!1;if(t&&a){var m;if(v&1||!(m=ee.lookup_addr(c))){if(v&8)return-2}else c=m;var p=Ae(c,t,a);p+1>=a&&(_=!0)}if(n&&f){o=""+o;var p=Ae(o,n,f);p+1>=f&&(_=!0)}return _?-12:0}var St={list:[],map:{}};function zt(r){function i(f,v,u){var o=qr(f.length+1);tt(f,o);for(var c=0,_=u.length,m=qr((_+1)*4),p=0;p<_;p++,c+=4){var y=u[p],E=qr(y.length+1);tt(y,E),H[m+c>>2]=E}H[m+c>>2]=0;var S=qr(12);return H[S>>2]=o,H[S+4>>2]=m,h[S+8>>2]=v,S}var t=St.list,a=St.map;if(t.length===0){var n=i("tcp",6,["TCP"]);t.push(n),a.tcp=a[6]=n,n=i("udp",17,["UDP"]),t.push(n),a.udp=a[17]=n}zt.index=0}function Wt(r){r=ne(r),zt(!0);var i=St.map[r];return i}function br(r){zt(!0);var i=St.map[r];return i}function je(r){var i=Pe(r)+1,t=xe(i);return Xe(r,$,t,i),t}var Nr={getAllWebSockets:function(r){let i=new Set;r.server&&r.server.clients.forEach(t=>{i.add(t)});for(let t of Nr.getAllPeers(r))i.add(t.socket);return Array.from(i)},getAllPeers:function(r){let i=new Set;if(r.server&&r.pending.filter(t=>t.peers).forEach(t=>{for(let a of Object.values(t.peers))i.add(a)}),r.peers)for(let t of Object.values(r.peers))i.add(t);return Array.from(i)},awaitData:function(r){return Nr.awaitWsEvent(r,"message")},awaitConnection:function(r){return r.OPEN===r.readyState?[Promise.resolve(),Nr.noop]:Nr.awaitWsEvent(r,"open")},awaitClose:function(r){return[r.CLOSING,r.CLOSED].includes(r.readyState)?[Promise.resolve(),Nr.noop]:Nr.awaitWsEvent(r,"close")},awaitError:function(r){return[r.CLOSING,r.CLOSED].includes(r.readyState)?[Promise.resolve(),Nr.noop]:Nr.awaitWsEvent(r,"error")},awaitWsEvent:function(r,i){let t,a=()=>{t()};return[new Promise(function(v){t=v,r.once(i,a)}),()=>{r.removeListener(i,a),setTimeout(t)}]},noop:function(){},shutdownSocket:function(r,i){let t=ve(r),a=Object.values(t.peers)[0];if(!a)return-1;try{return a.socket.close(),j.websocket_sock_ops.removePeer(t,a),0}catch(n){return console.log("Socket shutdown error",n),-1}}};function Ue(r,i,t){if(!r)return 1;let a=ne(r);if(!a.length)return 0;let n=ne(i);if(!n.length)return 0;if(l.popen_to_file){let{path:f,exitCode:v}=l.popen_to_file(a,n);return de[t]=v,je(f)}if(Z){let f=require("os").tmpdir(),v="php-process-stream",u=f+"/"+v,o=require("child_process"),c;if(n==="r")c=o.spawnSync(a,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[t]=c.status,require("fs").writeFileSync(u,c.stdout,{encoding:"utf8",flag:"w+"});else return n==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+n+" (should be r or w)"),_W_EXITCODE(0,2));return je(u)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function ir(r){return r%4===0&&(r%100!==0||r%400===0)}function qe(r,i){for(var t=0,a=0;a<=i;t+=r[a++]);return t}var Er=[31,29,31,30,31,30,31,31,30,31,30,31],fr=[31,28,31,30,31,30,31,31,30,31,30,31];function Tr(r,i){for(var t=new Date(r.getTime());i>0;){var a=ir(t.getFullYear()),n=t.getMonth(),f=(a?Er:fr)[n];if(i>f-t.getDate())i-=f-t.getDate()+1,t.setDate(1),n<11?t.setMonth(n+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else return t.setDate(t.getDate()+i),t}return t}function Yr(r,i,t,a){var n=h[a+40>>2],f={tm_sec:h[a>>2],tm_min:h[a+4>>2],tm_hour:h[a+8>>2],tm_mday:h[a+12>>2],tm_mon:h[a+16>>2],tm_year:h[a+20>>2],tm_wday:h[a+24>>2],tm_yday:h[a+28>>2],tm_isdst:h[a+32>>2],tm_gmtoff:h[a+36>>2],tm_zone:n?ne(n):""},v=ne(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var o in u)v=v.replace(new RegExp(o,"g"),u[o]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(D,T,C){for(var A=typeof D=="number"?D.toString():D||"";A.length<T;)A=C[0]+A;return A}function p(D,T){return m(D,T,"0")}function y(D,T){function C(I){return I<0?-1:I>0?1:0}var A;return(A=C(D.getFullYear()-T.getFullYear()))===0&&(A=C(D.getMonth()-T.getMonth()))===0&&(A=C(D.getDate()-T.getDate())),A}function E(D){switch(D.getDay()){case 0:return new Date(D.getFullYear()-1,11,29);case 1:return D;case 2:return new Date(D.getFullYear(),0,3);case 3:return new Date(D.getFullYear(),0,2);case 4:return new Date(D.getFullYear(),0,1);case 5:return new Date(D.getFullYear()-1,11,31);case 6:return new Date(D.getFullYear()-1,11,30)}}function S(D){var T=Tr(new Date(D.tm_year+1900,0,1),D.tm_yday),C=new Date(T.getFullYear(),0,4),A=new Date(T.getFullYear()+1,0,4),I=E(C),z=E(A);return y(I,T)<=0?y(z,T)<=0?T.getFullYear()+1:T.getFullYear():T.getFullYear()-1}var b={"%a":function(D){return c[D.tm_wday].substring(0,3)},"%A":function(D){return c[D.tm_wday]},"%b":function(D){return _[D.tm_mon].substring(0,3)},"%B":function(D){return _[D.tm_mon]},"%C":function(D){var T=D.tm_year+1900;return p(T/100|0,2)},"%d":function(D){return p(D.tm_mday,2)},"%e":function(D){return m(D.tm_mday,2," ")},"%g":function(D){return S(D).toString().substring(2)},"%G":function(D){return S(D)},"%H":function(D){return p(D.tm_hour,2)},"%I":function(D){var T=D.tm_hour;return T==0?T=12:T>12&&(T-=12),p(T,2)},"%j":function(D){return p(D.tm_mday+qe(ir(D.tm_year+1900)?Er:fr,D.tm_mon-1),3)},"%m":function(D){return p(D.tm_mon+1,2)},"%M":function(D){return p(D.tm_min,2)},"%n":function(){return`
|
|
22
|
-
`},"%p":function(D){return D.tm_hour>=0&&D.tm_hour<12?"AM":"PM"},"%S":function(D){return p(D.tm_sec,2)},"%t":function(){return" "},"%u":function(D){return D.tm_wday||7},"%U":function(D){var T=D.tm_yday+7-D.tm_wday;return p(Math.floor(T/7),2)},"%V":function(D){var T=Math.floor((D.tm_yday+7-(D.tm_wday+6)%7)/7);if((D.tm_wday+371-D.tm_yday-2)%7<=2&&T++,T){if(T==53){var A=(D.tm_wday+371-D.tm_yday)%7;A!=4&&(A!=3||!ir(D.tm_year))&&(T=1)}}else{T=52;var C=(D.tm_wday+7-D.tm_yday-1)%7;(C==4||C==5&&ir(D.tm_year%400-1))&&T++}return p(T,2)},"%w":function(D){return D.tm_wday},"%W":function(D){var T=D.tm_yday+7-(D.tm_wday+6)%7;return p(Math.floor(T/7),2)},"%y":function(D){return(D.tm_year+1900).toString().substring(2)},"%Y":function(D){return D.tm_year+1900},"%z":function(D){var T=D.tm_gmtoff,C=T>=0;return T=Math.abs(T)/60,T=T/60*100+T%60,(C?"+":"-")+("0000"+T).slice(-4)},"%Z":function(D){return D.tm_zone},"%%":function(){return"%"}};v=v.replace(/%%/g,"\0\0");for(var o in b)v.includes(o)&&(v=v.replace(new RegExp(o,"g"),b[o](f)));v=v.replace(/\0\0/g,"%");var k=Je(v,!1);return k.length>i?0:(ht(k,r),k.length-1)}function jt(r,i,t){for(var a=ne(i),n="\\!@#$^&*()+=-[]/{}|:<>?,.",f=0,v=n.length;f<v;++f)a=a.replace(new RegExp("\\"+n[f],"g"),"\\"+n[f]);var u={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var o in u)a=a.replace(o,u[o]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},_={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},m={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},p={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var y in c)a=a.replace(y,"("+y+c[y]+")");for(var E=[],f=a.indexOf("%");f>=0;f=a.indexOf("%"))E.push(a[f+1]),a=a.replace(new RegExp("\\%"+a[f+1],"g"),"");var S=new RegExp("^"+a,"i").exec(ne(r));function b(){function ze(Ve,Dr,yr){return typeof Ve!="number"||isNaN(Ve)?Dr:Ve>=Dr?Ve<=yr?Ve:yr:Dr}return{year:ze(h[t+20>>2]+1900,1970,9999),month:ze(h[t+16>>2],0,11),day:ze(h[t+12>>2],1,31),hour:ze(h[t+8>>2],0,23),min:ze(h[t+4>>2],0,59),sec:ze(h[t>>2],0,59)}}if(S){var k=b(),D,T=ze=>{var Ve=E.indexOf(ze);if(Ve>=0)return S[Ve+1]};if((D=T("S"))&&(k.sec=Q(D)),(D=T("M"))&&(k.min=Q(D)),D=T("H"))k.hour=Q(D);else if(D=T("I")){var C=Q(D);(D=T("p"))&&(C+=D.toUpperCase()[0]==="P"?12:0),k.hour=C}if(D=T("Y"))k.year=Q(D);else if(D=T("y")){var A=Q(D);(D=T("C"))?A+=Q(D)*100:A+=A<69?2e3:1900,k.year=A}if((D=T("m"))?k.month=Q(D)-1:(D=T("b"))&&(k.month=_[D.substring(0,3).toUpperCase()]||0),D=T("d"))k.day=Q(D);else if(D=T("j"))for(var I=Q(D),z=ir(k.year),K=0;K<12;++K){var B=qe(z?Er:fr,K-1);I<=B+(z?Er:fr)[K]&&(k.day=I-B)}else if(D=T("a")){var x=D.substring(0,3).toUpperCase();if(D=T("U")){var G=m[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===0?le=Tr(oe,G+7*(re-1)):le=Tr(oe,7-oe.getDay()+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}else if(D=T("W")){var G=p[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===1?le=Tr(oe,G+7*(re-1)):le=Tr(oe,7-oe.getDay()+1+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}}var he=new Date(k.year,k.month,k.day,k.hour,k.min,k.sec,0);return h[t>>2]=he.getSeconds(),h[t+4>>2]=he.getMinutes(),h[t+8>>2]=he.getHours(),h[t+12>>2]=he.getDate(),h[t+16>>2]=he.getMonth(),h[t+20>>2]=he.getFullYear()-1900,h[t+24>>2]=he.getDay(),h[t+28>>2]=qe(ir(he.getFullYear())?Er:fr,he.getMonth()-1)+he.getDate()-1,h[t+32>>2]=0,r+Je(S[0]).length-1}return 0}function Yt(r){return Nr.shutdownSocket(r,2)}function Gt(r,i,t){if(typeof Fe>"u")return 0;let a=1,n=2,f=4,v=8,u=16,o=32;return Fe.handleSleep(c=>{let _=ve(r);if(!_){c(0);return}let m=[],p=new Set;if(i&a||i&n){if(_.server){for(let D of _.pending)if((D.recv_queue||[]).length>0){c(1);return}}else if((_.recv_queue||[]).length>0){c(1);return}}let y=Nr.getAllWebSockets(_);if(!y.length){c(0);return}for(let D of y)(i&a||i&n)&&(m.push(Nr.awaitData(D)),p.add("POLLIN")),i&f&&(m.push(Nr.awaitConnection(D)),p.add("POLLOUT")),i&u&&(m.push(Nr.awaitClose(D)),p.add("POLLHUP")),(i&v||i&o)&&(m.push(Nr.awaitError(D)),p.add("POLLERR"));if(m.length===0){console.warn("Unsupported poll event "+i+", defaulting to setTimeout()."),setTimeout(function(){c(0)},t);return}let E=m.map(([D])=>D),S=()=>m.forEach(([,D])=>D()),b=!1;Promise.race(E).then(function(D){b||(b=!0,c(1),clearTimeout(k),S())});let k=setTimeout(function(){b||(b=!0,c(0),S())},t)})}function be(r,i,t,a,n){let f=de[a];if(!(i===1&&t===9||i===6&&t===1))return console.warn(`Unsupported socket option: ${i}, ${t}, ${f}`),-1;let m=Nr.getAllWebSockets(r)[0];return m?(m.setSocketOpt(i,t,a),0):-1}function X(r){try{return r()}catch(i){ue(i)}}var Fe={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(r){var i=Fe.callStackNameToId[r];return i===void 0&&(i=Fe.callStackId++,Fe.callStackNameToId[r]=i,Fe.callStackIdToName[i]=r),i},instrumentWasmImports:function(r){var i=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(a=>a.split(".")[1]);for(var t in r)(function(a){var n=r[a],f=n.sig;if(typeof n=="function")var v=i.indexOf(a)>=0||a.startsWith("__asyncjs__")})(t)},instrumentWasmExports:function(r){var i={};for(var t in r)(function(a){var n=r[a];typeof n=="function"?i[a]=function(){Fe.exportCallStack.push(a);try{return n.apply(null,arguments)}finally{if(!Ce){var f=Fe.exportCallStack.pop();Ne(f===a),Fe.maybeStopUnwind()}}}:i[a]=n})(t);return i},maybeStopUnwind:function(){Fe.currData&&Fe.state===Fe.State.Unwinding&&Fe.exportCallStack.length===0&&(Fe.state=Fe.State.Normal,et(),X(Vt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((r,i)=>{Fe.asyncPromiseHandlers={resolve:r,reject:i}})},allocateData:function(){var r=qr(12+Fe.StackSize);return Fe.setDataHeader(r,r+12,Fe.StackSize),Fe.setDataRewindFunc(r),r},setDataHeader:function(r,i,t){h[r>>2]=i,h[r+4>>2]=i+t},setDataRewindFunc:function(r){var i=Fe.exportCallStack[0],t=Fe.getCallStackId(i);h[r+8>>2]=t},getDataRewindFunc:function(r){var i=h[r+8>>2],t=Fe.callStackIdToName[i],a=l.asm[t];return a},doRewind:function(r){var i=Fe.getDataRewindFunc(r);return jr(),i()},handleSleep:function(r){if(!Ce){if(Fe.state===Fe.State.Normal){var i=!1,t=!1;r(a=>{if(!Ce&&(Fe.handleSleepReturnValue=a||0,i=!0,!!t)){Fe.state=Fe.State.Rewinding,X(()=>cn(Fe.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,f=!1;try{n=Fe.doRewind(Fe.currData)}catch(o){n=o,f=!0}var v=!1;if(!Fe.currData){var u=Fe.asyncPromiseHandlers;u&&(Fe.asyncPromiseHandlers=null,(f?u.reject:u.resolve)(n),v=!0)}if(f&&!v)throw n}}),t=!0,i||(Fe.state=Fe.State.Unwinding,Fe.currData=Fe.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),X(()=>Lt(Fe.currData)))}else Fe.state===Fe.State.Rewinding?(Fe.state=Fe.State.Normal,X(ln),er(Fe.currData),Fe.currData=null,Fe.sleepCallbacks.forEach(a=>gt(a))):ue("invalid state: "+Fe.state);return Fe.handleSleepReturnValue}},handleAsync:function(r){return Fe.handleSleep(i=>{r().then(i)})}};function Xt(r){var i=l["_"+r];return i}function ie(r,i,t,a,n){var f={string:b=>{var k=0;if(b!=null&&b!==0){var D=(b.length<<2)+1;k=xe(D),Ae(b,k,D)}return k},array:b=>{var k=xe(b.length);return ht(b,k),k}};function v(b){return i==="string"?ne(b):i==="boolean"?!!b:b}var u=Xt(r),o=[],c=0;if(a)for(var _=0;_<a.length;_++){var m=f[t[_]];m?(c===0&&(c=tr()),o[_]=m(a[_])):o[_]=a[_]}var p=Fe.currData,y=u.apply(null,o);function E(b){return jr(),c!==0&&De(c),v(b)}et();var S=n&&n.async;return Fe.currData!=p?Fe.whenDone().then(E):(y=E(y),S?Promise.resolve(y):y)}var Gr=function(r,i,t,a){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=e.nextInode++,this.name=i,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=a},xr=365,ke=146;Object.defineProperties(Gr.prototype,{read:{get:function(){return(this.mode&xr)===xr},set:function(r){r?this.mode|=xr:this.mode&=~xr}},write:{get:function(){return(this.mode&ke)===ke},set:function(r){r?this.mode|=ke:this.mode&=~ke}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=Gr,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Te={j:Jn,Ta:Qn,Sa:no,Ra:oo,Qa:io,Pa:ao,P:so,Oa:uo,Na:fo,Ma:co,La:lo,Ka:Xr,Ja:_o,O:vo,o:mo,Ia:po,S:ho,Ha:yo,Ga:wo,Fa:Eo,Ea:go,Da:So,N:bo,Ca:ko,Ba:Do,Aa:Oo,za:No,w:To,ya:Co,xa:pe,wa:Fo,va:Ao,ua:Po,M:Ro,ta:Mo,L:Lo,sa:Io,ra:Uo,qa:Bo,E:xo,pa:Ho,ka:$r,ja:zo,ia:_n,ha:jo,ga:Yo,fa:qo,ea:Vo,da:Ko,ca:Go,ba:Xo,aa:zr,n:Zo,C:It,$:Jo,B:Wr,_:Qo,Z:ei,Y:xt,oa:Ir,na:Ht,p:Et,r:oi,K:ii,J:si,R:ui,ma:fi,D:li,X:vn,I:Dn,H:_i,W:En,G:Jr,V:Wt,U:br,h:Nn,d:Ln,b:Di,f:Ti,g:Ni,u:In,t:pn,v:g,A:kn,e:Tn,a:hn,c:bn,z:Ai,l:Cn,k:Oi,m:Fi,i:Ci,y:w,T:Ue,la:wn,F:Yr,Q:jt,s:Yt,x:Gt,q:be},an=Zn(),On=l.___wasm_call_ctors=function(){return(On=l.___wasm_call_ctors=l.asm.Va).apply(null,arguments)},sn=l._wasm_popen=function(){return(sn=l._wasm_popen=l.asm.Wa).apply(null,arguments)},$t=l.___errno_location=function(){return($t=l.___errno_location=l.asm.Xa).apply(null,arguments)},gn=l._wasm_pclose=function(){return(gn=l._wasm_pclose=l.asm.Ya).apply(null,arguments)},Pn=l._php_pollfd_for=function(){return(Pn=l._php_pollfd_for=l.asm.Za).apply(null,arguments)},bt=l._wasm_select=function(){return(bt=l._wasm_select=l.asm._a).apply(null,arguments)},sr=l._wasm_add_cli_arg=function(){return(sr=l._wasm_add_cli_arg=l.asm.$a).apply(null,arguments)},qr=l._malloc=function(){return(qr=l._malloc=l.asm.ab).apply(null,arguments)},Qt=l._run_cli=function(){return(Qt=l._run_cli=l.asm.bb).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.cb).apply(null,arguments)},qt=l._memcpy=function(){return(qt=l._memcpy=l.asm.db).apply(null,arguments)},Zr=l._fflush=function(){return(Zr=l._fflush=l.asm.fb).apply(null,arguments)},kr=l._htons=function(){return(kr=l._htons=l.asm.gb).apply(null,arguments)},Ur=l._ntohs=function(){return(Ur=l._ntohs=l.asm.hb).apply(null,arguments)},nt=l._htonl=function(){return(nt=l._htonl=l.asm.ib).apply(null,arguments)},Zt=l._wasm_set_phpini_path=function(){return(Zt=l._wasm_set_phpini_path=l.asm.jb).apply(null,arguments)},kt=l._wasm_set_phpini_entries=function(){return(kt=l._wasm_set_phpini_entries=l.asm.kb).apply(null,arguments)},mn=l._wasm_add_SERVER_entry=function(){return(mn=l._wasm_add_SERVER_entry=l.asm.lb).apply(null,arguments)},un=l._wasm_add_uploaded_file=function(){return(un=l._wasm_add_uploaded_file=l.asm.mb).apply(null,arguments)},fn=l._wasm_set_query_string=function(){return(fn=l._wasm_set_query_string=l.asm.nb).apply(null,arguments)},Sn=l._wasm_set_path_translated=function(){return(Sn=l._wasm_set_path_translated=l.asm.ob).apply(null,arguments)},vi=l._wasm_set_skip_shebang=function(){return(vi=l._wasm_set_skip_shebang=l.asm.pb).apply(null,arguments)},mi=l._wasm_set_request_uri=function(){return(mi=l._wasm_set_request_uri=l.asm.qb).apply(null,arguments)},pi=l._wasm_set_request_method=function(){return(pi=l._wasm_set_request_method=l.asm.rb).apply(null,arguments)},hi=l._wasm_set_request_host=function(){return(hi=l._wasm_set_request_host=l.asm.sb).apply(null,arguments)},yi=l._wasm_set_content_type=function(){return(yi=l._wasm_set_content_type=l.asm.tb).apply(null,arguments)},wi=l._wasm_set_request_body=function(){return(wi=l._wasm_set_request_body=l.asm.ub).apply(null,arguments)},Ei=l._wasm_set_content_length=function(){return(Ei=l._wasm_set_content_length=l.asm.vb).apply(null,arguments)},gi=l._wasm_set_cookies=function(){return(gi=l._wasm_set_cookies=l.asm.wb).apply(null,arguments)},Si=l._wasm_set_php_code=function(){return(Si=l._wasm_set_php_code=l.asm.xb).apply(null,arguments)},bi=l._wasm_set_request_port=function(){return(bi=l._wasm_set_request_port=l.asm.yb).apply(null,arguments)},ki=l._phpwasm_init_uploaded_files_hash=function(){return(ki=l._phpwasm_init_uploaded_files_hash=l.asm.zb).apply(null,arguments)},Rn=l._phpwasm_register_uploaded_file=function(){return(Rn=l._phpwasm_register_uploaded_file=l.asm.Ab).apply(null,arguments)},Mn=l._phpwasm_destroy_uploaded_files_hash=function(){return(Mn=l._phpwasm_destroy_uploaded_files_hash=l.asm.Bb).apply(null,arguments)},Sr=l._wasm_sapi_handle_request=function(){return(Sr=l._wasm_sapi_handle_request=l.asm.Cb).apply(null,arguments)},gr=l._php_wasm_init=function(){return(gr=l._php_wasm_init=l.asm.Db).apply(null,arguments)},we=l.___funcs_on_exit=function(){return(we=l.___funcs_on_exit=l.asm.Eb).apply(null,arguments)},Oe=l._emscripten_builtin_memalign=function(){return(Oe=l._emscripten_builtin_memalign=l.asm.Fb).apply(null,arguments)},ye=l._setThrew=function(){return(ye=l._setThrew=l.asm.Gb).apply(null,arguments)},tr=l.stackSave=function(){return(tr=l.stackSave=l.asm.Hb).apply(null,arguments)},De=l.stackRestore=function(){return(De=l.stackRestore=l.asm.Ib).apply(null,arguments)},xe=l.stackAlloc=function(){return(xe=l.stackAlloc=l.asm.Jb).apply(null,arguments)},Ie=l.dynCall_vi=function(){return(Ie=l.dynCall_vi=l.asm.Kb).apply(null,arguments)},ar=l.dynCall_iiii=function(){return(ar=l.dynCall_iiii=l.asm.Lb).apply(null,arguments)},Be=l.dynCall_iii=function(){return(Be=l.dynCall_iii=l.asm.Mb).apply(null,arguments)},He=l.dynCall_iiiii=function(){return(He=l.dynCall_iiiii=l.asm.Nb).apply(null,arguments)},ur=l.dynCall_iiiiii=function(){return(ur=l.dynCall_iiiiii=l.asm.Ob).apply(null,arguments)},Qr=l.dynCall_ii=function(){return(Qr=l.dynCall_ii=l.asm.Pb).apply(null,arguments)},ot=l.dynCall_vii=function(){return(ot=l.dynCall_vii=l.asm.Qb).apply(null,arguments)},it=l.dynCall_viiii=function(){return(it=l.dynCall_viiii=l.asm.Rb).apply(null,arguments)},Dt=l.dynCall_viii=function(){return(Dt=l.dynCall_viii=l.asm.Sb).apply(null,arguments)},Ot=l.dynCall_viiiii=function(){return(Ot=l.dynCall_viiiii=l.asm.Tb).apply(null,arguments)},Nt=l.dynCall_iiiiiii=function(){return(Nt=l.dynCall_iiiiiii=l.asm.Ub).apply(null,arguments)},Tt=l.dynCall_i=function(){return(Tt=l.dynCall_i=l.asm.Vb).apply(null,arguments)},Ct=l.dynCall_v=function(){return(Ct=l.dynCall_v=l.asm.Wb).apply(null,arguments)},Ft=l.dynCall_iiiiiiiiii=function(){return(Ft=l.dynCall_iiiiiiiiii=l.asm.Xb).apply(null,arguments)},At=l.dynCall_viiiiiiiii=function(){return(At=l.dynCall_viiiiiiiii=l.asm.Yb).apply(null,arguments)},Pt=l.dynCall_viiiiii=function(){return(Pt=l.dynCall_viiiiii=l.asm.Zb).apply(null,arguments)},Rt=l.dynCall_iiiiiiii=function(){return(Rt=l.dynCall_iiiiiiii=l.asm._b).apply(null,arguments)},Mt=l.dynCall_viidii=function(){return(Mt=l.dynCall_viidii=l.asm.$b).apply(null,arguments)},Lt=l._asyncify_start_unwind=function(){return(Lt=l._asyncify_start_unwind=l.asm.ac).apply(null,arguments)},Vt=l._asyncify_stop_unwind=function(){return(Vt=l._asyncify_stop_unwind=l.asm.bc).apply(null,arguments)},cn=l._asyncify_start_rewind=function(){return(cn=l._asyncify_start_rewind=l.asm.cc).apply(null,arguments)},ln=l._asyncify_stop_rewind=function(){return(ln=l._asyncify_stop_rewind=l.asm.dc).apply(null,arguments)};function pn(r,i,t,a,n,f,v){var u=tr();try{return Nt(r,i,t,a,n,f,v)}catch(o){if(De(u),o!==o+0)throw o;ye(1,0)}}function hn(r,i){var t=tr();try{Ie(r,i)}catch(a){if(De(t),a!==a+0)throw a;ye(1,0)}}function bn(r,i,t){var a=tr();try{ot(r,i,t)}catch(n){if(De(a),n!==n+0)throw n;ye(1,0)}}function Nn(r){var i=tr();try{return Tt(r)}catch(t){if(De(i),t!==t+0)throw t;ye(1,0)}}function Tn(r){var i=tr();try{Ct(r)}catch(t){if(De(i),t!==t+0)throw t;ye(1,0)}}function Cn(r,i,t,a){var n=tr();try{Dt(r,i,t,a)}catch(f){if(De(n),f!==f+0)throw f;ye(1,0)}}function Ln(r,i){var t=tr();try{return Qr(r,i)}catch(a){if(De(t),a!==a+0)throw a;ye(1,0)}}function Di(r,i,t){var a=tr();try{return Be(r,i,t)}catch(n){if(De(a),n!==n+0)throw n;ye(1,0)}}function Oi(r,i,t,a,n){var f=tr();try{it(r,i,t,a,n)}catch(v){if(De(f),v!==v+0)throw v;ye(1,0)}}function Ni(r,i,t,a,n){var f=tr();try{return He(r,i,t,a,n)}catch(v){if(De(f),v!==v+0)throw v;ye(1,0)}}function Ti(r,i,t,a){var n=tr();try{return ar(r,i,t,a)}catch(f){if(De(n),f!==f+0)throw f;ye(1,0)}}function Ci(r,i,t,a,n,f,v){var u=tr();try{Pt(r,i,t,a,n,f,v)}catch(o){if(De(u),o!==o+0)throw o;ye(1,0)}}function Fi(r,i,t,a,n,f){var v=tr();try{Ot(r,i,t,a,n,f)}catch(u){if(De(v),u!==u+0)throw u;ye(1,0)}}function Ai(r,i,t,a,n,f){var v=tr();try{Mt(r,i,t,a,n,f)}catch(u){if(De(v),u!==u+0)throw u;ye(1,0)}}function kn(r,i,t,a,n,f,v,u,o,c){var _=tr();try{return Ft(r,i,t,a,n,f,v,u,o,c)}catch(m){if(De(_),m!==m+0)throw m;ye(1,0)}}function In(r,i,t,a,n,f){var v=tr();try{return ur(r,i,t,a,n,f)}catch(u){if(De(v),u!==u+0)throw u;ye(1,0)}}function w(r,i,t,a,n,f,v,u,o,c){var _=tr();try{At(r,i,t,a,n,f,v,u,o,c)}catch(m){if(De(_),m!==m+0)throw m;ye(1,0)}}function g(r,i,t,a,n,f,v,u){var o=tr();try{return Rt(r,i,t,a,n,f,v,u)}catch(c){if(De(o),c!==c+0)throw c;ye(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=ie,l.FS=e;var s;$e=function r(){s||d(),s||($e=r)};function d(r){if(r=r||Y,Re>0||(Wn(),Re>0))return;function i(){s||(s=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),i()},1)):i()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return d(),O}var Wc,zu,ju=Ki(()=>{"use strict";Wc=10898323,zu=__dirname+"/php_7_3.wasm"});var qu={};Hi(qu,{dependenciesTotalSize:()=>Yc,dependencyFilename:()=>Yu,init:()=>qc});function qc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(s,d)=>{throw d},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(s){return l.locateFile?l.locateFile(s,ae):ae+s}var Ye,nr,Me;function Lr(s){if(s instanceof mr)return;ce("exiting due to exception: "+s)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(s,d)=>(wr(),s=Le.normalize(s),V.readFileSync(s,d?void 0:"utf8")),Me=s=>{var d=Ye(s,!0);return d.buffer||(d=new Uint8Array(d)),d},nr=(s,d,r)=>{wr(),s=Le.normalize(s),V.readFile(s,function(i,t){i?r(i):d(t.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(s){if(!(s instanceof mr))throw s}),process.on("unhandledRejection",function(s){throw s}),te=(s,d)=>{if(_r())throw process.exitCode=s,d;Lr(d),process.exit(s)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(s,d){s||ue(d)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(s,d,r){for(var i=d+r,t=d;s[t]&&!(t>=i);)++t;if(t-d>16&&s.buffer&&at)return at.decode(s.subarray(d,t));for(var a="";d<t;){var n=s[d++];if(!(n&128)){a+=String.fromCharCode(n);continue}var f=s[d++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|f);continue}var v=s[d++]&63;if((n&240)==224?n=(n&15)<<12|f<<6|v:n=(n&7)<<18|f<<12|v<<6|s[d++]&63,n<65536)a+=String.fromCharCode(n);else{var u=n-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a}function ne(s,d){return s?We(de,s,d):""}function Xe(s,d,r,i){if(!(i>0))return 0;for(var t=r,a=r+i-1,n=0;n<s.length;++n){var f=s.charCodeAt(n);if(f>=55296&&f<=57343){var v=s.charCodeAt(++n);f=65536+((f&1023)<<10)|v&1023}if(f<=127){if(r>=a)break;d[r++]=f}else if(f<=2047){if(r+1>=a)break;d[r++]=192|f>>6,d[r++]=128|f&63}else if(f<=65535){if(r+2>=a)break;d[r++]=224|f>>12,d[r++]=128|f>>6&63,d[r++]=128|f&63}else{if(r+3>=a)break;d[r++]=240|f>>18,d[r++]=128|f>>12&63,d[r++]=128|f>>6&63,d[r++]=128|f&63}}return d[r]=0,r-t}function Ae(s,d,r){return Xe(s,de,d,r)}function Pe(s){for(var d=0,r=0;r<s.length;++r){var i=s.charCodeAt(r);i<=127?d++:i<=2047?d+=2:i>=55296&&i<=57343?(d+=4,++r):d+=3}return d}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(s){Cr=s,l.HEAP8=$=new Int8Array(s),l.HEAP16=Ee=new Int16Array(s),l.HEAP32=h=new Int32Array(s),l.HEAPU8=de=new Uint8Array(s),l.HEAPU16=st=new Uint16Array(s),l.HEAPU32=H=new Uint32Array(s),l.HEAPF32=Bn=new Float32Array(s),l.HEAPF64=ut=new Float64Array(s)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Sr(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(s){ct.unshift(s)}function Kn(s){lt.unshift(s)}function Gn(s){dt.unshift(s)}var Re=0,Ar=null,$e=null;function Qi(s){return s}function vr(s){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(s){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var d=$e;$e=null,d()}}function ue(s){l.onAbort&&l.onAbort(s),s="Aborted("+s+")",ce(s),Ce=!0,Ge=1,s+=". Build with -sASSERTIONS for more info.";var d=new WebAssembly.RuntimeError(s);throw d}var Xn="data:application/octet-stream;base64,";function vt(s){return s.startsWith(Xn)}var _e;_e=Yu,vt(_e)||(_e=cr(_e));function mt(s){try{if(s==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(s);throw"both async and sync fetching of the wasm failed"}catch(d){ue(d)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(s){if(!s.ok)throw"failed to load wasm binary file at '"+_e+"'";return s.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var s={a:ke};function d(n,f){var v=n.exports;v=X.instrumentWasmExports(v),l.asm=v,or=l.asm.Ta,ft(or.buffer),xn=l.asm.db,Kn(l.asm.Ua),Ze("wasm-instantiate")}vr("wasm-instantiate");function r(n){d(n.instance)}function i(n){return $n().then(function(f){return WebAssembly.instantiate(f,s)}).then(function(f){return f}).then(n,function(f){ce("failed to asynchronously prepare wasm: "+f),ue(f)})}function t(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(n){var f=WebAssembly.instantiateStreaming(n,s);return f.then(r,function(v){return ce("wasm streaming compile failed: "+v),ce("falling back to ArrayBuffer instantiation"),i(r)})}):i(r)}if(l.instantiateWasm)try{var a=l.instantiateWasm(s,d);return a=X.instrumentWasmExports(a),a}catch(n){return ce("Module.instantiateWasm callback failed with error: "+n),!1}return t(),{}}var P,q;function mr(s){this.name="ExitStatus",this.message="Program terminated with exit("+s+")",this.status=s}function pr(s){for(;s.length>0;)s.shift()(l)}function pt(s){if(s instanceof mr||s=="unwind")return Ge;te(1,s)}function ht(s,d){$.set(s,d)}function Jn(s,d,r,i){ue("Assertion failed: "+ne(s)+", at: "+[d?ne(d):"unknown filename",r,i?ne(i):"unknown function"])}function Qn(s,d){(function(r){De.apply(null,[s,r])})(d)}var U={isAbs:s=>s.charAt(0)==="/",splitPath:s=>{var d=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return d.exec(s).slice(1)},normalizeArray:(s,d)=>{for(var r=0,i=s.length-1;i>=0;i--){var t=s[i];t==="."?s.splice(i,1):t===".."?(s.splice(i,1),r++):r&&(s.splice(i,1),r--)}if(d)for(;r;r--)s.unshift("..");return s},normalize:s=>{var d=U.isAbs(s),r=s.substr(-1)==="/";return s=U.normalizeArray(s.split("/").filter(i=>!!i),!d).join("/"),!s&&!d&&(s="."),s&&r&&(s+="/"),(d?"/":"")+s},dirname:s=>{var d=U.splitPath(s),r=d[0],i=d[1];return!r&&!i?".":(i&&(i=i.substr(0,i.length-1)),r+i)},basename:s=>{if(s==="/")return"/";s=U.normalize(s),s=s.replace(/\/$/,"");var d=s.lastIndexOf("/");return d===-1?s:s.substr(d+1)},join:function(){var s=Array.prototype.slice.call(arguments);return U.normalize(s.join("/"))},join2:(s,d)=>U.normalize(s+"/"+d)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var s=new Uint8Array(1);return()=>(crypto.getRandomValues(s),s[0])}else if(Z)try{var d=require("crypto");return()=>d.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var s="",d=!1,r=arguments.length-1;r>=-1&&!d;r--){var i=r>=0?arguments[r]:e.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";s=i+"/"+s,d=U.isAbs(i)}return s=U.normalizeArray(s.split("/").filter(t=>!!t),!d).join("/"),(d?"/":"")+s||"."},relative:(s,d)=>{s=ge.resolve(s).substr(1),d=ge.resolve(d).substr(1);function r(u){for(var o=0;o<u.length&&u[o]==="";o++);for(var c=u.length-1;c>=0&&u[c]==="";c--);return o>c?[]:u.slice(o,c-o+1)}for(var i=r(s.split("/")),t=r(d.split("/")),a=Math.min(i.length,t.length),n=a,f=0;f<a;f++)if(i[f]!==t[f]){n=f;break}for(var v=[],f=n;f<i.length;f++)v.push("..");return v=v.concat(t.slice(n)),v.join("/")}};function Je(s,d,r){var i=r>0?r:Pe(s)+1,t=new Array(i),a=Xe(s,t,0,t.length);return d&&(t.length=a),t}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(s,d){Se.ttys[s]={input:[],output:[],ops:d},e.registerDevice(s,Se.stream_ops)},stream_ops:{open:function(s){var d=Se.ttys[s.node.rdev];if(!d)throw new e.ErrnoError(43);s.tty=d,s.seekable=!1},close:function(s){s.tty.ops.fsync(s.tty)},fsync:function(s){s.tty.ops.fsync(s.tty)},read:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.get_char)throw new e.ErrnoError(60);for(var a=0,n=0;n<i;n++){var f;try{f=s.tty.ops.get_char(s.tty)}catch{throw new e.ErrnoError(29)}if(f===void 0&&a===0)throw new e.ErrnoError(6);if(f==null)break;a++,d[r+n]=f}return a&&(s.node.timestamp=Date.now()),a},write:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var a=0;a<i;a++)s.tty.ops.put_char(s.tty,d[r+a])}catch{throw new e.ErrnoError(29)}return i&&(s.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(s){if(!s.input.length){var d=null;if(Z){var r=256,i=Buffer.alloc(r),t=0;try{t=V.readSync(process.stdin.fd,i,0,r,-1)}catch(a){if(a.toString().includes("EOF"))t=0;else throw a}t>0?d=i.slice(0,t).toString("utf-8"):d=null}else typeof window<"u"&&typeof window.prompt=="function"?(d=window.prompt("Input: "),d!==null&&(d+=`
|
|
22
|
+
`},"%p":function(D){return D.tm_hour>=0&&D.tm_hour<12?"AM":"PM"},"%S":function(D){return p(D.tm_sec,2)},"%t":function(){return" "},"%u":function(D){return D.tm_wday||7},"%U":function(D){var T=D.tm_yday+7-D.tm_wday;return p(Math.floor(T/7),2)},"%V":function(D){var T=Math.floor((D.tm_yday+7-(D.tm_wday+6)%7)/7);if((D.tm_wday+371-D.tm_yday-2)%7<=2&&T++,T){if(T==53){var A=(D.tm_wday+371-D.tm_yday)%7;A!=4&&(A!=3||!ir(D.tm_year))&&(T=1)}}else{T=52;var C=(D.tm_wday+7-D.tm_yday-1)%7;(C==4||C==5&&ir(D.tm_year%400-1))&&T++}return p(T,2)},"%w":function(D){return D.tm_wday},"%W":function(D){var T=D.tm_yday+7-(D.tm_wday+6)%7;return p(Math.floor(T/7),2)},"%y":function(D){return(D.tm_year+1900).toString().substring(2)},"%Y":function(D){return D.tm_year+1900},"%z":function(D){var T=D.tm_gmtoff,C=T>=0;return T=Math.abs(T)/60,T=T/60*100+T%60,(C?"+":"-")+("0000"+T).slice(-4)},"%Z":function(D){return D.tm_zone},"%%":function(){return"%"}};v=v.replace(/%%/g,"\0\0");for(var o in b)v.includes(o)&&(v=v.replace(new RegExp(o,"g"),b[o](f)));v=v.replace(/\0\0/g,"%");var k=Je(v,!1);return k.length>i?0:(ht(k,r),k.length-1)}function jt(r,i,t){for(var a=ne(i),n="\\!@#$^&*()+=-[]/{}|:<>?,.",f=0,v=n.length;f<v;++f)a=a.replace(new RegExp("\\"+n[f],"g"),"\\"+n[f]);var u={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var o in u)a=a.replace(o,u[o]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},_={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},m={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},p={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var y in c)a=a.replace(y,"("+y+c[y]+")");for(var E=[],f=a.indexOf("%");f>=0;f=a.indexOf("%"))E.push(a[f+1]),a=a.replace(new RegExp("\\%"+a[f+1],"g"),"");var S=new RegExp("^"+a,"i").exec(ne(r));function b(){function ze(Ve,Dr,yr){return typeof Ve!="number"||isNaN(Ve)?Dr:Ve>=Dr?Ve<=yr?Ve:yr:Dr}return{year:ze(h[t+20>>2]+1900,1970,9999),month:ze(h[t+16>>2],0,11),day:ze(h[t+12>>2],1,31),hour:ze(h[t+8>>2],0,23),min:ze(h[t+4>>2],0,59),sec:ze(h[t>>2],0,59)}}if(S){var k=b(),D,T=ze=>{var Ve=E.indexOf(ze);if(Ve>=0)return S[Ve+1]};if((D=T("S"))&&(k.sec=Q(D)),(D=T("M"))&&(k.min=Q(D)),D=T("H"))k.hour=Q(D);else if(D=T("I")){var C=Q(D);(D=T("p"))&&(C+=D.toUpperCase()[0]==="P"?12:0),k.hour=C}if(D=T("Y"))k.year=Q(D);else if(D=T("y")){var A=Q(D);(D=T("C"))?A+=Q(D)*100:A+=A<69?2e3:1900,k.year=A}if((D=T("m"))?k.month=Q(D)-1:(D=T("b"))&&(k.month=_[D.substring(0,3).toUpperCase()]||0),D=T("d"))k.day=Q(D);else if(D=T("j"))for(var I=Q(D),z=ir(k.year),K=0;K<12;++K){var B=qe(z?Er:fr,K-1);I<=B+(z?Er:fr)[K]&&(k.day=I-B)}else if(D=T("a")){var x=D.substring(0,3).toUpperCase();if(D=T("U")){var G=m[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===0?le=Tr(oe,G+7*(re-1)):le=Tr(oe,7-oe.getDay()+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}else if(D=T("W")){var G=p[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===1?le=Tr(oe,G+7*(re-1)):le=Tr(oe,7-oe.getDay()+1+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}}var he=new Date(k.year,k.month,k.day,k.hour,k.min,k.sec,0);return h[t>>2]=he.getSeconds(),h[t+4>>2]=he.getMinutes(),h[t+8>>2]=he.getHours(),h[t+12>>2]=he.getDate(),h[t+16>>2]=he.getMonth(),h[t+20>>2]=he.getFullYear()-1900,h[t+24>>2]=he.getDay(),h[t+28>>2]=qe(ir(he.getFullYear())?Er:fr,he.getMonth()-1)+he.getDate()-1,h[t+32>>2]=0,r+Je(S[0]).length-1}return 0}function Yt(r){return Nr.shutdownSocket(r,2)}function Gt(r,i,t){if(typeof Fe>"u")return 0;let a=1,n=2,f=4,v=8,u=16,o=32;return Fe.handleSleep(c=>{let _=ve(r);if(!_){c(0);return}let m=[],p=new Set;if(i&a||i&n){if(_.server){for(let D of _.pending)if((D.recv_queue||[]).length>0){c(1);return}}else if((_.recv_queue||[]).length>0){c(1);return}}let y=Nr.getAllWebSockets(_);if(!y.length){c(0);return}for(let D of y)(i&a||i&n)&&(m.push(Nr.awaitData(D)),p.add("POLLIN")),i&f&&(m.push(Nr.awaitConnection(D)),p.add("POLLOUT")),i&u&&(m.push(Nr.awaitClose(D)),p.add("POLLHUP")),(i&v||i&o)&&(m.push(Nr.awaitError(D)),p.add("POLLERR"));if(m.length===0){console.warn("Unsupported poll event "+i+", defaulting to setTimeout()."),setTimeout(function(){c(0)},t);return}let E=m.map(([D])=>D),S=()=>m.forEach(([,D])=>D()),b=!1;Promise.race(E).then(function(D){b||(b=!0,c(1),clearTimeout(k),S())});let k=setTimeout(function(){b||(b=!0,c(0),S())},t)})}function be(r,i,t,a,n){let f=de[a];if(!(i===1&&t===9||i===6&&t===1))return console.warn(`Unsupported socket option: ${i}, ${t}, ${f}`),-1;let m=Nr.getAllWebSockets(r)[0];return m?(m.setSocketOpt(i,t,a),0):-1}function X(r){try{return r()}catch(i){ue(i)}}var Fe={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(r){var i=Fe.callStackNameToId[r];return i===void 0&&(i=Fe.callStackId++,Fe.callStackNameToId[r]=i,Fe.callStackIdToName[i]=r),i},instrumentWasmImports:function(r){var i=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(a=>a.split(".")[1]);for(var t in r)(function(a){var n=r[a],f=n.sig;if(typeof n=="function")var v=i.indexOf(a)>=0||a.startsWith("__asyncjs__")})(t)},instrumentWasmExports:function(r){var i={};for(var t in r)(function(a){var n=r[a];typeof n=="function"?i[a]=function(){Fe.exportCallStack.push(a);try{return n.apply(null,arguments)}finally{if(!Ce){var f=Fe.exportCallStack.pop();Ne(f===a),Fe.maybeStopUnwind()}}}:i[a]=n})(t);return i},maybeStopUnwind:function(){Fe.currData&&Fe.state===Fe.State.Unwinding&&Fe.exportCallStack.length===0&&(Fe.state=Fe.State.Normal,et(),X(Vt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((r,i)=>{Fe.asyncPromiseHandlers={resolve:r,reject:i}})},allocateData:function(){var r=qr(12+Fe.StackSize);return Fe.setDataHeader(r,r+12,Fe.StackSize),Fe.setDataRewindFunc(r),r},setDataHeader:function(r,i,t){h[r>>2]=i,h[r+4>>2]=i+t},setDataRewindFunc:function(r){var i=Fe.exportCallStack[0],t=Fe.getCallStackId(i);h[r+8>>2]=t},getDataRewindFunc:function(r){var i=h[r+8>>2],t=Fe.callStackIdToName[i],a=l.asm[t];return a},doRewind:function(r){var i=Fe.getDataRewindFunc(r);return jr(),i()},handleSleep:function(r){if(!Ce){if(Fe.state===Fe.State.Normal){var i=!1,t=!1;r(a=>{if(!Ce&&(Fe.handleSleepReturnValue=a||0,i=!0,!!t)){Fe.state=Fe.State.Rewinding,X(()=>cn(Fe.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,f=!1;try{n=Fe.doRewind(Fe.currData)}catch(o){n=o,f=!0}var v=!1;if(!Fe.currData){var u=Fe.asyncPromiseHandlers;u&&(Fe.asyncPromiseHandlers=null,(f?u.reject:u.resolve)(n),v=!0)}if(f&&!v)throw n}}),t=!0,i||(Fe.state=Fe.State.Unwinding,Fe.currData=Fe.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),X(()=>Lt(Fe.currData)))}else Fe.state===Fe.State.Rewinding?(Fe.state=Fe.State.Normal,X(ln),er(Fe.currData),Fe.currData=null,Fe.sleepCallbacks.forEach(a=>gt(a))):ue("invalid state: "+Fe.state);return Fe.handleSleepReturnValue}},handleAsync:function(r){return Fe.handleSleep(i=>{r().then(i)})}};function Xt(r){var i=l["_"+r];return i}function ie(r,i,t,a,n){var f={string:b=>{var k=0;if(b!=null&&b!==0){var D=(b.length<<2)+1;k=xe(D),Ae(b,k,D)}return k},array:b=>{var k=xe(b.length);return ht(b,k),k}};function v(b){return i==="string"?ne(b):i==="boolean"?!!b:b}var u=Xt(r),o=[],c=0;if(a)for(var _=0;_<a.length;_++){var m=f[t[_]];m?(c===0&&(c=tr()),o[_]=m(a[_])):o[_]=a[_]}var p=Fe.currData,y=u.apply(null,o);function E(b){return jr(),c!==0&&De(c),v(b)}et();var S=n&&n.async;return Fe.currData!=p?Fe.whenDone().then(E):(y=E(y),S?Promise.resolve(y):y)}var Gr=function(r,i,t,a){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=e.nextInode++,this.name=i,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=a},xr=365,ke=146;Object.defineProperties(Gr.prototype,{read:{get:function(){return(this.mode&xr)===xr},set:function(r){r?this.mode|=xr:this.mode&=~xr}},write:{get:function(){return(this.mode&ke)===ke},set:function(r){r?this.mode|=ke:this.mode&=~ke}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=Gr,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var Te={j:Jn,Ta:Qn,Sa:no,Ra:oo,Qa:io,Pa:ao,P:so,Oa:uo,Na:fo,Ma:co,La:lo,Ka:Xr,Ja:_o,O:vo,o:mo,Ia:po,S:ho,Ha:yo,Ga:wo,Fa:Eo,Ea:go,Da:So,N:bo,Ca:ko,Ba:Do,Aa:Oo,za:No,w:To,ya:Co,xa:pe,wa:Fo,va:Ao,ua:Po,M:Ro,ta:Mo,L:Lo,sa:Io,ra:Uo,qa:Bo,E:xo,pa:Ho,ka:$r,ja:zo,ia:_n,ha:jo,ga:Yo,fa:qo,ea:Vo,da:Ko,ca:Go,ba:Xo,aa:zr,n:Zo,C:It,$:Jo,B:Wr,_:Qo,Z:ei,Y:xt,oa:Ir,na:Ht,p:Et,r:oi,K:ii,J:si,R:ui,ma:fi,D:li,X:vn,I:Dn,H:_i,W:En,G:Jr,V:Wt,U:br,h:Nn,d:Ln,b:Di,f:Ti,g:Ni,u:In,t:pn,v:g,A:kn,e:Tn,a:hn,c:bn,z:Ai,l:Cn,k:Oi,m:Fi,i:Ci,y:w,T:Ue,la:wn,F:Yr,Q:jt,s:Yt,x:Gt,q:be},an=Zn(),On=l.___wasm_call_ctors=function(){return(On=l.___wasm_call_ctors=l.asm.Va).apply(null,arguments)},sn=l._wasm_popen=function(){return(sn=l._wasm_popen=l.asm.Wa).apply(null,arguments)},$t=l.___errno_location=function(){return($t=l.___errno_location=l.asm.Xa).apply(null,arguments)},gn=l._wasm_pclose=function(){return(gn=l._wasm_pclose=l.asm.Ya).apply(null,arguments)},Pn=l._php_pollfd_for=function(){return(Pn=l._php_pollfd_for=l.asm.Za).apply(null,arguments)},bt=l._wasm_select=function(){return(bt=l._wasm_select=l.asm._a).apply(null,arguments)},sr=l._wasm_add_cli_arg=function(){return(sr=l._wasm_add_cli_arg=l.asm.$a).apply(null,arguments)},qr=l._malloc=function(){return(qr=l._malloc=l.asm.ab).apply(null,arguments)},Qt=l._run_cli=function(){return(Qt=l._run_cli=l.asm.bb).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.cb).apply(null,arguments)},qt=l._memcpy=function(){return(qt=l._memcpy=l.asm.db).apply(null,arguments)},Zr=l._fflush=function(){return(Zr=l._fflush=l.asm.fb).apply(null,arguments)},kr=l._htons=function(){return(kr=l._htons=l.asm.gb).apply(null,arguments)},Ur=l._ntohs=function(){return(Ur=l._ntohs=l.asm.hb).apply(null,arguments)},nt=l._htonl=function(){return(nt=l._htonl=l.asm.ib).apply(null,arguments)},Zt=l._wasm_set_phpini_path=function(){return(Zt=l._wasm_set_phpini_path=l.asm.jb).apply(null,arguments)},kt=l._wasm_set_phpini_entries=function(){return(kt=l._wasm_set_phpini_entries=l.asm.kb).apply(null,arguments)},mn=l._wasm_add_SERVER_entry=function(){return(mn=l._wasm_add_SERVER_entry=l.asm.lb).apply(null,arguments)},un=l._wasm_add_uploaded_file=function(){return(un=l._wasm_add_uploaded_file=l.asm.mb).apply(null,arguments)},fn=l._wasm_set_query_string=function(){return(fn=l._wasm_set_query_string=l.asm.nb).apply(null,arguments)},Sn=l._wasm_set_path_translated=function(){return(Sn=l._wasm_set_path_translated=l.asm.ob).apply(null,arguments)},vi=l._wasm_set_skip_shebang=function(){return(vi=l._wasm_set_skip_shebang=l.asm.pb).apply(null,arguments)},mi=l._wasm_set_request_uri=function(){return(mi=l._wasm_set_request_uri=l.asm.qb).apply(null,arguments)},pi=l._wasm_set_request_method=function(){return(pi=l._wasm_set_request_method=l.asm.rb).apply(null,arguments)},hi=l._wasm_set_request_host=function(){return(hi=l._wasm_set_request_host=l.asm.sb).apply(null,arguments)},yi=l._wasm_set_content_type=function(){return(yi=l._wasm_set_content_type=l.asm.tb).apply(null,arguments)},wi=l._wasm_set_request_body=function(){return(wi=l._wasm_set_request_body=l.asm.ub).apply(null,arguments)},Ei=l._wasm_set_content_length=function(){return(Ei=l._wasm_set_content_length=l.asm.vb).apply(null,arguments)},gi=l._wasm_set_cookies=function(){return(gi=l._wasm_set_cookies=l.asm.wb).apply(null,arguments)},Si=l._wasm_set_php_code=function(){return(Si=l._wasm_set_php_code=l.asm.xb).apply(null,arguments)},bi=l._wasm_set_request_port=function(){return(bi=l._wasm_set_request_port=l.asm.yb).apply(null,arguments)},ki=l._phpwasm_init_uploaded_files_hash=function(){return(ki=l._phpwasm_init_uploaded_files_hash=l.asm.zb).apply(null,arguments)},Rn=l._phpwasm_register_uploaded_file=function(){return(Rn=l._phpwasm_register_uploaded_file=l.asm.Ab).apply(null,arguments)},Mn=l._phpwasm_destroy_uploaded_files_hash=function(){return(Mn=l._phpwasm_destroy_uploaded_files_hash=l.asm.Bb).apply(null,arguments)},Sr=l._wasm_sapi_handle_request=function(){return(Sr=l._wasm_sapi_handle_request=l.asm.Cb).apply(null,arguments)},gr=l._php_wasm_init=function(){return(gr=l._php_wasm_init=l.asm.Db).apply(null,arguments)},we=l.___funcs_on_exit=function(){return(we=l.___funcs_on_exit=l.asm.Eb).apply(null,arguments)},Oe=l._emscripten_builtin_memalign=function(){return(Oe=l._emscripten_builtin_memalign=l.asm.Fb).apply(null,arguments)},ye=l._setThrew=function(){return(ye=l._setThrew=l.asm.Gb).apply(null,arguments)},tr=l.stackSave=function(){return(tr=l.stackSave=l.asm.Hb).apply(null,arguments)},De=l.stackRestore=function(){return(De=l.stackRestore=l.asm.Ib).apply(null,arguments)},xe=l.stackAlloc=function(){return(xe=l.stackAlloc=l.asm.Jb).apply(null,arguments)},Ie=l.dynCall_vi=function(){return(Ie=l.dynCall_vi=l.asm.Kb).apply(null,arguments)},ar=l.dynCall_iiii=function(){return(ar=l.dynCall_iiii=l.asm.Lb).apply(null,arguments)},Be=l.dynCall_iii=function(){return(Be=l.dynCall_iii=l.asm.Mb).apply(null,arguments)},He=l.dynCall_iiiii=function(){return(He=l.dynCall_iiiii=l.asm.Nb).apply(null,arguments)},ur=l.dynCall_iiiiii=function(){return(ur=l.dynCall_iiiiii=l.asm.Ob).apply(null,arguments)},Qr=l.dynCall_ii=function(){return(Qr=l.dynCall_ii=l.asm.Pb).apply(null,arguments)},ot=l.dynCall_vii=function(){return(ot=l.dynCall_vii=l.asm.Qb).apply(null,arguments)},it=l.dynCall_viiii=function(){return(it=l.dynCall_viiii=l.asm.Rb).apply(null,arguments)},Dt=l.dynCall_viii=function(){return(Dt=l.dynCall_viii=l.asm.Sb).apply(null,arguments)},Ot=l.dynCall_viiiii=function(){return(Ot=l.dynCall_viiiii=l.asm.Tb).apply(null,arguments)},Nt=l.dynCall_iiiiiii=function(){return(Nt=l.dynCall_iiiiiii=l.asm.Ub).apply(null,arguments)},Tt=l.dynCall_i=function(){return(Tt=l.dynCall_i=l.asm.Vb).apply(null,arguments)},Ct=l.dynCall_v=function(){return(Ct=l.dynCall_v=l.asm.Wb).apply(null,arguments)},Ft=l.dynCall_iiiiiiiiii=function(){return(Ft=l.dynCall_iiiiiiiiii=l.asm.Xb).apply(null,arguments)},At=l.dynCall_viiiiiiiii=function(){return(At=l.dynCall_viiiiiiiii=l.asm.Yb).apply(null,arguments)},Pt=l.dynCall_viiiiii=function(){return(Pt=l.dynCall_viiiiii=l.asm.Zb).apply(null,arguments)},Rt=l.dynCall_iiiiiiii=function(){return(Rt=l.dynCall_iiiiiiii=l.asm._b).apply(null,arguments)},Mt=l.dynCall_viidii=function(){return(Mt=l.dynCall_viidii=l.asm.$b).apply(null,arguments)},Lt=l._asyncify_start_unwind=function(){return(Lt=l._asyncify_start_unwind=l.asm.ac).apply(null,arguments)},Vt=l._asyncify_stop_unwind=function(){return(Vt=l._asyncify_stop_unwind=l.asm.bc).apply(null,arguments)},cn=l._asyncify_start_rewind=function(){return(cn=l._asyncify_start_rewind=l.asm.cc).apply(null,arguments)},ln=l._asyncify_stop_rewind=function(){return(ln=l._asyncify_stop_rewind=l.asm.dc).apply(null,arguments)};function pn(r,i,t,a,n,f,v){var u=tr();try{return Nt(r,i,t,a,n,f,v)}catch(o){if(De(u),o!==o+0)throw o;ye(1,0)}}function hn(r,i){var t=tr();try{Ie(r,i)}catch(a){if(De(t),a!==a+0)throw a;ye(1,0)}}function bn(r,i,t){var a=tr();try{ot(r,i,t)}catch(n){if(De(a),n!==n+0)throw n;ye(1,0)}}function Nn(r){var i=tr();try{return Tt(r)}catch(t){if(De(i),t!==t+0)throw t;ye(1,0)}}function Tn(r){var i=tr();try{Ct(r)}catch(t){if(De(i),t!==t+0)throw t;ye(1,0)}}function Cn(r,i,t,a){var n=tr();try{Dt(r,i,t,a)}catch(f){if(De(n),f!==f+0)throw f;ye(1,0)}}function Ln(r,i){var t=tr();try{return Qr(r,i)}catch(a){if(De(t),a!==a+0)throw a;ye(1,0)}}function Di(r,i,t){var a=tr();try{return Be(r,i,t)}catch(n){if(De(a),n!==n+0)throw n;ye(1,0)}}function Oi(r,i,t,a,n){var f=tr();try{it(r,i,t,a,n)}catch(v){if(De(f),v!==v+0)throw v;ye(1,0)}}function Ni(r,i,t,a,n){var f=tr();try{return He(r,i,t,a,n)}catch(v){if(De(f),v!==v+0)throw v;ye(1,0)}}function Ti(r,i,t,a){var n=tr();try{return ar(r,i,t,a)}catch(f){if(De(n),f!==f+0)throw f;ye(1,0)}}function Ci(r,i,t,a,n,f,v){var u=tr();try{Pt(r,i,t,a,n,f,v)}catch(o){if(De(u),o!==o+0)throw o;ye(1,0)}}function Fi(r,i,t,a,n,f){var v=tr();try{Ot(r,i,t,a,n,f)}catch(u){if(De(v),u!==u+0)throw u;ye(1,0)}}function Ai(r,i,t,a,n,f){var v=tr();try{Mt(r,i,t,a,n,f)}catch(u){if(De(v),u!==u+0)throw u;ye(1,0)}}function kn(r,i,t,a,n,f,v,u,o,c){var _=tr();try{return Ft(r,i,t,a,n,f,v,u,o,c)}catch(m){if(De(_),m!==m+0)throw m;ye(1,0)}}function In(r,i,t,a,n,f){var v=tr();try{return ur(r,i,t,a,n,f)}catch(u){if(De(v),u!==u+0)throw u;ye(1,0)}}function w(r,i,t,a,n,f,v,u,o,c){var _=tr();try{At(r,i,t,a,n,f,v,u,o,c)}catch(m){if(De(_),m!==m+0)throw m;ye(1,0)}}function g(r,i,t,a,n,f,v,u){var o=tr();try{return Rt(r,i,t,a,n,f,v,u)}catch(c){if(De(o),c!==c+0)throw c;ye(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=ie,l.FS=e;var s;$e=function r(){s||d(),s||($e=r)};function d(r){if(r=r||Y,Re>0||(Wn(),Re>0))return;function i(){s||(s=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),i()},1)):i()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return d(),O}var Wc,zu,ju=Ki(()=>{"use strict";Wc=10898323,zu=__dirname+"/php_7_3.wasm"});var qu={};Wi(qu,{dependenciesTotalSize:()=>Yc,dependencyFilename:()=>Yu,init:()=>qc});function qc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(s,d)=>{throw d},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(s){return l.locateFile?l.locateFile(s,ae):ae+s}var Ye,nr,Me;function Lr(s){if(s instanceof mr)return;ce("exiting due to exception: "+s)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(s,d)=>(wr(),s=Le.normalize(s),V.readFileSync(s,d?void 0:"utf8")),Me=s=>{var d=Ye(s,!0);return d.buffer||(d=new Uint8Array(d)),d},nr=(s,d,r)=>{wr(),s=Le.normalize(s),V.readFile(s,function(i,t){i?r(i):d(t.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(s){if(!(s instanceof mr))throw s}),process.on("unhandledRejection",function(s){throw s}),te=(s,d)=>{if(_r())throw process.exitCode=s,d;Lr(d),process.exit(s)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(s,d){s||ue(d)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(s,d,r){for(var i=d+r,t=d;s[t]&&!(t>=i);)++t;if(t-d>16&&s.buffer&&at)return at.decode(s.subarray(d,t));for(var a="";d<t;){var n=s[d++];if(!(n&128)){a+=String.fromCharCode(n);continue}var f=s[d++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|f);continue}var v=s[d++]&63;if((n&240)==224?n=(n&15)<<12|f<<6|v:n=(n&7)<<18|f<<12|v<<6|s[d++]&63,n<65536)a+=String.fromCharCode(n);else{var u=n-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a}function ne(s,d){return s?We(de,s,d):""}function Xe(s,d,r,i){if(!(i>0))return 0;for(var t=r,a=r+i-1,n=0;n<s.length;++n){var f=s.charCodeAt(n);if(f>=55296&&f<=57343){var v=s.charCodeAt(++n);f=65536+((f&1023)<<10)|v&1023}if(f<=127){if(r>=a)break;d[r++]=f}else if(f<=2047){if(r+1>=a)break;d[r++]=192|f>>6,d[r++]=128|f&63}else if(f<=65535){if(r+2>=a)break;d[r++]=224|f>>12,d[r++]=128|f>>6&63,d[r++]=128|f&63}else{if(r+3>=a)break;d[r++]=240|f>>18,d[r++]=128|f>>12&63,d[r++]=128|f>>6&63,d[r++]=128|f&63}}return d[r]=0,r-t}function Ae(s,d,r){return Xe(s,de,d,r)}function Pe(s){for(var d=0,r=0;r<s.length;++r){var i=s.charCodeAt(r);i<=127?d++:i<=2047?d+=2:i>=55296&&i<=57343?(d+=4,++r):d+=3}return d}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(s){Cr=s,l.HEAP8=$=new Int8Array(s),l.HEAP16=Ee=new Int16Array(s),l.HEAP32=h=new Int32Array(s),l.HEAPU8=de=new Uint8Array(s),l.HEAPU16=st=new Uint16Array(s),l.HEAPU32=H=new Uint32Array(s),l.HEAPF32=Bn=new Float32Array(s),l.HEAPF64=ut=new Float64Array(s)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Sr(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(s){ct.unshift(s)}function Kn(s){lt.unshift(s)}function Gn(s){dt.unshift(s)}var Re=0,Ar=null,$e=null;function Qi(s){return s}function vr(s){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(s){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var d=$e;$e=null,d()}}function ue(s){l.onAbort&&l.onAbort(s),s="Aborted("+s+")",ce(s),Ce=!0,Ge=1,s+=". Build with -sASSERTIONS for more info.";var d=new WebAssembly.RuntimeError(s);throw d}var Xn="data:application/octet-stream;base64,";function vt(s){return s.startsWith(Xn)}var _e;_e=Yu,vt(_e)||(_e=cr(_e));function mt(s){try{if(s==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(s);throw"both async and sync fetching of the wasm failed"}catch(d){ue(d)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(s){if(!s.ok)throw"failed to load wasm binary file at '"+_e+"'";return s.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var s={a:ke};function d(n,f){var v=n.exports;v=X.instrumentWasmExports(v),l.asm=v,or=l.asm.Ta,ft(or.buffer),xn=l.asm.db,Kn(l.asm.Ua),Ze("wasm-instantiate")}vr("wasm-instantiate");function r(n){d(n.instance)}function i(n){return $n().then(function(f){return WebAssembly.instantiate(f,s)}).then(function(f){return f}).then(n,function(f){ce("failed to asynchronously prepare wasm: "+f),ue(f)})}function t(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(n){var f=WebAssembly.instantiateStreaming(n,s);return f.then(r,function(v){return ce("wasm streaming compile failed: "+v),ce("falling back to ArrayBuffer instantiation"),i(r)})}):i(r)}if(l.instantiateWasm)try{var a=l.instantiateWasm(s,d);return a=X.instrumentWasmExports(a),a}catch(n){return ce("Module.instantiateWasm callback failed with error: "+n),!1}return t(),{}}var P,q;function mr(s){this.name="ExitStatus",this.message="Program terminated with exit("+s+")",this.status=s}function pr(s){for(;s.length>0;)s.shift()(l)}function pt(s){if(s instanceof mr||s=="unwind")return Ge;te(1,s)}function ht(s,d){$.set(s,d)}function Jn(s,d,r,i){ue("Assertion failed: "+ne(s)+", at: "+[d?ne(d):"unknown filename",r,i?ne(i):"unknown function"])}function Qn(s,d){(function(r){De.apply(null,[s,r])})(d)}var U={isAbs:s=>s.charAt(0)==="/",splitPath:s=>{var d=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return d.exec(s).slice(1)},normalizeArray:(s,d)=>{for(var r=0,i=s.length-1;i>=0;i--){var t=s[i];t==="."?s.splice(i,1):t===".."?(s.splice(i,1),r++):r&&(s.splice(i,1),r--)}if(d)for(;r;r--)s.unshift("..");return s},normalize:s=>{var d=U.isAbs(s),r=s.substr(-1)==="/";return s=U.normalizeArray(s.split("/").filter(i=>!!i),!d).join("/"),!s&&!d&&(s="."),s&&r&&(s+="/"),(d?"/":"")+s},dirname:s=>{var d=U.splitPath(s),r=d[0],i=d[1];return!r&&!i?".":(i&&(i=i.substr(0,i.length-1)),r+i)},basename:s=>{if(s==="/")return"/";s=U.normalize(s),s=s.replace(/\/$/,"");var d=s.lastIndexOf("/");return d===-1?s:s.substr(d+1)},join:function(){var s=Array.prototype.slice.call(arguments);return U.normalize(s.join("/"))},join2:(s,d)=>U.normalize(s+"/"+d)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var s=new Uint8Array(1);return()=>(crypto.getRandomValues(s),s[0])}else if(Z)try{var d=require("crypto");return()=>d.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var s="",d=!1,r=arguments.length-1;r>=-1&&!d;r--){var i=r>=0?arguments[r]:e.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";s=i+"/"+s,d=U.isAbs(i)}return s=U.normalizeArray(s.split("/").filter(t=>!!t),!d).join("/"),(d?"/":"")+s||"."},relative:(s,d)=>{s=ge.resolve(s).substr(1),d=ge.resolve(d).substr(1);function r(u){for(var o=0;o<u.length&&u[o]==="";o++);for(var c=u.length-1;c>=0&&u[c]==="";c--);return o>c?[]:u.slice(o,c-o+1)}for(var i=r(s.split("/")),t=r(d.split("/")),a=Math.min(i.length,t.length),n=a,f=0;f<a;f++)if(i[f]!==t[f]){n=f;break}for(var v=[],f=n;f<i.length;f++)v.push("..");return v=v.concat(t.slice(n)),v.join("/")}};function Je(s,d,r){var i=r>0?r:Pe(s)+1,t=new Array(i),a=Xe(s,t,0,t.length);return d&&(t.length=a),t}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(s,d){Se.ttys[s]={input:[],output:[],ops:d},e.registerDevice(s,Se.stream_ops)},stream_ops:{open:function(s){var d=Se.ttys[s.node.rdev];if(!d)throw new e.ErrnoError(43);s.tty=d,s.seekable=!1},close:function(s){s.tty.ops.fsync(s.tty)},fsync:function(s){s.tty.ops.fsync(s.tty)},read:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.get_char)throw new e.ErrnoError(60);for(var a=0,n=0;n<i;n++){var f;try{f=s.tty.ops.get_char(s.tty)}catch{throw new e.ErrnoError(29)}if(f===void 0&&a===0)throw new e.ErrnoError(6);if(f==null)break;a++,d[r+n]=f}return a&&(s.node.timestamp=Date.now()),a},write:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var a=0;a<i;a++)s.tty.ops.put_char(s.tty,d[r+a])}catch{throw new e.ErrnoError(29)}return i&&(s.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(s){if(!s.input.length){var d=null;if(Z){var r=256,i=Buffer.alloc(r),t=0;try{t=V.readSync(process.stdin.fd,i,0,r,-1)}catch(a){if(a.toString().includes("EOF"))t=0;else throw a}t>0?d=i.slice(0,t).toString("utf-8"):d=null}else typeof window<"u"&&typeof window.prompt=="function"?(d=window.prompt("Input: "),d!==null&&(d+=`
|
|
23
23
|
`)):typeof readline=="function"&&(d=readline(),d!==null&&(d+=`
|
|
24
24
|
`));if(!d)return null;s.input=Je(d,!0)}return s.input.shift()},put_char:function(s,d){d===null||d===10?(Qe(We(s.output,0)),s.output=[]):d!=0&&s.output.push(d)},fsync:function(s){s.output&&s.output.length>0&&(Qe(We(s.output,0)),s.output=[])}},default_tty1_ops:{put_char:function(s,d){d===null||d===10?(ce(We(s.output,0)),s.output=[]):d!=0&&s.output.push(d)},fsync:function(s){s.output&&s.output.length>0&&(ce(We(s.output,0)),s.output=[])}}};function Pr(s,d){return de.fill(0,s,s+d),s}function ro(s,d){return Math.ceil(s/d)*d}function Rr(s){s=ro(s,65536);var d=gr(65536,s);return d?Pr(d,s):0}var L={ops_table:null,mount:function(s){return L.createNode(null,"/",16895,0)},createNode:function(s,d,r,i){if(e.isBlkdev(r)||e.isFIFO(r))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var t=e.createNode(s,d,r,i);return e.isDir(t.mode)?(t.node_ops=L.ops_table.dir.node,t.stream_ops=L.ops_table.dir.stream,t.contents={}):e.isFile(t.mode)?(t.node_ops=L.ops_table.file.node,t.stream_ops=L.ops_table.file.stream,t.usedBytes=0,t.contents=null):e.isLink(t.mode)?(t.node_ops=L.ops_table.link.node,t.stream_ops=L.ops_table.link.stream):e.isChrdev(t.mode)&&(t.node_ops=L.ops_table.chrdev.node,t.stream_ops=L.ops_table.chrdev.stream),t.timestamp=Date.now(),s&&(s.contents[d]=t,s.timestamp=t.timestamp),t},getFileDataAsTypedArray:function(s){return s.contents?s.contents.subarray?s.contents.subarray(0,s.usedBytes):new Uint8Array(s.contents):new Uint8Array(0)},expandFileStorage:function(s,d){var r=s.contents?s.contents.length:0;if(!(r>=d)){var i=1024*1024;d=Math.max(d,r*(r<i?2:1.125)>>>0),r!=0&&(d=Math.max(d,256));var t=s.contents;s.contents=new Uint8Array(d),s.usedBytes>0&&s.contents.set(t.subarray(0,s.usedBytes),0)}},resizeFileStorage:function(s,d){if(s.usedBytes!=d)if(d==0)s.contents=null,s.usedBytes=0;else{var r=s.contents;s.contents=new Uint8Array(d),r&&s.contents.set(r.subarray(0,Math.min(d,s.usedBytes))),s.usedBytes=d}},node_ops:{getattr:function(s){var d={};return d.dev=e.isChrdev(s.mode)?s.id:1,d.ino=s.id,d.mode=s.mode,d.nlink=1,d.uid=0,d.gid=0,d.rdev=s.rdev,e.isDir(s.mode)?d.size=4096:e.isFile(s.mode)?d.size=s.usedBytes:e.isLink(s.mode)?d.size=s.link.length:d.size=0,d.atime=new Date(s.timestamp),d.mtime=new Date(s.timestamp),d.ctime=new Date(s.timestamp),d.blksize=4096,d.blocks=Math.ceil(d.size/d.blksize),d},setattr:function(s,d){d.mode!==void 0&&(s.mode=d.mode),d.timestamp!==void 0&&(s.timestamp=d.timestamp),d.size!==void 0&&L.resizeFileStorage(s,d.size)},lookup:function(s,d){throw e.genericErrors[44]},mknod:function(s,d,r,i){return L.createNode(s,d,r,i)},rename:function(s,d,r){if(e.isDir(s.mode)){var i;try{i=e.lookupNode(d,r)}catch{}if(i)for(var t in i.contents)throw new e.ErrnoError(55)}delete s.parent.contents[s.name],s.parent.timestamp=Date.now(),s.name=r,d.contents[r]=s,d.timestamp=s.parent.timestamp,s.parent=d},unlink:function(s,d){delete s.contents[d],s.timestamp=Date.now()},rmdir:function(s,d){var r=e.lookupNode(s,d);for(var i in r.contents)throw new e.ErrnoError(55);delete s.contents[d],s.timestamp=Date.now()},readdir:function(s){var d=[".",".."];for(var r in s.contents)s.contents.hasOwnProperty(r)&&d.push(r);return d},symlink:function(s,d,r){var i=L.createNode(s,d,41471,0);return i.link=r,i},readlink:function(s){if(!e.isLink(s.mode))throw new e.ErrnoError(28);return s.link}},stream_ops:{read:function(s,d,r,i,t){var a=s.node.contents;if(t>=s.node.usedBytes)return 0;var n=Math.min(s.node.usedBytes-t,i);if(n>8&&a.subarray)d.set(a.subarray(t,t+n),r);else for(var f=0;f<n;f++)d[r+f]=a[t+f];return n},write:function(s,d,r,i,t,a){if(d.buffer===$.buffer&&(a=!1),!i)return 0;var n=s.node;if(n.timestamp=Date.now(),d.subarray&&(!n.contents||n.contents.subarray)){if(a)return n.contents=d.subarray(r,r+i),n.usedBytes=i,i;if(n.usedBytes===0&&t===0)return n.contents=d.slice(r,r+i),n.usedBytes=i,i;if(t+i<=n.usedBytes)return n.contents.set(d.subarray(r,r+i),t),i}if(L.expandFileStorage(n,t+i),n.contents.subarray&&d.subarray)n.contents.set(d.subarray(r,r+i),t);else for(var f=0;f<i;f++)n.contents[t+f]=d[r+f];return n.usedBytes=Math.max(n.usedBytes,t+i),i},llseek:function(s,d,r){var i=d;if(r===1?i+=s.position:r===2&&e.isFile(s.node.mode)&&(i+=s.node.usedBytes),i<0)throw new e.ErrnoError(28);return i},allocate:function(s,d,r){L.expandFileStorage(s.node,d+r),s.node.usedBytes=Math.max(s.node.usedBytes,d+r)},mmap:function(s,d,r,i,t){if(!e.isFile(s.node.mode))throw new e.ErrnoError(43);var a,n,f=s.node.contents;if(!(t&2)&&f.buffer===Cr)n=!1,a=f.byteOffset;else{if((r>0||r+d<f.length)&&(f.subarray?f=f.subarray(r,r+d):f=Array.prototype.slice.call(f,r,r+d)),n=!0,a=Rr(d),!a)throw new e.ErrnoError(48);$.set(f,a)}return{ptr:a,allocated:n}},msync:function(s,d,r,i,t){return L.stream_ops.write(s,d,0,i,r,!1),0}}};function to(s,d,r,i){var t=i?"":"al "+s;nr(s,a=>{Ne(a,'Loading data file "'+s+'" failed (no arrayBuffer).'),d(new Uint8Array(a)),t&&Ze(t)},a=>{if(r)r();else throw'Loading data file "'+s+'" failed.'}),t&&vr(t)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var s=process.binding("constants");s.fs&&(s=s.fs),M.flagsForNodeMap={1024:s.O_APPEND,64:s.O_CREAT,128:s.O_EXCL,256:s.O_NOCTTY,0:s.O_RDONLY,2:s.O_RDWR,4096:s.O_SYNC,512:s.O_TRUNC,1:s.O_WRONLY,131072:s.O_NOFOLLOW}},convertNodeCode:s=>{var d=s.code;return yt[d]},mount:s=>M.createNode(null,"/",M.getMode(s.opts.root),0),createNode:(s,d,r,i)=>{if(!e.isDir(r)&&!e.isFile(r)&&!e.isLink(r))throw new e.ErrnoError(28);var t=e.createNode(s,d,r);return t.node_ops=M.node_ops,t.stream_ops=M.stream_ops,t},getMode:s=>{var d;try{d=V.lstatSync(s),M.isWindows&&(d.mode=d.mode|(d.mode&292)>>2)}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}return d.mode},realPath:s=>{for(var d=[];s.parent!==s;)d.push(s.name),s=s.parent;return d.push(s.mount.opts.root),d.reverse(),U.join.apply(null,d)},flagsForNode:s=>{s&=-2097153,s&=-2049,s&=-32769,s&=-524289,s&=-65537;var d=0;for(var r in M.flagsForNodeMap)s&r&&(d|=M.flagsForNodeMap[r],s^=r);if(s)throw new e.ErrnoError(28);return d},node_ops:{getattr:s=>{var d=M.realPath(s),r;try{r=V.lstatSync(d)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}return M.isWindows&&!r.blksize&&(r.blksize=4096),M.isWindows&&!r.blocks&&(r.blocks=(r.size+r.blksize-1)/r.blksize|0),{dev:r.dev,ino:r.ino,mode:r.mode,nlink:r.nlink,uid:r.uid,gid:r.gid,rdev:r.rdev,size:r.size,atime:r.atime,mtime:r.mtime,ctime:r.ctime,blksize:r.blksize,blocks:r.blocks}},setattr:(s,d)=>{var r=M.realPath(s);try{if(d.mode!==void 0&&(V.chmodSync(r,d.mode),s.mode=d.mode),d.timestamp!==void 0){var i=new Date(d.timestamp);V.utimesSync(r,i,i)}d.size!==void 0&&V.truncateSync(r,d.size)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},lookup:(s,d)=>{var r=U.join2(M.realPath(s),d),i=M.getMode(r);return M.createNode(s,d,i)},mknod:(s,d,r,i)=>{var t=M.createNode(s,d,r,i),a=M.realPath(t);try{e.isDir(t.mode)?V.mkdirSync(a,t.mode):V.writeFileSync(a,"",{mode:t.mode})}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}return t},rename:(s,d,r)=>{var i=M.realPath(s),t=U.join2(M.realPath(d),r);try{V.renameSync(i,t)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}s.name=r},unlink:(s,d)=>{var r=U.join2(M.realPath(s),d);try{V.unlinkSync(r)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}},rmdir:(s,d)=>{var r=U.join2(M.realPath(s),d);try{V.rmdirSync(r)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}},readdir:s=>{var d=M.realPath(s);try{return V.readdirSync(d)}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}},symlink:(s,d,r)=>{var i=U.join2(M.realPath(s),d);try{V.symlinkSync(r,i)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},readlink:s=>{var d=M.realPath(s);try{return d=V.readlinkSync(d),d=Le.relative(Le.resolve(s.mount.opts.root),d),d}catch(r){throw r.code?r.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(r)):r}}},stream_ops:{open:s=>{var d=M.realPath(s.node);try{e.isFile(s.node.mode)&&(s.nfd=V.openSync(d,M.flagsForNode(s.flags)))}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}},close:s=>{try{e.isFile(s.node.mode)&&s.nfd&&V.closeSync(s.nfd)}catch(d){throw d.code?new e.ErrnoError(M.convertNodeCode(d)):d}},read:(s,d,r,i,t)=>{if(i===0)return 0;try{return V.readSync(s.nfd,Buffer.from(d.buffer),r,i,t)}catch(a){throw new e.ErrnoError(M.convertNodeCode(a))}},write:(s,d,r,i,t)=>{try{return V.writeSync(s.nfd,Buffer.from(d.buffer),r,i,t)}catch(a){throw new e.ErrnoError(M.convertNodeCode(a))}},llseek:(s,d,r)=>{var i=d;if(r===1)i+=s.position;else if(r===2&&e.isFile(s.node.mode))try{var t=V.fstatSync(s.nfd);i+=t.size}catch(a){throw new e.ErrnoError(M.convertNodeCode(a))}if(i<0)throw new e.ErrnoError(28);return i},mmap:(s,d,r,i,t)=>{if(!e.isFile(s.node.mode))throw new e.ErrnoError(43);var a=Rr(d);return M.stream_ops.read(s,$,a,d,r),{ptr:a,allocated:!0}},msync:(s,d,r,i,t)=>(M.stream_ops.write(s,d,0,i,r,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(s,d={})=>{if(s=ge.resolve(e.cwd(),s),!s)return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};if(d=Object.assign(r,d),d.recurse_count>8)throw new e.ErrnoError(32);for(var i=U.normalizeArray(s.split("/").filter(c=>!!c),!1),t=e.root,a="/",n=0;n<i.length;n++){var f=n===i.length-1;if(f&&d.parent)break;if(t=e.lookupNode(t,i[n]),a=U.join2(a,i[n]),e.isMountpoint(t)&&(!f||f&&d.follow_mount)&&(t=t.mounted.root),!f||d.follow)for(var v=0;e.isLink(t.mode);){var u=e.readlink(a);a=ge.resolve(U.dirname(a),u);var o=e.lookupPath(a,{recurse_count:d.recurse_count+1});if(t=o.node,v++>40)throw new e.ErrnoError(32)}}return{path:a,node:t}},getPath:s=>{for(var d;;){if(e.isRoot(s)){var r=s.mount.mountpoint;return d?r[r.length-1]!=="/"?r+"/"+d:r+d:r}d=d?s.name+"/"+d:s.name,s=s.parent}},hashName:(s,d)=>{for(var r=0,i=0;i<d.length;i++)r=(r<<5)-r+d.charCodeAt(i)|0;return(s+r>>>0)%e.nameTable.length},hashAddNode:s=>{var d=e.hashName(s.parent.id,s.name);s.name_next=e.nameTable[d],e.nameTable[d]=s},hashRemoveNode:s=>{var d=e.hashName(s.parent.id,s.name);if(e.nameTable[d]===s)e.nameTable[d]=s.name_next;else for(var r=e.nameTable[d];r;){if(r.name_next===s){r.name_next=s.name_next;break}r=r.name_next}},lookupNode:(s,d)=>{var r=e.mayLookup(s);if(r)throw new e.ErrnoError(r,s);for(var i=e.hashName(s.id,d),t=e.nameTable[i];t;t=t.name_next){var a=t.name;if(t.parent.id===s.id&&a===d)return t}return e.lookup(s,d)},createNode:(s,d,r,i)=>{var t=new e.FSNode(s,d,r,i);return e.hashAddNode(t),t},destroyNode:s=>{e.hashRemoveNode(s)},isRoot:s=>s===s.parent,isMountpoint:s=>!!s.mounted,isFile:s=>(s&61440)===32768,isDir:s=>(s&61440)===16384,isLink:s=>(s&61440)===40960,isChrdev:s=>(s&61440)===8192,isBlkdev:s=>(s&61440)===24576,isFIFO:s=>(s&61440)===4096,isSocket:s=>(s&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:s=>{var d=e.flagModes[s];if(typeof d>"u")throw new Error("Unknown file open mode: "+s);return d},flagsToPermissionString:s=>{var d=["r","w","rw"][s&3];return s&512&&(d+="w"),d},nodePermissions:(s,d)=>e.ignorePermissions?0:d.includes("r")&&!(s.mode&292)||d.includes("w")&&!(s.mode&146)||d.includes("x")&&!(s.mode&73)?2:0,mayLookup:s=>{var d=e.nodePermissions(s,"x");return d||(s.node_ops.lookup?0:2)},mayCreate:(s,d)=>{try{var r=e.lookupNode(s,d);return 20}catch{}return e.nodePermissions(s,"wx")},mayDelete:(s,d,r)=>{var i;try{i=e.lookupNode(s,d)}catch(a){return a.errno}var t=e.nodePermissions(s,"wx");if(t)return t;if(r){if(!e.isDir(i.mode))return 54;if(e.isRoot(i)||e.getPath(i)===e.cwd())return 10}else if(e.isDir(i.mode))return 31;return 0},mayOpen:(s,d)=>s?e.isLink(s.mode)?32:e.isDir(s.mode)&&(e.flagsToPermissionString(d)!=="r"||d&512)?31:e.nodePermissions(s,e.flagsToPermissionString(d)):44,MAX_OPEN_FDS:4096,nextfd:(s=0,d=e.MAX_OPEN_FDS)=>{for(var r=s;r<=d;r++)if(!e.streams[r])return r;throw new e.ErrnoError(33)},getStream:s=>e.streams[s],createStream:(s,d,r)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),s=Object.assign(new e.FSStream,s);var i=e.nextfd(d,r);return s.fd=i,e.streams[i]=s,s},closeStream:s=>{e.streams[s]=null},chrdev_stream_ops:{open:s=>{var d=e.getDevice(s.node.rdev);s.stream_ops=d.stream_ops,s.stream_ops.open&&s.stream_ops.open(s)},llseek:()=>{throw new e.ErrnoError(70)}},major:s=>s>>8,minor:s=>s&255,makedev:(s,d)=>s<<8|d,registerDevice:(s,d)=>{e.devices[s]={stream_ops:d}},getDevice:s=>e.devices[s],getMounts:s=>{for(var d=[],r=[s];r.length;){var i=r.pop();d.push(i),r.push.apply(r,i.mounts)}return d},syncfs:(s,d)=>{typeof s=="function"&&(d=s,s=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=e.getMounts(e.root.mount),i=0;function t(n){return e.syncFSRequests--,d(n)}function a(n){if(n)return a.errored?void 0:(a.errored=!0,t(n));++i>=r.length&&t(null)}r.forEach(n=>{if(!n.type.syncfs)return a(null);n.type.syncfs(n,s,a)})},mount:(s,d,r)=>{var i=r==="/",t=!r,a;if(i&&e.root)throw new e.ErrnoError(10);if(!i&&!t){var n=e.lookupPath(r,{follow_mount:!1});if(r=n.path,a=n.node,e.isMountpoint(a))throw new e.ErrnoError(10);if(!e.isDir(a.mode))throw new e.ErrnoError(54)}var f={type:s,opts:d,mountpoint:r,mounts:[]},v=s.mount(f);return v.mount=f,f.root=v,i?e.root=v:a&&(a.mounted=f,a.mount&&a.mount.mounts.push(f)),v},unmount:s=>{var d=e.lookupPath(s,{follow_mount:!1});if(!e.isMountpoint(d.node))throw new e.ErrnoError(28);var r=d.node,i=r.mounted,t=e.getMounts(i);Object.keys(e.nameTable).forEach(n=>{for(var f=e.nameTable[n];f;){var v=f.name_next;t.includes(f.mount)&&e.destroyNode(f),f=v}}),r.mounted=null;var a=r.mount.mounts.indexOf(i);r.mount.mounts.splice(a,1)},lookup:(s,d)=>s.node_ops.lookup(s,d),mknod:(s,d,r)=>{var i=e.lookupPath(s,{parent:!0}),t=i.node,a=U.basename(s);if(!a||a==="."||a==="..")throw new e.ErrnoError(28);var n=e.mayCreate(t,a);if(n)throw new e.ErrnoError(n);if(!t.node_ops.mknod)throw new e.ErrnoError(63);return t.node_ops.mknod(t,a,d,r)},create:(s,d)=>(d=d!==void 0?d:438,d&=4095,d|=32768,e.mknod(s,d,0)),mkdir:(s,d)=>(d=d!==void 0?d:511,d&=1023,d|=16384,e.mknod(s,d,0)),mkdirTree:(s,d)=>{for(var r=s.split("/"),i="",t=0;t<r.length;++t)if(r[t]){i+="/"+r[t];try{e.mkdir(i,d)}catch(a){if(a.errno!=20)throw a}}},mkdev:(s,d,r)=>(typeof r>"u"&&(r=d,d=438),d|=8192,e.mknod(s,d,r)),symlink:(s,d)=>{if(!ge.resolve(s))throw new e.ErrnoError(44);var r=e.lookupPath(d,{parent:!0}),i=r.node;if(!i)throw new e.ErrnoError(44);var t=U.basename(d),a=e.mayCreate(i,t);if(a)throw new e.ErrnoError(a);if(!i.node_ops.symlink)throw new e.ErrnoError(63);return i.node_ops.symlink(i,t,s)},rename:(s,d)=>{var r=U.dirname(s),i=U.dirname(d),t=U.basename(s),a=U.basename(d),n,f,v;if(n=e.lookupPath(s,{parent:!0}),f=n.node,n=e.lookupPath(d,{parent:!0}),v=n.node,!f||!v)throw new e.ErrnoError(44);if(f.mount!==v.mount)throw new e.ErrnoError(75);var u=e.lookupNode(f,t),o=ge.relative(s,i);if(o.charAt(0)!==".")throw new e.ErrnoError(28);if(o=ge.relative(d,r),o.charAt(0)!==".")throw new e.ErrnoError(55);var c;try{c=e.lookupNode(v,a)}catch{}if(u!==c){var _=e.isDir(u.mode),m=e.mayDelete(f,t,_);if(m)throw new e.ErrnoError(m);if(m=c?e.mayDelete(v,a,_):e.mayCreate(v,a),m)throw new e.ErrnoError(m);if(!f.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(u)||c&&e.isMountpoint(c))throw new e.ErrnoError(10);if(v!==f&&(m=e.nodePermissions(f,"w"),m))throw new e.ErrnoError(m);e.hashRemoveNode(u);try{f.node_ops.rename(u,v,a)}catch(p){throw p}finally{e.hashAddNode(u)}}},rmdir:s=>{var d=e.lookupPath(s,{parent:!0}),r=d.node,i=U.basename(s),t=e.lookupNode(r,i),a=e.mayDelete(r,i,!0);if(a)throw new e.ErrnoError(a);if(!r.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(t))throw new e.ErrnoError(10);r.node_ops.rmdir(r,i),e.destroyNode(t)},readdir:s=>{var d=e.lookupPath(s,{follow:!0}),r=d.node;if(!r.node_ops.readdir)throw new e.ErrnoError(54);return r.node_ops.readdir(r)},unlink:s=>{var d=e.lookupPath(s,{parent:!0}),r=d.node;if(!r)throw new e.ErrnoError(44);var i=U.basename(s),t=e.lookupNode(r,i),a=e.mayDelete(r,i,!1);if(a)throw new e.ErrnoError(a);if(!r.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(t))throw new e.ErrnoError(10);r.node_ops.unlink(r,i),e.destroyNode(t)},readlink:s=>{var d=e.lookupPath(s),r=d.node;if(!r)throw new e.ErrnoError(44);if(!r.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(r.parent),r.node_ops.readlink(r))},stat:(s,d)=>{var r=e.lookupPath(s,{follow:!d}),i=r.node;if(!i)throw new e.ErrnoError(44);if(!i.node_ops.getattr)throw new e.ErrnoError(63);return i.node_ops.getattr(i)},lstat:s=>e.stat(s,!0),chmod:(s,d,r)=>{var i;if(typeof s=="string"){var t=e.lookupPath(s,{follow:!r});i=t.node}else i=s;if(!i.node_ops.setattr)throw new e.ErrnoError(63);i.node_ops.setattr(i,{mode:d&4095|i.mode&-4096,timestamp:Date.now()})},lchmod:(s,d)=>{e.chmod(s,d,!0)},fchmod:(s,d)=>{var r=e.getStream(s);if(!r)throw new e.ErrnoError(8);e.chmod(r.node,d)},chown:(s,d,r,i)=>{var t;if(typeof s=="string"){var a=e.lookupPath(s,{follow:!i});t=a.node}else t=s;if(!t.node_ops.setattr)throw new e.ErrnoError(63);t.node_ops.setattr(t,{timestamp:Date.now()})},lchown:(s,d,r)=>{e.chown(s,d,r,!0)},fchown:(s,d,r)=>{var i=e.getStream(s);if(!i)throw new e.ErrnoError(8);e.chown(i.node,d,r)},truncate:(s,d)=>{if(d<0)throw new e.ErrnoError(28);var r;if(typeof s=="string"){var i=e.lookupPath(s,{follow:!0});r=i.node}else r=s;if(!r.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(r.mode))throw new e.ErrnoError(31);if(!e.isFile(r.mode))throw new e.ErrnoError(28);var t=e.nodePermissions(r,"w");if(t)throw new e.ErrnoError(t);r.node_ops.setattr(r,{size:d,timestamp:Date.now()})},ftruncate:(s,d)=>{var r=e.getStream(s);if(!r)throw new e.ErrnoError(8);if(!(r.flags&2097155))throw new e.ErrnoError(28);e.truncate(r.node,d)},utime:(s,d,r)=>{var i=e.lookupPath(s,{follow:!0}),t=i.node;t.node_ops.setattr(t,{timestamp:Math.max(d,r)})},open:(s,d,r)=>{if(s==="")throw new e.ErrnoError(44);d=typeof d=="string"?e.modeStringToFlags(d):d,r=typeof r>"u"?438:r,d&64?r=r&4095|32768:r=0;var i;if(typeof s=="object")i=s;else{s=U.normalize(s);try{var t=e.lookupPath(s,{follow:!(d&131072)});i=t.node}catch{}}var a=!1;if(d&64)if(i){if(d&128)throw new e.ErrnoError(20)}else i=e.mknod(s,r,0),a=!0;if(!i)throw new e.ErrnoError(44);if(e.isChrdev(i.mode)&&(d&=-513),d&65536&&!e.isDir(i.mode))throw new e.ErrnoError(54);if(!a){var n=e.mayOpen(i,d);if(n)throw new e.ErrnoError(n)}d&512&&!a&&e.truncate(i,0),d&=-131713;var f=e.createStream({node:i,path:e.getPath(i),flags:d,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return f.stream_ops.open&&f.stream_ops.open(f),l.logReadFiles&&!(d&1)&&(e.readFiles||(e.readFiles={}),s in e.readFiles||(e.readFiles[s]=1)),f},close:s=>{if(e.isClosed(s))throw new e.ErrnoError(8);s.getdents&&(s.getdents=null);try{s.stream_ops.close&&s.stream_ops.close(s)}catch(d){throw d}finally{e.closeStream(s.fd)}s.fd=null},isClosed:s=>s.fd===null,llseek:(s,d,r)=>{if(e.isClosed(s))throw new e.ErrnoError(8);if(!s.seekable||!s.stream_ops.llseek)throw new e.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new e.ErrnoError(28);return s.position=s.stream_ops.llseek(s,d,r),s.ungotten=[],s.position},read:(s,d,r,i,t)=>{if(i<0||t<0)throw new e.ErrnoError(28);if(e.isClosed(s))throw new e.ErrnoError(8);if((s.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(s.node.mode))throw new e.ErrnoError(31);if(!s.stream_ops.read)throw new e.ErrnoError(28);var a=typeof t<"u";if(!a)t=s.position;else if(!s.seekable)throw new e.ErrnoError(70);var n=s.stream_ops.read(s,d,r,i,t);return a||(s.position+=n),n},write:(s,d,r,i,t,a)=>{if(i<0||t<0)throw new e.ErrnoError(28);if(e.isClosed(s))throw new e.ErrnoError(8);if(!(s.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(s.node.mode))throw new e.ErrnoError(31);if(!s.stream_ops.write)throw new e.ErrnoError(28);s.seekable&&s.flags&1024&&e.llseek(s,0,2);var n=typeof t<"u";if(!n)t=s.position;else if(!s.seekable)throw new e.ErrnoError(70);var f=s.stream_ops.write(s,d,r,i,t,a);return n||(s.position+=f),f},allocate:(s,d,r)=>{if(e.isClosed(s))throw new e.ErrnoError(8);if(d<0||r<=0)throw new e.ErrnoError(28);if(!(s.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(s.node.mode)&&!e.isDir(s.node.mode))throw new e.ErrnoError(43);if(!s.stream_ops.allocate)throw new e.ErrnoError(138);s.stream_ops.allocate(s,d,r)},mmap:(s,d,r,i,t)=>{if(i&2&&!(t&2)&&(s.flags&2097155)!==2)throw new e.ErrnoError(2);if((s.flags&2097155)===1)throw new e.ErrnoError(2);if(!s.stream_ops.mmap)throw new e.ErrnoError(43);return s.stream_ops.mmap(s,d,r,i,t)},msync:(s,d,r,i,t)=>s.stream_ops.msync?s.stream_ops.msync(s,d,r,i,t):0,munmap:s=>0,ioctl:(s,d,r)=>{if(!s.stream_ops.ioctl)throw new e.ErrnoError(59);return s.stream_ops.ioctl(s,d,r)},readFile:(s,d={})=>{if(d.flags=d.flags||0,d.encoding=d.encoding||"binary",d.encoding!=="utf8"&&d.encoding!=="binary")throw new Error('Invalid encoding type "'+d.encoding+'"');var r,i=e.open(s,d.flags),t=e.stat(s),a=t.size,n=new Uint8Array(a);return e.read(i,n,0,a,0),d.encoding==="utf8"?r=We(n,0):d.encoding==="binary"&&(r=n),e.close(i),r},writeFile:(s,d,r={})=>{r.flags=r.flags||577;var i=e.open(s,r.flags,r.mode);if(typeof d=="string"){var t=new Uint8Array(Pe(d)+1),a=Xe(d,t,0,t.length);e.write(i,t,0,a,void 0,r.canOwn)}else if(ArrayBuffer.isView(d))e.write(i,d,0,d.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");e.close(i)},cwd:()=>e.currentPath,chdir:s=>{var d=e.lookupPath(s,{follow:!0});if(d.node===null)throw new e.ErrnoError(44);if(!e.isDir(d.node.mode))throw new e.ErrnoError(54);var r=e.nodePermissions(d.node,"x");if(r)throw new e.ErrnoError(r);e.currentPath=d.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(d,r,i,t,a)=>t}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var s=eo();e.createDevice("/dev","random",s),e.createDevice("/dev","urandom",s),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var s=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var d=e.createNode(s,"fd",16895,73);return d.node_ops={lookup:(r,i)=>{var t=+i,a=e.getStream(t);if(!a)throw new e.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>a.path}};return n.parent=n,n}},d}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var s=e.open("/dev/stdin",0),d=e.open("/dev/stdout",1),r=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(d,r){this.node=r,this.setErrno=function(i){this.errno=i},this.setErrno(d),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(s=>{e.genericErrors[s]=new e.ErrnoError(s),e.genericErrors[s].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(s,d,r)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=s||l.stdin,l.stdout=d||l.stdout,l.stderr=r||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,kr(0);for(var s=0;s<e.streams.length;s++){var d=e.streams[s];d&&e.close(d)}},getMode:(s,d)=>{var r=0;return s&&(r|=365),d&&(r|=146),r},findObject:(s,d)=>{var r=e.analyzePath(s,d);return r.exists?r.object:null},analyzePath:(s,d)=>{try{var r=e.lookupPath(s,{follow:!d});s=r.path}catch{}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=e.lookupPath(s,{parent:!0});i.parentExists=!0,i.parentPath=r.path,i.parentObject=r.node,i.name=U.basename(s),r=e.lookupPath(s,{follow:!d}),i.exists=!0,i.path=r.path,i.object=r.node,i.name=r.node.name,i.isRoot=r.path==="/"}catch(t){i.error=t.errno}return i},createPath:(s,d,r,i)=>{s=typeof s=="string"?s:e.getPath(s);for(var t=d.split("/").reverse();t.length;){var a=t.pop();if(a){var n=U.join2(s,a);try{e.mkdir(n)}catch{}s=n}}return n},createFile:(s,d,r,i,t)=>{var a=U.join2(typeof s=="string"?s:e.getPath(s),d),n=e.getMode(i,t);return e.create(a,n)},createDataFile:(s,d,r,i,t,a)=>{var n=d;s&&(s=typeof s=="string"?s:e.getPath(s),n=d?U.join2(s,d):s);var f=e.getMode(i,t),v=e.create(n,f);if(r){if(typeof r=="string"){for(var u=new Array(r.length),o=0,c=r.length;o<c;++o)u[o]=r.charCodeAt(o);r=u}e.chmod(v,f|146);var _=e.open(v,577);e.write(_,r,0,r.length,0,a),e.close(_),e.chmod(v,f)}return v},createDevice:(s,d,r,i)=>{var t=U.join2(typeof s=="string"?s:e.getPath(s),d),a=e.getMode(!!r,!!i);e.createDevice.major||(e.createDevice.major=64);var n=e.makedev(e.createDevice.major++,0);return e.registerDevice(n,{open:f=>{f.seekable=!1},close:f=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(f,v,u,o,c)=>{for(var _=0,m=0;m<o;m++){var p;try{p=r()}catch{throw new e.ErrnoError(29)}if(p===void 0&&_===0)throw new e.ErrnoError(6);if(p==null)break;_++,v[u+m]=p}return _&&(f.node.timestamp=Date.now()),_},write:(f,v,u,o,c)=>{for(var _=0;_<o;_++)try{i(v[u+_])}catch{throw new e.ErrnoError(29)}return o&&(f.node.timestamp=Date.now()),_}}),e.mkdev(t,a,n)},forceLoadFile:s=>{if(s.isDevice||s.isFolder||s.link||s.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{s.contents=Je(Ye(s.url),!0),s.usedBytes=s.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(s,d,r,i,t)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(m){if(!(m>this.length-1||m<0)){var p=m%this.chunkSize,y=m/this.chunkSize|0;return this.getter(y)[p]}},a.prototype.setDataGetter=function(m){this.getter=m},a.prototype.cacheLength=function(){var m=new XMLHttpRequest;if(m.open("HEAD",r,!1),m.send(null),!(m.status>=200&&m.status<300||m.status===304))throw new Error("Couldn't load "+r+". Status: "+m.status);var p=Number(m.getResponseHeader("Content-length")),y,E=(y=m.getResponseHeader("Accept-Ranges"))&&y==="bytes",S=(y=m.getResponseHeader("Content-Encoding"))&&y==="gzip",b=1024*1024;E||(b=p);var k=(T,C)=>{if(T>C)throw new Error("invalid range ("+T+", "+C+") or no bytes requested!");if(C>p-1)throw new Error("only "+p+" bytes available! programmer error!");var A=new XMLHttpRequest;if(A.open("GET",r,!1),p!==b&&A.setRequestHeader("Range","bytes="+T+"-"+C),A.responseType="arraybuffer",A.overrideMimeType&&A.overrideMimeType("text/plain; charset=x-user-defined"),A.send(null),!(A.status>=200&&A.status<300||A.status===304))throw new Error("Couldn't load "+r+". Status: "+A.status);return A.response!==void 0?new Uint8Array(A.response||[]):Je(A.responseText||"",!0)},D=this;D.setDataGetter(T=>{var C=T*b,A=(T+1)*b-1;if(A=Math.min(A,p-1),typeof D.chunks[T]>"u"&&(D.chunks[T]=k(C,A)),typeof D.chunks[T]>"u")throw new Error("doXHR failed!");return D.chunks[T]}),(S||!p)&&(b=p=1,p=this.getter(0).length,b=p,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=p,this._chunkSize=b,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var n=new a;Object.defineProperties(n,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var f={isDevice:!1,contents:n}}else var f={isDevice:!1,url:r};var v=e.createFile(s,d,f,i,t);f.contents?v.contents=f.contents:f.url&&(v.contents=null,v.url=f.url),Object.defineProperties(v,{usedBytes:{get:function(){return this.contents.length}}});var u={},o=Object.keys(v.stream_ops);o.forEach(_=>{var m=v.stream_ops[_];u[_]=function(){return e.forceLoadFile(v),m.apply(null,arguments)}});function c(_,m,p,y,E){var S=_.node.contents;if(E>=S.length)return 0;var b=Math.min(S.length-E,y);if(S.slice)for(var k=0;k<b;k++)m[p+k]=S[E+k];else for(var k=0;k<b;k++)m[p+k]=S.get(E+k);return b}return u.read=(_,m,p,y,E)=>(e.forceLoadFile(v),c(_,m,p,y,E)),u.mmap=(_,m,p,y,E)=>{e.forceLoadFile(v);var S=Rr(m);if(!S)throw new e.ErrnoError(48);return c(_,$,S,m,p),{ptr:S,allocated:!0}},v.stream_ops=u,v},createPreloadedFile:(s,d,r,i,t,a,n,f,v,u)=>{var o=d?ge.resolve(U.join2(s,d)):s,c="cp "+o;function _(m){function p(y){u&&u(),f||e.createDataFile(s,d,y,i,t,v),a&&a(),Ze(c)}Browser.handledByPreloadPlugin(m,o,p,()=>{n&&n(),Ze(c)})||p(m)}vr(c),typeof r=="string"?to(r,m=>_(m),n):_(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(s,d,r)=>{d=d||(()=>{}),r=r||(()=>{});var i=e.indexedDB();try{var t=i.open(e.DB_NAME(),e.DB_VERSION)}catch(a){return r(a)}t.onupgradeneeded=()=>{Qe("creating db");var a=t.result;a.createObjectStore(e.DB_STORE_NAME)},t.onsuccess=()=>{var a=t.result,n=a.transaction([e.DB_STORE_NAME],"readwrite"),f=n.objectStore(e.DB_STORE_NAME),v=0,u=0,o=s.length;function c(){u==0?d():r()}s.forEach(_=>{var m=f.put(e.analyzePath(_).object.contents,_);m.onsuccess=()=>{v++,v+u==o&&c()},m.onerror=()=>{u++,v+u==o&&c()}}),n.onerror=r},t.onerror=r},loadFilesFromDB:(s,d,r)=>{d=d||(()=>{}),r=r||(()=>{});var i=e.indexedDB();try{var t=i.open(e.DB_NAME(),e.DB_VERSION)}catch(a){return r(a)}t.onupgradeneeded=r,t.onsuccess=()=>{var a=t.result;try{var n=a.transaction([e.DB_STORE_NAME],"readonly")}catch(_){r(_);return}var f=n.objectStore(e.DB_STORE_NAME),v=0,u=0,o=s.length;function c(){u==0?d():r()}s.forEach(_=>{var m=f.get(_);m.onsuccess=()=>{e.analyzePath(_).exists&&e.unlink(_),e.createDataFile(U.dirname(_),U.basename(_),m.result,!0,!0,!0),v++,v+u==o&&c()},m.onerror=()=>{u++,v+u==o&&c()}}),n.onerror=r},t.onerror=r}},N={DEFAULT_POLLMASK:5,calculateAt:function(s,d,r){if(U.isAbs(d))return d;var i;if(s===-100)i=e.cwd();else{var t=N.getStreamFromFD(s);i=t.path}if(d.length==0){if(!r)throw new e.ErrnoError(44);return i}return U.join2(i,d)},doStat:function(s,d,r){try{var i=s(d)}catch(t){if(t&&t.node&&U.normalize(d)!==U.normalize(e.getPath(t.node)))return-54;throw t}return h[r>>2]=i.dev,h[r+8>>2]=i.ino,h[r+12>>2]=i.mode,H[r+16>>2]=i.nlink,h[r+20>>2]=i.uid,h[r+24>>2]=i.gid,h[r+28>>2]=i.rdev,q=[i.size>>>0,(P=i.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+40>>2]=q[0],h[r+44>>2]=q[1],h[r+48>>2]=4096,h[r+52>>2]=i.blocks,q=[Math.floor(i.atime.getTime()/1e3)>>>0,(P=Math.floor(i.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+56>>2]=q[0],h[r+60>>2]=q[1],H[r+64>>2]=0,q=[Math.floor(i.mtime.getTime()/1e3)>>>0,(P=Math.floor(i.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+72>>2]=q[0],h[r+76>>2]=q[1],H[r+80>>2]=0,q=[Math.floor(i.ctime.getTime()/1e3)>>>0,(P=Math.floor(i.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+88>>2]=q[0],h[r+92>>2]=q[1],H[r+96>>2]=0,q=[i.ino>>>0,(P=i.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+104>>2]=q[0],h[r+108>>2]=q[1],0},doMsync:function(s,d,r,i,t){if(!e.isFile(d.node.mode))throw new e.ErrnoError(43);if(i&2)return 0;var a=de.slice(s,s+r);e.msync(d,a,t,r,i)},varargs:void 0,get:function(){N.varargs+=4;var s=h[N.varargs-4>>2];return s},getStr:function(s){var d=ne(s);return d},getStreamFromFD:function(s){var d=e.getStream(s);if(!d)throw new e.ErrnoError(8);return d}};function no(s,d,r,i,t){try{for(var a=0,n=d?h[d>>2]:0,f=d?h[d+4>>2]:0,v=r?h[r>>2]:0,u=r?h[r+4>>2]:0,o=i?h[i>>2]:0,c=i?h[i+4>>2]:0,_=0,m=0,p=0,y=0,E=0,S=0,b=(d?h[d>>2]:0)|(r?h[r>>2]:0)|(i?h[i>>2]:0),k=(d?h[d+4>>2]:0)|(r?h[r+4>>2]:0)|(i?h[i+4>>2]:0),D=function(z,K,B,x){return z<32?K&x:B&x},T=0;T<s;T++){var C=1<<T%32;if(D(T,b,k,C)){var A=N.getStreamFromFD(T),I=N.DEFAULT_POLLMASK;A.stream_ops?.poll&&(I=A.stream_ops.poll(A)),I&1&&D(T,n,f,C)&&(T<32?_=_|C:m=m|C,a++),I&4&&D(T,v,u,C)&&(T<32?p=p|C:y=y|C,a++),I&2&&D(T,o,c,C)&&(T<32?E=E|C:S=S|C,a++)}}return d&&(h[d>>2]=_,h[d+4>>2]=m),r&&(h[r>>2]=p,h[r+4>>2]=y),i&&(h[i>>2]=E,h[i+4>>2]=S),a}catch(z){if(typeof e>"u"||!(z instanceof e.ErrnoError))throw z;return-z.errno}}var j={mount:function(s){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(d,r){return typeof r=="function"&&(this._callbacks[d]=r),this},l.websocket.emit=function(d,r){typeof this._callbacks[d]=="function"&&this._callbacks[d].call(this,r)},e.createNode(null,"/",16895,0)},createSocket:function(s,d,r){d&=-526337;var i=d==1;if(i&&r&&r!=6)throw new e.ErrnoError(66);var t={family:s,type:d,protocol:r,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},a=j.nextname(),n=e.createNode(j.root,a,49152,0);n.sock=t;var f=e.createStream({path:a,node:n,flags:2,seekable:!1,stream_ops:j.stream_ops});return t.stream=f,t},getSocket:function(s){var d=e.getStream(s);return!d||!e.isSocket(d.node.mode)?null:d.node.sock},stream_ops:{poll:function(s){var d=s.node.sock;return d.sock_ops.poll(d)},ioctl:function(s,d,r){var i=s.node.sock;return i.sock_ops.ioctl(i,d,r)},read:function(s,d,r,i,t){var a=s.node.sock,n=a.sock_ops.recvmsg(a,i);return n?(d.set(n.buffer,r),n.buffer.length):0},write:function(s,d,r,i,t){var a=s.node.sock;return a.sock_ops.sendmsg(a,d,r,i)},close:function(s){var d=s.node.sock;d.sock_ops.close(d)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(s,d,r){var i;if(typeof d=="object"&&(i=d,d=null,r=null),i)if(i._socket)d=i._socket.remoteAddress,r=i._socket.remotePort;else{var t=/ws[s]?:\/\/([^:]+):(\d+)/.exec(i.url);if(!t)throw new Error("WebSocket URL must be in the format ws(s)://address:port");d=t[1],r=parseInt(t[2],10)}else try{var a=l.websocket&&typeof l.websocket=="object",n="ws:#".replace("#","//");if(a&&(typeof l.websocket.url=="function"?n=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(n=l.websocket.url)),n==="ws://"||n==="wss://"){var f=d.split("/");n=n+f[0]+":"+r+"/"+f.slice(1).join("/")}var v="binary";a&&typeof l.websocket.subprotocol=="string"&&(v=l.websocket.subprotocol);var u=void 0;v!=="null"&&(v=v.replace(/^ +| +$/g,"").split(/ *, */),u=v),a&&l.websocket.subprotocol===null&&(v="null",u=void 0);var o;Z?o=Fn():o=WebSocket,l.websocket.decorator&&(o=l.websocket.decorator(o)),i=new o(n,u),i.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var c={addr:d,port:r,socket:i,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(s,c),j.websocket_sock_ops.handlePeerEvents(s,c),s.type===2&&typeof s.sport<"u"&&c.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(s.sport&65280)>>8,s.sport&255])),c},getPeer:function(s,d,r){return s.peers[d+":"+r]},addPeer:function(s,d){s.peers[d.addr+":"+d.port]=d},removePeer:function(s,d){delete s.peers[d.addr+":"+d.port]},handlePeerEvents:function(s,d){var r=!0,i=function(){l.websocket.emit("open",s.stream.fd);try{for(var a=d.dgram_send_queue.shift();a;)d.socket.send(a),a=d.dgram_send_queue.shift()}catch{d.socket.close()}};function t(a){if(typeof a=="string"){var n=new TextEncoder;a=n.encode(a)}else{if(Ne(a.byteLength!==void 0),a.byteLength==0)return;a=new Uint8Array(a)}var f=r;if(r=!1,f&&a.length===10&&a[0]===255&&a[1]===255&&a[2]===255&&a[3]===255&&a[4]==="p".charCodeAt(0)&&a[5]==="o".charCodeAt(0)&&a[6]==="r".charCodeAt(0)&&a[7]==="t".charCodeAt(0)){var v=a[8]<<8|a[9];j.websocket_sock_ops.removePeer(s,d),d.port=v,j.websocket_sock_ops.addPeer(s,d);return}s.recv_queue.push({addr:d.addr,port:d.port,data:a}),l.websocket.emit("message",s.stream.fd)}Z?(d.socket.on("open",i),d.socket.on("message",function(a,n){n&&t(new Uint8Array(a).buffer)}),d.socket.on("close",function(){l.websocket.emit("close",s.stream.fd)}),d.socket.on("error",function(a){s.error=14,l.websocket.emit("error",[s.stream.fd,s.error,"ECONNREFUSED: Connection refused"])})):(d.socket.onopen=i,d.socket.onclose=function(){l.websocket.emit("close",s.stream.fd)},d.socket.onmessage=function(n){t(n.data)},d.socket.onerror=function(a){s.error=14,l.websocket.emit("error",[s.stream.fd,s.error,"ECONNREFUSED: Connection refused"])})},poll:function(s){if(s.type===1&&s.server)return s.pending.length?65:0;var d=0,r=s.type===1?j.websocket_sock_ops.getPeer(s,s.daddr,s.dport):null;return(s.recv_queue.length||!r||r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(d|=65),(!r||r&&r.socket.readyState===r.socket.OPEN)&&(d|=4),(r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(d|=16),d},ioctl:function(s,d,r){switch(d){case 21531:var i=0;return s.recv_queue.length&&(i=s.recv_queue[0].data.length),h[r>>2]=i,0;default:return 28}},close:function(s){if(s.server){try{s.server.close()}catch{}s.server=null}for(var d=Object.keys(s.peers),r=0;r<d.length;r++){var i=s.peers[d[r]];try{i.socket.close()}catch{}j.websocket_sock_ops.removePeer(s,i)}return 0},bind:function(s,d,r){if(typeof s.saddr<"u"||typeof s.sport<"u")throw new e.ErrnoError(28);if(s.saddr=d,s.sport=r,s.type===2){s.server&&(s.server.close(),s.server=null);try{s.sock_ops.listen(s,0)}catch(i){if(!(i instanceof e.ErrnoError)||i.errno!==138)throw i}}},connect:function(s,d,r){if(s.server)throw new e.ErrnoError(138);if(typeof s.daddr<"u"&&typeof s.dport<"u"){var i=j.websocket_sock_ops.getPeer(s,s.daddr,s.dport);if(i)throw i.socket.readyState===i.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var t=j.websocket_sock_ops.createPeer(s,d,r);throw s.daddr=t.addr,s.dport=t.port,new e.ErrnoError(26)},listen:function(s,d){if(!Z)throw new e.ErrnoError(138);if(s.server)throw new e.ErrnoError(28);var r=Fn().Server,i=s.saddr;l.websocket.serverDecorator&&(r=l.websocket.serverDecorator(r)),s.server=new r({host:i,port:s.sport}),l.websocket.emit("listen",s.stream.fd),s.server.on("connection",function(t){if(s.type===1){var a=j.createSocket(s.family,s.type,s.protocol),n=j.websocket_sock_ops.createPeer(a,t);a.daddr=n.addr,a.dport=n.port,s.pending.push(a),l.websocket.emit("connection",a.stream.fd)}else j.websocket_sock_ops.createPeer(s,t),l.websocket.emit("connection",s.stream.fd)}),s.server.on("close",function(){l.websocket.emit("close",s.stream.fd),s.server=null}),s.server.on("error",function(t){s.error=23,l.websocket.emit("error",[s.stream.fd,s.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(s){if(!s.server||!s.pending.length)throw new e.ErrnoError(28);var d=s.pending.shift();return d.stream.flags=s.stream.flags,d},getname:function(s,d){var r,i;if(d){if(s.daddr===void 0||s.dport===void 0)throw new e.ErrnoError(53);r=s.daddr,i=s.dport}else r=s.saddr||0,i=s.sport||0;return{addr:r,port:i}},sendmsg:function(s,d,r,i,t,a){if(s.type===2){if((t===void 0||a===void 0)&&(t=s.daddr,a=s.dport),t===void 0||a===void 0)throw new e.ErrnoError(17)}else t=s.daddr,a=s.dport;var n=j.websocket_sock_ops.getPeer(s,t,a);if(s.type===1){if(!n||n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)throw new e.ErrnoError(53);if(n.socket.readyState===n.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(d)&&(r+=d.byteOffset,d=d.buffer);var f;if(f=d.slice(r,r+i),s.type===2&&(!n||n.socket.readyState!==n.socket.OPEN))return(!n||n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)&&(n=j.websocket_sock_ops.createPeer(s,t,a)),n.dgram_send_queue.push(f),i;try{return n.socket.send(f),i}catch{throw new e.ErrnoError(28)}},recvmsg:function(s,d,r){if(s.type===1&&s.server)throw new e.ErrnoError(53);var i=s.recv_queue.shift();if(!i){if(s.type===1){var t=j.websocket_sock_ops.getPeer(s,s.daddr,s.dport);if(!t)throw new e.ErrnoError(53);if(t.socket.readyState===t.socket.CLOSING||t.socket.readyState===t.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var a=i.data.byteLength||i.data.length,n=i.data.byteOffset||0,f=i.data.buffer||i.data,v=Math.min(d,a),u={buffer:new Uint8Array(f,n,v),addr:i.addr,port:i.port};if(r&2&&(v=0),s.type===1&&v<a){var o=a-v;i.data=new Uint8Array(f,n+v,o),s.recv_queue.unshift(i)}return u}}};function ve(s){var d=j.getSocket(s);if(!d)throw new e.ErrnoError(8);return d}function Kt(s){return h[sn()>>2]=s,s}function lr(s){for(var d=s.split("."),r=0;r<4;r++){var i=Number(d[r]);if(isNaN(i))return null;d[r]=i}return(d[0]|d[1]<<8|d[2]<<16|d[3]<<24)>>>0}function Q(s){return parseInt(s)}function Hr(s){var d,r,i,t,a=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,n=[];if(!a.test(s))return null;if(s==="::")return[0,0,0,0,0,0,0,0];for(s.startsWith("::")?s=s.replace("::","Z:"):s=s.replace("::",":Z:"),s.indexOf(".")>0?(s=s.replace(new RegExp("[.]","g"),":"),d=s.split(":"),d[d.length-4]=Q(d[d.length-4])+Q(d[d.length-3])*256,d[d.length-3]=Q(d[d.length-2])+Q(d[d.length-1])*256,d=d.slice(0,d.length-2)):d=s.split(":"),i=0,t=0,r=0;r<d.length;r++)if(typeof d[r]=="string")if(d[r]==="Z"){for(t=0;t<8-d.length+1;t++)n[r+t]=0;i=t-1}else n[r+i]=Zr(parseInt(d[r],16));else n[r+i]=d[r];return[n[1]<<16|n[0],n[3]<<16|n[2],n[5]<<16|n[4],n[7]<<16|n[6]]}function rr(s,d,r,i,t){switch(d){case 2:r=lr(r),Pr(s,16),t&&(h[t>>2]=16),Ee[s>>1]=d,h[s+4>>2]=r,Ee[s+2>>1]=Zr(i);break;case 10:r=Hr(r),Pr(s,28),t&&(h[t>>2]=28),h[s>>2]=d,h[s+8>>2]=r[0],h[s+12>>2]=r[1],h[s+16>>2]=r[2],h[s+20>>2]=r[3],Ee[s+2>>1]=Zr(i);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(s){var d=lr(s);if(d!==null||(d=Hr(s),d!==null))return s;var r;if(ee.address_map.addrs[s])r=ee.address_map.addrs[s];else{var i=ee.address_map.id++;Ne(i<65535,"exceeded max address mappings of 65535"),r="172.29."+(i&255)+"."+(i&65280),ee.address_map.names[r]=s,ee.address_map.addrs[s]=r}return r},lookup_addr:function(s){return ee.address_map.names[s]?ee.address_map.names[s]:null}};function oo(s,d,r,i){try{var t=ve(s),a=t.sock_ops.accept(t);if(d)var n=rr(d,a.family,ee.lookup_name(a.daddr),a.dport,r);return a.stream.fd}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Or(s){return(s&255)+"."+(s>>8&255)+"."+(s>>16&255)+"."+(s>>24&255)}function en(s){var d="",r=0,i=0,t=0,a=0,n=0,f=0,v=[s[0]&65535,s[0]>>16,s[1]&65535,s[1]>>16,s[2]&65535,s[2]>>16,s[3]&65535,s[3]>>16],u=!0,o="";for(f=0;f<5;f++)if(v[f]!==0){u=!1;break}if(u){if(o=Or(v[6]|v[7]<<16),v[5]===-1)return d="::ffff:",d+=o,d;if(v[5]===0)return d="::",o==="0.0.0.0"&&(o=""),o==="0.0.0.1"&&(o="1"),d+=o,d}for(r=0;r<8;r++)v[r]===0&&(r-t>1&&(n=0),t=r,n++),n>i&&(i=n,a=r-i+1);for(r=0;r<8;r++){if(i>1&&v[r]===0&&r>=a&&r<a+i){r===a&&(d+=":",a===0&&(d+=":"));continue}d+=Number(qt(v[r]&65535)).toString(16),d+=r<7?":":""}return d}function wt(s,d){var r=Ee[s>>1],i=qt(st[s+2>>1]),t;switch(r){case 2:if(d!==16)return{errno:28};t=h[s+4>>2],t=Or(t);break;case 10:if(d!==28)return{errno:28};t=[h[s+8>>2],h[s+12>>2],h[s+16>>2],h[s+20>>2]],t=en(t);break;default:return{errno:5}}return{family:r,addr:t,port:i}}function Mr(s,d,r){if(r&&s===0)return null;var i=wt(s,d);if(i.errno)throw new e.ErrnoError(i.errno);return i.addr=ee.lookup_addr(i.addr)||i.addr,i}function io(s,d,r){try{var i=ve(s),t=Mr(d,r);return i.sock_ops.bind(i,t.addr,t.port),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function ao(s){try{return s=N.getStr(s),e.chdir(s),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function so(s,d){try{return s=N.getStr(s),e.chmod(s,d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function uo(s,d,r){try{var i=ve(s),t=Mr(d,r);return i.sock_ops.connect(i,t.addr,t.port),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function fo(s){try{var d=N.getStreamFromFD(s);return e.createStream(d,0).fd}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function co(s,d,r){try{var i=N.getStreamFromFD(s);if(i.fd===d)return-28;var t=e.getStream(d);return t&&e.close(t),e.createStream(i,d,d+1).fd}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function lo(s,d,r,i){try{if(d=N.getStr(d),d=N.calculateAt(s,d),r&-8)return-28;var t=e.lookupPath(d,{follow:!0}),a=t.node;if(!a)return-44;var n="";return r&4&&(n+="r"),r&2&&(n+="w"),r&1&&(n+="x"),n&&e.nodePermissions(a,n)?-2:0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Xr(s,d){try{return e.fchmod(s,d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function _o(s,d,r){try{return e.fchown(s,d,r),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function vo(s,d,r,i,t){try{d=N.getStr(d);var a=t&256;return t=t&-257,d=N.calculateAt(s,d),(a?e.lchown:e.chown)(d,r,i),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function mo(s,d,r){N.varargs=r;try{var i=N.getStreamFromFD(s);switch(d){case 0:{var t=N.get();if(t<0)return-28;var a;return a=e.createStream(i,t),a.fd}case 1:case 2:return 0;case 3:return i.flags;case 4:{var t=N.get();return i.flags|=t,0}case 5:{var t=N.get(),n=0;return Ee[t+n>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function po(s,d){try{var r=N.getStreamFromFD(s);return N.doStat(e.stat,r.path,d)}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function rn(s,d){return d+2097152>>>0<4194305-!!s?(s>>>0)+d*4294967296:NaN}function ho(s,d,r){try{var i=rn(d,r);return isNaN(i)?-61:(e.ftruncate(s,i),0)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function yo(s,d){try{if(d===0)return-28;var r=e.cwd(),i=Pe(r)+1;return d<i?-68:(Ae(r,s,d),i)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function wo(s,d,r){try{var i=N.getStreamFromFD(s);i.getdents||(i.getdents=e.readdir(i.path));for(var t=280,a=0,n=e.llseek(i,0,1),f=Math.floor(n/t);f<i.getdents.length&&a+t<=r;){var v,u,o=i.getdents[f];if(o===".")v=i.node.id,u=4;else if(o===".."){var c=e.lookupPath(i.path,{parent:!0});v=c.node.id,u=4}else{var _=e.lookupNode(i.node,o);v=_.id,u=e.isChrdev(_.mode)?2:e.isDir(_.mode)?4:e.isLink(_.mode)?10:8}q=[v>>>0,(P=v,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[d+a>>2]=q[0],h[d+a+4>>2]=q[1],q=[(f+1)*t>>>0,(P=(f+1)*t,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[d+a+8>>2]=q[0],h[d+a+12>>2]=q[1],Ee[d+a+16>>1]=280,$[d+a+18>>0]=u,Ae(o,d+a+19,256),a+=t,f+=1}return e.llseek(i,f*t,0),a}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Eo(s,d,r){try{var i=ve(s);if(!i.daddr)return-53;var t=rr(d,i.family,ee.lookup_name(i.daddr),i.dport,r);return 0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function go(s,d,r){try{ce("__syscall_getsockname "+s);var i=ve(s),t=rr(d,i.family,ee.lookup_name(i.saddr||"0.0.0.0"),i.sport,r);return 0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function So(s,d,r,i,t){try{var a=ve(s);return d===1&&r===4?(h[i>>2]=a.error,h[t>>2]=4,a.error=null,0):-50}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function bo(s,d,r){N.varargs=r;try{var i=N.getStreamFromFD(s);switch(d){case 21509:case 21505:return i.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return i.tty?0:-59;case 21519:{if(!i.tty)return-59;var t=N.get();return h[t>>2]=0,0}case 21520:return i.tty?-28:-59;case 21531:{var t=N.get();return e.ioctl(i,d,t)}case 21523:return i.tty?0:-59;case 21524:return i.tty?0:-59;default:return-28}}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function ko(s,d){try{var r=ve(s);return r.sock_ops.listen(r,d),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Do(s,d){try{return s=N.getStr(s),N.doStat(e.lstat,s,d)}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function Oo(s,d,r){try{return d=N.getStr(d),d=N.calculateAt(s,d),d=U.normalize(d),d[d.length-1]==="/"&&(d=d.substr(0,d.length-1)),e.mkdir(d,r,0),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function No(s,d,r,i){try{d=N.getStr(d);var t=i&256,a=i&4096;return i=i&-4353,d=N.calculateAt(s,d,a),N.doStat(t?e.lstat:e.stat,d,r)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function To(s,d,r,i){N.varargs=i;try{d=N.getStr(d),d=N.calculateAt(s,d);var t=i?N.get():0;return e.open(d,r,t).fd}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}var se={BUCKET_BUFFER_SIZE:8192,mount:function(s){return e.createNode(null,"/",16895,0)},createPipe:function(){var s={buckets:[],refcnt:2};s.buckets.push({buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var d=se.nextname(),r=se.nextname(),i=e.createNode(se.root,d,4096,0),t=e.createNode(se.root,r,4096,0);i.pipe=s,t.pipe=s;var a=e.createStream({path:d,node:i,flags:0,seekable:!1,stream_ops:se.stream_ops});i.stream=a;var n=e.createStream({path:r,node:t,flags:1,seekable:!1,stream_ops:se.stream_ops});return t.stream=n,{readable_fd:a.fd,writable_fd:n.fd}},stream_ops:{poll:function(s){var d=s.node.pipe;if((s.flags&2097155)===1)return 260;if(d.buckets.length>0)for(var r=0;r<d.buckets.length;r++){var i=d.buckets[r];if(i.offset-i.roffset>0)return 65}return 0},ioctl:function(s,d,r){return 28},fsync:function(s){return 28},read:function(s,d,r,i,t){for(var a=s.node.pipe,n=0,f=0;f<a.buckets.length;f++){var v=a.buckets[f];n+=v.offset-v.roffset}Ne(d instanceof ArrayBuffer||ArrayBuffer.isView(d));var u=d.subarray(r,r+i);if(i<=0)return 0;if(n==0)throw new e.ErrnoError(6);for(var o=Math.min(n,i),c=o,_=0,f=0;f<a.buckets.length;f++){var m=a.buckets[f],p=m.offset-m.roffset;if(o<=p){var y=m.buffer.subarray(m.roffset,m.offset);o<p?(y=y.subarray(0,o),m.roffset+=o):_++,u.set(y);break}else{var y=m.buffer.subarray(m.roffset,m.offset);u.set(y),u=u.subarray(y.byteLength),o-=y.byteLength,_++}}return _&&_==a.buckets.length&&(_--,a.buckets[_].offset=0,a.buckets[_].roffset=0),a.buckets.splice(0,_),c},write:function(s,d,r,i,t){var a=s.node.pipe;Ne(d instanceof ArrayBuffer||ArrayBuffer.isView(d));var n=d.subarray(r,r+i),f=n.byteLength;if(f<=0)return 0;var v=null;a.buckets.length==0?(v={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0},a.buckets.push(v)):v=a.buckets[a.buckets.length-1],Ne(v.offset<=se.BUCKET_BUFFER_SIZE);var u=se.BUCKET_BUFFER_SIZE-v.offset;if(u>=f)return v.buffer.set(n,v.offset),v.offset+=f,f;u>0&&(v.buffer.set(n.subarray(0,u),v.offset),v.offset+=u,n=n.subarray(u,n.byteLength));for(var o=n.byteLength/se.BUCKET_BUFFER_SIZE|0,c=n.byteLength%se.BUCKET_BUFFER_SIZE,_=0;_<o;_++){var m={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:se.BUCKET_BUFFER_SIZE,roffset:0};a.buckets.push(m),m.buffer.set(n.subarray(0,se.BUCKET_BUFFER_SIZE)),n=n.subarray(se.BUCKET_BUFFER_SIZE,n.byteLength)}if(c>0){var m={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:n.byteLength,roffset:0};a.buckets.push(m),m.buffer.set(n)}return f},close:function(s){var d=s.node.pipe;d.refcnt--,d.refcnt===0&&(d.buckets=null)}},nextname:function(){return se.nextname.current||(se.nextname.current=0),"pipe["+se.nextname.current+++"]"}};function Co(s){try{if(s==0)throw new e.ErrnoError(21);var d=se.createPipe();return h[s>>2]=d.readable_fd,h[s+4>>2]=d.writable_fd,0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function pe(s,d,r){try{for(var i=0,t=0;t<d;t++){var a=s+8*t,n=h[a>>2],f=Ee[a+4>>1],v=32,u=e.getStream(n);u&&(v=N.DEFAULT_POLLMASK,u.stream_ops?.poll&&(v=u.stream_ops.poll(u))),v&=f|8|16,v&&i++,Ee[a+6>>1]=v}return i}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Fo(s,d,r,i){try{if(d=N.getStr(d),d=N.calculateAt(s,d),i<=0)return-28;var t=e.readlink(d),a=Math.min(i,Pe(t)),n=$[r+a];return Ae(t,r,i+1),$[r+a]=n,a}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Ao(s,d,r,i,t,a){try{var n=ve(s),f=n.sock_ops.recvmsg(n,r,typeof i<"u"?i:0);if(!f)return 0;if(t)var v=rr(t,n.family,ee.lookup_name(f.addr),f.port,a);return de.set(f.buffer,d),f.buffer.byteLength}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Po(s,d,r,i){try{return d=N.getStr(d),i=N.getStr(i),d=N.calculateAt(s,d),i=N.calculateAt(r,i),e.rename(d,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Ro(s){try{return s=N.getStr(s),e.rmdir(s),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function Mo(s,d,r,i,t,a){try{var n=ve(s),f=Mr(t,a,!0);return f?n.sock_ops.sendmsg(n,$,d,r,f.addr,f.port):e.write(n.stream,$,d,r)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Lo(s,d,r){try{var i=j.createSocket(s,d,r);return i.stream.fd}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Io(s,d){try{return s=N.getStr(s),N.doStat(e.stat,s,d)}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function Uo(s,d,r){try{return s=N.getStr(s),h[r+4>>2]=4096,h[r+40>>2]=4096,h[r+8>>2]=1e6,h[r+12>>2]=5e5,h[r+16>>2]=5e5,h[r+20>>2]=e.nextInode,h[r+24>>2]=1e6,h[r+28>>2]=42,h[r+44>>2]=2,h[r+36>>2]=255,0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Bo(s,d){try{return s=N.getStr(s),d=N.getStr(d),e.symlink(s,d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function xo(s,d,r){try{return d=N.getStr(d),d=N.calculateAt(s,d),r===0?e.unlink(d):r===512?e.rmdir(d):ue("Invalid flags passed to unlinkat"),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Br(s){return H[s>>2]+h[s+4>>2]*4294967296}function Ho(s,d,r,i){try{if(d=N.getStr(d),d=N.calculateAt(s,d,!0),r){var n=Br(r),f=h[r+8>>2];t=n*1e3+f/(1e3*1e3),r+=16,n=Br(r),f=h[r+8>>2],a=n*1e3+f/(1e3*1e3)}else var t=Date.now(),a=t;return e.utime(d,t,a),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function $r(s){}var tn="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function zo(s,d){ue(tn)}function _n(s,d){ue(tn)}var Wo=!0;function jo(){return Wo}function Yo(){throw 1/0}function qo(s,d){var r=new Date(Br(s)*1e3);h[d>>2]=r.getUTCSeconds(),h[d+4>>2]=r.getUTCMinutes(),h[d+8>>2]=r.getUTCHours(),h[d+12>>2]=r.getUTCDate(),h[d+16>>2]=r.getUTCMonth(),h[d+20>>2]=r.getUTCFullYear()-1900,h[d+24>>2]=r.getUTCDay();var i=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),t=(r.getTime()-i)/(1e3*60*60*24)|0;h[d+28>>2]=t}function Vo(s,d){var r=new Date(Br(s)*1e3);h[d>>2]=r.getSeconds(),h[d+4>>2]=r.getMinutes(),h[d+8>>2]=r.getHours(),h[d+12>>2]=r.getDate(),h[d+16>>2]=r.getMonth(),h[d+20>>2]=r.getFullYear()-1900,h[d+24>>2]=r.getDay();var i=new Date(r.getFullYear(),0,1),t=(r.getTime()-i.getTime())/(1e3*60*60*24)|0;h[d+28>>2]=t,h[d+36>>2]=-(r.getTimezoneOffset()*60);var a=new Date(r.getFullYear(),6,1).getTimezoneOffset(),n=i.getTimezoneOffset(),f=(a!=n&&r.getTimezoneOffset()==Math.min(n,a))|0;h[d+32>>2]=f}function Ko(s){var d=new Date(h[s+20>>2]+1900,h[s+16>>2],h[s+12>>2],h[s+8>>2],h[s+4>>2],h[s>>2],0),r=h[s+32>>2],i=d.getTimezoneOffset(),t=new Date(d.getFullYear(),0,1),a=new Date(d.getFullYear(),6,1).getTimezoneOffset(),n=t.getTimezoneOffset(),f=Math.min(n,a);if(r<0)h[s+32>>2]=+(a!=n&&f==i);else if(r>0!=(f==i)){var v=Math.max(n,a),u=r>0?f:v;d.setTime(d.getTime()+(u-i)*6e4)}h[s+24>>2]=d.getDay();var o=(d.getTime()-t.getTime())/(1e3*60*60*24)|0;return h[s+28>>2]=o,h[s>>2]=d.getSeconds(),h[s+4>>2]=d.getMinutes(),h[s+8>>2]=d.getHours(),h[s+12>>2]=d.getDate(),h[s+16>>2]=d.getMonth(),h[s+20>>2]=d.getYear(),d.getTime()/1e3|0}function Go(s,d,r,i,t,a){try{var n=N.getStreamFromFD(i),f=e.mmap(n,s,t,d,r),v=f.ptr;return h[a>>2]=f.allocated,v}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Xo(s,d,r,i,t,a){try{var n=N.getStreamFromFD(t);r&2&&N.doMsync(s,n,d,i,a),e.munmap(n)}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function nn(s){var d=Pe(s)+1,r=sr(d);return r&&Xe(s,$,r,d),r}function $o(s,d,r){var i=new Date().getFullYear(),t=new Date(i,0,1),a=new Date(i,6,1),n=t.getTimezoneOffset(),f=a.getTimezoneOffset(),v=Math.max(n,f);h[s>>2]=v*60,h[d>>2]=+(n!=f);function u(p){var y=p.toTimeString().match(/\(([A-Za-z ]+)\)$/);return y?y[1]:"GMT"}var o=u(t),c=u(a),_=nn(o),m=nn(c);f<n?(H[r>>2]=_,H[r+4>>2]=m):(H[r>>2]=m,H[r+4>>2]=_)}function zr(s,d,r){zr.called||(zr.called=!0,$o(s,d,r))}function Zo(){ue("")}function It(){return Date.now()}function on(){return 2147483648}function Jo(){return on()}var Wr;Z?Wr=()=>{var s=process.hrtime();return s[0]*1e3+s[1]/1e6}:Wr=()=>performance.now();function Qo(s,d,r){de.copyWithin(s,d,d+r)}function Ut(s){try{return or.grow(s-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ei(s){var d=de.length;s=s>>>0;var r=on();if(s>r)return!1;let i=(v,u)=>v+(u-v%u)%u;for(var t=1;t<=4;t*=2){var a=d*(1+.2/t);a=Math.min(a,s+100663296);var n=Math.min(r,i(Math.max(s,a),65536)),f=Ut(n);if(f)return!0}return!1}function wn(s){Ge=s,_r()||(l.onExit&&l.onExit(s),Ce=!0),te(s,new mr(s))}function ri(s,d){Ge=s,_r()||Yn(),wn(s)}var Et=ri;function ti(){if(!_r())try{Et(Ge)}catch(s){pt(s)}}function gt(s){if(!(_t||Ce))try{s(),ti()}catch(d){pt(d)}}function et(){Fr+=1}function jr(){Fr-=1}function Bt(s,d){return et(),setTimeout(function(){jr(),gt(s)},d)}function xt(s){return X.handleSleep(d=>Bt(d,s))}var rt=O.ENV||{};function ni(){return J||"./this.program"}function dr(){if(!dr.strings){var s=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",d={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:s,_:ni()};for(var r in rt)rt[r]===void 0?delete d[r]:d[r]=rt[r];var i=[];for(var r in d)i.push(r+"="+d[r]);dr.strings=i}return dr.strings}function tt(s,d,r){for(var i=0;i<s.length;++i)$[d++>>0]=s.charCodeAt(i);r||($[d>>0]=0)}function Ir(s,d){var r=0;return dr().forEach(function(i,t){var a=d+r;H[s+t*4>>2]=a,tt(i,a),r+=i.length+1}),0}function Ht(s,d){var r=dr();H[s>>2]=r.length;var i=0;return r.forEach(function(t){i+=t.length+1}),H[d>>2]=i,0}function oi(s){try{var d=N.getStreamFromFD(s);return e.close(d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return r.errno}}function ii(s,d){try{var r=N.getStreamFromFD(s),i=r.tty?2:e.isDir(r.mode)?3:e.isLink(r.mode)?7:4;return $[d>>0]=i,0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function ai(s,d,r,i){for(var t=0,a=0;a<r;a++){var n=H[d>>2],f=H[d+4>>2];d+=8;var v=e.read(s,$,n,f,i);if(v<0)return-1;if(t+=v,v<f)break}return t}function si(s,d,r,i){try{var t=N.getStreamFromFD(s),a=ai(t,d,r);return H[i>>2]=a,0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return n.errno}}function ui(s,d,r,i,t){try{var a=rn(d,r);if(isNaN(a))return 61;var n=N.getStreamFromFD(s);return e.llseek(n,a,i),q=[n.position>>>0,(P=n.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t>>2]=q[0],h[t+4>>2]=q[1],n.getdents&&a===0&&i===0&&(n.getdents=null),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return f.errno}}function fi(s){try{var d=N.getStreamFromFD(s);return X.handleSleep(function(r){var i=d.node.mount;if(!i.type.syncfs){r(0);return}i.type.syncfs(i,!1,function(t){if(t){r(function(){return 29});return}r(0)})})}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return r.errno}}function ci(s,d,r,i){for(var t=0,a=0;a<r;a++){var n=H[d>>2],f=H[d+4>>2];d+=8;var v=e.write(s,$,n,f,i);if(v<0)return-1;t+=v}return t}function li(s,d,r,i){try{var t=N.getStreamFromFD(s),a=ci(t,d,r);return H[i>>2]=a,0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return n.errno}}function vn(s){var d=sr(20),r=sr(s.length+1);Ae(s,r,s.length+1),H[d>>2]=r;var i=sr(4);H[i>>2]=0,H[d+4>>2]=i;var t=2;h[d+8>>2]=t,h[d+12>>2]=4;var a=sr(12);return H[a>>2]=a+8,H[a+4>>2]=0,h[a+8>>2]=lr(ee.lookup_name(s)),H[d+16>>2]=a,d}function An(s,d,r){if(r!==2)return Kt(5),null;s=h[s>>2];var i=Or(s),t=ee.lookup_addr(i);return t&&(i=t),vn(i)}function Dn(s){return vn(ne(s))}function di(s,d,r,i,t,a){var n=Dn(s);return Qt(d,n,20),er(n),h[a>>2]=0,H[t>>2]=d,0}function _i(s,d){for(var r=Math.min(d,3),i=8,t=0;t<r;t++)ut[s+t*i>>3]=.1;return r}function En(s,d,r,i,t,a,n){var f=wt(s,d);if(f.errno)return-6;var v=f.port,u=f.addr,o=!1;if(r&&i){var c;if(n&1||!(c=ee.lookup_addr(u))){if(n&8)return-2}else u=c;var _=Ae(u,r,i);_+1>=i&&(o=!0)}if(t&&a){v=""+v;var _=Ae(v,t,a);_+1>=a&&(o=!0)}return o?-12:0}var Jr={list:[],map:{}};function St(s){function d(a,n,f){var v=sr(a.length+1);tt(a,v);for(var u=0,o=f.length,c=sr((o+1)*4),_=0;_<o;_++,u+=4){var m=f[_],p=sr(m.length+1);tt(m,p),H[c+u>>2]=p}H[c+u>>2]=0;var y=sr(12);return H[y>>2]=v,H[y+4>>2]=c,h[y+8>>2]=n,y}var r=Jr.list,i=Jr.map;if(r.length===0){var t=d("tcp",6,["TCP"]);r.push(t),i.tcp=i[6]=t,t=d("udp",17,["UDP"]),r.push(t),i.udp=i[17]=t}St.index=0}function zt(s){s=ne(s),St(!0);var d=Jr.map[s];return d}function Wt(s){St(!0);var d=Jr.map[s];return d}function br(s){var d=Pe(s)+1,r=tr(d);return Xe(s,$,r,d),r}var je={getAllWebSockets:function(s){let d=new Set;s.server&&s.server.clients.forEach(r=>{d.add(r)});for(let r of je.getAllPeers(s))d.add(r.socket);return Array.from(d)},getAllPeers:function(s){let d=new Set;if(s.server&&s.pending.filter(r=>r.peers).forEach(r=>{for(let i of Object.values(r.peers))d.add(i)}),s.peers)for(let r of Object.values(s.peers))d.add(r);return Array.from(d)},awaitData:function(s){return je.awaitWsEvent(s,"message")},awaitConnection:function(s){return s.OPEN===s.readyState?[Promise.resolve(),je.noop]:je.awaitWsEvent(s,"open")},awaitClose:function(s){return[s.CLOSING,s.CLOSED].includes(s.readyState)?[Promise.resolve(),je.noop]:je.awaitWsEvent(s,"close")},awaitError:function(s){return[s.CLOSING,s.CLOSED].includes(s.readyState)?[Promise.resolve(),je.noop]:je.awaitWsEvent(s,"error")},awaitWsEvent:function(s,d){let r,i=()=>{r()};return[new Promise(function(n){r=n,s.once(d,i)}),()=>{s.removeListener(d,i),setTimeout(r)}]},noop:function(){},shutdownSocket:function(s,d){let r=ve(s),i=Object.values(r.peers)[0];if(!i)return-1;try{return i.socket.close(),j.websocket_sock_ops.removePeer(r,i),0}catch(t){return console.log("Socket shutdown error",t),-1}}};function Nr(s,d,r){if(!s)return 1;let i=ne(s);if(!i.length)return 0;let t=ne(d);if(!t.length)return 0;if(l.popen_to_file){let{path:a,exitCode:n}=l.popen_to_file(i,t);return de[r]=n,br(a)}if(Z){let a=require("os").tmpdir(),n="php-process-stream",f=a+"/"+n,v=require("child_process"),u;if(t==="r")u=v.spawnSync(i,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[r]=u.status,require("fs").writeFileSync(f,u.stdout,{encoding:"utf8",flag:"w+"});else return t==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+t+" (should be r or w)"),_W_EXITCODE(0,2));return br(f)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function Ue(s){return s%4===0&&(s%100!==0||s%400===0)}function ir(s,d){for(var r=0,i=0;i<=d;r+=s[i++]);return r}var qe=[31,29,31,30,31,30,31,31,30,31,30,31],Er=[31,28,31,30,31,30,31,31,30,31,30,31];function fr(s,d){for(var r=new Date(s.getTime());d>0;){var i=Ue(r.getFullYear()),t=r.getMonth(),a=(i?qe:Er)[t];if(d>a-r.getDate())d-=a-r.getDate()+1,r.setDate(1),t<11?r.setMonth(t+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+d),r}return r}function Tr(s,d,r,i){var t=h[i+40>>2],a={tm_sec:h[i>>2],tm_min:h[i+4>>2],tm_hour:h[i+8>>2],tm_mday:h[i+12>>2],tm_mon:h[i+16>>2],tm_year:h[i+20>>2],tm_wday:h[i+24>>2],tm_yday:h[i+28>>2],tm_isdst:h[i+32>>2],tm_gmtoff:h[i+36>>2],tm_zone:t?ne(t):""},n=ne(r),f={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var v in f)n=n.replace(new RegExp(v,"g"),f[v]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(b,k,D){for(var T=typeof b=="number"?b.toString():b||"";T.length<k;)T=D[0]+T;return T}function _(b,k){return c(b,k,"0")}function m(b,k){function D(C){return C<0?-1:C>0?1:0}var T;return(T=D(b.getFullYear()-k.getFullYear()))===0&&(T=D(b.getMonth()-k.getMonth()))===0&&(T=D(b.getDate()-k.getDate())),T}function p(b){switch(b.getDay()){case 0:return new Date(b.getFullYear()-1,11,29);case 1:return b;case 2:return new Date(b.getFullYear(),0,3);case 3:return new Date(b.getFullYear(),0,2);case 4:return new Date(b.getFullYear(),0,1);case 5:return new Date(b.getFullYear()-1,11,31);case 6:return new Date(b.getFullYear()-1,11,30)}}function y(b){var k=fr(new Date(b.tm_year+1900,0,1),b.tm_yday),D=new Date(k.getFullYear(),0,4),T=new Date(k.getFullYear()+1,0,4),C=p(D),A=p(T);return m(C,k)<=0?m(A,k)<=0?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var E={"%a":function(b){return u[b.tm_wday].substring(0,3)},"%A":function(b){return u[b.tm_wday]},"%b":function(b){return o[b.tm_mon].substring(0,3)},"%B":function(b){return o[b.tm_mon]},"%C":function(b){var k=b.tm_year+1900;return _(k/100|0,2)},"%d":function(b){return _(b.tm_mday,2)},"%e":function(b){return c(b.tm_mday,2," ")},"%g":function(b){return y(b).toString().substring(2)},"%G":function(b){return y(b)},"%H":function(b){return _(b.tm_hour,2)},"%I":function(b){var k=b.tm_hour;return k==0?k=12:k>12&&(k-=12),_(k,2)},"%j":function(b){return _(b.tm_mday+ir(Ue(b.tm_year+1900)?qe:Er,b.tm_mon-1),3)},"%m":function(b){return _(b.tm_mon+1,2)},"%M":function(b){return _(b.tm_min,2)},"%n":function(){return`
|
|
25
|
-
`},"%p":function(b){return b.tm_hour>=0&&b.tm_hour<12?"AM":"PM"},"%S":function(b){return _(b.tm_sec,2)},"%t":function(){return" "},"%u":function(b){return b.tm_wday||7},"%U":function(b){var k=b.tm_yday+7-b.tm_wday;return _(Math.floor(k/7),2)},"%V":function(b){var k=Math.floor((b.tm_yday+7-(b.tm_wday+6)%7)/7);if((b.tm_wday+371-b.tm_yday-2)%7<=2&&k++,k){if(k==53){var T=(b.tm_wday+371-b.tm_yday)%7;T!=4&&(T!=3||!Ue(b.tm_year))&&(k=1)}}else{k=52;var D=(b.tm_wday+7-b.tm_yday-1)%7;(D==4||D==5&&Ue(b.tm_year%400-1))&&k++}return _(k,2)},"%w":function(b){return b.tm_wday},"%W":function(b){var k=b.tm_yday+7-(b.tm_wday+6)%7;return _(Math.floor(k/7),2)},"%y":function(b){return(b.tm_year+1900).toString().substring(2)},"%Y":function(b){return b.tm_year+1900},"%z":function(b){var k=b.tm_gmtoff,D=k>=0;return k=Math.abs(k)/60,k=k/60*100+k%60,(D?"+":"-")+("0000"+k).slice(-4)},"%Z":function(b){return b.tm_zone},"%%":function(){return"%"}};n=n.replace(/%%/g,"\0\0");for(var v in E)n.includes(v)&&(n=n.replace(new RegExp(v,"g"),E[v](a)));n=n.replace(/\0\0/g,"%");var S=Je(n,!1);return S.length>d?0:(ht(S,s),S.length-1)}function Yr(s,d,r){for(var i=ne(d),t="\\!@#$^&*()+=-[]/{}|:<>?,.",a=0,n=t.length;a<n;++a)i=i.replace(new RegExp("\\"+t[a],"g"),"\\"+t[a]);var f={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var v in f)i=i.replace(v,f[v]);var u={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},o={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},c={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},_={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var m in u)i=i.replace(m,"("+m+u[m]+")");for(var p=[],a=i.indexOf("%");a>=0;a=i.indexOf("%"))p.push(i[a+1]),i=i.replace(new RegExp("\\%"+i[a+1],"g"),"");var y=new RegExp("^"+i,"i").exec(ne(s));function E(){function le(he,ze,Ve){return typeof he!="number"||isNaN(he)?ze:he>=ze?he<=Ve?he:Ve:ze}return{year:le(h[r+20>>2]+1900,1970,9999),month:le(h[r+16>>2],0,11),day:le(h[r+12>>2],1,31),hour:le(h[r+8>>2],0,23),min:le(h[r+4>>2],0,59),sec:le(h[r>>2],0,59)}}if(y){var S=E(),b,k=le=>{var he=p.indexOf(le);if(he>=0)return y[he+1]};if((b=k("S"))&&(S.sec=Q(b)),(b=k("M"))&&(S.min=Q(b)),b=k("H"))S.hour=Q(b);else if(b=k("I")){var D=Q(b);(b=k("p"))&&(D+=b.toUpperCase()[0]==="P"?12:0),S.hour=D}if(b=k("Y"))S.year=Q(b);else if(b=k("y")){var T=Q(b);(b=k("C"))?T+=Q(b)*100:T+=T<69?2e3:1900,S.year=T}if((b=k("m"))?S.month=Q(b)-1:(b=k("b"))&&(S.month=o[b.substring(0,3).toUpperCase()]||0),b=k("d"))S.day=Q(b);else if(b=k("j"))for(var C=Q(b),A=Ue(S.year),I=0;I<12;++I){var z=ir(A?qe:Er,I-1);C<=z+(A?qe:Er)[I]&&(S.day=C-z)}else if(b=k("a")){var K=b.substring(0,3).toUpperCase();if(b=k("U")){var B=c[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===0?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}else if(b=k("W")){var B=_[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===1?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+1+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}}var oe=new Date(S.year,S.month,S.day,S.hour,S.min,S.sec,0);return h[r>>2]=oe.getSeconds(),h[r+4>>2]=oe.getMinutes(),h[r+8>>2]=oe.getHours(),h[r+12>>2]=oe.getDate(),h[r+16>>2]=oe.getMonth(),h[r+20>>2]=oe.getFullYear()-1900,h[r+24>>2]=oe.getDay(),h[r+28>>2]=ir(Ue(oe.getFullYear())?qe:Er,oe.getMonth()-1)+oe.getDate()-1,h[r+32>>2]=0,s+Je(y[0]).length-1}return 0}function jt(s){return je.shutdownSocket(s,2)}function Yt(s,d,r){if(typeof X>"u")return 0;let i=1,t=2,a=4,n=8,f=16,v=32;return X.handleSleep(u=>{let o=ve(s);if(!o){u(0);return}let c=[],_=new Set;if(d&i||d&t){if(o.server){for(let b of o.pending)if((b.recv_queue||[]).length>0){u(1);return}}else if((o.recv_queue||[]).length>0){u(1);return}}let m=je.getAllWebSockets(o);if(!m.length){u(0);return}for(let b of m)(d&i||d&t)&&(c.push(je.awaitData(b)),_.add("POLLIN")),d&a&&(c.push(je.awaitConnection(b)),_.add("POLLOUT")),d&f&&(c.push(je.awaitClose(b)),_.add("POLLHUP")),(d&n||d&v)&&(c.push(je.awaitError(b)),_.add("POLLERR"));if(c.length===0){console.warn("Unsupported poll event "+d+", defaulting to setTimeout()."),setTimeout(function(){u(0)},r);return}let p=c.map(([b])=>b),y=()=>c.forEach(([,b])=>b()),E=!1;Promise.race(p).then(function(b){E||(E=!0,u(1),clearTimeout(S),y())});let S=setTimeout(function(){E||(E=!0,u(0),y())},r)})}function Gt(s,d,r,i,t){let a=de[i];if(!(d===1&&r===9||d===6&&r===1))return console.warn(`Unsupported socket option: ${d}, ${r}, ${a}`),-1;let c=je.getAllWebSockets(s)[0];return c?(c.setSocketOpt(d,r,i),0):-1}function be(s){try{return s()}catch(d){ue(d)}}var X={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(s){var d=X.callStackNameToId[s];return d===void 0&&(d=X.callStackId++,X.callStackNameToId[s]=d,X.callStackIdToName[d]=s),d},instrumentWasmImports:function(s){var d=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(i=>i.split(".")[1]);for(var r in s)(function(i){var t=s[i],a=t.sig;if(typeof t=="function")var n=d.indexOf(i)>=0||i.startsWith("__asyncjs__")})(r)},instrumentWasmExports:function(s){var d={};for(var r in s)(function(i){var t=s[i];typeof t=="function"?d[i]=function(){X.exportCallStack.push(i);try{return t.apply(null,arguments)}finally{if(!Ce){var a=X.exportCallStack.pop();Ne(a===i),X.maybeStopUnwind()}}}:d[i]=t})(r);return d},maybeStopUnwind:function(){X.currData&&X.state===X.State.Unwinding&&X.exportCallStack.length===0&&(X.state=X.State.Normal,et(),be(Mt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((s,d)=>{X.asyncPromiseHandlers={resolve:s,reject:d}})},allocateData:function(){var s=sr(12+X.StackSize);return X.setDataHeader(s,s+12,X.StackSize),X.setDataRewindFunc(s),s},setDataHeader:function(s,d,r){h[s>>2]=d,h[s+4>>2]=d+r},setDataRewindFunc:function(s){var d=X.exportCallStack[0],r=X.getCallStackId(d);h[s+8>>2]=r},getDataRewindFunc:function(s){var d=h[s+8>>2],r=X.callStackIdToName[d],i=l.asm[r];return i},doRewind:function(s){var d=X.getDataRewindFunc(s);return jr(),d()},handleSleep:function(s){if(!Ce){if(X.state===X.State.Normal){var d=!1,r=!1;s(i=>{if(!Ce&&(X.handleSleepReturnValue=i||0,d=!0,!!r)){X.state=X.State.Rewinding,be(()=>Lt(X.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var t,a=!1;try{t=X.doRewind(X.currData)}catch(v){t=v,a=!0}var n=!1;if(!X.currData){var f=X.asyncPromiseHandlers;f&&(X.asyncPromiseHandlers=null,(a?f.reject:f.resolve)(t),n=!0)}if(a&&!n)throw t}}),r=!0,d||(X.state=X.State.Unwinding,X.currData=X.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),be(()=>Rt(X.currData)))}else X.state===X.State.Rewinding?(X.state=X.State.Normal,be(Vt),er(X.currData),X.currData=null,X.sleepCallbacks.forEach(i=>gt(i))):ue("invalid state: "+X.state);return X.handleSleepReturnValue}},handleAsync:function(s){return X.handleSleep(d=>{s().then(d)})}};function Fe(s){var d=l["_"+s];return d}function Xt(s,d,r,i,t){var a={string:E=>{var S=0;if(E!=null&&E!==0){var b=(E.length<<2)+1;S=tr(b),Ae(E,S,b)}return S},array:E=>{var S=tr(E.length);return ht(E,S),S}};function n(E){return d==="string"?ne(E):d==="boolean"?!!E:E}var f=Fe(s),v=[],u=0;if(i)for(var o=0;o<i.length;o++){var c=a[r[o]];c?(u===0&&(u=Oe()),v[o]=c(i[o])):v[o]=i[o]}var _=X.currData,m=f.apply(null,v);function p(E){return jr(),u!==0&&ye(u),n(E)}et();var y=t&&t.async;return X.currData!=_?X.whenDone().then(p):(m=p(m),y?Promise.resolve(m):m)}var ie=function(s,d,r,i){s||(s=this),this.parent=s,this.mount=s.mount,this.mounted=null,this.id=e.nextInode++,this.name=d,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Gr=365,xr=146;Object.defineProperties(ie.prototype,{read:{get:function(){return(this.mode&Gr)===Gr},set:function(s){s?this.mode|=Gr:this.mode&=~Gr}},write:{get:function(){return(this.mode&xr)===xr},set:function(s){s?this.mode|=xr:this.mode&=~xr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ie,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var ke={j:Jn,Sa:Qn,Ra:no,Qa:oo,Pa:io,Oa:ao,O:so,Na:uo,Ma:fo,La:co,Ka:lo,Ja:Xr,Ia:_o,N:vo,o:mo,Ha:po,R:ho,Ga:yo,Fa:wo,Ea:Eo,Da:go,Ca:So,M:bo,Ba:ko,Aa:Do,za:Oo,ya:No,w:To,xa:Co,wa:pe,va:Fo,ua:Ao,ta:Po,L:Ro,sa:Mo,K:Lo,ra:Io,qa:Uo,pa:Bo,D:xo,oa:Ho,ja:$r,ia:zo,ha:_n,ga:jo,fa:Yo,ea:qo,da:Vo,ca:Ko,ba:Go,aa:Xo,$:zr,n:Zo,B:It,_:Jo,H:Wr,Z:Qo,Y:ei,X:xt,na:Ir,ma:Ht,p:Et,t:oi,J:ii,I:si,Q:ui,la:fi,C:li,G:An,F:di,W:_i,V:En,U:zt,T:Wt,h:hn,d:Tn,b:Cn,f:Oi,g:Di,u:Ai,s:cn,v:In,A:Fi,e:bn,a:ln,c:pn,z:Ci,l:Nn,k:Ln,m:Ti,i:Ni,y:kn,S:Nr,ka:wn,E:Tr,P:Yr,r:jt,x:Yt,q:Gt},Te=Zn(),an=l.___wasm_call_ctors=function(){return(an=l.___wasm_call_ctors=l.asm.Ua).apply(null,arguments)},On=l._wasm_popen=function(){return(On=l._wasm_popen=l.asm.Va).apply(null,arguments)},sn=l.___errno_location=function(){return(sn=l.___errno_location=l.asm.Wa).apply(null,arguments)},$t=l._wasm_pclose=function(){return($t=l._wasm_pclose=l.asm.Xa).apply(null,arguments)},gn=l._php_pollfd_for=function(){return(gn=l._php_pollfd_for=l.asm.Ya).apply(null,arguments)},Pn=l._wasm_select=function(){return(Pn=l._wasm_select=l.asm.Za).apply(null,arguments)},bt=l._wasm_add_cli_arg=function(){return(bt=l._wasm_add_cli_arg=l.asm._a).apply(null,arguments)},sr=l._malloc=function(){return(sr=l._malloc=l.asm.$a).apply(null,arguments)},qr=l._run_cli=function(){return(qr=l._run_cli=l.asm.ab).apply(null,arguments)},Qt=l._memcpy=function(){return(Qt=l._memcpy=l.asm.bb).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.cb).apply(null,arguments)},qt=l._ntohs=function(){return(qt=l._ntohs=l.asm.eb).apply(null,arguments)},Zr=l._htons=function(){return(Zr=l._htons=l.asm.fb).apply(null,arguments)},kr=l._fflush=function(){return(kr=l._fflush=l.asm.gb).apply(null,arguments)},Ur=l._wasm_set_phpini_path=function(){return(Ur=l._wasm_set_phpini_path=l.asm.hb).apply(null,arguments)},nt=l._wasm_set_phpini_entries=function(){return(nt=l._wasm_set_phpini_entries=l.asm.ib).apply(null,arguments)},Zt=l._wasm_add_SERVER_entry=function(){return(Zt=l._wasm_add_SERVER_entry=l.asm.jb).apply(null,arguments)},kt=l._wasm_add_uploaded_file=function(){return(kt=l._wasm_add_uploaded_file=l.asm.kb).apply(null,arguments)},mn=l._wasm_set_query_string=function(){return(mn=l._wasm_set_query_string=l.asm.lb).apply(null,arguments)},un=l._wasm_set_path_translated=function(){return(un=l._wasm_set_path_translated=l.asm.mb).apply(null,arguments)},fn=l._wasm_set_skip_shebang=function(){return(fn=l._wasm_set_skip_shebang=l.asm.nb).apply(null,arguments)},Sn=l._wasm_set_request_uri=function(){return(Sn=l._wasm_set_request_uri=l.asm.ob).apply(null,arguments)},vi=l._wasm_set_request_method=function(){return(vi=l._wasm_set_request_method=l.asm.pb).apply(null,arguments)},mi=l._wasm_set_request_host=function(){return(mi=l._wasm_set_request_host=l.asm.qb).apply(null,arguments)},pi=l._wasm_set_content_type=function(){return(pi=l._wasm_set_content_type=l.asm.rb).apply(null,arguments)},hi=l._wasm_set_request_body=function(){return(hi=l._wasm_set_request_body=l.asm.sb).apply(null,arguments)},yi=l._wasm_set_content_length=function(){return(yi=l._wasm_set_content_length=l.asm.tb).apply(null,arguments)},wi=l._wasm_set_cookies=function(){return(wi=l._wasm_set_cookies=l.asm.ub).apply(null,arguments)},Ei=l._wasm_set_php_code=function(){return(Ei=l._wasm_set_php_code=l.asm.vb).apply(null,arguments)},gi=l._wasm_set_request_port=function(){return(gi=l._wasm_set_request_port=l.asm.wb).apply(null,arguments)},Si=l._phpwasm_init_uploaded_files_hash=function(){return(Si=l._phpwasm_init_uploaded_files_hash=l.asm.xb).apply(null,arguments)},bi=l._phpwasm_register_uploaded_file=function(){return(bi=l._phpwasm_register_uploaded_file=l.asm.yb).apply(null,arguments)},ki=l._phpwasm_destroy_uploaded_files_hash=function(){return(ki=l._phpwasm_destroy_uploaded_files_hash=l.asm.zb).apply(null,arguments)},Rn=l._wasm_sapi_handle_request=function(){return(Rn=l._wasm_sapi_handle_request=l.asm.Ab).apply(null,arguments)},Mn=l._php_wasm_init=function(){return(Mn=l._php_wasm_init=l.asm.Bb).apply(null,arguments)},Sr=l.___funcs_on_exit=function(){return(Sr=l.___funcs_on_exit=l.asm.Cb).apply(null,arguments)},gr=l._emscripten_builtin_memalign=function(){return(gr=l._emscripten_builtin_memalign=l.asm.Db).apply(null,arguments)},we=l._setThrew=function(){return(we=l._setThrew=l.asm.Eb).apply(null,arguments)},Oe=l.stackSave=function(){return(Oe=l.stackSave=l.asm.Fb).apply(null,arguments)},ye=l.stackRestore=function(){return(ye=l.stackRestore=l.asm.Gb).apply(null,arguments)},tr=l.stackAlloc=function(){return(tr=l.stackAlloc=l.asm.Hb).apply(null,arguments)},De=l.dynCall_vi=function(){return(De=l.dynCall_vi=l.asm.Ib).apply(null,arguments)},xe=l.dynCall_iiii=function(){return(xe=l.dynCall_iiii=l.asm.Jb).apply(null,arguments)},Ie=l.dynCall_ii=function(){return(Ie=l.dynCall_ii=l.asm.Kb).apply(null,arguments)},ar=l.dynCall_vii=function(){return(ar=l.dynCall_vii=l.asm.Lb).apply(null,arguments)},Be=l.dynCall_viiiii=function(){return(Be=l.dynCall_viiiii=l.asm.Mb).apply(null,arguments)},He=l.dynCall_iii=function(){return(He=l.dynCall_iii=l.asm.Nb).apply(null,arguments)},ur=l.dynCall_iiiii=function(){return(ur=l.dynCall_iiiii=l.asm.Ob).apply(null,arguments)},Qr=l.dynCall_iiiiiii=function(){return(Qr=l.dynCall_iiiiiii=l.asm.Pb).apply(null,arguments)},ot=l.dynCall_iiiiii=function(){return(ot=l.dynCall_iiiiii=l.asm.Qb).apply(null,arguments)},it=l.dynCall_i=function(){return(it=l.dynCall_i=l.asm.Rb).apply(null,arguments)},Dt=l.dynCall_viii=function(){return(Dt=l.dynCall_viii=l.asm.Sb).apply(null,arguments)},Ot=l.dynCall_viiii=function(){return(Ot=l.dynCall_viiii=l.asm.Tb).apply(null,arguments)},Nt=l.dynCall_v=function(){return(Nt=l.dynCall_v=l.asm.Ub).apply(null,arguments)},Tt=l.dynCall_iiiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiiii=l.asm.Vb).apply(null,arguments)},Ct=l.dynCall_viiiiiiiii=function(){return(Ct=l.dynCall_viiiiiiiii=l.asm.Wb).apply(null,arguments)},Ft=l.dynCall_viiiiii=function(){return(Ft=l.dynCall_viiiiii=l.asm.Xb).apply(null,arguments)},At=l.dynCall_iiiiiiii=function(){return(At=l.dynCall_iiiiiiii=l.asm.Yb).apply(null,arguments)},Pt=l.dynCall_viidii=function(){return(Pt=l.dynCall_viidii=l.asm.Zb).apply(null,arguments)},Rt=l._asyncify_start_unwind=function(){return(Rt=l._asyncify_start_unwind=l.asm._b).apply(null,arguments)},Mt=l._asyncify_stop_unwind=function(){return(Mt=l._asyncify_stop_unwind=l.asm.$b).apply(null,arguments)},Lt=l._asyncify_start_rewind=function(){return(Lt=l._asyncify_start_rewind=l.asm.ac).apply(null,arguments)},Vt=l._asyncify_stop_rewind=function(){return(Vt=l._asyncify_stop_rewind=l.asm.bc).apply(null,arguments)};function cn(s,d,r,i,t,a,n){var f=Oe();try{return Qr(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function ln(s,d){var r=Oe();try{De(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function pn(s,d,r){var i=Oe();try{ar(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function hn(s){var d=Oe();try{return it(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function bn(s){var d=Oe();try{Nt(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Nn(s,d,r,i){var t=Oe();try{Dt(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Tn(s,d){var r=Oe();try{return Ie(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function Cn(s,d,r){var i=Oe();try{return He(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Ln(s,d,r,i,t){var a=Oe();try{Ot(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Di(s,d,r,i,t){var a=Oe();try{return ur(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Oi(s,d,r,i){var t=Oe();try{return xe(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Ni(s,d,r,i,t,a,n){var f=Oe();try{Ft(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function Ti(s,d,r,i,t,a){var n=Oe();try{Be(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function Ci(s,d,r,i,t,a){var n=Oe();try{Pt(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function Fi(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{return Tt(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function Ai(s,d,r,i,t,a){var n=Oe();try{return ot(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function kn(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{Ct(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function In(s,d,r,i,t,a,n,f){var v=Oe();try{return At(s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Xt,l.FS=e;var w;$e=function s(){w||g(),w||($e=s)};function g(s){if(s=s||Y,Re>0||(Wn(),Re>0))return;function d(){w||(w=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),d()},1)):d()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return g(),O}var Yc,Yu,Vu=Ki(()=>{"use strict";Yc=10969654,Yu=__dirname+"/php_7_2.wasm"});var Gu={};Hi(Gu,{dependenciesTotalSize:()=>Vc,dependencyFilename:()=>Ku,init:()=>Kc});function Kc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(w,g)=>{throw g},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(w){return l.locateFile?l.locateFile(w,ae):ae+w}var Ye,nr,Me;function Lr(w){if(w instanceof mr)return;ce("exiting due to exception: "+w)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(w,g)=>(wr(),w=Le.normalize(w),V.readFileSync(w,g?void 0:"utf8")),Me=w=>{var g=Ye(w,!0);return g.buffer||(g=new Uint8Array(g)),g},nr=(w,g,s)=>{wr(),w=Le.normalize(w),V.readFile(w,function(d,r){d?s(d):g(r.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(w){if(!(w instanceof mr))throw w}),process.on("unhandledRejection",function(w){throw w}),te=(w,g)=>{if(_r())throw process.exitCode=w,g;Lr(g),process.exit(w)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(w,g){w||ue(g)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(w,g,s){for(var d=g+s,r=g;w[r]&&!(r>=d);)++r;if(r-g>16&&w.buffer&&at)return at.decode(w.subarray(g,r));for(var i="";g<r;){var t=w[g++];if(!(t&128)){i+=String.fromCharCode(t);continue}var a=w[g++]&63;if((t&224)==192){i+=String.fromCharCode((t&31)<<6|a);continue}var n=w[g++]&63;if((t&240)==224?t=(t&15)<<12|a<<6|n:t=(t&7)<<18|a<<12|n<<6|w[g++]&63,t<65536)i+=String.fromCharCode(t);else{var f=t-65536;i+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return i}function ne(w,g){return w?We(de,w,g):""}function Xe(w,g,s,d){if(!(d>0))return 0;for(var r=s,i=s+d-1,t=0;t<w.length;++t){var a=w.charCodeAt(t);if(a>=55296&&a<=57343){var n=w.charCodeAt(++t);a=65536+((a&1023)<<10)|n&1023}if(a<=127){if(s>=i)break;g[s++]=a}else if(a<=2047){if(s+1>=i)break;g[s++]=192|a>>6,g[s++]=128|a&63}else if(a<=65535){if(s+2>=i)break;g[s++]=224|a>>12,g[s++]=128|a>>6&63,g[s++]=128|a&63}else{if(s+3>=i)break;g[s++]=240|a>>18,g[s++]=128|a>>12&63,g[s++]=128|a>>6&63,g[s++]=128|a&63}}return g[s]=0,s-r}function Ae(w,g,s){return Xe(w,de,g,s)}function Pe(w){for(var g=0,s=0;s<w.length;++s){var d=w.charCodeAt(s);d<=127?g++:d<=2047?g+=2:d>=55296&&d<=57343?(g+=4,++s):g+=3}return g}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(w){Cr=w,l.HEAP8=$=new Int8Array(w),l.HEAP16=Ee=new Int16Array(w),l.HEAP32=h=new Int32Array(w),l.HEAPU8=de=new Uint8Array(w),l.HEAPU16=st=new Uint16Array(w),l.HEAPU32=H=new Uint32Array(w),l.HEAPF32=Bn=new Float32Array(w),l.HEAPF64=ut=new Float64Array(w)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Sr(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(w){ct.unshift(w)}function Kn(w){lt.unshift(w)}function Gn(w){dt.unshift(w)}var Re=0,Ar=null,$e=null;function Qi(w){return w}function vr(w){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(w){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var g=$e;$e=null,g()}}function ue(w){l.onAbort&&l.onAbort(w),w="Aborted("+w+")",ce(w),Ce=!0,Ge=1,w+=". Build with -sASSERTIONS for more info.";var g=new WebAssembly.RuntimeError(w);throw g}var Xn="data:application/octet-stream;base64,";function vt(w){return w.startsWith(Xn)}var _e;_e=Ku,vt(_e)||(_e=cr(_e));function mt(w){try{if(w==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(w);throw"both async and sync fetching of the wasm failed"}catch(g){ue(g)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(w){if(!w.ok)throw"failed to load wasm binary file at '"+_e+"'";return w.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var w={a:ke};function g(t,a){var n=t.exports;n=X.instrumentWasmExports(n),l.asm=n,or=l.asm.Sa,ft(or.buffer),xn=l.asm.cb,Kn(l.asm.Ta),Ze("wasm-instantiate")}vr("wasm-instantiate");function s(t){g(t.instance)}function d(t){return $n().then(function(a){return WebAssembly.instantiate(a,w)}).then(function(a){return a}).then(t,function(a){ce("failed to asynchronously prepare wasm: "+a),ue(a)})}function r(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(t){var a=WebAssembly.instantiateStreaming(t,w);return a.then(s,function(n){return ce("wasm streaming compile failed: "+n),ce("falling back to ArrayBuffer instantiation"),d(s)})}):d(s)}if(l.instantiateWasm)try{var i=l.instantiateWasm(w,g);return i=X.instrumentWasmExports(i),i}catch(t){return ce("Module.instantiateWasm callback failed with error: "+t),!1}return r(),{}}var P,q;function mr(w){this.name="ExitStatus",this.message="Program terminated with exit("+w+")",this.status=w}function pr(w){for(;w.length>0;)w.shift()(l)}function pt(w){if(w instanceof mr||w=="unwind")return Ge;te(1,w)}function ht(w,g){$.set(w,g)}function Jn(w,g,s,d){ue("Assertion failed: "+ne(w)+", at: "+[g?ne(g):"unknown filename",s,d?ne(d):"unknown function"])}function Qn(w,g){(function(s){Ie.apply(null,[w,s])})(g)}var U={isAbs:w=>w.charAt(0)==="/",splitPath:w=>{var g=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return g.exec(w).slice(1)},normalizeArray:(w,g)=>{for(var s=0,d=w.length-1;d>=0;d--){var r=w[d];r==="."?w.splice(d,1):r===".."?(w.splice(d,1),s++):s&&(w.splice(d,1),s--)}if(g)for(;s;s--)w.unshift("..");return w},normalize:w=>{var g=U.isAbs(w),s=w.substr(-1)==="/";return w=U.normalizeArray(w.split("/").filter(d=>!!d),!g).join("/"),!w&&!g&&(w="."),w&&s&&(w+="/"),(g?"/":"")+w},dirname:w=>{var g=U.splitPath(w),s=g[0],d=g[1];return!s&&!d?".":(d&&(d=d.substr(0,d.length-1)),s+d)},basename:w=>{if(w==="/")return"/";w=U.normalize(w),w=w.replace(/\/$/,"");var g=w.lastIndexOf("/");return g===-1?w:w.substr(g+1)},join:function(){var w=Array.prototype.slice.call(arguments);return U.normalize(w.join("/"))},join2:(w,g)=>U.normalize(w+"/"+g)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var w=new Uint8Array(1);return()=>(crypto.getRandomValues(w),w[0])}else if(Z)try{var g=require("crypto");return()=>g.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var w="",g=!1,s=arguments.length-1;s>=-1&&!g;s--){var d=s>=0?arguments[s]:e.cwd();if(typeof d!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!d)return"";w=d+"/"+w,g=U.isAbs(d)}return w=U.normalizeArray(w.split("/").filter(r=>!!r),!g).join("/"),(g?"/":"")+w||"."},relative:(w,g)=>{w=ge.resolve(w).substr(1),g=ge.resolve(g).substr(1);function s(f){for(var v=0;v<f.length&&f[v]==="";v++);for(var u=f.length-1;u>=0&&f[u]==="";u--);return v>u?[]:f.slice(v,u-v+1)}for(var d=s(w.split("/")),r=s(g.split("/")),i=Math.min(d.length,r.length),t=i,a=0;a<i;a++)if(d[a]!==r[a]){t=a;break}for(var n=[],a=t;a<d.length;a++)n.push("..");return n=n.concat(r.slice(t)),n.join("/")}};function Je(w,g,s){var d=s>0?s:Pe(w)+1,r=new Array(d),i=Xe(w,r,0,r.length);return g&&(r.length=i),r}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(w,g){Se.ttys[w]={input:[],output:[],ops:g},e.registerDevice(w,Se.stream_ops)},stream_ops:{open:function(w){var g=Se.ttys[w.node.rdev];if(!g)throw new e.ErrnoError(43);w.tty=g,w.seekable=!1},close:function(w){w.tty.ops.fsync(w.tty)},fsync:function(w){w.tty.ops.fsync(w.tty)},read:function(w,g,s,d,r){if(!w.tty||!w.tty.ops.get_char)throw new e.ErrnoError(60);for(var i=0,t=0;t<d;t++){var a;try{a=w.tty.ops.get_char(w.tty)}catch{throw new e.ErrnoError(29)}if(a===void 0&&i===0)throw new e.ErrnoError(6);if(a==null)break;i++,g[s+t]=a}return i&&(w.node.timestamp=Date.now()),i},write:function(w,g,s,d,r){if(!w.tty||!w.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var i=0;i<d;i++)w.tty.ops.put_char(w.tty,g[s+i])}catch{throw new e.ErrnoError(29)}return d&&(w.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(w){if(!w.input.length){var g=null;if(Z){var s=256,d=Buffer.alloc(s),r=0;try{r=V.readSync(process.stdin.fd,d,0,s,-1)}catch(i){if(i.toString().includes("EOF"))r=0;else throw i}r>0?g=d.slice(0,r).toString("utf-8"):g=null}else typeof window<"u"&&typeof window.prompt=="function"?(g=window.prompt("Input: "),g!==null&&(g+=`
|
|
25
|
+
`},"%p":function(b){return b.tm_hour>=0&&b.tm_hour<12?"AM":"PM"},"%S":function(b){return _(b.tm_sec,2)},"%t":function(){return" "},"%u":function(b){return b.tm_wday||7},"%U":function(b){var k=b.tm_yday+7-b.tm_wday;return _(Math.floor(k/7),2)},"%V":function(b){var k=Math.floor((b.tm_yday+7-(b.tm_wday+6)%7)/7);if((b.tm_wday+371-b.tm_yday-2)%7<=2&&k++,k){if(k==53){var T=(b.tm_wday+371-b.tm_yday)%7;T!=4&&(T!=3||!Ue(b.tm_year))&&(k=1)}}else{k=52;var D=(b.tm_wday+7-b.tm_yday-1)%7;(D==4||D==5&&Ue(b.tm_year%400-1))&&k++}return _(k,2)},"%w":function(b){return b.tm_wday},"%W":function(b){var k=b.tm_yday+7-(b.tm_wday+6)%7;return _(Math.floor(k/7),2)},"%y":function(b){return(b.tm_year+1900).toString().substring(2)},"%Y":function(b){return b.tm_year+1900},"%z":function(b){var k=b.tm_gmtoff,D=k>=0;return k=Math.abs(k)/60,k=k/60*100+k%60,(D?"+":"-")+("0000"+k).slice(-4)},"%Z":function(b){return b.tm_zone},"%%":function(){return"%"}};n=n.replace(/%%/g,"\0\0");for(var v in E)n.includes(v)&&(n=n.replace(new RegExp(v,"g"),E[v](a)));n=n.replace(/\0\0/g,"%");var S=Je(n,!1);return S.length>d?0:(ht(S,s),S.length-1)}function Yr(s,d,r){for(var i=ne(d),t="\\!@#$^&*()+=-[]/{}|:<>?,.",a=0,n=t.length;a<n;++a)i=i.replace(new RegExp("\\"+t[a],"g"),"\\"+t[a]);var f={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var v in f)i=i.replace(v,f[v]);var u={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},o={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},c={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},_={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var m in u)i=i.replace(m,"("+m+u[m]+")");for(var p=[],a=i.indexOf("%");a>=0;a=i.indexOf("%"))p.push(i[a+1]),i=i.replace(new RegExp("\\%"+i[a+1],"g"),"");var y=new RegExp("^"+i,"i").exec(ne(s));function E(){function le(he,ze,Ve){return typeof he!="number"||isNaN(he)?ze:he>=ze?he<=Ve?he:Ve:ze}return{year:le(h[r+20>>2]+1900,1970,9999),month:le(h[r+16>>2],0,11),day:le(h[r+12>>2],1,31),hour:le(h[r+8>>2],0,23),min:le(h[r+4>>2],0,59),sec:le(h[r>>2],0,59)}}if(y){var S=E(),b,k=le=>{var he=p.indexOf(le);if(he>=0)return y[he+1]};if((b=k("S"))&&(S.sec=Q(b)),(b=k("M"))&&(S.min=Q(b)),b=k("H"))S.hour=Q(b);else if(b=k("I")){var D=Q(b);(b=k("p"))&&(D+=b.toUpperCase()[0]==="P"?12:0),S.hour=D}if(b=k("Y"))S.year=Q(b);else if(b=k("y")){var T=Q(b);(b=k("C"))?T+=Q(b)*100:T+=T<69?2e3:1900,S.year=T}if((b=k("m"))?S.month=Q(b)-1:(b=k("b"))&&(S.month=o[b.substring(0,3).toUpperCase()]||0),b=k("d"))S.day=Q(b);else if(b=k("j"))for(var C=Q(b),A=Ue(S.year),I=0;I<12;++I){var z=ir(A?qe:Er,I-1);C<=z+(A?qe:Er)[I]&&(S.day=C-z)}else if(b=k("a")){var K=b.substring(0,3).toUpperCase();if(b=k("U")){var B=c[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===0?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}else if(b=k("W")){var B=_[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===1?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+1+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}}var oe=new Date(S.year,S.month,S.day,S.hour,S.min,S.sec,0);return h[r>>2]=oe.getSeconds(),h[r+4>>2]=oe.getMinutes(),h[r+8>>2]=oe.getHours(),h[r+12>>2]=oe.getDate(),h[r+16>>2]=oe.getMonth(),h[r+20>>2]=oe.getFullYear()-1900,h[r+24>>2]=oe.getDay(),h[r+28>>2]=ir(Ue(oe.getFullYear())?qe:Er,oe.getMonth()-1)+oe.getDate()-1,h[r+32>>2]=0,s+Je(y[0]).length-1}return 0}function jt(s){return je.shutdownSocket(s,2)}function Yt(s,d,r){if(typeof X>"u")return 0;let i=1,t=2,a=4,n=8,f=16,v=32;return X.handleSleep(u=>{let o=ve(s);if(!o){u(0);return}let c=[],_=new Set;if(d&i||d&t){if(o.server){for(let b of o.pending)if((b.recv_queue||[]).length>0){u(1);return}}else if((o.recv_queue||[]).length>0){u(1);return}}let m=je.getAllWebSockets(o);if(!m.length){u(0);return}for(let b of m)(d&i||d&t)&&(c.push(je.awaitData(b)),_.add("POLLIN")),d&a&&(c.push(je.awaitConnection(b)),_.add("POLLOUT")),d&f&&(c.push(je.awaitClose(b)),_.add("POLLHUP")),(d&n||d&v)&&(c.push(je.awaitError(b)),_.add("POLLERR"));if(c.length===0){console.warn("Unsupported poll event "+d+", defaulting to setTimeout()."),setTimeout(function(){u(0)},r);return}let p=c.map(([b])=>b),y=()=>c.forEach(([,b])=>b()),E=!1;Promise.race(p).then(function(b){E||(E=!0,u(1),clearTimeout(S),y())});let S=setTimeout(function(){E||(E=!0,u(0),y())},r)})}function Gt(s,d,r,i,t){let a=de[i];if(!(d===1&&r===9||d===6&&r===1))return console.warn(`Unsupported socket option: ${d}, ${r}, ${a}`),-1;let c=je.getAllWebSockets(s)[0];return c?(c.setSocketOpt(d,r,i),0):-1}function be(s){try{return s()}catch(d){ue(d)}}var X={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(s){var d=X.callStackNameToId[s];return d===void 0&&(d=X.callStackId++,X.callStackNameToId[s]=d,X.callStackIdToName[d]=s),d},instrumentWasmImports:function(s){var d=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(i=>i.split(".")[1]);for(var r in s)(function(i){var t=s[i],a=t.sig;if(typeof t=="function")var n=d.indexOf(i)>=0||i.startsWith("__asyncjs__")})(r)},instrumentWasmExports:function(s){var d={};for(var r in s)(function(i){var t=s[i];typeof t=="function"?d[i]=function(){X.exportCallStack.push(i);try{return t.apply(null,arguments)}finally{if(!Ce){var a=X.exportCallStack.pop();Ne(a===i),X.maybeStopUnwind()}}}:d[i]=t})(r);return d},maybeStopUnwind:function(){X.currData&&X.state===X.State.Unwinding&&X.exportCallStack.length===0&&(X.state=X.State.Normal,et(),be(Mt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((s,d)=>{X.asyncPromiseHandlers={resolve:s,reject:d}})},allocateData:function(){var s=sr(12+X.StackSize);return X.setDataHeader(s,s+12,X.StackSize),X.setDataRewindFunc(s),s},setDataHeader:function(s,d,r){h[s>>2]=d,h[s+4>>2]=d+r},setDataRewindFunc:function(s){var d=X.exportCallStack[0],r=X.getCallStackId(d);h[s+8>>2]=r},getDataRewindFunc:function(s){var d=h[s+8>>2],r=X.callStackIdToName[d],i=l.asm[r];return i},doRewind:function(s){var d=X.getDataRewindFunc(s);return jr(),d()},handleSleep:function(s){if(!Ce){if(X.state===X.State.Normal){var d=!1,r=!1;s(i=>{if(!Ce&&(X.handleSleepReturnValue=i||0,d=!0,!!r)){X.state=X.State.Rewinding,be(()=>Lt(X.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var t,a=!1;try{t=X.doRewind(X.currData)}catch(v){t=v,a=!0}var n=!1;if(!X.currData){var f=X.asyncPromiseHandlers;f&&(X.asyncPromiseHandlers=null,(a?f.reject:f.resolve)(t),n=!0)}if(a&&!n)throw t}}),r=!0,d||(X.state=X.State.Unwinding,X.currData=X.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),be(()=>Rt(X.currData)))}else X.state===X.State.Rewinding?(X.state=X.State.Normal,be(Vt),er(X.currData),X.currData=null,X.sleepCallbacks.forEach(i=>gt(i))):ue("invalid state: "+X.state);return X.handleSleepReturnValue}},handleAsync:function(s){return X.handleSleep(d=>{s().then(d)})}};function Fe(s){var d=l["_"+s];return d}function Xt(s,d,r,i,t){var a={string:E=>{var S=0;if(E!=null&&E!==0){var b=(E.length<<2)+1;S=tr(b),Ae(E,S,b)}return S},array:E=>{var S=tr(E.length);return ht(E,S),S}};function n(E){return d==="string"?ne(E):d==="boolean"?!!E:E}var f=Fe(s),v=[],u=0;if(i)for(var o=0;o<i.length;o++){var c=a[r[o]];c?(u===0&&(u=Oe()),v[o]=c(i[o])):v[o]=i[o]}var _=X.currData,m=f.apply(null,v);function p(E){return jr(),u!==0&&ye(u),n(E)}et();var y=t&&t.async;return X.currData!=_?X.whenDone().then(p):(m=p(m),y?Promise.resolve(m):m)}var ie=function(s,d,r,i){s||(s=this),this.parent=s,this.mount=s.mount,this.mounted=null,this.id=e.nextInode++,this.name=d,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Gr=365,xr=146;Object.defineProperties(ie.prototype,{read:{get:function(){return(this.mode&Gr)===Gr},set:function(s){s?this.mode|=Gr:this.mode&=~Gr}},write:{get:function(){return(this.mode&xr)===xr},set:function(s){s?this.mode|=xr:this.mode&=~xr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ie,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var ke={j:Jn,Sa:Qn,Ra:no,Qa:oo,Pa:io,Oa:ao,O:so,Na:uo,Ma:fo,La:co,Ka:lo,Ja:Xr,Ia:_o,N:vo,o:mo,Ha:po,R:ho,Ga:yo,Fa:wo,Ea:Eo,Da:go,Ca:So,M:bo,Ba:ko,Aa:Do,za:Oo,ya:No,w:To,xa:Co,wa:pe,va:Fo,ua:Ao,ta:Po,L:Ro,sa:Mo,K:Lo,ra:Io,qa:Uo,pa:Bo,D:xo,oa:Ho,ja:$r,ia:zo,ha:_n,ga:jo,fa:Yo,ea:qo,da:Vo,ca:Ko,ba:Go,aa:Xo,$:zr,n:Zo,B:It,_:Jo,H:Wr,Z:Qo,Y:ei,X:xt,na:Ir,ma:Ht,p:Et,t:oi,J:ii,I:si,Q:ui,la:fi,C:li,G:An,F:di,W:_i,V:En,U:zt,T:Wt,h:hn,d:Tn,b:Cn,f:Oi,g:Di,u:Ai,s:cn,v:In,A:Fi,e:bn,a:ln,c:pn,z:Ci,l:Nn,k:Ln,m:Ti,i:Ni,y:kn,S:Nr,ka:wn,E:Tr,P:Yr,r:jt,x:Yt,q:Gt},Te=Zn(),an=l.___wasm_call_ctors=function(){return(an=l.___wasm_call_ctors=l.asm.Ua).apply(null,arguments)},On=l._wasm_popen=function(){return(On=l._wasm_popen=l.asm.Va).apply(null,arguments)},sn=l.___errno_location=function(){return(sn=l.___errno_location=l.asm.Wa).apply(null,arguments)},$t=l._wasm_pclose=function(){return($t=l._wasm_pclose=l.asm.Xa).apply(null,arguments)},gn=l._php_pollfd_for=function(){return(gn=l._php_pollfd_for=l.asm.Ya).apply(null,arguments)},Pn=l._wasm_select=function(){return(Pn=l._wasm_select=l.asm.Za).apply(null,arguments)},bt=l._wasm_add_cli_arg=function(){return(bt=l._wasm_add_cli_arg=l.asm._a).apply(null,arguments)},sr=l._malloc=function(){return(sr=l._malloc=l.asm.$a).apply(null,arguments)},qr=l._run_cli=function(){return(qr=l._run_cli=l.asm.ab).apply(null,arguments)},Qt=l._memcpy=function(){return(Qt=l._memcpy=l.asm.bb).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.cb).apply(null,arguments)},qt=l._ntohs=function(){return(qt=l._ntohs=l.asm.eb).apply(null,arguments)},Zr=l._htons=function(){return(Zr=l._htons=l.asm.fb).apply(null,arguments)},kr=l._fflush=function(){return(kr=l._fflush=l.asm.gb).apply(null,arguments)},Ur=l._wasm_set_phpini_path=function(){return(Ur=l._wasm_set_phpini_path=l.asm.hb).apply(null,arguments)},nt=l._wasm_set_phpini_entries=function(){return(nt=l._wasm_set_phpini_entries=l.asm.ib).apply(null,arguments)},Zt=l._wasm_add_SERVER_entry=function(){return(Zt=l._wasm_add_SERVER_entry=l.asm.jb).apply(null,arguments)},kt=l._wasm_add_uploaded_file=function(){return(kt=l._wasm_add_uploaded_file=l.asm.kb).apply(null,arguments)},mn=l._wasm_set_query_string=function(){return(mn=l._wasm_set_query_string=l.asm.lb).apply(null,arguments)},un=l._wasm_set_path_translated=function(){return(un=l._wasm_set_path_translated=l.asm.mb).apply(null,arguments)},fn=l._wasm_set_skip_shebang=function(){return(fn=l._wasm_set_skip_shebang=l.asm.nb).apply(null,arguments)},Sn=l._wasm_set_request_uri=function(){return(Sn=l._wasm_set_request_uri=l.asm.ob).apply(null,arguments)},vi=l._wasm_set_request_method=function(){return(vi=l._wasm_set_request_method=l.asm.pb).apply(null,arguments)},mi=l._wasm_set_request_host=function(){return(mi=l._wasm_set_request_host=l.asm.qb).apply(null,arguments)},pi=l._wasm_set_content_type=function(){return(pi=l._wasm_set_content_type=l.asm.rb).apply(null,arguments)},hi=l._wasm_set_request_body=function(){return(hi=l._wasm_set_request_body=l.asm.sb).apply(null,arguments)},yi=l._wasm_set_content_length=function(){return(yi=l._wasm_set_content_length=l.asm.tb).apply(null,arguments)},wi=l._wasm_set_cookies=function(){return(wi=l._wasm_set_cookies=l.asm.ub).apply(null,arguments)},Ei=l._wasm_set_php_code=function(){return(Ei=l._wasm_set_php_code=l.asm.vb).apply(null,arguments)},gi=l._wasm_set_request_port=function(){return(gi=l._wasm_set_request_port=l.asm.wb).apply(null,arguments)},Si=l._phpwasm_init_uploaded_files_hash=function(){return(Si=l._phpwasm_init_uploaded_files_hash=l.asm.xb).apply(null,arguments)},bi=l._phpwasm_register_uploaded_file=function(){return(bi=l._phpwasm_register_uploaded_file=l.asm.yb).apply(null,arguments)},ki=l._phpwasm_destroy_uploaded_files_hash=function(){return(ki=l._phpwasm_destroy_uploaded_files_hash=l.asm.zb).apply(null,arguments)},Rn=l._wasm_sapi_handle_request=function(){return(Rn=l._wasm_sapi_handle_request=l.asm.Ab).apply(null,arguments)},Mn=l._php_wasm_init=function(){return(Mn=l._php_wasm_init=l.asm.Bb).apply(null,arguments)},Sr=l.___funcs_on_exit=function(){return(Sr=l.___funcs_on_exit=l.asm.Cb).apply(null,arguments)},gr=l._emscripten_builtin_memalign=function(){return(gr=l._emscripten_builtin_memalign=l.asm.Db).apply(null,arguments)},we=l._setThrew=function(){return(we=l._setThrew=l.asm.Eb).apply(null,arguments)},Oe=l.stackSave=function(){return(Oe=l.stackSave=l.asm.Fb).apply(null,arguments)},ye=l.stackRestore=function(){return(ye=l.stackRestore=l.asm.Gb).apply(null,arguments)},tr=l.stackAlloc=function(){return(tr=l.stackAlloc=l.asm.Hb).apply(null,arguments)},De=l.dynCall_vi=function(){return(De=l.dynCall_vi=l.asm.Ib).apply(null,arguments)},xe=l.dynCall_iiii=function(){return(xe=l.dynCall_iiii=l.asm.Jb).apply(null,arguments)},Ie=l.dynCall_ii=function(){return(Ie=l.dynCall_ii=l.asm.Kb).apply(null,arguments)},ar=l.dynCall_vii=function(){return(ar=l.dynCall_vii=l.asm.Lb).apply(null,arguments)},Be=l.dynCall_viiiii=function(){return(Be=l.dynCall_viiiii=l.asm.Mb).apply(null,arguments)},He=l.dynCall_iii=function(){return(He=l.dynCall_iii=l.asm.Nb).apply(null,arguments)},ur=l.dynCall_iiiii=function(){return(ur=l.dynCall_iiiii=l.asm.Ob).apply(null,arguments)},Qr=l.dynCall_iiiiiii=function(){return(Qr=l.dynCall_iiiiiii=l.asm.Pb).apply(null,arguments)},ot=l.dynCall_iiiiii=function(){return(ot=l.dynCall_iiiiii=l.asm.Qb).apply(null,arguments)},it=l.dynCall_i=function(){return(it=l.dynCall_i=l.asm.Rb).apply(null,arguments)},Dt=l.dynCall_viii=function(){return(Dt=l.dynCall_viii=l.asm.Sb).apply(null,arguments)},Ot=l.dynCall_viiii=function(){return(Ot=l.dynCall_viiii=l.asm.Tb).apply(null,arguments)},Nt=l.dynCall_v=function(){return(Nt=l.dynCall_v=l.asm.Ub).apply(null,arguments)},Tt=l.dynCall_iiiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiiii=l.asm.Vb).apply(null,arguments)},Ct=l.dynCall_viiiiiiiii=function(){return(Ct=l.dynCall_viiiiiiiii=l.asm.Wb).apply(null,arguments)},Ft=l.dynCall_viiiiii=function(){return(Ft=l.dynCall_viiiiii=l.asm.Xb).apply(null,arguments)},At=l.dynCall_iiiiiiii=function(){return(At=l.dynCall_iiiiiiii=l.asm.Yb).apply(null,arguments)},Pt=l.dynCall_viidii=function(){return(Pt=l.dynCall_viidii=l.asm.Zb).apply(null,arguments)},Rt=l._asyncify_start_unwind=function(){return(Rt=l._asyncify_start_unwind=l.asm._b).apply(null,arguments)},Mt=l._asyncify_stop_unwind=function(){return(Mt=l._asyncify_stop_unwind=l.asm.$b).apply(null,arguments)},Lt=l._asyncify_start_rewind=function(){return(Lt=l._asyncify_start_rewind=l.asm.ac).apply(null,arguments)},Vt=l._asyncify_stop_rewind=function(){return(Vt=l._asyncify_stop_rewind=l.asm.bc).apply(null,arguments)};function cn(s,d,r,i,t,a,n){var f=Oe();try{return Qr(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function ln(s,d){var r=Oe();try{De(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function pn(s,d,r){var i=Oe();try{ar(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function hn(s){var d=Oe();try{return it(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function bn(s){var d=Oe();try{Nt(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Nn(s,d,r,i){var t=Oe();try{Dt(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Tn(s,d){var r=Oe();try{return Ie(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function Cn(s,d,r){var i=Oe();try{return He(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Ln(s,d,r,i,t){var a=Oe();try{Ot(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Di(s,d,r,i,t){var a=Oe();try{return ur(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Oi(s,d,r,i){var t=Oe();try{return xe(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Ni(s,d,r,i,t,a,n){var f=Oe();try{Ft(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function Ti(s,d,r,i,t,a){var n=Oe();try{Be(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function Ci(s,d,r,i,t,a){var n=Oe();try{Pt(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function Fi(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{return Tt(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function Ai(s,d,r,i,t,a){var n=Oe();try{return ot(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function kn(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{Ct(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function In(s,d,r,i,t,a,n,f){var v=Oe();try{return At(s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Xt,l.FS=e;var w;$e=function s(){w||g(),w||($e=s)};function g(s){if(s=s||Y,Re>0||(Wn(),Re>0))return;function d(){w||(w=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),d()},1)):d()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return g(),O}var Yc,Yu,Vu=Ki(()=>{"use strict";Yc=10969654,Yu=__dirname+"/php_7_2.wasm"});var Gu={};Wi(Gu,{dependenciesTotalSize:()=>Vc,dependencyFilename:()=>Ku,init:()=>Kc});function Kc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(w,g)=>{throw g},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(w){return l.locateFile?l.locateFile(w,ae):ae+w}var Ye,nr,Me;function Lr(w){if(w instanceof mr)return;ce("exiting due to exception: "+w)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(w,g)=>(wr(),w=Le.normalize(w),V.readFileSync(w,g?void 0:"utf8")),Me=w=>{var g=Ye(w,!0);return g.buffer||(g=new Uint8Array(g)),g},nr=(w,g,s)=>{wr(),w=Le.normalize(w),V.readFile(w,function(d,r){d?s(d):g(r.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(w){if(!(w instanceof mr))throw w}),process.on("unhandledRejection",function(w){throw w}),te=(w,g)=>{if(_r())throw process.exitCode=w,g;Lr(g),process.exit(w)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(w,g){w||ue(g)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(w,g,s){for(var d=g+s,r=g;w[r]&&!(r>=d);)++r;if(r-g>16&&w.buffer&&at)return at.decode(w.subarray(g,r));for(var i="";g<r;){var t=w[g++];if(!(t&128)){i+=String.fromCharCode(t);continue}var a=w[g++]&63;if((t&224)==192){i+=String.fromCharCode((t&31)<<6|a);continue}var n=w[g++]&63;if((t&240)==224?t=(t&15)<<12|a<<6|n:t=(t&7)<<18|a<<12|n<<6|w[g++]&63,t<65536)i+=String.fromCharCode(t);else{var f=t-65536;i+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return i}function ne(w,g){return w?We(de,w,g):""}function Xe(w,g,s,d){if(!(d>0))return 0;for(var r=s,i=s+d-1,t=0;t<w.length;++t){var a=w.charCodeAt(t);if(a>=55296&&a<=57343){var n=w.charCodeAt(++t);a=65536+((a&1023)<<10)|n&1023}if(a<=127){if(s>=i)break;g[s++]=a}else if(a<=2047){if(s+1>=i)break;g[s++]=192|a>>6,g[s++]=128|a&63}else if(a<=65535){if(s+2>=i)break;g[s++]=224|a>>12,g[s++]=128|a>>6&63,g[s++]=128|a&63}else{if(s+3>=i)break;g[s++]=240|a>>18,g[s++]=128|a>>12&63,g[s++]=128|a>>6&63,g[s++]=128|a&63}}return g[s]=0,s-r}function Ae(w,g,s){return Xe(w,de,g,s)}function Pe(w){for(var g=0,s=0;s<w.length;++s){var d=w.charCodeAt(s);d<=127?g++:d<=2047?g+=2:d>=55296&&d<=57343?(g+=4,++s):g+=3}return g}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(w){Cr=w,l.HEAP8=$=new Int8Array(w),l.HEAP16=Ee=new Int16Array(w),l.HEAP32=h=new Int32Array(w),l.HEAPU8=de=new Uint8Array(w),l.HEAPU16=st=new Uint16Array(w),l.HEAPU32=H=new Uint32Array(w),l.HEAPF32=Bn=new Float32Array(w),l.HEAPF64=ut=new Float64Array(w)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Sr(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(w){ct.unshift(w)}function Kn(w){lt.unshift(w)}function Gn(w){dt.unshift(w)}var Re=0,Ar=null,$e=null;function Qi(w){return w}function vr(w){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(w){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var g=$e;$e=null,g()}}function ue(w){l.onAbort&&l.onAbort(w),w="Aborted("+w+")",ce(w),Ce=!0,Ge=1,w+=". Build with -sASSERTIONS for more info.";var g=new WebAssembly.RuntimeError(w);throw g}var Xn="data:application/octet-stream;base64,";function vt(w){return w.startsWith(Xn)}var _e;_e=Ku,vt(_e)||(_e=cr(_e));function mt(w){try{if(w==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(w);throw"both async and sync fetching of the wasm failed"}catch(g){ue(g)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(w){if(!w.ok)throw"failed to load wasm binary file at '"+_e+"'";return w.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var w={a:ke};function g(t,a){var n=t.exports;n=X.instrumentWasmExports(n),l.asm=n,or=l.asm.Sa,ft(or.buffer),xn=l.asm.cb,Kn(l.asm.Ta),Ze("wasm-instantiate")}vr("wasm-instantiate");function s(t){g(t.instance)}function d(t){return $n().then(function(a){return WebAssembly.instantiate(a,w)}).then(function(a){return a}).then(t,function(a){ce("failed to asynchronously prepare wasm: "+a),ue(a)})}function r(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(t){var a=WebAssembly.instantiateStreaming(t,w);return a.then(s,function(n){return ce("wasm streaming compile failed: "+n),ce("falling back to ArrayBuffer instantiation"),d(s)})}):d(s)}if(l.instantiateWasm)try{var i=l.instantiateWasm(w,g);return i=X.instrumentWasmExports(i),i}catch(t){return ce("Module.instantiateWasm callback failed with error: "+t),!1}return r(),{}}var P,q;function mr(w){this.name="ExitStatus",this.message="Program terminated with exit("+w+")",this.status=w}function pr(w){for(;w.length>0;)w.shift()(l)}function pt(w){if(w instanceof mr||w=="unwind")return Ge;te(1,w)}function ht(w,g){$.set(w,g)}function Jn(w,g,s,d){ue("Assertion failed: "+ne(w)+", at: "+[g?ne(g):"unknown filename",s,d?ne(d):"unknown function"])}function Qn(w,g){(function(s){Ie.apply(null,[w,s])})(g)}var U={isAbs:w=>w.charAt(0)==="/",splitPath:w=>{var g=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return g.exec(w).slice(1)},normalizeArray:(w,g)=>{for(var s=0,d=w.length-1;d>=0;d--){var r=w[d];r==="."?w.splice(d,1):r===".."?(w.splice(d,1),s++):s&&(w.splice(d,1),s--)}if(g)for(;s;s--)w.unshift("..");return w},normalize:w=>{var g=U.isAbs(w),s=w.substr(-1)==="/";return w=U.normalizeArray(w.split("/").filter(d=>!!d),!g).join("/"),!w&&!g&&(w="."),w&&s&&(w+="/"),(g?"/":"")+w},dirname:w=>{var g=U.splitPath(w),s=g[0],d=g[1];return!s&&!d?".":(d&&(d=d.substr(0,d.length-1)),s+d)},basename:w=>{if(w==="/")return"/";w=U.normalize(w),w=w.replace(/\/$/,"");var g=w.lastIndexOf("/");return g===-1?w:w.substr(g+1)},join:function(){var w=Array.prototype.slice.call(arguments);return U.normalize(w.join("/"))},join2:(w,g)=>U.normalize(w+"/"+g)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var w=new Uint8Array(1);return()=>(crypto.getRandomValues(w),w[0])}else if(Z)try{var g=require("crypto");return()=>g.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var w="",g=!1,s=arguments.length-1;s>=-1&&!g;s--){var d=s>=0?arguments[s]:e.cwd();if(typeof d!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!d)return"";w=d+"/"+w,g=U.isAbs(d)}return w=U.normalizeArray(w.split("/").filter(r=>!!r),!g).join("/"),(g?"/":"")+w||"."},relative:(w,g)=>{w=ge.resolve(w).substr(1),g=ge.resolve(g).substr(1);function s(f){for(var v=0;v<f.length&&f[v]==="";v++);for(var u=f.length-1;u>=0&&f[u]==="";u--);return v>u?[]:f.slice(v,u-v+1)}for(var d=s(w.split("/")),r=s(g.split("/")),i=Math.min(d.length,r.length),t=i,a=0;a<i;a++)if(d[a]!==r[a]){t=a;break}for(var n=[],a=t;a<d.length;a++)n.push("..");return n=n.concat(r.slice(t)),n.join("/")}};function Je(w,g,s){var d=s>0?s:Pe(w)+1,r=new Array(d),i=Xe(w,r,0,r.length);return g&&(r.length=i),r}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(w,g){Se.ttys[w]={input:[],output:[],ops:g},e.registerDevice(w,Se.stream_ops)},stream_ops:{open:function(w){var g=Se.ttys[w.node.rdev];if(!g)throw new e.ErrnoError(43);w.tty=g,w.seekable=!1},close:function(w){w.tty.ops.fsync(w.tty)},fsync:function(w){w.tty.ops.fsync(w.tty)},read:function(w,g,s,d,r){if(!w.tty||!w.tty.ops.get_char)throw new e.ErrnoError(60);for(var i=0,t=0;t<d;t++){var a;try{a=w.tty.ops.get_char(w.tty)}catch{throw new e.ErrnoError(29)}if(a===void 0&&i===0)throw new e.ErrnoError(6);if(a==null)break;i++,g[s+t]=a}return i&&(w.node.timestamp=Date.now()),i},write:function(w,g,s,d,r){if(!w.tty||!w.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var i=0;i<d;i++)w.tty.ops.put_char(w.tty,g[s+i])}catch{throw new e.ErrnoError(29)}return d&&(w.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(w){if(!w.input.length){var g=null;if(Z){var s=256,d=Buffer.alloc(s),r=0;try{r=V.readSync(process.stdin.fd,d,0,s,-1)}catch(i){if(i.toString().includes("EOF"))r=0;else throw i}r>0?g=d.slice(0,r).toString("utf-8"):g=null}else typeof window<"u"&&typeof window.prompt=="function"?(g=window.prompt("Input: "),g!==null&&(g+=`
|
|
26
26
|
`)):typeof readline=="function"&&(g=readline(),g!==null&&(g+=`
|
|
27
27
|
`));if(!g)return null;w.input=Je(g,!0)}return w.input.shift()},put_char:function(w,g){g===null||g===10?(Qe(We(w.output,0)),w.output=[]):g!=0&&w.output.push(g)},fsync:function(w){w.output&&w.output.length>0&&(Qe(We(w.output,0)),w.output=[])}},default_tty1_ops:{put_char:function(w,g){g===null||g===10?(ce(We(w.output,0)),w.output=[]):g!=0&&w.output.push(g)},fsync:function(w){w.output&&w.output.length>0&&(ce(We(w.output,0)),w.output=[])}}};function Pr(w,g){return de.fill(0,w,w+g),w}function ro(w,g){return Math.ceil(w/g)*g}function Rr(w){w=ro(w,65536);var g=gr(65536,w);return g?Pr(g,w):0}var L={ops_table:null,mount:function(w){return L.createNode(null,"/",16895,0)},createNode:function(w,g,s,d){if(e.isBlkdev(s)||e.isFIFO(s))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var r=e.createNode(w,g,s,d);return e.isDir(r.mode)?(r.node_ops=L.ops_table.dir.node,r.stream_ops=L.ops_table.dir.stream,r.contents={}):e.isFile(r.mode)?(r.node_ops=L.ops_table.file.node,r.stream_ops=L.ops_table.file.stream,r.usedBytes=0,r.contents=null):e.isLink(r.mode)?(r.node_ops=L.ops_table.link.node,r.stream_ops=L.ops_table.link.stream):e.isChrdev(r.mode)&&(r.node_ops=L.ops_table.chrdev.node,r.stream_ops=L.ops_table.chrdev.stream),r.timestamp=Date.now(),w&&(w.contents[g]=r,w.timestamp=r.timestamp),r},getFileDataAsTypedArray:function(w){return w.contents?w.contents.subarray?w.contents.subarray(0,w.usedBytes):new Uint8Array(w.contents):new Uint8Array(0)},expandFileStorage:function(w,g){var s=w.contents?w.contents.length:0;if(!(s>=g)){var d=1024*1024;g=Math.max(g,s*(s<d?2:1.125)>>>0),s!=0&&(g=Math.max(g,256));var r=w.contents;w.contents=new Uint8Array(g),w.usedBytes>0&&w.contents.set(r.subarray(0,w.usedBytes),0)}},resizeFileStorage:function(w,g){if(w.usedBytes!=g)if(g==0)w.contents=null,w.usedBytes=0;else{var s=w.contents;w.contents=new Uint8Array(g),s&&w.contents.set(s.subarray(0,Math.min(g,w.usedBytes))),w.usedBytes=g}},node_ops:{getattr:function(w){var g={};return g.dev=e.isChrdev(w.mode)?w.id:1,g.ino=w.id,g.mode=w.mode,g.nlink=1,g.uid=0,g.gid=0,g.rdev=w.rdev,e.isDir(w.mode)?g.size=4096:e.isFile(w.mode)?g.size=w.usedBytes:e.isLink(w.mode)?g.size=w.link.length:g.size=0,g.atime=new Date(w.timestamp),g.mtime=new Date(w.timestamp),g.ctime=new Date(w.timestamp),g.blksize=4096,g.blocks=Math.ceil(g.size/g.blksize),g},setattr:function(w,g){g.mode!==void 0&&(w.mode=g.mode),g.timestamp!==void 0&&(w.timestamp=g.timestamp),g.size!==void 0&&L.resizeFileStorage(w,g.size)},lookup:function(w,g){throw e.genericErrors[44]},mknod:function(w,g,s,d){return L.createNode(w,g,s,d)},rename:function(w,g,s){if(e.isDir(w.mode)){var d;try{d=e.lookupNode(g,s)}catch{}if(d)for(var r in d.contents)throw new e.ErrnoError(55)}delete w.parent.contents[w.name],w.parent.timestamp=Date.now(),w.name=s,g.contents[s]=w,g.timestamp=w.parent.timestamp,w.parent=g},unlink:function(w,g){delete w.contents[g],w.timestamp=Date.now()},rmdir:function(w,g){var s=e.lookupNode(w,g);for(var d in s.contents)throw new e.ErrnoError(55);delete w.contents[g],w.timestamp=Date.now()},readdir:function(w){var g=[".",".."];for(var s in w.contents)w.contents.hasOwnProperty(s)&&g.push(s);return g},symlink:function(w,g,s){var d=L.createNode(w,g,41471,0);return d.link=s,d},readlink:function(w){if(!e.isLink(w.mode))throw new e.ErrnoError(28);return w.link}},stream_ops:{read:function(w,g,s,d,r){var i=w.node.contents;if(r>=w.node.usedBytes)return 0;var t=Math.min(w.node.usedBytes-r,d);if(t>8&&i.subarray)g.set(i.subarray(r,r+t),s);else for(var a=0;a<t;a++)g[s+a]=i[r+a];return t},write:function(w,g,s,d,r,i){if(g.buffer===$.buffer&&(i=!1),!d)return 0;var t=w.node;if(t.timestamp=Date.now(),g.subarray&&(!t.contents||t.contents.subarray)){if(i)return t.contents=g.subarray(s,s+d),t.usedBytes=d,d;if(t.usedBytes===0&&r===0)return t.contents=g.slice(s,s+d),t.usedBytes=d,d;if(r+d<=t.usedBytes)return t.contents.set(g.subarray(s,s+d),r),d}if(L.expandFileStorage(t,r+d),t.contents.subarray&&g.subarray)t.contents.set(g.subarray(s,s+d),r);else for(var a=0;a<d;a++)t.contents[r+a]=g[s+a];return t.usedBytes=Math.max(t.usedBytes,r+d),d},llseek:function(w,g,s){var d=g;if(s===1?d+=w.position:s===2&&e.isFile(w.node.mode)&&(d+=w.node.usedBytes),d<0)throw new e.ErrnoError(28);return d},allocate:function(w,g,s){L.expandFileStorage(w.node,g+s),w.node.usedBytes=Math.max(w.node.usedBytes,g+s)},mmap:function(w,g,s,d,r){if(!e.isFile(w.node.mode))throw new e.ErrnoError(43);var i,t,a=w.node.contents;if(!(r&2)&&a.buffer===Cr)t=!1,i=a.byteOffset;else{if((s>0||s+g<a.length)&&(a.subarray?a=a.subarray(s,s+g):a=Array.prototype.slice.call(a,s,s+g)),t=!0,i=Rr(g),!i)throw new e.ErrnoError(48);$.set(a,i)}return{ptr:i,allocated:t}},msync:function(w,g,s,d,r){return L.stream_ops.write(w,g,0,d,s,!1),0}}};function to(w,g,s,d){var r=d?"":"al "+w;nr(w,i=>{Ne(i,'Loading data file "'+w+'" failed (no arrayBuffer).'),g(new Uint8Array(i)),r&&Ze(r)},i=>{if(s)s();else throw'Loading data file "'+w+'" failed.'}),r&&vr(r)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var w=process.binding("constants");w.fs&&(w=w.fs),M.flagsForNodeMap={1024:w.O_APPEND,64:w.O_CREAT,128:w.O_EXCL,256:w.O_NOCTTY,0:w.O_RDONLY,2:w.O_RDWR,4096:w.O_SYNC,512:w.O_TRUNC,1:w.O_WRONLY,131072:w.O_NOFOLLOW}},convertNodeCode:w=>{var g=w.code;return yt[g]},mount:w=>M.createNode(null,"/",M.getMode(w.opts.root),0),createNode:(w,g,s,d)=>{if(!e.isDir(s)&&!e.isFile(s)&&!e.isLink(s))throw new e.ErrnoError(28);var r=e.createNode(w,g,s);return r.node_ops=M.node_ops,r.stream_ops=M.stream_ops,r},getMode:w=>{var g;try{g=V.lstatSync(w),M.isWindows&&(g.mode=g.mode|(g.mode&292)>>2)}catch(s){throw s.code?new e.ErrnoError(M.convertNodeCode(s)):s}return g.mode},realPath:w=>{for(var g=[];w.parent!==w;)g.push(w.name),w=w.parent;return g.push(w.mount.opts.root),g.reverse(),U.join.apply(null,g)},flagsForNode:w=>{w&=-2097153,w&=-2049,w&=-32769,w&=-524289,w&=-65537;var g=0;for(var s in M.flagsForNodeMap)w&s&&(g|=M.flagsForNodeMap[s],w^=s);if(w)throw new e.ErrnoError(28);return g},node_ops:{getattr:w=>{var g=M.realPath(w),s;try{s=V.lstatSync(g)}catch(d){throw d.code?new e.ErrnoError(M.convertNodeCode(d)):d}return M.isWindows&&!s.blksize&&(s.blksize=4096),M.isWindows&&!s.blocks&&(s.blocks=(s.size+s.blksize-1)/s.blksize|0),{dev:s.dev,ino:s.ino,mode:s.mode,nlink:s.nlink,uid:s.uid,gid:s.gid,rdev:s.rdev,size:s.size,atime:s.atime,mtime:s.mtime,ctime:s.ctime,blksize:s.blksize,blocks:s.blocks}},setattr:(w,g)=>{var s=M.realPath(w);try{if(g.mode!==void 0&&(V.chmodSync(s,g.mode),w.mode=g.mode),g.timestamp!==void 0){var d=new Date(g.timestamp);V.utimesSync(s,d,d)}g.size!==void 0&&V.truncateSync(s,g.size)}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}},lookup:(w,g)=>{var s=U.join2(M.realPath(w),g),d=M.getMode(s);return M.createNode(w,g,d)},mknod:(w,g,s,d)=>{var r=M.createNode(w,g,s,d),i=M.realPath(r);try{e.isDir(r.mode)?V.mkdirSync(i,r.mode):V.writeFileSync(i,"",{mode:r.mode})}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}return r},rename:(w,g,s)=>{var d=M.realPath(w),r=U.join2(M.realPath(g),s);try{V.renameSync(d,r)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}w.name=s},unlink:(w,g)=>{var s=U.join2(M.realPath(w),g);try{V.unlinkSync(s)}catch(d){throw d.code?new e.ErrnoError(M.convertNodeCode(d)):d}},rmdir:(w,g)=>{var s=U.join2(M.realPath(w),g);try{V.rmdirSync(s)}catch(d){throw d.code?new e.ErrnoError(M.convertNodeCode(d)):d}},readdir:w=>{var g=M.realPath(w);try{return V.readdirSync(g)}catch(s){throw s.code?new e.ErrnoError(M.convertNodeCode(s)):s}},symlink:(w,g,s)=>{var d=U.join2(M.realPath(w),g);try{V.symlinkSync(s,d)}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}},readlink:w=>{var g=M.realPath(w);try{return g=V.readlinkSync(g),g=Le.relative(Le.resolve(w.mount.opts.root),g),g}catch(s){throw s.code?s.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(s)):s}}},stream_ops:{open:w=>{var g=M.realPath(w.node);try{e.isFile(w.node.mode)&&(w.nfd=V.openSync(g,M.flagsForNode(w.flags)))}catch(s){throw s.code?new e.ErrnoError(M.convertNodeCode(s)):s}},close:w=>{try{e.isFile(w.node.mode)&&w.nfd&&V.closeSync(w.nfd)}catch(g){throw g.code?new e.ErrnoError(M.convertNodeCode(g)):g}},read:(w,g,s,d,r)=>{if(d===0)return 0;try{return V.readSync(w.nfd,Buffer.from(g.buffer),s,d,r)}catch(i){throw new e.ErrnoError(M.convertNodeCode(i))}},write:(w,g,s,d,r)=>{try{return V.writeSync(w.nfd,Buffer.from(g.buffer),s,d,r)}catch(i){throw new e.ErrnoError(M.convertNodeCode(i))}},llseek:(w,g,s)=>{var d=g;if(s===1)d+=w.position;else if(s===2&&e.isFile(w.node.mode))try{var r=V.fstatSync(w.nfd);d+=r.size}catch(i){throw new e.ErrnoError(M.convertNodeCode(i))}if(d<0)throw new e.ErrnoError(28);return d},mmap:(w,g,s,d,r)=>{if(!e.isFile(w.node.mode))throw new e.ErrnoError(43);var i=Rr(g);return M.stream_ops.read(w,$,i,g,s),{ptr:i,allocated:!0}},msync:(w,g,s,d,r)=>(M.stream_ops.write(w,g,0,d,s,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(w,g={})=>{if(w=ge.resolve(e.cwd(),w),!w)return{path:"",node:null};var s={follow_mount:!0,recurse_count:0};if(g=Object.assign(s,g),g.recurse_count>8)throw new e.ErrnoError(32);for(var d=U.normalizeArray(w.split("/").filter(u=>!!u),!1),r=e.root,i="/",t=0;t<d.length;t++){var a=t===d.length-1;if(a&&g.parent)break;if(r=e.lookupNode(r,d[t]),i=U.join2(i,d[t]),e.isMountpoint(r)&&(!a||a&&g.follow_mount)&&(r=r.mounted.root),!a||g.follow)for(var n=0;e.isLink(r.mode);){var f=e.readlink(i);i=ge.resolve(U.dirname(i),f);var v=e.lookupPath(i,{recurse_count:g.recurse_count+1});if(r=v.node,n++>40)throw new e.ErrnoError(32)}}return{path:i,node:r}},getPath:w=>{for(var g;;){if(e.isRoot(w)){var s=w.mount.mountpoint;return g?s[s.length-1]!=="/"?s+"/"+g:s+g:s}g=g?w.name+"/"+g:w.name,w=w.parent}},hashName:(w,g)=>{for(var s=0,d=0;d<g.length;d++)s=(s<<5)-s+g.charCodeAt(d)|0;return(w+s>>>0)%e.nameTable.length},hashAddNode:w=>{var g=e.hashName(w.parent.id,w.name);w.name_next=e.nameTable[g],e.nameTable[g]=w},hashRemoveNode:w=>{var g=e.hashName(w.parent.id,w.name);if(e.nameTable[g]===w)e.nameTable[g]=w.name_next;else for(var s=e.nameTable[g];s;){if(s.name_next===w){s.name_next=w.name_next;break}s=s.name_next}},lookupNode:(w,g)=>{var s=e.mayLookup(w);if(s)throw new e.ErrnoError(s,w);for(var d=e.hashName(w.id,g),r=e.nameTable[d];r;r=r.name_next){var i=r.name;if(r.parent.id===w.id&&i===g)return r}return e.lookup(w,g)},createNode:(w,g,s,d)=>{var r=new e.FSNode(w,g,s,d);return e.hashAddNode(r),r},destroyNode:w=>{e.hashRemoveNode(w)},isRoot:w=>w===w.parent,isMountpoint:w=>!!w.mounted,isFile:w=>(w&61440)===32768,isDir:w=>(w&61440)===16384,isLink:w=>(w&61440)===40960,isChrdev:w=>(w&61440)===8192,isBlkdev:w=>(w&61440)===24576,isFIFO:w=>(w&61440)===4096,isSocket:w=>(w&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:w=>{var g=e.flagModes[w];if(typeof g>"u")throw new Error("Unknown file open mode: "+w);return g},flagsToPermissionString:w=>{var g=["r","w","rw"][w&3];return w&512&&(g+="w"),g},nodePermissions:(w,g)=>e.ignorePermissions?0:g.includes("r")&&!(w.mode&292)||g.includes("w")&&!(w.mode&146)||g.includes("x")&&!(w.mode&73)?2:0,mayLookup:w=>{var g=e.nodePermissions(w,"x");return g||(w.node_ops.lookup?0:2)},mayCreate:(w,g)=>{try{var s=e.lookupNode(w,g);return 20}catch{}return e.nodePermissions(w,"wx")},mayDelete:(w,g,s)=>{var d;try{d=e.lookupNode(w,g)}catch(i){return i.errno}var r=e.nodePermissions(w,"wx");if(r)return r;if(s){if(!e.isDir(d.mode))return 54;if(e.isRoot(d)||e.getPath(d)===e.cwd())return 10}else if(e.isDir(d.mode))return 31;return 0},mayOpen:(w,g)=>w?e.isLink(w.mode)?32:e.isDir(w.mode)&&(e.flagsToPermissionString(g)!=="r"||g&512)?31:e.nodePermissions(w,e.flagsToPermissionString(g)):44,MAX_OPEN_FDS:4096,nextfd:(w=0,g=e.MAX_OPEN_FDS)=>{for(var s=w;s<=g;s++)if(!e.streams[s])return s;throw new e.ErrnoError(33)},getStream:w=>e.streams[w],createStream:(w,g,s)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),w=Object.assign(new e.FSStream,w);var d=e.nextfd(g,s);return w.fd=d,e.streams[d]=w,w},closeStream:w=>{e.streams[w]=null},chrdev_stream_ops:{open:w=>{var g=e.getDevice(w.node.rdev);w.stream_ops=g.stream_ops,w.stream_ops.open&&w.stream_ops.open(w)},llseek:()=>{throw new e.ErrnoError(70)}},major:w=>w>>8,minor:w=>w&255,makedev:(w,g)=>w<<8|g,registerDevice:(w,g)=>{e.devices[w]={stream_ops:g}},getDevice:w=>e.devices[w],getMounts:w=>{for(var g=[],s=[w];s.length;){var d=s.pop();g.push(d),s.push.apply(s,d.mounts)}return g},syncfs:(w,g)=>{typeof w=="function"&&(g=w,w=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var s=e.getMounts(e.root.mount),d=0;function r(t){return e.syncFSRequests--,g(t)}function i(t){if(t)return i.errored?void 0:(i.errored=!0,r(t));++d>=s.length&&r(null)}s.forEach(t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,w,i)})},mount:(w,g,s)=>{var d=s==="/",r=!s,i;if(d&&e.root)throw new e.ErrnoError(10);if(!d&&!r){var t=e.lookupPath(s,{follow_mount:!1});if(s=t.path,i=t.node,e.isMountpoint(i))throw new e.ErrnoError(10);if(!e.isDir(i.mode))throw new e.ErrnoError(54)}var a={type:w,opts:g,mountpoint:s,mounts:[]},n=w.mount(a);return n.mount=a,a.root=n,d?e.root=n:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),n},unmount:w=>{var g=e.lookupPath(w,{follow_mount:!1});if(!e.isMountpoint(g.node))throw new e.ErrnoError(28);var s=g.node,d=s.mounted,r=e.getMounts(d);Object.keys(e.nameTable).forEach(t=>{for(var a=e.nameTable[t];a;){var n=a.name_next;r.includes(a.mount)&&e.destroyNode(a),a=n}}),s.mounted=null;var i=s.mount.mounts.indexOf(d);s.mount.mounts.splice(i,1)},lookup:(w,g)=>w.node_ops.lookup(w,g),mknod:(w,g,s)=>{var d=e.lookupPath(w,{parent:!0}),r=d.node,i=U.basename(w);if(!i||i==="."||i==="..")throw new e.ErrnoError(28);var t=e.mayCreate(r,i);if(t)throw new e.ErrnoError(t);if(!r.node_ops.mknod)throw new e.ErrnoError(63);return r.node_ops.mknod(r,i,g,s)},create:(w,g)=>(g=g!==void 0?g:438,g&=4095,g|=32768,e.mknod(w,g,0)),mkdir:(w,g)=>(g=g!==void 0?g:511,g&=1023,g|=16384,e.mknod(w,g,0)),mkdirTree:(w,g)=>{for(var s=w.split("/"),d="",r=0;r<s.length;++r)if(s[r]){d+="/"+s[r];try{e.mkdir(d,g)}catch(i){if(i.errno!=20)throw i}}},mkdev:(w,g,s)=>(typeof s>"u"&&(s=g,g=438),g|=8192,e.mknod(w,g,s)),symlink:(w,g)=>{if(!ge.resolve(w))throw new e.ErrnoError(44);var s=e.lookupPath(g,{parent:!0}),d=s.node;if(!d)throw new e.ErrnoError(44);var r=U.basename(g),i=e.mayCreate(d,r);if(i)throw new e.ErrnoError(i);if(!d.node_ops.symlink)throw new e.ErrnoError(63);return d.node_ops.symlink(d,r,w)},rename:(w,g)=>{var s=U.dirname(w),d=U.dirname(g),r=U.basename(w),i=U.basename(g),t,a,n;if(t=e.lookupPath(w,{parent:!0}),a=t.node,t=e.lookupPath(g,{parent:!0}),n=t.node,!a||!n)throw new e.ErrnoError(44);if(a.mount!==n.mount)throw new e.ErrnoError(75);var f=e.lookupNode(a,r),v=ge.relative(w,d);if(v.charAt(0)!==".")throw new e.ErrnoError(28);if(v=ge.relative(g,s),v.charAt(0)!==".")throw new e.ErrnoError(55);var u;try{u=e.lookupNode(n,i)}catch{}if(f!==u){var o=e.isDir(f.mode),c=e.mayDelete(a,r,o);if(c)throw new e.ErrnoError(c);if(c=u?e.mayDelete(n,i,o):e.mayCreate(n,i),c)throw new e.ErrnoError(c);if(!a.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(f)||u&&e.isMountpoint(u))throw new e.ErrnoError(10);if(n!==a&&(c=e.nodePermissions(a,"w"),c))throw new e.ErrnoError(c);e.hashRemoveNode(f);try{a.node_ops.rename(f,n,i)}catch(_){throw _}finally{e.hashAddNode(f)}}},rmdir:w=>{var g=e.lookupPath(w,{parent:!0}),s=g.node,d=U.basename(w),r=e.lookupNode(s,d),i=e.mayDelete(s,d,!0);if(i)throw new e.ErrnoError(i);if(!s.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(r))throw new e.ErrnoError(10);s.node_ops.rmdir(s,d),e.destroyNode(r)},readdir:w=>{var g=e.lookupPath(w,{follow:!0}),s=g.node;if(!s.node_ops.readdir)throw new e.ErrnoError(54);return s.node_ops.readdir(s)},unlink:w=>{var g=e.lookupPath(w,{parent:!0}),s=g.node;if(!s)throw new e.ErrnoError(44);var d=U.basename(w),r=e.lookupNode(s,d),i=e.mayDelete(s,d,!1);if(i)throw new e.ErrnoError(i);if(!s.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(r))throw new e.ErrnoError(10);s.node_ops.unlink(s,d),e.destroyNode(r)},readlink:w=>{var g=e.lookupPath(w),s=g.node;if(!s)throw new e.ErrnoError(44);if(!s.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(s.parent),s.node_ops.readlink(s))},stat:(w,g)=>{var s=e.lookupPath(w,{follow:!g}),d=s.node;if(!d)throw new e.ErrnoError(44);if(!d.node_ops.getattr)throw new e.ErrnoError(63);return d.node_ops.getattr(d)},lstat:w=>e.stat(w,!0),chmod:(w,g,s)=>{var d;if(typeof w=="string"){var r=e.lookupPath(w,{follow:!s});d=r.node}else d=w;if(!d.node_ops.setattr)throw new e.ErrnoError(63);d.node_ops.setattr(d,{mode:g&4095|d.mode&-4096,timestamp:Date.now()})},lchmod:(w,g)=>{e.chmod(w,g,!0)},fchmod:(w,g)=>{var s=e.getStream(w);if(!s)throw new e.ErrnoError(8);e.chmod(s.node,g)},chown:(w,g,s,d)=>{var r;if(typeof w=="string"){var i=e.lookupPath(w,{follow:!d});r=i.node}else r=w;if(!r.node_ops.setattr)throw new e.ErrnoError(63);r.node_ops.setattr(r,{timestamp:Date.now()})},lchown:(w,g,s)=>{e.chown(w,g,s,!0)},fchown:(w,g,s)=>{var d=e.getStream(w);if(!d)throw new e.ErrnoError(8);e.chown(d.node,g,s)},truncate:(w,g)=>{if(g<0)throw new e.ErrnoError(28);var s;if(typeof w=="string"){var d=e.lookupPath(w,{follow:!0});s=d.node}else s=w;if(!s.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(s.mode))throw new e.ErrnoError(31);if(!e.isFile(s.mode))throw new e.ErrnoError(28);var r=e.nodePermissions(s,"w");if(r)throw new e.ErrnoError(r);s.node_ops.setattr(s,{size:g,timestamp:Date.now()})},ftruncate:(w,g)=>{var s=e.getStream(w);if(!s)throw new e.ErrnoError(8);if(!(s.flags&2097155))throw new e.ErrnoError(28);e.truncate(s.node,g)},utime:(w,g,s)=>{var d=e.lookupPath(w,{follow:!0}),r=d.node;r.node_ops.setattr(r,{timestamp:Math.max(g,s)})},open:(w,g,s)=>{if(w==="")throw new e.ErrnoError(44);g=typeof g=="string"?e.modeStringToFlags(g):g,s=typeof s>"u"?438:s,g&64?s=s&4095|32768:s=0;var d;if(typeof w=="object")d=w;else{w=U.normalize(w);try{var r=e.lookupPath(w,{follow:!(g&131072)});d=r.node}catch{}}var i=!1;if(g&64)if(d){if(g&128)throw new e.ErrnoError(20)}else d=e.mknod(w,s,0),i=!0;if(!d)throw new e.ErrnoError(44);if(e.isChrdev(d.mode)&&(g&=-513),g&65536&&!e.isDir(d.mode))throw new e.ErrnoError(54);if(!i){var t=e.mayOpen(d,g);if(t)throw new e.ErrnoError(t)}g&512&&!i&&e.truncate(d,0),g&=-131713;var a=e.createStream({node:d,path:e.getPath(d),flags:g,seekable:!0,position:0,stream_ops:d.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),l.logReadFiles&&!(g&1)&&(e.readFiles||(e.readFiles={}),w in e.readFiles||(e.readFiles[w]=1)),a},close:w=>{if(e.isClosed(w))throw new e.ErrnoError(8);w.getdents&&(w.getdents=null);try{w.stream_ops.close&&w.stream_ops.close(w)}catch(g){throw g}finally{e.closeStream(w.fd)}w.fd=null},isClosed:w=>w.fd===null,llseek:(w,g,s)=>{if(e.isClosed(w))throw new e.ErrnoError(8);if(!w.seekable||!w.stream_ops.llseek)throw new e.ErrnoError(70);if(s!=0&&s!=1&&s!=2)throw new e.ErrnoError(28);return w.position=w.stream_ops.llseek(w,g,s),w.ungotten=[],w.position},read:(w,g,s,d,r)=>{if(d<0||r<0)throw new e.ErrnoError(28);if(e.isClosed(w))throw new e.ErrnoError(8);if((w.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(w.node.mode))throw new e.ErrnoError(31);if(!w.stream_ops.read)throw new e.ErrnoError(28);var i=typeof r<"u";if(!i)r=w.position;else if(!w.seekable)throw new e.ErrnoError(70);var t=w.stream_ops.read(w,g,s,d,r);return i||(w.position+=t),t},write:(w,g,s,d,r,i)=>{if(d<0||r<0)throw new e.ErrnoError(28);if(e.isClosed(w))throw new e.ErrnoError(8);if(!(w.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(w.node.mode))throw new e.ErrnoError(31);if(!w.stream_ops.write)throw new e.ErrnoError(28);w.seekable&&w.flags&1024&&e.llseek(w,0,2);var t=typeof r<"u";if(!t)r=w.position;else if(!w.seekable)throw new e.ErrnoError(70);var a=w.stream_ops.write(w,g,s,d,r,i);return t||(w.position+=a),a},allocate:(w,g,s)=>{if(e.isClosed(w))throw new e.ErrnoError(8);if(g<0||s<=0)throw new e.ErrnoError(28);if(!(w.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(w.node.mode)&&!e.isDir(w.node.mode))throw new e.ErrnoError(43);if(!w.stream_ops.allocate)throw new e.ErrnoError(138);w.stream_ops.allocate(w,g,s)},mmap:(w,g,s,d,r)=>{if(d&2&&!(r&2)&&(w.flags&2097155)!==2)throw new e.ErrnoError(2);if((w.flags&2097155)===1)throw new e.ErrnoError(2);if(!w.stream_ops.mmap)throw new e.ErrnoError(43);return w.stream_ops.mmap(w,g,s,d,r)},msync:(w,g,s,d,r)=>w.stream_ops.msync?w.stream_ops.msync(w,g,s,d,r):0,munmap:w=>0,ioctl:(w,g,s)=>{if(!w.stream_ops.ioctl)throw new e.ErrnoError(59);return w.stream_ops.ioctl(w,g,s)},readFile:(w,g={})=>{if(g.flags=g.flags||0,g.encoding=g.encoding||"binary",g.encoding!=="utf8"&&g.encoding!=="binary")throw new Error('Invalid encoding type "'+g.encoding+'"');var s,d=e.open(w,g.flags),r=e.stat(w),i=r.size,t=new Uint8Array(i);return e.read(d,t,0,i,0),g.encoding==="utf8"?s=We(t,0):g.encoding==="binary"&&(s=t),e.close(d),s},writeFile:(w,g,s={})=>{s.flags=s.flags||577;var d=e.open(w,s.flags,s.mode);if(typeof g=="string"){var r=new Uint8Array(Pe(g)+1),i=Xe(g,r,0,r.length);e.write(d,r,0,i,void 0,s.canOwn)}else if(ArrayBuffer.isView(g))e.write(d,g,0,g.byteLength,void 0,s.canOwn);else throw new Error("Unsupported data type");e.close(d)},cwd:()=>e.currentPath,chdir:w=>{var g=e.lookupPath(w,{follow:!0});if(g.node===null)throw new e.ErrnoError(44);if(!e.isDir(g.node.mode))throw new e.ErrnoError(54);var s=e.nodePermissions(g.node,"x");if(s)throw new e.ErrnoError(s);e.currentPath=g.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(g,s,d,r,i)=>r}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var w=eo();e.createDevice("/dev","random",w),e.createDevice("/dev","urandom",w),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var w=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var g=e.createNode(w,"fd",16895,73);return g.node_ops={lookup:(s,d)=>{var r=+d,i=e.getStream(r);if(!i)throw new e.ErrnoError(8);var t={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return t.parent=t,t}},g}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var w=e.open("/dev/stdin",0),g=e.open("/dev/stdout",1),s=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(g,s){this.node=s,this.setErrno=function(d){this.errno=d},this.setErrno(g),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(w=>{e.genericErrors[w]=new e.ErrnoError(w),e.genericErrors[w].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(w,g,s)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=w||l.stdin,l.stdout=g||l.stdout,l.stderr=s||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,kr(0);for(var w=0;w<e.streams.length;w++){var g=e.streams[w];g&&e.close(g)}},getMode:(w,g)=>{var s=0;return w&&(s|=365),g&&(s|=146),s},findObject:(w,g)=>{var s=e.analyzePath(w,g);return s.exists?s.object:null},analyzePath:(w,g)=>{try{var s=e.lookupPath(w,{follow:!g});w=s.path}catch{}var d={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var s=e.lookupPath(w,{parent:!0});d.parentExists=!0,d.parentPath=s.path,d.parentObject=s.node,d.name=U.basename(w),s=e.lookupPath(w,{follow:!g}),d.exists=!0,d.path=s.path,d.object=s.node,d.name=s.node.name,d.isRoot=s.path==="/"}catch(r){d.error=r.errno}return d},createPath:(w,g,s,d)=>{w=typeof w=="string"?w:e.getPath(w);for(var r=g.split("/").reverse();r.length;){var i=r.pop();if(i){var t=U.join2(w,i);try{e.mkdir(t)}catch{}w=t}}return t},createFile:(w,g,s,d,r)=>{var i=U.join2(typeof w=="string"?w:e.getPath(w),g),t=e.getMode(d,r);return e.create(i,t)},createDataFile:(w,g,s,d,r,i)=>{var t=g;w&&(w=typeof w=="string"?w:e.getPath(w),t=g?U.join2(w,g):w);var a=e.getMode(d,r),n=e.create(t,a);if(s){if(typeof s=="string"){for(var f=new Array(s.length),v=0,u=s.length;v<u;++v)f[v]=s.charCodeAt(v);s=f}e.chmod(n,a|146);var o=e.open(n,577);e.write(o,s,0,s.length,0,i),e.close(o),e.chmod(n,a)}return n},createDevice:(w,g,s,d)=>{var r=U.join2(typeof w=="string"?w:e.getPath(w),g),i=e.getMode(!!s,!!d);e.createDevice.major||(e.createDevice.major=64);var t=e.makedev(e.createDevice.major++,0);return e.registerDevice(t,{open:a=>{a.seekable=!1},close:a=>{d&&d.buffer&&d.buffer.length&&d(10)},read:(a,n,f,v,u)=>{for(var o=0,c=0;c<v;c++){var _;try{_=s()}catch{throw new e.ErrnoError(29)}if(_===void 0&&o===0)throw new e.ErrnoError(6);if(_==null)break;o++,n[f+c]=_}return o&&(a.node.timestamp=Date.now()),o},write:(a,n,f,v,u)=>{for(var o=0;o<v;o++)try{d(n[f+o])}catch{throw new e.ErrnoError(29)}return v&&(a.node.timestamp=Date.now()),o}}),e.mkdev(r,i,t)},forceLoadFile:w=>{if(w.isDevice||w.isFolder||w.link||w.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{w.contents=Je(Ye(w.url),!0),w.usedBytes=w.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(w,g,s,d,r)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(c){if(!(c>this.length-1||c<0)){var _=c%this.chunkSize,m=c/this.chunkSize|0;return this.getter(m)[_]}},i.prototype.setDataGetter=function(c){this.getter=c},i.prototype.cacheLength=function(){var c=new XMLHttpRequest;if(c.open("HEAD",s,!1),c.send(null),!(c.status>=200&&c.status<300||c.status===304))throw new Error("Couldn't load "+s+". Status: "+c.status);var _=Number(c.getResponseHeader("Content-length")),m,p=(m=c.getResponseHeader("Accept-Ranges"))&&m==="bytes",y=(m=c.getResponseHeader("Content-Encoding"))&&m==="gzip",E=1024*1024;p||(E=_);var S=(k,D)=>{if(k>D)throw new Error("invalid range ("+k+", "+D+") or no bytes requested!");if(D>_-1)throw new Error("only "+_+" bytes available! programmer error!");var T=new XMLHttpRequest;if(T.open("GET",s,!1),_!==E&&T.setRequestHeader("Range","bytes="+k+"-"+D),T.responseType="arraybuffer",T.overrideMimeType&&T.overrideMimeType("text/plain; charset=x-user-defined"),T.send(null),!(T.status>=200&&T.status<300||T.status===304))throw new Error("Couldn't load "+s+". Status: "+T.status);return T.response!==void 0?new Uint8Array(T.response||[]):Je(T.responseText||"",!0)},b=this;b.setDataGetter(k=>{var D=k*E,T=(k+1)*E-1;if(T=Math.min(T,_-1),typeof b.chunks[k]>"u"&&(b.chunks[k]=S(D,T)),typeof b.chunks[k]>"u")throw new Error("doXHR failed!");return b.chunks[k]}),(y||!_)&&(E=_=1,_=this.getter(0).length,E=_,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=_,this._chunkSize=E,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var t=new i;Object.defineProperties(t,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:t}}else var a={isDevice:!1,url:s};var n=e.createFile(w,g,a,d,r);a.contents?n.contents=a.contents:a.url&&(n.contents=null,n.url=a.url),Object.defineProperties(n,{usedBytes:{get:function(){return this.contents.length}}});var f={},v=Object.keys(n.stream_ops);v.forEach(o=>{var c=n.stream_ops[o];f[o]=function(){return e.forceLoadFile(n),c.apply(null,arguments)}});function u(o,c,_,m,p){var y=o.node.contents;if(p>=y.length)return 0;var E=Math.min(y.length-p,m);if(y.slice)for(var S=0;S<E;S++)c[_+S]=y[p+S];else for(var S=0;S<E;S++)c[_+S]=y.get(p+S);return E}return f.read=(o,c,_,m,p)=>(e.forceLoadFile(n),u(o,c,_,m,p)),f.mmap=(o,c,_,m,p)=>{e.forceLoadFile(n);var y=Rr(c);if(!y)throw new e.ErrnoError(48);return u(o,$,y,c,_),{ptr:y,allocated:!0}},n.stream_ops=f,n},createPreloadedFile:(w,g,s,d,r,i,t,a,n,f)=>{var v=g?ge.resolve(U.join2(w,g)):w,u="cp "+v;function o(c){function _(m){f&&f(),a||e.createDataFile(w,g,m,d,r,n),i&&i(),Ze(u)}Browser.handledByPreloadPlugin(c,v,_,()=>{t&&t(),Ze(u)})||_(c)}vr(u),typeof s=="string"?to(s,c=>o(c),t):o(s)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(w,g,s)=>{g=g||(()=>{}),s=s||(()=>{});var d=e.indexedDB();try{var r=d.open(e.DB_NAME(),e.DB_VERSION)}catch(i){return s(i)}r.onupgradeneeded=()=>{Qe("creating db");var i=r.result;i.createObjectStore(e.DB_STORE_NAME)},r.onsuccess=()=>{var i=r.result,t=i.transaction([e.DB_STORE_NAME],"readwrite"),a=t.objectStore(e.DB_STORE_NAME),n=0,f=0,v=w.length;function u(){f==0?g():s()}w.forEach(o=>{var c=a.put(e.analyzePath(o).object.contents,o);c.onsuccess=()=>{n++,n+f==v&&u()},c.onerror=()=>{f++,n+f==v&&u()}}),t.onerror=s},r.onerror=s},loadFilesFromDB:(w,g,s)=>{g=g||(()=>{}),s=s||(()=>{});var d=e.indexedDB();try{var r=d.open(e.DB_NAME(),e.DB_VERSION)}catch(i){return s(i)}r.onupgradeneeded=s,r.onsuccess=()=>{var i=r.result;try{var t=i.transaction([e.DB_STORE_NAME],"readonly")}catch(o){s(o);return}var a=t.objectStore(e.DB_STORE_NAME),n=0,f=0,v=w.length;function u(){f==0?g():s()}w.forEach(o=>{var c=a.get(o);c.onsuccess=()=>{e.analyzePath(o).exists&&e.unlink(o),e.createDataFile(U.dirname(o),U.basename(o),c.result,!0,!0,!0),n++,n+f==v&&u()},c.onerror=()=>{f++,n+f==v&&u()}}),t.onerror=s},r.onerror=s}},N={DEFAULT_POLLMASK:5,calculateAt:function(w,g,s){if(U.isAbs(g))return g;var d;if(w===-100)d=e.cwd();else{var r=N.getStreamFromFD(w);d=r.path}if(g.length==0){if(!s)throw new e.ErrnoError(44);return d}return U.join2(d,g)},doStat:function(w,g,s){try{var d=w(g)}catch(r){if(r&&r.node&&U.normalize(g)!==U.normalize(e.getPath(r.node)))return-54;throw r}return h[s>>2]=d.dev,h[s+8>>2]=d.ino,h[s+12>>2]=d.mode,H[s+16>>2]=d.nlink,h[s+20>>2]=d.uid,h[s+24>>2]=d.gid,h[s+28>>2]=d.rdev,q=[d.size>>>0,(P=d.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[s+40>>2]=q[0],h[s+44>>2]=q[1],h[s+48>>2]=4096,h[s+52>>2]=d.blocks,q=[Math.floor(d.atime.getTime()/1e3)>>>0,(P=Math.floor(d.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[s+56>>2]=q[0],h[s+60>>2]=q[1],H[s+64>>2]=0,q=[Math.floor(d.mtime.getTime()/1e3)>>>0,(P=Math.floor(d.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[s+72>>2]=q[0],h[s+76>>2]=q[1],H[s+80>>2]=0,q=[Math.floor(d.ctime.getTime()/1e3)>>>0,(P=Math.floor(d.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[s+88>>2]=q[0],h[s+92>>2]=q[1],H[s+96>>2]=0,q=[d.ino>>>0,(P=d.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[s+104>>2]=q[0],h[s+108>>2]=q[1],0},doMsync:function(w,g,s,d,r){if(!e.isFile(g.node.mode))throw new e.ErrnoError(43);if(d&2)return 0;var i=de.slice(w,w+s);e.msync(g,i,r,s,d)},varargs:void 0,get:function(){N.varargs+=4;var w=h[N.varargs-4>>2];return w},getStr:function(w){var g=ne(w);return g},getStreamFromFD:function(w){var g=e.getStream(w);if(!g)throw new e.ErrnoError(8);return g}};function no(w,g,s,d,r){try{for(var i=0,t=g?h[g>>2]:0,a=g?h[g+4>>2]:0,n=s?h[s>>2]:0,f=s?h[s+4>>2]:0,v=d?h[d>>2]:0,u=d?h[d+4>>2]:0,o=0,c=0,_=0,m=0,p=0,y=0,E=(g?h[g>>2]:0)|(s?h[s>>2]:0)|(d?h[d>>2]:0),S=(g?h[g+4>>2]:0)|(s?h[s+4>>2]:0)|(d?h[d+4>>2]:0),b=function(A,I,z,K){return A<32?I&K:z&K},k=0;k<w;k++){var D=1<<k%32;if(b(k,E,S,D)){var T=N.getStreamFromFD(k),C=N.DEFAULT_POLLMASK;T.stream_ops?.poll&&(C=T.stream_ops.poll(T)),C&1&&b(k,t,a,D)&&(k<32?o=o|D:c=c|D,i++),C&4&&b(k,n,f,D)&&(k<32?_=_|D:m=m|D,i++),C&2&&b(k,v,u,D)&&(k<32?p=p|D:y=y|D,i++)}}return g&&(h[g>>2]=o,h[g+4>>2]=c),s&&(h[s>>2]=_,h[s+4>>2]=m),d&&(h[d>>2]=p,h[d+4>>2]=y),i}catch(A){if(typeof e>"u"||!(A instanceof e.ErrnoError))throw A;return-A.errno}}var j={mount:function(w){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(g,s){return typeof s=="function"&&(this._callbacks[g]=s),this},l.websocket.emit=function(g,s){typeof this._callbacks[g]=="function"&&this._callbacks[g].call(this,s)},e.createNode(null,"/",16895,0)},createSocket:function(w,g,s){g&=-526337;var d=g==1;if(d&&s&&s!=6)throw new e.ErrnoError(66);var r={family:w,type:g,protocol:s,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},i=j.nextname(),t=e.createNode(j.root,i,49152,0);t.sock=r;var a=e.createStream({path:i,node:t,flags:2,seekable:!1,stream_ops:j.stream_ops});return r.stream=a,r},getSocket:function(w){var g=e.getStream(w);return!g||!e.isSocket(g.node.mode)?null:g.node.sock},stream_ops:{poll:function(w){var g=w.node.sock;return g.sock_ops.poll(g)},ioctl:function(w,g,s){var d=w.node.sock;return d.sock_ops.ioctl(d,g,s)},read:function(w,g,s,d,r){var i=w.node.sock,t=i.sock_ops.recvmsg(i,d);return t?(g.set(t.buffer,s),t.buffer.length):0},write:function(w,g,s,d,r){var i=w.node.sock;return i.sock_ops.sendmsg(i,g,s,d)},close:function(w){var g=w.node.sock;g.sock_ops.close(g)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(w,g,s){var d;if(typeof g=="object"&&(d=g,g=null,s=null),d)if(d._socket)g=d._socket.remoteAddress,s=d._socket.remotePort;else{var r=/ws[s]?:\/\/([^:]+):(\d+)/.exec(d.url);if(!r)throw new Error("WebSocket URL must be in the format ws(s)://address:port");g=r[1],s=parseInt(r[2],10)}else try{var i=l.websocket&&typeof l.websocket=="object",t="ws:#".replace("#","//");if(i&&(typeof l.websocket.url=="function"?t=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(t=l.websocket.url)),t==="ws://"||t==="wss://"){var a=g.split("/");t=t+a[0]+":"+s+"/"+a.slice(1).join("/")}var n="binary";i&&typeof l.websocket.subprotocol=="string"&&(n=l.websocket.subprotocol);var f=void 0;n!=="null"&&(n=n.replace(/^ +| +$/g,"").split(/ *, */),f=n),i&&l.websocket.subprotocol===null&&(n="null",f=void 0);var v;Z?v=Fn():v=WebSocket,l.websocket.decorator&&(v=l.websocket.decorator(v)),d=new v(t,f),d.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var u={addr:g,port:s,socket:d,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(w,u),j.websocket_sock_ops.handlePeerEvents(w,u),w.type===2&&typeof w.sport<"u"&&u.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(w.sport&65280)>>8,w.sport&255])),u},getPeer:function(w,g,s){return w.peers[g+":"+s]},addPeer:function(w,g){w.peers[g.addr+":"+g.port]=g},removePeer:function(w,g){delete w.peers[g.addr+":"+g.port]},handlePeerEvents:function(w,g){var s=!0,d=function(){l.websocket.emit("open",w.stream.fd);try{for(var i=g.dgram_send_queue.shift();i;)g.socket.send(i),i=g.dgram_send_queue.shift()}catch{g.socket.close()}};function r(i){if(typeof i=="string"){var t=new TextEncoder;i=t.encode(i)}else{if(Ne(i.byteLength!==void 0),i.byteLength==0)return;i=new Uint8Array(i)}var a=s;if(s=!1,a&&i.length===10&&i[0]===255&&i[1]===255&&i[2]===255&&i[3]===255&&i[4]==="p".charCodeAt(0)&&i[5]==="o".charCodeAt(0)&&i[6]==="r".charCodeAt(0)&&i[7]==="t".charCodeAt(0)){var n=i[8]<<8|i[9];j.websocket_sock_ops.removePeer(w,g),g.port=n,j.websocket_sock_ops.addPeer(w,g);return}w.recv_queue.push({addr:g.addr,port:g.port,data:i}),l.websocket.emit("message",w.stream.fd)}Z?(g.socket.on("open",d),g.socket.on("message",function(i,t){t&&r(new Uint8Array(i).buffer)}),g.socket.on("close",function(){l.websocket.emit("close",w.stream.fd)}),g.socket.on("error",function(i){w.error=14,l.websocket.emit("error",[w.stream.fd,w.error,"ECONNREFUSED: Connection refused"])})):(g.socket.onopen=d,g.socket.onclose=function(){l.websocket.emit("close",w.stream.fd)},g.socket.onmessage=function(t){r(t.data)},g.socket.onerror=function(i){w.error=14,l.websocket.emit("error",[w.stream.fd,w.error,"ECONNREFUSED: Connection refused"])})},poll:function(w){if(w.type===1&&w.server)return w.pending.length?65:0;var g=0,s=w.type===1?j.websocket_sock_ops.getPeer(w,w.daddr,w.dport):null;return(w.recv_queue.length||!s||s&&s.socket.readyState===s.socket.CLOSING||s&&s.socket.readyState===s.socket.CLOSED)&&(g|=65),(!s||s&&s.socket.readyState===s.socket.OPEN)&&(g|=4),(s&&s.socket.readyState===s.socket.CLOSING||s&&s.socket.readyState===s.socket.CLOSED)&&(g|=16),g},ioctl:function(w,g,s){switch(g){case 21531:var d=0;return w.recv_queue.length&&(d=w.recv_queue[0].data.length),h[s>>2]=d,0;default:return 28}},close:function(w){if(w.server){try{w.server.close()}catch{}w.server=null}for(var g=Object.keys(w.peers),s=0;s<g.length;s++){var d=w.peers[g[s]];try{d.socket.close()}catch{}j.websocket_sock_ops.removePeer(w,d)}return 0},bind:function(w,g,s){if(typeof w.saddr<"u"||typeof w.sport<"u")throw new e.ErrnoError(28);if(w.saddr=g,w.sport=s,w.type===2){w.server&&(w.server.close(),w.server=null);try{w.sock_ops.listen(w,0)}catch(d){if(!(d instanceof e.ErrnoError)||d.errno!==138)throw d}}},connect:function(w,g,s){if(w.server)throw new e.ErrnoError(138);if(typeof w.daddr<"u"&&typeof w.dport<"u"){var d=j.websocket_sock_ops.getPeer(w,w.daddr,w.dport);if(d)throw d.socket.readyState===d.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var r=j.websocket_sock_ops.createPeer(w,g,s);throw w.daddr=r.addr,w.dport=r.port,new e.ErrnoError(26)},listen:function(w,g){if(!Z)throw new e.ErrnoError(138);if(w.server)throw new e.ErrnoError(28);var s=Fn().Server,d=w.saddr;l.websocket.serverDecorator&&(s=l.websocket.serverDecorator(s)),w.server=new s({host:d,port:w.sport}),l.websocket.emit("listen",w.stream.fd),w.server.on("connection",function(r){if(w.type===1){var i=j.createSocket(w.family,w.type,w.protocol),t=j.websocket_sock_ops.createPeer(i,r);i.daddr=t.addr,i.dport=t.port,w.pending.push(i),l.websocket.emit("connection",i.stream.fd)}else j.websocket_sock_ops.createPeer(w,r),l.websocket.emit("connection",w.stream.fd)}),w.server.on("close",function(){l.websocket.emit("close",w.stream.fd),w.server=null}),w.server.on("error",function(r){w.error=23,l.websocket.emit("error",[w.stream.fd,w.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(w){if(!w.server||!w.pending.length)throw new e.ErrnoError(28);var g=w.pending.shift();return g.stream.flags=w.stream.flags,g},getname:function(w,g){var s,d;if(g){if(w.daddr===void 0||w.dport===void 0)throw new e.ErrnoError(53);s=w.daddr,d=w.dport}else s=w.saddr||0,d=w.sport||0;return{addr:s,port:d}},sendmsg:function(w,g,s,d,r,i){if(w.type===2){if((r===void 0||i===void 0)&&(r=w.daddr,i=w.dport),r===void 0||i===void 0)throw new e.ErrnoError(17)}else r=w.daddr,i=w.dport;var t=j.websocket_sock_ops.getPeer(w,r,i);if(w.type===1){if(!t||t.socket.readyState===t.socket.CLOSING||t.socket.readyState===t.socket.CLOSED)throw new e.ErrnoError(53);if(t.socket.readyState===t.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(g)&&(s+=g.byteOffset,g=g.buffer);var a;if(a=g.slice(s,s+d),w.type===2&&(!t||t.socket.readyState!==t.socket.OPEN))return(!t||t.socket.readyState===t.socket.CLOSING||t.socket.readyState===t.socket.CLOSED)&&(t=j.websocket_sock_ops.createPeer(w,r,i)),t.dgram_send_queue.push(a),d;try{return t.socket.send(a),d}catch{throw new e.ErrnoError(28)}},recvmsg:function(w,g,s){if(w.type===1&&w.server)throw new e.ErrnoError(53);var d=w.recv_queue.shift();if(!d){if(w.type===1){var r=j.websocket_sock_ops.getPeer(w,w.daddr,w.dport);if(!r)throw new e.ErrnoError(53);if(r.socket.readyState===r.socket.CLOSING||r.socket.readyState===r.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var i=d.data.byteLength||d.data.length,t=d.data.byteOffset||0,a=d.data.buffer||d.data,n=Math.min(g,i),f={buffer:new Uint8Array(a,t,n),addr:d.addr,port:d.port};if(s&2&&(n=0),w.type===1&&n<i){var v=i-n;d.data=new Uint8Array(a,t+n,v),w.recv_queue.unshift(d)}return f}}};function ve(w){var g=j.getSocket(w);if(!g)throw new e.ErrnoError(8);return g}function Kt(w){return h[sn()>>2]=w,w}function lr(w){for(var g=w.split("."),s=0;s<4;s++){var d=Number(g[s]);if(isNaN(d))return null;g[s]=d}return(g[0]|g[1]<<8|g[2]<<16|g[3]<<24)>>>0}function Q(w){return parseInt(w)}function Hr(w){var g,s,d,r,i=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,t=[];if(!i.test(w))return null;if(w==="::")return[0,0,0,0,0,0,0,0];for(w.startsWith("::")?w=w.replace("::","Z:"):w=w.replace("::",":Z:"),w.indexOf(".")>0?(w=w.replace(new RegExp("[.]","g"),":"),g=w.split(":"),g[g.length-4]=Q(g[g.length-4])+Q(g[g.length-3])*256,g[g.length-3]=Q(g[g.length-2])+Q(g[g.length-1])*256,g=g.slice(0,g.length-2)):g=w.split(":"),d=0,r=0,s=0;s<g.length;s++)if(typeof g[s]=="string")if(g[s]==="Z"){for(r=0;r<8-g.length+1;r++)t[s+r]=0;d=r-1}else t[s+d]=Zr(parseInt(g[s],16));else t[s+d]=g[s];return[t[1]<<16|t[0],t[3]<<16|t[2],t[5]<<16|t[4],t[7]<<16|t[6]]}function rr(w,g,s,d,r){switch(g){case 2:s=lr(s),Pr(w,16),r&&(h[r>>2]=16),Ee[w>>1]=g,h[w+4>>2]=s,Ee[w+2>>1]=Zr(d);break;case 10:s=Hr(s),Pr(w,28),r&&(h[r>>2]=28),h[w>>2]=g,h[w+8>>2]=s[0],h[w+12>>2]=s[1],h[w+16>>2]=s[2],h[w+20>>2]=s[3],Ee[w+2>>1]=Zr(d);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(w){var g=lr(w);if(g!==null||(g=Hr(w),g!==null))return w;var s;if(ee.address_map.addrs[w])s=ee.address_map.addrs[w];else{var d=ee.address_map.id++;Ne(d<65535,"exceeded max address mappings of 65535"),s="172.29."+(d&255)+"."+(d&65280),ee.address_map.names[s]=w,ee.address_map.addrs[w]=s}return s},lookup_addr:function(w){return ee.address_map.names[w]?ee.address_map.names[w]:null}};function oo(w,g,s,d){try{var r=ve(w),i=r.sock_ops.accept(r);if(g)var t=rr(g,i.family,ee.lookup_name(i.daddr),i.dport,s);return i.stream.fd}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Or(w){return(w&255)+"."+(w>>8&255)+"."+(w>>16&255)+"."+(w>>24&255)}function en(w){var g="",s=0,d=0,r=0,i=0,t=0,a=0,n=[w[0]&65535,w[0]>>16,w[1]&65535,w[1]>>16,w[2]&65535,w[2]>>16,w[3]&65535,w[3]>>16],f=!0,v="";for(a=0;a<5;a++)if(n[a]!==0){f=!1;break}if(f){if(v=Or(n[6]|n[7]<<16),n[5]===-1)return g="::ffff:",g+=v,g;if(n[5]===0)return g="::",v==="0.0.0.0"&&(v=""),v==="0.0.0.1"&&(v="1"),g+=v,g}for(s=0;s<8;s++)n[s]===0&&(s-r>1&&(t=0),r=s,t++),t>d&&(d=t,i=s-d+1);for(s=0;s<8;s++){if(d>1&&n[s]===0&&s>=i&&s<i+d){s===i&&(g+=":",i===0&&(g+=":"));continue}g+=Number(qt(n[s]&65535)).toString(16),g+=s<7?":":""}return g}function wt(w,g){var s=Ee[w>>1],d=qt(st[w+2>>1]),r;switch(s){case 2:if(g!==16)return{errno:28};r=h[w+4>>2],r=Or(r);break;case 10:if(g!==28)return{errno:28};r=[h[w+8>>2],h[w+12>>2],h[w+16>>2],h[w+20>>2]],r=en(r);break;default:return{errno:5}}return{family:s,addr:r,port:d}}function Mr(w,g,s){if(s&&w===0)return null;var d=wt(w,g);if(d.errno)throw new e.ErrnoError(d.errno);return d.addr=ee.lookup_addr(d.addr)||d.addr,d}function io(w,g,s){try{var d=ve(w),r=Mr(g,s);return d.sock_ops.bind(d,r.addr,r.port),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function ao(w){try{return w=N.getStr(w),e.chdir(w),0}catch(g){if(typeof e>"u"||!(g instanceof e.ErrnoError))throw g;return-g.errno}}function so(w,g){try{return w=N.getStr(w),e.chmod(w,g),0}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return-s.errno}}function uo(w,g,s){try{var d=ve(w),r=Mr(g,s);return d.sock_ops.connect(d,r.addr,r.port),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function fo(w){try{var g=N.getStreamFromFD(w);return e.createStream(g,0).fd}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return-s.errno}}function co(w,g,s){try{var d=N.getStreamFromFD(w);if(d.fd===g)return-28;var r=e.getStream(g);return r&&e.close(r),e.createStream(d,g,g+1).fd}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function lo(w,g,s,d){try{if(g=N.getStr(g),g=N.calculateAt(w,g),s&-8)return-28;var r=e.lookupPath(g,{follow:!0}),i=r.node;if(!i)return-44;var t="";return s&4&&(t+="r"),s&2&&(t+="w"),s&1&&(t+="x"),t&&e.nodePermissions(i,t)?-2:0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Xr(w,g){try{return e.fchmod(w,g),0}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return-s.errno}}function _o(w,g,s){try{return e.fchown(w,g,s),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function vo(w,g,s,d,r){try{g=N.getStr(g);var i=r&256;return r=r&-257,g=N.calculateAt(w,g),(i?e.lchown:e.chown)(g,s,d),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function mo(w,g,s){N.varargs=s;try{var d=N.getStreamFromFD(w);switch(g){case 0:{var r=N.get();if(r<0)return-28;var i;return i=e.createStream(d,r),i.fd}case 1:case 2:return 0;case 3:return d.flags;case 4:{var r=N.get();return d.flags|=r,0}case 5:{var r=N.get(),t=0;return Ee[r+t>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function po(w,g){try{var s=N.getStreamFromFD(w);return N.doStat(e.stat,s.path,g)}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function rn(w,g){return g+2097152>>>0<4194305-!!w?(w>>>0)+g*4294967296:NaN}function ho(w,g,s){try{var d=rn(g,s);return isNaN(d)?-61:(e.ftruncate(w,d),0)}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function yo(w,g){try{if(g===0)return-28;var s=e.cwd(),d=Pe(s)+1;return g<d?-68:(Ae(s,w,g),d)}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function wo(w,g,s){try{var d=N.getStreamFromFD(w);d.getdents||(d.getdents=e.readdir(d.path));for(var r=280,i=0,t=e.llseek(d,0,1),a=Math.floor(t/r);a<d.getdents.length&&i+r<=s;){var n,f,v=d.getdents[a];if(v===".")n=d.node.id,f=4;else if(v===".."){var u=e.lookupPath(d.path,{parent:!0});n=u.node.id,f=4}else{var o=e.lookupNode(d.node,v);n=o.id,f=e.isChrdev(o.mode)?2:e.isDir(o.mode)?4:e.isLink(o.mode)?10:8}q=[n>>>0,(P=n,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[g+i>>2]=q[0],h[g+i+4>>2]=q[1],q=[(a+1)*r>>>0,(P=(a+1)*r,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[g+i+8>>2]=q[0],h[g+i+12>>2]=q[1],Ee[g+i+16>>1]=280,$[g+i+18>>0]=f,Ae(v,g+i+19,256),i+=r,a+=1}return e.llseek(d,a*r,0),i}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Eo(w,g,s){try{var d=ve(w);if(!d.daddr)return-53;var r=rr(g,d.family,ee.lookup_name(d.daddr),d.dport,s);return 0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function go(w,g,s){try{ce("__syscall_getsockname "+w);var d=ve(w),r=rr(g,d.family,ee.lookup_name(d.saddr||"0.0.0.0"),d.sport,s);return 0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function So(w,g,s,d,r){try{var i=ve(w);return g===1&&s===4?(h[d>>2]=i.error,h[r>>2]=4,i.error=null,0):-50}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function bo(w,g,s){N.varargs=s;try{var d=N.getStreamFromFD(w);switch(g){case 21509:case 21505:return d.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.tty?0:-59;case 21519:{if(!d.tty)return-59;var r=N.get();return h[r>>2]=0,0}case 21520:return d.tty?-28:-59;case 21531:{var r=N.get();return e.ioctl(d,g,r)}case 21523:return d.tty?0:-59;case 21524:return d.tty?0:-59;default:return-28}}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function ko(w,g){try{var s=ve(w);return s.sock_ops.listen(s,g),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function Do(w,g){try{return w=N.getStr(w),N.doStat(e.lstat,w,g)}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return-s.errno}}function Oo(w,g,s){try{return g=N.getStr(g),g=N.calculateAt(w,g),g=U.normalize(g),g[g.length-1]==="/"&&(g=g.substr(0,g.length-1)),e.mkdir(g,s,0),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function No(w,g,s,d){try{g=N.getStr(g);var r=d&256,i=d&4096;return d=d&-4353,g=N.calculateAt(w,g,i),N.doStat(r?e.lstat:e.stat,g,s)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function To(w,g,s,d){N.varargs=d;try{g=N.getStr(g),g=N.calculateAt(w,g);var r=d?N.get():0;return e.open(g,s,r).fd}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}var se={BUCKET_BUFFER_SIZE:8192,mount:function(w){return e.createNode(null,"/",16895,0)},createPipe:function(){var w={buckets:[],refcnt:2};w.buckets.push({buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var g=se.nextname(),s=se.nextname(),d=e.createNode(se.root,g,4096,0),r=e.createNode(se.root,s,4096,0);d.pipe=w,r.pipe=w;var i=e.createStream({path:g,node:d,flags:0,seekable:!1,stream_ops:se.stream_ops});d.stream=i;var t=e.createStream({path:s,node:r,flags:1,seekable:!1,stream_ops:se.stream_ops});return r.stream=t,{readable_fd:i.fd,writable_fd:t.fd}},stream_ops:{poll:function(w){var g=w.node.pipe;if((w.flags&2097155)===1)return 260;if(g.buckets.length>0)for(var s=0;s<g.buckets.length;s++){var d=g.buckets[s];if(d.offset-d.roffset>0)return 65}return 0},ioctl:function(w,g,s){return 28},fsync:function(w){return 28},read:function(w,g,s,d,r){for(var i=w.node.pipe,t=0,a=0;a<i.buckets.length;a++){var n=i.buckets[a];t+=n.offset-n.roffset}Ne(g instanceof ArrayBuffer||ArrayBuffer.isView(g));var f=g.subarray(s,s+d);if(d<=0)return 0;if(t==0)throw new e.ErrnoError(6);for(var v=Math.min(t,d),u=v,o=0,a=0;a<i.buckets.length;a++){var c=i.buckets[a],_=c.offset-c.roffset;if(v<=_){var m=c.buffer.subarray(c.roffset,c.offset);v<_?(m=m.subarray(0,v),c.roffset+=v):o++,f.set(m);break}else{var m=c.buffer.subarray(c.roffset,c.offset);f.set(m),f=f.subarray(m.byteLength),v-=m.byteLength,o++}}return o&&o==i.buckets.length&&(o--,i.buckets[o].offset=0,i.buckets[o].roffset=0),i.buckets.splice(0,o),u},write:function(w,g,s,d,r){var i=w.node.pipe;Ne(g instanceof ArrayBuffer||ArrayBuffer.isView(g));var t=g.subarray(s,s+d),a=t.byteLength;if(a<=0)return 0;var n=null;i.buckets.length==0?(n={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0},i.buckets.push(n)):n=i.buckets[i.buckets.length-1],Ne(n.offset<=se.BUCKET_BUFFER_SIZE);var f=se.BUCKET_BUFFER_SIZE-n.offset;if(f>=a)return n.buffer.set(t,n.offset),n.offset+=a,a;f>0&&(n.buffer.set(t.subarray(0,f),n.offset),n.offset+=f,t=t.subarray(f,t.byteLength));for(var v=t.byteLength/se.BUCKET_BUFFER_SIZE|0,u=t.byteLength%se.BUCKET_BUFFER_SIZE,o=0;o<v;o++){var c={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:se.BUCKET_BUFFER_SIZE,roffset:0};i.buckets.push(c),c.buffer.set(t.subarray(0,se.BUCKET_BUFFER_SIZE)),t=t.subarray(se.BUCKET_BUFFER_SIZE,t.byteLength)}if(u>0){var c={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:t.byteLength,roffset:0};i.buckets.push(c),c.buffer.set(t)}return a},close:function(w){var g=w.node.pipe;g.refcnt--,g.refcnt===0&&(g.buckets=null)}},nextname:function(){return se.nextname.current||(se.nextname.current=0),"pipe["+se.nextname.current+++"]"}};function Co(w){try{if(w==0)throw new e.ErrnoError(21);var g=se.createPipe();return h[w>>2]=g.readable_fd,h[w+4>>2]=g.writable_fd,0}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return-s.errno}}function pe(w,g,s){try{for(var d=0,r=0;r<g;r++){var i=w+8*r,t=h[i>>2],a=Ee[i+4>>1],n=32,f=e.getStream(t);f&&(n=N.DEFAULT_POLLMASK,f.stream_ops?.poll&&(n=f.stream_ops.poll(f))),n&=a|8|16,n&&d++,Ee[i+6>>1]=n}return d}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Fo(w,g,s,d){try{if(g=N.getStr(g),g=N.calculateAt(w,g),d<=0)return-28;var r=e.readlink(g),i=Math.min(d,Pe(r)),t=$[s+i];return Ae(r,s,d+1),$[s+i]=t,i}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Ao(w,g,s,d,r,i){try{var t=ve(w),a=t.sock_ops.recvmsg(t,s,typeof d<"u"?d:0);if(!a)return 0;if(r)var n=rr(r,t.family,ee.lookup_name(a.addr),a.port,i);return de.set(a.buffer,g),a.buffer.byteLength}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Po(w,g,s,d){try{return g=N.getStr(g),d=N.getStr(d),g=N.calculateAt(w,g),d=N.calculateAt(s,d),e.rename(g,d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function Ro(w){try{return w=N.getStr(w),e.rmdir(w),0}catch(g){if(typeof e>"u"||!(g instanceof e.ErrnoError))throw g;return-g.errno}}function Mo(w,g,s,d,r,i){try{var t=ve(w),a=Mr(r,i,!0);return a?t.sock_ops.sendmsg(t,$,g,s,a.addr,a.port):e.write(t.stream,$,g,s)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function Lo(w,g,s){try{var d=j.createSocket(w,g,s);return d.stream.fd}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function Io(w,g){try{return w=N.getStr(w),N.doStat(e.stat,w,g)}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return-s.errno}}function Uo(w,g,s){try{return w=N.getStr(w),h[s+4>>2]=4096,h[s+40>>2]=4096,h[s+8>>2]=1e6,h[s+12>>2]=5e5,h[s+16>>2]=5e5,h[s+20>>2]=e.nextInode,h[s+24>>2]=1e6,h[s+28>>2]=42,h[s+44>>2]=2,h[s+36>>2]=255,0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function Bo(w,g){try{return w=N.getStr(w),g=N.getStr(g),e.symlink(w,g),0}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return-s.errno}}function xo(w,g,s){try{return g=N.getStr(g),g=N.calculateAt(w,g),s===0?e.unlink(g):s===512?e.rmdir(g):ue("Invalid flags passed to unlinkat"),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function Br(w){return H[w>>2]+h[w+4>>2]*4294967296}function Ho(w,g,s,d){try{if(g=N.getStr(g),g=N.calculateAt(w,g,!0),s){var t=Br(s),a=h[s+8>>2];r=t*1e3+a/(1e3*1e3),s+=16,t=Br(s),a=h[s+8>>2],i=t*1e3+a/(1e3*1e3)}else var r=Date.now(),i=r;return e.utime(g,r,i),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function $r(w){}var tn="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function zo(w,g){ue(tn)}function _n(w,g){ue(tn)}var Wo=!0;function jo(){return Wo}function Yo(){throw 1/0}function qo(w,g){var s=new Date(Br(w)*1e3);h[g>>2]=s.getUTCSeconds(),h[g+4>>2]=s.getUTCMinutes(),h[g+8>>2]=s.getUTCHours(),h[g+12>>2]=s.getUTCDate(),h[g+16>>2]=s.getUTCMonth(),h[g+20>>2]=s.getUTCFullYear()-1900,h[g+24>>2]=s.getUTCDay();var d=Date.UTC(s.getUTCFullYear(),0,1,0,0,0,0),r=(s.getTime()-d)/(1e3*60*60*24)|0;h[g+28>>2]=r}function Vo(w,g){var s=new Date(Br(w)*1e3);h[g>>2]=s.getSeconds(),h[g+4>>2]=s.getMinutes(),h[g+8>>2]=s.getHours(),h[g+12>>2]=s.getDate(),h[g+16>>2]=s.getMonth(),h[g+20>>2]=s.getFullYear()-1900,h[g+24>>2]=s.getDay();var d=new Date(s.getFullYear(),0,1),r=(s.getTime()-d.getTime())/(1e3*60*60*24)|0;h[g+28>>2]=r,h[g+36>>2]=-(s.getTimezoneOffset()*60);var i=new Date(s.getFullYear(),6,1).getTimezoneOffset(),t=d.getTimezoneOffset(),a=(i!=t&&s.getTimezoneOffset()==Math.min(t,i))|0;h[g+32>>2]=a}function Ko(w){var g=new Date(h[w+20>>2]+1900,h[w+16>>2],h[w+12>>2],h[w+8>>2],h[w+4>>2],h[w>>2],0),s=h[w+32>>2],d=g.getTimezoneOffset(),r=new Date(g.getFullYear(),0,1),i=new Date(g.getFullYear(),6,1).getTimezoneOffset(),t=r.getTimezoneOffset(),a=Math.min(t,i);if(s<0)h[w+32>>2]=+(i!=t&&a==d);else if(s>0!=(a==d)){var n=Math.max(t,i),f=s>0?a:n;g.setTime(g.getTime()+(f-d)*6e4)}h[w+24>>2]=g.getDay();var v=(g.getTime()-r.getTime())/(1e3*60*60*24)|0;return h[w+28>>2]=v,h[w>>2]=g.getSeconds(),h[w+4>>2]=g.getMinutes(),h[w+8>>2]=g.getHours(),h[w+12>>2]=g.getDate(),h[w+16>>2]=g.getMonth(),h[w+20>>2]=g.getYear(),g.getTime()/1e3|0}function Go(w,g,s,d,r,i){try{var t=N.getStreamFromFD(d),a=e.mmap(t,w,r,g,s),n=a.ptr;return h[i>>2]=a.allocated,n}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Xo(w,g,s,d,r,i){try{var t=N.getStreamFromFD(r);s&2&&N.doMsync(w,t,g,d,i),e.munmap(t)}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function nn(w){var g=Pe(w)+1,s=sr(g);return s&&Xe(w,$,s,g),s}function $o(w,g,s){var d=new Date().getFullYear(),r=new Date(d,0,1),i=new Date(d,6,1),t=r.getTimezoneOffset(),a=i.getTimezoneOffset(),n=Math.max(t,a);h[w>>2]=n*60,h[g>>2]=+(t!=a);function f(_){var m=_.toTimeString().match(/\(([A-Za-z ]+)\)$/);return m?m[1]:"GMT"}var v=f(r),u=f(i),o=nn(v),c=nn(u);a<t?(H[s>>2]=o,H[s+4>>2]=c):(H[s>>2]=c,H[s+4>>2]=o)}function zr(w,g,s){zr.called||(zr.called=!0,$o(w,g,s))}function Zo(){ue("")}function It(){return Date.now()}function on(){return 2147483648}function Jo(){return on()}var Wr;Z?Wr=()=>{var w=process.hrtime();return w[0]*1e3+w[1]/1e6}:Wr=()=>performance.now();function Qo(w,g,s){de.copyWithin(w,g,g+s)}function Ut(w){try{return or.grow(w-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ei(w){var g=de.length;w=w>>>0;var s=on();if(w>s)return!1;let d=(n,f)=>n+(f-n%f)%f;for(var r=1;r<=4;r*=2){var i=g*(1+.2/r);i=Math.min(i,w+100663296);var t=Math.min(s,d(Math.max(w,i),65536)),a=Ut(t);if(a)return!0}return!1}function wn(w){Ge=w,_r()||(l.onExit&&l.onExit(w),Ce=!0),te(w,new mr(w))}function ri(w,g){Ge=w,_r()||Yn(),wn(w)}var Et=ri;function ti(){if(!_r())try{Et(Ge)}catch(w){pt(w)}}function gt(w){if(!(_t||Ce))try{w(),ti()}catch(g){pt(g)}}function et(){Fr+=1}function jr(){Fr-=1}function Bt(w,g){return et(),setTimeout(function(){jr(),gt(w)},g)}function xt(w){return X.handleSleep(g=>Bt(g,w))}var rt=O.ENV||{};function ni(){return J||"./this.program"}function dr(){if(!dr.strings){var w=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",g={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:w,_:ni()};for(var s in rt)rt[s]===void 0?delete g[s]:g[s]=rt[s];var d=[];for(var s in g)d.push(s+"="+g[s]);dr.strings=d}return dr.strings}function tt(w,g,s){for(var d=0;d<w.length;++d)$[g++>>0]=w.charCodeAt(d);s||($[g>>0]=0)}function Ir(w,g){var s=0;return dr().forEach(function(d,r){var i=g+s;H[w+r*4>>2]=i,tt(d,i),s+=d.length+1}),0}function Ht(w,g){var s=dr();H[w>>2]=s.length;var d=0;return s.forEach(function(r){d+=r.length+1}),H[g>>2]=d,0}function oi(w){try{var g=N.getStreamFromFD(w);return e.close(g),0}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return s.errno}}function ii(w,g){try{var s=N.getStreamFromFD(w),d=s.tty?2:e.isDir(s.mode)?3:e.isLink(s.mode)?7:4;return $[g>>0]=d,0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return r.errno}}function ai(w,g,s,d){for(var r=0,i=0;i<s;i++){var t=H[g>>2],a=H[g+4>>2];g+=8;var n=e.read(w,$,t,a,d);if(n<0)return-1;if(r+=n,n<a)break}return r}function si(w,g,s,d){try{var r=N.getStreamFromFD(w),i=ai(r,g,s);return H[d>>2]=i,0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function ui(w,g,s,d,r){try{var i=rn(g,s);if(isNaN(i))return 61;var t=N.getStreamFromFD(w);return e.llseek(t,i,d),q=[t.position>>>0,(P=t.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r>>2]=q[0],h[r+4>>2]=q[1],t.getdents&&i===0&&d===0&&(t.getdents=null),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return a.errno}}function fi(w){try{var g=N.getStreamFromFD(w);return X.handleSleep(function(s){var d=g.node.mount;if(!d.type.syncfs){s(0);return}d.type.syncfs(d,!1,function(r){if(r){s(function(){return 29});return}s(0)})})}catch(s){if(typeof e>"u"||!(s instanceof e.ErrnoError))throw s;return s.errno}}function ci(w,g,s,d){for(var r=0,i=0;i<s;i++){var t=H[g>>2],a=H[g+4>>2];g+=8;var n=e.write(w,$,t,a,d);if(n<0)return-1;r+=n}return r}function li(w,g,s,d){try{var r=N.getStreamFromFD(w),i=ci(r,g,s);return H[d>>2]=i,0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function vn(w){var g=sr(20),s=sr(w.length+1);Ae(w,s,w.length+1),H[g>>2]=s;var d=sr(4);H[d>>2]=0,H[g+4>>2]=d;var r=2;h[g+8>>2]=r,h[g+12>>2]=4;var i=sr(12);return H[i>>2]=i+8,H[i+4>>2]=0,h[i+8>>2]=lr(ee.lookup_name(w)),H[g+16>>2]=i,g}function An(w,g,s){if(s!==2)return Kt(5),null;w=h[w>>2];var d=Or(w),r=ee.lookup_addr(d);return r&&(d=r),vn(d)}function Dn(w){return vn(ne(w))}function di(w,g,s,d,r,i){var t=Dn(w);return Qt(g,t,20),er(t),h[i>>2]=0,H[r>>2]=g,0}function _i(w,g){for(var s=Math.min(g,3),d=8,r=0;r<s;r++)ut[w+r*d>>3]=.1;return s}function En(w,g,s,d,r,i,t){var a=wt(w,g);if(a.errno)return-6;var n=a.port,f=a.addr,v=!1;if(s&&d){var u;if(t&1||!(u=ee.lookup_addr(f))){if(t&8)return-2}else f=u;var o=Ae(f,s,d);o+1>=d&&(v=!0)}if(r&&i){n=""+n;var o=Ae(n,r,i);o+1>=i&&(v=!0)}return v?-12:0}var Jr={list:[],map:{}};function St(w){function g(i,t,a){var n=sr(i.length+1);tt(i,n);for(var f=0,v=a.length,u=sr((v+1)*4),o=0;o<v;o++,f+=4){var c=a[o],_=sr(c.length+1);tt(c,_),H[u+f>>2]=_}H[u+f>>2]=0;var m=sr(12);return H[m>>2]=n,H[m+4>>2]=u,h[m+8>>2]=t,m}var s=Jr.list,d=Jr.map;if(s.length===0){var r=g("tcp",6,["TCP"]);s.push(r),d.tcp=d[6]=r,r=g("udp",17,["UDP"]),s.push(r),d.udp=d[17]=r}St.index=0}function zt(w){w=ne(w),St(!0);var g=Jr.map[w];return g}function Wt(w){St(!0);var g=Jr.map[w];return g}function br(w){var g=Pe(w)+1,s=tr(g);return Xe(w,$,s,g),s}var je={getAllWebSockets:function(w){let g=new Set;w.server&&w.server.clients.forEach(s=>{g.add(s)});for(let s of je.getAllPeers(w))g.add(s.socket);return Array.from(g)},getAllPeers:function(w){let g=new Set;if(w.server&&w.pending.filter(s=>s.peers).forEach(s=>{for(let d of Object.values(s.peers))g.add(d)}),w.peers)for(let s of Object.values(w.peers))g.add(s);return Array.from(g)},awaitData:function(w){return je.awaitWsEvent(w,"message")},awaitConnection:function(w){return w.OPEN===w.readyState?[Promise.resolve(),je.noop]:je.awaitWsEvent(w,"open")},awaitClose:function(w){return[w.CLOSING,w.CLOSED].includes(w.readyState)?[Promise.resolve(),je.noop]:je.awaitWsEvent(w,"close")},awaitError:function(w){return[w.CLOSING,w.CLOSED].includes(w.readyState)?[Promise.resolve(),je.noop]:je.awaitWsEvent(w,"error")},awaitWsEvent:function(w,g){let s,d=()=>{s()};return[new Promise(function(t){s=t,w.once(g,d)}),()=>{w.removeListener(g,d),setTimeout(s)}]},noop:function(){},shutdownSocket:function(w,g){let s=ve(w),d=Object.values(s.peers)[0];if(!d)return-1;try{return d.socket.close(),j.websocket_sock_ops.removePeer(s,d),0}catch(r){return console.log("Socket shutdown error",r),-1}}};function Nr(w,g,s){if(!w)return 1;let d=ne(w);if(!d.length)return 0;let r=ne(g);if(!r.length)return 0;if(l.popen_to_file){let{path:i,exitCode:t}=l.popen_to_file(d,r);return de[s]=t,br(i)}if(Z){let i=require("os").tmpdir(),t="php-process-stream",a=i+"/"+t,n=require("child_process"),f;if(r==="r")f=n.spawnSync(d,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[s]=f.status,require("fs").writeFileSync(a,f.stdout,{encoding:"utf8",flag:"w+"});else return r==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+r+" (should be r or w)"),_W_EXITCODE(0,2));return br(a)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function Ue(w){return w%4===0&&(w%100!==0||w%400===0)}function ir(w,g){for(var s=0,d=0;d<=g;s+=w[d++]);return s}var qe=[31,29,31,30,31,30,31,31,30,31,30,31],Er=[31,28,31,30,31,30,31,31,30,31,30,31];function fr(w,g){for(var s=new Date(w.getTime());g>0;){var d=Ue(s.getFullYear()),r=s.getMonth(),i=(d?qe:Er)[r];if(g>i-s.getDate())g-=i-s.getDate()+1,s.setDate(1),r<11?s.setMonth(r+1):(s.setMonth(0),s.setFullYear(s.getFullYear()+1));else return s.setDate(s.getDate()+g),s}return s}function Tr(w,g,s,d){var r=h[d+40>>2],i={tm_sec:h[d>>2],tm_min:h[d+4>>2],tm_hour:h[d+8>>2],tm_mday:h[d+12>>2],tm_mon:h[d+16>>2],tm_year:h[d+20>>2],tm_wday:h[d+24>>2],tm_yday:h[d+28>>2],tm_isdst:h[d+32>>2],tm_gmtoff:h[d+36>>2],tm_zone:r?ne(r):""},t=ne(s),a={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var n in a)t=t.replace(new RegExp(n,"g"),a[n]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=["January","February","March","April","May","June","July","August","September","October","November","December"];function u(E,S,b){for(var k=typeof E=="number"?E.toString():E||"";k.length<S;)k=b[0]+k;return k}function o(E,S){return u(E,S,"0")}function c(E,S){function b(D){return D<0?-1:D>0?1:0}var k;return(k=b(E.getFullYear()-S.getFullYear()))===0&&(k=b(E.getMonth()-S.getMonth()))===0&&(k=b(E.getDate()-S.getDate())),k}function _(E){switch(E.getDay()){case 0:return new Date(E.getFullYear()-1,11,29);case 1:return E;case 2:return new Date(E.getFullYear(),0,3);case 3:return new Date(E.getFullYear(),0,2);case 4:return new Date(E.getFullYear(),0,1);case 5:return new Date(E.getFullYear()-1,11,31);case 6:return new Date(E.getFullYear()-1,11,30)}}function m(E){var S=fr(new Date(E.tm_year+1900,0,1),E.tm_yday),b=new Date(S.getFullYear(),0,4),k=new Date(S.getFullYear()+1,0,4),D=_(b),T=_(k);return c(D,S)<=0?c(T,S)<=0?S.getFullYear()+1:S.getFullYear():S.getFullYear()-1}var p={"%a":function(E){return f[E.tm_wday].substring(0,3)},"%A":function(E){return f[E.tm_wday]},"%b":function(E){return v[E.tm_mon].substring(0,3)},"%B":function(E){return v[E.tm_mon]},"%C":function(E){var S=E.tm_year+1900;return o(S/100|0,2)},"%d":function(E){return o(E.tm_mday,2)},"%e":function(E){return u(E.tm_mday,2," ")},"%g":function(E){return m(E).toString().substring(2)},"%G":function(E){return m(E)},"%H":function(E){return o(E.tm_hour,2)},"%I":function(E){var S=E.tm_hour;return S==0?S=12:S>12&&(S-=12),o(S,2)},"%j":function(E){return o(E.tm_mday+ir(Ue(E.tm_year+1900)?qe:Er,E.tm_mon-1),3)},"%m":function(E){return o(E.tm_mon+1,2)},"%M":function(E){return o(E.tm_min,2)},"%n":function(){return`
|
|
28
|
-
`},"%p":function(E){return E.tm_hour>=0&&E.tm_hour<12?"AM":"PM"},"%S":function(E){return o(E.tm_sec,2)},"%t":function(){return" "},"%u":function(E){return E.tm_wday||7},"%U":function(E){var S=E.tm_yday+7-E.tm_wday;return o(Math.floor(S/7),2)},"%V":function(E){var S=Math.floor((E.tm_yday+7-(E.tm_wday+6)%7)/7);if((E.tm_wday+371-E.tm_yday-2)%7<=2&&S++,S){if(S==53){var k=(E.tm_wday+371-E.tm_yday)%7;k!=4&&(k!=3||!Ue(E.tm_year))&&(S=1)}}else{S=52;var b=(E.tm_wday+7-E.tm_yday-1)%7;(b==4||b==5&&Ue(E.tm_year%400-1))&&S++}return o(S,2)},"%w":function(E){return E.tm_wday},"%W":function(E){var S=E.tm_yday+7-(E.tm_wday+6)%7;return o(Math.floor(S/7),2)},"%y":function(E){return(E.tm_year+1900).toString().substring(2)},"%Y":function(E){return E.tm_year+1900},"%z":function(E){var S=E.tm_gmtoff,b=S>=0;return S=Math.abs(S)/60,S=S/60*100+S%60,(b?"+":"-")+("0000"+S).slice(-4)},"%Z":function(E){return E.tm_zone},"%%":function(){return"%"}};t=t.replace(/%%/g,"\0\0");for(var n in p)t.includes(n)&&(t=t.replace(new RegExp(n,"g"),p[n](i)));t=t.replace(/\0\0/g,"%");var y=Je(t,!1);return y.length>g?0:(ht(y,w),y.length-1)}function Yr(w,g,s){for(var d=ne(g),r="\\!@#$^&*()+=-[]/{}|:<>?,.",i=0,t=r.length;i<t;++i)d=d.replace(new RegExp("\\"+r[i],"g"),"\\"+r[i]);var a={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var n in a)d=d.replace(n,a[n]);var f={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},v={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},u={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},o={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var c in f)d=d.replace(c,"("+c+f[c]+")");for(var _=[],i=d.indexOf("%");i>=0;i=d.indexOf("%"))_.push(d[i+1]),d=d.replace(new RegExp("\\%"+d[i+1],"g"),"");var m=new RegExp("^"+d,"i").exec(ne(w));function p(){function re(oe,le,he){return typeof oe!="number"||isNaN(oe)?le:oe>=le?oe<=he?oe:he:le}return{year:re(h[s+20>>2]+1900,1970,9999),month:re(h[s+16>>2],0,11),day:re(h[s+12>>2],1,31),hour:re(h[s+8>>2],0,23),min:re(h[s+4>>2],0,59),sec:re(h[s>>2],0,59)}}if(m){var y=p(),E,S=re=>{var oe=_.indexOf(re);if(oe>=0)return m[oe+1]};if((E=S("S"))&&(y.sec=Q(E)),(E=S("M"))&&(y.min=Q(E)),E=S("H"))y.hour=Q(E);else if(E=S("I")){var b=Q(E);(E=S("p"))&&(b+=E.toUpperCase()[0]==="P"?12:0),y.hour=b}if(E=S("Y"))y.year=Q(E);else if(E=S("y")){var k=Q(E);(E=S("C"))?k+=Q(E)*100:k+=k<69?2e3:1900,y.year=k}if((E=S("m"))?y.month=Q(E)-1:(E=S("b"))&&(y.month=v[E.substring(0,3).toUpperCase()]||0),E=S("d"))y.day=Q(E);else if(E=S("j"))for(var D=Q(E),T=Ue(y.year),C=0;C<12;++C){var A=ir(T?qe:Er,C-1);D<=A+(T?qe:Er)[C]&&(y.day=D-A)}else if(E=S("a")){var I=E.substring(0,3).toUpperCase();if(E=S("U")){var z=u[I],K=Q(E),B=new Date(y.year,0,1),x;B.getDay()===0?x=fr(B,z+7*(K-1)):x=fr(B,7-B.getDay()+z+7*(K-1)),y.day=x.getDate(),y.month=x.getMonth()}else if(E=S("W")){var z=o[I],K=Q(E),B=new Date(y.year,0,1),x;B.getDay()===1?x=fr(B,z+7*(K-1)):x=fr(B,7-B.getDay()+1+z+7*(K-1)),y.day=x.getDate(),y.month=x.getMonth()}}var G=new Date(y.year,y.month,y.day,y.hour,y.min,y.sec,0);return h[s>>2]=G.getSeconds(),h[s+4>>2]=G.getMinutes(),h[s+8>>2]=G.getHours(),h[s+12>>2]=G.getDate(),h[s+16>>2]=G.getMonth(),h[s+20>>2]=G.getFullYear()-1900,h[s+24>>2]=G.getDay(),h[s+28>>2]=ir(Ue(G.getFullYear())?qe:Er,G.getMonth()-1)+G.getDate()-1,h[s+32>>2]=0,w+Je(m[0]).length-1}return 0}function jt(w){return je.shutdownSocket(w,2)}function Yt(w,g,s){if(typeof X>"u")return 0;let d=1,r=2,i=4,t=8,a=16,n=32;return X.handleSleep(f=>{let v=ve(w);if(!v){f(0);return}let u=[],o=new Set;if(g&d||g&r){if(v.server){for(let E of v.pending)if((E.recv_queue||[]).length>0){f(1);return}}else if((v.recv_queue||[]).length>0){f(1);return}}let c=je.getAllWebSockets(v);if(!c.length){f(0);return}for(let E of c)(g&d||g&r)&&(u.push(je.awaitData(E)),o.add("POLLIN")),g&i&&(u.push(je.awaitConnection(E)),o.add("POLLOUT")),g&a&&(u.push(je.awaitClose(E)),o.add("POLLHUP")),(g&t||g&n)&&(u.push(je.awaitError(E)),o.add("POLLERR"));if(u.length===0){console.warn("Unsupported poll event "+g+", defaulting to setTimeout()."),setTimeout(function(){f(0)},s);return}let _=u.map(([E])=>E),m=()=>u.forEach(([,E])=>E()),p=!1;Promise.race(_).then(function(E){p||(p=!0,f(1),clearTimeout(y),m())});let y=setTimeout(function(){p||(p=!0,f(0),m())},s)})}function Gt(w,g,s,d,r){let i=de[d];if(!(g===1&&s===9||g===6&&s===1))return console.warn(`Unsupported socket option: ${g}, ${s}, ${i}`),-1;let u=je.getAllWebSockets(w)[0];return u?(u.setSocketOpt(g,s,d),0):-1}function be(w){try{return w()}catch(g){ue(g)}}var X={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(w){var g=X.callStackNameToId[w];return g===void 0&&(g=X.callStackId++,X.callStackNameToId[w]=g,X.callStackIdToName[g]=w),g},instrumentWasmImports:function(w){var g=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(d=>d.split(".")[1]);for(var s in w)(function(d){var r=w[d],i=r.sig;if(typeof r=="function")var t=g.indexOf(d)>=0||d.startsWith("__asyncjs__")})(s)},instrumentWasmExports:function(w){var g={};for(var s in w)(function(d){var r=w[d];typeof r=="function"?g[d]=function(){X.exportCallStack.push(d);try{return r.apply(null,arguments)}finally{if(!Ce){var i=X.exportCallStack.pop();Ne(i===d),X.maybeStopUnwind()}}}:g[d]=r})(s);return g},maybeStopUnwind:function(){X.currData&&X.state===X.State.Unwinding&&X.exportCallStack.length===0&&(X.state=X.State.Normal,et(),be(Rt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((w,g)=>{X.asyncPromiseHandlers={resolve:w,reject:g}})},allocateData:function(){var w=sr(12+X.StackSize);return X.setDataHeader(w,w+12,X.StackSize),X.setDataRewindFunc(w),w},setDataHeader:function(w,g,s){h[w>>2]=g,h[w+4>>2]=g+s},setDataRewindFunc:function(w){var g=X.exportCallStack[0],s=X.getCallStackId(g);h[w+8>>2]=s},getDataRewindFunc:function(w){var g=h[w+8>>2],s=X.callStackIdToName[g],d=l.asm[s];return d},doRewind:function(w){var g=X.getDataRewindFunc(w);return jr(),g()},handleSleep:function(w){if(!Ce){if(X.state===X.State.Normal){var g=!1,s=!1;w(d=>{if(!Ce&&(X.handleSleepReturnValue=d||0,g=!0,!!s)){X.state=X.State.Rewinding,be(()=>Mt(X.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var r,i=!1;try{r=X.doRewind(X.currData)}catch(n){r=n,i=!0}var t=!1;if(!X.currData){var a=X.asyncPromiseHandlers;a&&(X.asyncPromiseHandlers=null,(i?a.reject:a.resolve)(r),t=!0)}if(i&&!t)throw r}}),s=!0,g||(X.state=X.State.Unwinding,X.currData=X.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),be(()=>Pt(X.currData)))}else X.state===X.State.Rewinding?(X.state=X.State.Normal,be(Lt),er(X.currData),X.currData=null,X.sleepCallbacks.forEach(d=>gt(d))):ue("invalid state: "+X.state);return X.handleSleepReturnValue}},handleAsync:function(w){return X.handleSleep(g=>{w().then(g)})}};function Fe(w){var g=l["_"+w];return g}function Xt(w,g,s,d,r){var i={string:p=>{var y=0;if(p!=null&&p!==0){var E=(p.length<<2)+1;y=tr(E),Ae(p,y,E)}return y},array:p=>{var y=tr(p.length);return ht(p,y),y}};function t(p){return g==="string"?ne(p):g==="boolean"?!!p:p}var a=Fe(w),n=[],f=0;if(d)for(var v=0;v<d.length;v++){var u=i[s[v]];u?(f===0&&(f=Oe()),n[v]=u(d[v])):n[v]=d[v]}var o=X.currData,c=a.apply(null,n);function _(p){return jr(),f!==0&&ye(f),t(p)}et();var m=r&&r.async;return X.currData!=o?X.whenDone().then(_):(c=_(c),m?Promise.resolve(c):c)}var ie=function(w,g,s,d){w||(w=this),this.parent=w,this.mount=w.mount,this.mounted=null,this.id=e.nextInode++,this.name=g,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=d},Gr=365,xr=146;Object.defineProperties(ie.prototype,{read:{get:function(){return(this.mode&Gr)===Gr},set:function(w){w?this.mode|=Gr:this.mode&=~Gr}},write:{get:function(){return(this.mode&xr)===xr},set:function(w){w?this.mode|=xr:this.mode&=~xr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ie,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var ke={j:Jn,Ra:Qn,Qa:no,Pa:oo,Oa:io,Na:ao,N:so,Ma:uo,La:fo,Ka:co,Ja:lo,Ia:Xr,Ha:_o,M:vo,o:mo,Ga:po,Q:ho,Fa:yo,Ea:wo,Da:Eo,Ca:go,Ba:So,L:bo,Aa:ko,za:Do,ya:Oo,xa:No,B:To,wa:Co,va:pe,ua:Fo,ta:Ao,sa:Po,K:Ro,ra:Mo,J:Lo,qa:Io,pa:Uo,oa:Bo,I:xo,na:Ho,ia:$r,ha:zo,ga:_n,fa:jo,ea:Yo,da:qo,ca:Vo,ba:Ko,aa:Go,$:Xo,_:zr,m:Zo,z:It,Z:Jo,F:Wr,Y:Qo,X:ei,W:xt,ma:Ir,la:Ht,p:Et,t:oi,H:ii,G:si,P:ui,ka:fi,A:li,E:An,D:di,V:_i,U:En,T:zt,S:Wt,h:Tn,d:bn,b:Nn,f:Di,g:Ln,v:Ci,s:pn,u:Ai,y:Ti,e:hn,a:ln,c:cn,l:Vt,k:Cn,n:Ni,i:Oi,x:Fi,R:Nr,ja:wn,C:Tr,O:Yr,r:jt,w:Yt,q:Gt},Te=Zn(),an=l.___wasm_call_ctors=function(){return(an=l.___wasm_call_ctors=l.asm.Ta).apply(null,arguments)},On=l._wasm_popen=function(){return(On=l._wasm_popen=l.asm.Ua).apply(null,arguments)},sn=l.___errno_location=function(){return(sn=l.___errno_location=l.asm.Va).apply(null,arguments)},$t=l._wasm_pclose=function(){return($t=l._wasm_pclose=l.asm.Wa).apply(null,arguments)},gn=l._php_pollfd_for=function(){return(gn=l._php_pollfd_for=l.asm.Xa).apply(null,arguments)},Pn=l._wasm_select=function(){return(Pn=l._wasm_select=l.asm.Ya).apply(null,arguments)},bt=l._wasm_add_cli_arg=function(){return(bt=l._wasm_add_cli_arg=l.asm.Za).apply(null,arguments)},sr=l._malloc=function(){return(sr=l._malloc=l.asm._a).apply(null,arguments)},qr=l._run_cli=function(){return(qr=l._run_cli=l.asm.$a).apply(null,arguments)},Qt=l._memcpy=function(){return(Qt=l._memcpy=l.asm.ab).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.bb).apply(null,arguments)},qt=l._ntohs=function(){return(qt=l._ntohs=l.asm.db).apply(null,arguments)},Zr=l._htons=function(){return(Zr=l._htons=l.asm.eb).apply(null,arguments)},kr=l._fflush=function(){return(kr=l._fflush=l.asm.fb).apply(null,arguments)},Ur=l._wasm_set_phpini_path=function(){return(Ur=l._wasm_set_phpini_path=l.asm.gb).apply(null,arguments)},nt=l._wasm_set_phpini_entries=function(){return(nt=l._wasm_set_phpini_entries=l.asm.hb).apply(null,arguments)},Zt=l._wasm_add_SERVER_entry=function(){return(Zt=l._wasm_add_SERVER_entry=l.asm.ib).apply(null,arguments)},kt=l._wasm_add_uploaded_file=function(){return(kt=l._wasm_add_uploaded_file=l.asm.jb).apply(null,arguments)},mn=l._wasm_set_query_string=function(){return(mn=l._wasm_set_query_string=l.asm.kb).apply(null,arguments)},un=l._wasm_set_path_translated=function(){return(un=l._wasm_set_path_translated=l.asm.lb).apply(null,arguments)},fn=l._wasm_set_skip_shebang=function(){return(fn=l._wasm_set_skip_shebang=l.asm.mb).apply(null,arguments)},Sn=l._wasm_set_request_uri=function(){return(Sn=l._wasm_set_request_uri=l.asm.nb).apply(null,arguments)},vi=l._wasm_set_request_method=function(){return(vi=l._wasm_set_request_method=l.asm.ob).apply(null,arguments)},mi=l._wasm_set_request_host=function(){return(mi=l._wasm_set_request_host=l.asm.pb).apply(null,arguments)},pi=l._wasm_set_content_type=function(){return(pi=l._wasm_set_content_type=l.asm.qb).apply(null,arguments)},hi=l._wasm_set_request_body=function(){return(hi=l._wasm_set_request_body=l.asm.rb).apply(null,arguments)},yi=l._wasm_set_content_length=function(){return(yi=l._wasm_set_content_length=l.asm.sb).apply(null,arguments)},wi=l._wasm_set_cookies=function(){return(wi=l._wasm_set_cookies=l.asm.tb).apply(null,arguments)},Ei=l._wasm_set_php_code=function(){return(Ei=l._wasm_set_php_code=l.asm.ub).apply(null,arguments)},gi=l._wasm_set_request_port=function(){return(gi=l._wasm_set_request_port=l.asm.vb).apply(null,arguments)},Si=l._phpwasm_init_uploaded_files_hash=function(){return(Si=l._phpwasm_init_uploaded_files_hash=l.asm.wb).apply(null,arguments)},bi=l._phpwasm_register_uploaded_file=function(){return(bi=l._phpwasm_register_uploaded_file=l.asm.xb).apply(null,arguments)},ki=l._phpwasm_destroy_uploaded_files_hash=function(){return(ki=l._phpwasm_destroy_uploaded_files_hash=l.asm.yb).apply(null,arguments)},Rn=l._wasm_sapi_handle_request=function(){return(Rn=l._wasm_sapi_handle_request=l.asm.zb).apply(null,arguments)},Mn=l._php_wasm_init=function(){return(Mn=l._php_wasm_init=l.asm.Ab).apply(null,arguments)},Sr=l.___funcs_on_exit=function(){return(Sr=l.___funcs_on_exit=l.asm.Bb).apply(null,arguments)},gr=l._emscripten_builtin_memalign=function(){return(gr=l._emscripten_builtin_memalign=l.asm.Cb).apply(null,arguments)},we=l._setThrew=function(){return(we=l._setThrew=l.asm.Db).apply(null,arguments)},Oe=l.stackSave=function(){return(Oe=l.stackSave=l.asm.Eb).apply(null,arguments)},ye=l.stackRestore=function(){return(ye=l.stackRestore=l.asm.Fb).apply(null,arguments)},tr=l.stackAlloc=function(){return(tr=l.stackAlloc=l.asm.Gb).apply(null,arguments)},De=l.dynCall_viii=function(){return(De=l.dynCall_viii=l.asm.Hb).apply(null,arguments)},xe=l.dynCall_vii=function(){return(xe=l.dynCall_vii=l.asm.Ib).apply(null,arguments)},Ie=l.dynCall_vi=function(){return(Ie=l.dynCall_vi=l.asm.Jb).apply(null,arguments)},ar=l.dynCall_iii=function(){return(ar=l.dynCall_iii=l.asm.Kb).apply(null,arguments)},Be=l.dynCall_ii=function(){return(Be=l.dynCall_ii=l.asm.Lb).apply(null,arguments)},He=l.dynCall_v=function(){return(He=l.dynCall_v=l.asm.Mb).apply(null,arguments)},ur=l.dynCall_iiii=function(){return(ur=l.dynCall_iiii=l.asm.Nb).apply(null,arguments)},Qr=l.dynCall_viiiii=function(){return(Qr=l.dynCall_viiiii=l.asm.Ob).apply(null,arguments)},ot=l.dynCall_iiiii=function(){return(ot=l.dynCall_iiiii=l.asm.Pb).apply(null,arguments)},it=l.dynCall_iiiiiii=function(){return(it=l.dynCall_iiiiiii=l.asm.Qb).apply(null,arguments)},Dt=l.dynCall_iiiiii=function(){return(Dt=l.dynCall_iiiiii=l.asm.Rb).apply(null,arguments)},Ot=l.dynCall_i=function(){return(Ot=l.dynCall_i=l.asm.Sb).apply(null,arguments)},Nt=l.dynCall_viiii=function(){return(Nt=l.dynCall_viiii=l.asm.Tb).apply(null,arguments)},Tt=l.dynCall_iiiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiiii=l.asm.Ub).apply(null,arguments)},Ct=l.dynCall_viiiiiiiii=function(){return(Ct=l.dynCall_viiiiiiiii=l.asm.Vb).apply(null,arguments)},Ft=l.dynCall_viiiiii=function(){return(Ft=l.dynCall_viiiiii=l.asm.Wb).apply(null,arguments)},At=l.dynCall_iiiiiiii=function(){return(At=l.dynCall_iiiiiiii=l.asm.Xb).apply(null,arguments)},Pt=l._asyncify_start_unwind=function(){return(Pt=l._asyncify_start_unwind=l.asm.Yb).apply(null,arguments)},Rt=l._asyncify_stop_unwind=function(){return(Rt=l._asyncify_stop_unwind=l.asm.Zb).apply(null,arguments)},Mt=l._asyncify_start_rewind=function(){return(Mt=l._asyncify_start_rewind=l.asm._b).apply(null,arguments)},Lt=l._asyncify_stop_rewind=function(){return(Lt=l._asyncify_stop_rewind=l.asm.$b).apply(null,arguments)};function Vt(w,g,s,d){var r=Oe();try{De(w,g,s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function cn(w,g,s){var d=Oe();try{xe(w,g,s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function ln(w,g){var s=Oe();try{Ie(w,g)}catch(d){if(ye(s),d!==d+0)throw d;we(1,0)}}function pn(w,g,s,d,r,i,t){var a=Oe();try{return it(w,g,s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function hn(w){var g=Oe();try{He(w)}catch(s){if(ye(g),s!==s+0)throw s;we(1,0)}}function bn(w,g){var s=Oe();try{return Be(w,g)}catch(d){if(ye(s),d!==d+0)throw d;we(1,0)}}function Nn(w,g,s){var d=Oe();try{return ar(w,g,s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Tn(w){var g=Oe();try{return Ot(w)}catch(s){if(ye(g),s!==s+0)throw s;we(1,0)}}function Cn(w,g,s,d,r){var i=Oe();try{Nt(w,g,s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Ln(w,g,s,d,r){var i=Oe();try{return ot(w,g,s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Di(w,g,s,d){var r=Oe();try{return ur(w,g,s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function Oi(w,g,s,d,r,i,t){var a=Oe();try{Ft(w,g,s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Ni(w,g,s,d,r,i){var t=Oe();try{Qr(w,g,s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Ti(w,g,s,d,r,i,t,a,n,f){var v=Oe();try{return Tt(w,g,s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}function Ci(w,g,s,d,r,i){var t=Oe();try{return Dt(w,g,s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Fi(w,g,s,d,r,i,t,a,n,f){var v=Oe();try{Ct(w,g,s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}function Ai(w,g,s,d,r,i,t,a){var n=Oe();try{return At(w,g,s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Xt,l.FS=e;var kn;$e=function w(){kn||In(),kn||($e=w)};function In(w){if(w=w||Y,Re>0||(Wn(),Re>0))return;function g(){kn||(kn=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),g()},1)):g()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return In(),O}var Vc,Ku,Xu=Ki(()=>{"use strict";Vc=10558435,Ku=__dirname+"/php_7_1.wasm"});var Zu={};Hi(Zu,{dependenciesTotalSize:()=>Gc,dependencyFilename:()=>$u,init:()=>Xc});function Xc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(s,d)=>{throw d},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(s){return l.locateFile?l.locateFile(s,ae):ae+s}var Ye,nr,Me;function Lr(s){if(s instanceof mr)return;ce("exiting due to exception: "+s)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(s,d)=>(wr(),s=Le.normalize(s),V.readFileSync(s,d?void 0:"utf8")),Me=s=>{var d=Ye(s,!0);return d.buffer||(d=new Uint8Array(d)),d},nr=(s,d,r)=>{wr(),s=Le.normalize(s),V.readFile(s,function(i,t){i?r(i):d(t.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(s){if(!(s instanceof mr))throw s}),process.on("unhandledRejection",function(s){throw s}),te=(s,d)=>{if(_r())throw process.exitCode=s,d;Lr(d),process.exit(s)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(s,d){s||ue(d)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(s,d,r){for(var i=d+r,t=d;s[t]&&!(t>=i);)++t;if(t-d>16&&s.buffer&&at)return at.decode(s.subarray(d,t));for(var a="";d<t;){var n=s[d++];if(!(n&128)){a+=String.fromCharCode(n);continue}var f=s[d++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|f);continue}var v=s[d++]&63;if((n&240)==224?n=(n&15)<<12|f<<6|v:n=(n&7)<<18|f<<12|v<<6|s[d++]&63,n<65536)a+=String.fromCharCode(n);else{var u=n-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a}function ne(s,d){return s?We(de,s,d):""}function Xe(s,d,r,i){if(!(i>0))return 0;for(var t=r,a=r+i-1,n=0;n<s.length;++n){var f=s.charCodeAt(n);if(f>=55296&&f<=57343){var v=s.charCodeAt(++n);f=65536+((f&1023)<<10)|v&1023}if(f<=127){if(r>=a)break;d[r++]=f}else if(f<=2047){if(r+1>=a)break;d[r++]=192|f>>6,d[r++]=128|f&63}else if(f<=65535){if(r+2>=a)break;d[r++]=224|f>>12,d[r++]=128|f>>6&63,d[r++]=128|f&63}else{if(r+3>=a)break;d[r++]=240|f>>18,d[r++]=128|f>>12&63,d[r++]=128|f>>6&63,d[r++]=128|f&63}}return d[r]=0,r-t}function Ae(s,d,r){return Xe(s,de,d,r)}function Pe(s){for(var d=0,r=0;r<s.length;++r){var i=s.charCodeAt(r);i<=127?d++:i<=2047?d+=2:i>=55296&&i<=57343?(d+=4,++r):d+=3}return d}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(s){Cr=s,l.HEAP8=$=new Int8Array(s),l.HEAP16=Ee=new Int16Array(s),l.HEAP32=h=new Int32Array(s),l.HEAPU8=de=new Uint8Array(s),l.HEAPU16=st=new Uint16Array(s),l.HEAPU32=H=new Uint32Array(s),l.HEAPF32=Bn=new Float32Array(s),l.HEAPF64=ut=new Float64Array(s)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Sr(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(s){ct.unshift(s)}function Kn(s){lt.unshift(s)}function Gn(s){dt.unshift(s)}var Re=0,Ar=null,$e=null;function Qi(s){return s}function vr(s){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(s){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var d=$e;$e=null,d()}}function ue(s){l.onAbort&&l.onAbort(s),s="Aborted("+s+")",ce(s),Ce=!0,Ge=1,s+=". Build with -sASSERTIONS for more info.";var d=new WebAssembly.RuntimeError(s);throw d}var Xn="data:application/octet-stream;base64,";function vt(s){return s.startsWith(Xn)}var _e;_e=$u,vt(_e)||(_e=cr(_e));function mt(s){try{if(s==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(s);throw"both async and sync fetching of the wasm failed"}catch(d){ue(d)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(s){if(!s.ok)throw"failed to load wasm binary file at '"+_e+"'";return s.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var s={a:ke};function d(n,f){var v=n.exports;v=X.instrumentWasmExports(v),l.asm=v,or=l.asm.Sa,ft(or.buffer),xn=l.asm.cb,Kn(l.asm.Ta),Ze("wasm-instantiate")}vr("wasm-instantiate");function r(n){d(n.instance)}function i(n){return $n().then(function(f){return WebAssembly.instantiate(f,s)}).then(function(f){return f}).then(n,function(f){ce("failed to asynchronously prepare wasm: "+f),ue(f)})}function t(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(n){var f=WebAssembly.instantiateStreaming(n,s);return f.then(r,function(v){return ce("wasm streaming compile failed: "+v),ce("falling back to ArrayBuffer instantiation"),i(r)})}):i(r)}if(l.instantiateWasm)try{var a=l.instantiateWasm(s,d);return a=X.instrumentWasmExports(a),a}catch(n){return ce("Module.instantiateWasm callback failed with error: "+n),!1}return t(),{}}var P,q;function mr(s){this.name="ExitStatus",this.message="Program terminated with exit("+s+")",this.status=s}function pr(s){for(;s.length>0;)s.shift()(l)}function pt(s){if(s instanceof mr||s=="unwind")return Ge;te(1,s)}function ht(s,d){$.set(s,d)}function Jn(s,d,r,i){ue("Assertion failed: "+ne(s)+", at: "+[d?ne(d):"unknown filename",r,i?ne(i):"unknown function"])}function Qn(s,d){(function(r){Ie.apply(null,[s,r])})(d)}var U={isAbs:s=>s.charAt(0)==="/",splitPath:s=>{var d=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return d.exec(s).slice(1)},normalizeArray:(s,d)=>{for(var r=0,i=s.length-1;i>=0;i--){var t=s[i];t==="."?s.splice(i,1):t===".."?(s.splice(i,1),r++):r&&(s.splice(i,1),r--)}if(d)for(;r;r--)s.unshift("..");return s},normalize:s=>{var d=U.isAbs(s),r=s.substr(-1)==="/";return s=U.normalizeArray(s.split("/").filter(i=>!!i),!d).join("/"),!s&&!d&&(s="."),s&&r&&(s+="/"),(d?"/":"")+s},dirname:s=>{var d=U.splitPath(s),r=d[0],i=d[1];return!r&&!i?".":(i&&(i=i.substr(0,i.length-1)),r+i)},basename:s=>{if(s==="/")return"/";s=U.normalize(s),s=s.replace(/\/$/,"");var d=s.lastIndexOf("/");return d===-1?s:s.substr(d+1)},join:function(){var s=Array.prototype.slice.call(arguments);return U.normalize(s.join("/"))},join2:(s,d)=>U.normalize(s+"/"+d)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var s=new Uint8Array(1);return()=>(crypto.getRandomValues(s),s[0])}else if(Z)try{var d=require("crypto");return()=>d.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var s="",d=!1,r=arguments.length-1;r>=-1&&!d;r--){var i=r>=0?arguments[r]:e.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";s=i+"/"+s,d=U.isAbs(i)}return s=U.normalizeArray(s.split("/").filter(t=>!!t),!d).join("/"),(d?"/":"")+s||"."},relative:(s,d)=>{s=ge.resolve(s).substr(1),d=ge.resolve(d).substr(1);function r(u){for(var o=0;o<u.length&&u[o]==="";o++);for(var c=u.length-1;c>=0&&u[c]==="";c--);return o>c?[]:u.slice(o,c-o+1)}for(var i=r(s.split("/")),t=r(d.split("/")),a=Math.min(i.length,t.length),n=a,f=0;f<a;f++)if(i[f]!==t[f]){n=f;break}for(var v=[],f=n;f<i.length;f++)v.push("..");return v=v.concat(t.slice(n)),v.join("/")}};function Je(s,d,r){var i=r>0?r:Pe(s)+1,t=new Array(i),a=Xe(s,t,0,t.length);return d&&(t.length=a),t}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(s,d){Se.ttys[s]={input:[],output:[],ops:d},e.registerDevice(s,Se.stream_ops)},stream_ops:{open:function(s){var d=Se.ttys[s.node.rdev];if(!d)throw new e.ErrnoError(43);s.tty=d,s.seekable=!1},close:function(s){s.tty.ops.fsync(s.tty)},fsync:function(s){s.tty.ops.fsync(s.tty)},read:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.get_char)throw new e.ErrnoError(60);for(var a=0,n=0;n<i;n++){var f;try{f=s.tty.ops.get_char(s.tty)}catch{throw new e.ErrnoError(29)}if(f===void 0&&a===0)throw new e.ErrnoError(6);if(f==null)break;a++,d[r+n]=f}return a&&(s.node.timestamp=Date.now()),a},write:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var a=0;a<i;a++)s.tty.ops.put_char(s.tty,d[r+a])}catch{throw new e.ErrnoError(29)}return i&&(s.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(s){if(!s.input.length){var d=null;if(Z){var r=256,i=Buffer.alloc(r),t=0;try{t=V.readSync(process.stdin.fd,i,0,r,-1)}catch(a){if(a.toString().includes("EOF"))t=0;else throw a}t>0?d=i.slice(0,t).toString("utf-8"):d=null}else typeof window<"u"&&typeof window.prompt=="function"?(d=window.prompt("Input: "),d!==null&&(d+=`
|
|
28
|
+
`},"%p":function(E){return E.tm_hour>=0&&E.tm_hour<12?"AM":"PM"},"%S":function(E){return o(E.tm_sec,2)},"%t":function(){return" "},"%u":function(E){return E.tm_wday||7},"%U":function(E){var S=E.tm_yday+7-E.tm_wday;return o(Math.floor(S/7),2)},"%V":function(E){var S=Math.floor((E.tm_yday+7-(E.tm_wday+6)%7)/7);if((E.tm_wday+371-E.tm_yday-2)%7<=2&&S++,S){if(S==53){var k=(E.tm_wday+371-E.tm_yday)%7;k!=4&&(k!=3||!Ue(E.tm_year))&&(S=1)}}else{S=52;var b=(E.tm_wday+7-E.tm_yday-1)%7;(b==4||b==5&&Ue(E.tm_year%400-1))&&S++}return o(S,2)},"%w":function(E){return E.tm_wday},"%W":function(E){var S=E.tm_yday+7-(E.tm_wday+6)%7;return o(Math.floor(S/7),2)},"%y":function(E){return(E.tm_year+1900).toString().substring(2)},"%Y":function(E){return E.tm_year+1900},"%z":function(E){var S=E.tm_gmtoff,b=S>=0;return S=Math.abs(S)/60,S=S/60*100+S%60,(b?"+":"-")+("0000"+S).slice(-4)},"%Z":function(E){return E.tm_zone},"%%":function(){return"%"}};t=t.replace(/%%/g,"\0\0");for(var n in p)t.includes(n)&&(t=t.replace(new RegExp(n,"g"),p[n](i)));t=t.replace(/\0\0/g,"%");var y=Je(t,!1);return y.length>g?0:(ht(y,w),y.length-1)}function Yr(w,g,s){for(var d=ne(g),r="\\!@#$^&*()+=-[]/{}|:<>?,.",i=0,t=r.length;i<t;++i)d=d.replace(new RegExp("\\"+r[i],"g"),"\\"+r[i]);var a={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var n in a)d=d.replace(n,a[n]);var f={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},v={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},u={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},o={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var c in f)d=d.replace(c,"("+c+f[c]+")");for(var _=[],i=d.indexOf("%");i>=0;i=d.indexOf("%"))_.push(d[i+1]),d=d.replace(new RegExp("\\%"+d[i+1],"g"),"");var m=new RegExp("^"+d,"i").exec(ne(w));function p(){function re(oe,le,he){return typeof oe!="number"||isNaN(oe)?le:oe>=le?oe<=he?oe:he:le}return{year:re(h[s+20>>2]+1900,1970,9999),month:re(h[s+16>>2],0,11),day:re(h[s+12>>2],1,31),hour:re(h[s+8>>2],0,23),min:re(h[s+4>>2],0,59),sec:re(h[s>>2],0,59)}}if(m){var y=p(),E,S=re=>{var oe=_.indexOf(re);if(oe>=0)return m[oe+1]};if((E=S("S"))&&(y.sec=Q(E)),(E=S("M"))&&(y.min=Q(E)),E=S("H"))y.hour=Q(E);else if(E=S("I")){var b=Q(E);(E=S("p"))&&(b+=E.toUpperCase()[0]==="P"?12:0),y.hour=b}if(E=S("Y"))y.year=Q(E);else if(E=S("y")){var k=Q(E);(E=S("C"))?k+=Q(E)*100:k+=k<69?2e3:1900,y.year=k}if((E=S("m"))?y.month=Q(E)-1:(E=S("b"))&&(y.month=v[E.substring(0,3).toUpperCase()]||0),E=S("d"))y.day=Q(E);else if(E=S("j"))for(var D=Q(E),T=Ue(y.year),C=0;C<12;++C){var A=ir(T?qe:Er,C-1);D<=A+(T?qe:Er)[C]&&(y.day=D-A)}else if(E=S("a")){var I=E.substring(0,3).toUpperCase();if(E=S("U")){var z=u[I],K=Q(E),B=new Date(y.year,0,1),x;B.getDay()===0?x=fr(B,z+7*(K-1)):x=fr(B,7-B.getDay()+z+7*(K-1)),y.day=x.getDate(),y.month=x.getMonth()}else if(E=S("W")){var z=o[I],K=Q(E),B=new Date(y.year,0,1),x;B.getDay()===1?x=fr(B,z+7*(K-1)):x=fr(B,7-B.getDay()+1+z+7*(K-1)),y.day=x.getDate(),y.month=x.getMonth()}}var G=new Date(y.year,y.month,y.day,y.hour,y.min,y.sec,0);return h[s>>2]=G.getSeconds(),h[s+4>>2]=G.getMinutes(),h[s+8>>2]=G.getHours(),h[s+12>>2]=G.getDate(),h[s+16>>2]=G.getMonth(),h[s+20>>2]=G.getFullYear()-1900,h[s+24>>2]=G.getDay(),h[s+28>>2]=ir(Ue(G.getFullYear())?qe:Er,G.getMonth()-1)+G.getDate()-1,h[s+32>>2]=0,w+Je(m[0]).length-1}return 0}function jt(w){return je.shutdownSocket(w,2)}function Yt(w,g,s){if(typeof X>"u")return 0;let d=1,r=2,i=4,t=8,a=16,n=32;return X.handleSleep(f=>{let v=ve(w);if(!v){f(0);return}let u=[],o=new Set;if(g&d||g&r){if(v.server){for(let E of v.pending)if((E.recv_queue||[]).length>0){f(1);return}}else if((v.recv_queue||[]).length>0){f(1);return}}let c=je.getAllWebSockets(v);if(!c.length){f(0);return}for(let E of c)(g&d||g&r)&&(u.push(je.awaitData(E)),o.add("POLLIN")),g&i&&(u.push(je.awaitConnection(E)),o.add("POLLOUT")),g&a&&(u.push(je.awaitClose(E)),o.add("POLLHUP")),(g&t||g&n)&&(u.push(je.awaitError(E)),o.add("POLLERR"));if(u.length===0){console.warn("Unsupported poll event "+g+", defaulting to setTimeout()."),setTimeout(function(){f(0)},s);return}let _=u.map(([E])=>E),m=()=>u.forEach(([,E])=>E()),p=!1;Promise.race(_).then(function(E){p||(p=!0,f(1),clearTimeout(y),m())});let y=setTimeout(function(){p||(p=!0,f(0),m())},s)})}function Gt(w,g,s,d,r){let i=de[d];if(!(g===1&&s===9||g===6&&s===1))return console.warn(`Unsupported socket option: ${g}, ${s}, ${i}`),-1;let u=je.getAllWebSockets(w)[0];return u?(u.setSocketOpt(g,s,d),0):-1}function be(w){try{return w()}catch(g){ue(g)}}var X={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(w){var g=X.callStackNameToId[w];return g===void 0&&(g=X.callStackId++,X.callStackNameToId[w]=g,X.callStackIdToName[g]=w),g},instrumentWasmImports:function(w){var g=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(d=>d.split(".")[1]);for(var s in w)(function(d){var r=w[d],i=r.sig;if(typeof r=="function")var t=g.indexOf(d)>=0||d.startsWith("__asyncjs__")})(s)},instrumentWasmExports:function(w){var g={};for(var s in w)(function(d){var r=w[d];typeof r=="function"?g[d]=function(){X.exportCallStack.push(d);try{return r.apply(null,arguments)}finally{if(!Ce){var i=X.exportCallStack.pop();Ne(i===d),X.maybeStopUnwind()}}}:g[d]=r})(s);return g},maybeStopUnwind:function(){X.currData&&X.state===X.State.Unwinding&&X.exportCallStack.length===0&&(X.state=X.State.Normal,et(),be(Rt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((w,g)=>{X.asyncPromiseHandlers={resolve:w,reject:g}})},allocateData:function(){var w=sr(12+X.StackSize);return X.setDataHeader(w,w+12,X.StackSize),X.setDataRewindFunc(w),w},setDataHeader:function(w,g,s){h[w>>2]=g,h[w+4>>2]=g+s},setDataRewindFunc:function(w){var g=X.exportCallStack[0],s=X.getCallStackId(g);h[w+8>>2]=s},getDataRewindFunc:function(w){var g=h[w+8>>2],s=X.callStackIdToName[g],d=l.asm[s];return d},doRewind:function(w){var g=X.getDataRewindFunc(w);return jr(),g()},handleSleep:function(w){if(!Ce){if(X.state===X.State.Normal){var g=!1,s=!1;w(d=>{if(!Ce&&(X.handleSleepReturnValue=d||0,g=!0,!!s)){X.state=X.State.Rewinding,be(()=>Mt(X.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var r,i=!1;try{r=X.doRewind(X.currData)}catch(n){r=n,i=!0}var t=!1;if(!X.currData){var a=X.asyncPromiseHandlers;a&&(X.asyncPromiseHandlers=null,(i?a.reject:a.resolve)(r),t=!0)}if(i&&!t)throw r}}),s=!0,g||(X.state=X.State.Unwinding,X.currData=X.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),be(()=>Pt(X.currData)))}else X.state===X.State.Rewinding?(X.state=X.State.Normal,be(Lt),er(X.currData),X.currData=null,X.sleepCallbacks.forEach(d=>gt(d))):ue("invalid state: "+X.state);return X.handleSleepReturnValue}},handleAsync:function(w){return X.handleSleep(g=>{w().then(g)})}};function Fe(w){var g=l["_"+w];return g}function Xt(w,g,s,d,r){var i={string:p=>{var y=0;if(p!=null&&p!==0){var E=(p.length<<2)+1;y=tr(E),Ae(p,y,E)}return y},array:p=>{var y=tr(p.length);return ht(p,y),y}};function t(p){return g==="string"?ne(p):g==="boolean"?!!p:p}var a=Fe(w),n=[],f=0;if(d)for(var v=0;v<d.length;v++){var u=i[s[v]];u?(f===0&&(f=Oe()),n[v]=u(d[v])):n[v]=d[v]}var o=X.currData,c=a.apply(null,n);function _(p){return jr(),f!==0&&ye(f),t(p)}et();var m=r&&r.async;return X.currData!=o?X.whenDone().then(_):(c=_(c),m?Promise.resolve(c):c)}var ie=function(w,g,s,d){w||(w=this),this.parent=w,this.mount=w.mount,this.mounted=null,this.id=e.nextInode++,this.name=g,this.mode=s,this.node_ops={},this.stream_ops={},this.rdev=d},Gr=365,xr=146;Object.defineProperties(ie.prototype,{read:{get:function(){return(this.mode&Gr)===Gr},set:function(w){w?this.mode|=Gr:this.mode&=~Gr}},write:{get:function(){return(this.mode&xr)===xr},set:function(w){w?this.mode|=xr:this.mode&=~xr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ie,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var ke={j:Jn,Ra:Qn,Qa:no,Pa:oo,Oa:io,Na:ao,N:so,Ma:uo,La:fo,Ka:co,Ja:lo,Ia:Xr,Ha:_o,M:vo,o:mo,Ga:po,Q:ho,Fa:yo,Ea:wo,Da:Eo,Ca:go,Ba:So,L:bo,Aa:ko,za:Do,ya:Oo,xa:No,B:To,wa:Co,va:pe,ua:Fo,ta:Ao,sa:Po,K:Ro,ra:Mo,J:Lo,qa:Io,pa:Uo,oa:Bo,I:xo,na:Ho,ia:$r,ha:zo,ga:_n,fa:jo,ea:Yo,da:qo,ca:Vo,ba:Ko,aa:Go,$:Xo,_:zr,m:Zo,z:It,Z:Jo,F:Wr,Y:Qo,X:ei,W:xt,ma:Ir,la:Ht,p:Et,t:oi,H:ii,G:si,P:ui,ka:fi,A:li,E:An,D:di,V:_i,U:En,T:zt,S:Wt,h:Tn,d:bn,b:Nn,f:Di,g:Ln,v:Ci,s:pn,u:Ai,y:Ti,e:hn,a:ln,c:cn,l:Vt,k:Cn,n:Ni,i:Oi,x:Fi,R:Nr,ja:wn,C:Tr,O:Yr,r:jt,w:Yt,q:Gt},Te=Zn(),an=l.___wasm_call_ctors=function(){return(an=l.___wasm_call_ctors=l.asm.Ta).apply(null,arguments)},On=l._wasm_popen=function(){return(On=l._wasm_popen=l.asm.Ua).apply(null,arguments)},sn=l.___errno_location=function(){return(sn=l.___errno_location=l.asm.Va).apply(null,arguments)},$t=l._wasm_pclose=function(){return($t=l._wasm_pclose=l.asm.Wa).apply(null,arguments)},gn=l._php_pollfd_for=function(){return(gn=l._php_pollfd_for=l.asm.Xa).apply(null,arguments)},Pn=l._wasm_select=function(){return(Pn=l._wasm_select=l.asm.Ya).apply(null,arguments)},bt=l._wasm_add_cli_arg=function(){return(bt=l._wasm_add_cli_arg=l.asm.Za).apply(null,arguments)},sr=l._malloc=function(){return(sr=l._malloc=l.asm._a).apply(null,arguments)},qr=l._run_cli=function(){return(qr=l._run_cli=l.asm.$a).apply(null,arguments)},Qt=l._memcpy=function(){return(Qt=l._memcpy=l.asm.ab).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.bb).apply(null,arguments)},qt=l._ntohs=function(){return(qt=l._ntohs=l.asm.db).apply(null,arguments)},Zr=l._htons=function(){return(Zr=l._htons=l.asm.eb).apply(null,arguments)},kr=l._fflush=function(){return(kr=l._fflush=l.asm.fb).apply(null,arguments)},Ur=l._wasm_set_phpini_path=function(){return(Ur=l._wasm_set_phpini_path=l.asm.gb).apply(null,arguments)},nt=l._wasm_set_phpini_entries=function(){return(nt=l._wasm_set_phpini_entries=l.asm.hb).apply(null,arguments)},Zt=l._wasm_add_SERVER_entry=function(){return(Zt=l._wasm_add_SERVER_entry=l.asm.ib).apply(null,arguments)},kt=l._wasm_add_uploaded_file=function(){return(kt=l._wasm_add_uploaded_file=l.asm.jb).apply(null,arguments)},mn=l._wasm_set_query_string=function(){return(mn=l._wasm_set_query_string=l.asm.kb).apply(null,arguments)},un=l._wasm_set_path_translated=function(){return(un=l._wasm_set_path_translated=l.asm.lb).apply(null,arguments)},fn=l._wasm_set_skip_shebang=function(){return(fn=l._wasm_set_skip_shebang=l.asm.mb).apply(null,arguments)},Sn=l._wasm_set_request_uri=function(){return(Sn=l._wasm_set_request_uri=l.asm.nb).apply(null,arguments)},vi=l._wasm_set_request_method=function(){return(vi=l._wasm_set_request_method=l.asm.ob).apply(null,arguments)},mi=l._wasm_set_request_host=function(){return(mi=l._wasm_set_request_host=l.asm.pb).apply(null,arguments)},pi=l._wasm_set_content_type=function(){return(pi=l._wasm_set_content_type=l.asm.qb).apply(null,arguments)},hi=l._wasm_set_request_body=function(){return(hi=l._wasm_set_request_body=l.asm.rb).apply(null,arguments)},yi=l._wasm_set_content_length=function(){return(yi=l._wasm_set_content_length=l.asm.sb).apply(null,arguments)},wi=l._wasm_set_cookies=function(){return(wi=l._wasm_set_cookies=l.asm.tb).apply(null,arguments)},Ei=l._wasm_set_php_code=function(){return(Ei=l._wasm_set_php_code=l.asm.ub).apply(null,arguments)},gi=l._wasm_set_request_port=function(){return(gi=l._wasm_set_request_port=l.asm.vb).apply(null,arguments)},Si=l._phpwasm_init_uploaded_files_hash=function(){return(Si=l._phpwasm_init_uploaded_files_hash=l.asm.wb).apply(null,arguments)},bi=l._phpwasm_register_uploaded_file=function(){return(bi=l._phpwasm_register_uploaded_file=l.asm.xb).apply(null,arguments)},ki=l._phpwasm_destroy_uploaded_files_hash=function(){return(ki=l._phpwasm_destroy_uploaded_files_hash=l.asm.yb).apply(null,arguments)},Rn=l._wasm_sapi_handle_request=function(){return(Rn=l._wasm_sapi_handle_request=l.asm.zb).apply(null,arguments)},Mn=l._php_wasm_init=function(){return(Mn=l._php_wasm_init=l.asm.Ab).apply(null,arguments)},Sr=l.___funcs_on_exit=function(){return(Sr=l.___funcs_on_exit=l.asm.Bb).apply(null,arguments)},gr=l._emscripten_builtin_memalign=function(){return(gr=l._emscripten_builtin_memalign=l.asm.Cb).apply(null,arguments)},we=l._setThrew=function(){return(we=l._setThrew=l.asm.Db).apply(null,arguments)},Oe=l.stackSave=function(){return(Oe=l.stackSave=l.asm.Eb).apply(null,arguments)},ye=l.stackRestore=function(){return(ye=l.stackRestore=l.asm.Fb).apply(null,arguments)},tr=l.stackAlloc=function(){return(tr=l.stackAlloc=l.asm.Gb).apply(null,arguments)},De=l.dynCall_viii=function(){return(De=l.dynCall_viii=l.asm.Hb).apply(null,arguments)},xe=l.dynCall_vii=function(){return(xe=l.dynCall_vii=l.asm.Ib).apply(null,arguments)},Ie=l.dynCall_vi=function(){return(Ie=l.dynCall_vi=l.asm.Jb).apply(null,arguments)},ar=l.dynCall_iii=function(){return(ar=l.dynCall_iii=l.asm.Kb).apply(null,arguments)},Be=l.dynCall_ii=function(){return(Be=l.dynCall_ii=l.asm.Lb).apply(null,arguments)},He=l.dynCall_v=function(){return(He=l.dynCall_v=l.asm.Mb).apply(null,arguments)},ur=l.dynCall_iiii=function(){return(ur=l.dynCall_iiii=l.asm.Nb).apply(null,arguments)},Qr=l.dynCall_viiiii=function(){return(Qr=l.dynCall_viiiii=l.asm.Ob).apply(null,arguments)},ot=l.dynCall_iiiii=function(){return(ot=l.dynCall_iiiii=l.asm.Pb).apply(null,arguments)},it=l.dynCall_iiiiiii=function(){return(it=l.dynCall_iiiiiii=l.asm.Qb).apply(null,arguments)},Dt=l.dynCall_iiiiii=function(){return(Dt=l.dynCall_iiiiii=l.asm.Rb).apply(null,arguments)},Ot=l.dynCall_i=function(){return(Ot=l.dynCall_i=l.asm.Sb).apply(null,arguments)},Nt=l.dynCall_viiii=function(){return(Nt=l.dynCall_viiii=l.asm.Tb).apply(null,arguments)},Tt=l.dynCall_iiiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiiii=l.asm.Ub).apply(null,arguments)},Ct=l.dynCall_viiiiiiiii=function(){return(Ct=l.dynCall_viiiiiiiii=l.asm.Vb).apply(null,arguments)},Ft=l.dynCall_viiiiii=function(){return(Ft=l.dynCall_viiiiii=l.asm.Wb).apply(null,arguments)},At=l.dynCall_iiiiiiii=function(){return(At=l.dynCall_iiiiiiii=l.asm.Xb).apply(null,arguments)},Pt=l._asyncify_start_unwind=function(){return(Pt=l._asyncify_start_unwind=l.asm.Yb).apply(null,arguments)},Rt=l._asyncify_stop_unwind=function(){return(Rt=l._asyncify_stop_unwind=l.asm.Zb).apply(null,arguments)},Mt=l._asyncify_start_rewind=function(){return(Mt=l._asyncify_start_rewind=l.asm._b).apply(null,arguments)},Lt=l._asyncify_stop_rewind=function(){return(Lt=l._asyncify_stop_rewind=l.asm.$b).apply(null,arguments)};function Vt(w,g,s,d){var r=Oe();try{De(w,g,s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function cn(w,g,s){var d=Oe();try{xe(w,g,s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function ln(w,g){var s=Oe();try{Ie(w,g)}catch(d){if(ye(s),d!==d+0)throw d;we(1,0)}}function pn(w,g,s,d,r,i,t){var a=Oe();try{return it(w,g,s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function hn(w){var g=Oe();try{He(w)}catch(s){if(ye(g),s!==s+0)throw s;we(1,0)}}function bn(w,g){var s=Oe();try{return Be(w,g)}catch(d){if(ye(s),d!==d+0)throw d;we(1,0)}}function Nn(w,g,s){var d=Oe();try{return ar(w,g,s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Tn(w){var g=Oe();try{return Ot(w)}catch(s){if(ye(g),s!==s+0)throw s;we(1,0)}}function Cn(w,g,s,d,r){var i=Oe();try{Nt(w,g,s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Ln(w,g,s,d,r){var i=Oe();try{return ot(w,g,s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Di(w,g,s,d){var r=Oe();try{return ur(w,g,s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function Oi(w,g,s,d,r,i,t){var a=Oe();try{Ft(w,g,s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Ni(w,g,s,d,r,i){var t=Oe();try{Qr(w,g,s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Ti(w,g,s,d,r,i,t,a,n,f){var v=Oe();try{return Tt(w,g,s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}function Ci(w,g,s,d,r,i){var t=Oe();try{return Dt(w,g,s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Fi(w,g,s,d,r,i,t,a,n,f){var v=Oe();try{Ct(w,g,s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}function Ai(w,g,s,d,r,i,t,a){var n=Oe();try{return At(w,g,s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Xt,l.FS=e;var kn;$e=function w(){kn||In(),kn||($e=w)};function In(w){if(w=w||Y,Re>0||(Wn(),Re>0))return;function g(){kn||(kn=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),g()},1)):g()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return In(),O}var Vc,Ku,Xu=Ki(()=>{"use strict";Vc=10558435,Ku=__dirname+"/php_7_1.wasm"});var Zu={};Wi(Zu,{dependenciesTotalSize:()=>Gc,dependencyFilename:()=>$u,init:()=>Xc});function Xc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(s,d)=>{throw d},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(s){return l.locateFile?l.locateFile(s,ae):ae+s}var Ye,nr,Me;function Lr(s){if(s instanceof mr)return;ce("exiting due to exception: "+s)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(s,d)=>(wr(),s=Le.normalize(s),V.readFileSync(s,d?void 0:"utf8")),Me=s=>{var d=Ye(s,!0);return d.buffer||(d=new Uint8Array(d)),d},nr=(s,d,r)=>{wr(),s=Le.normalize(s),V.readFile(s,function(i,t){i?r(i):d(t.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(s){if(!(s instanceof mr))throw s}),process.on("unhandledRejection",function(s){throw s}),te=(s,d)=>{if(_r())throw process.exitCode=s,d;Lr(d),process.exit(s)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(s,d){s||ue(d)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(s,d,r){for(var i=d+r,t=d;s[t]&&!(t>=i);)++t;if(t-d>16&&s.buffer&&at)return at.decode(s.subarray(d,t));for(var a="";d<t;){var n=s[d++];if(!(n&128)){a+=String.fromCharCode(n);continue}var f=s[d++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|f);continue}var v=s[d++]&63;if((n&240)==224?n=(n&15)<<12|f<<6|v:n=(n&7)<<18|f<<12|v<<6|s[d++]&63,n<65536)a+=String.fromCharCode(n);else{var u=n-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a}function ne(s,d){return s?We(de,s,d):""}function Xe(s,d,r,i){if(!(i>0))return 0;for(var t=r,a=r+i-1,n=0;n<s.length;++n){var f=s.charCodeAt(n);if(f>=55296&&f<=57343){var v=s.charCodeAt(++n);f=65536+((f&1023)<<10)|v&1023}if(f<=127){if(r>=a)break;d[r++]=f}else if(f<=2047){if(r+1>=a)break;d[r++]=192|f>>6,d[r++]=128|f&63}else if(f<=65535){if(r+2>=a)break;d[r++]=224|f>>12,d[r++]=128|f>>6&63,d[r++]=128|f&63}else{if(r+3>=a)break;d[r++]=240|f>>18,d[r++]=128|f>>12&63,d[r++]=128|f>>6&63,d[r++]=128|f&63}}return d[r]=0,r-t}function Ae(s,d,r){return Xe(s,de,d,r)}function Pe(s){for(var d=0,r=0;r<s.length;++r){var i=s.charCodeAt(r);i<=127?d++:i<=2047?d+=2:i>=55296&&i<=57343?(d+=4,++r):d+=3}return d}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(s){Cr=s,l.HEAP8=$=new Int8Array(s),l.HEAP16=Ee=new Int16Array(s),l.HEAP32=h=new Int32Array(s),l.HEAPU8=de=new Uint8Array(s),l.HEAPU16=st=new Uint16Array(s),l.HEAPU32=H=new Uint32Array(s),l.HEAPF32=Bn=new Float32Array(s),l.HEAPF64=ut=new Float64Array(s)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Sr(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(s){ct.unshift(s)}function Kn(s){lt.unshift(s)}function Gn(s){dt.unshift(s)}var Re=0,Ar=null,$e=null;function Qi(s){return s}function vr(s){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(s){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var d=$e;$e=null,d()}}function ue(s){l.onAbort&&l.onAbort(s),s="Aborted("+s+")",ce(s),Ce=!0,Ge=1,s+=". Build with -sASSERTIONS for more info.";var d=new WebAssembly.RuntimeError(s);throw d}var Xn="data:application/octet-stream;base64,";function vt(s){return s.startsWith(Xn)}var _e;_e=$u,vt(_e)||(_e=cr(_e));function mt(s){try{if(s==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(s);throw"both async and sync fetching of the wasm failed"}catch(d){ue(d)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(s){if(!s.ok)throw"failed to load wasm binary file at '"+_e+"'";return s.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var s={a:ke};function d(n,f){var v=n.exports;v=X.instrumentWasmExports(v),l.asm=v,or=l.asm.Sa,ft(or.buffer),xn=l.asm.cb,Kn(l.asm.Ta),Ze("wasm-instantiate")}vr("wasm-instantiate");function r(n){d(n.instance)}function i(n){return $n().then(function(f){return WebAssembly.instantiate(f,s)}).then(function(f){return f}).then(n,function(f){ce("failed to asynchronously prepare wasm: "+f),ue(f)})}function t(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(n){var f=WebAssembly.instantiateStreaming(n,s);return f.then(r,function(v){return ce("wasm streaming compile failed: "+v),ce("falling back to ArrayBuffer instantiation"),i(r)})}):i(r)}if(l.instantiateWasm)try{var a=l.instantiateWasm(s,d);return a=X.instrumentWasmExports(a),a}catch(n){return ce("Module.instantiateWasm callback failed with error: "+n),!1}return t(),{}}var P,q;function mr(s){this.name="ExitStatus",this.message="Program terminated with exit("+s+")",this.status=s}function pr(s){for(;s.length>0;)s.shift()(l)}function pt(s){if(s instanceof mr||s=="unwind")return Ge;te(1,s)}function ht(s,d){$.set(s,d)}function Jn(s,d,r,i){ue("Assertion failed: "+ne(s)+", at: "+[d?ne(d):"unknown filename",r,i?ne(i):"unknown function"])}function Qn(s,d){(function(r){Ie.apply(null,[s,r])})(d)}var U={isAbs:s=>s.charAt(0)==="/",splitPath:s=>{var d=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return d.exec(s).slice(1)},normalizeArray:(s,d)=>{for(var r=0,i=s.length-1;i>=0;i--){var t=s[i];t==="."?s.splice(i,1):t===".."?(s.splice(i,1),r++):r&&(s.splice(i,1),r--)}if(d)for(;r;r--)s.unshift("..");return s},normalize:s=>{var d=U.isAbs(s),r=s.substr(-1)==="/";return s=U.normalizeArray(s.split("/").filter(i=>!!i),!d).join("/"),!s&&!d&&(s="."),s&&r&&(s+="/"),(d?"/":"")+s},dirname:s=>{var d=U.splitPath(s),r=d[0],i=d[1];return!r&&!i?".":(i&&(i=i.substr(0,i.length-1)),r+i)},basename:s=>{if(s==="/")return"/";s=U.normalize(s),s=s.replace(/\/$/,"");var d=s.lastIndexOf("/");return d===-1?s:s.substr(d+1)},join:function(){var s=Array.prototype.slice.call(arguments);return U.normalize(s.join("/"))},join2:(s,d)=>U.normalize(s+"/"+d)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var s=new Uint8Array(1);return()=>(crypto.getRandomValues(s),s[0])}else if(Z)try{var d=require("crypto");return()=>d.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var s="",d=!1,r=arguments.length-1;r>=-1&&!d;r--){var i=r>=0?arguments[r]:e.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";s=i+"/"+s,d=U.isAbs(i)}return s=U.normalizeArray(s.split("/").filter(t=>!!t),!d).join("/"),(d?"/":"")+s||"."},relative:(s,d)=>{s=ge.resolve(s).substr(1),d=ge.resolve(d).substr(1);function r(u){for(var o=0;o<u.length&&u[o]==="";o++);for(var c=u.length-1;c>=0&&u[c]==="";c--);return o>c?[]:u.slice(o,c-o+1)}for(var i=r(s.split("/")),t=r(d.split("/")),a=Math.min(i.length,t.length),n=a,f=0;f<a;f++)if(i[f]!==t[f]){n=f;break}for(var v=[],f=n;f<i.length;f++)v.push("..");return v=v.concat(t.slice(n)),v.join("/")}};function Je(s,d,r){var i=r>0?r:Pe(s)+1,t=new Array(i),a=Xe(s,t,0,t.length);return d&&(t.length=a),t}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(s,d){Se.ttys[s]={input:[],output:[],ops:d},e.registerDevice(s,Se.stream_ops)},stream_ops:{open:function(s){var d=Se.ttys[s.node.rdev];if(!d)throw new e.ErrnoError(43);s.tty=d,s.seekable=!1},close:function(s){s.tty.ops.fsync(s.tty)},fsync:function(s){s.tty.ops.fsync(s.tty)},read:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.get_char)throw new e.ErrnoError(60);for(var a=0,n=0;n<i;n++){var f;try{f=s.tty.ops.get_char(s.tty)}catch{throw new e.ErrnoError(29)}if(f===void 0&&a===0)throw new e.ErrnoError(6);if(f==null)break;a++,d[r+n]=f}return a&&(s.node.timestamp=Date.now()),a},write:function(s,d,r,i,t){if(!s.tty||!s.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var a=0;a<i;a++)s.tty.ops.put_char(s.tty,d[r+a])}catch{throw new e.ErrnoError(29)}return i&&(s.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(s){if(!s.input.length){var d=null;if(Z){var r=256,i=Buffer.alloc(r),t=0;try{t=V.readSync(process.stdin.fd,i,0,r,-1)}catch(a){if(a.toString().includes("EOF"))t=0;else throw a}t>0?d=i.slice(0,t).toString("utf-8"):d=null}else typeof window<"u"&&typeof window.prompt=="function"?(d=window.prompt("Input: "),d!==null&&(d+=`
|
|
29
29
|
`)):typeof readline=="function"&&(d=readline(),d!==null&&(d+=`
|
|
30
30
|
`));if(!d)return null;s.input=Je(d,!0)}return s.input.shift()},put_char:function(s,d){d===null||d===10?(Qe(We(s.output,0)),s.output=[]):d!=0&&s.output.push(d)},fsync:function(s){s.output&&s.output.length>0&&(Qe(We(s.output,0)),s.output=[])}},default_tty1_ops:{put_char:function(s,d){d===null||d===10?(ce(We(s.output,0)),s.output=[]):d!=0&&s.output.push(d)},fsync:function(s){s.output&&s.output.length>0&&(ce(We(s.output,0)),s.output=[])}}};function Pr(s,d){return de.fill(0,s,s+d),s}function ro(s,d){return Math.ceil(s/d)*d}function Rr(s){s=ro(s,65536);var d=gr(65536,s);return d?Pr(d,s):0}var L={ops_table:null,mount:function(s){return L.createNode(null,"/",16895,0)},createNode:function(s,d,r,i){if(e.isBlkdev(r)||e.isFIFO(r))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var t=e.createNode(s,d,r,i);return e.isDir(t.mode)?(t.node_ops=L.ops_table.dir.node,t.stream_ops=L.ops_table.dir.stream,t.contents={}):e.isFile(t.mode)?(t.node_ops=L.ops_table.file.node,t.stream_ops=L.ops_table.file.stream,t.usedBytes=0,t.contents=null):e.isLink(t.mode)?(t.node_ops=L.ops_table.link.node,t.stream_ops=L.ops_table.link.stream):e.isChrdev(t.mode)&&(t.node_ops=L.ops_table.chrdev.node,t.stream_ops=L.ops_table.chrdev.stream),t.timestamp=Date.now(),s&&(s.contents[d]=t,s.timestamp=t.timestamp),t},getFileDataAsTypedArray:function(s){return s.contents?s.contents.subarray?s.contents.subarray(0,s.usedBytes):new Uint8Array(s.contents):new Uint8Array(0)},expandFileStorage:function(s,d){var r=s.contents?s.contents.length:0;if(!(r>=d)){var i=1024*1024;d=Math.max(d,r*(r<i?2:1.125)>>>0),r!=0&&(d=Math.max(d,256));var t=s.contents;s.contents=new Uint8Array(d),s.usedBytes>0&&s.contents.set(t.subarray(0,s.usedBytes),0)}},resizeFileStorage:function(s,d){if(s.usedBytes!=d)if(d==0)s.contents=null,s.usedBytes=0;else{var r=s.contents;s.contents=new Uint8Array(d),r&&s.contents.set(r.subarray(0,Math.min(d,s.usedBytes))),s.usedBytes=d}},node_ops:{getattr:function(s){var d={};return d.dev=e.isChrdev(s.mode)?s.id:1,d.ino=s.id,d.mode=s.mode,d.nlink=1,d.uid=0,d.gid=0,d.rdev=s.rdev,e.isDir(s.mode)?d.size=4096:e.isFile(s.mode)?d.size=s.usedBytes:e.isLink(s.mode)?d.size=s.link.length:d.size=0,d.atime=new Date(s.timestamp),d.mtime=new Date(s.timestamp),d.ctime=new Date(s.timestamp),d.blksize=4096,d.blocks=Math.ceil(d.size/d.blksize),d},setattr:function(s,d){d.mode!==void 0&&(s.mode=d.mode),d.timestamp!==void 0&&(s.timestamp=d.timestamp),d.size!==void 0&&L.resizeFileStorage(s,d.size)},lookup:function(s,d){throw e.genericErrors[44]},mknod:function(s,d,r,i){return L.createNode(s,d,r,i)},rename:function(s,d,r){if(e.isDir(s.mode)){var i;try{i=e.lookupNode(d,r)}catch{}if(i)for(var t in i.contents)throw new e.ErrnoError(55)}delete s.parent.contents[s.name],s.parent.timestamp=Date.now(),s.name=r,d.contents[r]=s,d.timestamp=s.parent.timestamp,s.parent=d},unlink:function(s,d){delete s.contents[d],s.timestamp=Date.now()},rmdir:function(s,d){var r=e.lookupNode(s,d);for(var i in r.contents)throw new e.ErrnoError(55);delete s.contents[d],s.timestamp=Date.now()},readdir:function(s){var d=[".",".."];for(var r in s.contents)s.contents.hasOwnProperty(r)&&d.push(r);return d},symlink:function(s,d,r){var i=L.createNode(s,d,41471,0);return i.link=r,i},readlink:function(s){if(!e.isLink(s.mode))throw new e.ErrnoError(28);return s.link}},stream_ops:{read:function(s,d,r,i,t){var a=s.node.contents;if(t>=s.node.usedBytes)return 0;var n=Math.min(s.node.usedBytes-t,i);if(n>8&&a.subarray)d.set(a.subarray(t,t+n),r);else for(var f=0;f<n;f++)d[r+f]=a[t+f];return n},write:function(s,d,r,i,t,a){if(d.buffer===$.buffer&&(a=!1),!i)return 0;var n=s.node;if(n.timestamp=Date.now(),d.subarray&&(!n.contents||n.contents.subarray)){if(a)return n.contents=d.subarray(r,r+i),n.usedBytes=i,i;if(n.usedBytes===0&&t===0)return n.contents=d.slice(r,r+i),n.usedBytes=i,i;if(t+i<=n.usedBytes)return n.contents.set(d.subarray(r,r+i),t),i}if(L.expandFileStorage(n,t+i),n.contents.subarray&&d.subarray)n.contents.set(d.subarray(r,r+i),t);else for(var f=0;f<i;f++)n.contents[t+f]=d[r+f];return n.usedBytes=Math.max(n.usedBytes,t+i),i},llseek:function(s,d,r){var i=d;if(r===1?i+=s.position:r===2&&e.isFile(s.node.mode)&&(i+=s.node.usedBytes),i<0)throw new e.ErrnoError(28);return i},allocate:function(s,d,r){L.expandFileStorage(s.node,d+r),s.node.usedBytes=Math.max(s.node.usedBytes,d+r)},mmap:function(s,d,r,i,t){if(!e.isFile(s.node.mode))throw new e.ErrnoError(43);var a,n,f=s.node.contents;if(!(t&2)&&f.buffer===Cr)n=!1,a=f.byteOffset;else{if((r>0||r+d<f.length)&&(f.subarray?f=f.subarray(r,r+d):f=Array.prototype.slice.call(f,r,r+d)),n=!0,a=Rr(d),!a)throw new e.ErrnoError(48);$.set(f,a)}return{ptr:a,allocated:n}},msync:function(s,d,r,i,t){return L.stream_ops.write(s,d,0,i,r,!1),0}}};function to(s,d,r,i){var t=i?"":"al "+s;nr(s,a=>{Ne(a,'Loading data file "'+s+'" failed (no arrayBuffer).'),d(new Uint8Array(a)),t&&Ze(t)},a=>{if(r)r();else throw'Loading data file "'+s+'" failed.'}),t&&vr(t)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var s=process.binding("constants");s.fs&&(s=s.fs),M.flagsForNodeMap={1024:s.O_APPEND,64:s.O_CREAT,128:s.O_EXCL,256:s.O_NOCTTY,0:s.O_RDONLY,2:s.O_RDWR,4096:s.O_SYNC,512:s.O_TRUNC,1:s.O_WRONLY,131072:s.O_NOFOLLOW}},convertNodeCode:s=>{var d=s.code;return yt[d]},mount:s=>M.createNode(null,"/",M.getMode(s.opts.root),0),createNode:(s,d,r,i)=>{if(!e.isDir(r)&&!e.isFile(r)&&!e.isLink(r))throw new e.ErrnoError(28);var t=e.createNode(s,d,r);return t.node_ops=M.node_ops,t.stream_ops=M.stream_ops,t},getMode:s=>{var d;try{d=V.lstatSync(s),M.isWindows&&(d.mode=d.mode|(d.mode&292)>>2)}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}return d.mode},realPath:s=>{for(var d=[];s.parent!==s;)d.push(s.name),s=s.parent;return d.push(s.mount.opts.root),d.reverse(),U.join.apply(null,d)},flagsForNode:s=>{s&=-2097153,s&=-2049,s&=-32769,s&=-524289,s&=-65537;var d=0;for(var r in M.flagsForNodeMap)s&r&&(d|=M.flagsForNodeMap[r],s^=r);if(s)throw new e.ErrnoError(28);return d},node_ops:{getattr:s=>{var d=M.realPath(s),r;try{r=V.lstatSync(d)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}return M.isWindows&&!r.blksize&&(r.blksize=4096),M.isWindows&&!r.blocks&&(r.blocks=(r.size+r.blksize-1)/r.blksize|0),{dev:r.dev,ino:r.ino,mode:r.mode,nlink:r.nlink,uid:r.uid,gid:r.gid,rdev:r.rdev,size:r.size,atime:r.atime,mtime:r.mtime,ctime:r.ctime,blksize:r.blksize,blocks:r.blocks}},setattr:(s,d)=>{var r=M.realPath(s);try{if(d.mode!==void 0&&(V.chmodSync(r,d.mode),s.mode=d.mode),d.timestamp!==void 0){var i=new Date(d.timestamp);V.utimesSync(r,i,i)}d.size!==void 0&&V.truncateSync(r,d.size)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},lookup:(s,d)=>{var r=U.join2(M.realPath(s),d),i=M.getMode(r);return M.createNode(s,d,i)},mknod:(s,d,r,i)=>{var t=M.createNode(s,d,r,i),a=M.realPath(t);try{e.isDir(t.mode)?V.mkdirSync(a,t.mode):V.writeFileSync(a,"",{mode:t.mode})}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}return t},rename:(s,d,r)=>{var i=M.realPath(s),t=U.join2(M.realPath(d),r);try{V.renameSync(i,t)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}s.name=r},unlink:(s,d)=>{var r=U.join2(M.realPath(s),d);try{V.unlinkSync(r)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}},rmdir:(s,d)=>{var r=U.join2(M.realPath(s),d);try{V.rmdirSync(r)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}},readdir:s=>{var d=M.realPath(s);try{return V.readdirSync(d)}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}},symlink:(s,d,r)=>{var i=U.join2(M.realPath(s),d);try{V.symlinkSync(r,i)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},readlink:s=>{var d=M.realPath(s);try{return d=V.readlinkSync(d),d=Le.relative(Le.resolve(s.mount.opts.root),d),d}catch(r){throw r.code?r.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(r)):r}}},stream_ops:{open:s=>{var d=M.realPath(s.node);try{e.isFile(s.node.mode)&&(s.nfd=V.openSync(d,M.flagsForNode(s.flags)))}catch(r){throw r.code?new e.ErrnoError(M.convertNodeCode(r)):r}},close:s=>{try{e.isFile(s.node.mode)&&s.nfd&&V.closeSync(s.nfd)}catch(d){throw d.code?new e.ErrnoError(M.convertNodeCode(d)):d}},read:(s,d,r,i,t)=>{if(i===0)return 0;try{return V.readSync(s.nfd,Buffer.from(d.buffer),r,i,t)}catch(a){throw new e.ErrnoError(M.convertNodeCode(a))}},write:(s,d,r,i,t)=>{try{return V.writeSync(s.nfd,Buffer.from(d.buffer),r,i,t)}catch(a){throw new e.ErrnoError(M.convertNodeCode(a))}},llseek:(s,d,r)=>{var i=d;if(r===1)i+=s.position;else if(r===2&&e.isFile(s.node.mode))try{var t=V.fstatSync(s.nfd);i+=t.size}catch(a){throw new e.ErrnoError(M.convertNodeCode(a))}if(i<0)throw new e.ErrnoError(28);return i},mmap:(s,d,r,i,t)=>{if(!e.isFile(s.node.mode))throw new e.ErrnoError(43);var a=Rr(d);return M.stream_ops.read(s,$,a,d,r),{ptr:a,allocated:!0}},msync:(s,d,r,i,t)=>(M.stream_ops.write(s,d,0,i,r,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(s,d={})=>{if(s=ge.resolve(e.cwd(),s),!s)return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};if(d=Object.assign(r,d),d.recurse_count>8)throw new e.ErrnoError(32);for(var i=U.normalizeArray(s.split("/").filter(c=>!!c),!1),t=e.root,a="/",n=0;n<i.length;n++){var f=n===i.length-1;if(f&&d.parent)break;if(t=e.lookupNode(t,i[n]),a=U.join2(a,i[n]),e.isMountpoint(t)&&(!f||f&&d.follow_mount)&&(t=t.mounted.root),!f||d.follow)for(var v=0;e.isLink(t.mode);){var u=e.readlink(a);a=ge.resolve(U.dirname(a),u);var o=e.lookupPath(a,{recurse_count:d.recurse_count+1});if(t=o.node,v++>40)throw new e.ErrnoError(32)}}return{path:a,node:t}},getPath:s=>{for(var d;;){if(e.isRoot(s)){var r=s.mount.mountpoint;return d?r[r.length-1]!=="/"?r+"/"+d:r+d:r}d=d?s.name+"/"+d:s.name,s=s.parent}},hashName:(s,d)=>{for(var r=0,i=0;i<d.length;i++)r=(r<<5)-r+d.charCodeAt(i)|0;return(s+r>>>0)%e.nameTable.length},hashAddNode:s=>{var d=e.hashName(s.parent.id,s.name);s.name_next=e.nameTable[d],e.nameTable[d]=s},hashRemoveNode:s=>{var d=e.hashName(s.parent.id,s.name);if(e.nameTable[d]===s)e.nameTable[d]=s.name_next;else for(var r=e.nameTable[d];r;){if(r.name_next===s){r.name_next=s.name_next;break}r=r.name_next}},lookupNode:(s,d)=>{var r=e.mayLookup(s);if(r)throw new e.ErrnoError(r,s);for(var i=e.hashName(s.id,d),t=e.nameTable[i];t;t=t.name_next){var a=t.name;if(t.parent.id===s.id&&a===d)return t}return e.lookup(s,d)},createNode:(s,d,r,i)=>{var t=new e.FSNode(s,d,r,i);return e.hashAddNode(t),t},destroyNode:s=>{e.hashRemoveNode(s)},isRoot:s=>s===s.parent,isMountpoint:s=>!!s.mounted,isFile:s=>(s&61440)===32768,isDir:s=>(s&61440)===16384,isLink:s=>(s&61440)===40960,isChrdev:s=>(s&61440)===8192,isBlkdev:s=>(s&61440)===24576,isFIFO:s=>(s&61440)===4096,isSocket:s=>(s&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:s=>{var d=e.flagModes[s];if(typeof d>"u")throw new Error("Unknown file open mode: "+s);return d},flagsToPermissionString:s=>{var d=["r","w","rw"][s&3];return s&512&&(d+="w"),d},nodePermissions:(s,d)=>e.ignorePermissions?0:d.includes("r")&&!(s.mode&292)||d.includes("w")&&!(s.mode&146)||d.includes("x")&&!(s.mode&73)?2:0,mayLookup:s=>{var d=e.nodePermissions(s,"x");return d||(s.node_ops.lookup?0:2)},mayCreate:(s,d)=>{try{var r=e.lookupNode(s,d);return 20}catch{}return e.nodePermissions(s,"wx")},mayDelete:(s,d,r)=>{var i;try{i=e.lookupNode(s,d)}catch(a){return a.errno}var t=e.nodePermissions(s,"wx");if(t)return t;if(r){if(!e.isDir(i.mode))return 54;if(e.isRoot(i)||e.getPath(i)===e.cwd())return 10}else if(e.isDir(i.mode))return 31;return 0},mayOpen:(s,d)=>s?e.isLink(s.mode)?32:e.isDir(s.mode)&&(e.flagsToPermissionString(d)!=="r"||d&512)?31:e.nodePermissions(s,e.flagsToPermissionString(d)):44,MAX_OPEN_FDS:4096,nextfd:(s=0,d=e.MAX_OPEN_FDS)=>{for(var r=s;r<=d;r++)if(!e.streams[r])return r;throw new e.ErrnoError(33)},getStream:s=>e.streams[s],createStream:(s,d,r)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),s=Object.assign(new e.FSStream,s);var i=e.nextfd(d,r);return s.fd=i,e.streams[i]=s,s},closeStream:s=>{e.streams[s]=null},chrdev_stream_ops:{open:s=>{var d=e.getDevice(s.node.rdev);s.stream_ops=d.stream_ops,s.stream_ops.open&&s.stream_ops.open(s)},llseek:()=>{throw new e.ErrnoError(70)}},major:s=>s>>8,minor:s=>s&255,makedev:(s,d)=>s<<8|d,registerDevice:(s,d)=>{e.devices[s]={stream_ops:d}},getDevice:s=>e.devices[s],getMounts:s=>{for(var d=[],r=[s];r.length;){var i=r.pop();d.push(i),r.push.apply(r,i.mounts)}return d},syncfs:(s,d)=>{typeof s=="function"&&(d=s,s=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=e.getMounts(e.root.mount),i=0;function t(n){return e.syncFSRequests--,d(n)}function a(n){if(n)return a.errored?void 0:(a.errored=!0,t(n));++i>=r.length&&t(null)}r.forEach(n=>{if(!n.type.syncfs)return a(null);n.type.syncfs(n,s,a)})},mount:(s,d,r)=>{var i=r==="/",t=!r,a;if(i&&e.root)throw new e.ErrnoError(10);if(!i&&!t){var n=e.lookupPath(r,{follow_mount:!1});if(r=n.path,a=n.node,e.isMountpoint(a))throw new e.ErrnoError(10);if(!e.isDir(a.mode))throw new e.ErrnoError(54)}var f={type:s,opts:d,mountpoint:r,mounts:[]},v=s.mount(f);return v.mount=f,f.root=v,i?e.root=v:a&&(a.mounted=f,a.mount&&a.mount.mounts.push(f)),v},unmount:s=>{var d=e.lookupPath(s,{follow_mount:!1});if(!e.isMountpoint(d.node))throw new e.ErrnoError(28);var r=d.node,i=r.mounted,t=e.getMounts(i);Object.keys(e.nameTable).forEach(n=>{for(var f=e.nameTable[n];f;){var v=f.name_next;t.includes(f.mount)&&e.destroyNode(f),f=v}}),r.mounted=null;var a=r.mount.mounts.indexOf(i);r.mount.mounts.splice(a,1)},lookup:(s,d)=>s.node_ops.lookup(s,d),mknod:(s,d,r)=>{var i=e.lookupPath(s,{parent:!0}),t=i.node,a=U.basename(s);if(!a||a==="."||a==="..")throw new e.ErrnoError(28);var n=e.mayCreate(t,a);if(n)throw new e.ErrnoError(n);if(!t.node_ops.mknod)throw new e.ErrnoError(63);return t.node_ops.mknod(t,a,d,r)},create:(s,d)=>(d=d!==void 0?d:438,d&=4095,d|=32768,e.mknod(s,d,0)),mkdir:(s,d)=>(d=d!==void 0?d:511,d&=1023,d|=16384,e.mknod(s,d,0)),mkdirTree:(s,d)=>{for(var r=s.split("/"),i="",t=0;t<r.length;++t)if(r[t]){i+="/"+r[t];try{e.mkdir(i,d)}catch(a){if(a.errno!=20)throw a}}},mkdev:(s,d,r)=>(typeof r>"u"&&(r=d,d=438),d|=8192,e.mknod(s,d,r)),symlink:(s,d)=>{if(!ge.resolve(s))throw new e.ErrnoError(44);var r=e.lookupPath(d,{parent:!0}),i=r.node;if(!i)throw new e.ErrnoError(44);var t=U.basename(d),a=e.mayCreate(i,t);if(a)throw new e.ErrnoError(a);if(!i.node_ops.symlink)throw new e.ErrnoError(63);return i.node_ops.symlink(i,t,s)},rename:(s,d)=>{var r=U.dirname(s),i=U.dirname(d),t=U.basename(s),a=U.basename(d),n,f,v;if(n=e.lookupPath(s,{parent:!0}),f=n.node,n=e.lookupPath(d,{parent:!0}),v=n.node,!f||!v)throw new e.ErrnoError(44);if(f.mount!==v.mount)throw new e.ErrnoError(75);var u=e.lookupNode(f,t),o=ge.relative(s,i);if(o.charAt(0)!==".")throw new e.ErrnoError(28);if(o=ge.relative(d,r),o.charAt(0)!==".")throw new e.ErrnoError(55);var c;try{c=e.lookupNode(v,a)}catch{}if(u!==c){var _=e.isDir(u.mode),m=e.mayDelete(f,t,_);if(m)throw new e.ErrnoError(m);if(m=c?e.mayDelete(v,a,_):e.mayCreate(v,a),m)throw new e.ErrnoError(m);if(!f.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(u)||c&&e.isMountpoint(c))throw new e.ErrnoError(10);if(v!==f&&(m=e.nodePermissions(f,"w"),m))throw new e.ErrnoError(m);e.hashRemoveNode(u);try{f.node_ops.rename(u,v,a)}catch(p){throw p}finally{e.hashAddNode(u)}}},rmdir:s=>{var d=e.lookupPath(s,{parent:!0}),r=d.node,i=U.basename(s),t=e.lookupNode(r,i),a=e.mayDelete(r,i,!0);if(a)throw new e.ErrnoError(a);if(!r.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(t))throw new e.ErrnoError(10);r.node_ops.rmdir(r,i),e.destroyNode(t)},readdir:s=>{var d=e.lookupPath(s,{follow:!0}),r=d.node;if(!r.node_ops.readdir)throw new e.ErrnoError(54);return r.node_ops.readdir(r)},unlink:s=>{var d=e.lookupPath(s,{parent:!0}),r=d.node;if(!r)throw new e.ErrnoError(44);var i=U.basename(s),t=e.lookupNode(r,i),a=e.mayDelete(r,i,!1);if(a)throw new e.ErrnoError(a);if(!r.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(t))throw new e.ErrnoError(10);r.node_ops.unlink(r,i),e.destroyNode(t)},readlink:s=>{var d=e.lookupPath(s),r=d.node;if(!r)throw new e.ErrnoError(44);if(!r.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(r.parent),r.node_ops.readlink(r))},stat:(s,d)=>{var r=e.lookupPath(s,{follow:!d}),i=r.node;if(!i)throw new e.ErrnoError(44);if(!i.node_ops.getattr)throw new e.ErrnoError(63);return i.node_ops.getattr(i)},lstat:s=>e.stat(s,!0),chmod:(s,d,r)=>{var i;if(typeof s=="string"){var t=e.lookupPath(s,{follow:!r});i=t.node}else i=s;if(!i.node_ops.setattr)throw new e.ErrnoError(63);i.node_ops.setattr(i,{mode:d&4095|i.mode&-4096,timestamp:Date.now()})},lchmod:(s,d)=>{e.chmod(s,d,!0)},fchmod:(s,d)=>{var r=e.getStream(s);if(!r)throw new e.ErrnoError(8);e.chmod(r.node,d)},chown:(s,d,r,i)=>{var t;if(typeof s=="string"){var a=e.lookupPath(s,{follow:!i});t=a.node}else t=s;if(!t.node_ops.setattr)throw new e.ErrnoError(63);t.node_ops.setattr(t,{timestamp:Date.now()})},lchown:(s,d,r)=>{e.chown(s,d,r,!0)},fchown:(s,d,r)=>{var i=e.getStream(s);if(!i)throw new e.ErrnoError(8);e.chown(i.node,d,r)},truncate:(s,d)=>{if(d<0)throw new e.ErrnoError(28);var r;if(typeof s=="string"){var i=e.lookupPath(s,{follow:!0});r=i.node}else r=s;if(!r.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(r.mode))throw new e.ErrnoError(31);if(!e.isFile(r.mode))throw new e.ErrnoError(28);var t=e.nodePermissions(r,"w");if(t)throw new e.ErrnoError(t);r.node_ops.setattr(r,{size:d,timestamp:Date.now()})},ftruncate:(s,d)=>{var r=e.getStream(s);if(!r)throw new e.ErrnoError(8);if(!(r.flags&2097155))throw new e.ErrnoError(28);e.truncate(r.node,d)},utime:(s,d,r)=>{var i=e.lookupPath(s,{follow:!0}),t=i.node;t.node_ops.setattr(t,{timestamp:Math.max(d,r)})},open:(s,d,r)=>{if(s==="")throw new e.ErrnoError(44);d=typeof d=="string"?e.modeStringToFlags(d):d,r=typeof r>"u"?438:r,d&64?r=r&4095|32768:r=0;var i;if(typeof s=="object")i=s;else{s=U.normalize(s);try{var t=e.lookupPath(s,{follow:!(d&131072)});i=t.node}catch{}}var a=!1;if(d&64)if(i){if(d&128)throw new e.ErrnoError(20)}else i=e.mknod(s,r,0),a=!0;if(!i)throw new e.ErrnoError(44);if(e.isChrdev(i.mode)&&(d&=-513),d&65536&&!e.isDir(i.mode))throw new e.ErrnoError(54);if(!a){var n=e.mayOpen(i,d);if(n)throw new e.ErrnoError(n)}d&512&&!a&&e.truncate(i,0),d&=-131713;var f=e.createStream({node:i,path:e.getPath(i),flags:d,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return f.stream_ops.open&&f.stream_ops.open(f),l.logReadFiles&&!(d&1)&&(e.readFiles||(e.readFiles={}),s in e.readFiles||(e.readFiles[s]=1)),f},close:s=>{if(e.isClosed(s))throw new e.ErrnoError(8);s.getdents&&(s.getdents=null);try{s.stream_ops.close&&s.stream_ops.close(s)}catch(d){throw d}finally{e.closeStream(s.fd)}s.fd=null},isClosed:s=>s.fd===null,llseek:(s,d,r)=>{if(e.isClosed(s))throw new e.ErrnoError(8);if(!s.seekable||!s.stream_ops.llseek)throw new e.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new e.ErrnoError(28);return s.position=s.stream_ops.llseek(s,d,r),s.ungotten=[],s.position},read:(s,d,r,i,t)=>{if(i<0||t<0)throw new e.ErrnoError(28);if(e.isClosed(s))throw new e.ErrnoError(8);if((s.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(s.node.mode))throw new e.ErrnoError(31);if(!s.stream_ops.read)throw new e.ErrnoError(28);var a=typeof t<"u";if(!a)t=s.position;else if(!s.seekable)throw new e.ErrnoError(70);var n=s.stream_ops.read(s,d,r,i,t);return a||(s.position+=n),n},write:(s,d,r,i,t,a)=>{if(i<0||t<0)throw new e.ErrnoError(28);if(e.isClosed(s))throw new e.ErrnoError(8);if(!(s.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(s.node.mode))throw new e.ErrnoError(31);if(!s.stream_ops.write)throw new e.ErrnoError(28);s.seekable&&s.flags&1024&&e.llseek(s,0,2);var n=typeof t<"u";if(!n)t=s.position;else if(!s.seekable)throw new e.ErrnoError(70);var f=s.stream_ops.write(s,d,r,i,t,a);return n||(s.position+=f),f},allocate:(s,d,r)=>{if(e.isClosed(s))throw new e.ErrnoError(8);if(d<0||r<=0)throw new e.ErrnoError(28);if(!(s.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(s.node.mode)&&!e.isDir(s.node.mode))throw new e.ErrnoError(43);if(!s.stream_ops.allocate)throw new e.ErrnoError(138);s.stream_ops.allocate(s,d,r)},mmap:(s,d,r,i,t)=>{if(i&2&&!(t&2)&&(s.flags&2097155)!==2)throw new e.ErrnoError(2);if((s.flags&2097155)===1)throw new e.ErrnoError(2);if(!s.stream_ops.mmap)throw new e.ErrnoError(43);return s.stream_ops.mmap(s,d,r,i,t)},msync:(s,d,r,i,t)=>s.stream_ops.msync?s.stream_ops.msync(s,d,r,i,t):0,munmap:s=>0,ioctl:(s,d,r)=>{if(!s.stream_ops.ioctl)throw new e.ErrnoError(59);return s.stream_ops.ioctl(s,d,r)},readFile:(s,d={})=>{if(d.flags=d.flags||0,d.encoding=d.encoding||"binary",d.encoding!=="utf8"&&d.encoding!=="binary")throw new Error('Invalid encoding type "'+d.encoding+'"');var r,i=e.open(s,d.flags),t=e.stat(s),a=t.size,n=new Uint8Array(a);return e.read(i,n,0,a,0),d.encoding==="utf8"?r=We(n,0):d.encoding==="binary"&&(r=n),e.close(i),r},writeFile:(s,d,r={})=>{r.flags=r.flags||577;var i=e.open(s,r.flags,r.mode);if(typeof d=="string"){var t=new Uint8Array(Pe(d)+1),a=Xe(d,t,0,t.length);e.write(i,t,0,a,void 0,r.canOwn)}else if(ArrayBuffer.isView(d))e.write(i,d,0,d.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");e.close(i)},cwd:()=>e.currentPath,chdir:s=>{var d=e.lookupPath(s,{follow:!0});if(d.node===null)throw new e.ErrnoError(44);if(!e.isDir(d.node.mode))throw new e.ErrnoError(54);var r=e.nodePermissions(d.node,"x");if(r)throw new e.ErrnoError(r);e.currentPath=d.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(d,r,i,t,a)=>t}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var s=eo();e.createDevice("/dev","random",s),e.createDevice("/dev","urandom",s),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var s=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var d=e.createNode(s,"fd",16895,73);return d.node_ops={lookup:(r,i)=>{var t=+i,a=e.getStream(t);if(!a)throw new e.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>a.path}};return n.parent=n,n}},d}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var s=e.open("/dev/stdin",0),d=e.open("/dev/stdout",1),r=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(d,r){this.node=r,this.setErrno=function(i){this.errno=i},this.setErrno(d),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(s=>{e.genericErrors[s]=new e.ErrnoError(s),e.genericErrors[s].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(s,d,r)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=s||l.stdin,l.stdout=d||l.stdout,l.stderr=r||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,kr(0);for(var s=0;s<e.streams.length;s++){var d=e.streams[s];d&&e.close(d)}},getMode:(s,d)=>{var r=0;return s&&(r|=365),d&&(r|=146),r},findObject:(s,d)=>{var r=e.analyzePath(s,d);return r.exists?r.object:null},analyzePath:(s,d)=>{try{var r=e.lookupPath(s,{follow:!d});s=r.path}catch{}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=e.lookupPath(s,{parent:!0});i.parentExists=!0,i.parentPath=r.path,i.parentObject=r.node,i.name=U.basename(s),r=e.lookupPath(s,{follow:!d}),i.exists=!0,i.path=r.path,i.object=r.node,i.name=r.node.name,i.isRoot=r.path==="/"}catch(t){i.error=t.errno}return i},createPath:(s,d,r,i)=>{s=typeof s=="string"?s:e.getPath(s);for(var t=d.split("/").reverse();t.length;){var a=t.pop();if(a){var n=U.join2(s,a);try{e.mkdir(n)}catch{}s=n}}return n},createFile:(s,d,r,i,t)=>{var a=U.join2(typeof s=="string"?s:e.getPath(s),d),n=e.getMode(i,t);return e.create(a,n)},createDataFile:(s,d,r,i,t,a)=>{var n=d;s&&(s=typeof s=="string"?s:e.getPath(s),n=d?U.join2(s,d):s);var f=e.getMode(i,t),v=e.create(n,f);if(r){if(typeof r=="string"){for(var u=new Array(r.length),o=0,c=r.length;o<c;++o)u[o]=r.charCodeAt(o);r=u}e.chmod(v,f|146);var _=e.open(v,577);e.write(_,r,0,r.length,0,a),e.close(_),e.chmod(v,f)}return v},createDevice:(s,d,r,i)=>{var t=U.join2(typeof s=="string"?s:e.getPath(s),d),a=e.getMode(!!r,!!i);e.createDevice.major||(e.createDevice.major=64);var n=e.makedev(e.createDevice.major++,0);return e.registerDevice(n,{open:f=>{f.seekable=!1},close:f=>{i&&i.buffer&&i.buffer.length&&i(10)},read:(f,v,u,o,c)=>{for(var _=0,m=0;m<o;m++){var p;try{p=r()}catch{throw new e.ErrnoError(29)}if(p===void 0&&_===0)throw new e.ErrnoError(6);if(p==null)break;_++,v[u+m]=p}return _&&(f.node.timestamp=Date.now()),_},write:(f,v,u,o,c)=>{for(var _=0;_<o;_++)try{i(v[u+_])}catch{throw new e.ErrnoError(29)}return o&&(f.node.timestamp=Date.now()),_}}),e.mkdev(t,a,n)},forceLoadFile:s=>{if(s.isDevice||s.isFolder||s.link||s.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{s.contents=Je(Ye(s.url),!0),s.usedBytes=s.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(s,d,r,i,t)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(m){if(!(m>this.length-1||m<0)){var p=m%this.chunkSize,y=m/this.chunkSize|0;return this.getter(y)[p]}},a.prototype.setDataGetter=function(m){this.getter=m},a.prototype.cacheLength=function(){var m=new XMLHttpRequest;if(m.open("HEAD",r,!1),m.send(null),!(m.status>=200&&m.status<300||m.status===304))throw new Error("Couldn't load "+r+". Status: "+m.status);var p=Number(m.getResponseHeader("Content-length")),y,E=(y=m.getResponseHeader("Accept-Ranges"))&&y==="bytes",S=(y=m.getResponseHeader("Content-Encoding"))&&y==="gzip",b=1024*1024;E||(b=p);var k=(T,C)=>{if(T>C)throw new Error("invalid range ("+T+", "+C+") or no bytes requested!");if(C>p-1)throw new Error("only "+p+" bytes available! programmer error!");var A=new XMLHttpRequest;if(A.open("GET",r,!1),p!==b&&A.setRequestHeader("Range","bytes="+T+"-"+C),A.responseType="arraybuffer",A.overrideMimeType&&A.overrideMimeType("text/plain; charset=x-user-defined"),A.send(null),!(A.status>=200&&A.status<300||A.status===304))throw new Error("Couldn't load "+r+". Status: "+A.status);return A.response!==void 0?new Uint8Array(A.response||[]):Je(A.responseText||"",!0)},D=this;D.setDataGetter(T=>{var C=T*b,A=(T+1)*b-1;if(A=Math.min(A,p-1),typeof D.chunks[T]>"u"&&(D.chunks[T]=k(C,A)),typeof D.chunks[T]>"u")throw new Error("doXHR failed!");return D.chunks[T]}),(S||!p)&&(b=p=1,p=this.getter(0).length,b=p,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=p,this._chunkSize=b,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var n=new a;Object.defineProperties(n,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var f={isDevice:!1,contents:n}}else var f={isDevice:!1,url:r};var v=e.createFile(s,d,f,i,t);f.contents?v.contents=f.contents:f.url&&(v.contents=null,v.url=f.url),Object.defineProperties(v,{usedBytes:{get:function(){return this.contents.length}}});var u={},o=Object.keys(v.stream_ops);o.forEach(_=>{var m=v.stream_ops[_];u[_]=function(){return e.forceLoadFile(v),m.apply(null,arguments)}});function c(_,m,p,y,E){var S=_.node.contents;if(E>=S.length)return 0;var b=Math.min(S.length-E,y);if(S.slice)for(var k=0;k<b;k++)m[p+k]=S[E+k];else for(var k=0;k<b;k++)m[p+k]=S.get(E+k);return b}return u.read=(_,m,p,y,E)=>(e.forceLoadFile(v),c(_,m,p,y,E)),u.mmap=(_,m,p,y,E)=>{e.forceLoadFile(v);var S=Rr(m);if(!S)throw new e.ErrnoError(48);return c(_,$,S,m,p),{ptr:S,allocated:!0}},v.stream_ops=u,v},createPreloadedFile:(s,d,r,i,t,a,n,f,v,u)=>{var o=d?ge.resolve(U.join2(s,d)):s,c="cp "+o;function _(m){function p(y){u&&u(),f||e.createDataFile(s,d,y,i,t,v),a&&a(),Ze(c)}Browser.handledByPreloadPlugin(m,o,p,()=>{n&&n(),Ze(c)})||p(m)}vr(c),typeof r=="string"?to(r,m=>_(m),n):_(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(s,d,r)=>{d=d||(()=>{}),r=r||(()=>{});var i=e.indexedDB();try{var t=i.open(e.DB_NAME(),e.DB_VERSION)}catch(a){return r(a)}t.onupgradeneeded=()=>{Qe("creating db");var a=t.result;a.createObjectStore(e.DB_STORE_NAME)},t.onsuccess=()=>{var a=t.result,n=a.transaction([e.DB_STORE_NAME],"readwrite"),f=n.objectStore(e.DB_STORE_NAME),v=0,u=0,o=s.length;function c(){u==0?d():r()}s.forEach(_=>{var m=f.put(e.analyzePath(_).object.contents,_);m.onsuccess=()=>{v++,v+u==o&&c()},m.onerror=()=>{u++,v+u==o&&c()}}),n.onerror=r},t.onerror=r},loadFilesFromDB:(s,d,r)=>{d=d||(()=>{}),r=r||(()=>{});var i=e.indexedDB();try{var t=i.open(e.DB_NAME(),e.DB_VERSION)}catch(a){return r(a)}t.onupgradeneeded=r,t.onsuccess=()=>{var a=t.result;try{var n=a.transaction([e.DB_STORE_NAME],"readonly")}catch(_){r(_);return}var f=n.objectStore(e.DB_STORE_NAME),v=0,u=0,o=s.length;function c(){u==0?d():r()}s.forEach(_=>{var m=f.get(_);m.onsuccess=()=>{e.analyzePath(_).exists&&e.unlink(_),e.createDataFile(U.dirname(_),U.basename(_),m.result,!0,!0,!0),v++,v+u==o&&c()},m.onerror=()=>{u++,v+u==o&&c()}}),n.onerror=r},t.onerror=r}},N={DEFAULT_POLLMASK:5,calculateAt:function(s,d,r){if(U.isAbs(d))return d;var i;if(s===-100)i=e.cwd();else{var t=N.getStreamFromFD(s);i=t.path}if(d.length==0){if(!r)throw new e.ErrnoError(44);return i}return U.join2(i,d)},doStat:function(s,d,r){try{var i=s(d)}catch(t){if(t&&t.node&&U.normalize(d)!==U.normalize(e.getPath(t.node)))return-54;throw t}return h[r>>2]=i.dev,h[r+8>>2]=i.ino,h[r+12>>2]=i.mode,H[r+16>>2]=i.nlink,h[r+20>>2]=i.uid,h[r+24>>2]=i.gid,h[r+28>>2]=i.rdev,q=[i.size>>>0,(P=i.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+40>>2]=q[0],h[r+44>>2]=q[1],h[r+48>>2]=4096,h[r+52>>2]=i.blocks,q=[Math.floor(i.atime.getTime()/1e3)>>>0,(P=Math.floor(i.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+56>>2]=q[0],h[r+60>>2]=q[1],H[r+64>>2]=0,q=[Math.floor(i.mtime.getTime()/1e3)>>>0,(P=Math.floor(i.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+72>>2]=q[0],h[r+76>>2]=q[1],H[r+80>>2]=0,q=[Math.floor(i.ctime.getTime()/1e3)>>>0,(P=Math.floor(i.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+88>>2]=q[0],h[r+92>>2]=q[1],H[r+96>>2]=0,q=[i.ino>>>0,(P=i.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[r+104>>2]=q[0],h[r+108>>2]=q[1],0},doMsync:function(s,d,r,i,t){if(!e.isFile(d.node.mode))throw new e.ErrnoError(43);if(i&2)return 0;var a=de.slice(s,s+r);e.msync(d,a,t,r,i)},varargs:void 0,get:function(){N.varargs+=4;var s=h[N.varargs-4>>2];return s},getStr:function(s){var d=ne(s);return d},getStreamFromFD:function(s){var d=e.getStream(s);if(!d)throw new e.ErrnoError(8);return d}};function no(s,d,r,i,t){try{for(var a=0,n=d?h[d>>2]:0,f=d?h[d+4>>2]:0,v=r?h[r>>2]:0,u=r?h[r+4>>2]:0,o=i?h[i>>2]:0,c=i?h[i+4>>2]:0,_=0,m=0,p=0,y=0,E=0,S=0,b=(d?h[d>>2]:0)|(r?h[r>>2]:0)|(i?h[i>>2]:0),k=(d?h[d+4>>2]:0)|(r?h[r+4>>2]:0)|(i?h[i+4>>2]:0),D=function(z,K,B,x){return z<32?K&x:B&x},T=0;T<s;T++){var C=1<<T%32;if(D(T,b,k,C)){var A=N.getStreamFromFD(T),I=N.DEFAULT_POLLMASK;A.stream_ops?.poll&&(I=A.stream_ops.poll(A)),I&1&&D(T,n,f,C)&&(T<32?_=_|C:m=m|C,a++),I&4&&D(T,v,u,C)&&(T<32?p=p|C:y=y|C,a++),I&2&&D(T,o,c,C)&&(T<32?E=E|C:S=S|C,a++)}}return d&&(h[d>>2]=_,h[d+4>>2]=m),r&&(h[r>>2]=p,h[r+4>>2]=y),i&&(h[i>>2]=E,h[i+4>>2]=S),a}catch(z){if(typeof e>"u"||!(z instanceof e.ErrnoError))throw z;return-z.errno}}var j={mount:function(s){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(d,r){return typeof r=="function"&&(this._callbacks[d]=r),this},l.websocket.emit=function(d,r){typeof this._callbacks[d]=="function"&&this._callbacks[d].call(this,r)},e.createNode(null,"/",16895,0)},createSocket:function(s,d,r){d&=-526337;var i=d==1;if(i&&r&&r!=6)throw new e.ErrnoError(66);var t={family:s,type:d,protocol:r,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},a=j.nextname(),n=e.createNode(j.root,a,49152,0);n.sock=t;var f=e.createStream({path:a,node:n,flags:2,seekable:!1,stream_ops:j.stream_ops});return t.stream=f,t},getSocket:function(s){var d=e.getStream(s);return!d||!e.isSocket(d.node.mode)?null:d.node.sock},stream_ops:{poll:function(s){var d=s.node.sock;return d.sock_ops.poll(d)},ioctl:function(s,d,r){var i=s.node.sock;return i.sock_ops.ioctl(i,d,r)},read:function(s,d,r,i,t){var a=s.node.sock,n=a.sock_ops.recvmsg(a,i);return n?(d.set(n.buffer,r),n.buffer.length):0},write:function(s,d,r,i,t){var a=s.node.sock;return a.sock_ops.sendmsg(a,d,r,i)},close:function(s){var d=s.node.sock;d.sock_ops.close(d)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(s,d,r){var i;if(typeof d=="object"&&(i=d,d=null,r=null),i)if(i._socket)d=i._socket.remoteAddress,r=i._socket.remotePort;else{var t=/ws[s]?:\/\/([^:]+):(\d+)/.exec(i.url);if(!t)throw new Error("WebSocket URL must be in the format ws(s)://address:port");d=t[1],r=parseInt(t[2],10)}else try{var a=l.websocket&&typeof l.websocket=="object",n="ws:#".replace("#","//");if(a&&(typeof l.websocket.url=="function"?n=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(n=l.websocket.url)),n==="ws://"||n==="wss://"){var f=d.split("/");n=n+f[0]+":"+r+"/"+f.slice(1).join("/")}var v="binary";a&&typeof l.websocket.subprotocol=="string"&&(v=l.websocket.subprotocol);var u=void 0;v!=="null"&&(v=v.replace(/^ +| +$/g,"").split(/ *, */),u=v),a&&l.websocket.subprotocol===null&&(v="null",u=void 0);var o;Z?o=Fn():o=WebSocket,l.websocket.decorator&&(o=l.websocket.decorator(o)),i=new o(n,u),i.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var c={addr:d,port:r,socket:i,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(s,c),j.websocket_sock_ops.handlePeerEvents(s,c),s.type===2&&typeof s.sport<"u"&&c.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(s.sport&65280)>>8,s.sport&255])),c},getPeer:function(s,d,r){return s.peers[d+":"+r]},addPeer:function(s,d){s.peers[d.addr+":"+d.port]=d},removePeer:function(s,d){delete s.peers[d.addr+":"+d.port]},handlePeerEvents:function(s,d){var r=!0,i=function(){l.websocket.emit("open",s.stream.fd);try{for(var a=d.dgram_send_queue.shift();a;)d.socket.send(a),a=d.dgram_send_queue.shift()}catch{d.socket.close()}};function t(a){if(typeof a=="string"){var n=new TextEncoder;a=n.encode(a)}else{if(Ne(a.byteLength!==void 0),a.byteLength==0)return;a=new Uint8Array(a)}var f=r;if(r=!1,f&&a.length===10&&a[0]===255&&a[1]===255&&a[2]===255&&a[3]===255&&a[4]==="p".charCodeAt(0)&&a[5]==="o".charCodeAt(0)&&a[6]==="r".charCodeAt(0)&&a[7]==="t".charCodeAt(0)){var v=a[8]<<8|a[9];j.websocket_sock_ops.removePeer(s,d),d.port=v,j.websocket_sock_ops.addPeer(s,d);return}s.recv_queue.push({addr:d.addr,port:d.port,data:a}),l.websocket.emit("message",s.stream.fd)}Z?(d.socket.on("open",i),d.socket.on("message",function(a,n){n&&t(new Uint8Array(a).buffer)}),d.socket.on("close",function(){l.websocket.emit("close",s.stream.fd)}),d.socket.on("error",function(a){s.error=14,l.websocket.emit("error",[s.stream.fd,s.error,"ECONNREFUSED: Connection refused"])})):(d.socket.onopen=i,d.socket.onclose=function(){l.websocket.emit("close",s.stream.fd)},d.socket.onmessage=function(n){t(n.data)},d.socket.onerror=function(a){s.error=14,l.websocket.emit("error",[s.stream.fd,s.error,"ECONNREFUSED: Connection refused"])})},poll:function(s){if(s.type===1&&s.server)return s.pending.length?65:0;var d=0,r=s.type===1?j.websocket_sock_ops.getPeer(s,s.daddr,s.dport):null;return(s.recv_queue.length||!r||r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(d|=65),(!r||r&&r.socket.readyState===r.socket.OPEN)&&(d|=4),(r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(d|=16),d},ioctl:function(s,d,r){switch(d){case 21531:var i=0;return s.recv_queue.length&&(i=s.recv_queue[0].data.length),h[r>>2]=i,0;default:return 28}},close:function(s){if(s.server){try{s.server.close()}catch{}s.server=null}for(var d=Object.keys(s.peers),r=0;r<d.length;r++){var i=s.peers[d[r]];try{i.socket.close()}catch{}j.websocket_sock_ops.removePeer(s,i)}return 0},bind:function(s,d,r){if(typeof s.saddr<"u"||typeof s.sport<"u")throw new e.ErrnoError(28);if(s.saddr=d,s.sport=r,s.type===2){s.server&&(s.server.close(),s.server=null);try{s.sock_ops.listen(s,0)}catch(i){if(!(i instanceof e.ErrnoError)||i.errno!==138)throw i}}},connect:function(s,d,r){if(s.server)throw new e.ErrnoError(138);if(typeof s.daddr<"u"&&typeof s.dport<"u"){var i=j.websocket_sock_ops.getPeer(s,s.daddr,s.dport);if(i)throw i.socket.readyState===i.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var t=j.websocket_sock_ops.createPeer(s,d,r);throw s.daddr=t.addr,s.dport=t.port,new e.ErrnoError(26)},listen:function(s,d){if(!Z)throw new e.ErrnoError(138);if(s.server)throw new e.ErrnoError(28);var r=Fn().Server,i=s.saddr;l.websocket.serverDecorator&&(r=l.websocket.serverDecorator(r)),s.server=new r({host:i,port:s.sport}),l.websocket.emit("listen",s.stream.fd),s.server.on("connection",function(t){if(s.type===1){var a=j.createSocket(s.family,s.type,s.protocol),n=j.websocket_sock_ops.createPeer(a,t);a.daddr=n.addr,a.dport=n.port,s.pending.push(a),l.websocket.emit("connection",a.stream.fd)}else j.websocket_sock_ops.createPeer(s,t),l.websocket.emit("connection",s.stream.fd)}),s.server.on("close",function(){l.websocket.emit("close",s.stream.fd),s.server=null}),s.server.on("error",function(t){s.error=23,l.websocket.emit("error",[s.stream.fd,s.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(s){if(!s.server||!s.pending.length)throw new e.ErrnoError(28);var d=s.pending.shift();return d.stream.flags=s.stream.flags,d},getname:function(s,d){var r,i;if(d){if(s.daddr===void 0||s.dport===void 0)throw new e.ErrnoError(53);r=s.daddr,i=s.dport}else r=s.saddr||0,i=s.sport||0;return{addr:r,port:i}},sendmsg:function(s,d,r,i,t,a){if(s.type===2){if((t===void 0||a===void 0)&&(t=s.daddr,a=s.dport),t===void 0||a===void 0)throw new e.ErrnoError(17)}else t=s.daddr,a=s.dport;var n=j.websocket_sock_ops.getPeer(s,t,a);if(s.type===1){if(!n||n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)throw new e.ErrnoError(53);if(n.socket.readyState===n.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(d)&&(r+=d.byteOffset,d=d.buffer);var f;if(f=d.slice(r,r+i),s.type===2&&(!n||n.socket.readyState!==n.socket.OPEN))return(!n||n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)&&(n=j.websocket_sock_ops.createPeer(s,t,a)),n.dgram_send_queue.push(f),i;try{return n.socket.send(f),i}catch{throw new e.ErrnoError(28)}},recvmsg:function(s,d,r){if(s.type===1&&s.server)throw new e.ErrnoError(53);var i=s.recv_queue.shift();if(!i){if(s.type===1){var t=j.websocket_sock_ops.getPeer(s,s.daddr,s.dport);if(!t)throw new e.ErrnoError(53);if(t.socket.readyState===t.socket.CLOSING||t.socket.readyState===t.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var a=i.data.byteLength||i.data.length,n=i.data.byteOffset||0,f=i.data.buffer||i.data,v=Math.min(d,a),u={buffer:new Uint8Array(f,n,v),addr:i.addr,port:i.port};if(r&2&&(v=0),s.type===1&&v<a){var o=a-v;i.data=new Uint8Array(f,n+v,o),s.recv_queue.unshift(i)}return u}}};function ve(s){var d=j.getSocket(s);if(!d)throw new e.ErrnoError(8);return d}function Kt(s){return h[sn()>>2]=s,s}function lr(s){for(var d=s.split("."),r=0;r<4;r++){var i=Number(d[r]);if(isNaN(i))return null;d[r]=i}return(d[0]|d[1]<<8|d[2]<<16|d[3]<<24)>>>0}function Q(s){return parseInt(s)}function Hr(s){var d,r,i,t,a=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,n=[];if(!a.test(s))return null;if(s==="::")return[0,0,0,0,0,0,0,0];for(s.startsWith("::")?s=s.replace("::","Z:"):s=s.replace("::",":Z:"),s.indexOf(".")>0?(s=s.replace(new RegExp("[.]","g"),":"),d=s.split(":"),d[d.length-4]=Q(d[d.length-4])+Q(d[d.length-3])*256,d[d.length-3]=Q(d[d.length-2])+Q(d[d.length-1])*256,d=d.slice(0,d.length-2)):d=s.split(":"),i=0,t=0,r=0;r<d.length;r++)if(typeof d[r]=="string")if(d[r]==="Z"){for(t=0;t<8-d.length+1;t++)n[r+t]=0;i=t-1}else n[r+i]=Zr(parseInt(d[r],16));else n[r+i]=d[r];return[n[1]<<16|n[0],n[3]<<16|n[2],n[5]<<16|n[4],n[7]<<16|n[6]]}function rr(s,d,r,i,t){switch(d){case 2:r=lr(r),Pr(s,16),t&&(h[t>>2]=16),Ee[s>>1]=d,h[s+4>>2]=r,Ee[s+2>>1]=Zr(i);break;case 10:r=Hr(r),Pr(s,28),t&&(h[t>>2]=28),h[s>>2]=d,h[s+8>>2]=r[0],h[s+12>>2]=r[1],h[s+16>>2]=r[2],h[s+20>>2]=r[3],Ee[s+2>>1]=Zr(i);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(s){var d=lr(s);if(d!==null||(d=Hr(s),d!==null))return s;var r;if(ee.address_map.addrs[s])r=ee.address_map.addrs[s];else{var i=ee.address_map.id++;Ne(i<65535,"exceeded max address mappings of 65535"),r="172.29."+(i&255)+"."+(i&65280),ee.address_map.names[r]=s,ee.address_map.addrs[s]=r}return r},lookup_addr:function(s){return ee.address_map.names[s]?ee.address_map.names[s]:null}};function oo(s,d,r,i){try{var t=ve(s),a=t.sock_ops.accept(t);if(d)var n=rr(d,a.family,ee.lookup_name(a.daddr),a.dport,r);return a.stream.fd}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Or(s){return(s&255)+"."+(s>>8&255)+"."+(s>>16&255)+"."+(s>>24&255)}function en(s){var d="",r=0,i=0,t=0,a=0,n=0,f=0,v=[s[0]&65535,s[0]>>16,s[1]&65535,s[1]>>16,s[2]&65535,s[2]>>16,s[3]&65535,s[3]>>16],u=!0,o="";for(f=0;f<5;f++)if(v[f]!==0){u=!1;break}if(u){if(o=Or(v[6]|v[7]<<16),v[5]===-1)return d="::ffff:",d+=o,d;if(v[5]===0)return d="::",o==="0.0.0.0"&&(o=""),o==="0.0.0.1"&&(o="1"),d+=o,d}for(r=0;r<8;r++)v[r]===0&&(r-t>1&&(n=0),t=r,n++),n>i&&(i=n,a=r-i+1);for(r=0;r<8;r++){if(i>1&&v[r]===0&&r>=a&&r<a+i){r===a&&(d+=":",a===0&&(d+=":"));continue}d+=Number(qt(v[r]&65535)).toString(16),d+=r<7?":":""}return d}function wt(s,d){var r=Ee[s>>1],i=qt(st[s+2>>1]),t;switch(r){case 2:if(d!==16)return{errno:28};t=h[s+4>>2],t=Or(t);break;case 10:if(d!==28)return{errno:28};t=[h[s+8>>2],h[s+12>>2],h[s+16>>2],h[s+20>>2]],t=en(t);break;default:return{errno:5}}return{family:r,addr:t,port:i}}function Mr(s,d,r){if(r&&s===0)return null;var i=wt(s,d);if(i.errno)throw new e.ErrnoError(i.errno);return i.addr=ee.lookup_addr(i.addr)||i.addr,i}function io(s,d,r){try{var i=ve(s),t=Mr(d,r);return i.sock_ops.bind(i,t.addr,t.port),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function ao(s){try{return s=N.getStr(s),e.chdir(s),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function so(s,d){try{return s=N.getStr(s),e.chmod(s,d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function uo(s,d,r){try{var i=ve(s),t=Mr(d,r);return i.sock_ops.connect(i,t.addr,t.port),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function fo(s){try{var d=N.getStreamFromFD(s);return e.createStream(d,0).fd}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function co(s,d,r){try{var i=N.getStreamFromFD(s);if(i.fd===d)return-28;var t=e.getStream(d);return t&&e.close(t),e.createStream(i,d,d+1).fd}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function lo(s,d,r,i){try{if(d=N.getStr(d),d=N.calculateAt(s,d),r&-8)return-28;var t=e.lookupPath(d,{follow:!0}),a=t.node;if(!a)return-44;var n="";return r&4&&(n+="r"),r&2&&(n+="w"),r&1&&(n+="x"),n&&e.nodePermissions(a,n)?-2:0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Xr(s,d){try{return e.fchmod(s,d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function _o(s,d,r){try{return e.fchown(s,d,r),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function vo(s,d,r,i,t){try{d=N.getStr(d);var a=t&256;return t=t&-257,d=N.calculateAt(s,d),(a?e.lchown:e.chown)(d,r,i),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function mo(s,d,r){N.varargs=r;try{var i=N.getStreamFromFD(s);switch(d){case 0:{var t=N.get();if(t<0)return-28;var a;return a=e.createStream(i,t),a.fd}case 1:case 2:return 0;case 3:return i.flags;case 4:{var t=N.get();return i.flags|=t,0}case 5:{var t=N.get(),n=0;return Ee[t+n>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function po(s,d){try{var r=N.getStreamFromFD(s);return N.doStat(e.stat,r.path,d)}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function rn(s,d){return d+2097152>>>0<4194305-!!s?(s>>>0)+d*4294967296:NaN}function ho(s,d,r){try{var i=rn(d,r);return isNaN(i)?-61:(e.ftruncate(s,i),0)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function yo(s,d){try{if(d===0)return-28;var r=e.cwd(),i=Pe(r)+1;return d<i?-68:(Ae(r,s,d),i)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function wo(s,d,r){try{var i=N.getStreamFromFD(s);i.getdents||(i.getdents=e.readdir(i.path));for(var t=280,a=0,n=e.llseek(i,0,1),f=Math.floor(n/t);f<i.getdents.length&&a+t<=r;){var v,u,o=i.getdents[f];if(o===".")v=i.node.id,u=4;else if(o===".."){var c=e.lookupPath(i.path,{parent:!0});v=c.node.id,u=4}else{var _=e.lookupNode(i.node,o);v=_.id,u=e.isChrdev(_.mode)?2:e.isDir(_.mode)?4:e.isLink(_.mode)?10:8}q=[v>>>0,(P=v,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[d+a>>2]=q[0],h[d+a+4>>2]=q[1],q=[(f+1)*t>>>0,(P=(f+1)*t,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[d+a+8>>2]=q[0],h[d+a+12>>2]=q[1],Ee[d+a+16>>1]=280,$[d+a+18>>0]=u,Ae(o,d+a+19,256),a+=t,f+=1}return e.llseek(i,f*t,0),a}catch(m){if(typeof e>"u"||!(m instanceof e.ErrnoError))throw m;return-m.errno}}function Eo(s,d,r){try{var i=ve(s);if(!i.daddr)return-53;var t=rr(d,i.family,ee.lookup_name(i.daddr),i.dport,r);return 0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function go(s,d,r){try{ce("__syscall_getsockname "+s);var i=ve(s),t=rr(d,i.family,ee.lookup_name(i.saddr||"0.0.0.0"),i.sport,r);return 0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function So(s,d,r,i,t){try{var a=ve(s);return d===1&&r===4?(h[i>>2]=a.error,h[t>>2]=4,a.error=null,0):-50}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function bo(s,d,r){N.varargs=r;try{var i=N.getStreamFromFD(s);switch(d){case 21509:case 21505:return i.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return i.tty?0:-59;case 21519:{if(!i.tty)return-59;var t=N.get();return h[t>>2]=0,0}case 21520:return i.tty?-28:-59;case 21531:{var t=N.get();return e.ioctl(i,d,t)}case 21523:return i.tty?0:-59;case 21524:return i.tty?0:-59;default:return-28}}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function ko(s,d){try{var r=ve(s);return r.sock_ops.listen(r,d),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Do(s,d){try{return s=N.getStr(s),N.doStat(e.lstat,s,d)}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function Oo(s,d,r){try{return d=N.getStr(d),d=N.calculateAt(s,d),d=U.normalize(d),d[d.length-1]==="/"&&(d=d.substr(0,d.length-1)),e.mkdir(d,r,0),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function No(s,d,r,i){try{d=N.getStr(d);var t=i&256,a=i&4096;return i=i&-4353,d=N.calculateAt(s,d,a),N.doStat(t?e.lstat:e.stat,d,r)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function To(s,d,r,i){N.varargs=i;try{d=N.getStr(d),d=N.calculateAt(s,d);var t=i?N.get():0;return e.open(d,r,t).fd}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}var se={BUCKET_BUFFER_SIZE:8192,mount:function(s){return e.createNode(null,"/",16895,0)},createPipe:function(){var s={buckets:[],refcnt:2};s.buckets.push({buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var d=se.nextname(),r=se.nextname(),i=e.createNode(se.root,d,4096,0),t=e.createNode(se.root,r,4096,0);i.pipe=s,t.pipe=s;var a=e.createStream({path:d,node:i,flags:0,seekable:!1,stream_ops:se.stream_ops});i.stream=a;var n=e.createStream({path:r,node:t,flags:1,seekable:!1,stream_ops:se.stream_ops});return t.stream=n,{readable_fd:a.fd,writable_fd:n.fd}},stream_ops:{poll:function(s){var d=s.node.pipe;if((s.flags&2097155)===1)return 260;if(d.buckets.length>0)for(var r=0;r<d.buckets.length;r++){var i=d.buckets[r];if(i.offset-i.roffset>0)return 65}return 0},ioctl:function(s,d,r){return 28},fsync:function(s){return 28},read:function(s,d,r,i,t){for(var a=s.node.pipe,n=0,f=0;f<a.buckets.length;f++){var v=a.buckets[f];n+=v.offset-v.roffset}Ne(d instanceof ArrayBuffer||ArrayBuffer.isView(d));var u=d.subarray(r,r+i);if(i<=0)return 0;if(n==0)throw new e.ErrnoError(6);for(var o=Math.min(n,i),c=o,_=0,f=0;f<a.buckets.length;f++){var m=a.buckets[f],p=m.offset-m.roffset;if(o<=p){var y=m.buffer.subarray(m.roffset,m.offset);o<p?(y=y.subarray(0,o),m.roffset+=o):_++,u.set(y);break}else{var y=m.buffer.subarray(m.roffset,m.offset);u.set(y),u=u.subarray(y.byteLength),o-=y.byteLength,_++}}return _&&_==a.buckets.length&&(_--,a.buckets[_].offset=0,a.buckets[_].roffset=0),a.buckets.splice(0,_),c},write:function(s,d,r,i,t){var a=s.node.pipe;Ne(d instanceof ArrayBuffer||ArrayBuffer.isView(d));var n=d.subarray(r,r+i),f=n.byteLength;if(f<=0)return 0;var v=null;a.buckets.length==0?(v={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0},a.buckets.push(v)):v=a.buckets[a.buckets.length-1],Ne(v.offset<=se.BUCKET_BUFFER_SIZE);var u=se.BUCKET_BUFFER_SIZE-v.offset;if(u>=f)return v.buffer.set(n,v.offset),v.offset+=f,f;u>0&&(v.buffer.set(n.subarray(0,u),v.offset),v.offset+=u,n=n.subarray(u,n.byteLength));for(var o=n.byteLength/se.BUCKET_BUFFER_SIZE|0,c=n.byteLength%se.BUCKET_BUFFER_SIZE,_=0;_<o;_++){var m={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:se.BUCKET_BUFFER_SIZE,roffset:0};a.buckets.push(m),m.buffer.set(n.subarray(0,se.BUCKET_BUFFER_SIZE)),n=n.subarray(se.BUCKET_BUFFER_SIZE,n.byteLength)}if(c>0){var m={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:n.byteLength,roffset:0};a.buckets.push(m),m.buffer.set(n)}return f},close:function(s){var d=s.node.pipe;d.refcnt--,d.refcnt===0&&(d.buckets=null)}},nextname:function(){return se.nextname.current||(se.nextname.current=0),"pipe["+se.nextname.current+++"]"}};function Co(s){try{if(s==0)throw new e.ErrnoError(21);var d=se.createPipe();return h[s>>2]=d.readable_fd,h[s+4>>2]=d.writable_fd,0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function pe(s,d,r){try{for(var i=0,t=0;t<d;t++){var a=s+8*t,n=h[a>>2],f=Ee[a+4>>1],v=32,u=e.getStream(n);u&&(v=N.DEFAULT_POLLMASK,u.stream_ops?.poll&&(v=u.stream_ops.poll(u))),v&=f|8|16,v&&i++,Ee[a+6>>1]=v}return i}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Fo(s,d,r,i){try{if(d=N.getStr(d),d=N.calculateAt(s,d),i<=0)return-28;var t=e.readlink(d),a=Math.min(i,Pe(t)),n=$[r+a];return Ae(t,r,i+1),$[r+a]=n,a}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function Ao(s,d,r,i,t,a){try{var n=ve(s),f=n.sock_ops.recvmsg(n,r,typeof i<"u"?i:0);if(!f)return 0;if(t)var v=rr(t,n.family,ee.lookup_name(f.addr),f.port,a);return de.set(f.buffer,d),f.buffer.byteLength}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Po(s,d,r,i){try{return d=N.getStr(d),i=N.getStr(i),d=N.calculateAt(s,d),i=N.calculateAt(r,i),e.rename(d,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Ro(s){try{return s=N.getStr(s),e.rmdir(s),0}catch(d){if(typeof e>"u"||!(d instanceof e.ErrnoError))throw d;return-d.errno}}function Mo(s,d,r,i,t,a){try{var n=ve(s),f=Mr(t,a,!0);return f?n.sock_ops.sendmsg(n,$,d,r,f.addr,f.port):e.write(n.stream,$,d,r)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function Lo(s,d,r){try{var i=j.createSocket(s,d,r);return i.stream.fd}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Io(s,d){try{return s=N.getStr(s),N.doStat(e.stat,s,d)}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function Uo(s,d,r){try{return s=N.getStr(s),h[r+4>>2]=4096,h[r+40>>2]=4096,h[r+8>>2]=1e6,h[r+12>>2]=5e5,h[r+16>>2]=5e5,h[r+20>>2]=e.nextInode,h[r+24>>2]=1e6,h[r+28>>2]=42,h[r+44>>2]=2,h[r+36>>2]=255,0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Bo(s,d){try{return s=N.getStr(s),d=N.getStr(d),e.symlink(s,d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return-r.errno}}function xo(s,d,r){try{return d=N.getStr(d),d=N.calculateAt(s,d),r===0?e.unlink(d):r===512?e.rmdir(d):ue("Invalid flags passed to unlinkat"),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Br(s){return H[s>>2]+h[s+4>>2]*4294967296}function Ho(s,d,r,i){try{if(d=N.getStr(d),d=N.calculateAt(s,d,!0),r){var n=Br(r),f=h[r+8>>2];t=n*1e3+f/(1e3*1e3),r+=16,n=Br(r),f=h[r+8>>2],a=n*1e3+f/(1e3*1e3)}else var t=Date.now(),a=t;return e.utime(d,t,a),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function $r(s){}var tn="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function zo(s,d){ue(tn)}function _n(s,d){ue(tn)}var Wo=!0;function jo(){return Wo}function Yo(){throw 1/0}function qo(s,d){var r=new Date(Br(s)*1e3);h[d>>2]=r.getUTCSeconds(),h[d+4>>2]=r.getUTCMinutes(),h[d+8>>2]=r.getUTCHours(),h[d+12>>2]=r.getUTCDate(),h[d+16>>2]=r.getUTCMonth(),h[d+20>>2]=r.getUTCFullYear()-1900,h[d+24>>2]=r.getUTCDay();var i=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),t=(r.getTime()-i)/(1e3*60*60*24)|0;h[d+28>>2]=t}function Vo(s,d){var r=new Date(Br(s)*1e3);h[d>>2]=r.getSeconds(),h[d+4>>2]=r.getMinutes(),h[d+8>>2]=r.getHours(),h[d+12>>2]=r.getDate(),h[d+16>>2]=r.getMonth(),h[d+20>>2]=r.getFullYear()-1900,h[d+24>>2]=r.getDay();var i=new Date(r.getFullYear(),0,1),t=(r.getTime()-i.getTime())/(1e3*60*60*24)|0;h[d+28>>2]=t,h[d+36>>2]=-(r.getTimezoneOffset()*60);var a=new Date(r.getFullYear(),6,1).getTimezoneOffset(),n=i.getTimezoneOffset(),f=(a!=n&&r.getTimezoneOffset()==Math.min(n,a))|0;h[d+32>>2]=f}function Ko(s){var d=new Date(h[s+20>>2]+1900,h[s+16>>2],h[s+12>>2],h[s+8>>2],h[s+4>>2],h[s>>2],0),r=h[s+32>>2],i=d.getTimezoneOffset(),t=new Date(d.getFullYear(),0,1),a=new Date(d.getFullYear(),6,1).getTimezoneOffset(),n=t.getTimezoneOffset(),f=Math.min(n,a);if(r<0)h[s+32>>2]=+(a!=n&&f==i);else if(r>0!=(f==i)){var v=Math.max(n,a),u=r>0?f:v;d.setTime(d.getTime()+(u-i)*6e4)}h[s+24>>2]=d.getDay();var o=(d.getTime()-t.getTime())/(1e3*60*60*24)|0;return h[s+28>>2]=o,h[s>>2]=d.getSeconds(),h[s+4>>2]=d.getMinutes(),h[s+8>>2]=d.getHours(),h[s+12>>2]=d.getDate(),h[s+16>>2]=d.getMonth(),h[s+20>>2]=d.getYear(),d.getTime()/1e3|0}function Go(s,d,r,i,t,a){try{var n=N.getStreamFromFD(i),f=e.mmap(n,s,t,d,r),v=f.ptr;return h[a>>2]=f.allocated,v}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Xo(s,d,r,i,t,a){try{var n=N.getStreamFromFD(t);r&2&&N.doMsync(s,n,d,i,a),e.munmap(n)}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function nn(s){var d=Pe(s)+1,r=sr(d);return r&&Xe(s,$,r,d),r}function $o(s,d,r){var i=new Date().getFullYear(),t=new Date(i,0,1),a=new Date(i,6,1),n=t.getTimezoneOffset(),f=a.getTimezoneOffset(),v=Math.max(n,f);h[s>>2]=v*60,h[d>>2]=+(n!=f);function u(p){var y=p.toTimeString().match(/\(([A-Za-z ]+)\)$/);return y?y[1]:"GMT"}var o=u(t),c=u(a),_=nn(o),m=nn(c);f<n?(H[r>>2]=_,H[r+4>>2]=m):(H[r>>2]=m,H[r+4>>2]=_)}function zr(s,d,r){zr.called||(zr.called=!0,$o(s,d,r))}function Zo(){ue("")}function It(){return Date.now()}function on(){return 2147483648}function Jo(){return on()}var Wr;Z?Wr=()=>{var s=process.hrtime();return s[0]*1e3+s[1]/1e6}:Wr=()=>performance.now();function Qo(s,d,r){de.copyWithin(s,d,d+r)}function Ut(s){try{return or.grow(s-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ei(s){var d=de.length;s=s>>>0;var r=on();if(s>r)return!1;let i=(v,u)=>v+(u-v%u)%u;for(var t=1;t<=4;t*=2){var a=d*(1+.2/t);a=Math.min(a,s+100663296);var n=Math.min(r,i(Math.max(s,a),65536)),f=Ut(n);if(f)return!0}return!1}function wn(s){Ge=s,_r()||(l.onExit&&l.onExit(s),Ce=!0),te(s,new mr(s))}function ri(s,d){Ge=s,_r()||Yn(),wn(s)}var Et=ri;function ti(){if(!_r())try{Et(Ge)}catch(s){pt(s)}}function gt(s){if(!(_t||Ce))try{s(),ti()}catch(d){pt(d)}}function et(){Fr+=1}function jr(){Fr-=1}function Bt(s,d){return et(),setTimeout(function(){jr(),gt(s)},d)}function xt(s){return X.handleSleep(d=>Bt(d,s))}var rt=O.ENV||{};function ni(){return J||"./this.program"}function dr(){if(!dr.strings){var s=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",d={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:s,_:ni()};for(var r in rt)rt[r]===void 0?delete d[r]:d[r]=rt[r];var i=[];for(var r in d)i.push(r+"="+d[r]);dr.strings=i}return dr.strings}function tt(s,d,r){for(var i=0;i<s.length;++i)$[d++>>0]=s.charCodeAt(i);r||($[d>>0]=0)}function Ir(s,d){var r=0;return dr().forEach(function(i,t){var a=d+r;H[s+t*4>>2]=a,tt(i,a),r+=i.length+1}),0}function Ht(s,d){var r=dr();H[s>>2]=r.length;var i=0;return r.forEach(function(t){i+=t.length+1}),H[d>>2]=i,0}function oi(s){try{var d=N.getStreamFromFD(s);return e.close(d),0}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return r.errno}}function ii(s,d){try{var r=N.getStreamFromFD(s),i=r.tty?2:e.isDir(r.mode)?3:e.isLink(r.mode)?7:4;return $[d>>0]=i,0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function ai(s,d,r,i){for(var t=0,a=0;a<r;a++){var n=H[d>>2],f=H[d+4>>2];d+=8;var v=e.read(s,$,n,f,i);if(v<0)return-1;if(t+=v,v<f)break}return t}function si(s,d,r,i){try{var t=N.getStreamFromFD(s),a=ai(t,d,r);return H[i>>2]=a,0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return n.errno}}function ui(s,d,r,i,t){try{var a=rn(d,r);if(isNaN(a))return 61;var n=N.getStreamFromFD(s);return e.llseek(n,a,i),q=[n.position>>>0,(P=n.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t>>2]=q[0],h[t+4>>2]=q[1],n.getdents&&a===0&&i===0&&(n.getdents=null),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return f.errno}}function fi(s){try{var d=N.getStreamFromFD(s);return X.handleSleep(function(r){var i=d.node.mount;if(!i.type.syncfs){r(0);return}i.type.syncfs(i,!1,function(t){if(t){r(function(){return 29});return}r(0)})})}catch(r){if(typeof e>"u"||!(r instanceof e.ErrnoError))throw r;return r.errno}}function ci(s,d,r,i){for(var t=0,a=0;a<r;a++){var n=H[d>>2],f=H[d+4>>2];d+=8;var v=e.write(s,$,n,f,i);if(v<0)return-1;t+=v}return t}function li(s,d,r,i){try{var t=N.getStreamFromFD(s),a=ci(t,d,r);return H[i>>2]=a,0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return n.errno}}function vn(s){var d=sr(20),r=sr(s.length+1);Ae(s,r,s.length+1),H[d>>2]=r;var i=sr(4);H[i>>2]=0,H[d+4>>2]=i;var t=2;h[d+8>>2]=t,h[d+12>>2]=4;var a=sr(12);return H[a>>2]=a+8,H[a+4>>2]=0,h[a+8>>2]=lr(ee.lookup_name(s)),H[d+16>>2]=a,d}function An(s,d,r){if(r!==2)return Kt(5),null;s=h[s>>2];var i=Or(s),t=ee.lookup_addr(i);return t&&(i=t),vn(i)}function Dn(s){return vn(ne(s))}function di(s,d,r,i,t,a){var n=Dn(s);return Qt(d,n,20),er(n),h[a>>2]=0,H[t>>2]=d,0}function _i(s,d){for(var r=Math.min(d,3),i=8,t=0;t<r;t++)ut[s+t*i>>3]=.1;return r}function En(s,d,r,i,t,a,n){var f=wt(s,d);if(f.errno)return-6;var v=f.port,u=f.addr,o=!1;if(r&&i){var c;if(n&1||!(c=ee.lookup_addr(u))){if(n&8)return-2}else u=c;var _=Ae(u,r,i);_+1>=i&&(o=!0)}if(t&&a){v=""+v;var _=Ae(v,t,a);_+1>=a&&(o=!0)}return o?-12:0}var Jr={list:[],map:{}};function St(s){function d(a,n,f){var v=sr(a.length+1);tt(a,v);for(var u=0,o=f.length,c=sr((o+1)*4),_=0;_<o;_++,u+=4){var m=f[_],p=sr(m.length+1);tt(m,p),H[c+u>>2]=p}H[c+u>>2]=0;var y=sr(12);return H[y>>2]=v,H[y+4>>2]=c,h[y+8>>2]=n,y}var r=Jr.list,i=Jr.map;if(r.length===0){var t=d("tcp",6,["TCP"]);r.push(t),i.tcp=i[6]=t,t=d("udp",17,["UDP"]),r.push(t),i.udp=i[17]=t}St.index=0}function zt(s){s=ne(s),St(!0);var d=Jr.map[s];return d}function Wt(s){St(!0);var d=Jr.map[s];return d}function br(s){var d=Pe(s)+1,r=tr(d);return Xe(s,$,r,d),r}var je={getAllWebSockets:function(s){let d=new Set;s.server&&s.server.clients.forEach(r=>{d.add(r)});for(let r of je.getAllPeers(s))d.add(r.socket);return Array.from(d)},getAllPeers:function(s){let d=new Set;if(s.server&&s.pending.filter(r=>r.peers).forEach(r=>{for(let i of Object.values(r.peers))d.add(i)}),s.peers)for(let r of Object.values(s.peers))d.add(r);return Array.from(d)},awaitData:function(s){return je.awaitWsEvent(s,"message")},awaitConnection:function(s){return s.OPEN===s.readyState?[Promise.resolve(),je.noop]:je.awaitWsEvent(s,"open")},awaitClose:function(s){return[s.CLOSING,s.CLOSED].includes(s.readyState)?[Promise.resolve(),je.noop]:je.awaitWsEvent(s,"close")},awaitError:function(s){return[s.CLOSING,s.CLOSED].includes(s.readyState)?[Promise.resolve(),je.noop]:je.awaitWsEvent(s,"error")},awaitWsEvent:function(s,d){let r,i=()=>{r()};return[new Promise(function(n){r=n,s.once(d,i)}),()=>{s.removeListener(d,i),setTimeout(r)}]},noop:function(){},shutdownSocket:function(s,d){let r=ve(s),i=Object.values(r.peers)[0];if(!i)return-1;try{return i.socket.close(),j.websocket_sock_ops.removePeer(r,i),0}catch(t){return console.log("Socket shutdown error",t),-1}}};function Nr(s,d,r){if(!s)return 1;let i=ne(s);if(!i.length)return 0;let t=ne(d);if(!t.length)return 0;if(l.popen_to_file){let{path:a,exitCode:n}=l.popen_to_file(i,t);return de[r]=n,br(a)}if(Z){let a=require("os").tmpdir(),n="php-process-stream",f=a+"/"+n,v=require("child_process"),u;if(t==="r")u=v.spawnSync(i,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[r]=u.status,require("fs").writeFileSync(f,u.stdout,{encoding:"utf8",flag:"w+"});else return t==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+t+" (should be r or w)"),_W_EXITCODE(0,2));return br(f)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function Ue(s){return s%4===0&&(s%100!==0||s%400===0)}function ir(s,d){for(var r=0,i=0;i<=d;r+=s[i++]);return r}var qe=[31,29,31,30,31,30,31,31,30,31,30,31],Er=[31,28,31,30,31,30,31,31,30,31,30,31];function fr(s,d){for(var r=new Date(s.getTime());d>0;){var i=Ue(r.getFullYear()),t=r.getMonth(),a=(i?qe:Er)[t];if(d>a-r.getDate())d-=a-r.getDate()+1,r.setDate(1),t<11?r.setMonth(t+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+d),r}return r}function Tr(s,d,r,i){var t=h[i+40>>2],a={tm_sec:h[i>>2],tm_min:h[i+4>>2],tm_hour:h[i+8>>2],tm_mday:h[i+12>>2],tm_mon:h[i+16>>2],tm_year:h[i+20>>2],tm_wday:h[i+24>>2],tm_yday:h[i+28>>2],tm_isdst:h[i+32>>2],tm_gmtoff:h[i+36>>2],tm_zone:t?ne(t):""},n=ne(r),f={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var v in f)n=n.replace(new RegExp(v,"g"),f[v]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(b,k,D){for(var T=typeof b=="number"?b.toString():b||"";T.length<k;)T=D[0]+T;return T}function _(b,k){return c(b,k,"0")}function m(b,k){function D(C){return C<0?-1:C>0?1:0}var T;return(T=D(b.getFullYear()-k.getFullYear()))===0&&(T=D(b.getMonth()-k.getMonth()))===0&&(T=D(b.getDate()-k.getDate())),T}function p(b){switch(b.getDay()){case 0:return new Date(b.getFullYear()-1,11,29);case 1:return b;case 2:return new Date(b.getFullYear(),0,3);case 3:return new Date(b.getFullYear(),0,2);case 4:return new Date(b.getFullYear(),0,1);case 5:return new Date(b.getFullYear()-1,11,31);case 6:return new Date(b.getFullYear()-1,11,30)}}function y(b){var k=fr(new Date(b.tm_year+1900,0,1),b.tm_yday),D=new Date(k.getFullYear(),0,4),T=new Date(k.getFullYear()+1,0,4),C=p(D),A=p(T);return m(C,k)<=0?m(A,k)<=0?k.getFullYear()+1:k.getFullYear():k.getFullYear()-1}var E={"%a":function(b){return u[b.tm_wday].substring(0,3)},"%A":function(b){return u[b.tm_wday]},"%b":function(b){return o[b.tm_mon].substring(0,3)},"%B":function(b){return o[b.tm_mon]},"%C":function(b){var k=b.tm_year+1900;return _(k/100|0,2)},"%d":function(b){return _(b.tm_mday,2)},"%e":function(b){return c(b.tm_mday,2," ")},"%g":function(b){return y(b).toString().substring(2)},"%G":function(b){return y(b)},"%H":function(b){return _(b.tm_hour,2)},"%I":function(b){var k=b.tm_hour;return k==0?k=12:k>12&&(k-=12),_(k,2)},"%j":function(b){return _(b.tm_mday+ir(Ue(b.tm_year+1900)?qe:Er,b.tm_mon-1),3)},"%m":function(b){return _(b.tm_mon+1,2)},"%M":function(b){return _(b.tm_min,2)},"%n":function(){return`
|
|
31
|
-
`},"%p":function(b){return b.tm_hour>=0&&b.tm_hour<12?"AM":"PM"},"%S":function(b){return _(b.tm_sec,2)},"%t":function(){return" "},"%u":function(b){return b.tm_wday||7},"%U":function(b){var k=b.tm_yday+7-b.tm_wday;return _(Math.floor(k/7),2)},"%V":function(b){var k=Math.floor((b.tm_yday+7-(b.tm_wday+6)%7)/7);if((b.tm_wday+371-b.tm_yday-2)%7<=2&&k++,k){if(k==53){var T=(b.tm_wday+371-b.tm_yday)%7;T!=4&&(T!=3||!Ue(b.tm_year))&&(k=1)}}else{k=52;var D=(b.tm_wday+7-b.tm_yday-1)%7;(D==4||D==5&&Ue(b.tm_year%400-1))&&k++}return _(k,2)},"%w":function(b){return b.tm_wday},"%W":function(b){var k=b.tm_yday+7-(b.tm_wday+6)%7;return _(Math.floor(k/7),2)},"%y":function(b){return(b.tm_year+1900).toString().substring(2)},"%Y":function(b){return b.tm_year+1900},"%z":function(b){var k=b.tm_gmtoff,D=k>=0;return k=Math.abs(k)/60,k=k/60*100+k%60,(D?"+":"-")+("0000"+k).slice(-4)},"%Z":function(b){return b.tm_zone},"%%":function(){return"%"}};n=n.replace(/%%/g,"\0\0");for(var v in E)n.includes(v)&&(n=n.replace(new RegExp(v,"g"),E[v](a)));n=n.replace(/\0\0/g,"%");var S=Je(n,!1);return S.length>d?0:(ht(S,s),S.length-1)}function Yr(s,d,r){for(var i=ne(d),t="\\!@#$^&*()+=-[]/{}|:<>?,.",a=0,n=t.length;a<n;++a)i=i.replace(new RegExp("\\"+t[a],"g"),"\\"+t[a]);var f={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var v in f)i=i.replace(v,f[v]);var u={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},o={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},c={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},_={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var m in u)i=i.replace(m,"("+m+u[m]+")");for(var p=[],a=i.indexOf("%");a>=0;a=i.indexOf("%"))p.push(i[a+1]),i=i.replace(new RegExp("\\%"+i[a+1],"g"),"");var y=new RegExp("^"+i,"i").exec(ne(s));function E(){function le(he,ze,Ve){return typeof he!="number"||isNaN(he)?ze:he>=ze?he<=Ve?he:Ve:ze}return{year:le(h[r+20>>2]+1900,1970,9999),month:le(h[r+16>>2],0,11),day:le(h[r+12>>2],1,31),hour:le(h[r+8>>2],0,23),min:le(h[r+4>>2],0,59),sec:le(h[r>>2],0,59)}}if(y){var S=E(),b,k=le=>{var he=p.indexOf(le);if(he>=0)return y[he+1]};if((b=k("S"))&&(S.sec=Q(b)),(b=k("M"))&&(S.min=Q(b)),b=k("H"))S.hour=Q(b);else if(b=k("I")){var D=Q(b);(b=k("p"))&&(D+=b.toUpperCase()[0]==="P"?12:0),S.hour=D}if(b=k("Y"))S.year=Q(b);else if(b=k("y")){var T=Q(b);(b=k("C"))?T+=Q(b)*100:T+=T<69?2e3:1900,S.year=T}if((b=k("m"))?S.month=Q(b)-1:(b=k("b"))&&(S.month=o[b.substring(0,3).toUpperCase()]||0),b=k("d"))S.day=Q(b);else if(b=k("j"))for(var C=Q(b),A=Ue(S.year),I=0;I<12;++I){var z=ir(A?qe:Er,I-1);C<=z+(A?qe:Er)[I]&&(S.day=C-z)}else if(b=k("a")){var K=b.substring(0,3).toUpperCase();if(b=k("U")){var B=c[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===0?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}else if(b=k("W")){var B=_[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===1?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+1+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}}var oe=new Date(S.year,S.month,S.day,S.hour,S.min,S.sec,0);return h[r>>2]=oe.getSeconds(),h[r+4>>2]=oe.getMinutes(),h[r+8>>2]=oe.getHours(),h[r+12>>2]=oe.getDate(),h[r+16>>2]=oe.getMonth(),h[r+20>>2]=oe.getFullYear()-1900,h[r+24>>2]=oe.getDay(),h[r+28>>2]=ir(Ue(oe.getFullYear())?qe:Er,oe.getMonth()-1)+oe.getDate()-1,h[r+32>>2]=0,s+Je(y[0]).length-1}return 0}function jt(s){return je.shutdownSocket(s,2)}function Yt(s,d,r){if(typeof X>"u")return 0;let i=1,t=2,a=4,n=8,f=16,v=32;return X.handleSleep(u=>{let o=ve(s);if(!o){u(0);return}let c=[],_=new Set;if(d&i||d&t){if(o.server){for(let b of o.pending)if((b.recv_queue||[]).length>0){u(1);return}}else if((o.recv_queue||[]).length>0){u(1);return}}let m=je.getAllWebSockets(o);if(!m.length){u(0);return}for(let b of m)(d&i||d&t)&&(c.push(je.awaitData(b)),_.add("POLLIN")),d&a&&(c.push(je.awaitConnection(b)),_.add("POLLOUT")),d&f&&(c.push(je.awaitClose(b)),_.add("POLLHUP")),(d&n||d&v)&&(c.push(je.awaitError(b)),_.add("POLLERR"));if(c.length===0){console.warn("Unsupported poll event "+d+", defaulting to setTimeout()."),setTimeout(function(){u(0)},r);return}let p=c.map(([b])=>b),y=()=>c.forEach(([,b])=>b()),E=!1;Promise.race(p).then(function(b){E||(E=!0,u(1),clearTimeout(S),y())});let S=setTimeout(function(){E||(E=!0,u(0),y())},r)})}function Gt(s,d,r,i,t){let a=de[i];if(!(d===1&&r===9||d===6&&r===1))return console.warn(`Unsupported socket option: ${d}, ${r}, ${a}`),-1;let c=je.getAllWebSockets(s)[0];return c?(c.setSocketOpt(d,r,i),0):-1}function be(s){try{return s()}catch(d){ue(d)}}var X={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(s){var d=X.callStackNameToId[s];return d===void 0&&(d=X.callStackId++,X.callStackNameToId[s]=d,X.callStackIdToName[d]=s),d},instrumentWasmImports:function(s){var d=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(i=>i.split(".")[1]);for(var r in s)(function(i){var t=s[i],a=t.sig;if(typeof t=="function")var n=d.indexOf(i)>=0||i.startsWith("__asyncjs__")})(r)},instrumentWasmExports:function(s){var d={};for(var r in s)(function(i){var t=s[i];typeof t=="function"?d[i]=function(){X.exportCallStack.push(i);try{return t.apply(null,arguments)}finally{if(!Ce){var a=X.exportCallStack.pop();Ne(a===i),X.maybeStopUnwind()}}}:d[i]=t})(r);return d},maybeStopUnwind:function(){X.currData&&X.state===X.State.Unwinding&&X.exportCallStack.length===0&&(X.state=X.State.Normal,et(),be(Mt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((s,d)=>{X.asyncPromiseHandlers={resolve:s,reject:d}})},allocateData:function(){var s=sr(12+X.StackSize);return X.setDataHeader(s,s+12,X.StackSize),X.setDataRewindFunc(s),s},setDataHeader:function(s,d,r){h[s>>2]=d,h[s+4>>2]=d+r},setDataRewindFunc:function(s){var d=X.exportCallStack[0],r=X.getCallStackId(d);h[s+8>>2]=r},getDataRewindFunc:function(s){var d=h[s+8>>2],r=X.callStackIdToName[d],i=l.asm[r];return i},doRewind:function(s){var d=X.getDataRewindFunc(s);return jr(),d()},handleSleep:function(s){if(!Ce){if(X.state===X.State.Normal){var d=!1,r=!1;s(i=>{if(!Ce&&(X.handleSleepReturnValue=i||0,d=!0,!!r)){X.state=X.State.Rewinding,be(()=>Lt(X.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var t,a=!1;try{t=X.doRewind(X.currData)}catch(v){t=v,a=!0}var n=!1;if(!X.currData){var f=X.asyncPromiseHandlers;f&&(X.asyncPromiseHandlers=null,(a?f.reject:f.resolve)(t),n=!0)}if(a&&!n)throw t}}),r=!0,d||(X.state=X.State.Unwinding,X.currData=X.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),be(()=>Rt(X.currData)))}else X.state===X.State.Rewinding?(X.state=X.State.Normal,be(Vt),er(X.currData),X.currData=null,X.sleepCallbacks.forEach(i=>gt(i))):ue("invalid state: "+X.state);return X.handleSleepReturnValue}},handleAsync:function(s){return X.handleSleep(d=>{s().then(d)})}};function Fe(s){var d=l["_"+s];return d}function Xt(s,d,r,i,t){var a={string:E=>{var S=0;if(E!=null&&E!==0){var b=(E.length<<2)+1;S=tr(b),Ae(E,S,b)}return S},array:E=>{var S=tr(E.length);return ht(E,S),S}};function n(E){return d==="string"?ne(E):d==="boolean"?!!E:E}var f=Fe(s),v=[],u=0;if(i)for(var o=0;o<i.length;o++){var c=a[r[o]];c?(u===0&&(u=Oe()),v[o]=c(i[o])):v[o]=i[o]}var _=X.currData,m=f.apply(null,v);function p(E){return jr(),u!==0&&ye(u),n(E)}et();var y=t&&t.async;return X.currData!=_?X.whenDone().then(p):(m=p(m),y?Promise.resolve(m):m)}var ie=function(s,d,r,i){s||(s=this),this.parent=s,this.mount=s.mount,this.mounted=null,this.id=e.nextInode++,this.name=d,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Gr=365,xr=146;Object.defineProperties(ie.prototype,{read:{get:function(){return(this.mode&Gr)===Gr},set:function(s){s?this.mode|=Gr:this.mode&=~Gr}},write:{get:function(){return(this.mode&xr)===xr},set:function(s){s?this.mode|=xr:this.mode&=~xr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ie,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var ke={j:Jn,Ra:Qn,Qa:no,Pa:oo,Oa:io,Na:ao,N:so,Ma:uo,La:fo,Ka:co,Ja:lo,Ia:Xr,Ha:_o,M:vo,n:mo,Ga:po,Q:ho,Fa:yo,Ea:wo,Da:Eo,Ca:go,Ba:So,L:bo,Aa:ko,za:Do,ya:Oo,xa:No,B:To,wa:Co,va:pe,ua:Fo,ta:Ao,sa:Po,K:Ro,ra:Mo,J:Lo,qa:Io,pa:Uo,oa:Bo,I:xo,na:Ho,ja:$r,ia:zo,ha:_n,ga:jo,fa:Yo,ea:qo,da:Vo,ca:Ko,ba:Go,aa:Xo,$:zr,l:Zo,z:It,_:Jo,F:Wr,Z:Qo,Y:ei,X:xt,ma:Ir,la:Ht,o:Et,s:oi,H:ii,G:si,P:ui,ka:fi,A:li,E:An,D:di,W:_i,V:En,U:zt,T:Wt,h:Cn,d:Nn,b:Tn,f:Ni,g:Oi,v:Ai,u:hn,t:In,S:Di,y:Fi,e:bn,a:pn,c:ln,k:cn,q:Ln,m:Ci,i:Ti,x:kn,R:Nr,C:Tr,O:Yr,p:jt,w:Yt,r:Gt},Te=Zn(),an=l.___wasm_call_ctors=function(){return(an=l.___wasm_call_ctors=l.asm.Ta).apply(null,arguments)},On=l._wasm_popen=function(){return(On=l._wasm_popen=l.asm.Ua).apply(null,arguments)},sn=l.___errno_location=function(){return(sn=l.___errno_location=l.asm.Va).apply(null,arguments)},$t=l._wasm_pclose=function(){return($t=l._wasm_pclose=l.asm.Wa).apply(null,arguments)},gn=l._php_pollfd_for=function(){return(gn=l._php_pollfd_for=l.asm.Xa).apply(null,arguments)},Pn=l._wasm_select=function(){return(Pn=l._wasm_select=l.asm.Ya).apply(null,arguments)},bt=l._wasm_add_cli_arg=function(){return(bt=l._wasm_add_cli_arg=l.asm.Za).apply(null,arguments)},sr=l._malloc=function(){return(sr=l._malloc=l.asm._a).apply(null,arguments)},qr=l._run_cli=function(){return(qr=l._run_cli=l.asm.$a).apply(null,arguments)},Qt=l._memcpy=function(){return(Qt=l._memcpy=l.asm.ab).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.bb).apply(null,arguments)},qt=l._ntohs=function(){return(qt=l._ntohs=l.asm.db).apply(null,arguments)},Zr=l._htons=function(){return(Zr=l._htons=l.asm.eb).apply(null,arguments)},kr=l._fflush=function(){return(kr=l._fflush=l.asm.fb).apply(null,arguments)},Ur=l._wasm_set_phpini_path=function(){return(Ur=l._wasm_set_phpini_path=l.asm.gb).apply(null,arguments)},nt=l._wasm_set_phpini_entries=function(){return(nt=l._wasm_set_phpini_entries=l.asm.hb).apply(null,arguments)},Zt=l._wasm_add_SERVER_entry=function(){return(Zt=l._wasm_add_SERVER_entry=l.asm.ib).apply(null,arguments)},kt=l._wasm_add_uploaded_file=function(){return(kt=l._wasm_add_uploaded_file=l.asm.jb).apply(null,arguments)},mn=l._wasm_set_query_string=function(){return(mn=l._wasm_set_query_string=l.asm.kb).apply(null,arguments)},un=l._wasm_set_path_translated=function(){return(un=l._wasm_set_path_translated=l.asm.lb).apply(null,arguments)},fn=l._wasm_set_skip_shebang=function(){return(fn=l._wasm_set_skip_shebang=l.asm.mb).apply(null,arguments)},Sn=l._wasm_set_request_uri=function(){return(Sn=l._wasm_set_request_uri=l.asm.nb).apply(null,arguments)},vi=l._wasm_set_request_method=function(){return(vi=l._wasm_set_request_method=l.asm.ob).apply(null,arguments)},mi=l._wasm_set_request_host=function(){return(mi=l._wasm_set_request_host=l.asm.pb).apply(null,arguments)},pi=l._wasm_set_content_type=function(){return(pi=l._wasm_set_content_type=l.asm.qb).apply(null,arguments)},hi=l._wasm_set_request_body=function(){return(hi=l._wasm_set_request_body=l.asm.rb).apply(null,arguments)},yi=l._wasm_set_content_length=function(){return(yi=l._wasm_set_content_length=l.asm.sb).apply(null,arguments)},wi=l._wasm_set_cookies=function(){return(wi=l._wasm_set_cookies=l.asm.tb).apply(null,arguments)},Ei=l._wasm_set_php_code=function(){return(Ei=l._wasm_set_php_code=l.asm.ub).apply(null,arguments)},gi=l._wasm_set_request_port=function(){return(gi=l._wasm_set_request_port=l.asm.vb).apply(null,arguments)},Si=l._phpwasm_init_uploaded_files_hash=function(){return(Si=l._phpwasm_init_uploaded_files_hash=l.asm.wb).apply(null,arguments)},bi=l._phpwasm_register_uploaded_file=function(){return(bi=l._phpwasm_register_uploaded_file=l.asm.xb).apply(null,arguments)},ki=l._phpwasm_destroy_uploaded_files_hash=function(){return(ki=l._phpwasm_destroy_uploaded_files_hash=l.asm.yb).apply(null,arguments)},Rn=l._wasm_sapi_handle_request=function(){return(Rn=l._wasm_sapi_handle_request=l.asm.zb).apply(null,arguments)},Mn=l._php_wasm_init=function(){return(Mn=l._php_wasm_init=l.asm.Ab).apply(null,arguments)},Sr=l.___funcs_on_exit=function(){return(Sr=l.___funcs_on_exit=l.asm.Bb).apply(null,arguments)},gr=l._emscripten_builtin_memalign=function(){return(gr=l._emscripten_builtin_memalign=l.asm.Cb).apply(null,arguments)},we=l._setThrew=function(){return(we=l._setThrew=l.asm.Db).apply(null,arguments)},Oe=l.stackSave=function(){return(Oe=l.stackSave=l.asm.Eb).apply(null,arguments)},ye=l.stackRestore=function(){return(ye=l.stackRestore=l.asm.Fb).apply(null,arguments)},tr=l.stackAlloc=function(){return(tr=l.stackAlloc=l.asm.Gb).apply(null,arguments)},De=l.dynCall_viii=function(){return(De=l.dynCall_viii=l.asm.Hb).apply(null,arguments)},xe=l.dynCall_vii=function(){return(xe=l.dynCall_vii=l.asm.Ib).apply(null,arguments)},Ie=l.dynCall_vi=function(){return(Ie=l.dynCall_vi=l.asm.Jb).apply(null,arguments)},ar=l.dynCall_iii=function(){return(ar=l.dynCall_iii=l.asm.Kb).apply(null,arguments)},Be=l.dynCall_ii=function(){return(Be=l.dynCall_ii=l.asm.Lb).apply(null,arguments)},He=l.dynCall_v=function(){return(He=l.dynCall_v=l.asm.Mb).apply(null,arguments)},ur=l.dynCall_iiii=function(){return(ur=l.dynCall_iiii=l.asm.Nb).apply(null,arguments)},Qr=l.dynCall_viiiii=function(){return(Qr=l.dynCall_viiiii=l.asm.Ob).apply(null,arguments)},ot=l.dynCall_iiiii=function(){return(ot=l.dynCall_iiiii=l.asm.Pb).apply(null,arguments)},it=l.dynCall_iiiiiii=function(){return(it=l.dynCall_iiiiiii=l.asm.Qb).apply(null,arguments)},Dt=l.dynCall_iiiiii=function(){return(Dt=l.dynCall_iiiiii=l.asm.Rb).apply(null,arguments)},Ot=l.dynCall_i=function(){return(Ot=l.dynCall_i=l.asm.Sb).apply(null,arguments)},Nt=l.dynCall_viiii=function(){return(Nt=l.dynCall_viiii=l.asm.Tb).apply(null,arguments)},Tt=l.dynCall_iiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiii=l.asm.Ub).apply(null,arguments)},Ct=l.dynCall_iiiiiiiiii=function(){return(Ct=l.dynCall_iiiiiiiiii=l.asm.Vb).apply(null,arguments)},Ft=l.dynCall_viiiiiiiii=function(){return(Ft=l.dynCall_viiiiiiiii=l.asm.Wb).apply(null,arguments)},At=l.dynCall_viiiiii=function(){return(At=l.dynCall_viiiiii=l.asm.Xb).apply(null,arguments)},Pt=l.dynCall_iiiiiiii=function(){return(Pt=l.dynCall_iiiiiiii=l.asm.Yb).apply(null,arguments)},Rt=l._asyncify_start_unwind=function(){return(Rt=l._asyncify_start_unwind=l.asm.Zb).apply(null,arguments)},Mt=l._asyncify_stop_unwind=function(){return(Mt=l._asyncify_stop_unwind=l.asm._b).apply(null,arguments)},Lt=l._asyncify_start_rewind=function(){return(Lt=l._asyncify_start_rewind=l.asm.$b).apply(null,arguments)},Vt=l._asyncify_stop_rewind=function(){return(Vt=l._asyncify_stop_rewind=l.asm.ac).apply(null,arguments)};function cn(s,d,r,i){var t=Oe();try{De(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function ln(s,d,r){var i=Oe();try{xe(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function pn(s,d){var r=Oe();try{Ie(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function hn(s,d,r,i,t,a,n){var f=Oe();try{return it(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function bn(s){var d=Oe();try{He(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Nn(s,d){var r=Oe();try{return Be(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function Tn(s,d,r){var i=Oe();try{return ar(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Cn(s){var d=Oe();try{return Ot(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Ln(s,d,r,i,t){var a=Oe();try{Nt(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Di(s,d,r,i,t,a,n,f,v){var u=Oe();try{return Tt(s,d,r,i,t,a,n,f,v)}catch(o){if(ye(u),o!==o+0)throw o;we(1,0)}}function Oi(s,d,r,i,t){var a=Oe();try{return ot(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Ni(s,d,r,i){var t=Oe();try{return ur(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Ti(s,d,r,i,t,a,n){var f=Oe();try{At(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function Ci(s,d,r,i,t,a){var n=Oe();try{Qr(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function Fi(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{return Ct(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function Ai(s,d,r,i,t,a){var n=Oe();try{return Dt(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function kn(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{Ft(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function In(s,d,r,i,t,a,n,f){var v=Oe();try{return Pt(s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Xt,l.FS=e;var w;$e=function s(){w||g(),w||($e=s)};function g(s){if(s=s||Y,Re>0||(Wn(),Re>0))return;function d(){w||(w=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),d()},1)):d()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return g(),O}var Gc,$u,Ju=Ki(()=>{"use strict";Gc=10363468,$u=__dirname+"/php_7_0.wasm"});var ef={};Hi(ef,{dependenciesTotalSize:()=>$c,dependencyFilename:()=>Qu,init:()=>Zc});function Zc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(r,i)=>{throw i},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(r){return l.locateFile?l.locateFile(r,ae):ae+r}var Ye,nr,Me;function Lr(r){if(r instanceof mr)return;ce("exiting due to exception: "+r)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(r,i)=>(wr(),r=Le.normalize(r),V.readFileSync(r,i?void 0:"utf8")),Me=r=>{var i=Ye(r,!0);return i.buffer||(i=new Uint8Array(i)),i},nr=(r,i,t)=>{wr(),r=Le.normalize(r),V.readFile(r,function(a,n){a?t(a):i(n.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(r){if(!(r instanceof mr))throw r}),process.on("unhandledRejection",function(r){throw r}),te=(r,i)=>{if(_r())throw process.exitCode=r,i;Lr(i),process.exit(r)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(r,i){r||ue(i)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(r,i,t){for(var a=i+t,n=i;r[n]&&!(n>=a);)++n;if(n-i>16&&r.buffer&&at)return at.decode(r.subarray(i,n));for(var f="";i<n;){var v=r[i++];if(!(v&128)){f+=String.fromCharCode(v);continue}var u=r[i++]&63;if((v&224)==192){f+=String.fromCharCode((v&31)<<6|u);continue}var o=r[i++]&63;if((v&240)==224?v=(v&15)<<12|u<<6|o:v=(v&7)<<18|u<<12|o<<6|r[i++]&63,v<65536)f+=String.fromCharCode(v);else{var c=v-65536;f+=String.fromCharCode(55296|c>>10,56320|c&1023)}}return f}function ne(r,i){return r?We(de,r,i):""}function Xe(r,i,t,a){if(!(a>0))return 0;for(var n=t,f=t+a-1,v=0;v<r.length;++v){var u=r.charCodeAt(v);if(u>=55296&&u<=57343){var o=r.charCodeAt(++v);u=65536+((u&1023)<<10)|o&1023}if(u<=127){if(t>=f)break;i[t++]=u}else if(u<=2047){if(t+1>=f)break;i[t++]=192|u>>6,i[t++]=128|u&63}else if(u<=65535){if(t+2>=f)break;i[t++]=224|u>>12,i[t++]=128|u>>6&63,i[t++]=128|u&63}else{if(t+3>=f)break;i[t++]=240|u>>18,i[t++]=128|u>>12&63,i[t++]=128|u>>6&63,i[t++]=128|u&63}}return i[t]=0,t-n}function Ae(r,i,t){return Xe(r,de,i,t)}function Pe(r){for(var i=0,t=0;t<r.length;++t){var a=r.charCodeAt(t);a<=127?i++:a<=2047?i+=2:a>=55296&&a<=57343?(i+=4,++t):i+=3}return i}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(r){Cr=r,l.HEAP8=$=new Int8Array(r),l.HEAP16=Ee=new Int16Array(r),l.HEAP32=h=new Int32Array(r),l.HEAPU8=de=new Uint8Array(r),l.HEAPU16=st=new Uint16Array(r),l.HEAPU32=H=new Uint32Array(r),l.HEAPF32=Bn=new Float32Array(r),l.HEAPF64=ut=new Float64Array(r)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Rn(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(r){ct.unshift(r)}function Kn(r){lt.unshift(r)}function Gn(r){dt.unshift(r)}var Re=0,Ar=null,$e=null;function Qi(r){return r}function vr(r){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(r){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var i=$e;$e=null,i()}}function ue(r){l.onAbort&&l.onAbort(r),r="Aborted("+r+")",ce(r),Ce=!0,Ge=1,r+=". Build with -sASSERTIONS for more info.";var i=new WebAssembly.RuntimeError(r);throw i}var Xn="data:application/octet-stream;base64,";function vt(r){return r.startsWith(Xn)}var _e;_e=Qu,vt(_e)||(_e=cr(_e));function mt(r){try{if(r==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(r);throw"both async and sync fetching of the wasm failed"}catch(i){ue(i)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+_e+"'";return r.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var r={a:xr};function i(v,u){var o=v.exports;o=be.instrumentWasmExports(o),l.asm=o,or=l.asm.Ua,ft(or.buffer),xn=l.asm.db,Kn(l.asm.Va),Ze("wasm-instantiate")}vr("wasm-instantiate");function t(v){i(v.instance)}function a(v){return $n().then(function(u){return WebAssembly.instantiate(u,r)}).then(function(u){return u}).then(v,function(u){ce("failed to asynchronously prepare wasm: "+u),ue(u)})}function n(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(v){var u=WebAssembly.instantiateStreaming(v,r);return u.then(t,function(o){return ce("wasm streaming compile failed: "+o),ce("falling back to ArrayBuffer instantiation"),a(t)})}):a(t)}if(l.instantiateWasm)try{var f=l.instantiateWasm(r,i);return f=be.instrumentWasmExports(f),f}catch(v){return ce("Module.instantiateWasm callback failed with error: "+v),!1}return n(),{}}var P,q;function mr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function pr(r){for(;r.length>0;)r.shift()(l)}function pt(r){if(r instanceof mr||r=="unwind")return Ge;te(1,r)}function ht(r,i){$.set(r,i)}function Jn(r,i,t,a){ue("Assertion failed: "+ne(r)+", at: "+[i?ne(i):"unknown filename",t,a?ne(a):"unknown function"])}function Qn(r,i){(function(t){tr.apply(null,[r,t])})(i)}var U={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return i.exec(r).slice(1)},normalizeArray:(r,i)=>{for(var t=0,a=r.length-1;a>=0;a--){var n=r[a];n==="."?r.splice(a,1):n===".."?(r.splice(a,1),t++):t&&(r.splice(a,1),t--)}if(i)for(;t;t--)r.unshift("..");return r},normalize:r=>{var i=U.isAbs(r),t=r.substr(-1)==="/";return r=U.normalizeArray(r.split("/").filter(a=>!!a),!i).join("/"),!r&&!i&&(r="."),r&&t&&(r+="/"),(i?"/":"")+r},dirname:r=>{var i=U.splitPath(r),t=i[0],a=i[1];return!t&&!a?".":(a&&(a=a.substr(0,a.length-1)),t+a)},basename:r=>{if(r==="/")return"/";r=U.normalize(r),r=r.replace(/\/$/,"");var i=r.lastIndexOf("/");return i===-1?r:r.substr(i+1)},join:function(){var r=Array.prototype.slice.call(arguments);return U.normalize(r.join("/"))},join2:(r,i)=>U.normalize(r+"/"+i)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}else if(Z)try{var i=require("crypto");return()=>i.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var r="",i=!1,t=arguments.length-1;t>=-1&&!i;t--){var a=t>=0?arguments[t]:e.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";r=a+"/"+r,i=U.isAbs(a)}return r=U.normalizeArray(r.split("/").filter(n=>!!n),!i).join("/"),(i?"/":"")+r||"."},relative:(r,i)=>{r=ge.resolve(r).substr(1),i=ge.resolve(i).substr(1);function t(c){for(var _=0;_<c.length&&c[_]==="";_++);for(var m=c.length-1;m>=0&&c[m]==="";m--);return _>m?[]:c.slice(_,m-_+1)}for(var a=t(r.split("/")),n=t(i.split("/")),f=Math.min(a.length,n.length),v=f,u=0;u<f;u++)if(a[u]!==n[u]){v=u;break}for(var o=[],u=v;u<a.length;u++)o.push("..");return o=o.concat(n.slice(v)),o.join("/")}};function Je(r,i,t){var a=t>0?t:Pe(r)+1,n=new Array(a),f=Xe(r,n,0,n.length);return i&&(n.length=f),n}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(r,i){Se.ttys[r]={input:[],output:[],ops:i},e.registerDevice(r,Se.stream_ops)},stream_ops:{open:function(r){var i=Se.ttys[r.node.rdev];if(!i)throw new e.ErrnoError(43);r.tty=i,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.get_char)throw new e.ErrnoError(60);for(var f=0,v=0;v<a;v++){var u;try{u=r.tty.ops.get_char(r.tty)}catch{throw new e.ErrnoError(29)}if(u===void 0&&f===0)throw new e.ErrnoError(6);if(u==null)break;f++,i[t+v]=u}return f&&(r.node.timestamp=Date.now()),f},write:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var f=0;f<a;f++)r.tty.ops.put_char(r.tty,i[t+f])}catch{throw new e.ErrnoError(29)}return a&&(r.node.timestamp=Date.now()),f}},default_tty_ops:{get_char:function(r){if(!r.input.length){var i=null;if(Z){var t=256,a=Buffer.alloc(t),n=0;try{n=V.readSync(process.stdin.fd,a,0,t,-1)}catch(f){if(f.toString().includes("EOF"))n=0;else throw f}n>0?i=a.slice(0,n).toString("utf-8"):i=null}else typeof window<"u"&&typeof window.prompt=="function"?(i=window.prompt("Input: "),i!==null&&(i+=`
|
|
31
|
+
`},"%p":function(b){return b.tm_hour>=0&&b.tm_hour<12?"AM":"PM"},"%S":function(b){return _(b.tm_sec,2)},"%t":function(){return" "},"%u":function(b){return b.tm_wday||7},"%U":function(b){var k=b.tm_yday+7-b.tm_wday;return _(Math.floor(k/7),2)},"%V":function(b){var k=Math.floor((b.tm_yday+7-(b.tm_wday+6)%7)/7);if((b.tm_wday+371-b.tm_yday-2)%7<=2&&k++,k){if(k==53){var T=(b.tm_wday+371-b.tm_yday)%7;T!=4&&(T!=3||!Ue(b.tm_year))&&(k=1)}}else{k=52;var D=(b.tm_wday+7-b.tm_yday-1)%7;(D==4||D==5&&Ue(b.tm_year%400-1))&&k++}return _(k,2)},"%w":function(b){return b.tm_wday},"%W":function(b){var k=b.tm_yday+7-(b.tm_wday+6)%7;return _(Math.floor(k/7),2)},"%y":function(b){return(b.tm_year+1900).toString().substring(2)},"%Y":function(b){return b.tm_year+1900},"%z":function(b){var k=b.tm_gmtoff,D=k>=0;return k=Math.abs(k)/60,k=k/60*100+k%60,(D?"+":"-")+("0000"+k).slice(-4)},"%Z":function(b){return b.tm_zone},"%%":function(){return"%"}};n=n.replace(/%%/g,"\0\0");for(var v in E)n.includes(v)&&(n=n.replace(new RegExp(v,"g"),E[v](a)));n=n.replace(/\0\0/g,"%");var S=Je(n,!1);return S.length>d?0:(ht(S,s),S.length-1)}function Yr(s,d,r){for(var i=ne(d),t="\\!@#$^&*()+=-[]/{}|:<>?,.",a=0,n=t.length;a<n;++a)i=i.replace(new RegExp("\\"+t[a],"g"),"\\"+t[a]);var f={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var v in f)i=i.replace(v,f[v]);var u={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},o={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},c={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},_={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var m in u)i=i.replace(m,"("+m+u[m]+")");for(var p=[],a=i.indexOf("%");a>=0;a=i.indexOf("%"))p.push(i[a+1]),i=i.replace(new RegExp("\\%"+i[a+1],"g"),"");var y=new RegExp("^"+i,"i").exec(ne(s));function E(){function le(he,ze,Ve){return typeof he!="number"||isNaN(he)?ze:he>=ze?he<=Ve?he:Ve:ze}return{year:le(h[r+20>>2]+1900,1970,9999),month:le(h[r+16>>2],0,11),day:le(h[r+12>>2],1,31),hour:le(h[r+8>>2],0,23),min:le(h[r+4>>2],0,59),sec:le(h[r>>2],0,59)}}if(y){var S=E(),b,k=le=>{var he=p.indexOf(le);if(he>=0)return y[he+1]};if((b=k("S"))&&(S.sec=Q(b)),(b=k("M"))&&(S.min=Q(b)),b=k("H"))S.hour=Q(b);else if(b=k("I")){var D=Q(b);(b=k("p"))&&(D+=b.toUpperCase()[0]==="P"?12:0),S.hour=D}if(b=k("Y"))S.year=Q(b);else if(b=k("y")){var T=Q(b);(b=k("C"))?T+=Q(b)*100:T+=T<69?2e3:1900,S.year=T}if((b=k("m"))?S.month=Q(b)-1:(b=k("b"))&&(S.month=o[b.substring(0,3).toUpperCase()]||0),b=k("d"))S.day=Q(b);else if(b=k("j"))for(var C=Q(b),A=Ue(S.year),I=0;I<12;++I){var z=ir(A?qe:Er,I-1);C<=z+(A?qe:Er)[I]&&(S.day=C-z)}else if(b=k("a")){var K=b.substring(0,3).toUpperCase();if(b=k("U")){var B=c[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===0?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}else if(b=k("W")){var B=_[K],x=Q(b),G=new Date(S.year,0,1),re;G.getDay()===1?re=fr(G,B+7*(x-1)):re=fr(G,7-G.getDay()+1+B+7*(x-1)),S.day=re.getDate(),S.month=re.getMonth()}}var oe=new Date(S.year,S.month,S.day,S.hour,S.min,S.sec,0);return h[r>>2]=oe.getSeconds(),h[r+4>>2]=oe.getMinutes(),h[r+8>>2]=oe.getHours(),h[r+12>>2]=oe.getDate(),h[r+16>>2]=oe.getMonth(),h[r+20>>2]=oe.getFullYear()-1900,h[r+24>>2]=oe.getDay(),h[r+28>>2]=ir(Ue(oe.getFullYear())?qe:Er,oe.getMonth()-1)+oe.getDate()-1,h[r+32>>2]=0,s+Je(y[0]).length-1}return 0}function jt(s){return je.shutdownSocket(s,2)}function Yt(s,d,r){if(typeof X>"u")return 0;let i=1,t=2,a=4,n=8,f=16,v=32;return X.handleSleep(u=>{let o=ve(s);if(!o){u(0);return}let c=[],_=new Set;if(d&i||d&t){if(o.server){for(let b of o.pending)if((b.recv_queue||[]).length>0){u(1);return}}else if((o.recv_queue||[]).length>0){u(1);return}}let m=je.getAllWebSockets(o);if(!m.length){u(0);return}for(let b of m)(d&i||d&t)&&(c.push(je.awaitData(b)),_.add("POLLIN")),d&a&&(c.push(je.awaitConnection(b)),_.add("POLLOUT")),d&f&&(c.push(je.awaitClose(b)),_.add("POLLHUP")),(d&n||d&v)&&(c.push(je.awaitError(b)),_.add("POLLERR"));if(c.length===0){console.warn("Unsupported poll event "+d+", defaulting to setTimeout()."),setTimeout(function(){u(0)},r);return}let p=c.map(([b])=>b),y=()=>c.forEach(([,b])=>b()),E=!1;Promise.race(p).then(function(b){E||(E=!0,u(1),clearTimeout(S),y())});let S=setTimeout(function(){E||(E=!0,u(0),y())},r)})}function Gt(s,d,r,i,t){let a=de[i];if(!(d===1&&r===9||d===6&&r===1))return console.warn(`Unsupported socket option: ${d}, ${r}, ${a}`),-1;let c=je.getAllWebSockets(s)[0];return c?(c.setSocketOpt(d,r,i),0):-1}function be(s){try{return s()}catch(d){ue(d)}}var X={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(s){var d=X.callStackNameToId[s];return d===void 0&&(d=X.callStackId++,X.callStackNameToId[s]=d,X.callStackIdToName[d]=s),d},instrumentWasmImports:function(s){var d=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(i=>i.split(".")[1]);for(var r in s)(function(i){var t=s[i],a=t.sig;if(typeof t=="function")var n=d.indexOf(i)>=0||i.startsWith("__asyncjs__")})(r)},instrumentWasmExports:function(s){var d={};for(var r in s)(function(i){var t=s[i];typeof t=="function"?d[i]=function(){X.exportCallStack.push(i);try{return t.apply(null,arguments)}finally{if(!Ce){var a=X.exportCallStack.pop();Ne(a===i),X.maybeStopUnwind()}}}:d[i]=t})(r);return d},maybeStopUnwind:function(){X.currData&&X.state===X.State.Unwinding&&X.exportCallStack.length===0&&(X.state=X.State.Normal,et(),be(Mt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((s,d)=>{X.asyncPromiseHandlers={resolve:s,reject:d}})},allocateData:function(){var s=sr(12+X.StackSize);return X.setDataHeader(s,s+12,X.StackSize),X.setDataRewindFunc(s),s},setDataHeader:function(s,d,r){h[s>>2]=d,h[s+4>>2]=d+r},setDataRewindFunc:function(s){var d=X.exportCallStack[0],r=X.getCallStackId(d);h[s+8>>2]=r},getDataRewindFunc:function(s){var d=h[s+8>>2],r=X.callStackIdToName[d],i=l.asm[r];return i},doRewind:function(s){var d=X.getDataRewindFunc(s);return jr(),d()},handleSleep:function(s){if(!Ce){if(X.state===X.State.Normal){var d=!1,r=!1;s(i=>{if(!Ce&&(X.handleSleepReturnValue=i||0,d=!0,!!r)){X.state=X.State.Rewinding,be(()=>Lt(X.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var t,a=!1;try{t=X.doRewind(X.currData)}catch(v){t=v,a=!0}var n=!1;if(!X.currData){var f=X.asyncPromiseHandlers;f&&(X.asyncPromiseHandlers=null,(a?f.reject:f.resolve)(t),n=!0)}if(a&&!n)throw t}}),r=!0,d||(X.state=X.State.Unwinding,X.currData=X.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),be(()=>Rt(X.currData)))}else X.state===X.State.Rewinding?(X.state=X.State.Normal,be(Vt),er(X.currData),X.currData=null,X.sleepCallbacks.forEach(i=>gt(i))):ue("invalid state: "+X.state);return X.handleSleepReturnValue}},handleAsync:function(s){return X.handleSleep(d=>{s().then(d)})}};function Fe(s){var d=l["_"+s];return d}function Xt(s,d,r,i,t){var a={string:E=>{var S=0;if(E!=null&&E!==0){var b=(E.length<<2)+1;S=tr(b),Ae(E,S,b)}return S},array:E=>{var S=tr(E.length);return ht(E,S),S}};function n(E){return d==="string"?ne(E):d==="boolean"?!!E:E}var f=Fe(s),v=[],u=0;if(i)for(var o=0;o<i.length;o++){var c=a[r[o]];c?(u===0&&(u=Oe()),v[o]=c(i[o])):v[o]=i[o]}var _=X.currData,m=f.apply(null,v);function p(E){return jr(),u!==0&&ye(u),n(E)}et();var y=t&&t.async;return X.currData!=_?X.whenDone().then(p):(m=p(m),y?Promise.resolve(m):m)}var ie=function(s,d,r,i){s||(s=this),this.parent=s,this.mount=s.mount,this.mounted=null,this.id=e.nextInode++,this.name=d,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Gr=365,xr=146;Object.defineProperties(ie.prototype,{read:{get:function(){return(this.mode&Gr)===Gr},set:function(s){s?this.mode|=Gr:this.mode&=~Gr}},write:{get:function(){return(this.mode&xr)===xr},set:function(s){s?this.mode|=xr:this.mode&=~xr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=ie,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var ke={j:Jn,Ra:Qn,Qa:no,Pa:oo,Oa:io,Na:ao,N:so,Ma:uo,La:fo,Ka:co,Ja:lo,Ia:Xr,Ha:_o,M:vo,n:mo,Ga:po,Q:ho,Fa:yo,Ea:wo,Da:Eo,Ca:go,Ba:So,L:bo,Aa:ko,za:Do,ya:Oo,xa:No,B:To,wa:Co,va:pe,ua:Fo,ta:Ao,sa:Po,K:Ro,ra:Mo,J:Lo,qa:Io,pa:Uo,oa:Bo,I:xo,na:Ho,ja:$r,ia:zo,ha:_n,ga:jo,fa:Yo,ea:qo,da:Vo,ca:Ko,ba:Go,aa:Xo,$:zr,l:Zo,z:It,_:Jo,F:Wr,Z:Qo,Y:ei,X:xt,ma:Ir,la:Ht,o:Et,s:oi,H:ii,G:si,P:ui,ka:fi,A:li,E:An,D:di,W:_i,V:En,U:zt,T:Wt,h:Cn,d:Nn,b:Tn,f:Ni,g:Oi,v:Ai,u:hn,t:In,S:Di,y:Fi,e:bn,a:pn,c:ln,k:cn,q:Ln,m:Ci,i:Ti,x:kn,R:Nr,C:Tr,O:Yr,p:jt,w:Yt,r:Gt},Te=Zn(),an=l.___wasm_call_ctors=function(){return(an=l.___wasm_call_ctors=l.asm.Ta).apply(null,arguments)},On=l._wasm_popen=function(){return(On=l._wasm_popen=l.asm.Ua).apply(null,arguments)},sn=l.___errno_location=function(){return(sn=l.___errno_location=l.asm.Va).apply(null,arguments)},$t=l._wasm_pclose=function(){return($t=l._wasm_pclose=l.asm.Wa).apply(null,arguments)},gn=l._php_pollfd_for=function(){return(gn=l._php_pollfd_for=l.asm.Xa).apply(null,arguments)},Pn=l._wasm_select=function(){return(Pn=l._wasm_select=l.asm.Ya).apply(null,arguments)},bt=l._wasm_add_cli_arg=function(){return(bt=l._wasm_add_cli_arg=l.asm.Za).apply(null,arguments)},sr=l._malloc=function(){return(sr=l._malloc=l.asm._a).apply(null,arguments)},qr=l._run_cli=function(){return(qr=l._run_cli=l.asm.$a).apply(null,arguments)},Qt=l._memcpy=function(){return(Qt=l._memcpy=l.asm.ab).apply(null,arguments)},er=l._free=function(){return(er=l._free=l.asm.bb).apply(null,arguments)},qt=l._ntohs=function(){return(qt=l._ntohs=l.asm.db).apply(null,arguments)},Zr=l._htons=function(){return(Zr=l._htons=l.asm.eb).apply(null,arguments)},kr=l._fflush=function(){return(kr=l._fflush=l.asm.fb).apply(null,arguments)},Ur=l._wasm_set_phpini_path=function(){return(Ur=l._wasm_set_phpini_path=l.asm.gb).apply(null,arguments)},nt=l._wasm_set_phpini_entries=function(){return(nt=l._wasm_set_phpini_entries=l.asm.hb).apply(null,arguments)},Zt=l._wasm_add_SERVER_entry=function(){return(Zt=l._wasm_add_SERVER_entry=l.asm.ib).apply(null,arguments)},kt=l._wasm_add_uploaded_file=function(){return(kt=l._wasm_add_uploaded_file=l.asm.jb).apply(null,arguments)},mn=l._wasm_set_query_string=function(){return(mn=l._wasm_set_query_string=l.asm.kb).apply(null,arguments)},un=l._wasm_set_path_translated=function(){return(un=l._wasm_set_path_translated=l.asm.lb).apply(null,arguments)},fn=l._wasm_set_skip_shebang=function(){return(fn=l._wasm_set_skip_shebang=l.asm.mb).apply(null,arguments)},Sn=l._wasm_set_request_uri=function(){return(Sn=l._wasm_set_request_uri=l.asm.nb).apply(null,arguments)},vi=l._wasm_set_request_method=function(){return(vi=l._wasm_set_request_method=l.asm.ob).apply(null,arguments)},mi=l._wasm_set_request_host=function(){return(mi=l._wasm_set_request_host=l.asm.pb).apply(null,arguments)},pi=l._wasm_set_content_type=function(){return(pi=l._wasm_set_content_type=l.asm.qb).apply(null,arguments)},hi=l._wasm_set_request_body=function(){return(hi=l._wasm_set_request_body=l.asm.rb).apply(null,arguments)},yi=l._wasm_set_content_length=function(){return(yi=l._wasm_set_content_length=l.asm.sb).apply(null,arguments)},wi=l._wasm_set_cookies=function(){return(wi=l._wasm_set_cookies=l.asm.tb).apply(null,arguments)},Ei=l._wasm_set_php_code=function(){return(Ei=l._wasm_set_php_code=l.asm.ub).apply(null,arguments)},gi=l._wasm_set_request_port=function(){return(gi=l._wasm_set_request_port=l.asm.vb).apply(null,arguments)},Si=l._phpwasm_init_uploaded_files_hash=function(){return(Si=l._phpwasm_init_uploaded_files_hash=l.asm.wb).apply(null,arguments)},bi=l._phpwasm_register_uploaded_file=function(){return(bi=l._phpwasm_register_uploaded_file=l.asm.xb).apply(null,arguments)},ki=l._phpwasm_destroy_uploaded_files_hash=function(){return(ki=l._phpwasm_destroy_uploaded_files_hash=l.asm.yb).apply(null,arguments)},Rn=l._wasm_sapi_handle_request=function(){return(Rn=l._wasm_sapi_handle_request=l.asm.zb).apply(null,arguments)},Mn=l._php_wasm_init=function(){return(Mn=l._php_wasm_init=l.asm.Ab).apply(null,arguments)},Sr=l.___funcs_on_exit=function(){return(Sr=l.___funcs_on_exit=l.asm.Bb).apply(null,arguments)},gr=l._emscripten_builtin_memalign=function(){return(gr=l._emscripten_builtin_memalign=l.asm.Cb).apply(null,arguments)},we=l._setThrew=function(){return(we=l._setThrew=l.asm.Db).apply(null,arguments)},Oe=l.stackSave=function(){return(Oe=l.stackSave=l.asm.Eb).apply(null,arguments)},ye=l.stackRestore=function(){return(ye=l.stackRestore=l.asm.Fb).apply(null,arguments)},tr=l.stackAlloc=function(){return(tr=l.stackAlloc=l.asm.Gb).apply(null,arguments)},De=l.dynCall_viii=function(){return(De=l.dynCall_viii=l.asm.Hb).apply(null,arguments)},xe=l.dynCall_vii=function(){return(xe=l.dynCall_vii=l.asm.Ib).apply(null,arguments)},Ie=l.dynCall_vi=function(){return(Ie=l.dynCall_vi=l.asm.Jb).apply(null,arguments)},ar=l.dynCall_iii=function(){return(ar=l.dynCall_iii=l.asm.Kb).apply(null,arguments)},Be=l.dynCall_ii=function(){return(Be=l.dynCall_ii=l.asm.Lb).apply(null,arguments)},He=l.dynCall_v=function(){return(He=l.dynCall_v=l.asm.Mb).apply(null,arguments)},ur=l.dynCall_iiii=function(){return(ur=l.dynCall_iiii=l.asm.Nb).apply(null,arguments)},Qr=l.dynCall_viiiii=function(){return(Qr=l.dynCall_viiiii=l.asm.Ob).apply(null,arguments)},ot=l.dynCall_iiiii=function(){return(ot=l.dynCall_iiiii=l.asm.Pb).apply(null,arguments)},it=l.dynCall_iiiiiii=function(){return(it=l.dynCall_iiiiiii=l.asm.Qb).apply(null,arguments)},Dt=l.dynCall_iiiiii=function(){return(Dt=l.dynCall_iiiiii=l.asm.Rb).apply(null,arguments)},Ot=l.dynCall_i=function(){return(Ot=l.dynCall_i=l.asm.Sb).apply(null,arguments)},Nt=l.dynCall_viiii=function(){return(Nt=l.dynCall_viiii=l.asm.Tb).apply(null,arguments)},Tt=l.dynCall_iiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiii=l.asm.Ub).apply(null,arguments)},Ct=l.dynCall_iiiiiiiiii=function(){return(Ct=l.dynCall_iiiiiiiiii=l.asm.Vb).apply(null,arguments)},Ft=l.dynCall_viiiiiiiii=function(){return(Ft=l.dynCall_viiiiiiiii=l.asm.Wb).apply(null,arguments)},At=l.dynCall_viiiiii=function(){return(At=l.dynCall_viiiiii=l.asm.Xb).apply(null,arguments)},Pt=l.dynCall_iiiiiiii=function(){return(Pt=l.dynCall_iiiiiiii=l.asm.Yb).apply(null,arguments)},Rt=l._asyncify_start_unwind=function(){return(Rt=l._asyncify_start_unwind=l.asm.Zb).apply(null,arguments)},Mt=l._asyncify_stop_unwind=function(){return(Mt=l._asyncify_stop_unwind=l.asm._b).apply(null,arguments)},Lt=l._asyncify_start_rewind=function(){return(Lt=l._asyncify_start_rewind=l.asm.$b).apply(null,arguments)},Vt=l._asyncify_stop_rewind=function(){return(Vt=l._asyncify_stop_rewind=l.asm.ac).apply(null,arguments)};function cn(s,d,r,i){var t=Oe();try{De(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function ln(s,d,r){var i=Oe();try{xe(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function pn(s,d){var r=Oe();try{Ie(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function hn(s,d,r,i,t,a,n){var f=Oe();try{return it(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function bn(s){var d=Oe();try{He(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Nn(s,d){var r=Oe();try{return Be(s,d)}catch(i){if(ye(r),i!==i+0)throw i;we(1,0)}}function Tn(s,d,r){var i=Oe();try{return ar(s,d,r)}catch(t){if(ye(i),t!==t+0)throw t;we(1,0)}}function Cn(s){var d=Oe();try{return Ot(s)}catch(r){if(ye(d),r!==r+0)throw r;we(1,0)}}function Ln(s,d,r,i,t){var a=Oe();try{Nt(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Di(s,d,r,i,t,a,n,f,v){var u=Oe();try{return Tt(s,d,r,i,t,a,n,f,v)}catch(o){if(ye(u),o!==o+0)throw o;we(1,0)}}function Oi(s,d,r,i,t){var a=Oe();try{return ot(s,d,r,i,t)}catch(n){if(ye(a),n!==n+0)throw n;we(1,0)}}function Ni(s,d,r,i){var t=Oe();try{return ur(s,d,r,i)}catch(a){if(ye(t),a!==a+0)throw a;we(1,0)}}function Ti(s,d,r,i,t,a,n){var f=Oe();try{At(s,d,r,i,t,a,n)}catch(v){if(ye(f),v!==v+0)throw v;we(1,0)}}function Ci(s,d,r,i,t,a){var n=Oe();try{Qr(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function Fi(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{return Ct(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function Ai(s,d,r,i,t,a){var n=Oe();try{return Dt(s,d,r,i,t,a)}catch(f){if(ye(n),f!==f+0)throw f;we(1,0)}}function kn(s,d,r,i,t,a,n,f,v,u){var o=Oe();try{Ft(s,d,r,i,t,a,n,f,v,u)}catch(c){if(ye(o),c!==c+0)throw c;we(1,0)}}function In(s,d,r,i,t,a,n,f){var v=Oe();try{return Pt(s,d,r,i,t,a,n,f)}catch(u){if(ye(v),u!==u+0)throw u;we(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Xt,l.FS=e;var w;$e=function s(){w||g(),w||($e=s)};function g(s){if(s=s||Y,Re>0||(Wn(),Re>0))return;function d(){w||(w=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),d()},1)):d()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return g(),O}var Gc,$u,Ju=Ki(()=>{"use strict";Gc=10363468,$u=__dirname+"/php_7_0.wasm"});var ef={};Wi(ef,{dependenciesTotalSize:()=>$c,dependencyFilename:()=>Qu,init:()=>Zc});function Zc(R,O,F){var l=typeof O<"u"?O:{},W=Object.assign({},l),Y=[],J="./this.program",te=(r,i)=>{throw i},me=R==="WEB",fe=R==="WORKER",Z=R==="NODE",ae="";function cr(r){return l.locateFile?l.locateFile(r,ae):ae+r}var Ye,nr,Me;function Lr(r){if(r instanceof mr)return;ce("exiting due to exception: "+r)}if(Z){fe?ae=require("path").dirname(ae)+"/":ae=__dirname+"/";var V,Le,wr=()=>{Le||(V=require("fs"),Le=require("path"))};Ye=(r,i)=>(wr(),r=Le.normalize(r),V.readFileSync(r,i?void 0:"utf8")),Me=r=>{var i=Ye(r,!0);return i.buffer||(i=new Uint8Array(i)),i},nr=(r,i,t)=>{wr(),r=Le.normalize(r),V.readFile(r,function(a,n){a?t(a):i(n.buffer)})},process.argv.length>1&&(J=process.argv[1].replace(/\\/g,"/")),Y=process.argv.slice(2),typeof module<"u"&&(module.exports=l),process.on("uncaughtException",function(r){if(!(r instanceof mr))throw r}),process.on("unhandledRejection",function(r){throw r}),te=(r,i)=>{if(_r())throw process.exitCode=r,i;Lr(i),process.exit(r)},l.inspect=function(){return"[Emscripten Module object]"}}var Qe=l.print||console.log.bind(console),ce=l.printErr||console.warn.bind(console);Object.assign(l,W),W=null,l.arguments&&(Y=l.arguments),l.thisProgram&&(J=l.thisProgram),l.quit&&(te=l.quit);var Ke;l.wasmBinary&&(Ke=l.wasmBinary);var yn=l.noExitRuntime||!1;typeof WebAssembly!="object"&&ue("no native wasm support detected");var or,Ce=!1,Ge;function Ne(r,i){r||ue(i)}var at=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function We(r,i,t){for(var a=i+t,n=i;r[n]&&!(n>=a);)++n;if(n-i>16&&r.buffer&&at)return at.decode(r.subarray(i,n));for(var f="";i<n;){var v=r[i++];if(!(v&128)){f+=String.fromCharCode(v);continue}var u=r[i++]&63;if((v&224)==192){f+=String.fromCharCode((v&31)<<6|u);continue}var o=r[i++]&63;if((v&240)==224?v=(v&15)<<12|u<<6|o:v=(v&7)<<18|u<<12|o<<6|r[i++]&63,v<65536)f+=String.fromCharCode(v);else{var c=v-65536;f+=String.fromCharCode(55296|c>>10,56320|c&1023)}}return f}function ne(r,i){return r?We(de,r,i):""}function Xe(r,i,t,a){if(!(a>0))return 0;for(var n=t,f=t+a-1,v=0;v<r.length;++v){var u=r.charCodeAt(v);if(u>=55296&&u<=57343){var o=r.charCodeAt(++v);u=65536+((u&1023)<<10)|o&1023}if(u<=127){if(t>=f)break;i[t++]=u}else if(u<=2047){if(t+1>=f)break;i[t++]=192|u>>6,i[t++]=128|u&63}else if(u<=65535){if(t+2>=f)break;i[t++]=224|u>>12,i[t++]=128|u>>6&63,i[t++]=128|u&63}else{if(t+3>=f)break;i[t++]=240|u>>18,i[t++]=128|u>>12&63,i[t++]=128|u>>6&63,i[t++]=128|u&63}}return i[t]=0,t-n}function Ae(r,i,t){return Xe(r,de,i,t)}function Pe(r){for(var i=0,t=0;t<r.length;++t){var a=r.charCodeAt(t);a<=127?i++:a<=2047?i+=2:a>=55296&&a<=57343?(i+=4,++t):i+=3}return i}var Cr,$,de,Ee,st,h,H,Bn,ut;function ft(r){Cr=r,l.HEAP8=$=new Int8Array(r),l.HEAP16=Ee=new Int16Array(r),l.HEAP32=h=new Int32Array(r),l.HEAPU8=de=new Uint8Array(r),l.HEAPU16=st=new Uint16Array(r),l.HEAPU32=H=new Uint32Array(r),l.HEAPF32=Bn=new Float32Array(r),l.HEAPF64=ut=new Float64Array(r)}var Ji=l.INITIAL_MEMORY||1073741824,xn,ct=[],lt=[],Hn=[],dt=[],zn=!1,_t=!1,Fr=0;function _r(){return yn||Fr>0}function Wn(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Vn(l.preRun.shift());pr(ct)}function jn(){zn=!0,!l.noFSInit&&!e.init.initialized&&e.init(),e.ignorePermissions=!1,Se.init(),j.root=e.mount(j,{},null),se.root=e.mount(se,{},null),pr(lt)}function Yn(){Rn(),pr(Hn),e.quit(),Se.shutdown(),_t=!0}function qn(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Gn(l.postRun.shift());pr(dt)}function Vn(r){ct.unshift(r)}function Kn(r){lt.unshift(r)}function Gn(r){dt.unshift(r)}var Re=0,Ar=null,$e=null;function Qi(r){return r}function vr(r){Re++,l.monitorRunDependencies&&l.monitorRunDependencies(Re)}function Ze(r){if(Re--,l.monitorRunDependencies&&l.monitorRunDependencies(Re),Re==0&&(Ar!==null&&(clearInterval(Ar),Ar=null),$e)){var i=$e;$e=null,i()}}function ue(r){l.onAbort&&l.onAbort(r),r="Aborted("+r+")",ce(r),Ce=!0,Ge=1,r+=". Build with -sASSERTIONS for more info.";var i=new WebAssembly.RuntimeError(r);throw i}var Xn="data:application/octet-stream;base64,";function vt(r){return r.startsWith(Xn)}var _e;_e=Qu,vt(_e)||(_e=cr(_e));function mt(r){try{if(r==_e&&Ke)return new Uint8Array(Ke);if(Me)return Me(r);throw"both async and sync fetching of the wasm failed"}catch(i){ue(i)}}function $n(){return!Ke&&(me||fe)&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+_e+"'";return r.arrayBuffer()}).catch(function(){return mt(_e)}):Promise.resolve().then(function(){return mt(_e)})}function Zn(){var r={a:xr};function i(v,u){var o=v.exports;o=be.instrumentWasmExports(o),l.asm=o,or=l.asm.Ua,ft(or.buffer),xn=l.asm.db,Kn(l.asm.Va),Ze("wasm-instantiate")}vr("wasm-instantiate");function t(v){i(v.instance)}function a(v){return $n().then(function(u){return WebAssembly.instantiate(u,r)}).then(function(u){return u}).then(v,function(u){ce("failed to asynchronously prepare wasm: "+u),ue(u)})}function n(){return!Ke&&typeof WebAssembly.instantiateStreaming=="function"&&!vt(_e)&&!Z&&typeof fetch=="function"?fetch(_e,{credentials:"same-origin"}).then(function(v){var u=WebAssembly.instantiateStreaming(v,r);return u.then(t,function(o){return ce("wasm streaming compile failed: "+o),ce("falling back to ArrayBuffer instantiation"),a(t)})}):a(t)}if(l.instantiateWasm)try{var f=l.instantiateWasm(r,i);return f=be.instrumentWasmExports(f),f}catch(v){return ce("Module.instantiateWasm callback failed with error: "+v),!1}return n(),{}}var P,q;function mr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function pr(r){for(;r.length>0;)r.shift()(l)}function pt(r){if(r instanceof mr||r=="unwind")return Ge;te(1,r)}function ht(r,i){$.set(r,i)}function Jn(r,i,t,a){ue("Assertion failed: "+ne(r)+", at: "+[i?ne(i):"unknown filename",t,a?ne(a):"unknown function"])}function Qn(r,i){(function(t){tr.apply(null,[r,t])})(i)}var U={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return i.exec(r).slice(1)},normalizeArray:(r,i)=>{for(var t=0,a=r.length-1;a>=0;a--){var n=r[a];n==="."?r.splice(a,1):n===".."?(r.splice(a,1),t++):t&&(r.splice(a,1),t--)}if(i)for(;t;t--)r.unshift("..");return r},normalize:r=>{var i=U.isAbs(r),t=r.substr(-1)==="/";return r=U.normalizeArray(r.split("/").filter(a=>!!a),!i).join("/"),!r&&!i&&(r="."),r&&t&&(r+="/"),(i?"/":"")+r},dirname:r=>{var i=U.splitPath(r),t=i[0],a=i[1];return!t&&!a?".":(a&&(a=a.substr(0,a.length-1)),t+a)},basename:r=>{if(r==="/")return"/";r=U.normalize(r),r=r.replace(/\/$/,"");var i=r.lastIndexOf("/");return i===-1?r:r.substr(i+1)},join:function(){var r=Array.prototype.slice.call(arguments);return U.normalize(r.join("/"))},join2:(r,i)=>U.normalize(r+"/"+i)};function eo(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}else if(Z)try{var i=require("crypto");return()=>i.randomBytes(1)[0]}catch{}return()=>ue("randomDevice")}var ge={resolve:function(){for(var r="",i=!1,t=arguments.length-1;t>=-1&&!i;t--){var a=t>=0?arguments[t]:e.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";r=a+"/"+r,i=U.isAbs(a)}return r=U.normalizeArray(r.split("/").filter(n=>!!n),!i).join("/"),(i?"/":"")+r||"."},relative:(r,i)=>{r=ge.resolve(r).substr(1),i=ge.resolve(i).substr(1);function t(c){for(var _=0;_<c.length&&c[_]==="";_++);for(var m=c.length-1;m>=0&&c[m]==="";m--);return _>m?[]:c.slice(_,m-_+1)}for(var a=t(r.split("/")),n=t(i.split("/")),f=Math.min(a.length,n.length),v=f,u=0;u<f;u++)if(a[u]!==n[u]){v=u;break}for(var o=[],u=v;u<a.length;u++)o.push("..");return o=o.concat(n.slice(v)),o.join("/")}};function Je(r,i,t){var a=t>0?t:Pe(r)+1,n=new Array(a),f=Xe(r,n,0,n.length);return i&&(n.length=f),n}var Se={ttys:[],init:function(){},shutdown:function(){},register:function(r,i){Se.ttys[r]={input:[],output:[],ops:i},e.registerDevice(r,Se.stream_ops)},stream_ops:{open:function(r){var i=Se.ttys[r.node.rdev];if(!i)throw new e.ErrnoError(43);r.tty=i,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.get_char)throw new e.ErrnoError(60);for(var f=0,v=0;v<a;v++){var u;try{u=r.tty.ops.get_char(r.tty)}catch{throw new e.ErrnoError(29)}if(u===void 0&&f===0)throw new e.ErrnoError(6);if(u==null)break;f++,i[t+v]=u}return f&&(r.node.timestamp=Date.now()),f},write:function(r,i,t,a,n){if(!r.tty||!r.tty.ops.put_char)throw new e.ErrnoError(60);try{for(var f=0;f<a;f++)r.tty.ops.put_char(r.tty,i[t+f])}catch{throw new e.ErrnoError(29)}return a&&(r.node.timestamp=Date.now()),f}},default_tty_ops:{get_char:function(r){if(!r.input.length){var i=null;if(Z){var t=256,a=Buffer.alloc(t),n=0;try{n=V.readSync(process.stdin.fd,a,0,t,-1)}catch(f){if(f.toString().includes("EOF"))n=0;else throw f}n>0?i=a.slice(0,n).toString("utf-8"):i=null}else typeof window<"u"&&typeof window.prompt=="function"?(i=window.prompt("Input: "),i!==null&&(i+=`
|
|
32
32
|
`)):typeof readline=="function"&&(i=readline(),i!==null&&(i+=`
|
|
33
33
|
`));if(!i)return null;r.input=Je(i,!0)}return r.input.shift()},put_char:function(r,i){i===null||i===10?(Qe(We(r.output,0)),r.output=[]):i!=0&&r.output.push(i)},fsync:function(r){r.output&&r.output.length>0&&(Qe(We(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,i){i===null||i===10?(ce(We(r.output,0)),r.output=[]):i!=0&&r.output.push(i)},fsync:function(r){r.output&&r.output.length>0&&(ce(We(r.output,0)),r.output=[])}}};function Pr(r,i){return de.fill(0,r,r+i),r}function ro(r,i){return Math.ceil(r/i)*i}function Rr(r){r=ro(r,65536);var i=Mn(65536,r);return i?Pr(i,r):0}var L={ops_table:null,mount:function(r){return L.createNode(null,"/",16895,0)},createNode:function(r,i,t,a){if(e.isBlkdev(t)||e.isFIFO(t))throw new e.ErrnoError(63);L.ops_table||(L.ops_table={dir:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,lookup:L.node_ops.lookup,mknod:L.node_ops.mknod,rename:L.node_ops.rename,unlink:L.node_ops.unlink,rmdir:L.node_ops.rmdir,readdir:L.node_ops.readdir,symlink:L.node_ops.symlink},stream:{llseek:L.stream_ops.llseek}},file:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:{llseek:L.stream_ops.llseek,read:L.stream_ops.read,write:L.stream_ops.write,allocate:L.stream_ops.allocate,mmap:L.stream_ops.mmap,msync:L.stream_ops.msync}},link:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr,readlink:L.node_ops.readlink},stream:{}},chrdev:{node:{getattr:L.node_ops.getattr,setattr:L.node_ops.setattr},stream:e.chrdev_stream_ops}});var n=e.createNode(r,i,t,a);return e.isDir(n.mode)?(n.node_ops=L.ops_table.dir.node,n.stream_ops=L.ops_table.dir.stream,n.contents={}):e.isFile(n.mode)?(n.node_ops=L.ops_table.file.node,n.stream_ops=L.ops_table.file.stream,n.usedBytes=0,n.contents=null):e.isLink(n.mode)?(n.node_ops=L.ops_table.link.node,n.stream_ops=L.ops_table.link.stream):e.isChrdev(n.mode)&&(n.node_ops=L.ops_table.chrdev.node,n.stream_ops=L.ops_table.chrdev.stream),n.timestamp=Date.now(),r&&(r.contents[i]=n,r.timestamp=n.timestamp),n},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,i){var t=r.contents?r.contents.length:0;if(!(t>=i)){var a=1024*1024;i=Math.max(i,t*(t<a?2:1.125)>>>0),t!=0&&(i=Math.max(i,256));var n=r.contents;r.contents=new Uint8Array(i),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,i){if(r.usedBytes!=i)if(i==0)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(i),t&&r.contents.set(t.subarray(0,Math.min(i,r.usedBytes))),r.usedBytes=i}},node_ops:{getattr:function(r){var i={};return i.dev=e.isChrdev(r.mode)?r.id:1,i.ino=r.id,i.mode=r.mode,i.nlink=1,i.uid=0,i.gid=0,i.rdev=r.rdev,e.isDir(r.mode)?i.size=4096:e.isFile(r.mode)?i.size=r.usedBytes:e.isLink(r.mode)?i.size=r.link.length:i.size=0,i.atime=new Date(r.timestamp),i.mtime=new Date(r.timestamp),i.ctime=new Date(r.timestamp),i.blksize=4096,i.blocks=Math.ceil(i.size/i.blksize),i},setattr:function(r,i){i.mode!==void 0&&(r.mode=i.mode),i.timestamp!==void 0&&(r.timestamp=i.timestamp),i.size!==void 0&&L.resizeFileStorage(r,i.size)},lookup:function(r,i){throw e.genericErrors[44]},mknod:function(r,i,t,a){return L.createNode(r,i,t,a)},rename:function(r,i,t){if(e.isDir(r.mode)){var a;try{a=e.lookupNode(i,t)}catch{}if(a)for(var n in a.contents)throw new e.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,i.contents[t]=r,i.timestamp=r.parent.timestamp,r.parent=i},unlink:function(r,i){delete r.contents[i],r.timestamp=Date.now()},rmdir:function(r,i){var t=e.lookupNode(r,i);for(var a in t.contents)throw new e.ErrnoError(55);delete r.contents[i],r.timestamp=Date.now()},readdir:function(r){var i=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&i.push(t);return i},symlink:function(r,i,t){var a=L.createNode(r,i,41471,0);return a.link=t,a},readlink:function(r){if(!e.isLink(r.mode))throw new e.ErrnoError(28);return r.link}},stream_ops:{read:function(r,i,t,a,n){var f=r.node.contents;if(n>=r.node.usedBytes)return 0;var v=Math.min(r.node.usedBytes-n,a);if(v>8&&f.subarray)i.set(f.subarray(n,n+v),t);else for(var u=0;u<v;u++)i[t+u]=f[n+u];return v},write:function(r,i,t,a,n,f){if(i.buffer===$.buffer&&(f=!1),!a)return 0;var v=r.node;if(v.timestamp=Date.now(),i.subarray&&(!v.contents||v.contents.subarray)){if(f)return v.contents=i.subarray(t,t+a),v.usedBytes=a,a;if(v.usedBytes===0&&n===0)return v.contents=i.slice(t,t+a),v.usedBytes=a,a;if(n+a<=v.usedBytes)return v.contents.set(i.subarray(t,t+a),n),a}if(L.expandFileStorage(v,n+a),v.contents.subarray&&i.subarray)v.contents.set(i.subarray(t,t+a),n);else for(var u=0;u<a;u++)v.contents[n+u]=i[t+u];return v.usedBytes=Math.max(v.usedBytes,n+a),a},llseek:function(r,i,t){var a=i;if(t===1?a+=r.position:t===2&&e.isFile(r.node.mode)&&(a+=r.node.usedBytes),a<0)throw new e.ErrnoError(28);return a},allocate:function(r,i,t){L.expandFileStorage(r.node,i+t),r.node.usedBytes=Math.max(r.node.usedBytes,i+t)},mmap:function(r,i,t,a,n){if(!e.isFile(r.node.mode))throw new e.ErrnoError(43);var f,v,u=r.node.contents;if(!(n&2)&&u.buffer===Cr)v=!1,f=u.byteOffset;else{if((t>0||t+i<u.length)&&(u.subarray?u=u.subarray(t,t+i):u=Array.prototype.slice.call(u,t,t+i)),v=!0,f=Rr(i),!f)throw new e.ErrnoError(48);$.set(u,f)}return{ptr:f,allocated:v}},msync:function(r,i,t,a,n){return L.stream_ops.write(r,i,0,a,t,!1),0}}};function to(r,i,t,a){var n=a?"":"al "+r;nr(r,f=>{Ne(f,'Loading data file "'+r+'" failed (no arrayBuffer).'),i(new Uint8Array(f)),n&&Ze(n)},f=>{if(t)t();else throw'Loading data file "'+r+'" failed.'}),n&&vr(n)}var yt={},M={isWindows:!1,staticInit:()=>{M.isWindows=!!process.platform.match(/^win/);var r=process.binding("constants");r.fs&&(r=r.fs),M.flagsForNodeMap={1024:r.O_APPEND,64:r.O_CREAT,128:r.O_EXCL,256:r.O_NOCTTY,0:r.O_RDONLY,2:r.O_RDWR,4096:r.O_SYNC,512:r.O_TRUNC,1:r.O_WRONLY,131072:r.O_NOFOLLOW}},convertNodeCode:r=>{var i=r.code;return yt[i]},mount:r=>M.createNode(null,"/",M.getMode(r.opts.root),0),createNode:(r,i,t,a)=>{if(!e.isDir(t)&&!e.isFile(t)&&!e.isLink(t))throw new e.ErrnoError(28);var n=e.createNode(r,i,t);return n.node_ops=M.node_ops,n.stream_ops=M.stream_ops,n},getMode:r=>{var i;try{i=V.lstatSync(r),M.isWindows&&(i.mode=i.mode|(i.mode&292)>>2)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}return i.mode},realPath:r=>{for(var i=[];r.parent!==r;)i.push(r.name),r=r.parent;return i.push(r.mount.opts.root),i.reverse(),U.join.apply(null,i)},flagsForNode:r=>{r&=-2097153,r&=-2049,r&=-32769,r&=-524289,r&=-65537;var i=0;for(var t in M.flagsForNodeMap)r&t&&(i|=M.flagsForNodeMap[t],r^=t);if(r)throw new e.ErrnoError(28);return i},node_ops:{getattr:r=>{var i=M.realPath(r),t;try{t=V.lstatSync(i)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}return M.isWindows&&!t.blksize&&(t.blksize=4096),M.isWindows&&!t.blocks&&(t.blocks=(t.size+t.blksize-1)/t.blksize|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,blksize:t.blksize,blocks:t.blocks}},setattr:(r,i)=>{var t=M.realPath(r);try{if(i.mode!==void 0&&(V.chmodSync(t,i.mode),r.mode=i.mode),i.timestamp!==void 0){var a=new Date(i.timestamp);V.utimesSync(t,a,a)}i.size!==void 0&&V.truncateSync(t,i.size)}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}},lookup:(r,i)=>{var t=U.join2(M.realPath(r),i),a=M.getMode(t);return M.createNode(r,i,a)},mknod:(r,i,t,a)=>{var n=M.createNode(r,i,t,a),f=M.realPath(n);try{e.isDir(n.mode)?V.mkdirSync(f,n.mode):V.writeFileSync(f,"",{mode:n.mode})}catch(v){throw v.code?new e.ErrnoError(M.convertNodeCode(v)):v}return n},rename:(r,i,t)=>{var a=M.realPath(r),n=U.join2(M.realPath(i),t);try{V.renameSync(a,n)}catch(f){throw f.code?new e.ErrnoError(M.convertNodeCode(f)):f}r.name=t},unlink:(r,i)=>{var t=U.join2(M.realPath(r),i);try{V.unlinkSync(t)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}},rmdir:(r,i)=>{var t=U.join2(M.realPath(r),i);try{V.rmdirSync(t)}catch(a){throw a.code?new e.ErrnoError(M.convertNodeCode(a)):a}},readdir:r=>{var i=M.realPath(r);try{return V.readdirSync(i)}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},symlink:(r,i,t)=>{var a=U.join2(M.realPath(r),i);try{V.symlinkSync(t,a)}catch(n){throw n.code?new e.ErrnoError(M.convertNodeCode(n)):n}},readlink:r=>{var i=M.realPath(r);try{return i=V.readlinkSync(i),i=Le.relative(Le.resolve(r.mount.opts.root),i),i}catch(t){throw t.code?t.code==="UNKNOWN"?new e.ErrnoError(28):new e.ErrnoError(M.convertNodeCode(t)):t}}},stream_ops:{open:r=>{var i=M.realPath(r.node);try{e.isFile(r.node.mode)&&(r.nfd=V.openSync(i,M.flagsForNode(r.flags)))}catch(t){throw t.code?new e.ErrnoError(M.convertNodeCode(t)):t}},close:r=>{try{e.isFile(r.node.mode)&&r.nfd&&V.closeSync(r.nfd)}catch(i){throw i.code?new e.ErrnoError(M.convertNodeCode(i)):i}},read:(r,i,t,a,n)=>{if(a===0)return 0;try{return V.readSync(r.nfd,Buffer.from(i.buffer),t,a,n)}catch(f){throw new e.ErrnoError(M.convertNodeCode(f))}},write:(r,i,t,a,n)=>{try{return V.writeSync(r.nfd,Buffer.from(i.buffer),t,a,n)}catch(f){throw new e.ErrnoError(M.convertNodeCode(f))}},llseek:(r,i,t)=>{var a=i;if(t===1)a+=r.position;else if(t===2&&e.isFile(r.node.mode))try{var n=V.fstatSync(r.nfd);a+=n.size}catch(f){throw new e.ErrnoError(M.convertNodeCode(f))}if(a<0)throw new e.ErrnoError(28);return a},mmap:(r,i,t,a,n)=>{if(!e.isFile(r.node.mode))throw new e.ErrnoError(43);var f=Rr(i);return M.stream_ops.read(r,$,f,i,t),{ptr:f,allocated:!0}},msync:(r,i,t,a,n)=>(M.stream_ops.write(r,i,0,a,t,!1),0)}},e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,i={})=>{if(r=ge.resolve(e.cwd(),r),!r)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(i=Object.assign(t,i),i.recurse_count>8)throw new e.ErrnoError(32);for(var a=U.normalizeArray(r.split("/").filter(m=>!!m),!1),n=e.root,f="/",v=0;v<a.length;v++){var u=v===a.length-1;if(u&&i.parent)break;if(n=e.lookupNode(n,a[v]),f=U.join2(f,a[v]),e.isMountpoint(n)&&(!u||u&&i.follow_mount)&&(n=n.mounted.root),!u||i.follow)for(var o=0;e.isLink(n.mode);){var c=e.readlink(f);f=ge.resolve(U.dirname(f),c);var _=e.lookupPath(f,{recurse_count:i.recurse_count+1});if(n=_.node,o++>40)throw new e.ErrnoError(32)}}return{path:f,node:n}},getPath:r=>{for(var i;;){if(e.isRoot(r)){var t=r.mount.mountpoint;return i?t[t.length-1]!=="/"?t+"/"+i:t+i:t}i=i?r.name+"/"+i:r.name,r=r.parent}},hashName:(r,i)=>{for(var t=0,a=0;a<i.length;a++)t=(t<<5)-t+i.charCodeAt(a)|0;return(r+t>>>0)%e.nameTable.length},hashAddNode:r=>{var i=e.hashName(r.parent.id,r.name);r.name_next=e.nameTable[i],e.nameTable[i]=r},hashRemoveNode:r=>{var i=e.hashName(r.parent.id,r.name);if(e.nameTable[i]===r)e.nameTable[i]=r.name_next;else for(var t=e.nameTable[i];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,i)=>{var t=e.mayLookup(r);if(t)throw new e.ErrnoError(t,r);for(var a=e.hashName(r.id,i),n=e.nameTable[a];n;n=n.name_next){var f=n.name;if(n.parent.id===r.id&&f===i)return n}return e.lookup(r,i)},createNode:(r,i,t,a)=>{var n=new e.FSNode(r,i,t,a);return e.hashAddNode(n),n},destroyNode:r=>{e.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>(r&61440)===32768,isDir:r=>(r&61440)===16384,isLink:r=>(r&61440)===40960,isChrdev:r=>(r&61440)===8192,isBlkdev:r=>(r&61440)===24576,isFIFO:r=>(r&61440)===4096,isSocket:r=>(r&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var i=e.flagModes[r];if(typeof i>"u")throw new Error("Unknown file open mode: "+r);return i},flagsToPermissionString:r=>{var i=["r","w","rw"][r&3];return r&512&&(i+="w"),i},nodePermissions:(r,i)=>e.ignorePermissions?0:i.includes("r")&&!(r.mode&292)||i.includes("w")&&!(r.mode&146)||i.includes("x")&&!(r.mode&73)?2:0,mayLookup:r=>{var i=e.nodePermissions(r,"x");return i||(r.node_ops.lookup?0:2)},mayCreate:(r,i)=>{try{var t=e.lookupNode(r,i);return 20}catch{}return e.nodePermissions(r,"wx")},mayDelete:(r,i,t)=>{var a;try{a=e.lookupNode(r,i)}catch(f){return f.errno}var n=e.nodePermissions(r,"wx");if(n)return n;if(t){if(!e.isDir(a.mode))return 54;if(e.isRoot(a)||e.getPath(a)===e.cwd())return 10}else if(e.isDir(a.mode))return 31;return 0},mayOpen:(r,i)=>r?e.isLink(r.mode)?32:e.isDir(r.mode)&&(e.flagsToPermissionString(i)!=="r"||i&512)?31:e.nodePermissions(r,e.flagsToPermissionString(i)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,i=e.MAX_OPEN_FDS)=>{for(var t=r;t<=i;t++)if(!e.streams[t])return t;throw new e.ErrnoError(33)},getStream:r=>e.streams[r],createStream:(r,i,t)=>{e.FSStream||(e.FSStream=function(){this.shared={}},e.FSStream.prototype={},Object.defineProperties(e.FSStream.prototype,{object:{get:function(){return this.node},set:function(n){this.node=n}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(n){this.shared.flags=n}},position:{get:function(){return this.shared.position},set:function(n){this.shared.position=n}}})),r=Object.assign(new e.FSStream,r);var a=e.nextfd(i,t);return r.fd=a,e.streams[a]=r,r},closeStream:r=>{e.streams[r]=null},chrdev_stream_ops:{open:r=>{var i=e.getDevice(r.node.rdev);r.stream_ops=i.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new e.ErrnoError(70)}},major:r=>r>>8,minor:r=>r&255,makedev:(r,i)=>r<<8|i,registerDevice:(r,i)=>{e.devices[r]={stream_ops:i}},getDevice:r=>e.devices[r],getMounts:r=>{for(var i=[],t=[r];t.length;){var a=t.pop();i.push(a),t.push.apply(t,a.mounts)}return i},syncfs:(r,i)=>{typeof r=="function"&&(i=r,r=!1),e.syncFSRequests++,e.syncFSRequests>1&&ce("warning: "+e.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=e.getMounts(e.root.mount),a=0;function n(v){return e.syncFSRequests--,i(v)}function f(v){if(v)return f.errored?void 0:(f.errored=!0,n(v));++a>=t.length&&n(null)}t.forEach(v=>{if(!v.type.syncfs)return f(null);v.type.syncfs(v,r,f)})},mount:(r,i,t)=>{var a=t==="/",n=!t,f;if(a&&e.root)throw new e.ErrnoError(10);if(!a&&!n){var v=e.lookupPath(t,{follow_mount:!1});if(t=v.path,f=v.node,e.isMountpoint(f))throw new e.ErrnoError(10);if(!e.isDir(f.mode))throw new e.ErrnoError(54)}var u={type:r,opts:i,mountpoint:t,mounts:[]},o=r.mount(u);return o.mount=u,u.root=o,a?e.root=o:f&&(f.mounted=u,f.mount&&f.mount.mounts.push(u)),o},unmount:r=>{var i=e.lookupPath(r,{follow_mount:!1});if(!e.isMountpoint(i.node))throw new e.ErrnoError(28);var t=i.node,a=t.mounted,n=e.getMounts(a);Object.keys(e.nameTable).forEach(v=>{for(var u=e.nameTable[v];u;){var o=u.name_next;n.includes(u.mount)&&e.destroyNode(u),u=o}}),t.mounted=null;var f=t.mount.mounts.indexOf(a);t.mount.mounts.splice(f,1)},lookup:(r,i)=>r.node_ops.lookup(r,i),mknod:(r,i,t)=>{var a=e.lookupPath(r,{parent:!0}),n=a.node,f=U.basename(r);if(!f||f==="."||f==="..")throw new e.ErrnoError(28);var v=e.mayCreate(n,f);if(v)throw new e.ErrnoError(v);if(!n.node_ops.mknod)throw new e.ErrnoError(63);return n.node_ops.mknod(n,f,i,t)},create:(r,i)=>(i=i!==void 0?i:438,i&=4095,i|=32768,e.mknod(r,i,0)),mkdir:(r,i)=>(i=i!==void 0?i:511,i&=1023,i|=16384,e.mknod(r,i,0)),mkdirTree:(r,i)=>{for(var t=r.split("/"),a="",n=0;n<t.length;++n)if(t[n]){a+="/"+t[n];try{e.mkdir(a,i)}catch(f){if(f.errno!=20)throw f}}},mkdev:(r,i,t)=>(typeof t>"u"&&(t=i,i=438),i|=8192,e.mknod(r,i,t)),symlink:(r,i)=>{if(!ge.resolve(r))throw new e.ErrnoError(44);var t=e.lookupPath(i,{parent:!0}),a=t.node;if(!a)throw new e.ErrnoError(44);var n=U.basename(i),f=e.mayCreate(a,n);if(f)throw new e.ErrnoError(f);if(!a.node_ops.symlink)throw new e.ErrnoError(63);return a.node_ops.symlink(a,n,r)},rename:(r,i)=>{var t=U.dirname(r),a=U.dirname(i),n=U.basename(r),f=U.basename(i),v,u,o;if(v=e.lookupPath(r,{parent:!0}),u=v.node,v=e.lookupPath(i,{parent:!0}),o=v.node,!u||!o)throw new e.ErrnoError(44);if(u.mount!==o.mount)throw new e.ErrnoError(75);var c=e.lookupNode(u,n),_=ge.relative(r,a);if(_.charAt(0)!==".")throw new e.ErrnoError(28);if(_=ge.relative(i,t),_.charAt(0)!==".")throw new e.ErrnoError(55);var m;try{m=e.lookupNode(o,f)}catch{}if(c!==m){var p=e.isDir(c.mode),y=e.mayDelete(u,n,p);if(y)throw new e.ErrnoError(y);if(y=m?e.mayDelete(o,f,p):e.mayCreate(o,f),y)throw new e.ErrnoError(y);if(!u.node_ops.rename)throw new e.ErrnoError(63);if(e.isMountpoint(c)||m&&e.isMountpoint(m))throw new e.ErrnoError(10);if(o!==u&&(y=e.nodePermissions(u,"w"),y))throw new e.ErrnoError(y);e.hashRemoveNode(c);try{u.node_ops.rename(c,o,f)}catch(E){throw E}finally{e.hashAddNode(c)}}},rmdir:r=>{var i=e.lookupPath(r,{parent:!0}),t=i.node,a=U.basename(r),n=e.lookupNode(t,a),f=e.mayDelete(t,a,!0);if(f)throw new e.ErrnoError(f);if(!t.node_ops.rmdir)throw new e.ErrnoError(63);if(e.isMountpoint(n))throw new e.ErrnoError(10);t.node_ops.rmdir(t,a),e.destroyNode(n)},readdir:r=>{var i=e.lookupPath(r,{follow:!0}),t=i.node;if(!t.node_ops.readdir)throw new e.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var i=e.lookupPath(r,{parent:!0}),t=i.node;if(!t)throw new e.ErrnoError(44);var a=U.basename(r),n=e.lookupNode(t,a),f=e.mayDelete(t,a,!1);if(f)throw new e.ErrnoError(f);if(!t.node_ops.unlink)throw new e.ErrnoError(63);if(e.isMountpoint(n))throw new e.ErrnoError(10);t.node_ops.unlink(t,a),e.destroyNode(n)},readlink:r=>{var i=e.lookupPath(r),t=i.node;if(!t)throw new e.ErrnoError(44);if(!t.node_ops.readlink)throw new e.ErrnoError(28);return ge.resolve(e.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,i)=>{var t=e.lookupPath(r,{follow:!i}),a=t.node;if(!a)throw new e.ErrnoError(44);if(!a.node_ops.getattr)throw new e.ErrnoError(63);return a.node_ops.getattr(a)},lstat:r=>e.stat(r,!0),chmod:(r,i,t)=>{var a;if(typeof r=="string"){var n=e.lookupPath(r,{follow:!t});a=n.node}else a=r;if(!a.node_ops.setattr)throw new e.ErrnoError(63);a.node_ops.setattr(a,{mode:i&4095|a.mode&-4096,timestamp:Date.now()})},lchmod:(r,i)=>{e.chmod(r,i,!0)},fchmod:(r,i)=>{var t=e.getStream(r);if(!t)throw new e.ErrnoError(8);e.chmod(t.node,i)},chown:(r,i,t,a)=>{var n;if(typeof r=="string"){var f=e.lookupPath(r,{follow:!a});n=f.node}else n=r;if(!n.node_ops.setattr)throw new e.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:(r,i,t)=>{e.chown(r,i,t,!0)},fchown:(r,i,t)=>{var a=e.getStream(r);if(!a)throw new e.ErrnoError(8);e.chown(a.node,i,t)},truncate:(r,i)=>{if(i<0)throw new e.ErrnoError(28);var t;if(typeof r=="string"){var a=e.lookupPath(r,{follow:!0});t=a.node}else t=r;if(!t.node_ops.setattr)throw new e.ErrnoError(63);if(e.isDir(t.mode))throw new e.ErrnoError(31);if(!e.isFile(t.mode))throw new e.ErrnoError(28);var n=e.nodePermissions(t,"w");if(n)throw new e.ErrnoError(n);t.node_ops.setattr(t,{size:i,timestamp:Date.now()})},ftruncate:(r,i)=>{var t=e.getStream(r);if(!t)throw new e.ErrnoError(8);if(!(t.flags&2097155))throw new e.ErrnoError(28);e.truncate(t.node,i)},utime:(r,i,t)=>{var a=e.lookupPath(r,{follow:!0}),n=a.node;n.node_ops.setattr(n,{timestamp:Math.max(i,t)})},open:(r,i,t)=>{if(r==="")throw new e.ErrnoError(44);i=typeof i=="string"?e.modeStringToFlags(i):i,t=typeof t>"u"?438:t,i&64?t=t&4095|32768:t=0;var a;if(typeof r=="object")a=r;else{r=U.normalize(r);try{var n=e.lookupPath(r,{follow:!(i&131072)});a=n.node}catch{}}var f=!1;if(i&64)if(a){if(i&128)throw new e.ErrnoError(20)}else a=e.mknod(r,t,0),f=!0;if(!a)throw new e.ErrnoError(44);if(e.isChrdev(a.mode)&&(i&=-513),i&65536&&!e.isDir(a.mode))throw new e.ErrnoError(54);if(!f){var v=e.mayOpen(a,i);if(v)throw new e.ErrnoError(v)}i&512&&!f&&e.truncate(a,0),i&=-131713;var u=e.createStream({node:a,path:e.getPath(a),flags:i,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),l.logReadFiles&&!(i&1)&&(e.readFiles||(e.readFiles={}),r in e.readFiles||(e.readFiles[r]=1)),u},close:r=>{if(e.isClosed(r))throw new e.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(i){throw i}finally{e.closeStream(r.fd)}r.fd=null},isClosed:r=>r.fd===null,llseek:(r,i,t)=>{if(e.isClosed(r))throw new e.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new e.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new e.ErrnoError(28);return r.position=r.stream_ops.llseek(r,i,t),r.ungotten=[],r.position},read:(r,i,t,a,n)=>{if(a<0||n<0)throw new e.ErrnoError(28);if(e.isClosed(r))throw new e.ErrnoError(8);if((r.flags&2097155)===1)throw new e.ErrnoError(8);if(e.isDir(r.node.mode))throw new e.ErrnoError(31);if(!r.stream_ops.read)throw new e.ErrnoError(28);var f=typeof n<"u";if(!f)n=r.position;else if(!r.seekable)throw new e.ErrnoError(70);var v=r.stream_ops.read(r,i,t,a,n);return f||(r.position+=v),v},write:(r,i,t,a,n,f)=>{if(a<0||n<0)throw new e.ErrnoError(28);if(e.isClosed(r))throw new e.ErrnoError(8);if(!(r.flags&2097155))throw new e.ErrnoError(8);if(e.isDir(r.node.mode))throw new e.ErrnoError(31);if(!r.stream_ops.write)throw new e.ErrnoError(28);r.seekable&&r.flags&1024&&e.llseek(r,0,2);var v=typeof n<"u";if(!v)n=r.position;else if(!r.seekable)throw new e.ErrnoError(70);var u=r.stream_ops.write(r,i,t,a,n,f);return v||(r.position+=u),u},allocate:(r,i,t)=>{if(e.isClosed(r))throw new e.ErrnoError(8);if(i<0||t<=0)throw new e.ErrnoError(28);if(!(r.flags&2097155))throw new e.ErrnoError(8);if(!e.isFile(r.node.mode)&&!e.isDir(r.node.mode))throw new e.ErrnoError(43);if(!r.stream_ops.allocate)throw new e.ErrnoError(138);r.stream_ops.allocate(r,i,t)},mmap:(r,i,t,a,n)=>{if(a&2&&!(n&2)&&(r.flags&2097155)!==2)throw new e.ErrnoError(2);if((r.flags&2097155)===1)throw new e.ErrnoError(2);if(!r.stream_ops.mmap)throw new e.ErrnoError(43);return r.stream_ops.mmap(r,i,t,a,n)},msync:(r,i,t,a,n)=>r.stream_ops.msync?r.stream_ops.msync(r,i,t,a,n):0,munmap:r=>0,ioctl:(r,i,t)=>{if(!r.stream_ops.ioctl)throw new e.ErrnoError(59);return r.stream_ops.ioctl(r,i,t)},readFile:(r,i={})=>{if(i.flags=i.flags||0,i.encoding=i.encoding||"binary",i.encoding!=="utf8"&&i.encoding!=="binary")throw new Error('Invalid encoding type "'+i.encoding+'"');var t,a=e.open(r,i.flags),n=e.stat(r),f=n.size,v=new Uint8Array(f);return e.read(a,v,0,f,0),i.encoding==="utf8"?t=We(v,0):i.encoding==="binary"&&(t=v),e.close(a),t},writeFile:(r,i,t={})=>{t.flags=t.flags||577;var a=e.open(r,t.flags,t.mode);if(typeof i=="string"){var n=new Uint8Array(Pe(i)+1),f=Xe(i,n,0,n.length);e.write(a,n,0,f,void 0,t.canOwn)}else if(ArrayBuffer.isView(i))e.write(a,i,0,i.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");e.close(a)},cwd:()=>e.currentPath,chdir:r=>{var i=e.lookupPath(r,{follow:!0});if(i.node===null)throw new e.ErrnoError(44);if(!e.isDir(i.node.mode))throw new e.ErrnoError(54);var t=e.nodePermissions(i.node,"x");if(t)throw new e.ErrnoError(t);e.currentPath=i.path},createDefaultDirectories:()=>{e.mkdir("/tmp"),e.mkdir("/home"),e.mkdir("/home/web_user")},createDefaultDevices:()=>{e.mkdir("/dev"),e.registerDevice(e.makedev(1,3),{read:()=>0,write:(i,t,a,n,f)=>n}),e.mkdev("/dev/null",e.makedev(1,3)),Se.register(e.makedev(5,0),Se.default_tty_ops),Se.register(e.makedev(6,0),Se.default_tty1_ops),e.mkdev("/dev/tty",e.makedev(5,0)),e.mkdev("/dev/tty1",e.makedev(6,0));var r=eo();e.createDevice("/dev","random",r),e.createDevice("/dev","urandom",r),e.mkdir("/dev/shm"),e.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{e.mkdir("/proc");var r=e.mkdir("/proc/self");e.mkdir("/proc/self/fd"),e.mount({mount:()=>{var i=e.createNode(r,"fd",16895,73);return i.node_ops={lookup:(t,a)=>{var n=+a,f=e.getStream(n);if(!f)throw new e.ErrnoError(8);var v={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>f.path}};return v.parent=v,v}},i}},{},"/proc/self/fd")},createStandardStreams:()=>{l.stdin?e.createDevice("/dev","stdin",l.stdin):e.symlink("/dev/tty","/dev/stdin"),l.stdout?e.createDevice("/dev","stdout",null,l.stdout):e.symlink("/dev/tty","/dev/stdout"),l.stderr?e.createDevice("/dev","stderr",null,l.stderr):e.symlink("/dev/tty1","/dev/stderr");var r=e.open("/dev/stdin",0),i=e.open("/dev/stdout",1),t=e.open("/dev/stderr",1)},ensureErrnoError:()=>{e.ErrnoError||(e.ErrnoError=function(i,t){this.node=t,this.setErrno=function(a){this.errno=a},this.setErrno(i),this.message="FS error"},e.ErrnoError.prototype=new Error,e.ErrnoError.prototype.constructor=e.ErrnoError,[44].forEach(r=>{e.genericErrors[r]=new e.ErrnoError(r),e.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:()=>{e.ensureErrnoError(),e.nameTable=new Array(4096),e.mount(L,{},"/"),e.createDefaultDirectories(),e.createDefaultDevices(),e.createSpecialDirectories(),e.filesystems={MEMFS:L,NODEFS:M}},init:(r,i,t)=>{e.init.initialized=!0,e.ensureErrnoError(),l.stdin=r||l.stdin,l.stdout=i||l.stdout,l.stderr=t||l.stderr,e.createStandardStreams()},quit:()=>{e.init.initialized=!1,qt(0);for(var r=0;r<e.streams.length;r++){var i=e.streams[r];i&&e.close(i)}},getMode:(r,i)=>{var t=0;return r&&(t|=365),i&&(t|=146),t},findObject:(r,i)=>{var t=e.analyzePath(r,i);return t.exists?t.object:null},analyzePath:(r,i)=>{try{var t=e.lookupPath(r,{follow:!i});r=t.path}catch{}var a={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var t=e.lookupPath(r,{parent:!0});a.parentExists=!0,a.parentPath=t.path,a.parentObject=t.node,a.name=U.basename(r),t=e.lookupPath(r,{follow:!i}),a.exists=!0,a.path=t.path,a.object=t.node,a.name=t.node.name,a.isRoot=t.path==="/"}catch(n){a.error=n.errno}return a},createPath:(r,i,t,a)=>{r=typeof r=="string"?r:e.getPath(r);for(var n=i.split("/").reverse();n.length;){var f=n.pop();if(f){var v=U.join2(r,f);try{e.mkdir(v)}catch{}r=v}}return v},createFile:(r,i,t,a,n)=>{var f=U.join2(typeof r=="string"?r:e.getPath(r),i),v=e.getMode(a,n);return e.create(f,v)},createDataFile:(r,i,t,a,n,f)=>{var v=i;r&&(r=typeof r=="string"?r:e.getPath(r),v=i?U.join2(r,i):r);var u=e.getMode(a,n),o=e.create(v,u);if(t){if(typeof t=="string"){for(var c=new Array(t.length),_=0,m=t.length;_<m;++_)c[_]=t.charCodeAt(_);t=c}e.chmod(o,u|146);var p=e.open(o,577);e.write(p,t,0,t.length,0,f),e.close(p),e.chmod(o,u)}return o},createDevice:(r,i,t,a)=>{var n=U.join2(typeof r=="string"?r:e.getPath(r),i),f=e.getMode(!!t,!!a);e.createDevice.major||(e.createDevice.major=64);var v=e.makedev(e.createDevice.major++,0);return e.registerDevice(v,{open:u=>{u.seekable=!1},close:u=>{a&&a.buffer&&a.buffer.length&&a(10)},read:(u,o,c,_,m)=>{for(var p=0,y=0;y<_;y++){var E;try{E=t()}catch{throw new e.ErrnoError(29)}if(E===void 0&&p===0)throw new e.ErrnoError(6);if(E==null)break;p++,o[c+y]=E}return p&&(u.node.timestamp=Date.now()),p},write:(u,o,c,_,m)=>{for(var p=0;p<_;p++)try{a(o[c+p])}catch{throw new e.ErrnoError(29)}return _&&(u.node.timestamp=Date.now()),p}}),e.mkdev(n,f,v)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(typeof XMLHttpRequest<"u")throw new 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.");if(Ye)try{r.contents=Je(Ye(r.url),!0),r.usedBytes=r.contents.length}catch{throw new e.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(r,i,t,a,n)=>{function f(){this.lengthKnown=!1,this.chunks=[]}if(f.prototype.get=function(y){if(!(y>this.length-1||y<0)){var E=y%this.chunkSize,S=y/this.chunkSize|0;return this.getter(S)[E]}},f.prototype.setDataGetter=function(y){this.getter=y},f.prototype.cacheLength=function(){var y=new XMLHttpRequest;if(y.open("HEAD",t,!1),y.send(null),!(y.status>=200&&y.status<300||y.status===304))throw new Error("Couldn't load "+t+". Status: "+y.status);var E=Number(y.getResponseHeader("Content-length")),S,b=(S=y.getResponseHeader("Accept-Ranges"))&&S==="bytes",k=(S=y.getResponseHeader("Content-Encoding"))&&S==="gzip",D=1024*1024;b||(D=E);var T=(A,I)=>{if(A>I)throw new Error("invalid range ("+A+", "+I+") or no bytes requested!");if(I>E-1)throw new Error("only "+E+" bytes available! programmer error!");var z=new XMLHttpRequest;if(z.open("GET",t,!1),E!==D&&z.setRequestHeader("Range","bytes="+A+"-"+I),z.responseType="arraybuffer",z.overrideMimeType&&z.overrideMimeType("text/plain; charset=x-user-defined"),z.send(null),!(z.status>=200&&z.status<300||z.status===304))throw new Error("Couldn't load "+t+". Status: "+z.status);return z.response!==void 0?new Uint8Array(z.response||[]):Je(z.responseText||"",!0)},C=this;C.setDataGetter(A=>{var I=A*D,z=(A+1)*D-1;if(z=Math.min(z,E-1),typeof C.chunks[A]>"u"&&(C.chunks[A]=T(I,z)),typeof C.chunks[A]>"u")throw new Error("doXHR failed!");return C.chunks[A]}),(k||!E)&&(D=E=1,E=this.getter(0).length,D=E,Qe("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=E,this._chunkSize=D,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!fe)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var v=new f;Object.defineProperties(v,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:v}}else var u={isDevice:!1,url:t};var o=e.createFile(r,i,u,a,n);u.contents?o.contents=u.contents:u.url&&(o.contents=null,o.url=u.url),Object.defineProperties(o,{usedBytes:{get:function(){return this.contents.length}}});var c={},_=Object.keys(o.stream_ops);_.forEach(p=>{var y=o.stream_ops[p];c[p]=function(){return e.forceLoadFile(o),y.apply(null,arguments)}});function m(p,y,E,S,b){var k=p.node.contents;if(b>=k.length)return 0;var D=Math.min(k.length-b,S);if(k.slice)for(var T=0;T<D;T++)y[E+T]=k[b+T];else for(var T=0;T<D;T++)y[E+T]=k.get(b+T);return D}return c.read=(p,y,E,S,b)=>(e.forceLoadFile(o),m(p,y,E,S,b)),c.mmap=(p,y,E,S,b)=>{e.forceLoadFile(o);var k=Rr(y);if(!k)throw new e.ErrnoError(48);return m(p,$,k,y,E),{ptr:k,allocated:!0}},o.stream_ops=c,o},createPreloadedFile:(r,i,t,a,n,f,v,u,o,c)=>{var _=i?ge.resolve(U.join2(r,i)):r,m="cp "+_;function p(y){function E(S){c&&c(),u||e.createDataFile(r,i,S,a,n,o),f&&f(),Ze(m)}Browser.handledByPreloadPlugin(y,_,E,()=>{v&&v(),Ze(m)})||E(y)}vr(m),typeof t=="string"?to(t,y=>p(y),v):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,i,t)=>{i=i||(()=>{}),t=t||(()=>{});var a=e.indexedDB();try{var n=a.open(e.DB_NAME(),e.DB_VERSION)}catch(f){return t(f)}n.onupgradeneeded=()=>{Qe("creating db");var f=n.result;f.createObjectStore(e.DB_STORE_NAME)},n.onsuccess=()=>{var f=n.result,v=f.transaction([e.DB_STORE_NAME],"readwrite"),u=v.objectStore(e.DB_STORE_NAME),o=0,c=0,_=r.length;function m(){c==0?i():t()}r.forEach(p=>{var y=u.put(e.analyzePath(p).object.contents,p);y.onsuccess=()=>{o++,o+c==_&&m()},y.onerror=()=>{c++,o+c==_&&m()}}),v.onerror=t},n.onerror=t},loadFilesFromDB:(r,i,t)=>{i=i||(()=>{}),t=t||(()=>{});var a=e.indexedDB();try{var n=a.open(e.DB_NAME(),e.DB_VERSION)}catch(f){return t(f)}n.onupgradeneeded=t,n.onsuccess=()=>{var f=n.result;try{var v=f.transaction([e.DB_STORE_NAME],"readonly")}catch(p){t(p);return}var u=v.objectStore(e.DB_STORE_NAME),o=0,c=0,_=r.length;function m(){c==0?i():t()}r.forEach(p=>{var y=u.get(p);y.onsuccess=()=>{e.analyzePath(p).exists&&e.unlink(p),e.createDataFile(U.dirname(p),U.basename(p),y.result,!0,!0,!0),o++,o+c==_&&m()},y.onerror=()=>{c++,o+c==_&&m()}}),v.onerror=t},n.onerror=t}},N={DEFAULT_POLLMASK:5,calculateAt:function(r,i,t){if(U.isAbs(i))return i;var a;if(r===-100)a=e.cwd();else{var n=N.getStreamFromFD(r);a=n.path}if(i.length==0){if(!t)throw new e.ErrnoError(44);return a}return U.join2(a,i)},doStat:function(r,i,t){try{var a=r(i)}catch(n){if(n&&n.node&&U.normalize(i)!==U.normalize(e.getPath(n.node)))return-54;throw n}return h[t>>2]=a.dev,h[t+8>>2]=a.ino,h[t+12>>2]=a.mode,H[t+16>>2]=a.nlink,h[t+20>>2]=a.uid,h[t+24>>2]=a.gid,h[t+28>>2]=a.rdev,q=[a.size>>>0,(P=a.size,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+40>>2]=q[0],h[t+44>>2]=q[1],h[t+48>>2]=4096,h[t+52>>2]=a.blocks,q=[Math.floor(a.atime.getTime()/1e3)>>>0,(P=Math.floor(a.atime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+56>>2]=q[0],h[t+60>>2]=q[1],H[t+64>>2]=0,q=[Math.floor(a.mtime.getTime()/1e3)>>>0,(P=Math.floor(a.mtime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+72>>2]=q[0],h[t+76>>2]=q[1],H[t+80>>2]=0,q=[Math.floor(a.ctime.getTime()/1e3)>>>0,(P=Math.floor(a.ctime.getTime()/1e3),+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+88>>2]=q[0],h[t+92>>2]=q[1],H[t+96>>2]=0,q=[a.ino>>>0,(P=a.ino,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[t+104>>2]=q[0],h[t+108>>2]=q[1],0},doMsync:function(r,i,t,a,n){if(!e.isFile(i.node.mode))throw new e.ErrnoError(43);if(a&2)return 0;var f=de.slice(r,r+t);e.msync(i,f,n,t,a)},varargs:void 0,get:function(){N.varargs+=4;var r=h[N.varargs-4>>2];return r},getStr:function(r){var i=ne(r);return i},getStreamFromFD:function(r){var i=e.getStream(r);if(!i)throw new e.ErrnoError(8);return i}};function no(r,i,t,a,n){try{for(var f=0,v=i?h[i>>2]:0,u=i?h[i+4>>2]:0,o=t?h[t>>2]:0,c=t?h[t+4>>2]:0,_=a?h[a>>2]:0,m=a?h[a+4>>2]:0,p=0,y=0,E=0,S=0,b=0,k=0,D=(i?h[i>>2]:0)|(t?h[t>>2]:0)|(a?h[a>>2]:0),T=(i?h[i+4>>2]:0)|(t?h[t+4>>2]:0)|(a?h[a+4>>2]:0),C=function(B,x,G,re){return B<32?x&re:G&re},A=0;A<r;A++){var I=1<<A%32;if(C(A,D,T,I)){var z=N.getStreamFromFD(A),K=N.DEFAULT_POLLMASK;z.stream_ops?.poll&&(K=z.stream_ops.poll(z)),K&1&&C(A,v,u,I)&&(A<32?p=p|I:y=y|I,f++),K&4&&C(A,o,c,I)&&(A<32?E=E|I:S=S|I,f++),K&2&&C(A,_,m,I)&&(A<32?b=b|I:k=k|I,f++)}}return i&&(h[i>>2]=p,h[i+4>>2]=y),t&&(h[t>>2]=E,h[t+4>>2]=S),a&&(h[a>>2]=b,h[a+4>>2]=k),f}catch(B){if(typeof e>"u"||!(B instanceof e.ErrnoError))throw B;return-B.errno}}var j={mount:function(r){return l.websocket=l.websocket&&typeof l.websocket=="object"?l.websocket:{},l.websocket._callbacks={},l.websocket.on=function(i,t){return typeof t=="function"&&(this._callbacks[i]=t),this},l.websocket.emit=function(i,t){typeof this._callbacks[i]=="function"&&this._callbacks[i].call(this,t)},e.createNode(null,"/",16895,0)},createSocket:function(r,i,t){i&=-526337;var a=i==1;if(a&&t&&t!=6)throw new e.ErrnoError(66);var n={family:r,type:i,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:j.websocket_sock_ops},f=j.nextname(),v=e.createNode(j.root,f,49152,0);v.sock=n;var u=e.createStream({path:f,node:v,flags:2,seekable:!1,stream_ops:j.stream_ops});return n.stream=u,n},getSocket:function(r){var i=e.getStream(r);return!i||!e.isSocket(i.node.mode)?null:i.node.sock},stream_ops:{poll:function(r){var i=r.node.sock;return i.sock_ops.poll(i)},ioctl:function(r,i,t){var a=r.node.sock;return a.sock_ops.ioctl(a,i,t)},read:function(r,i,t,a,n){var f=r.node.sock,v=f.sock_ops.recvmsg(f,a);return v?(i.set(v.buffer,t),v.buffer.length):0},write:function(r,i,t,a,n){var f=r.node.sock;return f.sock_ops.sendmsg(f,i,t,a)},close:function(r){var i=r.node.sock;i.sock_ops.close(i)}},nextname:function(){return j.nextname.current||(j.nextname.current=0),"socket["+j.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(r,i,t){var a;if(typeof i=="object"&&(a=i,i=null,t=null),a)if(a._socket)i=a._socket.remoteAddress,t=a._socket.remotePort;else{var n=/ws[s]?:\/\/([^:]+):(\d+)/.exec(a.url);if(!n)throw new Error("WebSocket URL must be in the format ws(s)://address:port");i=n[1],t=parseInt(n[2],10)}else try{var f=l.websocket&&typeof l.websocket=="object",v="ws:#".replace("#","//");if(f&&(typeof l.websocket.url=="function"?v=l.websocket.url(...arguments):typeof l.websocket.url=="string"&&(v=l.websocket.url)),v==="ws://"||v==="wss://"){var u=i.split("/");v=v+u[0]+":"+t+"/"+u.slice(1).join("/")}var o="binary";f&&typeof l.websocket.subprotocol=="string"&&(o=l.websocket.subprotocol);var c=void 0;o!=="null"&&(o=o.replace(/^ +| +$/g,"").split(/ *, */),c=o),f&&l.websocket.subprotocol===null&&(o="null",c=void 0);var _;Z?_=Fn():_=WebSocket,l.websocket.decorator&&(_=l.websocket.decorator(_)),a=new _(v,c),a.binaryType="arraybuffer"}catch{throw new e.ErrnoError(23)}var m={addr:i,port:t,socket:a,dgram_send_queue:[]};return j.websocket_sock_ops.addPeer(r,m),j.websocket_sock_ops.handlePeerEvents(r,m),r.type===2&&typeof r.sport<"u"&&m.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(r.sport&65280)>>8,r.sport&255])),m},getPeer:function(r,i,t){return r.peers[i+":"+t]},addPeer:function(r,i){r.peers[i.addr+":"+i.port]=i},removePeer:function(r,i){delete r.peers[i.addr+":"+i.port]},handlePeerEvents:function(r,i){var t=!0,a=function(){l.websocket.emit("open",r.stream.fd);try{for(var f=i.dgram_send_queue.shift();f;)i.socket.send(f),f=i.dgram_send_queue.shift()}catch{i.socket.close()}};function n(f){if(typeof f=="string"){var v=new TextEncoder;f=v.encode(f)}else{if(Ne(f.byteLength!==void 0),f.byteLength==0)return;f=new Uint8Array(f)}var u=t;if(t=!1,u&&f.length===10&&f[0]===255&&f[1]===255&&f[2]===255&&f[3]===255&&f[4]==="p".charCodeAt(0)&&f[5]==="o".charCodeAt(0)&&f[6]==="r".charCodeAt(0)&&f[7]==="t".charCodeAt(0)){var o=f[8]<<8|f[9];j.websocket_sock_ops.removePeer(r,i),i.port=o,j.websocket_sock_ops.addPeer(r,i);return}r.recv_queue.push({addr:i.addr,port:i.port,data:f}),l.websocket.emit("message",r.stream.fd)}Z?(i.socket.on("open",a),i.socket.on("message",function(f,v){v&&n(new Uint8Array(f).buffer)}),i.socket.on("close",function(){l.websocket.emit("close",r.stream.fd)}),i.socket.on("error",function(f){r.error=14,l.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])})):(i.socket.onopen=a,i.socket.onclose=function(){l.websocket.emit("close",r.stream.fd)},i.socket.onmessage=function(v){n(v.data)},i.socket.onerror=function(f){r.error=14,l.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])})},poll:function(r){if(r.type===1&&r.server)return r.pending.length?65:0;var i=0,t=r.type===1?j.websocket_sock_ops.getPeer(r,r.daddr,r.dport):null;return(r.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(i|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(i|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(i|=16),i},ioctl:function(r,i,t){switch(i){case 21531:var a=0;return r.recv_queue.length&&(a=r.recv_queue[0].data.length),h[t>>2]=a,0;default:return 28}},close:function(r){if(r.server){try{r.server.close()}catch{}r.server=null}for(var i=Object.keys(r.peers),t=0;t<i.length;t++){var a=r.peers[i[t]];try{a.socket.close()}catch{}j.websocket_sock_ops.removePeer(r,a)}return 0},bind:function(r,i,t){if(typeof r.saddr<"u"||typeof r.sport<"u")throw new e.ErrnoError(28);if(r.saddr=i,r.sport=t,r.type===2){r.server&&(r.server.close(),r.server=null);try{r.sock_ops.listen(r,0)}catch(a){if(!(a instanceof e.ErrnoError)||a.errno!==138)throw a}}},connect:function(r,i,t){if(r.server)throw new e.ErrnoError(138);if(typeof r.daddr<"u"&&typeof r.dport<"u"){var a=j.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(a)throw a.socket.readyState===a.socket.CONNECTING?new e.ErrnoError(7):new e.ErrnoError(30)}var n=j.websocket_sock_ops.createPeer(r,i,t);throw r.daddr=n.addr,r.dport=n.port,new e.ErrnoError(26)},listen:function(r,i){if(!Z)throw new e.ErrnoError(138);if(r.server)throw new e.ErrnoError(28);var t=Fn().Server,a=r.saddr;l.websocket.serverDecorator&&(t=l.websocket.serverDecorator(t)),r.server=new t({host:a,port:r.sport}),l.websocket.emit("listen",r.stream.fd),r.server.on("connection",function(n){if(r.type===1){var f=j.createSocket(r.family,r.type,r.protocol),v=j.websocket_sock_ops.createPeer(f,n);f.daddr=v.addr,f.dport=v.port,r.pending.push(f),l.websocket.emit("connection",f.stream.fd)}else j.websocket_sock_ops.createPeer(r,n),l.websocket.emit("connection",r.stream.fd)}),r.server.on("close",function(){l.websocket.emit("close",r.stream.fd),r.server=null}),r.server.on("error",function(n){r.error=23,l.websocket.emit("error",[r.stream.fd,r.error,"EHOSTUNREACH: Host is unreachable"])})},accept:function(r){if(!r.server||!r.pending.length)throw new e.ErrnoError(28);var i=r.pending.shift();return i.stream.flags=r.stream.flags,i},getname:function(r,i){var t,a;if(i){if(r.daddr===void 0||r.dport===void 0)throw new e.ErrnoError(53);t=r.daddr,a=r.dport}else t=r.saddr||0,a=r.sport||0;return{addr:t,port:a}},sendmsg:function(r,i,t,a,n,f){if(r.type===2){if((n===void 0||f===void 0)&&(n=r.daddr,f=r.dport),n===void 0||f===void 0)throw new e.ErrnoError(17)}else n=r.daddr,f=r.dport;var v=j.websocket_sock_ops.getPeer(r,n,f);if(r.type===1){if(!v||v.socket.readyState===v.socket.CLOSING||v.socket.readyState===v.socket.CLOSED)throw new e.ErrnoError(53);if(v.socket.readyState===v.socket.CONNECTING)throw new e.ErrnoError(6)}ArrayBuffer.isView(i)&&(t+=i.byteOffset,i=i.buffer);var u;if(u=i.slice(t,t+a),r.type===2&&(!v||v.socket.readyState!==v.socket.OPEN))return(!v||v.socket.readyState===v.socket.CLOSING||v.socket.readyState===v.socket.CLOSED)&&(v=j.websocket_sock_ops.createPeer(r,n,f)),v.dgram_send_queue.push(u),a;try{return v.socket.send(u),a}catch{throw new e.ErrnoError(28)}},recvmsg:function(r,i,t){if(r.type===1&&r.server)throw new e.ErrnoError(53);var a=r.recv_queue.shift();if(!a){if(r.type===1){var n=j.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(!n)throw new e.ErrnoError(53);if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new e.ErrnoError(6)}throw new e.ErrnoError(6)}var f=a.data.byteLength||a.data.length,v=a.data.byteOffset||0,u=a.data.buffer||a.data,o=Math.min(i,f),c={buffer:new Uint8Array(u,v,o),addr:a.addr,port:a.port};if(t&2&&(o=0),r.type===1&&o<f){var _=f-o;a.data=new Uint8Array(u,v+o,_),r.recv_queue.unshift(a)}return c}}};function ve(r){var i=j.getSocket(r);if(!i)throw new e.ErrnoError(8);return i}function Kt(r){return h[On()>>2]=r,r}function lr(r){for(var i=r.split("."),t=0;t<4;t++){var a=Number(i[t]);if(isNaN(a))return null;i[t]=a}return(i[0]|i[1]<<8|i[2]<<16|i[3]<<24)>>>0}function Q(r){return parseInt(r)}function Hr(r){var i,t,a,n,f=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,v=[];if(!f.test(r))return null;if(r==="::")return[0,0,0,0,0,0,0,0];for(r.startsWith("::")?r=r.replace("::","Z:"):r=r.replace("::",":Z:"),r.indexOf(".")>0?(r=r.replace(new RegExp("[.]","g"),":"),i=r.split(":"),i[i.length-4]=Q(i[i.length-4])+Q(i[i.length-3])*256,i[i.length-3]=Q(i[i.length-2])+Q(i[i.length-1])*256,i=i.slice(0,i.length-2)):i=r.split(":"),a=0,n=0,t=0;t<i.length;t++)if(typeof i[t]=="string")if(i[t]==="Z"){for(n=0;n<8-i.length+1;n++)v[t+n]=0;a=n-1}else v[t+a]=er(parseInt(i[t],16));else v[t+a]=i[t];return[v[1]<<16|v[0],v[3]<<16|v[2],v[5]<<16|v[4],v[7]<<16|v[6]]}function rr(r,i,t,a,n){switch(i){case 2:t=lr(t),Pr(r,16),n&&(h[n>>2]=16),Ee[r>>1]=i,h[r+4>>2]=t,Ee[r+2>>1]=er(a);break;case 10:t=Hr(t),Pr(r,28),n&&(h[n>>2]=28),h[r>>2]=i,h[r+8>>2]=t[0],h[r+12>>2]=t[1],h[r+16>>2]=t[2],h[r+20>>2]=t[3],Ee[r+2>>1]=er(a);break;default:return 5}return 0}var ee={address_map:{id:1,addrs:{},names:{}},lookup_name:function(r){var i=lr(r);if(i!==null||(i=Hr(r),i!==null))return r;var t;if(ee.address_map.addrs[r])t=ee.address_map.addrs[r];else{var a=ee.address_map.id++;Ne(a<65535,"exceeded max address mappings of 65535"),t="172.29."+(a&255)+"."+(a&65280),ee.address_map.names[t]=r,ee.address_map.addrs[r]=t}return t},lookup_addr:function(r){return ee.address_map.names[r]?ee.address_map.names[r]:null}};function oo(r,i,t,a){try{var n=ve(r),f=n.sock_ops.accept(n);if(i)var v=rr(i,f.family,ee.lookup_name(f.daddr),f.dport,t);return f.stream.fd}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Or(r){return(r&255)+"."+(r>>8&255)+"."+(r>>16&255)+"."+(r>>24&255)}function en(r){var i="",t=0,a=0,n=0,f=0,v=0,u=0,o=[r[0]&65535,r[0]>>16,r[1]&65535,r[1]>>16,r[2]&65535,r[2]>>16,r[3]&65535,r[3]>>16],c=!0,_="";for(u=0;u<5;u++)if(o[u]!==0){c=!1;break}if(c){if(_=Or(o[6]|o[7]<<16),o[5]===-1)return i="::ffff:",i+=_,i;if(o[5]===0)return i="::",_==="0.0.0.0"&&(_=""),_==="0.0.0.1"&&(_="1"),i+=_,i}for(t=0;t<8;t++)o[t]===0&&(t-n>1&&(v=0),n=t,v++),v>a&&(a=v,f=t-a+1);for(t=0;t<8;t++){if(a>1&&o[t]===0&&t>=f&&t<f+a){t===f&&(i+=":",f===0&&(i+=":"));continue}i+=Number(Qt(o[t]&65535)).toString(16),i+=t<7?":":""}return i}function wt(r,i){var t=Ee[r>>1],a=Qt(st[r+2>>1]),n;switch(t){case 2:if(i!==16)return{errno:28};n=h[r+4>>2],n=Or(n);break;case 10:if(i!==28)return{errno:28};n=[h[r+8>>2],h[r+12>>2],h[r+16>>2],h[r+20>>2]],n=en(n);break;default:return{errno:5}}return{family:t,addr:n,port:a}}function Mr(r,i,t){if(t&&r===0)return null;var a=wt(r,i);if(a.errno)throw new e.ErrnoError(a.errno);return a.addr=ee.lookup_addr(a.addr)||a.addr,a}function io(r,i,t){try{var a=ve(r),n=Mr(i,t);return a.sock_ops.bind(a,n.addr,n.port),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function ao(r){try{return r=N.getStr(r),e.chdir(r),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function so(r,i){try{return r=N.getStr(r),e.chmod(r,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function uo(r,i,t){try{var a=ve(r),n=Mr(i,t);return a.sock_ops.connect(a,n.addr,n.port),0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function fo(r){try{var i=N.getStreamFromFD(r);return e.createStream(i,0).fd}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function co(r,i,t){try{var a=N.getStreamFromFD(r);if(a.fd===i)return-28;var n=e.getStream(i);return n&&e.close(n),e.createStream(a,i,i+1).fd}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function lo(r,i,t,a){try{if(i=N.getStr(i),i=N.calculateAt(r,i),t&-8)return-28;var n=e.lookupPath(i,{follow:!0}),f=n.node;if(!f)return-44;var v="";return t&4&&(v+="r"),t&2&&(v+="w"),t&1&&(v+="x"),v&&e.nodePermissions(f,v)?-2:0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Xr(r,i){try{return e.fchmod(r,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function _o(r,i,t){try{return e.fchown(r,i,t),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function vo(r,i,t,a,n){try{i=N.getStr(i);var f=n&256;return n=n&-257,i=N.calculateAt(r,i),(f?e.lchown:e.chown)(i,t,a),0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function mo(r,i,t){N.varargs=t;try{var a=N.getStreamFromFD(r);switch(i){case 0:{var n=N.get();if(n<0)return-28;var f;return f=e.createStream(a,n),f.fd}case 1:case 2:return 0;case 3:return a.flags;case 4:{var n=N.get();return a.flags|=n,0}case 5:{var n=N.get(),v=0;return Ee[n+v>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Kt(28),-1;default:return-28}}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function po(r,i){try{var t=N.getStreamFromFD(r);return N.doStat(e.stat,t.path,i)}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function rn(r,i){return i+2097152>>>0<4194305-!!r?(r>>>0)+i*4294967296:NaN}function ho(r,i,t){try{var a=rn(i,t);return isNaN(a)?-61:(e.ftruncate(r,a),0)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function yo(r,i){try{if(i===0)return-28;var t=e.cwd(),a=Pe(t)+1;return i<a?-68:(Ae(t,r,i),a)}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function wo(r,i,t){try{var a=N.getStreamFromFD(r);a.getdents||(a.getdents=e.readdir(a.path));for(var n=280,f=0,v=e.llseek(a,0,1),u=Math.floor(v/n);u<a.getdents.length&&f+n<=t;){var o,c,_=a.getdents[u];if(_===".")o=a.node.id,c=4;else if(_===".."){var m=e.lookupPath(a.path,{parent:!0});o=m.node.id,c=4}else{var p=e.lookupNode(a.node,_);o=p.id,c=e.isChrdev(p.mode)?2:e.isDir(p.mode)?4:e.isLink(p.mode)?10:8}q=[o>>>0,(P=o,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[i+f>>2]=q[0],h[i+f+4>>2]=q[1],q=[(u+1)*n>>>0,(P=(u+1)*n,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[i+f+8>>2]=q[0],h[i+f+12>>2]=q[1],Ee[i+f+16>>1]=280,$[i+f+18>>0]=c,Ae(_,i+f+19,256),f+=n,u+=1}return e.llseek(a,u*n,0),f}catch(y){if(typeof e>"u"||!(y instanceof e.ErrnoError))throw y;return-y.errno}}function Eo(r,i,t){try{var a=ve(r);if(!a.daddr)return-53;var n=rr(i,a.family,ee.lookup_name(a.daddr),a.dport,t);return 0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function go(r,i,t){try{ce("__syscall_getsockname "+r);var a=ve(r),n=rr(i,a.family,ee.lookup_name(a.saddr||"0.0.0.0"),a.sport,t);return 0}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function So(r,i,t,a,n){try{var f=ve(r);return i===1&&t===4?(h[a>>2]=f.error,h[n>>2]=4,f.error=null,0):-50}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function bo(r,i,t){N.varargs=t;try{var a=N.getStreamFromFD(r);switch(i){case 21509:case 21505:return a.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return a.tty?0:-59;case 21519:{if(!a.tty)return-59;var n=N.get();return h[n>>2]=0,0}case 21520:return a.tty?-28:-59;case 21531:{var n=N.get();return e.ioctl(a,i,n)}case 21523:return a.tty?0:-59;case 21524:return a.tty?0:-59;default:return-28}}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}function ko(r,i){try{var t=ve(r);return t.sock_ops.listen(t,i),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Do(r,i){try{return r=N.getStr(r),N.doStat(e.lstat,r,i)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Oo(r,i,t){try{return i=N.getStr(i),i=N.calculateAt(r,i),i=U.normalize(i),i[i.length-1]==="/"&&(i=i.substr(0,i.length-1)),e.mkdir(i,t,0),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function No(r,i,t,a){try{i=N.getStr(i);var n=a&256,f=a&4096;return a=a&-4353,i=N.calculateAt(r,i,f),N.doStat(n?e.lstat:e.stat,i,t)}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return-v.errno}}function To(r,i,t,a){N.varargs=a;try{i=N.getStr(i),i=N.calculateAt(r,i);var n=a?N.get():0;return e.open(i,t,n).fd}catch(f){if(typeof e>"u"||!(f instanceof e.ErrnoError))throw f;return-f.errno}}var se={BUCKET_BUFFER_SIZE:8192,mount:function(r){return e.createNode(null,"/",16895,0)},createPipe:function(){var r={buckets:[],refcnt:2};r.buckets.push({buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var i=se.nextname(),t=se.nextname(),a=e.createNode(se.root,i,4096,0),n=e.createNode(se.root,t,4096,0);a.pipe=r,n.pipe=r;var f=e.createStream({path:i,node:a,flags:0,seekable:!1,stream_ops:se.stream_ops});a.stream=f;var v=e.createStream({path:t,node:n,flags:1,seekable:!1,stream_ops:se.stream_ops});return n.stream=v,{readable_fd:f.fd,writable_fd:v.fd}},stream_ops:{poll:function(r){var i=r.node.pipe;if((r.flags&2097155)===1)return 260;if(i.buckets.length>0)for(var t=0;t<i.buckets.length;t++){var a=i.buckets[t];if(a.offset-a.roffset>0)return 65}return 0},ioctl:function(r,i,t){return 28},fsync:function(r){return 28},read:function(r,i,t,a,n){for(var f=r.node.pipe,v=0,u=0;u<f.buckets.length;u++){var o=f.buckets[u];v+=o.offset-o.roffset}Ne(i instanceof ArrayBuffer||ArrayBuffer.isView(i));var c=i.subarray(t,t+a);if(a<=0)return 0;if(v==0)throw new e.ErrnoError(6);for(var _=Math.min(v,a),m=_,p=0,u=0;u<f.buckets.length;u++){var y=f.buckets[u],E=y.offset-y.roffset;if(_<=E){var S=y.buffer.subarray(y.roffset,y.offset);_<E?(S=S.subarray(0,_),y.roffset+=_):p++,c.set(S);break}else{var S=y.buffer.subarray(y.roffset,y.offset);c.set(S),c=c.subarray(S.byteLength),_-=S.byteLength,p++}}return p&&p==f.buckets.length&&(p--,f.buckets[p].offset=0,f.buckets[p].roffset=0),f.buckets.splice(0,p),m},write:function(r,i,t,a,n){var f=r.node.pipe;Ne(i instanceof ArrayBuffer||ArrayBuffer.isView(i));var v=i.subarray(t,t+a),u=v.byteLength;if(u<=0)return 0;var o=null;f.buckets.length==0?(o={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:0,roffset:0},f.buckets.push(o)):o=f.buckets[f.buckets.length-1],Ne(o.offset<=se.BUCKET_BUFFER_SIZE);var c=se.BUCKET_BUFFER_SIZE-o.offset;if(c>=u)return o.buffer.set(v,o.offset),o.offset+=u,u;c>0&&(o.buffer.set(v.subarray(0,c),o.offset),o.offset+=c,v=v.subarray(c,v.byteLength));for(var _=v.byteLength/se.BUCKET_BUFFER_SIZE|0,m=v.byteLength%se.BUCKET_BUFFER_SIZE,p=0;p<_;p++){var y={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:se.BUCKET_BUFFER_SIZE,roffset:0};f.buckets.push(y),y.buffer.set(v.subarray(0,se.BUCKET_BUFFER_SIZE)),v=v.subarray(se.BUCKET_BUFFER_SIZE,v.byteLength)}if(m>0){var y={buffer:new Uint8Array(se.BUCKET_BUFFER_SIZE),offset:v.byteLength,roffset:0};f.buckets.push(y),y.buffer.set(v)}return u},close:function(r){var i=r.node.pipe;i.refcnt--,i.refcnt===0&&(i.buckets=null)}},nextname:function(){return se.nextname.current||(se.nextname.current=0),"pipe["+se.nextname.current+++"]"}};function Co(r){try{if(r==0)throw new e.ErrnoError(21);var i=se.createPipe();return h[r>>2]=i.readable_fd,h[r+4>>2]=i.writable_fd,0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function pe(r,i,t){try{for(var a=0,n=0;n<i;n++){var f=r+8*n,v=h[f>>2],u=Ee[f+4>>1],o=32,c=e.getStream(v);c&&(o=N.DEFAULT_POLLMASK,c.stream_ops?.poll&&(o=c.stream_ops.poll(c))),o&=u|8|16,o&&a++,Ee[f+6>>1]=o}return a}catch(_){if(typeof e>"u"||!(_ instanceof e.ErrnoError))throw _;return-_.errno}}function Fo(r,i,t,a){try{if(i=N.getStr(i),i=N.calculateAt(r,i),a<=0)return-28;var n=e.readlink(i),f=Math.min(a,Pe(n)),v=$[t+f];return Ae(n,t,a+1),$[t+f]=v,f}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function Ao(r,i,t,a,n,f){try{var v=ve(r),u=v.sock_ops.recvmsg(v,t,typeof a<"u"?a:0);if(!u)return 0;if(n)var o=rr(n,v.family,ee.lookup_name(u.addr),u.port,f);return de.set(u.buffer,i),u.buffer.byteLength}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Po(r,i,t,a){try{return i=N.getStr(i),a=N.getStr(a),i=N.calculateAt(r,i),a=N.calculateAt(t,a),e.rename(i,a),0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function Ro(r){try{return r=N.getStr(r),e.rmdir(r),0}catch(i){if(typeof e>"u"||!(i instanceof e.ErrnoError))throw i;return-i.errno}}function Mo(r,i,t,a,n,f){try{var v=ve(r),u=Mr(n,f,!0);return u?v.sock_ops.sendmsg(v,$,i,t,u.addr,u.port):e.write(v.stream,$,i,t)}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function Lo(r,i,t){try{var a=j.createSocket(r,i,t);return a.stream.fd}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return-n.errno}}function Io(r,i){try{return r=N.getStr(r),N.doStat(e.stat,r,i)}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function Uo(r,i,t){try{return r=N.getStr(r),h[t+4>>2]=4096,h[t+40>>2]=4096,h[t+8>>2]=1e6,h[t+12>>2]=5e5,h[t+16>>2]=5e5,h[t+20>>2]=e.nextInode,h[t+24>>2]=1e6,h[t+28>>2]=42,h[t+44>>2]=2,h[t+36>>2]=255,0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Bo(r,i){try{return r=N.getStr(r),i=N.getStr(i),e.symlink(r,i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return-t.errno}}function xo(r,i,t){try{return i=N.getStr(i),i=N.calculateAt(r,i),t===0?e.unlink(i):t===512?e.rmdir(i):ue("Invalid flags passed to unlinkat"),0}catch(a){if(typeof e>"u"||!(a instanceof e.ErrnoError))throw a;return-a.errno}}function Br(r){return H[r>>2]+h[r+4>>2]*4294967296}function Ho(r,i,t,a){try{if(i=N.getStr(i),i=N.calculateAt(r,i,!0),t){var v=Br(t),u=h[t+8>>2];n=v*1e3+u/(1e3*1e3),t+=16,v=Br(t),u=h[t+8>>2],f=v*1e3+u/(1e3*1e3)}else var n=Date.now(),f=n;return e.utime(i,n,f),0}catch(o){if(typeof e>"u"||!(o instanceof e.ErrnoError))throw o;return-o.errno}}function $r(r){}var tn="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function zo(r,i){ue(tn)}function _n(r,i){ue(tn)}var Wo=!0;function jo(){return Wo}function Yo(){throw 1/0}function qo(r,i){var t=new Date(Br(r)*1e3);h[i>>2]=t.getUTCSeconds(),h[i+4>>2]=t.getUTCMinutes(),h[i+8>>2]=t.getUTCHours(),h[i+12>>2]=t.getUTCDate(),h[i+16>>2]=t.getUTCMonth(),h[i+20>>2]=t.getUTCFullYear()-1900,h[i+24>>2]=t.getUTCDay();var a=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),n=(t.getTime()-a)/(1e3*60*60*24)|0;h[i+28>>2]=n}function Vo(r,i){var t=new Date(Br(r)*1e3);h[i>>2]=t.getSeconds(),h[i+4>>2]=t.getMinutes(),h[i+8>>2]=t.getHours(),h[i+12>>2]=t.getDate(),h[i+16>>2]=t.getMonth(),h[i+20>>2]=t.getFullYear()-1900,h[i+24>>2]=t.getDay();var a=new Date(t.getFullYear(),0,1),n=(t.getTime()-a.getTime())/(1e3*60*60*24)|0;h[i+28>>2]=n,h[i+36>>2]=-(t.getTimezoneOffset()*60);var f=new Date(t.getFullYear(),6,1).getTimezoneOffset(),v=a.getTimezoneOffset(),u=(f!=v&&t.getTimezoneOffset()==Math.min(v,f))|0;h[i+32>>2]=u}function Ko(r){var i=new Date(h[r+20>>2]+1900,h[r+16>>2],h[r+12>>2],h[r+8>>2],h[r+4>>2],h[r>>2],0),t=h[r+32>>2],a=i.getTimezoneOffset(),n=new Date(i.getFullYear(),0,1),f=new Date(i.getFullYear(),6,1).getTimezoneOffset(),v=n.getTimezoneOffset(),u=Math.min(v,f);if(t<0)h[r+32>>2]=+(f!=v&&u==a);else if(t>0!=(u==a)){var o=Math.max(v,f),c=t>0?u:o;i.setTime(i.getTime()+(c-a)*6e4)}h[r+24>>2]=i.getDay();var _=(i.getTime()-n.getTime())/(1e3*60*60*24)|0;return h[r+28>>2]=_,h[r>>2]=i.getSeconds(),h[r+4>>2]=i.getMinutes(),h[r+8>>2]=i.getHours(),h[r+12>>2]=i.getDate(),h[r+16>>2]=i.getMonth(),h[r+20>>2]=i.getYear(),i.getTime()/1e3|0}function Go(r,i,t,a,n,f){try{var v=N.getStreamFromFD(a),u=e.mmap(v,r,n,i,t),o=u.ptr;return h[f>>2]=u.allocated,o}catch(c){if(typeof e>"u"||!(c instanceof e.ErrnoError))throw c;return-c.errno}}function Xo(r,i,t,a,n,f){try{var v=N.getStreamFromFD(n);t&2&&N.doMsync(r,v,i,a,f),e.munmap(v)}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return-u.errno}}function nn(r){var i=Pe(r)+1,t=bt(i);return t&&Xe(r,$,t,i),t}function $o(r,i,t){var a=new Date().getFullYear(),n=new Date(a,0,1),f=new Date(a,6,1),v=n.getTimezoneOffset(),u=f.getTimezoneOffset(),o=Math.max(v,u);h[r>>2]=o*60,h[i>>2]=+(v!=u);function c(E){var S=E.toTimeString().match(/\(([A-Za-z ]+)\)$/);return S?S[1]:"GMT"}var _=c(n),m=c(f),p=nn(_),y=nn(m);u<v?(H[t>>2]=p,H[t+4>>2]=y):(H[t>>2]=y,H[t+4>>2]=p)}function zr(r,i,t){zr.called||(zr.called=!0,$o(r,i,t))}function Zo(){ue("")}function It(){return Date.now()}function on(){return 2147483648}function Jo(){return on()}var Wr;Z?Wr=()=>{var r=process.hrtime();return r[0]*1e3+r[1]/1e6}:Wr=()=>performance.now();function Qo(r,i,t){de.copyWithin(r,i,i+t)}function Ut(r){try{return or.grow(r-Cr.byteLength+65535>>>16),ft(or.buffer),1}catch{}}function ei(r){var i=de.length;r=r>>>0;var t=on();if(r>t)return!1;let a=(o,c)=>o+(c-o%c)%c;for(var n=1;n<=4;n*=2){var f=i*(1+.2/n);f=Math.min(f,r+100663296);var v=Math.min(t,a(Math.max(r,f),65536)),u=Ut(v);if(u)return!0}return!1}function wn(r){Ge=r,_r()||(l.onExit&&l.onExit(r),Ce=!0),te(r,new mr(r))}function ri(r,i){Ge=r,_r()||Yn(),wn(r)}var Et=ri;function ti(){if(!_r())try{Et(Ge)}catch(r){pt(r)}}function gt(r){if(!(_t||Ce))try{r(),ti()}catch(i){pt(i)}}function et(){Fr+=1}function jr(){Fr-=1}function Bt(r,i){return et(),setTimeout(function(){jr(),gt(r)},i)}function xt(r){return be.handleSleep(i=>Bt(i,r))}var rt=O.ENV||{};function ni(){return J||"./this.program"}function dr(){if(!dr.strings){var r=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",i={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:ni()};for(var t in rt)rt[t]===void 0?delete i[t]:i[t]=rt[t];var a=[];for(var t in i)a.push(t+"="+i[t]);dr.strings=a}return dr.strings}function tt(r,i,t){for(var a=0;a<r.length;++a)$[i++>>0]=r.charCodeAt(a);t||($[i>>0]=0)}function Ir(r,i){var t=0;return dr().forEach(function(a,n){var f=i+t;H[r+n*4>>2]=f,tt(a,f),t+=a.length+1}),0}function Ht(r,i){var t=dr();H[r>>2]=t.length;var a=0;return t.forEach(function(n){a+=n.length+1}),H[i>>2]=a,0}function oi(r){try{var i=N.getStreamFromFD(r);return e.close(i),0}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function ii(r,i){try{var t=N.getStreamFromFD(r),a=t.tty?2:e.isDir(t.mode)?3:e.isLink(t.mode)?7:4;return $[i>>0]=a,0}catch(n){if(typeof e>"u"||!(n instanceof e.ErrnoError))throw n;return n.errno}}function ai(r,i,t,a){for(var n=0,f=0;f<t;f++){var v=H[i>>2],u=H[i+4>>2];i+=8;var o=e.read(r,$,v,u,a);if(o<0)return-1;if(n+=o,o<u)break}return n}function si(r,i,t,a){try{var n=N.getStreamFromFD(r),f=ai(n,i,t);return H[a>>2]=f,0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return v.errno}}function ui(r,i,t,a,n){try{var f=rn(i,t);if(isNaN(f))return 61;var v=N.getStreamFromFD(r);return e.llseek(v,f,a),q=[v.position>>>0,(P=v.position,+Math.abs(P)>=1?P>0?(Math.min(+Math.floor(P/4294967296),4294967295)|0)>>>0:~~+Math.ceil((P-+(~~P>>>0))/4294967296)>>>0:0)],h[n>>2]=q[0],h[n+4>>2]=q[1],v.getdents&&f===0&&a===0&&(v.getdents=null),0}catch(u){if(typeof e>"u"||!(u instanceof e.ErrnoError))throw u;return u.errno}}function fi(r){try{var i=N.getStreamFromFD(r);return be.handleSleep(function(t){var a=i.node.mount;if(!a.type.syncfs){t(0);return}a.type.syncfs(a,!1,function(n){if(n){t(function(){return 29});return}t(0)})})}catch(t){if(typeof e>"u"||!(t instanceof e.ErrnoError))throw t;return t.errno}}function ci(r,i,t,a){for(var n=0,f=0;f<t;f++){var v=H[i>>2],u=H[i+4>>2];i+=8;var o=e.write(r,$,v,u,a);if(o<0)return-1;n+=o}return n}function li(r,i,t,a){try{var n=N.getStreamFromFD(r),f=ci(n,i,t);return H[a>>2]=f,0}catch(v){if(typeof e>"u"||!(v instanceof e.ErrnoError))throw v;return v.errno}}function vn(r){var i=bt(20),t=bt(r.length+1);Ae(r,t,r.length+1),H[i>>2]=t;var a=bt(4);H[a>>2]=0,H[i+4>>2]=a;var n=2;h[i+8>>2]=n,h[i+12>>2]=4;var f=bt(12);return H[f>>2]=f+8,H[f+4>>2]=0,h[f+8>>2]=lr(ee.lookup_name(r)),H[i+16>>2]=f,i}function An(r,i,t){if(t!==2)return Kt(5),null;r=h[r>>2];var a=Or(r),n=ee.lookup_addr(a);return n&&(a=n),vn(a)}function Dn(r){return vn(ne(r))}function di(r,i){for(var t=Math.min(i,3),a=8,n=0;n<t;n++)ut[r+n*a>>3]=.1;return t}function _i(r,i,t,a,n,f,v){var u=wt(r,i);if(u.errno)return-6;var o=u.port,c=u.addr,_=!1;if(t&&a){var m;if(v&1||!(m=ee.lookup_addr(c))){if(v&8)return-2}else c=m;var p=Ae(c,t,a);p+1>=a&&(_=!0)}if(n&&f){o=""+o;var p=Ae(o,n,f);p+1>=f&&(_=!0)}return _?-12:0}var En={list:[],map:{}};function Jr(r){function i(f,v,u){var o=bt(f.length+1);tt(f,o);for(var c=0,_=u.length,m=bt((_+1)*4),p=0;p<_;p++,c+=4){var y=u[p],E=bt(y.length+1);tt(y,E),H[m+c>>2]=E}H[m+c>>2]=0;var S=bt(12);return H[S>>2]=o,H[S+4>>2]=m,h[S+8>>2]=v,S}var t=En.list,a=En.map;if(t.length===0){var n=i("tcp",6,["TCP"]);t.push(n),a.tcp=a[6]=n,n=i("udp",17,["UDP"]),t.push(n),a.udp=a[17]=n}Jr.index=0}function St(r){r=ne(r),Jr(!0);var i=En.map[r];return i}function zt(r){Jr(!0);var i=En.map[r];return i}function Wt(r){var i=Pe(r)+1,t=Oe(i);return Xe(r,$,t,i),t}var br={getAllWebSockets:function(r){let i=new Set;r.server&&r.server.clients.forEach(t=>{i.add(t)});for(let t of br.getAllPeers(r))i.add(t.socket);return Array.from(i)},getAllPeers:function(r){let i=new Set;if(r.server&&r.pending.filter(t=>t.peers).forEach(t=>{for(let a of Object.values(t.peers))i.add(a)}),r.peers)for(let t of Object.values(r.peers))i.add(t);return Array.from(i)},awaitData:function(r){return br.awaitWsEvent(r,"message")},awaitConnection:function(r){return r.OPEN===r.readyState?[Promise.resolve(),br.noop]:br.awaitWsEvent(r,"open")},awaitClose:function(r){return[r.CLOSING,r.CLOSED].includes(r.readyState)?[Promise.resolve(),br.noop]:br.awaitWsEvent(r,"close")},awaitError:function(r){return[r.CLOSING,r.CLOSED].includes(r.readyState)?[Promise.resolve(),br.noop]:br.awaitWsEvent(r,"error")},awaitWsEvent:function(r,i){let t,a=()=>{t()};return[new Promise(function(v){t=v,r.once(i,a)}),()=>{r.removeListener(i,a),setTimeout(t)}]},noop:function(){},shutdownSocket:function(r,i){let t=ve(r),a=Object.values(t.peers)[0];if(!a)return-1;try{return a.socket.close(),j.websocket_sock_ops.removePeer(t,a),0}catch(n){return console.log("Socket shutdown error",n),-1}}};function je(r,i,t){if(!r)return 1;let a=ne(r);if(!a.length)return 0;let n=ne(i);if(!n.length)return 0;if(l.popen_to_file){let{path:f,exitCode:v}=l.popen_to_file(a,n);return de[t]=v,Wt(f)}if(Z){let f=require("os").tmpdir(),v="php-process-stream",u=f+"/"+v,o=require("child_process"),c;if(n==="r")c=o.spawnSync(a,[],{shell:!0,stdio:["inherit","pipe","inherit"]}),de[t]=c.status,require("fs").writeFileSync(u,c.stdout,{encoding:"utf8",flag:"w+"});else return n==="w"?(console.error("popen mode w not implemented yet"),_W_EXITCODE(0,2)):(console.error("invalid mode "+n+" (should be r or w)"),_W_EXITCODE(0,2));return Wt(u)}throw new Error("popen() is unsupported in the browser. Implement popen_to_file in your Module or disable shell_exec() and similar functions via php.ini.")}function Nr(r){return r%4===0&&(r%100!==0||r%400===0)}function Ue(r,i){for(var t=0,a=0;a<=i;t+=r[a++]);return t}var ir=[31,29,31,30,31,30,31,31,30,31,30,31],qe=[31,28,31,30,31,30,31,31,30,31,30,31];function Er(r,i){for(var t=new Date(r.getTime());i>0;){var a=Nr(t.getFullYear()),n=t.getMonth(),f=(a?ir:qe)[n];if(i>f-t.getDate())i-=f-t.getDate()+1,t.setDate(1),n<11?t.setMonth(n+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else return t.setDate(t.getDate()+i),t}return t}function fr(r,i,t,a){var n=h[a+40>>2],f={tm_sec:h[a>>2],tm_min:h[a+4>>2],tm_hour:h[a+8>>2],tm_mday:h[a+12>>2],tm_mon:h[a+16>>2],tm_year:h[a+20>>2],tm_wday:h[a+24>>2],tm_yday:h[a+28>>2],tm_isdst:h[a+32>>2],tm_gmtoff:h[a+36>>2],tm_zone:n?ne(n):""},v=ne(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var o in u)v=v.replace(new RegExp(o,"g"),u[o]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(D,T,C){for(var A=typeof D=="number"?D.toString():D||"";A.length<T;)A=C[0]+A;return A}function p(D,T){return m(D,T,"0")}function y(D,T){function C(I){return I<0?-1:I>0?1:0}var A;return(A=C(D.getFullYear()-T.getFullYear()))===0&&(A=C(D.getMonth()-T.getMonth()))===0&&(A=C(D.getDate()-T.getDate())),A}function E(D){switch(D.getDay()){case 0:return new Date(D.getFullYear()-1,11,29);case 1:return D;case 2:return new Date(D.getFullYear(),0,3);case 3:return new Date(D.getFullYear(),0,2);case 4:return new Date(D.getFullYear(),0,1);case 5:return new Date(D.getFullYear()-1,11,31);case 6:return new Date(D.getFullYear()-1,11,30)}}function S(D){var T=Er(new Date(D.tm_year+1900,0,1),D.tm_yday),C=new Date(T.getFullYear(),0,4),A=new Date(T.getFullYear()+1,0,4),I=E(C),z=E(A);return y(I,T)<=0?y(z,T)<=0?T.getFullYear()+1:T.getFullYear():T.getFullYear()-1}var b={"%a":function(D){return c[D.tm_wday].substring(0,3)},"%A":function(D){return c[D.tm_wday]},"%b":function(D){return _[D.tm_mon].substring(0,3)},"%B":function(D){return _[D.tm_mon]},"%C":function(D){var T=D.tm_year+1900;return p(T/100|0,2)},"%d":function(D){return p(D.tm_mday,2)},"%e":function(D){return m(D.tm_mday,2," ")},"%g":function(D){return S(D).toString().substring(2)},"%G":function(D){return S(D)},"%H":function(D){return p(D.tm_hour,2)},"%I":function(D){var T=D.tm_hour;return T==0?T=12:T>12&&(T-=12),p(T,2)},"%j":function(D){return p(D.tm_mday+Ue(Nr(D.tm_year+1900)?ir:qe,D.tm_mon-1),3)},"%m":function(D){return p(D.tm_mon+1,2)},"%M":function(D){return p(D.tm_min,2)},"%n":function(){return`
|
|
34
|
-
`},"%p":function(D){return D.tm_hour>=0&&D.tm_hour<12?"AM":"PM"},"%S":function(D){return p(D.tm_sec,2)},"%t":function(){return" "},"%u":function(D){return D.tm_wday||7},"%U":function(D){var T=D.tm_yday+7-D.tm_wday;return p(Math.floor(T/7),2)},"%V":function(D){var T=Math.floor((D.tm_yday+7-(D.tm_wday+6)%7)/7);if((D.tm_wday+371-D.tm_yday-2)%7<=2&&T++,T){if(T==53){var A=(D.tm_wday+371-D.tm_yday)%7;A!=4&&(A!=3||!Nr(D.tm_year))&&(T=1)}}else{T=52;var C=(D.tm_wday+7-D.tm_yday-1)%7;(C==4||C==5&&Nr(D.tm_year%400-1))&&T++}return p(T,2)},"%w":function(D){return D.tm_wday},"%W":function(D){var T=D.tm_yday+7-(D.tm_wday+6)%7;return p(Math.floor(T/7),2)},"%y":function(D){return(D.tm_year+1900).toString().substring(2)},"%Y":function(D){return D.tm_year+1900},"%z":function(D){var T=D.tm_gmtoff,C=T>=0;return T=Math.abs(T)/60,T=T/60*100+T%60,(C?"+":"-")+("0000"+T).slice(-4)},"%Z":function(D){return D.tm_zone},"%%":function(){return"%"}};v=v.replace(/%%/g,"\0\0");for(var o in b)v.includes(o)&&(v=v.replace(new RegExp(o,"g"),b[o](f)));v=v.replace(/\0\0/g,"%");var k=Je(v,!1);return k.length>i?0:(ht(k,r),k.length-1)}function Tr(r,i,t){for(var a=ne(i),n="\\!@#$^&*()+=-[]/{}|:<>?,.",f=0,v=n.length;f<v;++f)a=a.replace(new RegExp("\\"+n[f],"g"),"\\"+n[f]);var u={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var o in u)a=a.replace(o,u[o]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},_={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},m={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},p={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var y in c)a=a.replace(y,"("+y+c[y]+")");for(var E=[],f=a.indexOf("%");f>=0;f=a.indexOf("%"))E.push(a[f+1]),a=a.replace(new RegExp("\\%"+a[f+1],"g"),"");var S=new RegExp("^"+a,"i").exec(ne(r));function b(){function ze(Ve,Dr,yr){return typeof Ve!="number"||isNaN(Ve)?Dr:Ve>=Dr?Ve<=yr?Ve:yr:Dr}return{year:ze(h[t+20>>2]+1900,1970,9999),month:ze(h[t+16>>2],0,11),day:ze(h[t+12>>2],1,31),hour:ze(h[t+8>>2],0,23),min:ze(h[t+4>>2],0,59),sec:ze(h[t>>2],0,59)}}if(S){var k=b(),D,T=ze=>{var Ve=E.indexOf(ze);if(Ve>=0)return S[Ve+1]};if((D=T("S"))&&(k.sec=Q(D)),(D=T("M"))&&(k.min=Q(D)),D=T("H"))k.hour=Q(D);else if(D=T("I")){var C=Q(D);(D=T("p"))&&(C+=D.toUpperCase()[0]==="P"?12:0),k.hour=C}if(D=T("Y"))k.year=Q(D);else if(D=T("y")){var A=Q(D);(D=T("C"))?A+=Q(D)*100:A+=A<69?2e3:1900,k.year=A}if((D=T("m"))?k.month=Q(D)-1:(D=T("b"))&&(k.month=_[D.substring(0,3).toUpperCase()]||0),D=T("d"))k.day=Q(D);else if(D=T("j"))for(var I=Q(D),z=Nr(k.year),K=0;K<12;++K){var B=Ue(z?ir:qe,K-1);I<=B+(z?ir:qe)[K]&&(k.day=I-B)}else if(D=T("a")){var x=D.substring(0,3).toUpperCase();if(D=T("U")){var G=m[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===0?le=Er(oe,G+7*(re-1)):le=Er(oe,7-oe.getDay()+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}else if(D=T("W")){var G=p[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===1?le=Er(oe,G+7*(re-1)):le=Er(oe,7-oe.getDay()+1+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}}var he=new Date(k.year,k.month,k.day,k.hour,k.min,k.sec,0);return h[t>>2]=he.getSeconds(),h[t+4>>2]=he.getMinutes(),h[t+8>>2]=he.getHours(),h[t+12>>2]=he.getDate(),h[t+16>>2]=he.getMonth(),h[t+20>>2]=he.getFullYear()-1900,h[t+24>>2]=he.getDay(),h[t+28>>2]=Ue(Nr(he.getFullYear())?ir:qe,he.getMonth()-1)+he.getDate()-1,h[t+32>>2]=0,r+Je(S[0]).length-1}return 0}function Yr(r){return br.shutdownSocket(r,2)}function jt(r,i,t){if(typeof be>"u")return 0;let a=1,n=2,f=4,v=8,u=16,o=32;return be.handleSleep(c=>{let _=ve(r);if(!_){c(0);return}let m=[],p=new Set;if(i&a||i&n){if(_.server){for(let D of _.pending)if((D.recv_queue||[]).length>0){c(1);return}}else if((_.recv_queue||[]).length>0){c(1);return}}let y=br.getAllWebSockets(_);if(!y.length){c(0);return}for(let D of y)(i&a||i&n)&&(m.push(br.awaitData(D)),p.add("POLLIN")),i&f&&(m.push(br.awaitConnection(D)),p.add("POLLOUT")),i&u&&(m.push(br.awaitClose(D)),p.add("POLLHUP")),(i&v||i&o)&&(m.push(br.awaitError(D)),p.add("POLLERR"));if(m.length===0){console.warn("Unsupported poll event "+i+", defaulting to setTimeout()."),setTimeout(function(){c(0)},t);return}let E=m.map(([D])=>D),S=()=>m.forEach(([,D])=>D()),b=!1;Promise.race(E).then(function(D){b||(b=!0,c(1),clearTimeout(k),S())});let k=setTimeout(function(){b||(b=!0,c(0),S())},t)})}function Yt(r,i,t,a,n){let f=de[a];if(!(i===1&&t===9||i===6&&t===1))return console.warn(`Unsupported socket option: ${i}, ${t}, ${f}`),-1;let m=br.getAllWebSockets(r)[0];return m?(m.setSocketOpt(i,t,a),0):-1}function Gt(r){try{return r()}catch(i){ue(i)}}var be={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(r){var i=be.callStackNameToId[r];return i===void 0&&(i=be.callStackId++,be.callStackNameToId[r]=i,be.callStackIdToName[i]=r),i},instrumentWasmImports:function(r){var i=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(a=>a.split(".")[1]);for(var t in r)(function(a){var n=r[a],f=n.sig;if(typeof n=="function")var v=i.indexOf(a)>=0||a.startsWith("__asyncjs__")})(t)},instrumentWasmExports:function(r){var i={};for(var t in r)(function(a){var n=r[a];typeof n=="function"?i[a]=function(){be.exportCallStack.push(a);try{return n.apply(null,arguments)}finally{if(!Ce){var f=be.exportCallStack.pop();Ne(f===a),be.maybeStopUnwind()}}}:i[a]=n})(t);return i},maybeStopUnwind:function(){be.currData&&be.state===be.State.Unwinding&&be.exportCallStack.length===0&&(be.state=be.State.Normal,et(),Gt(Mt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((r,i)=>{be.asyncPromiseHandlers={resolve:r,reject:i}})},allocateData:function(){var r=bt(12+be.StackSize);return be.setDataHeader(r,r+12,be.StackSize),be.setDataRewindFunc(r),r},setDataHeader:function(r,i,t){h[r>>2]=i,h[r+4>>2]=i+t},setDataRewindFunc:function(r){var i=be.exportCallStack[0],t=be.getCallStackId(i);h[r+8>>2]=t},getDataRewindFunc:function(r){var i=h[r+8>>2],t=be.callStackIdToName[i],a=l.asm[t];return a},doRewind:function(r){var i=be.getDataRewindFunc(r);return jr(),i()},handleSleep:function(r){if(!Ce){if(be.state===be.State.Normal){var i=!1,t=!1;r(a=>{if(!Ce&&(be.handleSleepReturnValue=a||0,i=!0,!!t)){be.state=be.State.Rewinding,Gt(()=>Lt(be.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,f=!1;try{n=be.doRewind(be.currData)}catch(o){n=o,f=!0}var v=!1;if(!be.currData){var u=be.asyncPromiseHandlers;u&&(be.asyncPromiseHandlers=null,(f?u.reject:u.resolve)(n),v=!0)}if(f&&!v)throw n}}),t=!0,i||(be.state=be.State.Unwinding,be.currData=be.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),Gt(()=>Rt(be.currData)))}else be.state===be.State.Rewinding?(be.state=be.State.Normal,Gt(Vt),qr(be.currData),be.currData=null,be.sleepCallbacks.forEach(a=>gt(a))):ue("invalid state: "+be.state);return be.handleSleepReturnValue}},handleAsync:function(r){return be.handleSleep(i=>{r().then(i)})}};function X(r){var i=l["_"+r];return i}function Fe(r,i,t,a,n){var f={string:b=>{var k=0;if(b!=null&&b!==0){var D=(b.length<<2)+1;k=Oe(D),Ae(b,k,D)}return k},array:b=>{var k=Oe(b.length);return ht(b,k),k}};function v(b){return i==="string"?ne(b):i==="boolean"?!!b:b}var u=X(r),o=[],c=0;if(a)for(var _=0;_<a.length;_++){var m=f[t[_]];m?(c===0&&(c=gr()),o[_]=m(a[_])):o[_]=a[_]}var p=be.currData,y=u.apply(null,o);function E(b){return jr(),c!==0&&we(c),v(b)}et();var S=n&&n.async;return be.currData!=p?be.whenDone().then(E):(y=E(y),S?Promise.resolve(y):y)}var Xt=function(r,i,t,a){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=e.nextInode++,this.name=i,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=a},ie=365,Gr=146;Object.defineProperties(Xt.prototype,{read:{get:function(){return(this.mode&ie)===ie},set:function(r){r?this.mode|=ie:this.mode&=~ie}},write:{get:function(){return(this.mode&Gr)===Gr},set:function(r){r?this.mode|=Gr:this.mode&=~Gr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=Xt,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var xr={l:Jn,Ta:Qn,Sa:no,Ra:oo,Qa:io,Pa:ao,M:so,Oa:uo,Na:fo,Ma:co,La:lo,Ka:Xr,Ja:_o,L:vo,p:mo,Ia:po,R:ho,Ha:yo,Ga:wo,Fa:Eo,Ea:go,Da:So,K:bo,Ca:ko,Ba:Do,Aa:Oo,za:No,C:To,ya:Co,xa:pe,wa:Fo,va:Ao,ua:Po,J:Ro,ta:Mo,I:Lo,sa:Io,ra:Uo,qa:Bo,H:xo,pa:Ho,la:$r,ka:zo,ja:_n,ia:jo,ha:Yo,ga:qo,fa:Vo,ea:Ko,da:Go,ca:Xo,ba:zr,n:Zo,A:It,aa:Jo,E:Wr,$:Qo,_:ei,Z:xt,oa:Ir,na:Ht,d:Et,u:oi,G:ii,F:si,Q:ui,ma:fi,B:li,D:An,z:Dn,Y:di,X:_i,W:St,V:zt,j:Cn,c:hn,b:Tn,g:Di,h:Ln,t:Ai,U:In,m:cn,T:Ni,y:Fi,P:g,O:w,f:Nn,a:ln,e:pn,i:bn,s:Oi,o:Ci,k:Ti,x:kn,S:je,r:fr,N:Tr,q:Yr,w:jt,v:Yt},ke=Zn(),Te=l.___wasm_call_ctors=function(){return(Te=l.___wasm_call_ctors=l.asm.Va).apply(null,arguments)},an=l._wasm_popen=function(){return(an=l._wasm_popen=l.asm.Wa).apply(null,arguments)},On=l.___errno_location=function(){return(On=l.___errno_location=l.asm.Xa).apply(null,arguments)},sn=l._wasm_pclose=function(){return(sn=l._wasm_pclose=l.asm.Ya).apply(null,arguments)},$t=l._php_pollfd_for=function(){return($t=l._php_pollfd_for=l.asm.Za).apply(null,arguments)},gn=l._wasm_select=function(){return(gn=l._wasm_select=l.asm._a).apply(null,arguments)},Pn=l._wasm_add_cli_arg=function(){return(Pn=l._wasm_add_cli_arg=l.asm.$a).apply(null,arguments)},bt=l._malloc=function(){return(bt=l._malloc=l.asm.ab).apply(null,arguments)},sr=l._run_cli=function(){return(sr=l._run_cli=l.asm.bb).apply(null,arguments)},qr=l._free=function(){return(qr=l._free=l.asm.cb).apply(null,arguments)},Qt=l._ntohs=function(){return(Qt=l._ntohs=l.asm.eb).apply(null,arguments)},er=l._htons=function(){return(er=l._htons=l.asm.fb).apply(null,arguments)},qt=l._fflush=function(){return(qt=l._fflush=l.asm.gb).apply(null,arguments)},Zr=l._wasm_set_phpini_path=function(){return(Zr=l._wasm_set_phpini_path=l.asm.hb).apply(null,arguments)},kr=l._wasm_set_phpini_entries=function(){return(kr=l._wasm_set_phpini_entries=l.asm.ib).apply(null,arguments)},Ur=l._wasm_add_SERVER_entry=function(){return(Ur=l._wasm_add_SERVER_entry=l.asm.jb).apply(null,arguments)},nt=l._wasm_add_uploaded_file=function(){return(nt=l._wasm_add_uploaded_file=l.asm.kb).apply(null,arguments)},Zt=l._wasm_set_query_string=function(){return(Zt=l._wasm_set_query_string=l.asm.lb).apply(null,arguments)},kt=l._wasm_set_path_translated=function(){return(kt=l._wasm_set_path_translated=l.asm.mb).apply(null,arguments)},mn=l._wasm_set_skip_shebang=function(){return(mn=l._wasm_set_skip_shebang=l.asm.nb).apply(null,arguments)},un=l._wasm_set_request_uri=function(){return(un=l._wasm_set_request_uri=l.asm.ob).apply(null,arguments)},fn=l._wasm_set_request_method=function(){return(fn=l._wasm_set_request_method=l.asm.pb).apply(null,arguments)},Sn=l._wasm_set_request_host=function(){return(Sn=l._wasm_set_request_host=l.asm.qb).apply(null,arguments)},vi=l._wasm_set_content_type=function(){return(vi=l._wasm_set_content_type=l.asm.rb).apply(null,arguments)},mi=l._wasm_set_request_body=function(){return(mi=l._wasm_set_request_body=l.asm.sb).apply(null,arguments)},pi=l._wasm_set_content_length=function(){return(pi=l._wasm_set_content_length=l.asm.tb).apply(null,arguments)},hi=l._wasm_set_cookies=function(){return(hi=l._wasm_set_cookies=l.asm.ub).apply(null,arguments)},yi=l._wasm_set_php_code=function(){return(yi=l._wasm_set_php_code=l.asm.vb).apply(null,arguments)},wi=l._wasm_set_request_port=function(){return(wi=l._wasm_set_request_port=l.asm.wb).apply(null,arguments)},Ei=l._phpwasm_init_uploaded_files_hash=function(){return(Ei=l._phpwasm_init_uploaded_files_hash=l.asm.xb).apply(null,arguments)},gi=l._phpwasm_register_uploaded_file=function(){return(gi=l._phpwasm_register_uploaded_file=l.asm.yb).apply(null,arguments)},Si=l._phpwasm_destroy_uploaded_files_hash=function(){return(Si=l._phpwasm_destroy_uploaded_files_hash=l.asm.zb).apply(null,arguments)},bi=l._wasm_sapi_handle_request=function(){return(bi=l._wasm_sapi_handle_request=l.asm.Ab).apply(null,arguments)},ki=l._php_wasm_init=function(){return(ki=l._php_wasm_init=l.asm.Bb).apply(null,arguments)},Rn=l.___funcs_on_exit=function(){return(Rn=l.___funcs_on_exit=l.asm.Cb).apply(null,arguments)},Mn=l._emscripten_builtin_memalign=function(){return(Mn=l._emscripten_builtin_memalign=l.asm.Db).apply(null,arguments)},Sr=l._setThrew=function(){return(Sr=l._setThrew=l.asm.Eb).apply(null,arguments)},gr=l.stackSave=function(){return(gr=l.stackSave=l.asm.Fb).apply(null,arguments)},we=l.stackRestore=function(){return(we=l.stackRestore=l.asm.Gb).apply(null,arguments)},Oe=l.stackAlloc=function(){return(Oe=l.stackAlloc=l.asm.Hb).apply(null,arguments)},ye=l.dynCall_viii=function(){return(ye=l.dynCall_viii=l.asm.Ib).apply(null,arguments)},tr=l.dynCall_vi=function(){return(tr=l.dynCall_vi=l.asm.Jb).apply(null,arguments)},De=l.dynCall_ii=function(){return(De=l.dynCall_ii=l.asm.Kb).apply(null,arguments)},xe=l.dynCall_iii=function(){return(xe=l.dynCall_iii=l.asm.Lb).apply(null,arguments)},Ie=l.dynCall_iiii=function(){return(Ie=l.dynCall_iiii=l.asm.Mb).apply(null,arguments)},ar=l.dynCall_v=function(){return(ar=l.dynCall_v=l.asm.Nb).apply(null,arguments)},Be=l.dynCall_iiiii=function(){return(Be=l.dynCall_iiiii=l.asm.Ob).apply(null,arguments)},He=l.dynCall_iiiiii=function(){return(He=l.dynCall_iiiiii=l.asm.Pb).apply(null,arguments)},ur=l.dynCall_vii=function(){return(ur=l.dynCall_vii=l.asm.Qb).apply(null,arguments)},Qr=l.dynCall_viiii=function(){return(Qr=l.dynCall_viiii=l.asm.Rb).apply(null,arguments)},ot=l.dynCall_iiiiiii=function(){return(ot=l.dynCall_iiiiiii=l.asm.Sb).apply(null,arguments)},it=l.dynCall_i=function(){return(it=l.dynCall_i=l.asm.Tb).apply(null,arguments)},Dt=l.dynCall_viiiii=function(){return(Dt=l.dynCall_viiiii=l.asm.Ub).apply(null,arguments)},Ot=l.dynCall_iiiiiiii=function(){return(Ot=l.dynCall_iiiiiiii=l.asm.Vb).apply(null,arguments)},Nt=l.dynCall_iiiiiiiii=function(){return(Nt=l.dynCall_iiiiiiiii=l.asm.Wb).apply(null,arguments)},Tt=l.dynCall_iiiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiiii=l.asm.Xb).apply(null,arguments)},Ct=l.dynCall_viiiiiiiii=function(){return(Ct=l.dynCall_viiiiiiiii=l.asm.Yb).apply(null,arguments)},Ft=l.dynCall_viiiiii=function(){return(Ft=l.dynCall_viiiiii=l.asm.Zb).apply(null,arguments)},At=l.dynCall_iiji=function(){return(At=l.dynCall_iiji=l.asm._b).apply(null,arguments)},Pt=l.dynCall_iijiji=function(){return(Pt=l.dynCall_iijiji=l.asm.$b).apply(null,arguments)},Rt=l._asyncify_start_unwind=function(){return(Rt=l._asyncify_start_unwind=l.asm.ac).apply(null,arguments)},Mt=l._asyncify_stop_unwind=function(){return(Mt=l._asyncify_stop_unwind=l.asm.bc).apply(null,arguments)},Lt=l._asyncify_start_rewind=function(){return(Lt=l._asyncify_start_rewind=l.asm.cc).apply(null,arguments)},Vt=l._asyncify_stop_rewind=function(){return(Vt=l._asyncify_stop_rewind=l.asm.dc).apply(null,arguments)};function cn(r,i,t,a,n,f,v,u){var o=gr();try{return Ot(r,i,t,a,n,f,v,u)}catch(c){if(we(o),c!==c+0)throw c;Sr(1,0)}}function ln(r,i){var t=gr();try{tr(r,i)}catch(a){if(we(t),a!==a+0)throw a;Sr(1,0)}}function pn(r,i,t){var a=gr();try{ur(r,i,t)}catch(n){if(we(a),n!==n+0)throw n;Sr(1,0)}}function hn(r,i){var t=gr();try{return De(r,i)}catch(a){if(we(t),a!==a+0)throw a;Sr(1,0)}}function bn(r,i,t,a){var n=gr();try{ye(r,i,t,a)}catch(f){if(we(n),f!==f+0)throw f;Sr(1,0)}}function Nn(r){var i=gr();try{ar(r)}catch(t){if(we(i),t!==t+0)throw t;Sr(1,0)}}function Tn(r,i,t){var a=gr();try{return xe(r,i,t)}catch(n){if(we(a),n!==n+0)throw n;Sr(1,0)}}function Cn(r){var i=gr();try{return it(r)}catch(t){if(we(i),t!==t+0)throw t;Sr(1,0)}}function Ln(r,i,t,a,n){var f=gr();try{return Be(r,i,t,a,n)}catch(v){if(we(f),v!==v+0)throw v;Sr(1,0)}}function Di(r,i,t,a){var n=gr();try{return Ie(r,i,t,a)}catch(f){if(we(n),f!==f+0)throw f;Sr(1,0)}}function Oi(r,i,t,a,n){var f=gr();try{Qr(r,i,t,a,n)}catch(v){if(we(f),v!==v+0)throw v;Sr(1,0)}}function Ni(r,i,t,a,n,f,v,u,o){var c=gr();try{return Nt(r,i,t,a,n,f,v,u,o)}catch(_){if(we(c),_!==_+0)throw _;Sr(1,0)}}function Ti(r,i,t,a,n,f,v){var u=gr();try{Ft(r,i,t,a,n,f,v)}catch(o){if(we(u),o!==o+0)throw o;Sr(1,0)}}function Ci(r,i,t,a,n,f){var v=gr();try{Dt(r,i,t,a,n,f)}catch(u){if(we(v),u!==u+0)throw u;Sr(1,0)}}function Fi(r,i,t,a,n,f,v,u,o,c){var _=gr();try{return Tt(r,i,t,a,n,f,v,u,o,c)}catch(m){if(we(_),m!==m+0)throw m;Sr(1,0)}}function Ai(r,i,t,a,n,f){var v=gr();try{return He(r,i,t,a,n,f)}catch(u){if(we(v),u!==u+0)throw u;Sr(1,0)}}function kn(r,i,t,a,n,f,v,u,o,c){var _=gr();try{Ct(r,i,t,a,n,f,v,u,o,c)}catch(m){if(we(_),m!==m+0)throw m;Sr(1,0)}}function In(r,i,t,a,n,f,v){var u=gr();try{return ot(r,i,t,a,n,f,v)}catch(o){if(we(u),o!==o+0)throw o;Sr(1,0)}}function w(r,i,t,a,n,f,v,u){var o=gr();try{return Pt(r,i,t,a,n,f,v,u)}catch(c){if(we(o),c!==c+0)throw c;Sr(1,0)}}function g(r,i,t,a,n){var f=gr();try{return At(r,i,t,a,n)}catch(v){if(we(f),v!==v+0)throw v;Sr(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Fe,l.FS=e;var s;$e=function r(){s||d(),s||($e=r)};function d(r){if(r=r||Y,Re>0||(Wn(),Re>0))return;function i(){s||(s=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),i()},1)):i()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return d(),O}var $c,Qu,rf=Ki(()=>{"use strict";$c=10146532,Qu=__dirname+"/php_5_6.wasm"});var sl={};Hi(sl,{LatestSupportedPHPVersion:()=>pa,PHP:()=>_a,PHPBrowser:()=>fa,SupportedPHPVersions:()=>ma,SupportedPHPVersionsList:()=>Ja,getPHPLoaderModule:()=>Es,parseWorkerStartupOptions:()=>Jc,withNetworking:()=>Ss});module.exports=wf(sl);var Za=require("util");var ma=["8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0","5.6"],pa=ma[0],Ja=ma;var fa=class{#e;#r;server;constructor(O,F={}){this.server=O,this.#e={},this.#r={handleRedirects:!1,maxRedirects:4,...F}}async request(O,F=0){let l=await this.server.request({...O,headers:{...O.headers,cookie:this.#o()}});if(l.headers["set-cookie"]&&this.#t(l.headers["set-cookie"]),this.#r.handleRedirects&&l.headers.location&&F<this.#r.maxRedirects){let W=new URL(l.headers.location[0],this.server.absoluteUrl);return this.request({url:W.toString(),method:"GET",headers:{}},F+1)}return l}#t(O){for(let F of O)try{if(!F.includes("="))continue;let l=F.indexOf("="),W=F.substring(0,l),Y=F.substring(l+1).split(";")[0];this.#e[W]=Y}catch(l){console.error(l)}}#o(){let O=[];for(let F in this.#e)O.push(`${F}=${this.#e[F]}`);return O.join("; ")}},Os=fa;var Qa="http://example.com";function Ca(R){return R.toString().substring(R.origin.length)}function Fa(R,O){return!O||!R.startsWith(O)?R:R.substring(O.length)}function es(R,O){return!O||R.startsWith(O)?R:O+R}var ha=class{_running=0;concurrency;queue;constructor({concurrency:O}){this.concurrency=O,this.queue=[]}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency)await new Promise(O=>this.queue.push(O));else return this._running++,()=>{this._running--,this.queue.length>0&&this.queue.shift()()}}};var ji=class{headers;bytes;errors;exitCode;httpStatusCode;constructor(O,F,l,W="",Y=0){this.httpStatusCode=O,this.headers=F,this.bytes=l,this.exitCode=Y,this.errors=W}static fromRawData(O){return new ji(O.httpStatusCode,O.headers,O.bytes,O.errors,O.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}};var Aa=class{#e;#r;#t;#o;#i;#n;#a;#s;php;#u;constructor(O,F={}){this.#s=new ha({concurrency:1});let{documentRoot:l="/www/",absoluteUrl:W=location.origin,isStaticFilePath:Y=()=>!1}=F;this.php=O,this.#e=l,this.#u=Y;let J=new URL(W);this.#t=J.hostname,this.#o=J.port?Number(J.port):J.protocol==="https:"?443:80,this.#r=(J.protocol||"").replace(":","");let te=this.#o!==443&&this.#o!==80;this.#i=[this.#t,te?`:${this.#o}`:""].join(""),this.#n=J.pathname.replace(/\/+$/,""),this.#a=[`${this.#r}://`,this.#i,this.#n].join("")}pathToInternalUrl(O){return`${this.absoluteUrl}${O}`}internalUrlToPath(O){let F=new URL(O);return F.pathname.startsWith(this.#n)&&(F.pathname=F.pathname.slice(this.#n.length)),Ca(F)}get isRequestRunning(){return this.#s.running>0}get absoluteUrl(){return this.#a}get documentRoot(){return this.#e}async request(O){let F=O.url.startsWith("http://")||O.url.startsWith("https://"),l=new URL(O.url,F?void 0:Qa),W=Fa(l.pathname,this.#n);return this.#u(W)?this.#f(W):await this.#c(O,l)}#f(O){let F=`${this.#e}${O}`;if(!this.php.fileExists(F))return new ji(404,{},new TextEncoder().encode("404 File not found"));let l=this.php.readFileAsBuffer(F);return new ji(200,{"content-length":[`${l.byteLength}`],"content-type":[Ef(F)],"accept-ranges":["bytes"],"cache-control":["public, max-age=0"]},l)}async#c(O,F){let l=await this.#s.acquire();try{this.php.addServerGlobalEntry("DOCUMENT_ROOT",this.#e),this.php.addServerGlobalEntry("HTTPS",this.#a.startsWith("https://")?"on":"");let W="GET",Y=[];if(O.files){W="POST";for(let me in O.files){let fe=O.files[me];Y.push({key:me,name:fe.name,type:fe.type,data:new Uint8Array(await fe.arrayBuffer())})}}let J={host:this.#i},te;return O.formData!==void 0?(W="POST",J["content-type"]="application/x-www-form-urlencoded",te=new URLSearchParams(O.formData).toString()):te=O.body,await this.php.run({relativeUri:es(Ca(F),this.#n),protocol:this.#r,method:O.method||W,body:te,fileInfos:Y,scriptPath:this.#l(F.pathname),headers:{...J,...O.headers||{}}})}finally{l()}}#l(O){let F=Fa(O,this.#n);F.includes(".php")?F=F.split(".php")[0]+".php":(F.endsWith("/")||(F+="/"),F.endsWith("index.php")||(F+="index.php"));let l=`${this.#e}${F}`;return this.php.fileExists(l)?l:`${this.#e}/index.php`}};function Ef(R){switch(R.split(".").pop()){case"css":return"text/css";case"js":return"application/javascript";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"gif":return"image/gif";case"svg":return"image/svg+xml";case"woff":return"font/woff";case"woff2":return"font/woff2";case"ttf":return"font/ttf";case"otf":return"font/otf";case"eot":return"font/eot";case"ico":return"image/x-icon";case"html":return"text/html";case"json":return"application/json";case"xml":return"application/xml";case"txt":case"md":return"text/plain";default:return"application-octet-stream"}}var Ns=Aa;var Ts={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function Yi(R=""){return function(F,l,W){let Y=W.value;W.value=function(...J){try{return Y.apply(this,J)}catch(te){let me=typeof te=="object"?te?.errno:null;if(me in Ts){let fe=Ts[me],Z=typeof J[0]=="string"?J[0]:null,ae=Z!==null?R.replaceAll("{path}",Z):R;throw new Error(`${ae}: ${fe}`,{cause:te})}throw te}}}}var bf={};var Ri="string",na="number",Pa=[],gf=function(){return typeof window<"u"&&!bf.env.TEST?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}(),Ii=class{#e;#r=[];#t=!1;requestHandler;constructor(O,F){O!==void 0&&this.initializeRuntime(O),F&&(this.requestHandler=new Os(new Ns(this,F)))}initializeRuntime(O){if(this.#e)throw new Error("PHP runtime already initialized.");if(!Pa[O])throw new Error("Invalid PHP runtime id.");this.#e=Pa[O]}setPhpIniPath(O){if(this.#t)throw new Error("Cannot set PHP ini path after calling run().");this.#e.ccall("wasm_set_phpini_path",null,["string"],[O])}setPhpIniEntry(O,F){if(this.#t)throw new Error("Cannot set PHP ini entries after calling run().");this.#r.push([O,F])}chdir(O){this.#e.FS.chdir(O)}async request(O,F){if(!this.requestHandler)throw new Error("No request handler available.");return this.requestHandler.request(O,F)}async run(O={}){this.#t||(this.#o(),this.#t=!0),this.#c(O.scriptPath||""),this.#n(O.relativeUri||""),this.#s(O.method||"GET");let{host:F,...l}={host:"example.com:443",...Sf(O.headers||{})};if(this.#a(F,O.protocol||"http"),this.#u(l),O.body&&this.#f(O.body),O.fileInfos)for(let W of O.fileInfos)this.#l(W);return O.code&&this.#d(" ?>"+O.code),await this.#_()}#o(){if(this.#r.length>0){let O=this.#r.map(([F,l])=>`${F}=${l}`).join(`
|
|
34
|
+
`},"%p":function(D){return D.tm_hour>=0&&D.tm_hour<12?"AM":"PM"},"%S":function(D){return p(D.tm_sec,2)},"%t":function(){return" "},"%u":function(D){return D.tm_wday||7},"%U":function(D){var T=D.tm_yday+7-D.tm_wday;return p(Math.floor(T/7),2)},"%V":function(D){var T=Math.floor((D.tm_yday+7-(D.tm_wday+6)%7)/7);if((D.tm_wday+371-D.tm_yday-2)%7<=2&&T++,T){if(T==53){var A=(D.tm_wday+371-D.tm_yday)%7;A!=4&&(A!=3||!Nr(D.tm_year))&&(T=1)}}else{T=52;var C=(D.tm_wday+7-D.tm_yday-1)%7;(C==4||C==5&&Nr(D.tm_year%400-1))&&T++}return p(T,2)},"%w":function(D){return D.tm_wday},"%W":function(D){var T=D.tm_yday+7-(D.tm_wday+6)%7;return p(Math.floor(T/7),2)},"%y":function(D){return(D.tm_year+1900).toString().substring(2)},"%Y":function(D){return D.tm_year+1900},"%z":function(D){var T=D.tm_gmtoff,C=T>=0;return T=Math.abs(T)/60,T=T/60*100+T%60,(C?"+":"-")+("0000"+T).slice(-4)},"%Z":function(D){return D.tm_zone},"%%":function(){return"%"}};v=v.replace(/%%/g,"\0\0");for(var o in b)v.includes(o)&&(v=v.replace(new RegExp(o,"g"),b[o](f)));v=v.replace(/\0\0/g,"%");var k=Je(v,!1);return k.length>i?0:(ht(k,r),k.length-1)}function Tr(r,i,t){for(var a=ne(i),n="\\!@#$^&*()+=-[]/{}|:<>?,.",f=0,v=n.length;f<v;++f)a=a.replace(new RegExp("\\"+n[f],"g"),"\\"+n[f]);var u={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var o in u)a=a.replace(o,u[o]);var c={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"},_={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},m={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},p={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6};for(var y in c)a=a.replace(y,"("+y+c[y]+")");for(var E=[],f=a.indexOf("%");f>=0;f=a.indexOf("%"))E.push(a[f+1]),a=a.replace(new RegExp("\\%"+a[f+1],"g"),"");var S=new RegExp("^"+a,"i").exec(ne(r));function b(){function ze(Ve,Dr,yr){return typeof Ve!="number"||isNaN(Ve)?Dr:Ve>=Dr?Ve<=yr?Ve:yr:Dr}return{year:ze(h[t+20>>2]+1900,1970,9999),month:ze(h[t+16>>2],0,11),day:ze(h[t+12>>2],1,31),hour:ze(h[t+8>>2],0,23),min:ze(h[t+4>>2],0,59),sec:ze(h[t>>2],0,59)}}if(S){var k=b(),D,T=ze=>{var Ve=E.indexOf(ze);if(Ve>=0)return S[Ve+1]};if((D=T("S"))&&(k.sec=Q(D)),(D=T("M"))&&(k.min=Q(D)),D=T("H"))k.hour=Q(D);else if(D=T("I")){var C=Q(D);(D=T("p"))&&(C+=D.toUpperCase()[0]==="P"?12:0),k.hour=C}if(D=T("Y"))k.year=Q(D);else if(D=T("y")){var A=Q(D);(D=T("C"))?A+=Q(D)*100:A+=A<69?2e3:1900,k.year=A}if((D=T("m"))?k.month=Q(D)-1:(D=T("b"))&&(k.month=_[D.substring(0,3).toUpperCase()]||0),D=T("d"))k.day=Q(D);else if(D=T("j"))for(var I=Q(D),z=Nr(k.year),K=0;K<12;++K){var B=Ue(z?ir:qe,K-1);I<=B+(z?ir:qe)[K]&&(k.day=I-B)}else if(D=T("a")){var x=D.substring(0,3).toUpperCase();if(D=T("U")){var G=m[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===0?le=Er(oe,G+7*(re-1)):le=Er(oe,7-oe.getDay()+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}else if(D=T("W")){var G=p[x],re=Q(D),oe=new Date(k.year,0,1),le;oe.getDay()===1?le=Er(oe,G+7*(re-1)):le=Er(oe,7-oe.getDay()+1+G+7*(re-1)),k.day=le.getDate(),k.month=le.getMonth()}}var he=new Date(k.year,k.month,k.day,k.hour,k.min,k.sec,0);return h[t>>2]=he.getSeconds(),h[t+4>>2]=he.getMinutes(),h[t+8>>2]=he.getHours(),h[t+12>>2]=he.getDate(),h[t+16>>2]=he.getMonth(),h[t+20>>2]=he.getFullYear()-1900,h[t+24>>2]=he.getDay(),h[t+28>>2]=Ue(Nr(he.getFullYear())?ir:qe,he.getMonth()-1)+he.getDate()-1,h[t+32>>2]=0,r+Je(S[0]).length-1}return 0}function Yr(r){return br.shutdownSocket(r,2)}function jt(r,i,t){if(typeof be>"u")return 0;let a=1,n=2,f=4,v=8,u=16,o=32;return be.handleSleep(c=>{let _=ve(r);if(!_){c(0);return}let m=[],p=new Set;if(i&a||i&n){if(_.server){for(let D of _.pending)if((D.recv_queue||[]).length>0){c(1);return}}else if((_.recv_queue||[]).length>0){c(1);return}}let y=br.getAllWebSockets(_);if(!y.length){c(0);return}for(let D of y)(i&a||i&n)&&(m.push(br.awaitData(D)),p.add("POLLIN")),i&f&&(m.push(br.awaitConnection(D)),p.add("POLLOUT")),i&u&&(m.push(br.awaitClose(D)),p.add("POLLHUP")),(i&v||i&o)&&(m.push(br.awaitError(D)),p.add("POLLERR"));if(m.length===0){console.warn("Unsupported poll event "+i+", defaulting to setTimeout()."),setTimeout(function(){c(0)},t);return}let E=m.map(([D])=>D),S=()=>m.forEach(([,D])=>D()),b=!1;Promise.race(E).then(function(D){b||(b=!0,c(1),clearTimeout(k),S())});let k=setTimeout(function(){b||(b=!0,c(0),S())},t)})}function Yt(r,i,t,a,n){let f=de[a];if(!(i===1&&t===9||i===6&&t===1))return console.warn(`Unsupported socket option: ${i}, ${t}, ${f}`),-1;let m=br.getAllWebSockets(r)[0];return m?(m.setSocketOpt(i,t,a),0):-1}function Gt(r){try{return r()}catch(i){ue(i)}}var be={State:{Normal:0,Unwinding:1,Rewinding:2,Disabled:3},state:0,StackSize:4096,currData:null,handleSleepReturnValue:0,exportCallStack:[],callStackNameToId:{},callStackIdToName:{},callStackId:0,asyncPromiseHandlers:null,sleepCallbacks:[],getCallStackId:function(r){var i=be.callStackNameToId[r];return i===void 0&&(i=be.callStackId++,be.callStackNameToId[r]=i,be.callStackIdToName[i]=r),i},instrumentWasmImports:function(r){var i=["env._dlopen_js","env.invoke_i","env.invoke_ii","env.invoke_iii","env.invoke_iiii","env.invoke_iiiii","env.invoke_iiiiii","env.invoke_iiiiiii","env.invoke_iiiiiiii","env.invoke_iiiiiiiiii","env.invoke_v","env.invoke_vi","env.invoke_vii","env.invoke_viidii","env.invoke_viii","env.invoke_viiii","env.invoke_viiiii","env.invoke_viiiiii","env.invoke_viiiiiii","env.invoke_viiiiiiiii","env.wasm_poll_socket","env.wasm_shutdown","env.emscripten_sleep","env.emscripten_wget","env.emscripten_wget_data","env.emscripten_idb_load","env.emscripten_idb_store","env.emscripten_idb_delete","env.emscripten_idb_exists","env.emscripten_idb_load_blob","env.emscripten_idb_store_blob","env.SDL_Delay","env.emscripten_scan_registers","env.emscripten_lazy_load_code","env.emscripten_fiber_swap","wasi_snapshot_preview1.fd_sync","env.__wasi_fd_sync","env._emval_await","env._dlopen_js","env.__asyncjs__*"].map(a=>a.split(".")[1]);for(var t in r)(function(a){var n=r[a],f=n.sig;if(typeof n=="function")var v=i.indexOf(a)>=0||a.startsWith("__asyncjs__")})(t)},instrumentWasmExports:function(r){var i={};for(var t in r)(function(a){var n=r[a];typeof n=="function"?i[a]=function(){be.exportCallStack.push(a);try{return n.apply(null,arguments)}finally{if(!Ce){var f=be.exportCallStack.pop();Ne(f===a),be.maybeStopUnwind()}}}:i[a]=n})(t);return i},maybeStopUnwind:function(){be.currData&&be.state===be.State.Unwinding&&be.exportCallStack.length===0&&(be.state=be.State.Normal,et(),Gt(Mt),typeof Fibers<"u"&&Fibers.trampoline())},whenDone:function(){return new Promise((r,i)=>{be.asyncPromiseHandlers={resolve:r,reject:i}})},allocateData:function(){var r=bt(12+be.StackSize);return be.setDataHeader(r,r+12,be.StackSize),be.setDataRewindFunc(r),r},setDataHeader:function(r,i,t){h[r>>2]=i,h[r+4>>2]=i+t},setDataRewindFunc:function(r){var i=be.exportCallStack[0],t=be.getCallStackId(i);h[r+8>>2]=t},getDataRewindFunc:function(r){var i=h[r+8>>2],t=be.callStackIdToName[i],a=l.asm[t];return a},doRewind:function(r){var i=be.getDataRewindFunc(r);return jr(),i()},handleSleep:function(r){if(!Ce){if(be.state===be.State.Normal){var i=!1,t=!1;r(a=>{if(!Ce&&(be.handleSleepReturnValue=a||0,i=!0,!!t)){be.state=be.State.Rewinding,Gt(()=>Lt(be.currData)),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.resume();var n,f=!1;try{n=be.doRewind(be.currData)}catch(o){n=o,f=!0}var v=!1;if(!be.currData){var u=be.asyncPromiseHandlers;u&&(be.asyncPromiseHandlers=null,(f?u.reject:u.resolve)(n),v=!0)}if(f&&!v)throw n}}),t=!0,i||(be.state=be.State.Unwinding,be.currData=be.allocateData(),typeof Browser<"u"&&Browser.mainLoop.func&&Browser.mainLoop.pause(),Gt(()=>Rt(be.currData)))}else be.state===be.State.Rewinding?(be.state=be.State.Normal,Gt(Vt),qr(be.currData),be.currData=null,be.sleepCallbacks.forEach(a=>gt(a))):ue("invalid state: "+be.state);return be.handleSleepReturnValue}},handleAsync:function(r){return be.handleSleep(i=>{r().then(i)})}};function X(r){var i=l["_"+r];return i}function Fe(r,i,t,a,n){var f={string:b=>{var k=0;if(b!=null&&b!==0){var D=(b.length<<2)+1;k=Oe(D),Ae(b,k,D)}return k},array:b=>{var k=Oe(b.length);return ht(b,k),k}};function v(b){return i==="string"?ne(b):i==="boolean"?!!b:b}var u=X(r),o=[],c=0;if(a)for(var _=0;_<a.length;_++){var m=f[t[_]];m?(c===0&&(c=gr()),o[_]=m(a[_])):o[_]=a[_]}var p=be.currData,y=u.apply(null,o);function E(b){return jr(),c!==0&&we(c),v(b)}et();var S=n&&n.async;return be.currData!=p?be.whenDone().then(E):(y=E(y),S?Promise.resolve(y):y)}var Xt=function(r,i,t,a){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=e.nextInode++,this.name=i,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=a},ie=365,Gr=146;Object.defineProperties(Xt.prototype,{read:{get:function(){return(this.mode&ie)===ie},set:function(r){r?this.mode|=ie:this.mode&=~ie}},write:{get:function(){return(this.mode&Gr)===Gr},set:function(r){r?this.mode|=Gr:this.mode&=~Gr}},isFolder:{get:function(){return e.isDir(this.mode)}},isDevice:{get:function(){return e.isChrdev(this.mode)}}}),e.FSNode=Xt,e.staticInit(),l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_unlink=e.unlink,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,Z&&(wr(),M.staticInit()),yt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135};var xr={l:Jn,Ta:Qn,Sa:no,Ra:oo,Qa:io,Pa:ao,M:so,Oa:uo,Na:fo,Ma:co,La:lo,Ka:Xr,Ja:_o,L:vo,p:mo,Ia:po,R:ho,Ha:yo,Ga:wo,Fa:Eo,Ea:go,Da:So,K:bo,Ca:ko,Ba:Do,Aa:Oo,za:No,C:To,ya:Co,xa:pe,wa:Fo,va:Ao,ua:Po,J:Ro,ta:Mo,I:Lo,sa:Io,ra:Uo,qa:Bo,H:xo,pa:Ho,la:$r,ka:zo,ja:_n,ia:jo,ha:Yo,ga:qo,fa:Vo,ea:Ko,da:Go,ca:Xo,ba:zr,n:Zo,A:It,aa:Jo,E:Wr,$:Qo,_:ei,Z:xt,oa:Ir,na:Ht,d:Et,u:oi,G:ii,F:si,Q:ui,ma:fi,B:li,D:An,z:Dn,Y:di,X:_i,W:St,V:zt,j:Cn,c:hn,b:Tn,g:Di,h:Ln,t:Ai,U:In,m:cn,T:Ni,y:Fi,P:g,O:w,f:Nn,a:ln,e:pn,i:bn,s:Oi,o:Ci,k:Ti,x:kn,S:je,r:fr,N:Tr,q:Yr,w:jt,v:Yt},ke=Zn(),Te=l.___wasm_call_ctors=function(){return(Te=l.___wasm_call_ctors=l.asm.Va).apply(null,arguments)},an=l._wasm_popen=function(){return(an=l._wasm_popen=l.asm.Wa).apply(null,arguments)},On=l.___errno_location=function(){return(On=l.___errno_location=l.asm.Xa).apply(null,arguments)},sn=l._wasm_pclose=function(){return(sn=l._wasm_pclose=l.asm.Ya).apply(null,arguments)},$t=l._php_pollfd_for=function(){return($t=l._php_pollfd_for=l.asm.Za).apply(null,arguments)},gn=l._wasm_select=function(){return(gn=l._wasm_select=l.asm._a).apply(null,arguments)},Pn=l._wasm_add_cli_arg=function(){return(Pn=l._wasm_add_cli_arg=l.asm.$a).apply(null,arguments)},bt=l._malloc=function(){return(bt=l._malloc=l.asm.ab).apply(null,arguments)},sr=l._run_cli=function(){return(sr=l._run_cli=l.asm.bb).apply(null,arguments)},qr=l._free=function(){return(qr=l._free=l.asm.cb).apply(null,arguments)},Qt=l._ntohs=function(){return(Qt=l._ntohs=l.asm.eb).apply(null,arguments)},er=l._htons=function(){return(er=l._htons=l.asm.fb).apply(null,arguments)},qt=l._fflush=function(){return(qt=l._fflush=l.asm.gb).apply(null,arguments)},Zr=l._wasm_set_phpini_path=function(){return(Zr=l._wasm_set_phpini_path=l.asm.hb).apply(null,arguments)},kr=l._wasm_set_phpini_entries=function(){return(kr=l._wasm_set_phpini_entries=l.asm.ib).apply(null,arguments)},Ur=l._wasm_add_SERVER_entry=function(){return(Ur=l._wasm_add_SERVER_entry=l.asm.jb).apply(null,arguments)},nt=l._wasm_add_uploaded_file=function(){return(nt=l._wasm_add_uploaded_file=l.asm.kb).apply(null,arguments)},Zt=l._wasm_set_query_string=function(){return(Zt=l._wasm_set_query_string=l.asm.lb).apply(null,arguments)},kt=l._wasm_set_path_translated=function(){return(kt=l._wasm_set_path_translated=l.asm.mb).apply(null,arguments)},mn=l._wasm_set_skip_shebang=function(){return(mn=l._wasm_set_skip_shebang=l.asm.nb).apply(null,arguments)},un=l._wasm_set_request_uri=function(){return(un=l._wasm_set_request_uri=l.asm.ob).apply(null,arguments)},fn=l._wasm_set_request_method=function(){return(fn=l._wasm_set_request_method=l.asm.pb).apply(null,arguments)},Sn=l._wasm_set_request_host=function(){return(Sn=l._wasm_set_request_host=l.asm.qb).apply(null,arguments)},vi=l._wasm_set_content_type=function(){return(vi=l._wasm_set_content_type=l.asm.rb).apply(null,arguments)},mi=l._wasm_set_request_body=function(){return(mi=l._wasm_set_request_body=l.asm.sb).apply(null,arguments)},pi=l._wasm_set_content_length=function(){return(pi=l._wasm_set_content_length=l.asm.tb).apply(null,arguments)},hi=l._wasm_set_cookies=function(){return(hi=l._wasm_set_cookies=l.asm.ub).apply(null,arguments)},yi=l._wasm_set_php_code=function(){return(yi=l._wasm_set_php_code=l.asm.vb).apply(null,arguments)},wi=l._wasm_set_request_port=function(){return(wi=l._wasm_set_request_port=l.asm.wb).apply(null,arguments)},Ei=l._phpwasm_init_uploaded_files_hash=function(){return(Ei=l._phpwasm_init_uploaded_files_hash=l.asm.xb).apply(null,arguments)},gi=l._phpwasm_register_uploaded_file=function(){return(gi=l._phpwasm_register_uploaded_file=l.asm.yb).apply(null,arguments)},Si=l._phpwasm_destroy_uploaded_files_hash=function(){return(Si=l._phpwasm_destroy_uploaded_files_hash=l.asm.zb).apply(null,arguments)},bi=l._wasm_sapi_handle_request=function(){return(bi=l._wasm_sapi_handle_request=l.asm.Ab).apply(null,arguments)},ki=l._php_wasm_init=function(){return(ki=l._php_wasm_init=l.asm.Bb).apply(null,arguments)},Rn=l.___funcs_on_exit=function(){return(Rn=l.___funcs_on_exit=l.asm.Cb).apply(null,arguments)},Mn=l._emscripten_builtin_memalign=function(){return(Mn=l._emscripten_builtin_memalign=l.asm.Db).apply(null,arguments)},Sr=l._setThrew=function(){return(Sr=l._setThrew=l.asm.Eb).apply(null,arguments)},gr=l.stackSave=function(){return(gr=l.stackSave=l.asm.Fb).apply(null,arguments)},we=l.stackRestore=function(){return(we=l.stackRestore=l.asm.Gb).apply(null,arguments)},Oe=l.stackAlloc=function(){return(Oe=l.stackAlloc=l.asm.Hb).apply(null,arguments)},ye=l.dynCall_viii=function(){return(ye=l.dynCall_viii=l.asm.Ib).apply(null,arguments)},tr=l.dynCall_vi=function(){return(tr=l.dynCall_vi=l.asm.Jb).apply(null,arguments)},De=l.dynCall_ii=function(){return(De=l.dynCall_ii=l.asm.Kb).apply(null,arguments)},xe=l.dynCall_iii=function(){return(xe=l.dynCall_iii=l.asm.Lb).apply(null,arguments)},Ie=l.dynCall_iiii=function(){return(Ie=l.dynCall_iiii=l.asm.Mb).apply(null,arguments)},ar=l.dynCall_v=function(){return(ar=l.dynCall_v=l.asm.Nb).apply(null,arguments)},Be=l.dynCall_iiiii=function(){return(Be=l.dynCall_iiiii=l.asm.Ob).apply(null,arguments)},He=l.dynCall_iiiiii=function(){return(He=l.dynCall_iiiiii=l.asm.Pb).apply(null,arguments)},ur=l.dynCall_vii=function(){return(ur=l.dynCall_vii=l.asm.Qb).apply(null,arguments)},Qr=l.dynCall_viiii=function(){return(Qr=l.dynCall_viiii=l.asm.Rb).apply(null,arguments)},ot=l.dynCall_iiiiiii=function(){return(ot=l.dynCall_iiiiiii=l.asm.Sb).apply(null,arguments)},it=l.dynCall_i=function(){return(it=l.dynCall_i=l.asm.Tb).apply(null,arguments)},Dt=l.dynCall_viiiii=function(){return(Dt=l.dynCall_viiiii=l.asm.Ub).apply(null,arguments)},Ot=l.dynCall_iiiiiiii=function(){return(Ot=l.dynCall_iiiiiiii=l.asm.Vb).apply(null,arguments)},Nt=l.dynCall_iiiiiiiii=function(){return(Nt=l.dynCall_iiiiiiiii=l.asm.Wb).apply(null,arguments)},Tt=l.dynCall_iiiiiiiiii=function(){return(Tt=l.dynCall_iiiiiiiiii=l.asm.Xb).apply(null,arguments)},Ct=l.dynCall_viiiiiiiii=function(){return(Ct=l.dynCall_viiiiiiiii=l.asm.Yb).apply(null,arguments)},Ft=l.dynCall_viiiiii=function(){return(Ft=l.dynCall_viiiiii=l.asm.Zb).apply(null,arguments)},At=l.dynCall_iiji=function(){return(At=l.dynCall_iiji=l.asm._b).apply(null,arguments)},Pt=l.dynCall_iijiji=function(){return(Pt=l.dynCall_iijiji=l.asm.$b).apply(null,arguments)},Rt=l._asyncify_start_unwind=function(){return(Rt=l._asyncify_start_unwind=l.asm.ac).apply(null,arguments)},Mt=l._asyncify_stop_unwind=function(){return(Mt=l._asyncify_stop_unwind=l.asm.bc).apply(null,arguments)},Lt=l._asyncify_start_rewind=function(){return(Lt=l._asyncify_start_rewind=l.asm.cc).apply(null,arguments)},Vt=l._asyncify_stop_rewind=function(){return(Vt=l._asyncify_stop_rewind=l.asm.dc).apply(null,arguments)};function cn(r,i,t,a,n,f,v,u){var o=gr();try{return Ot(r,i,t,a,n,f,v,u)}catch(c){if(we(o),c!==c+0)throw c;Sr(1,0)}}function ln(r,i){var t=gr();try{tr(r,i)}catch(a){if(we(t),a!==a+0)throw a;Sr(1,0)}}function pn(r,i,t){var a=gr();try{ur(r,i,t)}catch(n){if(we(a),n!==n+0)throw n;Sr(1,0)}}function hn(r,i){var t=gr();try{return De(r,i)}catch(a){if(we(t),a!==a+0)throw a;Sr(1,0)}}function bn(r,i,t,a){var n=gr();try{ye(r,i,t,a)}catch(f){if(we(n),f!==f+0)throw f;Sr(1,0)}}function Nn(r){var i=gr();try{ar(r)}catch(t){if(we(i),t!==t+0)throw t;Sr(1,0)}}function Tn(r,i,t){var a=gr();try{return xe(r,i,t)}catch(n){if(we(a),n!==n+0)throw n;Sr(1,0)}}function Cn(r){var i=gr();try{return it(r)}catch(t){if(we(i),t!==t+0)throw t;Sr(1,0)}}function Ln(r,i,t,a,n){var f=gr();try{return Be(r,i,t,a,n)}catch(v){if(we(f),v!==v+0)throw v;Sr(1,0)}}function Di(r,i,t,a){var n=gr();try{return Ie(r,i,t,a)}catch(f){if(we(n),f!==f+0)throw f;Sr(1,0)}}function Oi(r,i,t,a,n){var f=gr();try{Qr(r,i,t,a,n)}catch(v){if(we(f),v!==v+0)throw v;Sr(1,0)}}function Ni(r,i,t,a,n,f,v,u,o){var c=gr();try{return Nt(r,i,t,a,n,f,v,u,o)}catch(_){if(we(c),_!==_+0)throw _;Sr(1,0)}}function Ti(r,i,t,a,n,f,v){var u=gr();try{Ft(r,i,t,a,n,f,v)}catch(o){if(we(u),o!==o+0)throw o;Sr(1,0)}}function Ci(r,i,t,a,n,f){var v=gr();try{Dt(r,i,t,a,n,f)}catch(u){if(we(v),u!==u+0)throw u;Sr(1,0)}}function Fi(r,i,t,a,n,f,v,u,o,c){var _=gr();try{return Tt(r,i,t,a,n,f,v,u,o,c)}catch(m){if(we(_),m!==m+0)throw m;Sr(1,0)}}function Ai(r,i,t,a,n,f){var v=gr();try{return He(r,i,t,a,n,f)}catch(u){if(we(v),u!==u+0)throw u;Sr(1,0)}}function kn(r,i,t,a,n,f,v,u,o,c){var _=gr();try{Ct(r,i,t,a,n,f,v,u,o,c)}catch(m){if(we(_),m!==m+0)throw m;Sr(1,0)}}function In(r,i,t,a,n,f,v){var u=gr();try{return ot(r,i,t,a,n,f,v)}catch(o){if(we(u),o!==o+0)throw o;Sr(1,0)}}function w(r,i,t,a,n,f,v,u){var o=gr();try{return Pt(r,i,t,a,n,f,v,u)}catch(c){if(we(o),c!==c+0)throw c;Sr(1,0)}}function g(r,i,t,a,n){var f=gr();try{return At(r,i,t,a,n)}catch(v){if(we(f),v!==v+0)throw v;Sr(1,0)}}l.UTF8ToString=ne,l.lengthBytesUTF8=Pe,l.addRunDependency=vr,l.removeRunDependency=Ze,l.FS_createPath=e.createPath,l.FS_createDataFile=e.createDataFile,l.FS_createPreloadedFile=e.createPreloadedFile,l.FS_createLazyFile=e.createLazyFile,l.FS_createDevice=e.createDevice,l.FS_unlink=e.unlink,l.ccall=Fe,l.FS=e;var s;$e=function r(){s||d(),s||($e=r)};function d(r){if(r=r||Y,Re>0||(Wn(),Re>0))return;function i(){s||(s=!0,l.calledRun=!0,!Ce&&(jn(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),qn()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),i()},1)):i()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();return d(),O}var $c,Qu,rf=Ki(()=>{"use strict";$c=10146532,Qu=__dirname+"/php_5_6.wasm"});var sl={};Wi(sl,{LatestSupportedPHPVersion:()=>pa,PHP:()=>_a,PHPBrowser:()=>fa,SupportedPHPVersions:()=>ma,SupportedPHPVersionsList:()=>Ja,getPHPLoaderModule:()=>Es,parseWorkerStartupOptions:()=>Jc,withNetworking:()=>Ss});module.exports=wf(sl);var Za=require("util");var ma=["8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0","5.6"],pa=ma[0],Ja=ma;var fa=class{#e;#r;server;constructor(O,F={}){this.server=O,this.#e={},this.#r={handleRedirects:!1,maxRedirects:4,...F}}async request(O,F=0){let l=await this.server.request({...O,headers:{...O.headers,cookie:this.#o()}});if(l.headers["set-cookie"]&&this.#t(l.headers["set-cookie"]),this.#r.handleRedirects&&l.headers.location&&F<this.#r.maxRedirects){let W=new URL(l.headers.location[0],this.server.absoluteUrl);return this.request({url:W.toString(),method:"GET",headers:{}},F+1)}return l}#t(O){for(let F of O)try{if(!F.includes("="))continue;let l=F.indexOf("="),W=F.substring(0,l),Y=F.substring(l+1).split(";")[0];this.#e[W]=Y}catch(l){console.error(l)}}#o(){let O=[];for(let F in this.#e)O.push(`${F}=${this.#e[F]}`);return O.join("; ")}},Os=fa;var Qa="http://example.com";function Ca(R){return R.toString().substring(R.origin.length)}function Fa(R,O){return!O||!R.startsWith(O)?R:R.substring(O.length)}function es(R,O){return!O||R.startsWith(O)?R:O+R}var ha=class{_running=0;concurrency;queue;constructor({concurrency:O}){this.concurrency=O,this.queue=[]}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency)await new Promise(O=>this.queue.push(O));else return this._running++,()=>{this._running--,this.queue.length>0&&this.queue.shift()()}}};var Yi=class{headers;bytes;errors;exitCode;httpStatusCode;constructor(O,F,l,W="",Y=0){this.httpStatusCode=O,this.headers=F,this.bytes=l,this.exitCode=Y,this.errors=W}static fromRawData(O){return new Yi(O.httpStatusCode,O.headers,O.bytes,O.errors,O.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}};var Aa=class{#e;#r;#t;#o;#i;#n;#a;#s;php;#u;constructor(O,F={}){this.#s=new ha({concurrency:1});let{documentRoot:l="/www/",absoluteUrl:W=typeof location=="object"?location?.href:"",isStaticFilePath:Y=()=>!1}=F;this.php=O,this.#e=l,this.#u=Y;let J=new URL(W);this.#t=J.hostname,this.#o=J.port?Number(J.port):J.protocol==="https:"?443:80,this.#r=(J.protocol||"").replace(":","");let te=this.#o!==443&&this.#o!==80;this.#i=[this.#t,te?`:${this.#o}`:""].join(""),this.#n=J.pathname.replace(/\/+$/,""),this.#a=[`${this.#r}://`,this.#i,this.#n].join("")}pathToInternalUrl(O){return`${this.absoluteUrl}${O}`}internalUrlToPath(O){let F=new URL(O);return F.pathname.startsWith(this.#n)&&(F.pathname=F.pathname.slice(this.#n.length)),Ca(F)}get isRequestRunning(){return this.#s.running>0}get absoluteUrl(){return this.#a}get documentRoot(){return this.#e}async request(O){let F=O.url.startsWith("http://")||O.url.startsWith("https://"),l=new URL(O.url,F?void 0:Qa),W=Fa(l.pathname,this.#n);return this.#u(W)?this.#f(W):await this.#c(O,l)}#f(O){let F=`${this.#e}${O}`;if(!this.php.fileExists(F))return new Yi(404,{},new TextEncoder().encode("404 File not found"));let l=this.php.readFileAsBuffer(F);return new Yi(200,{"content-length":[`${l.byteLength}`],"content-type":[Ef(F)],"accept-ranges":["bytes"],"cache-control":["public, max-age=0"]},l)}async#c(O,F){let l=await this.#s.acquire();try{this.php.addServerGlobalEntry("DOCUMENT_ROOT",this.#e),this.php.addServerGlobalEntry("HTTPS",this.#a.startsWith("https://")?"on":"");let W="GET",Y=[];if(O.files){W="POST";for(let me in O.files){let fe=O.files[me];Y.push({key:me,name:fe.name,type:fe.type,data:new Uint8Array(await fe.arrayBuffer())})}}let J={host:this.#i},te;return O.formData!==void 0?(W="POST",J["content-type"]="application/x-www-form-urlencoded",te=new URLSearchParams(O.formData).toString()):te=O.body,await this.php.run({relativeUri:es(Ca(F),this.#n),protocol:this.#r,method:O.method||W,body:te,fileInfos:Y,scriptPath:this.#l(F.pathname),headers:{...J,...O.headers||{}}})}finally{l()}}#l(O){let F=Fa(O,this.#n);F.includes(".php")?F=F.split(".php")[0]+".php":(F.endsWith("/")||(F+="/"),F.endsWith("index.php")||(F+="index.php"));let l=`${this.#e}${F}`;return this.php.fileExists(l)?l:`${this.#e}/index.php`}};function Ef(R){switch(R.split(".").pop()){case"css":return"text/css";case"js":return"application/javascript";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"gif":return"image/gif";case"svg":return"image/svg+xml";case"woff":return"font/woff";case"woff2":return"font/woff2";case"ttf":return"font/ttf";case"otf":return"font/otf";case"eot":return"font/eot";case"ico":return"image/x-icon";case"html":return"text/html";case"json":return"application/json";case"xml":return"application/xml";case"txt":case"md":return"text/plain";default:return"application-octet-stream"}}var Ns=Aa;var Ts={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function Hi(R=""){return function(F,l,W){let Y=W.value;W.value=function(...J){try{return Y.apply(this,J)}catch(te){let me=typeof te=="object"?te?.errno:null;if(me in Ts){let fe=Ts[me],Z=typeof J[0]=="string"?J[0]:null,ae=Z!==null?R.replaceAll("{path}",Z):R;throw new Error(`${ae}: ${fe}`,{cause:te})}throw te}}}}var bf={};var Ri="string",na="number",Pa=[],gf=function(){return typeof window<"u"&&!bf.env.TEST?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}(),Li=class{#e;#r=[];#t=!1;requestHandler;constructor(O,F){O!==void 0&&this.initializeRuntime(O),F&&(this.requestHandler=new Os(new Ns(this,F)))}initializeRuntime(O){if(this.#e)throw new Error("PHP runtime already initialized.");if(!Pa[O])throw new Error("Invalid PHP runtime id.");this.#e=Pa[O]}setPhpIniPath(O){if(this.#t)throw new Error("Cannot set PHP ini path after calling run().");this.#e.ccall("wasm_set_phpini_path",null,["string"],[O])}setPhpIniEntry(O,F){if(this.#t)throw new Error("Cannot set PHP ini entries after calling run().");this.#r.push([O,F])}chdir(O){this.#e.FS.chdir(O)}async request(O,F){if(!this.requestHandler)throw new Error("No request handler available.");return this.requestHandler.request(O,F)}async run(O={}){this.#t||(this.#o(),this.#t=!0),this.#c(O.scriptPath||""),this.#n(O.relativeUri||""),this.#s(O.method||"GET");let{host:F,...l}={host:"example.com:443",...Sf(O.headers||{})};if(this.#a(F,O.protocol||"http"),this.#u(l),O.body&&this.#f(O.body),O.fileInfos)for(let W of O.fileInfos)this.#l(W);return O.code&&this.#d(" ?>"+O.code),await this.#_()}#o(){if(this.#r.length>0){let O=this.#r.map(([F,l])=>`${F}=${l}`).join(`
|
|
35
35
|
`)+`
|
|
36
36
|
|
|
37
|
-
`;this.#e.ccall("wasm_set_phpini_entries",null,[Ri],[O])}this.#e.ccall("php_wasm_init",null,[],[])}cli(O){for(let F of O)this.#e.ccall("wasm_add_cli_arg",null,[Ri],[F]);return this.#e.ccall("run_cli",null,[],[],{async:!0})}#i(){let O="/tmp/headers.json";if(!this.fileExists(O))throw new Error("SAPI Error: Could not find response headers file.");let F=JSON.parse(this.readFileAsText(O)),l={};for(let W of F.headers){if(!W.includes(": "))continue;let Y=W.indexOf(": "),J=W.substring(0,Y).toLowerCase(),te=W.substring(Y+2);J in l||(l[J]=[]),l[J].push(te)}return{headers:l,httpStatusCode:F.status}}#n(O){if(this.#e.ccall("wasm_set_request_uri",null,[Ri],[O]),O.includes("?")){let F=O.substring(O.indexOf("?")+1);this.#e.ccall("wasm_set_query_string",null,[Ri],[F])}}#a(O,F){this.#e.ccall("wasm_set_request_host",null,[Ri],[O]);let l;try{l=parseInt(new URL(O).port,10)}catch{}(!l||isNaN(l)||l===80)&&(l=F==="https"?443:80),this.#e.ccall("wasm_set_request_port",null,[na],[l]),(F==="https"||!F&&l===443)&&this.addServerGlobalEntry("HTTPS","on")}#s(O){this.#e.ccall("wasm_set_request_method",null,[Ri],[O])}setSkipShebang(O){this.#e.ccall("wasm_set_skip_shebang",null,[na],[O?1:0])}#u(O){O.cookie&&this.#e.ccall("wasm_set_cookies",null,[Ri],[O.cookie]),O["content-type"]&&this.#e.ccall("wasm_set_content_type",null,[Ri],[O["content-type"]]),O["content-length"]&&this.#e.ccall("wasm_set_content_length",null,[na],[parseInt(O["content-length"],10)]);for(let F in O)this.addServerGlobalEntry(`HTTP_${F.toUpperCase().replace(/-/g,"_")}`,O[F])}#f(O){this.#e.ccall("wasm_set_request_body",null,[Ri],[O]),this.#e.ccall("wasm_set_content_length",null,[na],[O.length])}#c(O){this.#e.ccall("wasm_set_path_translated",null,[Ri],[O])}addServerGlobalEntry(O,F){this.#e.ccall("wasm_add_SERVER_entry",null,[Ri,Ri],[O,F])}#l(O){let{key:F,name:l,type:W,data:Y}=O,J=`/tmp/${Math.random().toFixed(20)}`;this.writeFile(J,Y);let te=0;this.#e.ccall("wasm_add_uploaded_file",null,[Ri,Ri,Ri,Ri,na,na],[F,l,W,J,te,Y.byteLength])}#d(O){this.#e.ccall("wasm_set_php_code",null,[Ri],[O])}async#_(){let O=await await this.#e.ccall("wasm_sapi_handle_request",na,[],[]),{headers:F,httpStatusCode:l}=this.#i();return new
|
|
37
|
+
`;this.#e.ccall("wasm_set_phpini_entries",null,[Ri],[O])}this.#e.ccall("php_wasm_init",null,[],[])}cli(O){for(let F of O)this.#e.ccall("wasm_add_cli_arg",null,[Ri],[F]);return this.#e.ccall("run_cli",null,[],[],{async:!0})}#i(){let O="/tmp/headers.json";if(!this.fileExists(O))throw new Error("SAPI Error: Could not find response headers file.");let F=JSON.parse(this.readFileAsText(O)),l={};for(let W of F.headers){if(!W.includes(": "))continue;let Y=W.indexOf(": "),J=W.substring(0,Y).toLowerCase(),te=W.substring(Y+2);J in l||(l[J]=[]),l[J].push(te)}return{headers:l,httpStatusCode:F.status}}#n(O){if(this.#e.ccall("wasm_set_request_uri",null,[Ri],[O]),O.includes("?")){let F=O.substring(O.indexOf("?")+1);this.#e.ccall("wasm_set_query_string",null,[Ri],[F])}}#a(O,F){this.#e.ccall("wasm_set_request_host",null,[Ri],[O]);let l;try{l=parseInt(new URL(O).port,10)}catch{}(!l||isNaN(l)||l===80)&&(l=F==="https"?443:80),this.#e.ccall("wasm_set_request_port",null,[na],[l]),(F==="https"||!F&&l===443)&&this.addServerGlobalEntry("HTTPS","on")}#s(O){this.#e.ccall("wasm_set_request_method",null,[Ri],[O])}setSkipShebang(O){this.#e.ccall("wasm_set_skip_shebang",null,[na],[O?1:0])}#u(O){O.cookie&&this.#e.ccall("wasm_set_cookies",null,[Ri],[O.cookie]),O["content-type"]&&this.#e.ccall("wasm_set_content_type",null,[Ri],[O["content-type"]]),O["content-length"]&&this.#e.ccall("wasm_set_content_length",null,[na],[parseInt(O["content-length"],10)]);for(let F in O)this.addServerGlobalEntry(`HTTP_${F.toUpperCase().replace(/-/g,"_")}`,O[F])}#f(O){this.#e.ccall("wasm_set_request_body",null,[Ri],[O]),this.#e.ccall("wasm_set_content_length",null,[na],[O.length])}#c(O){this.#e.ccall("wasm_set_path_translated",null,[Ri],[O])}addServerGlobalEntry(O,F){this.#e.ccall("wasm_add_SERVER_entry",null,[Ri,Ri],[O,F])}#l(O){let{key:F,name:l,type:W,data:Y}=O,J=`/tmp/${Math.random().toFixed(20)}`;this.writeFile(J,Y);let te=0;this.#e.ccall("wasm_add_uploaded_file",null,[Ri,Ri,Ri,Ri,na,na],[F,l,W,J,te,Y.byteLength])}#d(O){this.#e.ccall("wasm_set_php_code",null,[Ri],[O])}async#_(){let O=await await this.#e.ccall("wasm_sapi_handle_request",na,[],[]),{headers:F,httpStatusCode:l}=this.#i();return new Yi(l,F,this.readFileAsBuffer("/tmp/stdout"),this.readFileAsText("/tmp/stderr"),O)}mkdir(O){this.#e.FS.mkdirTree(O)}mkdirTree(O){this.mkdir(O)}readFileAsText(O){return new TextDecoder().decode(this.readFileAsBuffer(O))}readFileAsBuffer(O){return this.#e.FS.readFile(O)}writeFile(O,F){this.#e.FS.writeFile(O,F)}unlink(O){this.#e.FS.unlink(O)}listFiles(O){if(!this.fileExists(O))return[];try{return this.#e.FS.readdir(O).filter(F=>F!=="."&&F!=="..")}catch(F){return console.error(F,{path:O}),[]}}isDir(O){return this.fileExists(O)?this.#e.FS.isDir(this.#e.FS.lookupPath(O).node.mode):!1}fileExists(O){try{return this.#e.FS.lookupPath(O),!0}catch{return!1}}mount(O,F){this.#e.FS.mount(this.#e.FS.filesystems.NODEFS,typeof O=="object"?O:{root:O},F)}};xi([Hi('Could not create directory "{path}"')],Li.prototype,"mkdir",1),xi([Hi('Could not create directory "{path}"')],Li.prototype,"mkdirTree",1),xi([Hi('Could not read "{path}"')],Li.prototype,"readFileAsText",1),xi([Hi('Could not read "{path}"')],Li.prototype,"readFileAsBuffer",1),xi([Hi('Could not write to "{path}"')],Li.prototype,"writeFile",1),xi([Hi('Could not unlink "{path}"')],Li.prototype,"unlink",1),xi([Hi('Could not list files in "{path}"')],Li.prototype,"listFiles",1),xi([Hi('Could not stat "{path}"')],Li.prototype,"isDir",1),xi([Hi('Could not stat "{path}"')],Li.prototype,"fileExists",1),xi([Hi("Could not mount a directory")],Li.prototype,"mount",1);function Sf(R){let O={};for(let F in R)O[F.toLowerCase()]=R[F];return O}async function rs(R,O={},F=[]){let l,W,Y=new Promise(me=>{W=me}),J=new Promise(me=>{l=me}),te=R.init(gf,{onAbort(me){console.error("WASM aborted: "),console.error(me)},ENV:{},locateFile:me=>me,...O,noInitialRun:!0,onRuntimeInitialized(){O.onRuntimeInitialized&&O.onRuntimeInitialized(),l()},monitorRunDependencies(me){me===0&&(delete te.monitorRunDependencies,W())}});for(let{default:me}of F)me(te);return F.length||W(),await Y,await J,Pa.push(te),Pa.length-1}async function Es(R=pa){switch(R){case"8.2":return await Promise.resolve().then(()=>(Au(),Fu));case"8.1":return await Promise.resolve().then(()=>(Mu(),Ru));case"8.0":return await Promise.resolve().then(()=>(Uu(),Iu));case"7.4":return await Promise.resolve().then(()=>(Hu(),xu));case"7.3":return await Promise.resolve().then(()=>(ju(),Wu));case"7.2":return await Promise.resolve().then(()=>(Vu(),qu));case"7.1":return await Promise.resolve().then(()=>(Xu(),Gu));case"7.0":return await Promise.resolve().then(()=>(Ju(),Zu));case"5.6":return await Promise.resolve().then(()=>(rf(),ef))}throw new Error(`Unsupported PHP version ${R}`)}function Jc(){return JSON.parse(process.env.WORKER_OPTIONS||"{}")}var of=ji(require("dns")),af=ji(require("util")),Xa=ji(require("net")),sf=ji(require("http"));var Qc=ji(hs(),1),el=ji(xa(),1),rl=ji(Ha(),1),Ka=ji(qa(),1),gs=ji(ws(),1);var tf=ji(require("net"));function Ga(...R){process.env.DEV&&!process.env.TEST&&console.log(...R)}async function nf(R){let O=[];for(let W=0;W<R;W++)O.push(tl());let F=await Promise.all(O),l=[];for(let W of F){let Y=W.address();l.push(Y.port),W.close()}return l}function tl(){return new Promise(R=>{let O=tf.createServer();O.listen(0,()=>{R(O)})})}function uf(...R){Ga("[WS Server]",...R)}var nl=af.promisify(of.lookup);function ol(R,O){if(typeof R=="string")R=String.fromCharCode(O)+R;else if(R instanceof ArrayBuffer||"byteLength"in R){let F=new Uint8Array(R.byteLength+1);F[0]=O,F.set(new Uint8Array(R),1),R=F.buffer}else throw console.log({chunk:R}),new Error("Unsupported chunk type: "+typeof R);return R}var ff=1,cf=2;function lf(R){return class extends R{send(F,l){return this.sendCommand(ff,F,l)}setSocketOpt(F,l,W){return this.sendCommand(cf,new Uint8Array([F,l,W]).buffer,()=>{})}sendCommand(F,l,W){return R.prototype.send.call(this,ol(l,F),W)}}}function df(R,O="127.0.0.1"){uf(`Binding the WebSockets server to ${O}:${R}...`);let F=sf.createServer((l,W)=>{W.writeHead(403,{"Content-Type":"text/plain"}),W.write(`403 Permission Denied
|
|
38
38
|
Only websockets are allowed here.
|
|
39
|
-
`),W.end()});return new Promise(l=>{F.listen(R,O,function(){new gs.default({server:F}).on("connection",il),l(F)})})}async function il(R,O){let F=R._socket.remoteAddress,l=function(...ae){uf(" "+F+": ",...ae)};l("WebSocket connection from : "+F+" at URL "+(O?O.url:R.upgradeReq.url)),l("Version "+R.protocolVersion+", subprotocol: "+R.protocol);let W=new URL("ws://0.0.0.0"+O.url),Y=Number(W.searchParams.get("port")),J=W.searchParams.get("host");if(!Y||!J){l("Missing host or port information"),R.close(3e3);return}let te,me=[];function fe(){for(;me.length>0;){let ae=me.pop(),cr=ae[0];l("flushing",{commandType:cr},ae),cr===ff?te.write(ae.slice(1)):cr===cf?ae[1]===1&&ae[2]===9?te.setKeepAlive(ae[3]):ae[1]===6&&ae[2]===1&&te.setNoDelay(ae[3]):(l("Unknown command type: "+cr),process.exit())}}R.on("message",function(ae){me.unshift(ae),te&&fe()}),R.on("close",function(ae,cr){l("WebSocket client disconnected: "+ae+" ["+cr+"]"),te.end()}),R.on("error",function(ae){l("WebSocket client error: "+ae),te.end()});let Z;Xa.isIP(J)===0?(l("resolving "+J+"... "),Z=(await nl(J)).address,l("resolved "+J+" -> "+Z)):Z=J,l("Opening a socket connection to "+Z+":"+Y),te=Xa.createConnection(Y,Z,function(){l("Connected to target"),fe()}),te.on("data",function(ae){try{R.send(ae)}catch{l("Client closed, cleaning up target"),te.end()}}),te.on("end",function(){l("target disconnected"),R.close()}),te.on("error",function(ae){l("target connection error",ae),te.end(),R.close(3e3)})}var _f=require("net");function sa(...R){Ga("[TCP Server]",...R)}function vf(R,O){return class extends O{constructor(l,W){let Y=l.port;l.port=R,al({tcpListenPort:Y,wsConnectPort:R}),super(l,W)}}}function al(R){R={wsConnectHost:"127.0.0.1",...R};let{tcpListenPort:O,wsConnectHost:F,wsConnectPort:l}=R,W=(0,_f.createServer)();W.on("connection",function(J){let te=[],me=new Ka.default(`ws://${F}:${l}/`);me.binaryType="arraybuffer";function fe(Z){me.send(new Uint8Array(Z))}me.addEventListener("open",function(){for(sa("Outbound WebSocket connection established");te.length>0;)fe(te.shift())}),me.addEventListener("message",Z=>{sa("WS->TCP message:",new TextDecoder().decode(Z.data)),J.write(Buffer.from(Z.data))}),me.addEventListener("close",()=>{sa("WebSocket connection closed"),J.end()}),J.on("data",function(Z){if(sa("TCP->WS message:",Z),me.readyState===Ka.default.OPEN){for(;te.length>0;)fe(te.shift());fe(Z)}else te.push(Z)}),J.once("close",function(){sa("TCP connection closed"),me.close()}),J.on("error",function(){sa("TCP connection error"),me.close()})}),W.listen(O,function(){sa("TCP server listening")})}async function Ss(R={}){let[O,F]=await nf(2);return await df(F),{...R,websocket:{...R.websocket||{},url:(l,W,Y)=>{let J=new URLSearchParams({host:W,port:Y}).toString();return`ws://127.0.0.1:${F}/?${J}`},subprotocol:"binary",decorator:lf,serverDecorator:vf.bind(null,O)}}}var $a=require("node:fs");var _a=class extends
|
|
39
|
+
`),W.end()});return new Promise(l=>{F.listen(R,O,function(){new gs.default({server:F}).on("connection",il),l(F)})})}async function il(R,O){let F=R._socket.remoteAddress,l=function(...ae){uf(" "+F+": ",...ae)};l("WebSocket connection from : "+F+" at URL "+(O?O.url:R.upgradeReq.url)),l("Version "+R.protocolVersion+", subprotocol: "+R.protocol);let W=new URL("ws://0.0.0.0"+O.url),Y=Number(W.searchParams.get("port")),J=W.searchParams.get("host");if(!Y||!J){l("Missing host or port information"),R.close(3e3);return}let te,me=[];function fe(){for(;me.length>0;){let ae=me.pop(),cr=ae[0];l("flushing",{commandType:cr},ae),cr===ff?te.write(ae.slice(1)):cr===cf?ae[1]===1&&ae[2]===9?te.setKeepAlive(ae[3]):ae[1]===6&&ae[2]===1&&te.setNoDelay(ae[3]):(l("Unknown command type: "+cr),process.exit())}}R.on("message",function(ae){me.unshift(ae),te&&fe()}),R.on("close",function(ae,cr){l("WebSocket client disconnected: "+ae+" ["+cr+"]"),te.end()}),R.on("error",function(ae){l("WebSocket client error: "+ae),te.end()});let Z;Xa.isIP(J)===0?(l("resolving "+J+"... "),Z=(await nl(J)).address,l("resolved "+J+" -> "+Z)):Z=J,l("Opening a socket connection to "+Z+":"+Y),te=Xa.createConnection(Y,Z,function(){l("Connected to target"),fe()}),te.on("data",function(ae){try{R.send(ae)}catch{l("Client closed, cleaning up target"),te.end()}}),te.on("end",function(){l("target disconnected"),R.close()}),te.on("error",function(ae){l("target connection error",ae),te.end(),R.close(3e3)})}var _f=require("net");function sa(...R){Ga("[TCP Server]",...R)}function vf(R,O){return class extends O{constructor(l,W){let Y=l.port;l.port=R,al({tcpListenPort:Y,wsConnectPort:R}),super(l,W)}}}function al(R){R={wsConnectHost:"127.0.0.1",...R};let{tcpListenPort:O,wsConnectHost:F,wsConnectPort:l}=R,W=(0,_f.createServer)();W.on("connection",function(J){let te=[],me=new Ka.default(`ws://${F}:${l}/`);me.binaryType="arraybuffer";function fe(Z){me.send(new Uint8Array(Z))}me.addEventListener("open",function(){for(sa("Outbound WebSocket connection established");te.length>0;)fe(te.shift())}),me.addEventListener("message",Z=>{sa("WS->TCP message:",new TextDecoder().decode(Z.data)),J.write(Buffer.from(Z.data))}),me.addEventListener("close",()=>{sa("WebSocket connection closed"),J.end()}),J.on("data",function(Z){if(sa("TCP->WS message:",Z),me.readyState===Ka.default.OPEN){for(;te.length>0;)fe(te.shift());fe(Z)}else te.push(Z)}),J.once("close",function(){sa("TCP connection closed"),me.close()}),J.on("error",function(){sa("TCP connection error"),me.close()})}),W.listen(O,function(){sa("TCP server listening")})}async function Ss(R={}){let[O,F]=await nf(2);return await df(F),{...R,websocket:{...R.websocket||{},url:(l,W,Y)=>{let J=new URLSearchParams({host:W,port:Y}).toString();return`ws://127.0.0.1:${F}/?${J}`},subprotocol:"binary",decorator:lf,serverDecorator:vf.bind(null,O)}}}var $a=require("node:fs");var _a=class extends Li{static async load(O,F={}){return await _a.loadSync(O,F).phpReady}static loadSync(O,F={}){let l=new _a(void 0,F.requestHandler),Y=(async()=>{let J=await Es(O),te=F.emscriptenOptions||{};te=await Ss(te);let me=await rs(J,te);l.initializeRuntime(me)})();return{php:l,phpReady:Y.then(()=>l)}}useHostFilesystem(){let O=(0,$a.readdirSync)("/").map(F=>`/${F}`).filter(F=>(0,$a.lstatSync)(F).isDirectory());for(let F of O)this.fileExists(F)||this.mkdirTree(F),this.mount({root:F},F);this.chdir(process.cwd())}};global.TextEncoder=Za.TextEncoder;global.TextDecoder=Za.TextDecoder;0&&(module.exports={LatestSupportedPHPVersion,PHP,PHPBrowser,SupportedPHPVersions,SupportedPHPVersionsList,getPHPLoaderModule,parseWorkerStartupOptions,withNetworking});
|