1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714 |
- var Module = typeof Module != 'undefined' ? Module : {};
- var moduleOverrides = Object.assign({}, Module);
- var arguments_ = [];
- var thisProgram = './this.program';
- var quit_ = (status, toThrow) => {
- throw toThrow;
- };
- var ENVIRONMENT_IS_WEB = typeof window == 'object';
- var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function';
- var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string';
- var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
- if (Module['ENVIRONMENT']) {
- throw new Error('Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)');
- }
- var scriptDirectory = '';
- function locateFile(path) {
- if (Module['locateFile']) {
- return Module['locateFile'](path, scriptDirectory);
- }
- return scriptDirectory + path;
- }
- var read_,
- readAsync,
- readBinary;
- if (ENVIRONMENT_IS_NODE) {
- if (typeof process == 'undefined' || !process.release || process.release.name !== 'node') throw new Error('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?)');
- var nodeVersion = process.versions.node;
- var numericVersion = nodeVersion.split('.').slice(0, 3);
- numericVersion = (numericVersion[0] * 10000) + (numericVersion[1] * 100) + (numericVersion[2].split('-')[0] * 1);
- var minVersion = 160000;
- if (numericVersion < 160000) {
- throw new Error('This emscripten-generated code requires node v16.0.0 (detected v' + nodeVersion + ')');
- }
-
-
-
-
-
-
- var fs = require('fs');
- var nodePath = require('path');
- if (ENVIRONMENT_IS_WORKER) {
- scriptDirectory = nodePath.dirname(scriptDirectory) + '/';
- } else {
- scriptDirectory = __dirname + '/';
- }
-
- read_ = (filename, binary) => {
-
-
- filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
- return fs.readFileSync(filename, binary ? undefined : 'utf8');
- };
- readBinary = (filename) => {
- var ret = read_(filename, true);
- if (!ret.buffer) {
- ret = new Uint8Array(ret);
- }
- assert(ret.buffer);
- return ret;
- };
- readAsync = (filename, onload, onerror, binary = true) => {
-
- filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
- fs.readFile(filename, binary ? undefined : 'utf8', (err, data) => {
- if (err) onerror(err);
- else onload(binary ? data.buffer : data);
- });
- };
-
- if (!Module['thisProgram'] && process.argv.length > 1) {
- thisProgram = process.argv[1].replace(/\\/g, '/');
- }
- arguments_ = process.argv.slice(2);
- if (typeof module != 'undefined') {
- module['exports'] = Module;
- }
- process.on('uncaughtException', (ex) => {
-
- if (ex !== 'unwind' && !(ex instanceof ExitStatus) && !(ex.context instanceof ExitStatus)) {
- throw ex;
- }
- });
- quit_ = (status, toThrow) => {
- process.exitCode = status;
- throw toThrow;
- };
- } else
- if (ENVIRONMENT_IS_SHELL) {
- if ((typeof process == 'object' && typeof require === 'function') || typeof window == 'object' || typeof importScripts == 'function') throw new Error('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?)');
- if (typeof read != 'undefined') {
- read_ = read;
- }
- readBinary = (f) => {
- if (typeof readbuffer == 'function') {
- return new Uint8Array(readbuffer(f));
- }
- let data = read(f, 'binary');
- assert(typeof data == 'object');
- return data;
- };
- readAsync = (f, onload, onerror) => {
- setTimeout(() => onload(readBinary(f)));
- };
- if (typeof clearTimeout == 'undefined') {
- globalThis.clearTimeout = (id) => { };
- }
- if (typeof setTimeout == 'undefined') {
-
- globalThis.setTimeout = (f) => (typeof f == 'function') ? f() : abort();
- }
- if (typeof scriptArgs != 'undefined') {
- arguments_ = scriptArgs;
- } else if (typeof arguments != 'undefined') {
- arguments_ = arguments;
- }
- if (typeof quit == 'function') {
- quit_ = (status, toThrow) => {
-
-
-
-
-
-
-
-
-
- setTimeout(() => {
- if (!(toThrow instanceof ExitStatus)) {
- let toLog = toThrow;
- if (toThrow && typeof toThrow == 'object' && toThrow.stack) {
- toLog = [toThrow, toThrow.stack];
- }
- err(`exiting due to exception: ${toLog}`);
- }
- quit(status);
- });
- throw toThrow;
- };
- }
- if (typeof print != 'undefined') {
-
- if (typeof console == 'undefined') console = ({});
- console.log = (print);
- console.warn = console.error = (typeof printErr != 'undefined' ? printErr : print);
- }
- } else
-
-
-
- if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
- if (ENVIRONMENT_IS_WORKER) {
- scriptDirectory = self.location.href;
- } else if (typeof document != 'undefined' && document.currentScript) {
- scriptDirectory = document.currentScript.src;
- }
-
-
-
-
-
-
- if (scriptDirectory.startsWith('blob:')) {
- scriptDirectory = '';
- } else {
- scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, '').lastIndexOf('/') + 1);
- }
- if (!(typeof window == 'object' || typeof importScripts == 'function')) throw new Error('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?)');
-
-
- {
-
- read_ = (url) => {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, false);
- xhr.send(null);
- return xhr.responseText;
- }
- if (ENVIRONMENT_IS_WORKER) {
- readBinary = (url) => {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, false);
- xhr.responseType = 'arraybuffer';
- xhr.send(null);
- return new Uint8Array((xhr.response));
- };
- }
- readAsync = (url, onload, onerror) => {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.responseType = 'arraybuffer';
- xhr.onload = () => {
- if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) {
- onload(xhr.response);
- return;
- }
- onerror();
- };
- xhr.onerror = onerror;
- xhr.send(null);
- }
-
- }
- } else {
- throw new Error('environment detection error');
- }
- var out = Module['print'] || console.log.bind(console);
- var err = Module['printErr'] || console.error.bind(console);
- Object.assign(Module, moduleOverrides);
- moduleOverrides = null;
- checkIncomingModuleAPI();
- if (Module['arguments']) arguments_ = Module['arguments']; legacyModuleProp('arguments', 'arguments_');
- if (Module['thisProgram']) thisProgram = Module['thisProgram']; legacyModuleProp('thisProgram', 'thisProgram');
- if (Module['quit']) quit_ = Module['quit']; legacyModuleProp('quit', 'quit_');
- assert(typeof Module['memoryInitializerPrefixURL'] == 'undefined', 'Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead');
- assert(typeof Module['pthreadMainPrefixURL'] == 'undefined', 'Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead');
- assert(typeof Module['cdInitializerPrefixURL'] == 'undefined', 'Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead');
- assert(typeof Module['filePackagePrefixURL'] == 'undefined', 'Module.filePackagePrefixURL option was removed, use Module.locateFile instead');
- assert(typeof Module['read'] == 'undefined', 'Module.read option was removed (modify read_ in JS)');
- assert(typeof Module['readAsync'] == 'undefined', 'Module.readAsync option was removed (modify readAsync in JS)');
- assert(typeof Module['readBinary'] == 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)');
- assert(typeof Module['setWindowTitle'] == 'undefined', 'Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)');
- assert(typeof Module['TOTAL_MEMORY'] == 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY');
- legacyModuleProp('asm', 'wasmExports');
- legacyModuleProp('read', 'read_');
- legacyModuleProp('readAsync', 'readAsync');
- legacyModuleProp('readBinary', 'readBinary');
- legacyModuleProp('setWindowTitle', 'setWindowTitle');
- var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js';
- var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js';
- var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js';
- var FETCHFS = 'FETCHFS is no longer included by default; build with -lfetchfs.js';
- var ICASEFS = 'ICASEFS is no longer included by default; build with -licasefs.js';
- var JSFILEFS = 'JSFILEFS is no longer included by default; build with -ljsfilefs.js';
- var OPFS = 'OPFS is no longer included by default; build with -lopfs.js';
- var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js';
- assert(!ENVIRONMENT_IS_SHELL, 'shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.');
- var wasmBinary;
- if (Module['wasmBinary']) wasmBinary = Module['wasmBinary']; legacyModuleProp('wasmBinary', 'wasmBinary');
- if (typeof WebAssembly != 'object') {
- abort('no native wasm support detected');
- }
- var wasmMemory;
- var ABORT = false;
- var EXITSTATUS;
- function assert(condition, text) {
- if (!condition) {
- abort('Assertion failed' + (text ? ': ' + text : ''));
- }
- }
- function _malloc() {
- abort('malloc() called but not included in the build - add `_malloc` to EXPORTED_FUNCTIONS');
- }
- function _free() {
-
- abort('free() called but not included in the build - add `_free` to EXPORTED_FUNCTIONS');
- }
- var HEAP,
-
- HEAP8,
-
- HEAPU8,
-
- HEAP16,
-
- HEAPU16,
-
- HEAP32,
-
- HEAPU32,
-
- HEAPF32,
-
- HEAPF64;
- function updateMemoryViews() {
- var b = wasmMemory.buffer;
- Module['HEAP8'] = HEAP8 = new Int8Array(b);
- Module['HEAP16'] = HEAP16 = new Int16Array(b);
- Module['HEAPU8'] = HEAPU8 = new Uint8Array(b);
- Module['HEAPU16'] = HEAPU16 = new Uint16Array(b);
- Module['HEAP32'] = HEAP32 = new Int32Array(b);
- Module['HEAPU32'] = HEAPU32 = new Uint32Array(b);
- Module['HEAPF32'] = HEAPF32 = new Float32Array(b);
- Module['HEAPF64'] = HEAPF64 = new Float64Array(b);
- }
- assert(!Module['STACK_SIZE'], 'STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time')
- assert(typeof Int32Array != 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray != undefined && Int32Array.prototype.set != undefined,
- 'JS engine does not provide full typed array support');
- assert(!Module['wasmMemory'], 'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally');
- assert(!Module['INITIAL_MEMORY'], 'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically');
- function writeStackCookie() {
- var max = _emscripten_stack_get_end();
- assert((max & 3) == 0);
-
-
-
- if (max == 0) {
- max += 4;
- }
-
-
-
- HEAPU32[((max) >> 2)] = 0x02135467;
- HEAPU32[(((max) + (4)) >> 2)] = 0x89BACDFE;
-
- HEAPU32[((0) >> 2)] = 1668509029;
- }
- function checkStackCookie() {
- if (ABORT) return;
- var max = _emscripten_stack_get_end();
-
- if (max == 0) {
- max += 4;
- }
- var cookie1 = HEAPU32[((max) >> 2)];
- var cookie2 = HEAPU32[(((max) + (4)) >> 2)];
- if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) {
- abort(`Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`);
- }
-
- if (HEAPU32[((0) >> 2)] != 0x63736d65 ) {
- abort('Runtime error: The application has corrupted its heap memory area (address zero)!');
- }
- }
- (function () {
- var h16 = new Int16Array(1);
- var h8 = new Int8Array(h16.buffer);
- h16[0] = 0x6373;
- if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)';
- })();
- var __ATPRERUN__ = [];
- var __ATINIT__ = [];
- var __ATMAIN__ = [];
- var __ATEXIT__ = [];
- var __ATPOSTRUN__ = [];
- var runtimeInitialized = false;
- function preRun() {
- if (Module['preRun']) {
- if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']];
- while (Module['preRun'].length) {
- addOnPreRun(Module['preRun'].shift());
- }
- }
- callRuntimeCallbacks(__ATPRERUN__);
- }
- function initRuntime() {
- assert(!runtimeInitialized);
- runtimeInitialized = true;
- checkStackCookie();
- callRuntimeCallbacks(__ATINIT__);
- }
- function preMain() {
- checkStackCookie();
- callRuntimeCallbacks(__ATMAIN__);
- }
- function postRun() {
- checkStackCookie();
- if (Module['postRun']) {
- if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']];
- while (Module['postRun'].length) {
- addOnPostRun(Module['postRun'].shift());
- }
- }
- callRuntimeCallbacks(__ATPOSTRUN__);
- }
- function addOnPreRun(cb) {
- __ATPRERUN__.unshift(cb);
- }
- function addOnInit(cb) {
- __ATINIT__.unshift(cb);
- }
- function addOnPreMain(cb) {
- __ATMAIN__.unshift(cb);
- }
- function addOnExit(cb) {
- }
- function addOnPostRun(cb) {
- __ATPOSTRUN__.unshift(cb);
- }
- assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
- assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
- assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
- assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
- var runDependencies = 0;
- var runDependencyWatcher = null;
- var dependenciesFulfilled = null;
- var runDependencyTracking = {};
- function getUniqueRunDependency(id) {
- var orig = id;
- while (1) {
- if (!runDependencyTracking[id]) return id;
- id = orig + Math.random();
- }
- }
- function addRunDependency(id) {
- runDependencies++;
- Module['monitorRunDependencies']?.(runDependencies);
- if (id) {
- assert(!runDependencyTracking[id]);
- runDependencyTracking[id] = 1;
- if (runDependencyWatcher === null && typeof setInterval != 'undefined') {
-
- runDependencyWatcher = setInterval(() => {
- if (ABORT) {
- clearInterval(runDependencyWatcher);
- runDependencyWatcher = null;
- return;
- }
- var shown = false;
- for (var dep in runDependencyTracking) {
- if (!shown) {
- shown = true;
- err('still waiting on run dependencies:');
- }
- err(`dependency: ${dep}`);
- }
- if (shown) {
- err('(end of list)');
- }
- }, 10000);
- }
- } else {
- err('warning: run dependency added without ID');
- }
- }
- function removeRunDependency(id) {
- runDependencies--;
- Module['monitorRunDependencies']?.(runDependencies);
- if (id) {
- assert(runDependencyTracking[id]);
- delete runDependencyTracking[id];
- } else {
- err('warning: run dependency removed without ID');
- }
- if (runDependencies == 0) {
- if (runDependencyWatcher !== null) {
- clearInterval(runDependencyWatcher);
- runDependencyWatcher = null;
- }
- if (dependenciesFulfilled) {
- var callback = dependenciesFulfilled;
- dependenciesFulfilled = null;
- callback();
- }
- }
- }
- function abort(what) {
- Module['onAbort']?.(what);
- what = 'Aborted(' + what + ')';
-
-
- err(what);
- ABORT = true;
- EXITSTATUS = 1;
-
-
-
-
-
-
-
-
-
-
-
-
-
- var e = new WebAssembly.RuntimeError(what);
-
-
-
- throw e;
- }
- var FS = {
- error() {
- abort('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');
- },
- init() { FS.error() },
- createDataFile() { FS.error() },
- createPreloadedFile() { FS.error() },
- createLazyFile() { FS.error() },
- open() { FS.error() },
- mkdev() { FS.error() },
- registerDevice() { FS.error() },
- analyzePath() { FS.error() },
- ErrnoError() { FS.error() },
- };
- Module['FS_createDataFile'] = FS.createDataFile;
- Module['FS_createPreloadedFile'] = FS.createPreloadedFile;
- var dataURIPrefix = 'data:application/octet-stream;base64,';
- var isDataURI = (filename) => filename.startsWith(dataURIPrefix);
- var isFileURI = (filename) => filename.startsWith('file://');
- function createExportWrapper(name) {
- return (...args) => {
- assert(runtimeInitialized, `native function \`${name}\` called before runtime initialization`);
- var f = wasmExports[name];
- assert(f, `exported native function \`${name}\` not found`);
- return f(...args);
- };
- }
- var wasmBinaryFile;
- wasmBinaryFile = '3.wasm';
- if (!isDataURI(wasmBinaryFile)) {
- wasmBinaryFile = locateFile(wasmBinaryFile);
- }
- function getBinarySync(file) {
- if (file == wasmBinaryFile && wasmBinary) {
- return new Uint8Array(wasmBinary);
- }
- if (readBinary) {
- return readBinary(file);
- }
- throw 'both async and sync fetching of the wasm failed';
- }
- function getBinaryPromise(binaryFile) {
-
-
-
-
-
- if (!wasmBinary
- && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) {
- if (typeof fetch == 'function'
- && !isFileURI(binaryFile)
- ) {
- return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
- if (!response['ok']) {
- throw `failed to load wasm binary file at '${binaryFile}'`;
- }
- return response['arrayBuffer']();
- }).catch(() => getBinarySync(binaryFile));
- }
- else if (readAsync) {
-
- return new Promise((resolve, reject) => {
- readAsync(binaryFile, (response) => resolve(new Uint8Array((response))), reject)
- });
- }
- }
-
- return Promise.resolve().then(() => getBinarySync(binaryFile));
- }
- function instantiateArrayBuffer(binaryFile, imports, receiver) {
- return getBinaryPromise(binaryFile).then((binary) => {
- return WebAssembly.instantiate(binary, imports);
- }).then(receiver, (reason) => {
- err(`failed to asynchronously prepare wasm: ${reason}`);
-
- if (isFileURI(wasmBinaryFile)) {
- err(`warning: Loading from a file URI (${wasmBinaryFile}) 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`);
- }
- abort(reason);
- });
- }
- function instantiateAsync(binary, binaryFile, imports, callback) {
- if (!binary &&
- typeof WebAssembly.instantiateStreaming == 'function' &&
- !isDataURI(binaryFile) &&
-
- !isFileURI(binaryFile) &&
-
-
-
-
-
-
- !ENVIRONMENT_IS_NODE &&
- typeof fetch == 'function') {
- return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
-
-
-
-
-
- var result = WebAssembly.instantiateStreaming(response, imports);
- return result.then(
- callback,
- function (reason) {
-
-
- err(`wasm streaming compile failed: ${reason}`);
- err('falling back to ArrayBuffer instantiation');
- return instantiateArrayBuffer(binaryFile, imports, callback);
- });
- });
- }
- return instantiateArrayBuffer(binaryFile, imports, callback);
- }
- function createWasm() {
-
- var info = {
- 'env': wasmImports,
- 'wasi_snapshot_preview1': wasmImports,
- };
-
-
-
-
- function receiveInstance(instance, module) {
- wasmExports = instance.exports;
- wasmMemory = wasmExports['memory'];
- assert(wasmMemory, 'memory not found in wasm exports');
-
-
-
-
- updateMemoryViews();
- addOnInit(wasmExports['__wasm_call_ctors']);
- removeRunDependency('wasm-instantiate');
- return wasmExports;
- }
-
- addRunDependency('wasm-instantiate');
-
-
-
-
- var trueModule = Module;
- function receiveInstantiationResult(result) {
-
-
- assert(Module === trueModule, 'the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?');
- trueModule = null;
-
-
- receiveInstance(result['instance']);
- }
-
-
-
-
-
-
- if (Module['instantiateWasm']) {
- try {
- return Module['instantiateWasm'](info, receiveInstance);
- } catch (e) {
- err(`Module.instantiateWasm callback failed with error: ${e}`);
- return false;
- }
- }
- instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult);
- return {};
- }
- var tempDouble;
- var tempI64;
- function legacyModuleProp(prop, newName, incomming = true) {
- if (!Object.getOwnPropertyDescriptor(Module, prop)) {
- Object.defineProperty(Module, prop, {
- configurable: true,
- get() {
- let extra = incomming ? ' (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)' : '';
- abort(`\`Module.${prop}\` has been replaced by \`${newName}\`` + extra);
- }
- });
- }
- }
- function ignoredModuleProp(prop) {
- if (Object.getOwnPropertyDescriptor(Module, prop)) {
- abort(`\`Module.${prop}\` was supplied but \`${prop}\` not included in INCOMING_MODULE_JS_API`);
- }
- }
- function isExportedByForceFilesystem(name) {
- return name === 'FS_createPath' ||
- name === 'FS_createDataFile' ||
- name === 'FS_createPreloadedFile' ||
- name === 'FS_unlink' ||
- name === 'addRunDependency' ||
-
- name === 'FS_createLazyFile' ||
- name === 'FS_createDevice' ||
- name === 'removeRunDependency';
- }
- function missingGlobal(sym, msg) {
- if (typeof globalThis !== 'undefined') {
- Object.defineProperty(globalThis, sym, {
- configurable: true,
- get() {
- warnOnce(`\`${sym}\` is not longer defined by emscripten. ${msg}`);
- return undefined;
- }
- });
- }
- }
- missingGlobal('buffer', 'Please use HEAP8.buffer or wasmMemory.buffer');
- missingGlobal('asm', 'Please use wasmExports instead');
- function missingLibrarySymbol(sym) {
- if (typeof globalThis !== 'undefined' && !Object.getOwnPropertyDescriptor(globalThis, sym)) {
- Object.defineProperty(globalThis, sym, {
- configurable: true,
- get() {
-
-
- var msg = `\`${sym}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`;
-
-
-
- var librarySymbol = sym;
- if (!librarySymbol.startsWith('_')) {
- librarySymbol = '$' + sym;
- }
- msg += ` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${librarySymbol}')`;
- if (isExportedByForceFilesystem(sym)) {
- msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';
- }
- warnOnce(msg);
- return undefined;
- }
- });
- }
-
-
- unexportedRuntimeSymbol(sym);
- }
- function unexportedRuntimeSymbol(sym) {
- if (!Object.getOwnPropertyDescriptor(Module, sym)) {
- Object.defineProperty(Module, sym, {
- configurable: true,
- get() {
- var msg = `'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;
- if (isExportedByForceFilesystem(sym)) {
- msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';
- }
- abort(msg);
- }
- });
- }
- }
- function dbg(...args) {
-
-
- console.warn(...args);
- }
- function ExitStatus(status) {
- this.name = 'ExitStatus';
- this.message = `Program terminated with exit(${status})`;
- this.status = status;
- }
- var callRuntimeCallbacks = (callbacks) => {
- while (callbacks.length > 0) {
-
- callbacks.shift()(Module);
- }
- };
- function getValue(ptr, type = 'i8') {
- if (type.endsWith('*')) type = '*';
- switch (type) {
- case 'i1': return HEAP8[ptr];
- case 'i8': return HEAP8[ptr];
- case 'i16': return HEAP16[((ptr) >> 1)];
- case 'i32': return HEAP32[((ptr) >> 2)];
- case 'i64': abort('to do getValue(i64) use WASM_BIGINT');
- case 'float': return HEAPF32[((ptr) >> 2)];
- case 'double': return HEAPF64[((ptr) >> 3)];
- case '*': return HEAPU32[((ptr) >> 2)];
- default: abort(`invalid type for getValue: ${type}`);
- }
- }
- var noExitRuntime = Module['noExitRuntime'] || true;
- var ptrToString = (ptr) => {
- assert(typeof ptr === 'number');
-
- ptr >>>= 0;
- return '0x' + ptr.toString(16).padStart(8, '0');
- };
- function setValue(ptr, value, type = 'i8') {
- if (type.endsWith('*')) type = '*';
- switch (type) {
- case 'i1': HEAP8[ptr] = value; break;
- case 'i8': HEAP8[ptr] = value; break;
- case 'i16': HEAP16[((ptr) >> 1)] = value; break;
- case 'i32': HEAP32[((ptr) >> 2)] = value; break;
- case 'i64': abort('to do setValue(i64) use WASM_BIGINT');
- case 'float': HEAPF32[((ptr) >> 2)] = value; break;
- case 'double': HEAPF64[((ptr) >> 3)] = value; break;
- case '*': HEAPU32[((ptr) >> 2)] = value; break;
- default: abort(`invalid type for setValue: ${type}`);
- }
- }
- var warnOnce = (text) => {
- warnOnce.shown ||= {};
- if (!warnOnce.shown[text]) {
- warnOnce.shown[text] = 1;
- if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text;
- err(text);
- }
- };
- var _emscripten_memcpy_js = (dest, src, num) => HEAPU8.copyWithin(dest, src, src + num);
- var getHeapMax = () =>
- HEAPU8.length;
- var abortOnCannotGrowMemory = (requestedSize) => {
- abort(`Cannot enlarge memory arrays to size ${requestedSize} bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value ${HEAP8.length}, (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0`);
- };
- var _emscripten_resize_heap = (requestedSize) => {
- var oldSize = HEAPU8.length;
-
- requestedSize >>>= 0;
- abortOnCannotGrowMemory(requestedSize);
- };
- var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
- var UTF8ArrayToString = (heapOrArray, idx, maxBytesToRead) => {
- var endIdx = idx + maxBytesToRead;
- var endPtr = idx;
-
-
-
-
-
- while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
- if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
- return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
- }
- var str = '';
-
-
- while (idx < endPtr) {
-
-
-
-
- var u0 = heapOrArray[idx++];
- if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
- var u1 = heapOrArray[idx++] & 63;
- if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
- var u2 = heapOrArray[idx++] & 63;
- if ((u0 & 0xF0) == 0xE0) {
- u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
- } else {
- if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte ' + ptrToString(u0) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!');
- u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);
- }
- if (u0 < 0x10000) {
- str += String.fromCharCode(u0);
- } else {
- var ch = u0 - 0x10000;
- str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
- }
- }
- return str;
- };
- var UTF8ToString = (ptr, maxBytesToRead) => {
- assert(typeof ptr == 'number', `UTF8ToString expects a number (got ${typeof ptr})`);
- return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
- };
- var SYSCALLS = {
- varargs: undefined,
- get() {
- assert(SYSCALLS.varargs != undefined);
-
- var ret = HEAP32[((+SYSCALLS.varargs) >> 2)];
- SYSCALLS.varargs += 4;
- return ret;
- },
- getp() { return SYSCALLS.get() },
- getStr(ptr) {
- var ret = UTF8ToString(ptr);
- return ret;
- },
- };
- var _fd_close = (fd) => {
- abort('fd_close called without SYSCALLS_REQUIRE_FILESYSTEM');
- };
- var convertI32PairToI53Checked = (lo, hi) => {
- assert(lo == (lo >>> 0) || lo == (lo | 0));
- assert(hi === (hi | 0));
- return ((hi + 0x200000) >>> 0 < 0x400001 - !!lo) ? (lo >>> 0) + hi * 4294967296 : NaN;
- };
- function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {
- var offset = convertI32PairToI53Checked(offset_low, offset_high);;
- return 70;
- ;
- }
- var printCharBuffers = [null, [], []];
- var printChar = (stream, curr) => {
- var buffer = printCharBuffers[stream];
- assert(buffer);
- if (curr === 0 || curr === 10) {
- (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0));
- buffer.length = 0;
- } else {
- buffer.push(curr);
- }
- };
- var flush_NO_FILESYSTEM = () => {
-
- _fflush(0);
- if (printCharBuffers[1].length) printChar(1, 10);
- if (printCharBuffers[2].length) printChar(2, 10);
- };
- var _fd_write = (fd, iov, iovcnt, pnum) => {
-
- var num = 0;
- for (var i = 0; i < iovcnt; i++) {
- var ptr = HEAPU32[((iov) >> 2)];
- var len = HEAPU32[(((iov) + (4)) >> 2)];
- iov += 8;
- for (var j = 0; j < len; j++) {
- printChar(fd, HEAPU8[ptr + j]);
- }
- num += len;
- }
- HEAPU32[((pnum) >> 2)] = num;
- return 0;
- };
- var runtimeKeepaliveCounter = 0;
- var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0;
- var _proc_exit = (code) => {
- EXITSTATUS = code;
- if (!keepRuntimeAlive()) {
- Module['onExit']?.(code);
- ABORT = true;
- }
- quit_(code, new ExitStatus(code));
- };
- var exitJS = (status, implicit) => {
- EXITSTATUS = status;
- checkUnflushedContent();
-
- if (keepRuntimeAlive() && !implicit) {
- 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)`;
- err(msg);
- }
- _proc_exit(status);
- };
- var handleException = (e) => {
-
-
-
-
-
- if (e instanceof ExitStatus || e == 'unwind') {
- return EXITSTATUS;
- }
- checkStackCookie();
- if (e instanceof WebAssembly.RuntimeError) {
- if (_emscripten_stack_get_current() <= 0) {
- err('Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 10485760)');
- }
- }
- quit_(1, e);
- };
- function checkIncomingModuleAPI() {
- ignoredModuleProp('fetchSettings');
- }
- var wasmImports = {
-
- emscripten_memcpy_js: _emscripten_memcpy_js,
-
- emscripten_resize_heap: _emscripten_resize_heap,
-
- fd_close: _fd_close,
-
- fd_seek: _fd_seek,
-
- fd_write: _fd_write
- };
- var wasmExports = createWasm();
- var ___wasm_call_ctors = createExportWrapper('__wasm_call_ctors');
- var _main = Module['_main'] = createExportWrapper('main');
- var _exchange_js_get_install_bts_save_address = Module['_exchange_js_get_install_bts_save_address'] = createExportWrapper('exchange_js_get_install_bts_save_address');
- var _exchange_js_get_route_bts_save_address = Module['_exchange_js_get_route_bts_save_address'] = createExportWrapper('exchange_js_get_route_bts_save_address');
- var _exchange_js_get_audio_data_save_address = Module['_exchange_js_get_audio_data_save_address'] = createExportWrapper('exchange_js_get_audio_data_save_address');
- var _exchange_js_notice_wasm_start_work = Module['_exchange_js_notice_wasm_start_work'] = createExportWrapper('exchange_js_notice_wasm_start_work');
- var _exchange_js_get_current_location_coord_save_address = Module['_exchange_js_get_current_location_coord_save_address'] = createExportWrapper('exchange_js_get_current_location_coord_save_address');
- var _exchange_js_notice_wasm_free_memory = Module['_exchange_js_notice_wasm_free_memory'] = createExportWrapper('exchange_js_notice_wasm_free_memory');
- var _exchange_js_notice_wasm_show_route_bts = Module['_exchange_js_notice_wasm_show_route_bts'] = createExportWrapper('exchange_js_notice_wasm_show_route_bts');
- var _exchange_js_notice_wasm_show_install_bts = Module['_exchange_js_notice_wasm_show_install_bts'] = createExportWrapper('exchange_js_notice_wasm_show_install_bts');
- var _fflush = createExportWrapper('fflush');
- var _emscripten_stack_init = () => (_emscripten_stack_init = wasmExports['emscripten_stack_init'])();
- var _emscripten_stack_get_free = () => (_emscripten_stack_get_free = wasmExports['emscripten_stack_get_free'])();
- var _emscripten_stack_get_base = () => (_emscripten_stack_get_base = wasmExports['emscripten_stack_get_base'])();
- var _emscripten_stack_get_end = () => (_emscripten_stack_get_end = wasmExports['emscripten_stack_get_end'])();
- var stackSave = createExportWrapper('stackSave');
- var stackRestore = createExportWrapper('stackRestore');
- var stackAlloc = createExportWrapper('stackAlloc');
- var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'])();
- var dynCall_jiji = Module['dynCall_jiji'] = createExportWrapper('dynCall_jiji');
- var missingLibrarySymbols = [
- 'writeI53ToI64',
- 'writeI53ToI64Clamped',
- 'writeI53ToI64Signaling',
- 'writeI53ToU64Clamped',
- 'writeI53ToU64Signaling',
- 'readI53FromI64',
- 'readI53FromU64',
- 'convertI32PairToI53',
- 'convertU32PairToI53',
- 'zeroMemory',
- 'growMemory',
- 'isLeapYear',
- 'ydayFromDate',
- 'arraySum',
- 'addDays',
- 'inetPton4',
- 'inetNtop4',
- 'inetPton6',
- 'inetNtop6',
- 'readSockaddr',
- 'writeSockaddr',
- 'initRandomFill',
- 'randomFill',
- 'getCallstack',
- 'emscriptenLog',
- 'convertPCtoSourceLocation',
- 'readEmAsmArgs',
- 'jstoi_q',
- 'getExecutableName',
- 'listenOnce',
- 'autoResumeAudioContext',
- 'dynCallLegacy',
- 'getDynCaller',
- 'dynCall',
- 'runtimeKeepalivePush',
- 'runtimeKeepalivePop',
- 'callUserCallback',
- 'maybeExit',
- 'asmjsMangle',
- 'asyncLoad',
- 'alignMemory',
- 'mmapAlloc',
- 'HandleAllocator',
- 'getNativeTypeSize',
- 'STACK_SIZE',
- 'STACK_ALIGN',
- 'POINTER_SIZE',
- 'ASSERTIONS',
- 'getCFunc',
- 'ccall',
- 'cwrap',
- 'uleb128Encode',
- 'sigToWasmTypes',
- 'generateFuncType',
- 'convertJsFunctionToWasm',
- 'getEmptyTableSlot',
- 'updateTableMap',
- 'getFunctionAddress',
- 'addFunction',
- 'removeFunction',
- 'reallyNegative',
- 'unSign',
- 'strLen',
- 'reSign',
- 'formatString',
- 'stringToUTF8Array',
- 'stringToUTF8',
- 'lengthBytesUTF8',
- 'intArrayFromString',
- 'intArrayToString',
- 'AsciiToString',
- 'stringToAscii',
- 'UTF16ToString',
- 'stringToUTF16',
- 'lengthBytesUTF16',
- 'UTF32ToString',
- 'stringToUTF32',
- 'lengthBytesUTF32',
- 'stringToNewUTF8',
- 'stringToUTF8OnStack',
- 'writeArrayToMemory',
- 'registerKeyEventCallback',
- 'maybeCStringToJsString',
- 'findEventTarget',
- 'getBoundingClientRect',
- 'fillMouseEventData',
- 'registerMouseEventCallback',
- 'registerWheelEventCallback',
- 'registerUiEventCallback',
- 'registerFocusEventCallback',
- 'fillDeviceOrientationEventData',
- 'registerDeviceOrientationEventCallback',
- 'fillDeviceMotionEventData',
- 'registerDeviceMotionEventCallback',
- 'screenOrientation',
- 'fillOrientationChangeEventData',
- 'registerOrientationChangeEventCallback',
- 'fillFullscreenChangeEventData',
- 'registerFullscreenChangeEventCallback',
- 'JSEvents_requestFullscreen',
- 'JSEvents_resizeCanvasForFullscreen',
- 'registerRestoreOldStyle',
- 'hideEverythingExceptGivenElement',
- 'restoreHiddenElements',
- 'setLetterbox',
- 'softFullscreenResizeWebGLRenderTarget',
- 'doRequestFullscreen',
- 'fillPointerlockChangeEventData',
- 'registerPointerlockChangeEventCallback',
- 'registerPointerlockErrorEventCallback',
- 'requestPointerLock',
- 'fillVisibilityChangeEventData',
- 'registerVisibilityChangeEventCallback',
- 'registerTouchEventCallback',
- 'fillGamepadEventData',
- 'registerGamepadEventCallback',
- 'registerBeforeUnloadEventCallback',
- 'fillBatteryEventData',
- 'battery',
- 'registerBatteryEventCallback',
- 'setCanvasElementSize',
- 'getCanvasElementSize',
- 'jsStackTrace',
- 'stackTrace',
- 'getEnvStrings',
- 'checkWasiClock',
- 'wasiRightsToMuslOFlags',
- 'wasiOFlagsToMuslOFlags',
- 'createDyncallWrapper',
- 'safeSetTimeout',
- 'setImmediateWrapped',
- 'clearImmediateWrapped',
- 'polyfillSetImmediate',
- 'getPromise',
- 'makePromise',
- 'idsToPromises',
- 'makePromiseCallback',
- 'ExceptionInfo',
- 'findMatchingCatch',
- 'Browser_asyncPrepareDataCounter',
- 'setMainLoop',
- 'getSocketFromFD',
- 'getSocketAddress',
- 'FS_createPreloadedFile',
- 'FS_modeStringToFlags',
- 'FS_getMode',
- 'FS_stdin_getChar',
- 'FS_createDataFile',
- 'FS_unlink',
- 'FS_mkdirTree',
- '_setNetworkCallback',
- 'heapObjectForWebGLType',
- 'toTypedArrayIndex',
- 'webgl_enable_ANGLE_instanced_arrays',
- 'webgl_enable_OES_vertex_array_object',
- 'webgl_enable_WEBGL_draw_buffers',
- 'webgl_enable_WEBGL_multi_draw',
- 'emscriptenWebGLGet',
- 'computeUnpackAlignedImageSize',
- 'colorChannelsInGlTextureFormat',
- 'emscriptenWebGLGetTexPixelData',
- 'emscriptenWebGLGetUniform',
- 'webglGetUniformLocation',
- 'webglPrepareUniformLocationsBeforeFirstUse',
- 'webglGetLeftBracePos',
- 'emscriptenWebGLGetVertexAttrib',
- '__glGetActiveAttribOrUniform',
- 'writeGLArray',
- 'registerWebGlEventCallback',
- 'runAndAbortIfError',
- 'SDL_unicode',
- 'SDL_ttfContext',
- 'SDL_audio',
- 'ALLOC_NORMAL',
- 'ALLOC_STACK',
- 'allocate',
- 'writeStringToMemory',
- 'writeAsciiToMemory',
- 'setErrNo',
- 'demangle',
- ];
- missingLibrarySymbols.forEach(missingLibrarySymbol)
- var unexportedSymbols = [
- 'run',
- 'addOnPreRun',
- 'addOnInit',
- 'addOnPreMain',
- 'addOnExit',
- 'addOnPostRun',
- 'addRunDependency',
- 'removeRunDependency',
- 'FS_createFolder',
- 'FS_createPath',
- 'FS_createLazyFile',
- 'FS_createLink',
- 'FS_createDevice',
- 'FS_readFile',
- 'out',
- 'err',
- 'callMain',
- 'abort',
- 'wasmMemory',
- 'wasmExports',
- 'stackAlloc',
- 'stackSave',
- 'stackRestore',
- 'getTempRet0',
- 'setTempRet0',
- 'writeStackCookie',
- 'checkStackCookie',
- 'convertI32PairToI53Checked',
- 'ptrToString',
- 'exitJS',
- 'getHeapMax',
- 'abortOnCannotGrowMemory',
- 'ENV',
- 'MONTH_DAYS_REGULAR',
- 'MONTH_DAYS_LEAP',
- 'MONTH_DAYS_REGULAR_CUMULATIVE',
- 'MONTH_DAYS_LEAP_CUMULATIVE',
- 'ERRNO_CODES',
- 'ERRNO_MESSAGES',
- 'DNS',
- 'Protocols',
- 'Sockets',
- 'timers',
- 'warnOnce',
- 'UNWIND_CACHE',
- 'readEmAsmArgsArray',
- 'jstoi_s',
- 'handleException',
- 'keepRuntimeAlive',
- 'wasmTable',
- 'noExitRuntime',
- 'freeTableIndexes',
- 'functionsInTableMap',
- 'setValue',
- 'getValue',
- 'PATH',
- 'PATH_FS',
- 'UTF8Decoder',
- 'UTF8ArrayToString',
- 'UTF8ToString',
- 'UTF16Decoder',
- 'JSEvents',
- 'specialHTMLTargets',
- 'findCanvasEventTarget',
- 'currentFullscreenStrategy',
- 'restoreOldWindowedStyle',
- 'ExitStatus',
- 'flush_NO_FILESYSTEM',
- 'promiseMap',
- 'uncaughtExceptionCount',
- 'exceptionLast',
- 'exceptionCaught',
- 'Browser',
- 'getPreloadedImageData__data',
- 'wget',
- 'SYSCALLS',
- 'preloadPlugins',
- 'FS_stdin_getChar_buffer',
- 'FS',
- 'MEMFS',
- 'TTY',
- 'PIPEFS',
- 'SOCKFS',
- 'tempFixedLengthArray',
- 'miniTempWebGLFloatBuffers',
- 'miniTempWebGLIntBuffers',
- 'GL',
- 'AL',
- 'GLUT',
- 'EGL',
- 'GLEW',
- 'IDBStore',
- 'SDL',
- 'SDL_gfx',
- 'allocateUTF8',
- 'allocateUTF8OnStack',
- ];
- unexportedSymbols.forEach(unexportedRuntimeSymbol);
- var calledRun;
- dependenciesFulfilled = function runCaller() {
-
- if (!calledRun) run();
- if (!calledRun) dependenciesFulfilled = runCaller;
- };
- function callMain() {
- assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');
- assert(__ATPRERUN__.length == 0, 'cannot call main when preRun functions remain to be called');
- var entryFunction = _main;
- var argc = 0;
- var argv = 0;
- try {
- var ret = entryFunction(argc, argv);
-
- exitJS(ret, true);
- return ret;
- }
- catch (e) {
- return handleException(e);
- }
- }
- function stackCheckInit() {
-
-
-
- _emscripten_stack_init();
-
- writeStackCookie();
- }
- function run() {
- if (runDependencies > 0) {
- return;
- }
- stackCheckInit();
- preRun();
-
- if (runDependencies > 0) {
- return;
- }
- function doRun() {
-
-
- if (calledRun) return;
- calledRun = true;
- Module['calledRun'] = true;
- if (ABORT) return;
- initRuntime();
- preMain();
- if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized']();
- if (shouldRunNow) callMain();
- postRun();
- }
- if (Module['setStatus']) {
- Module['setStatus']('Running...');
- setTimeout(function () {
- setTimeout(function () {
- Module['setStatus']('');
- }, 1);
- doRun();
- }, 1);
- } else {
- doRun();
- }
- checkStackCookie();
- }
- function checkUnflushedContent() {
-
-
-
-
-
-
-
-
-
-
-
- var oldOut = out;
- var oldErr = err;
- var has = false;
- out = err = (x) => {
- has = true;
- }
- try {
- flush_NO_FILESYSTEM();
- } catch (e) { }
- out = oldOut;
- err = oldErr;
- if (has) {
- warnOnce('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.');
- warnOnce('(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)');
- }
- }
- if (Module['preInit']) {
- if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']];
- while (Module['preInit'].length > 0) {
- Module['preInit'].pop()();
- }
- }
- var shouldRunNow = true;
- if (Module['noInitialRun']) shouldRunNow = false;
- run();
|