@hpcc-js/graph 2.79.4 → 2.80.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graphvizlib.wasm +0 -0
- package/dist/index.es6.js +6 -18
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +6 -18
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +9 -9
- package/src/AdjacencyGraph.ts +1 -2
- package/src/Graph.ts +0 -6
- package/src/GraphData.ts +1 -1
- package/src/Sankey.ts +4 -6
- package/src/Subgraph.ts +0 -1
- package/src/Vertex.ts +1 -1
- package/src/__package__.ts +2 -2
- package/src/graph2/layouts/dagreWorker.ts +2 -2
- package/src/graph2/layouts/forceDirectedWorker.ts +2 -2
- package/src/graph2/layouts/graphvizWorker.ts +2 -2
- package/src/graph2/sankeyGraph.ts +0 -2
- package/src/test.ts +0 -3
- package/types/AdjacencyGraph.d.ts.map +1 -1
- package/types/Graph.d.ts.map +1 -1
- package/types/Sankey.d.ts.map +1 -1
- package/types/Subgraph.d.ts.map +1 -1
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types/graph2/sankeyGraph.d.ts.map +1 -1
- package/types/test.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -5,8 +5,8 @@ import { render, Subgraph as Subgraph$1, Icons, Vertex as Vertex$1, Vertex3, Cen
|
|
|
5
5
|
import { HTMLTooltip } from '@hpcc-js/html';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/graph";
|
|
8
|
-
var PKG_VERSION = "2.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
8
|
+
var PKG_VERSION = "2.80.1";
|
|
9
|
+
var BUILD_VERSION = "2.103.1";
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -12198,7 +12198,7 @@ var GraphData = /** @class */ (function () {
|
|
|
12198
12198
|
retVal.addedEdges.push(edge);
|
|
12199
12199
|
}
|
|
12200
12200
|
else {
|
|
12201
|
-
console.
|
|
12201
|
+
console.warn("Bad edge definition");
|
|
12202
12202
|
}
|
|
12203
12203
|
}
|
|
12204
12204
|
}
|
|
@@ -13542,7 +13542,6 @@ var Subgraph = /** @class */ (function (_super) {
|
|
|
13542
13542
|
return nearest && nearest.i ? nearest.i : null;
|
|
13543
13543
|
};
|
|
13544
13544
|
Subgraph.prototype.click = function (d) {
|
|
13545
|
-
console.log("Clicked: " + d.id);
|
|
13546
13545
|
};
|
|
13547
13546
|
Subgraph.prototype.minClick = function () {
|
|
13548
13547
|
switch (this._minState) {
|
|
@@ -13686,7 +13685,7 @@ var Vertex = /** @class */ (function (_super) {
|
|
|
13686
13685
|
annotationWidget[key](d[key]);
|
|
13687
13686
|
}
|
|
13688
13687
|
else if (globalThis.__hpcc_debug) {
|
|
13689
|
-
console.
|
|
13688
|
+
console.warn("Invalid annotation property: " + key);
|
|
13690
13689
|
}
|
|
13691
13690
|
}
|
|
13692
13691
|
annotationWidget.render();
|
|
@@ -14299,12 +14298,9 @@ var Graph = /** @class */ (function (_super) {
|
|
|
14299
14298
|
var context = _this;
|
|
14300
14299
|
var layoutEngine = _this.getLayoutEngine();
|
|
14301
14300
|
if (_this.layout() === "ForceDirected2") {
|
|
14302
|
-
var total_1 = 0;
|
|
14303
|
-
var count_1 = 0;
|
|
14304
14301
|
_this.forceLayout = layoutEngine;
|
|
14305
14302
|
_this.forceLayout.force
|
|
14306
14303
|
.on("tick", function () {
|
|
14307
|
-
var start = performance.now();
|
|
14308
14304
|
context.progress("layout-tick");
|
|
14309
14305
|
layoutEngine.vertices.forEach(function (item) {
|
|
14310
14306
|
if (item.fixed) ;
|
|
@@ -14324,9 +14320,6 @@ var Graph = /** @class */ (function (_super) {
|
|
|
14324
14320
|
.points([], false, false);
|
|
14325
14321
|
});
|
|
14326
14322
|
if (context.applyScaleOnLayout()) ;
|
|
14327
|
-
total_1 += performance.now() - start;
|
|
14328
|
-
++count_1;
|
|
14329
|
-
console.log("tick:" + (total_1 / count_1));
|
|
14330
14323
|
})
|
|
14331
14324
|
.on("end", function () {
|
|
14332
14325
|
context.progress("layout-end");
|
|
@@ -14765,7 +14758,7 @@ var AdjacencyGraph = /** @class */ (function (_super) {
|
|
|
14765
14758
|
.data(childRow);
|
|
14766
14759
|
}
|
|
14767
14760
|
else {
|
|
14768
|
-
console.
|
|
14761
|
+
console.warn("Missing vertices for edge: " + edgeID);
|
|
14769
14762
|
}
|
|
14770
14763
|
}
|
|
14771
14764
|
if (retVal) {
|
|
@@ -14796,7 +14789,6 @@ var AdjacencyGraph = /** @class */ (function (_super) {
|
|
|
14796
14789
|
_super.prototype.update.call(this, domNode, element);
|
|
14797
14790
|
};
|
|
14798
14791
|
AdjacencyGraph.prototype.click = function (row, col, sel) {
|
|
14799
|
-
console.log("click");
|
|
14800
14792
|
};
|
|
14801
14793
|
return AdjacencyGraph;
|
|
14802
14794
|
}(Graph));
|
|
@@ -15429,10 +15421,8 @@ var Sankey = /** @class */ (function (_super) {
|
|
|
15429
15421
|
};
|
|
15430
15422
|
// Events ---
|
|
15431
15423
|
Sankey.prototype.click = function (row, column, selected) {
|
|
15432
|
-
console.log("Click: " + JSON.stringify(row) + ", " + column + "," + selected);
|
|
15433
15424
|
};
|
|
15434
15425
|
Sankey.prototype.dblclick = function (row, column, selected) {
|
|
15435
|
-
console.log("Double Click: " + JSON.stringify(row) + ", " + column + "," + selected);
|
|
15436
15426
|
};
|
|
15437
15427
|
return Sankey;
|
|
15438
15428
|
}(SVGWidget));
|
|
@@ -15769,7 +15759,7 @@ var ForceDirectedAnimated = /** @class */ (function (_super) {
|
|
|
15769
15759
|
|
|
15770
15760
|
function graphviz$1(data, options) {
|
|
15771
15761
|
// eslint-disable-next-line quotes
|
|
15772
|
-
var workerCode = "!function(){\"use strict\";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}function e(r,e){return e.forEach((function(e){e&&\"string\"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(t){if(\"default\"!==t&&!(t in r)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}))})),Object.freeze(r)}var t,n,o,i={exports:{}};t=i,n=\"undefined\"!=typeof document&&document.currentScript?document.currentScript.src:void 0,o=function(r){var e,t,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){e=r,t=n}));var i,a,s=Object.assign({},o),u=\"./this.program\",c=\"\";\"undefined\"!=typeof document&&document.currentScript&&(c=document.currentScript.src),n&&(c=n),c=0!==c.indexOf(\"blob:\")?c.substr(0,c.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1):\"\",i=r=>{var e=new XMLHttpRequest;return e.open(\"GET\",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open(\"GET\",r,!0),n.responseType=\"arraybuffer\",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var l,d,f=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit,o.wasmBinary&&(l=o.wasmBinary),o.noExitRuntime,\"object\"!=typeof WebAssembly&&L(\"no native wasm support detected\");var h=!1;function m(r,e){r||L(e)}var v,w,_,y,E,g,b=\"undefined\"!=typeof TextDecoder?new TextDecoder(\"utf8\"):void 0;function k(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&b)return b.decode(r.subarray(e,o));for(var i=\"\";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(r,e){return r?k(_,r,e):\"\"}function S(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function A(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function P(r){v=r,o.HEAP8=w=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=y=new Int32Array(r),o.HEAPU8=_=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=E=new Float64Array(r)}o.INITIAL_MEMORY;var x,F,M,R,C=[],j=[],z=[],T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),p(r=\"Aborted(\"+r+\")\"),h=!0,r+=\". Build with -s ASSERTIONS=1 for more info.\";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(r){return r.startsWith(\"data:application/octet-stream;base64,\")}function U(r){try{if(r==x&&l)return new Uint8Array(l);throw\"both async and sync fetching of the wasm failed\"}catch(r){L(r)}}o.preloadedImages={},o.preloadedAudios={},I(x=\"expatlib.wasm\")||(F=x,x=o.locateFile?o.locateFile(F,c):c+F);var H={11678:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty(\"startElement\"))throw\"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.\";e.startElement()},11896:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty(\"endElement\"))throw\"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.\";e.endElement()},12108:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty(\"characterData\"))throw\"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.\";e.characterData()}};function G(r){for(;r.length>0;){var e=r.shift();if(\"function\"!=typeof e){var t=e.func;\"number\"==typeof t?void 0===e.arg?q(t)():q(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function q(r){return g.get(r)}var W={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];\".\"===o?r.splice(n,1):\"..\"===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift(\"..\");return r},normalize:function(r){var e=\"/\"===r.charAt(0),t=\"/\"===r.substr(-1);return(r=W.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||e||(r=\".\"),r&&t&&(r+=\"/\"),(e?\"/\":\"\")+r},dirname:function(r){var e=W.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):\".\"},basename:function(r){if(\"/\"===r)return\"/\";var e=(r=(r=W.normalize(r)).replace(/\\/$/,\"\")).lastIndexOf(\"/\");return-1===e?r:r.substr(e+1)},extname:function(r){return W.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return W.normalize(r.join(\"/\"))},join2:function(r,e){return W.normalize(r+\"/\"+e)}},V={resolve:function(){for(var r=\"\",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Y.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");if(!n)return\"\";r=n+\"/\"+r,e=\"/\"===n.charAt(0)}return(e?\"/\":\"\")+(r=W.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||\".\"},relative:function(r,e){function t(r){for(var e=0;e<r.length&&\"\"===r[e];e++);for(var t=r.length-1;t>=0&&\"\"===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=V.resolve(r).substr(1),e=V.resolve(e).substr(1);for(var n=t(r.split(\"/\")),o=t(e.split(\"/\")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push(\"..\");return(u=u.concat(o.slice(a))).join(\"/\")}},J={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){J.ttys[r]={input:[],output:[],ops:e},Y.registerDevice(r,J.stream_ops)},stream_ops:{open:function(r){var e=J.ttys[r.node.rdev];if(!e)throw new Y.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Y.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Y.ErrnoError(29)}if(void 0===s&&0===i)throw new Y.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Y.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new Y.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(\"undefined\"!=typeof window&&\"function\"==typeof window.prompt?null!==(e=window.prompt(\"Input: \"))&&(e+=\"\\n\"):\"function\"==typeof readline&&null!==(e=readline())&&(e+=\"\\n\"),!e)return null;r.input=or(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(f(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(k(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(p(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(p(k(r.output,0)),r.output=[])}}},X={ops_table:null,mount:function(r){return X.createNode(null,\"/\",16895,0)},createNode:function(r,e,t,n){if(Y.isBlkdev(t)||Y.isFIFO(t))throw new Y.ErrnoError(63);X.ops_table||(X.ops_table={dir:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,lookup:X.node_ops.lookup,mknod:X.node_ops.mknod,rename:X.node_ops.rename,unlink:X.node_ops.unlink,rmdir:X.node_ops.rmdir,readdir:X.node_ops.readdir,symlink:X.node_ops.symlink},stream:{llseek:X.stream_ops.llseek}},file:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:{llseek:X.stream_ops.llseek,read:X.stream_ops.read,write:X.stream_ops.write,allocate:X.stream_ops.allocate,mmap:X.stream_ops.mmap,msync:X.stream_ops.msync}},link:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,readlink:X.node_ops.readlink},stream:{}},chrdev:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:Y.chrdev_stream_ops}});var o=Y.createNode(r,e,t,n);return Y.isDir(o.mode)?(o.node_ops=X.ops_table.dir.node,o.stream_ops=X.ops_table.dir.stream,o.contents={}):Y.isFile(o.mode)?(o.node_ops=X.ops_table.file.node,o.stream_ops=X.ops_table.file.stream,o.usedBytes=0,o.contents=null):Y.isLink(o.mode)?(o.node_ops=X.ops_table.link.node,o.stream_ops=X.ops_table.link.stream):Y.isChrdev(o.mode)&&(o.node_ops=X.ops_table.chrdev.node,o.stream_ops=X.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Y.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Y.isDir(r.mode)?e.size=4096:Y.isFile(r.mode)?e.size=r.usedBytes:Y.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&X.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Y.genericErrors[44]},mknod:function(r,e,t,n){return X.createNode(r,e,t,n)},rename:function(r,e,t){if(Y.isDir(r.mode)){var n;try{n=Y.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Y.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Y.lookupNode(r,e);for(var n in t.contents)throw new Y.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[\".\",\"..\"];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=X.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Y.isLink(r.mode))throw new Y.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===w.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(X.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Y.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Y.ErrnoError(28);return n},allocate:function(r,e,t){X.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new Y.ErrnoError(28);if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==v){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=void L()))throw new Y.ErrnoError(48);w.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);return 2&o||X.stream_ops.write(r,e,0,n,t,!1),0}}},Y={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=V.resolve(Y.cwd(),r)))return{path:\"\",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new Y.ErrnoError(32);for(var o=W.normalizeArray(r.split(\"/\").filter((r=>!!r)),!1),i=Y.root,a=\"/\",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=Y.lookupNode(i,o[s]),a=W.join2(a,o[s]),Y.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;Y.isLink(i.mode);){var l=Y.readlink(a);if(a=V.resolve(W.dirname(a),l),i=Y.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new Y.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(Y.isRoot(r)){var t=r.mount.mountpoint;return e?\"/\"!==t[t.length-1]?t+\"/\"+e:t+e:t}e=e?r.name+\"/\"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Y.nameTable.length},hashAddNode:r=>{var e=Y.hashName(r.parent.id,r.name);r.name_next=Y.nameTable[e],Y.nameTable[e]=r},hashRemoveNode:r=>{var e=Y.hashName(r.parent.id,r.name);if(Y.nameTable[e]===r)Y.nameTable[e]=r.name_next;else for(var t=Y.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=Y.mayLookup(r);if(t)throw new Y.ErrnoError(t,r);for(var n=Y.hashName(r.id,e),o=Y.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Y.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Y.FSNode(r,e,t,n);return Y.hashAddNode(o),o},destroyNode:r=>{Y.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,\"r+\":2,w:577,\"w+\":578,a:1089,\"a+\":1090},modeStringToFlags:r=>{var e=Y.flagModes[r];if(void 0===e)throw new Error(\"Unknown file open mode: \"+r);return e},flagsToPermissionString:r=>{var e=[\"r\",\"w\",\"rw\"][3&r];return 512&r&&(e+=\"w\"),e},nodePermissions:(r,e)=>Y.ignorePermissions||(!e.includes(\"r\")||292&r.mode)&&(!e.includes(\"w\")||146&r.mode)&&(!e.includes(\"x\")||73&r.mode)?0:2,mayLookup:r=>{var e=Y.nodePermissions(r,\"x\");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{return Y.lookupNode(r,e),20}catch(r){}return Y.nodePermissions(r,\"wx\")},mayDelete:(r,e,t)=>{var n;try{n=Y.lookupNode(r,e)}catch(r){return r.errno}var o=Y.nodePermissions(r,\"wx\");if(o)return o;if(t){if(!Y.isDir(n.mode))return 54;if(Y.isRoot(n)||Y.getPath(n)===Y.cwd())return 10}else if(Y.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Y.isLink(r.mode)?32:Y.isDir(r.mode)&&(\"r\"!==Y.flagsToPermissionString(e)||512&e)?31:Y.nodePermissions(r,Y.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Y.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Y.streams[t])return t;throw new Y.ErrnoError(33)},getStream:r=>Y.streams[r],createStream:(r,e,t)=>{Y.FSStream||(Y.FSStream=function(){},Y.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new Y.FSStream,r);var n=Y.nextfd(e,t);return r.fd=n,Y.streams[n]=r,r},closeStream:r=>{Y.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Y.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Y.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Y.devices[r]={stream_ops:e}},getDevice:r=>Y.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{\"function\"==typeof r&&(e=r,r=!1),Y.syncFSRequests++,Y.syncFSRequests>1&&p(\"warning: \"+Y.syncFSRequests+\" FS.syncfs operations in flight at once, probably just doing extra work\");var t=Y.getMounts(Y.root.mount),n=0;function o(r){return Y.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o=\"/\"===t,i=!t;if(o&&Y.root)throw new Y.ErrnoError(10);if(!o&&!i){var a=Y.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Y.isMountpoint(n))throw new Y.ErrnoError(10);if(!Y.isDir(n.mode))throw new Y.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Y.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Y.lookupPath(r,{follow_mount:!1});if(!Y.isMountpoint(e.node))throw new Y.ErrnoError(28);var t=e.node,n=t.mounted,o=Y.getMounts(n);Object.keys(Y.nameTable).forEach((r=>{for(var e=Y.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Y.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Y.lookupPath(r,{parent:!0}).node,o=W.basename(r);if(!o||\".\"===o||\"..\"===o)throw new Y.ErrnoError(28);var i=Y.mayCreate(n,o);if(i)throw new Y.ErrnoError(i);if(!n.node_ops.mknod)throw new Y.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Y.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Y.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split(\"/\"),n=\"\",o=0;o<t.length;++o)if(t[o]){n+=\"/\"+t[o];try{Y.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,Y.mknod(r,e,t)),symlink:(r,e)=>{if(!V.resolve(r))throw new Y.ErrnoError(44);var t=Y.lookupPath(e,{parent:!0}).node;if(!t)throw new Y.ErrnoError(44);var n=W.basename(e),o=Y.mayCreate(t,n);if(o)throw new Y.ErrnoError(o);if(!t.node_ops.symlink)throw new Y.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=W.dirname(r),i=W.dirname(e),a=W.basename(r),s=W.basename(e);if(t=Y.lookupPath(r,{parent:!0}).node,n=Y.lookupPath(e,{parent:!0}).node,!t||!n)throw new Y.ErrnoError(44);if(t.mount!==n.mount)throw new Y.ErrnoError(75);var u,c=Y.lookupNode(t,a),l=V.relative(r,i);if(\".\"!==l.charAt(0))throw new Y.ErrnoError(28);if(\".\"!==(l=V.relative(e,o)).charAt(0))throw new Y.ErrnoError(55);try{u=Y.lookupNode(n,s)}catch(r){}if(c!==u){var d=Y.isDir(c.mode),f=Y.mayDelete(t,a,d);if(f)throw new Y.ErrnoError(f);if(f=u?Y.mayDelete(n,s,d):Y.mayCreate(n,s))throw new Y.ErrnoError(f);if(!t.node_ops.rename)throw new Y.ErrnoError(63);if(Y.isMountpoint(c)||u&&Y.isMountpoint(u))throw new Y.ErrnoError(10);if(n!==t&&(f=Y.nodePermissions(t,\"w\")))throw new Y.ErrnoError(f);Y.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Y.hashAddNode(c)}}},rmdir:r=>{var e=Y.lookupPath(r,{parent:!0}).node,t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!0);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.rmdir)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.rmdir(e,t),Y.destroyNode(n)},readdir:r=>{var e=Y.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Y.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=Y.lookupPath(r,{parent:!0}).node;if(!e)throw new Y.ErrnoError(44);var t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!1);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.unlink)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.unlink(e,t),Y.destroyNode(n)},readlink:r=>{var e=Y.lookupPath(r).node;if(!e)throw new Y.ErrnoError(44);if(!e.node_ops.readlink)throw new Y.ErrnoError(28);return V.resolve(Y.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=Y.lookupPath(r,{follow:!e}).node;if(!t)throw new Y.ErrnoError(44);if(!t.node_ops.getattr)throw new Y.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>Y.stat(r,!0),chmod:(r,e,t)=>{var n;if(!(n=\"string\"==typeof r?Y.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Y.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);Y.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if(!(o=\"string\"==typeof r?Y.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Y.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Y.getStream(r);if(!n)throw new Y.ErrnoError(8);Y.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Y.ErrnoError(28);var t;if(!(t=\"string\"==typeof r?Y.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);if(Y.isDir(t.mode))throw new Y.ErrnoError(31);if(!Y.isFile(t.mode))throw new Y.ErrnoError(28);var n=Y.nodePermissions(t,\"w\");if(n)throw new Y.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);if(0==(2097155&t.flags))throw new Y.ErrnoError(28);Y.truncate(t.node,e)},utime:(r,e,t)=>{var n=Y.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(\"\"===r)throw new Y.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e=\"string\"==typeof e?Y.modeStringToFlags(e):e)?4095&t|32768:0,\"object\"==typeof r)a=r;else{r=W.normalize(r);try{a=Y.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new Y.ErrnoError(20)}else a=Y.mknod(r,t,0),s=!0;if(!a)throw new Y.ErrnoError(44);if(Y.isChrdev(a.mode)&&(e&=-513),65536&e&&!Y.isDir(a.mode))throw new Y.ErrnoError(54);if(!s){var u=Y.mayOpen(a,e);if(u)throw new Y.ErrnoError(u)}512&e&&Y.truncate(a,0),e&=-131713;var c=Y.createStream({node:a,path:Y.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(Y.readFiles||(Y.readFiles={}),r in Y.readFiles||(Y.readFiles[r]=1)),c},close:r=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Y.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Y.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Y.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(1==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.read)throw new Y.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.write)throw new Y.ErrnoError(28);r.seekable&&1024&r.flags&&Y.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(e<0||t<=0)throw new Y.ErrnoError(28);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(!Y.isFile(r.node.mode)&&!Y.isDir(r.node.mode))throw new Y.ErrnoError(43);if(!r.stream_ops.allocate)throw new Y.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new Y.ErrnoError(2);if(1==(2097155&r.flags))throw new Y.ErrnoError(2);if(!r.stream_ops.mmap)throw new Y.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Y.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||\"binary\",\"utf8\"!==e.encoding&&\"binary\"!==e.encoding)throw new Error('Invalid encoding type \"'+e.encoding+'\"');var t,n=Y.open(r,e.flags),o=Y.stat(r).size,i=new Uint8Array(o);return Y.read(n,i,0,o,0),\"utf8\"===e.encoding?t=k(i,0):\"binary\"===e.encoding&&(t=i),Y.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Y.open(r,t.flags,t.mode);if(\"string\"==typeof e){var o=new Uint8Array(A(e)+1),i=S(e,o,0,o.length);Y.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error(\"Unsupported data type\");Y.write(n,e,0,e.byteLength,void 0,t.canOwn)}Y.close(n)},cwd:()=>Y.currentPath,chdir:r=>{var e=Y.lookupPath(r,{follow:!0});if(null===e.node)throw new Y.ErrnoError(44);if(!Y.isDir(e.node.mode))throw new Y.ErrnoError(54);var t=Y.nodePermissions(e.node,\"x\");if(t)throw new Y.ErrnoError(t);Y.currentPath=e.path},createDefaultDirectories:()=>{Y.mkdir(\"/tmp\"),Y.mkdir(\"/home\"),Y.mkdir(\"/home/web_user\")},createDefaultDevices:()=>{Y.mkdir(\"/dev\"),Y.registerDevice(Y.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Y.mkdev(\"/dev/null\",Y.makedev(1,3)),J.register(Y.makedev(5,0),J.default_tty_ops),J.register(Y.makedev(6,0),J.default_tty1_ops),Y.mkdev(\"/dev/tty\",Y.makedev(5,0)),Y.mkdev(\"/dev/tty1\",Y.makedev(6,0));var r=function(){if(\"object\"==typeof crypto&&\"function\"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L(\"randomDevice\")}}();Y.createDevice(\"/dev\",\"random\",r),Y.createDevice(\"/dev\",\"urandom\",r),Y.mkdir(\"/dev/shm\"),Y.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:()=>{Y.mkdir(\"/proc\");var r=Y.mkdir(\"/proc/self\");Y.mkdir(\"/proc/self/fd\"),Y.mount({mount:()=>{var e=Y.createNode(r,\"fd\",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Y.getStream(t);if(!n)throw new Y.ErrnoError(8);var o={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},\"/proc/self/fd\")},createStandardStreams:()=>{o.stdin?Y.createDevice(\"/dev\",\"stdin\",o.stdin):Y.symlink(\"/dev/tty\",\"/dev/stdin\"),o.stdout?Y.createDevice(\"/dev\",\"stdout\",null,o.stdout):Y.symlink(\"/dev/tty\",\"/dev/stdout\"),o.stderr?Y.createDevice(\"/dev\",\"stderr\",null,o.stderr):Y.symlink(\"/dev/tty1\",\"/dev/stderr\"),Y.open(\"/dev/stdin\",0),Y.open(\"/dev/stdout\",1),Y.open(\"/dev/stderr\",1)},ensureErrnoError:()=>{Y.ErrnoError||(Y.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message=\"FS error\"},Y.ErrnoError.prototype=new Error,Y.ErrnoError.prototype.constructor=Y.ErrnoError,[44].forEach((r=>{Y.genericErrors[r]=new Y.ErrnoError(r),Y.genericErrors[r].stack=\"<generic error, no stack>\"})))},staticInit:()=>{Y.ensureErrnoError(),Y.nameTable=new Array(4096),Y.mount(X,{},\"/\"),Y.createDefaultDirectories(),Y.createDefaultDevices(),Y.createSpecialDirectories(),Y.filesystems={MEMFS:X}},init:(r,e,t)=>{Y.init.initialized=!0,Y.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,Y.createStandardStreams()},quit:()=>{Y.init.initialized=!1;for(var r=0;r<Y.streams.length;r++){var e=Y.streams[r];e&&Y.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Y.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=Y.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Y.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=W.basename(r),n=Y.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot=\"/\"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r=\"string\"==typeof r?r:Y.getPath(r);for(var o=e.split(\"/\").reverse();o.length;){var i=o.pop();if(i){var a=W.join2(r,i);try{Y.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=W.join2(\"string\"==typeof r?r:Y.getPath(r),e),a=Y.getMode(n,o);return Y.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r=\"string\"==typeof r?r:Y.getPath(r),a=e?W.join2(r,e):r);var s=Y.getMode(n,o),u=Y.create(a,s);if(t){if(\"string\"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Y.chmod(u,146|s);var f=Y.open(u,577);Y.write(f,t,0,t.length,0,i),Y.close(f),Y.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=W.join2(\"string\"==typeof r?r:Y.getPath(r),e),i=Y.getMode(!!t,!!n);Y.createDevice.major||(Y.createDevice.major=64);var a=Y.makedev(Y.createDevice.major++,0);return Y.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Y.ErrnoError(29)}if(void 0===u&&0===a)throw new Y.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new Y.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Y.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(\"undefined\"!=typeof XMLHttpRequest)throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\");if(!i)throw new Error(\"Cannot load without read() or XMLHttpRequest.\");try{r.contents=or(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Y.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open(\"HEAD\",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+r.status);var e,n=Number(r.getResponseHeader(\"Content-length\")),o=(e=r.getResponseHeader(\"Accept-Ranges\"))&&\"bytes\"===e,i=(e=r.getResponseHeader(\"Content-Encoding\"))&&\"gzip\"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error(\"invalid range (\"+r+\", \"+e+\") or no bytes requested!\");if(e>n-1)throw new Error(\"only \"+n+\" bytes available! programmer error!\");var o=new XMLHttpRequest;if(o.open(\"GET\",t,!1),n!==a&&o.setRequestHeader(\"Range\",\"bytes=\"+r+\"-\"+e),o.responseType=\"arraybuffer\",o.overrideMimeType&&o.overrideMimeType(\"text/plain; charset=x-user-defined\"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):or(o.responseText||\"\",!0)})(e,o)),void 0===s.chunks[r])throw new Error(\"doXHR failed!\");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,f(\"LazyFiles on gzip forces download of the whole file when length is accessed\")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},\"undefined\"!=typeof XMLHttpRequest)throw\"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc\";var a={isDevice:!1,url:t},s=Y.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return Y.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{Y.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?V.resolve(W.join2(r,e)):r;function f(t){function a(t){l&&l(),u||Y.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),\"string\"==typeof t?function(r,e,t,n){var o=n?\"\":\"al \"+r;a(r,(function(t){m(t,'Loading data file \"'+r+'\" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw'Loading data file \"'+r+'\" failed.';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>\"EM_FS_\"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{f(\"creating db\"),o.result.createObjectStore(Y.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Y.DB_STORE_NAME],\"readwrite\"),i=n.objectStore(Y.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(Y.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Y.DB_STORE_NAME],\"readonly\")}catch(r){return void t(r)}var a=i.objectStore(Y.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{Y.analyzePath(r).exists&&Y.unlink(r),Y.createDataFile(W.dirname(r),W.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},K={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(\"/\"===e[0])return e;var n;if(-100===r)n=Y.cwd();else{var o=Y.getStream(r);if(!o)throw new Y.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Y.ErrnoError(44);return n}return W.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&W.normalize(e)!==W.normalize(Y.getPath(r.node)))return-54;throw r}return y[t>>2]=n.dev,y[t+4>>2]=0,y[t+8>>2]=n.ino,y[t+12>>2]=n.mode,y[t+16>>2]=n.nlink,y[t+20>>2]=n.uid,y[t+24>>2]=n.gid,y[t+28>>2]=n.rdev,y[t+32>>2]=0,R=[n.size>>>0,(M=n.size,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+40>>2]=R[0],y[t+44>>2]=R[1],y[t+48>>2]=4096,y[t+52>>2]=n.blocks,y[t+56>>2]=n.atime.getTime()/1e3|0,y[t+60>>2]=0,y[t+64>>2]=n.mtime.getTime()/1e3|0,y[t+68>>2]=0,y[t+72>>2]=n.ctime.getTime()/1e3|0,y[t+76>>2]=0,R=[n.ino>>>0,(M=n.ino,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+80>>2]=R[0],y[t+84>>2]=R[1],0},doMsync:function(r,e,t,n,o){var i=_.slice(r,r+t);Y.msync(e,i,o,t,n)},doMkdir:function(r,e){return\"/\"===(r=W.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Y.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Y.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=Y.readlink(r),o=Math.min(t,A(n)),i=w[e+o];return S(n,_,e,t+1),w[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=Y.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n=\"\";return 4&e&&(n+=\"r\"),2&e&&(n+=\"w\"),1&e&&(n+=\"x\"),n&&Y.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=Y.getStream(t);return n&&Y.close(n),Y.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.read(r,w,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.write(r,w,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return K.varargs+=4,y[K.varargs-4>>2]},getStr:function(r){return D(r)},getStreamFromFD:function(r){var e=Y.getStream(r);if(!e)throw new Y.ErrnoError(8);return e},get64:function(r,e){return r}},$=[];function Q(r){try{return d.grow(r-v.byteLength+65535>>>16),P(d.buffer),1}catch(r){}}var Z={};function rr(){if(!rr.strings){var r={USER:\"web_user\",LOGNAME:\"web_user\",PATH:\"/\",PWD:\"/\",HOME:\"/home/web_user\",LANG:(\"object\"==typeof navigator&&navigator.languages&&navigator.languages[0]||\"C\").replace(\"-\",\"_\")+\".UTF-8\",_:u||\"./this.program\"};for(var e in Z)void 0===Z[e]?delete r[e]:r[e]=Z[e];var t=[];for(var e in r)t.push(e+\"=\"+r[e]);rr.strings=t}return rr.strings}var er=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Y.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},tr=365,nr=146;function or(r,e,t){var n=t>0?t:A(r)+1,o=new Array(n),i=S(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(er.prototype,{read:{get:function(){return(this.mode&tr)===tr},set:function(r){r?this.mode|=tr:this.mode&=-366}},write:{get:function(){return(this.mode&nr)===nr},set:function(r){r?this.mode|=nr:this.mode&=-147}},isFolder:{get:function(){return Y.isDir(this.mode)}},isDevice:{get:function(){return Y.isChrdev(this.mode)}}}),Y.FSNode=er,Y.staticInit();var ir={g:function(r,e,t){K.varargs=t;try{var n=K.getStr(r),o=t?K.get():0;return Y.open(n,e,o).fd}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return-r.errno}},d:function(){L(\"\")},a:function(r,e,t){var n=function(r,e){var t;for($.length=0,e>>=2;t=_[r++];){var n=t<105;n&&1&e&&e++,$.push(n?E[e++>>1]:y[e]),++e}return $}(e,t);return H[r].apply(null,n)},j:function(r,e,t){_.copyWithin(r,e,e+t)},e:function(r){var e,t,n=_.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),Q(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},h:function(r,e){var t=0;return rr().forEach((function(n,o){var i=e+t;y[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)w[e++>>0]=r.charCodeAt(n);t||(w[e>>0]=0)}(n,i),t+=n.length+1})),0},i:function(r,e){var t=rr();y[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),y[e>>2]=n,0},c:function(r){try{var e=K.getStreamFromFD(r);return Y.close(e),0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},f:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doReadv(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},k:function(r,e,t,n,o){try{var i=K.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Y.llseek(i,a,n),R=[i.position>>>0,(M=i.position,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[o>>2]=R[0],y[o+4>>2]=R[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},b:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doWritev(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},l:function(r){var e=Date.now();return y[r>>2]=e/1e3|0,y[r+4>>2]=e%1e3*1e3|0,0}};!function(){var r={a:ir};function e(r,e){var t,n=r.exports;o.asm=n,P((d=o.asm.m).buffer),g=o.asm.G,t=o.asm.n,j.unshift(t),O()}function n(r){e(r.instance)}function i(e){return(l||\"function\"!=typeof fetch?Promise.resolve().then((function(){return U(x)})):fetch(x,{credentials:\"same-origin\"}).then((function(r){if(!r.ok)throw\"failed to load wasm binary file at '\"+x+\"'\";return r.arrayBuffer()})).catch((function(){return U(x)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){p(\"failed to asynchronously prepare wasm: \"+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return p(\"Module.instantiateWasm callback failed with error: \"+r),!1}(l||\"function\"!=typeof WebAssembly.instantiateStreaming||I(x)||\"function\"!=typeof fetch?i(n):fetch(x,{credentials:\"same-origin\"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(r){return p(\"wasm streaming compile failed: \"+r),p(\"falling back to ArrayBuffer instantiation\"),i(n)}))}))).catch(t)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.n).apply(null,arguments)};var ar,sr=o._emscripten_bind_CExpat_CExpat_0=function(){return(sr=o._emscripten_bind_CExpat_CExpat_0=o.asm.o).apply(null,arguments)},ur=o._emscripten_bind_CExpat_version_0=function(){return(ur=o._emscripten_bind_CExpat_version_0=o.asm.p).apply(null,arguments)},cr=o._emscripten_bind_CExpat_create_0=function(){return(cr=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},lr=o._emscripten_bind_CExpat_destroy_0=function(){return(lr=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},dr=o._emscripten_bind_CExpat_parse_1=function(){return(dr=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},fr=o._emscripten_bind_CExpat_tag_0=function(){return(fr=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},pr=o._emscripten_bind_CExpat_attrs_0=function(){return(pr=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},hr=o._emscripten_bind_CExpat_content_0=function(){return(hr=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},mr=o._emscripten_bind_CExpat_startElement_0=function(){return(mr=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},vr=o._emscripten_bind_CExpat_endElement_0=function(){return(vr=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},wr=o._emscripten_bind_CExpat_characterData_0=function(){return(wr=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},_r=o._emscripten_bind_CExpat___destroy___0=function(){return(_r=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},yr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(yr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},Er=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Er=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},gr=o._emscripten_bind_CExpatJS_startElement_0=function(){return(gr=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},br=o._emscripten_bind_CExpatJS_endElement_0=function(){return(br=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},kr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(kr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},Dr=o._emscripten_bind_CExpatJS___destroy___0=function(){return(Dr=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)};function Sr(r){function t(){ar||(ar=!0,o.calledRun=!0,h||(o.noFSInit||Y.init.initialized||Y.init(),Y.ignorePermissions=!1,G(j),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for(\"function\"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),z.unshift(r);var r;G(z)}()))}T>0||(function(){if(o.preRun)for(\"function\"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;G(C)}(),T>0||(o.setStatus?(o.setStatus(\"Running...\"),setTimeout((function(){setTimeout((function(){o.setStatus(\"\")}),1),t()}),1)):t()))}if(o._malloc=function(){return(o._malloc=o.asm.H).apply(null,arguments)},B=function r(){ar||Sr(),ar||(B=r)},o.run=Sr,o.preInit)for(\"function\"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ar(){}function Pr(r){return(r||Ar).__cache__}function xr(r,e){var t=Pr(e),n=t[r];return n||((n=Object.create((e||Ar).prototype)).ptr=r,t[r]=n)}Sr(),Ar.prototype=Object.create(Ar.prototype),Ar.prototype.constructor=Ar,Ar.prototype.__class__=Ar,Ar.__cache__={},o.WrapperObject=Ar,o.getCache=Pr,o.wrapPointer=xr,o.castObject=function(r,e){return xr(r.ptr,e)},o.NULL=xr(0),o.destroy=function(r){if(!r.__destroy__)throw\"Error: Cannot destroy object. (Did you create it yourself?)\";r.__destroy__(),delete Pr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Fr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Fr.needed){for(var r=0;r<Fr.temps.length;r++)o._free(Fr.temps[r]);Fr.temps.length=0,o._free(Fr.buffer),Fr.buffer=0,Fr.size+=Fr.needed,Fr.needed=0}Fr.buffer||(Fr.size+=128,Fr.buffer=o._malloc(Fr.size),m(Fr.buffer)),Fr.pos=0},alloc:function(r,e){m(Fr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Fr.pos+i>=Fr.size?(m(i>0),Fr.needed+=i,t=o._malloc(i),Fr.temps.push(t)):(t=Fr.buffer+Fr.pos,Fr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Mr(){this.ptr=sr(),Pr(Mr)[this.ptr]=this}function Rr(){throw\"cannot construct a VoidPtr, no constructor in IDL\"}function Cr(){this.ptr=Er(),Pr(Cr)[this.ptr]=this}return Mr.prototype=Object.create(Ar.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.CExpat=Mr,Mr.prototype.version=Mr.prototype.version=function(){var r=this.ptr;return D(ur(r))},Mr.prototype.create=Mr.prototype.create=function(){var r=this.ptr;return!!cr(r)},Mr.prototype.destroy=Mr.prototype.destroy=function(){var r=this.ptr;lr(r)},Mr.prototype.parse=Mr.prototype.parse=function(r){var e=this.ptr;return Fr.prepare(),r=r&&\"object\"==typeof r?r.ptr:function(r){if(\"string\"==typeof r){var e=or(r),t=Fr.alloc(e,w);return Fr.copy(e,w,t),t}return r}(r),!!dr(e,r)},Mr.prototype.tag=Mr.prototype.tag=function(){var r=this.ptr;return D(fr(r))},Mr.prototype.attrs=Mr.prototype.attrs=function(){var r=this.ptr;return D(pr(r))},Mr.prototype.content=Mr.prototype.content=function(){var r=this.ptr;return D(hr(r))},Mr.prototype.startElement=Mr.prototype.startElement=function(){var r=this.ptr;mr(r)},Mr.prototype.endElement=Mr.prototype.endElement=function(){var r=this.ptr;vr(r)},Mr.prototype.characterData=Mr.prototype.characterData=function(){var r=this.ptr;wr(r)},Mr.prototype.__destroy__=Mr.prototype.__destroy__=function(){var r=this.ptr;_r(r)},Rr.prototype=Object.create(Ar.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},o.VoidPtr=Rr,Rr.prototype.__destroy__=Rr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},Cr.prototype=Object.create(Mr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.__class__=Cr,Cr.__cache__={},o.CExpatJS=Cr,Cr.prototype.startElement=Cr.prototype.startElement=function(){var r=this.ptr;gr(r)},Cr.prototype.endElement=Cr.prototype.endElement=function(){var r=this.ptr;br(r)},Cr.prototype.characterData=Cr.prototype.characterData=function(){var r=this.ptr;kr(r)},Cr.prototype.__destroy__=Cr.prototype.__destroy__=function(){var r=this.ptr;Dr(r)},r.ready},t.exports=o;var a=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw new Error(\"unable to locate global object\")}().__hpcc_wasmFolder||void 0;function s(r,e,t){var n=r.default||r;return n.__hpcc_promise||(n.__hpcc_promise=n({wasmBinary:t,locateFile:function(r,t){return\"\".concat(function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(e||function(r){if(!arguments.length)return a;var e=a;return a=r,e}()||t||\".\",\"/\"),\"/\").concat(function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(r,\"/\"))}})),n.__hpcc_promise}!function(){function r(r,e){this.tag=r,this.attrs=e,this._content=\"\"}Object.defineProperty(r.prototype,\"content\",{get:function(){return this._content},enumerable:!1,configurable:!0}),r.prototype.appendContent=function(r){this._content+=r}}();var u={exports:{}};!function(r,e){var t=(()=>{var r=\"undefined\"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a,s=Object.assign({},o),u=\"./this.program\",c=(r,e)=>{throw e},l=\"\";\"undefined\"!=typeof document&&document.currentScript&&(l=document.currentScript.src),r&&(l=r),l=0!==l.indexOf(\"blob:\")?l.substr(0,l.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1):\"\",i=r=>{var e=new XMLHttpRequest;return e.open(\"GET\",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open(\"GET\",r,!0),n.responseType=\"arraybuffer\",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var d=o.print||console.log.bind(console),f=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit);var p,h=0;o.wasmBinary&&(p=o.wasmBinary);var m,v=o.noExitRuntime||!0;\"object\"!=typeof WebAssembly&&L(\"no native wasm support detected\");var w=!1;function _(r,e){r||L(e)}var y,E,g,b,k,D,S,A=\"undefined\"!=typeof TextDecoder?new TextDecoder(\"utf8\"):void 0;function P(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&A)return A.decode(r.subarray(e,o));for(var i=\"\";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function x(r,e){return r?P(g,r,e):\"\"}function F(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function M(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function R(r){y=r,o.HEAP8=E=new Int8Array(r),o.HEAP16=b=new Int16Array(r),o.HEAP32=k=new Int32Array(r),o.HEAPU8=g=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var C=[],j=[],z=[];var T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),f(r=\"Aborted(\"+r+\")\"),w=!0,r+=\". Build with -s ASSERTIONS=1 for more info.\";var e=new WebAssembly.RuntimeError(r);throw n(e),e}o.preloadedImages={},o.preloadedAudios={};var I,U,H,G;function q(r){return r.startsWith(\"data:application/octet-stream;base64,\")}function W(r){try{if(r==I&&p)return new Uint8Array(p);throw\"both async and sync fetching of the wasm failed\"}catch(r){L(r)}}q(I=\"graphvizlib.wasm\")||(U=I,I=o.locateFile?o.locateFile(U,l):l+U);var V,J={161520:function(r,e){var t=x(r),n=x(e);tr.createPath(\"/\",$.dirname(t)),tr.writeFile($.join(\"/\",t),n)}};function X(r){for(;r.length>0;){var e=r.shift();if(\"function\"!=typeof e){var t=e.func;\"number\"==typeof t?void 0===e.arg?Y(t)():Y(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function Y(r){return S.get(r)}V=()=>performance.now();function K(r){return k[gr()>>2]=r,r}var $={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];\".\"===o?r.splice(n,1):\"..\"===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift(\"..\");return r},normalize:function(r){var e=\"/\"===r.charAt(0),t=\"/\"===r.substr(-1);return(r=$.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||e||(r=\".\"),r&&t&&(r+=\"/\"),(e?\"/\":\"\")+r},dirname:function(r){var e=$.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):\".\"},basename:function(r){if(\"/\"===r)return\"/\";var e=(r=(r=$.normalize(r)).replace(/\\/$/,\"\")).lastIndexOf(\"/\");return-1===e?r:r.substr(e+1)},extname:function(r){return $.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return $.normalize(r.join(\"/\"))},join2:function(r,e){return $.normalize(r+\"/\"+e)}};var Q={resolve:function(){for(var r=\"\",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:tr.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");if(!n)return\"\";r=n+\"/\"+r,e=\"/\"===n.charAt(0)}return(e?\"/\":\"\")+(r=$.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||\".\"},relative:function(r,e){function t(r){for(var e=0;e<r.length&&\"\"===r[e];e++);for(var t=r.length-1;t>=0&&\"\"===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=Q.resolve(r).substr(1),e=Q.resolve(e).substr(1);for(var n=t(r.split(\"/\")),o=t(e.split(\"/\")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push(\"..\");return(u=u.concat(o.slice(a))).join(\"/\")}},Z={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Z.ttys[r]={input:[],output:[],ops:e},tr.registerDevice(r,Z.stream_ops)},stream_ops:{open:function(r){var e=Z.ttys[r.node.rdev];if(!e)throw new tr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new tr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new tr.ErrnoError(29)}if(void 0===s&&0===i)throw new tr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new tr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new tr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(\"undefined\"!=typeof window&&\"function\"==typeof window.prompt?null!==(e=window.prompt(\"Input: \"))&&(e+=\"\\n\"):\"function\"==typeof readline&&null!==(e=readline())&&(e+=\"\\n\"),!e)return null;r.input=dr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(d(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(d(P(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(f(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(P(r.output,0)),r.output=[])}}};function rr(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=br(65536,r);return e?(function(r,e){g.fill(0,r,r+e)}(e,r),e):0}var er={ops_table:null,mount:function(r){return er.createNode(null,\"/\",16895,0)},createNode:function(r,e,t,n){if(tr.isBlkdev(t)||tr.isFIFO(t))throw new tr.ErrnoError(63);er.ops_table||(er.ops_table={dir:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,lookup:er.node_ops.lookup,mknod:er.node_ops.mknod,rename:er.node_ops.rename,unlink:er.node_ops.unlink,rmdir:er.node_ops.rmdir,readdir:er.node_ops.readdir,symlink:er.node_ops.symlink},stream:{llseek:er.stream_ops.llseek}},file:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:{llseek:er.stream_ops.llseek,read:er.stream_ops.read,write:er.stream_ops.write,allocate:er.stream_ops.allocate,mmap:er.stream_ops.mmap,msync:er.stream_ops.msync}},link:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,readlink:er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:tr.chrdev_stream_ops}});var o=tr.createNode(r,e,t,n);return tr.isDir(o.mode)?(o.node_ops=er.ops_table.dir.node,o.stream_ops=er.ops_table.dir.stream,o.contents={}):tr.isFile(o.mode)?(o.node_ops=er.ops_table.file.node,o.stream_ops=er.ops_table.file.stream,o.usedBytes=0,o.contents=null):tr.isLink(o.mode)?(o.node_ops=er.ops_table.link.node,o.stream_ops=er.ops_table.link.stream):tr.isChrdev(o.mode)&&(o.node_ops=er.ops_table.chrdev.node,o.stream_ops=er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=tr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,tr.isDir(r.mode)?e.size=4096:tr.isFile(r.mode)?e.size=r.usedBytes:tr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&er.resizeFileStorage(r,e.size)},lookup:function(r,e){throw tr.genericErrors[44]},mknod:function(r,e,t,n){return er.createNode(r,e,t,n)},rename:function(r,e,t){if(tr.isDir(r.mode)){var n;try{n=tr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new tr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=tr.lookupNode(r,e);for(var n in t.contents)throw new tr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[\".\",\"..\"];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=er.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!tr.isLink(r.mode))throw new tr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===E.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(er.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&tr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new tr.ErrnoError(28);return n},allocate:function(r,e,t){er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new tr.ErrnoError(28);if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==y){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=rr(t)))throw new tr.ErrnoError(48);E.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);return 2&o||er.stream_ops.write(r,e,0,n,t,!1),0}}};var tr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=Q.resolve(tr.cwd(),r)))return{path:\"\",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new tr.ErrnoError(32);for(var o=$.normalizeArray(r.split(\"/\").filter((r=>!!r)),!1),i=tr.root,a=\"/\",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=tr.lookupNode(i,o[s]),a=$.join2(a,o[s]),tr.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;tr.isLink(i.mode);){var l=tr.readlink(a);if(a=Q.resolve($.dirname(a),l),i=tr.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new tr.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(tr.isRoot(r)){var t=r.mount.mountpoint;return e?\"/\"!==t[t.length-1]?t+\"/\"+e:t+e:t}e=e?r.name+\"/\"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%tr.nameTable.length},hashAddNode:r=>{var e=tr.hashName(r.parent.id,r.name);r.name_next=tr.nameTable[e],tr.nameTable[e]=r},hashRemoveNode:r=>{var e=tr.hashName(r.parent.id,r.name);if(tr.nameTable[e]===r)tr.nameTable[e]=r.name_next;else for(var t=tr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=tr.mayLookup(r);if(t)throw new tr.ErrnoError(t,r);for(var n=tr.hashName(r.id,e),o=tr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return tr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new tr.FSNode(r,e,t,n);return tr.hashAddNode(o),o},destroyNode:r=>{tr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,\"r+\":2,w:577,\"w+\":578,a:1089,\"a+\":1090},modeStringToFlags:r=>{var e=tr.flagModes[r];if(void 0===e)throw new Error(\"Unknown file open mode: \"+r);return e},flagsToPermissionString:r=>{var e=[\"r\",\"w\",\"rw\"][3&r];return 512&r&&(e+=\"w\"),e},nodePermissions:(r,e)=>tr.ignorePermissions||(!e.includes(\"r\")||292&r.mode)&&(!e.includes(\"w\")||146&r.mode)&&(!e.includes(\"x\")||73&r.mode)?0:2,mayLookup:r=>{var e=tr.nodePermissions(r,\"x\");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{tr.lookupNode(r,e);return 20}catch(r){}return tr.nodePermissions(r,\"wx\")},mayDelete:(r,e,t)=>{var n;try{n=tr.lookupNode(r,e)}catch(r){return r.errno}var o=tr.nodePermissions(r,\"wx\");if(o)return o;if(t){if(!tr.isDir(n.mode))return 54;if(tr.isRoot(n)||tr.getPath(n)===tr.cwd())return 10}else if(tr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?tr.isLink(r.mode)?32:tr.isDir(r.mode)&&(\"r\"!==tr.flagsToPermissionString(e)||512&e)?31:tr.nodePermissions(r,tr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=tr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!tr.streams[t])return t;throw new tr.ErrnoError(33)},getStream:r=>tr.streams[r],createStream:(r,e,t)=>{tr.FSStream||(tr.FSStream=function(){},tr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new tr.FSStream,r);var n=tr.nextfd(e,t);return r.fd=n,tr.streams[n]=r,r},closeStream:r=>{tr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=tr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new tr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{tr.devices[r]={stream_ops:e}},getDevice:r=>tr.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{\"function\"==typeof r&&(e=r,r=!1),tr.syncFSRequests++,tr.syncFSRequests>1&&f(\"warning: \"+tr.syncFSRequests+\" FS.syncfs operations in flight at once, probably just doing extra work\");var t=tr.getMounts(tr.root.mount),n=0;function o(r){return tr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o=\"/\"===t,i=!t;if(o&&tr.root)throw new tr.ErrnoError(10);if(!o&&!i){var a=tr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,tr.isMountpoint(n))throw new tr.ErrnoError(10);if(!tr.isDir(n.mode))throw new tr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?tr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=tr.lookupPath(r,{follow_mount:!1});if(!tr.isMountpoint(e.node))throw new tr.ErrnoError(28);var t=e.node,n=t.mounted,o=tr.getMounts(n);Object.keys(tr.nameTable).forEach((r=>{for(var e=tr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&tr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=tr.lookupPath(r,{parent:!0}).node,o=$.basename(r);if(!o||\".\"===o||\"..\"===o)throw new tr.ErrnoError(28);var i=tr.mayCreate(n,o);if(i)throw new tr.ErrnoError(i);if(!n.node_ops.mknod)throw new tr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,tr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,tr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split(\"/\"),n=\"\",o=0;o<t.length;++o)if(t[o]){n+=\"/\"+t[o];try{tr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,tr.mknod(r,e,t)),symlink:(r,e)=>{if(!Q.resolve(r))throw new tr.ErrnoError(44);var t=tr.lookupPath(e,{parent:!0}).node;if(!t)throw new tr.ErrnoError(44);var n=$.basename(e),o=tr.mayCreate(t,n);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.symlink)throw new tr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=$.dirname(r),i=$.dirname(e),a=$.basename(r),s=$.basename(e);if(t=tr.lookupPath(r,{parent:!0}).node,n=tr.lookupPath(e,{parent:!0}).node,!t||!n)throw new tr.ErrnoError(44);if(t.mount!==n.mount)throw new tr.ErrnoError(75);var u,c=tr.lookupNode(t,a),l=Q.relative(r,i);if(\".\"!==l.charAt(0))throw new tr.ErrnoError(28);if(\".\"!==(l=Q.relative(e,o)).charAt(0))throw new tr.ErrnoError(55);try{u=tr.lookupNode(n,s)}catch(r){}if(c!==u){var d=tr.isDir(c.mode),f=tr.mayDelete(t,a,d);if(f)throw new tr.ErrnoError(f);if(f=u?tr.mayDelete(n,s,d):tr.mayCreate(n,s))throw new tr.ErrnoError(f);if(!t.node_ops.rename)throw new tr.ErrnoError(63);if(tr.isMountpoint(c)||u&&tr.isMountpoint(u))throw new tr.ErrnoError(10);if(n!==t&&(f=tr.nodePermissions(t,\"w\")))throw new tr.ErrnoError(f);tr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{tr.hashAddNode(c)}}},rmdir:r=>{var e=tr.lookupPath(r,{parent:!0}).node,t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!0);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.rmdir)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.rmdir(e,t),tr.destroyNode(n)},readdir:r=>{var e=tr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new tr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=tr.lookupPath(r,{parent:!0}).node;if(!e)throw new tr.ErrnoError(44);var t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!1);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.unlink)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.unlink(e,t),tr.destroyNode(n)},readlink:r=>{var e=tr.lookupPath(r).node;if(!e)throw new tr.ErrnoError(44);if(!e.node_ops.readlink)throw new tr.ErrnoError(28);return Q.resolve(tr.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=tr.lookupPath(r,{follow:!e}).node;if(!t)throw new tr.ErrnoError(44);if(!t.node_ops.getattr)throw new tr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>tr.stat(r,!0),chmod:(r,e,t)=>{var n;\"string\"==typeof r?n=tr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new tr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{tr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);tr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;\"string\"==typeof r?o=tr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new tr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{tr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=tr.getStream(r);if(!n)throw new tr.ErrnoError(8);tr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new tr.ErrnoError(28);var t;\"string\"==typeof r?t=tr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new tr.ErrnoError(63);if(tr.isDir(t.mode))throw new tr.ErrnoError(31);if(!tr.isFile(t.mode))throw new tr.ErrnoError(28);var n=tr.nodePermissions(t,\"w\");if(n)throw new tr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);if(0==(2097155&t.flags))throw new tr.ErrnoError(28);tr.truncate(t.node,e)},utime:(r,e,t)=>{var n=tr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(\"\"===r)throw new tr.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e=\"string\"==typeof e?tr.modeStringToFlags(e):e)?4095&t|32768:0,\"object\"==typeof r)a=r;else{r=$.normalize(r);try{a=tr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new tr.ErrnoError(20)}else a=tr.mknod(r,t,0),s=!0;if(!a)throw new tr.ErrnoError(44);if(tr.isChrdev(a.mode)&&(e&=-513),65536&e&&!tr.isDir(a.mode))throw new tr.ErrnoError(54);if(!s){var u=tr.mayOpen(a,e);if(u)throw new tr.ErrnoError(u)}512&e&&tr.truncate(a,0),e&=-131713;var c=tr.createStream({node:a,path:tr.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(tr.readFiles||(tr.readFiles={}),r in tr.readFiles||(tr.readFiles[r]=1)),c},close:r=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{tr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new tr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new tr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(1==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.read)throw new tr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.write)throw new tr.ErrnoError(28);r.seekable&&1024&r.flags&&tr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(e<0||t<=0)throw new tr.ErrnoError(28);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(!tr.isFile(r.node.mode)&&!tr.isDir(r.node.mode))throw new tr.ErrnoError(43);if(!r.stream_ops.allocate)throw new tr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new tr.ErrnoError(2);if(1==(2097155&r.flags))throw new tr.ErrnoError(2);if(!r.stream_ops.mmap)throw new tr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new tr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||\"binary\",\"utf8\"!==e.encoding&&\"binary\"!==e.encoding)throw new Error('Invalid encoding type \"'+e.encoding+'\"');var t,n=tr.open(r,e.flags),o=tr.stat(r).size,i=new Uint8Array(o);return tr.read(n,i,0,o,0),\"utf8\"===e.encoding?t=P(i,0):\"binary\"===e.encoding&&(t=i),tr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=tr.open(r,t.flags,t.mode);if(\"string\"==typeof e){var o=new Uint8Array(M(e)+1),i=F(e,o,0,o.length);tr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error(\"Unsupported data type\");tr.write(n,e,0,e.byteLength,void 0,t.canOwn)}tr.close(n)},cwd:()=>tr.currentPath,chdir:r=>{var e=tr.lookupPath(r,{follow:!0});if(null===e.node)throw new tr.ErrnoError(44);if(!tr.isDir(e.node.mode))throw new tr.ErrnoError(54);var t=tr.nodePermissions(e.node,\"x\");if(t)throw new tr.ErrnoError(t);tr.currentPath=e.path},createDefaultDirectories:()=>{tr.mkdir(\"/tmp\"),tr.mkdir(\"/home\"),tr.mkdir(\"/home/web_user\")},createDefaultDevices:()=>{tr.mkdir(\"/dev\"),tr.registerDevice(tr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),tr.mkdev(\"/dev/null\",tr.makedev(1,3)),Z.register(tr.makedev(5,0),Z.default_tty_ops),Z.register(tr.makedev(6,0),Z.default_tty1_ops),tr.mkdev(\"/dev/tty\",tr.makedev(5,0)),tr.mkdev(\"/dev/tty1\",tr.makedev(6,0));var r=function(){if(\"object\"==typeof crypto&&\"function\"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L(\"randomDevice\")}}();tr.createDevice(\"/dev\",\"random\",r),tr.createDevice(\"/dev\",\"urandom\",r),tr.mkdir(\"/dev/shm\"),tr.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:()=>{tr.mkdir(\"/proc\");var r=tr.mkdir(\"/proc/self\");tr.mkdir(\"/proc/self/fd\"),tr.mount({mount:()=>{var e=tr.createNode(r,\"fd\",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=tr.getStream(t);if(!n)throw new tr.ErrnoError(8);var o={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},\"/proc/self/fd\")},createStandardStreams:()=>{o.stdin?tr.createDevice(\"/dev\",\"stdin\",o.stdin):tr.symlink(\"/dev/tty\",\"/dev/stdin\"),o.stdout?tr.createDevice(\"/dev\",\"stdout\",null,o.stdout):tr.symlink(\"/dev/tty\",\"/dev/stdout\"),o.stderr?tr.createDevice(\"/dev\",\"stderr\",null,o.stderr):tr.symlink(\"/dev/tty1\",\"/dev/stderr\"),tr.open(\"/dev/stdin\",0),tr.open(\"/dev/stdout\",1),tr.open(\"/dev/stderr\",1)},ensureErrnoError:()=>{tr.ErrnoError||(tr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message=\"FS error\"},tr.ErrnoError.prototype=new Error,tr.ErrnoError.prototype.constructor=tr.ErrnoError,[44].forEach((r=>{tr.genericErrors[r]=new tr.ErrnoError(r),tr.genericErrors[r].stack=\"<generic error, no stack>\"})))},staticInit:()=>{tr.ensureErrnoError(),tr.nameTable=new Array(4096),tr.mount(er,{},\"/\"),tr.createDefaultDirectories(),tr.createDefaultDevices(),tr.createSpecialDirectories(),tr.filesystems={MEMFS:er}},init:(r,e,t)=>{tr.init.initialized=!0,tr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,tr.createStandardStreams()},quit:()=>{tr.init.initialized=!1;for(var r=0;r<tr.streams.length;r++){var e=tr.streams[r];e&&tr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=tr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=tr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=tr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=$.basename(r),n=tr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot=\"/\"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r=\"string\"==typeof r?r:tr.getPath(r);for(var o=e.split(\"/\").reverse();o.length;){var i=o.pop();if(i){var a=$.join2(r,i);try{tr.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=$.join2(\"string\"==typeof r?r:tr.getPath(r),e),a=tr.getMode(n,o);return tr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r=\"string\"==typeof r?r:tr.getPath(r),a=e?$.join2(r,e):r);var s=tr.getMode(n,o),u=tr.create(a,s);if(t){if(\"string\"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}tr.chmod(u,146|s);var f=tr.open(u,577);tr.write(f,t,0,t.length,0,i),tr.close(f),tr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=$.join2(\"string\"==typeof r?r:tr.getPath(r),e),i=tr.getMode(!!t,!!n);tr.createDevice.major||(tr.createDevice.major=64);var a=tr.makedev(tr.createDevice.major++,0);return tr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new tr.ErrnoError(29)}if(void 0===u&&0===a)throw new tr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new tr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),tr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(\"undefined\"!=typeof XMLHttpRequest)throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\");if(!i)throw new Error(\"Cannot load without read() or XMLHttpRequest.\");try{r.contents=dr(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new tr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open(\"HEAD\",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+r.status);var e,n=Number(r.getResponseHeader(\"Content-length\")),o=(e=r.getResponseHeader(\"Accept-Ranges\"))&&\"bytes\"===e,i=(e=r.getResponseHeader(\"Content-Encoding\"))&&\"gzip\"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error(\"invalid range (\"+r+\", \"+e+\") or no bytes requested!\");if(e>n-1)throw new Error(\"only \"+n+\" bytes available! programmer error!\");var o=new XMLHttpRequest;if(o.open(\"GET\",t,!1),n!==a&&o.setRequestHeader(\"Range\",\"bytes=\"+r+\"-\"+e),o.responseType=\"arraybuffer\",o.overrideMimeType&&o.overrideMimeType(\"text/plain; charset=x-user-defined\"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):dr(o.responseText||\"\",!0)})(e,o)),void 0===s.chunks[r])throw new Error(\"doXHR failed!\");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d(\"LazyFiles on gzip forces download of the whole file when length is accessed\")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},\"undefined\"!=typeof XMLHttpRequest)throw\"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc\";var a={isDevice:!1,url:t},s=tr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return tr.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{tr.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?Q.resolve($.join2(r,e)):r;function f(t){function a(t){l&&l(),u||tr.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),\"string\"==typeof t?function(r,e,t,n){var o=n?\"\":\"al \"+r;a(r,(function(t){_(t,'Loading data file \"'+r+'\" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw'Loading data file \"'+r+'\" failed.';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>\"EM_FS_\"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{d(\"creating db\"),o.result.createObjectStore(tr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([tr.DB_STORE_NAME],\"readwrite\"),i=n.objectStore(tr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(tr.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([tr.DB_STORE_NAME],\"readonly\")}catch(r){return void t(r)}var a=i.objectStore(tr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{tr.analyzePath(r).exists&&tr.unlink(r),tr.createDataFile($.dirname(r),$.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},nr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(\"/\"===e[0])return e;var n;if(-100===r)n=tr.cwd();else{var o=tr.getStream(r);if(!o)throw new tr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new tr.ErrnoError(44);return n}return $.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&$.normalize(e)!==$.normalize(tr.getPath(r.node)))return-54;throw r}return k[t>>2]=n.dev,k[t+4>>2]=0,k[t+8>>2]=n.ino,k[t+12>>2]=n.mode,k[t+16>>2]=n.nlink,k[t+20>>2]=n.uid,k[t+24>>2]=n.gid,k[t+28>>2]=n.rdev,k[t+32>>2]=0,G=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+40>>2]=G[0],k[t+44>>2]=G[1],k[t+48>>2]=4096,k[t+52>>2]=n.blocks,k[t+56>>2]=n.atime.getTime()/1e3|0,k[t+60>>2]=0,k[t+64>>2]=n.mtime.getTime()/1e3|0,k[t+68>>2]=0,k[t+72>>2]=n.ctime.getTime()/1e3|0,k[t+76>>2]=0,G=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+80>>2]=G[0],k[t+84>>2]=G[1],0},doMsync:function(r,e,t,n,o){var i=g.slice(r,r+t);tr.msync(e,i,o,t,n)},doMkdir:function(r,e){return\"/\"===(r=$.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),tr.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return tr.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=tr.readlink(r),o=Math.min(t,M(n)),i=E[e+o];return F(n,g,e,t+1),E[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=tr.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n=\"\";return 4&e&&(n+=\"r\"),2&e&&(n+=\"w\"),1&e&&(n+=\"x\"),n&&tr.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=tr.getStream(t);return n&&tr.close(n),tr.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.read(r,E,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.write(r,E,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return nr.varargs+=4,k[nr.varargs-4>>2]},getStr:function(r){return x(r)},getStreamFromFD:function(r){var e=tr.getStream(r);if(!e)throw new tr.ErrnoError(8);return e},get64:function(r,e){return r}};var or=[];function ir(r){try{return m.grow(r-y.byteLength+65535>>>16),R(m.buffer),1}catch(r){}}var ar={};function sr(){if(!sr.strings){var r={USER:\"web_user\",LOGNAME:\"web_user\",PATH:\"/\",PWD:\"/\",HOME:\"/home/web_user\",LANG:(\"object\"==typeof navigator&&navigator.languages&&navigator.languages[0]||\"C\").replace(\"-\",\"_\")+\".UTF-8\",_:u||\"./this.program\"};for(var e in ar)void 0===ar[e]?delete r[e]:r[e]=ar[e];var t=[];for(var e in r)t.push(e+\"=\"+r[e]);sr.strings=t}return sr.strings}var ur=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=tr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,lr=146;function dr(r,e,t){var n=t>0?t:M(r)+1,o=new Array(n),i=F(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(ur.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(r){r?this.mode|=cr:this.mode&=-366}},write:{get:function(){return(this.mode&lr)===lr},set:function(r){r?this.mode|=lr:this.mode&=-147}},isFolder:{get:function(){return tr.isDir(this.mode)}},isDevice:{get:function(){return tr.isChrdev(this.mode)}}}),tr.FSNode=ur,tr.staticInit();var fr={s:function(r,e){return function(r,e){var t;if(0===r)t=Date.now();else{if(1!==r&&4!==r)return K(28),-1;t=V()}return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3*1e3|0,0}(r,e)},j:function(r,e,t,n){try{return e=nr.getStr(e),e=nr.calculateAt(r,e),nr.doAccess(e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},i:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 0:return(o=nr.get())<0?-28:tr.open(n.path,n.flags,0,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=nr.get();return n.flags|=o,0;case 5:o=nr.get();return b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return K(28),-1}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},z:function(r,e){try{var t=nr.getStreamFromFD(r);return nr.doStat(tr.stat,t.path,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},x:function(r,e,t,n){try{e=nr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=nr.calculateAt(r,e,i),nr.doStat(o?tr.lstat:tr.stat,e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},A:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=nr.get();return k[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=nr.get();return tr.ioctl(n,e,o);default:L(\"bad ioctl syscall \"+e)}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},d:function(r,e,t){nr.varargs=t;try{var n=nr.getStr(r),o=t?nr.get():0;return tr.open(n,e,o).fd}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},y:function(r,e){try{return r=nr.getStr(r),nr.doStat(tr.stat,r,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},r:function(r){try{return r=nr.getStr(r),tr.unlink(r),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},p:function(){throw 1/0},t:function(r,e,t,n,o,i,a,s){try{var u=tr.getStream(o);if(!u)return-8;var c=tr.mmap(u,r,e,i,t,n),l=c.ptr;return k[a>>2]=c.allocated,l}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},u:function(r,e,t,n,o,i){try{var a=tr.getStream(o);a&&(2&t&&nr.doMsync(r,a,e,n,i),tr.munmap(a))}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},o:function(){L(\"\")},C:function(r,e,t){var n=function(r,e){var t;for(or.length=0,e>>=2;t=g[r++];){var n=t<105;n&&1&e&&e++,or.push(n?D[e++>>1]:k[e]),++e}return or}(e,t);return J[r].apply(null,n)},B:function(r,e,t){g.copyWithin(r,e,e+t)},q:function(r){var e,t,n=g.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),ir(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},v:function(r,e){var t=0;return sr().forEach((function(n,o){var i=e+t;k[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)E[e++>>0]=r.charCodeAt(n);t||(E[e>>0]=0)}(n,i),t+=n.length+1})),0},w:function(r,e){var t=sr();k[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),k[e>>2]=n,0},e:function(r){!function(r,e){!function(r){v||(o.onExit&&o.onExit(r),w=!0);c(r,new Ar(r))}(r)}(r)},c:function(r){try{var e=nr.getStreamFromFD(r);return tr.close(e),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doReadv(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},n:function(r,e,t,n,o){try{var i=nr.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(tr.llseek(i,a,n),G=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[o>>2]=G[0],k[o+4>>2]=G[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},h:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doWritev(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},b:function(){return h},k:function(r){var e=Date.now();return k[r>>2]=e/1e3|0,k[r+4>>2]=e%1e3*1e3|0,0},l:function(r,e,t,n,o,i,a){var s=Dr();try{return Y(r)(e,t,n,o,i,a)}catch(r){if(Sr(s),r!==r+0)throw r;kr(1,0)}},m:function(r,e){var t=Dr();try{Y(r)(e)}catch(r){if(Sr(t),r!==r+0)throw r;kr(1,0)}},a:function(r){h=r},f:function(r){var e=Date.now()/1e3|0;return r&&(k[r>>2]=e),e}};!function(){var r={a:fr};function e(r,e){var t,n=r.exports;o.asm=n,R((m=o.asm.D).buffer),S=o.asm.M,t=o.asm.E,j.unshift(t),O()}function t(r){e(r.instance)}function i(e){return(p||\"function\"!=typeof fetch?Promise.resolve().then((function(){return W(I)})):fetch(I,{credentials:\"same-origin\"}).then((function(r){if(!r.ok)throw\"failed to load wasm binary file at '\"+I+\"'\";return r.arrayBuffer()})).catch((function(){return W(I)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){f(\"failed to asynchronously prepare wasm: \"+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return f(\"Module.instantiateWasm callback failed with error: \"+r),!1}(p||\"function\"!=typeof WebAssembly.instantiateStreaming||q(I)||\"function\"!=typeof fetch?i(t):fetch(I,{credentials:\"same-origin\"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return f(\"wasm streaming compile failed: \"+r),f(\"falling back to ArrayBuffer instantiation\"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.E).apply(null,arguments)};var pr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(pr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.F).apply(null,arguments)},hr=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(hr=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.G).apply(null,arguments)},mr=o._emscripten_bind_Graphviz_version_0=function(){return(mr=o._emscripten_bind_Graphviz_version_0=o.asm.H).apply(null,arguments)},vr=o._emscripten_bind_Graphviz_lastError_0=function(){return(vr=o._emscripten_bind_Graphviz_lastError_0=o.asm.I).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_layout_3=function(){return(wr=o._emscripten_bind_Graphviz_layout_3=o.asm.J).apply(null,arguments)},_r=o._emscripten_bind_Graphviz_createFile_2=function(){return(_r=o._emscripten_bind_Graphviz_createFile_2=o.asm.K).apply(null,arguments)},yr=o._emscripten_bind_Graphviz___destroy___0=function(){return(yr=o._emscripten_bind_Graphviz___destroy___0=o.asm.L).apply(null,arguments)};o._malloc=function(){return(o._malloc=o.asm.N).apply(null,arguments)},o._free=function(){return(o._free=o.asm.O).apply(null,arguments)};var Er,gr=o.___errno_location=function(){return(gr=o.___errno_location=o.asm.P).apply(null,arguments)},br=o._emscripten_builtin_memalign=function(){return(br=o._emscripten_builtin_memalign=o.asm.Q).apply(null,arguments)},kr=o._setThrew=function(){return(kr=o._setThrew=o.asm.R).apply(null,arguments)},Dr=o.stackSave=function(){return(Dr=o.stackSave=o.asm.S).apply(null,arguments)},Sr=o.stackRestore=function(){return(Sr=o.stackRestore=o.asm.T).apply(null,arguments)};function Ar(r){this.name=\"ExitStatus\",this.message=\"Program terminated with exit(\"+r+\")\",this.status=r}function Pr(r){function e(){Er||(Er=!0,o.calledRun=!0,w||(o.noFSInit||tr.init.initialized||tr.init(),tr.ignorePermissions=!1,X(j),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for(\"function\"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),z.unshift(r);var r;X(z)}()))}T>0||(!function(){if(o.preRun)for(\"function\"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;X(C)}(),T>0||(o.setStatus?(o.setStatus(\"Running...\"),setTimeout((function(){setTimeout((function(){o.setStatus(\"\")}),1),e()}),1)):e()))}if(B=function r(){Er||Pr(),Er||(B=r)},o.run=Pr,o.preInit)for(\"function\"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function xr(){}function Fr(r){return(r||xr).__cache__}function Mr(r,e){var t=Fr(e),n=t[r];return n||((n=Object.create((e||xr).prototype)).ptr=r,t[r]=n)}Pr(),xr.prototype=Object.create(xr.prototype),xr.prototype.constructor=xr,xr.prototype.__class__=xr,xr.__cache__={},o.WrapperObject=xr,o.getCache=Fr,o.wrapPointer=Mr,o.castObject=function(r,e){return Mr(r.ptr,e)},o.NULL=Mr(0),o.destroy=function(r){if(!r.__destroy__)throw\"Error: Cannot destroy object. (Did you create it yourself?)\";r.__destroy__(),delete Fr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Rr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Rr.needed){for(var r=0;r<Rr.temps.length;r++)o._free(Rr.temps[r]);Rr.temps.length=0,o._free(Rr.buffer),Rr.buffer=0,Rr.size+=Rr.needed,Rr.needed=0}Rr.buffer||(Rr.size+=128,Rr.buffer=o._malloc(Rr.size),_(Rr.buffer)),Rr.pos=0},alloc:function(r,e){_(Rr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Rr.pos+i>=Rr.size?(_(i>0),Rr.needed+=i,t=o._malloc(i),Rr.temps.push(t)):(t=Rr.buffer+Rr.pos,Rr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Cr(r){if(\"string\"==typeof r){var e=dr(r),t=Rr.alloc(e,E);return Rr.copy(e,E,t),t}return r}function jr(){throw\"cannot construct a VoidPtr, no constructor in IDL\"}function zr(r,e){r&&\"object\"==typeof r&&(r=r.ptr),e&&\"object\"==typeof e&&(e=e.ptr),this.ptr=hr(r,e),Fr(zr)[this.ptr]=this}return jr.prototype=Object.create(xr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.VoidPtr=jr,jr.prototype.__destroy__=jr.prototype.__destroy__=function(){var r=this.ptr;pr(r)},zr.prototype=Object.create(xr.prototype),zr.prototype.constructor=zr,zr.prototype.__class__=zr,zr.__cache__={},o.Graphviz=zr,zr.prototype.version=zr.prototype.version=function(){var r=this.ptr;return x(mr(r))},zr.prototype.lastError=zr.prototype.lastError=function(){var r=this.ptr;return x(vr(r))},zr.prototype.layout=zr.prototype.layout=function(r,e,t){var n=this.ptr;return Rr.prepare(),r=r&&\"object\"==typeof r?r.ptr:Cr(r),e=e&&\"object\"==typeof e?e.ptr:Cr(e),t=t&&\"object\"==typeof t?t.ptr:Cr(t),x(wr(n,r,e,t))},zr.prototype.createFile=zr.prototype.createFile=function(r,e){var t=this.ptr;Rr.prepare(),r=r&&\"object\"==typeof r?r.ptr:Cr(r),e=e&&\"object\"==typeof e?e.ptr:Cr(e),_r(t,r,e)},zr.prototype.__destroy__=zr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},e.ready}})();r.exports=t}(u);var c=u.exports,l=Object.freeze(e({__proto__:null,default:c},[u.exports])),d=function(){return d=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r},d.apply(this,arguments)},f=function(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))};function p(r){return{path:r.path,data:'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\\n<svg width=\"'.concat(r.width,'\" height=\"').concat(r.height,'\"></svg>')}}function h(r,e){var t,n=d({images:[],files:[]},e);f(f([],n.files,!0),(t=n.images,t.map(p)),!0).forEach((function(e){return r.createFile(e.path,e.data)}))}var m={layout:function(r,e,t,n){return void 0===e&&(e=\"svg\"),void 0===t&&(t=\"dot\"),r?s(l,null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((function(o){var i=new o.Graphviz(void 0!==(null==n?void 0:n.yInvert)&&(null==n?void 0:n.yInvert),void 0!==(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);h(i,n);var a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve(\"\")},circo:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"circo\",t)},dot:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"dot\",t)},fdp:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"fdp\",t)},sfdp:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"sfdp\",t)},neato:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"neato\",t)},osage:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"osage\",t)},patchwork:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"patchwork\",t)},twopi:function(r,e,t){return void 0===e&&(e=\"svg\"),this.layout(r,e,\"twopi\",t)}},v=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};var w={exports:{}};\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */function _(r){return void 0!==r.children}!function(r,e){r.exports=function(){function r(r){var e=typeof r;return null!==r&&(\"object\"===e||\"function\"===e)}function e(r){return\"function\"==typeof r}var t=Array.isArray?Array.isArray:function(r){return\"[object Array]\"===Object.prototype.toString.call(r)},n=0,o=void 0,i=void 0,a=function(r,e){E[n]=r,E[n+1]=e,2===(n+=2)&&(i?i(g):k())};function s(r){i=r}function u(r){a=r}var c=\"undefined\"!=typeof window?window:void 0,l=c||{},d=l.MutationObserver||l.WebKitMutationObserver,f=\"undefined\"==typeof self&&\"undefined\"!=typeof process&&\"[object process]\"==={}.toString.call(process),p=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel;function h(){return function(){return process.nextTick(g)}}function m(){return void 0!==o?function(){o(g)}:y()}function w(){var r=0,e=new d(g),t=document.createTextNode(\"\");return e.observe(t,{characterData:!0}),function(){t.data=r=++r%2}}function _(){var r=new MessageChannel;return r.port1.onmessage=g,function(){return r.port2.postMessage(0)}}function y(){var r=setTimeout;return function(){return r(g,1)}}var E=new Array(1e3);function g(){for(var r=0;r<n;r+=2)(0,E[r])(E[r+1]),E[r]=void 0,E[r+1]=void 0;n=0}function b(){try{var r=Function(\"return this\")().require(\"vertx\");return o=r.runOnLoop||r.runOnContext,m()}catch(r){return y()}}var k=void 0;function D(r,e){var t=this,n=new this.constructor(P);void 0===n[A]&&J(n);var o=t._state;if(o){var i=arguments[o-1];a((function(){return G(o,n,i,t._result)}))}else U(t,n,r,e);return n}function S(r){var e=this;if(r&&\"object\"==typeof r&&r.constructor===e)return r;var t=new e(P);return N(t,r),t}k=f?h():d?w():p?_():void 0===c?b():y();var A=Math.random().toString(36).substring(2);function P(){}var x=void 0,F=1,M=2;function R(){return new TypeError(\"You cannot resolve a promise with itself\")}function C(){return new TypeError(\"A promises callback cannot return that same promise.\")}function j(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}function z(r,e,t){a((function(r){var n=!1,o=j(t,e,(function(t){n||(n=!0,e!==t?N(r,t):L(r,t))}),(function(e){n||(n=!0,I(r,e))}),\"Settle: \"+(r._label||\" unknown promise\"));!n&&o&&(n=!0,I(r,o))}),r)}function T(r,e){e._state===F?L(r,e._result):e._state===M?I(r,e._result):U(e,void 0,(function(e){return N(r,e)}),(function(e){return I(r,e)}))}function B(r,t,n){t.constructor===r.constructor&&n===D&&t.constructor.resolve===S?T(r,t):void 0===n?L(r,t):e(n)?z(r,t,n):L(r,t)}function N(e,t){if(e===t)I(e,R());else if(r(t)){var n=void 0;try{n=t.then}catch(r){return void I(e,r)}B(e,t,n)}else L(e,t)}function O(r){r._onerror&&r._onerror(r._result),H(r)}function L(r,e){r._state===x&&(r._result=e,r._state=F,0!==r._subscribers.length&&a(H,r))}function I(r,e){r._state===x&&(r._state=M,r._result=e,a(O,r))}function U(r,e,t,n){var o=r._subscribers,i=o.length;r._onerror=null,o[i]=e,o[i+F]=t,o[i+M]=n,0===i&&r._state&&a(H,r)}function H(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?G(t,n,o,i):o(i);r._subscribers.length=0}}function G(r,t,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void I(t,C())}else a=o;t._state!==x||(i&&u?N(t,a):!1===u?I(t,s):r===F?L(t,a):r===M&&I(t,a))}function q(r,e){try{e((function(e){N(r,e)}),(function(e){I(r,e)}))}catch(e){I(r,e)}}var W=0;function V(){return W++}function J(r){r[A]=W++,r._state=void 0,r._result=void 0,r._subscribers=[]}function X(){return new Error(\"Array Methods must be provided an Array\")}var Y=function(){function r(r,e){this._instanceConstructor=r,this.promise=new r(P),this.promise[A]||J(this.promise),t(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,X())}return r.prototype._enumerate=function(r){for(var e=0;this._state===x&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===S){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===D&&r._state!==x)this._settledAt(r._state,e,r._result);else if(\"function\"!=typeof o)this._remaining--,this._result[e]=r;else if(t===er){var s=new t(P);a?I(s,i):B(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t((function(e){return e(r)})),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===x&&(this._remaining--,r===M?I(n,t):this._result[e]=t),0===this._remaining&&L(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;U(r,void 0,(function(r){return t._settledAt(F,e,r)}),(function(r){return t._settledAt(M,e,r)}))},r}();function K(r){return new Y(this,r).promise}function $(r){var e=this;return t(r)?new e((function(t,n){for(var o=r.length,i=0;i<o;i++)e.resolve(r[i]).then(t,n)})):new e((function(r,e){return e(new TypeError(\"You must pass an array to race.\"))}))}function Q(r){var e=new this(P);return I(e,r),e}function Z(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}function rr(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}var er=function(){function r(e){this[A]=V(),this._result=this._state=void 0,this._subscribers=[],P!==e&&(\"function\"!=typeof e&&Z(),this instanceof r?q(this,e):rr())}return r.prototype.catch=function(r){return this.then(null,r)},r.prototype.finally=function(r){var t=this,n=t.constructor;return e(r)?t.then((function(e){return n.resolve(r()).then((function(){return e}))}),(function(e){return n.resolve(r()).then((function(){throw e}))})):t.then(r,r)},r}();function tr(){var r=void 0;if(void 0!==v)r=v;else if(\"undefined\"!=typeof self)r=self;else try{r=Function(\"return this\")()}catch(r){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if(\"[object Promise]\"===t&&!e.cast)return}r.Promise=er}return er.prototype.then=D,er.all=K,er.race=$,er.resolve=S,er.reject=Q,er._setScheduler=s,er._setAsap=u,er._asap=a,er.polyfill=tr,er.Promise=er,er}()}(w),w.exports.polyfill();var y=function(r){var e=[];return r.children.forEach((function(r){_(r)?e.push(y(r)):e.push(E(r))})),\"subgraph cluster_\".concat(r.id,' {\\nid=\"').concat(r.id,'\";\\nlabel=\"').concat(r.text,'\";\\nmargin=16;\\n').concat(e.join(\"\\n\"),\"\\n}\")},E=function(r){return\"\".concat(r.id,' [id=\"').concat(r.id,'\" label=\"').concat(r.text,'\" width=').concat(k(r.width),\" height=\").concat(k(r.height),\"]\")},g=function(r){return 96*r/72},b=function(r){return 96*r},k=function(r){return r/96};function D(r){var e=r?r.split(\",\").map((function(r){return g(+r)})):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function S(r,e){var t=r.split(\",\").map((function(r){return g(+r)})),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function A(r,e,t){return void 0===t&&(t=\"json\"),m[r](e,t).then((function(r){return\"json\"===t?JSON.parse(r):r}))}function P(e,t){if(self.document=self.document||{currentScript:{src:t.wasmFolder+\"/dummy.js\"}},e.raw)return A(t.engine,e.raw,\"svg\");var n={},o=[],i=[],a={},s=[],u=[],c={},l=[],d=[];function f(r,e){_(r)?(n[r.id]=r,o.push(r),r.children.forEach((function(r){return f(r,!1)})),e&&i.push(y(r))):(a[r.id]=r,s.push(r),e&&u.push(E(r)))}return e.items.forEach((function(r){return f(r,!0)})),e.links.forEach((function(r){var e,t,n,o;c[r.id]=r,l.push(r),d.push((e=r.source.id,t=r.target.id,n=r.id,o=r.text,\"\".concat(e,\" -> \").concat(t,' [id=\"').concat(n,'\", label=\"').concat(o,'\"]')))})),A(t.engine,\"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n\".concat(i.join(\"\\n\"),\"\\n\\n\").concat(d.join(\"\\n\"),\"\\n\\n\").concat(u.join(\"\\n\"),\"\\n}\")).then((function(e){var t=D(e.bb);return e.objects&&e.objects.forEach((function(r){if(r.nodes){var e=function(r,e){var t=D(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,l=r.height,d=S(u,t),f=b(+c),p=b(+l),{x:d.x,y:d.y,width:f,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,l,d,f,p})),e.edges&&e.edges.forEach((function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(\" \").map((function(r){return S(r,t)})).map((function(r){return[r.x-t.width/2,r.y-t.height/2]})),o=n.shift();return r(r([],n,!0),[o],!1)}return[]}(e,t))})),{clusters:o,nodes:s,links:l}}))}self.onmessage=function(r){P.apply(void 0,r.data).then((function(r){self.postMessage(r)}))}}();";
|
|
15762
|
+
var workerCode = "!function(){\"use strict\";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */function r(r,e,t){if(t||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return r.concat(n||Array.prototype.slice.call(e))}function e(r,e){return e.forEach((function(e){e&&\"string\"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(t){if(\"default\"!==t&&!(t in r)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}))})),Object.freeze(r)}var t,n,o,i={exports:{}};t=i,n=\"undefined\"!=typeof document&&document.currentScript?document.currentScript.src:void 0,o=function(r){var e,t,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){e=r,t=n}));var i,a,s=Object.assign({},o),u=\"./this.program\",c=\"\";\"undefined\"!=typeof document&&document.currentScript&&(c=document.currentScript.src),n&&(c=n),c=0!==c.indexOf(\"blob:\")?c.substr(0,c.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1):\"\",i=r=>{var e=new XMLHttpRequest;return e.open(\"GET\",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open(\"GET\",r,!0),n.responseType=\"arraybuffer\",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var l,d,f=o.print||console.log.bind(console),p=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit,o.wasmBinary&&(l=o.wasmBinary),o.noExitRuntime,\"object\"!=typeof WebAssembly&&L(\"no native wasm support detected\");var h=!1;function m(r,e){r||L(e)}var v,w,_,y,E,g,b=\"undefined\"!=typeof TextDecoder?new TextDecoder(\"utf8\"):void 0;function k(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&b)return b.decode(r.subarray(e,o));for(var i=\"\";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(r,e){return r?k(_,r,e):\"\"}function S(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function A(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function P(r){v=r,o.HEAP8=w=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=y=new Int32Array(r),o.HEAPU8=_=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=E=new Float64Array(r)}o.INITIAL_MEMORY;var x,F,M,R,C=[],z=[],j=[],T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),p(r=\"Aborted(\"+r+\")\"),h=!0,r+=\". Build with -s ASSERTIONS=1 for more info.\";var e=new WebAssembly.RuntimeError(r);throw t(e),e}function I(r){return r.startsWith(\"data:application/octet-stream;base64,\")}function U(r){try{if(r==x&&l)return new Uint8Array(l);throw\"both async and sync fetching of the wasm failed\"}catch(r){L(r)}}o.preloadedImages={},o.preloadedAudios={},I(x=\"expatlib.wasm\")||(F=x,x=o.locateFile?o.locateFile(F,c):c+F);var H={11678:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty(\"startElement\"))throw\"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.\";e.startElement()},11896:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty(\"endElement\"))throw\"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.\";e.endElement()},12108:function(r){var e=o.getCache(o.CExpatJS)[r];if(!e.hasOwnProperty(\"characterData\"))throw\"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.\";e.characterData()}};function G(r){for(;r.length>0;){var e=r.shift();if(\"function\"!=typeof e){var t=e.func;\"number\"==typeof t?void 0===e.arg?q(t)():q(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function q(r){return g.get(r)}var W={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];\".\"===o?r.splice(n,1):\"..\"===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift(\"..\");return r},normalize:function(r){var e=\"/\"===r.charAt(0),t=\"/\"===r.substr(-1);return(r=W.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||e||(r=\".\"),r&&t&&(r+=\"/\"),(e?\"/\":\"\")+r},dirname:function(r){var e=W.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):\".\"},basename:function(r){if(\"/\"===r)return\"/\";var e=(r=(r=W.normalize(r)).replace(/\\/$/,\"\")).lastIndexOf(\"/\");return-1===e?r:r.substr(e+1)},extname:function(r){return W.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return W.normalize(r.join(\"/\"))},join2:function(r,e){return W.normalize(r+\"/\"+e)}},V={resolve:function(){for(var r=\"\",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Y.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");if(!n)return\"\";r=n+\"/\"+r,e=\"/\"===n.charAt(0)}return(e?\"/\":\"\")+(r=W.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||\".\"},relative:function(r,e){function t(r){for(var e=0;e<r.length&&\"\"===r[e];e++);for(var t=r.length-1;t>=0&&\"\"===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=V.resolve(r).substr(1),e=V.resolve(e).substr(1);for(var n=t(r.split(\"/\")),o=t(e.split(\"/\")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push(\"..\");return(u=u.concat(o.slice(a))).join(\"/\")}},J={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){J.ttys[r]={input:[],output:[],ops:e},Y.registerDevice(r,J.stream_ops)},stream_ops:{open:function(r){var e=J.ttys[r.node.rdev];if(!e)throw new Y.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Y.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Y.ErrnoError(29)}if(void 0===s&&0===i)throw new Y.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Y.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new Y.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(\"undefined\"!=typeof window&&\"function\"==typeof window.prompt?null!==(e=window.prompt(\"Input: \"))&&(e+=\"\\n\"):\"function\"==typeof readline&&null!==(e=readline())&&(e+=\"\\n\"),!e)return null;r.input=or(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(f(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(k(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(p(k(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(p(k(r.output,0)),r.output=[])}}},X={ops_table:null,mount:function(r){return X.createNode(null,\"/\",16895,0)},createNode:function(r,e,t,n){if(Y.isBlkdev(t)||Y.isFIFO(t))throw new Y.ErrnoError(63);X.ops_table||(X.ops_table={dir:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,lookup:X.node_ops.lookup,mknod:X.node_ops.mknod,rename:X.node_ops.rename,unlink:X.node_ops.unlink,rmdir:X.node_ops.rmdir,readdir:X.node_ops.readdir,symlink:X.node_ops.symlink},stream:{llseek:X.stream_ops.llseek}},file:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:{llseek:X.stream_ops.llseek,read:X.stream_ops.read,write:X.stream_ops.write,allocate:X.stream_ops.allocate,mmap:X.stream_ops.mmap,msync:X.stream_ops.msync}},link:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr,readlink:X.node_ops.readlink},stream:{}},chrdev:{node:{getattr:X.node_ops.getattr,setattr:X.node_ops.setattr},stream:Y.chrdev_stream_ops}});var o=Y.createNode(r,e,t,n);return Y.isDir(o.mode)?(o.node_ops=X.ops_table.dir.node,o.stream_ops=X.ops_table.dir.stream,o.contents={}):Y.isFile(o.mode)?(o.node_ops=X.ops_table.file.node,o.stream_ops=X.ops_table.file.stream,o.usedBytes=0,o.contents=null):Y.isLink(o.mode)?(o.node_ops=X.ops_table.link.node,o.stream_ops=X.ops_table.link.stream):Y.isChrdev(o.mode)&&(o.node_ops=X.ops_table.chrdev.node,o.stream_ops=X.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=Y.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Y.isDir(r.mode)?e.size=4096:Y.isFile(r.mode)?e.size=r.usedBytes:Y.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&X.resizeFileStorage(r,e.size)},lookup:function(r,e){throw Y.genericErrors[44]},mknod:function(r,e,t,n){return X.createNode(r,e,t,n)},rename:function(r,e,t){if(Y.isDir(r.mode)){var n;try{n=Y.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Y.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=Y.lookupNode(r,e);for(var n in t.contents)throw new Y.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[\".\",\"..\"];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=X.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!Y.isLink(r.mode))throw new Y.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===w.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(X.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Y.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Y.ErrnoError(28);return n},allocate:function(r,e,t){X.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new Y.ErrnoError(28);if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==v){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=void L()))throw new Y.ErrnoError(48);w.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!Y.isFile(r.node.mode))throw new Y.ErrnoError(43);return 2&o||X.stream_ops.write(r,e,0,n,t,!1),0}}},Y={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=V.resolve(Y.cwd(),r)))return{path:\"\",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new Y.ErrnoError(32);for(var o=W.normalizeArray(r.split(\"/\").filter((r=>!!r)),!1),i=Y.root,a=\"/\",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=Y.lookupNode(i,o[s]),a=W.join2(a,o[s]),Y.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;Y.isLink(i.mode);){var l=Y.readlink(a);if(a=V.resolve(W.dirname(a),l),i=Y.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new Y.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(Y.isRoot(r)){var t=r.mount.mountpoint;return e?\"/\"!==t[t.length-1]?t+\"/\"+e:t+e:t}e=e?r.name+\"/\"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Y.nameTable.length},hashAddNode:r=>{var e=Y.hashName(r.parent.id,r.name);r.name_next=Y.nameTable[e],Y.nameTable[e]=r},hashRemoveNode:r=>{var e=Y.hashName(r.parent.id,r.name);if(Y.nameTable[e]===r)Y.nameTable[e]=r.name_next;else for(var t=Y.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=Y.mayLookup(r);if(t)throw new Y.ErrnoError(t,r);for(var n=Y.hashName(r.id,e),o=Y.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return Y.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new Y.FSNode(r,e,t,n);return Y.hashAddNode(o),o},destroyNode:r=>{Y.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,\"r+\":2,w:577,\"w+\":578,a:1089,\"a+\":1090},modeStringToFlags:r=>{var e=Y.flagModes[r];if(void 0===e)throw new Error(\"Unknown file open mode: \"+r);return e},flagsToPermissionString:r=>{var e=[\"r\",\"w\",\"rw\"][3&r];return 512&r&&(e+=\"w\"),e},nodePermissions:(r,e)=>Y.ignorePermissions||(!e.includes(\"r\")||292&r.mode)&&(!e.includes(\"w\")||146&r.mode)&&(!e.includes(\"x\")||73&r.mode)?0:2,mayLookup:r=>{var e=Y.nodePermissions(r,\"x\");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{return Y.lookupNode(r,e),20}catch(r){}return Y.nodePermissions(r,\"wx\")},mayDelete:(r,e,t)=>{var n;try{n=Y.lookupNode(r,e)}catch(r){return r.errno}var o=Y.nodePermissions(r,\"wx\");if(o)return o;if(t){if(!Y.isDir(n.mode))return 54;if(Y.isRoot(n)||Y.getPath(n)===Y.cwd())return 10}else if(Y.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Y.isLink(r.mode)?32:Y.isDir(r.mode)&&(\"r\"!==Y.flagsToPermissionString(e)||512&e)?31:Y.nodePermissions(r,Y.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=Y.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!Y.streams[t])return t;throw new Y.ErrnoError(33)},getStream:r=>Y.streams[r],createStream:(r,e,t)=>{Y.FSStream||(Y.FSStream=function(){},Y.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new Y.FSStream,r);var n=Y.nextfd(e,t);return r.fd=n,Y.streams[n]=r,r},closeStream:r=>{Y.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=Y.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Y.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{Y.devices[r]={stream_ops:e}},getDevice:r=>Y.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{\"function\"==typeof r&&(e=r,r=!1),Y.syncFSRequests++,Y.syncFSRequests>1&&p(\"warning: \"+Y.syncFSRequests+\" FS.syncfs operations in flight at once, probably just doing extra work\");var t=Y.getMounts(Y.root.mount),n=0;function o(r){return Y.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o=\"/\"===t,i=!t;if(o&&Y.root)throw new Y.ErrnoError(10);if(!o&&!i){var a=Y.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Y.isMountpoint(n))throw new Y.ErrnoError(10);if(!Y.isDir(n.mode))throw new Y.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Y.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=Y.lookupPath(r,{follow_mount:!1});if(!Y.isMountpoint(e.node))throw new Y.ErrnoError(28);var t=e.node,n=t.mounted,o=Y.getMounts(n);Object.keys(Y.nameTable).forEach((r=>{for(var e=Y.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Y.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=Y.lookupPath(r,{parent:!0}).node,o=W.basename(r);if(!o||\".\"===o||\"..\"===o)throw new Y.ErrnoError(28);var i=Y.mayCreate(n,o);if(i)throw new Y.ErrnoError(i);if(!n.node_ops.mknod)throw new Y.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Y.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Y.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split(\"/\"),n=\"\",o=0;o<t.length;++o)if(t[o]){n+=\"/\"+t[o];try{Y.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,Y.mknod(r,e,t)),symlink:(r,e)=>{if(!V.resolve(r))throw new Y.ErrnoError(44);var t=Y.lookupPath(e,{parent:!0}).node;if(!t)throw new Y.ErrnoError(44);var n=W.basename(e),o=Y.mayCreate(t,n);if(o)throw new Y.ErrnoError(o);if(!t.node_ops.symlink)throw new Y.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=W.dirname(r),i=W.dirname(e),a=W.basename(r),s=W.basename(e);if(t=Y.lookupPath(r,{parent:!0}).node,n=Y.lookupPath(e,{parent:!0}).node,!t||!n)throw new Y.ErrnoError(44);if(t.mount!==n.mount)throw new Y.ErrnoError(75);var u,c=Y.lookupNode(t,a),l=V.relative(r,i);if(\".\"!==l.charAt(0))throw new Y.ErrnoError(28);if(\".\"!==(l=V.relative(e,o)).charAt(0))throw new Y.ErrnoError(55);try{u=Y.lookupNode(n,s)}catch(r){}if(c!==u){var d=Y.isDir(c.mode),f=Y.mayDelete(t,a,d);if(f)throw new Y.ErrnoError(f);if(f=u?Y.mayDelete(n,s,d):Y.mayCreate(n,s))throw new Y.ErrnoError(f);if(!t.node_ops.rename)throw new Y.ErrnoError(63);if(Y.isMountpoint(c)||u&&Y.isMountpoint(u))throw new Y.ErrnoError(10);if(n!==t&&(f=Y.nodePermissions(t,\"w\")))throw new Y.ErrnoError(f);Y.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Y.hashAddNode(c)}}},rmdir:r=>{var e=Y.lookupPath(r,{parent:!0}).node,t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!0);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.rmdir)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.rmdir(e,t),Y.destroyNode(n)},readdir:r=>{var e=Y.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Y.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=Y.lookupPath(r,{parent:!0}).node;if(!e)throw new Y.ErrnoError(44);var t=W.basename(r),n=Y.lookupNode(e,t),o=Y.mayDelete(e,t,!1);if(o)throw new Y.ErrnoError(o);if(!e.node_ops.unlink)throw new Y.ErrnoError(63);if(Y.isMountpoint(n))throw new Y.ErrnoError(10);e.node_ops.unlink(e,t),Y.destroyNode(n)},readlink:r=>{var e=Y.lookupPath(r).node;if(!e)throw new Y.ErrnoError(44);if(!e.node_ops.readlink)throw new Y.ErrnoError(28);return V.resolve(Y.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=Y.lookupPath(r,{follow:!e}).node;if(!t)throw new Y.ErrnoError(44);if(!t.node_ops.getattr)throw new Y.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>Y.stat(r,!0),chmod:(r,e,t)=>{var n;if(!(n=\"string\"==typeof r?Y.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{Y.chmod(r,e,!0)},fchmod:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);Y.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if(!(o=\"string\"==typeof r?Y.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{Y.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=Y.getStream(r);if(!n)throw new Y.ErrnoError(8);Y.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new Y.ErrnoError(28);var t;if(!(t=\"string\"==typeof r?Y.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new Y.ErrnoError(63);if(Y.isDir(t.mode))throw new Y.ErrnoError(31);if(!Y.isFile(t.mode))throw new Y.ErrnoError(28);var n=Y.nodePermissions(t,\"w\");if(n)throw new Y.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);if(0==(2097155&t.flags))throw new Y.ErrnoError(28);Y.truncate(t.node,e)},utime:(r,e,t)=>{var n=Y.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(\"\"===r)throw new Y.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e=\"string\"==typeof e?Y.modeStringToFlags(e):e)?4095&t|32768:0,\"object\"==typeof r)a=r;else{r=W.normalize(r);try{a=Y.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new Y.ErrnoError(20)}else a=Y.mknod(r,t,0),s=!0;if(!a)throw new Y.ErrnoError(44);if(Y.isChrdev(a.mode)&&(e&=-513),65536&e&&!Y.isDir(a.mode))throw new Y.ErrnoError(54);if(!s){var u=Y.mayOpen(a,e);if(u)throw new Y.ErrnoError(u)}512&e&&Y.truncate(a,0),e&=-131713;var c=Y.createStream({node:a,path:Y.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(Y.readFiles||(Y.readFiles={}),r in Y.readFiles||(Y.readFiles[r]=1)),c},close:r=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Y.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Y.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Y.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(1==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.read)throw new Y.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new Y.ErrnoError(28);if(Y.isClosed(r))throw new Y.ErrnoError(8);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(Y.isDir(r.node.mode))throw new Y.ErrnoError(31);if(!r.stream_ops.write)throw new Y.ErrnoError(28);r.seekable&&1024&r.flags&&Y.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new Y.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(Y.isClosed(r))throw new Y.ErrnoError(8);if(e<0||t<=0)throw new Y.ErrnoError(28);if(0==(2097155&r.flags))throw new Y.ErrnoError(8);if(!Y.isFile(r.node.mode)&&!Y.isDir(r.node.mode))throw new Y.ErrnoError(43);if(!r.stream_ops.allocate)throw new Y.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new Y.ErrnoError(2);if(1==(2097155&r.flags))throw new Y.ErrnoError(2);if(!r.stream_ops.mmap)throw new Y.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new Y.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||\"binary\",\"utf8\"!==e.encoding&&\"binary\"!==e.encoding)throw new Error('Invalid encoding type \"'+e.encoding+'\"');var t,n=Y.open(r,e.flags),o=Y.stat(r).size,i=new Uint8Array(o);return Y.read(n,i,0,o,0),\"utf8\"===e.encoding?t=k(i,0):\"binary\"===e.encoding&&(t=i),Y.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=Y.open(r,t.flags,t.mode);if(\"string\"==typeof e){var o=new Uint8Array(A(e)+1),i=S(e,o,0,o.length);Y.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error(\"Unsupported data type\");Y.write(n,e,0,e.byteLength,void 0,t.canOwn)}Y.close(n)},cwd:()=>Y.currentPath,chdir:r=>{var e=Y.lookupPath(r,{follow:!0});if(null===e.node)throw new Y.ErrnoError(44);if(!Y.isDir(e.node.mode))throw new Y.ErrnoError(54);var t=Y.nodePermissions(e.node,\"x\");if(t)throw new Y.ErrnoError(t);Y.currentPath=e.path},createDefaultDirectories:()=>{Y.mkdir(\"/tmp\"),Y.mkdir(\"/home\"),Y.mkdir(\"/home/web_user\")},createDefaultDevices:()=>{Y.mkdir(\"/dev\"),Y.registerDevice(Y.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Y.mkdev(\"/dev/null\",Y.makedev(1,3)),J.register(Y.makedev(5,0),J.default_tty_ops),J.register(Y.makedev(6,0),J.default_tty1_ops),Y.mkdev(\"/dev/tty\",Y.makedev(5,0)),Y.mkdev(\"/dev/tty1\",Y.makedev(6,0));var r=function(){if(\"object\"==typeof crypto&&\"function\"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L(\"randomDevice\")}}();Y.createDevice(\"/dev\",\"random\",r),Y.createDevice(\"/dev\",\"urandom\",r),Y.mkdir(\"/dev/shm\"),Y.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:()=>{Y.mkdir(\"/proc\");var r=Y.mkdir(\"/proc/self\");Y.mkdir(\"/proc/self/fd\"),Y.mount({mount:()=>{var e=Y.createNode(r,\"fd\",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=Y.getStream(t);if(!n)throw new Y.ErrnoError(8);var o={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},\"/proc/self/fd\")},createStandardStreams:()=>{o.stdin?Y.createDevice(\"/dev\",\"stdin\",o.stdin):Y.symlink(\"/dev/tty\",\"/dev/stdin\"),o.stdout?Y.createDevice(\"/dev\",\"stdout\",null,o.stdout):Y.symlink(\"/dev/tty\",\"/dev/stdout\"),o.stderr?Y.createDevice(\"/dev\",\"stderr\",null,o.stderr):Y.symlink(\"/dev/tty1\",\"/dev/stderr\"),Y.open(\"/dev/stdin\",0),Y.open(\"/dev/stdout\",1),Y.open(\"/dev/stderr\",1)},ensureErrnoError:()=>{Y.ErrnoError||(Y.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message=\"FS error\"},Y.ErrnoError.prototype=new Error,Y.ErrnoError.prototype.constructor=Y.ErrnoError,[44].forEach((r=>{Y.genericErrors[r]=new Y.ErrnoError(r),Y.genericErrors[r].stack=\"<generic error, no stack>\"})))},staticInit:()=>{Y.ensureErrnoError(),Y.nameTable=new Array(4096),Y.mount(X,{},\"/\"),Y.createDefaultDirectories(),Y.createDefaultDevices(),Y.createSpecialDirectories(),Y.filesystems={MEMFS:X}},init:(r,e,t)=>{Y.init.initialized=!0,Y.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,Y.createStandardStreams()},quit:()=>{Y.init.initialized=!1;for(var r=0;r<Y.streams.length;r++){var e=Y.streams[r];e&&Y.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=Y.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=Y.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Y.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=W.basename(r),n=Y.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot=\"/\"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r=\"string\"==typeof r?r:Y.getPath(r);for(var o=e.split(\"/\").reverse();o.length;){var i=o.pop();if(i){var a=W.join2(r,i);try{Y.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=W.join2(\"string\"==typeof r?r:Y.getPath(r),e),a=Y.getMode(n,o);return Y.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r=\"string\"==typeof r?r:Y.getPath(r),a=e?W.join2(r,e):r);var s=Y.getMode(n,o),u=Y.create(a,s);if(t){if(\"string\"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Y.chmod(u,146|s);var f=Y.open(u,577);Y.write(f,t,0,t.length,0,i),Y.close(f),Y.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=W.join2(\"string\"==typeof r?r:Y.getPath(r),e),i=Y.getMode(!!t,!!n);Y.createDevice.major||(Y.createDevice.major=64);var a=Y.makedev(Y.createDevice.major++,0);return Y.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Y.ErrnoError(29)}if(void 0===u&&0===a)throw new Y.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new Y.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),Y.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(\"undefined\"!=typeof XMLHttpRequest)throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\");if(!i)throw new Error(\"Cannot load without read() or XMLHttpRequest.\");try{r.contents=or(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Y.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open(\"HEAD\",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+r.status);var e,n=Number(r.getResponseHeader(\"Content-length\")),o=(e=r.getResponseHeader(\"Accept-Ranges\"))&&\"bytes\"===e,i=(e=r.getResponseHeader(\"Content-Encoding\"))&&\"gzip\"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error(\"invalid range (\"+r+\", \"+e+\") or no bytes requested!\");if(e>n-1)throw new Error(\"only \"+n+\" bytes available! programmer error!\");var o=new XMLHttpRequest;if(o.open(\"GET\",t,!1),n!==a&&o.setRequestHeader(\"Range\",\"bytes=\"+r+\"-\"+e),o.responseType=\"arraybuffer\",o.overrideMimeType&&o.overrideMimeType(\"text/plain; charset=x-user-defined\"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):or(o.responseText||\"\",!0)})(e,o)),void 0===s.chunks[r])throw new Error(\"doXHR failed!\");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,f(\"LazyFiles on gzip forces download of the whole file when length is accessed\")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},\"undefined\"!=typeof XMLHttpRequest)throw\"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc\";var a={isDevice:!1,url:t},s=Y.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return Y.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{Y.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?V.resolve(W.join2(r,e)):r;function f(t){function a(t){l&&l(),u||Y.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),\"string\"==typeof t?function(r,e,t,n){var o=n?\"\":\"al \"+r;a(r,(function(t){m(t,'Loading data file \"'+r+'\" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw'Loading data file \"'+r+'\" failed.';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>\"EM_FS_\"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{f(\"creating db\"),o.result.createObjectStore(Y.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Y.DB_STORE_NAME],\"readwrite\"),i=n.objectStore(Y.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(Y.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=Y.indexedDB();try{var o=n.open(Y.DB_NAME(),Y.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Y.DB_STORE_NAME],\"readonly\")}catch(r){return void t(r)}var a=i.objectStore(Y.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{Y.analyzePath(r).exists&&Y.unlink(r),Y.createDataFile(W.dirname(r),W.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},K={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(\"/\"===e[0])return e;var n;if(-100===r)n=Y.cwd();else{var o=Y.getStream(r);if(!o)throw new Y.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new Y.ErrnoError(44);return n}return W.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&W.normalize(e)!==W.normalize(Y.getPath(r.node)))return-54;throw r}return y[t>>2]=n.dev,y[t+4>>2]=0,y[t+8>>2]=n.ino,y[t+12>>2]=n.mode,y[t+16>>2]=n.nlink,y[t+20>>2]=n.uid,y[t+24>>2]=n.gid,y[t+28>>2]=n.rdev,y[t+32>>2]=0,R=[n.size>>>0,(M=n.size,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+40>>2]=R[0],y[t+44>>2]=R[1],y[t+48>>2]=4096,y[t+52>>2]=n.blocks,y[t+56>>2]=n.atime.getTime()/1e3|0,y[t+60>>2]=0,y[t+64>>2]=n.mtime.getTime()/1e3|0,y[t+68>>2]=0,y[t+72>>2]=n.ctime.getTime()/1e3|0,y[t+76>>2]=0,R=[n.ino>>>0,(M=n.ino,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[t+80>>2]=R[0],y[t+84>>2]=R[1],0},doMsync:function(r,e,t,n,o){var i=_.slice(r,r+t);Y.msync(e,i,o,t,n)},doMkdir:function(r,e){return\"/\"===(r=W.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Y.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Y.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=Y.readlink(r),o=Math.min(t,A(n)),i=w[e+o];return S(n,_,e,t+1),w[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=Y.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n=\"\";return 4&e&&(n+=\"r\"),2&e&&(n+=\"w\"),1&e&&(n+=\"x\"),n&&Y.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=Y.getStream(t);return n&&Y.close(n),Y.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.read(r,w,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=y[e+8*i>>2],s=y[e+(8*i+4)>>2],u=Y.write(r,w,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return K.varargs+=4,y[K.varargs-4>>2]},getStr:function(r){return D(r)},getStreamFromFD:function(r){var e=Y.getStream(r);if(!e)throw new Y.ErrnoError(8);return e},get64:function(r,e){return r}},$=[];function Q(r){try{return d.grow(r-v.byteLength+65535>>>16),P(d.buffer),1}catch(r){}}var Z={};function rr(){if(!rr.strings){var r={USER:\"web_user\",LOGNAME:\"web_user\",PATH:\"/\",PWD:\"/\",HOME:\"/home/web_user\",LANG:(\"object\"==typeof navigator&&navigator.languages&&navigator.languages[0]||\"C\").replace(\"-\",\"_\")+\".UTF-8\",_:u||\"./this.program\"};for(var e in Z)void 0===Z[e]?delete r[e]:r[e]=Z[e];var t=[];for(var e in r)t.push(e+\"=\"+r[e]);rr.strings=t}return rr.strings}var er=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Y.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},tr=365,nr=146;function or(r,e,t){var n=t>0?t:A(r)+1,o=new Array(n),i=S(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(er.prototype,{read:{get:function(){return(this.mode&tr)===tr},set:function(r){r?this.mode|=tr:this.mode&=-366}},write:{get:function(){return(this.mode&nr)===nr},set:function(r){r?this.mode|=nr:this.mode&=-147}},isFolder:{get:function(){return Y.isDir(this.mode)}},isDevice:{get:function(){return Y.isChrdev(this.mode)}}}),Y.FSNode=er,Y.staticInit();var ir={g:function(r,e,t){K.varargs=t;try{var n=K.getStr(r),o=t?K.get():0;return Y.open(n,e,o).fd}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return-r.errno}},d:function(){L(\"\")},a:function(r,e,t){var n=function(r,e){var t;for($.length=0,e>>=2;t=_[r++];){var n=t<105;n&&1&e&&e++,$.push(n?E[e++>>1]:y[e]),++e}return $}(e,t);return H[r].apply(null,n)},j:function(r,e,t){_.copyWithin(r,e,e+t)},e:function(r){var e,t,n=_.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),Q(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},h:function(r,e){var t=0;return rr().forEach((function(n,o){var i=e+t;y[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)w[e++>>0]=r.charCodeAt(n);t||(w[e>>0]=0)}(n,i),t+=n.length+1})),0},i:function(r,e){var t=rr();y[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),y[e>>2]=n,0},c:function(r){try{var e=K.getStreamFromFD(r);return Y.close(e),0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},f:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doReadv(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},k:function(r,e,t,n,o){try{var i=K.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Y.llseek(i,a,n),R=[i.position>>>0,(M=i.position,+Math.abs(M)>=1?M>0?(0|Math.min(+Math.floor(M/4294967296),4294967295))>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],y[o>>2]=R[0],y[o+4>>2]=R[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},b:function(r,e,t,n){try{var o=K.getStreamFromFD(r),i=K.doWritev(o,e,t);return y[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},l:function(r){var e=Date.now();return y[r>>2]=e/1e3|0,y[r+4>>2]=e%1e3*1e3|0,0}};!function(){var r={a:ir};function e(r,e){var t,n=r.exports;o.asm=n,P((d=o.asm.m).buffer),g=o.asm.G,t=o.asm.n,z.unshift(t),O()}function n(r){e(r.instance)}function i(e){return(l||\"function\"!=typeof fetch?Promise.resolve().then((function(){return U(x)})):fetch(x,{credentials:\"same-origin\"}).then((function(r){if(!r.ok)throw\"failed to load wasm binary file at '\"+x+\"'\";return r.arrayBuffer()})).catch((function(){return U(x)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){p(\"failed to asynchronously prepare wasm: \"+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return p(\"Module.instantiateWasm callback failed with error: \"+r),!1}(l||\"function\"!=typeof WebAssembly.instantiateStreaming||I(x)||\"function\"!=typeof fetch?i(n):fetch(x,{credentials:\"same-origin\"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(r){return p(\"wasm streaming compile failed: \"+r),p(\"falling back to ArrayBuffer instantiation\"),i(n)}))}))).catch(t)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.n).apply(null,arguments)};var ar,sr=o._emscripten_bind_CExpat_CExpat_0=function(){return(sr=o._emscripten_bind_CExpat_CExpat_0=o.asm.o).apply(null,arguments)},ur=o._emscripten_bind_CExpat_version_0=function(){return(ur=o._emscripten_bind_CExpat_version_0=o.asm.p).apply(null,arguments)},cr=o._emscripten_bind_CExpat_create_0=function(){return(cr=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},lr=o._emscripten_bind_CExpat_destroy_0=function(){return(lr=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},dr=o._emscripten_bind_CExpat_parse_1=function(){return(dr=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},fr=o._emscripten_bind_CExpat_tag_0=function(){return(fr=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},pr=o._emscripten_bind_CExpat_attrs_0=function(){return(pr=o._emscripten_bind_CExpat_attrs_0=o.asm.u).apply(null,arguments)},hr=o._emscripten_bind_CExpat_content_0=function(){return(hr=o._emscripten_bind_CExpat_content_0=o.asm.v).apply(null,arguments)},mr=o._emscripten_bind_CExpat_startElement_0=function(){return(mr=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},vr=o._emscripten_bind_CExpat_endElement_0=function(){return(vr=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},wr=o._emscripten_bind_CExpat_characterData_0=function(){return(wr=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},_r=o._emscripten_bind_CExpat___destroy___0=function(){return(_r=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},yr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(yr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},Er=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Er=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},gr=o._emscripten_bind_CExpatJS_startElement_0=function(){return(gr=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},br=o._emscripten_bind_CExpatJS_endElement_0=function(){return(br=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},kr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(kr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},Dr=o._emscripten_bind_CExpatJS___destroy___0=function(){return(Dr=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)};function Sr(r){function t(){ar||(ar=!0,o.calledRun=!0,h||(o.noFSInit||Y.init.initialized||Y.init(),Y.ignorePermissions=!1,G(z),e(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for(\"function\"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),j.unshift(r);var r;G(j)}()))}T>0||(function(){if(o.preRun)for(\"function\"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;G(C)}(),T>0||(o.setStatus?(o.setStatus(\"Running...\"),setTimeout((function(){setTimeout((function(){o.setStatus(\"\")}),1),t()}),1)):t()))}if(o._malloc=function(){return(o._malloc=o.asm.H).apply(null,arguments)},B=function r(){ar||Sr(),ar||(B=r)},o.run=Sr,o.preInit)for(\"function\"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ar(){}function Pr(r){return(r||Ar).__cache__}function xr(r,e){var t=Pr(e),n=t[r];return n||((n=Object.create((e||Ar).prototype)).ptr=r,t[r]=n)}Sr(),Ar.prototype=Object.create(Ar.prototype),Ar.prototype.constructor=Ar,Ar.prototype.__class__=Ar,Ar.__cache__={},o.WrapperObject=Ar,o.getCache=Pr,o.wrapPointer=xr,o.castObject=function(r,e){return xr(r.ptr,e)},o.NULL=xr(0),o.destroy=function(r){if(!r.__destroy__)throw\"Error: Cannot destroy object. (Did you create it yourself?)\";r.__destroy__(),delete Pr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Fr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Fr.needed){for(var r=0;r<Fr.temps.length;r++)o._free(Fr.temps[r]);Fr.temps.length=0,o._free(Fr.buffer),Fr.buffer=0,Fr.size+=Fr.needed,Fr.needed=0}Fr.buffer||(Fr.size+=128,Fr.buffer=o._malloc(Fr.size),m(Fr.buffer)),Fr.pos=0},alloc:function(r,e){m(Fr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Fr.pos+i>=Fr.size?(m(i>0),Fr.needed+=i,t=o._malloc(i),Fr.temps.push(t)):(t=Fr.buffer+Fr.pos,Fr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Mr(){this.ptr=sr(),Pr(Mr)[this.ptr]=this}function Rr(){throw\"cannot construct a VoidPtr, no constructor in IDL\"}function Cr(){this.ptr=Er(),Pr(Cr)[this.ptr]=this}return Mr.prototype=Object.create(Ar.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.CExpat=Mr,Mr.prototype.version=Mr.prototype.version=function(){var r=this.ptr;return D(ur(r))},Mr.prototype.create=Mr.prototype.create=function(){var r=this.ptr;return!!cr(r)},Mr.prototype.destroy=Mr.prototype.destroy=function(){var r=this.ptr;lr(r)},Mr.prototype.parse=Mr.prototype.parse=function(r){var e=this.ptr;return Fr.prepare(),r=r&&\"object\"==typeof r?r.ptr:function(r){if(\"string\"==typeof r){var e=or(r),t=Fr.alloc(e,w);return Fr.copy(e,w,t),t}return r}(r),!!dr(e,r)},Mr.prototype.tag=Mr.prototype.tag=function(){var r=this.ptr;return D(fr(r))},Mr.prototype.attrs=Mr.prototype.attrs=function(){var r=this.ptr;return D(pr(r))},Mr.prototype.content=Mr.prototype.content=function(){var r=this.ptr;return D(hr(r))},Mr.prototype.startElement=Mr.prototype.startElement=function(){var r=this.ptr;mr(r)},Mr.prototype.endElement=Mr.prototype.endElement=function(){var r=this.ptr;vr(r)},Mr.prototype.characterData=Mr.prototype.characterData=function(){var r=this.ptr;wr(r)},Mr.prototype.__destroy__=Mr.prototype.__destroy__=function(){var r=this.ptr;_r(r)},Rr.prototype=Object.create(Ar.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},o.VoidPtr=Rr,Rr.prototype.__destroy__=Rr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},Cr.prototype=Object.create(Mr.prototype),Cr.prototype.constructor=Cr,Cr.prototype.__class__=Cr,Cr.__cache__={},o.CExpatJS=Cr,Cr.prototype.startElement=Cr.prototype.startElement=function(){var r=this.ptr;gr(r)},Cr.prototype.endElement=Cr.prototype.endElement=function(){var r=this.ptr;br(r)},Cr.prototype.characterData=Cr.prototype.characterData=function(){var r=this.ptr;kr(r)},Cr.prototype.__destroy__=Cr.prototype.__destroy__=function(){var r=this.ptr;Dr(r)},r.ready},t.exports=o;let a=function(){if(\"undefined\"!=typeof self)return self;if(\"undefined\"!=typeof window)return window;if(\"undefined\"!=typeof global)return global;throw new Error(\"unable to locate global object\")}().__hpcc_wasmFolder||void 0;function s(r,e,t){const n=r.default||r;return n.__hpcc_promise||(n.__hpcc_promise=n({wasmBinary:t,locateFile:(r,t)=>`${function(r,e){for(;r.charAt(r.length-1)===e;)r=r.substring(0,r.length-1);return r}(e||function(r){if(!arguments.length)return a;const e=a;return a=r,e}()||t||\".\",\"/\")}/${function(r,e){for(;r.charAt(0)===e;)r=r.substring(1);return r}(r,\"/\")}`})),n.__hpcc_promise}var u={exports:{}};!function(r,e){var t=(()=>{var r=\"undefined\"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a,s=Object.assign({},o),u=\"./this.program\",c=(r,e)=>{throw e},l=\"\";\"undefined\"!=typeof document&&document.currentScript&&(l=document.currentScript.src),r&&(l=r),l=0!==l.indexOf(\"blob:\")?l.substr(0,l.replace(/[?#].*/,\"\").lastIndexOf(\"/\")+1):\"\",i=r=>{var e=new XMLHttpRequest;return e.open(\"GET\",r,!1),e.send(null),e.responseText},a=(r,e,t)=>{var n=new XMLHttpRequest;n.open(\"GET\",r,!0),n.responseType=\"arraybuffer\",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var d=o.print||console.log.bind(console),f=o.printErr||console.warn.bind(console);Object.assign(o,s),s=null,o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&(c=o.quit);var p,h=0;o.wasmBinary&&(p=o.wasmBinary);var m,v=o.noExitRuntime||!0;\"object\"!=typeof WebAssembly&&L(\"no native wasm support detected\");var w=!1;function _(r,e){r||L(e)}var y,E,g,b,k,D,S,A=\"undefined\"!=typeof TextDecoder?new TextDecoder(\"utf8\"):void 0;function P(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.subarray&&A)return A.decode(r.subarray(e,o));for(var i=\"\";e<o;){var a=r[e++];if(128&a){var s=63&r[e++];if(192!=(224&a)){var u=63&r[e++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&r[e++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function x(r,e){return r?P(g,r,e):\"\"}function F(r,e,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(s<=127){if(t>=i)break;e[t++]=s}else if(s<=2047){if(t+1>=i)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=i)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o}function M(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++t)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}function R(r){y=r,o.HEAP8=E=new Int8Array(r),o.HEAP16=b=new Int16Array(r),o.HEAP32=k=new Int32Array(r),o.HEAPU8=g=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var C=[],z=[],j=[];var T=0,B=null;function N(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function O(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&B){var e=B;B=null,e()}}function L(r){o.onAbort&&o.onAbort(r),f(r=\"Aborted(\"+r+\")\"),w=!0,r+=\". Build with -s ASSERTIONS=1 for more info.\";var e=new WebAssembly.RuntimeError(r);throw n(e),e}o.preloadedImages={},o.preloadedAudios={};var I,U,H,G;function q(r){return r.startsWith(\"data:application/octet-stream;base64,\")}function W(r){try{if(r==I&&p)return new Uint8Array(p);throw\"both async and sync fetching of the wasm failed\"}catch(r){L(r)}}q(I=\"graphvizlib.wasm\")||(U=I,I=o.locateFile?o.locateFile(U,l):l+U);var V,J={161520:function(r,e){var t=x(r),n=x(e);tr.createPath(\"/\",$.dirname(t)),tr.writeFile($.join(\"/\",t),n)}};function X(r){for(;r.length>0;){var e=r.shift();if(\"function\"!=typeof e){var t=e.func;\"number\"==typeof t?void 0===e.arg?Y(t)():Y(t)(e.arg):t(void 0===e.arg?null:e.arg)}else e(o)}}function Y(r){return S.get(r)}V=()=>performance.now();function K(r){return k[gr()>>2]=r,r}var $={splitPath:function(r){return/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,e){for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];\".\"===o?r.splice(n,1):\"..\"===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift(\"..\");return r},normalize:function(r){var e=\"/\"===r.charAt(0),t=\"/\"===r.substr(-1);return(r=$.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||e||(r=\".\"),r&&t&&(r+=\"/\"),(e?\"/\":\"\")+r},dirname:function(r){var e=$.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):\".\"},basename:function(r){if(\"/\"===r)return\"/\";var e=(r=(r=$.normalize(r)).replace(/\\/$/,\"\")).lastIndexOf(\"/\");return-1===e?r:r.substr(e+1)},extname:function(r){return $.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return $.normalize(r.join(\"/\"))},join2:function(r,e){return $.normalize(r+\"/\"+e)}};var Q={resolve:function(){for(var r=\"\",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:tr.cwd();if(\"string\"!=typeof n)throw new TypeError(\"Arguments to path.resolve must be strings\");if(!n)return\"\";r=n+\"/\"+r,e=\"/\"===n.charAt(0)}return(e?\"/\":\"\")+(r=$.normalizeArray(r.split(\"/\").filter((function(r){return!!r})),!e).join(\"/\"))||\".\"},relative:function(r,e){function t(r){for(var e=0;e<r.length&&\"\"===r[e];e++);for(var t=r.length-1;t>=0&&\"\"===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=Q.resolve(r).substr(1),e=Q.resolve(e).substr(1);for(var n=t(r.split(\"/\")),o=t(e.split(\"/\")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push(\"..\");return(u=u.concat(o.slice(a))).join(\"/\")}},Z={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){Z.ttys[r]={input:[],output:[],ops:e},tr.registerDevice(r,Z.stream_ops)},stream_ops:{open:function(r){var e=Z.ttys[r.node.rdev];if(!e)throw new tr.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.flush(r.tty)},flush:function(r){r.tty.ops.flush(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new tr.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new tr.ErrnoError(29)}if(void 0===s&&0===i)throw new tr.ErrnoError(6);if(null==s)break;i++,e[t+a]=s}return i&&(r.node.timestamp=Date.now()),i},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new tr.ErrnoError(60);try{for(var i=0;i<n;i++)r.tty.ops.put_char(r.tty,e[t+i])}catch(r){throw new tr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if(\"undefined\"!=typeof window&&\"function\"==typeof window.prompt?null!==(e=window.prompt(\"Input: \"))&&(e+=\"\\n\"):\"function\"==typeof readline&&null!==(e=readline())&&(e+=\"\\n\"),!e)return null;r.input=dr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(d(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(d(P(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(f(P(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},flush:function(r){r.output&&r.output.length>0&&(f(P(r.output,0)),r.output=[])}}};function rr(r){r=function(r,e){return Math.ceil(r/e)*e}(r,65536);var e=br(65536,r);return e?(function(r,e){g.fill(0,r,r+e)}(e,r),e):0}var er={ops_table:null,mount:function(r){return er.createNode(null,\"/\",16895,0)},createNode:function(r,e,t,n){if(tr.isBlkdev(t)||tr.isFIFO(t))throw new tr.ErrnoError(63);er.ops_table||(er.ops_table={dir:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,lookup:er.node_ops.lookup,mknod:er.node_ops.mknod,rename:er.node_ops.rename,unlink:er.node_ops.unlink,rmdir:er.node_ops.rmdir,readdir:er.node_ops.readdir,symlink:er.node_ops.symlink},stream:{llseek:er.stream_ops.llseek}},file:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:{llseek:er.stream_ops.llseek,read:er.stream_ops.read,write:er.stream_ops.write,allocate:er.stream_ops.allocate,mmap:er.stream_ops.mmap,msync:er.stream_ops.msync}},link:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr,readlink:er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:er.node_ops.getattr,setattr:er.node_ops.setattr},stream:tr.chrdev_stream_ops}});var o=tr.createNode(r,e,t,n);return tr.isDir(o.mode)?(o.node_ops=er.ops_table.dir.node,o.stream_ops=er.ops_table.dir.stream,o.contents={}):tr.isFile(o.mode)?(o.node_ops=er.ops_table.file.node,o.stream_ops=er.ops_table.file.stream,o.usedBytes=0,o.contents=null):tr.isLink(o.mode)?(o.node_ops=er.ops_table.link.node,o.stream_ops=er.ops_table.link.stream):tr.isChrdev(o.mode)&&(o.node_ops=er.ops_table.chrdev.node,o.stream_ops=er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=tr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,tr.isDir(r.mode)?e.size=4096:tr.isFile(r.mode)?e.size=r.usedBytes:tr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&er.resizeFileStorage(r,e.size)},lookup:function(r,e){throw tr.genericErrors[44]},mknod:function(r,e,t,n){return er.createNode(r,e,t,n)},rename:function(r,e,t){if(tr.isDir(r.mode)){var n;try{n=tr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new tr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=tr.lookupNode(r,e);for(var n in t.contents)throw new tr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[\".\",\"..\"];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=er.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!tr.isLink(r.mode))throw new tr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var i=r.node.contents;if(o>=r.node.usedBytes)return 0;var a=Math.min(r.node.usedBytes-o,n);if(a>8&&i.subarray)e.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)e[t+s]=i[o+s];return a},write:function(r,e,t,n,o,i){if(e.buffer===E.buffer&&(i=!1),!n)return 0;var a=r.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=e.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=e.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(e.subarray(t,t+n),o),n}if(er.expandFileStorage(a,o+n),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=e[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&tr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new tr.ErrnoError(28);return n},allocate:function(r,e,t){er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o,i){if(0!==e)throw new tr.ErrnoError(28);if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);var a,s,u=r.node.contents;if(2&i||u.buffer!==y){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(a=rr(t)))throw new tr.ErrnoError(48);E.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){if(!tr.isFile(r.node.mode))throw new tr.ErrnoError(43);return 2&o||er.stream_ops.write(r,e,0,n,t,!1),0}}};var tr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:\"/\",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=Q.resolve(tr.cwd(),r)))return{path:\"\",node:null};var t={follow_mount:!0,recurse_count:0};for(var n in t)void 0===e[n]&&(e[n]=t[n]);if(e.recurse_count>8)throw new tr.ErrnoError(32);for(var o=$.normalizeArray(r.split(\"/\").filter((r=>!!r)),!1),i=tr.root,a=\"/\",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&e.parent)break;if(i=tr.lookupNode(i,o[s]),a=$.join2(a,o[s]),tr.isMountpoint(i)&&(!u||u&&e.follow_mount)&&(i=i.mounted.root),!u||e.follow)for(var c=0;tr.isLink(i.mode);){var l=tr.readlink(a);if(a=Q.resolve($.dirname(a),l),i=tr.lookupPath(a,{recurse_count:e.recurse_count}).node,c++>40)throw new tr.ErrnoError(32)}}return{path:a,node:i}},getPath:r=>{for(var e;;){if(tr.isRoot(r)){var t=r.mount.mountpoint;return e?\"/\"!==t[t.length-1]?t+\"/\"+e:t+e:t}e=e?r.name+\"/\"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%tr.nameTable.length},hashAddNode:r=>{var e=tr.hashName(r.parent.id,r.name);r.name_next=tr.nameTable[e],tr.nameTable[e]=r},hashRemoveNode:r=>{var e=tr.hashName(r.parent.id,r.name);if(tr.nameTable[e]===r)tr.nameTable[e]=r.name_next;else for(var t=tr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=tr.mayLookup(r);if(t)throw new tr.ErrnoError(t,r);for(var n=tr.hashName(r.id,e),o=tr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===e)return o}return tr.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new tr.FSNode(r,e,t,n);return tr.hashAddNode(o),o},destroyNode:r=>{tr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,\"r+\":2,w:577,\"w+\":578,a:1089,\"a+\":1090},modeStringToFlags:r=>{var e=tr.flagModes[r];if(void 0===e)throw new Error(\"Unknown file open mode: \"+r);return e},flagsToPermissionString:r=>{var e=[\"r\",\"w\",\"rw\"][3&r];return 512&r&&(e+=\"w\"),e},nodePermissions:(r,e)=>tr.ignorePermissions||(!e.includes(\"r\")||292&r.mode)&&(!e.includes(\"w\")||146&r.mode)&&(!e.includes(\"x\")||73&r.mode)?0:2,mayLookup:r=>{var e=tr.nodePermissions(r,\"x\");return e||(r.node_ops.lookup?0:2)},mayCreate:(r,e)=>{try{tr.lookupNode(r,e);return 20}catch(r){}return tr.nodePermissions(r,\"wx\")},mayDelete:(r,e,t)=>{var n;try{n=tr.lookupNode(r,e)}catch(r){return r.errno}var o=tr.nodePermissions(r,\"wx\");if(o)return o;if(t){if(!tr.isDir(n.mode))return 54;if(tr.isRoot(n)||tr.getPath(n)===tr.cwd())return 10}else if(tr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?tr.isLink(r.mode)?32:tr.isDir(r.mode)&&(\"r\"!==tr.flagsToPermissionString(e)||512&e)?31:tr.nodePermissions(r,tr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=tr.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!tr.streams[t])return t;throw new tr.ErrnoError(33)},getStream:r=>tr.streams[r],createStream:(r,e,t)=>{tr.FSStream||(tr.FSStream=function(){},tr.FSStream.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),r=Object.assign(new tr.FSStream,r);var n=tr.nextfd(e,t);return r.fd=n,tr.streams[n]=r,r},closeStream:r=>{tr.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=tr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new tr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{tr.devices[r]={stream_ops:e}},getDevice:r=>tr.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{\"function\"==typeof r&&(e=r,r=!1),tr.syncFSRequests++,tr.syncFSRequests>1&&f(\"warning: \"+tr.syncFSRequests+\" FS.syncfs operations in flight at once, probably just doing extra work\");var t=tr.getMounts(tr.root.mount),n=0;function o(r){return tr.syncFSRequests--,e(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return i(null);e.type.syncfs(e,r,i)}))},mount:(r,e,t)=>{var n,o=\"/\"===t,i=!t;if(o&&tr.root)throw new tr.ErrnoError(10);if(!o&&!i){var a=tr.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,tr.isMountpoint(n))throw new tr.ErrnoError(10);if(!tr.isDir(n.mode))throw new tr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?tr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var e=tr.lookupPath(r,{follow_mount:!1});if(!tr.isMountpoint(e.node))throw new tr.ErrnoError(28);var t=e.node,n=t.mounted,o=tr.getMounts(n);Object.keys(tr.nameTable).forEach((r=>{for(var e=tr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&tr.destroyNode(e),e=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);t.mount.mounts.splice(i,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=tr.lookupPath(r,{parent:!0}).node,o=$.basename(r);if(!o||\".\"===o||\"..\"===o)throw new tr.ErrnoError(28);var i=tr.mayCreate(n,o);if(i)throw new tr.ErrnoError(i);if(!n.node_ops.mknod)throw new tr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,tr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,tr.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split(\"/\"),n=\"\",o=0;o<t.length;++o)if(t[o]){n+=\"/\"+t[o];try{tr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,tr.mknod(r,e,t)),symlink:(r,e)=>{if(!Q.resolve(r))throw new tr.ErrnoError(44);var t=tr.lookupPath(e,{parent:!0}).node;if(!t)throw new tr.ErrnoError(44);var n=$.basename(e),o=tr.mayCreate(t,n);if(o)throw new tr.ErrnoError(o);if(!t.node_ops.symlink)throw new tr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=$.dirname(r),i=$.dirname(e),a=$.basename(r),s=$.basename(e);if(t=tr.lookupPath(r,{parent:!0}).node,n=tr.lookupPath(e,{parent:!0}).node,!t||!n)throw new tr.ErrnoError(44);if(t.mount!==n.mount)throw new tr.ErrnoError(75);var u,c=tr.lookupNode(t,a),l=Q.relative(r,i);if(\".\"!==l.charAt(0))throw new tr.ErrnoError(28);if(\".\"!==(l=Q.relative(e,o)).charAt(0))throw new tr.ErrnoError(55);try{u=tr.lookupNode(n,s)}catch(r){}if(c!==u){var d=tr.isDir(c.mode),f=tr.mayDelete(t,a,d);if(f)throw new tr.ErrnoError(f);if(f=u?tr.mayDelete(n,s,d):tr.mayCreate(n,s))throw new tr.ErrnoError(f);if(!t.node_ops.rename)throw new tr.ErrnoError(63);if(tr.isMountpoint(c)||u&&tr.isMountpoint(u))throw new tr.ErrnoError(10);if(n!==t&&(f=tr.nodePermissions(t,\"w\")))throw new tr.ErrnoError(f);tr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{tr.hashAddNode(c)}}},rmdir:r=>{var e=tr.lookupPath(r,{parent:!0}).node,t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!0);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.rmdir)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.rmdir(e,t),tr.destroyNode(n)},readdir:r=>{var e=tr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new tr.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=tr.lookupPath(r,{parent:!0}).node;if(!e)throw new tr.ErrnoError(44);var t=$.basename(r),n=tr.lookupNode(e,t),o=tr.mayDelete(e,t,!1);if(o)throw new tr.ErrnoError(o);if(!e.node_ops.unlink)throw new tr.ErrnoError(63);if(tr.isMountpoint(n))throw new tr.ErrnoError(10);e.node_ops.unlink(e,t),tr.destroyNode(n)},readlink:r=>{var e=tr.lookupPath(r).node;if(!e)throw new tr.ErrnoError(44);if(!e.node_ops.readlink)throw new tr.ErrnoError(28);return Q.resolve(tr.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=tr.lookupPath(r,{follow:!e}).node;if(!t)throw new tr.ErrnoError(44);if(!t.node_ops.getattr)throw new tr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>tr.stat(r,!0),chmod:(r,e,t)=>{var n;\"string\"==typeof r?n=tr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new tr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{tr.chmod(r,e,!0)},fchmod:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);tr.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;\"string\"==typeof r?o=tr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new tr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{tr.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=tr.getStream(r);if(!n)throw new tr.ErrnoError(8);tr.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new tr.ErrnoError(28);var t;\"string\"==typeof r?t=tr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new tr.ErrnoError(63);if(tr.isDir(t.mode))throw new tr.ErrnoError(31);if(!tr.isFile(t.mode))throw new tr.ErrnoError(28);var n=tr.nodePermissions(t,\"w\");if(n)throw new tr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=tr.getStream(r);if(!t)throw new tr.ErrnoError(8);if(0==(2097155&t.flags))throw new tr.ErrnoError(28);tr.truncate(t.node,e)},utime:(r,e,t)=>{var n=tr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t,n,i)=>{if(\"\"===r)throw new tr.ErrnoError(44);var a;if(t=void 0===t?438:t,t=64&(e=\"string\"==typeof e?tr.modeStringToFlags(e):e)?4095&t|32768:0,\"object\"==typeof r)a=r;else{r=$.normalize(r);try{a=tr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var s=!1;if(64&e)if(a){if(128&e)throw new tr.ErrnoError(20)}else a=tr.mknod(r,t,0),s=!0;if(!a)throw new tr.ErrnoError(44);if(tr.isChrdev(a.mode)&&(e&=-513),65536&e&&!tr.isDir(a.mode))throw new tr.ErrnoError(54);if(!s){var u=tr.mayOpen(a,e);if(u)throw new tr.ErrnoError(u)}512&e&&tr.truncate(a,0),e&=-131713;var c=tr.createStream({node:a,path:tr.getPath(a),flags:e,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&e||(tr.readFiles||(tr.readFiles={}),r in tr.readFiles||(tr.readFiles[r]=1)),c},close:r=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{tr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new tr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new tr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(1==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.read)throw new tr.ErrnoError(28);var i=void 0!==o;if(i){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var a=r.stream_ops.read(r,e,t,n,o);return i||(r.position+=a),a},write:(r,e,t,n,o,i)=>{if(n<0||o<0)throw new tr.ErrnoError(28);if(tr.isClosed(r))throw new tr.ErrnoError(8);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(tr.isDir(r.node.mode))throw new tr.ErrnoError(31);if(!r.stream_ops.write)throw new tr.ErrnoError(28);r.seekable&&1024&r.flags&&tr.llseek(r,0,2);var a=void 0!==o;if(a){if(!r.seekable)throw new tr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,i);return a||(r.position+=s),s},allocate:(r,e,t)=>{if(tr.isClosed(r))throw new tr.ErrnoError(8);if(e<0||t<=0)throw new tr.ErrnoError(28);if(0==(2097155&r.flags))throw new tr.ErrnoError(8);if(!tr.isFile(r.node.mode)&&!tr.isDir(r.node.mode))throw new tr.ErrnoError(43);if(!r.stream_ops.allocate)throw new tr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&r.flags))throw new tr.ErrnoError(2);if(1==(2097155&r.flags))throw new tr.ErrnoError(2);if(!r.stream_ops.mmap)throw new tr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o,i)},msync:(r,e,t,n,o)=>r&&r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new tr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||\"binary\",\"utf8\"!==e.encoding&&\"binary\"!==e.encoding)throw new Error('Invalid encoding type \"'+e.encoding+'\"');var t,n=tr.open(r,e.flags),o=tr.stat(r).size,i=new Uint8Array(o);return tr.read(n,i,0,o,0),\"utf8\"===e.encoding?t=P(i,0):\"binary\"===e.encoding&&(t=i),tr.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=tr.open(r,t.flags,t.mode);if(\"string\"==typeof e){var o=new Uint8Array(M(e)+1),i=F(e,o,0,o.length);tr.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error(\"Unsupported data type\");tr.write(n,e,0,e.byteLength,void 0,t.canOwn)}tr.close(n)},cwd:()=>tr.currentPath,chdir:r=>{var e=tr.lookupPath(r,{follow:!0});if(null===e.node)throw new tr.ErrnoError(44);if(!tr.isDir(e.node.mode))throw new tr.ErrnoError(54);var t=tr.nodePermissions(e.node,\"x\");if(t)throw new tr.ErrnoError(t);tr.currentPath=e.path},createDefaultDirectories:()=>{tr.mkdir(\"/tmp\"),tr.mkdir(\"/home\"),tr.mkdir(\"/home/web_user\")},createDefaultDevices:()=>{tr.mkdir(\"/dev\"),tr.registerDevice(tr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),tr.mkdev(\"/dev/null\",tr.makedev(1,3)),Z.register(tr.makedev(5,0),Z.default_tty_ops),Z.register(tr.makedev(6,0),Z.default_tty1_ops),tr.mkdev(\"/dev/tty\",tr.makedev(5,0)),tr.mkdev(\"/dev/tty1\",tr.makedev(6,0));var r=function(){if(\"object\"==typeof crypto&&\"function\"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return function(){return crypto.getRandomValues(r),r[0]}}return function(){L(\"randomDevice\")}}();tr.createDevice(\"/dev\",\"random\",r),tr.createDevice(\"/dev\",\"urandom\",r),tr.mkdir(\"/dev/shm\"),tr.mkdir(\"/dev/shm/tmp\")},createSpecialDirectories:()=>{tr.mkdir(\"/proc\");var r=tr.mkdir(\"/proc/self\");tr.mkdir(\"/proc/self/fd\"),tr.mount({mount:()=>{var e=tr.createNode(r,\"fd\",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=tr.getStream(t);if(!n)throw new tr.ErrnoError(8);var o={parent:null,mount:{mountpoint:\"fake\"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},\"/proc/self/fd\")},createStandardStreams:()=>{o.stdin?tr.createDevice(\"/dev\",\"stdin\",o.stdin):tr.symlink(\"/dev/tty\",\"/dev/stdin\"),o.stdout?tr.createDevice(\"/dev\",\"stdout\",null,o.stdout):tr.symlink(\"/dev/tty\",\"/dev/stdout\"),o.stderr?tr.createDevice(\"/dev\",\"stderr\",null,o.stderr):tr.symlink(\"/dev/tty1\",\"/dev/stderr\"),tr.open(\"/dev/stdin\",0),tr.open(\"/dev/stdout\",1),tr.open(\"/dev/stderr\",1)},ensureErrnoError:()=>{tr.ErrnoError||(tr.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message=\"FS error\"},tr.ErrnoError.prototype=new Error,tr.ErrnoError.prototype.constructor=tr.ErrnoError,[44].forEach((r=>{tr.genericErrors[r]=new tr.ErrnoError(r),tr.genericErrors[r].stack=\"<generic error, no stack>\"})))},staticInit:()=>{tr.ensureErrnoError(),tr.nameTable=new Array(4096),tr.mount(er,{},\"/\"),tr.createDefaultDirectories(),tr.createDefaultDevices(),tr.createSpecialDirectories(),tr.filesystems={MEMFS:er}},init:(r,e,t)=>{tr.init.initialized=!0,tr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=e||o.stdout,o.stderr=t||o.stderr,tr.createStandardStreams()},quit:()=>{tr.init.initialized=!1;for(var r=0;r<tr.streams.length;r++){var e=tr.streams[r];e&&tr.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=tr.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=tr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=tr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=$.basename(r),n=tr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot=\"/\"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r=\"string\"==typeof r?r:tr.getPath(r);for(var o=e.split(\"/\").reverse();o.length;){var i=o.pop();if(i){var a=$.join2(r,i);try{tr.mkdir(a)}catch(r){}r=a}}return a},createFile:(r,e,t,n,o)=>{var i=$.join2(\"string\"==typeof r?r:tr.getPath(r),e),a=tr.getMode(n,o);return tr.create(i,a)},createDataFile:(r,e,t,n,o,i)=>{var a=e;r&&(r=\"string\"==typeof r?r:tr.getPath(r),a=e?$.join2(r,e):r);var s=tr.getMode(n,o),u=tr.create(a,s);if(t){if(\"string\"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}tr.chmod(u,146|s);var f=tr.open(u,577);tr.write(f,t,0,t.length,0,i),tr.close(f),tr.chmod(u,s)}return u},createDevice:(r,e,t,n)=>{var o=$.join2(\"string\"==typeof r?r:tr.getPath(r),e),i=tr.getMode(!!t,!!n);tr.createDevice.major||(tr.createDevice.major=64);var a=tr.makedev(tr.createDevice.major++,0);return tr.registerDevice(a,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new tr.ErrnoError(29)}if(void 0===u&&0===a)throw new tr.ErrnoError(6);if(null==u)break;a++,e[n+s]=u}return a&&(r.node.timestamp=Date.now()),a},write:(r,e,t,o,i)=>{for(var a=0;a<o;a++)try{n(e[t+a])}catch(r){throw new tr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),a}}),tr.mkdev(o,i,a)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if(\"undefined\"!=typeof XMLHttpRequest)throw new Error(\"Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.\");if(!i)throw new Error(\"Cannot load without read() or XMLHttpRequest.\");try{r.contents=dr(i(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new tr.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open(\"HEAD\",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+r.status);var e,n=Number(r.getResponseHeader(\"Content-length\")),o=(e=r.getResponseHeader(\"Accept-Ranges\"))&&\"bytes\"===e,i=(e=r.getResponseHeader(\"Content-Encoding\"))&&\"gzip\"===e,a=1048576;o||(a=n);var s=this;s.setDataGetter((r=>{var e=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error(\"invalid range (\"+r+\", \"+e+\") or no bytes requested!\");if(e>n-1)throw new Error(\"only \"+n+\" bytes available! programmer error!\");var o=new XMLHttpRequest;if(o.open(\"GET\",t,!1),n!==a&&o.setRequestHeader(\"Range\",\"bytes=\"+r+\"-\"+e),o.responseType=\"arraybuffer\",o.overrideMimeType&&o.overrideMimeType(\"text/plain; charset=x-user-defined\"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error(\"Couldn't load \"+t+\". Status: \"+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):dr(o.responseText||\"\",!0)})(e,o)),void 0===s.chunks[r])throw new Error(\"doXHR failed!\");return s.chunks[r]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,d(\"LazyFiles on gzip forces download of the whole file when length is accessed\")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},\"undefined\"!=typeof XMLHttpRequest)throw\"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc\";var a={isDevice:!1,url:t},s=tr.createFile(r,e,a,n,o);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(s.stream_ops).forEach((r=>{var e=s.stream_ops[r];u[r]=function(){return tr.forceLoadFile(s),e.apply(null,arguments)}})),u.read=(r,e,t,n,o)=>{tr.forceLoadFile(s);var i=r.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var u=0;u<a;u++)e[t+u]=i[o+u];else for(u=0;u<a;u++)e[t+u]=i.get(o+u);return a},s.stream_ops=u,s},createPreloadedFile:(r,e,t,n,o,i,s,u,c,l)=>{var d=e?Q.resolve($.join2(r,e)):r;function f(t){function a(t){l&&l(),u||tr.createDataFile(r,e,t,n,o,c),i&&i(),O()}Browser.handledByPreloadPlugin(t,d,a,(()=>{s&&s(),O()}))||a(t)}N(),\"string\"==typeof t?function(r,e,t,n){var o=n?\"\":\"al \"+r;a(r,(function(t){_(t,'Loading data file \"'+r+'\" failed (no arrayBuffer).'),e(new Uint8Array(t)),o&&O()}),(function(e){if(!t)throw'Loading data file \"'+r+'\" failed.';t()})),o&&N()}(t,(r=>f(r)),s):f(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>\"EM_FS_\"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:\"FILE_DATA\",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{d(\"creating db\"),o.result.createObjectStore(tr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([tr.DB_STORE_NAME],\"readwrite\"),i=n.objectStore(tr.DB_STORE_NAME),a=0,s=0,u=r.length;function c(){0==s?e():t()}r.forEach((r=>{var e=i.put(tr.analyzePath(r).object.contents,r);e.onsuccess=()=>{++a+s==u&&c()},e.onerror=()=>{s++,a+s==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=tr.indexedDB();try{var o=n.open(tr.DB_NAME(),tr.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([tr.DB_STORE_NAME],\"readonly\")}catch(r){return void t(r)}var a=i.objectStore(tr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?e():t()}r.forEach((r=>{var e=a.get(r);e.onsuccess=()=>{tr.analyzePath(r).exists&&tr.unlink(r),tr.createDataFile($.dirname(r),$.basename(r),e.result,!0,!0,!0),++s+u==c&&l()},e.onerror=()=>{u++,s+u==c&&l()}})),i.onerror=t},o.onerror=t}},nr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(\"/\"===e[0])return e;var n;if(-100===r)n=tr.cwd();else{var o=tr.getStream(r);if(!o)throw new tr.ErrnoError(8);n=o.path}if(0==e.length){if(!t)throw new tr.ErrnoError(44);return n}return $.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&$.normalize(e)!==$.normalize(tr.getPath(r.node)))return-54;throw r}return k[t>>2]=n.dev,k[t+4>>2]=0,k[t+8>>2]=n.ino,k[t+12>>2]=n.mode,k[t+16>>2]=n.nlink,k[t+20>>2]=n.uid,k[t+24>>2]=n.gid,k[t+28>>2]=n.rdev,k[t+32>>2]=0,G=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+40>>2]=G[0],k[t+44>>2]=G[1],k[t+48>>2]=4096,k[t+52>>2]=n.blocks,k[t+56>>2]=n.atime.getTime()/1e3|0,k[t+60>>2]=0,k[t+64>>2]=n.mtime.getTime()/1e3|0,k[t+68>>2]=0,k[t+72>>2]=n.ctime.getTime()/1e3|0,k[t+76>>2]=0,G=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+80>>2]=G[0],k[t+84>>2]=G[1],0},doMsync:function(r,e,t,n,o){var i=g.slice(r,r+t);tr.msync(e,i,o,t,n)},doMkdir:function(r,e){return\"/\"===(r=$.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),tr.mkdir(r,e,0),0},doMknod:function(r,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return tr.mknod(r,e,t),0},doReadlink:function(r,e,t){if(t<=0)return-28;var n=tr.readlink(r),o=Math.min(t,M(n)),i=E[e+o];return F(n,g,e,t+1),E[e+o]=i,o},doAccess:function(r,e){if(-8&e)return-28;var t=tr.lookupPath(r,{follow:!0}).node;if(!t)return-44;var n=\"\";return 4&e&&(n+=\"r\"),2&e&&(n+=\"w\"),1&e&&(n+=\"x\"),n&&tr.nodePermissions(t,n)?-2:0},doDup:function(r,e,t){var n=tr.getStream(t);return n&&tr.close(n),tr.open(r,e,0,t,t).fd},doReadv:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.read(r,E,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(r,e,t,n){for(var o=0,i=0;i<t;i++){var a=k[e+8*i>>2],s=k[e+(8*i+4)>>2],u=tr.write(r,E,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return nr.varargs+=4,k[nr.varargs-4>>2]},getStr:function(r){return x(r)},getStreamFromFD:function(r){var e=tr.getStream(r);if(!e)throw new tr.ErrnoError(8);return e},get64:function(r,e){return r}};var or=[];function ir(r){try{return m.grow(r-y.byteLength+65535>>>16),R(m.buffer),1}catch(r){}}var ar={};function sr(){if(!sr.strings){var r={USER:\"web_user\",LOGNAME:\"web_user\",PATH:\"/\",PWD:\"/\",HOME:\"/home/web_user\",LANG:(\"object\"==typeof navigator&&navigator.languages&&navigator.languages[0]||\"C\").replace(\"-\",\"_\")+\".UTF-8\",_:u||\"./this.program\"};for(var e in ar)void 0===ar[e]?delete r[e]:r[e]=ar[e];var t=[];for(var e in r)t.push(e+\"=\"+r[e]);sr.strings=t}return sr.strings}var ur=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=tr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,lr=146;function dr(r,e,t){var n=t>0?t:M(r)+1,o=new Array(n),i=F(r,o,0,o.length);return e&&(o.length=i),o}Object.defineProperties(ur.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(r){r?this.mode|=cr:this.mode&=-366}},write:{get:function(){return(this.mode&lr)===lr},set:function(r){r?this.mode|=lr:this.mode&=-147}},isFolder:{get:function(){return tr.isDir(this.mode)}},isDevice:{get:function(){return tr.isChrdev(this.mode)}}}),tr.FSNode=ur,tr.staticInit();var fr={s:function(r,e){return function(r,e){var t;if(0===r)t=Date.now();else{if(1!==r&&4!==r)return K(28),-1;t=V()}return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3*1e3|0,0}(r,e)},j:function(r,e,t,n){try{return e=nr.getStr(e),e=nr.calculateAt(r,e),nr.doAccess(e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},i:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 0:return(o=nr.get())<0?-28:tr.open(n.path,n.flags,0,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=nr.get();return n.flags|=o,0;case 5:o=nr.get();return b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return K(28),-1}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},z:function(r,e){try{var t=nr.getStreamFromFD(r);return nr.doStat(tr.stat,t.path,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},x:function(r,e,t,n){try{e=nr.getStr(e);var o=256&n,i=4096&n;return n&=-4353,e=nr.calculateAt(r,e,i),nr.doStat(o?tr.lstat:tr.stat,e,t)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},A:function(r,e,t){nr.varargs=t;try{var n=nr.getStreamFromFD(r);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=nr.get();return k[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=nr.get();return tr.ioctl(n,e,o);default:L(\"bad ioctl syscall \"+e)}}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},d:function(r,e,t){nr.varargs=t;try{var n=nr.getStr(r),o=t?nr.get():0;return tr.open(n,e,o).fd}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},y:function(r,e){try{return r=nr.getStr(r),nr.doStat(tr.stat,r,e)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},r:function(r){try{return r=nr.getStr(r),tr.unlink(r),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},p:function(){throw 1/0},t:function(r,e,t,n,o,i,a,s){try{var u=tr.getStream(o);if(!u)return-8;var c=tr.mmap(u,r,e,i,t,n),l=c.ptr;return k[a>>2]=c.allocated,l}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},u:function(r,e,t,n,o,i){try{var a=tr.getStream(o);a&&(2&t&&nr.doMsync(r,a,e,n,i),tr.munmap(a))}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return-r.errno}},o:function(){L(\"\")},C:function(r,e,t){var n=function(r,e){var t;for(or.length=0,e>>=2;t=g[r++];){var n=t<105;n&&1&e&&e++,or.push(n?D[e++>>1]:k[e]),++e}return or}(e,t);return J[r].apply(null,n)},B:function(r,e,t){g.copyWithin(r,e,e+t)},q:function(r){var e,t,n=g.length,o=2147483648;if((r>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=n*(1+.2/i);if(a=Math.min(a,r+100663296),ir(Math.min(o,(e=Math.max(r,a))+((t=65536)-e%t)%t)))return!0}return!1},v:function(r,e){var t=0;return sr().forEach((function(n,o){var i=e+t;k[r+4*o>>2]=i,function(r,e,t){for(var n=0;n<r.length;++n)E[e++>>0]=r.charCodeAt(n);t||(E[e>>0]=0)}(n,i),t+=n.length+1})),0},w:function(r,e){var t=sr();k[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),k[e>>2]=n,0},e:function(r){!function(r,e){!function(r){v||(o.onExit&&o.onExit(r),w=!0);c(r,new Ar(r))}(r)}(r)},c:function(r){try{var e=nr.getStreamFromFD(r);return tr.close(e),0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},g:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doReadv(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},n:function(r,e,t,n,o){try{var i=nr.getStreamFromFD(r),a=4294967296*t+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(tr.llseek(i,a,n),G=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?(0|Math.min(+Math.floor(H/4294967296),4294967295))>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[o>>2]=G[0],k[o+4>>2]=G[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},h:function(r,e,t,n){try{var o=nr.getStreamFromFD(r),i=nr.doWritev(o,e,t);return k[n>>2]=i,0}catch(r){if(void 0===tr||!(r instanceof tr.ErrnoError))throw r;return r.errno}},b:function(){return h},k:function(r){var e=Date.now();return k[r>>2]=e/1e3|0,k[r+4>>2]=e%1e3*1e3|0,0},l:function(r,e,t,n,o,i,a){var s=Dr();try{return Y(r)(e,t,n,o,i,a)}catch(r){if(Sr(s),r!==r+0)throw r;kr(1,0)}},m:function(r,e){var t=Dr();try{Y(r)(e)}catch(r){if(Sr(t),r!==r+0)throw r;kr(1,0)}},a:function(r){h=r},f:function(r){var e=Date.now()/1e3|0;return r&&(k[r>>2]=e),e}};!function(){var r={a:fr};function e(r,e){var t,n=r.exports;o.asm=n,R((m=o.asm.D).buffer),S=o.asm.M,t=o.asm.E,z.unshift(t),O()}function t(r){e(r.instance)}function i(e){return(p||\"function\"!=typeof fetch?Promise.resolve().then((function(){return W(I)})):fetch(I,{credentials:\"same-origin\"}).then((function(r){if(!r.ok)throw\"failed to load wasm binary file at '\"+I+\"'\";return r.arrayBuffer()})).catch((function(){return W(I)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){f(\"failed to asynchronously prepare wasm: \"+r),L(r)}))}if(N(),o.instantiateWasm)try{return o.instantiateWasm(r,e)}catch(r){return f(\"Module.instantiateWasm callback failed with error: \"+r),!1}(p||\"function\"!=typeof WebAssembly.instantiateStreaming||q(I)||\"function\"!=typeof fetch?i(t):fetch(I,{credentials:\"same-origin\"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(r){return f(\"wasm streaming compile failed: \"+r),f(\"falling back to ArrayBuffer instantiation\"),i(t)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.E).apply(null,arguments)};var pr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(pr=o._emscripten_bind_VoidPtr___destroy___0=o.asm.F).apply(null,arguments)},hr=o._emscripten_bind_Graphviz_Graphviz_2=function(){return(hr=o._emscripten_bind_Graphviz_Graphviz_2=o.asm.G).apply(null,arguments)},mr=o._emscripten_bind_Graphviz_version_0=function(){return(mr=o._emscripten_bind_Graphviz_version_0=o.asm.H).apply(null,arguments)},vr=o._emscripten_bind_Graphviz_lastError_0=function(){return(vr=o._emscripten_bind_Graphviz_lastError_0=o.asm.I).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_layout_3=function(){return(wr=o._emscripten_bind_Graphviz_layout_3=o.asm.J).apply(null,arguments)},_r=o._emscripten_bind_Graphviz_createFile_2=function(){return(_r=o._emscripten_bind_Graphviz_createFile_2=o.asm.K).apply(null,arguments)},yr=o._emscripten_bind_Graphviz___destroy___0=function(){return(yr=o._emscripten_bind_Graphviz___destroy___0=o.asm.L).apply(null,arguments)};o._malloc=function(){return(o._malloc=o.asm.N).apply(null,arguments)},o._free=function(){return(o._free=o.asm.O).apply(null,arguments)};var Er,gr=o.___errno_location=function(){return(gr=o.___errno_location=o.asm.P).apply(null,arguments)},br=o._emscripten_builtin_memalign=function(){return(br=o._emscripten_builtin_memalign=o.asm.Q).apply(null,arguments)},kr=o._setThrew=function(){return(kr=o._setThrew=o.asm.R).apply(null,arguments)},Dr=o.stackSave=function(){return(Dr=o.stackSave=o.asm.S).apply(null,arguments)},Sr=o.stackRestore=function(){return(Sr=o.stackRestore=o.asm.T).apply(null,arguments)};function Ar(r){this.name=\"ExitStatus\",this.message=\"Program terminated with exit(\"+r+\")\",this.status=r}function Pr(r){function e(){Er||(Er=!0,o.calledRun=!0,w||(o.noFSInit||tr.init.initialized||tr.init(),tr.ignorePermissions=!1,X(z),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for(\"function\"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),j.unshift(r);var r;X(j)}()))}T>0||(!function(){if(o.preRun)for(\"function\"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),C.unshift(r);var r;X(C)}(),T>0||(o.setStatus?(o.setStatus(\"Running...\"),setTimeout((function(){setTimeout((function(){o.setStatus(\"\")}),1),e()}),1)):e()))}if(B=function r(){Er||Pr(),Er||(B=r)},o.run=Pr,o.preInit)for(\"function\"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function xr(){}function Fr(r){return(r||xr).__cache__}function Mr(r,e){var t=Fr(e),n=t[r];return n||((n=Object.create((e||xr).prototype)).ptr=r,t[r]=n)}Pr(),xr.prototype=Object.create(xr.prototype),xr.prototype.constructor=xr,xr.prototype.__class__=xr,xr.__cache__={},o.WrapperObject=xr,o.getCache=Fr,o.wrapPointer=Mr,o.castObject=function(r,e){return Mr(r.ptr,e)},o.NULL=Mr(0),o.destroy=function(r){if(!r.__destroy__)throw\"Error: Cannot destroy object. (Did you create it yourself?)\";r.__destroy__(),delete Fr(r.__class__)[r.ptr]},o.compare=function(r,e){return r.ptr===e.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Rr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Rr.needed){for(var r=0;r<Rr.temps.length;r++)o._free(Rr.temps[r]);Rr.temps.length=0,o._free(Rr.buffer),Rr.buffer=0,Rr.size+=Rr.needed,Rr.needed=0}Rr.buffer||(Rr.size+=128,Rr.buffer=o._malloc(Rr.size),_(Rr.buffer)),Rr.pos=0},alloc:function(r,e){_(Rr.buffer);var t,n=e.BYTES_PER_ELEMENT,i=r.length*n;return i=i+7&-8,Rr.pos+i>=Rr.size?(_(i>0),Rr.needed+=i,t=o._malloc(i),Rr.temps.push(t)):(t=Rr.buffer+Rr.pos,Rr.pos+=i),t},copy:function(r,e,t){switch(t>>>=0,e.BYTES_PER_ELEMENT){case 2:t>>>=1;break;case 4:t>>>=2;break;case 8:t>>>=3}for(var n=0;n<r.length;n++)e[t+n]=r[n]}};function Cr(r){if(\"string\"==typeof r){var e=dr(r),t=Rr.alloc(e,E);return Rr.copy(e,E,t),t}return r}function zr(){throw\"cannot construct a VoidPtr, no constructor in IDL\"}function jr(r,e){r&&\"object\"==typeof r&&(r=r.ptr),e&&\"object\"==typeof e&&(e=e.ptr),this.ptr=hr(r,e),Fr(jr)[this.ptr]=this}return zr.prototype=Object.create(xr.prototype),zr.prototype.constructor=zr,zr.prototype.__class__=zr,zr.__cache__={},o.VoidPtr=zr,zr.prototype.__destroy__=zr.prototype.__destroy__=function(){var r=this.ptr;pr(r)},jr.prototype=Object.create(xr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.Graphviz=jr,jr.prototype.version=jr.prototype.version=function(){var r=this.ptr;return x(mr(r))},jr.prototype.lastError=jr.prototype.lastError=function(){var r=this.ptr;return x(vr(r))},jr.prototype.layout=jr.prototype.layout=function(r,e,t){var n=this.ptr;return Rr.prepare(),r=r&&\"object\"==typeof r?r.ptr:Cr(r),e=e&&\"object\"==typeof e?e.ptr:Cr(e),t=t&&\"object\"==typeof t?t.ptr:Cr(t),x(wr(n,r,e,t))},jr.prototype.createFile=jr.prototype.createFile=function(r,e){var t=this.ptr;Rr.prepare(),r=r&&\"object\"==typeof r?r.ptr:Cr(r),e=e&&\"object\"==typeof e?e.ptr:Cr(e),_r(t,r,e)},jr.prototype.__destroy__=jr.prototype.__destroy__=function(){var r=this.ptr;yr(r)},e.ready}})();r.exports=t}(u);var c=e({__proto__:null,default:u.exports},[u.exports]);function l(r){return{path:r.path,data:`<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\\n<svg width=\"${r.width}\" height=\"${r.height}\"></svg>`}}const d={layout:(r,e=\"svg\",t=\"dot\",n)=>r?s(c,null==n?void 0:n.wasmFolder,null==n?void 0:n.wasmBinary).then((o=>{const i=new o.Graphviz(void 0!==(null==n?void 0:n.yInvert)&&(null==n?void 0:n.yInvert),void 0!==(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);!function(r,e){const t={images:[],files:[],...e};var n;[...t.files,...(n=t.images,n.map(l))].forEach((e=>r.createFile(e.path,e.data)))}(i,n);const a=i.layout(r,e,t);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve(\"\"),circo(r,e=\"svg\",t){return this.layout(r,e,\"circo\",t)},dot(r,e=\"svg\",t){return this.layout(r,e,\"dot\",t)},fdp(r,e=\"svg\",t){return this.layout(r,e,\"fdp\",t)},sfdp(r,e=\"svg\",t){return this.layout(r,e,\"sfdp\",t)},neato(r,e=\"svg\",t){return this.layout(r,e,\"neato\",t)},osage(r,e=\"svg\",t){return this.layout(r,e,\"osage\",t)},patchwork(r,e=\"svg\",t){return this.layout(r,e,\"patchwork\",t)},twopi(r,e=\"svg\",t){return this.layout(r,e,\"twopi\",t)}};var f=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};var p={exports:{}};\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */function h(r){return void 0!==r.children}!function(r,e){r.exports=function(){function r(r){var e=typeof r;return null!==r&&(\"object\"===e||\"function\"===e)}function e(r){return\"function\"==typeof r}var t=Array.isArray?Array.isArray:function(r){return\"[object Array]\"===Object.prototype.toString.call(r)},n=0,o=void 0,i=void 0,a=function(r,e){E[n]=r,E[n+1]=e,2===(n+=2)&&(i?i(g):k())};function s(r){i=r}function u(r){a=r}var c=\"undefined\"!=typeof window?window:void 0,l=c||{},d=l.MutationObserver||l.WebKitMutationObserver,p=\"undefined\"==typeof self&&\"undefined\"!=typeof process&&\"[object process]\"==={}.toString.call(process),h=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel;function m(){return function(){return process.nextTick(g)}}function v(){return void 0!==o?function(){o(g)}:y()}function w(){var r=0,e=new d(g),t=document.createTextNode(\"\");return e.observe(t,{characterData:!0}),function(){t.data=r=++r%2}}function _(){var r=new MessageChannel;return r.port1.onmessage=g,function(){return r.port2.postMessage(0)}}function y(){var r=setTimeout;return function(){return r(g,1)}}var E=new Array(1e3);function g(){for(var r=0;r<n;r+=2)(0,E[r])(E[r+1]),E[r]=void 0,E[r+1]=void 0;n=0}function b(){try{var r=Function(\"return this\")().require(\"vertx\");return o=r.runOnLoop||r.runOnContext,v()}catch(r){return y()}}var k=void 0;function D(r,e){var t=this,n=new this.constructor(P);void 0===n[A]&&J(n);var o=t._state;if(o){var i=arguments[o-1];a((function(){return G(o,n,i,t._result)}))}else U(t,n,r,e);return n}function S(r){var e=this;if(r&&\"object\"==typeof r&&r.constructor===e)return r;var t=new e(P);return N(t,r),t}k=p?m():d?w():h?_():void 0===c?b():y();var A=Math.random().toString(36).substring(2);function P(){}var x=void 0,F=1,M=2;function R(){return new TypeError(\"You cannot resolve a promise with itself\")}function C(){return new TypeError(\"A promises callback cannot return that same promise.\")}function z(r,e,t,n){try{r.call(e,t,n)}catch(r){return r}}function j(r,e,t){a((function(r){var n=!1,o=z(t,e,(function(t){n||(n=!0,e!==t?N(r,t):L(r,t))}),(function(e){n||(n=!0,I(r,e))}),\"Settle: \"+(r._label||\" unknown promise\"));!n&&o&&(n=!0,I(r,o))}),r)}function T(r,e){e._state===F?L(r,e._result):e._state===M?I(r,e._result):U(e,void 0,(function(e){return N(r,e)}),(function(e){return I(r,e)}))}function B(r,t,n){t.constructor===r.constructor&&n===D&&t.constructor.resolve===S?T(r,t):void 0===n?L(r,t):e(n)?j(r,t,n):L(r,t)}function N(e,t){if(e===t)I(e,R());else if(r(t)){var n=void 0;try{n=t.then}catch(r){return void I(e,r)}B(e,t,n)}else L(e,t)}function O(r){r._onerror&&r._onerror(r._result),H(r)}function L(r,e){r._state===x&&(r._result=e,r._state=F,0!==r._subscribers.length&&a(H,r))}function I(r,e){r._state===x&&(r._state=M,r._result=e,a(O,r))}function U(r,e,t,n){var o=r._subscribers,i=o.length;r._onerror=null,o[i]=e,o[i+F]=t,o[i+M]=n,0===i&&r._state&&a(H,r)}function H(r){var e=r._subscribers,t=r._state;if(0!==e.length){for(var n=void 0,o=void 0,i=r._result,a=0;a<e.length;a+=3)n=e[a],o=e[a+t],n?G(t,n,o,i):o(i);r._subscribers.length=0}}function G(r,t,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(r){u=!1,s=r}if(t===a)return void I(t,C())}else a=o;t._state!==x||(i&&u?N(t,a):!1===u?I(t,s):r===F?L(t,a):r===M&&I(t,a))}function q(r,e){try{e((function(e){N(r,e)}),(function(e){I(r,e)}))}catch(e){I(r,e)}}var W=0;function V(){return W++}function J(r){r[A]=W++,r._state=void 0,r._result=void 0,r._subscribers=[]}function X(){return new Error(\"Array Methods must be provided an Array\")}var Y=function(){function r(r,e){this._instanceConstructor=r,this.promise=new r(P),this.promise[A]||J(this.promise),t(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?L(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&L(this.promise,this._result))):I(this.promise,X())}return r.prototype._enumerate=function(r){for(var e=0;this._state===x&&e<r.length;e++)this._eachEntry(r[e],e)},r.prototype._eachEntry=function(r,e){var t=this._instanceConstructor,n=t.resolve;if(n===S){var o=void 0,i=void 0,a=!1;try{o=r.then}catch(r){a=!0,i=r}if(o===D&&r._state!==x)this._settledAt(r._state,e,r._result);else if(\"function\"!=typeof o)this._remaining--,this._result[e]=r;else if(t===er){var s=new t(P);a?I(s,i):B(s,r,o),this._willSettleAt(s,e)}else this._willSettleAt(new t((function(e){return e(r)})),e)}else this._willSettleAt(n(r),e)},r.prototype._settledAt=function(r,e,t){var n=this.promise;n._state===x&&(this._remaining--,r===M?I(n,t):this._result[e]=t),0===this._remaining&&L(n,this._result)},r.prototype._willSettleAt=function(r,e){var t=this;U(r,void 0,(function(r){return t._settledAt(F,e,r)}),(function(r){return t._settledAt(M,e,r)}))},r}();function K(r){return new Y(this,r).promise}function $(r){var e=this;return t(r)?new e((function(t,n){for(var o=r.length,i=0;i<o;i++)e.resolve(r[i]).then(t,n)})):new e((function(r,e){return e(new TypeError(\"You must pass an array to race.\"))}))}function Q(r){var e=new this(P);return I(e,r),e}function Z(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}function rr(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}var er=function(){function r(e){this[A]=V(),this._result=this._state=void 0,this._subscribers=[],P!==e&&(\"function\"!=typeof e&&Z(),this instanceof r?q(this,e):rr())}return r.prototype.catch=function(r){return this.then(null,r)},r.prototype.finally=function(r){var t=this,n=t.constructor;return e(r)?t.then((function(e){return n.resolve(r()).then((function(){return e}))}),(function(e){return n.resolve(r()).then((function(){throw e}))})):t.then(r,r)},r}();function tr(){var r=void 0;if(void 0!==f)r=f;else if(\"undefined\"!=typeof self)r=self;else try{r=Function(\"return this\")()}catch(r){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var e=r.Promise;if(e){var t=null;try{t=Object.prototype.toString.call(e.resolve())}catch(r){}if(\"[object Promise]\"===t&&!e.cast)return}r.Promise=er}return er.prototype.then=D,er.all=K,er.race=$,er.resolve=S,er.reject=Q,er._setScheduler=s,er._setAsap=u,er._asap=a,er.polyfill=tr,er.Promise=er,er}()}(p),p.exports.polyfill();var m=function(r){var e=[];return r.children.forEach((function(r){h(r)?e.push(m(r)):e.push(v(r))})),\"subgraph cluster_\".concat(r.id,' {\\nid=\"').concat(r.id,'\";\\nlabel=\"').concat(r.text,'\";\\nmargin=16;\\n').concat(e.join(\"\\n\"),\"\\n}\")},v=function(r){return\"\".concat(r.id,' [id=\"').concat(r.id,'\" label=\"').concat(r.text,'\" width=').concat(y(r.width),\" height=\").concat(y(r.height),\"]\")},w=function(r){return 96*r/72},_=function(r){return 96*r},y=function(r){return r/96};function E(r){var e=r?r.split(\",\").map((function(r){return w(+r)})):[0,0,0,0],t=e[0],n=e[1],o=e[2]-t,i=e[3]-n;return{x:t-o/2,y:n-i/2,width:o,height:i}}function g(r,e){var t=r.split(\",\").map((function(r){return w(+r)})),n=t[0],o=t[1];return{x:-n+e.width,y:-o+e.height}}function b(r,e,t){return void 0===t&&(t=\"json\"),d[r](e,t).then((function(r){return\"json\"===t?JSON.parse(r):r}))}function k(e,t){if(self.document=self.document||{currentScript:{src:t.wasmFolder+\"/dummy.js\"}},e.raw)return b(t.engine,e.raw,\"svg\");var n={},o=[],i=[],a={},s=[],u=[],c={},l=[],d=[];function f(r,e){h(r)?(n[r.id]=r,o.push(r),r.children.forEach((function(r){return f(r,!1)})),e&&i.push(m(r))):(a[r.id]=r,s.push(r),e&&u.push(v(r)))}return e.items.forEach((function(r){return f(r,!0)})),e.links.forEach((function(r){var e,t,n,o;c[r.id]=r,l.push(r),d.push((e=r.source.id,t=r.target.id,n=r.id,o=r.text,\"\".concat(e,\" -> \").concat(t,' [id=\"').concat(n,'\", label=\"').concat(o,'\"]')))})),b(t.engine,\"digraph G {\\n graph [fontname=Verdana,fontsize=11.0];\\n graph [rankdir=TB];\\n node [shape=rect,fontname=Verdana,fontsize=11.0,fixedsize=true];\\n edge [fontname=Verdana,fontsize=11.0];\\n\\n\".concat(i.join(\"\\n\"),\"\\n\\n\").concat(d.join(\"\\n\"),\"\\n\\n\").concat(u.join(\"\\n\"),\"\\n}\")).then((function(e){var t=E(e.bb);return e.objects&&e.objects.forEach((function(r){if(r.nodes){var e=function(r,e){var t=E(r);return{x:-t.x+e.width,y:-t.y+e.height,width:t.width,height:t.height}}(r.bb,t),o=n[r.id];o.x=e.x-t.width/2,o.y=e.y-t.height/2,o.width=e.width,o.height=e.height}else{var i=(u=r.pos,c=r.width,l=r.height,d=g(u,t),f=_(+c),p=_(+l),{x:d.x,y:d.y,width:f,height:p}),s=a[r.id];s&&(s.x=i.x-t.width/2,s.y=i.y-t.height/2)}var u,c,l,d,f,p})),e.edges&&e.edges.forEach((function(e){var n=c[e.id];n&&(n.points=function(e,t){if(e.pos){var n=e.pos.substr(2).split(\" \").map((function(r){return g(r,t)})).map((function(r){return[r.x-t.width/2,r.y-t.height/2]})),o=n.shift();return r(r([],n,!0),[o],!1)}return[]}(e,t))})),{clusters:o,nodes:s,links:l}}))}self.onmessage=function(r){k.apply(void 0,r.data).then((function(r){self.postMessage(r)}))}}();";
|
|
15773
15763
|
var workerBlob = new Blob([workerCode], { type: "application/javascript" });
|
|
15774
15764
|
var workerUrl = URL.createObjectURL(workerBlob);
|
|
15775
15765
|
var worker = new Worker(workerUrl);
|
|
@@ -18401,10 +18391,8 @@ var SankeyGraph = /** @class */ (function (_super) {
|
|
|
18401
18391
|
};
|
|
18402
18392
|
// Events ---
|
|
18403
18393
|
SankeyGraph.prototype.click = function (row, column, selected) {
|
|
18404
|
-
console.log("Click: " + JSON.stringify(row) + ", " + column + "," + selected);
|
|
18405
18394
|
};
|
|
18406
18395
|
SankeyGraph.prototype.dblclick = function (row, column, selected) {
|
|
18407
|
-
console.log("Double Click: " + JSON.stringify(row) + ", " + column + "," + selected);
|
|
18408
18396
|
};
|
|
18409
18397
|
__decorate([
|
|
18410
18398
|
publish([], "any", "Vertex Columns", null, { internal: true }),
|