{"version":3,"file":"wasm-engine-debug.cjs","sources":["../src/qsplib/public/qsp-engine-debug.js","../src/lib/qsp-engine-debug.ts"],"sourcesContent":["// This code implements the `-sMODULARIZE` settings by taking the generated\n// JS program code (INNER_JS_CODE) and wrapping it in a factory function.\n\n// When targeting node and ES6 we use `await import ..` in the generated code\n// so the outer function needs to be marked as async.\nasync function createQspModule(moduleArg = {}) {\n  var moduleRtn;\n\n  // include: shell.js\n  // include: minimum_runtime_check.js\n  (function () {\n    // \"30.0.0\" -> 300000\n    function humanReadableVersionToPacked(str) {\n      str = str.split('-')[0]; // Remove any trailing part from e.g. \"12.53.3-alpha\"\n      var vers = str.split('.').slice(0, 3);\n      while (vers.length < 3) vers.push('00');\n      vers = vers.map((n, i, arr) => n.padStart(2, '0'));\n      return vers.join('');\n    }\n    // 300000 -> \"30.0.0\"\n    var packedVersionToHumanReadable = (n) =>\n      [(n / 10000) | 0, ((n / 100) | 0) % 100, n % 100].join('.');\n\n    var TARGET_NOT_SUPPORTED = 2147483647;\n\n    // Note: We use a typeof check here instead of optional chaining using\n    // globalThis because older browsers might not have globalThis defined.\n    var currentNodeVersion =\n      typeof process !== 'undefined' && process.versions?.node\n        ? humanReadableVersionToPacked(process.versions.node)\n        : TARGET_NOT_SUPPORTED;\n    if (currentNodeVersion < 160000) {\n      throw new Error(\n        `This emscripten-generated code requires node v${packedVersionToHumanReadable(160000)} (detected v${packedVersionToHumanReadable(currentNodeVersion)})`,\n      );\n    }\n\n    var userAgent = typeof navigator !== 'undefined' && navigator.userAgent;\n    if (!userAgent) {\n      return;\n    }\n\n    var currentSafariVersion =\n      userAgent.includes('Safari/') &&\n      !userAgent.includes('Chrome/') &&\n      userAgent.match(/Version\\/(\\d+\\.?\\d*\\.?\\d*)/)\n        ? humanReadableVersionToPacked(userAgent.match(/Version\\/(\\d+\\.?\\d*\\.?\\d*)/)[1])\n        : TARGET_NOT_SUPPORTED;\n    if (currentSafariVersion < 150000) {\n      throw new Error(\n        `This emscripten-generated code requires Safari v${packedVersionToHumanReadable(150000)} (detected v${currentSafariVersion})`,\n      );\n    }\n\n    var currentFirefoxVersion = userAgent.match(/Firefox\\/(\\d+(?:\\.\\d+)?)/)\n      ? parseFloat(userAgent.match(/Firefox\\/(\\d+(?:\\.\\d+)?)/)[1])\n      : TARGET_NOT_SUPPORTED;\n    if (currentFirefoxVersion < 79) {\n      throw new Error(\n        `This emscripten-generated code requires Firefox v79 (detected v${currentFirefoxVersion})`,\n      );\n    }\n\n    var currentChromeVersion = userAgent.match(/Chrome\\/(\\d+(?:\\.\\d+)?)/)\n      ? parseFloat(userAgent.match(/Chrome\\/(\\d+(?:\\.\\d+)?)/)[1])\n      : TARGET_NOT_SUPPORTED;\n    if (currentChromeVersion < 85) {\n      throw new Error(\n        `This emscripten-generated code requires Chrome v85 (detected v${currentChromeVersion})`,\n      );\n    }\n  })();\n\n  // end include: minimum_runtime_check.js\n  // The Module object: Our interface to the outside world. We import\n  // and export values on it. There are various ways Module can be used:\n  // 1. Not defined. We create it here\n  // 2. A function parameter, function(moduleArg) => Promise<Module>\n  // 3. pre-run appended it, var Module = {}; ..generated code..\n  // 4. External script tag defines var Module.\n  // We need to check if Module already exists (e.g. case 3 above).\n  // Substitution will be replaced with actual code on later stage of the build,\n  // this way Closure Compiler will not mangle it (e.g. case 4. above).\n  // Note that if you want to run closure, and also to use Module\n  // after the generated code, you will need to define   var Module = {};\n  // before the code. Then that object will be used in the code, and you\n  // can continue to use Module afterwards as well.\n  var Module = moduleArg;\n\n  // Determine the runtime environment we are in. You can customize this by\n  // setting the ENVIRONMENT setting at compile time (see settings.js).\n\n  // Attempt to auto-detect the environment\n  var ENVIRONMENT_IS_WEB = !!globalThis.window;\n  var ENVIRONMENT_IS_WORKER = !!globalThis.WorkerGlobalScope;\n  // N.b. Electron.js environment is simultaneously a NODE-environment, but\n  // also a web environment.\n  var ENVIRONMENT_IS_NODE =\n    globalThis.process?.versions?.node && globalThis.process?.type != 'renderer';\n  var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;\n\n  if (ENVIRONMENT_IS_NODE) {\n    // When building an ES module `require` is not normally available.\n    // We need to use `createRequire()` to construct the require()` function.\n    const { createRequire } = await import('node:module');\n    /** @suppress{duplicate} */\n    var require = createRequire(import.meta.url);\n  }\n\n  // --pre-jses are emitted after the Module integration code, so that they can\n  // refer to Module (if they choose; they can also define Module)\n\n  var arguments_ = [];\n  var thisProgram = './this.program';\n  var quit_ = (status, toThrow) => {\n    throw toThrow;\n  };\n\n  var _scriptName = import.meta.url;\n\n  // `/` should be present at the end if `scriptDirectory` is not empty\n  var scriptDirectory = '';\n  function locateFile(path) {\n    if (Module['locateFile']) {\n      return Module['locateFile'](path, scriptDirectory);\n    }\n    return scriptDirectory + path;\n  }\n\n  // Hooks that are implemented differently in different runtime environments.\n  var readAsync, readBinary;\n\n  if (ENVIRONMENT_IS_NODE) {\n    const isNode = globalThis.process?.versions?.node && globalThis.process?.type != 'renderer';\n    if (!isNode)\n      throw new Error(\n        'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',\n      );\n\n    // These modules will usually be used on Node.js. Load them eagerly to avoid\n    // the complexity of lazy-loading.\n    var fs = require('node:fs');\n\n    if (_scriptName.startsWith('file:')) {\n      scriptDirectory =\n        require('node:path').dirname(require('node:url').fileURLToPath(_scriptName)) + '/';\n    }\n\n    // include: node_shell_read.js\n    readBinary = (filename) => {\n      // We need to re-wrap `file://` strings to URLs.\n      filename = isFileURI(filename) ? new URL(filename) : filename;\n      var ret = fs.readFileSync(filename);\n      assert(Buffer.isBuffer(ret));\n      return ret;\n    };\n\n    readAsync = async (filename, binary = true) => {\n      // See the comment in the `readBinary` function.\n      filename = isFileURI(filename) ? new URL(filename) : filename;\n      var ret = fs.readFileSync(filename, binary ? undefined : 'utf8');\n      assert(binary ? Buffer.isBuffer(ret) : typeof ret == 'string');\n      return ret;\n    };\n    // end include: node_shell_read.js\n    if (process.argv.length > 1) {\n      thisProgram = process.argv[1].replace(/\\\\/g, '/');\n    }\n\n    arguments_ = process.argv.slice(2);\n\n    quit_ = (status, toThrow) => {\n      process.exitCode = status;\n      throw toThrow;\n    };\n  } else if (ENVIRONMENT_IS_SHELL) {\n  } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n    // Note that this includes Node.js workers when relevant (pthreads is enabled).\n    // Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and\n    // ENVIRONMENT_IS_NODE.\n    try {\n      scriptDirectory = new URL('.', _scriptName).href; // includes trailing slash\n    } catch {\n      // Must be a `blob:` or `data:` URL (e.g. `blob:http://site.com/etc/etc`), we cannot\n      // infer anything from them.\n    }\n\n    if (!(globalThis.window || globalThis.WorkerGlobalScope))\n      throw new Error(\n        'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',\n      );\n\n    {\n      // include: web_or_worker_shell_read.js\n      if (ENVIRONMENT_IS_WORKER) {\n        readBinary = (url) => {\n          var xhr = new XMLHttpRequest();\n          xhr.open('GET', url, false);\n          xhr.responseType = 'arraybuffer';\n          xhr.send(null);\n          return new Uint8Array(/** @type{!ArrayBuffer} */ (xhr.response));\n        };\n      }\n\n      readAsync = async (url) => {\n        // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.\n        // See https://github.com/github/fetch/pull/92#issuecomment-140665932\n        // Cordova or Electron apps are typically loaded from a file:// url.\n        // So use XHR on webview if URL is a file URL.\n        if (isFileURI(url)) {\n          return new Promise((resolve, reject) => {\n            var xhr = new XMLHttpRequest();\n            xhr.open('GET', url, true);\n            xhr.responseType = 'arraybuffer';\n            xhr.onload = () => {\n              if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) {\n                // file URLs can return 0\n                resolve(xhr.response);\n                return;\n              }\n              reject(xhr.status);\n            };\n            xhr.onerror = reject;\n            xhr.send(null);\n          });\n        }\n        var response = await fetch(url, { credentials: 'same-origin' });\n        if (response.ok) {\n          return response.arrayBuffer();\n        }\n        throw new Error(response.status + ' : ' + response.url);\n      };\n      // end include: web_or_worker_shell_read.js\n    }\n  } else {\n    throw new Error('environment detection error');\n  }\n\n  var out = console.log.bind(console);\n  var err = console.error.bind(console);\n\n  var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js';\n  var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js';\n  var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js';\n  var FETCHFS = 'FETCHFS is no longer included by default; build with -lfetchfs.js';\n  var ICASEFS = 'ICASEFS is no longer included by default; build with -licasefs.js';\n  var JSFILEFS = 'JSFILEFS is no longer included by default; build with -ljsfilefs.js';\n  var OPFS = 'OPFS is no longer included by default; build with -lopfs.js';\n\n  var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js';\n\n  // perform assertions in shell.js after we set up out() and err(), as otherwise\n  // if an assertion fails it cannot print the message\n\n  assert(\n    !ENVIRONMENT_IS_SHELL,\n    'shell environment detected but not enabled at build time.  Add `shell` to `-sENVIRONMENT` to enable.',\n  );\n\n  // end include: shell.js\n\n  // include: preamble.js\n  // === Preamble library stuff ===\n\n  // Documentation for the public APIs defined in this file must be updated in:\n  //    site/source/docs/api_reference/preamble.js.rst\n  // A prebuilt local version of the documentation is available at:\n  //    site/build/text/docs/api_reference/preamble.js.txt\n  // You can also build docs locally as HTML or other formats in site/\n  // An online HTML version (which may be of a different version of Emscripten)\n  //    is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html\n\n  var wasmBinary;\n\n  if (!globalThis.WebAssembly) {\n    err('no native wasm support detected');\n  }\n\n  // Wasm globals\n\n  //========================================\n  // Runtime essentials\n  //========================================\n\n  // whether we are quitting the application. no code should run after this.\n  // set in exit() and abort()\n  var ABORT = false;\n\n  // set by exit() and abort().  Passed to 'onExit' handler.\n  // NOTE: This is also used as the process return code in shell environments\n  // but only when noExitRuntime is false.\n  var EXITSTATUS;\n\n  // In STRICT mode, we only define assert() when ASSERTIONS is set.  i.e. we\n  // don't define it at all in release modes.  This matches the behaviour of\n  // MINIMAL_RUNTIME.\n  // TODO(sbc): Make this the default even without STRICT enabled.\n  /** @type {function(*, string=)} */\n  function assert(condition, text) {\n    if (!condition) {\n      abort('Assertion failed' + (text ? ': ' + text : ''));\n    }\n  }\n\n  // We used to include malloc/free by default in the past. Show a helpful error in\n  // builds with assertions.\n\n  /**\n   * Indicates whether filename is delivered via file protocol (as opposed to http/https)\n   * @noinline\n   */\n  var isFileURI = (filename) => filename.startsWith('file://');\n\n  // include: runtime_common.js\n  // include: runtime_stack_check.js\n  // Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode.\n  function writeStackCookie() {\n    var max = _emscripten_stack_get_end();\n    assert((max & 3) == 0);\n    // If the stack ends at address zero we write our cookies 4 bytes into the\n    // stack.  This prevents interference with SAFE_HEAP and ASAN which also\n    // monitor writes to address zero.\n    if (max == 0) {\n      max += 4;\n    }\n    // The stack grow downwards towards _emscripten_stack_get_end.\n    // We write cookies to the final two words in the stack and detect if they are\n    // ever overwritten.\n    HEAPU32[max >> 2] = 0x02135467;\n    HEAPU32[(max + 4) >> 2] = 0x89bacdfe;\n    // Also test the global address 0 for integrity.\n    HEAPU32[0 >> 2] = 1668509029;\n  }\n\n  function checkStackCookie() {\n    if (ABORT) return;\n    var max = _emscripten_stack_get_end();\n    // See writeStackCookie().\n    if (max == 0) {\n      max += 4;\n    }\n    var cookie1 = HEAPU32[max >> 2];\n    var cookie2 = HEAPU32[(max + 4) >> 2];\n    if (cookie1 != 0x02135467 || cookie2 != 0x89bacdfe) {\n      abort(\n        `Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`,\n      );\n    }\n    // Also test the global address 0 for integrity.\n    if (HEAPU32[0 >> 2] != 0x63736d65 /* 'emsc' */) {\n      abort('Runtime error: The application has corrupted its heap memory area (address zero)!');\n    }\n  }\n  // end include: runtime_stack_check.js\n  // include: runtime_exceptions.js\n  // end include: runtime_exceptions.js\n  // include: runtime_debug.js\n  var runtimeDebug = true; // Switch to false at runtime to disable logging at the right times\n\n  // Used by XXXXX_DEBUG settings to output debug messages.\n  function dbg(...args) {\n    if (!runtimeDebug && typeof runtimeDebug != 'undefined') return;\n    // TODO(sbc): Make this configurable somehow.  Its not always convenient for\n    // logging to show up as warnings.\n    console.warn(...args);\n  }\n\n  // Endianness check\n  (() => {\n    var h16 = new Int16Array(1);\n    var h8 = new Int8Array(h16.buffer);\n    h16[0] = 0x6373;\n    if (h8[0] !== 0x73 || h8[1] !== 0x63)\n      abort(\n        'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)',\n      );\n  })();\n\n  function consumedModuleProp(prop) {\n    if (!Object.getOwnPropertyDescriptor(Module, prop)) {\n      Object.defineProperty(Module, prop, {\n        configurable: true,\n        set() {\n          abort(\n            `Attempt to set \\`Module.${prop}\\` after it has already been processed.  This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`,\n          );\n        },\n      });\n    }\n  }\n\n  function makeInvalidEarlyAccess(name) {\n    return () =>\n      assert(false, `call to '${name}' via reference taken before Wasm module initialization`);\n  }\n\n  function ignoredModuleProp(prop) {\n    if (Object.getOwnPropertyDescriptor(Module, prop)) {\n      abort(\n        `\\`Module.${prop}\\` was supplied but \\`${prop}\\` not included in INCOMING_MODULE_JS_API`,\n      );\n    }\n  }\n\n  // forcing the filesystem exports a few things by default\n  function isExportedByForceFilesystem(name) {\n    return (\n      name === 'FS_createPath' ||\n      name === 'FS_createDataFile' ||\n      name === 'FS_createPreloadedFile' ||\n      name === 'FS_preloadFile' ||\n      name === 'FS_unlink' ||\n      name === 'addRunDependency' ||\n      // The old FS has some functionality that WasmFS lacks.\n      name === 'FS_createLazyFile' ||\n      name === 'FS_createDevice' ||\n      name === 'removeRunDependency'\n    );\n  }\n\n  function missingLibrarySymbol(sym) {\n    // Any symbol that is not included from the JS library is also (by definition)\n    // not exported on the Module object.\n    unexportedRuntimeSymbol(sym);\n  }\n\n  function unexportedRuntimeSymbol(sym) {\n    if (!Object.getOwnPropertyDescriptor(Module, sym)) {\n      Object.defineProperty(Module, sym, {\n        configurable: true,\n        get() {\n          var msg = `'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;\n          if (isExportedByForceFilesystem(sym)) {\n            msg +=\n              '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';\n          }\n          abort(msg);\n        },\n      });\n    }\n  }\n\n  // end include: runtime_debug.js\n  var readyPromiseResolve, readyPromiseReject;\n\n  // Memory management\n  var /** @type {!Int8Array} */\n    HEAP8,\n    /** @type {!Uint8Array} */\n    HEAPU8,\n    /** @type {!Int16Array} */\n    HEAP16,\n    /** @type {!Uint16Array} */\n    HEAPU16,\n    /** @type {!Int32Array} */\n    HEAP32,\n    /** @type {!Uint32Array} */\n    HEAPU32,\n    /** @type {!Float32Array} */\n    HEAPF32,\n    /** @type {!Float64Array} */\n    HEAPF64;\n\n  // BigInt64Array type is not correctly defined in closure\n  var /** not-@type {!BigInt64Array} */\n    HEAP64,\n    /* BigUint64Array type is not correctly defined in closure\n/** not-@type {!BigUint64Array} */\n    HEAPU64;\n\n  var runtimeInitialized = false;\n\n  function updateMemoryViews() {\n    var b = wasmMemory.buffer;\n    Module['HEAP8'] = HEAP8 = new Int8Array(b);\n    Module['HEAP16'] = HEAP16 = new Int16Array(b);\n    Module['HEAPU8'] = HEAPU8 = new Uint8Array(b);\n    Module['HEAPU16'] = HEAPU16 = new Uint16Array(b);\n    Module['HEAP32'] = HEAP32 = new Int32Array(b);\n    Module['HEAPU32'] = HEAPU32 = new Uint32Array(b);\n    Module['HEAPF32'] = HEAPF32 = new Float32Array(b);\n    Module['HEAPF64'] = HEAPF64 = new Float64Array(b);\n    HEAP64 = new BigInt64Array(b);\n    HEAPU64 = new BigUint64Array(b);\n  }\n\n  // include: memoryprofiler.js\n  // end include: memoryprofiler.js\n  // end include: runtime_common.js\n  assert(\n    globalThis.Int32Array &&\n      globalThis.Float64Array &&\n      Int32Array.prototype.subarray &&\n      Int32Array.prototype.set,\n    'JS engine does not provide full typed array support',\n  );\n\n  function preRun() {\n    if (Module['preRun']) {\n      if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];\n      while (Module['preRun'].length) {\n        addOnPreRun(Module['preRun'].shift());\n      }\n    }\n    consumedModuleProp('preRun');\n    // Begin ATPRERUNS hooks\n    callRuntimeCallbacks(onPreRuns);\n    // End ATPRERUNS hooks\n  }\n\n  function initRuntime() {\n    assert(!runtimeInitialized);\n    runtimeInitialized = true;\n\n    setStackLimits();\n\n    checkStackCookie();\n\n    // No ATINITS hooks\n\n    wasmExports['__wasm_call_ctors']();\n\n    // No ATPOSTCTORS hooks\n  }\n\n  function postRun() {\n    checkStackCookie();\n    // PThreads reuse the runtime from the main thread.\n\n    if (Module['postRun']) {\n      if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];\n      while (Module['postRun'].length) {\n        addOnPostRun(Module['postRun'].shift());\n      }\n    }\n    consumedModuleProp('postRun');\n\n    // Begin ATPOSTRUNS hooks\n    callRuntimeCallbacks(onPostRuns);\n    // End ATPOSTRUNS hooks\n  }\n\n  /** @param {string|number=} what */\n  function abort(what) {\n    Module['onAbort']?.(what);\n\n    what = 'Aborted(' + what + ')';\n    // TODO(sbc): Should we remove printing and leave it up to whoever\n    // catches the exception?\n    err(what);\n\n    ABORT = true;\n\n    if (what.search(/RuntimeError: [Uu]nreachable/) >= 0) {\n      what +=\n        '. \"unreachable\" may be due to ASYNCIFY_STACK_SIZE not being large enough (try increasing it)';\n    }\n\n    // Use a wasm runtime error, because a JS error might be seen as a foreign\n    // exception, which means we'd run destructors on it. We need the error to\n    // simply make the program stop.\n    // FIXME This approach does not work in Wasm EH because it currently does not assume\n    // all RuntimeErrors are from traps; it decides whether a RuntimeError is from\n    // a trap or not based on a hidden field within the object. So at the moment\n    // we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that\n    // allows this in the wasm spec.\n\n    // Suppress closure compiler warning here. Closure compiler's builtin extern\n    // definition for WebAssembly.RuntimeError claims it takes no arguments even\n    // though it can.\n    // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.\n    /** @suppress {checkTypes} */\n    var e = new WebAssembly.RuntimeError(what);\n\n    readyPromiseReject?.(e);\n    // Throw the error whether or not MODULARIZE is set because abort is used\n    // in code paths apart from instantiation where an exception is expected\n    // to be thrown when abort is called.\n    throw e;\n  }\n\n  // show errors on likely calls to FS when it was not included\n  var FS = {\n    error() {\n      abort(\n        'Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM',\n      );\n    },\n    init() {\n      FS.error();\n    },\n    createDataFile() {\n      FS.error();\n    },\n    createPreloadedFile() {\n      FS.error();\n    },\n    createLazyFile() {\n      FS.error();\n    },\n    open() {\n      FS.error();\n    },\n    mkdev() {\n      FS.error();\n    },\n    registerDevice() {\n      FS.error();\n    },\n    analyzePath() {\n      FS.error();\n    },\n\n    ErrnoError() {\n      FS.error();\n    },\n  };\n\n  function createExportWrapper(name, nargs) {\n    return (...args) => {\n      assert(\n        runtimeInitialized,\n        `native function \\`${name}\\` called before runtime initialization`,\n      );\n      var f = wasmExports[name];\n      assert(f, `exported native function \\`${name}\\` not found`);\n      // Only assert for too many arguments. Too few can be valid since the missing arguments will be zero filled.\n      assert(\n        args.length <= nargs,\n        `native function \\`${name}\\` called with ${args.length} args but expects ${nargs}`,\n      );\n      return f(...args);\n    };\n  }\n\n  var wasmBinaryFile;\n\n  function findWasmBinary() {\n    if (Module['locateFile']) {\n      return locateFile('qsp-engine-debug.wasm');\n    }\n\n    // Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.\n    return new URL('qsp-engine-debug.wasm', import.meta.url).href;\n  }\n\n  function getBinarySync(file) {\n    if (file == wasmBinaryFile && wasmBinary) {\n      return new Uint8Array(wasmBinary);\n    }\n    if (readBinary) {\n      return readBinary(file);\n    }\n    // Throwing a plain string here, even though it not normally advisable since\n    // this gets turning into an `abort` in instantiateArrayBuffer.\n    throw 'both async and sync fetching of the wasm failed';\n  }\n\n  async function getWasmBinary(binaryFile) {\n    // If we don't have the binary yet, load it asynchronously using readAsync.\n    if (!wasmBinary) {\n      // Fetch the binary using readAsync\n      try {\n        var response = await readAsync(binaryFile);\n        return new Uint8Array(response);\n      } catch {\n        // Fall back to getBinarySync below;\n      }\n    }\n\n    // Otherwise, getBinarySync should be able to get it synchronously\n    return getBinarySync(binaryFile);\n  }\n\n  async function instantiateArrayBuffer(binaryFile, imports) {\n    try {\n      var binary = await getWasmBinary(binaryFile);\n      var instance = await WebAssembly.instantiate(binary, imports);\n      return instance;\n    } catch (reason) {\n      err(`failed to asynchronously prepare wasm: ${reason}`);\n\n      // Warn on some common problems.\n      if (isFileURI(binaryFile)) {\n        err(\n          `warning: Loading from a file URI (${binaryFile}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`,\n        );\n      }\n      abort(reason);\n    }\n  }\n\n  async function instantiateAsync(binary, binaryFile, imports) {\n    if (\n      !binary &&\n      // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.\n      !isFileURI(binaryFile) &&\n      // Avoid instantiateStreaming() on Node.js environment for now, as while\n      // Node.js v18.1.0 implements it, it does not have a full fetch()\n      // implementation yet.\n      //\n      // Reference:\n      //   https://github.com/emscripten-core/emscripten/pull/16917\n      !ENVIRONMENT_IS_NODE\n    ) {\n      try {\n        var response = fetch(binaryFile, { credentials: 'same-origin' });\n        var instantiationResult = await WebAssembly.instantiateStreaming(response, imports);\n        return instantiationResult;\n      } catch (reason) {\n        // We expect the most common failure cause to be a bad MIME type for the binary,\n        // in which case falling back to ArrayBuffer instantiation should work.\n        err(`wasm streaming compile failed: ${reason}`);\n        err('falling back to ArrayBuffer instantiation');\n        // fall back of instantiateArrayBuffer below\n      }\n    }\n    return instantiateArrayBuffer(binaryFile, imports);\n  }\n\n  function getWasmImports() {\n    // instrumenting imports is used in asyncify in two ways: to add assertions\n    // that check for proper import use, and for JSPI we use them to set up\n    // the Promise API on the import side.\n    Asyncify.instrumentWasmImports(wasmImports);\n    // prepare imports\n    var imports = {\n      env: wasmImports,\n      wasi_snapshot_preview1: wasmImports,\n    };\n    return imports;\n  }\n\n  // Create the wasm instance.\n  // Receives the wasm imports, returns the exports.\n  async function createWasm() {\n    // Load the wasm module and create an instance of using native support in the JS engine.\n    // handle a generated wasm instance, receiving its exports and\n    // performing other necessary setup\n    /** @param {WebAssembly.Module=} module*/\n    function receiveInstance(instance, module) {\n      wasmExports = instance.exports;\n\n      wasmExports = Asyncify.instrumentWasmExports(wasmExports);\n\n      assignWasmExports(wasmExports);\n\n      updateMemoryViews();\n\n      return wasmExports;\n    }\n\n    // Prefer streaming instantiation if available.\n    // Async compilation can be confusing when an error on the page overwrites Module\n    // (for example, if the order of elements is wrong, and the one defining Module is\n    // later), so we save Module and check it later.\n    var trueModule = Module;\n    function receiveInstantiationResult(result) {\n      // 'result' is a ResultObject object which has both the module and instance.\n      // receiveInstance() will swap in the exports (to Module.asm) so they can be called\n      assert(\n        Module === trueModule,\n        'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?',\n      );\n      trueModule = null;\n      // 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.\n      // When the regression is fixed, can restore the above PTHREADS-enabled path.\n      return receiveInstance(result['instance']);\n    }\n\n    var info = getWasmImports();\n\n    // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback\n    // to manually instantiate the Wasm module themselves. This allows pages to\n    // run the instantiation parallel to any other async startup actions they are\n    // performing.\n    // Also pthreads and wasm workers initialize the wasm instance through this\n    // path.\n    if (Module['instantiateWasm']) {\n      return new Promise((resolve, reject) => {\n        try {\n          Module['instantiateWasm'](info, (inst, mod) => {\n            resolve(receiveInstance(inst, mod));\n          });\n        } catch (e) {\n          err(`Module.instantiateWasm callback failed with error: ${e}`);\n          reject(e);\n        }\n      });\n    }\n\n    wasmBinaryFile ??= findWasmBinary();\n    var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info);\n    var exports = receiveInstantiationResult(result);\n    return exports;\n  }\n\n  // end include: preamble.js\n\n  // Begin JS library code\n\n  class ExitStatus {\n    name = 'ExitStatus';\n    constructor(status) {\n      this.message = `Program terminated with exit(${status})`;\n      this.status = status;\n    }\n  }\n\n  var callRuntimeCallbacks = (callbacks) => {\n    while (callbacks.length > 0) {\n      // Pass the module as the first argument.\n      callbacks.shift()(Module);\n    }\n  };\n  var onPostRuns = [];\n  var addOnPostRun = (cb) => onPostRuns.push(cb);\n\n  var onPreRuns = [];\n  var addOnPreRun = (cb) => onPreRuns.push(cb);\n\n  var dynCalls = {};\n  var dynCallLegacy = (sig, ptr, args) => {\n    sig = sig.replace(/p/g, 'i');\n    assert(sig in dynCalls, `bad function pointer type - sig is not in dynCalls: '${sig}'`);\n    if (args?.length) {\n      // j (64-bit integer) is fine, and is implemented as a BigInt. Without\n      // legalization, the number of parameters should match (j is not expanded\n      // into two i's).\n      assert(args.length === sig.length - 1);\n    } else {\n      assert(sig.length == 1);\n    }\n    var f = dynCalls[sig];\n    return f(ptr, ...args);\n  };\n  var dynCall = (sig, ptr, args = [], promising = false) => {\n    assert(ptr, `null function pointer in dynCall`);\n    assert(!promising, 'async dynCall is not supported in this mode');\n    var rtn = dynCallLegacy(sig, ptr, args);\n\n    function convert(rtn) {\n      return rtn;\n    }\n\n    return convert(rtn);\n  };\n\n  /**\n   * @param {number} ptr\n   * @param {string} type\n   */\n  function getValue(ptr, type = 'i8') {\n    if (type.endsWith('*')) type = '*';\n    switch (type) {\n      case 'i1':\n        return HEAP8[ptr];\n      case 'i8':\n        return HEAP8[ptr];\n      case 'i16':\n        return HEAP16[ptr >> 1];\n      case 'i32':\n        return HEAP32[ptr >> 2];\n      case 'i64':\n        return HEAP64[ptr >> 3];\n      case 'float':\n        return HEAPF32[ptr >> 2];\n      case 'double':\n        return HEAPF64[ptr >> 3];\n      case '*':\n        return HEAPU32[ptr >> 2];\n      default:\n        abort(`invalid type for getValue: ${type}`);\n    }\n  }\n\n  var noExitRuntime = true;\n\n  var ptrToString = (ptr) => {\n    assert(typeof ptr === 'number', `ptrToString expects a number, got ${typeof ptr}`);\n    // Convert to 32-bit unsigned value\n    ptr >>>= 0;\n    return '0x' + ptr.toString(16).padStart(8, '0');\n  };\n\n  var setStackLimits = () => {\n    var stackLow = _emscripten_stack_get_base();\n    var stackHigh = _emscripten_stack_get_end();\n    ___set_stack_limits(stackLow, stackHigh);\n  };\n\n  /**\n   * @param {number} ptr\n   * @param {number} value\n   * @param {string} type\n   */\n  function setValue(ptr, value, type = 'i8') {\n    if (type.endsWith('*')) type = '*';\n    switch (type) {\n      case 'i1':\n        HEAP8[ptr] = value;\n        break;\n      case 'i8':\n        HEAP8[ptr] = value;\n        break;\n      case 'i16':\n        HEAP16[ptr >> 1] = value;\n        break;\n      case 'i32':\n        HEAP32[ptr >> 2] = value;\n        break;\n      case 'i64':\n        HEAP64[ptr >> 3] = BigInt(value);\n        break;\n      case 'float':\n        HEAPF32[ptr >> 2] = value;\n        break;\n      case 'double':\n        HEAPF64[ptr >> 3] = value;\n        break;\n      case '*':\n        HEAPU32[ptr >> 2] = value;\n        break;\n      default:\n        abort(`invalid type for setValue: ${type}`);\n    }\n  }\n\n  var stackRestore = (val) => __emscripten_stack_restore(val);\n\n  var stackSave = () => _emscripten_stack_get_current();\n\n  var warnOnce = (text) => {\n    warnOnce.shown ||= {};\n    if (!warnOnce.shown[text]) {\n      warnOnce.shown[text] = 1;\n      if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text;\n      err(text);\n    }\n  };\n\n  var ___handle_stack_overflow = (requested) => {\n    var base = _emscripten_stack_get_base();\n    var end = _emscripten_stack_get_end();\n    abort(\n      `stack overflow (Attempt to set SP to ${ptrToString(requested)}` +\n        `, with stack limits [${ptrToString(end)} - ${ptrToString(base)}` +\n        ']). If you require more stack space build with -sSTACK_SIZE=<bytes>',\n    );\n  };\n\n  var __abort_js = () => abort('native code called abort()');\n\n  var _emscripten_date_now = () => Date.now();\n\n  var getHeapMax = () =>\n    // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate\n    // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side\n    // for any code that deals with heap sizes, which would require special\n    // casing all heap size related code to treat 0 specially.\n    2147483648;\n\n  var alignMemory = (size, alignment) => {\n    assert(alignment, 'alignment argument is required');\n    return Math.ceil(size / alignment) * alignment;\n  };\n\n  var growMemory = (size) => {\n    var oldHeapSize = wasmMemory.buffer.byteLength;\n    var pages = ((size - oldHeapSize + 65535) / 65536) | 0;\n    try {\n      // round size grow request up to wasm page size (fixed 64KB per spec)\n      wasmMemory.grow(pages); // .grow() takes a delta compared to the previous size\n      updateMemoryViews();\n      return 1 /*success*/;\n    } catch (e) {\n      err(\n        `growMemory: Attempted to grow heap from ${oldHeapSize} bytes to ${size} bytes, but got error: ${e}`,\n      );\n    }\n    // implicit 0 return to save code size (caller will cast \"undefined\" into 0\n    // anyhow)\n  };\n  var _emscripten_resize_heap = (requestedSize) => {\n    var oldSize = HEAPU8.length;\n    // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.\n    requestedSize >>>= 0;\n    // With multithreaded builds, races can happen (another thread might increase the size\n    // in between), so return a failure, and let the caller retry.\n    assert(requestedSize > oldSize);\n\n    // Memory resize rules:\n    // 1.  Always increase heap size to at least the requested size, rounded up\n    //     to next page multiple.\n    // 2a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap\n    //     geometrically: increase the heap size according to\n    //     MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%), At most\n    //     overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB).\n    // 2b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap\n    //     linearly: increase the heap size by at least\n    //     MEMORY_GROWTH_LINEAR_STEP bytes.\n    // 3.  Max size for the heap is capped at 2048MB-WASM_PAGE_SIZE, or by\n    //     MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest\n    // 4.  If we were unable to allocate as much memory, it may be due to\n    //     over-eager decision to excessively reserve due to (3) above.\n    //     Hence if an allocation fails, cut down on the amount of excess\n    //     growth, in an attempt to succeed to perform a smaller allocation.\n\n    // A limit is set for how much we can grow. We should not exceed that\n    // (the wasm binary specifies it, so if we tried, we'd fail anyhow).\n    var maxHeapSize = getHeapMax();\n    if (requestedSize > maxHeapSize) {\n      err(\n        `Cannot enlarge memory, requested ${requestedSize} bytes, but the limit is ${maxHeapSize} bytes!`,\n      );\n      return false;\n    }\n\n    // Loop through potential heap size increases. If we attempt a too eager\n    // reservation that fails, cut down on the attempted size and reserve a\n    // smaller bump instead. (max 3 times, chosen somewhat arbitrarily)\n    for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n      var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth\n      // but limit overreserving (default to capping at +96MB overgrowth at most)\n      overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n\n      var newSize = Math.min(\n        maxHeapSize,\n        alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536),\n      );\n\n      var replacement = growMemory(newSize);\n      if (replacement) {\n        return true;\n      }\n    }\n    err(`Failed to grow the heap from ${oldSize} bytes to ${newSize} bytes, not enough memory!`);\n    return false;\n  };\n\n  var ENV = {};\n\n  var getExecutableName = () => thisProgram || './this.program';\n  var getEnvStrings = () => {\n    if (!getEnvStrings.strings) {\n      // Default values.\n      // Browser language detection #8751\n      var lang = (globalThis.navigator?.language ?? 'C').replace('-', '_') + '.UTF-8';\n      var env = {\n        USER: 'web_user',\n        LOGNAME: 'web_user',\n        PATH: '/',\n        PWD: '/',\n        HOME: '/home/web_user',\n        LANG: lang,\n        _: getExecutableName(),\n      };\n      // Apply the user-provided values, if any.\n      for (var x in ENV) {\n        // x is a key in ENV; if ENV[x] is undefined, that means it was\n        // explicitly set to be so. We allow user code to do that to\n        // force variables with default values to remain unset.\n        if (ENV[x] === undefined) delete env[x];\n        else env[x] = ENV[x];\n      }\n      var strings = [];\n      for (var x in env) {\n        strings.push(`${x}=${env[x]}`);\n      }\n      getEnvStrings.strings = strings;\n    }\n    return getEnvStrings.strings;\n  };\n\n  var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {\n    assert(typeof str === 'string', `stringToUTF8Array expects a string (got ${typeof str})`);\n    // Parameter maxBytesToWrite is not optional. Negative values, 0, null,\n    // undefined and false each don't write out any bytes.\n    if (!(maxBytesToWrite > 0)) return 0;\n\n    var startIdx = outIdx;\n    var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.\n    for (var i = 0; i < str.length; ++i) {\n      // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description\n      // and https://www.ietf.org/rfc/rfc2279.txt\n      // and https://tools.ietf.org/html/rfc3629\n      var u = str.codePointAt(i);\n      if (u <= 0x7f) {\n        if (outIdx >= endIdx) break;\n        heap[outIdx++] = u;\n      } else if (u <= 0x7ff) {\n        if (outIdx + 1 >= endIdx) break;\n        heap[outIdx++] = 0xc0 | (u >> 6);\n        heap[outIdx++] = 0x80 | (u & 63);\n      } else if (u <= 0xffff) {\n        if (outIdx + 2 >= endIdx) break;\n        heap[outIdx++] = 0xe0 | (u >> 12);\n        heap[outIdx++] = 0x80 | ((u >> 6) & 63);\n        heap[outIdx++] = 0x80 | (u & 63);\n      } else {\n        if (outIdx + 3 >= endIdx) break;\n        if (u > 0x10ffff)\n          warnOnce(\n            'Invalid Unicode code point ' +\n              ptrToString(u) +\n              ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).',\n          );\n        heap[outIdx++] = 0xf0 | (u >> 18);\n        heap[outIdx++] = 0x80 | ((u >> 12) & 63);\n        heap[outIdx++] = 0x80 | ((u >> 6) & 63);\n        heap[outIdx++] = 0x80 | (u & 63);\n        // Gotcha: if codePoint is over 0xFFFF, it is represented as a surrogate pair in UTF-16.\n        // We need to manually skip over the second code unit for correct iteration.\n        i++;\n      }\n    }\n    // Null-terminate the pointer to the buffer.\n    heap[outIdx] = 0;\n    return outIdx - startIdx;\n  };\n  var stringToUTF8 = (str, outPtr, maxBytesToWrite) => {\n    assert(\n      typeof maxBytesToWrite == 'number',\n      'stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!',\n    );\n    return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);\n  };\n  var _environ_get = (__environ, environ_buf) => {\n    var bufSize = 0;\n    var envp = 0;\n    for (var string of getEnvStrings()) {\n      var ptr = environ_buf + bufSize;\n      HEAPU32[(__environ + envp) >> 2] = ptr;\n      bufSize += stringToUTF8(string, ptr, Infinity) + 1;\n      envp += 4;\n    }\n    return 0;\n  };\n\n  var lengthBytesUTF8 = (str) => {\n    var len = 0;\n    for (var i = 0; i < str.length; ++i) {\n      // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code\n      // unit, not a Unicode code point of the character! So decode\n      // UTF16->UTF32->UTF8.\n      // See http://unicode.org/faq/utf_bom.html#utf16-3\n      var c = str.charCodeAt(i); // possibly a lead surrogate\n      if (c <= 0x7f) {\n        len++;\n      } else if (c <= 0x7ff) {\n        len += 2;\n      } else if (c >= 0xd800 && c <= 0xdfff) {\n        len += 4;\n        ++i;\n      } else {\n        len += 3;\n      }\n    }\n    return len;\n  };\n  var _environ_sizes_get = (penviron_count, penviron_buf_size) => {\n    var strings = getEnvStrings();\n    HEAPU32[penviron_count >> 2] = strings.length;\n    var bufSize = 0;\n    for (var string of strings) {\n      bufSize += lengthBytesUTF8(string) + 1;\n    }\n    HEAPU32[penviron_buf_size >> 2] = bufSize;\n    return 0;\n  };\n\n  var UTF8Decoder = globalThis.TextDecoder && new TextDecoder();\n\n  var findStringEnd = (heapOrArray, idx, maxBytesToRead, ignoreNul) => {\n    var maxIdx = idx + maxBytesToRead;\n    if (ignoreNul) return maxIdx;\n    // TextDecoder needs to know the byte length in advance, it doesn't stop on\n    // null terminator by itself.\n    // As a tiny code save trick, compare idx against maxIdx using a negation,\n    // so that maxBytesToRead=undefined/NaN means Infinity.\n    while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx;\n    return idx;\n  };\n\n  /**\n   * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given\n   * array that contains uint8 values, returns a copy of that string as a\n   * Javascript String object.\n   * heapOrArray is either a regular array, or a JavaScript typed array view.\n   * @param {number=} idx\n   * @param {number=} maxBytesToRead\n   * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.\n   * @return {string}\n   */\n  var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => {\n    var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul);\n\n    // When using conditional TextDecoder, skip it for short strings as the overhead of the native call is not worth it.\n    if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n      return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));\n    }\n    var str = '';\n    while (idx < endPtr) {\n      // For UTF8 byte structure, see:\n      // http://en.wikipedia.org/wiki/UTF-8#Description\n      // https://www.ietf.org/rfc/rfc2279.txt\n      // https://tools.ietf.org/html/rfc3629\n      var u0 = heapOrArray[idx++];\n      if (!(u0 & 0x80)) {\n        str += String.fromCharCode(u0);\n        continue;\n      }\n      var u1 = heapOrArray[idx++] & 63;\n      if ((u0 & 0xe0) == 0xc0) {\n        str += String.fromCharCode(((u0 & 31) << 6) | u1);\n        continue;\n      }\n      var u2 = heapOrArray[idx++] & 63;\n      if ((u0 & 0xf0) == 0xe0) {\n        u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;\n      } else {\n        if ((u0 & 0xf8) != 0xf0)\n          warnOnce(\n            'Invalid UTF-8 leading byte ' +\n              ptrToString(u0) +\n              ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!',\n          );\n        u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);\n      }\n\n      if (u0 < 0x10000) {\n        str += String.fromCharCode(u0);\n      } else {\n        var ch = u0 - 0x10000;\n        str += String.fromCharCode(0xd800 | (ch >> 10), 0xdc00 | (ch & 0x3ff));\n      }\n    }\n    return str;\n  };\n\n  /**\n   * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the\n   * emscripten HEAP, returns a copy of that string as a Javascript String object.\n   *\n   * @param {number} ptr\n   * @param {number=} maxBytesToRead - An optional length that specifies the\n   *   maximum number of bytes to read. You can omit this parameter to scan the\n   *   string until the first 0 byte. If maxBytesToRead is passed, and the string\n   *   at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the\n   *   string will cut short at that byte index.\n   * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character.\n   * @return {string}\n   */\n  var UTF8ToString = (ptr, maxBytesToRead, ignoreNul) => {\n    assert(typeof ptr == 'number', `UTF8ToString expects a number (got ${typeof ptr})`);\n    return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : '';\n  };\n  var SYSCALLS = {\n    varargs: undefined,\n    getStr(ptr) {\n      var ret = UTF8ToString(ptr);\n      return ret;\n    },\n  };\n  var _fd_close = (fd) => {\n    abort('fd_close called without SYSCALLS_REQUIRE_FILESYSTEM');\n  };\n\n  var INT53_MAX = 9007199254740992;\n\n  var INT53_MIN = -9007199254740992;\n  var bigintToI53Checked = (num) => (num < INT53_MIN || num > INT53_MAX ? NaN : Number(num));\n  function _fd_seek(fd, offset, whence, newOffset) {\n    offset = bigintToI53Checked(offset);\n\n    return 70;\n  }\n\n  var printCharBuffers = [null, [], []];\n\n  var printChar = (stream, curr) => {\n    var buffer = printCharBuffers[stream];\n    assert(buffer);\n    if (curr === 0 || curr === 10) {\n      (stream === 1 ? out : err)(UTF8ArrayToString(buffer));\n      buffer.length = 0;\n    } else {\n      buffer.push(curr);\n    }\n  };\n\n  var flush_NO_FILESYSTEM = () => {\n    // flush anything remaining in the buffers during shutdown\n    _fflush(0);\n    if (printCharBuffers[1].length) printChar(1, 10);\n    if (printCharBuffers[2].length) printChar(2, 10);\n  };\n\n  var _fd_write = (fd, iov, iovcnt, pnum) => {\n    // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0\n    var num = 0;\n    for (var i = 0; i < iovcnt; i++) {\n      var ptr = HEAPU32[iov >> 2];\n      var len = HEAPU32[(iov + 4) >> 2];\n      iov += 8;\n      for (var j = 0; j < len; j++) {\n        printChar(fd, HEAPU8[ptr + j]);\n      }\n      num += len;\n    }\n    HEAPU32[pnum >> 2] = num;\n    return 0;\n  };\n\n  var runAndAbortIfError = (func) => {\n    try {\n      return func();\n    } catch (e) {\n      abort(e);\n    }\n  };\n\n  var handleException = (e) => {\n    // Certain exception types we do not treat as errors since they are used for\n    // internal control flow.\n    // 1. ExitStatus, which is thrown by exit()\n    // 2. \"unwind\", which is thrown by emscripten_unwind_to_js_event_loop() and others\n    //    that wish to return to JS event loop.\n    if (e instanceof ExitStatus || e == 'unwind') {\n      return EXITSTATUS;\n    }\n    checkStackCookie();\n    if (e instanceof WebAssembly.RuntimeError) {\n      if (_emscripten_stack_get_current() <= 0) {\n        err(\n          'Stack overflow detected.  You can try increasing -sSTACK_SIZE (currently set to 5242880)',\n        );\n      }\n    }\n    quit_(1, e);\n  };\n\n  var runtimeKeepaliveCounter = 0;\n  var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0;\n  var _proc_exit = (code) => {\n    EXITSTATUS = code;\n    if (!keepRuntimeAlive()) {\n      Module['onExit']?.(code);\n      ABORT = true;\n    }\n    quit_(code, new ExitStatus(code));\n  };\n\n  /** @param {boolean|number=} implicit */\n  var exitJS = (status, implicit) => {\n    EXITSTATUS = status;\n\n    checkUnflushedContent();\n\n    // if exit() was called explicitly, warn the user if the runtime isn't actually being shut down\n    if (keepRuntimeAlive() && !implicit) {\n      var msg = `program exited (with status: ${status}), but keepRuntimeAlive() is set (counter=${runtimeKeepaliveCounter}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;\n      readyPromiseReject?.(msg);\n      err(msg);\n    }\n\n    _proc_exit(status);\n  };\n  var _exit = exitJS;\n\n  var maybeExit = () => {\n    if (!keepRuntimeAlive()) {\n      try {\n        _exit(EXITSTATUS);\n      } catch (e) {\n        handleException(e);\n      }\n    }\n  };\n  var callUserCallback = (func) => {\n    if (ABORT) {\n      err('user callback triggered after runtime exited or application aborted.  Ignoring.');\n      return;\n    }\n    try {\n      return func();\n    } catch (e) {\n      handleException(e);\n    } finally {\n      maybeExit();\n    }\n  };\n\n  var createNamedFunction = (name, func) => Object.defineProperty(func, 'name', { value: name });\n\n  var runtimeKeepalivePush = () => {\n    runtimeKeepaliveCounter += 1;\n  };\n\n  var runtimeKeepalivePop = () => {\n    assert(runtimeKeepaliveCounter > 0);\n    runtimeKeepaliveCounter -= 1;\n  };\n\n  var Asyncify = {\n    instrumentWasmImports(imports) {\n      var importPattern = /^(invoke_.*|__asyncjs__.*)$/;\n\n      for (let [x, original] of Object.entries(imports)) {\n        if (typeof original == 'function') {\n          let isAsyncifyImport = original.isAsync || importPattern.test(x);\n          imports[x] = (...args) => {\n            var originalAsyncifyState = Asyncify.state;\n            try {\n              return original(...args);\n            } finally {\n              // Only asyncify-declared imports are allowed to change the\n              // state.\n              // Changing the state from normal to disabled is allowed (in any\n              // function) as that is what shutdown does (and we don't have an\n              // explicit list of shutdown imports).\n              var changedToDisabled =\n                originalAsyncifyState === Asyncify.State.Normal &&\n                Asyncify.state === Asyncify.State.Disabled;\n              // invoke_* functions are allowed to change the state if we do\n              // not ignore indirect calls.\n              var ignoredInvoke = x.startsWith('invoke_') && true;\n              if (\n                Asyncify.state !== originalAsyncifyState &&\n                !isAsyncifyImport &&\n                !changedToDisabled &&\n                !ignoredInvoke\n              ) {\n                abort(`import ${x} was not in ASYNCIFY_IMPORTS, but changed the state`);\n              }\n            }\n          };\n        }\n      }\n    },\n    instrumentFunction(original) {\n      var wrapper = (...args) => {\n        Asyncify.exportCallStack.push(original);\n        try {\n          return original(...args);\n        } finally {\n          if (!ABORT) {\n            var top = Asyncify.exportCallStack.pop();\n            assert(top === original);\n            Asyncify.maybeStopUnwind();\n          }\n        }\n      };\n      Asyncify.funcWrappers.set(original, wrapper);\n      wrapper = createNamedFunction(`__asyncify_wrapper_${original.name}`, wrapper);\n      return wrapper;\n    },\n    instrumentWasmExports(exports) {\n      var ret = {};\n      for (let [x, original] of Object.entries(exports)) {\n        if (typeof original == 'function') {\n          var wrapper = Asyncify.instrumentFunction(original);\n          ret[x] = wrapper;\n        } else {\n          ret[x] = original;\n        }\n      }\n      return ret;\n    },\n    State: {\n      Normal: 0,\n      Unwinding: 1,\n      Rewinding: 2,\n      Disabled: 3,\n    },\n    state: 0,\n    StackSize: 16384,\n    currData: null,\n    handleSleepReturnValue: 0,\n    exportCallStack: [],\n    callstackFuncToId: new Map(),\n    callStackIdToFunc: new Map(),\n    funcWrappers: new Map(),\n    callStackId: 0,\n    asyncPromiseHandlers: null,\n    sleepCallbacks: [],\n    getCallStackId(func) {\n      assert(func);\n      if (!Asyncify.callstackFuncToId.has(func)) {\n        var id = Asyncify.callStackId++;\n        Asyncify.callstackFuncToId.set(func, id);\n        Asyncify.callStackIdToFunc.set(id, func);\n      }\n      return Asyncify.callstackFuncToId.get(func);\n    },\n    maybeStopUnwind() {\n      if (\n        Asyncify.currData &&\n        Asyncify.state === Asyncify.State.Unwinding &&\n        Asyncify.exportCallStack.length === 0\n      ) {\n        // We just finished unwinding.\n        // Be sure to set the state before calling any other functions to avoid\n        // possible infinite recursion here (For example in debug pthread builds\n        // the dbg() function itself can call back into WebAssembly to get the\n        // current pthread_self() pointer).\n        Asyncify.state = Asyncify.State.Normal;\n\n        // Keep the runtime alive so that a re-wind can be done later.\n        runAndAbortIfError(_asyncify_stop_unwind);\n        if (typeof Fibers != 'undefined') {\n          Fibers.trampoline();\n        }\n      }\n    },\n    whenDone() {\n      assert(Asyncify.currData, 'Tried to wait for an async operation when none is in progress.');\n      assert(\n        !Asyncify.asyncPromiseHandlers,\n        'Cannot have multiple async operations in flight at once',\n      );\n      return new Promise((resolve, reject) => {\n        Asyncify.asyncPromiseHandlers = { resolve, reject };\n      });\n    },\n    allocateData() {\n      // An asyncify data structure has three fields:\n      //  0  current stack pos\n      //  4  max stack pos\n      //  8  id of function at bottom of the call stack (callStackIdToFunc[id] == wasm func)\n      //\n      // The Asyncify ABI only interprets the first two fields, the rest is for the runtime.\n      // We also embed a stack in the same memory region here, right next to the structure.\n      // This struct is also defined as asyncify_data_t in emscripten/fiber.h\n      var ptr = _malloc(12 + Asyncify.StackSize);\n      Asyncify.setDataHeader(ptr, ptr + 12, Asyncify.StackSize);\n      Asyncify.setDataRewindFunc(ptr);\n      return ptr;\n    },\n    setDataHeader(ptr, stack, stackSize) {\n      HEAPU32[ptr >> 2] = stack;\n      HEAPU32[(ptr + 4) >> 2] = stack + stackSize;\n    },\n    setDataRewindFunc(ptr) {\n      var bottomOfCallStack = Asyncify.exportCallStack[0];\n      assert(bottomOfCallStack, 'exportCallStack is empty');\n      var rewindId = Asyncify.getCallStackId(bottomOfCallStack);\n      HEAP32[(ptr + 8) >> 2] = rewindId;\n    },\n    getDataRewindFunc(ptr) {\n      var id = HEAP32[(ptr + 8) >> 2];\n      var func = Asyncify.callStackIdToFunc.get(id);\n      assert(func, `id ${id} not found in callStackIdToFunc`);\n      return func;\n    },\n    doRewind(ptr) {\n      var original = Asyncify.getDataRewindFunc(ptr);\n      var func = Asyncify.funcWrappers.get(original);\n      assert(original);\n      assert(func);\n      // Once we have rewound and the stack we no longer need to artificially\n      // keep the runtime alive.\n\n      return callUserCallback(func);\n    },\n    handleSleep(startAsync) {\n      assert(\n        Asyncify.state !== Asyncify.State.Disabled,\n        'Asyncify cannot be done during or after the runtime exits',\n      );\n      if (ABORT) return;\n      if (Asyncify.state === Asyncify.State.Normal) {\n        // Prepare to sleep. Call startAsync, and see what happens:\n        // if the code decided to call our callback synchronously,\n        // then no async operation was in fact begun, and we don't\n        // need to do anything.\n        var reachedCallback = false;\n        var reachedAfterCallback = false;\n        startAsync((handleSleepReturnValue = 0) => {\n          // old emterpretify API supported other stuff\n          assert(\n            ['undefined', 'number', 'boolean', 'bigint'].includes(typeof handleSleepReturnValue),\n            `invalid type for handleSleepReturnValue: '${typeof handleSleepReturnValue}'`,\n          );\n          if (ABORT) return;\n          Asyncify.handleSleepReturnValue = handleSleepReturnValue;\n          reachedCallback = true;\n          if (!reachedAfterCallback) {\n            // We are happening synchronously, so no need for async.\n            return;\n          }\n          // This async operation did not happen synchronously, so we did\n          // unwind. In that case there can be no compiled code on the stack,\n          // as it might break later operations (we can rewind ok now, but if\n          // we unwind again, we would unwind through the extra compiled code\n          // too).\n          assert(\n            !Asyncify.exportCallStack.length,\n            'Waking up (starting to rewind) must be done from JS, without compiled code on the stack.',\n          );\n          Asyncify.state = Asyncify.State.Rewinding;\n          runAndAbortIfError(() => _asyncify_start_rewind(Asyncify.currData));\n          if (typeof MainLoop != 'undefined' && MainLoop.func) {\n            MainLoop.resume();\n          }\n          var asyncWasmReturnValue,\n            isError = false;\n          try {\n            asyncWasmReturnValue = Asyncify.doRewind(Asyncify.currData);\n          } catch (err) {\n            asyncWasmReturnValue = err;\n            isError = true;\n          }\n          // Track whether the return value was handled by any promise handlers.\n          var handled = false;\n          if (!Asyncify.currData) {\n            // All asynchronous execution has finished.\n            // `asyncWasmReturnValue` now contains the final\n            // return value of the exported async WASM function.\n            //\n            // Note: `asyncWasmReturnValue` is distinct from\n            // `Asyncify.handleSleepReturnValue`.\n            // `Asyncify.handleSleepReturnValue` contains the return\n            // value of the last C function to have executed\n            // `Asyncify.handleSleep()`, whereas `asyncWasmReturnValue`\n            // contains the return value of the exported WASM function\n            // that may have called C functions that\n            // call `Asyncify.handleSleep()`.\n            var asyncPromiseHandlers = Asyncify.asyncPromiseHandlers;\n            if (asyncPromiseHandlers) {\n              Asyncify.asyncPromiseHandlers = null;\n              (isError ? asyncPromiseHandlers.reject : asyncPromiseHandlers.resolve)(\n                asyncWasmReturnValue,\n              );\n              handled = true;\n            }\n          }\n          if (isError && !handled) {\n            // If there was an error and it was not handled by now, we have no choice but to\n            // rethrow that error into the global scope where it can be caught only by\n            // `onerror` or `onunhandledpromiserejection`.\n            throw asyncWasmReturnValue;\n          }\n        });\n        reachedAfterCallback = true;\n        if (!reachedCallback) {\n          // A true async operation was begun; start a sleep.\n          Asyncify.state = Asyncify.State.Unwinding;\n          // TODO: reuse, don't alloc/free every sleep\n          Asyncify.currData = Asyncify.allocateData();\n          if (typeof MainLoop != 'undefined' && MainLoop.func) {\n            MainLoop.pause();\n          }\n          runAndAbortIfError(() => _asyncify_start_unwind(Asyncify.currData));\n        }\n      } else if (Asyncify.state === Asyncify.State.Rewinding) {\n        // Stop a resume.\n        Asyncify.state = Asyncify.State.Normal;\n        runAndAbortIfError(_asyncify_stop_rewind);\n        _free(Asyncify.currData);\n        Asyncify.currData = null;\n        // Call all sleep callbacks now that the sleep-resume is all done.\n        Asyncify.sleepCallbacks.forEach(callUserCallback);\n      } else {\n        abort(`invalid state: ${Asyncify.state}`);\n      }\n      return Asyncify.handleSleepReturnValue;\n    },\n    handleAsync: (startAsync) =>\n      Asyncify.handleSleep(async (wakeUp) => {\n        // TODO: add error handling as a second param when handleSleep implements it.\n        wakeUp(await startAsync());\n      }),\n  };\n\n  var wasmTableMirror = [];\n\n  var getWasmTableEntry = (funcPtr) => {\n    var func = wasmTableMirror[funcPtr];\n    if (!func) {\n      /** @suppress {checkTypes} */\n      wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);\n    }\n    /** @suppress {checkTypes} */\n    assert(\n      wasmTable.get(funcPtr) == func,\n      'JavaScript-side Wasm function table mirror is out of date!',\n    );\n    return func;\n  };\n\n  var updateTableMap = (offset, count) => {\n    if (functionsInTableMap) {\n      for (var i = offset; i < offset + count; i++) {\n        var item = getWasmTableEntry(i);\n        // Ignore null values.\n        if (item) {\n          functionsInTableMap.set(item, i);\n        }\n      }\n    }\n  };\n\n  var functionsInTableMap;\n\n  var getFunctionAddress = (func) => {\n    // First, create the map if this is the first use.\n    if (!functionsInTableMap) {\n      functionsInTableMap = new WeakMap();\n      updateTableMap(0, wasmTable.length);\n    }\n    return functionsInTableMap.get(func) || 0;\n  };\n\n  var freeTableIndexes = [];\n\n  var getEmptyTableSlot = () => {\n    // Reuse a free index if there is one, otherwise grow.\n    if (freeTableIndexes.length) {\n      return freeTableIndexes.pop();\n    }\n    try {\n      // Grow the table\n      return wasmTable['grow'](1);\n    } catch (err) {\n      if (!(err instanceof RangeError)) {\n        throw err;\n      }\n      abort('Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.');\n    }\n  };\n\n  var setWasmTableEntry = (idx, func) => {\n    /** @suppress {checkTypes} */\n    wasmTable.set(idx, func);\n    // With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overridden to return wrapped\n    // functions so we need to call it here to retrieve the potential wrapper correctly\n    // instead of just storing 'func' directly into wasmTableMirror\n    /** @suppress {checkTypes} */\n    wasmTableMirror[idx] = wasmTable.get(idx);\n  };\n\n  var uleb128EncodeWithLen = (arr) => {\n    const n = arr.length;\n    assert(n < 16384);\n    // Note: this LEB128 length encoding produces extra byte for n < 128,\n    // but we don't care as it's only used in a temporary representation.\n    return [(n % 128) | 128, n >> 7, ...arr];\n  };\n\n  var wasmTypeCodes = {\n    i: 0x7f, // i32\n    p: 0x7f, // i32\n    j: 0x7e, // i64\n    f: 0x7d, // f32\n    d: 0x7c, // f64\n    e: 0x6f, // externref\n  };\n  var generateTypePack = (types) =>\n    uleb128EncodeWithLen(\n      Array.from(types, (type) => {\n        var code = wasmTypeCodes[type];\n        assert(code, `invalid signature char: ${type}`);\n        return code;\n      }),\n    );\n  var convertJsFunctionToWasm = (func, sig) => {\n    // Rest of the module is static\n    var bytes = Uint8Array.of(\n      0x00,\n      0x61,\n      0x73,\n      0x6d, // magic (\"\\0asm\")\n      0x01,\n      0x00,\n      0x00,\n      0x00, // version: 1\n      0x01, // Type section code\n      // The module is static, with the exception of the type section, which is\n      // generated based on the signature passed in.\n      ...uleb128EncodeWithLen([\n        0x01, // count: 1\n        0x60 /* form: func */,\n        // param types\n        ...generateTypePack(sig.slice(1)),\n        // return types (for now only supporting [] if `void` and single [T] otherwise)\n        ...generateTypePack(sig[0] === 'v' ? '' : sig[0]),\n      ]),\n      // The rest of the module is static\n      0x02,\n      0x07, // import section\n      // (import \"e\" \"f\" (func 0 (type 0)))\n      0x01,\n      0x01,\n      0x65,\n      0x01,\n      0x66,\n      0x00,\n      0x00,\n      0x07,\n      0x05, // export section\n      // (export \"f\" (func 0 (type 0)))\n      0x01,\n      0x01,\n      0x66,\n      0x00,\n      0x00,\n    );\n\n    // We can compile this wasm module synchronously because it is very small.\n    // This accepts an import (at \"e.f\"), that it reroutes to an export (at \"f\")\n    var module = new WebAssembly.Module(bytes);\n    var instance = new WebAssembly.Instance(module, { e: { f: func } });\n    var wrappedFunc = instance.exports['f'];\n    return wrappedFunc;\n  };\n  /** @param {string=} sig */\n  var addFunction = (func, sig) => {\n    assert(typeof func != 'undefined');\n    // Check if the function is already in the table, to ensure each function\n    // gets a unique index.\n    var rtn = getFunctionAddress(func);\n    if (rtn) {\n      return rtn;\n    }\n\n    // It's not in the table, add it now.\n\n    var ret = getEmptyTableSlot();\n\n    // Set the new value.\n    try {\n      // Attempting to call this with JS function will cause table.set() to fail\n      setWasmTableEntry(ret, func);\n    } catch (err) {\n      if (!(err instanceof TypeError)) {\n        throw err;\n      }\n      assert(typeof sig != 'undefined', 'Missing signature argument to addFunction: ' + func);\n      var wrapped = convertJsFunctionToWasm(func, sig);\n      setWasmTableEntry(ret, wrapped);\n    }\n\n    functionsInTableMap.set(func, ret);\n\n    return ret;\n  };\n\n  // End JS library code\n\n  // include: postlibrary.js\n  // This file is included after the automatically-generated JS library code\n  // but before the wasm module is created.\n\n  {\n    // Begin ATMODULES hooks\n    if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];\n    if (Module['print']) out = Module['print'];\n    if (Module['printErr']) err = Module['printErr'];\n    if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];\n\n    Module['FS_createDataFile'] = FS.createDataFile;\n    Module['FS_createPreloadedFile'] = FS.createPreloadedFile;\n\n    // End ATMODULES hooks\n\n    checkIncomingModuleAPI();\n\n    if (Module['arguments']) arguments_ = Module['arguments'];\n    if (Module['thisProgram']) thisProgram = Module['thisProgram'];\n\n    // Assertions on removed incoming Module JS APIs.\n    assert(\n      typeof Module['memoryInitializerPrefixURL'] == 'undefined',\n      'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead',\n    );\n    assert(\n      typeof Module['pthreadMainPrefixURL'] == 'undefined',\n      'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead',\n    );\n    assert(\n      typeof Module['cdInitializerPrefixURL'] == 'undefined',\n      'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead',\n    );\n    assert(\n      typeof Module['filePackagePrefixURL'] == 'undefined',\n      'Module.filePackagePrefixURL option was removed, use Module.locateFile instead',\n    );\n    assert(typeof Module['read'] == 'undefined', 'Module.read option was removed');\n    assert(\n      typeof Module['readAsync'] == 'undefined',\n      'Module.readAsync option was removed (modify readAsync in JS)',\n    );\n    assert(\n      typeof Module['readBinary'] == 'undefined',\n      'Module.readBinary option was removed (modify readBinary in JS)',\n    );\n    assert(\n      typeof Module['setWindowTitle'] == 'undefined',\n      'Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)',\n    );\n    assert(\n      typeof Module['TOTAL_MEMORY'] == 'undefined',\n      'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY',\n    );\n    assert(\n      typeof Module['ENVIRONMENT'] == 'undefined',\n      'Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)',\n    );\n    assert(\n      typeof Module['STACK_SIZE'] == 'undefined',\n      'STACK_SIZE can no longer be set at runtime.  Use -sSTACK_SIZE at link time',\n    );\n    // If memory is defined in wasm, the user can't provide it, or set INITIAL_MEMORY\n    assert(\n      typeof Module['wasmMemory'] == 'undefined',\n      'Use of `wasmMemory` detected.  Use -sIMPORTED_MEMORY to define wasmMemory externally',\n    );\n    assert(\n      typeof Module['INITIAL_MEMORY'] == 'undefined',\n      'Detected runtime INITIAL_MEMORY setting.  Use -sIMPORTED_MEMORY to define wasmMemory dynamically',\n    );\n\n    if (Module['preInit']) {\n      if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];\n      while (Module['preInit'].length > 0) {\n        Module['preInit'].shift()();\n      }\n    }\n    consumedModuleProp('preInit');\n  }\n\n  // Begin runtime exports\n  Module['addFunction'] = addFunction;\n  Module['Asyncify'] = Asyncify;\n  var missingLibrarySymbols = [\n    'writeI53ToI64',\n    'writeI53ToI64Clamped',\n    'writeI53ToI64Signaling',\n    'writeI53ToU64Clamped',\n    'writeI53ToU64Signaling',\n    'readI53FromI64',\n    'readI53FromU64',\n    'convertI32PairToI53',\n    'convertI32PairToI53Checked',\n    'convertU32PairToI53',\n    'stackAlloc',\n    'getTempRet0',\n    'setTempRet0',\n    'zeroMemory',\n    'withStackSave',\n    'strError',\n    'inetPton4',\n    'inetNtop4',\n    'inetPton6',\n    'inetNtop6',\n    'readSockaddr',\n    'writeSockaddr',\n    'readEmAsmArgs',\n    'jstoi_q',\n    'autoResumeAudioContext',\n    'getDynCaller',\n    'asyncLoad',\n    'asmjsMangle',\n    'mmapAlloc',\n    'HandleAllocator',\n    'getUniqueRunDependency',\n    'addRunDependency',\n    'removeRunDependency',\n    'addOnInit',\n    'addOnPostCtor',\n    'addOnPreMain',\n    'addOnExit',\n    'STACK_SIZE',\n    'STACK_ALIGN',\n    'POINTER_SIZE',\n    'ASSERTIONS',\n    'ccall',\n    'cwrap',\n    'removeFunction',\n    'intArrayFromString',\n    'intArrayToString',\n    'AsciiToString',\n    'stringToAscii',\n    'UTF16ToString',\n    'stringToUTF16',\n    'lengthBytesUTF16',\n    'UTF32ToString',\n    'stringToUTF32',\n    'lengthBytesUTF32',\n    'stringToNewUTF8',\n    'stringToUTF8OnStack',\n    'writeArrayToMemory',\n    'registerKeyEventCallback',\n    'maybeCStringToJsString',\n    'findEventTarget',\n    'getBoundingClientRect',\n    'fillMouseEventData',\n    'registerMouseEventCallback',\n    'registerWheelEventCallback',\n    'registerUiEventCallback',\n    'registerFocusEventCallback',\n    'fillDeviceOrientationEventData',\n    'registerDeviceOrientationEventCallback',\n    'fillDeviceMotionEventData',\n    'registerDeviceMotionEventCallback',\n    'screenOrientation',\n    'fillOrientationChangeEventData',\n    'registerOrientationChangeEventCallback',\n    'fillFullscreenChangeEventData',\n    'registerFullscreenChangeEventCallback',\n    'JSEvents_requestFullscreen',\n    'JSEvents_resizeCanvasForFullscreen',\n    'registerRestoreOldStyle',\n    'hideEverythingExceptGivenElement',\n    'restoreHiddenElements',\n    'setLetterbox',\n    'softFullscreenResizeWebGLRenderTarget',\n    'doRequestFullscreen',\n    'fillPointerlockChangeEventData',\n    'registerPointerlockChangeEventCallback',\n    'registerPointerlockErrorEventCallback',\n    'requestPointerLock',\n    'fillVisibilityChangeEventData',\n    'registerVisibilityChangeEventCallback',\n    'registerTouchEventCallback',\n    'fillGamepadEventData',\n    'registerGamepadEventCallback',\n    'registerBeforeUnloadEventCallback',\n    'fillBatteryEventData',\n    'registerBatteryEventCallback',\n    'setCanvasElementSize',\n    'getCanvasElementSize',\n    'jsStackTrace',\n    'getCallstack',\n    'convertPCtoSourceLocation',\n    'checkWasiClock',\n    'wasiRightsToMuslOFlags',\n    'wasiOFlagsToMuslOFlags',\n    'initRandomFill',\n    'randomFill',\n    'safeSetTimeout',\n    'setImmediateWrapped',\n    'safeRequestAnimationFrame',\n    'clearImmediateWrapped',\n    'registerPostMainLoop',\n    'registerPreMainLoop',\n    'getPromise',\n    'makePromise',\n    'idsToPromises',\n    'makePromiseCallback',\n    'ExceptionInfo',\n    'findMatchingCatch',\n    'Browser_asyncPrepareDataCounter',\n    'isLeapYear',\n    'ydayFromDate',\n    'arraySum',\n    'addDays',\n    'getSocketFromFD',\n    'getSocketAddress',\n    'heapObjectForWebGLType',\n    'toTypedArrayIndex',\n    'webgl_enable_ANGLE_instanced_arrays',\n    'webgl_enable_OES_vertex_array_object',\n    'webgl_enable_WEBGL_draw_buffers',\n    'webgl_enable_WEBGL_multi_draw',\n    'webgl_enable_EXT_polygon_offset_clamp',\n    'webgl_enable_EXT_clip_control',\n    'webgl_enable_WEBGL_polygon_mode',\n    'emscriptenWebGLGet',\n    'computeUnpackAlignedImageSize',\n    'colorChannelsInGlTextureFormat',\n    'emscriptenWebGLGetTexPixelData',\n    'emscriptenWebGLGetUniform',\n    'webglGetUniformLocation',\n    'webglPrepareUniformLocationsBeforeFirstUse',\n    'webglGetLeftBracePos',\n    'emscriptenWebGLGetVertexAttrib',\n    '__glGetActiveAttribOrUniform',\n    'writeGLArray',\n    'registerWebGlEventCallback',\n    'ALLOC_NORMAL',\n    'ALLOC_STACK',\n    'allocate',\n    'writeStringToMemory',\n    'writeAsciiToMemory',\n    'allocateUTF8',\n    'allocateUTF8OnStack',\n    'demangle',\n    'stackTrace',\n    'getNativeTypeSize',\n  ];\n  missingLibrarySymbols.forEach(missingLibrarySymbol);\n\n  var unexportedSymbols = [\n    'run',\n    'out',\n    'err',\n    'callMain',\n    'abort',\n    'wasmExports',\n    'HEAP64',\n    'HEAPU64',\n    'writeStackCookie',\n    'checkStackCookie',\n    'INT53_MAX',\n    'INT53_MIN',\n    'bigintToI53Checked',\n    'stackSave',\n    'stackRestore',\n    'createNamedFunction',\n    'ptrToString',\n    'exitJS',\n    'getHeapMax',\n    'growMemory',\n    'ENV',\n    'setStackLimits',\n    'ERRNO_CODES',\n    'DNS',\n    'Protocols',\n    'Sockets',\n    'timers',\n    'warnOnce',\n    'readEmAsmArgsArray',\n    'getExecutableName',\n    'dynCallLegacy',\n    'dynCall',\n    'handleException',\n    'keepRuntimeAlive',\n    'runtimeKeepalivePush',\n    'runtimeKeepalivePop',\n    'callUserCallback',\n    'maybeExit',\n    'alignMemory',\n    'wasmTable',\n    'wasmMemory',\n    'noExitRuntime',\n    'addOnPreRun',\n    'addOnPostRun',\n    'convertJsFunctionToWasm',\n    'freeTableIndexes',\n    'functionsInTableMap',\n    'getEmptyTableSlot',\n    'updateTableMap',\n    'getFunctionAddress',\n    'setValue',\n    'getValue',\n    'PATH',\n    'PATH_FS',\n    'UTF8Decoder',\n    'UTF8ArrayToString',\n    'UTF8ToString',\n    'stringToUTF8Array',\n    'stringToUTF8',\n    'lengthBytesUTF8',\n    'UTF16Decoder',\n    'JSEvents',\n    'specialHTMLTargets',\n    'findCanvasEventTarget',\n    'currentFullscreenStrategy',\n    'restoreOldWindowedStyle',\n    'UNWIND_CACHE',\n    'ExitStatus',\n    'getEnvStrings',\n    'flush_NO_FILESYSTEM',\n    'emSetImmediate',\n    'emClearImmediate_deps',\n    'emClearImmediate',\n    'promiseMap',\n    'uncaughtExceptionCount',\n    'exceptionLast',\n    'exceptionCaught',\n    'Browser',\n    'requestFullscreen',\n    'requestFullScreen',\n    'setCanvasSize',\n    'getUserMedia',\n    'createContext',\n    'getPreloadedImageData__data',\n    'wget',\n    'MONTH_DAYS_REGULAR',\n    'MONTH_DAYS_LEAP',\n    'MONTH_DAYS_REGULAR_CUMULATIVE',\n    'MONTH_DAYS_LEAP_CUMULATIVE',\n    'SYSCALLS',\n    'tempFixedLengthArray',\n    'miniTempWebGLFloatBuffers',\n    'miniTempWebGLIntBuffers',\n    'GL',\n    'AL',\n    'GLUT',\n    'EGL',\n    'GLEW',\n    'IDBStore',\n    'runAndAbortIfError',\n    'Fibers',\n    'SDL',\n    'SDL_gfx',\n    'print',\n    'printErr',\n    'jstoi_s',\n  ];\n  unexportedSymbols.forEach(unexportedRuntimeSymbol);\n\n  // End runtime exports\n  // Begin JS library exports\n  // End JS library exports\n\n  // end include: postlibrary.js\n\n  function checkIncomingModuleAPI() {\n    ignoredModuleProp('fetchSettings');\n    ignoredModuleProp('logReadFiles');\n    ignoredModuleProp('loadSplitModule');\n  }\n\n  // Imports from the Wasm binary.\n  var ___asan_default_options = (Module['___asan_default_options'] =\n    makeInvalidEarlyAccess('___asan_default_options'));\n  var _init = (Module['_init'] = makeInvalidEarlyAccess('_init'));\n  var _dispose = (Module['_dispose'] = makeInvalidEarlyAccess('_dispose'));\n  var _getVersion = (Module['_getVersion'] = makeInvalidEarlyAccess('_getVersion'));\n  var _setErrorCallback = (Module['_setErrorCallback'] =\n    makeInvalidEarlyAccess('_setErrorCallback'));\n  var _getMainDesc = (Module['_getMainDesc'] = makeInvalidEarlyAccess('_getMainDesc'));\n  var _getWindowsChangedState = (Module['_getWindowsChangedState'] =\n    makeInvalidEarlyAccess('_getWindowsChangedState'));\n  var _getVarsDesc = (Module['_getVarsDesc'] = makeInvalidEarlyAccess('_getVarsDesc'));\n  var _getActions = (Module['_getActions'] = makeInvalidEarlyAccess('_getActions'));\n  var _malloc = (Module['_malloc'] = makeInvalidEarlyAccess('_malloc'));\n  var _selectAction = (Module['_selectAction'] = makeInvalidEarlyAccess('_selectAction'));\n  var _executeSelAction = (Module['_executeSelAction'] =\n    makeInvalidEarlyAccess('_executeSelAction'));\n  var _getObjects = (Module['_getObjects'] = makeInvalidEarlyAccess('_getObjects'));\n  var _selectObject = (Module['_selectObject'] = makeInvalidEarlyAccess('_selectObject'));\n  var _loadGameData = (Module['_loadGameData'] = makeInvalidEarlyAccess('_loadGameData'));\n  var _restartGame = (Module['_restartGame'] = makeInvalidEarlyAccess('_restartGame'));\n  var _saveGameData = (Module['_saveGameData'] = makeInvalidEarlyAccess('_saveGameData'));\n  var _free = (Module['_free'] = makeInvalidEarlyAccess('_free'));\n  var _loadSavedGameData = (Module['_loadSavedGameData'] =\n    makeInvalidEarlyAccess('_loadSavedGameData'));\n  var _execString = (Module['_execString'] = makeInvalidEarlyAccess('_execString'));\n  var _execCounter = (Module['_execCounter'] = makeInvalidEarlyAccess('_execCounter'));\n  var _execLoc = (Module['_execLoc'] = makeInvalidEarlyAccess('_execLoc'));\n  var _execUserInput = (Module['_execUserInput'] = makeInvalidEarlyAccess('_execUserInput'));\n  var _getLastError = (Module['_getLastError'] = makeInvalidEarlyAccess('_getLastError'));\n  var _getVarValue = (Module['_getVarValue'] = makeInvalidEarlyAccess('_getVarValue'));\n  var _getVarValueByIndex = (Module['_getVarValueByIndex'] =\n    makeInvalidEarlyAccess('_getVarValueByIndex'));\n  var _getVarValueByKey = (Module['_getVarValueByKey'] =\n    makeInvalidEarlyAccess('_getVarValueByKey'));\n  var _getVarSize = (Module['_getVarSize'] = makeInvalidEarlyAccess('_getVarSize'));\n  var _setCallback = (Module['_setCallback'] = makeInvalidEarlyAccess('_setCallback'));\n  var _freeItemsList = (Module['_freeItemsList'] = makeInvalidEarlyAccess('_freeItemsList'));\n  var _freeObjectsList = (Module['_freeObjectsList'] = makeInvalidEarlyAccess('_freeObjectsList'));\n  var _freeSaveBuffer = (Module['_freeSaveBuffer'] = makeInvalidEarlyAccess('_freeSaveBuffer'));\n  var _freeStringsBuffer = (Module['_freeStringsBuffer'] =\n    makeInvalidEarlyAccess('_freeStringsBuffer'));\n  var _enableDebugMode = (Module['_enableDebugMode'] = makeInvalidEarlyAccess('_enableDebugMode'));\n  var _disableDebugMode = (Module['_disableDebugMode'] =\n    makeInvalidEarlyAccess('_disableDebugMode'));\n  var _getCurStateData = (Module['_getCurStateData'] = makeInvalidEarlyAccess('_getCurStateData'));\n  var _getLocationsList = (Module['_getLocationsList'] =\n    makeInvalidEarlyAccess('_getLocationsList'));\n  var _getLocationActions = (Module['_getLocationActions'] =\n    makeInvalidEarlyAccess('_getLocationActions'));\n  var _getLocationCode = (Module['_getLocationCode'] = makeInvalidEarlyAccess('_getLocationCode'));\n  var _getActionCode = (Module['_getActionCode'] = makeInvalidEarlyAccess('_getActionCode'));\n  var _calculateStrExpression = (Module['_calculateStrExpression'] =\n    makeInvalidEarlyAccess('_calculateStrExpression'));\n  var _calculateNumExpression = (Module['_calculateNumExpression'] =\n    makeInvalidEarlyAccess('_calculateNumExpression'));\n  var _showWindow = (Module['_showWindow'] = makeInvalidEarlyAccess('_showWindow'));\n  var _getSelActionIndex = (Module['_getSelActionIndex'] =\n    makeInvalidEarlyAccess('_getSelActionIndex'));\n  var _getSelObjectIndex = (Module['_getSelObjectIndex'] =\n    makeInvalidEarlyAccess('_getSelObjectIndex'));\n  var _getCompiledDateTime = (Module['_getCompiledDateTime'] =\n    makeInvalidEarlyAccess('_getCompiledDateTime'));\n  var _getErrorDesc = (Module['_getErrorDesc'] = makeInvalidEarlyAccess('_getErrorDesc'));\n  var _getLocationDesc = (Module['_getLocationDesc'] = makeInvalidEarlyAccess('_getLocationDesc'));\n  var __run_checks = (Module['__run_checks'] = makeInvalidEarlyAccess('__run_checks'));\n  var _fflush = makeInvalidEarlyAccess('_fflush');\n  var _emscripten_stack_get_end = makeInvalidEarlyAccess('_emscripten_stack_get_end');\n  var _emscripten_stack_get_base = makeInvalidEarlyAccess('_emscripten_stack_get_base');\n  var _emscripten_stack_init = makeInvalidEarlyAccess('_emscripten_stack_init');\n  var _emscripten_stack_get_free = makeInvalidEarlyAccess('_emscripten_stack_get_free');\n  var __emscripten_stack_restore = makeInvalidEarlyAccess('__emscripten_stack_restore');\n  var __emscripten_stack_alloc = makeInvalidEarlyAccess('__emscripten_stack_alloc');\n  var _emscripten_stack_get_current = makeInvalidEarlyAccess('_emscripten_stack_get_current');\n  var ___set_stack_limits = (Module['___set_stack_limits'] =\n    makeInvalidEarlyAccess('___set_stack_limits'));\n  var dynCall_iii = makeInvalidEarlyAccess('dynCall_iii');\n  var dynCall_viii = makeInvalidEarlyAccess('dynCall_viii');\n  var dynCall_vi = makeInvalidEarlyAccess('dynCall_vi');\n  var dynCall_iiii = makeInvalidEarlyAccess('dynCall_iiii');\n  var dynCall_iiiii = makeInvalidEarlyAccess('dynCall_iiiii');\n  var dynCall_ii = makeInvalidEarlyAccess('dynCall_ii');\n  var dynCall_i = makeInvalidEarlyAccess('dynCall_i');\n  var dynCall_jiji = makeInvalidEarlyAccess('dynCall_jiji');\n  var dynCall_iidiiii = makeInvalidEarlyAccess('dynCall_iidiiii');\n  var dynCall_vii = makeInvalidEarlyAccess('dynCall_vii');\n  var _asyncify_start_unwind = makeInvalidEarlyAccess('_asyncify_start_unwind');\n  var _asyncify_stop_unwind = makeInvalidEarlyAccess('_asyncify_stop_unwind');\n  var _asyncify_start_rewind = makeInvalidEarlyAccess('_asyncify_start_rewind');\n  var _asyncify_stop_rewind = makeInvalidEarlyAccess('_asyncify_stop_rewind');\n  var memory = makeInvalidEarlyAccess('memory');\n  var __indirect_function_table = makeInvalidEarlyAccess('__indirect_function_table');\n  var wasmMemory = makeInvalidEarlyAccess('wasmMemory');\n  var wasmTable = makeInvalidEarlyAccess('wasmTable');\n\n  function assignWasmExports(wasmExports) {\n    assert(\n      typeof wasmExports['__asan_default_options'] != 'undefined',\n      'missing Wasm export: __asan_default_options',\n    );\n    assert(typeof wasmExports['init'] != 'undefined', 'missing Wasm export: init');\n    assert(typeof wasmExports['dispose'] != 'undefined', 'missing Wasm export: dispose');\n    assert(typeof wasmExports['getVersion'] != 'undefined', 'missing Wasm export: getVersion');\n    assert(\n      typeof wasmExports['setErrorCallback'] != 'undefined',\n      'missing Wasm export: setErrorCallback',\n    );\n    assert(typeof wasmExports['getMainDesc'] != 'undefined', 'missing Wasm export: getMainDesc');\n    assert(\n      typeof wasmExports['getWindowsChangedState'] != 'undefined',\n      'missing Wasm export: getWindowsChangedState',\n    );\n    assert(typeof wasmExports['getVarsDesc'] != 'undefined', 'missing Wasm export: getVarsDesc');\n    assert(typeof wasmExports['getActions'] != 'undefined', 'missing Wasm export: getActions');\n    assert(typeof wasmExports['malloc'] != 'undefined', 'missing Wasm export: malloc');\n    assert(typeof wasmExports['selectAction'] != 'undefined', 'missing Wasm export: selectAction');\n    assert(\n      typeof wasmExports['executeSelAction'] != 'undefined',\n      'missing Wasm export: executeSelAction',\n    );\n    assert(typeof wasmExports['getObjects'] != 'undefined', 'missing Wasm export: getObjects');\n    assert(typeof wasmExports['selectObject'] != 'undefined', 'missing Wasm export: selectObject');\n    assert(typeof wasmExports['loadGameData'] != 'undefined', 'missing Wasm export: loadGameData');\n    assert(typeof wasmExports['restartGame'] != 'undefined', 'missing Wasm export: restartGame');\n    assert(typeof wasmExports['saveGameData'] != 'undefined', 'missing Wasm export: saveGameData');\n    assert(typeof wasmExports['free'] != 'undefined', 'missing Wasm export: free');\n    assert(\n      typeof wasmExports['loadSavedGameData'] != 'undefined',\n      'missing Wasm export: loadSavedGameData',\n    );\n    assert(typeof wasmExports['execString'] != 'undefined', 'missing Wasm export: execString');\n    assert(typeof wasmExports['execCounter'] != 'undefined', 'missing Wasm export: execCounter');\n    assert(typeof wasmExports['execLoc'] != 'undefined', 'missing Wasm export: execLoc');\n    assert(\n      typeof wasmExports['execUserInput'] != 'undefined',\n      'missing Wasm export: execUserInput',\n    );\n    assert(typeof wasmExports['getLastError'] != 'undefined', 'missing Wasm export: getLastError');\n    assert(typeof wasmExports['getVarValue'] != 'undefined', 'missing Wasm export: getVarValue');\n    assert(\n      typeof wasmExports['getVarValueByIndex'] != 'undefined',\n      'missing Wasm export: getVarValueByIndex',\n    );\n    assert(\n      typeof wasmExports['getVarValueByKey'] != 'undefined',\n      'missing Wasm export: getVarValueByKey',\n    );\n    assert(typeof wasmExports['getVarSize'] != 'undefined', 'missing Wasm export: getVarSize');\n    assert(typeof wasmExports['setCallback'] != 'undefined', 'missing Wasm export: setCallback');\n    assert(\n      typeof wasmExports['freeItemsList'] != 'undefined',\n      'missing Wasm export: freeItemsList',\n    );\n    assert(\n      typeof wasmExports['freeObjectsList'] != 'undefined',\n      'missing Wasm export: freeObjectsList',\n    );\n    assert(\n      typeof wasmExports['freeSaveBuffer'] != 'undefined',\n      'missing Wasm export: freeSaveBuffer',\n    );\n    assert(\n      typeof wasmExports['freeStringsBuffer'] != 'undefined',\n      'missing Wasm export: freeStringsBuffer',\n    );\n    assert(\n      typeof wasmExports['enableDebugMode'] != 'undefined',\n      'missing Wasm export: enableDebugMode',\n    );\n    assert(\n      typeof wasmExports['disableDebugMode'] != 'undefined',\n      'missing Wasm export: disableDebugMode',\n    );\n    assert(\n      typeof wasmExports['getCurStateData'] != 'undefined',\n      'missing Wasm export: getCurStateData',\n    );\n    assert(\n      typeof wasmExports['getLocationsList'] != 'undefined',\n      'missing Wasm export: getLocationsList',\n    );\n    assert(\n      typeof wasmExports['getLocationActions'] != 'undefined',\n      'missing Wasm export: getLocationActions',\n    );\n    assert(\n      typeof wasmExports['getLocationCode'] != 'undefined',\n      'missing Wasm export: getLocationCode',\n    );\n    assert(\n      typeof wasmExports['getActionCode'] != 'undefined',\n      'missing Wasm export: getActionCode',\n    );\n    assert(\n      typeof wasmExports['calculateStrExpression'] != 'undefined',\n      'missing Wasm export: calculateStrExpression',\n    );\n    assert(\n      typeof wasmExports['calculateNumExpression'] != 'undefined',\n      'missing Wasm export: calculateNumExpression',\n    );\n    assert(typeof wasmExports['showWindow'] != 'undefined', 'missing Wasm export: showWindow');\n    assert(\n      typeof wasmExports['getSelActionIndex'] != 'undefined',\n      'missing Wasm export: getSelActionIndex',\n    );\n    assert(\n      typeof wasmExports['getSelObjectIndex'] != 'undefined',\n      'missing Wasm export: getSelObjectIndex',\n    );\n    assert(\n      typeof wasmExports['getCompiledDateTime'] != 'undefined',\n      'missing Wasm export: getCompiledDateTime',\n    );\n    assert(typeof wasmExports['getErrorDesc'] != 'undefined', 'missing Wasm export: getErrorDesc');\n    assert(\n      typeof wasmExports['getLocationDesc'] != 'undefined',\n      'missing Wasm export: getLocationDesc',\n    );\n    assert(typeof wasmExports['_run_checks'] != 'undefined', 'missing Wasm export: _run_checks');\n    assert(typeof wasmExports['fflush'] != 'undefined', 'missing Wasm export: fflush');\n    assert(\n      typeof wasmExports['emscripten_stack_get_end'] != 'undefined',\n      'missing Wasm export: emscripten_stack_get_end',\n    );\n    assert(\n      typeof wasmExports['emscripten_stack_get_base'] != 'undefined',\n      'missing Wasm export: emscripten_stack_get_base',\n    );\n    assert(\n      typeof wasmExports['emscripten_stack_init'] != 'undefined',\n      'missing Wasm export: emscripten_stack_init',\n    );\n    assert(\n      typeof wasmExports['emscripten_stack_get_free'] != 'undefined',\n      'missing Wasm export: emscripten_stack_get_free',\n    );\n    assert(\n      typeof wasmExports['_emscripten_stack_restore'] != 'undefined',\n      'missing Wasm export: _emscripten_stack_restore',\n    );\n    assert(\n      typeof wasmExports['_emscripten_stack_alloc'] != 'undefined',\n      'missing Wasm export: _emscripten_stack_alloc',\n    );\n    assert(\n      typeof wasmExports['emscripten_stack_get_current'] != 'undefined',\n      'missing Wasm export: emscripten_stack_get_current',\n    );\n    assert(\n      typeof wasmExports['__set_stack_limits'] != 'undefined',\n      'missing Wasm export: __set_stack_limits',\n    );\n    assert(typeof wasmExports['dynCall_iii'] != 'undefined', 'missing Wasm export: dynCall_iii');\n    assert(typeof wasmExports['dynCall_viii'] != 'undefined', 'missing Wasm export: dynCall_viii');\n    assert(typeof wasmExports['dynCall_vi'] != 'undefined', 'missing Wasm export: dynCall_vi');\n    assert(typeof wasmExports['dynCall_iiii'] != 'undefined', 'missing Wasm export: dynCall_iiii');\n    assert(\n      typeof wasmExports['dynCall_iiiii'] != 'undefined',\n      'missing Wasm export: dynCall_iiiii',\n    );\n    assert(typeof wasmExports['dynCall_ii'] != 'undefined', 'missing Wasm export: dynCall_ii');\n    assert(typeof wasmExports['dynCall_i'] != 'undefined', 'missing Wasm export: dynCall_i');\n    assert(typeof wasmExports['dynCall_jiji'] != 'undefined', 'missing Wasm export: dynCall_jiji');\n    assert(\n      typeof wasmExports['dynCall_iidiiii'] != 'undefined',\n      'missing Wasm export: dynCall_iidiiii',\n    );\n    assert(typeof wasmExports['dynCall_vii'] != 'undefined', 'missing Wasm export: dynCall_vii');\n    assert(\n      typeof wasmExports['asyncify_start_unwind'] != 'undefined',\n      'missing Wasm export: asyncify_start_unwind',\n    );\n    assert(\n      typeof wasmExports['asyncify_stop_unwind'] != 'undefined',\n      'missing Wasm export: asyncify_stop_unwind',\n    );\n    assert(\n      typeof wasmExports['asyncify_start_rewind'] != 'undefined',\n      'missing Wasm export: asyncify_start_rewind',\n    );\n    assert(\n      typeof wasmExports['asyncify_stop_rewind'] != 'undefined',\n      'missing Wasm export: asyncify_stop_rewind',\n    );\n    assert(typeof wasmExports['memory'] != 'undefined', 'missing Wasm export: memory');\n    assert(\n      typeof wasmExports['__indirect_function_table'] != 'undefined',\n      'missing Wasm export: __indirect_function_table',\n    );\n    ___asan_default_options = Module['___asan_default_options'] =\n      wasmExports['__asan_default_options'];\n    _init = Module['_init'] = createExportWrapper('init', 0);\n    _dispose = Module['_dispose'] = createExportWrapper('dispose', 0);\n    _getVersion = Module['_getVersion'] = createExportWrapper('getVersion', 1);\n    _setErrorCallback = Module['_setErrorCallback'] = createExportWrapper('setErrorCallback', 1);\n    _getMainDesc = Module['_getMainDesc'] = createExportWrapper('getMainDesc', 1);\n    _getWindowsChangedState = Module['_getWindowsChangedState'] = createExportWrapper(\n      'getWindowsChangedState',\n      0,\n    );\n    _getVarsDesc = Module['_getVarsDesc'] = createExportWrapper('getVarsDesc', 1);\n    _getActions = Module['_getActions'] = createExportWrapper('getActions', 1);\n    _malloc = Module['_malloc'] = createExportWrapper('malloc', 1);\n    _selectAction = Module['_selectAction'] = createExportWrapper('selectAction', 1);\n    _executeSelAction = Module['_executeSelAction'] = createExportWrapper('executeSelAction', 0);\n    _getObjects = Module['_getObjects'] = createExportWrapper('getObjects', 1);\n    _selectObject = Module['_selectObject'] = createExportWrapper('selectObject', 1);\n    _loadGameData = Module['_loadGameData'] = createExportWrapper('loadGameData', 3);\n    _restartGame = Module['_restartGame'] = createExportWrapper('restartGame', 0);\n    _saveGameData = Module['_saveGameData'] = createExportWrapper('saveGameData', 1);\n    _free = Module['_free'] = createExportWrapper('free', 1);\n    _loadSavedGameData = Module['_loadSavedGameData'] = createExportWrapper('loadSavedGameData', 2);\n    _execString = Module['_execString'] = createExportWrapper('execString', 2);\n    _execCounter = Module['_execCounter'] = createExportWrapper('execCounter', 0);\n    _execLoc = Module['_execLoc'] = createExportWrapper('execLoc', 1);\n    _execUserInput = Module['_execUserInput'] = createExportWrapper('execUserInput', 1);\n    _getLastError = Module['_getLastError'] = createExportWrapper('getLastError', 1);\n    _getVarValue = Module['_getVarValue'] = createExportWrapper('getVarValue', 2);\n    _getVarValueByIndex = Module['_getVarValueByIndex'] = createExportWrapper(\n      'getVarValueByIndex',\n      3,\n    );\n    _getVarValueByKey = Module['_getVarValueByKey'] = createExportWrapper('getVarValueByKey', 3);\n    _getVarSize = Module['_getVarSize'] = createExportWrapper('getVarSize', 1);\n    _setCallback = Module['_setCallback'] = createExportWrapper('setCallback', 2);\n    _freeItemsList = Module['_freeItemsList'] = createExportWrapper('freeItemsList', 1);\n    _freeObjectsList = Module['_freeObjectsList'] = createExportWrapper('freeObjectsList', 1);\n    _freeSaveBuffer = Module['_freeSaveBuffer'] = createExportWrapper('freeSaveBuffer', 1);\n    _freeStringsBuffer = Module['_freeStringsBuffer'] = createExportWrapper('freeStringsBuffer', 1);\n    _enableDebugMode = Module['_enableDebugMode'] = createExportWrapper('enableDebugMode', 0);\n    _disableDebugMode = Module['_disableDebugMode'] = createExportWrapper('disableDebugMode', 0);\n    _getCurStateData = Module['_getCurStateData'] = createExportWrapper('getCurStateData', 3);\n    _getLocationsList = Module['_getLocationsList'] = createExportWrapper('getLocationsList', 1);\n    _getLocationActions = Module['_getLocationActions'] = createExportWrapper(\n      'getLocationActions',\n      2,\n    );\n    _getLocationCode = Module['_getLocationCode'] = createExportWrapper('getLocationCode', 2);\n    _getActionCode = Module['_getActionCode'] = createExportWrapper('getActionCode', 3);\n    _calculateStrExpression = Module['_calculateStrExpression'] = createExportWrapper(\n      'calculateStrExpression',\n      2,\n    );\n    _calculateNumExpression = Module['_calculateNumExpression'] = createExportWrapper(\n      'calculateNumExpression',\n      2,\n    );\n    _showWindow = Module['_showWindow'] = createExportWrapper('showWindow', 2);\n    _getSelActionIndex = Module['_getSelActionIndex'] = createExportWrapper('getSelActionIndex', 0);\n    _getSelObjectIndex = Module['_getSelObjectIndex'] = createExportWrapper('getSelObjectIndex', 0);\n    _getCompiledDateTime = Module['_getCompiledDateTime'] = createExportWrapper(\n      'getCompiledDateTime',\n      1,\n    );\n    _getErrorDesc = Module['_getErrorDesc'] = createExportWrapper('getErrorDesc', 2);\n    _getLocationDesc = Module['_getLocationDesc'] = createExportWrapper('getLocationDesc', 2);\n    __run_checks = Module['__run_checks'] = createExportWrapper('_run_checks', 0);\n    _fflush = createExportWrapper('fflush', 1);\n    _emscripten_stack_get_end = wasmExports['emscripten_stack_get_end'];\n    _emscripten_stack_get_base = wasmExports['emscripten_stack_get_base'];\n    _emscripten_stack_init = wasmExports['emscripten_stack_init'];\n    _emscripten_stack_get_free = wasmExports['emscripten_stack_get_free'];\n    __emscripten_stack_restore = wasmExports['_emscripten_stack_restore'];\n    __emscripten_stack_alloc = wasmExports['_emscripten_stack_alloc'];\n    _emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'];\n    ___set_stack_limits = Module['___set_stack_limits'] = createExportWrapper(\n      '__set_stack_limits',\n      2,\n    );\n    dynCall_iii = dynCalls['iii'] = createExportWrapper('dynCall_iii', 3);\n    dynCall_viii = dynCalls['viii'] = createExportWrapper('dynCall_viii', 4);\n    dynCall_vi = dynCalls['vi'] = createExportWrapper('dynCall_vi', 2);\n    dynCall_iiii = dynCalls['iiii'] = createExportWrapper('dynCall_iiii', 4);\n    dynCall_iiiii = dynCalls['iiiii'] = createExportWrapper('dynCall_iiiii', 5);\n    dynCall_ii = dynCalls['ii'] = createExportWrapper('dynCall_ii', 2);\n    dynCall_i = dynCalls['i'] = createExportWrapper('dynCall_i', 1);\n    dynCall_jiji = dynCalls['jiji'] = createExportWrapper('dynCall_jiji', 4);\n    dynCall_iidiiii = dynCalls['iidiiii'] = createExportWrapper('dynCall_iidiiii', 7);\n    dynCall_vii = dynCalls['vii'] = createExportWrapper('dynCall_vii', 3);\n    _asyncify_start_unwind = createExportWrapper('asyncify_start_unwind', 1);\n    _asyncify_stop_unwind = createExportWrapper('asyncify_stop_unwind', 0);\n    _asyncify_start_rewind = createExportWrapper('asyncify_start_rewind', 1);\n    _asyncify_stop_rewind = createExportWrapper('asyncify_stop_rewind', 0);\n    memory = wasmMemory = wasmExports['memory'];\n    __indirect_function_table = wasmTable = wasmExports['__indirect_function_table'];\n  }\n\n  var wasmImports = {\n    /** @export */\n    __handle_stack_overflow: ___handle_stack_overflow,\n    /** @export */\n    _abort_js: __abort_js,\n    /** @export */\n    emscripten_date_now: _emscripten_date_now,\n    /** @export */\n    emscripten_resize_heap: _emscripten_resize_heap,\n    /** @export */\n    environ_get: _environ_get,\n    /** @export */\n    environ_sizes_get: _environ_sizes_get,\n    /** @export */\n    fd_close: _fd_close,\n    /** @export */\n    fd_seek: _fd_seek,\n    /** @export */\n    fd_write: _fd_write,\n  };\n\n  // include: postamble.js\n  // === Auto-generated postamble setup entry stuff ===\n\n  var calledRun;\n\n  function stackCheckInit() {\n    // This is normally called automatically during __wasm_call_ctors but need to\n    // get these values before even running any of the ctors so we call it redundantly\n    // here.\n    _emscripten_stack_init();\n    // TODO(sbc): Move writeStackCookie to native to to avoid this.\n    writeStackCookie();\n  }\n\n  function run() {\n    stackCheckInit();\n\n    preRun();\n\n    function doRun() {\n      // run may have just been called through dependencies being fulfilled just in this very frame,\n      // or while the async setStatus time below was happening\n      assert(!calledRun);\n      calledRun = true;\n      Module['calledRun'] = true;\n\n      if (ABORT) return;\n\n      initRuntime();\n\n      readyPromiseResolve?.(Module);\n      Module['onRuntimeInitialized']?.();\n      consumedModuleProp('onRuntimeInitialized');\n\n      assert(\n        !Module['_main'],\n        'compiled without a main, but one is present. if you added it from JS, use Module[\"onRuntimeInitialized\"]',\n      );\n\n      postRun();\n    }\n\n    if (Module['setStatus']) {\n      Module['setStatus']('Running...');\n      setTimeout(() => {\n        setTimeout(() => Module['setStatus'](''), 1);\n        doRun();\n      }, 1);\n    } else {\n      doRun();\n    }\n    checkStackCookie();\n  }\n\n  function checkUnflushedContent() {\n    // Compiler settings do not allow exiting the runtime, so flushing\n    // the streams is not possible. but in ASSERTIONS mode we check\n    // if there was something to flush, and if so tell the user they\n    // should request that the runtime be exitable.\n    // Normally we would not even include flush() at all, but in ASSERTIONS\n    // builds we do so just for this check, and here we see if there is any\n    // content to flush, that is, we check if there would have been\n    // something a non-ASSERTIONS build would have not seen.\n    // How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0\n    // mode (which has its own special function for this; otherwise, all\n    // the code is inside libc)\n    var oldOut = out;\n    var oldErr = err;\n    var has = false;\n    out = err = (x) => {\n      has = true;\n    };\n    try {\n      // it doesn't matter if it fails\n      flush_NO_FILESYSTEM();\n    } catch (e) {}\n    out = oldOut;\n    err = oldErr;\n    if (has) {\n      warnOnce(\n        'stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.',\n      );\n      warnOnce(\n        '(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)',\n      );\n    }\n  }\n\n  var wasmExports;\n\n  // In modularize mode the generated code is within a factory function so we\n  // can use await here (since it's not top-level-await).\n  wasmExports = await createWasm();\n\n  run();\n\n  // end include: postamble.js\n\n  // include: postamble_modularize.js\n  // In MODULARIZE mode we wrap the generated code in a factory function\n  // and return either the Module itself, or a promise of the module.\n  //\n  // We assign to the `moduleRtn` global here and configure closure to see\n  // this as an extern so it won't get minified.\n\n  if (runtimeInitialized) {\n    moduleRtn = Module;\n  } else {\n    // Set up the promise that indicates the Module is initialized\n    moduleRtn = new Promise((resolve, reject) => {\n      readyPromiseResolve = resolve;\n      readyPromiseReject = reject;\n    });\n  }\n\n  // Assertion for attempting to access module properties on the incoming\n  // moduleArg.  In the past we used this object as the prototype of the module\n  // and assigned properties to it, but now we return a distinct object.  This\n  // keeps the instance private until it is ready (i.e the promise has been\n  // resolved).\n  for (const prop of Object.keys(Module)) {\n    if (!(prop in moduleArg)) {\n      Object.defineProperty(moduleArg, prop, {\n        configurable: true,\n        get() {\n          abort(\n            `Access to module property ('${prop}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`,\n          );\n        },\n      });\n    }\n  }\n  // end include: postamble_modularize.js\n\n  return moduleRtn;\n}\n\n// Export using a UMD style export, or ES6 exports if selected\nexport default createQspModule;\n","import { QspAPI } from '../contracts/api';\nimport createQspModule from '../qsplib/public/qsp-engine-debug';\n\nimport { QspAPIImpl } from './qsp-api';\n\nexport function initDebugQspEngine(wasmBinary: ArrayBufferView | ArrayBuffer): Promise<QspAPI> {\n  return new Promise((resolve) => {\n    createQspModule({\n      wasmBinary,\n    }).then((moduleWasm) => {\n      resolve(new QspAPIImpl(moduleWasm));\n    });\n  });\n}\n"],"names":["async","createQspModule","moduleArg","moduleRtn","humanReadableVersionToPacked","str","vers","split","slice","length","push","map","n","i","arr","padStart","join","packedVersionToHumanReadable","TARGET_NOT_SUPPORTED","currentNodeVersion","process","versions","node","Error","userAgent","navigator","currentSafariVersion","includes","match","currentFirefoxVersion","parseFloat","currentChromeVersion","Module","ENVIRONMENT_IS_WEB","globalThis","window","ENVIRONMENT_IS_WORKER","WorkerGlobalScope","ENVIRONMENT_IS_NODE","type","ENVIRONMENT_IS_SHELL","createRequire","import","require","readAsync","readBinary","thisProgram","quit_","status","toThrow","_scriptName","document","pathToFileURL","__filename","href","_documentCurrentScript","tagName","toUpperCase","src","URL","baseURI","scriptDirectory","fs","startsWith","dirname","fileURLToPath","filename","isFileURI","ret","readFileSync","assert","Buffer","isBuffer","binary","undefined","argv","replace","exitCode","url","xhr","XMLHttpRequest","open","responseType","send","Uint8Array","Promise","resolve","reject","onload","response","onerror","fetch","credentials","ok","arrayBuffer","wasmBinary","out","console","log","bind","err","error","WebAssembly","EXITSTATUS","ABORT","condition","text","abort","h16","h8","readyPromiseResolve","readyPromiseReject","HEAPU8","HEAP32","HEAPU32","checkStackCookie","max","_emscripten_stack_get_end","cookie1","cookie2","ptrToString","consumedModuleProp","prop","Object","getOwnPropertyDescriptor","defineProperty","configurable","set","makeInvalidEarlyAccess","name","ignoredModuleProp","unexportedRuntimeSymbol","sym","get","msg","Int16Array","Int8Array","buffer","runtimeInitialized","updateMemoryViews","b","wasmMemory","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","what","search","e","RuntimeError","prototype","subarray","wasmBinaryFile","FS","init","createDataFile","createPreloadedFile","createLazyFile","mkdev","registerDevice","analyzePath","ErrnoError","createExportWrapper","nargs","args","f","wasmExports","findWasmBinary","path","getWasmBinary","binaryFile","file","getBinarySync","instantiateAsync","imports","instantiateStreaming","reason","instantiate","instantiateArrayBuffer","ExitStatus","constructor","this","message","callRuntimeCallbacks","callbacks","shift","onPostRuns","addOnPostRun","cb","onPreRuns","addOnPreRun","noExitRuntime","ptr","toString","setStackLimits","stackLow","_emscripten_stack_get_base","stackHigh","___set_stack_limits","warnOnce","shown","alignMemory","size","alignment","Math","ceil","growMemory","oldHeapSize","byteLength","pages","grow","ENV","getEnvStrings","strings","env","USER","LOGNAME","PATH","PWD","HOME","LANG","language","_","x","stringToUTF8","outPtr","maxBytesToWrite","heap","outIdx","startIdx","endIdx","u","codePointAt","stringToUTF8Array","lengthBytesUTF8","len","c","charCodeAt","UTF8Decoder","TextDecoder","functionsInTableMap","printCharBuffers","printChar","stream","curr","heapOrArray","idx","maxBytesToRead","endPtr","maxIdx","findStringEnd","decode","u0","u1","u2","String","fromCharCode","ch","UTF8ArrayToString","runAndAbortIfError","func","handleException","_emscripten_stack_get_current","keepRuntimeAlive","runtimeKeepaliveCounter","_exit","implicit","oldOut","oldErr","has","_fflush","checkUnflushedContent","code","callUserCallback","maybeExit","Asyncify","instrumentWasmImports","importPattern","original","entries","isAsyncifyImport","isAsync","test","originalAsyncifyState","state","changedToDisabled","State","Normal","Disabled","ignoredInvoke","instrumentFunction","wrapper","exportCallStack","pop","maybeStopUnwind","funcWrappers","value","instrumentWasmExports","exports","Unwinding","Rewinding","StackSize","currData","handleSleepReturnValue","callstackFuncToId","Map","callStackIdToFunc","callStackId","asyncPromiseHandlers","sleepCallbacks","getCallStackId","id","_asyncify_stop_unwind","Fibers","trampoline","whenDone","allocateData","_malloc","setDataHeader","setDataRewindFunc","stack","stackSize","bottomOfCallStack","rewindId","getDataRewindFunc","doRewind","handleSleep","startAsync","reachedCallback","reachedAfterCallback","_asyncify_start_rewind","MainLoop","resume","asyncWasmReturnValue","isError","handled","pause","_asyncify_start_unwind","_asyncify_stop_rewind","_free","forEach","handleAsync","wakeUp","wasmTableMirror","getWasmTableEntry","funcPtr","wasmTable","getFunctionAddress","WeakMap","offset","count","item","updateTableMap","freeTableIndexes","setWasmTableEntry","uleb128EncodeWithLen","wasmTypeCodes","p","j","d","generateTypePack","types","Array","from","sig","rtn","RangeError","getEmptyTableSlot","TypeError","wrapped","bytes","of","module","Instance","convertJsFunctionToWasm","_emscripten_stack_init","calledRun","wasmImports","__handle_stack_overflow","requested","base","end","_abort_js","emscripten_date_now","Date","now","emscripten_resize_heap","requestedSize","oldSize","maxHeapSize","cutDown","overGrownHeapSize","min","newSize","environ_get","__environ","environ_buf","bufSize","envp","string","Infinity","environ_sizes_get","penviron_count","penviron_buf_size","fd_close","fd","fd_seek","whence","newOffset","fd_write","iov","iovcnt","pnum","num","stackCheckInit","receiveInstance","instance","assignWasmExports","trueModule","info","wasi_snapshot_preview1","inst","mod","result","receiveInstantiationResult","createWasm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,yCACA,gCACA,wCACA,6BACA,qCACA,0BACA,mCACA,wBACA,eACA,wCACA,sBACA,iCACA,yCACA,wCACA,qBACA,gCACA,wCACA,6BACA,uBACA,+BACA,oCACA,uBACA,+BACA,uBACA,uBACA,eACA,eACA,4BACA,iBACA,yBACA,yBACA,iBACA,aACA,iBACA,sBACA,4BACA,wBACA,uBACA,sBACA,aACA,cACA,gBACA,sBACA,gBACA,oBACA,kCACA,aACA,eACA,WACA,UACA,kBACA,mBACA,yBACA,oBACA,sCACA,uCACA,kCACA,gCACA,wCACA,gCACA,kCACA,qBACA,gCACA,iCACA,iCACA,4BACA,0BACA,6CACA,uBACA,iCACA,+BACA,eACA,6BACA,eACA,cACA,WACA,sBACA,qBACA,eACA,sBACA,WACA,aACA,qBAEoBiE,QAxoDtB,SAA8BnN,GAG5BD,EAAwBC,EAC1B,GAsoDwB,CACtB,MACA,MACA,MACA,WACA,QACA,cACA,SACA,UACA,mBACA,mBACA,YACA,YACA,qBACA,YACA,eACA,sBACA,cACA,SACA,aACA,aACA,MACA,iBACA,cACA,MACA,YACA,UACA,SACA,WACA,qBACA,oBACA,gBACA,UACA,kBACA,mBACA,uBACA,sBACA,mBACA,YACA,cACA,YACA,aACA,gBACA,cACA,eACA,0BACA,mBACA,sBACA,oBACA,iBACA,qBACA,WACA,WACA,OACA,UACA,cACA,oBACA,eACA,oBACA,eACA,kBACA,eACA,WACA,qBACA,wBACA,4BACA,0BACA,eACA,aACA,gBACA,sBACA,iBACA,wBACA,mBACA,aACA,yBACA,gBACA,kBACA,UACA,oBACA,oBACA,gBACA,eACA,gBACA,8BACA,OACA,qBACA,kBACA,gCACA,6BACA,WACA,uBACA,4BACA,0BACA,KACA,KACA,OACA,MACA,OACA,WACA,qBACA,SACA,MACA,UACA,QACA,WACA,WAEgBmN,QAAQpN,GAeKnG,EAAgC,wBAC7DgG,EAAuB,2BACZhG,EAAc,MAAIgG,EAAuB,SACtChG,EAAiB,SAAIgG,EAAuB,YACzChG,EAAoB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