PageSourceSearch

https://www.retrojunk.com/_framework/dotnet.native.g9xj38f133.js

js retrojunk.com collected 2026-09-24 22:22:48 UTC 213,574 bytes, 5,433 lines download raw bytes

1
2var createDotnetRuntime = (() => {
3  var _scriptDir = import.meta.url;
4  
5  return (
6async function(moduleArg = {}) {
7
8// include: shell.js
9// The Module object: Our interface to the outside world. We import
10// and export values on it. There are various ways Module can be used:
11// 1. Not defined. We create it here
12// 2. A function parameter, function(Module) { ..generated code.. }
13// 3. pre-run appended it, var Module = {}; ..generated code..
14// 4. External script tag defines var Module.
15// We need to check if Module already exists (e.g. case 3 above).
16// Substitution will be replaced with actual code on later stage of the build,
17// this way Closure Compiler will not mangle it (e.g. case 4. above).
18// Note that if you want to run closure, and also to use Module
19// after the generated code, you will need to define   var Module = {};
20// before the code. Then that object will be used in the code, and you
21// can continue to use Module afterwards as well.
22var Module = moduleArg;
23
24// Set up the promise that indicates the Module is initialized
25var readyPromiseResolve, readyPromiseReject;
26Module['ready'] = new Promise((resolve, reject) => {
27  readyPromiseResolve = resolve;
28  readyPromiseReject = reject;
29});
30
31// --pre-jses are emitted after the Module integration code, so that they can
32// refer to Module (if they choose; they can also define Module)
33// include: /home/appuser/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/10.0.5/runtimes/browser-wasm/native/src/es6/dotnet.es6.pre.js
34if (_nativeModuleLoaded) throw new Error("Native module already loaded");
35_nativeModuleLoaded = true;
36createDotnetRuntime = Module = moduleArg(Module);
37// end include: /home/appuser/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/10.0.5/runtimes/browser-wasm/native/src/es6/dotnet.es6.pre.js
38
39
40// Sometimes an existing Module object exists with properties
41// meant to overwrite the default module functionality. Here
42// we collect those properties and reapply _after_ we configure
43// the current environment's defaults to avoid having to be so
44// defensive during initialization.
45var moduleOverrides = Object.assign({}, Module);
46
47var arguments_ = [];
48var thisProgram = './this.program';
49var quit_ = (status, toThrow) => {
50  throw toThrow;
51};
52
53// Determine the runtime environment we are in. You can customize this by
54// setting the ENVIRONMENT setting at compile time (see settings.js).
55
56// Attempt to auto-detect the environment
57var ENVIRONMENT_IS_WEB = typeof window == 'object';
58var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function';
59// N.b. Electron.js environment is simultaneously a NODE-environment, but
60// also a web environment.
61var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string';
62var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
63
64// `/` should be present at the end if `scriptDirectory` is not empty
65var scriptDirectory = '';
66function locateFile(path) {
67  if (Module['locateFile']) {
68    return Module['locateFile'](path, scriptDirectory);
69  }
70  return scriptDirectory + path;
71}
72
73// Hooks that are implemented differently in different runtime environments.
74var read_,
75    readAsync,
76    readBinary;
77
78if (ENVIRONMENT_IS_NODE) {
79
80  // `require()` is no-op in an ESM module, use `createRequire()` to construct
81  // the require()` function.  This is only necessary for multi-environment
82  // builds, `-sENVIRONMENT=node` emits a static import declaration instead.
83  // TODO: Swap all `require()`'s with `import()`'s?
84  const { createRequire } = await import('module');
85  /** @suppress{duplicate} */
86  var require = createRequire(import.meta.url);
87  // These modules will usually be used on Node.js. Load them eagerly to avoid
88  // the complexity of lazy-loading.
89  var fs = require('fs');
90  var nodePath = require('path');
91
92  if (ENVIRONMENT_IS_WORKER) {
93    scriptDirectory = nodePath.dirname(scriptDirectory) + '/';
94  } else {
95    // EXPORT_ES6 + ENVIRONMENT_IS_NODE always requires use of import.meta.url,
96    // since there's no way getting the current absolute path of the module when
97    // support for that is not available.
98    scriptDirectory = require('url').fileURLToPath(new URL('./', import.meta.url)); // includes trailing slash
99  }
100
101// include: node_shell_read.js
102read_ = (filename, binary) => {
103  // We need to re-wrap `file://` strings to URLs. Normalizing isn't
104  // necessary in that case, the path should already be absolute.
105  filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
106  return fs.readFileSync(filename, binary ? undefined : 'utf8');
107};
108
109readBinary = (filename) => {
110  var ret = read_(filename, true);
111  if (!ret.buffer) {
112    ret = new Uint8Array(ret);
113  }
114  return ret;
115};
116
117readAsync = (filename, onload, onerror, binary = true) => {
118  // See the comment in the `read_` function.
119  filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
120  fs.readFile(filename, binary ? undefined : 'utf8', (err, data) => {
121    if (err) onerror(err);
122    else onload(binary ? data.buffer : data);
123  });
124};
125// end include: node_shell_read.js
126  if (!Module['thisProgram'] && process.argv.length > 1) {
127    thisProgram = process.argv[1].replace(/\\/g, '/');
128  }
129
130  arguments_ = process.argv.slice(2);
131
132  // MODULARIZE will export the module in the proper place outside, we don't need to export here
133
134  quit_ = (status, toThrow) => {
135    process.exitCode = status;
136    throw toThrow;
137  };
138
139} else
140if (ENVIRONMENT_IS_SHELL) {
141
142  if (typeof read != 'undefined') {
143    read_ = read;
144  }
145
146  readBinary = (f) => {
147    if (typeof readbuffer == 'function') {
148      return new Uint8Array(readbuffer(f));
149    }
150    let data = read(f, 'binary');
151    assert(typeof data == 'object');
152    return data;
153  };
154
155  readAsync = (f, onload, onerror) => {
156    setTimeout(() => onload(readBinary(f)));
157  };
158
159  if (typeof clearTimeout == 'undefined') {
160    globalThis.clearTimeout = (id) => {};
161  }
162
163  if (typeof setTimeout == 'undefined') {
164    // spidermonkey lacks setTimeout but we use it above in readAsync.
165    globalThis.setTimeout = (f) => (typeof f == 'function') ? f() : abort();
166  }
167
168  if (typeof scriptArgs != 'undefined') {
169    arguments_ = scriptArgs;
170  } else if (typeof arguments != 'undefined') {
171    arguments_ = arguments;
172  }
173
174  if (typeof quit == 'function') {
175    quit_ = (status, toThrow) => {
176      // Unlike node which has process.exitCode, d8 has no such mechanism. So we
177      // have no way to set the exit code and then let the program exit with
178      // that code when it naturally stops running (say, when all setTimeouts
179      // have completed). For that reason, we must call `quit` - the only way to
180      // set the exit code - but quit also halts immediately.  To increase
181      // consistency with node (and the web) we schedule the actual quit call
182      // using a setTimeout to give the current stack and any exception handlers
183      // a chance to run.  This enables features such as addOnPostRun (which
184      // expected to be able to run code after main returns).
185      setTimeout(() => {
186        if (!(toThrow instanceof ExitStatus)) {
187          let toLog = toThrow;
188          if (toThrow && typeof toThrow == 'object' && toThrow.stack) {
189            toLog = [toThrow, toThrow.stack];
190          }
191          err(`exiting due to exception: ${toLog}`);
192        }
193        quit(status);
194      });
195      throw toThrow;
196    };
197  }
198
199  if (typeof print != 'undefined') {
200    // Prefer to use print/printErr where they exist, as they usually work better.
201    if (typeof console == 'undefined') console = /** @type{!Console} */({});
202    console.log = /** @type{!function(this:Console, ...*): undefined} */ (print);
203    console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr != 'undefined' ? printErr : print);
204  }
205
206} else
207
208// Note that this includes Node.js workers when relevant (pthreads is enabled).
209// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and
210// ENVIRONMENT_IS_NODE.
211if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
212  if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled
213    scriptDirectory = self.location.href;
214  } else if (typeof document != 'undefined' && document.currentScript) { // web
215    scriptDirectory = document.currentScript.src;
216  }
217  // When MODULARIZE, this JS may be executed later, after document.currentScript
218  // is gone, so we saved it, and we use it here instead of any other info.
219  if (_scriptDir) {
220    scriptDirectory = _scriptDir;
221  }
222  // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them.
223  // otherwise, slice off the final part of the url to find the script directory.
224  // if scriptDirectory does not contain a slash, lastIndexOf will return -1,
225  // and scriptDirectory will correctly be replaced with an empty string.
226  // If scriptDirectory contains a query (starting with ?) or a fragment (starting with #),
227  // they are removed because they could contain a slash.
228  if (scriptDirectory.startsWith('blob:')) {
229    scriptDirectory = '';
230  } else {
231    scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, '').lastIndexOf('/')+1);
232  }
233
234  // Differentiate the Web Worker from the Node Worker case, as reading must
235  // be done differently.
236  {
237// include: web_or_worker_shell_read.js
238read_ = (url) => {
239    var xhr = new XMLHttpRequest();
240    xhr.open('GET', url, false);
241    xhr.send(null);
242    return xhr.responseText;
243  }
244
245  if (ENVIRONMENT_IS_WORKER) {
246    readBinary = (url) => {
247      var xhr = new XMLHttpRequest();
248      xhr.open('GET', url, false);
249      xhr.responseType = 'arraybuffer';
250      xhr.send(null);
251      return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));
252    };
253  }
254
255  readAsync = (url, onload, onerror) => {
256    var xhr = new XMLHttpRequest();
257    xhr.open('GET', url, true);
258    xhr.responseType = 'arraybuffer';
259    xhr.onload = () => {
260      if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0
261        onload(xhr.response);
262        return;
263      }
264      onerror();
265    };
266    xhr.onerror = onerror;
267    xhr.send(null);
268  }
269
270// end include: web_or_worker_shell_read.js
271  }
272} else
273{
274}
275
276var out = Module['print'] || console.log.bind(console);
277var err = Module['printErr'] || console.error.bind(console);
278
279// Merge back in the overrides
280Object.assign(Module, moduleOverrides);
281// Free the object hierarchy contained in the overrides, this lets the GC
282// reclaim data used.
283moduleOverrides = null;
284
285// Emit code to handle expected values on the Module object. This applies Module.x
286// to the proper local x. This has two benefits: first, we only emit it if it is
287// expected to arrive, and second, by using a local everywhere else that can be
288// minified.
289
290if (Module['arguments']) arguments_ = Module['arguments'];
291
292if (Module['thisProgram']) thisProgram = Module['thisProgram'];
293
294if (Module['quit']) quit_ = Module['quit'];
295
296// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
297// end include: shell.js
298
299// include: preamble.js
300// === Preamble library stuff ===
301
302// Documentation for the public APIs defined in this file must be updated in:
303//    site/source/docs/api_reference/preamble.js.rst
304// A prebuilt local version of the documentation is available at:
305//    site/build/text/docs/api_reference/preamble.js.txt
306// You can also build docs locally as HTML or other formats in site/
307// An online HTML version (which may be of a different version of Emscripten)
308//    is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
309
310var wasmBinary; 
311if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];
312
313// include: base64Utils.js
314// include: polyfill/atob.js
315// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149
316
317// This code was written by Tyler Akins and has been placed in the
318// public domain.  It would be nice if you left this header intact.
319// Base64 code from Tyler Akins -- http://rumkin.com
320
321if (typeof atob == 'undefined') {
322  if (typeof global != 'undefined' && typeof globalThis == 'undefined') {
323    globalThis = global;
324  }
325
326  /**
327   * Decodes a base64 string.
328   * @param {string} input The string to decode.
329   */
330  globalThis.atob = function(input) {
331    var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
331+/=';
332
333    var output = '';
334    var chr1, chr2, chr3;
335    var enc1, enc2, enc3, enc4;
336    var i = 0;
337    // remove all characters that are not A-Z, a-z, 0-9, +, /, or =
338    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
339    do {
340      enc1 = keyStr.indexOf(input.charAt(i++));
341      enc2 = keyStr.indexOf(input.charAt(i++));
342      enc3 = keyStr.indexOf(input.charAt(i++));
343      enc4 = keyStr.indexOf(input.charAt(i++));
344
345      chr1 = (enc1 << 2) | (enc2 >> 4);
346      chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
347      chr3 = ((enc3 & 3) << 6) | enc4;
348
349      output = output + String.fromCharCode(chr1);
350
351      if (enc3 !== 64) {
352        output = output + String.fromCharCode(chr2);
353      }
354      if (enc4 !== 64) {
355        output = output + String.fromCharCode(chr3);
356      }
357    } while (i < input.length);
358    return output;
359  };
360}
361// end include: polyfill/atob.js
362// Converts a string of base64 into a byte array (Uint8Array).
363function intArrayFromBase64(s) {
364  if (typeof ENVIRONMENT_IS_NODE != 'undefined' && ENVIRONMENT_IS_NODE) {
365    var buf = Buffer.from(s, 'base64');
366    return new Uint8Array(buf.buffer, buf.byteOffset, buf.length);
367  }
368
369  var decoded = atob(s);
370  var bytes = new Uint8Array(decoded.length);
371  for (var i = 0 ; i < decoded.length ; ++i) {
372    bytes[i] = decoded.charCodeAt(i);
373  }
374  return bytes;
375}
376
377// If filename is a base64 data URI, parses and returns data (Buffer on node,
378// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined.
379function tryParseAsDataURI(filename) {
380  if (!isDataURI(filename)) {
381    return;
382  }
383
384  return intArrayFromBase64(filename.slice(dataURIPrefix.length));
385}
386// end include: base64Utils.js
387// Wasm globals
388
389var wasmMemory;
390
391//========================================
392// Runtime essentials
393//========================================
394
395// whether we are quitting the application. no code should run after this.
396// set in exit() and abort()
397var ABORT = false;
398
399// set by exit() and abort().  Passed to 'onExit' handler.
400// NOTE: This is also used as the process return code code in shell environments
401// but only when noExitRuntime is false.
402var EXITSTATUS;
403
404// In STRICT mode, we only define assert() when ASSERTIONS is set.  i.e. we
405// don't define it at all in release modes.  This matches the behaviour of
406// MINIMAL_RUNTIME.
407// TODO(sbc): Make this the default even without STRICT enabled.
408/** @type {function(*, string=)} */
409function assert(condition, text) {
410  if (!condition) {
411    // This build was created without ASSERTIONS defined.  `assert()` should not
412    // ever be called in this configuration but in case there are callers in
413    // the wild leave this simple abort() implementation here for now.
414    abort(text);
415  }
416}
417
418// Memory management
419
420var HEAP,
421/** @type {!Int8Array} */
422  HEAP8,
423/** @type {!Uint8Array} */
424  HEAPU8,
425/** @type {!Int16Array} */
426  HEAP16,
427/** @type {!Uint16Array} */
428  HEAPU16,
429/** @type {!Int32Array} */
430  HEAP32,
431/** @type {!Uint32Array} */
432  HEAPU32,
433/** @type {!Float32Array} */
434  HEAPF32,
435/* BigInt64Array type is not correctly defined in closure
436/** not-@type {!BigInt64Array} */
437  HEAP64,
438/* BigUInt64Array type is not correctly defined in closure
439/** not-t@type {!BigUint64Array} */
440  HEAPU64,
441/** @type {!Float64Array} */
442  HEAPF64;
443
444// include: runtime_shared.js
445function updateMemoryViews() {
446  var b = wasmMemory.buffer;
447  Module['HEAP8'] = HEAP8 = new Int8Array(b);
448  Module['HEAP16'] = HEAP16 = new Int16Array(b);
449  Module['HEAPU8'] = HEAPU8 = new Uint8Array(b);
450  Module['HEAPU16'] = HEAPU16 = new Uint16Array(b);
451  Module['HEAP32'] = HEAP32 = new Int32Array(b);
452  Module['HEAPU32'] = HEAPU32 = new Uint32Array(b);
453  Module['HEAPF32'] = HEAPF32 = new Float32Array(b);
454  Module['HEAPF64'] = HEAPF64 = new Float64Array(b);
455  Module['HEAP64'] = HEAP64 = new BigInt64Array(b);
456  Module['HEAPU64'] = HEAPU64 = new BigUint64Array(b);
457}
458// end include: runtime_shared.js
459// include: runtime_stack_check.js
460// end include: runtime_stack_check.js
461// include: runtime_assertions.js
462// end include: runtime_assertions.js
463var __ATPRERUN__  = []; // functions called before the runtime is initialized
464var __ATINIT__    = []; // functions called during startup
465var __ATEXIT__    = []; // functions called during shutdown
466var __ATPOSTRUN__ = []; // functions called after the main() is called
467
468var runtimeInitialized = false;
469
470var runtimeExited = false;
471
472function preRun() {
473  if (Module['preRun']) {
474    if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
475    while (Module['preRun'].length) {
476      addOnPreRun(Module['preRun'].shift());
477    }
478  }
479  callRuntimeCallbacks(__ATPRERUN__);
480}
481
482function initRuntime() {
483  runtimeInitialized = true;
484
485  
486if (!Module['noFSInit'] && !FS.init.initialized)
487  FS.init();
488FS.ignorePermissions = false;
489
490TTY.init();
491  callRuntimeCallbacks(__ATINIT__);
492}
493
494function exitRuntime() {
495  ___funcs_on_exit(); // Native atexit() functions
496  callRuntimeCallbacks(__ATEXIT__);
497  FS.quit();
498TTY.shutdown();
499  runtimeExited = true;
500}
501
502function postRun() {
503
504  if (Module['postRun']) {
505    if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
506    while (Module['postRun'].length) {
507      addOnPostRun(Module['postRun'].shift());
508    }
509  }
510
511  callRuntimeCallbacks(__ATPOSTRUN__);
512}
513
514function addOnPreRun(cb) {
515  __ATPRERUN__.unshift(cb);
516}
517
518function addOnInit(cb) {
519  __ATINIT__.unshift(cb);
520}
521
522function addOnExit(cb) {
523  __ATEXIT__.unshift(cb);
524}
525
526function addOnPostRun(cb) {
527  __ATPOSTRUN__.unshift(cb);
528}
529
530// include: runtime_math.js
531// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
532
533// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround
534
535// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
536
537// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
538
539// end include: runtime_math.js
540// A counter of dependencies for calling run(). If we need to
541// do asynchronous work before running, increment this and
542// decrement it. Incrementing must happen in a place like
543// Module.preRun (used by emcc to add file preloading).
544// Note that you can add dependencies in preRun, even though
545// it happens right before run - run will be postponed until
546// the dependencies are met.
547var runDependencies = 0;
548var runDependencyWatcher = null;
549var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled
550
551function getUniqueRunDependency(id) {
552  return id;
553}
554
555function addRunDependency(id) {
556  runDependencies++;
557
558  Module['monitorRunDependencies']?.(runDependencies);
559
560}
561
562function removeRunDependency(id) {
563  runDependencies--;
564
565  Module['monitorRunDependencies']?.(runDependencies);
566
567  if (runDependencies == 0) {
568    if (runDependencyWatcher !== null) {
569      clearInterval(runDependencyWatcher);
570      runDependencyWatcher = null;
571    }
572    if (dependenciesFulfilled) {
573      var callback = dependenciesFulfilled;
574      dependenciesFulfilled = null;
575      callback(); // can add another dependenciesFulfilled
576    }
577  }
578}
579
580/** @param {string|number=} what */
581function abort(what) {
582  Module['onAbort']?.(what);
583
584  what = 'Aborted(' + what + ')';
585  // TODO(sbc): Should we remove printing and leave it up to whoever
586  // catches the exception?
587  err(what);
588
589  ABORT = true;
590  EXITSTATUS = 1;
591
592  what += '. Build with -sASSERTIONS for more info.';
593
594  // Use a wasm runtime error, because a JS error might be seen as a foreign
595  // exception, which means we'd run destructors on it. We need the error to
596  // simply make the program stop.
597  // FIXME This approach does not work in Wasm EH because it currently does not assume
598  // all RuntimeErrors are from traps; it decides whether a RuntimeError is from
599  // a trap or not based on a hidden field within the object. So at the moment
600  // we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that
601  // allows this in the wasm spec.
602
603  // Suppress closure compiler warning here. Closure compiler's builtin extern
604  // definition for WebAssembly.RuntimeError claims it takes no arguments even
605  // though it can.
606  // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.
607  // See above, in the meantime, we resort to wasm code for trapping.
608  //
609  // In case abort() is called before the module is initialized, wasmExports
610  // and its exported '__trap' function is not available, in which case we throw
611  // a RuntimeError.
612  //
613  // We trap instead of throwing RuntimeError to prevent infinite-looping in
614  // Wasm EH code (because RuntimeError is considered as a foreign exception and
615  // caught by 'catch_all'), but in case throwing RuntimeError is fine because
616  // the module has not even been instantiated, even less running.
617  if (runtimeInitialized) {
618    ___trap();
619  }
620  /** @suppress {checkTypes} */
621  var e = new WebAssembly.RuntimeError(what);
622
623  readyPromiseReject(e);
624  // Throw the error whether or not MODULARIZE is set because abort is used
625  // in code paths apart from instantiation where an exception is expected
626  // to be thrown when abort is called.
627  throw e;
628}
629
630// include: memoryprofiler.js
631// end include: memoryprofiler.js
632// include: URIUtils.js
633// Prefix of data URIs emitted by SINGLE_FILE and related options.
634var dataURIPrefix = 'data:application/octet-stream;base64,';
635
636/**
637 * Indicates whether filename is a base64 data URI.
638 * @noinline
639 */
640var isDataURI = (filename) => filename.startsWith(dataURIPrefix);
641
642/**
643 * Indicates whether filename is delivered via file protocol (as opposed to http/https)
644 * @noinline
645 */
646var isFileURI = (filename) => filename.startsWith('file://');
647// end include: URIUtils.js
648// include: runtime_exceptions.js
649// end include: runtime_exceptions.js
650var wasmBinaryFile;
651if (Module['locateFile']) {
652  wasmBinaryFile = 'dotnet.native.wasm';
653  if (!isDataURI(wasmBinaryFile)) {
654    wasmBinaryFile = locateFile(wasmBinaryFile);
655  }
656} else {
657  if (ENVIRONMENT_IS_SHELL)
658    wasmBinaryFile = 'dotnet.native.wasm';
659  else
660  // Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.
661  wasmBinaryFile = new URL('dotnet.native.wasm', import.meta.url).href;
662}
663
664function getBinarySync(file) {
665  if (file == wasmBinaryFile && wasmBinary) {
666    return new Uint8Array(wasmBinary);
667  }
668  if (readBinary) {
669    return readBinary(file);
670  }
671  throw 'both async and sync fetching of the wasm failed';
672}
673
674function getBinaryPromise(binaryFile) {
675  // If we don't have the binary yet, try to load it asynchronously.
676  // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.
677  // See https://github.com/github/fetch/pull/92#issuecomment-140665932
678  // Cordova or Electron apps are typically loaded from a file:// url.
679  // So use fetch if it is available and the url is not a file, otherwise fall back to XHR.
680  if (!wasmBinary
681      && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
682    if (typeof fetch == 'function'
683      && !isFileURI(binaryFile)
684    ) {
685      return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
686        if (!response['ok']) {
687          throw `failed to load wasm binary file at '${binaryFile}'`;
688        }
689        return response['arrayBuffer']();
690      }).catch(() => getBinarySync(binaryFile));
691    }
692    else if (readAsync) {
693      // fetch is not available or url is file => try XHR (readAsync uses XHR internally)
694      return new Promise((resolve, reject) => {
695        readAsync(binaryFile, (response) => resolve(new Uint8Array(/** @type{!ArrayBuffer} */(response))), reject)
696      });
697    }
698  }
699
700  // Otherwise, getBinarySync should be able to get it synchronously
701  return Promise.resolve().then(() => getBinarySync(binaryFile));
702}
703
704function instantiateArrayBuffer(binaryFile, imports, receiver) {
705  return getBinaryPromise(binaryFile).then((binary) => {
706    return WebAssembly.instantiate(binary, imports);
707  }).then(receiver, (reason) => {
708    err(`failed to asynchronously prepare wasm: ${reason}`);
709
710    abort(reason);
711  });
712}
713
714function instantiateAsync(binary, binaryFile, imports, callback) {
715  if (!binary &&
716      typeof WebAssembly.instantiateStreaming == 'function' &&
717      !isDataURI(binaryFile) &&
718      // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.
719      !isFileURI(binaryFile) &&
720      // Avoid instantiateStreaming() on Node.js environment for now, as while
721      // Node.js v18.1.0 implements it, it does not have a full fetch()
722      // implementation yet.
723      //
724      // Reference:
725      //   https://github.com/emscripten-core/emscripten/pull/16917
726      !ENVIRONMENT_IS_NODE &&
727      typeof fetch == 'function') {
728    return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
729      // Suppress closure warning here since the upstream definition for
730      // instantiateStreaming only allows Promise<Repsponse> rather than
731      // an actual Response.
732      // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure is fixed.
733      /** @suppress {checkTypes} */
734      var result = WebAssembly.instantiateStreaming(response, imports);
735
736      return result.then(
737        callback,
738        function(reason) {
739          // We expect the most common failure cause to be a bad MIME type for the binary,
740          // in which case falling back to ArrayBuffer instantiation should work.
741          err(`wasm streaming compile failed: ${reason}`);
742          err('falling back to ArrayBuffer instantiation');
743          return instantiateArrayBuffer(binaryFile, imports, callback);
744        });
745    });
746  }
747  return instantiateArrayBuffer(binaryFile, imports, callback);
748}
749
750// Create the wasm instance.
751// Receives the wasm imports, returns the exports.
752function createWasm() {
753  // prepare imports
754  var info = {
755    'env': wasmImports,
756    'wasi_snapshot_preview1': wasmImports,
757  };
758  // Load the wasm module and create an instance of using native support in the JS engine.
759  // handle a generated wasm instance, receiving its exports and
760  // performing other necessary setup
761  /** @param {WebAssembly.Module=} module*/
762  function receiveInstance(instance, module) {
763    wasmExports = instance.exports;
764
765    Module['wasmExports'] = wasmExports;
766
767    wasmMemory = wasmExports['memory'];
768    
769    updateMemoryViews();
770
771    wasmTable = wasmExports['__indirect_function_table'];
772    
773
774    addOnInit(wasmExports['__wasm_call_ctors']);
775
776    removeRunDependency('wasm-instantiate');
777    return wasmExports;
778  }
779  // wait for the pthread pool (if any)
780  addRunDependency('wasm-instantiate');
781
782  // Prefer streaming instantiation if available.
783  function receiveInstantiationResult(result) {
784    // 'result' is a ResultObject object which has both the module and instance.
785    // receiveInstance() will swap in the exports (to Module.asm) so they can be called
786    // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.
787    // When the regression is fixed, can restore the above PTHREADS-enabled path.
788    receiveInstance(result['instance']);
789  }
790
791  // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
792  // to manually instantiate the Wasm module themselves. This allows pages to
793  // run the instantiation parallel to any other async startup actions they are
794  // performing.
795  // Also pthreads and wasm workers initialize the wasm instance through this
796  // path.
797  if (Module['instantiateWasm']) {
798
799    try {
800      return Module['instantiateWasm'](info, receiveInstance);
801    } catch(e) {
802      err(`Module.instantiateWasm callback failed with error: ${e}`);
803        // If instantiation fails, reject the module ready promise.
804        readyPromiseReject(e);
805    }
806  }
807
808  // If instantiation fails, reject the module ready promise.
809  instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult).catch(readyPromiseReject);
810  return {}; // no exports yet; we'll fill them in later
811}
812
813// include: runtime_debug.js
814// end include: runtime_debug.js
815// === Body ===
816// end include: preamble.js
817
818
819  /** @constructor */
820  function ExitStatus(status) {
821      this.name = 'ExitStatus';
822      this.message = `Program terminated with exit(${status})`;
823      this.status = status;
824    }
825
826  var callRuntimeCallbacks = (callbacks) => {
827      while (callbacks.length > 0) {
828        // Pass the module as the first argument.
829        callbacks.shift()(Module);
830      }
831    };
832
833  
834    /**
835     * @param {number} ptr
836     * @param {string} type
837     */
838  function getValue(ptr, type = 'i8') {
839    if (type.endsWith('*')) type = '*';
840    switch (type) {
841      case 'i1': return HEAP8[ptr];
842      case 'i8': return HEAP8[ptr];
843      case 'i16': return HEAP16[((ptr)>>1)];
844      case 'i32': return HEAP32[((ptr)>>2)];
845      case 'i64': return HEAP64[((ptr)>>3)];
846      case 'float': return HEAPF32[((ptr)>>2)];
847      case 'double': return HEAPF64[((ptr)>>3)];
848      case '*': return HEAPU32[((ptr)>>2)];
849      default: abort(`invalid type for getValue: ${type}`);
850    }
851  }
852
853  var noExitRuntime = Module['noExitRuntime'] || false;
854
855  
856    /**
857     * @param {number} ptr
858     * @param {number} value
859     * @param {string} type
860     */
861  function setValue(ptr, value, type = 'i8') {
862    if (type.endsWith('*')) type = '*';
863    switch (type) {
864      case 'i1': HEAP8[ptr] = value; break;
865      case 'i8': HEAP8[ptr] = value; break;
866      case 'i16': HEAP16[((ptr)>>1)] = value; break;
867      case 'i32': HEAP32[((ptr)>>2)] = value; break;
868      case 'i64': HEAP64[((ptr)>>3)] = BigInt(value); break;
869      case 'float': HEAPF32[((ptr)>>2)] = value; break;
870      case 'double': HEAPF64[((ptr)>>3)] = value; break;
871      case '*': HEAPU32[((ptr)>>2)] = value; break;
872      default: abort(`invalid type for setValue: ${type}`);
873    }
874  }
875
876  var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
877  
878    /**
879     * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given
880     * array that contains uint8 values, returns a copy of that string as a
881     * Javascript String object.
882     * heapOrArray is either a regular array, or a JavaScript typed array view.
883     * @param {number} idx
884     * @param {number=} maxBytesToRead
885     * @return {string}
886     */
887  var UTF8ArrayToString = (heapOrArray, idx, maxBytesToRead) => {
888      var endIdx = idx + maxBytesToRead;
889      var endPtr = idx;
890      // TextDecoder needs to know the byte length in advance, it doesn't stop on
891      // null terminator by itself.  Also, use the length info to avoid running tiny
892      // strings through TextDecoder, since .subarray() allocates garbage.
893      // (As a tiny code save trick, compare endPtr against endIdx using a negation,
894      // so that undefined means Infinity)
895      while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
896  
897      if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
898        return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
899      }
900      var str = '';
901      // If building with TextDecoder, we have already computed the string length
902      // above, so test loop end condition against that
903      while (idx < endPtr) {
904        // For UTF8 byte structure, see:
905        // http://en.wikipedia.org/wiki/UTF-8#Description
906        // https://www.ietf.org/rfc/rfc2279.txt
907        // https://tools.ietf.org/html/rfc3629
908        var u0 = heapOrArray[idx++];
909        if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
910        var u1 = heapOrArray[idx++] & 63;
911        if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
912        var u2 = heapOrArray[idx++] & 63;
913        if ((u0 & 0xF0) == 0xE0) {
914          u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
915        } else {
916          u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);
917        }
918  
919        if (u0 < 0x10000) {
920          str += String.fromCharCode(u0);
921        } else {
922          var ch = u0 - 0x10000;
923          str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
924        }
925      }
926      return str;
927    };
928  
929    /**
930     * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
931     * emscripten HEAP, returns a copy of that string as a Javascript String object.
932     *
933     * @param {number} ptr
934     * @param {number=} maxBytesToRead - An optional length that specifies the
935     *   maximum number of bytes to read. You can omit this parameter to scan the
936     *   string until the first 0 byte. If maxBytesToRead is passed, and the string
937     *   at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
938     *   string will cut short at that byte index (i.e. maxBytesToRead will not
939     *   produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing
940     *   frequent uses of UTF8ToString() with and without maxBytesToRead may throw
941     *   JS JIT optimizations off, so it is worth to consider consistently using one
942     * @return {string}
943     */
944  var UTF8ToString = (ptr, maxBytesToRead) => {
945      return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
946    };
947  var ___assert_fail = (condition, filename, line, func) => {
948      abort(`Assertion failed: ${UTF8ToString(condition)}, at: ` + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']);
949    };
950
951  var PATH = {
952  isAbs:(path) => path.charAt(0) === '/',
953  splitPath:(filename) => {
954        var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
955        return splitPathRe.exec(filename).slice(1);
956      },
957  normalizeArray:(parts, allowAboveRoot) => {
958        // if the path tries to go above the root, `up` ends up > 0
959        var up = 0;
960        for (var i = parts.length - 1; i >= 0; i--) {
961          var last = parts[i];
962          if (last === '.') {
963            parts.splice(i, 1);
964          } else if (last === '..') {
965            parts.splice(i, 1);
966            up++;
967          } else if (up) {
968            parts.splice(i, 1);
969            up--;
970          }
971        }
972        // if the path is allowed to go above the root, restore leading ..s
973        if (allowAboveRoot) {
974          for (; up; up--) {
975            parts.unshift('..');
976          }
977        }
978        return parts;
979      },
980  normalize:(path) => {
981        var isAbsolute = PATH.isAbs(path),
982            trailingSlash = path.substr(-1) === '/';
983        // Normalize the path
984        path = PATH.normalizeArray(path.split('/').filter((p) => !!p), !isAbsolute).join('/');
985        if (!path && !isAbsolute) {
986          path = '.';
987        }
988        if (path && trailingSlash) {
989          path += '/';
990        }
991        return (isAbsolute ? '/' : '') + path;
992      },
993  dirname:(path) => {
994        var result = PATH.splitPath(path),
995            root = result[0],
996            dir = result[1];
997        if (!root && !dir) {
998          // No dirname whatsoever
999          return '.';
1000        }
1001        if (dir) {
1002          // It has a dirname, strip trailing slash
1003          dir = dir.substr(0, dir.length - 1);
1004        }
1005        return root + dir;
1006      },
1007  basename:(path) => {
1008        // EMSCRIPTEN return '/'' for '/', not an empty string
1009        if (path === '/') return '/';
1010        path = PATH.normalize(path);
1011        path = path.replace(/\/$/, "");
1012        var lastSlash = path.lastIndexOf('/');
1013        if (lastSlash === -1) return path;
1014        return path.substr(lastSlash+1);
1015      },
1016  join:(...paths) => PATH.normalize(paths.join('/')),
1017  join2:(l, r) => PATH.normalize(l + '/' + r),
1018  };
1019  
1020  var initRandomFill = () => {
1021      if (typeof crypto == 'object' && typeof crypto['getRandomValues'] == 'function') {
1022        // for modern web browsers
1023        return (view) => crypto.getRandomValues(view);
1024      } else
1025      if (ENVIRONMENT_IS_NODE) {
1026        // for nodejs with or without crypto support included
1027        try {
1028          var crypto_module = require('crypto');
1029          var randomFillSync = crypto_module['randomFillSync'];
1030          if (randomFillSync) {
1031            // nodejs with LTS crypto support
1032            return (view) => crypto_module['randomFillSync'](view);
1033          }
1034          // very old nodejs with the original crypto API
1035          var randomBytes = crypto_module['randomBytes'];
1036          return (view) => (
1037            view.set(randomBytes(view.byteLength)),
1038            // Return the original view to match modern native implementations.
1039            view
1040          );
1041        } catch (e) {
1042          // nodejs doesn't have crypto support
1043        }
1044      }
1045      // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096
1046      abort('initRandomDevice');
1047    };
1048  var randomFill = (view) => {
1049      // Lazily init on the first invocation.
vendor: 10,464 bytes, lines 1050-1325
1050      return (randomFill = initRandomFill())(view);
1051    };
1052  
1053  
1054  
1055  var PATH_FS = {
1056  resolve:(...args) => {
1057        var resolvedPath = '',
1058          resolvedAbsolute = false;
1059        for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
1060          var path = (i >= 0) ? args[i] : FS.cwd();
1061          // Skip empty and invalid entries
1062          if (typeof path != 'string') {
1063            throw new TypeError('Arguments to path.resolve must be strings');
1064          } else if (!path) {
1065            return ''; // an invalid portion invalidates the whole thing
1066          }
1067          resolvedPath = path + '/' + resolvedPath;
1068          resolvedAbsolute = PATH.isAbs(path);
1069        }
1070        // At this point the path should be resolved to a full absolute path, but
1071        // handle relative paths to be safe (might happen when process.cwd() fails)
1072        resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter((p) => !!p), !resolvedAbsolute).join('/');
1073        return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
1074      },
1075  relative:(from, to) => {
1076        from = PATH_FS.resolve(from).substr(1);
1077        to = PATH_FS.resolve(to).substr(1);
1078        function trim(arr) {
1079          var start = 0;
1080          for (; start < arr.length; start++) {
1081            if (arr[start] !== '') break;
1082          }
1083          var end = arr.length - 1;
1084          for (; end >= 0; end--) {
1085            if (arr[end] !== '') break;
1086          }
1087          if (start > end) return [];
1088          return arr.slice(start, end - start + 1);
1089        }
1090        var fromParts = trim(from.split('/'));
1091        var toParts = trim(to.split('/'));
1092        var length = Math.min(fromParts.length, toParts.length);
1093        var samePartsLength = length;
1094        for (var i = 0; i < length; i++) {
1095          if (fromParts[i] !== toParts[i]) {
1096            samePartsLength = i;
1097            break;
1098          }
1099        }
1100        var outputParts = [];
1101        for (var i = samePartsLength; i < fromParts.length; i++) {
1102          outputParts.push('..');
1103        }
1104        outputParts = outputParts.concat(toParts.slice(samePartsLength));
1105        return outputParts.join('/');
1106      },
1107  };
1108  
1109  
1110  
1111  var FS_stdin_getChar_buffer = [];
1112  
1113  var lengthBytesUTF8 = (str) => {
1114      var len = 0;
1115      for (var i = 0; i < str.length; ++i) {
1116        // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
1117        // unit, not a Unicode code point of the character! So decode
1118        // UTF16->UTF32->UTF8.
1119        // See http://unicode.org/faq/utf_bom.html#utf16-3
1120        var c = str.charCodeAt(i); // possibly a lead surrogate
1121        if (c <= 0x7F) {
1122          len++;
1123        } else if (c <= 0x7FF) {
1124          len += 2;
1125        } else if (c >= 0xD800 && c <= 0xDFFF) {
1126          len += 4; ++i;
1127        } else {
1128          len += 3;
1129        }
1130      }
1131      return len;
1132    };
1133  
1134  var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
1135      // Parameter maxBytesToWrite is not optional. Negative values, 0, null,
1136      // undefined and false each don't write out any bytes.
1137      if (!(maxBytesToWrite > 0))
1138        return 0;
1139  
1140      var startIdx = outIdx;
1141      var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
1142      for (var i = 0; i < str.length; ++i) {
1143        // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
1144        // unit, not a Unicode code point of the character! So decode
1145        // UTF16->UTF32->UTF8.
1146        // See http://unicode.org/faq/utf_bom.html#utf16-3
1147        // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description
1148        // and https://www.ietf.org/rfc/rfc2279.txt
1149        // and https://tools.ietf.org/html/rfc3629
1150        var u = str.charCodeAt(i); // possibly a lead surrogate
1151        if (u >= 0xD800 && u <= 0xDFFF) {
1152          var u1 = str.charCodeAt(++i);
1153          u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);
1154        }
1155        if (u <= 0x7F) {
1156          if (outIdx >= endIdx) break;
1157          heap[outIdx++] = u;
1158        } else if (u <= 0x7FF) {
1159          if (outIdx + 1 >= endIdx) break;
1160          heap[outIdx++] = 0xC0 | (u >> 6);
1161          heap[outIdx++] = 0x80 | (u & 63);
1162        } else if (u <= 0xFFFF) {
1163          if (outIdx + 2 >= endIdx) break;
1164          heap[outIdx++] = 0xE0 | (u >> 12);
1165          heap[outIdx++] = 0x80 | ((u >> 6) & 63);
1166          heap[outIdx++] = 0x80 | (u & 63);
1167        } else {
1168          if (outIdx + 3 >= endIdx) break;
1169          heap[outIdx++] = 0xF0 | (u >> 18);
1170          heap[outIdx++] = 0x80 | ((u >> 12) & 63);
1171          heap[outIdx++] = 0x80 | ((u >> 6) & 63);
1172          heap[outIdx++] = 0x80 | (u & 63);
1173        }
1174      }
1175      // Null-terminate the pointer to the buffer.
1176      heap[outIdx] = 0;
1177      return outIdx - startIdx;
1178    };
1179  /** @type {function(string, boolean=, number=)} */
1180  function intArrayFromString(stringy, dontAddNull, length) {
1181    var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;
1182    var u8array = new Array(len);
1183    var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
1184    if (dontAddNull) u8array.length = numBytesWritten;
1185    return u8array;
1186  }
1187  var FS_stdin_getChar = () => {
1188      if (!FS_stdin_getChar_buffer.length) {
1189        var result = null;
1190        if (ENVIRONMENT_IS_NODE) {
1191          // we will read data by chunks of BUFSIZE
1192          var BUFSIZE = 256;
1193          var buf = Buffer.alloc(BUFSIZE);
1194          var bytesRead = 0;
1195  
1196          // For some reason we must suppress a closure warning here, even though
1197          // fd definitely exists on process.stdin, and is even the proper way to
1198          // get the fd of stdin,
1199          // https://github.com/nodejs/help/issues/2136#issuecomment-523649904
1200          // This started to happen after moving this logic out of library_tty.js,
1201          // so it is related to the surrounding code in some unclear manner.
1202          /** @suppress {missingProperties} */
1203          var fd = process.stdin.fd;
1204  
1205          try {
1206            bytesRead = fs.readSync(fd, buf);
1207          } catch(e) {
1208            // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes,
1209            // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0.
1210            if (e.toString().includes('EOF')) bytesRead = 0;
1211            else throw e;
1212          }
1213  
1214          if (bytesRead > 0) {
1215            result = buf.slice(0, bytesRead).toString('utf-8');
1216          } else {
1217            result = null;
1218          }
1219        } else
1220        if (typeof window != 'undefined' &&
1221          typeof window.prompt == 'function') {
1222          // Browser.
1223          result = window.prompt('Input: ');  // returns null on cancel
1224          if (result !== null) {
1225            result += '\n';
1226          }
1227        } else if (typeof readline == 'function') {
1228          // Command line.
1229          result = readline();
1230          if (result !== null) {
1231            result += '\n';
1232          }
1233        }
1234        if (!result) {
1235          return null;
1236        }
1237        FS_stdin_getChar_buffer = intArrayFromString(result, true);
1238      }
1239      return FS_stdin_getChar_buffer.shift();
1240    };
1241  var TTY = {
1242  ttys:[],
1243  init() {
1244        // https://github.com/emscripten-core/emscripten/pull/1555
1245        // if (ENVIRONMENT_IS_NODE) {
1246        //   // currently, FS.init does not distinguish if process.stdin is a file or TTY
1247        //   // device, it always assumes it's a TTY device. because of this, we're forcing
1248        //   // process.stdin to UTF8 encoding to at least make stdin reading compatible
1249        //   // with text files until FS.init can be refactored.
1250        //   process.stdin.setEncoding('utf8');
1251        // }
1252      },
1253  shutdown() {
1254        // https://github.com/emscripten-core/emscripten/pull/1555
1255        // if (ENVIRONMENT_IS_NODE) {
1256        //   // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)?
1257        //   // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation
1258        //   // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists?
1259        //   // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle
1260        //   // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call
1261        //   process.stdin.pause();
1262        // }
1263      },
1264  register(dev, ops) {
1265        TTY.ttys[dev] = { input: [], output: [], ops: ops };
1266        FS.registerDevice(dev, TTY.stream_ops);
1267      },
1268  stream_ops:{
1269  open(stream) {
1270          var tty = TTY.ttys[stream.node.rdev];
1271          if (!tty) {
1272            throw new FS.ErrnoError(43);
1273          }
1274          stream.tty = tty;
1275          stream.seekable = false;
1276        },
1277  close(stream) {
1278          // flush any pending line data
1279          stream.tty.ops.fsync(stream.tty);
1280        },
1281  fsync(stream) {
1282          stream.tty.ops.fsync(stream.tty);
1283        },
1284  read(stream, buffer, offset, length, pos /* ignored */) {
1285          if (!stream.tty || !stream.tty.ops.get_char) {
1286            throw new FS.ErrnoError(60);
1287          }
1288          var bytesRead = 0;
1289          for (var i = 0; i < length; i++) {
1290            var result;
1291            try {
1292              result = stream.tty.ops.get_char(stream.tty);
1293            } catch (e) {
1294              throw new FS.ErrnoError(29);
1295            }
1296            if (result === undefined && bytesRead === 0) {
1297              throw new FS.ErrnoError(6);
1298            }
1299            if (result === null || result === undefined) break;
1300            bytesRead++;
1301            buffer[offset+i] = result;
1302          }
1303          if (bytesRead) {
1304            stream.node.timestamp = Date.now();
1305          }
1306          return bytesRead;
1307        },
1308  write(stream, buffer, offset, length, pos) {
1309          if (!stream.tty || !stream.tty.ops.put_char) {
1310            throw new FS.ErrnoError(60);
1311          }
1312          try {
1313            for (var i = 0; i < length; i++) {
1314              stream.tty.ops.put_char(stream.tty, buffer[offset+i]);
1315            }
1316          } catch (e) {
1317            throw new FS.ErrnoError(29);
1318          }
1319          if (length) {
1320            stream.node.timestamp = Date.now();
1321          }
1322          return i;
1323        },
1324  },
1325  default_tty_ops:{
1326  get_char(tty) {
1327          return FS_stdin_getChar();
1328        },
1329  put_char(tty, val) {
1330          if (val === null || val === 10) {
1331            out(UTF8ArrayToString(tty.output, 0));
1332            tty.output = [];
1333          } else {
1334            if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle.
1335          }
1336        },
1337  fsync(tty) {
1338          if (tty.output && tty.output.length > 0) {
1339            out(UTF8ArrayToString(tty.output, 0));
1340            tty.output = [];
1341          }
1342        },
1343  ioctl_tcgets(tty) {
1344          // typical setting
1345          return {
1346            c_iflag: 25856,
1347            c_oflag: 5,
1348            c_cflag: 191,
1349            c_lflag: 35387,
1350            c_cc: [
1351              0x03, 0x1c, 0x7f, 0x15, 0x04, 0x00, 0x01, 0x00, 0x11, 0x13, 0x1a, 0x00,
1352              0x12, 0x0f, 0x17, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1353              0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1354            ]
1355          };
1356        },
1357  ioctl_tcsets(tty, optional_actions, data) {
1358          // currently just ignore
1359          return 0;
1360        },
1361  ioctl_tiocgwinsz(tty) {
1362          return [24, 80];
1363        },
1364  },
1365  default_tty1_ops:{
1366  put_char(tty, val) {
1367          if (val === null || val === 10) {
1368            err(UTF8ArrayToString(tty.output, 0));
1369            tty.output = [];
1370          } else {
1371            if (val != 0) tty.output.push(val);
1372          }
1373        },
1374  fsync(tty) {
1375          if (tty.output && tty.output.length > 0) {
1376            err(UTF8ArrayToString(tty.output, 0));
1377            tty.output = [];
1378          }
1379        },
1380  },
1381  };
1382  
1383  
1384  var zeroMemory = (address, size) => {
1385      HEAPU8.fill(0, address, address + size);
1386      return address;
1387    };
1388  
1389  var alignMemory = (size, alignment) => {
1390      return Math.ceil(size / alignment) * alignment;
1391    };
1392  var mmapAlloc = (size) => {
1393      size = alignMemory(size, 65536);
1394      var ptr = _emscripten_builtin_memalign(65536, size);
1395      if (!ptr) return 0;
1396      return zeroMemory(ptr, size)
vendor: 7,535 bytes, lines 1396-1577
1396;
1397    };
1398  var MEMFS = {
1399  ops_table:null,
1400  mount(mount) {
1401        return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0);
1402      },
1403  createNode(parent, name, mode, dev) {
1404        if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {
1405          // no supported
1406          throw new FS.ErrnoError(63);
1407        }
1408        MEMFS.ops_table ||= {
1409          dir: {
1410            node: {
1411              getattr: MEMFS.node_ops.getattr,
1412              setattr: MEMFS.node_ops.setattr,
1413              lookup: MEMFS.node_ops.lookup,
1414              mknod: MEMFS.node_ops.mknod,
1415              rename: MEMFS.node_ops.rename,
1416              unlink: MEMFS.node_ops.unlink,
1417              rmdir: MEMFS.node_ops.rmdir,
1418              readdir: MEMFS.node_ops.readdir,
1419              symlink: MEMFS.node_ops.symlink
1420            },
1421            stream: {
1422              llseek: MEMFS.stream_ops.llseek
1423            }
1424          },
1425          file: {
1426            node: {
1427              getattr: MEMFS.node_ops.getattr,
1428              setattr: MEMFS.node_ops.setattr
1429            },
1430            stream: {
1431              llseek: MEMFS.stream_ops.llseek,
1432              read: MEMFS.stream_ops.read,
1433              write: MEMFS.stream_ops.write,
1434              allocate: MEMFS.stream_ops.allocate,
1435              mmap: MEMFS.stream_ops.mmap,
1436              msync: MEMFS.stream_ops.msync
1437            }
1438          },
1439          link: {
1440            node: {
1441              getattr: MEMFS.node_ops.getattr,
1442              setattr: MEMFS.node_ops.setattr,
1443              readlink: MEMFS.node_ops.readlink
1444            },
1445            stream: {}
1446          },
1447          chrdev: {
1448            node: {
1449              getattr: MEMFS.node_ops.getattr,
1450              setattr: MEMFS.node_ops.setattr
1451            },
1452            stream: FS.chrdev_stream_ops
1453          }
1454        };
1455        var node = FS.createNode(parent, name, mode, dev);
1456        if (FS.isDir(node.mode)) {
1457          node.node_ops = MEMFS.ops_table.dir.node;
1458          node.stream_ops = MEMFS.ops_table.dir.stream;
1459          node.contents = {};
1460        } else if (FS.isFile(node.mode)) {
1461          node.node_ops = MEMFS.ops_table.file.node;
1462          node.stream_ops = MEMFS.ops_table.file.stream;
1463          node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity.
1464          // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred
1465          // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size
1466          // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme.
1467          node.contents = null; 
1468        } else if (FS.isLink(node.mode)) {
1469          node.node_ops = MEMFS.ops_table.link.node;
1470          node.stream_ops = MEMFS.ops_table.link.stream;
1471        } else if (FS.isChrdev(node.mode)) {
1472          node.node_ops = MEMFS.ops_table.chrdev.node;
1473          node.stream_ops = MEMFS.ops_table.chrdev.stream;
1474        }
1475        node.timestamp = Date.now();
1476        // add the new node to the parent
1477        if (parent) {
1478          parent.contents[name] = node;
1479          parent.timestamp = node.timestamp;
1480        }
1481        return node;
1482      },
1483  getFileDataAsTypedArray(node) {
1484        if (!node.contents) return new Uint8Array(0);
1485        if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes.
1486        return new Uint8Array(node.contents);
1487      },
1488  expandFileStorage(node, newCapacity) {
1489        var prevCapacity = node.contents ? node.contents.length : 0;
1490        if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough.
1491        // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity.
1492        // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to
1493        // avoid overshooting the allocation cap by a very large margin.
1494        var CAPACITY_DOUBLING_MAX = 1024 * 1024;
1495        newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) >>> 0);
1496        if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding.
1497        var oldContents = node.contents;
1498        node.contents = new Uint8Array(newCapacity); // Allocate new storage.
1499        if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage.
1500      },
1501  resizeFileStorage(node, newSize) {
1502        if (node.usedBytes == newSize) return;
1503        if (newSize == 0) {
1504          node.contents = null; // Fully decommit when requesting a resize to zero.
1505          node.usedBytes = 0;
1506        } else {
1507          var oldContents = node.contents;
1508          node.contents = new Uint8Array(newSize); // Allocate new storage.
1509          if (oldContents) {
1510            node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage.
1511          }
1512          node.usedBytes = newSize;
1513        }
1514      },
1515  node_ops:{
1516  getattr(node) {
1517          var attr = {};
1518          // device numbers reuse inode numbers.
1519          attr.dev = FS.isChrdev(node.mode) ? node.id : 1;
1520          attr.ino = node.id;
1521          attr.mode = node.mode;
1522          attr.nlink = 1;
1523          attr.uid = 0;
1524          attr.gid = 0;
1525          attr.rdev = node.rdev;
1526          if (FS.isDir(node.mode)) {
1527            attr.size = 4096;
1528          } else if (FS.isFile(node.mode)) {
1529            attr.size = node.usedBytes;
1530          } else if (FS.isLink(node.mode)) {
1531            attr.size = node.link.length;
1532          } else {
1533            attr.size = 0;
1534          }
1535          attr.atime = new Date(node.timestamp);
1536          attr.mtime = new Date(node.timestamp);
1537          attr.ctime = new Date(node.timestamp);
1538          // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize),
1539          //       but this is not required by the standard.
1540          attr.blksize = 4096;
1541          attr.blocks = Math.ceil(attr.size / attr.blksize);
1542          return attr;
1543        },
1544  setattr(node, attr) {
1545          if (attr.mode !== undefined) {
1546            node.mode = attr.mode;
1547          }
1548          if (attr.timestamp !== undefined) {
1549            node.timestamp = attr.timestamp;
1550          }
1551          if (attr.size !== undefined) {
1552            MEMFS.resizeFileStorage(node, attr.size);
1553          }
1554        },
1555  lookup(parent, name) {
1556          throw FS.genericErrors[44];
1557        },
1558  mknod(parent, name, mode, dev) {
1559          return MEMFS.createNode(parent, name, mode, dev);
1560        },
1561  rename(old_node, new_dir, new_name) {
1562          // if we're overwriting a directory at new_name, make sure it's empty.
1563          if (FS.isDir(old_node.mode)) {
1564            var new_node;
1565            try {
1566              new_node = FS.lookupNode(new_dir, new_name);
1567            } catch (e) {
1568            }
1569            if (new_node) {
1570              for (var i in new_node.contents) {
1571                throw new FS.ErrnoError(55);
1572              }
1573            }
1574          }
1575          // do the internal rewiring
1576          delete old_node.parent.contents[old_node.name];
1577          old_node.parent.timestamp = Date.now()
vendor: 4,881 bytes, lines 1577-1696
1577
1578          old_node.name = new_name;
1579          new_dir.contents[new_name] = old_node;
1580          new_dir.timestamp = old_node.parent.timestamp;
1581          old_node.parent = new_dir;
1582        },
1583  unlink(parent, name) {
1584          delete parent.contents[name];
1585          parent.timestamp = Date.now();
1586        },
1587  rmdir(parent, name) {
1588          var node = FS.lookupNode(parent, name);
1589          for (var i in node.contents) {
1590            throw new FS.ErrnoError(55);
1591          }
1592          delete parent.contents[name];
1593          parent.timestamp = Date.now();
1594        },
1595  readdir(node) {
1596          var entries = ['.', '..'];
1597          for (var key of Object.keys(node.contents)) {
1598            entries.push(key);
1599          }
1600          return entries;
1601        },
1602  symlink(parent, newname, oldpath) {
1603          var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0);
1604          node.link = oldpath;
1605          return node;
1606        },
1607  readlink(node) {
1608          if (!FS.isLink(node.mode)) {
1609            throw new FS.ErrnoError(28);
1610          }
1611          return node.link;
1612        },
1613  },
1614  stream_ops:{
1615  read(stream, buffer, offset, length, position) {
1616          var contents = stream.node.contents;
1617          if (position >= stream.node.usedBytes) return 0;
1618          var size = Math.min(stream.node.usedBytes - position, length);
1619          if (size > 8 && contents.subarray) { // non-trivial, and typed array
1620            buffer.set(contents.subarray(position, position + size), offset);
1621          } else {
1622            for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];
1623          }
1624          return size;
1625        },
1626  write(stream, buffer, offset, length, position, canOwn) {
1627          // If the buffer is located in main memory (HEAP), and if
1628          // memory can grow, we can't hold on to references of the
1629          // memory buffer, as they may get invalidated. That means we
1630          // need to do copy its contents.
1631          if (buffer.buffer === HEAP8.buffer) {
1632            canOwn = false;
1633          }
1634  
1635          if (!length) return 0;
1636          var node = stream.node;
1637          node.timestamp = Date.now();
1638  
1639          if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array?
1640            if (canOwn) {
1641              node.contents = buffer.subarray(offset, offset + length);
1642              node.usedBytes = length;
1643              return length;
1644            } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
1645              node.contents = buffer.slice(offset, offset + length);
1646              node.usedBytes = length;
1647              return length;
1648            } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file?
1649              node.contents.set(buffer.subarray(offset, offset + length), position);
1650              return length;
1651            }
1652          }
1653  
1654          // Appending to an existing file and we need to reallocate, or source data did not come as a typed array.
1655          MEMFS.expandFileStorage(node, position+length);
1656          if (node.contents.subarray && buffer.subarray) {
1657            // Use typed array write which is available.
1658            node.contents.set(buffer.subarray(offset, offset + length), position);
1659          } else {
1660            for (var i = 0; i < length; i++) {
1661             node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not.
1662            }
1663          }
1664          node.usedBytes = Math.max(node.usedBytes, position + length);
1665          return length;
1666        },
1667  llseek(stream, offset, whence) {
1668          var position = offset;
1669          if (whence === 1) {
1670            position += stream.position;
1671          } else if (whence === 2) {
1672            if (FS.isFile(stream.node.mode)) {
1673              position += stream.node.usedBytes;
1674            }
1675          }
1676          if (position < 0) {
1677            throw new FS.ErrnoError(28);
1678          }
1679          return position;
1680        },
1681  allocate(stream, offset, length) {
1682          MEMFS.expandFileStorage(stream.node, offset + length);
1683          stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length);
1684        },
1685  mmap(stream, length, position, prot, flags) {
1686          if (!FS.isFile(stream.node.mode)) {
1687            throw new FS.ErrnoError(43);
1688          }
1689          var ptr;
1690          var allocated;
1691          var contents = stream.node.contents;
1692          // Only make a new copy when MAP_PRIVATE is specified.
1693          if (!(flags & 2) && contents.buffer === HEAP8.buffer) {
1694            // We can't emulate MAP_SHARED when the file is not backed by the
1695            // buffer we're mapping to (e.g. the HEAP buffer).
1696            allocated = false;
1697            ptr = contents.byteOffset;
1698          } else {
1699            // Try to avoid unnecessary slices.
1700            if (position > 0 || position + length < contents.length) {
1701              if (contents.subarray) {
1702                contents = contents.subarray(position, position + length);
1703              } else {
1704                contents = Array.prototype.slice.call(contents, position, position + length);
1705              }
1706            }
1707            allocated = true;
1708            ptr = mmapAlloc(length);
1709            if (!ptr) {
1710              throw new FS.ErrnoError(48);
1711            }
1712            HEAP8.set(contents, ptr);
1713          }
1714          return { ptr, allocated };
1715        },
1716  msync(stream, buffer, offset, length, mmapFlags) {
1717          MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false);
1718          // should we check if bytesWritten and length are the same?
1719          return 0;
1720        },
1721  },
1722  };
1723  
1724  /** @param {boolean=} noRunDep */
1725  var asyncLoad = (url, onload, onerror, noRunDep) => {
1726      var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : '';
1727      readAsync(url, (arrayBuffer) => {
1728        onload(new Uint8Array(arrayBuffer));
1729        if (dep) removeRunDependency(dep);
1730      }, (event) => {
1731        if (onerror) {
1732          onerror();
1733        } else {
1734          throw `Loading data file "${url}" failed.`;
1735        }
1736      });
1737      if (dep) addRunDependency(dep);
1738    };
1739  
1740  
1741  var FS_createDataFile = (parent, name, fileData, canRead, canWrite, canOwn) => {
1742      FS.createDataFile(parent, name, fileData, canRead, canWrite, canOwn);
1743    };
1744  
1745  var preloadPlugins = Module['preloadPlugins'] || [];
1746  var FS_handledByPreloadPlugin = (byteArray, fullname, finish, onerror) => {
1747      // Ensure plugins are ready.
1748      if (typeof Browser != 'undefined') Browser.init();
1749  
1750      var handled = false;
1751      preloadPlugins.forEach((plugin) => {
1752        if (handled) return;
1753        if (plugin['canHandle'](fullname)) {
1754          plugin['handle'](byteArray, fullname, finish, onerror);
1755          handled = true;
1756        }
1757      });
1758      return handled;
1759    };
1760  var FS_createPreloadedFile = (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) => {
1761      // TODO we should allow people to just pass in a complete filename instead
1762      // of parent and name being that we just join them anyways
1763      var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent;
1764      var dep = getUniqueRunDependency(`cp ${fullname}`); // might have several active requests for the same fullname
1765      function processData(byteArray) {
1766        function finish(byteArray) {
1767          preFinish?.();
1768          if (!dontCreateFile) {
1769            FS_createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);
1770          }
1771          onload?.();
1772          removeRunDependency(dep);
1773        }
1774        if (FS_handledByPreloadPlugin(byteArray, fullname, finish, () => {
1775          onerror?.();
1776          removeRunDependency(dep);
1777        })) {
1778          return;
1779        }
1780        finish(byteArray);
1781      }
1782      addRunDependency(dep);
1783      if (typeof url == 'string') {
1784        asyncLoad(url, processData, onerror);
1785      } else {
1786        processData(url);
1787      }
1788    };
1789  
1790  var FS_modeStringToFlags = (str) => {
1791      var flagModes = {
1792        'r': 0,
1793        'r+': 2,
1794        'w': 512 | 64 | 1,
1795        'w+': 512 | 64 | 2,
1796        'a': 1024 | 64 | 1,
1797        'a+': 1024 | 64 | 2,
1798      };
1799      var flags = flagModes[str];
1800      if (typeof flags == 'undefined') {
1801        throw new Error(`Unknown file open mode: ${str}`);
1802      }
1803      return flags;
1804    };
1805  
1806  var FS_getMode = (canRead, canWrite) => {
1807      var mode = 0;
1808      if (canRead) mode |= 292 | 73;
1809      if (canWrite) mode |= 146;
1810      return mode;
1811    };
1812  
1813  
1814  
1815  var FS = {
1816  root:null,
1817  mounts:[],
1818  devices:{
1819  },
1820  streams:[],
1821  nextInode:1,
1822  nameTable:null,
1823  currentPath:"/",
1824  initialized:false,
1825  ignorePermissions:true,
1826  ErrnoError:class {
1827        // We set the `name` property to be able to identify `FS.ErrnoError`
1828        // - the `name` is a standard ECMA-262 property of error objects. Kind of good to have it anyway.
1829        // - when using PROXYFS, an error can come from an underlying FS
1830        // as different FS objects have their own FS.ErrnoError each,
1831        // the test `err instanceof FS.ErrnoError` won't detect an error coming from another filesystem, causing bugs.
1832        // we'll use the reliable test `err.name == "ErrnoError"` instead
1833        constructor(errno) {
1834          // TODO(sbc): Use the inline member declaration syntax once we
1835          // support it in acorn and closure.
1836          this.name = 'ErrnoError';
1837          this.errno = errno;
1838        }
1839      },
1840  genericErrors:{
1841  },
1842  filesystems:null,
1843  syncFSRequests:0,
1844  FSStream:class {
1845        constructor() {
1846          // TODO(https://github.com/emscripten-core/emscripten/issues/21414):
1847          // Use inline field declarations.
1848          this.shared = {};
1849        }
1850        get object() {
1851          return this.node;
1852        }
1853        set object(val) {
1854          this.node = val;
1855        }
1856        get isRead() {
1857          return (this.flags & 2097155) !== 1;
1858        }
1859        get isWrite() {
1860          return (this.flags & 2097155) !== 0;
1861        }
1862        get isAppend() {
1863          return (this.flags & 1024);
1864        }
1865        get flags() {
1866          return this.shared.flags;
1867        }
1868        set flags(val) {
1869          this.shared.flags = val;
1870        }
1871        get position() {
1872          return this.shared.position;
1873        }
1874        set position(val) {
1875          this.shared.position = val;
1876        }
1877      },
1878  FSNode:class {
1879        constructor(parent, name, mode, rdev) {
1880          if (!parent) {
1881            parent = this;  // root node sets parent to itself
1882          }
1883          this.parent = parent;
1884          this.mount = parent.mount;
1885          this.mounted = null;
1886          this.id = FS.nextInode++;
1887          this.name = name;
1888          this.mode = mode;
1889          this.node_ops = {};
1890          this.stream_ops = {};
1891          this.rdev = rdev;
1892          this.readMode = 292/*292*/ | 73/*73*/;
1893          this.writeMode = 146/*146*/;
1894        }
1895        get read() {
1896          return (this.mode & this.readMode) === this.readMode;
vendor: 32,888 bytes, lines 1897-2951
1897        }
1898        set read(val) {
1899          val ? this.mode |= this.readMode : this.mode &= ~this.readMode;
1900        }
1901        get write() {
1902          return (this.mode & this.writeMode) === this.writeMode;
1903        }
1904        set write(val) {
1905          val ? this.mode |= this.writeMode : this.mode &= ~this.writeMode;
1906        }
1907        get isFolder() {
1908          return FS.isDir(this.mode);
1909        }
1910        get isDevice() {
1911          return FS.isChrdev(this.mode);
1912        }
1913      },
1914  lookupPath(path, opts = {}) {
1915        path = PATH_FS.resolve(path);
1916  
1917        if (!path) return { path: '', node: null };
1918  
1919        var defaults = {
1920          follow_mount: true,
1921          recurse_count: 0
1922        };
1923        opts = Object.assign(defaults, opts)
1924  
1925        if (opts.recurse_count > 8) {  // max recursive lookup of 8
1926          throw new FS.ErrnoError(32);
1927        }
1928  
1929        // split the absolute path
1930        var parts = path.split('/').filter((p) => !!p);
1931  
1932        // start at the root
1933        var current = FS.root;
1934        var current_path = '/';
1935  
1936        for (var i = 0; i < parts.length; i++) {
1937          var islast = (i === parts.length-1);
1938          if (islast && opts.parent) {
1939            // stop resolving
1940            break;
1941          }
1942  
1943          current = FS.lookupNode(current, parts[i]);
1944          current_path = PATH.join2(current_path, parts[i]);
1945  
1946          // jump to the mount's root node if this is a mountpoint
1947          if (FS.isMountpoint(current)) {
1948            if (!islast || (islast && opts.follow_mount)) {
1949              current = current.mounted.root;
1950            }
1951          }
1952  
1953          // by default, lookupPath will not follow a symlink if it is the final path component.
1954          // setting opts.follow = true will override this behavior.
1955          if (!islast || opts.follow) {
1956            var count = 0;
1957            while (FS.isLink(current.mode)) {
1958              var link = FS.readlink(current_path);
1959              current_path = PATH_FS.resolve(PATH.dirname(current_path), link);
1960  
1961              var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count + 1 });
1962              current = lookup.node;
1963  
1964              if (count++ > 40) {  // limit max consecutive symlinks to 40 (SYMLOOP_MAX).
1965                throw new FS.ErrnoError(32);
1966              }
1967            }
1968          }
1969        }
1970  
1971        return { path: current_path, node: current };
1972      },
1973  getPath(node) {
1974        var path;
1975        while (true) {
1976          if (FS.isRoot(node)) {
1977            var mount = node.mount.mountpoint;
1978            if (!path) return mount;
1979            return mount[mount.length-1] !== '/' ? `${mount}/${path}` : mount + path;
1980          }
1981          path = path ? `${node.name}/${path}` : node.name;
1982          node = node.parent;
1983        }
1984      },
1985  hashName(parentid, name) {
1986        var hash = 0;
1987  
1988        for (var i = 0; i < name.length; i++) {
1989          hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0;
1990        }
1991        return ((parentid + hash) >>> 0) % FS.nameTable.length;
1992      },
1993  hashAddNode(node) {
1994        var hash = FS.hashName(node.parent.id, node.name);
1995        node.name_next = FS.nameTable[hash];
1996        FS.nameTable[hash] = node;
1997      },
1998  hashRemoveNode(node) {
1999        var hash = FS.hashName(node.parent.id, node.name);
2000        if (FS.nameTable[hash] === node) {
2001          FS.nameTable[hash] = node.name_next;
2002        } else {
2003          var current = FS.nameTable[hash];
2004          while (current) {
2005            if (current.name_next === node) {
2006              current.name_next = node.name_next;
2007              break;
2008            }
2009            current = current.name_next;
2010          }
2011        }
2012      },
2013  lookupNode(parent, name) {
2014        var errCode = FS.mayLookup(parent);
2015        if (errCode) {
2016          throw new FS.ErrnoError(errCode);
2017        }
2018        var hash = FS.hashName(parent.id, name);
2019        for (var node = FS.nameTable[hash]; node; node = node.name_next) {
2020          var nodeName = node.name;
2021          if (node.parent.id === parent.id && nodeName === name) {
2022            return node;
2023          }
2024        }
2025        // if we failed to find it in the cache, call into the VFS
2026        return FS.lookup(parent, name);
2027      },
2028  createNode(parent, name, mode, rdev) {
2029        var node = new FS.FSNode(parent, name, mode, rdev);
2030  
2031        FS.hashAddNode(node);
2032  
2033        return node;
2034      },
2035  destroyNode(node) {
2036        FS.hashRemoveNode(node);
2037      },
2038  isRoot(node) {
2039        return node === node.parent;
2040      },
2041  isMountpoint(node) {
2042        return !!node.mounted;
2043      },
2044  isFile(mode) {
2045        return (mode & 61440) === 32768;
2046      },
2047  isDir(mode) {
2048        return (mode & 61440) === 16384;
2049      },
2050  isLink(mode) {
2051        return (mode & 61440) === 40960;
2052      },
2053  isChrdev(mode) {
2054        return (mode & 61440) === 8192;
2055      },
2056  isBlkdev(mode) {
2057        return (mode & 61440) === 24576;
2058      },
2059  isFIFO(mode) {
2060        return (mode & 61440) === 4096;
2061      },
2062  isSocket(mode) {
2063        return (mode & 49152) === 49152;
2064      },
2065  flagsToPermissionString(flag) {
2066        var perms = ['r', 'w', 'rw'][flag & 3];
2067        if ((flag & 512)) {
2068          perms += 'w';
2069        }
2070        return perms;
2071      },
2072  nodePermissions(node, perms) {
2073        if (FS.ignorePermissions) {
2074          return 0;
2075        }
2076        // return 0 if any user, group or owner bits are set.
2077        if (perms.includes('r') && !(node.mode & 292)) {
2078          return 2;
2079        } else if (perms.includes('w') && !(node.mode & 146)) {
2080          return 2;
2081        } else if (perms.includes('x') && !(node.mode & 73)) {
2082          return 2;
2083        }
2084        return 0;
2085      },
2086  mayLookup(dir) {
2087        if (!FS.isDir(dir.mode)) return 54;
2088        var errCode = FS.nodePermissions(dir, 'x');
2089        if (errCode) return errCode;
2090        if (!dir.node_ops.lookup) return 2;
2091        return 0;
2092      },
2093  mayCreate(dir, name) {
2094        try {
2095          var node = FS.lookupNode(dir, name);
2096          return 20;
2097        } catch (e) {
2098        }
2099        return FS.nodePermissions(dir, 'wx');
2100      },
2101  mayDelete(dir, name, isdir) {
2102        var node;
2103        try {
2104          node = FS.lookupNode(dir, name);
2105        } catch (e) {
2106          return e.errno;
2107        }
2108        var errCode = FS.nodePermissions(dir, 'wx');
2109        if (errCode) {
2110          return errCode;
2111        }
2112        if (isdir) {
2113          if (!FS.isDir(node.mode)) {
2114            return 54;
2115          }
2116          if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) {
2117            return 10;
2118          }
2119        } else {
2120          if (FS.isDir(node.mode)) {
2121            return 31;
2122          }
2123        }
2124        return 0;
2125      },
2126  mayOpen(node, flags) {
2127        if (!node) {
2128          return 44;
2129        }
2130        if (FS.isLink(node.mode)) {
2131          return 32;
2132        } else if (FS.isDir(node.mode)) {
2133          if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write
2134              (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only)
2135            return 31;
2136          }
2137        }
2138        return FS.nodePermissions(node, FS.flagsToPermissionString(flags));
2139      },
2140  MAX_OPEN_FDS:4096,
2141  nextfd() {
2142        for (var fd = 0; fd <= FS.MAX_OPEN_FDS; fd++) {
2143          if (!FS.streams[fd]) {
2144            return fd;
2145          }
2146        }
2147        throw new FS.ErrnoError(33);
2148      },
2149  getStreamChecked(fd) {
2150        var stream = FS.getStream(fd);
2151        if (!stream) {
2152          throw new FS.ErrnoError(8);
2153        }
2154        return stream;
2155      },
2156  getStream:(fd) => FS.streams[fd],
2157  createStream(stream, fd = -1) {
2158  
2159        // clone it, so we can return an instance of FSStream
2160        stream = Object.assign(new FS.FSStream(), stream);
2161        if (fd == -1) {
2162          fd = FS.nextfd();
2163        }
2164        stream.fd = fd;
2165        FS.streams[fd] = stream;
2166        return stream;
2167      },
2168  closeStream(fd) {
2169        FS.streams[fd] = null;
2170      },
2171  dupStream(origStream, fd = -1) {
2172        var stream = FS.createStream(origStream, fd);
2173        stream.stream_ops?.dup?.(stream);
2174        return stream;
2175      },
2176  chrdev_stream_ops:{
2177  open(stream) {
2178          var device = FS.getDevice(stream.node.rdev);
2179          // override node's stream ops with the device's
2180          stream.stream_ops = device.stream_ops;
2181          // forward the open call
2182          stream.stream_ops.open?.(stream);
2183        },
2184  llseek() {
2185          throw new FS.ErrnoError(70);
2186        },
2187  },
2188  major:(dev) => ((dev) >> 8),
2189  minor:(dev) => ((dev) & 0xff),
2190  makedev:(ma, mi) => ((ma) << 8 | (mi)),
2191  registerDevice(dev, ops) {
2192        FS.devices[dev] = { stream_ops: ops };
2193      },
2194  getDevice:(dev) => FS.devices[dev],
2195  getMounts(mount) {
2196        var mounts = [];
2197        var check = [mount];
2198  
2199        while (check.length) {
2200          var m = check.pop();
2201  
2202          mounts.push(m);
2203  
2204          check.push(...m.mounts);
2205        }
2206  
2207        return mounts;
2208      },
2209  syncfs(populate, callback) {
2210        if (typeof populate == 'function') {
2211          callback = populate;
2212          populate = false;
2213        }
2214  
2215        FS.syncFSRequests++;
2216  
2217        if (FS.syncFSRequests > 1) {
2218          err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);
2219        }
2220  
2221        var mounts = FS.getMounts(FS.root.mount);
2222        var completed = 0;
2223  
2224        function doCallback(errCode) {
2225          FS.syncFSRequests--;
2226          return callback(errCode);
2227        }
2228  
2229        function done(errCode) {
2230          if (errCode) {
2231            if (!done.errored) {
2232              done.errored = true;
2233              return doCallback(errCode);
2234            }
2235            return;
2236          }
2237          if (++completed >= mounts.length) {
2238            doCallback(null);
2239          }
2240        };
2241  
2242        // sync all mounts
2243        mounts.forEach((mount) => {
2244          if (!mount.type.syncfs) {
2245            return done(null);
2246          }
2247          mount.type.syncfs(mount, populate, done);
2248        });
2249      },
2250  mount(type, opts, mountpoint) {
2251        var root = mountpoint === '/';
2252        var pseudo = !mountpoint;
2253        var node;
2254  
2255        if (root && FS.root) {
2256          throw new FS.ErrnoError(10);
2257        } else if (!root && !pseudo) {
2258          var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
2259  
2260          mountpoint = lookup.path;  // use the absolute path
2261          node = lookup.node;
2262  
2263          if (FS.isMountpoint(node)) {
2264            throw new FS.ErrnoError(10);
2265          }
2266  
2267          if (!FS.isDir(node.mode)) {
2268            throw new FS.ErrnoError(54);
2269          }
2270        }
2271  
2272        var mount = {
2273          type,
2274          opts,
2275          mountpoint,
2276          mounts: []
2277        };
2278  
2279        // create a root node for the fs
2280        var mountRoot = type.mount(mount);
2281        mountRoot.mount = mount;
2282        mount.root = mountRoot;
2283  
2284        if (root) {
2285          FS.root = mountRoot;
2286        } else if (node) {
2287          // set as a mountpoint
2288          node.mounted = mount;
2289  
2290          // add the new mount to the current mount's children
2291          if (node.mount) {
2292            node.mount.mounts.push(mount);
2293          }
2294        }
2295  
2296        return mountRoot;
2297      },
2298  unmount(mountpoint) {
2299        var lookup = FS.lookupPath(mountpoint, { follow_mount: false });
2300  
2301        if (!FS.isMountpoint(lookup.node)) {
2302          throw new FS.ErrnoError(28);
2303        }
2304  
2305        // destroy the nodes for this mount, and all its child mounts
2306        var node = lookup.node;
2307        var mount = node.mounted;
2308        var mounts = FS.getMounts(mount);
2309  
2310        Object.keys(FS.nameTable).forEach((hash) => {
2311          var current = FS.nameTable[hash];
2312  
2313          while (current) {
2314            var next = current.name_next;
2315  
2316            if (mounts.includes(current.mount)) {
2317              FS.destroyNode(current);
2318            }
2319  
2320            current = next;
2321          }
2322        });
2323  
2324        // no longer a mountpoint
2325        node.mounted = null;
2326  
2327        // remove this mount from the child mounts
2328        var idx = node.mount.mounts.indexOf(mount);
2329        node.mount.mounts.splice(idx, 1);
2330      },
2331  lookup(parent, name) {
2332        return parent.node_ops.lookup(parent, name);
2333      },
2334  mknod(path, mode, dev) {
2335        var lookup = FS.lookupPath(path, { parent: true });
2336        var parent = lookup.node;
2337        var name = PATH.basename(path);
2338        if (!name || name === '.' || name === '..') {
2339          throw new FS.ErrnoError(28);
2340        }
2341        var errCode = FS.mayCreate(parent, name);
2342        if (errCode) {
2343          throw new FS.ErrnoError(errCode);
2344        }
2345        if (!parent.node_ops.mknod) {
2346          throw new FS.ErrnoError(63);
2347        }
2348        return parent.node_ops.mknod(parent, name, mode, dev);
2349      },
2350  create(path, mode) {
2351        mode = mode !== undefined ? mode : 438 /* 0666 */;
2352        mode &= 4095;
2353        mode |= 32768;
2354        return FS.mknod(path, mode, 0);
2355      },
2356  mkdir(path, mode) {
2357        mode = mode !== undefined ? mode : 511 /* 0777 */;
2358        mode &= 511 | 512;
2359        mode |= 16384;
2360        return FS.mknod(path, mode, 0);
2361      },
2362  mkdirTree(path, mode) {
2363        var dirs = path.split('/');
2364        var d = '';
2365        for (var i = 0; i < dirs.length; ++i) {
2366          if (!dirs[i]) continue;
2367          d += '/' + dirs[i];
2368          try {
2369            FS.mkdir(d, mode);
2370          } catch(e) {
2371            if (e.errno != 20) throw e;
2372          }
2373        }
2374      },
2375  mkdev(path, mode, dev) {
2376        if (typeof dev == 'undefined') {
2377          dev = mode;
2378          mode = 438 /* 0666 */;
2379        }
2380        mode |= 8192;
2381        return FS.mknod(path, mode, dev);
2382      },
2383  symlink(oldpath, newpath) {
2384        if (!PATH_FS.resolve(oldpath)) {
2385          throw new FS.ErrnoError(44);
2386        }
2387        var lookup = FS.lookupPath(newpath, { parent: true });
2388        var parent = lookup.node;
2389        if (!parent) {
2390          throw new FS.ErrnoError(44);
2391        }
2392        var newname = PATH.basename(newpath);
2393        var errCode = FS.mayCreate(parent, newname);
2394        if (errCode) {
2395          throw new FS.ErrnoError(errCode);
2396        }
2397        if (!parent.node_ops.symlink) {
2398          throw new FS.ErrnoError(63);
2399        }
2400        return parent.node_ops.symlink(parent, newname, oldpath);
2401      },
2402  rename(old_path, new_path) {
2403        var old_dirname = PATH.dirname(old_path);
2404        var new_dirname = PATH.dirname(new_path);
2405        var old_name = PATH.basename(old_path);
2406        var new_name = PATH.basename(new_path);
2407        // parents must exist
2408        var lookup, old_dir, new_dir;
2409  
2410        // let the errors from non existent directories percolate up
2411        lookup = FS.lookupPath(old_path, { parent: true });
2412        old_dir = lookup.node;
2413        lookup = FS.lookupPath(new_path, { parent: true });
2414        new_dir = lookup.node;
2415  
2416        if (!old_dir || !new_dir) throw new FS.ErrnoError(44);
2417        // need to be part of the same mount
2418        if (old_dir.mount !== new_dir.mount) {
2419          throw new FS.ErrnoError(75);
2420        }
2421        // source must exist
2422        var old_node = FS.lookupNode(old_dir, old_name);
2423        // old path should not be an ancestor of the new path
2424        var relative = PATH_FS.relative(old_path, new_dirname);
2425        if (relative.charAt(0) !== '.') {
2426          throw new FS.ErrnoError(28);
2427        }
2428        // new path should not be an ancestor of the old path
2429        relative = PATH_FS.relative(new_path, old_dirname);
2430        if (relative.charAt(0) !== '.') {
2431          throw new FS.ErrnoError(55);
2432        }
2433        // see if the new path already exists
2434        var new_node;
2435        try {
2436          new_node = FS.lookupNode(new_dir, new_name);
2437        } catch (e) {
2438          // not fatal
2439        }
2440        // early out if nothing needs to change
2441        if (old_node === new_node) {
2442          return;
2443        }
2444        // we'll need to delete the old entry
2445        var isdir = FS.isDir(old_node.mode);
2446        var errCode = FS.mayDelete(old_dir, old_name, isdir);
2447        if (errCode) {
2448          throw new FS.ErrnoError(errCode);
2449        }
2450        // need delete permissions if we'll be overwriting.
2451        // need create permissions if new doesn't already exist.
2452        errCode = new_node ?
2453          FS.mayDelete(new_dir, new_name, isdir) :
2454          FS.mayCreate(new_dir, new_name);
2455        if (errCode) {
2456          throw new FS.ErrnoError(errCode);
2457        }
2458        if (!old_dir.node_ops.rename) {
2459          throw new FS.ErrnoError(63);
2460        }
2461        if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) {
2462          throw new FS.ErrnoError(10);
2463        }
2464        // if we are going to change the parent, check write permissions
2465        if (new_dir !== old_dir) {
2466          errCode = FS.nodePermissions(old_dir, 'w');
2467          if (errCode) {
2468            throw new FS.ErrnoError(errCode);
2469          }
2470        }
2471        // remove the node from the lookup hash
2472        FS.hashRemoveNode(old_node);
2473        // do the underlying fs rename
2474        try {
2475          old_dir.node_ops.rename(old_node, new_dir, new_name);
2476        } catch (e) {
2477          throw e;
2478        } finally {
2479          // add the node back to the hash (in case node_ops.rename
2480          // changed its name)
2481          FS.hashAddNode(old_node);
2482        }
2483      },
2484  rmdir(path) {
2485        var lookup = FS.lookupPath(path, { parent: true });
2486        var parent = lookup.node;
2487        var name = PATH.basename(path);
2488        var node = FS.lookupNode(parent, name);
2489        var errCode = FS.mayDelete(parent, name, true);
2490        if (errCode) {
2491          throw new FS.ErrnoError(errCode);
2492        }
2493        if (!parent.node_ops.rmdir) {
2494          throw new FS.ErrnoError(63);
2495        }
2496        if (FS.isMountpoint(node)) {
2497          throw new FS.ErrnoError(10);
2498        }
2499        parent.node_ops.rmdir(parent, name);
2500        FS.destroyNode(node);
2501      },
2502  readdir(path) {
2503        var lookup = FS.lookupPath(path, { follow: true });
2504        var node = lookup.node;
2505        if (!node.node_ops.readdir) {
2506          throw new FS.ErrnoError(54);
2507        }
2508        return node.node_ops.readdir(node);
2509      },
2510  unlink(path) {
2511        var lookup = FS.lookupPath(path, { parent: true });
2512        var parent = lookup.node;
2513        if (!parent) {
2514          throw new FS.ErrnoError(44);
2515        }
2516        var name = PATH.basename(path);
2517        var node = FS.lookupNode(parent, name);
2518        var errCode = FS.mayDelete(parent, name, false);
2519        if (errCode) {
2520          // According to POSIX, we should map EISDIR to EPERM, but
2521          // we instead do what Linux does (and we must, as we use
2522          // the musl linux libc).
2523          throw new FS.ErrnoError(errCode);
2524        }
2525        if (!parent.node_ops.unlink) {
2526          throw new FS.ErrnoError(63);
2527        }
2528        if (FS.isMountpoint(node)) {
2529          throw new FS.ErrnoError(10);
2530        }
2531        parent.node_ops.unlink(parent, name);
2532        FS.destroyNode(node);
2533      },
2534  readlink(path) {
2535        var lookup = FS.lookupPath(path);
2536        var link = lookup.node;
2537        if (!link) {
2538          throw new FS.ErrnoError(44);
2539        }
2540        if (!link.node_ops.readlink) {
2541          throw new FS.ErrnoError(28);
2542        }
2543        return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link));
2544      },
2545  stat(path, dontFollow) {
2546        var lookup = FS.lookupPath(path, { follow: !dontFollow });
2547        var node = lookup.node;
2548        if (!node) {
2549          throw new FS.ErrnoError(44);
2550        }
2551        if (!node.node_ops.getattr) {
2552          throw new FS.ErrnoError(63);
2553        }
2554        return node.node_ops.getattr(node);
2555      },
2556  lstat(path) {
2557        return FS.stat(path, true);
2558      },
2559  chmod(path, mode, dontFollow) {
2560        var node;
2561        if (typeof path == 'string') {
2562          var lookup = FS.lookupPath(path, { follow: !dontFollow });
2563          node = lookup.node;
2564        } else {
2565          node = path;
2566        }
2567        if (!node.node_ops.setattr) {
2568          throw new FS.ErrnoError(63);
2569        }
2570        node.node_ops.setattr(node, {
2571          mode: (mode & 4095) | (node.mode & ~4095),
2572          timestamp: Date.now()
2573        });
2574      },
2575  lchmod(path, mode) {
2576        FS.chmod(path, mode, true);
2577      },
2578  fchmod(fd, mode) {
2579        var stream = FS.getStreamChecked(fd);
2580        FS.chmod(stream.node, mode);
2581      },
2582  chown(path, uid, gid, dontFollow) {
2583        var node;
2584        if (typeof path == 'string') {
2585          var lookup = FS.lookupPath(path, { follow: !dontFollow });
2586          node = lookup.node;
2587        } else {
2588          node = path;
2589        }
2590        if (!node.node_ops.setattr) {
2591          throw new FS.ErrnoError(63);
2592        }
2593        node.node_ops.setattr(node, {
2594          timestamp: Date.now()
2595          // we ignore the uid / gid for now
2596        });
2597      },
2598  lchown(path, uid, gid) {
2599        FS.chown(path, uid, gid, true);
2600      },
2601  fchown(fd, uid, gid) {
2602        var stream = FS.getStreamChecked(fd);
2603        FS.chown(stream.node, uid, gid);
2604      },
2605  truncate(path, len) {
2606        if (len < 0) {
2607          throw new FS.ErrnoError(28);
2608        }
2609        var node;
2610        if (typeof path == 'string') {
2611          var lookup = FS.lookupPath(path, { follow: true });
2612          node = lookup.node;
2613        } else {
2614          node = path;
2615        }
2616        if (!node.node_ops.setattr) {
2617          throw new FS.ErrnoError(63);
2618        }
2619        if (FS.isDir(node.mode)) {
2620          throw new FS.ErrnoError(31);
2621        }
2622        if (!FS.isFile(node.mode)) {
2623          throw new FS.ErrnoError(28);
2624        }
2625        var errCode = FS.nodePermissions(node, 'w');
2626        if (errCode) {
2627          throw new FS.ErrnoError(errCode);
2628        }
2629        node.node_ops.setattr(node, {
2630          size: len,
2631          timestamp: Date.now()
2632        });
2633      },
2634  ftruncate(fd, len) {
2635        var stream = FS.getStreamChecked(fd);
2636        if ((stream.flags & 2097155) === 0) {
2637          throw new FS.ErrnoError(28);
2638        }
2639        FS.truncate(stream.node, len);
2640      },
2641  utime(path, atime, mtime) {
2642        var lookup = FS.lookupPath(path, { follow: true });
2643        var node = lookup.node;
2644        node.node_ops.setattr(node, {
2645          timestamp: Math.max(atime, mtime)
2646        });
2647      },
2648  open(path, flags, mode) {
2649        if (path === "") {
2650          throw new FS.ErrnoError(44);
2651        }
2652        flags = typeof flags == 'string' ? FS_modeStringToFlags(flags) : flags;
2653        mode = typeof mode == 'undefined' ? 438 /* 0666 */ : mode;
2654        if ((flags & 64)) {
2655          mode = (mode & 4095) | 32768;
2656        } else {
2657          mode = 0;
2658        }
2659        var node;
2660        if (typeof path == 'object') {
2661          node = path;
2662        } else {
2663          path = PATH.normalize(path);
2664          try {
2665            var lookup = FS.lookupPath(path, {
2666              follow: !(flags & 131072)
2667            });
2668            node = lookup.node;
2669          } catch (e) {
2670            // ignore
2671          }
2672        }
2673        // perhaps we need to create the node
2674        var created = false;
2675        if ((flags & 64)) {
2676          if (node) {
2677            // if O_CREAT and O_EXCL are set, error out if the node already exists
2678            if ((flags & 128)) {
2679              throw new FS.ErrnoError(20);
2680            }
2681          } else {
2682            // node doesn't exist, try to create it
2683            node = FS.mknod(path, mode, 0);
2684            created = true;
2685          }
2686        }
2687        if (!node) {
2688          throw new FS.ErrnoError(44);
2689        }
2690        // can't truncate a device
2691        if (FS.isChrdev(node.mode)) {
2692          flags &= ~512;
2693        }
2694        // if asked only for a directory, then this must be one
2695        if ((flags & 65536) && !FS.isDir(node.mode)) {
2696          throw new FS.ErrnoError(54);
2697        }
2698        // check permissions, if this is not a file we just created now (it is ok to
2699        // create and write to a file with read-only permissions; it is read-only
2700        // for later use)
2701        if (!created) {
2702          var errCode = FS.mayOpen(node, flags);
2703          if (errCode) {
2704            throw new FS.ErrnoError(errCode);
2705          }
2706        }
2707        // do truncation if necessary
2708        if ((flags & 512) && !created) {
2709          FS.truncate(node, 0);
2710        }
2711        // we've already handled these, don't pass down to the underlying vfs
2712        flags &= ~(128 | 512 | 131072);
2713  
2714        // register the stream with the filesystem
2715        var stream = FS.createStream({
2716          node,
2717          path: FS.getPath(node),  // we want the absolute path to the node
2718          flags,
2719          seekable: true,
2720          position: 0,
2721          stream_ops: node.stream_ops,
2722          // used by the file family libc calls (fopen, fwrite, ferror, etc.)
2723          ungotten: [],
2724          error: false
2725        });
2726        // call the new stream's open function
2727        if (stream.stream_ops.open) {
2728          stream.stream_ops.open(stream);
2729        }
2730        if (Module['logReadFiles'] && !(flags & 1)) {
2731          if (!FS.readFiles) FS.readFiles = {};
2732          if (!(path in FS.readFiles)) {
2733            FS.readFiles[path] = 1;
2734          }
2735        }
2736        return stream;
2737      },
2738  close(stream) {
2739        if (FS.isClosed(stream)) {
2740          throw new FS.ErrnoError(8);
2741        }
2742        if (stream.getdents) stream.getdents = null; // free readdir state
2743        try {
2744          if (stream.stream_ops.close) {
2745            stream.stream_ops.close(stream);
2746          }
2747        } catch (e) {
2748          throw e;
2749        } finally {
2750          FS.closeStream(stream.fd);
2751        }
2752        stream.fd = null;
2753      },
2754  isClosed(stream) {
2755        return stream.fd === null;
2756      },
2757  llseek(stream, offset, whence) {
2758        if (FS.isClosed(stream)) {
2759          throw new FS.ErrnoError(8);
2760        }
2761        if (!stream.seekable || !stream.stream_ops.llseek) {
2762          throw new FS.ErrnoError(70);
2763        }
2764        if (whence != 0 && whence != 1 && whence != 2) {
2765          throw new FS.ErrnoError(28);
2766        }
2767        stream.position = stream.stream_ops.llseek(stream, offset, whence);
2768        stream.ungotten = [];
2769        return stream.position;
2770      },
2771  read(stream, buffer, offset, length, position) {
2772        if (length < 0 || position < 0) {
2773          throw new FS.ErrnoError(28);
2774        }
2775        if (FS.isClosed(stream)) {
2776          throw new FS.ErrnoError(8);
2777        }
2778        if ((stream.flags & 2097155) === 1) {
2779          throw new FS.ErrnoError(8);
2780        }
2781        if (FS.isDir(stream.node.mode)) {
2782          throw new FS.ErrnoError(31);
2783        }
2784        if (!stream.stream_ops.read) {
2785          throw new FS.ErrnoError(28);
2786        }
2787        var seeking = typeof position != 'undefined';
2788        if (!seeking) {
2789          position = stream.position;
2790        } else if (!stream.seekable) {
2791          throw new FS.ErrnoError(70);
2792        }
2793        var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position);
2794        if (!seeking) stream.position += bytesRead;
2795        return bytesRead;
2796      },
2797  write(stream, buffer, offset, length, position, canOwn) {
2798        if (length < 0 || position < 0) {
2799          throw new FS.ErrnoError(28);
2800        }
2801        if (FS.isClosed(stream)) {
2802          throw new FS.ErrnoError(8);
2803        }
2804        if ((stream.flags & 2097155) === 0) {
2805          throw new FS.ErrnoError(8);
2806        }
2807        if (FS.isDir(stream.node.mode)) {
2808          throw new FS.ErrnoError(31);
2809        }
2810        if (!stream.stream_ops.write) {
2811          throw new FS.ErrnoError(28);
2812        }
2813        if (stream.seekable && stream.flags & 1024) {
2814          // seek to the end before writing in append mode
2815          FS.llseek(stream, 0, 2);
2816        }
2817        var seeking = typeof position != 'undefined';
2818        if (!seeking) {
2819          position = stream.position;
2820        } else if (!stream.seekable) {
2821          throw new FS.ErrnoError(70);
2822        }
2823        var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn);
2824        if (!seeking) stream.position += bytesWritten;
2825        return bytesWritten;
2826      },
2827  allocate(stream, offset, length) {
2828        if (FS.isClosed(stream)) {
2829          throw new FS.ErrnoError(8);
2830        }
2831        if (offset < 0 || length <= 0) {
2832          throw new FS.ErrnoError(28);
2833        }
2834        if ((stream.flags & 2097155) === 0) {
2835          throw new FS.ErrnoError(8);
2836        }
2837        if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) {
2838          throw new FS.ErrnoError(43);
2839        }
2840        if (!stream.stream_ops.allocate) {
2841          throw new FS.ErrnoError(138);
2842        }
2843        stream.stream_ops.allocate(stream, offset, length);
2844      },
2845  mmap(stream, length, position, prot, flags) {
2846        // User requests writing to file (prot & PROT_WRITE != 0).
2847        // Checking if we have permissions to write to the file unless
2848        // MAP_PRIVATE flag is set. According to POSIX spec it is possible
2849        // to write to file opened in read-only mode with MAP_PRIVATE flag,
2850        // as all modifications will be visible only in the memory of
2851        // the current process.
2852        if ((prot & 2) !== 0
2853            && (flags & 2) === 0
2854            && (stream.flags & 2097155) !== 2) {
2855          throw new FS.ErrnoError(2);
2856        }
2857        if ((stream.flags & 2097155) === 1) {
2858          throw new FS.ErrnoError(2);
2859        }
2860        if (!stream.stream_ops.mmap) {
2861          throw new FS.ErrnoError(43);
2862        }
2863        return stream.stream_ops.mmap(stream, length, position, prot, flags);
2864      },
2865  msync(stream, buffer, offset, length, mmapFlags) {
2866        if (!stream.stream_ops.msync) {
2867          return 0;
2868        }
2869        return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags);
2870      },
2871  ioctl(stream, cmd, arg) {
2872        if (!stream.stream_ops.ioctl) {
2873          throw new FS.ErrnoError(59);
2874        }
2875        return stream.stream_ops.ioctl(stream, cmd, arg);
2876      },
2877  readFile(path, opts = {}) {
2878        opts.flags = opts.flags || 0;
2879        opts.encoding = opts.encoding || 'binary';
2880        if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') {
2881          throw new Error(`Invalid encoding type "${opts.encoding}"`);
2882        }
2883        var ret;
2884        var stream = FS.open(path, opts.flags);
2885        var stat = FS.stat(path);
2886        var length = stat.size;
2887        var buf = new Uint8Array(length);
2888        FS.read(stream, buf, 0, length, 0);
2889        if (opts.encoding === 'utf8') {
2890          ret = UTF8ArrayToString(buf, 0);
2891        } else if (opts.encoding === 'binary') {
2892          ret = buf;
2893        }
2894        FS.close(stream);
2895        return ret;
2896      },
2897  writeFile(path, data, opts = {}) {
2898        opts.flags = opts.flags || 577;
2899        var stream = FS.open(path, opts.flags, opts.mode);
2900        if (typeof data == 'string') {
2901          var buf = new Uint8Array(lengthBytesUTF8(data)+1);
2902          var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length);
2903          FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn);
2904        } else if (ArrayBuffer.isView(data)) {
2905          FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
2906        } else {
2907          throw new Error('Unsupported data type');
2908        }
2909        FS.close(stream);
2910      },
2911  cwd:() => FS.currentPath,
2912  chdir(path) {
2913        var lookup = FS.lookupPath(path, { follow: true });
2914        if (lookup.node === null) {
2915          throw new FS.ErrnoError(44);
2916        }
2917        if (!FS.isDir(lookup.node.mode)) {
2918          throw new FS.ErrnoError(54);
2919        }
2920        var errCode = FS.nodePermissions(lookup.node, 'x');
2921        if (errCode) {
2922          throw new FS.ErrnoError(errCode);
2923        }
2924        FS.currentPath = lookup.path;
2925      },
2926  createDefaultDirectories() {
2927        FS.mkdir('/tmp');
2928        FS.mkdir('/home');
2929        FS.mkdir('/home/web_user');
2930      },
2931  createDefaultDevices() {
2932        // create /dev
2933        FS.mkdir('/dev');
2934        // setup /dev/null
2935        FS.registerDevice(FS.makedev(1, 3), {
2936          read: () => 0,
2937          write: (stream, buffer, offset, length, pos) => length,
2938        });
2939        FS.mkdev('/dev/null', FS.makedev(1, 3));
2940        // setup /dev/tty and /dev/tty1
2941        // stderr needs to print output using err() rather than out()
2942        // so we register a second tty just for it.
2943        TTY.register(FS.makedev(5, 0), TTY.default_tty_ops);
2944        TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops);
2945        FS.mkdev('/dev/tty', FS.makedev(5, 0));
2946        FS.mkdev('/dev/tty1', FS.makedev(6, 0));
2947        // setup /dev/[u]random
2948        // use a buffer to avoid overhead of individual crypto calls per byte
2949        var randomBuffer = new Uint8Array(1024), randomLeft = 0;
2950        var randomByte = () => {
2951          if (randomLeft === 0) {
2952            randomLeft = randomFill(randomBuffer).byteLength;
2953          }
2954          return randomBuffer[--randomLeft];
2955        };
2956        FS.createDevice('/dev', 'random', randomByte);
2957        FS.createDevice('/dev', 'urandom', randomByte);
2958        // we're not going to emulate the actual shm device,
2959        // just create the tmp dirs that reside in it commonly
2960        FS.mkdir('/dev/shm');
2961        FS.mkdir('/dev/shm/tmp');
2962      },
2963  createSpecialDirectories() {
2964        // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the
2965        // name of the stream for fd 6 (see test_unistd_ttyname)
2966        FS.mkdir('/proc');
2967        var proc_self = FS.mkdir('/proc/self');
2968        FS.mkdir('/proc/self/fd');
2969        FS.mount({
2970          mount() {
2971            var node = FS.createNode(proc_self, 'fd', 16384 | 511 /* 0777 */, 73);
2972            node.node_ops = {
2973              lookup(parent, name) {
2974                var fd = +name;
2975                var stream = FS.getStreamChecked(fd);
2976                var ret = {
2977                  parent: null,
2978                  mount: { mountpoint: 'fake' },
2979                  node_ops: { readlink: () => stream.path },
2980                };
2981                ret.parent = ret; // make it look like a simple root node
2982                return ret;
2983              }
2984            };
2985            return node;
2986          }
2987        }, {}, '/proc/self/fd');
2988      },
2989  createStandardStreams() {
2990        // TODO deprecate the old functionality of a single
2991        // input / output callback and that utilizes FS.createDevice
2992        // and instead require a unique set of stream ops
2993  
2994        // by default, we symlink the standard streams to the
2995        // default tty devices. however, if the standard streams
2996        // have been overwritten we create a unique device for
2997        // them instead.
2998        if (Module['stdin']) {
2999          FS.createDevice('/dev', 'stdin', Module['stdin']);
3000        } else {
3001          FS.symlink('/dev/tty', '/dev/stdin');
3002        }
3003        if (Module['stdout']) {
3004          FS.createDevice('/dev', 'stdout', null, Module['stdout']);
3005        } else {
3006          FS.symlink('/dev/tty', '/dev/stdout');
3007        }
3008        if (Module['stderr']) {
3009          FS.createDevice('/dev', 'stderr', null, Module['stderr']);
3010        } else {
3011          FS.symlink('/dev/tty1', '/dev/stderr');
3012        }
3013  
3014        // open default streams for the stdin, stdout and stderr devices
3015        var stdin = FS.open('/dev/stdin', 0);
3016        var stdout = FS.open('/dev/stdout', 1);
3017        var stderr = FS.open('/dev/stderr', 1);
3018      },
3019  staticInit() {
3020        // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info)
3021        [44].forEach((code) => {
3022          FS.genericErrors[code] = new FS.ErrnoError(code);
3023          FS.genericErrors[code].stack = '<generic error, no stack>';
3024        });
3025  
3026        FS.nameTable = new Array(4096);
3027  
3028        FS.mount(MEMFS, {}, '/');
3029  
3030        FS.createDefaultDirectories();
3031        FS.createDefaultDevices();
3032        FS.createSpecialDirectories();
3033  
3034        FS.filesystems = {
3035          'MEMFS': MEMFS,
3036        };
3037      },
3038  init(input, output, error) {
3039        FS.init.initialized = true;
3040  
3041        // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here
3042        Module['stdin'] = input || Module['stdin'];
3043        Module['stdout'] = output || Module['stdout'];
3044        Module['stderr'] = error || Module['stderr'];
3045  
3046        FS.createStandardStreams();
3047      },
3048  quit() {
3049        FS.init.initialized = false;
3050        // force-flush all streams, so we get musl std streams printed out
3051        _fflush(0);
3052        // close all of our streams
3053        for (var i = 0; i < FS.streams.length; i++) {
3054          var stream = FS.streams[i];
3055          if (!stream) {
3056            continue;
3057          }
3058          FS.close(stream);
3059        }
3060      },
3061  findObject(path, dontResolveLastLink) {
3062        var ret = FS.analyzePath(path, dontResolveLastLink);
3063        if (!ret.exists) {
3064          return null;
3065        }
3066        return ret.object;
3067      },
3068  analyzePath(path, dontResolveLastLink) {
3069        // operate from within the context of the symlink's target
3070        try {
3071          var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
3072          path = lookup.path;
3073        } catch (e) {
3074        }
3075        var ret = {
3076          isRoot: false, exists: false, error: 0, name: null, path: null, object: null,
3077          parentExists: false, parentPath: null, parentObject: null
3078        };
3079        try {
3080          var lookup = FS.lookupPath(path, { parent: true });
3081          ret.parentExists = true;
3082          ret.parentPath = lookup.path;
3083          ret.parentObject = lookup.node;
3084          ret.name = PATH.basename(path);
3085          lookup = FS.lookupPath(path, { follow: !dontResolveLastLink });
3086          ret.exists = true;
3087          ret.path = lookup.path;
3088          ret.object = lookup.node;
3089          ret.name = lookup.node.name;
3090          ret.isRoot = lookup.path === '/';
3091        } catch (e) {
3092          ret.error = e.errno;
3093        };
3094        return ret;
3095      },
3096  createPath(parent, path, canRead, canWrite) {
3097        parent = typeof parent == 'string' ? parent : FS.getPath(parent);
3098        var parts = path.split('/').reverse();
3099        while (parts.length) {
3100          var part = parts.pop();
3101          if (!part) continue;
3102          var current = PATH.join2(parent, part);
3103          try {
3104            FS.mkdir(current);
3105          } catch (e) {
3106            // ignore EEXIST
3107          }
3108          parent = current;
3109        }
3110        return current;
3111      },
3112  createFile(parent, name, properties, canRead, canWrite) {
3113        var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name);
3114        var mode = FS_getMode(canRead, canWrite);
3115        return FS.create(path, mode);
3116      },
3117  createDataFile(parent, name, data, canRead, canWrite, canOwn) {
3118        var path = name;
3119        if (parent) {
3120          parent = typeof parent == 'string' ? parent : FS.getPath(parent);
3121          path = name ? PATH.join2(parent, name) : parent;
3122        }
3123        var mode = FS_getMode(canRead, canWrite);
3124        var node = FS.create(path, mode);
3125        if (data) {
3126          if (typeof data == 'string') {
3127            var arr = new Array(data.length);
3128            for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
3129            data = arr;
3130          }
3131          // make sure we can write to the file
3132          FS.chmod(node, mode | 146);
3133          var stream = FS.open(node, 577);
3134          FS.write(stream, data, 0, data.length, 0, canOwn);
3135          FS.close(stream);
3136          FS.chmod(node, mode);
3137        }
3138      },
3139  createDevice(parent, name, input, output) {
3140        var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name);
3141        var mode = FS_getMode(!!input, !!output);
3142        if (!FS.createDevice.major) FS.createDevice.major = 64;
3143        var dev = FS.makedev(FS.createDevice.major++, 0);
3144        // Create a fake device that a set of stream ops to emulate
3145        // the old behavior.
3146        FS.registerDevice(dev, {
3147          open(stream) {
3148            stream.seekable = false;
vendor: 6,837 bytes, lines 3149-3307
3149          },
3150          close(stream) {
3151            // flush any pending line data
3152            if (output?.buffer?.length) {
3153              output(10);
3154            }
3155          },
3156          read(stream, buffer, offset, length, pos /* ignored */) {
3157            var bytesRead = 0;
3158            for (var i = 0; i < length; i++) {
3159              var result;
3160              try {
3161                result = input();
3162              } catch (e) {
3163                throw new FS.ErrnoError(29);
3164              }
3165              if (result === undefined && bytesRead === 0) {
3166                throw new FS.ErrnoError(6);
3167              }
3168              if (result === null || result === undefined) break;
3169              bytesRead++;
3170              buffer[offset+i] = result;
3171            }
3172            if (bytesRead) {
3173              stream.node.timestamp = Date.now();
3174            }
3175            return bytesRead;
3176          },
3177          write(stream, buffer, offset, length, pos) {
3178            for (var i = 0; i < length; i++) {
3179              try {
3180                output(buffer[offset+i]);
3181              } catch (e) {
3182                throw new FS.ErrnoError(29);
3183              }
3184            }
3185            if (length) {
3186              stream.node.timestamp = Date.now();
3187            }
3188            return i;
3189          }
3190        });
3191        return FS.mkdev(path, mode, dev);
3192      },
3193  forceLoadFile(obj) {
3194        if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true;
3195        if (typeof XMLHttpRequest != 'undefined') {
3196          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.");
3197        } else if (read_) {
3198          // Command-line.
3199          try {
3200            // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as
3201            //          read() will try to parse UTF8.
3202            obj.contents = intArrayFromString(read_(obj.url), true);
3203            obj.usedBytes = obj.contents.length;
3204          } catch (e) {
3205            throw new FS.ErrnoError(29);
3206          }
3207        } else {
3208          throw new Error('Cannot load without read() or XMLHttpRequest.');
3209        }
3210      },
3211  createLazyFile(parent, name, url, canRead, canWrite) {
3212        // Lazy chunked Uint8Array (implements get and length from Uint8Array).
3213        // Actual getting is abstracted away for eventual reuse.
3214        class LazyUint8Array {
3215          constructor() {
3216            this.lengthKnown = false;
3217            this.chunks = []; // Loaded chunks. Index is the chunk number
3218          }
3219          get(idx) {
3220            if (idx > this.length-1 || idx < 0) {
3221              return undefined;
3222            }
3223            var chunkOffset = idx % this.chunkSize;
3224            var chunkNum = (idx / this.chunkSize)|0;
3225            return this.getter(chunkNum)[chunkOffset];
3226          }
3227          setDataGetter(getter) {
3228            this.getter = getter;
3229          }
3230          cacheLength() {
3231            // Find length
3232            var xhr = new XMLHttpRequest();
3233            xhr.open('HEAD', url, false);
3234            xhr.send(null);
3235            if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
3236            var datalength = Number(xhr.getResponseHeader("Content-length"));
3237            var header;
3238            var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes";
3239            var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip";
3240  
3241            var chunkSize = 1024*1024; // Chunk size in bytes
3242  
3243            if (!hasByteServing) chunkSize = datalength;
3244  
3245            // Function to get a range from the remote URL.
3246            var doXHR = (from, to) => {
3247              if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!");
3248              if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!");
3249  
3250              // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.
3251              var xhr = new XMLHttpRequest();
3252              xhr.open('GET', url, false);
3253              if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to);
3254  
3255              // Some hints to the browser that we want binary data.
3256              xhr.responseType = 'arraybuffer';
3257              if (xhr.overrideMimeType) {
3258                xhr.overrideMimeType('text/plain; charset=x-user-defined');
3259              }
3260  
3261              xhr.send(null);
3262              if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);
3263              if (xhr.response !== undefined) {
3264                return new Uint8Array(/** @type{Array<number>} */(xhr.response || []));
3265              }
3266              return intArrayFromString(xhr.responseText || '', true);
3267            };
3268            var lazyArray = this;
3269            lazyArray.setDataGetter((chunkNum) => {
3270              var start = chunkNum * chunkSize;
3271              var end = (chunkNum+1) * chunkSize - 1; // including this byte
3272              end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block
3273              if (typeof lazyArray.chunks[chunkNum] == 'undefined') {
3274                lazyArray.chunks[chunkNum] = doXHR(start, end);
3275              }
3276              if (typeof lazyArray.chunks[chunkNum] == 'undefined') throw new Error('doXHR failed!');
3277              return lazyArray.chunks[chunkNum];
3278            });
3279  
3280            if (usesGzip || !datalength) {
3281              // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length
3282              chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file
3283              datalength = this.getter(0).length;
3284              chunkSize = datalength;
3285              out("LazyFiles on gzip forces download of the whole file when length is accessed");
3286            }
3287  
3288            this._length = datalength;
3289            this._chunkSize = chunkSize;
3290            this.lengthKnown = true;
3291          }
3292          get length() {
3293            if (!this.lengthKnown) {
3294              this.cacheLength();
3295            }
3296            return this._length;
3297          }
3298          get chunkSize() {
3299            if (!this.lengthKnown) {
3300              this.cacheLength();
3301            }
3302            return this._chunkSize;
3303          }
3304        }
3305  
3306        if (typeof XMLHttpRequest != 'undefined') {
3307          if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';
3308          var lazyArray = new LazyUint8Array();
3309          var properties = { isDevice: false, contents: lazyArray };
3310        } else {
3311          var properties = { isDevice: false, url: url };
3312        }
3313  
3314        var node = FS.createFile(parent, name, properties, canRead, canWrite);
3315        // This is a total hack, but I want to get this lazy file code out of the
3316        // core of MEMFS. If we want to keep this lazy file concept I feel it should
3317        // be its own thin LAZYFS proxying calls to MEMFS.
3318        if (properties.contents) {
3319          node.contents = properties.contents;
3320        } else if (properties.url) {
3321          node.contents = null;
3322          node.url = properties.url;
3323        }
3324        // Add a function that defers querying the file size until it is asked the first time.
3325        Object.defineProperties(node, {
3326          usedBytes: {
3327            get: function() { return this.contents.length; }
3328          }
3329        });
3330        // override each stream op with one that tries to force load the lazy file first
3331        var stream_ops = {};
3332        var keys = Object.keys(node.stream_ops);
3333        keys.forEach((key) => {
3334          var fn = node.stream_ops[key];
3335          stream_ops[key] = (...args) => {
3336            FS.forceLoadFile(node);
3337            return fn(...args);
3338          };
3339        });
3340        function writeChunks(stream, buffer, offset, length, position) {
3341          var contents = stream.node.contents;
3342          if (position >= contents.length)
3343            return 0;
3344          var size = Math.min(contents.length - position, length);
3345          if (contents.slice) { // normal array
3346            for (var i = 0; i < size; i++) {
3347              buffer[offset + i] = contents[position + i];
3348            }
3349          } else {
3350            for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR
3351              buffer[offset + i] = contents.get(position + i);
3352            }
3353          }
3354          return size;
3355        }
3356        // use a custom read function
3357        stream_ops.read = (stream, buffer, offset, length, position) => {
3358          FS.forceLoadFile(node);
3359          return writeChunks(stream, buffer, offset, length, position)
3360        };
3361        // use a custom mmap function
3362        stream_ops.mmap = (stream, length, position, prot, flags) => {
3363          FS.forceLoadFile(node);
3364          var ptr = mmapAlloc(length);
3365          if (!ptr) {
3366            throw new FS.ErrnoError(48);
3367          }
3368          writeChunks(stream, HEAP8, ptr, length, position);
3369          return { ptr, allocated: true };
3370        };
3371        node.stream_ops = stream_ops;
3372        return node;
3373      },
3374  };
3375  
3376  var SYSCALLS = {
3377  DEFAULT_POLLMASK:5,
3378  calculateAt(dirfd, path, allowEmpty) {
3379        if (PATH.isAbs(path)) {
3380          return path;
3381        }
3382        // relative path
3383        var dir;
3384        if (dirfd === -100) {
3385          dir = FS.cwd();
3386        } else {
3387          var dirstream = SYSCALLS.getStreamFromFD(dirfd);
3388          dir = dirstream.path;
3389        }
3390        if (path.length == 0) {
3391          if (!allowEmpty) {
3392            throw new FS.ErrnoError(44);;
3393          }
3394          return dir;
3395        }
3396        return PATH.join2(dir, path);
3397      },
3398  doStat(func, path, buf) {
3399        var stat = func(path);
3400        HEAP32[((buf)>>2)] = stat.dev;
3401        HEAP32[(((buf)+(4))>>2)] = stat.mode;
3402        HEAPU32[(((buf)+(8))>>2)] = stat.nlink;
3403        HEAP32[(((buf)+(12))>>2)] = stat.uid;
3404        HEAP32[(((buf)+(16))>>2)] = stat.gid;
3405        HEAP32[(((buf)+(20))>>2)] = stat.rdev;
3406        HEAP64[(((buf)+(24))>>3)] = BigInt(stat.size);
3407        HEAP32[(((buf)+(32))>>2)] = 4096;
3408        HEAP32[(((buf)+(36))>>2)] = stat.blocks;
3409        var atime = stat.atime.getTime();
3410        var mtime = stat.mtime.getTime();
3411        var ctime = stat.ctime.getTime();
3412        HEAP64[(((buf)+(40))>>3)] = BigInt(Math.floor(atime / 1000));
3413        HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000;
3414        HEAP64[(((buf)+(56))>>3)] = BigInt(Math.floor(mtime / 1000));
3415        HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000;
3416        HEAP64[(((buf)+(72))>>3)] = BigInt(Math.floor(ctime / 1000));
3417        HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000;
3418        HEAP64[(((buf)+(88))>>3)] = BigInt(stat.ino);
3419        return 0;
3420      },
3421  doMsync(addr, stream, len, flags, offset) {
3422        if (!FS.isFile(stream.node.mode)) {
3423          throw new FS.ErrnoError(43);
3424        }
3425        if (flags & 2) {
3426          // MAP_PRIVATE calls need not to be synced back to underlying fs
3427          return 0;
3428        }
3429        var buffer = HEAPU8.slice(addr, addr + len);
3430        FS.msync(stream, buffer, offset, len, flags);
3431      },
3432  varargs:undefined,
3433  get() {
3434        // the `+` prepended here is necessary to convince the JSCompiler that varargs is indeed a number.
3435        var ret = HEAP32[((+SYSCALLS.varargs)>>2)];
3436        SYSCALLS.varargs += 4;
3437        return ret;
3438      },
3439  getp() { return SYSCALLS.get() },
3440  getStr(ptr) {
3441        var ret = UTF8ToString(ptr);
3442        return ret;
3443      },
3444  getStreamFromFD(fd) {
3445        var stream = FS.getStreamChecked(fd);
3446        return stream;
3447      },
3448  };
3449  function ___syscall_faccessat(dirfd, path, amode, flags) {
3450  try {
3451  
3452      path = SYSCALLS.getStr(path);
3453      path = SYSCALLS.calculateAt(dirfd, path);
3454      if (amode & ~7) {
3455        // need a valid mode
3456        return -28;
3457      }
3458      var lookup = FS.lookupPath(path, { follow: true });
3459      var node = lookup.node;
3460      if (!node) {
3461        return -44;
3462      }
3463      var perms = '';
3464      if (amode & 4) perms += 'r';
3465      if (amode & 2) perms += 'w';
3466      if (amode & 1) perms += 'x';
3467      if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) {
3468        return -2;
3469      }
3470      return 0;
3471    } catch (e) {
3472    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3473    return -e.errno;
3474  }
3475  }
3476
3477  var ___syscall_fadvise64 = (fd, offset, len, advice) => {
3478      return 0; // your advice is important to us (but we can't use it)
3479    };
3480
3481  function ___syscall_fcntl64(fd, cmd, varargs) {
3482  SYSCALLS.varargs = varargs;
3483  try {
3484  
3485      var stream = SYSCALLS.getStreamFromFD(fd);
3486      switch (cmd) {
3487        case 0: {
3488          var arg = SYSCALLS.get();
3489          if (arg < 0) {
3490            return -28;
3491          }
3492          while (FS.streams[arg]) {
3493            arg++;
3494          }
3495          var newStream;
3496          newStream = FS.dupStream(stream, arg);
3497          return newStream.fd;
3498        }
3499        case 1:
3500        case 2:
3501          return 0;  // FD_CLOEXEC makes no sense for a single process.
3502        case 3:
3503          return stream.flags;
3504        case 4: {
3505          var arg = SYSCALLS.get();
3506          stream.flags |= arg;
3507          return 0;
3508        }
3509        case 12: {
3510          var arg = SYSCALLS.getp();
3511          var offset = 0;
3512          // We're always unlocked.
3513          HEAP16[(((arg)+(offset))>>1)] = 2;
3514          return 0;
3515        }
3516        case 13:
3517        case 14:
3518          return 0; // Pretend that the locking is successful.
3519      }
3520      return -28;
3521    } catch (e) {
3522    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3523    return -e.errno;
3524  }
3525  }
3526
3527  function ___syscall_fstat64(fd, buf) {
3528  try {
3529  
3530      var stream = SYSCALLS.getStreamFromFD(fd);
3531      return SYSCALLS.doStat(FS.stat, stream.path, buf);
3532    } catch (e) {
3533    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3534    return -e.errno;
3535  }
3536  }
3537
3538  function ___syscall_statfs64(path, size, buf) {
3539  try {
3540  
3541      path = SYSCALLS.getStr(path);
3542      // NOTE: None of the constants here are true. We're just returning safe and
3543      //       sane values.
3544      HEAP32[(((buf)+(4))>>2)] = 4096;
3545      HEAP32[(((buf)+(40))>>2)] = 4096;
3546      HEAP32[(((buf)+(8))>>2)] = 1000000;
3547      HEAP32[(((buf)+(12))>>2)] = 500000;
3548      HEAP32[(((buf)+(16))>>2)] = 500000;
3549      HEAP32[(((buf)+(20))>>2)] = FS.nextInode;
3550      HEAP32[(((buf)+(24))>>2)] = 1000000;
3551      HEAP32[(((buf)+(28))>>2)] = 42;
3552      HEAP32[(((buf)+(44))>>2)] = 2;  // ST_NOSUID
3553      HEAP32[(((buf)+(36))>>2)] = 255;
3554      return 0;
3555    } catch (e) {
3556    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3557    return -e.errno;
3558  }
3559  }
3560  
3561  function ___syscall_fstatfs64(fd, size, buf) {
3562  try {
3563  
3564      var stream = SYSCALLS.getStreamFromFD(fd);
3565      return ___syscall_statfs64(0, size, buf);
3566    } catch (e) {
3567    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3568    return -e.errno;
3569  }
3570  }
3571
3572  var MAX_INT53 = 9007199254740992;
3573  
3574  var MIN_INT53 = -9007199254740992;
3575  var bigintToI53Checked = (num) => (num < MIN_INT53 || num > MAX_INT53) ? NaN : Number(num);
3576  function ___syscall_ftruncate64(fd, length) {
3577    length = bigintToI53Checked(length);
3578  
3579    
3580  try {
3581  
3582      if (isNaN(length)) return 61;
3583      FS.ftruncate(fd, length);
3584      return 0;
3585    } catch (e) {
3586    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3587    return -e.errno;
3588  }
3589  ;
3590  }
3591
3592  
3593  var stringToUTF8 = (str, outPtr, maxBytesToWrite) => {
3594      return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
3595    };
3596  function ___syscall_getcwd(buf, size) {
3597  try {
3598  
3599      if (size === 0) return -28;
3600      var cwd = FS.cwd();
3601      var cwdLengthInBytes = lengthBytesUTF8(cwd) + 1;
3602      if (size < cwdLengthInBytes) return -68;
3603      stringToUTF8(cwd, buf, size);
3604      return cwdLengthInBytes;
3605    } catch (e) {
3606    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3607    return -e.errno;
3608  }
3609  }
3610
3611  function ___syscall_ioctl(fd, op, varargs) {
3612  SYSCALLS.varargs = varargs;
3613  try {
3614  
3615      var stream = SYSCALLS.getStreamFromFD(fd);
3616      switch (op) {
3617        case 21509: {
3618          if (!stream.tty) return -59;
3619          return 0;
3620        }
3621        case 21505: {
3622          if (!stream.tty) return -59;
3623          if (stream.tty.ops.ioctl_tcgets) {
3624            var termios = stream.tty.ops.ioctl_tcgets(stream);
3625            var argp = SYSCALLS.getp();
3626            HEAP32[((argp)>>2)] = termios.c_iflag || 0;
3627            HEAP32[(((argp)+(4))>>2)] = termios.c_oflag || 0;
3628            HEAP32[(((argp)+(8))>>2)] = termios.c_cflag || 0;
3629            HEAP32[(((argp)+(12))>>2)] = termios.c_lflag || 0;
3630            for (var i = 0; i < 32; i++) {
3631              HEAP8[(argp + i)+(17)] = termios.c_cc[i] || 0;
3632            }
3633            return 0;
3634          }
3635          return 0;
3636        }
3637        case 21510:
3638        case 21511:
3639        case 21512: {
3640          if (!stream.tty) return -59;
3641          return 0; // no-op, not actually adjusting terminal settings
3642        }
3643        case 21506:
3644        case 21507:
3645        case 21508: {
3646          if (!stream.tty) return -59;
3647          if (stream.tty.ops.ioctl_tcsets) {
3648            var argp = SYSCALLS.getp();
3649            var c_iflag = HEAP32[((argp)>>2)];
3650            var c_oflag = HEAP32[(((argp)+(4))>>2)];
3651            var c_cflag = HEAP32[(((argp)+(8))>>2)];
3652            var c_lflag = HEAP32[(((argp)+(12))>>2)];
3653            var c_cc = []
3654            for (var i = 0; i < 32; i++) {
3655              c_cc.push(HEAP8[(argp + i)+(17)]);
3656            }
3657            return stream.tty.ops.ioctl_tcsets(stream.tty, op, { c_iflag, c_oflag, c_cflag, c_lflag, c_cc });
3658          }
3659          return 0; // no-op, not actually adjusting terminal settings
3660        }
3661        case 21519: {
3662          if (!stream.tty) return -59;
3663          var argp = SYSCALLS.getp();
3664          HEAP32[((argp)>>2)] = 0;
3665          return 0;
3666        }
3667        case 21520: {
3668          if (!stream.tty) return -59;
3669          return -28; // not supported
3670        }
3671        case 21531: {
3672          var argp = SYSCALLS.getp();
3673          return FS.ioctl(stream, op, argp);
3674        }
3675        case 21523: {
3676          // TODO: in theory we should write to the winsize struct that gets
3677          // passed in, but for now musl doesn't read anything on it
3678          if (!stream.tty) return -59;
3679          if (stream.tty.ops.ioctl_tiocgwinsz) {
3680            var winsize = stream.tty.ops.ioctl_tiocgwinsz(stream.tty);
3681            var argp = SYSCALLS.getp();
3682            HEAP16[((argp)>>1)] = winsize[0];
3683            HEAP16[(((argp)+(2))>>1)] = winsize[1];
3684          }
3685          return 0;
3686        }
3687        case 21524: {
3688          // TODO: technically, this ioctl call should change the window size.
3689          // but, since emscripten doesn't have any concept of a terminal window
3690          // yet, we'll just silently throw it away as we do TIOCGWINSZ
3691          if (!stream.tty) return -59;
3692          return 0;
3693        }
3694        case 21515: {
3695          if (!stream.tty) return -59;
3696          return 0;
3697        }
3698        default: return -28; // not supported
3699      }
3700    } catch (e) {
3701    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3702    return -e.errno;
3703  }
3704  }
3705
3706  function ___syscall_lstat64(path, buf) {
3707  try {
3708  
3709      path = SYSCALLS.getStr(path);
3710      return SYSCALLS.doStat(FS.lstat, path, buf);
3711    } catch (e) {
3712    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3713    return -e.errno;
3714  }
3715  }
3716
3717  function ___syscall_newfstatat(dirfd, path, buf, flags) {
3718  try {
3719  
3720      path = SYSCALLS.getStr(path);
3721      var nofollow = flags & 256;
3722      var allowEmpty = flags & 4096;
3723      flags = flags & (~6400);
3724      path = SYSCALLS.calculateAt(dirfd, path, allowEmpty);
3725      return SYSCALLS.doStat(nofollow ? FS.lstat : FS.stat, path, buf);
3726    } catch (e) {
3727    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3728    return -e.errno;
3729  }
3730  }
3731
3732  function ___syscall_openat(dirfd, path, flags, varargs) {
3733  SYSCALLS.varargs = varargs;
3734  try {
3735  
3736      path = SYSCALLS.getStr(path);
3737      path = SYSCALLS.calculateAt(dirfd, path);
3738      var mode = varargs ? SYSCALLS.get() : 0;
3739      return FS.open(path, flags, mode).fd;
3740    } catch (e) {
3741    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3742    return -e.errno;
3743  }
3744  }
3745
3746  
3747  
3748  function ___syscall_readlinkat(dirfd, path, buf, bufsize) {
3749  try {
3750  
3751      path = SYSCALLS.getStr(path);
3752      path = SYSCALLS.calculateAt(dirfd, path);
3753      if (bufsize <= 0) return -28;
3754      var ret = FS.readlink(path);
3755  
3756      var len = Math.min(bufsize, lengthBytesUTF8(ret));
3757      var endChar = HEAP8[buf+len];
3758      stringToUTF8(ret, buf, bufsize+1);
3759      // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!)
3760      // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write.
3761      HEAP8[buf+len] = endChar;
3762      return len;
3763    } catch (e) {
3764    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3765    return -e.errno;
3766  }
3767  }
3768
3769  function ___syscall_stat64(path, buf) {
3770  try {
3771  
3772      path = SYSCALLS.getStr(path);
3773      return SYSCALLS.doStat(FS.stat, path, buf);
3774    } catch (e) {
3775    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3776    return -e.errno;
3777  }
3778  }
3779
3780  function ___syscall_unlinkat(dirfd, path, flags) {
3781  try {
3782  
3783      path = SYSCALLS.getStr(path);
3784      path = SYSCALLS.calculateAt(dirfd, path);
3785      if (flags === 0) {
3786        FS.unlink(path);
3787      } else if (flags === 512) {
3788        FS.rmdir(path);
3789      } else {
3790        abort('Invalid flags passed to unlinkat');
3791      }
3792      return 0;
3793    } catch (e) {
3794    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3795    return -e.errno;
3796  }
3797  }
3798
3799  var nowIsMonotonic = 1;
3800  var __emscripten_get_now_is_monotonic = () => nowIsMonotonic;
3801
3802  var isLeapYear = (year) => year%4 === 0 && (year%100 !== 0 || year%400 === 0);
3803  
3804  var MONTH_DAYS_LEAP_CUMULATIVE = [0,31,60,91,121,152,182,213,244,274,305,335];
3805  
3806  var MONTH_DAYS_REGULAR_CUMULATIVE = [0,31,59,90,120,151,181,212,243,273,304,334];
3807  var ydayFromDate = (date) => {
3808      var leap = isLeapYear(date.getFullYear());
3809      var monthDaysCumulative = (leap ? MONTH_DAYS_LEAP_CUMULATIVE : MONTH_DAYS_REGULAR_CUMULATIVE);
3810      var yday = monthDaysCumulative[date.getMonth()] + date.getDate() - 1; // -1 since it's days since Jan 1
3811  
3812      return yday;
3813    };
3814  
3815  function __localtime_js(time, tmPtr) {
3816    time = bigintToI53Checked(time);
3817  
3818    
3819      var date = new Date(time*1000);
3820      HEAP32[((tmPtr)>>2)] = date.getSeconds();
3821      HEAP32[(((tmPtr)+(4))>>2)] = date.getMinutes();
3822      HEAP32[(((tmPtr)+(8))>>2)] = date.getHours();
3823      HEAP32[(((tmPtr)+(12))>>2)] = date.getDate();
3824      HEAP32[(((tmPtr)+(16))>>2)] = date.getMonth();
3825      HEAP32[(((tmPtr)+(20))>>2)] = date.getFullYear()-1900;
3826      HEAP32[(((tmPtr)+(24))>>2)] = date.getDay();
3827  
3828      var yday = ydayFromDate(date)|0;
3829      HEAP32[(((tmPtr)+(28))>>2)] = yday;
3830      HEAP32[(((tmPtr)+(36))>>2)] = -(date.getTimezoneOffset() * 60);
3831  
3832      // Attention: DST is in December in South, and some regions don't have DST at all.
3833      var start = new Date(date.getFullYear(), 0, 1);
3834      var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset();
3835      var winterOffset = start.getTimezoneOffset();
3836      var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset))|0;
3837      HEAP32[(((tmPtr)+(32))>>2)] = dst;
3838    ;
3839  }
3840
3841  
3842  
3843  
3844  
3845  
3846  function __mmap_js(len, prot, flags, fd, offset, allocated, addr) {
3847    offset = bigintToI53Checked(offset);
3848  
3849    
3850  try {
3851  
3852      if (isNaN(offset)) return 61;
3853      var stream = SYSCALLS.getStreamFromFD(fd);
3854      var res = FS.mmap(stream, len, offset, prot, flags);
3855      var ptr = res.ptr;
3856      HEAP32[((allocated)>>2)] = res.allocated;
3857      HEAPU32[((addr)>>2)] = ptr;
3858      return 0;
3859    } catch (e) {
3860    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3861    return -e.errno;
3862  }
3863  ;
3864  }
3865
3866  
3867  function __munmap_js(addr, len, prot, flags, fd, offset) {
3868    offset = bigintToI53Checked(offset);
3869  
3870    
3871  try {
3872  
3873      var stream = SYSCALLS.getStreamFromFD(fd);
3874      if (prot & 2) {
3875        SYSCALLS.doMsync(addr, stream, len, flags, offset);
3876      }
3877    } catch (e) {
3878    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
3879    return -e.errno;
3880  }
3881  ;
3882  }
3883
3884  var __tzset_js = (timezone, daylight, std_name, dst_name) => {
3885      // TODO: Use (malleable) environment variables instead of system settings.
3886      var currentYear = new Date().getFullYear();
3887      var winter = new Date(currentYear, 0, 1);
3888      var summer = new Date(currentYear, 6, 1);
3889      var winterOffset = winter.getTimezoneOffset();
3890      var summerOffset = summer.getTimezoneOffset();
3891  
3892      // Local standard timezone offset. Local standard time is not adjusted for
3893      // daylight savings.  This code uses the fact that getTimezoneOffset returns
3894      // a greater value during Standard Time versus Daylight Saving Time (DST).
3895      // Thus it determines the expected output during Standard Time, and it
3896      // compares whether the output of the given date the same (Standard) or less
3897      // (DST).
3898      var stdTimezoneOffset = Math.max(winterOffset, summerOffset);
3899  
3900      // timezone is specified as seconds west of UTC ("The external variable
3901      // `timezone` shall be set to the difference, in seconds, between
3902      // Coordinated Universal Time (UTC) and local standard time."), the same
3903      // as returned by stdTimezoneOffset.
3904      // See http://pubs.opengroup.org/onlinepubs/009695399/functions/tzset.html
3905      HEAPU32[((timezone)>>2)] = stdTimezoneOffset * 60;
3906  
3907      HEAP32[((daylight)>>2)] = Number(winterOffset != summerOffset);
3908  
3909      function extractZone(date) {
3910        var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/);
3911        return match ? match[1] : "GMT";
3912      };
3913      var winterName = extractZone(winter);
3914      var summerName = extractZone(summer);
3915      if (summerOffset < winterOffset) {
3916        // Northern hemisphere
3917        stringToUTF8(winterName, std_name, 7);
3918        stringToUTF8(summerName, dst_name, 7);
3919      } else {
3920        stringToUTF8(winterName, dst_name, 7);
3921        stringToUTF8(summerName, std_name, 7);
3922      }
3923    };
3924
3925  var _abort = () => {
3926      abort('');
3927    };
3928
3929  var _emscripten_date_now = () => Date.now();
3930
3931  
3932  var runtimeKeepaliveCounter = 0;
3933  var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0;
3934  var _proc_exit = (code) => {
3935      EXITSTATUS = code;
3936      if (!keepRuntimeAlive()) {
3937        Module['onExit']?.(code);
3938        ABORT = true;
3939      }
3940      quit_(code, new ExitStatus(code));
3941    };
3942  
3943  /** @suppress {duplicate } */
3944  /** @param {boolean|number=} implicit */
3945  var exitJS = (status, implicit) => {
3946      EXITSTATUS = status;
3947  
3948      if (!keepRuntimeAlive()) {
3949        exitRuntime();
3950      }
3951  
3952      _proc_exit(status);
3953    };
3954  var _exit = exitJS;
3955  
3956  var __emscripten_runtime_keepalive_clear = () => {
3957      noExitRuntime = false;
3958      runtimeKeepaliveCounter = 0;
3959    };
3960  
3961  var _emscripten_force_exit = (status) => {
3962      __emscripten_runtime_keepalive_clear();
3963      _exit(status);
3964    };
3965  Module['_emscripten_force_exit'] = _emscripten_force_exit;
3966
3967  var getHeapMax = () =>
3968      // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate
3969      // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side
3970      // for any code that deals with heap sizes, which would require special
3971      // casing all heap size related code to treat 0 specially.
3972      2147483648;
3973  var _emscripten_get_heap_max = () => getHeapMax();
3974
3975  var _emscripten_get_now;
3976      // Modern environment where performance.now() is supported:
3977      // N.B. a shorter form "_emscripten_get_now = performance.now;" is
3978      // unfortunately not allowed even in current browsers (e.g. FF Nightly 75).
3979      _emscripten_get_now = () => performance.now();
3980  ;
3981
3982  var _emscripten_get_now_res = () => { // return resolution of get_now, in nanoseconds
3983      if (ENVIRONMENT_IS_NODE) {
3984        return 1; // nanoseconds
3985      }
3986      // Modern environment where performance.now() is supported:
3987      return 1000; // microseconds (1/1000 of a millisecond)
3988    };
3989
3990  
3991  var growMemory = (size) => {
3992      var b = wasmMemory.buffer;
3993      var pages = (size - b.byteLength + 65535) / 65536;
3994      try {
3995        // round size grow request up to wasm page size (fixed 64KB per spec)
3996        wasmMemory.grow(pages); // .grow() takes a delta compared to the previous size
3997        updateMemoryViews();
3998        return 1 /*success*/;
3999      } catch(e) {
4000      }
4001      // implicit 0 return to save code size (caller will cast "undefined" into 0
4002      // anyhow)
4003    };
4004  var _emscripten_resize_heap = (requestedSize) => {
4005      var oldSize = HEAPU8.length;
4006      // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
4007      requestedSize >>>= 0;
4008      // With multithreaded builds, races can happen (another thread might increase the size
4009      // in between), so return a failure, and let the caller retry.
4010  
4011      // Memory resize rules:
4012      // 1.  Always increase heap size to at least the requested size, rounded up
4013      //     to next page multiple.
4014      // 2a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap
4015      //     geometrically: increase the heap size according to
4016      //     MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%), At most
4017      //     overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB).
4018      // 2b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap
4019      //     linearly: increase the heap size by at least
4020      //     MEMORY_GROWTH_LINEAR_STEP bytes.
4021      // 3.  Max size for the heap is capped at 2048MB-WASM_PAGE_SIZE, or by
4022      //     MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest
4023      // 4.  If we were unable to allocate as much memory, it may be due to
4024      //     over-eager decision to excessively reserve due to (3) above.
4025      //     Hence if an allocation fails, cut down on the amount of excess
4026      //     growth, in an attempt to succeed to perform a smaller allocation.
4027  
4028      // A limit is set for how much we can grow. We should not exceed that
4029      // (the wasm binary specifies it, so if we tried, we'd fail anyhow).
4030      var maxHeapSize = getHeapMax();
4031      if (requestedSize > maxHeapSize) {
4032        return false;
4033      }
4034  
4035      var alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple;
4036  
4037      // Loop through potential heap size increases. If we attempt a too eager
4038      // reservation that fails, cut down on the attempted size and reserve a
4039      // smaller bump instead. (max 3 times, chosen somewhat arbitrarily)
4040      for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {
4041        var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth
4042        // but limit overreserving (default to capping at +96MB overgrowth at most)
4043        overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296 );
4044  
4045        var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536));
4046  
4047        var replacement = growMemory(newSize);
4048        if (replacement) {
4049  
4050          return true;
4051        }
4052      }
4053      return false;
4054    };
4055
4056  var ENV = {
4057  };
4058  
4059  var getExecutableName = () => {
4060      return thisProgram || './this.program';
4061    };
4062  var getEnvStrings = () => {
4063      if (!getEnvStrings.strings) {
4064        // Default values.
4065        // Browser language detection #8751
4066        var lang = ((typeof navigator == 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8';
4067        var env = {
4068          'USER': 'web_user',
4069          'LOGNAME': 'web_user',
4070          'PATH': '/',
4071          'PWD': '/',
4072          'HOME': '/home/web_user',
4073          'LANG': lang,
4074          '_': getExecutableName()
4075        };
4076        // Apply the user-provided values, if any.
4077        for (var x in ENV) {
4078          // x is a key in ENV; if ENV[x] is undefined, that means it was
4079          // explicitly set to be so. We allow user code to do that to
4080          // force variables with default values to remain unset.
4081          if (ENV[x] === undefined) delete env[x];
4082          else env[x] = ENV[x];
4083        }
4084        var strings = [];
4085        for (var x in env) {
4086          strings.push(`${x}=${env[x]}`);
4087        }
4088        getEnvStrings.strings = strings;
4089      }
4090      return getEnvStrings.strings;
4091    };
4092  
4093  var stringToAscii = (str, buffer) => {
4094      for (var i = 0; i < str.length; ++i) {
4095        HEAP8[buffer++] = str.charCodeAt(i);
4096      }
4097      // Null-terminate the string
4098      HEAP8[buffer] = 0;
4099    };
4100  var _environ_get = (__environ, environ_buf) => {
4101      var bufSize = 0;
4102      getEnvStrings().forEach((string, i) => {
4103        var ptr = environ_buf + bufSize;
4104        HEAPU32[(((__environ)+(i*4))>>2)] = ptr;
4105        stringToAscii(string, ptr);
4106        bufSize += string.length + 1;
4107      });
4108      return 0;
4109    };
4110
4111  var _environ_sizes_get = (penviron_count, penviron_buf_size) => {
4112      var strings = getEnvStrings();
4113      HEAPU32[((penviron_count)>>2)] = strings.length;
4114      var bufSize = 0;
4115      strings.forEach((string) => bufSize += string.length + 1);
4116      HEAPU32[((penviron_buf_size)>>2)] = bufSize;
4117      return 0;
4118    };
4119
4120
4121  function _fd_close(fd) {
4122  try {
4123  
4124      var stream = SYSCALLS.getStreamFromFD(fd);
4125      FS.close(stream);
4126      return 0;
4127    } catch (e) {
4128    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
4129    return e.errno;
4130  }
4131  }
4132
4133  /** @param {number=} offset */
4134  var doReadv = (stream, iov, iovcnt, offset) => {
4135      var ret = 0;
4136      for (var i = 0; i < iovcnt; i++) {
4137        var ptr = HEAPU32[((iov)>>2)];
4138        var len = HEAPU32[(((iov)+(4))>>2)];
4139        iov += 8;
4140        var curr = FS.read(stream, HEAP8, ptr, len, offset);
4141        if (curr < 0) return -1;
4142        ret += curr;
4143        if (curr < len) break; // nothing more to read
4144        if (typeof offset !== 'undefined') {
4145          offset += curr;
4146        }
4147      }
4148      return ret;
4149    };
4150  
4151  
4152  function _fd_pread(fd, iov, iovcnt, offset, pnum) {
4153    offset = bigintToI53Checked(offset);
4154  
4155    
4156  try {
4157  
4158      if (isNaN(offset)) return 61;
4159      var stream = SYSCALLS.getStreamFromFD(fd)
4160      var num = doReadv(stream, iov, iovcnt, offset);
4161      HEAPU32[((pnum)>>2)] = num;
4162      return 0;
4163    } catch (e) {
4164    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
4165    return e.errno;
4166  }
4167  ;
4168  }
4169
4170  
4171  function _fd_read(fd, iov, iovcnt, pnum) {
4172  try {
4173  
4174      var stream = SYSCALLS.getStreamFromFD(fd);
4175      var num = doReadv(stream, iov, iovcnt);
4176      HEAPU32[((pnum)>>2)] = num;
4177      return 0;
4178    } catch (e) {
4179    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
4180    return e.errno;
4181  }
4182  }
4183
4184  
4185  function _fd_seek(fd, offset, whence, newOffset) {
4186    offset = bigintToI53Checked(offset);
4187  
4188    
4189  try {
4190  
4191      if (isNaN(offset)) return 61;
4192      var stream = SYSCALLS.getStreamFromFD(fd);
4193      FS.llseek(stream, offset, whence);
4194      HEAP64[((newOffset)>>3)] = BigInt(stream.position);
4195      if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
4196      return 0;
4197    } catch (e) {
4198    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
4199    return e.errno;
4200  }
4201  ;
4202  }
4203
4204  /** @param {number=} offset */
4205  var doWritev = (stream, iov, iovcnt, offset) => {
4206      var ret = 0;
4207      for (var i = 0; i < iovcnt; i++) {
4208        var ptr = HEAPU32[((iov)>>2)];
4209        var len = HEAPU32[(((iov)+(4))>>2)];
4210        iov += 8;
4211        var curr = FS.write(stream, HEAP8, ptr, len, offset);
4212        if (curr < 0) return -1;
4213        ret += curr;
4214        if (typeof offset !== 'undefined') {
4215          offset += curr;
4216        }
4217      }
4218      return ret;
4219    };
4220  
4221  function _fd_write(fd, iov, iovcnt, pnum) {
4222  try {
4223  
4224      var stream = SYSCALLS.getStreamFromFD(fd);
4225      var num = doWritev(stream, iov, iovcnt);
4226      HEAPU32[((pnum)>>2)] = num;
4227      return 0;
4228    } catch (e) {
4229    if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e;
4230    return e.errno;
4231  }
4232  }
4233
4234  var DOTNET = {
4235  setup:function setup(emscriptenBuildOptions) {
4236      // USE_PTHREADS is emscripten's define symbol, which is passed to acorn optimizer, so we could use it here
4237      const modulePThread = {};
4238      const ENVIRONMENT_IS_PTHREAD = false;
4239      const dotnet_replacements = {
4240          fetch: globalThis.fetch,
4241          ENVIRONMENT_IS_WORKER,
4242          require,
4243          modulePThread,
4244          scriptDirectory,
4245      };
4246  
4247      ENVIRONMENT_IS_WORKER = dotnet_replacements.ENVIRONMENT_IS_WORKER;
4248      Module.__dotnet_runtime.initializeReplacements(dotnet_replacements);
4249      noExitRuntime = dotnet_replacements.noExitRuntime;
4250      fetch = dotnet_replacements.fetch;
4251      require = dotnet_replacements.require;
4252      _scriptDir = __dirname = scriptDirectory = dotnet_replacements.scriptDirectory;
4253      Module.__dotnet_runtime.passEmscriptenInternals({
4254          isPThread: ENVIRONMENT_IS_PTHREAD,
4255          quit_, ExitStatus,
4256          updateMemoryViews,
4257          getMemory: () => { return wasmMemory; },
4258          getWasmIndirectFunctionTable: () => { return wasmTable; },
4259      }, emscriptenBuildOptions);
4260  
4261          Module.__dotnet_runtime.configureEmscriptenStartup(Module);
4262  },
4263  };
4264  function _mono_interp_flush_jitcall_queue(
4265  ) {
4266  return {runtime_idx:12};//mono_interp_flush_jitcall_queue
4267  }
4268
4269  function _mono_interp_invoke_wasm_jit_call_trampoline(
4270  ) {
4271  return {runtime_idx:11};//mono_interp_invoke_wasm_jit_call_trampoline
4272  }
4273
4274  function _mono_interp_jit_wasm_entry_trampoline(
4275  ) {
4276  return {runtime_idx:9};//mono_interp_jit_wasm_entry_trampoline
4277  }
4278
4279  function _mono_interp_jit_wasm_jit_call_trampoline(
4280  ) {
4281  return {runtime_idx:10};//mono_interp_jit_wasm_jit_call_trampoline
4282  }
4283
4284  function _mono_interp_record_interp_entry(
4285  ) {
4286  return {runtime_idx:8};//mono_interp_record_interp_entry
4287  }
4288
4289  function _mono_interp_tier_prepare_jiterpreter(
4290  ) {
4291  return {runtime_idx:7};//mono_interp_tier_prepare_jiterpreter
4292  }
4293
4294  function _mono_wasm_bind_js_import_ST(
4295  ) {
4296  return {runtime_idx:22};//mono_wasm_bind_js_import_ST
4297  }
4298
4299  function _mono_wasm_browser_entropy(
4300  ) {
4301  return {runtime_idx:18};//mono_wasm_browser_entropy
4302  }
4303
4304  function _mono_wasm_cancel_promise(
4305  ) {
4306  return {runtime_idx:26};//mono_wasm_cancel_promise
4307  }
4308
4309  function _mono_wasm_console_clear(
4310  ) {
4311  return {runtime_idx:20};//mono_wasm_console_clear
4312  }
4313
4314  function _mono_wasm_free_method_data(
4315  ) {
4316  return {runtime_idx:13};//mono_wasm_free_method_data
4317  }
4318
4319  function _mono_wasm_get_locale_info(
4320  ) {
4321  return {runtime_idx:27};//mono_wasm_get_locale_info
4322  }
4323
4324  function _mono_wasm_invoke_js_function(
4325  ) {
4326  return {runtime_idx:23};//mono_wasm_invoke_js_function
4327  }
4328
4329  function _mono_wasm_invoke_jsimport_ST(
4330  ) {
4331  return {runtime_idx:24};//mono_wasm_invoke_jsimport_ST
4332  }
4333
4334  function _mono_wasm_process_current_pid(
4335  ) {
4336  return {runtime_idx:19};//mono_wasm_process_current_pid
4337  }
4338
4339  function _mono_wasm_release_cs_owned_object(
4340  ) {
4341  return {runtime_idx:21};//mono_wasm_release_cs_owned_object
4342  }
4343
4344  function _mono_wasm_resolve_or_reject_promise(
4345  ) {
4346  return {runtime_idx:25};//mono_wasm_resolve_or_reject_promise
4347  }
4348
4349  function _mono_wasm_schedule_timer(
4350  ) {
4351  return {runtime_idx:0};//mono_wasm_schedule_timer
4352  }
4353
4354  function _mono_wasm_set_entrypoint_breakpoint(
4355  ) {
4356  return {runtime_idx:17};//mono_wasm_set_entrypoint_breakpoint
4357  }
4358
4359  function _mono_wasm_trace_logger(
4360  ) {
4361  return {runtime_idx:16};//mono_wasm_trace_logger
4362  }
4363
4364  function _schedule_background_exec(
4365  ) {
4366  return {runtime_idx:6};//schedule_background_exec
4367  }
4368
4369  
4370  var arraySum = (array, index) => {
4371      var sum = 0;
4372      for (var i = 0; i <= index; sum += array[i++]) {
4373        // no-op
4374      }
4375      return sum;
4376    };
4377  
4378  
4379  var MONTH_DAYS_LEAP = [31,29,31,30,31,30,31,31,30,31,30,31];
4380  
4381  var MONTH_DAYS_REGULAR = [31,28,31,30,31,30,31,31,30,31,30,31];
4382  var addDays = (date, days) => {
4383      var newDate = new Date(date.getTime());
4384      while (days > 0) {
4385        var leap = isLeapYear(newDate.getFullYear());
4386        var currentMonth = newDate.getMonth();
4387        var daysInCurrentMonth = (leap ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR)[currentMonth];
4388  
4389        if (days > daysInCurrentMonth-newDate.getDate()) {
4390          // we spill over to next month
4391          days -= (daysInCurrentMonth-newDate.getDate()+1);
4392          newDate.setDate(1);
4393          if (currentMonth < 11) {
4394            newDate.setMonth(currentMonth+1)
4395          } else {
4396            newDate.setMonth(0);
4397            newDate.setFullYear(newDate.getFullYear()+1);
4398          }
4399        } else {
4400          // we stay in current month
4401          newDate.setDate(newDate.getDate()+days);
4402          return newDate;
4403        }
4404      }
4405  
4406      return newDate;
4407    };
4408  
4409  
4410  
4411  
4412  var writeArrayToMemory = (array, buffer) => {
4413      HEAP8.set(array, buffer);
4414    };
4415  
4416  var _strftime = (s, maxsize, format, tm) => {
4417      // size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr);
4418      // http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html
4419  
4420      var tm_zone = HEAPU32[(((tm)+(40))>>2)];
4421  
4422      var date = {
4423        tm_sec: HEAP32[((tm)>>2)],
4424        tm_min: HEAP32[(((tm)+(4))>>2)],
4425        tm_hour: HEAP32[(((tm)+(8))>>2)],
4426        tm_mday: HEAP32[(((tm)+(12))>>2)],
4427        tm_mon: HEAP32[(((tm)+(16))>>2)],
4428        tm_year: HEAP32[(((tm)+(20))>>2)],
4429        tm_wday: HEAP32[(((tm)+(24))>>2)],
4430        tm_yday: HEAP32[(((tm)+(28))>>2)],
4431        tm_isdst: HEAP32[(((tm)+(32))>>2)],
4432        tm_gmtoff: HEAP32[(((tm)+(36))>>2)],
4433        tm_zone: tm_zone ? UTF8ToString(tm_zone) : ''
4434      };
4435      
4436  
4437      var pattern = UTF8ToString(format);
4438  
4439      // expand format
4440      var EXPANSION_RULES_1 = {
4441        '%c': '%a %b %d %H:%M:%S %Y',     // Replaced by the locale's appropriate date and time representation - e.g., Mon Aug  3 14:02:01 2013
4442        '%D': '%m/%d/%y',                 // Equivalent to %m / %d / %y
4443        '%F': '%Y-%m-%d',                 // Equivalent to %Y - %m - %d
4444        '%h': '%b',                       // Equivalent to %b
4445        '%r': '%I:%M:%S %p',              // Replaced by the time in a.m. and p.m. notation
4446        '%R': '%H:%M',                    // Replaced by the time in 24-hour notation
4447        '%T': '%H:%M:%S',                 // Replaced by the time
4448        '%x': '%m/%d/%y',                 // Replaced by the locale's appropriate date representation
4449        '%X': '%H:%M:%S',                 // Replaced by the locale's appropriate time representation
4450        // Modified Conversion Specifiers
4451        '%Ec': '%c',                      // Replaced by the locale's alternative appropriate date and time representation.
4452        '%EC': '%C',                      // Replaced by the name of the base year (period) in the locale's alternative representation.
4453        '%Ex': '%m/%d/%y',                // Replaced by the locale's alternative date representation.
4454        '%EX': '%H:%M:%S',                // Replaced by the locale's alternative time representation.
4455        '%Ey': '%y',                      // Replaced by the offset from %EC (year only) in the locale's alternative representation.
4456        '%EY': '%Y',                      // Replaced by the full alternative year representation.
4457        '%Od': '%d',                      // Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading zeros if there is any alternative symbol for zero; otherwise, with leading <space> characters.
4458        '%Oe': '%e',                      // Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading <space> characters.
4459        '%OH': '%H',                      // Replaced by the hour (24-hour clock) using the locale's alternative numeric symbols.
4460        '%OI': '%I',                      // Replaced by the hour (12-hour clock) using the locale's alternative numeric symbols.
4461        '%Om': '%m',                      // Replaced by the month using the locale's alternative numeric symbols.
4462        '%OM': '%M',                      // Replaced by the minutes using the locale's alternative numeric symbols.
4463        '%OS': '%S',                      // Replaced by the seconds using the locale's alternative numeric symbols.
4464        '%Ou': '%u',                      // Replaced by the weekday as a number in the locale's alternative representation (Monday=1).
4465        '%OU': '%U',                      // Replaced by the week number of the year (Sunday as the first day of the week, rules corresponding to %U ) using the locale's alternative numeric symbols.
4466        '%OV': '%V',                      // Replaced by the week number of the year (Monday as the first day of the week, rules corresponding to %V ) using the locale's alternative numeric symbols.
4467        '%Ow': '%w',                      // Replaced by the number of the weekday (Sunday=0) using the locale's alternative numeric symbols.
4468        '%OW': '%W',                      // Replaced by the week number of the year (Monday as the first day of the week) using the locale's alternative numeric symbols.
4469        '%Oy': '%y',                      // Replaced by the year (offset from %C ) using the locale's alternative numeric symbols.
4470      };
4471      for (var rule in EXPANSION_RULES_1) {
4472        pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_1[rule]);
4473      }
4474  
4475      var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
4476      var MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
4477  
4478      function leadingSomething(value, digits, character) {
4479        var str = typeof value == 'number' ? value.toString() : (value || '');
4480        while (str.length < digits) {
4481          str = character[0]+str;
4482        }
4483        return str;
4484      }
4485  
4486      function leadingNulls(value, digits) {
4487        return leadingSomething(value, digits, '0');
4488      }
4489  
4490      function compareByDay(date1, date2) {
4491        function sgn(value) {
4492          return value < 0 ? -1 : (value > 0 ? 1 : 0);
4493        }
4494  
4495        var compare;
4496        if ((compare = sgn(date1.getFullYear()-date2.getFullYear())) === 0) {
4497          if ((compare = sgn(date1.getMonth()-date2.getMonth())) === 0) {
4498            compare = sgn(date1.getDate()-date2.getDate());
4499          }
4500        }
4501        return compare;
4502      }
4503  
4504      function getFirstWeekStartDate(janFourth) {
4505          switch (janFourth.getDay()) {
4506            case 0: // Sunday
4507              return new Date(janFourth.getFullYear()-1, 11, 29);
4508            case 1: // Monday
4509              return janFourth;
4510            case 2: // Tuesday
4511              return new Date(janFourth.getFullYear(), 0, 3);
4512            case 3: // Wednesday
4513              return new Date(janFourth.getFullYear(), 0, 2);
4514            case 4: // Thursday
4515              return new Date(janFourth.getFullYear(), 0, 1);
4516            case 5: // Friday
4517              return new Date(janFourth.getFullYear()-1, 11, 31);
4518            case 6: // Saturday
4519              return new Date(janFourth.getFullYear()-1, 11, 30);
4520          }
4521      }
4522  
4523      function getWeekBasedYear(date) {
4524          var thisDate = addDays(new Date(date.tm_year+1900, 0, 1), date.tm_yday);
4525  
4526          var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4);
4527          var janFourthNextYear = new Date(thisDate.getFullYear()+1, 0, 4);
4528  
4529          var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear);
4530          var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear);
4531  
4532          if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) {
4533            // this date is after the start of the first week of this year
4534            if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) {
4535              return thisDate.getFullYear()+1;
4536            }
4537            return thisDate.getFullYear();
4538          }
4539          return thisDate.getFullYear()-1;
4540      }
4541  
4542      var EXPANSION_RULES_2 = {
4543        '%a': (date) => WEEKDAYS[date.tm_wday].substring(0,3) ,
4544        '%A': (date) => WEEKDAYS[date.tm_wday],
4545        '%b': (date) => MONTHS[date.tm_mon].substring(0,3),
4546        '%B': (date) => MONTHS[date.tm_mon],
4547        '%C': (date) => {
4548          var year = date.tm_year+1900;
4549          return leadingNulls((year/100)|0,2);
4550        },
4551        '%d': (date) => leadingNulls(date.tm_mday, 2),
4552        '%e': (date) => leadingSomething(date.tm_mday, 2, ' '),
4553        '%g': (date) => {
4554          // %g, %G, and %V give values according to the ISO 8601:2000 standard week-based year.
4555          // In this system, weeks begin on a Monday and week 1 of the year is the week that includes
4556          // January 4th, which is also the week that includes the first Thursday of the year, and
4557          // is also the first week that contains at least four days in the year.
4558          // If the first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of
4559          // the last week of the preceding year; thus, for Saturday 2nd January 1999,
4560          // %G is replaced by 1998 and %V is replaced by 53. If December 29th, 30th,
4561          // or 31st is a Monday, it and any following days are part of week 1 of the following year.
4562          // Thus, for Tuesday 30th December 1997, %G is replaced by 1998 and %V is replaced by 01.
4563  
4564          return getWeekBasedYear(date).toString().substring(2);
4565        },
4566        '%G': getWeekBasedYear,
4567        '%H': (date) => leadingNulls(date.tm_hour, 2),
4568        '%I': (date) => {
4569          var twelveHour = date.tm_hour;
4570          if (twelveHour == 0) twelveHour = 12;
4571          else if (twelveHour > 12) twelveHour -= 12;
4572          return leadingNulls(twelveHour, 2);
4573        },
4574        '%j': (date) => {
4575          // Day of the year (001-366)
4576          return leadingNulls(date.tm_mday + arraySum(isLeapYear(date.tm_year+1900) ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR, date.tm_mon-1), 3);
4577        },
4578        '%m': (date) => leadingNulls(date.tm_mon+1, 2),
4579        '%M': (date) => leadingNulls(date.tm_min, 2),
4580        '%n': () => '\n',
4581        '%p': (date) => {
4582          if (date.tm_hour >= 0 && date.tm_hour < 12) {
4583            return 'AM';
4584          }
4585          return 'PM';
4586        },
4587        '%S': (date) => leadingNulls(date.tm_sec, 2),
4588        '%t': () => '\t',
4589        '%u': (date) => date.tm_wday || 7,
4590        '%U': (date) => {
4591          var days = date.tm_yday + 7 - date.tm_wday;
4592          return leadingNulls(Math.floor(days / 7), 2);
4593        },
4594        '%V': (date) => {
4595          // Replaced by the week number of the year (Monday as the first day of the week)
4596          // as a decimal number [01,53]. If the week containing 1 January has four
4597          // or more days in the new year, then it is considered week 1.
4598          // Otherwise, it is the last week of the previous year, and the next week is week 1.
4599          // Both January 4th and the first Thursday of January are always in week 1. [ tm_year, tm_wday, tm_yday]
4600          var val = Math.floor((date.tm_yday + 7 - (date.tm_wday + 6) % 7 ) / 7);
4601          // If 1 Jan is just 1-3 days past Monday, the previous week
4602          // is also in this year.
4603          if ((date.tm_wday + 371 - date.tm_yday - 2) % 7 <= 2) {
4604            val++;
4605          }
4606          if (!val) {
4607            val = 52;
4608            // If 31 December of prev year a Thursday, or Friday of a
4609            // leap year, then the prev year has 53 weeks.
4610            var dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7;
4611            if (dec31 == 4 || (dec31 == 5 && isLeapYear(date.tm_year%400-1))) {
4612              val++;
4613            }
4614          } else if (val == 53) {
4615            // If 1 January is not a Thursday, and not a Wednesday of a
4616            // leap year, then this year has only 52 weeks.
4617            var jan1 = (date.tm_wday + 371 - date.tm_yday) % 7;
4618            if (jan1 != 4 && (jan1 != 3 || !isLeapYear(date.tm_year)))
4619              val = 1;
4620          }
4621          return leadingNulls(val, 2);
4622        },
4623        '%w': (date) => date.tm_wday,
4624        '%W': (date) => {
4625          var days = date.tm_yday + 7 - ((date.tm_wday + 6) % 7);
4626          return leadingNulls(Math.floor(days / 7), 2);
4627        },
4628        '%y': (date) => {
4629          // Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year]
4630          return (date.tm_year+1900).toString().substring(2);
4631        },
4632        // Replaced by the year as a decimal number (for example, 1997). [ tm_year]
4633        '%Y': (date) => date.tm_year+1900,
4634        '%z': (date) => {
4635          // Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ).
4636          // For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich).
4637          var off = date.tm_gmtoff;
4638          var ahead = off >= 0;
4639          off = Math.abs(off) / 60;
4640          // convert from minutes into hhmm format (which means 60 minutes = 100 units)
4641          off = (off / 60)*100 + (off % 60);
4642          return (ahead ? '+' : '-') + String("0000" + off).slice(-4);
4643        },
4644        '%Z': (date) => date.tm_zone,
4645        '%%': () => '%'
4646      };
4647  
4648      // Replace %% with a pair of NULLs (which cannot occur in a C string), then
4649      // re-inject them after processing.
4650      pattern = pattern.replace(/%%/g, '\0\0')
4651      for (var rule in EXPANSION_RULES_2) {
4652        if (pattern.includes(rule)) {
4653          pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_2[rule](date));
4654        }
4655      }
4656      pattern = pattern.replace(/\0\0/g, '%')
4657  
4658      var bytes = intArrayFromString(pattern, false);
4659      if (bytes.length > maxsize) {
4660        return 0;
4661      }
4662  
4663      writeArrayToMemory(bytes, s);
4664      return bytes.length-1;
4665    };
4666
4667
4668
4669  var getCFunc = (ident) => {
4670      var func = Module['_' + ident]; // closure exported function
4671      return func;
4672    };
4673  
4674  
4675  
4676  var stringToUTF8OnStack = (str) => {
4677      var size = lengthBytesUTF8(str) + 1;
4678      var ret = stackAlloc(size);
4679      stringToUTF8(str, ret, size);
4680      return ret;
4681    };
4682  
4683  
4684  
4685  
4686  
4687    /**
4688     * @param {string|null=} returnType
4689     * @param {Array=} argTypes
4690     * @param {Arguments|Array=} args
4691     * @param {Object=} opts
4692     */
4693  var ccall = (ident, returnType, argTypes, args, opts) => {
4694      // For fast lookup of conversion functions
4695      var toC = {
4696        'string': (str) => {
4697          var ret = 0;
4698          if (str !== null && str !== undefined && str !== 0) { // null string
4699            // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0'
4700            ret = stringToUTF8OnStack(str);
4701          }
4702          return ret;
4703        },
4704        'array': (arr) => {
4705          var ret = stackAlloc(arr.length);
4706          writeArrayToMemory(arr, ret);
4707          return ret;
4708        }
4709      };
4710  
4711      function convertReturnValue(ret) {
4712        if (returnType === 'string') {
4713          
4714          return UTF8ToString(ret);
4715        }
4716        if (returnType === 'boolean') return Boolean(ret);
4717        return ret;
4718      }
4719  
4720      var func = getCFunc(ident);
4721      var cArgs = [];
4722      var stack = 0;
4723      if (args) {
4724        for (var i = 0; i < args.length; i++) {
4725          var converter = toC[argTypes[i]];
4726          if (converter) {
4727            if (stack === 0) stack = stackSave();
4728            cArgs[i] = converter(args[i]);
4729          } else {
4730            cArgs[i] = args[i];
4731          }
4732        }
4733      }
4734      var ret = func(...cArgs);
4735      function onDone(ret) {
4736        if (stack !== 0) stackRestore(stack);
4737        return convertReturnValue(ret);
4738      }
4739  
4740      ret = onDone(ret);
4741      return ret;
4742    };
4743
4744  
4745  
4746    /**
4747     * @param {string=} returnType
4748     * @param {Array=} argTypes
4749     * @param {Object=} opts
4750     */
4751  var cwrap = (ident, returnType, argTypes, opts) => {
4752      // When the function takes numbers and returns a number, we can just return
4753      // the original function
4754      var numericArgs = !argTypes || argTypes.every((type) => type === 'number' || type === 'boolean');
4755      var numericRet = returnType !== 'string';
4756      if (numericRet && numericArgs && !opts) {
4757        return getCFunc(ident);
4758      }
4759      return (...args) => ccall(ident, returnType, argTypes, args, opts);
4760    };
4761
4762
4763
4764
4765
4766
4767
4768
4769  var uleb128Encode = (n, target) => {
4770      if (n < 128) {
4771        target.push(n);
4772      } else {
4773        target.push((n % 128) | 128, n >> 7);
4774      }
4775    };
4776  
4777  var sigToWasmTypes = (sig) => {
4778      var typeNames = {
4779        'i': 'i32',
4780        'j': 'i64',
4781        'f': 'f32',
4782        'd': 'f64',
4783        'e': 'externref',
4784        'p': 'i32',
4785      };
4786      var type = {
4787        parameters: [],
4788        results: sig[0] == 'v' ? [] : [typeNames[sig[0]]]
4789      };
4790      for (var i = 1; i < sig.length; ++i) {
4791        type.parameters.push(typeNames[sig[i]]);
4792      }
4793      return type;
4794    };
4795  
4796  var generateFuncType = (sig, target) => {
4797      var sigRet = sig.slice(0, 1);
4798      var sigParam = sig.slice(1);
4799      var typeCodes = {
4800        'i': 0x7f, // i32
4801        'p': 0x7f, // i32
4802        'j': 0x7e, // i64
4803        'f': 0x7d, // f32
4804        'd': 0x7c, // f64
4805        'e': 0x6f, // externref
4806      };
4807  
4808      // Parameters, length + signatures
4809      target.push(0x60 /* form: func */);
4810      uleb128Encode(sigParam.length, target);
4811      for (var i = 0; i < sigParam.length; ++i) {
4812        target.push(typeCodes[sigParam[i]]);
4813      }
4814  
4815      // Return values, length + signatures
4816      // With no multi-return in MVP, either 0 (void) or 1 (anything else)
4817      if (sigRet == 'v') {
4818        target.push(0x00);
4819      } else {
4820        target.push(0x01, typeCodes[sigRet]);
4821      }
4822    };
4823  var convertJsFunctionToWasm = (func, sig) => {
4824  
4825      // If the type reflection proposal is available, use the new
4826      // "WebAssembly.Function" constructor.
4827      // Otherwise, construct a minimal wasm module importing the JS function and
4828      // re-exporting it.
4829      if (typeof WebAssembly.Function == "function") {
4830        return new WebAssembly.Function(sigToWasmTypes(sig), func);
4831      }
4832  
4833      // The module is static, with the exception of the type section, which is
4834      // generated based on the signature passed in.
4835      var typeSectionBody = [
4836        0x01, // count: 1
4837      ];
4838      generateFuncType(sig, typeSectionBody);
4839  
4840      // Rest of the module is static
4841      var bytes = [
4842        0x00, 0x61, 0x73, 0x6d, // magic ("\0asm")
4843        0x01, 0x00, 0x00, 0x00, // version: 1
4844        0x01, // Type section code
4845      ];
4846      // Write the overall length of the type section followed by the body
4847      uleb128Encode(typeSectionBody.length, bytes);
4848      bytes.push(...typeSectionBody);
4849  
4850      // The rest of the module is static
4851      bytes.push(
4852        0x02, 0x07, // import section
4853          // (import "e" "f" (func 0 (type 0)))
4854          0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00,
4855        0x07, 0x05, // export section
4856          // (export "f" (func 0 (type 0)))
4857          0x01, 0x01, 0x66, 0x00, 0x00,
4858      );
4859  
4860      // We can compile this wasm module synchronously because it is very small.
4861      // This accepts an import (at "e.f"), that it reroutes to an export (at "f")
4862      var module = new WebAssembly.Module(new Uint8Array(bytes));
4863      var instance = new WebAssembly.Instance(module, { 'e': { 'f': func } });
4864      var wrappedFunc = instance.exports['f'];
4865      return wrappedFunc;
4866    };
4867  
4868  var wasmTableMirror = [];
4869  
4870  var wasmTable;
4871  var getWasmTableEntry = (funcPtr) => {
4872      var func = wasmTableMirror[funcPtr];
4873      if (!func) {
4874        if (funcPtr >= wasmTableMirror.length) wasmTableMirror.length = funcPtr + 1;
4875        wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);
4876      }
4877      return func;
4878    };
4879  
4880  var updateTableMap = (offset, count) => {
4881      if (functionsInTableMap) {
4882        for (var i = offset; i < offset + count; i++) {
4883          var item = getWasmTableEntry(i);
4884          // Ignore null values.
4885          if (item) {
4886            functionsInTableMap.set(item, i);
4887          }
4888        }
4889      }
4890    };
4891  
4892  var functionsInTableMap;
4893  
4894  var getFunctionAddress = (func) => {
4895      // First, create the map if this is the first use.
4896      if (!functionsInTableMap) {
4897        functionsInTableMap = new WeakMap();
4898        updateTableMap(0, wasmTable.length);
4899      }
4900      return functionsInTableMap.get(func) || 0;
4901    };
4902  
4903  
4904  var freeTableIndexes = [];
4905  
4906  var getEmptyTableSlot = () => {
4907      // Reuse a free index if there is one, otherwise grow.
4908      if (freeTableIndexes.length) {
4909        return freeTableIndexes.pop();
4910      }
4911      // Grow the table
4912      try {
4913        wasmTable.grow(1);
4914      } catch (err) {
4915        if (!(err instanceof RangeError)) {
4916          throw err;
4917        }
4918        throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.';
4919      }
4920      return wasmTable.length - 1;
4921    };
4922  
4923  
4924  
4925  var setWasmTableEntry = (idx, func) => {
4926      wasmTable.set(idx, func);
4927      // With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overridden to return wrapped
4928      // functions so we need to call it here to retrieve the potential wrapper correctly
4929      // instead of just storing 'func' directly into wasmTableMirror
4930      wasmTableMirror[idx] = wasmTable.get(idx);
4931    };
4932  
4933  /** @param {string=} sig */
4934  var addFunction = (func, sig) => {
4935      // Check if the function is already in the table, to ensure each function
4936      // gets a unique index.
4937      var rtn = getFunctionAddress(func);
4938      if (rtn) {
4939        return rtn;
4940      }
4941  
4942      // It's not in the table, add it now.
4943  
4944      var ret = getEmptyTableSlot();
4945  
4946      // Set the new value.
4947      try {
4948        // Attempting to call this with JS function will cause of table.set() to fail
4949        setWasmTableEntry(ret, func);
4950      } catch (err) {
4951        if (!(err instanceof TypeError)) {
4952          throw err;
4953        }
4954        var wrapped = convertJsFunctionToWasm(func, sig);
4955        setWasmTableEntry(ret, wrapped);
4956      }
4957  
4958      functionsInTableMap.set(func, ret);
4959  
4960      return ret;
4961    };
4962
4963  var handleException = (e) => {
4964      // Certain exception types we do not treat as errors since they are used for
4965      // internal control flow.
4966      // 1. ExitStatus, which is thrown by exit()
4967      // 2. "unwind", which is thrown by emscripten_unwind_to_js_event_loop() and others
4968      //    that wish to return to JS event loop.
4969      if (e instanceof ExitStatus || e == 'unwind') {
4970        return EXITSTATUS;
4971      }
4972      quit_(1, e);
4973    };
4974  
4975  
4976  
4977  var maybeExit = () => {
4978      if (runtimeExited) {
4979        return;
4980      }
4981      if (!keepRuntimeAlive()) {
4982        try {
4983          _exit(EXITSTATUS);
4984        } catch (e) {
4985          handleException(e);
4986        }
4987      }
4988    };
4989  var callUserCallback = (func) => {
4990      if (runtimeExited || ABORT) {
4991        return;
4992      }
4993      try {
4994        func();
4995        maybeExit();
4996      } catch (e) {
4997        handleException(e);
4998      }
4999    };
5000  
5001  var runtimeKeepalivePush = () => {
5002      runtimeKeepaliveCounter += 1;
5003    };
5004  
5005  var runtimeKeepalivePop = () => {
5006      runtimeKeepaliveCounter -= 1;
5007    };
5008  /** @param {number=} timeout */
5009  var safeSetTimeout = (func, timeout) => {
5010      runtimeKeepalivePush();
5011      return setTimeout(() => {
5012        runtimeKeepalivePop();
5013        callUserCallback(func);
5014      }, timeout);
5015    };
5016
5017
5018
5019
5020
5021
5022  var FS_unlink = (path) => FS.unlink(path);
5023
5024  FS.createPreloadedFile = FS_createPreloadedFile;
5025  FS.staticInit();Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_unlink"] = FS.unlink;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createDevice"] = FS.createDevice;;
5026DOTNET.setup({ wasmEnableSIMD: true,wasmEnableEH: true,enableAotProfiler: false, enableDevToolsProfiler: false, enableLogProfiler: false, enableEventPipe: false, runAOTCompilation: false, wasmEnableThreads: false, gitHash: "a612c2a1056fe3265387ae3ff7c94eba1505caf9", });;
5027var wasmImports = {
5028  /** @export */
5029  __assert_fail: ___assert_fail,
5030  /** @export */
5031  __syscall_faccessat: ___syscall_faccessat,
5032  /** @export */
5033  __syscall_fadvise64: ___syscall_fadvise64,
5034  /** @export */
5035  __syscall_fcntl64: ___syscall_fcntl64,
5036  /** @export */
5037  __syscall_fstat64: ___syscall_fstat64,
5038  /** @export */
5039  __syscall_fstatfs64: ___syscall_fstatfs64,
5040  /** @export */
5041  __syscall_ftruncate64: ___syscall_ftruncate64,
5042  /** @export */
5043  __syscall_getcwd: ___syscall_getcwd,
5044  /** @export */
5045  __syscall_ioctl: ___syscall_ioctl,
5046  /** @export */
5047  __syscall_lstat64: ___syscall_lstat64,
5048  /** @export */
5049  __syscall_newfstatat: ___syscall_newfstatat,
5050  /** @export */
5051  __syscall_openat: ___syscall_openat,
5052  /** @export */
5053  __syscall_readlinkat: ___syscall_readlinkat,
5054  /** @export */
5055  __syscall_stat64: ___syscall_stat64,
5056  /** @export */
5057  __syscall_unlinkat: ___syscall_unlinkat,
5058  /** @export */
5059  _emscripten_get_now_is_monotonic: __emscripten_get_now_is_monotonic,
5060  /** @export */
5061  _localtime_js: __localtime_js,
5062  /** @export */
5063  _mmap_js: __mmap_js,
5064  /** @export */
5065  _munmap_js: __munmap_js,
5066  /** @export */
5067  _tzset_js: __tzset_js,
5068  /** @export */
5069  abort: _abort,
5070  /** @export */
5071  emscripten_date_now: _emscripten_date_now,
5072  /** @export */
5073  emscripten_force_exit: _emscripten_force_exit,
5074  /** @export */
5075  emscripten_get_heap_max: _emscripten_get_heap_max,
5076  /** @export */
5077  emscripten_get_now: _emscripten_get_now,
5078  /** @export */
5079  emscripten_get_now_res: _emscripten_get_now_res,
5080  /** @export */
5081  emscripten_resize_heap: _emscripten_resize_heap,
5082  /** @export */
5083  environ_get: _environ_get,
5084  /** @export */
5085  environ_sizes_get: _environ_sizes_get,
5086  /** @export */
5087  exit: _exit,
5088  /** @export */
5089  fd_close: _fd_close,
5090  /** @export */
5091  fd_pread: _fd_pread,
5092  /** @export */
5093  fd_read: _fd_read,
5094  /** @export */
5095  fd_seek: _fd_seek,
5096  /** @export */
5097  fd_write: _fd_write,
5098  /** @export */
5099  mono_interp_flush_jitcall_queue: _mono_interp_flush_jitcall_queue,
5100  /** @export */
5101  mono_interp_invoke_wasm_jit_call_trampoline: _mono_interp_invoke_wasm_jit_call_trampoline,
5102  /** @export */
5103  mono_interp_jit_wasm_entry_trampoline: _mono_interp_jit_wasm_entry_trampoline,
5104  /** @export */
5105  mono_interp_jit_wasm_jit_call_trampoline: _mono_interp_jit_wasm_jit_call_trampoline,
5106  /** @export */
5107  mono_interp_record_interp_entry: _mono_interp_record_interp_entry,
5108  /** @export */
5109  mono_interp_tier_prepare_jiterpreter: _mono_interp_tier_prepare_jiterpreter,
5110  /** @export */
5111  mono_wasm_bind_js_import_ST: _mono_wasm_bind_js_import_ST,
5112  /** @export */
5113  mono_wasm_browser_entropy: _mono_wasm_browser_entropy,
5114  /** @export */
5115  mono_wasm_cancel_promise: _mono_wasm_cancel_promise,
5116  /** @export */
5117  mono_wasm_console_clear: _mono_wasm_console_clear,
5118  /** @export */
5119  mono_wasm_free_method_data: _mono_wasm_free_method_data,
5120  /** @export */
5121  mono_wasm_get_locale_info: _mono_wasm_get_locale_info,
5122  /** @export */
5123  mono_wasm_invoke_js_function: _mono_wasm_invoke_js_function,
5124  /** @export */
5125  mono_wasm_invoke_jsimport_ST: _mono_wasm_invoke_jsimport_ST,
5126  /** @export */
5127  mono_wasm_process_current_pid: _mono_wasm_process_current_pid,
5128  /** @export */
5129  mono_wasm_release_cs_owned_object: _mono_wasm_release_cs_owned_object,
5130  /** @export */
5131  mono_wasm_resolve_or_reject_promise: _mono_wasm_resolve_or_reject_promise,
5132  /** @export */
5133  mono_wasm_schedule_timer: _mono_wasm_schedule_timer,
5134  /** @export */
5135  mono_wasm_set_entrypoint_breakpoint: _mono_wasm_set_entrypoint_breakpoint,
5136  /** @export */
5137  mono_wasm_trace_logger: _mono_wasm_trace_logger,
5138  /** @export */
5139  schedule_background_exec: _schedule_background_exec,
5140  /** @export */
5141  strftime: _strftime
5142};
5143var wasmExports = createWasm();
5144var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports['__wasm_call_ctors'])();
5145var _mono_wasm_register_root = Module['_mono_wasm_register_root'] = (a0, a1, a2) => (_mono_wasm_register_root = Module['_mono_wasm_register_root'] = wasmExports['mono_wasm_register_root'])(a0, a1, a2);
5146var _mono_wasm_deregister_root = Module['_mono_wasm_deregister_root'] = (a0) => (_mono_wasm_deregister_root = Module['_mono_wasm_deregister_root'] = wasmExports['mono_wasm_deregister_root'])(a0);
5147var _mono_wasm_add_assembly = Module['_mono_wasm_add_assembly'] = (a0, a1, a2) => (_mono_wasm_add_assembly = Module['_mono_wasm_add_assembly'] = wasmExports['mono_wasm_add_assembly'])(a0, a1, a2);
5148var _mono_wasm_add_satellite_assembly = Module['_mono_wasm_add_satellite_assembly'] = (a0, a1, a2, a3) => (_mono_wasm_add_satellite_assembly = Module['_mono_wasm_add_satellite_assembly'] = wasmExports['mono_wasm_add_satellite_assembly'])(a0, a1, a2, a3);
5149var _malloc = Module['_malloc'] = (a0) => (_malloc = Module['_malloc'] = wasmExports['malloc'])(a0);
5150var _mono_wasm_setenv = Module['_mono_wasm_setenv'] = (a0, a1) => (_mono_wasm_setenv = Module['_mono_wasm_setenv'] = wasmExports['mono_wasm_setenv'])(a0, a1);
5151var _mono_wasm_getenv = Module['_mono_wasm_getenv'] = (a0) => (_mono_wasm_getenv = Module['_mono_wasm_getenv'] = wasmExports['mono_wasm_getenv'])(a0);
5152var _free = Module['_free'] = (a0) => (_free = Module['_free'] = wasmExports['free'])(a0);
5153var _mono_wasm_load_runtime = Module['_mono_wasm_load_runtime'] = (a0, a1, a2, a3) => (_mono_wasm_load_runtime = Module['_mono_wasm_load_runtime'] = wasmExports['mono_wasm_load_runtime'])(a0, a1, a2, a3);
5154var _mono_wasm_invoke_jsexport = Module['_mono_wasm_invoke_jsexport'] = (a0, a1) => (_mono_wasm_invoke_jsexport = Module['_mono_wasm_invoke_jsexport'] = wasmExports['mono_wasm_invoke_jsexport'])(a0, a1);
5155var _mono_wasm_string_from_utf16_ref = Module['_mono_wasm_string_from_utf16_ref'] = (a0, a1, a2) => (_mono_wasm_string_from_utf16_ref = Module['_mono_wasm_string_from_utf16_ref'] = wasmExports['mono_wasm_string_from_utf16_ref'])(a0, a1, a2);
5156var _mono_wasm_exec_regression = Module['_mono_wasm_exec_regression'] 
vendor: 9,245 bytes, lines 5156-5209
5156= (a0, a1) => (_mono_wasm_exec_regression = Module['_mono_wasm_exec_regression'] = wasmExports['mono_wasm_exec_regression'])(a0, a1);
5157var _mono_wasm_exit = Module['_mono_wasm_exit'] = (a0) => (_mono_wasm_exit = Module['_mono_wasm_exit'] = wasmExports['mono_wasm_exit'])(a0);
5158var _fflush = (a0) => (_fflush = wasmExports['fflush'])(a0);
5159var _mono_wasm_set_main_args = Module['_mono_wasm_set_main_args'] = (a0, a1) => (_mono_wasm_set_main_args = Module['_mono_wasm_set_main_args'] = wasmExports['mono_wasm_set_main_args'])(a0, a1);
5160var _mono_wasm_strdup = Module['_mono_wasm_strdup'] = (a0) => (_mono_wasm_strdup = Module['_mono_wasm_strdup'] = wasmExports['mono_wasm_strdup'])(a0);
5161var _mono_wasm_parse_runtime_options = Module['_mono_wasm_parse_runtime_options'] = (a0, a1) => (_mono_wasm_parse_runtime_options = Module['_mono_wasm_parse_runtime_options'] = wasmExports['mono_wasm_parse_runtime_options'])(a0, a1);
5162var _mono_wasm_intern_string_ref = Module['_mono_wasm_intern_string_ref'] = (a0) => (_mono_wasm_intern_string_ref = Module['_mono_wasm_intern_string_ref'] = wasmExports['mono_wasm_intern_string_ref'])(a0);
5163var _mono_wasm_string_get_data_ref = Module['_mono_wasm_string_get_data_ref'] = (a0, a1, a2, a3) => (_mono_wasm_string_get_data_ref = Module['_mono_wasm_string_get_data_ref'] = wasmExports['mono_wasm_string_get_data_ref'])(a0, a1, a2, a3);
5164var _mono_wasm_write_managed_pointer_unsafe = Module['_mono_wasm_write_managed_pointer_unsafe'] = (a0, a1) => (_mono_wasm_write_managed_pointer_unsafe = Module['_mono_wasm_write_managed_pointer_unsafe'] = wasmExports['mono_wasm_write_managed_pointer_unsafe'])(a0, a1);
5165var _mono_wasm_copy_managed_pointer = Module['_mono_wasm_copy_managed_pointer'] = (a0, a1) => (_mono_wasm_copy_managed_pointer = Module['_mono_wasm_copy_managed_pointer'] = wasmExports['mono_wasm_copy_managed_pointer'])(a0, a1);
5166var _mono_wasm_init_finalizer_thread = Module['_mono_wasm_init_finalizer_thread'] = () => (_mono_wasm_init_finalizer_thread = Module['_mono_wasm_init_finalizer_thread'] = wasmExports['mono_wasm_init_finalizer_thread'])();
5167var _mono_wasm_i52_to_f64 = Module['_mono_wasm_i52_to_f64'] = (a0, a1) => (_mono_wasm_i52_to_f64 = Module['_mono_wasm_i52_to_f64'] = wasmExports['mono_wasm_i52_to_f64'])(a0, a1);
5168var _mono_wasm_u52_to_f64 = Module['_mono_wasm_u52_to_f64'] = (a0, a1) => (_mono_wasm_u52_to_f64 = Module['_mono_wasm_u52_to_f64'] = wasmExports['mono_wasm_u52_to_f64'])(a0, a1);
5169var _mono_wasm_f64_to_u52 = Module['_mono_wasm_f64_to_u52'] = (a0, a1) => (_mono_wasm_f64_to_u52 = Module['_mono_wasm_f64_to_u52'] = wasmExports['mono_wasm_f64_to_u52'])(a0, a1);
5170var _mono_wasm_f64_to_i52 = Module['_mono_wasm_f64_to_i52'] = (a0, a1) => (_mono_wasm_f64_to_i52 = Module['_mono_wasm_f64_to_i52'] = wasmExports['mono_wasm_f64_to_i52'])(a0, a1);
5171var _mono_wasm_method_get_full_name = Module['_mono_wasm_method_get_full_name'] = (a0) => (_mono_wasm_method_get_full_name = Module['_mono_wasm_method_get_full_name'] = wasmExports['mono_wasm_method_get_full_name'])(a0);
5172var _mono_wasm_method_get_name = Module['_mono_wasm_method_get_name'] = (a0) => (_mono_wasm_method_get_name = Module['_mono_wasm_method_get_name'] = wasmExports['mono_wasm_method_get_name'])(a0);
5173var _mono_wasm_method_get_name_ex = Module['_mono_wasm_method_get_name_ex'] = (a0) => (_mono_wasm_method_get_name_ex = Module['_mono_wasm_method_get_name_ex'] = wasmExports['mono_wasm_method_get_name_ex'])(a0);
5174var _mono_wasm_get_f32_unaligned = Module['_mono_wasm_get_f32_unaligned'] = (a0) => (_mono_wasm_get_f32_unaligned = Module['_mono_wasm_get_f32_unaligned'] = wasmExports['mono_wasm_get_f32_unaligned'])(a0);
5175var _mono_wasm_get_f64_unaligned = Module['_mono_wasm_get_f64_unaligned'] = (a0) => (_mono_wasm_get_f64_unaligned = Module['_mono_wasm_get_f64_unaligned'] = wasmExports['mono_wasm_get_f64_unaligned'])(a0);
5176var _mono_wasm_get_i32_unaligned = Module['_mono_wasm_get_i32_unaligned'] = (a0) => (_mono_wasm_get_i32_unaligned = Module['_mono_wasm_get_i32_unaligned'] = wasmExports['mono_wasm_get_i32_unaligned'])(a0);
5177var _mono_wasm_is_zero_page_reserved = Module['_mono_wasm_is_zero_page_reserved'] = () => (_mono_wasm_is_zero_page_reserved = Module['_mono_wasm_is_zero_page_reserved'] = wasmExports['mono_wasm_is_zero_page_reserved'])();
5178var _mono_wasm_read_as_bool_or_null_unsafe = Module['_mono_wasm_read_as_bool_or_null_unsafe'] = (a0) => (_mono_wasm_read_as_bool_or_null_unsafe = Module['_mono_wasm_read_as_bool_or_null_unsafe'] = wasmExports['mono_wasm_read_as_bool_or_null_unsafe'])(a0);
5179var _mono_wasm_assembly_load = Module['_mono_wasm_assembly_load'] = (a0) => (_mono_wasm_assembly_load = Module['_mono_wasm_assembly_load'] = wasmExports['mono_wasm_assembly_load'])(a0);
5180var _mono_wasm_assembly_find_class = Module['_mono_wasm_assembly_find_class'] = (a0, a1, a2) => (_mono_wasm_assembly_find_class = Module['_mono_wasm_assembly_find_class'] = wasmExports['mono_wasm_assembly_find_class'])(a0, a1, a2);
5181var _mono_wasm_assembly_find_method = Module['_mono_wasm_assembly_find_method'] = (a0, a1, a2) => (_mono_wasm_assembly_find_method = Module['_mono_wasm_assembly_find_method'] = wasmExports['mono_wasm_assembly_find_method'])(a0, a1, a2);
5182var _mono_wasm_send_dbg_command_with_parms = Module['_mono_wasm_send_dbg_command_with_parms'] = (a0, a1, a2, a3, a4, a5, a6) => (_mono_wasm_send_dbg_command_with_parms = Module['_mono_wasm_send_dbg_command_with_parms'] = wasmExports['mono_wasm_send_dbg_command_with_parms'])(a0, a1, a2, a3, a4, a5, a6);
5183var _mono_wasm_send_dbg_command = Module['_mono_wasm_send_dbg_command'] = (a0, a1, a2, a3, a4) => (_mono_wasm_send_dbg_command = Module['_mono_wasm_send_dbg_command'] = wasmExports['mono_wasm_send_dbg_command'])(a0, a1, a2, a3, a4);
5184var _mono_jiterp_register_jit_call_thunk = Module['_mono_jiterp_register_jit_call_thunk'] = (a0, a1) => (_mono_jiterp_register_jit_call_thunk = Module['_mono_jiterp_register_jit_call_thunk'] = wasmExports['mono_jiterp_register_jit_call_thunk'])(a0, a1);
5185var _mono_jiterp_stackval_to_data = Module['_mono_jiterp_stackval_to_data'] = (a0, a1, a2) => (_mono_jiterp_stackval_to_data = Module['_mono_jiterp_stackval_to_data'] = wasmExports['mono_jiterp_stackval_to_data'])(a0, a1, a2);
5186var _mono_jiterp_stackval_from_data = Module['_mono_jiterp_stackval_from_data'] = (a0, a1, a2) => (_mono_jiterp_stackval_from_data = Module['_mono_jiterp_stackval_from_data'] = wasmExports['mono_jiterp_stackval_from_data'])(a0, a1, a2);
5187var _mono_jiterp_get_arg_offset = Module['_mono_jiterp_get_arg_offset'] = (a0, a1, a2) => (_mono_jiterp_get_arg_offset = Module['_mono_jiterp_get_arg_offset'] = wasmExports['mono_jiterp_get_arg_offset'])(a0, a1, a2);
5188var _mono_jiterp_overflow_check_i4 = Module['_mono_jiterp_overflow_check_i4'] = (a0, a1, a2) => (_mono_jiterp_overflow_check_i4 = Module['_mono_jiterp_overflow_check_i4'] = wasmExports['mono_jiterp_overflow_check_i4'])(a0, a1, a2);
5189var _mono_jiterp_overflow_check_u4 = Module['_mono_jiterp_overflow_check_u4'] = (a0, a1, a2) => (_mono_jiterp_overflow_check_u4 = Module['_mono_jiterp_overflow_check_u4'] = wasmExports['mono_jiterp_overflow_check_u4'])(a0, a1, a2);
5190var _mono_jiterp_ld_delegate_method_ptr = Module['_mono_jiterp_ld_delegate_method_ptr'] = (a0, a1) => (_mono_jiterp_ld_delegate_method_ptr = Module['_mono_jiterp_ld_delegate_method_ptr'] = wasmExports['mono_jiterp_ld_delegate_method_ptr'])(a0, a1);
5191var _mono_jiterp_interp_entry = Module['_mono_jiterp_interp_entry'] = (a0, a1) => (_mono_jiterp_interp_entry = Module['_mono_jiterp_interp_entry'] = wasmExports['mono_jiterp_interp_entry'])(a0, a1);
5192var _memset = Module['_memset'] = (a0, a1, a2) => (_memset = Module['_memset'] = wasmExports['memset'])(a0, a1, a2);
5193var _fmodf = Module['_fmodf'] = (a0, a1) => (_fmodf = Module['_fmodf'] = wasmExports['fmodf'])(a0, a1);
5194var _fmod = Module['_fmod'] = (a0, a1) => (_fmod = Module['_fmod'] = wasmExports['fmod'])(a0, a1);
5195var _asin = Module['_asin'] = (a0) => (_asin = Module['_asin'] = wasmExports['asin'])(a0);
5196var _asinh = Module['_asinh'] = (a0) => (_asinh = Module['_asinh'] = wasmExports['asinh'])(a0);
5197var _acos = Module['_acos'] = (a0) => (_acos = Module['_acos'] = wasmExports['acos'])(a0);
5198var _acosh = Module['_acosh'] = (a0) => (_acosh = Module['_acosh'] = wasmExports['acosh'])(a0);
5199var _atan = Module['_atan'] = (a0) => (_atan = Module['_atan'] = wasmExports['atan'])(a0);
5200var _atanh = Module['_atanh'] = (a0) => (_atanh = Module['_atanh'] = wasmExports['atanh'])(a0);
5201var _cos = Module['_cos'] = (a0) => (_cos = Module['_cos'] = wasmExports['cos'])(a0);
5202var _cbrt = Module['_cbrt'] = (a0) => (_cbrt = Module['_cbrt'] = wasmExports['cbrt'])(a0);
5203var _cosh = Module['_cosh'] = (a0) => (_cosh = Module['_cosh'] = wasmExports['cosh'])(a0);
5204var _exp = Module['_exp'] = (a0) => (_exp = Module['_exp'] = wasmExports['exp'])(a0);
5205var _log = Module['_log'] = (a0) => (_log = Module['_log'] = wasmExports['log'])(a0);
5206var _log2 = Module['_log2'] = (a0) => (_log2 = Module['_log2'] = wasmExports['log2'])(a0);
5207var _log10 = Module['_log10'] = (a0) => (_log10 = Module['_log10'] = wasmExports['log10'])(a0);
5208var _sin = Module['_sin'] = (a0) => (_sin = Module['_sin'] = wasmExports['sin'])(a0);
5209var _sinh = Module['_sinh'] = (a0) => (_sinh = Module['_sinh'] = wasmExports['sinh'])(a0);
vendor: 4,430 bytes, lines 5210-5244
5210var _tan = Module['_tan'] = (a0) => (_tan = Module['_tan'] = wasmExports['tan'])(a0);
5211var _tanh = Module['_tanh'] = (a0) => (_tanh = Module['_tanh'] = wasmExports['tanh'])(a0);
5212var _atan2 = Module['_atan2'] = (a0, a1) => (_atan2 = Module['_atan2'] = wasmExports['atan2'])(a0, a1);
5213var _pow = Module['_pow'] = (a0, a1) => (_pow = Module['_pow'] = wasmExports['pow'])(a0, a1);
5214var _fma = Module['_fma'] = (a0, a1, a2) => (_fma = Module['_fma'] = wasmExports['fma'])(a0, a1, a2);
5215var _asinf = Module['_asinf'] = (a0) => (_asinf = Module['_asinf'] = wasmExports['asinf'])(a0);
5216var _asinhf = Module['_asinhf'] = (a0) => (_asinhf = Module['_asinhf'] = wasmExports['asinhf'])(a0);
5217var _acosf = Module['_acosf'] = (a0) => (_acosf = Module['_acosf'] = wasmExports['acosf'])(a0);
5218var _acoshf = Module['_acoshf'] = (a0) => (_acoshf = Module['_acoshf'] = wasmExports['acoshf'])(a0);
5219var _atanf = Module['_atanf'] = (a0) => (_atanf = Module['_atanf'] = wasmExports['atanf'])(a0);
5220var _atanhf = Module['_atanhf'] = (a0) => (_atanhf = Module['_atanhf'] = wasmExports['atanhf'])(a0);
5221var _cosf = Module['_cosf'] = (a0) => (_cosf = Module['_cosf'] = wasmExports['cosf'])(a0);
5222var _cbrtf = Module['_cbrtf'] = (a0) => (_cbrtf = Module['_cbrtf'] = wasmExports['cbrtf'])(a0);
5223var _coshf = Module['_coshf'] = (a0) => (_coshf = Module['_coshf'] = wasmExports['coshf'])(a0);
5224var _expf = Module['_expf'] = (a0) => (_expf = Module['_expf'] = wasmExports['expf'])(a0);
5225var _logf = Module['_logf'] = (a0) => (_logf = Module['_logf'] = wasmExports['logf'])(a0);
5226var _log2f = Module['_log2f'] = (a0) => (_log2f = Module['_log2f'] = wasmExports['log2f'])(a0);
5227var _log10f = Module['_log10f'] = (a0) => (_log10f = Module['_log10f'] = wasmExports['log10f'])(a0);
5228var _sinf = Module['_sinf'] = (a0) => (_sinf = Module['_sinf'] = wasmExports['sinf'])(a0);
5229var _sinhf = Module['_sinhf'] = (a0) => (_sinhf = Module['_sinhf'] = wasmExports['sinhf'])(a0);
5230var _tanf = Module['_tanf'] = (a0) => (_tanf = Module['_tanf'] = wasmExports['tanf'])(a0);
5231var _tanhf = Module['_tanhf'] = (a0) => (_tanhf = Module['_tanhf'] = wasmExports['tanhf'])(a0);
5232var _atan2f = Module['_atan2f'] = (a0, a1) => (_atan2f = Module['_atan2f'] = wasmExports['atan2f'])(a0, a1);
5233var _powf = Module['_powf'] = (a0, a1) => (_powf = Module['_powf'] = wasmExports['powf'])(a0, a1);
5234var _fmaf = Module['_fmaf'] = (a0, a1, a2) => (_fmaf = Module['_fmaf'] = wasmExports['fmaf'])(a0, a1, a2);
5235var _mono_jiterp_get_polling_required_address = Module['_mono_jiterp_get_polling_required_address'] = () => (_mono_jiterp_get_polling_required_address = Module['_mono_jiterp_get_polling_required_address'] = wasmExports['mono_jiterp_get_polling_required_address'])();
5236var _mono_jiterp_prof_enter = Module['_mono_jiterp_prof_enter'] = (a0, a1) => (_mono_jiterp_prof_enter = Module['_mono_jiterp_prof_enter'] = wasmExports['mono_jiterp_prof_enter'])(a0, a1);
5237var _mono_jiterp_prof_samplepoint = Module['_mono_jiterp_prof_samplepoint'] = (a0, a1) => (_mono_jiterp_prof_samplepoint = Module['_mono_jiterp_prof_samplepoint'] = wasmExports['mono_jiterp_prof_samplepoint'])(a0, a1);
5238var _mono_jiterp_prof_leave = Module['_mono_jiterp_prof_leave'] = (a0, a1) => (_mono_jiterp_prof_leave = Module['_mono_jiterp_prof_leave'] = wasmExports['mono_jiterp_prof_leave'])(a0, a1);
5239var _mono_jiterp_do_safepoint = Module['_mono_jiterp_do_safepoint'] = (a0, a1) => (_mono_jiterp_do_safepoint = Module['_mono_jiterp_do_safepoint'] = wasmExports['mono_jiterp_do_safepoint'])(a0, a1);
5240var _mono_jiterp_imethod_to_ftnptr = Module['_mono_jiterp_imethod_to_ftnptr'] = (a0) => (_mono_jiterp_imethod_to_ftnptr = Module['_mono_jiterp_imethod_to_ftnptr'] = wasmExports['mono_jiterp_imethod_to_ftnptr'])(a0);
5241var _mono_jiterp_enum_hasflag = Module['_mono_jiterp_enum_hasflag'] = (a0, a1, a2, a3) => (_mono_jiterp_enum_hasflag = Module['_mono_jiterp_enum_hasflag'] = wasmExports['mono_jiterp_enum_hasflag'])(a0, a1, a2, a3);
5242var _mono_jiterp_get_simd_intrinsic = Module['_mono_jiterp_get_simd_intrinsic'] = (a0, a1) => (_mono_jiterp_get_simd_intrinsic = Module['_mono_jiterp_get_simd_intrinsic'] = wasmExports['mono_jiterp_get_simd_intrinsic'])(a0, a1);
5243var _mono_jiterp_get_simd_opcode = Module['_mono_jiterp_get_simd_opcode'] = (a0, a1) => (_mono_jiterp_get_simd_opcode = Module['_mono_jiterp_get_simd_opcode'] = wasmExports['mono_jiterp_get_simd_opcode'])(a0, a1);
5244var _mono_jiterp_get_opcode_info = Module['_mono_jiterp_get_opcode_info'] 
vendor: 16,384 bytes, lines 5244-5322
5244= (a0, a1) => (_mono_jiterp_get_opcode_info = Module['_mono_jiterp_get_opcode_info'] = wasmExports['mono_jiterp_get_opcode_info'])(a0, a1);
5245var _mono_jiterp_placeholder_trace = Module['_mono_jiterp_placeholder_trace'] = (a0, a1, a2, a3) => (_mono_jiterp_placeholder_trace = Module['_mono_jiterp_placeholder_trace'] = wasmExports['mono_jiterp_placeholder_trace'])(a0, a1, a2, a3);
5246var _mono_jiterp_placeholder_jit_call = Module['_mono_jiterp_placeholder_jit_call'] = (a0, a1, a2, a3) => (_mono_jiterp_placeholder_jit_call = Module['_mono_jiterp_placeholder_jit_call'] = wasmExports['mono_jiterp_placeholder_jit_call'])(a0, a1, a2, a3);
5247var _mono_jiterp_get_interp_entry_func = Module['_mono_jiterp_get_interp_entry_func'] = (a0) => (_mono_jiterp_get_interp_entry_func = Module['_mono_jiterp_get_interp_entry_func'] = wasmExports['mono_jiterp_get_interp_entry_func'])(a0);
5248var _mono_jiterp_is_enabled = Module['_mono_jiterp_is_enabled'] = () => (_mono_jiterp_is_enabled = Module['_mono_jiterp_is_enabled'] = wasmExports['mono_jiterp_is_enabled'])();
5249var _mono_jiterp_encode_leb64_ref = Module['_mono_jiterp_encode_leb64_ref'] = (a0, a1, a2) => (_mono_jiterp_encode_leb64_ref = Module['_mono_jiterp_encode_leb64_ref'] = wasmExports['mono_jiterp_encode_leb64_ref'])(a0, a1, a2);
5250var _mono_jiterp_encode_leb52 = Module['_mono_jiterp_encode_leb52'] = (a0, a1, a2) => (_mono_jiterp_encode_leb52 = Module['_mono_jiterp_encode_leb52'] = wasmExports['mono_jiterp_encode_leb52'])(a0, a1, a2);
5251var _mono_jiterp_encode_leb_signed_boundary = Module['_mono_jiterp_encode_leb_signed_boundary'] = (a0, a1, a2) => (_mono_jiterp_encode_leb_signed_boundary = Module['_mono_jiterp_encode_leb_signed_boundary'] = wasmExports['mono_jiterp_encode_leb_signed_boundary'])(a0, a1, a2);
5252var _mono_jiterp_increase_entry_count = Module['_mono_jiterp_increase_entry_count'] = (a0) => (_mono_jiterp_increase_entry_count = Module['_mono_jiterp_increase_entry_count'] = wasmExports['mono_jiterp_increase_entry_count'])(a0);
5253var _mono_jiterp_object_unbox = Module['_mono_jiterp_object_unbox'] = (a0) => (_mono_jiterp_object_unbox = Module['_mono_jiterp_object_unbox'] = wasmExports['mono_jiterp_object_unbox'])(a0);
5254var _mono_jiterp_type_is_byref = Module['_mono_jiterp_type_is_byref'] = (a0) => (_mono_jiterp_type_is_byref = Module['_mono_jiterp_type_is_byref'] = wasmExports['mono_jiterp_type_is_byref'])(a0);
5255var _mono_jiterp_value_copy = Module['_mono_jiterp_value_copy'] = (a0, a1, a2) => (_mono_jiterp_value_copy = Module['_mono_jiterp_value_copy'] = wasmExports['mono_jiterp_value_copy'])(a0, a1, a2);
5256var _mono_jiterp_try_newobj_inlined = Module['_mono_jiterp_try_newobj_inlined'] = (a0, a1) => (_mono_jiterp_try_newobj_inlined = Module['_mono_jiterp_try_newobj_inlined'] = wasmExports['mono_jiterp_try_newobj_inlined'])(a0, a1);
5257var _mono_jiterp_try_newstr = Module['_mono_jiterp_try_newstr'] = (a0, a1) => (_mono_jiterp_try_newstr = Module['_mono_jiterp_try_newstr'] = wasmExports['mono_jiterp_try_newstr'])(a0, a1);
5258var _mono_jiterp_try_newarr = Module['_mono_jiterp_try_newarr'] = (a0, a1, a2) => (_mono_jiterp_try_newarr = Module['_mono_jiterp_try_newarr'] = wasmExports['mono_jiterp_try_newarr'])(a0, a1, a2);
5259var _mono_jiterp_gettype_ref = Module['_mono_jiterp_gettype_ref'] = (a0, a1) => (_mono_jiterp_gettype_ref = Module['_mono_jiterp_gettype_ref'] = wasmExports['mono_jiterp_gettype_ref'])(a0, a1);
5260var _mono_jiterp_has_parent_fast = Module['_mono_jiterp_has_parent_fast'] = (a0, a1) => (_mono_jiterp_has_parent_fast = Module['_mono_jiterp_has_parent_fast'] = wasmExports['mono_jiterp_has_parent_fast'])(a0, a1);
5261var _mono_jiterp_implements_interface = Module['_mono_jiterp_implements_interface'] = (a0, a1) => (_mono_jiterp_implements_interface = Module['_mono_jiterp_implements_interface'] = wasmExports['mono_jiterp_implements_interface'])(a0, a1);
5262var _mono_jiterp_is_special_interface = Module['_mono_jiterp_is_special_interface'] = (a0) => (_mono_jiterp_is_special_interface = Module['_mono_jiterp_is_special_interface'] = wasmExports['mono_jiterp_is_special_interface'])(a0);
5263var _mono_jiterp_implements_special_interface = Module['_mono_jiterp_implements_special_interface'] = (a0, a1, a2) => (_mono_jiterp_implements_special_interface = Module['_mono_jiterp_implements_special_interface'] = wasmExports['mono_jiterp_implements_special_interface'])(a0, a1, a2);
5264var _mono_jiterp_cast_v2 = Module['_mono_jiterp_cast_v2'] = (a0, a1, a2, a3) => (_mono_jiterp_cast_v2 = Module['_mono_jiterp_cast_v2'] = wasmExports['mono_jiterp_cast_v2'])(a0, a1, a2, a3);
5265var _mono_jiterp_localloc = Module['_mono_jiterp_localloc'] = (a0, a1, a2) => (_mono_jiterp_localloc = Module['_mono_jiterp_localloc'] = wasmExports['mono_jiterp_localloc'])(a0, a1, a2);
5266var _mono_jiterp_ldtsflda = Module['_mono_jiterp_ldtsflda'] = (a0, a1) => (_mono_jiterp_ldtsflda = Module['_mono_jiterp_ldtsflda'] = wasmExports['mono_jiterp_ldtsflda'])(a0, a1);
5267var _mono_jiterp_box_ref = Module['_mono_jiterp_box_ref'] = (a0, a1, a2, a3) => (_mono_jiterp_box_ref = Module['_mono_jiterp_box_ref'] = wasmExports['mono_jiterp_box_ref'])(a0, a1, a2, a3);
5268var _mono_jiterp_conv = Module['_mono_jiterp_conv'] = (a0, a1, a2) => (_mono_jiterp_conv = Module['_mono_jiterp_conv'] = wasmExports['mono_jiterp_conv'])(a0, a1, a2);
5269var _mono_jiterp_relop_fp = Module['_mono_jiterp_relop_fp'] = (a0, a1, a2) => (_mono_jiterp_relop_fp = Module['_mono_jiterp_relop_fp'] = wasmExports['mono_jiterp_relop_fp'])(a0, a1, a2);
5270var _mono_jiterp_get_size_of_stackval = Module['_mono_jiterp_get_size_of_stackval'] = () => (_mono_jiterp_get_size_of_stackval = Module['_mono_jiterp_get_size_of_stackval'] = wasmExports['mono_jiterp_get_size_of_stackval'])();
5271var _mono_jiterp_type_get_raw_value_size = Module['_mono_jiterp_type_get_raw_value_size'] = (a0) => (_mono_jiterp_type_get_raw_value_size = Module['_mono_jiterp_type_get_raw_value_size'] = wasmExports['mono_jiterp_type_get_raw_value_size'])(a0);
5272var _mono_jiterp_trace_bailout = Module['_mono_jiterp_trace_bailout'] = (a0) => (_mono_jiterp_trace_bailout = Module['_mono_jiterp_trace_bailout'] = wasmExports['mono_jiterp_trace_bailout'])(a0);
5273var _mono_jiterp_get_trace_bailout_count = Module['_mono_jiterp_get_trace_bailout_count'] = (a0) => (_mono_jiterp_get_trace_bailout_count = Module['_mono_jiterp_get_trace_bailout_count'] = wasmExports['mono_jiterp_get_trace_bailout_count'])(a0);
5274var _mono_jiterp_adjust_abort_count = Module['_mono_jiterp_adjust_abort_count'] = (a0, a1) => (_mono_jiterp_adjust_abort_count = Module['_mono_jiterp_adjust_abort_count'] = wasmExports['mono_jiterp_adjust_abort_count'])(a0, a1);
5275var _mono_jiterp_interp_entry_prologue = Module['_mono_jiterp_interp_entry_prologue'] = (a0, a1) => (_mono_jiterp_interp_entry_prologue = Module['_mono_jiterp_interp_entry_prologue'] = wasmExports['mono_jiterp_interp_entry_prologue'])(a0, a1);
5276var _mono_jiterp_get_opcode_value_table_entry = Module['_mono_jiterp_get_opcode_value_table_entry'] = (a0) => (_mono_jiterp_get_opcode_value_table_entry = Module['_mono_jiterp_get_opcode_value_table_entry'] = wasmExports['mono_jiterp_get_opcode_value_table_entry'])(a0);
5277var _mono_jiterp_get_trace_hit_count = Module['_mono_jiterp_get_trace_hit_count'] = (a0) => (_mono_jiterp_get_trace_hit_count = Module['_mono_jiterp_get_trace_hit_count'] = wasmExports['mono_jiterp_get_trace_hit_count'])(a0);
5278var _mono_jiterp_parse_option = Module['_mono_jiterp_parse_option'] = (a0) => (_mono_jiterp_parse_option = Module['_mono_jiterp_parse_option'] = wasmExports['mono_jiterp_parse_option'])(a0);
5279var _mono_jiterp_get_options_version = Module['_mono_jiterp_get_options_version'] = () => (_mono_jiterp_get_options_version = Module['_mono_jiterp_get_options_version'] = wasmExports['mono_jiterp_get_options_version'])();
5280var _mono_jiterp_get_options_as_json = Module['_mono_jiterp_get_options_as_json'] = () => (_mono_jiterp_get_options_as_json = Module['_mono_jiterp_get_options_as_json'] = wasmExports['mono_jiterp_get_options_as_json'])();
5281var _mono_jiterp_get_option_as_int = Module['_mono_jiterp_get_option_as_int'] = (a0) => (_mono_jiterp_get_option_as_int = Module['_mono_jiterp_get_option_as_int'] = wasmExports['mono_jiterp_get_option_as_int'])(a0);
5282var _mono_jiterp_object_has_component_size = Module['_mono_jiterp_object_has_component_size'] = (a0) => (_mono_jiterp_object_has_component_size = Module['_mono_jiterp_object_has_component_size'] = wasmExports['mono_jiterp_object_has_component_size'])(a0);
5283var _mono_jiterp_get_hashcode = Module['_mono_jiterp_get_hashcode'] = (a0) => (_mono_jiterp_get_hashcode = Module['_mono_jiterp_get_hashcode'] = wasmExports['mono_jiterp_get_hashcode'])(a0);
5284var _mono_jiterp_try_get_hashcode = Module['_mono_jiterp_try_get_hashcode'] = (a0) => (_mono_jiterp_try_get_hashcode = Module['_mono_jiterp_try_get_hashcode'] = wasmExports['mono_jiterp_try_get_hashcode'])(a0);
5285var _mono_jiterp_get_signature_has_this = Module['_mono_jiterp_get_signature_has_this'] = (a0) => (_mono_jiterp_get_signature_has_this = Module['_mono_jiterp_get_signature_has_this'] = wasmExports['mono_jiterp_get_signature_has_this'])(a0);
5286var _mono_jiterp_get_signature_return_type = Module['_mono_jiterp_get_signature_return_type'] = (a0) => (_mono_jiterp_get_signature_return_type = Module['_mono_jiterp_get_signature_return_type'] = wasmExports['mono_jiterp_get_signature_return_type'])(a0);
5287var _mono_jiterp_get_signature_param_count = Module['_mono_jiterp_get_signature_param_count'] = (a0) => (_mono_jiterp_get_signature_param_count = Module['_mono_jiterp_get_signature_param_count'] = wasmExports['mono_jiterp_get_signature_param_count'])(a0);
5288var _mono_jiterp_get_signature_params = Module['_mono_jiterp_get_signature_params'] = (a0) => (_mono_jiterp_get_signature_params = Module['_mono_jiterp_get_signature_params'] = wasmExports['mono_jiterp_get_signature_params'])(a0);
5289var _mono_jiterp_type_to_ldind = Module['_mono_jiterp_type_to_ldind'] = (a0) => (_mono_jiterp_type_to_ldind = Module['_mono_jiterp_type_to_ldind'] = wasmExports['mono_jiterp_type_to_ldind'])(a0);
5290var _mono_jiterp_type_to_stind = Module['_mono_jiterp_type_to_stind'] = (a0) => (_mono_jiterp_type_to_stind = Module['_mono_jiterp_type_to_stind'] = wasmExports['mono_jiterp_type_to_stind'])(a0);
5291var _mono_jiterp_get_array_rank = Module['_mono_jiterp_get_array_rank'] = (a0, a1) => (_mono_jiterp_get_array_rank = Module['_mono_jiterp_get_array_rank'] = wasmExports['mono_jiterp_get_array_rank'])(a0, a1);
5292var _mono_jiterp_get_array_element_size = Module['_mono_jiterp_get_array_element_size'] = (a0, a1) => (_mono_jiterp_get_array_element_size = Module['_mono_jiterp_get_array_element_size'] = wasmExports['mono_jiterp_get_array_element_size'])(a0, a1);
5293var _mono_jiterp_set_object_field = Module['_mono_jiterp_set_object_field'] = (a0, a1, a2, a3) => (_mono_jiterp_set_object_field = Module['_mono_jiterp_set_object_field'] = wasmExports['mono_jiterp_set_object_field'])(a0, a1, a2, a3);
5294var _mono_jiterp_debug_count = Module['_mono_jiterp_debug_count'] = () => (_mono_jiterp_debug_count = Module['_mono_jiterp_debug_count'] = wasmExports['mono_jiterp_debug_count'])();
5295var _mono_jiterp_stelem_ref = Module['_mono_jiterp_stelem_ref'] = (a0, a1, a2) => (_mono_jiterp_stelem_ref = Module['_mono_jiterp_stelem_ref'] = wasmExports['mono_jiterp_stelem_ref'])(a0, a1, a2);
5296var _mono_jiterp_get_member_offset = Module['_mono_jiterp_get_member_offset'] = (a0) => (_mono_jiterp_get_member_offset = Module['_mono_jiterp_get_member_offset'] = wasmExports['mono_jiterp_get_member_offset'])(a0);
5297var _mono_jiterp_get_counter = Module['_mono_jiterp_get_counter'] = (a0) => (_mono_jiterp_get_counter = Module['_mono_jiterp_get_counter'] = wasmExports['mono_jiterp_get_counter'])(a0);
5298var _mono_jiterp_modify_counter = Module['_mono_jiterp_modify_counter'] = (a0, a1) => (_mono_jiterp_modify_counter = Module['_mono_jiterp_modify_counter'] = wasmExports['mono_jiterp_modify_counter'])(a0, a1);
5299var _mono_jiterp_write_number_unaligned = Module['_mono_jiterp_write_number_unaligned'] = (a0, a1, a2) => (_mono_jiterp_write_number_unaligned = Module['_mono_jiterp_write_number_unaligned'] = wasmExports['mono_jiterp_write_number_unaligned'])(a0, a1, a2);
5300var _mono_jiterp_get_rejected_trace_count = Module['_mono_jiterp_get_rejected_trace_count'] = () => (_mono_jiterp_get_rejected_trace_count = Module['_mono_jiterp_get_rejected_trace_count'] = wasmExports['mono_jiterp_get_rejected_trace_count'])();
5301var _mono_jiterp_boost_back_branch_target = Module['_mono_jiterp_boost_back_branch_target'] = (a0) => (_mono_jiterp_boost_back_branch_target = Module['_mono_jiterp_boost_back_branch_target'] = wasmExports['mono_jiterp_boost_back_branch_target'])(a0);
5302var _mono_jiterp_is_imethod_var_address_taken = Module['_mono_jiterp_is_imethod_var_address_taken'] = (a0, a1) => (_mono_jiterp_is_imethod_var_address_taken = Module['_mono_jiterp_is_imethod_var_address_taken'] = wasmExports['mono_jiterp_is_imethod_var_address_taken'])(a0, a1);
5303var _mono_jiterp_initialize_table = Module['_mono_jiterp_initialize_table'] = (a0, a1, a2) => (_mono_jiterp_initialize_table = Module['_mono_jiterp_initialize_table'] = wasmExports['mono_jiterp_initialize_table'])(a0, a1, a2);
5304var _mono_jiterp_allocate_table_entry = Module['_mono_jiterp_allocate_table_entry'] = (a0) => (_mono_jiterp_allocate_table_entry = Module['_mono_jiterp_allocate_table_entry'] = wasmExports['mono_jiterp_allocate_table_entry'])(a0);
5305var _mono_jiterp_tlqueue_next = Module['_mono_jiterp_tlqueue_next'] = (a0) => (_mono_jiterp_tlqueue_next = Module['_mono_jiterp_tlqueue_next'] = wasmExports['mono_jiterp_tlqueue_next'])(a0);
5306var _mono_jiterp_tlqueue_add = Module['_mono_jiterp_tlqueue_add'] = (a0, a1) => (_mono_jiterp_tlqueue_add = Module['_mono_jiterp_tlqueue_add'] = wasmExports['mono_jiterp_tlqueue_add'])(a0, a1);
5307var _mono_jiterp_tlqueue_clear = Module['_mono_jiterp_tlqueue_clear'] = (a0) => (_mono_jiterp_tlqueue_clear = Module['_mono_jiterp_tlqueue_clear'] = wasmExports['mono_jiterp_tlqueue_clear'])(a0);
5308var _mono_interp_pgo_load_table = Module['_mono_interp_pgo_load_table'] = (a0, a1) => (_mono_interp_pgo_load_table = Module['_mono_interp_pgo_load_table'] = wasmExports['mono_interp_pgo_load_table'])(a0, a1);
5309var _mono_interp_pgo_save_table = Module['_mono_interp_pgo_save_table'] = (a0, a1) => (_mono_interp_pgo_save_table = Module['_mono_interp_pgo_save_table'] = wasmExports['mono_interp_pgo_save_table'])(a0, a1);
5310var _mono_llvm_cpp_catch_exception = Module['_mono_llvm_cpp_catch_exception'] = (a0, a1, a2) => (_mono_llvm_cpp_catch_exception = Module['_mono_llvm_cpp_catch_exception'] = wasmExports['mono_llvm_cpp_catch_exception'])(a0, a1, a2);
5311var _mono_jiterp_begin_catch = Module['_mono_jiterp_begin_catch'] = (a0) => (_mono_jiterp_begin_catch = Module['_mono_jiterp_begin_catch'] = wasmExports['mono_jiterp_begin_catch'])(a0);
5312var _mono_jiterp_end_catch = Module['_mono_jiterp_end_catch'] = () => (_mono_jiterp_end_catch = Module['_mono_jiterp_end_catch'] = wasmExports['mono_jiterp_end_catch'])();
5313var _sbrk = Module['_sbrk'] = (a0) => (_sbrk = Module['_sbrk'] = wasmExports['sbrk'])(a0);
5314var _posix_memalign = Module['_posix_memalign'] = (a0, a1, a2) => (_posix_memalign = Module['_posix_memalign'] = wasmExports['posix_memalign'])(a0, a1, a2);
5315var _mono_background_exec = Module['_mono_background_exec'] = () => (_mono_background_exec = Module['_mono_background_exec'] = wasmExports['mono_background_exec'])();
5316var _mono_wasm_ds_exec = Module['_mono_wasm_ds_exec'] = () => (_mono_wasm_ds_exec = Module['_mono_wasm_ds_exec'] = wasmExports['mono_wasm_ds_exec'])();
5317var _mono_wasm_gc_lock = Module['_mono_wasm_gc_lock'] = () => (_mono_wasm_gc_lock = Module['_mono_wasm_gc_lock'] = wasmExports['mono_wasm_gc_lock'])();
5318var _mono_wasm_gc_unlock = Module['_mono_wasm_gc_unlock'] = () => (_mono_wasm_gc_unlock = Module['_mono_wasm_gc_unlock'] = wasmExports['mono_wasm_gc_unlock'])();
5319var _mono_print_method_from_ip = Module['_mono_print_method_from_ip'] = (a0) => (_mono_print_method_from_ip = Module['_mono_print_method_from_ip'] = wasmExports['mono_print_method_from_ip'])(a0);
5320var _mono_wasm_execute_timer = Module['_mono_wasm_execute_timer'] = () => (_mono_wasm_execute_timer = Module['_mono_wasm_execute_timer'] = wasmExports['mono_wasm_execute_timer'])();
5321var ___funcs_on_exit = () => (___funcs_on_exit = wasmExports['__funcs_on_exit'])();
5322var _htons = Module['_htons'] = (a0) => (_htons = Mod
5322ule['_htons'] = wasmExports['htons'])(a0);
5323var _emscripten_builtin_memalign = (a0, a1) => (_emscripten_builtin_memalign = wasmExports['emscripten_builtin_memalign'])(a0, a1);
5324var _ntohs = Module['_ntohs'] = (a0) => (_ntohs = Module['_ntohs'] = wasmExports['ntohs'])(a0);
5325var _memalign = Module['_memalign'] = (a0, a1) => (_memalign = Module['_memalign'] = wasmExports['memalign'])(a0, a1);
5326var ___trap = () => (___trap = wasmExports['__trap'])();
5327var stackSave = Module['stackSave'] = () => (stackSave = Module['stackSave'] = wasmExports['stackSave'])();
5328var stackRestore = Module['stackRestore'] = (a0) => (stackRestore = Module['stackRestore'] = wasmExports['stackRestore'])(a0);
5329var stackAlloc = Module['stackAlloc'] = (a0) => (stackAlloc = Module['stackAlloc'] = wasmExports['stackAlloc'])(a0);
5330
5331
5332// include: postamble.js
5333// === Auto-generated postamble setup entry stuff ===
5334
5335Module['addRunDependency'] = addRunDependency;
5336Module['removeRunDependency'] = removeRunDependency;
5337Module['FS_createPath'] = FS.createPath;
5338Module['FS_createLazyFile'] = FS.createLazyFile;
5339Module['FS_createDevice'] = FS.createDevice;
5340Module['out'] = out;
5341Module['err'] = err;
5342Module['abort'] = abort;
5343Module['wasmExports'] = wasmExports;
5344Module['runtimeKeepalivePush'] = runtimeKeepalivePush;
5345Module['runtimeKeepalivePop'] = runtimeKeepalivePop;
5346Module['maybeExit'] = maybeExit;
5347Module['ccall'] = ccall;
5348Module['cwrap'] = cwrap;
5349Module['addFunction'] = addFunction;
5350Module['setValue'] = setValue;
5351Module['getValue'] = getValue;
5352Module['UTF8ArrayToString'] = UTF8ArrayToString;
5353Module['UTF8ToString'] = UTF8ToString;
5354Module['stringToUTF8Array'] = stringToUTF8Array;
5355Module['lengthBytesUTF8'] = lengthBytesUTF8;
5356Module['safeSetTimeout'] = safeSetTimeout;
5357Module['FS_createPreloadedFile'] = FS.createPreloadedFile;
5358Module['FS'] = FS;
5359Module['FS_createDataFile'] = FS.createDataFile;
5360Module['FS_unlink'] = FS.unlink;
5361
5362
5363var calledRun;
5364
5365dependenciesFulfilled = function runCaller() {
5366  // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)
5367  if (!calledRun) run();
5368  if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled
5369};
5370
5371function run() {
5372
5373  if (runDependencies > 0) {
5374    return;
5375  }
5376
5377  preRun();
5378
5379  // a preRun added a dependency, run will be called later
5380  if (runDependencies > 0) {
5381    return;
5382  }
5383
5384  function doRun() {
5385    // run may have just been called through dependencies being fulfilled just in this very frame,
5386    // or while the async setStatus time below was happening
5387    if (calledRun) return;
5388    calledRun = true;
5389    Module['calledRun'] = true;
5390
5391    if (ABORT) return;
5392
5393    initRuntime();
5394
5395    readyPromiseResolve(Module);
5396    if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();
5397
5398    postRun();
5399  }
5400
5401  if (Module['setStatus']) {
5402    Module['setStatus']('Running...');
5403    setTimeout(function() {
5404      setTimeout(function() {
5405        Module['setStatus']('');
5406      }, 1);
5407      doRun();
5408    }, 1);
5409  } else
5410  {
5411    doRun();
5412  }
5413}
5414
5415if (Module['preInit']) {
5416  if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
5417  while (Module['preInit'].length > 0) {
5418    Module['preInit'].pop()();
5419  }
5420}
5421
5422run();
5423
5424// end include: postamble.js
5425
5426
5427
5428  return moduleArg.ready
5429}
5430);
5431})();
5432export default createDotnetRuntime;
5433var fetch = fetch || undefined; var require = require || undefined; var __dirname = __dirname || ''; var _nativeModuleLoaded = false;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.