@goodtools/wiregasm
Version:
Packet Analyzer powered by Wireshark compiled for WebAssembly
644 lines (551 loc) • 392 kB
JavaScript
var loadWiregasm = (() => {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
return (
function(loadWiregasm = {}) {
// include: shell.js
// The Module object: Our interface to the outside world. We import
// and export values on it. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(Module) { ..generated code.. }
// 3. pre-run appended it, var Module = {}; ..generated code..
// 4. External script tag defines var Module.
// We need to check if Module already exists (e.g. case 3 above).
// Substitution will be replaced with actual code on later stage of the build,
// this way Closure Compiler will not mangle it (e.g. case 4. above).
// Note that if you want to run closure, and also to use Module
// after the generated code, you will need to define var Module = {};
// before the code. Then that object will be used in the code, and you
// can continue to use Module afterwards as well.
var Module = typeof loadWiregasm != 'undefined' ? loadWiregasm : {};
// Set up the promise that indicates the Module is initialized
var readyPromiseResolve, readyPromiseReject;
Module['ready'] = new Promise(function(resolve, reject) {
readyPromiseResolve = resolve;
readyPromiseReject = reject;
});
["_malloc","_fflush","___getTypeName","__embind_initialize_bindings","onRuntimeInitialized"].forEach((prop) => {
if (!Object.getOwnPropertyDescriptor(Module['ready'], prop)) {
Object.defineProperty(Module['ready'], prop, {
get: () => abort('You are getting ' + prop + ' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'),
set: () => abort('You are setting ' + prop + ' on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js'),
});
}
});
// --pre-jses are emitted after the Module integration code, so that they can
// refer to Module (if they choose; they can also define Module)
if (!Module.expectedDataFileDownloads) {
Module.expectedDataFileDownloads = 0;
}
Module.expectedDataFileDownloads++;
(function() {
// When running as a pthread, FS operations are proxied to the main thread, so we don't need to
// fetch the .data bundle on the worker
if (Module['ENVIRONMENT_IS_PTHREAD']) return;
var loadPackage = function(metadata) {
var PACKAGE_PATH = '';
if (typeof window === 'object') {
PACKAGE_PATH = window['encodeURIComponent'](window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/');
} else if (typeof process === 'undefined' && typeof location !== 'undefined') {
// web worker
PACKAGE_PATH = encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/');
}
var PACKAGE_NAME = 'wiregasm.data';
var REMOTE_PACKAGE_BASE = 'wiregasm.data';
if (typeof Module['locateFilePackage'] === 'function' && !Module['locateFile']) {
Module['locateFile'] = Module['locateFilePackage'];
err('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)');
}
var REMOTE_PACKAGE_NAME = Module['locateFile'] ? Module['locateFile'](REMOTE_PACKAGE_BASE, '') : REMOTE_PACKAGE_BASE;
var REMOTE_PACKAGE_SIZE = metadata['remote_package_size'];
function fetchRemotePackage(packageName, packageSize, callback, errback) {
if (typeof process === 'object' && typeof process.versions === 'object' && typeof process.versions.node === 'string') {
require('fs').readFile(packageName, function(err, contents) {
if (err) {
errback(err);
} else {
callback(contents.buffer);
}
});
return;
}
var xhr = new XMLHttpRequest();
xhr.open('GET', packageName, true);
xhr.responseType = 'arraybuffer';
xhr.onprogress = function(event) {
var url = packageName;
var size = packageSize;
if (event.total) size = event.total;
if (event.loaded) {
if (!xhr.addedTotal) {
xhr.addedTotal = true;
if (!Module.dataFileDownloads) Module.dataFileDownloads = {};
Module.dataFileDownloads[url] = {
loaded: event.loaded,
total: size
};
} else {
Module.dataFileDownloads[url].loaded = event.loaded;
}
var total = 0;
var loaded = 0;
var num = 0;
for (var download in Module.dataFileDownloads) {
var data = Module.dataFileDownloads[download];
total += data.total;
loaded += data.loaded;
num++;
}
total = Math.ceil(total * Module.expectedDataFileDownloads/num);
if (Module['setStatus']) Module['setStatus']('Downloading data... (' + loaded + '/' + total + ')');
} else if (!Module.dataFileDownloads) {
if (Module['setStatus']) Module['setStatus']('Downloading data...');
}
};
xhr.onerror = function(event) {
throw new Error("NetworkError for: " + packageName);
}
xhr.onload = function(event) {
if (xhr.status == 200 || xhr.status == 304 || xhr.status == 206 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0
var packageData = xhr.response;
callback(packageData);
} else {
throw new Error(xhr.statusText + " : " + xhr.responseURL);
}
};
xhr.send(null);
};
function handleError(error) {
console.error('package error:', error);
};
var fetchedCallback = null;
var fetched = Module['getPreloadedPackage'] ? Module['getPreloadedPackage'](REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE) : null;
if (!fetched) fetchRemotePackage(REMOTE_PACKAGE_NAME, REMOTE_PACKAGE_SIZE, function(data) {
if (fetchedCallback) {
fetchedCallback(data);
fetchedCallback = null;
} else {
fetched = data;
}
}, handleError);
function runWithFS() {
function assert(check, msg) {
if (!check) throw msg + new Error().stack;
}
Module['FS_createPath']("/", "wireshark", true, true);
Module['FS_createPath']("/wireshark", "diameter", true, true);
Module['FS_createPath']("/wireshark", "dtds", true, true);
Module['FS_createPath']("/wireshark", "profiles", true, true);
Module['FS_createPath']("/wireshark/profiles", "Bluetooth", true, true);
Module['FS_createPath']("/wireshark/profiles", "Classic", true, true);
Module['FS_createPath']("/wireshark/profiles", "No Reassembly", true, true);
Module['FS_createPath']("/wireshark", "radius", true, true);
Module['FS_createPath']("/wireshark", "tpncp", true, true);
Module['FS_createPath']("/wireshark", "wimaxasncp", true, true);
/** @constructor */
function DataRequest(start, end, audio) {
this.start = start;
this.end = end;
this.audio = audio;
}
DataRequest.prototype = {
requests: {},
open: function(mode, name) {
this.name = name;
this.requests[name] = this;
Module['addRunDependency']('fp ' + this.name);
},
send: function() {},
onload: function() {
var byteArray = this.byteArray.subarray(this.start, this.end);
this.finish(byteArray);
},
finish: function(byteArray) {
var that = this;
// canOwn this data in the filesystem, it is a slide into the heap that will never change
Module['FS_createDataFile'](this.name, null, byteArray, true, true, true);
Module['removeRunDependency']('fp ' + that.name);
this.requests[this.name] = null;
}
};
var files = metadata['files'];
for (var i = 0; i < files.length; ++i) {
new DataRequest(files[i]['start'], files[i]['end'], files[i]['audio'] || 0).open('GET', files[i]['filename']);
}
function processPackageData(arrayBuffer) {
assert(arrayBuffer, 'Loading data file failed.');
assert(arrayBuffer.constructor.name === ArrayBuffer.name, 'bad input to processPackageData');
var byteArray = new Uint8Array(arrayBuffer);
var curr;
// Reuse the bytearray from the XHR as the source for file reads.
DataRequest.prototype.byteArray = byteArray;
var files = metadata['files'];
for (var i = 0; i < files.length; ++i) {
DataRequest.prototype.requests[files[i].filename].onload();
} Module['removeRunDependency']('datafile_wiregasm.data');
};
Module['addRunDependency']('datafile_wiregasm.data');
if (!Module.preloadResults) Module.preloadResults = {};
Module.preloadResults[PACKAGE_NAME] = {fromCache: false};
if (fetched) {
processPackageData(fetched);
fetched = null;
} else {
fetchedCallback = processPackageData;
}
}
if (Module['calledRun']) {
runWithFS();
} else {
if (!Module['preRun']) Module['preRun'] = [];
Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it
}
}
loadPackage({"files": [{"filename": "/wireshark/Acknowledgements.md", "start": 0, "end": 1544}, {"filename": "/wireshark/COPYING", "start": 1544, "end": 19636}, {"filename": "/wireshark/cfilters", "start": 19636, "end": 20218}, {"filename": "/wireshark/colorfilters", "start": 20218, "end": 22209}, {"filename": "/wireshark/console.lua", "start": 22209, "end": 24730}, {"filename": "/wireshark/dfilter_macros", "start": 24730, "end": 25028}, {"filename": "/wireshark/dfilters", "start": 25028, "end": 25682}, {"filename": "/wireshark/diameter/AlcatelLucent.xml", "start": 25682, "end": 27819}, {"filename": "/wireshark/diameter/Cisco.xml", "start": 27819, "end": 76499}, {"filename": "/wireshark/diameter/CiscoSystems.xml", "start": 76499, "end": 85544}, {"filename": "/wireshark/diameter/Custom.xml", "start": 85544, "end": 85881}, {"filename": "/wireshark/diameter/Ericsson.xml", "start": 85881, "end": 109674}, {"filename": "/wireshark/diameter/HP.xml", "start": 109674, "end": 111296}, {"filename": "/wireshark/diameter/Huawei.xml", "start": 111296, "end": 115724}, {"filename": "/wireshark/diameter/Inovar.xml", "start": 115724, "end": 118805}, {"filename": "/wireshark/diameter/Juniper.xml", "start": 118805, "end": 120625}, {"filename": "/wireshark/diameter/Metaswitch.xml", "start": 120625, "end": 124442}, {"filename": "/wireshark/diameter/Microsoft.xml", "start": 124442, "end": 125674}, {"filename": "/wireshark/diameter/Nokia.xml", "start": 125674, "end": 127256}, {"filename": "/wireshark/diameter/NokiaSolutionsAndNetworks.xml", "start": 127256, "end": 132080}, {"filename": "/wireshark/diameter/Oracle.xml", "start": 132080, "end": 132931}, {"filename": "/wireshark/diameter/Siemens.xml", "start": 132931, "end": 133571}, {"filename": "/wireshark/diameter/Starent.xml", "start": 133571, "end": 231424}, {"filename": "/wireshark/diameter/TGPP.xml", "start": 231424, "end": 322202}, {"filename": "/wireshark/diameter/TGPP2.xml", "start": 322202, "end": 327806}, {"filename": "/wireshark/diameter/Telefonica.xml", "start": 327806, "end": 339243}, {"filename": "/wireshark/diameter/VerizonWireless.xml", "start": 339243, "end": 342106}, {"filename": "/wireshark/diameter/Vodafone.xml", "start": 342106, "end": 345551}, {"filename": "/wireshark/diameter/chargecontrol.xml", "start": 345551, "end": 356078}, {"filename": "/wireshark/diameter/dictionary.dtd", "start": 356078, "end": 357945}, {"filename": "/wireshark/diameter/dictionary.xml", "start": 357945, "end": 761217}, {"filename": "/wireshark/diameter/eap.xml", "start": 761217, "end": 761770}, {"filename": "/wireshark/diameter/etsie2e4.xml", "start": 761770, "end": 777307}, {"filename": "/wireshark/diameter/mobileipv4.xml", "start": 777307, "end": 784108}, {"filename": "/wireshark/diameter/mobileipv6.xml", "start": 784108, "end": 786853}, {"filename": "/wireshark/diameter/nasreq.xml", "start": 786853, "end": 790798}, {"filename": "/wireshark/diameter/sip.xml", "start": 790798, "end": 797924}, {"filename": "/wireshark/diameter/sunping.xml", "start": 797924, "end": 798711}, {"filename": "/wireshark/dtd_gen.lua", "start": 798711, "end": 806408}, {"filename": "/wireshark/dtds/dc.dtd", "start": 806408, "end": 807189}, {"filename": "/wireshark/dtds/itunes.dtd", "start": 807189, "end": 807713}, {"filename": "/wireshark/dtds/mscml.dtd", "start": 807713, "end": 815254}, {"filename": "/wireshark/dtds/pocsettings.dtd", "start": 815254, "end": 816169}, {"filename": "/wireshark/dtds/presence.dtd", "start": 816169, "end": 816743}, {"filename": "/wireshark/dtds/reginfo.dtd", "start": 816743, "end": 817851}, {"filename": "/wireshark/dtds/rlmi.dtd", "start": 817851, "end": 818621}, {"filename": "/wireshark/dtds/rss.dtd", "start": 818621, "end": 821016}, {"filename": "/wireshark/dtds/smil.dtd", "start": 821016, "end": 828576}, {"filename": "/wireshark/dtds/watcherinfo.dtd", "start": 828576, "end": 829377}, {"filename": "/wireshark/dtds/xcap-caps.dtd", "start": 829377, "end": 829675}, {"filename": "/wireshark/dtds/xcap-error.dtd", "start": 829675, "end": 831248}, {"filename": "/wireshark/enterprises.tsv", "start": 831248, "end": 2466565}, {"filename": "/wireshark/gpl-2.0-standalone.html", "start": 2466565, "end": 2486571}, {"filename": "/wireshark/init.lua", "start": 2486571, "end": 2504293}, {"filename": "/wireshark/ipmap.html", "start": 2504293, "end": 2518221}, {"filename": "/wireshark/manuf", "start": 2518221, "end": 4606127}, {"filename": "/wireshark/pdml2html.xsl", "start": 4606127, "end": 4612530}, {"filename": "/wireshark/profiles/Bluetooth/colorfilters", "start": 4612530, "end": 4615666}, {"filename": "/wireshark/profiles/Bluetooth/preferences", "start": 4615666, "end": 4616056}, {"filename": "/wireshark/profiles/Classic/colorfilters", "start": 4616056, "end": 4617788}, {"filename": "/wireshark/profiles/No Reassembly/preferences", "start": 4617788, "end": 4622527}, {"filename": "/wireshark/radius/README.radius_dictionary", "start": 4622527, "end": 4625375}, {"filename": "/wireshark/radius/custom.includes", "start": 4625375, "end": 4625462}, {"filename": "/wireshark/radius/dictionary", "start": 4625462, "end": 4636249}, {"filename": "/wireshark/radius/dictionary.3com", "start": 4636249, "end": 4637748}, {"filename": "/wireshark/radius/dictionary.3gpp", "start": 4637748, "end": 4641414}, {"filename": "/wireshark/radius/dictionary.3gpp2", "start": 4641414, "end": 4656730}, {"filename": "/wireshark/radius/dictionary.acc", "start": 4656730, "end": 4667650}, {"filename": "/wireshark/radius/dictionary.acme", "start": 4667650, "end": 4677255}, {"filename": "/wireshark/radius/dictionary.actelis", "start": 4677255, "end": 4677680}, {"filename": "/wireshark/radius/dictionary.aerohive", "start": 4677680, "end": 4678505}, {"filename": "/wireshark/radius/dictionary.airespace", "start": 4678505, "end": 4680075}, {"filename": "/wireshark/radius/dictionary.alcatel", "start": 4680075, "end": 4683727}, {"filename": "/wireshark/radius/dictionary.alcatel-lucent.aaa", "start": 4683727, "end": 4687030}, {"filename": "/wireshark/radius/dictionary.alcatel.esam", "start": 4687030, "end": 4694607}, {"filename": "/wireshark/radius/dictionary.alcatel.sr", "start": 4694607, "end": 4697352}, {"filename": "/wireshark/radius/dictionary.alteon", "start": 4697352, "end": 4698316}, {"filename": "/wireshark/radius/dictionary.altiga", "start": 4698316, "end": 4705760}, {"filename": "/wireshark/radius/dictionary.alvarion", "start": 4705760, "end": 4717662}, {"filename": "/wireshark/radius/dictionary.alvarion.wimax.v2_2", "start": 4717662, "end": 4718876}, {"filename": "/wireshark/radius/dictionary.apc", "start": 4718876, "end": 4720010}, {"filename": "/wireshark/radius/dictionary.aptilo", "start": 4720010, "end": 4726030}, {"filename": "/wireshark/radius/dictionary.aptis", "start": 4726030, "end": 4734479}, {"filename": "/wireshark/radius/dictionary.arbor", "start": 4734479, "end": 4734974}, {"filename": "/wireshark/radius/dictionary.aruba", "start": 4734974, "end": 4737742}, {"filename": "/wireshark/radius/dictionary.ascend", "start": 4737742, "end": 4797227}, {"filename": "/wireshark/radius/dictionary.asn", "start": 4797227, "end": 4800332}, {"filename": "/wireshark/radius/dictionary.audiocodes", "start": 4800332, "end": 4800963}, {"filename": "/wireshark/radius/dictionary.avaya", "start": 4800963, "end": 4801897}, {"filename": "/wireshark/radius/dictionary.azaire", "start": 4801897, "end": 4803497}, {"filename": "/wireshark/radius/dictionary.bay", "start": 4803497, "end": 4815404}, {"filename": "/wireshark/radius/dictionary.bintec", "start": 4815404, "end": 4817025}, {"filename": "/wireshark/radius/dictionary.bluecoat", "start": 4817025, "end": 4817760}, {"filename": "/wireshark/radius/dictionary.bristol", "start": 4817760, "end": 4818244}, {"filename": "/wireshark/radius/dictionary.broadsoft", "start": 4818244, "end": 4835895}, {"filename": "/wireshark/radius/dictionary.brocade", "start": 4835895, "end": 4836583}, {"filename": "/wireshark/radius/dictionary.bskyb", "start": 4836583, "end": 4837240}, {"filename": "/wireshark/radius/dictionary.bt", "start": 4837240, "end": 4837644}, {"filename": "/wireshark/radius/dictionary.cablelabs", "start": 4837644, "end": 4848190}, {"filename": "/wireshark/radius/dictionary.cabletron", "start": 4848190, "end": 4849062}, {"filename": "/wireshark/radius/dictionary.camiant", "start": 4849062, "end": 4849650}, {"filename": "/wireshark/radius/dictionary.chillispot", "start": 4849650, "end": 4851066}, {"filename": "/wireshark/radius/dictionary.cisco", "start": 4851066, "end": 4860339}, {"filename": "/wireshark/radius/dictionary.cisco.asa", "start": 4860339, "end": 4875169}, {"filename": "/wireshark/radius/dictionary.cisco.bbsm", "start": 4875169, "end": 4875572}, {"filename": "/wireshark/radius/dictionary.cisco.vpn3000", "start": 4875572, "end": 4891677}, {"filename": "/wireshark/radius/dictionary.cisco.vpn5000", "start": 4891677, "end": 4892351}, {"filename": "/wireshark/radius/dictionary.citrix", "start": 4892351, "end": 4892987}, {"filename": "/wireshark/radius/dictionary.clavister", "start": 4892987, "end": 4893443}, {"filename": "/wireshark/radius/dictionary.cnergee", "start": 4893443, "end": 4894938}, {"filename": "/wireshark/radius/dictionary.colubris", "start": 4894938, "end": 4895253}, {"filename": "/wireshark/radius/dictionary.columbia_university", "start": 4895253, "end": 4895894}, {"filename": "/wireshark/radius/dictionary.compat", "start": 4895894, "end": 4897408}, {"filename": "/wireshark/radius/dictionary.compatible", "start": 4897408, "end": 4898001}, {"filename": "/wireshark/radius/dictionary.cosine", "start": 4898001, "end": 4898730}, {"filename": "/wireshark/radius/dictionary.dante", "start": 4898730, "end": 4899176}, {"filename": "/wireshark/radius/dictionary.dellemc", "start": 4899176, "end": 4899618}, {"filename": "/wireshark/radius/dictionary.dhcp", "start": 4899618, "end": 4917266}, {"filename": "/wireshark/radius/dictionary.digium", "start": 4917266, "end": 4918511}, {"filename": "/wireshark/radius/dictionary.dlink", "start": 4918511, "end": 4919586}, {"filename": "/wireshark/radius/dictionary.dragonwave", "start": 4919586, "end": 4920383}, {"filename": "/wireshark/radius/dictionary.efficientip", "start": 4920383, "end": 4921363}, {"filename": "/wireshark/radius/dictionary.eltex", "start": 4921363, "end": 4922212}, {"filename": "/wireshark/radius/dictionary.enterasys", "start": 4922212, "end": 4924462}, {"filename": "/wireshark/radius/dictionary.epygi", "start": 4924462, "end": 4928804}, {"filename": "/wireshark/radius/dictionary.equallogic", "start": 4928804, "end": 4930310}, {"filename": "/wireshark/radius/dictionary.ericsson", "start": 4930310, "end": 4936616}, {"filename": "/wireshark/radius/dictionary.ericsson.ab", "start": 4936616, "end": 4964219}, {"filename": "/wireshark/radius/dictionary.ericsson.packet.core.networks", "start": 4964219, "end": 4964521}, {"filename": "/wireshark/radius/dictionary.extreme", "start": 4964521, "end": 4967138}, {"filename": "/wireshark/radius/dictionary.f5", "start": 4967138, "end": 4968953}, {"filename": "/wireshark/radius/dictionary.fdxtended", "start": 4968953, "end": 4969512}, {"filename": "/wireshark/radius/dictionary.fortinet", "start": 4969512, "end": 4970256}, {"filename": "/wireshark/radius/dictionary.foundry", "start": 4970256, "end": 4972169}, {"filename": "/wireshark/radius/dictionary.freedhcp", "start": 4972169, "end": 4989566}, {"filename": "/wireshark/radius/dictionary.freeradius", "start": 4989566, "end": 4995195}, {"filename": "/wireshark/radius/dictionary.freeradius.internal", "start": 4995195, "end": 5022066}, {"filename": "/wireshark/radius/dictionary.freeswitch", "start": 5022066, "end": 5026671}, {"filename": "/wireshark/radius/dictionary.gandalf", "start": 5026671, "end": 5030337}, {"filename": "/wireshark/radius/dictionary.garderos", "start": 5030337, "end": 5030845}, {"filename": "/wireshark/radius/dictionary.gemtek", "start": 5030845, "end": 5031397}, {"filename": "/wireshark/radius/dictionary.h3c", "start": 5031397, "end": 5034667}, {"filename": "/wireshark/radius/dictionary.hp", "start": 5034667, "end": 5037161}, {"filename": "/wireshark/radius/dictionary.huawei", "start": 5037161, "end": 5046427}, {"filename": "/wireshark/radius/dictionary.iana", "start": 5046427, "end": 5047612}, {"filename": "/wireshark/radius/dictionary.identity_engines", "start": 5047612, "end": 5047987}, {"filename": "/wireshark/radius/dictionary.iea", "start": 5047987, "end": 5049009}, {"filename": "/wireshark/radius/dictionary.infoblox", "start": 5049009, "end": 5049495}, {"filename": "/wireshark/radius/dictionary.infonet", "start": 5049495, "end": 5051044}, {"filename": "/wireshark/radius/dictionary.ipunplugged", "start": 5051044, "end": 5051852}, {"filename": "/wireshark/radius/dictionary.issanni", "start": 5051852, "end": 5053158}, {"filename": "/wireshark/radius/dictionary.itk", "start": 5053158, "end": 5054686}, {"filename": "/wireshark/radius/dictionary.jradius", "start": 5054686, "end": 5055103}, {"filename": "/wireshark/radius/dictionary.juniper", "start": 5055103, "end": 5057260}, {"filename": "/wireshark/radius/dictionary.karlnet", "start": 5057260, "end": 5160039}, {"filename": "/wireshark/radius/dictionary.kineto", "start": 5160039, "end": 5164683}, {"filename": "/wireshark/radius/dictionary.lancom", "start": 5164683, "end": 5166060}, {"filename": "/wireshark/radius/dictionary.livingston", "start": 5166060, "end": 5168286}, {"filename": "/wireshark/radius/dictionary.localweb", "start": 5168286, "end": 5169379}, {"filename": "/wireshark/radius/dictionary.lucent", "start": 5169379, "end": 5190548}, {"filename": "/wireshark/radius/dictionary.manzara", "start": 5190548, "end": 5191486}, {"filename": "/wireshark/radius/dictionary.meinberg", "start": 5191486, "end": 5192097}, {"filename": "/wireshark/radius/dictionary.meraki", "start": 5192097, "end": 5192429}, {"filename": "/wireshark/radius/dictionary.merit", "start": 5192429, "end": 5192760}, {"filename": "/wireshark/radius/dictionary.meru", "start": 5192760, "end": 5193071}, {"filename": "/wireshark/radius/dictionary.microsemi", "start": 5193071, "end": 5193639}, {"filename": "/wireshark/radius/dictionary.microsoft", "start": 5193639, "end": 5199927}, {"filename": "/wireshark/radius/dictionary.mikrotik", "start": 5199927, "end": 5202075}, {"filename": "/wireshark/radius/dictionary.motorola", "start": 5202075, "end": 5205148}, {"filename": "/wireshark/radius/dictionary.motorola.wimax", "start": 5205148, "end": 5206468}, {"filename": "/wireshark/radius/dictionary.navini", "start": 5206468, "end": 5206847}, {"filename": "/wireshark/radius/dictionary.netscreen", "start": 5206847, "end": 5207798}, {"filename": "/wireshark/radius/dictionary.networkphysics", "start": 5207798, "end": 5208300}, {"filename": "/wireshark/radius/dictionary.nexans", "start": 5208300, "end": 5208904}, {"filename": "/wireshark/radius/dictionary.nokia", "start": 5208904, "end": 5210261}, {"filename": "/wireshark/radius/dictionary.nokia.conflict", "start": 5210261, "end": 5211320}, {"filename": "/wireshark/radius/dictionary.nomadix", "start": 5211320, "end": 5212417}, {"filename": "/wireshark/radius/dictionary.nortel", "start": 5212417, "end": 5214772}, {"filename": "/wireshark/radius/dictionary.ntua", "start": 5214772, "end": 5216108}, {"filename": "/wireshark/radius/dictionary.openser", "start": 5216108, "end": 5217507}, {"filename": "/wireshark/radius/dictionary.packeteer", "start": 5217507, "end": 5218121}, {"filename": "/wireshark/radius/dictionary.paloalto", "start": 5218121, "end": 5218748}, {"filename": "/wireshark/radius/dictionary.patton", "start": 5218748, "end": 5227269}, {"filename": "/wireshark/radius/dictionary.perle", "start": 5227269, "end": 5249969}, {"filename": "/wireshark/radius/dictionary.propel", "start": 5249969, "end": 5250460}, {"filename": "/wireshark/radius/dictionary.prosoft", "start": 5250460, "end": 5251783}, {"filename": "/wireshark/radius/dictionary.proxim", "start": 5251783, "end": 5254944}, {"filename": "/wireshark/radius/dictionary.purewave", "start": 5254944, "end": 5256489}, {"filename": "/wireshark/radius/dictionary.quiconnect", "start": 5256489, "end": 5257016}, {"filename": "/wireshark/radius/dictionary.quintum", "start": 5257016, "end": 5258564}, {"filename": "/wireshark/radius/dictionary.redcreek", "start": 5258564, "end": 5259239}, {"filename": "/wireshark/radius/dictionary.rfc2865", "start": 5259239, "end": 5263348}, {"filename": "/wireshark/radius/dictionary.rfc2866", "start": 5263348, "end": 5265197}, {"filename": "/wireshark/radius/dictionary.rfc2867", "start": 5265197, "end": 5265769}, {"filename": "/wireshark/radius/dictionary.rfc2868", "start": 5265769, "end": 5267487}, {"filename": "/wireshark/radius/dictionary.rfc2869", "start": 5267487, "end": 5268604}, {"filename": "/wireshark/radius/dictionary.rfc3162", "start": 5268604, "end": 5269073}, {"filename": "/wireshark/radius/dictionary.rfc3576", "start": 5269073, "end": 5270112}, {"filename": "/wireshark/radius/dictionary.rfc3580", "start": 5270112, "end": 5270631}, {"filename": "/wireshark/radius/dictionary.rfc4072", "start": 5270631, "end": 5270779}, {"filename": "/wireshark/radius/dictionary.rfc4372", "start": 5270779, "end": 5270936}, {"filename": "/wireshark/radius/dictionary.rfc4603", "start": 5270936, "end": 5271495}, {"filename": "/wireshark/radius/dictionary.rfc4675", "start": 5271495, "end": 5272281}, {"filename": "/wireshark/radius/dictionary.rfc4679", "start": 5272281, "end": 5274206}, {"filename": "/wireshark/radius/dictionary.rfc4818", "start": 5274206, "end": 5274636}, {"filename": "/wireshark/radius/dictionary.rfc4849", "start": 5274636, "end": 5274897}, {"filename": "/wireshark/radius/dictionary.rfc5090", "start": 5274897, "end": 5275894}, {"filename": "/wireshark/radius/dictionary.rfc5176", "start": 5275894, "end": 5276227}, {"filename": "/wireshark/radius/dictionary.rfc5447", "start": 5276227, "end": 5276643}, {"filename": "/wireshark/radius/dictionary.rfc5580", "start": 5276643, "end": 5277805}, {"filename": "/wireshark/radius/dictionary.rfc5607", "start": 5277805, "end": 5278736}, {"filename": "/wireshark/radius/dictionary.rfc5904", "start": 5278736, "end": 5279341}, {"filename": "/wireshark/radius/dictionary.rfc6519", "start": 5279341, "end": 5279607}, {"filename": "/wireshark/radius/dictionary.rfc6572", "start": 5279607, "end": 5280735}, {"filename": "/wireshark/radius/dictionary.rfc6677", "start": 5280735, "end": 5281312}, {"filename": "/wireshark/radius/dictionary.rfc6911", "start": 5281312, "end": 5281724}, {"filename": "/wireshark/radius/dictionary.rfc6929", "start": 5281724, "end": 5282683}, {"filename": "/wireshark/radius/dictionary.rfc6930", "start": 5282683, "end": 5283038}, {"filename": "/wireshark/radius/dictionary.rfc7055", "start": 5283038, "end": 5283416}, {"filename": "/wireshark/radius/dictionary.rfc7155", "start": 5283416, "end": 5283803}, {"filename": "/wireshark/radius/dictionary.rfc7268", "start": 5283803, "end": 5286167}, {"filename": "/wireshark/radius/dictionary.rfc7499", "start": 5286167, "end": 5286634}, {"filename": "/wireshark/radius/dictionary.rfc7930", "start": 5286634, "end": 5286908}, {"filename": "/wireshark/radius/dictionary.riverbed", "start": 5286908, "end": 5287505}, {"filename": "/wireshark/radius/dictionary.riverstone", "start": 5287505, "end": 5288642}, {"filename": "/wireshark/radius/dictionary.roaringpenguin", "start": 5288642, "end": 5289385}, {"filename": "/wireshark/radius/dictionary.ruckus", "start": 5289385, "end": 5294490}, {"filename": "/wireshark/radius/dictionary.ruggedcom", "start": 5294490, "end": 5294695}, {"filename": "/wireshark/radius/dictionary.sangoma", "start": 5294695, "end": 5299117}, {"filename": "/wireshark/radius/dictionary.sg", "start": 5299117, "end": 5305129}, {"filename": "/wireshark/radius/dictionary.shasta", "start": 5305129, "end": 5305685}, {"filename": "/wireshark/radius/dictionary.shiva", "start": 5305685, "end": 5309909}, {"filename": "/wireshark/radius/dictionary.siemens", "start": 5309909, "end": 5310691}, {"filename": "/wireshark/radius/dictionary.slipstream", "start": 5310691, "end": 5311227}, {"filename": "/wireshark/radius/dictionary.sofaware", "start": 5311227, "end": 5312367}, {"filename": "/wireshark/radius/dictionary.sonicwall", "start": 5312367, "end": 5315088}, {"filename": "/wireshark/radius/dictionary.springtide", "start": 5315088, "end": 5316153}, {"filename": "/wireshark/radius/dictionary.starent", "start": 5316153, "end": 5377025}, {"filename": "/wireshark/radius/dictionary.starent.vsa1", "start": 5377025, "end": 5432741}, {"filename": "/wireshark/radius/dictionary.surfnet", "start": 5432741, "end": 5433245}, {"filename": "/wireshark/radius/dictionary.symbol", "start": 5433245, "end": 5436468}, {"filename": "/wireshark/radius/dictionary.t_systems_nova", "start": 5436468, "end": 5437730}, {"filename": "/wireshark/radius/dictionary.telebit", "start": 5437730, "end": 5438213}, {"filename": "/wireshark/radius/dictionary.telkom", "start": 5438213, "end": 5439217}, {"filename": "/wireshark/radius/dictionary.terena", "start": 5439217, "end": 5439575}, {"filename": "/wireshark/radius/dictionary.trapeze", "start": 5439575, "end": 5441019}, {"filename": "/wireshark/radius/dictionary.travelping", "start": 5441019, "end": 5444185}, {"filename": "/wireshark/radius/dictionary.tropos", "start": 5444185, "end": 5446350}, {"filename": "/wireshark/radius/dictionary.ukerna", "start": 5446350, "end": 5447290}, {"filename": "/wireshark/radius/dictionary.unisphere", "start": 5447290, "end": 5462671}, {"filename": "/wireshark/radius/dictionary.unix", "start": 5462671, "end": 5463124}, {"filename": "/wireshark/radius/dictionary.usr", "start": 5463124, "end": 5537242}, {"filename": "/wireshark/radius/dictionary.utstarcom", "start": 5537242, "end": 5538908}, {"filename": "/wireshark/radius/dictionary.valemount", "start": 5538908, "end": 5539641}, {"filename": "/wireshark/radius/dictionary.verizon", "start": 5539641, "end": 5540454}, {"filename": "/wireshark/radius/dictionary.versanet", "start": 5540454, "end": 5542598}, {"filename": "/wireshark/radius/dictionary.vqp", "start": 5542598, "end": 5545706}, {"filename": "/wireshark/radius/dictionary.walabi", "start": 5545706, "end": 5546670}, {"filename": "/wireshark/radius/dictionary.waverider", "start": 5546670, "end": 5548634}, {"filename": "/wireshark/radius/dictionary.wichorus", "start": 5548634, "end": 5549207}, {"filename": "/wireshark/radius/dictionary.wimax", "start": 5549207, "end": 5565476}, {"filename": "/wireshark/radius/dictionary.wimax.alvarion", "start": 5565476, "end": 5584887}, {"filename": "/wireshark/radius/dictionary.wimax.wichorus", "start": 5584887, "end": 5600312}, {"filename": "/wireshark/radius/dictionary.wispr", "start": 5600312, "end": 5601341}, {"filename": "/wireshark/radius/dictionary.xedia", "start": 5601341, "end": 5602166}, {"filename": "/wireshark/radius/dictionary.xylan", "start": 5602166, "end": 5603707}, {"filename": "/wireshark/radius/dictionary.yubico", "start": 5603707, "end": 5604349}, {"filename": "/wireshark/radius/dictionary.zeus", "start": 5604349, "end": 5604551}, {"filename": "/wireshark/radius/dictionary.zte", "start": 5604551, "end": 5607147}, {"filename": "/wireshark/radius/dictionary.zyxel", "start": 5607147, "end": 5607912}, {"filename": "/wireshark/services", "start": 5607912, "end": 5877761}, {"filename": "/wireshark/smi_modules", "start": 5877761, "end": 5878076}, {"filename": "/wireshark/tpncp/tpncp.dat", "start": 5878076, "end": 6528250}, {"filename": "/wireshark/wimaxasncp/dictionary.dtd", "start": 6528250, "end": 6528557}, {"filename": "/wireshark/wimaxasncp/dictionary.xml", "start": 6528557, "end": 6620048}, {"filename": "/wireshark/wka", "start": 6620048, "end": 6631269}, {"filename": "/wireshark/ws.css", "start": 6631269, "end": 6671939}], "remote_package_size": 6671939});
})();
// All the pre-js content up to here must remain later on, we need to run
// it.
if (Module['ENVIRONMENT_IS_PTHREAD']) Module['preRun'] = [];
var necessaryPreJSTasks = Module['preRun'].slice();
// defaults
if (!Module["print"])
Module.print = function (text) {
console.log(text);
};
if (!Module["printErr"])
Module.printErr = function (text) {
console.warn(text);
};
if (!Module["handleStatus"])
Module.handleStatus = function (type, status) {
console.log(type, status);
};
// initialize FS with directories
Module["onRuntimeInitialized"] = () => {
Module.FS.mkdir("/plugins");
Module.FS.mkdir("/uploads");
};
if (!Module['preRun']) throw 'Module.preRun should exist because file support used it; did a pre-js delete it?';
necessaryPreJSTasks.forEach(function(task) {
if (Module['preRun'].indexOf(task) < 0) throw 'All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?';
});
// Sometimes an existing Module object exists with properties
// meant to overwrite the default module functionality. Here
// we collect those properties and reapply _after_ we configure
// the current environment's defaults to avoid having to be so
// defensive during initialization.
var moduleOverrides = Object.assign({}, Module);
var arguments_ = [];
var thisProgram = './this.program';
var quit_ = (status, toThrow) => {
throw toThrow;
};
// Determine the runtime environment we are in. You can customize this by
// setting the ENVIRONMENT setting at compile time (see settings.js).
// Attempt to auto-detect the environment
var ENVIRONMENT_IS_WEB = typeof window == 'object';
var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function';
// N.b. Electron.js environment is simultaneously a NODE-environment, but
// also a web environment.
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)');
}
// `/` should be present at the end if `scriptDirectory` is not empty
var scriptDirectory = '';
function locateFile(path) {
if (Module['locateFile']) {
return Module['locateFile'](path, scriptDirectory);
}
return scriptDirectory + path;
}
// Hooks that are implemented differently in different runtime environments.
var read_,
readAsync,
readBinary,
setWindowTitle;
// Normally we don't log exceptions but instead let them bubble out the top
// level where the embedding environment (e.g. the browser) can handle
// them.
// However under v8 and node we sometimes exit the process direcly in which case
// its up to use us to log the exception before exiting.
// If we fix https://github.com/emscripten-core/emscripten/issues/15080
// this may no longer be needed under node.
function logExceptionOnExit(e) {
if (e instanceof ExitStatus) return;
let toLog = e;
if (e && typeof e == 'object' && e.stack) {
toLog = [e, e.stack];
}
err('exiting due to exception: ' + toLog);
}
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?)');
// `require()` is no-op in an ESM module, use `createRequire()` to construct
// the require()` function. This is only necessary for multi-environment
// builds, `-sENVIRONMENT=node` emits a static import declaration instead.
// TODO: Swap all `require()`'s with `import()`'s?
// These modules will usually be used on Node.js. Load them eagerly to avoid
// the complexity of lazy-loading.
var fs = require('fs');
var nodePath = require('path');
if (ENVIRONMENT_IS_WORKER) {
scriptDirectory = nodePath.dirname(scriptDirectory) + '/';
} else {
scriptDirectory = __dirname + '/';
}
// include: node_shell_read.js
read_ = (filename, binary) => {
// We need to re-wrap `file://` strings to URLs. Normalizing isn't
// necessary in that case, the path should already be absolute.
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) => {
// See the comment in the `read_` function.
filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
fs.readFile(filename, function(err, data) {
if (err) onerror(err);
else onload(data.buffer);
});
};
// end include: node_shell_read.js
if (process['argv'].length > 1) {
thisProgram = process['argv'][1].replace(/\\/g, '/');
}
arguments_ = process['argv'].slice(2);
// MODULARIZE will export the module in the proper place outside, we don't need to export here
process['on']('uncaughtException', function(ex) {
// suppress ExitStatus exceptions from showing an error
if (!(ex instanceof ExitStatus)) {
throw ex;
}
});
// Without this older versions of node (< v15) will log unhandled rejections
// but return 0, which is not normally the desired behaviour. This is
// not be needed with node v15 and about because it is now the default
// behaviour:
// See https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
var nodeMajor = process.version.match(/^v(\d+)\./)[1];
if (nodeMajor < 15) {
process['on']('unhandledRejection', function(reason) { throw reason; });
}
quit_ = (status, toThrow) => {
if (keepRuntimeAlive()) {
process['exitCode'] = status;
throw toThrow;
}
logExceptionOnExit(toThrow);
process['exit'](status);
};
Module['inspect'] = function () { return '[Emscripten Module object]'; };
} 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_ = function shell_read(f) {
return read(f);
};
}
readBinary = function readBinary(f) {
let data;
if (typeof readbuffer == 'function') {
return new Uint8Array(readbuffer(f));
}
data = read(f, 'binary');
assert(typeof data == 'object');
return data;
};
readAsync = function readAsync(f, onload, onerror) {
setTimeout(() => onload(readBinary(f)), 0);
};
if (typeof clearTimeout == 'undefined') {
globalThis.clearTimeout = (id) => {};
}
if (typeof scriptArgs != 'undefined') {
arguments_ = scriptArgs;
} else if (typeof arguments != 'undefined') {
arguments_ = arguments;
}
if (typeof quit == 'function') {
quit_ = (status, toThrow) => {
logExceptionOnExit(toThrow);
quit(status);
};
}
if (typeof print != 'undefined') {
// Prefer to use print/printErr where they exist, as they usually work better.
if (typeof console == 'undefined') console = /** @type{!Console} */({});
console.log = /** @type{!function(this:Console, ...*): undefined} */ (print);
console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr != 'undefined' ? printErr : print);
}
} else
// Note that this includes Node.js workers when relevant (pthreads is enabled).
// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and
// ENVIRONMENT_IS_NODE.
if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled
scriptDirectory = self.location.href;
} else if (typeof document != 'undefined' && document.currentScript) { // web
scriptDirectory = document.currentScript.src;
}
// When MODULARIZE, this JS may be executed later, after document.currentScript
// is gone, so we saved it, and we use it here instead of any other info.
if (_scriptDir) {
scriptDirectory = _scriptDir;
}
// blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them.
// otherwise, slice off the final part of the url to find the script directory.
// if scriptDirectory does not contain a slash, lastIndexOf will return -1,
// and scriptDirectory will correctly be replaced with an empty string.
// If scriptDirectory contains a query (starting with ?) or a fragment (starting with #),
// they are removed because they could contain a slash.
if (scriptDirectory.indexOf('blob:') !== 0) {
scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf('/')+1);
} else {
scriptDirectory = '';
}
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?)');
// Differentiate the Web Worker from the Node Worker case, as reading must
// be done differently.
{
// include: web_or_worker_shell_read.js
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(/** @type{!ArrayBuffer} */(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)) { // file URLs can return 0
onload(xhr.response);
return;
}
onerror();
};
xhr.onerror = onerror;
xhr.send(null);
}
// end include: web_or_worker_shell_read.js
}
setWindowTitle = (title) => document.title = title;
} else
{
throw new Error('environment detection error');
}
var out = Module['print'] || console.log.bind(console);
var err = Module['printErr'] || console.warn.bind(console);
// Merge back in the overrides
Object.assign(Module, moduleOverrides);
// Free the object hierarchy contained in the overrides, this lets the GC
// reclaim data used e.g. in memoryInitializerRequest, which is a large typed array.
moduleOverrides = null;
checkIncomingModuleAPI();
// Emit code to handle expected values on the Module object. This applies Module.x
// to the proper local x. This has two benefits: first, we only emit it if it is
// expected to arrive, and second, by using a local everywhere else that can be
// minified.
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_');
// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
// Assertions on removed incoming Module JS APIs.
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 setWindowTitle in JS)');
assert(typeof Module['TOTAL_MEMORY'] == 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY');
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 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.");
// end include: shell.js
// include: preamble.js
// === Preamble library stuff ===
// Documentation for the public APIs defined in this file must be updated in:
// site/source/docs/api_reference/preamble.js.rst
// A prebuilt local version of the documentation is available at:
// site/build/text/docs/api_reference/preamble.js.txt
// You can also build docs locally as HTML or other formats in site/
// An online HTML version (which may be of a different version of Emscripten)
// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
var wasmBinary;
if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary');
var noExitRuntime = Module['noExitRuntime'] || true;legacyModuleProp('noExitRuntime', 'noExitRuntime');
if (typeof WebAssembly != 'object') {
abort('no native wasm support detected');
}
// Wasm globals
var wasmMemory;
//========================================
// Runtime essentials
//========================================
// whether we are quitting the application. no code should run after this.
// set in exit() and abort()
var ABORT = false;
// set by exit() and abort(). Passed to 'onExit' handler.
// NOTE: This is also used as the process return code code in shell environments
// but only when noExitRuntime is false.
var EXITSTATUS;
/** @type {function(*, string=)} */
function assert(condition, text) {
if (!condition) {
abort('Assertion failed' + (text ? ': ' + text : ''));
}
}
// We used to include malloc/free by default in the past. Show a helpful error in
// builds with assertions.
// include: runtime_strings.js
// runtime_strings.js: String related runtime functions that are part of both
// MINIMAL_RUNTIME and regular runtime.
var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
/**
* Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given
* array that contains uint8 values, returns a copy of that string as a
* Javascript String object.
* heapOrArray is either a regular array, or a JavaScript typed array view.
* @param {number} idx
* @param {number=} maxBytesToRead
* @return {string}
*/
function UTF8ArrayToString(heapOrArray, idx, maxBytesToRead) {
var endIdx = idx + maxBytesToRead;
var endPtr = idx;
// TextDecoder needs to know the byte length in advance, it doesn't stop on
// null terminator by itself. Also, use the length info to avoid running tiny
// strings through TextDecoder, since .subarray() allocates garbage.
// (As a tiny code save trick, compare endPtr against endIdx using a negation,
// so that undefined means Infinity)
while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
if (endPtr - i