mirror of
https://github.com/mistakes-23/frontend.git
synced 2025-08-02 02:40:12 +03:00
1 line
213 KiB
JavaScript
1 line
213 KiB
JavaScript
var __dotnet_runtime=function(e){"use strict";let t,r,n,o,i,s,a,c;const l={},u={};let _;function f(e,l){r=l.internal,n=l.marshaled_imports,t=l.module,d(e),o=e.isNode,i=e.isShell,s=e.isWeb,a=e.isWorker,c=e.isPThread,m.quit=e.quit_,m.ExitStatus=e.ExitStatus,m.requirePromise=e.requirePromise}function d(e){o=e.isNode,i=e.isShell,s=e.isWeb,a=e.isWorker,c=e.isPThread}const m={javaScriptExports:{},mono_wasm_load_runtime_done:!1,mono_wasm_bindings_is_ready:!1,maxParallelDownloads:16,config:{environmentVariables:{}},diagnosticTracing:!1},p=-1;function w(e){return null==e}const h=[[!0,"mono_wasm_register_root","number",["number","number","string"]],[!0,"mono_wasm_deregister_root",null,["number"]],[!0,"mono_wasm_string_get_data",null,["number","number","number","number"]],[!0,"mono_wasm_string_get_data_ref",null,["number","number","number","number"]],[!0,"mono_wasm_set_is_debugger_attached","void",["bool"]],[!0,"mono_wasm_send_dbg_command","bool",["number","number","number","number","number"]],[!0,"mono_wasm_send_dbg_command_with_parms","bool",["number","number","number","number","number","number","string"]],[!0,"mono_wasm_setenv",null,["string","string"]],[!0,"mono_wasm_parse_runtime_options",null,["number","number"]],[!0,"mono_wasm_strdup","number",["string"]],[!0,"mono_background_exec",null,[]],[!0,"mono_set_timeout_exec",null,[]],[!0,"mono_wasm_load_icu_data","number",["number"]],[!0,"mono_wasm_get_icudt_name","string",["string"]],[!1,"mono_wasm_add_assembly","number",["string","number","number"]],[!0,"mono_wasm_add_satellite_assembly","void",["string","string","number","number"]],[!1,"mono_wasm_load_runtime",null,["string","number"]],[!0,"mono_wasm_change_debugger_log_level","void",["number"]],[!0,"mono_wasm_get_corlib","number",[]],[!0,"mono_wasm_assembly_load","number",["string"]],[!0,"mono_wasm_find_corlib_class","number",["string","string"]],[!0,"mono_wasm_assembly_find_class","number",["number","string","string"]],[!0,"mono_wasm_runtime_run_module_cctor","void",["number"]],[!0,"mono_wasm_find_corlib_type","number",["string","string"]],[!0,"mono_wasm_assembly_find_type","number",["number","string","string"]],[!0,"mono_wasm_assembly_find_method","number",["number","string","number"]],[!0,"mono_wasm_invoke_method","number",["number","number","number","number"]],[!1,"mono_wasm_invoke_method_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_string_get_utf8","number",["number"]],[!0,"mono_wasm_string_from_utf16_ref","void",["number","number","number"]],[!0,"mono_wasm_get_obj_type","number",["number"]],[!0,"mono_wasm_array_length","number",["number"]],[!0,"mono_wasm_array_get","number",["number","number"]],[!0,"mono_wasm_array_get_ref","void",["number","number","number"]],[!1,"mono_wasm_obj_array_new","number",["number"]],[!1,"mono_wasm_obj_array_new_ref","void",["number","number"]],[!1,"mono_wasm_obj_array_set","void",["number","number","number"]],[!1,"mono_wasm_obj_array_set_ref","void",["number","number","number"]],[!0,"mono_wasm_register_bundled_satellite_assemblies","void",[]],[!1,"mono_wasm_try_unbox_primitive_and_get_type_ref","number",["number","number","number"]],[!0,"mono_wasm_box_primitive_ref","void",["number","number","number","number"]],[!0,"mono_wasm_intern_string_ref","void",["number"]],[!0,"mono_wasm_assembly_get_entry_point","number",["number"]],[!0,"mono_wasm_get_delegate_invoke_ref","number",["number"]],[!0,"mono_wasm_string_array_new_ref","void",["number","number"]],[!0,"mono_wasm_typed_array_new_ref","void",["number","number","number","number","number"]],[!0,"mono_wasm_class_get_type","number",["number"]],[!0,"mono_wasm_type_get_class","number",["number"]],[!0,"mono_wasm_get_type_name","string",["number"]],[!0,"mono_wasm_get_type_aqn","string",["number"]],[!0,"mono_wasm_event_pipe_enable","bool",["string","number","number","string","bool","number"]],[!0,"mono_wasm_event_pipe_session_start_streaming","bool",["number"]],[!0,"mono_wasm_event_pipe_session_disable","bool",["number"]],[!0,"mono_wasm_diagnostic_server_create_thread","bool",["string","number"]],[!0,"mono_wasm_diagnostic_server_thread_attach_to_runtime","void",[]],[!0,"mono_wasm_diagnostic_server_post_resume_runtime","void",[]],[!0,"mono_wasm_diagnostic_server_create_stream","number",[]],[!0,"mono_wasm_string_from_js","number",["string"]],[!1,"mono_wasm_exit","void",["number"]],[!0,"mono_wasm_getenv","number",["string"]],[!0,"mono_wasm_set_main_args","void",["number","number"]],[!1,"mono_wasm_enable_on_demand_gc","void",["number"]],[!1,"mono_profiler_init_aot","void",["number"]],[!1,"mono_wasm_exec_regression","number",["number","string"]],[!1,"mono_wasm_invoke_method_bound","number",["number","number"]],[!0,"mono_wasm_write_managed_pointer_unsafe","void",["number","number"]],[!0,"mono_wasm_copy_managed_pointer","void",["number","number"]],[!0,"mono_wasm_i52_to_f64","number",["number","number"]],[!0,"mono_wasm_u52_to_f64","number",["number","number"]],[!0,"mono_wasm_f64_to_i52","number",["number","number"]],[!0,"mono_wasm_f64_to_u52","number",["number","number"]]],g={};function y(e,t,r){const n=function(e,t,r){let n,o="number"==typeof t?t:0;n="number"==typeof r?o+r:e.length-o;const i={read:function(){if(o>=n)return null;const t=e[o];return o+=1,t}};return Object.defineProperty(i,"eof",{get:function(){return o>=n},configurable:!0,enumerable:!0}),i}(e,t,r);let o="",i=0,s=0,a=0,c=0,l=0,u=0;for(;i=n.read(),s=n.read(),a=n.read(),null!==i;)null===s&&(s=0,l+=1),null===a&&(a=0,l+=1),u=i<<16|s<<8|a<<0,c=(16777215&u)>>18,o+=b[c],c=(262143&u)>>12,o+=b[c],l<2&&(c=(4095&u)>>6,o+=b[c]),2===l?o+="==":1===l?o+="=":(c=(63&u)>>0,o+=b[c]);return o}const b=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];const v=new Map;v.remove=function(e){const t=this.get(e);return this.delete(e),t};let E,k,A,S={},j=0,x=-1;function O(){r.mono_wasm_runtime_is_ready=m.mono_wasm_runtime_is_ready=!0,j=0,S={},x=-1,globalThis.dotnetDebugger||console.debug("mono_wasm_runtime_ready","fe00e07a-5519-4dfe-b35a-f867dbaf2e28")}function N(){}function D(e,r,n,o){const i={res_ok:e,res:{id:r,value:y(new Uint8Array(t.HEAPU8.buffer,n,o))}};v.has(r)&&console.warn(`MONO_WASM: Adding an id (${r}) that already exists in commands_received`),v.set(r,i)}function M(e){e.length>x&&(E&&t._free(E),x=Math.max(e.length,x,256),E=t._malloc(x));const r=atob(e);for(let e=0;e<r.length;e++)t.HEAPU8[E+e]=r.charCodeAt(e)}function T(e,t,r,n,o,i,s){M(n),g.mono_wasm_send_dbg_command_with_parms(e,t,r,E,o,i,s.toString());const{res_ok:a,res:c}=v.remove(e);if(!a)throw new Error("Failed on mono_wasm_invoke_method_debugger_agent_with_parms");return c}function R(e,t,r,n){M(n),g.mono_wasm_send_dbg_command(e,t,r,E,n.length);const{res_ok:o,res:i}=v.remove(e);if(!o)throw new Error("Failed on mono_wasm_send_dbg_command");return i}function C(){const{res_ok:e,res:t}=v.remove(0);if(!e)throw new Error("Failed on mono_wasm_get_dbg_command_info");return t}function I(){}function $(){g.mono_wasm_set_is_debugger_attached(!1)}function P(e){g.mono_wasm_change_debugger_log_level(e)}function F(e,t={}){if("object"!=typeof e)throw new Error(`event must be an object, but got ${JSON.stringify(e)}`);if(void 0===e.eventName)throw new Error(`event.eventName is a required parameter, in event: ${JSON.stringify(e)}`);if("object"!=typeof t)throw new Error(`args must be an object, but got ${JSON.stringify(t)}`);console.debug("mono_wasm_debug_event_raised:aef14bca-5519-4dfe-b35a-f867abc123ae",JSON.stringify(e),JSON.stringify(t))}function U(){-1==m.waitForDebugger&&(m.waitForDebugger=1),g.mono_wasm_set_is_debugger_attached(!0)}function B(e,r){k=t.UTF8ToString(e).concat(".dll"),A=r,console.assert(!0,`Adding an entrypoint breakpoint ${k} at method token ${A}`)}function W(e){if(null!=e.arguments&&!Array.isArray(e.arguments))throw new Error(`"arguments" should be an array, but was ${e.arguments}`);const t=e.objectId,r=e.details;let n={};if(t.startsWith("dotnet:cfo_res:")){if(!(t in S))throw new Error(`Unknown object id ${t}`);n=S[t]}else n=function(e,t){if(e.startsWith("dotnet:array:")){let e;if(void 0===t.items)return e=t.map((e=>e.value)),e;if(void 0===t.dimensionsDetails||1===t.dimensionsDetails.length)return e=t.items.map((e=>e.value)),e}const r={};return Object.keys(t).forEach((e=>{const n=t[e];void 0!==n.get?Object.defineProperty(r,n.name,{get:()=>R(n.get.id,n.get.commandSet,n.get.command,n.get.buffer),set:function(e){return T(n.set.id,n.set.commandSet,n.set.command,n.set.buffer,n.set.length,n.set.valtype,e),!0}}):void 0!==n.set?Object.defineProperty(r,n.name,{get:()=>n.value,set:function(e){return T(n.set.id,n.set.commandSet,n.set.command,n.set.buffer,n.set.length,n.set.valtype,e),!0}}):r[n.name]=n.value})),r}(t,r);const o=null!=e.arguments?e.arguments.map((e=>JSON.stringify(e.value))):[],i=`const fn = ${e.functionDeclaration}; return fn.apply(proxy, [${o}]);`,s=new Function("proxy",i)(n);if(void 0===s)return{type:"undefined"};if(Object(s)!==s)return"object"==typeof s&&null==s?{type:typeof s,subtype:`${s}`,value:null}:{type:typeof s,description:`${s}`,value:`${s}`};if(e.returnByValue&&null==s.subtype)return{type:"object",value:s};if(Object.getPrototypeOf(s)==Array.prototype){const e=L(s);return{type:"object",subtype:"array",className:"Array",description:`Array(${s.length})`,objectId:e}}if(void 0!==s.value||void 0!==s.subtype)return s;if(s==n)return{type:"object",className:"Object",description:"Object",objectId:t};return{type:"object",className:"Object",description:"Object",objectId:L(s)}}function z(e,t={}){return function(e,t){if(!(e in S))throw new Error(`Could not find any object with id ${e}`);const r=S[e],n=Object.getOwnPropertyDescriptors(r);t.accessorPropertiesOnly&&Object.keys(n).forEach((e=>{void 0===n[e].get&&Reflect.deleteProperty(n,e)}));const o=[];return Object.keys(n).forEach((e=>{let t;const r=n[e];t="object"==typeof r.value?Object.assign({name:e},r):void 0!==r.value?{name:e,value:Object.assign({type:typeof r.value,description:""+r.value},r)}:void 0!==r.get?{name:e,get:{className:"Function",description:`get ${e} () {}`,type:"function"}}:{name:e,value:{type:"symbol",value:"<Unknown>",description:"<Unknown>"}},o.push(t)})),{__value_as_json_string__:JSON.stringify(o)}}(`dotnet:cfo_res:${e}`,t)}function L(e){const t="dotnet:cfo_res:"+j++;return S[t]=e,t}function H(e){e in S&&delete S[e]}function V(e,n){const o=t.UTF8ToString(n);r.logging&&"function"==typeof r.logging.debugger&&r.logging.debugger(e,o)}let q=0;function J(e){const t=1===g.mono_wasm_load_icu_data(e);return t&&q++,t}function G(e){return g.mono_wasm_get_icudt_name(e)}function Y(){const e=m.config;let r=!1;if(e.globalizationMode||(e.globalizationMode="auto"),"invariant"===e.globalizationMode&&(r=!0),!r)if(q>0)m.diagnosticTracing&&console.debug("MONO_WASM: ICU data archive(s) loaded, disabling invariant mode");else{if("icu"===e.globalizationMode){const e="invariant globalization mode is inactive and no ICU data archives were loaded";throw t.printErr(`MONO_WASM: ERROR: ${e}`),new Error(e)}m.diagnosticTracing&&console.debug("MONO_WASM: ICU data archive(s) not loaded, using invariant globalization mode"),r=!0}r&&g.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_INVARIANT","1"),g.mono_wasm_setenv("DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLY","1")}function X(e){null==e&&(e={}),"writeAt"in e||(e.writeAt="System.Runtime.InteropServices.JavaScript.JavaScriptExports::StopProfile"),"sendTo"in e||(e.sendTo="Interop/Runtime::DumpAotProfileData");const r="aot:write-at-method="+e.writeAt+",send-to-method="+e.sendTo;t.ccall("mono_wasm_load_profiler_aot",null,["string"],[r])}function Z(e){null==e&&(e={}),"writeAt"in e||(e.writeAt="WebAssembly.Runtime::StopProfile"),"sendTo"in e||(e.sendTo="WebAssembly.Runtime::DumpCoverageProfileData");const r="coverage:write-at-method="+e.writeAt+",send-to-method="+e.sendTo;t.ccall("mono_wasm_load_profiler_coverage",null,["string"],[r])}const K=new Map,Q=new Map;let ee=0;function te(e){if(K.has(e))return K.get(e);const t=g.mono_wasm_assembly_load(e);return K.set(e,t),t}function re(e,t,r){ee||(ee=g.mono_wasm_get_corlib());let n=function(e,t,r){let n=Q.get(e);n||Q.set(e,n=new Map);let o=n.get(t);return o||(o=new Map,n.set(t,o)),o.get(r)}(ee,e,t);if(void 0!==n)return n;if(n=g.mono_wasm_assembly_find_class(ee,e,t),r&&!n)throw new Error(`Failed to find corlib class ${e}.${t}`);return function(e,t,r,n){const o=Q.get(e);if(!o)throw new Error("internal error");const i=o.get(t);if(!i)throw new Error("internal error");i.set(r,n)}(ee,e,t,n),n}const ne=new Map,oe=[];function ie(e){try{if(0==ne.size)return e;const t=e;for(let r=0;r<oe.length;r++){const n=e.replace(new RegExp(oe[r],"g"),((e,...t)=>{const r=t.find((e=>"object"==typeof e&&void 0!==e.replaceSection));if(void 0===r)return e;const n=r.funcNum,o=r.replaceSection,i=ne.get(Number(n));return void 0===i?e:e.replace(o,`${i} (${o})`)}));if(n!==t)return n}return t}catch(t){return console.debug(`MONO_WASM: failed to symbolicate: ${t}`),e}}function se(e){let t=e;return t instanceof Error||(t=new Error(t)),ie(t.stack)}function ae(e,n,o,i,s){const a=t.UTF8ToString(o),c=!!i,l=t.UTF8ToString(e),u=s,_=t.UTF8ToString(n),f=`[MONO] ${a}`;if(r.logging&&"function"==typeof r.logging.trace)r.logging.trace(l,_,f,c,u);else switch(_){case"critical":case"error":console.error(se(f));break;case"warning":console.warn(f);break;case"message":default:console.log(f);break;case"info":console.info(f);break;case"debug":console.debug(f)}}let ce;function le(e){if(!m.mono_wasm_symbols_are_ready){m.mono_wasm_symbols_are_ready=!0;try{t.FS_readFile(e,{flags:"r",encoding:"utf8"}).split(/[\r\n]/).forEach((e=>{const t=e.split(/:/);t.length<2||(t[1]=t.splice(1).join(":"),ne.set(Number(t[0]),t[1]))}))}catch(t){return void(44==t.errno||console.log(`MONO_WASM: Error loading symbol file ${e}: ${JSON.stringify(t)}`))}}}async function ue(e,t){try{const r=await _e(e,t);return me(r),r}catch(e){return e instanceof m.ExitStatus?e.status:(me(1,e),1)}}async function _e(e,r){(function(e,r){const n=r.length+1,o=t._malloc(4*n);let i=0;t.setValue(o+4*i,g.mono_wasm_strdup(e),"i32"),i+=1;for(let e=0;e<r.length;++e)t.setValue(o+4*i,g.mono_wasm_strdup(r[e]),"i32"),i+=1;g.mono_wasm_set_main_args(n,o)})(e,r),-1==m.waitForDebugger&&(console.log("MONO_WASM: waiting for debugger..."),await new Promise((e=>{const t=setInterval((()=>{1==m.waitForDebugger&&(clearInterval(t),e())}),100)})));const n=fe(e);return m.javaScriptExports.call_entry_point(n,r)}function fe(e){if(!m.mono_wasm_bindings_is_ready)throw new Error("Assert failed: The runtime must be initialized.");const t=te(e);if(!t)throw new Error("Could not find assembly: "+e);let r=0;1==m.waitForDebugger&&(r=1);const n=g.mono_wasm_assembly_get_entry_point(t,r);if(!n)throw new Error("Could not find entry point for assembly: "+e);return n}function de(e){Ms(e,!1),me(1,e)}function me(e,t){if(m.config.asyncFlushOnExit&&0===e)throw(async()=>{try{await async function(){try{const e=await import("process"),t=e=>new Promise(((t,r)=>{e.on("error",(e=>r(e))),e.write("",(function(){t()}))})),r=t(e.stderr),n=t(e.stdout);await Promise.all([n,r])}catch(e){console.error(`flushing std* streams failed: ${e}`)}}()}finally{pe(e,t)}})(),m.ExitStatus?new m.ExitStatus(e):t||new Error("Stop with exit code "+e);pe(e,t)}function pe(e,n){if(m.ExitStatus&&(!n||n instanceof m.ExitStatus?n=new m.ExitStatus(e):n instanceof Error?t.printErr(r.mono_wasm_stringify_as_error_with_stack(n)):"string"==typeof n?t.printErr(n):t.printErr(JSON.stringify(n))),function(e,t){if(m.config.logExitCode)if(0!=e&&t&&(t instanceof Error?console.error(se(t)):"string"==typeof t?console.error(t):console.error(JSON.stringify(t))),ce){const t=()=>{0==ce.bufferedAmount?console.log("WASM EXIT "+e):setTimeout(t,100)};t()}else console.log("WASM EXIT "+e)}(e,n),function(e){if(s&&m.config.appendElementOnExit){const t=document.createElement("label");t.id="tests_done",e&&(t.style.background="red"),t.innerHTML=e.toString(),document.body.appendChild(t)}}(e),0!==e||!s){if(!m.quit)throw n;m.quit(e,n)}}oe.push(/at (?<replaceSection>[^:()]+:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)((?![^)a-fA-F\d])|$)/),oe.push(/(?:WASM \[[\da-zA-Z]+\], (?<replaceSection>function #(?<funcNum>[\d]+) \(''\)))/),oe.push(/(?<replaceSection>[a-z]+:\/\/[^ )]*:wasm-function\[(?<funcNum>\d+)\]:0x[a-fA-F\d]+)/),oe.push(/(?<replaceSection><[^ >]+>[.:]wasm-function\[(?<funcNum>[0-9]+)\])/);const we="function"==typeof globalThis.WeakRef;function he(e){return we?new WeakRef(e):{deref:()=>e}}const ge="function"==typeof globalThis.FinalizationRegistry;let ye;const be=[],ve=[];let Ee=1;const ke=new Map;ge&&(ye=new globalThis.FinalizationRegistry((function(e){De(null,e)})));const Ae=Symbol.for("wasm js_owned_gc_handle"),Se=Symbol.for("wasm cs_owned_js_handle");function je(e){return 0!==e&&-1!==e?be[e]:null}function xe(e){if(e[Se])return e[Se];const t=ve.length?ve.pop():Ee++;return be[t]=e,Object.isExtensible(e)&&(e[Se]=t),t}function Oe(e){const t=be[e];if(null!=t){if(globalThis===t)return;void 0!==t[Se]&&(t[Se]=void 0),be[e]=void 0,ve.push(e)}}function Ne(e,t){e[Ae]=t,ge&&ye.register(e,t,e);const r=he(e);ke.set(t,r)}function De(e,t){e&&(t=e[Ae],e[Ae]=0,ge&&ye.unregister(e)),0!==t&&ke.delete(t)&&m.javaScriptExports.release_js_owned_object_by_gc_handle(t)}function Me(e){const t=e[Ae];if(0==t)throw new Error("Assert failed: ObjectDisposedException");return t}function Te(e){if(!e)return null;const t=ke.get(e);return t?t.deref():null}const Re=Symbol.for("wasm promise_control");function Ce(e,t){let r=null;const n=new Promise((function(n,o){r={isDone:!1,promise:null,resolve:t=>{r.isDone||(r.isDone=!0,n(t),e&&e())},reject:e=>{r.isDone||(r.isDone=!0,o(e),t&&t())}}}));r.promise=n;const o=n;return o[Re]=r,{promise:o,promise_control:r}}function Ie(e){return e[Re]}function $e(e){if(!function(e){return void 0!==e[Re]}(e))throw new Error("Assert failed: Promise is not controllable")}const Pe=("object"==typeof Promise||"function"==typeof Promise)&&"function"==typeof Promise.resolve;function Fe(e){return Promise.resolve(e)===e||("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}function Ue(e){const{promise:t,promise_control:r}=Ce();return e().then((e=>r.resolve(e))).catch((e=>r.reject(e))),t}function Be(e){const t=Te(e);if(!t)return;const r=t.promise;if(!r)throw new Error(`Assert failed: Expected Promise for GCHandle ${e}`);$e(r);Ie(r).reject("OperationCanceledException")}const We=[];let ze,Le,He=null;const Ve="undefined"!=typeof BigInt&&"undefined"!=typeof BigInt64Array;function qe(){ze||(ze=t._malloc(32768),Le=ze),We.push(Le)}function Je(e,t,r){if(!Number.isSafeInteger(e))throw new Error(`Assert failed: Value is not an integer: ${e} (${typeof e})`);if(!(e>=t&&e<=r))throw new Error(`Assert failed: Overflow: value ${e} is out of ${t} ${r} range`)}function Ge(e,r){t.HEAP8.fill(0,e,r+e)}function Ye(e,r){const n=!!r;"number"==typeof r&&Je(r,0,1),t.HEAP32[e>>>2]=n?1:0}function Xe(e,r){Je(r,0,255),t.HEAPU8[e]=r}function Ze(e,r){Je(r,0,65535),t.HEAPU16[e>>>1]=r}function Ke(e,r){t.HEAPU32[e>>>2]=r}function Qe(e,r){Je(r,0,4294967295),t.HEAPU32[e>>>2]=r}function et(e,r){Je(r,-128,127),t.HEAP8[e]=r}function tt(e,r){Je(r,-32768,32767),t.HEAP16[e>>>1]=r}function rt(e,r){t.HEAP32[e>>>2]=r}function nt(e,r){Je(r,-2147483648,2147483647),t.HEAP32[e>>>2]=r}function ot(e){if(0!==e)switch(e){case 1:throw new Error("value was not an integer");case 2:throw new Error("value out of range");default:throw new Error("unknown internal error")}}function it(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);ot(g.mono_wasm_f64_to_i52(e,t))}function st(e,t){if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not a safe integer: ${t} (${typeof t})`);if(!(t>=0))throw new Error("Assert failed: Can't convert negative Number into UInt64");ot(g.mono_wasm_f64_to_u52(e,t))}function at(e,t){if(!Ve)throw new Error("Assert failed: BigInt is not supported.");if("bigint"!=typeof t)throw new Error(`Assert failed: Value is not an bigint: ${t} (${typeof t})`);if(!(t>=kt&&t<=Et))throw new Error(`Assert failed: Overflow: value ${t} is out of ${kt} ${Et} range`);He[e>>>3]=t}function ct(e,r){if("number"!=typeof r)throw new Error(`Assert failed: Value is not a Number: ${r} (${typeof r})`);t.HEAPF32[e>>>2]=r}function lt(e,r){if("number"!=typeof r)throw new Error(`Assert failed: Value is not a Number: ${r} (${typeof r})`);t.HEAPF64[e>>>3]=r}function ut(e){return!!t.HEAP32[e>>>2]}function _t(e){return t.HEAPU8[e]}function ft(e){return t.HEAPU16[e>>>1]}function dt(e){return t.HEAPU32[e>>>2]}function mt(e){return t.HEAP8[e]}function pt(e){return t.HEAP16[e>>>1]}function wt(e){return t.HEAP32[e>>>2]}function ht(e){const t=g.mono_wasm_i52_to_f64(e,m._i52_error_scratch_buffer);return ot(wt(m._i52_error_scratch_buffer)),t}function gt(e){const t=g.mono_wasm_u52_to_f64(e,m._i52_error_scratch_buffer);return ot(wt(m._i52_error_scratch_buffer)),t}function yt(e){if(!Ve)throw new Error("Assert failed: BigInt is not supported.");return He[e>>>3]}function bt(e){return t.HEAPF32[e>>>2]}function vt(e){return t.HEAPF64[e>>>3]}let Et,kt;function At(e){const r=t._malloc(e.length);return new Uint8Array(t.HEAPU8.buffer,r,e.length).set(e),r}const St=8192;let jt=null,xt=null,Ot=0;const Nt=[],Dt=[];function Mt(e,r){if(e<=0)throw new Error("capacity >= 1");const n=4*(e|=0),o=t._malloc(n);if(o%4!=0)throw new Error("Malloc returned an unaligned offset");return Ge(o,n),new It(o,e,!0,r)}function Tt(e){let t;if(!e)throw new Error("address must be a location in the native heap");return Dt.length>0?(t=Dt.pop(),t._set_address(e)):t=new Pt(e),t}function Rt(e){let t;if(Nt.length>0)t=Nt.pop();else{const e=function(){if(w(jt)||!xt){jt=Mt(St,"js roots"),xt=new Int32Array(St),Ot=St;for(let e=0;e<St;e++)xt[e]=St-e-1}if(Ot<1)throw new Error("Out of scratch root space");const e=xt[Ot-1];return Ot--,e}();t=new $t(jt,e)}if(void 0!==e){if("number"!=typeof e)throw new Error("value must be an address in the managed heap");t.set(e)}else t.set(0);return t}function Ct(...e){for(let t=0;t<e.length;t++)w(e[t])||e[t].release()}class It{constructor(e,t,r,n){const o=4*t;this.__offset=e,this.__offset32=e>>>2,this.__count=t,this.length=t,this.__handle=g.mono_wasm_register_root(e,o,n||"noname"),this.__ownsAllocation=r}_throw_index_out_of_range(){throw new Error("index out of range")}_check_in_range(e){(e>=this.__count||e<0)&&this._throw_index_out_of_range()}get_address(e){return this._check_in_range(e),this.__offset+4*e}get_address_32(e){return this._check_in_range(e),this.__offset32+e}get(e){this._check_in_range(e);const r=this.get_address_32(e);return t.HEAPU32[r]}set(e,t){const r=this.get_address(e);return g.mono_wasm_write_managed_pointer_unsafe(r,t),t}copy_value_from_address(e,t){const r=this.get_address(e);g.mono_wasm_copy_managed_pointer(r,t)}_unsafe_get(e){return t.HEAPU32[this.__offset32+e]}_unsafe_set(e,t){const r=this.__offset+e;g.mono_wasm_write_managed_pointer_unsafe(r,t)}clear(){this.__offset&&Ge(this.__offset,4*this.__count)}release(){this.__offset&&this.__ownsAllocation&&(g.mono_wasm_deregister_root(this.__offset),Ge(this.__offset,4*this.__count),t._free(this.__offset)),this.__handle=this.__offset=this.__count=this.__offset32=0}toString(){return`[root buffer @${this.get_address(0)}, size ${this.__count} ]`}}class $t{constructor(e,t){this.__buffer=e,this.__index=t}get_address(){return this.__buffer.get_address(this.__index)}get_address_32(){return this.__buffer.get_address_32(this.__index)}get address(){return this.__buffer.get_address(this.__index)}get(){return this.__buffer._unsafe_get(this.__index)}set(e){const t=this.__buffer.get_address(this.__index);return g.mono_wasm_write_managed_pointer_unsafe(t,e),e}copy_from(e){const t=e.address,r=this.address;g.mono_wasm_copy_managed_pointer(r,t)}copy_to(e){const t=this.address,r=e.address;g.mono_wasm_copy_managed_pointer(r,t)}copy_from_address(e){const t=this.address;g.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.address;g.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){this.set(0)}release(){if(!this.__buffer)throw new Error("No buffer");Nt.length>128?(function(e){void 0!==e&&(jt.set(e,0),xt[Ot]=e,Ot++)}(this.__index),this.__buffer=null,this.__index=0):(this.set(0),Nt.push(this))}toString(){return`[root @${this.address}]`}}class Pt{constructor(e){this.__external_address=0,this.__external_address_32=0,this._set_address(e)}_set_address(e){this.__external_address=e,this.__external_address_32=e>>>2}get address(){return this.__external_address}get_address(){return this.__external_address}get_address_32(){return this.__external_address_32}get(){return t.HEAPU32[this.__external_address_32]}set(e){return g.mono_wasm_write_managed_pointer_unsafe(this.__external_address,e),e}copy_from(e){const t=e.address,r=this.__external_address;g.mono_wasm_copy_managed_pointer(r,t)}copy_to(e){const t=this.__external_address,r=e.address;g.mono_wasm_copy_managed_pointer(r,t)}copy_from_address(e){const t=this.__external_address;g.mono_wasm_copy_managed_pointer(t,e)}copy_to_address(e){const t=this.__external_address;g.mono_wasm_copy_managed_pointer(e,t)}get value(){return this.get()}set value(e){this.set(e)}valueOf(){throw new Error("Implicit conversion of roots to pointers is no longer supported. Use .value or .address as appropriate")}clear(){this.set(0)}release(){Dt.length<128&&Dt.push(this)}toString(){return`[external root @${this.address}]`}}const Ft=new Map,Ut=new Map,Bt=Symbol.for("wasm bound_cs_function"),Wt=Symbol.for("wasm bound_js_function"),zt=16;function Lt(e){const r=t.stackAlloc(zt*e);if(!r||r%8!=0)throw new Error("Assert failed: Arg alignment");er(Ht(r,0),yr.None);return er(Ht(r,1),yr.None),r}function Ht(e,t){if(!e)throw new Error("Assert failed: Null args");return e+t*zt}function Vt(e,t){if(!e)throw new Error("Assert failed: Null signatures");return e+32*t+8}function qt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e)}function Jt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+16)}function Gt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+20)}function Yt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+24)}function Xt(e){if(!e)throw new Error("Assert failed: Null sig");return dt(e+28)}function Zt(e){if(!e)throw new Error("Assert failed: Null signatures");return wt(e+4)}function Kt(e){if(!e)throw new Error("Assert failed: Null signatures");return wt(e)}function Qt(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+12)}function er(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+12,t)}function tr(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e)}function rr(e,t){if(!e)throw new Error("Assert failed: Null arg");if("boolean"!=typeof t)throw new Error(`Assert failed: Value is not a Boolean: ${t} (${typeof t})`);Xe(e,t?1:0)}function nr(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e,t)}function or(e,t){if(!e)throw new Error("Assert failed: Null arg");lt(e,t.getTime())}function ir(e,t){if(!e)throw new Error("Assert failed: Null arg");lt(e,t)}function sr(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+4)}function ar(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+4,t)}function cr(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+4)}function lr(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+4,t)}function ur(e){if(!e)throw new Error("Assert failed: Null arg");return Tt(e)}function _r(e){if(!e)throw new Error("Assert failed: Null arg");return wt(e+8)}function fr(e,t){if(!e)throw new Error("Assert failed: Null arg");nt(e+8,t)}class dr{dispose(){De(this,0)}get isDisposed(){return 0===this[Ae]}toString(){return`CsObject(gc_handle: ${this[Ae]})`}}class mr extends Error{constructor(e){super(e),this.superStack=Object.getOwnPropertyDescriptor(this,"stack"),Object.defineProperty(this,"stack",{get:this.getManageStack})}getSuperStack(){return this.superStack?this.superStack.value:super.stack}getManageStack(){const e=this[Ae];if(e){const t=m.javaScriptExports.get_managed_stack_trace(e);if(t)return t+"\n"+this.getSuperStack()}return this.getSuperStack()}dispose(){De(this,0)}get isDisposed(){return 0===this[Ae]}}function pr(e){return e==yr.Byte?1:e==yr.Int32?4:e==yr.Int52||e==yr.Double?8:e==yr.String||e==yr.Object||e==yr.JSObject?zt:-1}class wr{constructor(e,t,r){this._pointer=e,this._length=t,this._viewType=r}_unsafe_create_view(){const e=0==this._viewType?new Uint8Array(t.HEAPU8.buffer,this._pointer,this._length):1==this._viewType?new Int32Array(t.HEAP32.buffer,this._pointer,this._length):2==this._viewType?new Float64Array(t.HEAPF64.buffer,this._pointer,this._length):null;if(!e)throw new Error("NotImplementedException");return e}set(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const r=this._unsafe_create_view();if(!e||!r||e.constructor!==r.constructor)throw new Error(`Assert failed: Expected ${r.constructor}`);r.set(e,t)}copyTo(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");const r=this._unsafe_create_view();if(!e||!r||e.constructor!==r.constructor)throw new Error(`Assert failed: Expected ${r.constructor}`);const n=r.subarray(t);e.set(n)}slice(e,t){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._unsafe_create_view().slice(e,t)}get length(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return this._length}get byteLength(){if(this.isDisposed)throw new Error("Assert failed: ObjectDisposedException");return 0==this._viewType?this._length:1==this._viewType?this._length<<2:2==this._viewType?this._length<<3:0}}class hr extends wr{constructor(e,t,r){super(e,t,r),this.is_disposed=!1}dispose(){this.is_disposed=!0}get isDisposed(){return this.is_disposed}}class gr extends wr{constructor(e,t,r){super(e,t,r)}dispose(){De(this,0)}get isDisposed(){return 0===this[Ae]}}var yr;!function(e){e[e.None=0]="None",e[e.Void=1]="Void",e[e.Discard=2]="Discard",e[e.Boolean=3]="Boolean",e[e.Byte=4]="Byte",e[e.Char=5]="Char",e[e.Int16=6]="Int16",e[e.Int32=7]="Int32",e[e.Int52=8]="Int52",e[e.BigInt64=9]="BigInt64",e[e.Double=10]="Double",e[e.Single=11]="Single",e[e.IntPtr=12]="IntPtr",e[e.JSObject=13]="JSObject",e[e.Object=14]="Object",e[e.String=15]="String",e[e.Exception=16]="Exception",e[e.DateTime=17]="DateTime",e[e.DateTimeOffset=18]="DateTimeOffset",e[e.Nullable=19]="Nullable",e[e.Task=20]="Task",e[e.Array=21]="Array",e[e.ArraySegment=22]="ArraySegment",e[e.Span=23]="Span",e[e.Action=24]="Action",e[e.Function=25]="Function",e[e.JSException=26]="JSException"}(yr||(yr={}));const br=new Map,vr=new Map;let Er=0,kr=null,Ar=0;const Sr=new class{init_fields(){this.mono_wasm_string_decoder_buffer||(this.mono_text_decoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):null,this.mono_wasm_string_root=Rt(),this.mono_wasm_string_decoder_buffer=t._malloc(12))}copy(e){if(this.init_fields(),0===e)return null;this.mono_wasm_string_root.value=e;const t=this.copy_root(this.mono_wasm_string_root);return this.mono_wasm_string_root.value=0,t}copy_root(e){if(this.init_fields(),0===e.value)return null;const t=this.mono_wasm_string_decoder_buffer+0,r=this.mono_wasm_string_decoder_buffer+4,n=this.mono_wasm_string_decoder_buffer+8;let o;g.mono_wasm_string_get_data_ref(e.address,t,r,n);const i=wt(r),s=dt(t),a=wt(n);if(a&&(o=br.get(e.value)),void 0===o&&(i&&s?(o=this.decode(s,s+i),a&&br.set(e.value,o)):o=jr),void 0===o)throw new Error(`internal error when decoding string at location ${e.value}`);return o}decode(e,r){let n="";if(this.mono_text_decoder){const o="undefined"!=typeof SharedArrayBuffer&&t.HEAPU8.buffer instanceof SharedArrayBuffer?t.HEAPU8.slice(e,r):t.HEAPU8.subarray(e,r);n=this.mono_text_decoder.decode(o)}else for(let o=0;o<r-e;o+=2){const r=t.getValue(e+o,"i16");n+=String.fromCharCode(r)}return n}},jr="";function xr(e){return Sr.copy(e)}function Or(e){return Sr.copy_root(e)}function Nr(e){if(0===e.length)return jr;const t=function(e){const t=Rt();try{return Dr(e,t),t.value}finally{t.release()}}(e),r=br.get(t);if(w(r))throw new Error("internal error: interned_string_table did not contain string after js_string_to_mono_string_interned");return r}function Dr(e,t){let r;if("symbol"==typeof e?(r=e.description,"string"!=typeof r&&(r=Symbol.keyFor(e)),"string"!=typeof r&&(r="<unknown Symbol>")):"string"==typeof e&&(r=e),"string"!=typeof r)throw new Error(`Argument to js_string_to_mono_string_interned must be a string but was ${e}`);if(0===r.length&&Er)return void t.set(Er);const n=vr.get(r);n?t.set(n):(Tr(r,t),function(e,t,r){if(!t.value)throw new Error("null pointer passed to _store_string_in_intern_table");Ar>=8192&&(kr=null),kr||(kr=Mt(8192,"interned strings"),Ar=0);const n=kr,o=Ar++;if(r&&(g.mono_wasm_intern_string_ref(t.address),!t.value))throw new Error("mono_wasm_intern_string_ref produced a null pointer");vr.set(e,t.value),br.set(t.value,e),0!==e.length||Er||(Er=t.value),n.copy_value_from_address(o,t.address)}(r,t,!0))}function Mr(e,t){if(t.clear(),null!==e)if("symbol"==typeof e)Dr(e,t);else{if("string"!=typeof e)throw new Error("Expected string argument, got "+typeof e);if(0===e.length)Dr(e,t);else{if(e.length<=256){const r=vr.get(e);if(r)return void t.set(r)}Tr(e,t)}}}function Tr(e,r){const n=t._malloc(2*(e.length+1)),o=n>>>1|0;for(let r=0;r<e.length;r++)t.HEAP16[o+r]=e.charCodeAt(r);t.HEAP16[o+e.length]=0,g.mono_wasm_string_from_utf16_ref(n,e.length,r.address),t._free(n)}function Rr(e){const t=Rt();try{return Mr(e,t),t.value}finally{t.release()}}function Cr(e,t,r,n,o,i){let s="",a="",c="";const l="converter"+t;let u="null",_="null",f="null",d="null",m=qt(e);if(m===yr.None||m===yr.Void)return{converters:s,call_body:c,marshaler_type:m};const p=Jt(e);if(p!==yr.None){const e=Ut.get(p);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${p} at ${t}`);m!=yr.Nullable?(d="converter"+t+"_res",s+=", "+d,a+=" "+yr[p],i[d]=e):m=p}const w=Gt(e);if(w!==yr.None){const e=Ft.get(w);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${w} at ${t}`);u="converter"+t+"_arg1",s+=", "+u,a+=" "+yr[w],i[u]=e}const h=Yt(e);if(h!==yr.None){const e=Ft.get(h);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${h} at ${t}`);_="converter"+t+"_arg2",s+=", "+_,a+=" "+yr[h],i[_]=e}const g=Xt(e);if(g!==yr.None){const e=Ft.get(g);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${g} at ${t}`);f="converter"+t+"_arg3",s+=", "+f,a+=" "+yr[g],i[f]=e}const y=Ut.get(m),b=yr[m];if(!y||"function"!=typeof y)throw new Error(`Assert failed: Unknow converter for type ${b} (${m}) at ${t} `);return s+=", "+l,a+=" "+b,i[l]=y,c=m==yr.Task?` ${l}(args + ${r}, ${o}, signature + ${n}, ${d}); // ${a} \n`:m==yr.Action||m==yr.Function?` ${l}(args + ${r}, ${o}, signature + ${n}, ${d}, ${u}, ${_}, ${_}); // ${a} \n`:` ${l}(args + ${r}, ${o}, signature + ${n}); // ${a} \n`,{converters:s,call_body:c,marshaler_type:m}}function Ir(e,t){null==t?er(e,yr.None):(er(e,yr.Boolean),rr(e,t))}function $r(e,t){null==t?er(e,yr.None):(er(e,yr.Byte),function(e,t){if(!e)throw new Error("Assert failed: Null arg");Xe(e,t)}(e,t))}function Pr(e,t){null==t?er(e,yr.None):(er(e,yr.Char),function(e,t){if(!e)throw new Error("Assert failed: Null arg");Ze(e,t)}(e,t))}function Fr(e,t){null==t?er(e,yr.None):(er(e,yr.Int16),function(e,t){if(!e)throw new Error("Assert failed: Null arg");tt(e,t)}(e,t))}function Ur(e,t){null==t?er(e,yr.None):(er(e,yr.Int32),function(e,t){if(!e)throw new Error("Assert failed: Null arg");nt(e,t)}(e,t))}function Br(e,t){null==t?er(e,yr.None):(er(e,yr.Int52),function(e,t){if(!e)throw new Error("Assert failed: Null arg");if(!Number.isSafeInteger(t))throw new Error(`Assert failed: Value is not an integer: ${t} (${typeof t})`);lt(e,t)}(e,t))}function Wr(e,t){null==t?er(e,yr.None):(er(e,yr.BigInt64),function(e,t){if(!e)throw new Error("Assert failed: Null arg");at(e,t)}(e,t))}function zr(e,t){null==t?er(e,yr.None):(er(e,yr.Double),ir(e,t))}function Lr(e,t){null==t?er(e,yr.None):(er(e,yr.Single),function(e,t){if(!e)throw new Error("Assert failed: Null arg");ct(e,t)}(e,t))}function Hr(e,t){null==t?er(e,yr.None):(er(e,yr.IntPtr),nr(e,t))}function Vr(e,t){if(null==t)er(e,yr.None);else{if(!(t instanceof Date))throw new Error("Assert failed: Value is not a Date");er(e,yr.DateTime),or(e,t)}}function qr(e,t){if(null==t)er(e,yr.None);else{if(!(t instanceof Date))throw new Error("Assert failed: Value is not a Date");er(e,yr.DateTimeOffset),or(e,t)}}function Jr(e,t){if(null==t)er(e,yr.None);else{if(er(e,yr.String),"string"!=typeof t)throw new Error("Assert failed: Value is not a String");Gr(e,t)}}function Gr(e,t){const r=ur(e);try{Mr(t,r)}finally{r.release()}}function Yr(e){er(e,yr.None)}function Xr(e,t,r,n,o,i,s){if(null==t)return void er(e,yr.None);if(!(t&&t instanceof Function))throw new Error("Assert failed: Value is not a Function");const a=e=>{const r=Ht(e,0),a=Ht(e,1),c=Ht(e,2),l=Ht(e,3),u=Ht(e,4);try{let e,r,_;o&&(e=o(c)),i&&(r=i(l)),s&&(_=s(u));const f=t(e,r,_);n&&n(a,f)}catch(e){Qr(r,e)}};a[Wt]=!0;ar(e,xe(a)),er(e,yr.Function)}class Zr{constructor(e){this.promise=e}dispose(){De(this,0)}get isDisposed(){return 0===this[Ae]}}function Kr(e,t,r,n){if(null==t)return void er(e,yr.None);if(!Fe(t))throw new Error("Assert failed: Value is not a Promise");const o=m.javaScriptExports.create_task_callback();lr(e,o),er(e,yr.Task);const i=new Zr(t);Ne(i,o),t.then((e=>{m.javaScriptExports.complete_task(o,null,e,n||tn),De(i,o)})).catch((e=>{m.javaScriptExports.complete_task(o,e,null,void 0),De(i,o)}))}function Qr(e,t){if(null==t)er(e,yr.None);else if(t instanceof mr){er(e,yr.Exception);lr(e,Me(t))}else{if("object"!=typeof t&&"string"!=typeof t)throw new Error("Assert failed: Value is not an Error "+typeof t);er(e,yr.JSException);Gr(e,t.toString());const r=t[Se];if(r)ar(e,r);else{ar(e,xe(t))}}}function en(e,t){if(null==t)er(e,yr.None);else{if(void 0!==t[Ae])throw new Error("Assert failed: JSObject proxy of ManagedObject proxy is not supported");if("function"!=typeof t&&"object"!=typeof t)throw new Error(`Assert failed: JSObject proxy of ${typeof t} is not supported`);er(e,yr.JSObject);ar(e,xe(t))}}function tn(e,t){if(null==t)er(e,yr.None);else{const r=t[Ae],n=typeof t;if(void 0===r)if("string"===n||"symbol"===n)er(e,yr.String),Gr(e,t);else if("number"===n)er(e,yr.Double),ir(e,t);else{if("bigint"===n)throw new Error("NotImplementedException: bigint");if("boolean"===n)er(e,yr.Boolean),rr(e,t);else if(t instanceof Date)er(e,yr.DateTime),or(e,t);else if(t instanceof Error)Qr(e,t);else if(t instanceof Uint8Array)nn(e,t,yr.Byte);else if(t instanceof Float64Array)nn(e,t,yr.Double);else if(t instanceof Int32Array)nn(e,t,yr.Int32);else if(Array.isArray(t))nn(e,t,yr.Object);else{if(t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array)throw new Error("NotImplementedException: TypedArray");if(Fe(t))Kr(e,t);else{if(t instanceof hr)throw new Error("NotImplementedException: Span");if("object"!=n)throw new Error(`JSObject proxy is not supported for ${n} ${t}`);{const r=xe(t);er(e,yr.JSObject),ar(e,r)}}}}else{if(Me(t),t instanceof gr)throw new Error("NotImplementedException: ArraySegment");if(t instanceof mr)er(e,yr.Exception),lr(e,r);else{if(!(t instanceof dr))throw new Error("NotImplementedException "+n);er(e,yr.Object),lr(e,r)}}}}function rn(e,t,r){if(!r)throw new Error("Assert failed: Expected valid sig parameter");nn(e,t,Gt(r))}function nn(e,r,n){if(null==r)er(e,yr.None);else{const o=pr(n);if(-1==o)throw new Error(`Assert failed: Element type ${yr[n]} not supported`);const i=r.length,s=o*i,a=t._malloc(s);if(n==yr.String){if(!Array.isArray(r))throw new Error("Assert failed: Value is not an Array");Ge(a,s),g.mono_wasm_register_root(a,s,"marshal_array_to_cs");for(let e=0;e<i;e++){Jr(Ht(a,e),r[e])}}else if(n==yr.Object){if(!Array.isArray(r))throw new Error("Assert failed: Value is not an Array");Ge(a,s),g.mono_wasm_register_root(a,s,"marshal_array_to_cs");for(let e=0;e<i;e++){tn(Ht(a,e),r[e])}}else if(n==yr.JSObject){if(!Array.isArray(r))throw new Error("Assert failed: Value is not an Array");Ge(a,s);for(let e=0;e<i;e++){en(Ht(a,e),r[e])}}else if(n==yr.Byte){if(!(Array.isArray(r)||r instanceof Uint8Array))throw new Error("Assert failed: Value is not an Array or Uint8Array");t.HEAPU8.subarray(a,a+i).set(r)}else if(n==yr.Int32){if(!(Array.isArray(r)||r instanceof Int32Array))throw new Error("Assert failed: Value is not an Array or Int32Array");t.HEAP32.subarray(a>>2,(a>>2)+i).set(r)}else{if(n!=yr.Double)throw new Error("not implemented");if(!(Array.isArray(r)||r instanceof Float64Array))throw new Error("Assert failed: Value is not an Array or Float64Array");t.HEAPF64.subarray(a>>3,(a>>3)+i).set(r)}nr(e,a),er(e,yr.Array),function(e,t){if(!e)throw new Error("Assert failed: Null arg");Qe(e+4,t)}(e,n),fr(e,r.length)}}function on(e,t,r){if(!r)throw new Error("Assert failed: Expected valid sig parameter");if(t.isDisposed)throw new Error("Assert failed: ObjectDisposedException");an(r,t._viewType),er(e,yr.Span),nr(e,t._pointer),fr(e,t.length)}function sn(e,t,r){if(!r)throw new Error("Assert failed: Expected valid sig parameter");const n=Me(t);if(!n)throw new Error("Assert failed: Only roundtrip of ArraySegment instance created by C#");an(r,t._viewType),er(e,yr.ArraySegment),nr(e,t._pointer),fr(e,t.length),lr(e,n)}function an(e,t){const r=Gt(e);if(r==yr.Byte){if(0!=t)throw new Error("Assert failed: Expected MemoryViewType.Byte")}else if(r==yr.Int32){if(1!=t)throw new Error("Assert failed: Expected MemoryViewType.Int32")}else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);if(2!=t)throw new Error("Assert failed: Expected MemoryViewType.Double")}}function cn(e,t,r,n,o,i){let s="",a="",c="";const l="converter"+t;let u="null",_="null",f="null",d="null",m=qt(e);if(m===yr.None||m===yr.Void)return{converters:s,call_body:c,marshaler_type:m};const p=Jt(e);if(p!==yr.None){const e=Ft.get(p);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${p} at ${t}`);m!=yr.Nullable?(d="converter"+t+"_res",s+=", "+d,a+=" "+yr[p],i[d]=e):m=p}const w=Gt(e);if(w!==yr.None){const e=Ut.get(w);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${w} at ${t}`);u="converter"+t+"_arg1",s+=", "+u,a+=" "+yr[w],i[u]=e}const h=Yt(e);if(h!==yr.None){const e=Ut.get(h);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${h} at ${t}`);_="converter"+t+"_arg2",s+=", "+_,a+=" "+yr[h],i[_]=e}const g=Xt(e);if(g!==yr.None){const e=Ut.get(g);if(!e||"function"!=typeof e)throw new Error(`Assert failed: Unknow converter for type ${g} at ${t}`);f="converter"+t+"_arg3",s+=", "+f,a+=" "+yr[g],i[f]=e}const y=Ft.get(m);if(!y||"function"!=typeof y)throw new Error(`Assert failed: Unknow converter for type ${m} at ${t} `);return s+=", "+l,a+=" "+yr[m],i[l]=y,c=m==yr.Task?` const ${o} = ${l}(args + ${r}, signature + ${n}, ${d}); // ${a} \n`:m==yr.Action||m==yr.Function?` const ${o} = ${l}(args + ${r}, signature + ${n}, ${d}, ${u}, ${_}, ${f}); // ${a} \n`:` const ${o} = ${l}(args + ${r}, signature + ${n}); // ${a} \n`,{converters:s,call_body:c,marshaler_type:m}}function ln(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return!!_t(e)}(e)}function un(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return _t(e)}(e)}function _n(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return ft(e)}(e)}function fn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return pt(e)}(e)}function dn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return wt(e)}(e)}function mn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return vt(e)}(e)}function pn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return yt(e)}(e)}function wn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return bt(e)}(e)}function hn(e){return Qt(e)==yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");return vt(e)}(e)}function gn(e){return Qt(e)==yr.None?null:tr(e)}function yn(){return null}function bn(e){return Qt(e)===yr.None?null:function(e){if(!e)throw new Error("Assert failed: Null arg");const t=vt(e);return new Date(t)}(e)}function vn(e,t,r,n,o,i){if(Qt(e)===yr.None)return null;const s=cr(e);let a=Te(s);return null!=a||(a=(e,t,a)=>m.javaScriptExports.call_delegate(s,e,t,a,r,n,o,i),Ne(a,s)),a}function En(e,t,r){const n=Qt(e);if(n===yr.None)return null;if(n!==yr.Task){if(r||(r=Ft.get(n)),!r)throw new Error(`Assert failed: Unknow sub_converter for type ${yr[n]} `);const t=r(e);return new Promise((e=>e(t)))}const o=sr(e);if(0==o)return new Promise((e=>e(void 0)));const i=je(o);if(!i)throw new Error(`Assert failed: ERR28: promise not found for js_handle: ${o} `);$e(i);const s=Ie(i),a=s.resolve;return s.resolve=e=>{const t=Qt(e);if(t===yr.None)return void a(null);if(r||(r=Ft.get(t)),!r)throw new Error(`Assert failed: Unknow sub_converter for type ${yr[t]}`);const n=r(e);a(n)},i}function kn(e){const t=Ht(e,0),r=Ht(e,1),n=Ht(e,2),o=Ht(e,3),i=Qt(t),s=Qt(o),a=sr(n);if(0===a){const{promise:e,promise_control:n}=Ce();if(ar(r,xe(e)),i!==yr.None){const e=Sn(t);n.reject(e)}else if(s!==yr.Task){const e=Ft.get(s);if(!e)throw new Error(`Assert failed: Unknow sub_converter for type ${yr[s]} `);const t=e(o);n.resolve(t)}}else{const e=je(a);if(!e)throw new Error(`Assert failed: ERR25: promise not found for js_handle: ${a} `);$e(e);const r=Ie(e);if(i!==yr.None){const e=Sn(t);r.reject(e)}else s!==yr.Task&&r.resolve(o)}er(r,yr.Task),er(t,yr.None)}function An(e){if(Qt(e)==yr.None)return null;const t=ur(e);try{return Or(t)}finally{t.release()}}function Sn(e){const t=Qt(e);if(t==yr.None)return null;if(t==yr.JSException){return je(sr(e))}const r=cr(e);let n=Te(r);if(null==n){const t=An(e);n=new mr(t),Ne(n,r)}return n}function jn(e){if(Qt(e)==yr.None)return null;return je(sr(e))}function xn(e){const t=Qt(e);if(t==yr.None)return null;if(t==yr.JSObject){return je(sr(e))}if(t==yr.Array){return Nn(e,function(e){if(!e)throw new Error("Assert failed: Null arg");return dt(e+4)}(e))}if(t==yr.Object){const t=cr(e);if(0===t)return null;let r=Te(t);return r||(r=new dr,Ne(r,t)),r}const r=Ft.get(t);if(!r)throw new Error(`Assert failed: Unknow converter for type ${yr[t]}`);return r(e)}function On(e,t){if(!t)throw new Error("Assert failed: Expected valid sig parameter");return Nn(e,Gt(t))}function Nn(e,r){if(Qt(e)==yr.None)return null;if(-1==pr(r))throw new Error(`Assert failed: Element type ${yr[r]} not supported`);const n=tr(e),o=_r(e);let i=null;if(r==yr.String){i=new Array(o);for(let e=0;e<o;e++){const t=Ht(n,e);i[e]=An(t)}g.mono_wasm_deregister_root(n)}else if(r==yr.Object){i=new Array(o);for(let e=0;e<o;e++){const t=Ht(n,e);i[e]=xn(t)}g.mono_wasm_deregister_root(n)}else if(r==yr.JSObject){i=new Array(o);for(let e=0;e<o;e++){const t=Ht(n,e);i[e]=jn(t)}}else if(r==yr.Byte){i=t.HEAPU8.subarray(n,n+o).slice()}else if(r==yr.Int32){i=t.HEAP32.subarray(n>>2,(n>>2)+o).slice()}else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);i=t.HEAPF64.subarray(n>>3,(n>>3)+o).slice()}return t._free(n),i}function Dn(e,t){if(!t)throw new Error("Assert failed: Expected valid sig parameter");const r=Gt(t),n=tr(e),o=_r(e);let i=null;if(r==yr.Byte)i=new hr(n,o,0);else if(r==yr.Int32)i=new hr(n,o,1);else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);i=new hr(n,o,2)}return i}function Mn(e,t){if(!t)throw new Error("Assert failed: Expected valid sig parameter");const r=Gt(t),n=tr(e),o=_r(e);let i=null;if(r==yr.Byte)i=new gr(n,o,0);else if(r==yr.Int32)i=new gr(n,o,1);else{if(r!=yr.Double)throw new Error(`NotImplementedException ${yr[r]} `);i=new gr(n,o,2)}return Ne(i,cr(e)),i}let Tn,Rn;const Cn={};const In=Symbol.for("wasm type");const $n=Ce(),Pn=Ce();let Fn=0,Un=0,Bn=0,Wn=0;const zn=[],Ln=Object.create(null);let Hn,Vn=0;const qn={"js-module-threads":!0},Jn={dotnetwasm:!0},Gn={"js-module-threads":!0,dotnetwasm:!0};async function Yn(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_download_assets"),m.maxParallelDownloads=m.config.maxParallelDownloads||m.maxParallelDownloads;try{const e=[];for(const t of m.config.assets){const r=t;if(Gn[r.behavior]||Wn++,!qn[r.behavior]){const t=Jn[r.behavior];if(Bn++,r.pendingDownload){r.pendingDownloadInternal=r.pendingDownload;const n=async()=>{const e=await r.pendingDownloadInternal.response;return t||(r.buffer=await e.arrayBuffer()),++Fn,{asset:r,buffer:r.buffer}};e.push(n())}else{const n=async()=>(r.buffer=await Xn(r,!t),{asset:r,buffer:r.buffer});e.push(n())}}}Pn.promise_control.resolve();const r=[];for(const t of e)r.push((async()=>{const e=await t,r=e.asset;if(e.buffer){if(!Gn[r.behavior]){const t=r.pendingDownloadInternal.url,n=new Uint8Array(r.buffer);r.pendingDownloadInternal=null,r.pendingDownload=null,r.buffer=null,e.buffer=null,await As.promise,eo(r,t,n)}}else{if(Jn[r.behavior])Jn[r.behavior]&&++Fn;else{if(!r.isOptional)throw new Error("Assert failed: Expected asset to have the downloaded buffer");qn[r.behavior]||Bn--,Gn[r.behavior]||Wn--}}})());Promise.all(r).then((()=>{$n.promise_control.resolve()})).catch((e=>{t.printErr("MONO_WASM: Error in mono_download_assets: "+e),Ms(e,!0)}))}catch(e){throw t.printErr("MONO_WASM: Error in mono_download_assets: "+e),e}}async function Xn(e,t){try{return await Zn(e,t)}catch(r){if(i||o)throw r;if(e.pendingDownload&&e.pendingDownloadInternal==e.pendingDownload)throw r;if(e.resolvedUrl&&-1!=e.resolvedUrl.indexOf("file://"))throw r;if(r&&404==r.status)throw r;e.pendingDownloadInternal=void 0,await Pn.promise;try{return await Zn(e,t)}catch(r){return e.pendingDownloadInternal=void 0,await function(e){return new Promise((t=>setTimeout(t,e)))}(100),await Zn(e,t)}}}async function Zn(e,r){for(;Hn;)await Hn.promise;try{++Vn,Vn==m.maxParallelDownloads&&(m.diagnosticTracing&&console.debug("MONO_WASM: Throttling further parallel downloads"),Hn=Ce());const n=await async function(e){if(e.buffer){const t=e.buffer;return e.buffer=null,e.pendingDownloadInternal={url:"undefined://"+e.name,name:e.name,response:Promise.resolve({arrayBuffer:()=>t,headers:{get:()=>{}}})},e.pendingDownloadInternal.response}if(e.pendingDownloadInternal&&e.pendingDownloadInternal.response){return await e.pendingDownloadInternal.response}const r=e.loadRemote&&m.config.remoteSources?m.config.remoteSources:[""];let n;for(let t of r){t=t.trim(),"./"===t&&(t="");const r=Kn(e,t);e.name===r?m.diagnosticTracing&&console.debug(`MONO_WASM: Attempting to download '${r}'`):m.diagnosticTracing&&console.debug(`MONO_WASM: Attempting to download '${r}' for ${e.name}`);try{const t=Qn({name:e.name,resolvedUrl:r,hash:e.hash,behavior:e.behavior});if(e.pendingDownloadInternal=t,n=await t.response,!n.ok)continue;return n}catch(e){continue}}const o=e.isOptional||e.name.match(/\.pdb$/)&&m.config.ignorePdbLoadErrors;if(!n)throw new Error(`Assert failed: Response undefined ${e.name}`);if(o)return void t.print(`MONO_WASM: optional download '${n.url}' for ${e.name} failed ${n.status} ${n.statusText}`);{const t=new Error(`MONO_WASM: download '${n.url}' for ${e.name} failed ${n.status} ${n.statusText}`);throw t.status=n.status,t}}(e);if(!r||!n)return;const o=await n.arrayBuffer();return++Fn,o}finally{if(--Vn,Hn&&Vn==m.maxParallelDownloads-1){m.diagnosticTracing&&console.debug("MONO_WASM: Resuming more parallel downloads");const e=Hn;Hn=void 0,e.promise_control.resolve()}}}function Kn(e,t){if(null==t)throw new Error(`Assert failed: sourcePrefix must be provided for ${e.name}`);let r;const n=m.config.assemblyRootFolder;if(e.resolvedUrl)r=e.resolvedUrl;else{if(""===t)if("assembly"===e.behavior||"pdb"===e.behavior)r=n?n+"/"+e.name:e.name;else if("resource"===e.behavior){const t=e.culture&&""!==e.culture?`${e.culture}/${e.name}`:e.name;r=n?n+"/"+t:t}else r=e.name;else r=t+e.name;r=m.locateFile(r)}if(!r||"string"!=typeof r)throw new Error("Assert failed: attemptUrl need to be path or url string");return r}function Qn(e){try{if("function"==typeof t.downloadResource){const r=t.downloadResource(e);if(r)return r}const r={};e.hash&&(r.integrity=e.hash);const n=m.fetch_like(e.resolvedUrl,r);return{name:e.name,url:e.resolvedUrl,response:n}}catch(t){const r={ok:!1,url:e.resolvedUrl,status:500,statusText:"ERR29: "+t,arrayBuffer:()=>{throw t},json:()=>{throw t}};return{name:e.name,url:e.resolvedUrl,response:Promise.resolve(r)}}}function eo(e,r,n){m.diagnosticTracing&&console.debug(`MONO_WASM: Loaded:${e.name} as ${e.behavior} size ${n.length} from ${r}`);const o="string"==typeof e.virtualPath?e.virtualPath:e.name;let i=null;switch(e.behavior){case"dotnetwasm":case"js-module-threads":break;case"resource":case"assembly":case"pdb":zn.push({url:r,file:o});case"heap":case"icu":i=At(n),Ln[o]=[i,n.length];break;case"vfs":{const e=o.lastIndexOf("/");let r=e>0?o.substr(0,e):null,i=e>0?o.substr(e+1):o;i.startsWith("/")&&(i=i.substr(1)),r?(m.diagnosticTracing&&console.debug(`MONO_WASM: Creating directory '${r}'`),t.FS_createPath("/",r,!0,!0)):r="/",m.diagnosticTracing&&console.debug(`MONO_WASM: Creating file '${i}' in directory '${r}'`),to(n,r)||t.FS_createDataFile(r,i,n,!0,!0,!0);break}default:throw new Error(`Unrecognized asset behavior:${e.behavior}, for asset ${e.name}`)}if("assembly"===e.behavior){if(!g.mono_wasm_add_assembly(o,i,n.length)){const e=zn.findIndex((e=>e.file==o));zn.splice(e,1)}}else"icu"===e.behavior?J(i)||t.printErr(`MONO_WASM: Error loading ICU asset ${e.name}`):"resource"===e.behavior&&g.mono_wasm_add_satellite_assembly(o,e.culture||"",i,n.length);++Un}function to(e,r){if(e.length<8)return!1;const n=new DataView(e.buffer);if(1651270004!=n.getUint32(0,!0))return!1;const o=n.getUint32(4,!0);if(0==o||e.length<o+8)return!1;let i;try{const r=t.UTF8ArrayToString(e,8,o);if(i=JSON.parse(r),!(i instanceof Array))return!1}catch(e){return!1}e=e.slice(o+8);const s=new Set;i.filter((e=>{const t=e[0],r=t.lastIndexOf("/"),n=t.slice(0,r+1);s.add(n)})),s.forEach((e=>{t.FS_createPath(r,e,!0,!0)}));for(const n of i){const o=n[0],i=n[1],s=e.slice(0,i);t.FS_createDataFile(r,o,s,!0,!0),e=e.slice(i)}return!0}async function ro(){if(await $n.promise,m.config.assets){if(Fn!=Bn)throw new Error(`Assert failed: Expected ${Bn} assets to be downloaded, but only finished ${Fn}`);if(Un!=Wn)throw new Error(`Assert failed: Expected ${Wn} assets to be in memory, but only instantiated ${Un}`);zn.forEach((e=>Tn.loaded_files.push(e.url))),m.diagnosticTracing&&console.debug("MONO_WASM: all assets are loaded in wasm memory")}}function no(){return Tn.loaded_files}let oo,io;function so(e){const r=t;void 0===globalThis.performance&&(globalThis.performance=ao),void 0===globalThis.URL&&(globalThis.URL=class{constructor(e){this.url=e}toString(){return this.url}});const n=r.imports=t.imports||{},c=e=>r=>t.imports[r]||e(r);n.require?m.requirePromise=e.requirePromise=Promise.resolve(c(n.require)):e.require?m.requirePromise=e.requirePromise=Promise.resolve(c(e.require)):e.requirePromise?m.requirePromise=e.requirePromise.then((e=>c(e))):m.requirePromise=e.requirePromise=Promise.resolve(c((e=>{throw new Error(`Please provide Module.imports.${e} or Module.imports.require`)}))),m.scriptDirectory=e.scriptDirectory=function(e){return a&&(e.scriptUrl=self.location.href),e.scriptUrl||(e.scriptUrl="./dotnet.js"),e.scriptUrl=function(e){return e.replace(/\\/g,"/").replace(/[?#].*/,"")}(e.scriptUrl),function(e){return e.slice(0,e.lastIndexOf("/"))+"/"}(e.scriptUrl)}(e),r.mainScriptUrlOrBlob=e.scriptUrl,r.__locateFile===r.locateFile?r.locateFile=m.locateFile=e=>function(e){return o||i?e.startsWith("/")||e.startsWith("\\")||-1!==e.indexOf("///")||uo.test(e):lo.test(e)}(e)?e:m.scriptDirectory+e:m.locateFile=r.locateFile,n.fetch?e.fetch=m.fetch_like=n.fetch:e.fetch=m.fetch_like=co,e.noExitRuntime=s;const l=e.updateGlobalBufferAndViews;e.updateGlobalBufferAndViews=e=>{l(e),function(e){Ve&&(Et=BigInt("9223372036854775807"),kt=BigInt("-9223372036854775808"),He=new BigInt64Array(e))}(e)}}const ao={now:function(){return Date.now()}};async function co(e,r){try{if(o){if(!oo){const e=await m.requirePromise;io=e("url"),oo=e("fs")}e.startsWith("file://")&&(e=io.fileURLToPath(e));const t=await oo.promises.readFile(e);return{ok:!0,url:e,arrayBuffer:()=>t,json:()=>JSON.parse(t)}}if("function"==typeof globalThis.fetch)return globalThis.fetch(e,r||{credentials:"same-origin"});if("function"==typeof read){const r=new Uint8Array(read(e,"binary"));return{ok:!0,url:e,arrayBuffer:()=>r,json:()=>JSON.parse(t.UTF8ArrayToString(r,0,r.length))}}}catch(r){return{ok:!1,url:e,status:500,statusText:"ERR28: "+r,arrayBuffer:()=>{throw r},json:()=>{throw r}}}throw new Error("No fetch implementation available")}const lo=/^[a-zA-Z][a-zA-Z\d+\-.]*?:\/\//,uo=/[a-zA-Z]:[\\/]/;function _o(e,t,r,n,o,i){const s=Tt(e),a=Tt(t),c=Tt(i);try{const e=Kt(r);if(1!==e)throw new Error(`Assert failed: Signature version ${e} mismatch.`);const t=Or(s),o=Or(a);m.diagnosticTracing&&console.debug(`MONO_WASM: Binding [JSImport] ${t} from ${o}`);const i=po(t,o),l=Zt(r),u={fn:i,marshal_exception_to_cs:Qr,signature:r},_="_bound_js_"+t.replace(/\./g,"_");let f=`//# sourceURL=https://dotnet.generated.invalid/${_} \n`,d="",p="",w="";for(let e=0;e<l;e++){const t=(e+2)*zt,n=32*(e+2)+8,o=`arg${e}`,i=Vt(r,e+2),{converters:s,call_body:a}=cn(i,e+2,t,n,o,u);d+=s,p+=a,w+=""===w?o:`, ${o}`}const{converters:h,call_body:g,marshaler_type:y}=Cr(Vt(r,1),1,zt,40,"js_result",u);d+=h,f+=`const { signature, fn, marshal_exception_to_cs ${d} } = closure;\n`,f+=`return function ${_} (args) { try {\n`,f+=p,y===yr.Void?(f+=` const js_result = fn(${w});\n`,f+=` if (js_result !== undefined) throw new Error('Function ${t} returned unexpected value, C# signature is void');\n`):y===yr.Discard?f+=` fn(${w});\n`:(f+=` const js_result = fn(${w});\n`,f+=g);for(let e=0;e<l;e++){const t=Vt(r,e+2);if(qt(t)==yr.Span){f+=` arg${e}.dispose();\n`}}f+="} catch (ex) {\n",f+=" marshal_exception_to_cs(args, ex);\n",f+="}}";const b=new Function("closure",f)(u);b[Wt]=!0;nt(n,xe(b))}catch(e){Ao(o,e,c)}finally{c.release(),s.release()}}function fo(e,t){const r=je(e);if(!r||"function"!=typeof r||!r[Wt])throw new Error(`Assert failed: Bound function handle expected ${e}`);r(t)}function mo(e,t){Eo.set(e,t),m.diagnosticTracing&&console.debug(`MONO_WASM: added module imports '${e}'`)}function po(e,t){if(!e||"string"!=typeof e)throw new Error("Assert failed: function_name must be string");let o=n;const i=e.split(".");if(t){if(o=Eo.get(t),!o)throw new Error(`Assert failed: ES6 module ${t} was not imported yet, please call JSHost.Import() first.`)}else"INTERNAL"===i[0]?(o=r,i.shift()):"globalThis"===i[0]&&(o=globalThis,i.shift());for(let t=0;t<i.length-1;t++){const r=i[t],n=o[r];if(!n)throw new Error(`Assert failed: ${r} not found while looking up ${e}`);o=n}const s=o[i[i.length-1]];if("function"!=typeof s)throw new Error(`Assert failed: ${e} must be a Function but was ${typeof s}`);return s.bind(o)}function wo(e,t,r){if(!e)throw new Error("Assert failed: Null reference");e[t]=r}function ho(e,t){if(!e)throw new Error("Assert failed: Null reference");return e[t]}function go(e,t){if(!e)throw new Error("Assert failed: Null reference");return t in e}function yo(e,t){if(!e)throw new Error("Assert failed: Null reference");return typeof e[t]}function bo(){return globalThis}const vo=new Map,Eo=new Map;function ko(e,t){if(!e)throw new Error("Assert failed: Invalid module_name");if(!t)throw new Error("Assert failed: Invalid module_name");let r=vo.get(e);const n=!r;return n&&(m.diagnosticTracing&&console.debug(`MONO_WASM: importing ES6 module '${e}' from '${t}'`),r=import(t),vo.set(e,r)),Ue((async()=>{const o=await r;return n&&(Eo.set(e,o),m.diagnosticTracing&&console.debug(`MONO_WASM: imported ES6 module '${e}' from '${t}'`)),o}))}function Ao(e,r,n){Mr(function(e,r){let n="unknown exception";if(r){n=r.toString();const e=r.stack;e&&(e.startsWith(n)?n=e:n+="\n"+e),n=ie(n)}return e&&t.setValue(e,1,"i32"),n}(e,r),n)}const So=new Map;function jo(e,r,n,o,i){const s=Tt(e),a=Tt(i),c=t;try{const e=Kt(n);if(1!==e)throw new Error(`Assert failed: Signature version ${e} mismatch.`);const t=Zt(n),o=Or(s);if(!o)throw new Error("Assert failed: fully_qualified_name must be string");m.diagnosticTracing&&console.debug(`MONO_WASM: Binding [JSExport] ${o}`);const{assembly:i,namespace:l,classname:u,methodname:_}=Do(o),f=te(i);if(!f)throw new Error("Could not find assembly: "+i);const d=g.mono_wasm_assembly_find_class(f,l,u);if(!d)throw new Error("Could not find class: "+l+":"+u+" in assembly "+i);const p=`__Wrapper_${_}_${r}`,w=g.mono_wasm_assembly_find_method(d,p,-1);if(!w)throw new Error(`Could not find method: ${p} in ${d} [${i}]`);const h={method:w,signature:n,stackSave:c.stackSave,stackRestore:c.stackRestore,alloc_stack_frame:Lt,invoke_method_and_handle_exception:xo},y="_bound_cs_"+`${l}_${u}_${_}`.replace(/\./g,"_").replace(/\//g,"_");let b=`//# sourceURL=https://dotnet.generated.invalid/${y} \n`,v="",E="";for(let e=0;e<t;e++){const t=(e+2)*zt,r=32*(e+2)+8,o=Vt(n,e+2),{converters:i,call_body:s}=Cr(o,e+2,t,r,`arguments[${e}]`,h);E+=i,v+=s}const{converters:k,call_body:A,marshaler_type:S}=cn(Vt(n,1),1,zt,40,"js_result",h);E+=k,b+=`const { method, signature, stackSave, stackRestore, alloc_stack_frame, invoke_method_and_handle_exception ${E} } = closure;\n`,b+=`return function ${y} () {\n`,b+="const sp = stackSave();\n",b+="try {\n",b+=` const args = alloc_stack_frame(${t+2});\n`,b+=v,b+=" invoke_method_and_handle_exception(method, args);\n",S!==yr.Void&&S!==yr.Discard&&(b+=A),S!==yr.Void&&S!==yr.Discard&&(b+=" return js_result;\n"),b+="} finally {\n",b+=" stackRestore(sp);\n",b+="}}";const j=new Function("closure",b)(h);j[Bt]=!0,So.set(o,j),function(e,t,r,n,o,i){const s=`${t}.${r}`.replace(/\//g,".").split(".");let a,c=Oo.get(e);c||(c={},Oo.set(e,c),Oo.set(e+".dll",c)),a=c;for(let e=0;e<s.length;e++){const t=s[e];if(""!=t){let e=a[t];if(void 0===e&&(e={},a[t]=e),!e)throw new Error(`Assert failed: ${t} not found while looking up ${r}`);a=e}}a[n]||(a[n]=i),a[`${n}.${o}`]=i}(i,l,u,_,r,j)}catch(e){t.printErr(e.toString()),Ao(o,e,a)}finally{a.release(),s.release()}}function xo(e,t){const r=g.mono_wasm_invoke_method_bound(e,t);if(r)throw new Error("ERR24: Unexpected error: "+xr(r));if(function(e){if(!e)throw new Error("Assert failed: Null args");return Qt(e)!==yr.None}(t)){throw Sn(Ht(t,0))}}const Oo=new Map;async function No(e){if(!m.mono_wasm_bindings_is_ready)throw new Error("Assert failed: The runtime must be initialized.");if(!Oo.get(e)){const t=te(e);if(!t)throw new Error("Could not find assembly: "+e);g.mono_wasm_runtime_run_module_cctor(t)}return Oo.get(e)||{}}function Do(e){const t=e.substring(e.indexOf("[")+1,e.indexOf("]")).trim(),r=(e=e.substring(e.indexOf("]")+1).trim()).substring(e.indexOf(":")+1);let n="",o=e=e.substring(0,e.indexOf(":")).trim();if(-1!=e.indexOf(".")){const t=e.lastIndexOf(".");n=e.substring(0,t),o=e.substring(t+1)}if(!t.trim())throw new Error("No assembly name specified "+e);if(!o.trim())throw new Error("No class name specified "+e);if(!r.trim())throw new Error("No method name specified "+e);return{assembly:t,namespace:n,classname:o,methodname:r}}function Mo(e){const t=g.mono_wasm_assembly_find_method(m.runtime_interop_exports_class,e,-1);if(!t)throw"Can't find method "+m.runtime_interop_namespace+"."+m.runtime_interop_exports_classname+"."+e;return t}function To(e,t,r,n,o,i,s){const a=Tt(s);try{Po(function(e,t,r,n,o){let i=null;switch(o){case 5:i=new Int8Array(r-t);break;case 6:i=new Uint8Array(r-t);break;case 7:i=new Int16Array(r-t);break;case 8:i=new Uint16Array(r-t);break;case 9:i=new Int32Array(r-t);break;case 10:i=new Uint32Array(r-t);break;case 13:i=new Float32Array(r-t);break;case 14:i=new Float64Array(r-t);break;case 15:i=new Uint8ClampedArray(r-t);break;default:throw new Error("Unknown array type "+o)}return Ro(i,e,t,r,n),i}(e,t,r,n,o),a,!0)}catch(e){Ao(i,String(e),a)}finally{a.release()}}function Ro(e,r,n,o,i){if(Co(e)&&e.BYTES_PER_ELEMENT){if(i!==e.BYTES_PER_ELEMENT)throw new Error("Inconsistent element sizes: TypedArray.BYTES_PER_ELEMENT '"+e.BYTES_PER_ELEMENT+"' sizeof managed element: '"+i+"'");let s=(o-n)*i;const a=e.length*e.BYTES_PER_ELEMENT;s>a&&(s=a);const c=n*i;return new Uint8Array(e.buffer,0,s).set(t.HEAPU8.subarray(r+c,r+c+s)),s}throw new Error("Object '"+e+"' is not a typed array")}function Co(e){return"undefined"!=typeof SharedArrayBuffer?e.buffer instanceof ArrayBuffer||e.buffer instanceof SharedArrayBuffer:e.buffer instanceof ArrayBuffer}function Io(e,t,r){switch(!0){case null===t:case void 0===t:return void r.clear();case"symbol"==typeof t:case"string"==typeof t:return void Ei._create_uri_ref(t,r.address);default:return void Fo(e,t,r)}}function $o(e){const t=Rt();try{return Po(e,t,!1),t.value}finally{t.release()}}function Po(e,t,r){if(w(t))throw new Error("Expected (value, WasmRoot, boolean)");switch(!0){case null===e:case void 0===e:return void t.clear();case"number"==typeof e:{let r;return(0|e)===e?(rt(Cn._box_buffer,e),r=Cn._class_int32):e>>>0===e?(Ke(Cn._box_buffer,e),r=Cn._class_uint32):(lt(Cn._box_buffer,e),r=Cn._class_double),void g.mono_wasm_box_primitive_ref(r,Cn._box_buffer,8,t.address)}case"string"==typeof e:return void Mr(e,t);case"symbol"==typeof e:return void Dr(e,t);case"boolean"==typeof e:return Ye(Cn._box_buffer,e),void g.mono_wasm_box_primitive_ref(Cn._class_boolean,Cn._box_buffer,4,t.address);case!0===Fe(e):return void function(e,t){if(!e)return t.clear(),null;const r=xe(e),n=Ei._create_tcs(),o={tcs_gc_handle:n};Ne(o,n),e.then((e=>{Ei._set_tcs_result_ref(n,e)}),(e=>{Ei._set_tcs_failure(n,e?e.toString():"")})).finally((()=>{Oe(r),De(o,n)})),Ei._get_tcs_task_ref(n,t.address)}(e,t);case"Date"===e.constructor.name:return void Ei._create_date_time_ref(e.getTime(),t.address);default:return void Fo(r,e,t)}}function Fo(e,t,r){if(r.clear(),null!=t){if(void 0!==t[Ae]){return void Ko(Me(t),r.address)}if(t[Se]&&(function(e,t,r){if(0===e||-1===e)return void rt(r,0);Ei._get_cs_owned_object_by_js_handle_ref(e,t?1:0,r)}(t[Se],e,r.address),r.value||delete t[Se]),!r.value){const n=t[In],o=void 0===n?0:n,i=xe(t);Ei._create_cs_owned_proxy_ref(i,o,e?1:0,r.address)}}}function Uo(e,r){if(!Co(e)||!e.BYTES_PER_ELEMENT)throw new Error("Object '"+e+"' is not a typed array");{const n=e[In],o=function(e){const r=e.length*e.BYTES_PER_ELEMENT,n=t._malloc(r),o=new Uint8Array(t.HEAPU8.buffer,n,r);return o.set(new Uint8Array(e.buffer,e.byteOffset,r)),o}(e);g.mono_wasm_typed_array_new_ref(o.byteOffset,e.length,e.BYTES_PER_ELEMENT,n,r.address),t._free(o.byteOffset)}}function Bo(e){const t=Rt();try{return Uo(e,t),t.value}finally{t.release()}}function Wo(e,t,r){if("number"!=typeof e)throw new Error(`Expected numeric value for enum argument, got '${e}'`);return 0|e}function zo(e,t,r){const n=Tt(r);try{const r=je(e);if(w(r))return void Ao(t,"ERR06: Invalid JS object handle '"+e+"'",n);Uo(r,n)}catch(e){Ao(t,String(e),n)}finally{n.release()}}const Lo=Symbol.for("wasm delegate_invoke");function Ho(e){if(0===e)return;const t=Rt(e);try{return Jo(t)}finally{t.release()}}function Vo(e,t,r,n){switch(t){case 0:return null;case 26:case 27:throw new Error("int64 not available");case 3:case 29:return Or(e);case 4:throw new Error("no idea on how to unbox value types");case 5:return function(e){if(0===e.value)return null;return function(e){let t=Te(e);if(t)Me(t);else{t=function(...e){Me(t);return(0,t[Lo])(...e)};const r=Rt();Ko(e,r.address);try{if(void 0===t[Lo]){const n=g.mono_wasm_get_delegate_invoke_ref(r.address),o=hi(n,bi(n,r),!0);if(t[Lo]=o.bind({this_arg_gc_handle:e}),!t[Lo])throw new Error("System.Delegate Invoke method can not be resolved.")}}finally{r.release()}Ne(t,e)}return t}(Ei._get_js_owned_object_gc_handle_ref(e.address))}(e);case 6:return function(e){if(0===e.value)return null;if(!Pe)throw new Error("Promises are not supported thus 'System.Threading.Tasks.Task' can not work in this context.");const t=Ei._get_js_owned_object_gc_handle_ref(e.address);let r=Te(t);if(!r){const n=()=>De(r,t),{promise:o,promise_control:i}=Ce(n,n);r=o,Ei._setup_js_cont_ref(e.address,i),Ne(r,t)}return r}(e);case 7:return function(e){if(0===e.value)return null;const t=Ei._try_get_cs_owned_object_js_handle_ref(e.address,0);if(t){if(t===p)throw new Error("Cannot access a disposed JSObject at "+e.value);return je(t)}const r=Ei._get_js_owned_object_gc_handle_ref(e.address);let n=Te(r);return w(n)&&(n=new dr,Ne(n,r)),n}(e);case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:throw new Error("Marshaling of primitive arrays are not supported.");case 20:return new Date(Ei._get_date_value_ref(e.address));case 21:case 22:return Ei._object_to_string_ref(e.address);case 23:return function(e){return je(Ei._get_cs_owned_object_js_handle_ref(e.address,0))}(e);case 30:return;default:throw new Error(`no idea on how to unbox object of MarshalType ${t} at offset ${e.value} (root address is ${e.address})`)}}function qo(e,t,r){if(t>=512)throw new Error(`Got marshaling error ${t} when attempting to unbox object at address ${e.value} (root located at ${e.address})`);let n=0;if((4===t||7==t)&&(n=dt(r),n<1024))throw new Error(`Got invalid MonoType ${n} for object at address ${e.value} (root located at ${e.address})`);return Vo(e,t)}function Jo(e){if(0===e.value)return;const t=Cn._unbox_buffer,r=g.mono_wasm_try_unbox_primitive_and_get_type_ref(e.address,t,Cn._unbox_buffer_size);switch(r){case 1:return wt(t);case 25:case 32:return dt(t);case 24:return bt(t);case 2:return vt(t);case 8:return 0!==wt(t);case 28:return String.fromCharCode(wt(t));case 0:return null;default:return qo(e,r,t)}}function Go(e){if(0===e)return null;const t=Rt(e);try{return Xo(t)}finally{t.release()}}function Yo(e){return Ei._is_simple_array_ref(e.address)}function Xo(e){if(0===e.value)return null;const t=e.address,r=Rt(),n=r.address;try{const o=g.mono_wasm_array_length(e.value),i=new Array(o);for(let e=0;e<o;++e)g.mono_wasm_array_get_ref(t,e,n),Yo(r)?i[e]=Xo(r):i[e]=Jo(r);return i}finally{r.release()}}function Zo(e,t,r,n){const o=Tt(t),i=Tt(e),s=Tt(n);try{const t=Or(i);if(!t)return void Ao(r,"Invalid name @"+i.value,s);const n=globalThis[t];if(null==n)return void Ao(r,"JavaScript host object '"+t+"' not found.",s);try{const e=Xo(o),t=function(e,t){let r=[];r[0]=e,t&&(r=r.concat(t));return new(e.bind.apply(e,r))},r=t(n,e);Po(xe(r),s,!1)}catch(e){return void Ao(r,e,s)}}finally{s.release(),o.release(),i.release()}}function Ko(e,t){e?Ei._get_js_owned_object_by_gc_handle_ref(e,t):rt(t,0)}const Qo=new Map;function ei(e,r,n,o,i,s,a){(function(){if(!We.length)throw new Error("No temp frames have been created at this point");Le=We.pop()})(),t.stackRestore(a),"object"==typeof o&&(o.clear(),null!==r&&null===r.scratchResultRoot?r.scratchResultRoot=o:o.release()),"object"==typeof i&&(i.clear(),null!==r&&null===r.scratchExceptionRoot?r.scratchExceptionRoot=i:i.release()),"object"==typeof s&&(s.clear(),null!==r&&null===r.scratchThisArgRoot?r.scratchThisArgRoot=s:s.release())}function ti(e,t){if(!m.mono_wasm_bindings_is_ready)throw new Error("Assert failed: The runtime must be initialized.");const r=`${e}-${t}`;let n=Qo.get(r);if(void 0===n){const o=yi(e);void 0===t&&(t=bi(o,void 0)),n=hi(o,t,!1,e),Qo.set(r,n)}return n}function ri(e,t){const r=fe(e);"string"!=typeof t&&(t=bi(r,void 0));const n=hi(r,t,!1,"_"+e+"__entrypoint");return async function(...e){return e.length>0&&Array.isArray(e[0])&&(e[0]=function(e,t,r){const n=Rt();t?g.mono_wasm_string_array_new_ref(e.length,n.address):g.mono_wasm_obj_array_new_ref(e.length,n.address);const o=Rt(0),i=n.address,s=o.address;try{for(let n=0;n<e.length;++n){let a=e[n];t&&(a=a.toString()),Po(a,o,r),g.mono_wasm_obj_array_set_ref(i,n,s)}return n.value}finally{Ct(n,o)}}(e[0],!0,!1)),n(...e)}}function ni(e,t,r){if(!m.mono_wasm_bindings_is_ready)throw new Error("Assert failed: The runtime must be initialized.");return t||(t=[[]]),ri(e,r)(...t)}function oi(e,t,r,n,o){const i=Tt(r),s=Tt(t),a=Tt(o);try{const t=Or(s);if(!t||"string"!=typeof t)return void Ao(n,"ERR12: Invalid method name object @"+s.value,a);const r=function(e){return 0!==e&&-1!==e?je(e):null}(e);if(w(r))return void Ao(n,"ERR13: Invalid JS object handle '"+e+"' while invoking '"+t+"'",a);const o=Xo(i);try{const e=r[t];if(void 0===e)throw new Error("Method: '"+t+"' not found for: '"+Object.prototype.toString.call(r)+"'");Po(e.apply(r,o),a,!0)}catch(e){Ao(n,e,a)}}finally{i.release(),s.release(),a.release()}}function ii(e,t,r,n){const o=Tt(t),i=Tt(n);try{const t=Or(o);if(!t)return void Ao(r,"Invalid property name object '"+o.value+"'",i);const n=je(e);if(w(n))return void Ao(r,"ERR01: Invalid JS object handle '"+e+"' while geting '"+t+"'",i);Po(n[t],i,!0)}catch(e){Ao(r,e,i)}finally{i.release(),o.release()}}function si(e,t,r,n,o,i,s){const a=Tt(r),c=Tt(t),l=Tt(s);try{const r=Or(c);if(!r)return void Ao(i,"Invalid property name object '"+t+"'",l);const s=je(e);if(w(s))return void Ao(i,"ERR02: Invalid JS object handle '"+e+"' while setting '"+r+"'",l);let u=!1;const _=Jo(a);if(n)s[r]=_,u=!0;else{if(u=!1,!n&&!Object.prototype.hasOwnProperty.call(s,r))return void Po(!1,l,!1);!0===o?Object.prototype.hasOwnProperty.call(s,r)&&(s[r]=_,u=!0):(s[r]=_,u=!0)}Po(u,l,!1)}catch(e){Ao(i,e,l)}finally{l.release(),c.release(),a.release()}}function ai(e,t,r,n){const o=Tt(n);try{const n=je(e);if(w(n))return void Ao(r,"ERR03: Invalid JS object handle '"+e+"' while getting ["+t+"]",o);Po(n[t],o,!0)}catch(e){Ao(r,e,o)}finally{o.release()}}function ci(e,t,r,n,o){const i=Tt(r),s=Tt(o);try{const r=je(e);if(w(r))return void Ao(n,"ERR04: Invalid JS object handle '"+e+"' while setting ["+t+"]",s);const o=Jo(i);r[t]=o,s.clear()}catch(e){Ao(n,e,s)}finally{s.release(),i.release()}}function li(e,n,o){const i=Tt(e),s=Tt(o);try{const e=Or(i);let o;if(o=e?"Module"==e?t:"INTERNAL"==e?r:globalThis[e]:globalThis,null===o||void 0===typeof o)return void Ao(n,"Global object '"+e+"' not found.",s);Po(o,s,!0)}catch(e){Ao(n,e,s)}finally{s.release(),i.release()}}function ui(e,t,r,n,o){try{const e=globalThis.Blazor;if(!e)throw new Error("The blazor.webassembly.js library is not loaded.");return e._internal.invokeJSFromDotNet(t,r,n,o)}catch(t){const r=t.message+"\n"+t.stack,n=Rt();return Mr(r,n),n.copy_to_address(e),n.release(),0}}const _i=/[^A-Za-z0-9_$]/g,fi=new Map,di=new Map,mi=new Map;function pi(e,t,r,n){let o=null,i=null,s=null;if(n){s=Object.keys(n),i=new Array(s.length);for(let e=0,t=s.length;e<t;e++)i[e]=n[s[e]]}return o=function(e,t,r,n){const o='"use strict";\r\n';let i="",s="";e?(i="//# sourceURL=https://dotnet.generated.invalid/"+e+"\r\n",s=e):s="unnamed";let a="function "+s+"("+t.join(", ")+") {\r\n"+r+"\r\n};\r\n";const c=/\r(\n?)/g;a=i+o+a.replace(c,"\r\n ")+` return ${s};\r\n`;let l=null,u=null;return u=n?n.concat([a]):[a],l=Function.apply(Function,u),l}(e,t,r,s).apply(null,i),o}function wi(e){let t=di.get(e);return t||(t=function(e){const t=[];let r=0,n=!1,o=!1,i=-1,s=!1;for(let a=0;a<e.length;++a){const c=e[a];if(a===e.length-1){if("!"===c){n=!0;continue}"m"===c&&(o=!0,i=e.length-1)}else if("!"===c)throw new Error("! must be at the end of the signature");const l=fi.get(c);if(!l)throw new Error("Unknown parameter type "+c);const u=Object.create(l.steps[0]);u.size=l.size,l.needs_root&&(s=!0),u.needs_root=l.needs_root,u.key=c,t.push(u),r+=l.size}return{steps:t,size:r,args_marshal:e,is_result_definitely_unmarshaled:n,is_result_possibly_unmarshaled:o,result_unmarshaled_if_argc:i,needs_root_buffer:s}}(e),di.set(e,t)),t}function hi(e,r,n,o){if("string"!=typeof r)throw new Error("args_marshal argument invalid, expected string");const i=`managed_${e}_${r}`;let s=mi.get(i);if(s)return s;o||(o=i);let a=null;"string"==typeof r&&(a=function(e){const r=wi(e);if("string"!=typeof r.args_marshal)throw new Error("Corrupt converter for '"+e+"'");if(r.compiled_function&&r.compiled_variadic_function)return r;const n=e.replace("!","_result_unmarshaled");r.name=n;let o=[],i=["method"];const s={Module:t,setI32:nt,setU32:Qe,setF32:ct,setF64:lt,setU52:st,setI52:it,setB32:Ye,setI32_unchecked:rt,setU32_unchecked:Ke,scratchValueRoot:r.scratchValueRoot,stackAlloc:t.stackAlloc,_zero_region:Ge};let a=0;const c=8*((4*e.length+7)/8|0),l=r.size+4*e.length+16;o.push("if (!method) throw new Error('no method provided');",`const buffer = stackAlloc(${l});`,`_zero_region(buffer, ${l});`,`const indirectStart = buffer + ${c};`,"");for(let e=0;e<r.steps.length;e++){const n=r.steps[e],c="step"+e,l="value"+e,u="arg"+e,_=`(indirectStart + ${a})`;if(i.push(u),n.convert_root){if(n.indirect)throw new Error("Assert failed: converter step cannot both be rooted and indirect");if(!r.scratchValueRoot){const e=t.stackSave();r.scratchValueRoot=Tt(e),s.scratchValueRoot=r.scratchValueRoot}s[c]=n.convert_root,o.push(`scratchValueRoot._set_address(${_});`),o.push(`${c}(${u}, scratchValueRoot);`),n.byref?o.push(`let ${l} = ${_};`):o.push(`let ${l} = scratchValueRoot.value;`)}else n.convert?(s[c]=n.convert,o.push(`let ${l} = ${c}(${u}, method, ${e});`)):o.push(`let ${l} = ${u};`);if(n.needs_root&&!n.convert_root&&(o.push("if (!rootBuffer) throw new Error('no root buffer provided');"),o.push(`rootBuffer.set (${e}, ${l});`)),n.indirect){switch(n.indirect){case"bool":o.push(`setB32(${_}, ${l});`);break;case"u32":o.push(`setU32(${_}, ${l});`);break;case"i32":o.push(`setI32(${_}, ${l});`);break;case"float":o.push(`setF32(${_}, ${l});`);break;case"double":o.push(`setF64(${_}, ${l});`);break;case"i52":o.push(`setI52(${_}, ${l});`);break;case"u52":o.push(`setU52(${_}, ${l});`);break;default:throw new Error("Unimplemented indirect type: "+n.indirect)}o.push(`setU32_unchecked(buffer + (${e} * 4), ${_});`),a+=n.size}else o.push(`setU32_unchecked(buffer + (${e} * 4), ${l});`),a+=4;o.push("")}o.push("return buffer;");let u=o.join("\r\n"),_=null,f=null;try{_=pi("converter_"+n,i,u,s),r.compiled_function=_}catch(e){throw r.compiled_function=null,console.warn("MONO_WASM: compiling converter failed for",u,"with error",e),e}i=["method","args"];const d={converter:_};o=["return converter("," method,"];for(let e=0;e<r.steps.length;e++)o.push(" args["+e+(e==r.steps.length-1?"]":"], "));o.push(");"),u=o.join("\r\n");try{f=pi("variadic_converter_"+n,i,u,d),r.compiled_variadic_function=f}catch(e){throw r.compiled_variadic_function=null,console.warn("MONO_WASM: compiling converter failed for",u,"with error",e),e}return r.scratchRootBuffer=null,r.scratchBuffer=0,r}(r));const c=t._malloc(128),l={method:e,converter:a,scratchRootBuffer:null,scratchBuffer:0,scratchResultRoot:Rt(),scratchExceptionRoot:Rt(),scratchThisArgRoot:Rt()},u={Module:t,mono_wasm_new_root:Rt,get_js_owned_object_by_gc_handle_ref:Ko,_create_temp_frame:qe,_handle_exception_for_call:gi,_teardown_after_call:ei,mono_wasm_try_unbox_primitive_and_get_type_ref:g.mono_wasm_try_unbox_primitive_and_get_type_ref,_unbox_mono_obj_root_with_known_nonprimitive_type:qo,invoke_method_ref:g.mono_wasm_invoke_method_ref,method:e,token:l,unbox_buffer:c,unbox_buffer_size:128,getB32:ut,getI32:wt,getU32:dt,getF32:bt,getF64:vt,stackSave:t.stackSave},_=a?"converter_"+a.name:"";a&&(u[_]=a);const f=[],d=["_create_temp_frame();","let resultRoot = token.scratchResultRoot, exceptionRoot = token.scratchExceptionRoot, thisArgRoot = token.scratchThisArgRoot , sp = stackSave();","token.scratchResultRoot = null;","token.scratchExceptionRoot = null;","token.scratchThisArgRoot = null;","if (resultRoot === null)","\tresultRoot = mono_wasm_new_root ();","if (exceptionRoot === null)","\texceptionRoot = mono_wasm_new_root ();","if (thisArgRoot === null)","\tthisArgRoot = mono_wasm_new_root ();",""];if(a){d.push(`let buffer = ${_}.compiled_function(`," method,");for(let e=0;e<a.steps.length;e++){const t="arg"+e;f.push(t),d.push(" "+t+(e==a.steps.length-1?"":", "))}d.push(");")}else d.push("let buffer = 0;");if(a&&a.is_result_definitely_unmarshaled?d.push("let is_result_marshaled = false;"):a&&a.is_result_possibly_unmarshaled?d.push(`let is_result_marshaled = arguments.length !== ${a.result_unmarshaled_if_argc};`):d.push("let is_result_marshaled = true;"),d.push("","",""),n?(d.push("get_js_owned_object_by_gc_handle_ref(this.this_arg_gc_handle, thisArgRoot.address);"),d.push("invoke_method_ref (method, thisArgRoot.address, buffer, exceptionRoot.address, resultRoot.address);")):d.push("invoke_method_ref (method, 0, buffer, exceptionRoot.address, resultRoot.address);"),d.push(`_handle_exception_for_call (${_}, token, buffer, resultRoot, exceptionRoot, thisArgRoot, sp);`,"","let resultPtr = resultRoot.value, result = undefined;"),!a)throw new Error("No converter");a.is_result_possibly_unmarshaled&&d.push("if (!is_result_marshaled) "),(a.is_result_definitely_unmarshaled||a.is_result_possibly_unmarshaled)&&d.push(" result = resultPtr;"),a.is_result_definitely_unmarshaled||d.push("if (is_result_marshaled) {"," let resultType = mono_wasm_try_unbox_primitive_and_get_type_ref (resultRoot.address, unbox_buffer, unbox_buffer_size);"," switch (resultType) {"," case 1:"," result = getI32(unbox_buffer); break;"," case 32:"," case 25:"," result = getU32(unbox_buffer); break;"," case 24:"," result = getF32(unbox_buffer); break;"," case 2:"," result = getF64(unbox_buffer); break;"," case 8:"," result = getB32(unbox_buffer); break;"," case 28:"," result = String.fromCharCode(getI32(unbox_buffer)); break;"," case 0:"," result = null; break;"," default:"," result = _unbox_mono_obj_root_with_known_nonprimitive_type (resultRoot, resultType, unbox_buffer); break;"," }","}");let m=o.replace(_i,"_");n&&(m+="_this"),d.push(`_teardown_after_call (${_}, token, buffer, resultRoot, exceptionRoot, thisArgRoot, sp);`,"return result;");return s=pi(m,f,d.join("\r\n"),u),mi.set(i,s),s}function gi(e,t,r,n,o,i,s){const a=function(e,t){if(0===t.value)return null;const r=Or(e);return new Error(r)}(n,o);if(a)throw ei(0,t,0,n,o,i,s),a}function yi(e){const{assembly:t,namespace:r,classname:n,methodname:o}=Do(e),i=g.mono_wasm_assembly_load(t);if(!i)throw new Error("Could not find assembly: "+t);const s=g.mono_wasm_assembly_find_class(i,r,n);if(!s)throw new Error("Could not find class: "+r+":"+n+" in assembly "+t);const a=g.mono_wasm_assembly_find_method(s,o,-1);if(!a)throw new Error("Could not find method: "+o);return a}function bi(e,t){return Ei._get_call_sig_ref(e,t?t.address:Cn._null_root.address)}const vi=[[!0,"_get_cs_owned_object_by_js_handle_ref","GetCSOwnedObjectByJSHandleRef","iim"],[!0,"_get_cs_owned_object_js_handle_ref","GetCSOwnedObjectJSHandleRef","mi"],[!0,"_try_get_cs_owned_object_js_handle_ref","TryGetCSOwnedObjectJSHandleRef","mi"],[!1,"_create_cs_owned_proxy_ref","CreateCSOwnedProxyRef","iiim"],[!1,"_get_js_owned_object_by_gc_handle_ref","GetJSOwnedObjectByGCHandleRef","im"],[!0,"_get_js_owned_object_gc_handle_ref","GetJSOwnedObjectGCHandleRef","m"],[!0,"_create_tcs","CreateTaskSource",""],[!0,"_set_tcs_result_ref","SetTaskSourceResultRef","iR"],[!0,"_set_tcs_failure","SetTaskSourceFailure","is"],[!0,"_get_tcs_task_ref","GetTaskSourceTaskRef","im"],[!0,"_setup_js_cont_ref","SetupJSContinuationRef","mo"],[!0,"_object_to_string_ref","ObjectToStringRef","m"],[!0,"_get_date_value_ref","GetDateValueRef","m"],[!0,"_create_date_time_ref","CreateDateTimeRef","dm"],[!0,"_create_uri_ref","CreateUriRef","sm"],[!0,"_is_simple_array_ref","IsSimpleArrayRef","m"],[!1,"_get_call_sig_ref","GetCallSignatureRef","im"]],Ei={};function ki(e,t){return hi(function(e){const t=g.mono_wasm_assembly_find_method(Cn.runtime_legacy_exports_class,e,-1);if(!t)throw"Can't find method "+m.runtime_interop_namespace+"."+Cn.runtime_legacy_exports_classname+"."+e;return t}(e),t,!1,"BINDINGS_"+e)}function Ai(){Object.prototype[In]=0,Array.prototype[In]=1,ArrayBuffer.prototype[In]=2,DataView.prototype[In]=3,Function.prototype[In]=4,Uint8Array.prototype[In]=11;if(Cn._unbox_buffer_size=65536,Cn._box_buffer=t._malloc(65536),Cn._unbox_buffer=t._malloc(Cn._unbox_buffer_size),Cn._class_int32=re("System","Int32"),Cn._class_uint32=re("System","UInt32"),Cn._class_double=re("System","Double"),Cn._class_boolean=re("System","Boolean"),Cn._null_root=Rt(),function(){const e=fi;e.set("m",{steps:[{}],size:0}),e.set("s",{steps:[{convert_root:Mr.bind(Rn)}],size:0,needs_root:!0}),e.set("S",{steps:[{convert_root:Dr.bind(Rn)}],size:0,needs_root:!0}),e.set("o",{steps:[{convert_root:Po.bind(Rn)}],size:0,needs_root:!0}),e.set("u",{steps:[{convert_root:Io.bind(Rn,!1)}],size:0,needs_root:!0}),e.set("R",{steps:[{convert_root:Po.bind(Rn),byref:!0}],size:0,needs_root:!0}),e.set("j",{steps:[{convert:Wo.bind(Rn),indirect:"i32"}],size:8}),e.set("b",{steps:[{indirect:"bool"}],size:8}),e.set("i",{steps:[{indirect:"i32"}],size:8}),e.set("I",{steps:[{indirect:"u32"}],size:8}),e.set("l",{steps:[{indirect:"i52"}],size:8}),e.set("L",{steps:[{indirect:"u52"}],size:8}),e.set("f",{steps:[{indirect:"float"}],size:8}),e.set("d",{steps:[{indirect:"double"}],size:8})}(),Cn.runtime_legacy_exports_classname="LegacyExports",Cn.runtime_legacy_exports_class=g.mono_wasm_assembly_find_class(m.runtime_interop_module,m.runtime_interop_namespace,Cn.runtime_legacy_exports_classname),!Cn.runtime_legacy_exports_class)throw"Can't find "+m.runtime_interop_namespace+"."+m.runtime_interop_exports_classname+" class";for(const e of vi){const t=Ei,[r,n,o,i]=e;if(r)t[n]=function(...e){const r=ki(o,i);return t[n]=r,r(...e)};else{const e=ki(o,i);t[n]=e}}}function Si(){return"undefined"!=typeof Response&&"body"in Response.prototype&&"function"==typeof ReadableStream}function ji(){return new AbortController}function xi(e){e.abort()}function Oi(e){e.__abort_controller.abort(),e.__reader&&e.__reader.cancel().catch((e=>{e&&"AbortError"!==e.name&&t.printErr("MONO_WASM: Error in http_wasm_abort_response: "+e)}))}function Ni(e,t,r,n,o,i,s,a){return Di(e,t,r,n,o,i,new hr(s,a,0).slice())}function Di(e,t,r,n,o,i,s){if(!e||"string"!=typeof e)throw new Error("Assert failed: expected url string");if(!(t&&r&&Array.isArray(t)&&Array.isArray(r)&&t.length===r.length))throw new Error("Assert failed: expected headerNames and headerValues arrays");if(!(n&&o&&Array.isArray(n)&&Array.isArray(o)&&n.length===o.length))throw new Error("Assert failed: expected headerNames and headerValues arrays");const a=new Headers;for(let e=0;e<t.length;e++)a.append(t[e],r[e]);const c={body:s,headers:a,signal:i.signal};for(let e=0;e<n.length;e++)c[n[e]]=o[e];return Ue((async()=>{const t=await fetch(e,c);return t.__abort_controller=i,t}))}function Mi(e){if(!e.__headerNames){e.__headerNames=[],e.__headerValues=[];const t=e.headers.entries();for(const r of t)e.__headerNames.push(r[0]),e.__headerValues.push(r[1])}}function Ti(e){return Mi(e),e.__headerNames}function Ri(e){return Mi(e),e.__headerValues}function Ci(e){return Ue((async()=>{const t=await e.arrayBuffer();return e.__buffer=t,e.__source_offset=0,t.byteLength}))}function Ii(e,t){if(!e.__buffer)throw new Error("Assert failed: expected resoved arrayBuffer");if(e.__source_offset==e.__buffer.byteLength)return 0;const r=new Uint8Array(e.__buffer,e.__source_offset);t.set(r,0);const n=Math.min(t.byteLength,r.byteLength);return e.__source_offset+=n,n}function $i(e,t,r){const n=new hr(t,r,0);return Ue((async()=>{if(e.__reader||(e.__reader=e.body.getReader()),e.__chunk||(e.__chunk=await e.__reader.read(),e.__source_offset=0),e.__chunk.done)return 0;const t=e.__chunk.value.byteLength-e.__source_offset;if(!(t>0))throw new Error("Assert failed: expected remaining_source to be greater than 0");const r=Math.min(t,n.byteLength),o=e.__chunk.value.subarray(e.__source_offset,e.__source_offset+r);return n.set(o,0),e.__source_offset+=r,t==r&&(e.__chunk=void 0),r}))}let Pi,Fi=0,Ui=!1,Bi=0;if(globalThis.navigator){const e=globalThis.navigator;e.userAgentData&&e.userAgentData.brands?Ui=e.userAgentData.brands.some((e=>"Chromium"==e.brand)):e.userAgent&&(Ui=e.userAgent.includes("Chrome"))}function Wi(){for(;Bi>0;)--Bi,g.mono_background_exec()}function zi(){if(!Ui)return;const e=(new Date).valueOf(),t=e+36e4;for(let r=Math.max(e+1e3,Fi);r<t;r+=1e3){setTimeout((()=>{g.mono_set_timeout_exec(),Bi++,Wi()}),r-e)}Fi=t}function Li(){++Bi,setTimeout(Wi,0)}function Hi(e){Pi&&(clearTimeout(Pi),Pi=void 0),Pi=setTimeout((function(){g.mono_set_timeout_exec()}),e)}class Vi{constructor(){this.queue=[],this.offset=0}getLength(){return this.queue.length-this.offset}isEmpty(){return 0==this.queue.length}enqueue(e){this.queue.push(e)}dequeue(){if(0===this.queue.length)return;const e=this.queue[this.offset];return this.queue[this.offset]=null,2*++this.offset>=this.queue.length&&(this.queue=this.queue.slice(this.offset),this.offset=0),e}peek(){return this.queue.length>0?this.queue[this.offset]:void 0}drain(e){for(;this.getLength();){e(this.dequeue())}}}const qi=Symbol.for("wasm ws_pending_send_buffer"),Ji=Symbol.for("wasm ws_pending_send_buffer_offset"),Gi=Symbol.for("wasm ws_pending_send_buffer_type"),Yi=Symbol.for("wasm ws_pending_receive_event_queue"),Xi=Symbol.for("wasm ws_pending_receive_promise_queue"),Zi=Symbol.for("wasm ws_pending_open_promise"),Ki=Symbol.for("wasm ws_pending_close_promises"),Qi=Symbol.for("wasm ws_pending_send_promises"),es=Symbol.for("wasm ws_is_aborted"),ts=Symbol.for("wasm ws_receive_status_ptr");let rs,ns,os=!1;const is=new Uint8Array;function ss(e,t,r,n){if(!e||"string"!=typeof e)throw new Error("Assert failed: ERR12: Invalid uri "+typeof e);const o=new globalThis.WebSocket(e,t||void 0),{promise_control:i}=Ce();o[Yi]=new Vi,o[Xi]=new Vi,o[Zi]=i,o[Qi]=[],o[Ki]=[],o[ts]=r,o.binaryType="arraybuffer";const s=e=>{o[es]||(function(e,t){const r=e[Yi],n=e[Xi];if("string"==typeof t.data)void 0===ns&&(ns=new TextEncoder),r.enqueue({type:0,data:ns.encode(t.data),offset:0});else{if("ArrayBuffer"!==t.data.constructor.name)throw new Error("ERR19: WebSocket receive expected ArrayBuffer");r.enqueue({type:1,data:new Uint8Array(t.data),offset:0})}if(n.getLength()&&r.getLength()>1)throw new Error("ERR21: Invalid WS state");for(;n.getLength()&&r.getLength();){const t=n.dequeue();fs(e,r,t.buffer_ptr,t.buffer_length),t.resolve()}zi()}(o,e),zi())};return o.addEventListener("message",s),o.addEventListener("open",(()=>{o[es]||(i.resolve(o),zi())}),{once:!0}),o.addEventListener("close",(e=>{if(o.removeEventListener("message",s),o[es])return;n&&n(e.code,e.reason),i.reject(e.reason);for(const e of o[Ki])e.resolve();o[Xi].drain((e=>{nt(r,0),nt(r+4,2),nt(r+8,1),e.resolve()}))}),{once:!0}),o.addEventListener("error",(e=>{i.reject(e.message||"WebSocket error")}),{once:!0}),o}function as(e){if(!e)throw new Error("Assert failed: ERR17: expected ws instance");return e[Zi].promise}function cs(e,r,n,o,i){if(!e)throw new Error("Assert failed: ERR17: expected ws instance");const s=function(e,t,r,n){let o=e[qi],i=0;const s=t.byteLength;if(o){if(i=e[Ji],r=e[Gi],0!==s){if(i+s>o.length){const r=new Uint8Array(1.5*(i+s+50));r.set(o,0),r.subarray(i).set(t),e[qi]=o=r}else o.subarray(i).set(t);i+=s,e[Ji]=i}}else n?0!==s&&(o=t,i=s):(0!==s&&(o=t.slice(),i=s,e[Ji]=i,e[qi]=o),e[Gi]=r);if(n){if(0==i||null==o)return is;if(0===r){void 0===rs&&(rs=new TextDecoder("utf-8",{fatal:!1}));const e="undefined"!=typeof SharedArrayBuffer&&o instanceof SharedArrayBuffer?o.slice(0,i):o.subarray(0,i);return rs.decode(e)}return o.subarray(0,i)}return null}(e,new Uint8Array(t.HEAPU8.buffer,r,n),o,i);return i&&s?function(e,t){if(e.send(t),e[qi]=null,e.bufferedAmount<65536)return null;const{promise:r,promise_control:n}=Ce(),o=e[Qi];o.push(n);let i=1;const s=()=>{if(0===e.bufferedAmount)n.resolve();else if(e.readyState!=WebSocket.OPEN)n.reject("InvalidState: The WebSocket is not connected.");else if(!n.isDone)return globalThis.setTimeout(s,i),void(i=Math.min(1.5*i,1e3));const t=o.indexOf(n);t>-1&&o.splice(t,1)};return globalThis.setTimeout(s,0),r}(e,s):null}function ls(e,t,r){if(!e)throw new Error("Assert failed: ERR18: expected ws instance");const n=e[Yi],o=e[Xi],i=e.readyState;if(i!=WebSocket.OPEN&&i!=WebSocket.CLOSING)throw new Error("InvalidState: The WebSocket is not connected.");if(n.getLength()){if(0!=o.getLength())throw new Error("Assert failed: ERR20: Invalid WS state");return fs(e,n,t,r),null}const{promise:s,promise_control:a}=Ce(),c=a;return c.buffer_ptr=t,c.buffer_length=r,o.enqueue(c),s}function us(e,t,r,n){if(!e)throw new Error("Assert failed: ERR19: expected ws instance");if(e.readyState==WebSocket.CLOSED)return null;if(n){const{promise:n,promise_control:o}=Ce();return e[Ki].push(o),"string"==typeof r?e.close(t,r):e.close(t),n}return os||(os=!0,console.warn("WARNING: Web browsers do not support closing the output side of a WebSocket. CloseOutputAsync has closed the socket and discarded any incoming messages.")),"string"==typeof r?e.close(t,r):e.close(t),null}function _s(e){if(!e)throw new Error("Assert failed: ERR18: expected ws instance");e[es]=!0;const t=e[Zi];t&&t.reject("OperationCanceledException");for(const t of e[Ki])t.reject("OperationCanceledException");for(const t of e[Qi])t.reject("OperationCanceledException");e[Xi].drain((e=>{e.reject("OperationCanceledException")})),e.close(1e3,"Connection was aborted.")}function fs(e,r,n,o){const i=r.peek(),s=Math.min(o,i.data.length-i.offset);if(s>0){const e=i.data.subarray(i.offset,i.offset+s);new Uint8Array(t.HEAPU8.buffer,n,o).set(e,0),i.offset+=s}const a=i.data.length===i.offset?1:0;a&&r.dequeue();const c=e[ts];nt(c,s),nt(c+4,i.type),nt(c+8,a)}function ds(){return{mono_wasm_exit:e=>{t.printErr("MONO_WASM: early exit "+e)},mono_wasm_enable_on_demand_gc:g.mono_wasm_enable_on_demand_gc,mono_profiler_init_aot:g.mono_profiler_init_aot,mono_wasm_exec_regression:g.mono_wasm_exec_regression,mono_method_resolve:yi,mono_intern_string:Nr,logging:void 0,mono_wasm_stringify_as_error_with_stack:se,mono_wasm_get_loaded_files:no,mono_wasm_send_dbg_command_with_parms:T,mono_wasm_send_dbg_command:R,mono_wasm_get_dbg_command_info:C,mono_wasm_get_details:z,mono_wasm_release_object:H,mono_wasm_call_function_on:W,mono_wasm_debugger_resume:I,mono_wasm_detach_debugger:$,mono_wasm_raise_debug_event:F,mono_wasm_change_debugger_log_level:P,mono_wasm_debugger_attached:U,mono_wasm_runtime_is_ready:m.mono_wasm_runtime_is_ready,get_property:ho,set_property:wo,has_property:go,get_typeof_property:yo,get_global_this:bo,get_dotnet_instance:()=>l,dynamic_import:ko,mono_wasm_cancel_promise:Be,ws_wasm_create:ss,ws_wasm_open:as,ws_wasm_send:cs,ws_wasm_receive:ls,ws_wasm_close:us,ws_wasm_abort:_s,http_wasm_supports_streaming_response:Si,http_wasm_create_abort_controler:ji,http_wasm_abort_request:xi,http_wasm_abort_response:Oi,http_wasm_fetch:Di,http_wasm_fetch_bytes:Ni,http_wasm_get_response_header_names:Ti,http_wasm_get_response_header_values:Ri,http_wasm_get_response_bytes:Ii,http_wasm_get_response_length:Ci,http_wasm_get_streamed_response_bytes:$i}}function ms(){}let ps,ws=!1,hs=!1;const gs=Ce(),ys=Ce(),bs=Ce(),vs=Ce(),Es=Ce(),ks=Ce(),As=Ce(),Ss=Ce(),js=Ce();function xs(e,t){const r=e.instantiateWasm,n=e.preInit?"function"==typeof e.preInit?[e.preInit]:e.preInit:[],o=e.preRun?"function"==typeof e.preRun?[e.preRun]:e.preRun:[],i=e.postRun?"function"==typeof e.postRun?[e.postRun]:e.postRun:[],s=e.onRuntimeInitialized?e.onRuntimeInitialized:()=>{};hs=!(e.configSrc||e.config&&e.config.assets&&-1!=e.config.assets.findIndex((e=>"assembly"===e.behavior))),e.instantiateWasm=(e,t)=>Os(e,t,r),e.preInit=[()=>Ns(n)],e.preRun=[()=>Ds(o)],e.onRuntimeInitialized=()=>async function(e){await ks.promise,m.diagnosticTracing&&console.debug("MONO_WASM: onRuntimeInitialized"),As.promise_control.resolve();try{hs||(await ro(),await async function(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_before_user_runtime_initialized");try{await async function(){try{Cs("TZ",Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC")}catch(e){Cs("TZ","UTC")}for(const e in ps.environmentVariables){const t=ps.environmentVariables[e];if("string"!=typeof t)throw new Error(`Expected environment variable '${e}' to be a string but it was ${typeof t}: '${t}'`);Cs(e,t)}ps.runtimeOptions&&Is(ps.runtimeOptions),ps.aotProfilerOptions&&X(ps.aotProfilerOptions),ps.coverageProfilerOptions&&Z(ps.coverageProfilerOptions)}(),Y(),m.mono_wasm_load_runtime_done||$s("unused",ps.debugLevel),m.mono_wasm_runtime_is_ready||O(),m.mono_wasm_symbols_are_ready||le("dotnet.js.symbols"),setTimeout((()=>{Sr.init_fields()}))}catch(e){throw Rs("MONO_WASM: Error in mono_wasm_before_user_runtime_initialized",e),e}}()),ps.runtimeOptions&&Is(ps.runtimeOptions);try{e()}catch(e){throw Rs("MONO_WASM: user callback onRuntimeInitialized() failed",e),e}await Ts()}catch(e){throw Rs("MONO_WASM: onRuntimeInitializedAsync() failed",e),Ms(e,!0),e}Ss.promise_control.resolve()}(s),e.postRun=[()=>async function(e){await Ss.promise,m.diagnosticTracing&&console.debug("MONO_WASM: postRunAsync");try{e.map((e=>e()))}catch(e){throw Rs("MONO_WASM: user callback posRun() failed",e),Ms(e,!0),e}js.promise_control.resolve()}(i)],e.ready.then((async()=>{await js.promise,gs.promise_control.resolve(t)})).catch((e=>{gs.promise_control.reject(e)})),e.ready=gs.promise,e.onAbort||(e.onAbort=()=>de)}function Os(e,r,n){if(t.configSrc||t.config||n||t.print("MONO_WASM: configSrc nor config was specified"),ps=t.config?m.config=t.config:m.config=t.config={},m.diagnosticTracing=!!ps.diagnosticTracing,n){return n(e,((e,t)=>{bs.promise_control.resolve(),r(e,t)}))}return async function(e,r){try{await Ps(t.configSrc),m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module");const n=function(e){var t;const r=null===(t=m.config.assets)||void 0===t?void 0:t.find((t=>t.behavior==e));if(!r)throw new Error(`Assert failed: Can't find asset for ${e}`);return r.resolvedUrl||(r.resolvedUrl=Kn(r,"")),r}("dotnetwasm");await Xn(n,!1),await vs.promise,t.addRunDependency("instantiate_wasm_module"),async function(e,t,r){if(!(e&&e.pendingDownloadInternal&&e.pendingDownloadInternal.response))throw new Error("Assert failed: Can't load dotnet.wasm");const n=await e.pendingDownloadInternal.response,o=n.headers&&n.headers.get?n.headers.get("Content-Type"):void 0;let i,a;if("function"==typeof WebAssembly.instantiateStreaming&&"application/wasm"===o){m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module streaming");const e=await WebAssembly.instantiateStreaming(n,t);i=e.instance,a=e.module}else{s&&"application/wasm"!==o&&console.warn('MONO_WASM: WebAssembly resource does not have the expected content type "application/wasm", so falling back to slower ArrayBuffer instantiation.');const e=await n.arrayBuffer();m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module buffered");const r=await WebAssembly.instantiate(e,t);i=r.instance,a=r.module}r(i,a)}(n,e,r),m.diagnosticTracing&&console.debug("MONO_WASM: instantiate_wasm_module done"),bs.promise_control.resolve()}catch(e){throw Rs("MONO_WASM: instantiate_wasm_module() failed",e),Ms(e,!0),e}t.removeRunDependency("instantiate_wasm_module")}(e,r),[]}function Ns(e){t.addRunDependency("mono_pre_init");try{t.addRunDependency("mono_wasm_pre_init_essential"),m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_pre_init_essential"),function(){const e=!!c;for(const r of h){const n=g,[o,i,s,a,c]=r;if(o||e)n[i]=function(...e){const r=t.cwrap(i,s,a,c);return n[i]=r,r(...e)};else{const e=t.cwrap(i,s,a,c);n[i]=e}}}(),function(e){Object.assign(e,{mono_wasm_exit:g.mono_wasm_exit,mono_wasm_enable_on_demand_gc:g.mono_wasm_enable_on_demand_gc,mono_profiler_init_aot:g.mono_profiler_init_aot,mono_wasm_exec_regression:g.mono_wasm_exec_regression})}(r),function(e){Object.assign(e,{mono_wasm_add_assembly:g.mono_wasm_add_assembly})}(Tn),function(e){Object.assign(e,{mono_obj_array_new:g.mono_wasm_obj_array_new,mono_obj_array_set:g.mono_wasm_obj_array_set,mono_obj_array_new_ref:g.mono_wasm_obj_array_new_ref,mono_obj_array_set_ref:g.mono_wasm_obj_array_set_ref})}(Rn),t.removeRunDependency("mono_wasm_pre_init_essential"),m.diagnosticTracing&&console.debug("MONO_WASM: preInit"),vs.promise_control.resolve(),e.forEach((e=>e()))}catch(e){throw Rs("MONO_WASM: user preInint() failed",e),Ms(e,!0),e}(async()=>{try{await async function(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_pre_init_essential_async"),t.addRunDependency("mono_wasm_pre_init_essential_async"),await async function(){if(o){if(r.require=await m.requirePromise,globalThis.performance===ao){const{performance:e}=r.require("perf_hooks");globalThis.performance=e}if(globalThis.crypto||(globalThis.crypto={}),!globalThis.crypto.getRandomValues){let e;try{e=r.require("node:crypto")}catch(e){}e?e.webcrypto?globalThis.crypto=e.webcrypto:e.randomBytes&&(globalThis.crypto.getRandomValues=t=>{t&&t.set(e.randomBytes(t.length))}):globalThis.crypto.getRandomValues=()=>{throw new Error("Using node without crypto support. To enable current operation, either provide polyfill for 'globalThis.crypto.getRandomValues' or enable 'node:crypto' module.")}}}}(),await Ps(t.configSrc),t.removeRunDependency("mono_wasm_pre_init_essential_async")}(),hs||await async function(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_pre_init_full"),t.addRunDependency("mono_wasm_pre_init_full"),await Yn(),t.removeRunDependency("mono_wasm_pre_init_full")}()}catch(e){throw Ms(e,!0),e}Es.promise_control.resolve(),t.removeRunDependency("mono_pre_init")})()}async function Ds(e){t.addRunDependency("mono_pre_run_async"),await bs.promise,await Es.promise,m.diagnosticTracing&&console.debug("MONO_WASM: preRunAsync");try{e.map((e=>e()))}catch(e){throw Rs("MONO_WASM: user callback preRun() failed",e),Ms(e,!0),e}ks.promise_control.resolve(),t.removeRunDependency("mono_pre_run_async")}function Ms(e,t){m.diagnosticTracing&&console.trace("MONO_WASM: abort_startup"),gs.promise_control.reject(e),bs.promise_control.reject(e),vs.promise_control.reject(e),Es.promise_control.reject(e),ks.promise_control.reject(e),As.promise_control.reject(e),Ss.promise_control.reject(e),js.promise_control.reject(e),t&&me(1,e)}async function Ts(){m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_after_user_runtime_initialized");try{if(!t.disableDotnet6Compatibility&&t.exports){const e=globalThis;for(let r=0;r<t.exports.length;++r){const n=t.exports[r],o=t[n];null!=o?e[n]=o:console.warn(`MONO_WASM: The exported symbol ${n} could not be found in the emscripten module`)}}if(m.diagnosticTracing&&console.debug("MONO_WASM: Initializing mono runtime"),t.onDotnetReady)try{await t.onDotnetReady()}catch(e){throw Rs("MONO_WASM: onDotnetReady () failed",e),e}}catch(e){throw Rs("MONO_WASM: Error in mono_wasm_after_user_runtime_initialized",e),e}}function Rs(e,r){t.printErr(`${e}: ${JSON.stringify(r)}`),r.stack&&(t.printErr("MONO_WASM: Stacktrace: \n"),t.printErr(r.stack))}function Cs(e,t){g.mono_wasm_setenv(e,t)}function Is(e){if(!Array.isArray(e))throw new Error("Expected runtimeOptions to be an array of strings");const r=t._malloc(4*e.length);let n=0;for(let o=0;o<e.length;++o){const i=e[o];if("string"!=typeof i)throw new Error("Expected runtimeOptions to be an array of strings");t.setValue(r+4*n,g.mono_wasm_strdup(i),"i32"),n+=1}g.mono_wasm_parse_runtime_options(e.length,r)}function $s(e,r){if(m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_load_runtime"),!m.mono_wasm_load_runtime_done){m.mono_wasm_load_runtime_done=!0;try{null==r&&(r=0,ps&&ps.debugLevel&&(r=0+r)),g.mono_wasm_load_runtime(e||"unused",r),m.waitForDebugger=ps.waitForDebugger,m.mono_wasm_bindings_is_ready||function(){if(m.diagnosticTracing&&console.debug("MONO_WASM: bindings_init"),!m.mono_wasm_bindings_is_ready){m.mono_wasm_bindings_is_ready=!0;try{(function(){const e=t,r="System.Runtime.InteropServices.JavaScript";if(m.runtime_interop_module=g.mono_wasm_assembly_load(r),!m.runtime_interop_module)throw"Can't find bindings module assembly: "+r;if(m.runtime_interop_namespace="System.Runtime.InteropServices.JavaScript",m.runtime_interop_exports_classname="JavaScriptExports",m.runtime_interop_exports_class=g.mono_wasm_assembly_find_class(m.runtime_interop_module,m.runtime_interop_namespace,m.runtime_interop_exports_classname),!m.runtime_interop_exports_class)throw"Can't find "+m.runtime_interop_namespace+"."+m.runtime_interop_exports_classname+" class";const n=g.mono_wasm_assembly_find_method(m.runtime_interop_exports_class,"InstallSynchronizationContext",-1),o=Mo("CallEntrypoint");if(!o)throw new Error("Assert failed: Can't find CallEntrypoint method");const i=Mo("ReleaseJSOwnedObjectByGCHandle");if(!i)throw new Error("Assert failed: Can't find ReleaseJSOwnedObjectByGCHandle method");const s=Mo("CreateTaskCallback");if(!s)throw new Error("Assert failed: Can't find CreateTaskCallback method");const a=Mo("CompleteTask");if(!a)throw new Error("Assert failed: Can't find CompleteTask method");const l=Mo("CallDelegate");if(!l)throw new Error("Assert failed: Can't find CallDelegate method");const u=Mo("GetManagedStackTrace");if(!u)throw new Error("Assert failed: Can't find GetManagedStackTrace method");m.javaScriptExports.call_entry_point=(t,r)=>{const n=e.stackSave();try{const i=Lt(4),s=Ht(i,1),a=Ht(i,2),c=Ht(i,3);return Hr(a,t),r&&0==r.length&&(r=void 0),nn(c,r,yr.String),xo(o,i),En(s,0,dn)||Promise.resolve(0)}finally{e.stackRestore(n)}},m.javaScriptExports.release_js_owned_object_by_gc_handle=t=>{if(!t)throw new Error("Assert failed: Must be valid gc_handle");const r=e.stackSave();try{const n=Lt(3),o=Ht(n,2);er(o,yr.Object),lr(o,t),xo(i,n)}finally{e.stackRestore(r)}},m.javaScriptExports.create_task_callback=()=>{const t=e.stackSave();try{const r=Lt(2);return xo(s,r),cr(Ht(r,1))}finally{e.stackRestore(t)}},m.javaScriptExports.complete_task=(t,r,n,o)=>{const i=e.stackSave();try{const s=Lt(5),c=Ht(s,2);er(c,yr.Object),lr(c,t);const l=Ht(s,3);if(r)Qr(l,r);else{er(l,yr.None);const e=Ht(s,4);if(!o)throw new Error("Assert failed: res_converter missing");o(e,n)}xo(a,s)}finally{e.stackRestore(i)}},m.javaScriptExports.call_delegate=(t,r,n,o,i,s,a,c)=>{const u=e.stackSave();try{const _=Lt(6),f=Ht(_,2);if(er(f,yr.Object),lr(f,t),s&&s(Ht(_,3),r),a&&a(Ht(_,4),n),c&&c(Ht(_,5),o),xo(l,_),i)return i(Ht(_,1))}finally{e.stackRestore(u)}},m.javaScriptExports.get_managed_stack_trace=t=>{const r=e.stackSave();try{const n=Lt(3),o=Ht(n,2);return er(o,yr.Exception),lr(o,t),xo(u,n),An(Ht(n,1))}finally{e.stackRestore(r)}},n&&(m.javaScriptExports.install_synchronization_context=()=>{const t=e.stackSave();try{const r=Lt(2);xo(n,r)}finally{e.stackRestore(t)}},c||m.javaScriptExports.install_synchronization_context())})(),Ai(),0==Ft.size&&(Ft.set(yr.Array,On),Ft.set(yr.Span,Dn),Ft.set(yr.ArraySegment,Mn),Ft.set(yr.Boolean,ln),Ft.set(yr.Byte,un),Ft.set(yr.Char,_n),Ft.set(yr.Int16,fn),Ft.set(yr.Int32,dn),Ft.set(yr.Int52,mn),Ft.set(yr.BigInt64,pn),Ft.set(yr.Single,wn),Ft.set(yr.IntPtr,gn),Ft.set(yr.Double,hn),Ft.set(yr.String,An),Ft.set(yr.Exception,Sn),Ft.set(yr.JSException,Sn),Ft.set(yr.JSObject,jn),Ft.set(yr.Object,xn),Ft.set(yr.DateTime,bn),Ft.set(yr.DateTimeOffset,bn),Ft.set(yr.Task,En),Ft.set(yr.Action,vn),Ft.set(yr.Function,vn),Ft.set(yr.None,yn),Ft.set(yr.Void,yn),Ft.set(yr.Discard,yn)),0==Ut.size&&(Ut.set(yr.Array,rn),Ut.set(yr.Span,on),Ut.set(yr.ArraySegment,sn),Ut.set(yr.Boolean,Ir),Ut.set(yr.Byte,$r),Ut.set(yr.Char,Pr),Ut.set(yr.Int16,Fr),Ut.set(yr.Int32,Ur),Ut.set(yr.Int52,Br),Ut.set(yr.BigInt64,Wr),Ut.set(yr.Double,zr),Ut.set(yr.Single,Lr),Ut.set(yr.IntPtr,Hr),Ut.set(yr.DateTime,Vr),Ut.set(yr.DateTimeOffset,qr),Ut.set(yr.String,Jr),Ut.set(yr.Exception,Qr),Ut.set(yr.JSException,Qr),Ut.set(yr.JSObject,en),Ut.set(yr.Object,tn),Ut.set(yr.Task,Kr),Ut.set(yr.Action,Xr),Ut.set(yr.Function,Xr),Ut.set(yr.None,Yr),Ut.set(yr.Discard,Yr),Ut.set(yr.Void,Yr)),m._i52_error_scratch_buffer=t._malloc(4)}catch(e){throw Rs("MONO_WASM: Error in bindings_init",e),e}}}()}catch(e){if(Rs("MONO_WASM: mono_wasm_load_runtime () failed",e),Ms(e,!1),i||o){(0,g.mono_wasm_exit)(1)}throw e}}}async function Ps(e){function r(){ps.environmentVariables=ps.environmentVariables||{},ps.assets=ps.assets||[],ps.runtimeOptions=ps.runtimeOptions||[],ps.globalizationMode=ps.globalizationMode||"auto",ps.debugLevel,ps.diagnosticTracing,m.diagnosticTracing=!!m.config.diagnosticTracing}if(ws)await ys.promise;else{if(ws=!0,!e)return r(),void ys.promise_control.resolve();m.diagnosticTracing&&console.debug("MONO_WASM: mono_wasm_load_config");try{const n=m.locateFile(e),o=await m.fetch_like(n),i=await o.json()||{};if(i.environmentVariables&&"object"!=typeof i.environmentVariables)throw new Error("Expected config.environmentVariables to be unset or a dictionary-style object");if(i.assets=[...i.assets||[],...ps.assets||[]],i.environmentVariables={...i.environmentVariables||{},...ps.environmentVariables||{}},ps=m.config=t.config=Object.assign(t.config,i),r(),t.onConfigLoaded)try{await t.onConfigLoaded(m.config),r()}catch(e){throw Rs("MONO_WASM: onConfigLoaded() failed",e),e}ys.promise_control.resolve()}catch(r){const n=`Failed to load config file ${e} ${r}`;throw Ms(n,!0),ps=m.config=t.config={message:n,error:r,isError:!0},r}}}function Fs(e,r,n,o,i){if(!0!==m.mono_wasm_runtime_is_ready)return;const s=0!==e?t.UTF8ToString(e).concat(".dll"):"",a=y(new Uint8Array(t.HEAPU8.buffer,r,n));let c;if(o){c=y(new Uint8Array(t.HEAPU8.buffer,o,i))}F({eventName:"AssemblyLoaded",assembly_name:s,assembly_b64:a,pdb_b64:c})}async function Us(e){ps=t.config=m.config=Object.assign(m.config||{},e||{}),await Yn(),hs||await ro()}var Bs,Ws;(function(e){e[e.Sending=0]="Sending",e[e.Closed=1]="Closed",e[e.Error=2]="Error"})(Bs||(Bs={})),function(e){e[e.Idle=0]="Idle",e[e.PartialCommand=1]="PartialCommand",e[e.Error=2]="Error"}(Ws||(Ws={}));const zs=new class{constructor(){this.moduleConfig={disableDotnet6Compatibility:!0,configSrc:"./mono-config.json",config:m.config}}withModuleConfig(e){try{return Object.assign(this.moduleConfig,e),this}catch(e){throw me(1,e),e}}withConsoleForwarding(){try{const e={forwardConsoleLogsToWS:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withAsyncFlushOnExit(){try{const e={asyncFlushOnExit:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withExitCodeLogging(){try{const e={logExitCode:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withElementOnExit(){try{const e={appendElementOnExit:!0};return Object.assign(this.moduleConfig.config,e),this}catch(e){throw me(1,e),e}}withWaitingForDebugger(e){try{const t={waitForDebugger:e};return Object.assign(this.moduleConfig.config,t),this}catch(e){throw me(1,e),e}}withConfig(e){try{const t={...e};return t.assets=[...this.moduleConfig.config.assets||[],...t.assets||[]],t.environmentVariables={...this.moduleConfig.config.environmentVariables||{},...t.environmentVariables||{}},Object.assign(this.moduleConfig.config,t),this}catch(e){throw me(1,e),e}}withConfigSrc(e){try{if(!e||"string"!=typeof e)throw new Error("Assert failed: must be file path or URL");return Object.assign(this.moduleConfig,{configSrc:e}),this}catch(e){throw me(1,e),e}}withVirtualWorkingDirectory(e){try{if(!e||"string"!=typeof e)throw new Error("Assert failed: must be directory path");return this.virtualWorkingDirectory=e,this}catch(e){throw me(1,e),e}}withEnvironmentVariable(e,t){try{return this.moduleConfig.config.environmentVariables[e]=t,this}catch(e){throw me(1,e),e}}withEnvironmentVariables(e){try{if(!e||"object"!=typeof e)throw new Error("Assert failed: must be dictionary object");return Object.assign(this.moduleConfig.config.environmentVariables,e),this}catch(e){throw me(1,e),e}}withDiagnosticTracing(e){try{if("boolean"!=typeof e)throw new Error("Assert failed: must be boolean");return this.moduleConfig.config.diagnosticTracing=e,this}catch(e){throw me(1,e),e}}withDebugging(e){try{if(!e||"number"!=typeof e)throw new Error("Assert failed: must be number");return this.moduleConfig.config.debugLevel=e,this}catch(e){throw me(1,e),e}}withApplicationArguments(...e){try{if(!e||!Array.isArray(e))throw new Error("Assert failed: must be array of strings");return this.applicationArguments=e,this}catch(e){throw me(1,e),e}}withRuntimeOptions(e){try{if(!e||!Array.isArray(e))throw new Error("Assert failed: must be array of strings");return Object.assign(this.moduleConfig,{runtimeOptions:e}),this}catch(e){throw me(1,e),e}}withMainAssembly(e){try{return this.moduleConfig.config.mainAssemblyName=e,this}catch(e){throw me(1,e),e}}withApplicationArgumentsFromQuery(){try{if(void 0!==globalThis.URLSearchParams){const e=new URLSearchParams(window.location.search).getAll("arg");return this.withApplicationArguments(...e)}throw new Error("URLSearchParams is supported")}catch(e){throw me(1,e),e}}async create(){try{if(!this.instance){if(s&&!c&&this.moduleConfig.config.forwardConsoleLogsToWS&&void 0!==globalThis.WebSocket&&function(e,t,r){const n={log:t.log,error:t.error},o=t;function i(t,r,o){return function(...i){try{let n=i[0];if(void 0===n)n="undefined";else if(null===n)n="null";else if("function"==typeof n)n=n.toString();else if("string"!=typeof n)try{n=JSON.stringify(n)}catch(e){n=n.toString()}"string"==typeof n&&"main"!==e&&(n=`[${e}] ${n}`),r(o?JSON.stringify({method:t,payload:n,arguments:i}):[t+n,...i.slice(1)])}catch(e){n.error(`proxyConsole failed: ${e}`)}}}const s=["debug","trace","warn","info","error"];for(const e of s)"function"!=typeof o[e]&&(o[e]=i(`console.${e}: `,t.log,!1));const a=`${r}/console`.replace("https://","wss://").replace("http://","ws://");ce=new WebSocket(a),ce.addEventListener("open",(()=>{n.log(`browser: [${e}] Console websocket connected.`)})),ce.addEventListener("error",(t=>{n.error(`[${e}] websocket error: ${t}`,t)})),ce.addEventListener("close",(t=>{n.error(`[${e}] websocket closed: ${t}`,t)}));const c=e=>{ce.readyState===WebSocket.OPEN?ce.send(e):n.log(e)};for(const e of["log",...s])o[e]=i(`console.${e}`,c,!0)}("main",globalThis.console,globalThis.location.origin),o){const e=await import("process");if(e.versions.node.split(".")[0]<14)throw new Error(`NodeJS at '${e.execPath}' has too low version '${e.versions.node}'`)}if(!this.moduleConfig)throw new Error("Assert failed: Null moduleConfig");if(!this.moduleConfig.config)throw new Error("Assert failed: Null moduleConfig.config");this.instance=await _(this.moduleConfig)}if(this.virtualWorkingDirectory){const e=this.instance.Module.FS,t=e.stat(this.virtualWorkingDirectory);if(!t||!e.isDir(t.mode))throw new Error(`Assert failed: Could not find working directory ${this.virtualWorkingDirectory}`);e.chdir(this.virtualWorkingDirectory)}return this.instance}catch(e){throw me(1,e),e}}async run(){try{if(!this.moduleConfig.config)throw new Error("Assert failed: Null moduleConfig.config");if(this.instance||await this.create(),!this.moduleConfig.config.mainAssemblyName)throw new Error("Assert failed: Null moduleConfig.config.mainAssemblyName");if(!this.applicationArguments)if(o){const e=await import("process");this.applicationArguments=e.argv.slice(2)}else this.applicationArguments=[];return this.instance.runMainAndExit(this.moduleConfig.config.mainAssemblyName,this.applicationArguments)}catch(e){throw me(1,e),e}}};const Ls=function(t,r,n,o){const i=r.module,s=globalThis;f(t,r),function(e){Tn=e.mono,Rn=e.binding}(r),so(n),Object.assign(r.mono,{mono_wasm_setenv:Cs,mono_wasm_load_bytes_into_heap:At,mono_wasm_load_icu_data:J,mono_wasm_runtime_ready:O,mono_wasm_load_data_archive:to,mono_wasm_load_config:Ps,mono_load_runtime_and_bcl_args:Us,mono_wasm_new_root_buffer:Mt,mono_wasm_new_root:Rt,mono_wasm_new_external_root:Tt,mono_wasm_release_roots:Ct,mono_run_main:_e,mono_run_main_and_exit:ue,mono_wasm_add_assembly:null,mono_wasm_load_runtime:$s,config:m.config,loaded_files:[],setB32:Ye,setI8:et,setI16:tt,setI32:nt,setI52:it,setU52:st,setI64Big:at,setU8:Xe,setU16:Ze,setU32:Qe,setF32:ct,setF64:lt,getB32:ut,getI8:mt,getI16:pt,getI32:wt,getI52:ht,getU52:gt,getI64Big:yt,getU8:_t,getU16:ft,getU32:dt,getF32:bt,getF64:vt}),Object.assign(r.binding,{bind_static_method:ti,call_assembly_entry_point:ni,mono_obj_array_new:null,mono_obj_array_set:null,js_string_to_mono_string:Rr,js_typed_array_to_array:Bo,mono_array_to_js_array:Go,js_to_mono_obj:$o,conv_string:xr,unbox_mono_obj:Ho,mono_obj_array_new_ref:null,mono_obj_array_set_ref:null,js_string_to_mono_string_root:Mr,js_typed_array_to_array_root:Uo,js_to_mono_obj_root:Po,conv_string_root:Or,unbox_mono_obj_root:Jo,mono_array_root_to_js_array:Xo}),Object.assign(r.internal,ds()),Object.assign(r.internal,ds());const a={runMain:_e,runMainAndExit:ue,setEnvironmentVariable:Cs,getAssemblyExports:No,setModuleImports:mo,getConfig:()=>m.config,setHeapB32:Ye,setHeapU8:Xe,setHeapU16:Ze,setHeapU32:Qe,setHeapI8:et,setHeapI16:tt,setHeapI32:nt,setHeapI52:it,setHeapU52:st,setHeapI64Big:at,setHeapF32:ct,setHeapF64:lt,getHeapB32:ut,getHeapU8:_t,getHeapU16:ft,getHeapU32:dt,getHeapI8:mt,getHeapI16:pt,getHeapI32:wt,getHeapI52:ht,getHeapU52:gt,getHeapI64Big:yt,getHeapF32:bt,getHeapF64:vt};if(e.__linker_exports={mono_set_timeout:Hi,mono_wasm_asm_loaded:Fs,mono_wasm_fire_debugger_agent_message:N,mono_wasm_debugger_log:V,mono_wasm_add_dbg_command_received:D,schedule_background_exec:Li,mono_wasm_invoke_js_blazor:ui,mono_wasm_trace_logger:ae,mono_wasm_set_entrypoint_breakpoint:B,mono_wasm_event_pipe_early_startup_callback:ms,mono_wasm_invoke_js_with_args_ref:oi,mono_wasm_get_object_property_ref:ii,mono_wasm_set_object_property_ref:si,mono_wasm_get_by_index_ref:ai,mono_wasm_set_by_index_ref:ci,mono_wasm_get_global_object_ref:li,mono_wasm_create_cs_owned_object_ref:Zo,mono_wasm_release_cs_owned_object:Oe,mono_wasm_typed_array_to_array_ref:zo,mono_wasm_typed_array_from_ref:To,mono_wasm_bind_js_function:_o,mono_wasm_invoke_bound_function:fo,mono_wasm_bind_cs_function:jo,mono_wasm_marshal_promise:kn,mono_wasm_load_icu_data:J,mono_wasm_get_icudt_name:G},Object.assign(l,{MONO:r.mono,BINDING:r.binding,INTERNAL:r.internal,IMPORTS:r.marshaled_imports,Module:i,runtimeBuildInfo:{productVersion:"7.0.5",buildConfiguration:"Release"},...a}),Object.assign(o,a),r.module.__undefinedConfig&&(i.disableDotnet6Compatibility=!0,i.configSrc="./mono-config.json"),i.print||(i.print=console.log.bind(console)),i.printErr||(i.printErr=console.error.bind(console)),void 0===i.disableDotnet6Compatibility&&(i.disableDotnet6Compatibility=!0),t.isGlobal||!i.disableDotnet6Compatibility){Object.assign(i,l),i.mono_bind_static_method=(e,t)=>(console.warn("MONO_WASM: Module.mono_bind_static_method is obsolete, please use [JSExportAttribute] interop instead"),ti(e,t));const e=(e,t)=>{if(void 0!==s[e])return;let r;Object.defineProperty(globalThis,e,{get:()=>{if(w(r)){const n=(new Error).stack,o=n?n.substr(n.indexOf("\n",8)+1):"";console.warn(`MONO_WASM: global ${e} is obsolete, please use Module.${e} instead ${o}`),r=t()}return r}})};s.MONO=r.mono,s.BINDING=r.binding,s.INTERNAL=r.internal,t.isGlobal||(s.Module=i),e("cwrap",(()=>i.cwrap)),e("addRunDependency",(()=>i.addRunDependency)),e("removeRunDependency",(()=>i.removeRunDependency))}let c;return s.getDotnetRuntime?c=s.getDotnetRuntime.__list:(s.getDotnetRuntime=e=>s.getDotnetRuntime.__list.getRuntime(e),s.getDotnetRuntime.__list=c=new Vs),c.registerRuntime(l),xs(i,l),l},Hs=function(e,t){d(t),Object.assign(u,{dotnet:zs,exit:me}),function(e){_=e}(e)};e.__linker_exports=null;class Vs{constructor(){this.list={}}registerRuntime(e){return e.runtimeId=Object.keys(this.list).length,this.list[e.runtimeId]=he(e),e.runtimeId}getRuntime(e){const t=this.list[e];return t?t.deref():void 0}}return e.__initializeImportsAndExports=Ls,e.__setEmscriptenEntrypoint=Hs,e.moduleExports=u,Object.defineProperty(e,"__esModule",{value:!0}),e}({}),createDotnetRuntime=(()=>{var e=import.meta.url;return function(t){var r,n,o=void 0!==(t=t||{})?t:{};o.ready=new Promise((function(e,t){r=e,n=t}));var i=i||void 0,s=s||"",a={MONO,BINDING,INTERNAL,IMPORTS};if("function"==typeof t){a.Module=o={ready:o.ready};const e=t(a);if(e.ready)throw new Error("MONO_WASM: Module.ready couldn't be redefined.");Object.assign(o,e),(t=o).locateFile||(t.locateFile=t.__locateFile=e=>E+e)}else{if("object"!=typeof t)throw new Error("MONO_WASM: Can't use moduleFactory callback of createDotnetRuntime function.");a.Module=o={ready:o.ready,__undefinedConfig:1===Object.keys(t).length},Object.assign(o,t),(t=o).locateFile||(t.locateFile=t.__locateFile=e=>E+e)}var c,l,u,_,f,d,m=Object.assign({},o),p=[],w="./this.program",h=(e,t)=>{throw t},g="object"==typeof window,y="function"==typeof importScripts,b="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,v=!g&&!b&&!y,E="";function k(e){return o.locateFile?o.locateFile(e,E):E+e}function A(e){if(e instanceof Eo)return;j("exiting due to exception: "+e)}b?(E=y?i("path").dirname(E)+"/":s+"/",d=()=>{f||(_=i("fs"),f=i("path"))},c=function(e,t){return d(),e=f.normalize(e),_.readFileSync(e,t?void 0:"utf8")},u=e=>{var t=c(e,!0);return t.buffer||(t=new Uint8Array(t)),t},l=(e,t,r)=>{d(),e=f.normalize(e),_.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(w=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof Eo))throw e})),process.on("unhandledRejection",(function(e){throw e})),h=(e,t)=>{if(ae())throw process.exitCode=e,t;A(t),process.exit(e)},o.inspect=function(){return"[Emscripten Module object]"}):v?("undefined"!=typeof read&&(c=function(e){return read(e)}),u=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),C("object"==typeof t),t)},l=function(e,t,r){setTimeout((()=>t(u(e))),0)},"undefined"!=typeof scriptArgs?p=scriptArgs:void 0!==arguments&&(p=arguments),"function"==typeof quit&&(h=(e,t)=>{A(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(g||y)&&(y?E=self.location.href:"undefined"!=typeof document&&document.currentScript&&(E=document.currentScript.src),e&&(E=e),E=0!==E.indexOf("blob:")?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",c=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},y&&(u=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),l=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var S=o.print||console.log.bind(console),j=o.printErr||console.warn.bind(console);Object.assign(o,m),m=null,o.arguments&&(p=o.arguments),o.thisProgram&&(w=o.thisProgram),o.quit&&(h=o.quit);var x,O=0,N=e=>{O=e},D=()=>O;o.wasmBinary&&(x=o.wasmBinary);var M,T=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&ye("no native wasm support detected");var R=!1;function C(e,t){e||ye(t)}function I(e){return o["_"+e]}function $(e,t,r,n,o){var i={string:function(e){var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);z(e,t=On(r),r)}return t},array:function(e){var t=On(e.length);return ee(e,t),t}};var s=I(e),a=[],c=0;if(n)for(var l=0;l<n.length;l++){var u=i[r[l]];u?(0===c&&(c=jn()),a[l]=u(n[l])):a[l]=n[l]}var _=s.apply(null,a);return _=function(e){return 0!==c&&xn(c),function(e){return"string"===t?B(e):"boolean"===t?Boolean(e):e}(e)}(_)}function P(e,t,r,n){var o=(r=r||[]).every((function(e){return"number"===e}));return"string"!==t&&o&&!n?I(e):function(){return $(e,t,r,arguments)}}var F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&F)return F.decode(e.subarray(t,o));for(var i="";t<o;){var s=e[t++];if(128&s){var a=63&e[t++];if(192!=(224&s)){var c=63&e[t++];if((s=224==(240&s)?(15&s)<<12|a<<6|c:(7&s)<<18|a<<12|c<<6|63&e[t++])<65536)i+=String.fromCharCode(s);else{var l=s-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&s)<<6|a)}else i+=String.fromCharCode(s)}return i}function B(e,t){return e?U(q,e,t):""}function W(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,s=0;s<e.length;++s){var a=e.charCodeAt(s);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s);if(a<=127){if(r>=i)break;t[r++]=a}else if(a<=2047){if(r+1>=i)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=i)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=i)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-o}function z(e,t,r){return W(e,q,t,r)}function L(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var H,V,q,J,G,Y,X,Z,K;"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");function Q(e){var t=L(e)+1,r=yn(t);return r&&W(e,V,r,t),r}function ee(e,t){V.set(e,t)}function te(e,t,r){for(var n=0;n<e.length;++n)V[t++>>0]=e.charCodeAt(n);r||(V[t>>0]=0)}function re(e){H=e,o.HEAP8=V=new Int8Array(e),o.HEAP16=J=new Int16Array(e),o.HEAP32=Y=new Int32Array(e),o.HEAPU8=q=new Uint8Array(e),o.HEAPU16=G=new Uint16Array(e),o.HEAPU32=X=new Uint32Array(e),o.HEAPF32=Z=new Float32Array(e),o.HEAPF64=K=new Float64Array(e)}o.INITIAL_MEMORY;var ne,oe=[],ie=[],se=[];function ae(){return T}function ce(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)_e(o.preRun.shift());De(oe)}function le(){!0,o.noFSInit||at.init.initialized||at.init(),at.ignorePermissions=!1,tt.init(),_t.root=at.mount(_t,{},null),De(ie)}function ue(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)de(o.postRun.shift());De(se)}function _e(e){oe.unshift(e)}function fe(e){ie.unshift(e)}function de(e){se.unshift(e)}var me=0,pe=null,we=null;function he(e){me++,o.monitorRunDependencies&&o.monitorRunDependencies(me)}function ge(e){if(me--,o.monitorRunDependencies&&o.monitorRunDependencies(me),0==me&&(null!==pe&&(clearInterval(pe),pe=null),we)){var t=we;we=null,t()}}function ye(e){o.onAbort&&o.onAbort(e),j(e="Aborted("+e+")"),R=!0,1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var be,ve,Ee,ke="data:application/octet-stream;base64,";function Ae(e){return e.startsWith(ke)}function Se(e){return e.startsWith("file://")}function je(e){try{if(e==be&&x)return new Uint8Array(x);if(u)return u(e);throw"both async and sync fetching of the wasm failed"}catch(e){ye(e)}}function xe(){if(!x&&(g||y)){if("function"==typeof pn&&!Se(be))return pn(be,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+be+"'";return e.arrayBuffer()})).catch((function(){return je(be)}));if(l)return new Promise((function(e,t){l(be,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return je(be)}))}function Oe(){var e={env:gn,wasi_snapshot_preview1:gn};function t(e,t){var r=e.exports;o.asm=r,re((M=o.asm.memory).buffer),ne=o.asm.__indirect_function_table,fe(o.asm.__wasm_call_ctors),ge()}function r(e){t(e.instance)}function i(t){return xe().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){j("failed to asynchronously prepare wasm: "+e),ye(e)}))}if(he(),o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return j("Module.instantiateWasm callback failed with error: "+e),!1}return(x||"function"!=typeof WebAssembly.instantiateStreaming||Ae(be)||Se(be)||"function"!=typeof pn?i(r):pn(be,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return j("wasm streaming compile failed: "+e),j("falling back to ArrayBuffer instantiation"),i(r)}))}))).catch(n),{}}o.locateFile?Ae(be="dotnet.wasm")||(be=k(be)):be=new URL("dotnet.wasm",import.meta.url).toString();var Ne={7367396:(e,t)=>{setTimeout((function(){console.error(B(e))}),t)},7367463:e=>{setTimeout((function(){try{"undefined"==typeof window&&"undefined"==typeof document&&"undefined"!=typeof self&&void 0!==self.close?self.close():"undefined"!=typeof process&&void 0!==process.exit?process.exit(1):location.href="https://pspdfkit.com"}catch(e){location.href="https://pspdfkit.com"}}),e)}};function De(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?Re(r)():Re(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function Me(e,t="i8"){switch(t.endsWith("*")&&(t="i32"),t){case"i1":case"i8":return V[e>>0];case"i16":return J[e>>1];case"i32":case"i64":return Y[e>>2];case"float":return Z[e>>2];case"double":return Number(K[e>>3]);default:ye("invalid type for getValue: "+t)}return null}var Te=[];function Re(e){var t=Te[e];return t||(e>=Te.length&&(Te.length=e+1),Te[e]=t=ne.get(e)),t}function Ce(e,t,r="i8"){switch(r.endsWith("*")&&(r="i32"),r){case"i1":case"i8":V[e>>0]=t;break;case"i16":J[e>>1]=t;break;case"i32":Y[e>>2]=t;break;case"i64":Ee=[t>>>0,(ve=t,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],Y[e>>2]=Ee[0],Y[e+4>>2]=Ee[1];break;case"float":Z[e>>2]=t;break;case"double":K[e>>3]=t;break;default:ye("invalid type for setValue: "+r)}}function Ie(e,t,r,n){ye("Assertion failed: "+B(e)+", at: "+[t?B(t):"unknown filename",r,n?B(n):"unknown function"])}function $e(e){return yn(e+24)+24}var Pe=[];function Fe(e){e.add_ref()}var Ue=0;function Be(e){var t=new ze(e);return t.get_caught()||(t.set_caught(!0),Ue--),t.set_rethrown(!1),Pe.push(t),Fe(t),t.get_exception_ptr()}var We=0;function ze(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){X[this.ptr+4>>2]=e},this.get_type=function(){return X[this.ptr+4>>2]},this.set_destructor=function(e){X[this.ptr+8>>2]=e},this.get_destructor=function(){return X[this.ptr+8>>2]},this.set_refcount=function(e){Y[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,V[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=V[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,V[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=V[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=Y[this.ptr>>2];Y[this.ptr>>2]=e+1},this.release_ref=function(){var e=Y[this.ptr>>2];return Y[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){X[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return X[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Dn(this.get_type()))return X[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function Le(e){return bn(new ze(e).ptr)}function He(e){if(e.release_ref()&&!e.get_rethrown()){var t=e.get_destructor();t&&Re(t)(e.excPtr),Le(e.excPtr)}}function Ve(){Sn(0),He(Pe.pop()),We=0}function qe(e){throw We||(We=e),e}function Je(){var e=We;if(!e)return N(0),0;var t=new ze(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return N(0),e;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var i=n[o];if(0===i||i===r)break;var s=t.ptr+16;if(Nn(i,r,s))return N(i),e}return N(r),e}function Ge(){var e=We;if(!e)return N(0),0;var t=new ze(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return N(0),e;for(var n=Array.prototype.slice.call(arguments),o=0;o<n.length;o++){var i=n[o];if(0===i||i===r)break;var s=t.ptr+16;if(Nn(i,r,s))return N(i),e}return N(r),e}function Ye(){var e=Pe.pop();e||ye("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Pe.push(e),e.set_rethrown(!0),e.set_caught(!1),Ue++),We=t,t}function Xe(e,t,r){throw new ze(e).init(t,r),We=e,Ue++,e}function Ze(){return Ue}var Ke={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=Ke.isAbs(e),r="/"===e.substr(-1);return(e=Ke.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Ke.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=Ke.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return Ke.normalize(e.join("/"))},join2:(e,t)=>Ke.normalize(e+"/"+t)};function Qe(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(b)try{var t=i("crypto");return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){ye("randomDevice")}}var et={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:at.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=Ke.isAbs(n)}return(t?"/":"")+(e=Ke.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=et.resolve(e).substr(1),t=et.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),s=i,a=0;a<i;a++)if(n[a]!==o[a]){s=a;break}var c=[];for(a=s;a<n.length;a++)c.push("..");return(c=c.concat(o.slice(s))).join("/")}},tt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){tt.ttys[e]={input:[],output:[],ops:t},at.registerDevice(e,tt.stream_ops)},stream_ops:{open:function(e){var t=tt.ttys[e.node.rdev];if(!t)throw new at.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new at.ErrnoError(60);for(var i=0,s=0;s<n;s++){var a;try{a=e.tty.ops.get_char(e.tty)}catch(e){throw new at.ErrnoError(29)}if(void 0===a&&0===i)throw new at.ErrnoError(6);if(null==a)break;i++,t[r+s]=a}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new at.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new at.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if(b){var r=Buffer.alloc(256),n=0;try{n=_.readSync(process.stdin.fd,r,0,256,-1)}catch(e){if(!e.toString().includes("EOF"))throw e;n=0}t=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=wn(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(S(U(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(S(U(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(j(U(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(j(U(e.output,0)),e.output=[])}}};function rt(e,t){q.fill(0,e,e+t)}function nt(e,t){return Math.ceil(e/t)*t}function ot(e){e=nt(e,65536);var t=An(65536,e);return t?(rt(t,e),t):0}var it={ops_table:null,mount:function(e){return it.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(at.isBlkdev(r)||at.isFIFO(r))throw new at.ErrnoError(63);it.ops_table||(it.ops_table={dir:{node:{getattr:it.node_ops.getattr,setattr:it.node_ops.setattr,lookup:it.node_ops.lookup,mknod:it.node_ops.mknod,rename:it.node_ops.rename,unlink:it.node_ops.unlink,rmdir:it.node_ops.rmdir,readdir:it.node_ops.readdir,symlink:it.node_ops.symlink},stream:{llseek:it.stream_ops.llseek}},file:{node:{getattr:it.node_ops.getattr,setattr:it.node_ops.setattr},stream:{llseek:it.stream_ops.llseek,read:it.stream_ops.read,write:it.stream_ops.write,allocate:it.stream_ops.allocate,mmap:it.stream_ops.mmap,msync:it.stream_ops.msync}},link:{node:{getattr:it.node_ops.getattr,setattr:it.node_ops.setattr,readlink:it.node_ops.readlink},stream:{}},chrdev:{node:{getattr:it.node_ops.getattr,setattr:it.node_ops.setattr},stream:at.chrdev_stream_ops}});var o=at.createNode(e,t,r,n);return at.isDir(o.mode)?(o.node_ops=it.ops_table.dir.node,o.stream_ops=it.ops_table.dir.stream,o.contents={}):at.isFile(o.mode)?(o.node_ops=it.ops_table.file.node,o.stream_ops=it.ops_table.file.stream,o.usedBytes=0,o.contents=null):at.isLink(o.mode)?(o.node_ops=it.ops_table.link.node,o.stream_ops=it.ops_table.link.stream):at.isChrdev(o.mode)&&(o.node_ops=it.ops_table.chrdev.node,o.stream_ops=it.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=at.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,at.isDir(e.mode)?t.size=4096:at.isFile(e.mode)?t.size=e.usedBytes:at.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&it.resizeFileStorage(e,t.size)},lookup:function(e,t){throw at.genericErrors[44]},mknod:function(e,t,r,n){return it.createNode(e,t,r,n)},rename:function(e,t,r){if(at.isDir(e.mode)){var n;try{n=at.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new at.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=at.lookupNode(e,t);for(var n in r.contents)throw new at.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=it.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!at.isLink(e.mode))throw new at.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-o,n);if(s>8&&i.subarray)t.set(i.subarray(o,o+s),r);else for(var a=0;a<s;a++)t[r+a]=i[o+a];return s},write:function(e,t,r,n,o,i){if(t.buffer===V.buffer&&(i=!1),!n)return 0;var s=e.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=t.subarray(r,r+n),s.usedBytes=n,n;if(0===s.usedBytes&&0===o)return s.contents=t.slice(r,r+n),s.usedBytes=n,n;if(o+n<=s.usedBytes)return s.contents.set(t.subarray(r,r+n),o),n}if(it.expandFileStorage(s,o+n),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(r,r+n),o);else for(var a=0;a<n;a++)s.contents[o+a]=t[r+a];return s.usedBytes=Math.max(s.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&at.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new at.ErrnoError(28);return n},allocate:function(e,t,r){it.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o){if(!at.isFile(e.node.mode))throw new at.ErrnoError(43);var i,s,a=e.node.contents;if(2&o||a.buffer!==H){if((r>0||r+t<a.length)&&(a=a.subarray?a.subarray(r,r+t):Array.prototype.slice.call(a,r,r+t)),s=!0,!(i=ot(t)))throw new at.ErrnoError(48);V.set(a,i)}else s=!1,i=a.byteOffset;return{ptr:i,allocated:s}},msync:function(e,t,r,n,o){if(!at.isFile(e.node.mode))throw new at.ErrnoError(43);if(2&o)return 0;it.stream_ops.write(e,t,0,n,r,!1);return 0}}};function st(e,t,r,n){var o=n?"":"al "+e;l(e,(function(r){C(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&ge()}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&he()}var at={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=et.resolve(at.cwd(),e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new at.ErrnoError(32);for(var r=Ke.normalizeArray(e.split("/").filter((e=>!!e)),!1),n=at.root,o="/",i=0;i<r.length;i++){var s=i===r.length-1;if(s&&t.parent)break;if(n=at.lookupNode(n,r[i]),o=Ke.join2(o,r[i]),at.isMountpoint(n)&&(!s||s&&t.follow_mount)&&(n=n.mounted.root),!s||t.follow)for(var a=0;at.isLink(n.mode);){var c=at.readlink(o);if(o=et.resolve(Ke.dirname(o),c),n=at.lookupPath(o,{recurse_count:t.recurse_count+1}).node,a++>40)throw new at.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var t;;){if(at.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%at.nameTable.length},hashAddNode:e=>{var t=at.hashName(e.parent.id,e.name);e.name_next=at.nameTable[t],at.nameTable[t]=e},hashRemoveNode:e=>{var t=at.hashName(e.parent.id,e.name);if(at.nameTable[t]===e)at.nameTable[t]=e.name_next;else for(var r=at.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=at.mayLookup(e);if(r)throw new at.ErrnoError(r,e);for(var n=at.hashName(e.id,t),o=at.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return at.lookup(e,t)},createNode:(e,t,r,n)=>{var o=new at.FSNode(e,t,r,n);return at.hashAddNode(o),o},destroyNode:e=>{at.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=at.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>at.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=at.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{at.lookupNode(e,t);return 20}catch(e){}return at.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=at.lookupNode(e,t)}catch(e){return e.errno}var o=at.nodePermissions(e,"wx");if(o)return o;if(r){if(!at.isDir(n.mode))return 54;if(at.isRoot(n)||at.getPath(n)===at.cwd())return 10}else if(at.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?at.isLink(e.mode)?32:at.isDir(e.mode)&&("r"!==at.flagsToPermissionString(t)||512&t)?31:at.nodePermissions(e,at.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=at.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!at.streams[r])return r;throw new at.ErrnoError(33)},getStream:e=>at.streams[e],createStream:(e,t,r)=>{at.FSStream||(at.FSStream=function(){this.shared={}},at.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get function(){return this.shared.position},set:function(e){this.shared.position=e}}}),e=Object.assign(new at.FSStream,e);var n=at.nextfd(t,r);return e.fd=n,at.streams[n]=e,e},closeStream:e=>{at.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=at.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new at.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{at.devices[e]={stream_ops:t}},getDevice:e=>at.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),at.syncFSRequests++,at.syncFSRequests>1&&j("warning: "+at.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=at.getMounts(at.root.mount),n=0;function o(e){return at.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:(e,t,r)=>{var n,o="/"===r,i=!r;if(o&&at.root)throw new at.ErrnoError(10);if(!o&&!i){var s=at.lookupPath(r,{follow_mount:!1});if(r=s.path,n=s.node,at.isMountpoint(n))throw new at.ErrnoError(10);if(!at.isDir(n.mode))throw new at.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,o?at.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount:e=>{var t=at.lookupPath(e,{follow_mount:!1});if(!at.isMountpoint(t.node))throw new at.ErrnoError(28);var r=t.node,n=r.mounted,o=at.getMounts(n);Object.keys(at.nameTable).forEach((e=>{for(var t=at.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&at.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=at.lookupPath(e,{parent:!0}).node,o=Ke.basename(e);if(!o||"."===o||".."===o)throw new at.ErrnoError(28);var i=at.mayCreate(n,o);if(i)throw new at.ErrnoError(i);if(!n.node_ops.mknod)throw new at.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,at.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,at.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{at.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,at.mknod(e,t,r)),symlink:(e,t)=>{if(!et.resolve(e))throw new at.ErrnoError(44);var r=at.lookupPath(t,{parent:!0}).node;if(!r)throw new at.ErrnoError(44);var n=Ke.basename(t),o=at.mayCreate(r,n);if(o)throw new at.ErrnoError(o);if(!r.node_ops.symlink)throw new at.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=Ke.dirname(e),i=Ke.dirname(t),s=Ke.basename(e),a=Ke.basename(t);if(r=at.lookupPath(e,{parent:!0}).node,n=at.lookupPath(t,{parent:!0}).node,!r||!n)throw new at.ErrnoError(44);if(r.mount!==n.mount)throw new at.ErrnoError(75);var c,l=at.lookupNode(r,s),u=et.relative(e,i);if("."!==u.charAt(0))throw new at.ErrnoError(28);if("."!==(u=et.relative(t,o)).charAt(0))throw new at.ErrnoError(55);try{c=at.lookupNode(n,a)}catch(e){}if(l!==c){var _=at.isDir(l.mode),f=at.mayDelete(r,s,_);if(f)throw new at.ErrnoError(f);if(f=c?at.mayDelete(n,a,_):at.mayCreate(n,a))throw new at.ErrnoError(f);if(!r.node_ops.rename)throw new at.ErrnoError(63);if(at.isMountpoint(l)||c&&at.isMountpoint(c))throw new at.ErrnoError(10);if(n!==r&&(f=at.nodePermissions(r,"w")))throw new at.ErrnoError(f);at.hashRemoveNode(l);try{r.node_ops.rename(l,n,a)}catch(e){throw e}finally{at.hashAddNode(l)}}},rmdir:e=>{var t=at.lookupPath(e,{parent:!0}).node,r=Ke.basename(e),n=at.lookupNode(t,r),o=at.mayDelete(t,r,!0);if(o)throw new at.ErrnoError(o);if(!t.node_ops.rmdir)throw new at.ErrnoError(63);if(at.isMountpoint(n))throw new at.ErrnoError(10);t.node_ops.rmdir(t,r),at.destroyNode(n)},readdir:e=>{var t=at.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new at.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=at.lookupPath(e,{parent:!0}).node;if(!t)throw new at.ErrnoError(44);var r=Ke.basename(e),n=at.lookupNode(t,r),o=at.mayDelete(t,r,!1);if(o)throw new at.ErrnoError(o);if(!t.node_ops.unlink)throw new at.ErrnoError(63);if(at.isMountpoint(n))throw new at.ErrnoError(10);t.node_ops.unlink(t,r),at.destroyNode(n)},readlink:e=>{var t=at.lookupPath(e).node;if(!t)throw new at.ErrnoError(44);if(!t.node_ops.readlink)throw new at.ErrnoError(28);return et.resolve(at.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=at.lookupPath(e,{follow:!t}).node;if(!r)throw new at.ErrnoError(44);if(!r.node_ops.getattr)throw new at.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>at.stat(e,!0),chmod:(e,t,r)=>{var n;"string"==typeof e?n=at.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new at.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{at.chmod(e,t,!0)},fchmod:(e,t)=>{var r=at.getStream(e);if(!r)throw new at.ErrnoError(8);at.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;"string"==typeof e?o=at.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new at.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{at.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=at.getStream(e);if(!n)throw new at.ErrnoError(8);at.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new at.ErrnoError(28);var r;"string"==typeof e?r=at.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new at.ErrnoError(63);if(at.isDir(r.mode))throw new at.ErrnoError(31);if(!at.isFile(r.mode))throw new at.ErrnoError(28);var n=at.nodePermissions(r,"w");if(n)throw new at.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=at.getStream(e);if(!r)throw new at.ErrnoError(8);if(0==(2097155&r.flags))throw new at.ErrnoError(28);at.truncate(r.node,t)},utime:(e,t,r)=>{var n=at.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,t,r)=>{if(""===e)throw new at.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?at.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=Ke.normalize(e);try{n=at.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var i=!1;if(64&t)if(n){if(128&t)throw new at.ErrnoError(20)}else n=at.mknod(e,r,0),i=!0;if(!n)throw new at.ErrnoError(44);if(at.isChrdev(n.mode)&&(t&=-513),65536&t&&!at.isDir(n.mode))throw new at.ErrnoError(54);if(!i){var s=at.mayOpen(n,t);if(s)throw new at.ErrnoError(s)}512&t&&!i&&at.truncate(n,0),t&=-131713;var a=at.createStream({node:n,path:at.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!o.logReadFiles||1&t||(at.readFiles||(at.readFiles={}),e in at.readFiles||(at.readFiles[e]=1)),a},close:e=>{if(at.isClosed(e))throw new at.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{at.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(at.isClosed(e))throw new at.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new at.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new at.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new at.ErrnoError(28);if(at.isClosed(e))throw new at.ErrnoError(8);if(1==(2097155&e.flags))throw new at.ErrnoError(8);if(at.isDir(e.node.mode))throw new at.ErrnoError(31);if(!e.stream_ops.read)throw new at.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new at.ErrnoError(70)}else o=e.position;var s=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=s),s},write:(e,t,r,n,o,i)=>{if(n<0||o<0)throw new at.ErrnoError(28);if(at.isClosed(e))throw new at.ErrnoError(8);if(0==(2097155&e.flags))throw new at.ErrnoError(8);if(at.isDir(e.node.mode))throw new at.ErrnoError(31);if(!e.stream_ops.write)throw new at.ErrnoError(28);e.seekable&&1024&e.flags&&at.llseek(e,0,2);var s=void 0!==o;if(s){if(!e.seekable)throw new at.ErrnoError(70)}else o=e.position;var a=e.stream_ops.write(e,t,r,n,o,i);return s||(e.position+=a),a},allocate:(e,t,r)=>{if(at.isClosed(e))throw new at.ErrnoError(8);if(t<0||r<=0)throw new at.ErrnoError(28);if(0==(2097155&e.flags))throw new at.ErrnoError(8);if(!at.isFile(e.node.mode)&&!at.isDir(e.node.mode))throw new at.ErrnoError(43);if(!e.stream_ops.allocate)throw new at.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new at.ErrnoError(2);if(1==(2097155&e.flags))throw new at.ErrnoError(2);if(!e.stream_ops.mmap)throw new at.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:(e,t,r,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new at.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=at.open(e,t.flags),o=at.stat(e).size,i=new Uint8Array(o);return at.read(n,i,0,o,0),"utf8"===t.encoding?r=U(i,0):"binary"===t.encoding&&(r=i),at.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=at.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(L(t)+1),i=W(t,o,0,o.length);at.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");at.write(n,t,0,t.byteLength,void 0,r.canOwn)}at.close(n)},cwd:()=>at.currentPath,chdir:e=>{var t=at.lookupPath(e,{follow:!0});if(null===t.node)throw new at.ErrnoError(44);if(!at.isDir(t.node.mode))throw new at.ErrnoError(54);var r=at.nodePermissions(t.node,"x");if(r)throw new at.ErrnoError(r);at.currentPath=t.path},createDefaultDirectories:()=>{at.mkdir("/tmp"),at.mkdir("/home"),at.mkdir("/home/web_user")},createDefaultDevices:()=>{at.mkdir("/dev"),at.registerDevice(at.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),at.mkdev("/dev/null",at.makedev(1,3)),tt.register(at.makedev(5,0),tt.default_tty_ops),tt.register(at.makedev(6,0),tt.default_tty1_ops),at.mkdev("/dev/tty",at.makedev(5,0)),at.mkdev("/dev/tty1",at.makedev(6,0));var e=Qe();at.createDevice("/dev","random",e),at.createDevice("/dev","urandom",e),at.mkdir("/dev/shm"),at.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{at.mkdir("/proc");var e=at.mkdir("/proc/self");at.mkdir("/proc/self/fd"),at.mount({mount:()=>{var t=at.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=at.getStream(r);if(!n)throw new at.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?at.createDevice("/dev","stdin",o.stdin):at.symlink("/dev/tty","/dev/stdin"),o.stdout?at.createDevice("/dev","stdout",null,o.stdout):at.symlink("/dev/tty","/dev/stdout"),o.stderr?at.createDevice("/dev","stderr",null,o.stderr):at.symlink("/dev/tty1","/dev/stderr");at.open("/dev/stdin",0),at.open("/dev/stdout",1),at.open("/dev/stderr",1)},ensureErrnoError:()=>{at.ErrnoError||(at.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},at.ErrnoError.prototype=new Error,at.ErrnoError.prototype.constructor=at.ErrnoError,[44].forEach((e=>{at.genericErrors[e]=new at.ErrnoError(e),at.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{at.ensureErrnoError(),at.nameTable=new Array(4096),at.mount(it,{},"/"),at.createDefaultDirectories(),at.createDefaultDevices(),at.createSpecialDirectories(),at.filesystems={MEMFS:it}},init:(e,t,r)=>{at.init.initialized=!0,at.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,at.createStandardStreams()},quit:()=>{at.init.initialized=!1;for(var e=0;e<at.streams.length;e++){var t=at.streams[e];t&&at.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=at.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=at.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=at.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=Ke.basename(e),n=at.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:at.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var s=Ke.join2(e,i);try{at.mkdir(s)}catch(e){}e=s}}return s},createFile:(e,t,r,n,o)=>{var i=Ke.join2("string"==typeof e?e:at.getPath(e),t),s=at.getMode(n,o);return at.create(i,s)},createDataFile:(e,t,r,n,o,i)=>{var s=t;e&&(e="string"==typeof e?e:at.getPath(e),s=t?Ke.join2(e,t):e);var a=at.getMode(n,o),c=at.create(s,a);if(r){if("string"==typeof r){for(var l=new Array(r.length),u=0,_=r.length;u<_;++u)l[u]=r.charCodeAt(u);r=l}at.chmod(c,146|a);var f=at.open(c,577);at.write(f,r,0,r.length,0,i),at.close(f),at.chmod(c,a)}return c},createDevice:(e,t,r,n)=>{var o=Ke.join2("string"==typeof e?e:at.getPath(e),t),i=at.getMode(!!r,!!n);at.createDevice.major||(at.createDevice.major=64);var s=at.makedev(at.createDevice.major++,0);return at.registerDevice(s,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,o,i)=>{for(var s=0,a=0;a<o;a++){var c;try{c=r()}catch(e){throw new at.ErrnoError(29)}if(void 0===c&&0===s)throw new at.ErrnoError(6);if(null==c)break;s++,t[n+a]=c}return s&&(e.node.timestamp=Date.now()),s},write:(e,t,r,o,i)=>{for(var s=0;s<o;s++)try{n(t[r+s])}catch(e){throw new at.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),s}}),at.mkdev(o,i,s)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)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(!c)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=wn(c(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new at.ErrnoError(29)}},createLazyFile:(e,t,r,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,s=1048576;o||(s=n);var a=this;a.setDataGetter((e=>{var t=e*s,o=(e+1)*s-1;if(o=Math.min(o,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==s&&o.setRequestHeader("Range","bytes="+e+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):wn(o.responseText||"",!0)})(t,o)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!i&&n||(s=n=1,n=this.getter(0).length,s=n,S("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new i;Object.defineProperties(s,{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:s}}else a={isDevice:!1,url:r};var c=at.createFile(e,t,a,n,o);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];l[e]=function(){return at.forceLoadFile(c),t.apply(null,arguments)}})),l.read=(e,t,r,n,o)=>{at.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var s=Math.min(i.length-o,n);if(i.slice)for(var a=0;a<s;a++)t[r+a]=i[o+a];else for(a=0;a<s;a++)t[r+a]=i.get(o+a);return s},c.stream_ops=l,c},createPreloadedFile:(e,t,r,n,o,i,s,a,c,l)=>{var u=t?et.resolve(Ke.join2(e,t)):e;function _(r){function _(r){l&&l(),a||at.createDataFile(e,t,r,n,o,c),i&&i(),ge()}Browser.handledByPreloadPlugin(r,u,_,(()=>{s&&s(),ge()}))||_(r)}he(),"string"==typeof r?st(r,(e=>_(e)),s):_(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:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=at.indexedDB();try{var o=n.open(at.DB_NAME(),at.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{S("creating db"),o.result.createObjectStore(at.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([at.DB_STORE_NAME],"readwrite"),i=n.objectStore(at.DB_STORE_NAME),s=0,a=0,c=e.length;function l(){0==a?t():r()}e.forEach((e=>{var t=i.put(at.analyzePath(e).object.contents,e);t.onsuccess=()=>{++s+a==c&&l()},t.onerror=()=>{a++,s+a==c&&l()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=at.indexedDB();try{var o=n.open(at.DB_NAME(),at.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([at.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var s=i.objectStore(at.DB_STORE_NAME),a=0,c=0,l=e.length;function u(){0==c?t():r()}e.forEach((e=>{var t=s.get(e);t.onsuccess=()=>{at.analyzePath(e).exists&&at.unlink(e),at.createDataFile(Ke.dirname(e),Ke.basename(e),t.result,!0,!0,!0),++a+c==l&&u()},t.onerror=()=>{c++,a+c==l&&u()}})),i.onerror=r},o.onerror=r}},ct={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(Ke.isAbs(t))return t;var n;if(-100===e)n=at.cwd();else{var o=at.getStream(e);if(!o)throw new at.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new at.ErrnoError(44);return n}return Ke.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&Ke.normalize(t)!==Ke.normalize(at.getPath(e.node)))return-54;throw e}return Y[r>>2]=n.dev,Y[r+4>>2]=0,Y[r+8>>2]=n.ino,Y[r+12>>2]=n.mode,Y[r+16>>2]=n.nlink,Y[r+20>>2]=n.uid,Y[r+24>>2]=n.gid,Y[r+28>>2]=n.rdev,Y[r+32>>2]=0,Ee=[n.size>>>0,(ve=n.size,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],Y[r+40>>2]=Ee[0],Y[r+44>>2]=Ee[1],Y[r+48>>2]=4096,Y[r+52>>2]=n.blocks,Y[r+56>>2]=n.atime.getTime()/1e3|0,Y[r+60>>2]=0,Y[r+64>>2]=n.mtime.getTime()/1e3|0,Y[r+68>>2]=0,Y[r+72>>2]=n.ctime.getTime()/1e3|0,Y[r+76>>2]=0,Ee=[n.ino>>>0,(ve=n.ino,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],Y[r+80>>2]=Ee[0],Y[r+84>>2]=Ee[1],0},doMsync:function(e,t,r,n,o){var i=q.slice(e,e+r);at.msync(t,i,o,r,n)},varargs:void 0,get:function(){return ct.varargs+=4,Y[ct.varargs-4>>2]},getStr:function(e){return B(e)},getStreamFromFD:function(e){var t=at.getStream(e);if(!t)throw new at.ErrnoError(8);return t}};function lt(e){try{return e=ct.getStr(e),at.chdir(e),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function ut(e,t){try{return e=ct.getStr(e),at.chmod(e,t),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}var _t={mount:function(e){return o.websocket=o.websocket&&"object"==typeof o.websocket?o.websocket:{},o.websocket._callbacks={},o.websocket.on=function(e,t){return"function"==typeof t&&(this._callbacks[e]=t),this},o.websocket.emit=function(e,t){"function"==typeof this._callbacks[e]&&this._callbacks[e].call(this,t)},at.createNode(null,"/",16895,0)},createSocket:function(e,t,r){if(1==(t&=-526337)&&r&&6!=r)throw new at.ErrnoError(66);var n={family:e,type:t,protocol:r,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:_t.websocket_sock_ops},o=_t.nextname(),i=at.createNode(_t.root,o,49152,0);i.sock=n;var s=at.createStream({path:o,node:i,flags:2,seekable:!1,stream_ops:_t.stream_ops});return n.stream=s,n},getSocket:function(e){var t=at.getStream(e);return t&&at.isSocket(t.node.mode)?t.node.sock:null},stream_ops:{poll:function(e){var t=e.node.sock;return t.sock_ops.poll(t)},ioctl:function(e,t,r){var n=e.node.sock;return n.sock_ops.ioctl(n,t,r)},read:function(e,t,r,n,o){var i=e.node.sock,s=i.sock_ops.recvmsg(i,n);return s?(t.set(s.buffer,r),s.buffer.length):0},write:function(e,t,r,n,o){var i=e.node.sock;return i.sock_ops.sendmsg(i,t,r,n)},close:function(e){var t=e.node.sock;t.sock_ops.close(t)}},nextname:function(){return _t.nextname.current||(_t.nextname.current=0),"socket["+_t.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(e,t,r){var n;if("object"==typeof t&&(n=t,t=null,r=null),n)if(n._socket)t=n._socket.remoteAddress,r=n._socket.remotePort;else{var s=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!s)throw new Error("WebSocket URL must be in the format ws(s)://address:port");t=s[1],r=parseInt(s[2],10)}else try{var a=o.websocket&&"object"==typeof o.websocket,c="ws:#".replace("#","//");if(a&&"string"==typeof o.websocket.url&&(c=o.websocket.url),"ws://"===c||"wss://"===c){var l=t.split("/");c=c+l[0]+":"+r+"/"+l.slice(1).join("/")}var u="binary";a&&"string"==typeof o.websocket.subprotocol&&(u=o.websocket.subprotocol);var _=void 0;"null"!==u&&(_=u=u.replace(/^ +| +$/g,"").split(/ *, */)),a&&null===o.websocket.subprotocol&&(u="null",_=void 0),(n=new(b?i("ws"):WebSocket)(c,_)).binaryType="arraybuffer"}catch(e){throw new at.ErrnoError(23)}var f={addr:t,port:r,socket:n,dgram_send_queue:[]};return _t.websocket_sock_ops.addPeer(e,f),_t.websocket_sock_ops.handlePeerEvents(e,f),2===e.type&&void 0!==e.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&e.sport)>>8,255&e.sport])),f},getPeer:function(e,t,r){return e.peers[t+":"+r]},addPeer:function(e,t){e.peers[t.addr+":"+t.port]=t},removePeer:function(e,t){delete e.peers[t.addr+":"+t.port]},handlePeerEvents:function(e,t){var r=!0,n=function(){o.websocket.emit("open",e.stream.fd);try{for(var r=t.dgram_send_queue.shift();r;)t.socket.send(r),r=t.dgram_send_queue.shift()}catch(e){t.socket.close()}};function i(n){if("string"==typeof n){n=(new TextEncoder).encode(n)}else{if(C(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var i=r;if(r=!1,i&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var s=n[8]<<8|n[9];return _t.websocket_sock_ops.removePeer(e,t),t.port=s,void _t.websocket_sock_ops.addPeer(e,t)}e.recv_queue.push({addr:t.addr,port:t.port,data:n}),o.websocket.emit("message",e.stream.fd)}b?(t.socket.on("open",n),t.socket.on("message",(function(e,t){t&&i(new Uint8Array(e).buffer)})),t.socket.on("close",(function(){o.websocket.emit("close",e.stream.fd)})),t.socket.on("error",(function(t){e.error=14,o.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])}))):(t.socket.onopen=n,t.socket.onclose=function(){o.websocket.emit("close",e.stream.fd)},t.socket.onmessage=function(e){i(e.data)},t.socket.onerror=function(t){e.error=14,o.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll:function(e){if(1===e.type&&e.server)return e.pending.length?65:0;var t=0,r=1===e.type?_t.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!r||r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=65),(!r||r&&r.socket.readyState===r.socket.OPEN)&&(t|=4),(r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=16),t},ioctl:function(e,t,r){if(21531===t){var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),Y[r>>2]=n,0}return 28},close:function(e){if(e.server){try{e.server.close()}catch(e){}e.server=null}for(var t=Object.keys(e.peers),r=0;r<t.length;r++){var n=e.peers[t[r]];try{n.socket.close()}catch(e){}_t.websocket_sock_ops.removePeer(e,n)}return 0},bind:function(e,t,r){if(void 0!==e.saddr||void 0!==e.sport)throw new at.ErrnoError(28);if(e.saddr=t,e.sport=r,2===e.type){e.server&&(e.server.close(),e.server=null);try{e.sock_ops.listen(e,0)}catch(e){if(!(e instanceof at.ErrnoError))throw e;if(138!==e.errno)throw e}}},connect:function(e,t,r){if(e.server)throw new at.ErrnoError(138);if(void 0!==e.daddr&&void 0!==e.dport){var n=_t.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new at.ErrnoError(7):new at.ErrnoError(30)}var o=_t.websocket_sock_ops.createPeer(e,t,r);throw e.daddr=o.addr,e.dport=o.port,new at.ErrnoError(26)},listen:function(e,t){if(!b)throw new at.ErrnoError(138);if(e.server)throw new at.ErrnoError(28);var r=i("ws").Server,n=e.saddr;e.server=new r({host:n,port:e.sport}),o.websocket.emit("listen",e.stream.fd),e.server.on("connection",(function(t){if(1===e.type){var r=_t.createSocket(e.family,e.type,e.protocol),n=_t.websocket_sock_ops.createPeer(r,t);r.daddr=n.addr,r.dport=n.port,e.pending.push(r),o.websocket.emit("connection",r.stream.fd)}else _t.websocket_sock_ops.createPeer(e,t),o.websocket.emit("connection",e.stream.fd)})),e.server.on("close",(function(){o.websocket.emit("close",e.stream.fd),e.server=null})),e.server.on("error",(function(t){e.error=23,o.websocket.emit("error",[e.stream.fd,e.error,"EHOSTUNREACH: Host is unreachable"])}))},accept:function(e){if(!e.server||!e.pending.length)throw new at.ErrnoError(28);var t=e.pending.shift();return t.stream.flags=e.stream.flags,t},getname:function(e,t){var r,n;if(t){if(void 0===e.daddr||void 0===e.dport)throw new at.ErrnoError(53);r=e.daddr,n=e.dport}else r=e.saddr||0,n=e.sport||0;return{addr:r,port:n}},sendmsg:function(e,t,r,n,o,i){if(2===e.type){if(void 0!==o&&void 0!==i||(o=e.daddr,i=e.dport),void 0===o||void 0===i)throw new at.ErrnoError(17)}else o=e.daddr,i=e.dport;var s,a=_t.websocket_sock_ops.getPeer(e,o,i);if(1===e.type){if(!a||a.socket.readyState===a.socket.CLOSING||a.socket.readyState===a.socket.CLOSED)throw new at.ErrnoError(53);if(a.socket.readyState===a.socket.CONNECTING)throw new at.ErrnoError(6)}if(ArrayBuffer.isView(t)&&(r+=t.byteOffset,t=t.buffer),s=t.slice(r,r+n),2===e.type&&(!a||a.socket.readyState!==a.socket.OPEN))return a&&a.socket.readyState!==a.socket.CLOSING&&a.socket.readyState!==a.socket.CLOSED||(a=_t.websocket_sock_ops.createPeer(e,o,i)),a.dgram_send_queue.push(s),n;try{return a.socket.send(s),n}catch(e){throw new at.ErrnoError(28)}},recvmsg:function(e,t){if(1===e.type&&e.server)throw new at.ErrnoError(53);var r=e.recv_queue.shift();if(!r){if(1===e.type){var n=_t.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n){if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new at.ErrnoError(6)}throw new at.ErrnoError(53)}throw new at.ErrnoError(6)}var o=r.data.byteLength||r.data.length,i=r.data.byteOffset||0,s=r.data.buffer||r.data,a=Math.min(t,o),c={buffer:new Uint8Array(s,i,a),addr:r.addr,port:r.port};if(1===e.type&&a<o){var l=o-a;r.data=new Uint8Array(s,i+a,l),e.recv_queue.unshift(r)}return c}}};function ft(e){var t=_t.getSocket(e);if(!t)throw new at.ErrnoError(8);return t}function dt(e){return Y[vn()>>2]=e,e}function mt(e){return(255&e)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255)}function pt(e){var t="",r=0,n=0,o=0,i=0,s=0,a=0,c=[65535&e[0],e[0]>>16,65535&e[1],e[1]>>16,65535&e[2],e[2]>>16,65535&e[3],e[3]>>16],l=!0,u="";for(a=0;a<5;a++)if(0!==c[a]){l=!1;break}if(l){if(u=mt(c[6]|c[7]<<16),-1===c[5])return t="::ffff:",t+=u;if(0===c[5])return t="::","0.0.0.0"===u&&(u=""),"0.0.0.1"===u&&(u="1"),t+=u}for(r=0;r<8;r++)0===c[r]&&(r-o>1&&(s=0),o=r,s++),s>n&&(i=r-(n=s)+1);for(r=0;r<8;r++)n>1&&0===c[r]&&r>=i&&r<i+n?r===i&&(t+=":",0===i&&(t+=":")):(t+=Number(En(65535&c[r])).toString(16),t+=r<7?":":"");return t}function wt(e,t){var r,n=J[e>>1],o=En(G[e+2>>1]);switch(n){case 2:if(16!==t)return{errno:28};r=mt(r=Y[e+4>>2]);break;case 10:if(28!==t)return{errno:28};r=pt(r=[Y[e+8>>2],Y[e+12>>2],Y[e+16>>2],Y[e+20>>2]]);break;default:return{errno:5}}return{family:n,addr:r,port:o}}function ht(e){for(var t=e.split("."),r=0;r<4;r++){var n=Number(t[r]);if(isNaN(n))return null;t[r]=n}return(t[0]|t[1]<<8|t[2]<<16|t[3]<<24)>>>0}function gt(e){return parseInt(e)}function yt(e){var t,r,n,o,i=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\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.test(e))return null;if("::"===e)return[0,0,0,0,0,0,0,0];for((e=e.startsWith("::")?e.replace("::","Z:"):e.replace("::",":Z:")).indexOf(".")>0?((t=(e=e.replace(new RegExp("[.]","g"),":")).split(":"))[t.length-4]=gt(t[t.length-4])+256*gt(t[t.length-3]),t[t.length-3]=gt(t[t.length-2])+256*gt(t[t.length-1]),t=t.slice(0,t.length-2)):t=e.split(":"),n=0,o=0,r=0;r<t.length;r++)if("string"==typeof t[r])if("Z"===t[r]){for(o=0;o<8-t.length+1;o++)i[r+o]=0;n=o-1}else i[r+n]=kn(parseInt(t[r],16));else i[r+n]=t[r];return[i[1]<<16|i[0],i[3]<<16|i[2],i[5]<<16|i[4],i[7]<<16|i[6]]}var bt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(e){var t,r=ht(e);if(null!==r)return e;if(null!==(r=yt(e)))return e;if(bt.address_map.addrs[e])t=bt.address_map.addrs[e];else{var n=bt.address_map.id++;C(n<65535,"exceeded max address mappings of 65535"),t="172.29."+(255&n)+"."+(65280&n),bt.address_map.names[t]=e,bt.address_map.addrs[e]=t}return t},lookup_addr:function(e){return bt.address_map.names[e]?bt.address_map.names[e]:null}};function vt(e,t,r){if(r&&0===e)return null;var n=wt(e,t);if(n.errno)throw new at.ErrnoError(n.errno);return n.addr=bt.lookup_addr(n.addr)||n.addr,n}function Et(e,t,r){try{var n=ft(e),o=vt(t,r);return n.sock_ops.connect(n,o.addr,o.port),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function kt(e,t,r,n){try{if(t=ct.getStr(t),t=ct.calculateAt(e,t),-8&r)return-28;var o=at.lookupPath(t,{follow:!0}).node;if(!o)return-44;var i="";return 4&r&&(i+="r"),2&r&&(i+="w"),1&r&&(i+="x"),i&&at.nodePermissions(o,i)?-2:0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function At(e,t,r,n){return 0}function St(e,t){try{return at.fchmod(e,t),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function jt(e,t,r){ct.varargs=r;try{var n=ct.getStreamFromFD(e);switch(t){case 0:return(o=ct.get())<0?-28:at.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ct.get();return n.flags|=o,0;case 5:o=ct.get();return J[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return dt(28),-1}}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function xt(e,t){try{var r=ct.getStreamFromFD(e);return ct.doStat(at.stat,r.path,t)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Ot(e,t,r){try{return e=ct.getStr(e),Y[r+4>>2]=4096,Y[r+40>>2]=4096,Y[r+8>>2]=1e6,Y[r+12>>2]=5e5,Y[r+16>>2]=5e5,Y[r+20>>2]=at.nextInode,Y[r+24>>2]=1e6,Y[r+28>>2]=42,Y[r+44>>2]=2,Y[r+36>>2]=255,0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Nt(e,t,r){try{ct.getStreamFromFD(e);return Ot(0,0,r)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Dt(e,t){return t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN}function Mt(e,t,r){try{var n=Dt(t,r);return isNaN(n)?-61:(at.ftruncate(e,n),0)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Tt(e,t){try{if(0===t)return-28;var r=at.cwd(),n=L(r)+1;return t<n?-68:(z(r,e,t),n)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Rt(e,t,r){try{var n=ct.getStreamFromFD(e);n.getdents||(n.getdents=at.readdir(n.path));for(var o=280,i=0,s=at.llseek(n,0,1),a=Math.floor(s/o);a<n.getdents.length&&i+o<=r;){var c,l,u=n.getdents[a];if("."===u)c=n.node.id,l=4;else if(".."===u){c=at.lookupPath(n.path,{parent:!0}).node.id,l=4}else{var _=at.lookupNode(n.node,u);c=_.id,l=at.isChrdev(_.mode)?2:at.isDir(_.mode)?4:at.isLink(_.mode)?10:8}Ee=[c>>>0,(ve=c,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],Y[t+i>>2]=Ee[0],Y[t+i+4>>2]=Ee[1],Ee=[(a+1)*o>>>0,(ve=(a+1)*o,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],Y[t+i+8>>2]=Ee[0],Y[t+i+12>>2]=Ee[1],J[t+i+16>>1]=280,V[t+i+18>>0]=l,z(u,t+i+19,256),i+=o,a+=1}return at.llseek(n,a*o,0),i}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Ct(e,t,r){ct.varargs=r;try{var n=ct.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=ct.get();return Y[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=ct.get();return at.ioctl(n,t,o);default:ye("bad ioctl syscall "+t)}}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function It(e,t){try{return e=ct.getStr(e),ct.doStat(at.lstat,e,t)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function $t(e,t,r){try{return t=ct.getStr(t),t=ct.calculateAt(e,t),"/"===(t=Ke.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),at.mkdir(t,r,0),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Pt(e,t,r,n){try{t=ct.getStr(t);var o=256&n,i=4096&n;return n&=-4353,t=ct.calculateAt(e,t,i),ct.doStat(o?at.lstat:at.stat,t,r)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Ft(e,t,r,n){ct.varargs=n;try{t=ct.getStr(t),t=ct.calculateAt(e,t);var o=n?ct.get():0;return at.open(t,r,o).fd}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Ut(e,t,r,n){try{if(t=ct.getStr(t),t=ct.calculateAt(e,t),n<=0)return-28;var o=at.readlink(t),i=Math.min(n,L(o)),s=V[r+i];return z(o,r,n+1),V[r+i]=s,i}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Bt(e,t,r,n){try{return t=ct.getStr(t),n=ct.getStr(n),t=ct.calculateAt(e,t),n=ct.calculateAt(r,n),at.rename(t,n),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Wt(e){try{return e=ct.getStr(e),at.rmdir(e),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function zt(e,t,r,n,o,i){try{var s=ft(e),a=vt(o,i,!0);return a?s.sock_ops.sendmsg(s,V,t,r,a.addr,a.port):at.write(s.stream,V,t,r)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Lt(e,t,r){try{return _t.createSocket(e,t,r).stream.fd}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Ht(e,t){try{return e=ct.getStr(e),ct.doStat(at.stat,e,t)}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Vt(e,t,r){try{return t=ct.getStr(t),t=ct.calculateAt(e,t),0===r?at.unlink(t):512===r?at.rmdir(t):ye("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function qt(e,t,r,n){try{if(t=ct.getStr(t),t=ct.calculateAt(e,t,!0),r){var o=Y[r>>2],i=Y[r+4>>2];s=1e3*o+i/1e6,a=1e3*(o=Y[(r+=8)>>2])+(i=Y[r+4>>2])/1e6}else var s=Date.now(),a=s;return at.utime(t,s,a),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function Jt(){return Date.now()}var Gt=!0;function Yt(){return Gt}function Xt(){throw 1/0}function Zt(e,t){var r=new Date(1e3*Y[e>>2]);Y[t>>2]=r.getUTCSeconds(),Y[t+4>>2]=r.getUTCMinutes(),Y[t+8>>2]=r.getUTCHours(),Y[t+12>>2]=r.getUTCDate(),Y[t+16>>2]=r.getUTCMonth(),Y[t+20>>2]=r.getUTCFullYear()-1900,Y[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;Y[t+28>>2]=o}function Kt(e,t){var r=new Date(1e3*Y[e>>2]);Y[t>>2]=r.getSeconds(),Y[t+4>>2]=r.getMinutes(),Y[t+8>>2]=r.getHours(),Y[t+12>>2]=r.getDate(),Y[t+16>>2]=r.getMonth(),Y[t+20>>2]=r.getFullYear()-1900,Y[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;Y[t+28>>2]=o,Y[t+36>>2]=-60*r.getTimezoneOffset();var i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),s=n.getTimezoneOffset(),a=0|(i!=s&&r.getTimezoneOffset()==Math.min(s,i));Y[t+32>>2]=a}function Qt(e){var t=new Date(Y[e+20>>2]+1900,Y[e+16>>2],Y[e+12>>2],Y[e+8>>2],Y[e+4>>2],Y[e>>2],0),r=Y[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),a=Math.min(s,i);if(r<0)Y[e+32>>2]=Number(i!=s&&a==n);else if(r>0!=(a==n)){var c=Math.max(s,i),l=r>0?a:c;t.setTime(t.getTime()+6e4*(l-n))}Y[e+24>>2]=t.getDay();var u=(t.getTime()-o.getTime())/864e5|0;return Y[e+28>>2]=u,Y[e>>2]=t.getSeconds(),Y[e+4>>2]=t.getMinutes(),Y[e+8>>2]=t.getHours(),Y[e+12>>2]=t.getDate(),Y[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function er(e,t,r,n,o,i){try{var s=at.getStream(n);if(!s)return-8;var a=at.mmap(s,e,o,t,r),c=a.ptr;return Y[i>>2]=a.allocated,c}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function tr(e,t,r,n,o,i){try{var s=at.getStream(o);s&&(2&r&&ct.doMsync(e,s,t,n,i),at.munmap(s))}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return-e.errno}}function rr(e,t,r){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),s=o.getTimezoneOffset(),a=i.getTimezoneOffset(),c=Math.max(s,a);function l(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}Y[e>>2]=60*c,Y[t>>2]=Number(s!=a);var u=l(o),_=l(i),f=Q(u),d=Q(_);a<s?(X[r>>2]=f,X[r+4>>2]=d):(X[r>>2]=d,X[r+4>>2]=f)}function nr(e,t,r){nr.called||(nr.called=!0,rr(e,t,r))}function or(){ye("")}var ir={batchedQuotaMax:65536,getBatchedRandomValues:function(e,t){const r="undefined"!=typeof SharedArrayBuffer&&o.HEAPU8.buffer instanceof SharedArrayBuffer,n=r?new ArrayBuffer(t):o.HEAPU8.buffer,i=r?0:e;for(let e=0;e<t;e+=this.batchedQuotaMax){const r=new Uint8Array(n,i+e,Math.min(t-e,this.batchedQuotaMax));crypto.getRandomValues(r)}if(r){new Uint8Array(o.HEAPU8.buffer,e,t).set(new Uint8Array(n))}}};function sr(e,t){return"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(ir.getBatchedRandomValues(e,t),0):-1}var ar,cr=[];function lr(e,t){var r;for(cr.length=0,t>>=2;r=q[e++];)t+=105!=r&t,cr.push(105==r?Y[t]:K[t++>>1]),++t;return cr}function ur(e,t,r){var n=lr(t,r);return Ne[e].apply(null,n)}function _r(){return 2147483648}function fr(){return b?1:1e3}function dr(e,t,r){q.copyWithin(e,t,t+r)}function mr(e){try{return M.grow(e-H.byteLength+65535>>>16),re(M.buffer),1}catch(e){}}function pr(e){var t=q.length,r=2147483648;if((e>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);if(o=Math.min(o,e+100663296),mr(Math.min(r,(i=Math.max(e,o))+((s=65536)-i%s)%s)))return!0}var i,s;return!1}ar=b?()=>{var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:()=>performance.now();var wr={};function hr(){return w||"./this.program"}function gr(){if(!gr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:hr()};for(var t in wr)void 0===wr[t]?delete e[t]:e[t]=wr[t];var r=[];for(var t in e)r.push(t+"="+e[t]);gr.strings=r}return gr.strings}function yr(e,t){var r=0;return gr().forEach((function(n,o){var i=t+r;X[e+4*o>>2]=i,te(n,i),r+=n.length+1})),0}function br(e,t){var r=gr();X[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),X[t>>2]=n,0}function vr(e){Ao(e)}function Er(e){try{var t=ct.getStreamFromFD(e);return at.close(t),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function kr(e,t){try{var r=ct.getStreamFromFD(e),n=r.tty?2:at.isDir(r.mode)?3:at.isLink(r.mode)?7:4;return V[t>>0]=n,0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function Ar(e,t,r,n){for(var o=0,i=0;i<r;i++){var s=X[t>>2],a=X[t+4>>2];t+=8;var c=at.read(e,V,s,a,n);if(c<0)return-1;if(o+=c,c<a)break}return o}function Sr(e,t,r,n,o,i){try{var s=Dt(n,o);if(isNaN(s))return 61;var a=Ar(ct.getStreamFromFD(e),t,r,s);return Y[i>>2]=a,0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function jr(e,t,r,n){for(var o=0,i=0;i<r;i++){var s=X[t>>2],a=X[t+4>>2];t+=8;var c=at.write(e,V,s,a,n);if(c<0)return-1;o+=c}return o}function xr(e,t,r,n,o,i){try{var s=Dt(n,o);if(isNaN(s))return 61;var a=jr(ct.getStreamFromFD(e),t,r,s);return Y[i>>2]=a,0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function Or(e,t,r,n){try{var o=Ar(ct.getStreamFromFD(e),t,r);return Y[n>>2]=o,0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function Nr(e,t,r,n,o){try{var i=Dt(t,r);if(isNaN(i))return 61;var s=ct.getStreamFromFD(e);return at.llseek(s,i,n),Ee=[s.position>>>0,(ve=s.position,+Math.abs(ve)>=1?ve>0?(0|Math.min(+Math.floor(ve/4294967296),4294967295))>>>0:~~+Math.ceil((ve-+(~~ve>>>0))/4294967296)>>>0:0)],Y[o>>2]=Ee[0],Y[o+4>>2]=Ee[1],s.getdents&&0===i&&0===n&&(s.getdents=null),0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function Dr(e){try{var t=ct.getStreamFromFD(e);return t.stream_ops&&t.stream_ops.fsync?-t.stream_ops.fsync(t):0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function Mr(e,t,r,n){try{var o=jr(ct.getStreamFromFD(e),t,r);return X[n>>2]=o,0}catch(e){if(void 0===at||!(e instanceof at.ErrnoError))throw e;return e.errno}}function Tr(){return D()}function Rr(e){return e}function Cr(){return __dotnet_runtime.__linker_exports.mono_set_timeout.apply(__dotnet_runtime,arguments)}function Ir(){return __dotnet_runtime.__linker_exports.mono_wasm_bind_cs_function.apply(__dotnet_runtime,arguments)}function $r(){return __dotnet_runtime.__linker_exports.mono_wasm_bind_js_function.apply(__dotnet_runtime,arguments)}function Pr(){return __dotnet_runtime.__linker_exports.mono_wasm_create_cs_owned_object_ref.apply(__dotnet_runtime,arguments)}function Fr(){return __dotnet_runtime.__linker_exports.mono_wasm_get_by_index_ref.apply(__dotnet_runtime,arguments)}function Ur(){return __dotnet_runtime.__linker_exports.mono_wasm_get_global_object_ref.apply(__dotnet_runtime,arguments)}function Br(){return __dotnet_runtime.__linker_exports.mono_wasm_get_object_property_ref.apply(__dotnet_runtime,arguments)}function Wr(){return __dotnet_runtime.__linker_exports.mono_wasm_invoke_bound_function.apply(__dotnet_runtime,arguments)}function zr(){return __dotnet_runtime.__linker_exports.mono_wasm_invoke_js_blazor.apply(__dotnet_runtime,arguments)}function Lr(){return __dotnet_runtime.__linker_exports.mono_wasm_invoke_js_with_args_ref.apply(__dotnet_runtime,arguments)}function Hr(){return __dotnet_runtime.__linker_exports.mono_wasm_marshal_promise.apply(__dotnet_runtime,arguments)}function Vr(){return __dotnet_runtime.__linker_exports.mono_wasm_release_cs_owned_object.apply(__dotnet_runtime,arguments)}function qr(){return __dotnet_runtime.__linker_exports.mono_wasm_set_by_index_ref.apply(__dotnet_runtime,arguments)}function Jr(){return __dotnet_runtime.__linker_exports.mono_wasm_set_entrypoint_breakpoint.apply(__dotnet_runtime,arguments)}function Gr(){return __dotnet_runtime.__linker_exports.mono_wasm_set_object_property_ref.apply(__dotnet_runtime,arguments)}function Yr(){return __dotnet_runtime.__linker_exports.mono_wasm_trace_logger.apply(__dotnet_runtime,arguments)}function Xr(){return __dotnet_runtime.__linker_exports.mono_wasm_typed_array_from_ref.apply(__dotnet_runtime,arguments)}function Zr(){return __dotnet_runtime.__linker_exports.mono_wasm_typed_array_to_array_ref.apply(__dotnet_runtime,arguments)}function Kr(){return __dotnet_runtime.__linker_exports.schedule_background_exec.apply(__dotnet_runtime,arguments)}function Qr(e){N(e)}function en(e){return e%4==0&&(e%100!=0||e%400==0)}function tn(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var rn=[31,29,31,30,31,30,31,31,30,31,30,31],nn=[31,28,31,30,31,30,31,31,30,31,30,31];function on(e,t){for(var r=new Date(e.getTime());t>0;){var n=en(r.getFullYear()),o=r.getMonth(),i=(n?rn:nn)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function sn(e,t,r,n){var o=Y[n+40>>2],i={tm_sec:Y[n>>2],tm_min:Y[n+4>>2],tm_hour:Y[n+8>>2],tm_mday:Y[n+12>>2],tm_mon:Y[n+16>>2],tm_year:Y[n+20>>2],tm_wday:Y[n+24>>2],tm_yday:Y[n+28>>2],tm_isdst:Y[n+32>>2],tm_gmtoff:Y[n+36>>2],tm_zone:o?B(o):""},s=B(r),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 c in a)s=s.replace(new RegExp(c,"g"),a[c]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function _(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return _(e,t,"0")}function d(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function m(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 p(e){var t=on(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(r),i=m(n);return d(o,t)<=0?d(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var w={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return _(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+tn(en(e.tm_year+1900)?rn:nn,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return f(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&en(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&en(e.tm_year%400-1))&&t++}return f(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(t/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 t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in s=s.replace(/%%/g,"\0\0"),w)s.includes(c)&&(s=s.replace(new RegExp(c,"g"),w[c](i)));var h=wn(s=s.replace(/\0\0/g,"%"),!1);return h.length>t?0:(ee(h,e),h.length-1)}function an(e,t,r,n){return sn(e,t,r,n)}function cn(e){if(b){if(!e)return 1;var t=B(e);if(!t.length)return 0;var r=i("child_process").spawnSync(t,[],{shell:!0,stdio:"inherit"}),n=(e,t)=>e<<8|t;if(null===r.status){return n(0,(e=>{switch(e){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2})(r.signal))}return n(r.status,0)}return e?(dt(52),-1):0}var ln=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=at.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},un=365,_n=146;let fn;Object.defineProperties(ln.prototype,{read:{get:function(){return(this.mode&un)===un},set:function(e){e?this.mode|=un:this.mode&=~un}},write:{get:function(){return(this.mode&_n)===_n},set:function(e){e?this.mode|=_n:this.mode&=~_n}},isFolder:{get:function(){return at.isDir(this.mode)}},isDevice:{get:function(){return at.isChrdev(this.mode)}}}),at.FSNode=ln,at.staticInit(),o.FS_createPath=at.createPath,o.FS_createDataFile=at.createDataFile,o.FS_readFile=at.readFile,o.FS_createPath=at.createPath,o.FS_createDataFile=at.createDataFile,o.FS_createPreloadedFile=at.createPreloadedFile,o.FS_unlink=at.unlink,o.FS_createLazyFile=at.createLazyFile,o.FS_createDevice=at.createDevice;let dn={scriptUrl:import.meta.url,fetch:globalThis.fetch,require:i,updateGlobalBufferAndViews:re,pthreadReplacements:fn};b&&(dn.requirePromise=import("module").then((e=>e.createRequire(import.meta.url))));let mn=__dotnet_runtime.__initializeImportsAndExports({isGlobal:!1,isNode:b,isWorker:y,isShell:v,isWeb:g,isPThread:!1,quit_:h,ExitStatus:Eo,requirePromise:dn.requirePromise},{mono:MONO,binding:BINDING,internal:INTERNAL,module:o,marshaled_imports:IMPORTS},dn,a);re=dn.updateGlobalBufferAndViews;var pn=dn.fetch;e=s=E=dn.scriptDirectory,b&&dn.requirePromise.then((e=>{i=e}));T=dn.noExitRuntime;function wn(e,t,r){var n=r>0?r:L(e)+1,o=new Array(n),i=W(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var hn,gn={__assert_fail:Ie,__cxa_allocate_exception:$e,__cxa_begin_catch:Be,__cxa_end_catch:Ve,__cxa_find_matching_catch_2:Je,__cxa_find_matching_catch_3:Ge,__cxa_free_exception:Le,__cxa_rethrow:Ye,__cxa_throw:Xe,__cxa_uncaught_exceptions:Ze,__resumeException:qe,__syscall_chdir:lt,__syscall_chmod:ut,__syscall_connect:Et,__syscall_faccessat:kt,__syscall_fadvise64:At,__syscall_fchmod:St,__syscall_fcntl64:jt,__syscall_fstat64:xt,__syscall_fstatfs64:Nt,__syscall_ftruncate64:Mt,__syscall_getcwd:Tt,__syscall_getdents64:Rt,__syscall_ioctl:Ct,__syscall_lstat64:It,__syscall_mkdirat:$t,__syscall_newfstatat:Pt,__syscall_openat:Ft,__syscall_readlinkat:Ut,__syscall_renameat:Bt,__syscall_rmdir:Wt,__syscall_sendto:zt,__syscall_socket:Lt,__syscall_stat64:Ht,__syscall_unlinkat:Vt,__syscall_utimensat:qt,_emscripten_date_now:Jt,_emscripten_get_now_is_monotonic:Yt,_emscripten_throw_longjmp:Xt,_gmtime_js:Zt,_localtime_js:Kt,_mktime_js:Qt,_mmap_js:er,_munmap_js:tr,_tzset_js:nr,abort:or,dotnet_browser_entropy:sr,emscripten_asm_const_int:ur,emscripten_get_heap_max:_r,emscripten_get_now:ar,emscripten_get_now_res:fr,emscripten_memcpy_big:dr,emscripten_resize_heap:pr,environ_get:yr,environ_sizes_get:br,exit:vr,fd_close:Er,fd_fdstat_get:kr,fd_pread:Sr,fd_pwrite:xr,fd_read:Or,fd_seek:Nr,fd_sync:Dr,fd_write:Mr,getTempRet0:Tr,invoke_diii:mo,invoke_fiii:fo,invoke_i:no,invoke_ii:Pn,invoke_iii:Wn,invoke_iiii:Bn,invoke_iiiii:Hn,invoke_iiiiid:uo,invoke_iiiiii:Yn,invoke_iiiiiid:Vn,invoke_iiiiiii:Xn,invoke_iiiiiiid:Zn,invoke_iiiiiiii:io,invoke_iiiiiiiii:co,invoke_iiiiiiiiii:Jn,invoke_iiiiiiiiiii:so,invoke_iiiiiiiiiiii:zn,invoke_iiiiiiiiiiiii:_o,invoke_iiiiij:bo,invoke_iij:ho,invoke_j:yo,invoke_ji:wo,invoke_jiiii:vo,invoke_v:ro,invoke_vi:Fn,invoke_vidd:Gn,invoke_vii:Ln,invoke_viii:Un,invoke_viiii:qn,invoke_viiiii:Kn,invoke_viiiiii:eo,invoke_viiiiiii:to,invoke_viiiiiiii:lo,invoke_viiiiiiiii:Qn,invoke_viiiiiiiiii:oo,invoke_viiiiiiiiiii:ao,invoke_viiiiiiiiiiiiiii:po,invoke_viijii:go,llvm_eh_typeid_for:Rr,mono_set_timeout:Cr,mono_wasm_bind_cs_function:Ir,mono_wasm_bind_js_function:$r,mono_wasm_create_cs_owned_object_ref:Pr,mono_wasm_get_by_index_ref:Fr,mono_wasm_get_global_object_ref:Ur,mono_wasm_get_object_property_ref:Br,mono_wasm_invoke_bound_function:Wr,mono_wasm_invoke_js_blazor:zr,mono_wasm_invoke_js_with_args_ref:Lr,mono_wasm_marshal_promise:Hr,mono_wasm_release_cs_owned_object:Vr,mono_wasm_set_by_index_ref:qr,mono_wasm_set_entrypoint_breakpoint:Jr,mono_wasm_set_object_property_ref:Gr,mono_wasm_trace_logger:Yr,mono_wasm_typed_array_from_ref:Xr,mono_wasm_typed_array_to_array_ref:Zr,schedule_background_exec:Kr,setTempRet0:Qr,strftime:sn,strftime_l:an,system:cn},yn=(Oe(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.__wasm_call_ctors).apply(null,arguments)},o._malloc=function(){return(yn=o._malloc=o.asm.malloc).apply(null,arguments)}),bn=o._free=function(){return(bn=o._free=o.asm.free).apply(null,arguments)},vn=(o._memset=function(){return(o._memset=o.asm.memset).apply(null,arguments)},o._saveSetjmp=function(){return(o._saveSetjmp=o.asm.saveSetjmp).apply(null,arguments)},o.___errno_location=function(){return(vn=o.___errno_location=o.asm.__errno_location).apply(null,arguments)}),En=(o._memalign=function(){return(o._memalign=o.asm.memalign).apply(null,arguments)},o._ntohs=function(){return(En=o._ntohs=o.asm.ntohs).apply(null,arguments)}),kn=(o._htonl=function(){return(o._htonl=o.asm.htonl).apply(null,arguments)},o._htons=function(){return(kn=o._htons=o.asm.htons).apply(null,arguments)}),An=(o._mono_wasm_register_root=function(){return(o._mono_wasm_register_root=o.asm.mono_wasm_register_root).apply(null,arguments)},o._mono_wasm_deregister_root=function(){return(o._mono_wasm_deregister_root=o.asm.mono_wasm_deregister_root).apply(null,arguments)},o._mono_wasm_add_assembly=function(){return(o._mono_wasm_add_assembly=o.asm.mono_wasm_add_assembly).apply(null,arguments)},o._mono_wasm_add_satellite_assembly=function(){return(o._mono_wasm_add_satellite_assembly=o.asm.mono_wasm_add_satellite_assembly).apply(null,arguments)},o._mono_wasm_setenv=function(){return(o._mono_wasm_setenv=o.asm.mono_wasm_setenv).apply(null,arguments)},o._mono_wasm_getenv=function(){return(o._mono_wasm_getenv=o.asm.mono_wasm_getenv).apply(null,arguments)},o._mono_wasm_register_bundled_satellite_assemblies=function(){return(o._mono_wasm_register_bundled_satellite_assemblies=o.asm.mono_wasm_register_bundled_satellite_assemblies).apply(null,arguments)},o._mono_wasm_load_runtime=function(){return(o._mono_wasm_load_runtime=o.asm.mono_wasm_load_runtime).apply(null,arguments)},o._mono_wasm_assembly_load=function(){return(o._mono_wasm_assembly_load=o.asm.mono_wasm_assembly_load).apply(null,arguments)},o._mono_wasm_get_corlib=function(){return(o._mono_wasm_get_corlib=o.asm.mono_wasm_get_corlib).apply(null,arguments)},o._mono_wasm_assembly_find_class=function(){return(o._mono_wasm_assembly_find_class=o.asm.mono_wasm_assembly_find_class).apply(null,arguments)},o._mono_wasm_runtime_run_module_cctor=function(){return(o._mono_wasm_runtime_run_module_cctor=o.asm.mono_wasm_runtime_run_module_cctor).apply(null,arguments)},o._mono_wasm_assembly_find_method=function(){return(o._mono_wasm_assembly_find_method=o.asm.mono_wasm_assembly_find_method).apply(null,arguments)},o._mono_wasm_get_delegate_invoke_ref=function(){return(o._mono_wasm_get_delegate_invoke_ref=o.asm.mono_wasm_get_delegate_invoke_ref).apply(null,arguments)},o._mono_wasm_box_primitive_ref=function(){return(o._mono_wasm_box_primitive_ref=o.asm.mono_wasm_box_primitive_ref).apply(null,arguments)},o._mono_wasm_invoke_method_ref=function(){return(o._mono_wasm_invoke_method_ref=o.asm.mono_wasm_invoke_method_ref).apply(null,arguments)},o._mono_wasm_invoke_method_bound=function(){return(o._mono_wasm_invoke_method_bound=o.asm.mono_wasm_invoke_method_bound).apply(null,arguments)},o._mono_wasm_assembly_get_entry_point=function(){return(o._mono_wasm_assembly_get_entry_point=o.asm.mono_wasm_assembly_get_entry_point).apply(null,arguments)},o._mono_wasm_string_get_utf8=function(){return(o._mono_wasm_string_get_utf8=o.asm.mono_wasm_string_get_utf8).apply(null,arguments)},o._mono_wasm_string_from_js=function(){return(o._mono_wasm_string_from_js=o.asm.mono_wasm_string_from_js).apply(null,arguments)},o._mono_wasm_string_from_utf16_ref=function(){return(o._mono_wasm_string_from_utf16_ref=o.asm.mono_wasm_string_from_utf16_ref).apply(null,arguments)},o._mono_wasm_get_obj_class=function(){return(o._mono_wasm_get_obj_class=o.asm.mono_wasm_get_obj_class).apply(null,arguments)},o._mono_wasm_get_obj_type=function(){return(o._mono_wasm_get_obj_type=o.asm.mono_wasm_get_obj_type).apply(null,arguments)},o._mono_wasm_try_unbox_primitive_and_get_type_ref=function(){return(o._mono_wasm_try_unbox_primitive_and_get_type_ref=o.asm.mono_wasm_try_unbox_primitive_and_get_type_ref).apply(null,arguments)},o._mono_wasm_array_length=function(){return(o._mono_wasm_array_length=o.asm.mono_wasm_array_length).apply(null,arguments)},o._mono_wasm_array_get=function(){return(o._mono_wasm_array_get=o.asm.mono_wasm_array_get).apply(null,arguments)},o._mono_wasm_array_get_ref=function(){return(o._mono_wasm_array_get_ref=o.asm.mono_wasm_array_get_ref).apply(null,arguments)},o._mono_wasm_obj_array_new_ref=function(){return(o._mono_wasm_obj_array_new_ref=o.asm.mono_wasm_obj_array_new_ref).apply(null,arguments)},o._mono_wasm_obj_array_new=function(){return(o._mono_wasm_obj_array_new=o.asm.mono_wasm_obj_array_new).apply(null,arguments)},o._mono_wasm_obj_array_set=function(){return(o._mono_wasm_obj_array_set=o.asm.mono_wasm_obj_array_set).apply(null,arguments)},o._mono_wasm_obj_array_set_ref=function(){return(o._mono_wasm_obj_array_set_ref=o.asm.mono_wasm_obj_array_set_ref).apply(null,arguments)},o._mono_wasm_string_array_new_ref=function(){return(o._mono_wasm_string_array_new_ref=o.asm.mono_wasm_string_array_new_ref).apply(null,arguments)},o._mono_wasm_exec_regression=function(){return(o._mono_wasm_exec_regression=o.asm.mono_wasm_exec_regression).apply(null,arguments)},o._mono_wasm_exit=function(){return(o._mono_wasm_exit=o.asm.mono_wasm_exit).apply(null,arguments)},o._mono_wasm_set_main_args=function(){return(o._mono_wasm_set_main_args=o.asm.mono_wasm_set_main_args).apply(null,arguments)},o._mono_wasm_strdup=function(){return(o._mono_wasm_strdup=o.asm.mono_wasm_strdup).apply(null,arguments)},o._mono_wasm_parse_runtime_options=function(){return(o._mono_wasm_parse_runtime_options=o.asm.mono_wasm_parse_runtime_options).apply(null,arguments)},o._mono_wasm_enable_on_demand_gc=function(){return(o._mono_wasm_enable_on_demand_gc=o.asm.mono_wasm_enable_on_demand_gc).apply(null,arguments)},o._mono_wasm_intern_string_ref=function(){return(o._mono_wasm_intern_string_ref=o.asm.mono_wasm_intern_string_ref).apply(null,arguments)},o._mono_wasm_string_get_data_ref=function(){return(o._mono_wasm_string_get_data_ref=o.asm.mono_wasm_string_get_data_ref).apply(null,arguments)},o._mono_wasm_string_get_data=function(){return(o._mono_wasm_string_get_data=o.asm.mono_wasm_string_get_data).apply(null,arguments)},o._mono_wasm_class_get_type=function(){return(o._mono_wasm_class_get_type=o.asm.mono_wasm_class_get_type).apply(null,arguments)},o._mono_wasm_type_get_class=function(){return(o._mono_wasm_type_get_class=o.asm.mono_wasm_type_get_class).apply(null,arguments)},o._mono_wasm_get_type_name=function(){return(o._mono_wasm_get_type_name=o.asm.mono_wasm_get_type_name).apply(null,arguments)},o._mono_wasm_get_type_aqn=function(){return(o._mono_wasm_get_type_aqn=o.asm.mono_wasm_get_type_aqn).apply(null,arguments)},o._mono_wasm_write_managed_pointer_unsafe=function(){return(o._mono_wasm_write_managed_pointer_unsafe=o.asm.mono_wasm_write_managed_pointer_unsafe).apply(null,arguments)},o._mono_wasm_copy_managed_pointer=function(){return(o._mono_wasm_copy_managed_pointer=o.asm.mono_wasm_copy_managed_pointer).apply(null,arguments)},o._mono_wasm_i52_to_f64=function(){return(o._mono_wasm_i52_to_f64=o.asm.mono_wasm_i52_to_f64).apply(null,arguments)},o._mono_wasm_u52_to_f64=function(){return(o._mono_wasm_u52_to_f64=o.asm.mono_wasm_u52_to_f64).apply(null,arguments)},o._mono_wasm_f64_to_u52=function(){return(o._mono_wasm_f64_to_u52=o.asm.mono_wasm_f64_to_u52).apply(null,arguments)},o._mono_wasm_f64_to_i52=function(){return(o._mono_wasm_f64_to_i52=o.asm.mono_wasm_f64_to_i52).apply(null,arguments)},o._mono_wasm_typed_array_new_ref=function(){return(o._mono_wasm_typed_array_new_ref=o.asm.mono_wasm_typed_array_new_ref).apply(null,arguments)},o._mono_wasm_unbox_enum=function(){return(o._mono_wasm_unbox_enum=o.asm.mono_wasm_unbox_enum).apply(null,arguments)},o._mono_wasm_send_dbg_command_with_parms=function(){return(o._mono_wasm_send_dbg_command_with_parms=o.asm.mono_wasm_send_dbg_command_with_parms).apply(null,arguments)},o._mono_wasm_send_dbg_command=function(){return(o._mono_wasm_send_dbg_command=o.asm.mono_wasm_send_dbg_command).apply(null,arguments)},o._mono_wasm_event_pipe_enable=function(){return(o._mono_wasm_event_pipe_enable=o.asm.mono_wasm_event_pipe_enable).apply(null,arguments)},o._mono_wasm_event_pipe_session_start_streaming=function(){return(o._mono_wasm_event_pipe_session_start_streaming=o.asm.mono_wasm_event_pipe_session_start_streaming).apply(null,arguments)},o._mono_wasm_event_pipe_session_disable=function(){return(o._mono_wasm_event_pipe_session_disable=o.asm.mono_wasm_event_pipe_session_disable).apply(null,arguments)},o._mono_background_exec=function(){return(o._mono_background_exec=o.asm.mono_background_exec).apply(null,arguments)},o._mono_wasm_get_icudt_name=function(){return(o._mono_wasm_get_icudt_name=o.asm.mono_wasm_get_icudt_name).apply(null,arguments)},o._mono_wasm_load_icu_data=function(){return(o._mono_wasm_load_icu_data=o.asm.mono_wasm_load_icu_data).apply(null,arguments)},o._mono_print_method_from_ip=function(){return(o._mono_print_method_from_ip=o.asm.mono_print_method_from_ip).apply(null,arguments)},o._mono_set_timeout_exec=function(){return(o._mono_set_timeout_exec=o.asm.mono_set_timeout_exec).apply(null,arguments)},o.___dl_seterr=function(){return(o.___dl_seterr=o.asm.__dl_seterr).apply(null,arguments)},o._emscripten_builtin_memalign=function(){return(An=o._emscripten_builtin_memalign=o.asm.emscripten_builtin_memalign).apply(null,arguments)}),Sn=o._setThrew=function(){return(Sn=o._setThrew=o.asm.setThrew).apply(null,arguments)},jn=o.stackSave=function(){return(jn=o.stackSave=o.asm.stackSave).apply(null,arguments)},xn=o.stackRestore=function(){return(xn=o.stackRestore=o.asm.stackRestore).apply(null,arguments)},On=o.stackAlloc=function(){return(On=o.stackAlloc=o.asm.stackAlloc).apply(null,arguments)},Nn=o.___cxa_can_catch=function(){return(Nn=o.___cxa_can_catch=o.asm.__cxa_can_catch).apply(null,arguments)},Dn=o.___cxa_is_pointer_type=function(){return(Dn=o.___cxa_is_pointer_type=o.asm.__cxa_is_pointer_type).apply(null,arguments)},Mn=o.dynCall_ji=function(){return(Mn=o.dynCall_ji=o.asm.dynCall_ji).apply(null,arguments)},Tn=(o.dynCall_iiji=function(){return(o.dynCall_iiji=o.asm.dynCall_iiji).apply(null,arguments)},o.dynCall_iiij=function(){return(o.dynCall_iiij=o.asm.dynCall_iiij).apply(null,arguments)},o.dynCall_viij=function(){return(o.dynCall_viij=o.asm.dynCall_viij).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.dynCall_jiji).apply(null,arguments)},o.dynCall_vij=function(){return(o.dynCall_vij=o.asm.dynCall_vij).apply(null,arguments)},o.dynCall_iji=function(){return(o.dynCall_iji=o.asm.dynCall_iji).apply(null,arguments)},o.dynCall_jji=function(){return(o.dynCall_jji=o.asm.dynCall_jji).apply(null,arguments)},o.dynCall_jiiii=function(){return(Tn=o.dynCall_jiiii=o.asm.dynCall_jiiii).apply(null,arguments)}),Rn=o.dynCall_iij=function(){return(Rn=o.dynCall_iij=o.asm.dynCall_iij).apply(null,arguments)},Cn=(o.dynCall_iiiij=function(){return(o.dynCall_iiiij=o.asm.dynCall_iiiij).apply(null,arguments)},o.dynCall_viji=function(){return(o.dynCall_viji=o.asm.dynCall_viji).apply(null,arguments)},o.dynCall_vijiii=function(){return(o.dynCall_vijiii=o.asm.dynCall_vijiii).apply(null,arguments)},o.dynCall_viiiiij=function(){return(o.dynCall_viiiiij=o.asm.dynCall_viiiiij).apply(null,arguments)},o.dynCall_jiiiiii=function(){return(o.dynCall_jiiiiii=o.asm.dynCall_jiiiiii).apply(null,arguments)},o.dynCall_jiiiiji=function(){return(o.dynCall_jiiiiji=o.asm.dynCall_jiiiiji).apply(null,arguments)},o.dynCall_iijj=function(){return(o.dynCall_iijj=o.asm.dynCall_iijj).apply(null,arguments)},o.dynCall_jii=function(){return(o.dynCall_jii=o.asm.dynCall_jii).apply(null,arguments)},o.dynCall_jiiiiiiiii=function(){return(o.dynCall_jiiiiiiiii=o.asm.dynCall_jiiiiiiiii).apply(null,arguments)},o.dynCall_vj=function(){return(o.dynCall_vj=o.asm.dynCall_vj).apply(null,arguments)},o.dynCall_ij=function(){return(o.dynCall_ij=o.asm.dynCall_ij).apply(null,arguments)},o.dynCall_jj=function(){return(o.dynCall_jj=o.asm.dynCall_jj).apply(null,arguments)},o.dynCall_iiijiiiii=function(){return(o.dynCall_iiijiiiii=o.asm.dynCall_iiijiiiii).apply(null,arguments)},o.dynCall_j=function(){return(Cn=o.dynCall_j=o.asm.dynCall_j).apply(null,arguments)}),In=(o.dynCall_iijjiii=function(){return(o.dynCall_iijjiii=o.asm.dynCall_iijjiii).apply(null,arguments)},o.dynCall_vijjjii=function(){return(o.dynCall_vijjjii=o.asm.dynCall_vijjjii).apply(null,arguments)},o.dynCall_iijii=function(){return(o.dynCall_iijii=o.asm.dynCall_iijii).apply(null,arguments)},o.dynCall_iijiii=function(){return(o.dynCall_iijiii=o.asm.dynCall_iijiii).apply(null,arguments)},o.dynCall_vijiiii=function(){return(o.dynCall_vijiiii=o.asm.dynCall_vijiiii).apply(null,arguments)},o.dynCall_jij=function(){return(o.dynCall_jij=o.asm.dynCall_jij).apply(null,arguments)},o.dynCall_iijiiii=function(){return(o.dynCall_iijiiii=o.asm.dynCall_iijiiii).apply(null,arguments)},o.dynCall_jd=function(){return(o.dynCall_jd=o.asm.dynCall_jd).apply(null,arguments)},o.dynCall_jf=function(){return(o.dynCall_jf=o.asm.dynCall_jf).apply(null,arguments)},o.dynCall_viijii=function(){return(In=o.dynCall_viijii=o.asm.dynCall_viijii).apply(null,arguments)}),$n=o.dynCall_iiiiij=function(){return($n=o.dynCall_iiiiij=o.asm.dynCall_iiiiij).apply(null,arguments)};o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.dynCall_iiiiijj).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.dynCall_iiiiiijj).apply(null,arguments)},o.dynCall_viiji=function(){return(o.dynCall_viiji=o.asm.dynCall_viiji).apply(null,arguments)},o.dynCall_iijji=function(){return(o.dynCall_iijji=o.asm.dynCall_iijji).apply(null,arguments)},o.dynCall_jiiij=function(){return(o.dynCall_jiiij=o.asm.dynCall_jiiij).apply(null,arguments)},o.dynCall_jijj=function(){return(o.dynCall_jijj=o.asm.dynCall_jijj).apply(null,arguments)};function Pn(e,t){var r=jn();try{return Re(e)(t)}catch(e){if(xn(r),e!==e+0)throw e;Sn(1,0)}}function Fn(e,t){var r=jn();try{Re(e)(t)}catch(e){if(xn(r),e!==e+0)throw e;Sn(1,0)}}function Un(e,t,r,n){var o=jn();try{Re(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function Bn(e,t,r,n){var o=jn();try{return Re(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function Wn(e,t,r){var n=jn();try{return Re(e)(t,r)}catch(e){if(xn(n),e!==e+0)throw e;Sn(1,0)}}function zn(e,t,r,n,o,i,s,a,c,l,u,_){var f=jn();try{return Re(e)(t,r,n,o,i,s,a,c,l,u,_)}catch(e){if(xn(f),e!==e+0)throw e;Sn(1,0)}}function Ln(e,t,r){var n=jn();try{Re(e)(t,r)}catch(e){if(xn(n),e!==e+0)throw e;Sn(1,0)}}function Hn(e,t,r,n,o){var i=jn();try{return Re(e)(t,r,n,o)}catch(e){if(xn(i),e!==e+0)throw e;Sn(1,0)}}function Vn(e,t,r,n,o,i,s){var a=jn();try{return Re(e)(t,r,n,o,i,s)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function qn(e,t,r,n,o){var i=jn();try{Re(e)(t,r,n,o)}catch(e){if(xn(i),e!==e+0)throw e;Sn(1,0)}}function Jn(e,t,r,n,o,i,s,a,c,l){var u=jn();try{return Re(e)(t,r,n,o,i,s,a,c,l)}catch(e){if(xn(u),e!==e+0)throw e;Sn(1,0)}}function Gn(e,t,r,n){var o=jn();try{Re(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function Yn(e,t,r,n,o,i){var s=jn();try{return Re(e)(t,r,n,o,i)}catch(e){if(xn(s),e!==e+0)throw e;Sn(1,0)}}function Xn(e,t,r,n,o,i,s){var a=jn();try{return Re(e)(t,r,n,o,i,s)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function Zn(e,t,r,n,o,i,s,a){var c=jn();try{return Re(e)(t,r,n,o,i,s,a)}catch(e){if(xn(c),e!==e+0)throw e;Sn(1,0)}}function Kn(e,t,r,n,o,i){var s=jn();try{Re(e)(t,r,n,o,i)}catch(e){if(xn(s),e!==e+0)throw e;Sn(1,0)}}function Qn(e,t,r,n,o,i,s,a,c,l){var u=jn();try{Re(e)(t,r,n,o,i,s,a,c,l)}catch(e){if(xn(u),e!==e+0)throw e;Sn(1,0)}}function eo(e,t,r,n,o,i,s){var a=jn();try{Re(e)(t,r,n,o,i,s)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function to(e,t,r,n,o,i,s,a){var c=jn();try{Re(e)(t,r,n,o,i,s,a)}catch(e){if(xn(c),e!==e+0)throw e;Sn(1,0)}}function ro(e){var t=jn();try{Re(e)()}catch(e){if(xn(t),e!==e+0)throw e;Sn(1,0)}}function no(e){var t=jn();try{return Re(e)()}catch(e){if(xn(t),e!==e+0)throw e;Sn(1,0)}}function oo(e,t,r,n,o,i,s,a,c,l,u){var _=jn();try{Re(e)(t,r,n,o,i,s,a,c,l,u)}catch(e){if(xn(_),e!==e+0)throw e;Sn(1,0)}}function io(e,t,r,n,o,i,s,a){var c=jn();try{return Re(e)(t,r,n,o,i,s,a)}catch(e){if(xn(c),e!==e+0)throw e;Sn(1,0)}}function so(e,t,r,n,o,i,s,a,c,l,u){var _=jn();try{return Re(e)(t,r,n,o,i,s,a,c,l,u)}catch(e){if(xn(_),e!==e+0)throw e;Sn(1,0)}}function ao(e,t,r,n,o,i,s,a,c,l,u,_){var f=jn();try{Re(e)(t,r,n,o,i,s,a,c,l,u,_)}catch(e){if(xn(f),e!==e+0)throw e;Sn(1,0)}}function co(e,t,r,n,o,i,s,a,c){var l=jn();try{return Re(e)(t,r,n,o,i,s,a,c)}catch(e){if(xn(l),e!==e+0)throw e;Sn(1,0)}}function lo(e,t,r,n,o,i,s,a,c){var l=jn();try{Re(e)(t,r,n,o,i,s,a,c)}catch(e){if(xn(l),e!==e+0)throw e;Sn(1,0)}}function uo(e,t,r,n,o,i){var s=jn();try{return Re(e)(t,r,n,o,i)}catch(e){if(xn(s),e!==e+0)throw e;Sn(1,0)}}function _o(e,t,r,n,o,i,s,a,c,l,u,_,f){var d=jn();try{return Re(e)(t,r,n,o,i,s,a,c,l,u,_,f)}catch(e){if(xn(d),e!==e+0)throw e;Sn(1,0)}}function fo(e,t,r,n){var o=jn();try{return Re(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function mo(e,t,r,n){var o=jn();try{return Re(e)(t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function po(e,t,r,n,o,i,s,a,c,l,u,_,f,d,m,p){var w=jn();try{Re(e)(t,r,n,o,i,s,a,c,l,u,_,f,d,m,p)}catch(e){if(xn(w),e!==e+0)throw e;Sn(1,0)}}function wo(e,t){var r=jn();try{return Mn(e,t)}catch(e){if(xn(r),e!==e+0)throw e;Sn(1,0)}}function ho(e,t,r,n){var o=jn();try{return Rn(e,t,r,n)}catch(e){if(xn(o),e!==e+0)throw e;Sn(1,0)}}function go(e,t,r,n,o,i,s){var a=jn();try{In(e,t,r,n,o,i,s)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function yo(e){var t=jn();try{return Cn(e)}catch(e){if(xn(t),e!==e+0)throw e;Sn(1,0)}}function bo(e,t,r,n,o,i,s){var a=jn();try{return $n(e,t,r,n,o,i,s)}catch(e){if(xn(a),e!==e+0)throw e;Sn(1,0)}}function vo(e,t,r,n,o){var i=jn();try{return Tn(e,t,r,n,o)}catch(e){if(xn(i),e!==e+0)throw e;Sn(1,0)}}function Eo(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function ko(e){function t(){hn||(hn=!0,o.calledRun=!0,R||(le(),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),ue()))}e=e||p,me>0||(ce(),me>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}function Ao(e,t){e,So(e)}function So(e){e,ae()||(o.onExit&&o.onExit(e),R=!0),h(e,new Eo(e))}if(o.ccall=$,o.cwrap=P,o.UTF8ArrayToString=U,o.UTF8ToString=B,o.addRunDependency=he,o.removeRunDependency=ge,o.FS_createPath=at.createPath,o.FS_createDataFile=at.createDataFile,o.FS_createPreloadedFile=at.createPreloadedFile,o.FS_createLazyFile=at.createLazyFile,o.FS_createDevice=at.createDevice,o.FS_unlink=at.unlink,o.print=S,o.setValue=Ce,o.getValue=Me,o.FS=at,we=function e(){hn||ko(),hn||(we=e)},o.run=ko,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return ko(),t.ready=t.ready.then((()=>mn)),t.ready}})();export default createDotnetRuntime;const MONO={},BINDING={},INTERNAL={},IMPORTS={};var ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_IS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;__dotnet_runtime.__setEmscriptenEntrypoint(createDotnetRuntime,{isNode:ENVIRONMENT_IS_NODE,isShell:ENVIRONMENT_IS_SHELL,isWeb:ENVIRONMENT_IS_WEB,isWorker:ENVIRONMENT_IS_WORKER});const dotnet=__dotnet_runtime.moduleExports.dotnet,exit=__dotnet_runtime.moduleExports.exit;export{dotnet,exit,INTERNAL}; |