!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self)["@hpcc-js/wasm"]={})}(this,(function(r){"use strict";function t(r,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(e){if("default"!==e&&!(e in r)){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}}))})),Object.freeze(r)}var e={exports:{}};!function(r,t){var e,n=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,n,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,e){t=r,n=e}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u,c="./this.program",f="";"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},u=function(r,t,e){var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)};var d,l,p=o.print||console.log.bind(console),m=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments,o.thisProgram&&(c=o.thisProgram),o.quit,o.wasmBinary&&(d=o.wasmBinary),o.noExitRuntime,"object"!=typeof WebAssembly&&I("no native wasm support detected");var h=!1;function v(r,t){r||I("Assertion failed: "+t)}var w,_,y,E,g,b,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function D(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&k)return k.decode(r.subarray(t,o));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function S(r,t){return r?D(y,r,t):""}function P(r,t,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(e>=i)break;t[e++]=s}else if(s<=2047){if(e+1>=i)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=i)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=i)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function A(r){for(var t=0,e=0;e=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function F(r){w=r,o.HEAP8=_=new Int8Array(r),o.HEAP16=new Int16Array(r),o.HEAP32=E=new Int32Array(r),o.HEAPU8=y=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=g=new Float64Array(r)}o.INITIAL_MEMORY;var x,M,R,C,z=[],j=[],B=[],T=0,N=null;function O(r){T++,o.monitorRunDependencies&&o.monitorRunDependencies(T)}function L(r){if(T--,o.monitorRunDependencies&&o.monitorRunDependencies(T),0==T&&N){var t=N;N=null,t()}}function I(r){o.onAbort&&o.onAbort(r),m(r="Aborted("+r+")"),h=!0,r+=". Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function H(r){return r.startsWith("data:application/octet-stream;base64,")}function U(r){try{if(r==x&&d)return new Uint8Array(d);throw"both async and sync fetching of the wasm failed"}catch(r){I(r)}}o.preloadedImages={},o.preloadedAudios={},H(x="expatlib.wasm")||(M=x,x=o.locateFile?o.locateFile(M,f):f+M);var G={11694:function(r){var t=o.getCache(o.CExpatJS)[r];if(!t.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";t.startElement()},11912:function(r){var t=o.getCache(o.CExpatJS)[r];if(!t.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";t.endElement()},12124:function(r){var t=o.getCache(o.CExpatJS)[r];if(!t.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";t.characterData()}};function q(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?W(e)():W(e)(t.arg):e(void 0===t.arg?null:t.arg)}else t(o)}}function W(r){return b.get(r)}var J={splitPath:function(r){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,t){for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:function(r){var t="/"===r.charAt(0),e="/"===r.substr(-1);return(r=J.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=J.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:function(r){if("/"===r)return"/";var t=(r=(r=J.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return J.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return J.normalize(r.join("/"))},join2:function(r,t){return J.normalize(r+"/"+t)}},V={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:Y.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t="/"===n.charAt(0)}return(t?"/":"")+(r=J.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||"."},relative:function(r,t){function e(r){for(var t=0;t=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=V.resolve(r).substr(1),t=V.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s0&&(p(D(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(m(D(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(m(D(r.output,0)),r.output=[])}}},K={ops_table:null,mount:function(r){return K.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(Y.isBlkdev(e)||Y.isFIFO(e))throw new Y.ErrnoError(63);K.ops_table||(K.ops_table={dir:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr,lookup:K.node_ops.lookup,mknod:K.node_ops.mknod,rename:K.node_ops.rename,unlink:K.node_ops.unlink,rmdir:K.node_ops.rmdir,readdir:K.node_ops.readdir,symlink:K.node_ops.symlink},stream:{llseek:K.stream_ops.llseek}},file:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr},stream:{llseek:K.stream_ops.llseek,read:K.stream_ops.read,write:K.stream_ops.write,allocate:K.stream_ops.allocate,mmap:K.stream_ops.mmap,msync:K.stream_ops.msync}},link:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr,readlink:K.node_ops.readlink},stream:{}},chrdev:{node:{getattr:K.node_ops.getattr,setattr:K.node_ops.setattr},stream:Y.chrdev_stream_ops}});var o=Y.createNode(r,t,e,n);return Y.isDir(o.mode)?(o.node_ops=K.ops_table.dir.node,o.stream_ops=K.ops_table.dir.stream,o.contents={}):Y.isFile(o.mode)?(o.node_ops=K.ops_table.file.node,o.stream_ops=K.ops_table.file.stream,o.usedBytes=0,o.contents=null):Y.isLink(o.mode)?(o.node_ops=K.ops_table.link.node,o.stream_ops=K.ops_table.link.stream):Y.isChrdev(o.mode)&&(o.node_ops=K.ops_table.chrdev.node,o.stream_ops=K.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=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,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=Y.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,Y.isDir(r.mode)?t.size=4096:Y.isFile(r.mode)?t.size=r.usedBytes:Y.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&K.resizeFileStorage(r,t.size)},lookup:function(r,t){throw Y.genericErrors[44]},mknod:function(r,t,e,n){return K.createNode(r,t,e,n)},rename:function(r,t,e){if(Y.isDir(r.mode)){var n;try{n=Y.lookupNode(t,e)}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=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=Y.lookupNode(r,t);for(var n in e.contents)throw new Y.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=K.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!Y.isLink(r.mode))throw new Y.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,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)t.set(i.subarray(o,o+a),e);else for(var s=0;s0||n+e8)throw new Y.ErrnoError(32);for(var o=J.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),i=Y.root,a="/",s=0;s40)throw new Y.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var t;;){if(Y.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:function(r,t){for(var e=0,n=0;n>>0)%Y.nameTable.length},hashAddNode:function(r){var t=Y.hashName(r.parent.id,r.name);r.name_next=Y.nameTable[t],Y.nameTable[t]=r},hashRemoveNode:function(r){var t=Y.hashName(r.parent.id,r.name);if(Y.nameTable[t]===r)Y.nameTable[t]=r.name_next;else for(var e=Y.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:function(r,t){var e=Y.mayLookup(r);if(e)throw new Y.ErrnoError(e,r);for(var n=Y.hashName(r.id,t),o=Y.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===t)return o}return Y.lookup(r,t)},createNode:function(r,t,e,n){var o=new Y.FSNode(r,t,e,n);return Y.hashAddNode(o),o},destroyNode:function(r){Y.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(r){var t=Y.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:function(r){var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:function(r,t){return Y.ignorePermissions||(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2},mayLookup:function(r){var t=Y.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:function(r,t){try{return Y.lookupNode(r,t),20}catch(r){}return Y.nodePermissions(r,"wx")},mayDelete:function(r,t,e){var n;try{n=Y.lookupNode(r,t)}catch(r){return r.errno}var o=Y.nodePermissions(r,"wx");if(o)return o;if(e){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:function(r,t){return r?Y.isLink(r.mode)?32:Y.isDir(r.mode)&&("r"!==Y.flagsToPermissionString(t)||512&t)?31:Y.nodePermissions(r,Y.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(r,t){r=r||0,t=t||Y.MAX_OPEN_FDS;for(var e=r;e<=t;e++)if(!Y.streams[e])return e;throw new Y.ErrnoError(33)},getStream:function(r){return Y.streams[r]},createStream:function(r,t,e){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}}});var n=new Y.FSStream;for(var o in r)n[o]=r[o];r=n;var i=Y.nextfd(t,e);return r.fd=i,Y.streams[i]=r,r},closeStream:function(r){Y.streams[r]=null},chrdev_stream_ops:{open:function(r){var t=Y.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new Y.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,t){return r<<8|t},registerDevice:function(r,t){Y.devices[r]={stream_ops:t}},getDevice:function(r){return Y.devices[r]},getMounts:function(r){for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:function(r,t){"function"==typeof r&&(t=r,r=!1),Y.syncFSRequests++,Y.syncFSRequests>1&&m("warning: "+Y.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Y.getMounts(Y.root.mount),n=0;function o(r){return Y.syncFSRequests--,t(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,r,i)}))},mount:function(r,t,e){var n,o="/"===e,i=!e;if(o&&Y.root)throw new Y.ErrnoError(10);if(!o&&!i){var a=Y.lookupPath(e,{follow_mount:!1});if(e=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:t,mountpoint:e,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:function(r){var t=Y.lookupPath(r,{follow_mount:!1});if(!Y.isMountpoint(t.node))throw new Y.ErrnoError(28);var e=t.node,n=e.mounted,o=Y.getMounts(n);Object.keys(Y.nameTable).forEach((function(r){for(var t=Y.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&Y.destroyNode(t),t=e}})),e.mounted=null;var i=e.mount.mounts.indexOf(n);e.mount.mounts.splice(i,1)},lookup:function(r,t){return r.node_ops.lookup(r,t)},mknod:function(r,t,e){var n=Y.lookupPath(r,{parent:!0}).node,o=J.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,t,e)},create:function(r,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Y.mknod(r,t,0)},mkdir:function(r,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Y.mknod(r,t,0)},mkdirTree:function(r,t){for(var e=r.split("/"),n="",o=0;othis.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(r){var t=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(r,t){if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+t),"undefined"!=typeof Uint8Array&&(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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ir(o.responseText||"",!0)}(t,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,p("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:e},s=Y.createFile(r,t,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((function(r){var t=s.stream_ops[r];u[r]=function(){return Y.forceLoadFile(s),t.apply(null,arguments)}})),u.read=function(r,t,e,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>2]=n.dev,E[e+4>>2]=0,E[e+8>>2]=n.ino,E[e+12>>2]=n.mode,E[e+16>>2]=n.nlink,E[e+20>>2]=n.uid,E[e+24>>2]=n.gid,E[e+28>>2]=n.rdev,E[e+32>>2]=0,C=[n.size>>>0,(R=n.size,+Math.abs(R)>=1?R>0?(0|Math.min(+Math.floor(R/4294967296),4294967295))>>>0:~~+Math.ceil((R-+(~~R>>>0))/4294967296)>>>0:0)],E[e+40>>2]=C[0],E[e+44>>2]=C[1],E[e+48>>2]=4096,E[e+52>>2]=n.blocks,E[e+56>>2]=n.atime.getTime()/1e3|0,E[e+60>>2]=0,E[e+64>>2]=n.mtime.getTime()/1e3|0,E[e+68>>2]=0,E[e+72>>2]=n.ctime.getTime()/1e3|0,E[e+76>>2]=0,C=[n.ino>>>0,(R=n.ino,+Math.abs(R)>=1?R>0?(0|Math.min(+Math.floor(R/4294967296),4294967295))>>>0:~~+Math.ceil((R-+(~~R>>>0))/4294967296)>>>0:0)],E[e+80>>2]=C[0],E[e+84>>2]=C[1],0},doMsync:function(r,t,e,n,o){var i=y.slice(r,r+e);Y.msync(t,i,o,e,n)},doMkdir:function(r,t){return"/"===(r=J.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),Y.mkdir(r,t,0),0},doMknod:function(r,t,e){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Y.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=Y.readlink(r),o=Math.min(e,A(n)),i=_[t+o];return P(n,y,t,e+1),_[t+o]=i,o},doAccess:function(r,t){if(-8&t)return-28;var e=Y.lookupPath(r,{follow:!0}).node;if(!e)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&Y.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=Y.getStream(e);return n&&Y.close(n),Y.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,i=0;i>2],s=E[t+(8*i+4)>>2],u=Y.read(r,_,a,s,n);if(u<0)return-1;if(o+=u,u>2],s=E[t+(8*i+4)>>2],u=Y.write(r,_,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return $.varargs+=4,E[$.varargs-4>>2]},getStr:function(r){return S(r)},getStreamFromFD:function(r){var t=Y.getStream(r);if(!t)throw new Y.ErrnoError(8);return t},get64:function(r,t){return r}},Q=[];function Z(r){try{return l.grow(r-w.byteLength+65535>>>16),F(l.buffer),1}catch(r){}}var rr={};function tr(){if(!tr.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",_:c||"./this.program"};for(var t in rr)void 0===rr[t]?delete r[t]:r[t]=rr[t];var e=[];for(var t in r)e.push(t+"="+r[t]);tr.strings=e}return tr.strings}var er=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Y.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},nr=365,or=146;function ir(r,t,e){var n=e>0?e:A(r)+1,o=new Array(n),i=P(r,o,0,o.length);return t&&(o.length=i),o}Object.defineProperties(er.prototype,{read:{get:function(){return(this.mode&nr)===nr},set:function(r){r?this.mode|=nr:this.mode&=-366}},write:{get:function(){return(this.mode&or)===or},set:function(r){r?this.mode|=or: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 ar={h:function(r,t,e){$.varargs=e;try{var n=$.getStr(r),o=e?$.get():0;return Y.open(n,t,o).fd}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return-r.errno}},b:function(){I("")},a:function(r,t,e){var n=function(r,t){var e;for(Q.length=0,t>>=2;e=y[r++];){var n=e<105;n&&1&t&&t++,Q.push(n?g[t++>>1]:E[t]),++t}return Q}(t,e);return G[r].apply(null,n)},k:function(r,t,e){y.copyWithin(r,t,t+e)},e:function(r){var t,e,n=y.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),Z(Math.min(o,((t=Math.max(r,a))%(e=65536)>0&&(t+=e-t%e),t))))return!0}return!1},f:function(r,t){var e=0;return tr().forEach((function(n,o){var i=t+e;E[r+4*o>>2]=i,function(r,t,e){for(var n=0;n>0]=r.charCodeAt(n);e||(_[t>>0]=0)}(n,i),e+=n.length+1})),0},g:function(r,t){var e=tr();E[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),E[t>>2]=n,0},d:function(r){try{var t=$.getStreamFromFD(r);return Y.close(t),0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},i:function(r,t,e,n){try{var o=$.getStreamFromFD(r),i=$.doReadv(o,t,e);return E[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},j:function(r,t,e,n,o){try{var i=$.getStreamFromFD(r),a=4294967296*e+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Y.llseek(i,a,n),C=[i.position>>>0,(R=i.position,+Math.abs(R)>=1?R>0?(0|Math.min(+Math.floor(R/4294967296),4294967295))>>>0:~~+Math.ceil((R-+(~~R>>>0))/4294967296)>>>0:0)],E[o>>2]=C[0],E[o+4>>2]=C[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}},c:function(r,t,e,n){try{var o=$.getStreamFromFD(r),i=$.doWritev(o,t,e);return E[n>>2]=i,0}catch(r){if(void 0===Y||!(r instanceof Y.ErrnoError))throw r;return r.errno}},l:function(r){var t=Date.now();return E[r>>2]=t/1e3|0,E[r+4>>2]=t%1e3*1e3|0,0}};!function(){var r={a:ar};function t(r,t){var e,n=r.exports;o.asm=n,F((l=o.asm.m).buffer),b=o.asm.G,e=o.asm.n,j.unshift(e),L()}function e(r){t(r.instance)}function i(t){return(d||"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(t){return WebAssembly.instantiate(t,r)})).then((function(r){return r})).then(t,(function(r){m("failed to asynchronously prepare wasm: "+r),I(r)}))}if(O(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){return m("Module.instantiateWasm callback failed with error: "+r),!1}(d||"function"!=typeof WebAssembly.instantiateStreaming||H(x)||"function"!=typeof fetch?i(e):fetch(x,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){return m("wasm streaming compile failed: "+r),m("falling back to ArrayBuffer instantiation"),i(e)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.n).apply(null,arguments)};var sr,ur=o._emscripten_bind_CExpat_CExpat_0=function(){return(ur=o._emscripten_bind_CExpat_CExpat_0=o.asm.o).apply(null,arguments)},cr=o._emscripten_bind_CExpat_version_0=function(){return(cr=o._emscripten_bind_CExpat_version_0=o.asm.p).apply(null,arguments)},fr=o._emscripten_bind_CExpat_create_0=function(){return(fr=o._emscripten_bind_CExpat_create_0=o.asm.q).apply(null,arguments)},dr=o._emscripten_bind_CExpat_destroy_0=function(){return(dr=o._emscripten_bind_CExpat_destroy_0=o.asm.r).apply(null,arguments)},lr=o._emscripten_bind_CExpat_parse_1=function(){return(lr=o._emscripten_bind_CExpat_parse_1=o.asm.s).apply(null,arguments)},pr=o._emscripten_bind_CExpat_tag_0=function(){return(pr=o._emscripten_bind_CExpat_tag_0=o.asm.t).apply(null,arguments)},mr=o._emscripten_bind_CExpat_attrs_0=function(){return(mr=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)},vr=o._emscripten_bind_CExpat_startElement_0=function(){return(vr=o._emscripten_bind_CExpat_startElement_0=o.asm.w).apply(null,arguments)},wr=o._emscripten_bind_CExpat_endElement_0=function(){return(wr=o._emscripten_bind_CExpat_endElement_0=o.asm.x).apply(null,arguments)},_r=o._emscripten_bind_CExpat_characterData_0=function(){return(_r=o._emscripten_bind_CExpat_characterData_0=o.asm.y).apply(null,arguments)},yr=o._emscripten_bind_CExpat___destroy___0=function(){return(yr=o._emscripten_bind_CExpat___destroy___0=o.asm.z).apply(null,arguments)},Er=o._emscripten_bind_VoidPtr___destroy___0=function(){return(Er=o._emscripten_bind_VoidPtr___destroy___0=o.asm.A).apply(null,arguments)},gr=o._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(gr=o._emscripten_bind_CExpatJS_CExpatJS_0=o.asm.B).apply(null,arguments)},br=o._emscripten_bind_CExpatJS_startElement_0=function(){return(br=o._emscripten_bind_CExpatJS_startElement_0=o.asm.C).apply(null,arguments)},kr=o._emscripten_bind_CExpatJS_endElement_0=function(){return(kr=o._emscripten_bind_CExpatJS_endElement_0=o.asm.D).apply(null,arguments)},Dr=o._emscripten_bind_CExpatJS_characterData_0=function(){return(Dr=o._emscripten_bind_CExpatJS_characterData_0=o.asm.E).apply(null,arguments)},Sr=o._emscripten_bind_CExpatJS___destroy___0=function(){return(Sr=o._emscripten_bind_CExpatJS___destroy___0=o.asm.F).apply(null,arguments)};function Pr(r){function e(){sr||(sr=!0,o.calledRun=!0,h||(o.noFSInit||Y.init.initialized||Y.init(),Y.ignorePermissions=!1,q(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(),B.unshift(r);var r;q(B)}()))}T>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),z.unshift(r);var r;q(z)}(),T>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o._malloc=function(){return(o._malloc=o.asm.H).apply(null,arguments)},N=function r(){sr||Pr(),sr||(N=r)},o.run=Pr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Ar(){}function Fr(r){return(r||Ar).__cache__}function xr(r,t){var e=Fr(t),n=e[r];return n||((n=Object.create((t||Ar).prototype)).ptr=r,e[r]=n)}Pr(),Ar.prototype=Object.create(Ar.prototype),Ar.prototype.constructor=Ar,Ar.prototype.__class__=Ar,Ar.__cache__={},o.WrapperObject=Ar,o.getCache=Fr,o.wrapPointer=xr,o.castObject=function(r,t){return xr(r.ptr,t)},o.NULL=xr(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,t){return r.ptr===t.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var Mr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Mr.needed){for(var r=0;r=Mr.size?(v(i>0),Mr.needed+=i,e=o._malloc(i),Mr.temps.push(e)):(e=Mr.buffer+Mr.pos,Mr.pos+=i),e},copy:function(r,t,e){switch(e>>>=0,t.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n=n);)++o;if(o-t>16&&r.subarray&&A)return A.decode(r.subarray(t,o));for(var i="";t>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function x(r,t){return r?F(b,r,t):""}function M(r,t,e,n){if(!(n>0))return 0;for(var o=e,i=e+n-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a)),s<=127){if(e>=i)break;t[e++]=s}else if(s<=2047){if(e+1>=i)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=i)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=i)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function R(r){for(var t=0,e=0;e=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&r.charCodeAt(++e)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}function C(r){E=r,o.HEAP8=g=new Int8Array(r),o.HEAP16=k=new Int16Array(r),o.HEAP32=D=new Int32Array(r),o.HEAPU8=b=new Uint8Array(r),o.HEAPU16=new Uint16Array(r),o.HEAPU32=new Uint32Array(r),o.HEAPF32=new Float32Array(r),o.HEAPF64=S=new Float64Array(r)}o.INITIAL_MEMORY;var z,j,B,T,N=[],O=[],L=[],I=0,H=null;function U(r){I++,o.monitorRunDependencies&&o.monitorRunDependencies(I)}function G(r){if(I--,o.monitorRunDependencies&&o.monitorRunDependencies(I),0==I&&H){var t=H;H=null,t()}}function q(r){o.onAbort&&o.onAbort(r),p(r="Aborted("+r+")"),_=!0,r+=". Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(r);throw n(t),t}function W(r){return r.startsWith("data:application/octet-stream;base64,")}function J(r){try{if(r==z&&m)return new Uint8Array(m);throw"both async and sync fetching of the wasm failed"}catch(r){q(r)}}o.preloadedImages={},o.preloadedAudios={},W(z="graphvizlib.wasm")||(j=z,z=o.locateFile?o.locateFile(j,d):d+j);var V,X={161580:function(r,t){var e=x(r),n=x(t);nr.createPath("/",Q.dirname(e)),nr.writeFile(Q.join("/",e),n)}};function K(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?Y(e)():Y(e)(t.arg):e(void 0===t.arg?null:t.arg)}else t(o)}}function Y(r){return P.get(r)}function $(r){return D[kr()>>2]=r,r}V=function(){return performance.now()};var Q={splitPath:function(r){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:function(r,t){for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:function(r){var t="/"===r.charAt(0),e="/"===r.substr(-1);return(r=Q.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=Q.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:function(r){if("/"===r)return"/";var t=(r=(r=Q.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return Q.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return Q.normalize(r.join("/"))},join2:function(r,t){return Q.normalize(r+"/"+t)}},Z={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:nr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t="/"===n.charAt(0)}return(t?"/":"")+(r=Q.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||"."},relative:function(r,t){function e(r){for(var t=0;t=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=Z.resolve(r).substr(1),t=Z.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s0&&(l(F(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(p(F(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(p(F(r.output,0)),r.output=[])}}};function tr(r){r=function(r,t){return Math.ceil(r/t)*t}(r,65536);var t=Ar(65536,r);return t?(function(r,t){b.fill(0,r,r+t)}(t,r),t):0}var er={ops_table:null,mount:function(r){return er.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(nr.isBlkdev(e)||nr.isFIFO(e))throw new nr.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:nr.chrdev_stream_ops}});var o=nr.createNode(r,t,e,n);return nr.isDir(o.mode)?(o.node_ops=er.ops_table.dir.node,o.stream_ops=er.ops_table.dir.stream,o.contents={}):nr.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):nr.isLink(o.mode)?(o.node_ops=er.ops_table.link.node,o.stream_ops=er.ops_table.link.stream):nr.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[t]=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,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=nr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,nr.isDir(r.mode)?t.size=4096:nr.isFile(r.mode)?t.size=r.usedBytes:nr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&er.resizeFileStorage(r,t.size)},lookup:function(r,t){throw nr.genericErrors[44]},mknod:function(r,t,e,n){return er.createNode(r,t,e,n)},rename:function(r,t,e){if(nr.isDir(r.mode)){var n;try{n=nr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new nr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=nr.lookupNode(r,t);for(var n in e.contents)throw new nr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=er.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!nr.isLink(r.mode))throw new nr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,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)t.set(i.subarray(o,o+a),e);else for(var s=0;s0||n+e8)throw new nr.ErrnoError(32);for(var o=Q.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),i=nr.root,a="/",s=0;s40)throw new nr.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var t;;){if(nr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:function(r,t){for(var e=0,n=0;n>>0)%nr.nameTable.length},hashAddNode:function(r){var t=nr.hashName(r.parent.id,r.name);r.name_next=nr.nameTable[t],nr.nameTable[t]=r},hashRemoveNode:function(r){var t=nr.hashName(r.parent.id,r.name);if(nr.nameTable[t]===r)nr.nameTable[t]=r.name_next;else for(var e=nr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:function(r,t){var e=nr.mayLookup(r);if(e)throw new nr.ErrnoError(e,r);for(var n=nr.hashName(r.id,t),o=nr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===t)return o}return nr.lookup(r,t)},createNode:function(r,t,e,n){var o=new nr.FSNode(r,t,e,n);return nr.hashAddNode(o),o},destroyNode:function(r){nr.hashRemoveNode(r)},isRoot:function(r){return r===r.parent},isMountpoint:function(r){return!!r.mounted},isFile:function(r){return 32768==(61440&r)},isDir:function(r){return 16384==(61440&r)},isLink:function(r){return 40960==(61440&r)},isChrdev:function(r){return 8192==(61440&r)},isBlkdev:function(r){return 24576==(61440&r)},isFIFO:function(r){return 4096==(61440&r)},isSocket:function(r){return 49152==(49152&r)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(r){var t=nr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:function(r){var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:function(r,t){return nr.ignorePermissions||(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2},mayLookup:function(r){var t=nr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:function(r,t){try{return nr.lookupNode(r,t),20}catch(r){}return nr.nodePermissions(r,"wx")},mayDelete:function(r,t,e){var n;try{n=nr.lookupNode(r,t)}catch(r){return r.errno}var o=nr.nodePermissions(r,"wx");if(o)return o;if(e){if(!nr.isDir(n.mode))return 54;if(nr.isRoot(n)||nr.getPath(n)===nr.cwd())return 10}else if(nr.isDir(n.mode))return 31;return 0},mayOpen:function(r,t){return r?nr.isLink(r.mode)?32:nr.isDir(r.mode)&&("r"!==nr.flagsToPermissionString(t)||512&t)?31:nr.nodePermissions(r,nr.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(r,t){r=r||0,t=t||nr.MAX_OPEN_FDS;for(var e=r;e<=t;e++)if(!nr.streams[e])return e;throw new nr.ErrnoError(33)},getStream:function(r){return nr.streams[r]},createStream:function(r,t,e){nr.FSStream||(nr.FSStream=function(){},nr.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}}});var n=new nr.FSStream;for(var o in r)n[o]=r[o];r=n;var i=nr.nextfd(t,e);return r.fd=i,nr.streams[i]=r,r},closeStream:function(r){nr.streams[r]=null},chrdev_stream_ops:{open:function(r){var t=nr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new nr.ErrnoError(70)}},major:function(r){return r>>8},minor:function(r){return 255&r},makedev:function(r,t){return r<<8|t},registerDevice:function(r,t){nr.devices[r]={stream_ops:t}},getDevice:function(r){return nr.devices[r]},getMounts:function(r){for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:function(r,t){"function"==typeof r&&(t=r,r=!1),nr.syncFSRequests++,nr.syncFSRequests>1&&p("warning: "+nr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=nr.getMounts(nr.root.mount),n=0;function o(r){return nr.syncFSRequests--,t(r)}function i(r){if(r)return i.errored?void 0:(i.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,r,i)}))},mount:function(r,t,e){var n,o="/"===e,i=!e;if(o&&nr.root)throw new nr.ErrnoError(10);if(!o&&!i){var a=nr.lookupPath(e,{follow_mount:!1});if(e=a.path,n=a.node,nr.isMountpoint(n))throw new nr.ErrnoError(10);if(!nr.isDir(n.mode))throw new nr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?nr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var t=nr.lookupPath(r,{follow_mount:!1});if(!nr.isMountpoint(t.node))throw new nr.ErrnoError(28);var e=t.node,n=e.mounted,o=nr.getMounts(n);Object.keys(nr.nameTable).forEach((function(r){for(var t=nr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&nr.destroyNode(t),t=e}})),e.mounted=null;var i=e.mount.mounts.indexOf(n);e.mount.mounts.splice(i,1)},lookup:function(r,t){return r.node_ops.lookup(r,t)},mknod:function(r,t,e){var n=nr.lookupPath(r,{parent:!0}).node,o=Q.basename(r);if(!o||"."===o||".."===o)throw new nr.ErrnoError(28);var i=nr.mayCreate(n,o);if(i)throw new nr.ErrnoError(i);if(!n.node_ops.mknod)throw new nr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:function(r,t){return t=void 0!==t?t:438,t&=4095,t|=32768,nr.mknod(r,t,0)},mkdir:function(r,t){return t=void 0!==t?t:511,t&=1023,t|=16384,nr.mknod(r,t,0)},mkdirTree:function(r,t){for(var e=r.split("/"),n="",o=0;othis.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(r){var t=r*a,o=(r+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=function(r,t){if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==a&&o.setRequestHeader("Range","bytes="+r+"-"+t),"undefined"!=typeof Uint8Array&&(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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):lr(o.responseText||"",!0)}(t,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,l("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:e},s=nr.createFile(r,t,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((function(r){var t=s.stream_ops[r];u[r]=function(){return nr.forceLoadFile(s),t.apply(null,arguments)}})),u.read=function(r,t,e,n,o){nr.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>2]=n.dev,D[e+4>>2]=0,D[e+8>>2]=n.ino,D[e+12>>2]=n.mode,D[e+16>>2]=n.nlink,D[e+20>>2]=n.uid,D[e+24>>2]=n.gid,D[e+28>>2]=n.rdev,D[e+32>>2]=0,T=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],D[e+40>>2]=T[0],D[e+44>>2]=T[1],D[e+48>>2]=4096,D[e+52>>2]=n.blocks,D[e+56>>2]=n.atime.getTime()/1e3|0,D[e+60>>2]=0,D[e+64>>2]=n.mtime.getTime()/1e3|0,D[e+68>>2]=0,D[e+72>>2]=n.ctime.getTime()/1e3|0,D[e+76>>2]=0,T=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],D[e+80>>2]=T[0],D[e+84>>2]=T[1],0},doMsync:function(r,t,e,n,o){var i=b.slice(r,r+e);nr.msync(t,i,o,e,n)},doMkdir:function(r,t){return"/"===(r=Q.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),nr.mkdir(r,t,0),0},doMknod:function(r,t,e){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return nr.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=nr.readlink(r),o=Math.min(e,R(n)),i=g[t+o];return M(n,b,t,e+1),g[t+o]=i,o},doAccess:function(r,t){if(-8&t)return-28;var e=nr.lookupPath(r,{follow:!0}).node;if(!e)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&nr.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=nr.getStream(e);return n&&nr.close(n),nr.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,i=0;i>2],s=D[t+(8*i+4)>>2],u=nr.read(r,g,a,s,n);if(u<0)return-1;if(o+=u,u>2],s=D[t+(8*i+4)>>2],u=nr.write(r,g,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return or.varargs+=4,D[or.varargs-4>>2]},getStr:function(r){return x(r)},getStreamFromFD:function(r){var t=nr.getStream(r);if(!t)throw new nr.ErrnoError(8);return t},get64:function(r,t){return r}},ir=[];function ar(r){try{return v.grow(r-E.byteLength+65535>>>16),C(v.buffer),1}catch(r){}}var sr={};function ur(){if(!ur.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",_:c||"./this.program"};for(var t in sr)void 0===sr[t]?delete r[t]:r[t]=sr[t];var e=[];for(var t in r)e.push(t+"="+r[t]);ur.strings=e}return ur.strings}var cr=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=nr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},fr=365,dr=146;function lr(r,t,e){var n=e>0?e:R(r)+1,o=new Array(n),i=M(r,o,0,o.length);return t&&(o.length=i),o}Object.defineProperties(cr.prototype,{read:{get:function(){return(this.mode&fr)===fr},set:function(r){r?this.mode|=fr:this.mode&=-366}},write:{get:function(){return(this.mode&dr)===dr},set:function(r){r?this.mode|=dr:this.mode&=-147}},isFolder:{get:function(){return nr.isDir(this.mode)}},isDevice:{get:function(){return nr.isChrdev(this.mode)}}}),nr.FSNode=cr,nr.staticInit();var pr={A:function(r,t){return function(r,t){var e;if(0===r)e=Date.now();else{if(1!==r&&4!==r)return $(28),-1;e=V()}return D[t>>2]=e/1e3|0,D[t+4>>2]=e%1e3*1e3*1e3|0,0}(r,t)},B:function(r,t){try{return r=or.getStr(r),or.doAccess(r,t)}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},h:function(r,t,e){or.varargs=e;try{var n=or.getStreamFromFD(r);switch(t){case 0:return(o=or.get())<0?-28:nr.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=or.get();return n.flags|=o,0;case 5:return o=or.get(),k[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return $(28),-1}}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},x:function(r,t){try{var e=or.getStreamFromFD(r);return or.doStat(nr.stat,e.path,t)}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},u:function(r,t,e,n){try{t=or.getStr(t);var o=256&n,i=4096&n;return n&=-4353,t=or.calculateAt(r,t,i),or.doStat(o?nr.lstat:nr.stat,t,e)}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},y:function(r,t,e){or.varargs=e;try{var n=or.getStreamFromFD(r);switch(t){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=or.get();return D[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=or.get(),nr.ioctl(n,t,o);default:q("bad ioctl syscall "+t)}}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},k:function(r,t,e,n,o,i){try{return function(r,t,e,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&r%65536!=0)return-28;if(0!=(32&n)){if(!(a=tr(t)))return-48;s=!0}else{var u=nr.getStream(o);if(!u)return-8;var c=nr.mmap(u,r,t,i,e,n);a=c.ptr,s=c.allocated}return or.mappings[a]={malloc:a,len:t,allocated:s,fd:o,prot:e,flags:n,offset:i},a}(r,t,e,n,o,i)}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},j:function(r,t){try{return function(r,t){var e=or.mappings[r];if(0===t||!e)return-28;if(t===e.len){var n=nr.getStream(e.fd);n&&2&e.prot&&or.doMsync(r,n,t,e.flags,e.offset),or.mappings[r]=null,e.allocated&&br(e.malloc)}return 0}(r,t)}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},e:function(r,t,e){or.varargs=e;try{var n=or.getStr(r),o=e?or.get():0;return nr.open(n,t,o).fd}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},v:function(r,t){try{return r=or.getStr(r),or.doStat(nr.stat,r,t)}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},z:function(r){try{return r=or.getStr(r),nr.unlink(r),0}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return-r.errno}},r:function(){throw"longjmp"},q:function(){q("")},C:function(r,t,e){var n=function(r,t){var e;for(ir.length=0,t>>=2;e=b[r++];){var n=e<105;n&&1&t&&t++,ir.push(n?S[t++>>1]:D[t]),++t}return ir}(t,e);return X[r].apply(null,n)},o:function(r,t,e){b.copyWithin(r,t,t+e)},p:function(r){var t,e,n=b.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),ar(Math.min(o,((t=Math.max(r,a))%(e=65536)>0&&(t+=e-t%e),t))))return!0}return!1},s:function(r,t){var e=0;return ur().forEach((function(n,o){var i=t+e;D[r+4*o>>2]=i,function(r,t,e){for(var n=0;n>0]=r.charCodeAt(n);e||(g[t>>0]=0)}(n,i),e+=n.length+1})),0},t:function(r,t){var e=ur();D[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),D[t>>2]=n,0},a:function(r){!function(r,t){var e;e=r,w||(o.onExit&&o.onExit(e),_=!0),f(e,new Fr(e))}(r)},d:function(r){try{var t=or.getStreamFromFD(r);return nr.close(t),0}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return r.errno}},i:function(r,t,e,n){try{var o=or.getStreamFromFD(r),i=or.doReadv(o,t,e);return D[n>>2]=i,0}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return r.errno}},n:function(r,t,e,n,o){try{var i=or.getStreamFromFD(r),a=4294967296*e+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(nr.llseek(i,a,n),T=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],D[o>>2]=T[0],D[o+4>>2]=T[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return r.errno}},g:function(r,t,e,n){try{var o=or.getStreamFromFD(r),i=or.doWritev(o,t,e);return D[n>>2]=i,0}catch(r){if(void 0===nr||!(r instanceof nr.ErrnoError))throw r;return r.errno}},c:function(){return h},w:function(r){var t=Date.now();return D[r>>2]=t/1e3|0,D[r+4>>2]=t%1e3*1e3|0,0},l:function(r,t,e,n,o,i,a){var s=Dr();try{return Y(r)(t,e,n,o,i,a)}catch(r){if(Sr(s),r!==r+0&&"longjmp"!==r)throw r;Pr(1,0)}},m:function(r,t){var e=Dr();try{Y(r)(t)}catch(r){if(Sr(e),r!==r+0&&"longjmp"!==r)throw r;Pr(1,0)}},b:function(r){h=r},f:function(r){var t=Date.now()/1e3|0;return r&&(D[r>>2]=t),t}};!function(){var r={a:pr};function t(r,t){var e,n=r.exports;o.asm=n,C((v=o.asm.D).buffer),P=o.asm.M,e=o.asm.E,O.unshift(e),G()}function e(r){t(r.instance)}function i(t){return(m||"function"!=typeof fetch?Promise.resolve().then((function(){return J(z)})):fetch(z,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+z+"'";return r.arrayBuffer()})).catch((function(){return J(z)}))).then((function(t){return WebAssembly.instantiate(t,r)})).then((function(r){return r})).then(t,(function(r){p("failed to asynchronously prepare wasm: "+r),q(r)}))}if(U(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){return p("Module.instantiateWasm callback failed with error: "+r),!1}(m||"function"!=typeof WebAssembly.instantiateStreaming||W(z)||"function"!=typeof fetch?i(e):fetch(z,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){return p("wasm streaming compile failed: "+r),p("falling back to ArrayBuffer instantiation"),i(e)}))}))).catch(n)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.E).apply(null,arguments)};var mr=o._emscripten_bind_VoidPtr___destroy___0=function(){return(mr=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)},vr=o._emscripten_bind_Graphviz_version_0=function(){return(vr=o._emscripten_bind_Graphviz_version_0=o.asm.H).apply(null,arguments)},wr=o._emscripten_bind_Graphviz_lastError_0=function(){return(wr=o._emscripten_bind_Graphviz_lastError_0=o.asm.I).apply(null,arguments)},_r=o._emscripten_bind_Graphviz_layout_3=function(){return(_r=o._emscripten_bind_Graphviz_layout_3=o.asm.J).apply(null,arguments)},yr=o._emscripten_bind_Graphviz_createFile_2=function(){return(yr=o._emscripten_bind_Graphviz_createFile_2=o.asm.K).apply(null,arguments)},Er=o._emscripten_bind_Graphviz___destroy___0=function(){return(Er=o._emscripten_bind_Graphviz___destroy___0=o.asm.L).apply(null,arguments)};o._malloc=function(){return(o._malloc=o.asm.N).apply(null,arguments)};var gr,br=o._free=function(){return(br=o._free=o.asm.O).apply(null,arguments)},kr=o.___errno_location=function(){return(kr=o.___errno_location=o.asm.P).apply(null,arguments)},Dr=o.stackSave=function(){return(Dr=o.stackSave=o.asm.Q).apply(null,arguments)},Sr=o.stackRestore=function(){return(Sr=o.stackRestore=o.asm.R).apply(null,arguments)},Pr=o._setThrew=function(){return(Pr=o._setThrew=o.asm.S).apply(null,arguments)},Ar=o._memalign=function(){return(Ar=o._memalign=o.asm.T).apply(null,arguments)};function Fr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function xr(r){function e(){gr||(gr=!0,o.calledRun=!0,_||(o.noFSInit||nr.init.initialized||nr.init(),nr.ignorePermissions=!1,K(O),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(),L.unshift(r);var r;K(L)}()))}I>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),N.unshift(r);var r;K(N)}(),I>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(H=function r(){gr||xr(),gr||(H=r)},o.run=xr,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Mr(){}function Rr(r){return(r||Mr).__cache__}function Cr(r,t){var e=Rr(t),n=e[r];return n||((n=Object.create((t||Mr).prototype)).ptr=r,e[r]=n)}xr(),Mr.prototype=Object.create(Mr.prototype),Mr.prototype.constructor=Mr,Mr.prototype.__class__=Mr,Mr.__cache__={},o.WrapperObject=Mr,o.getCache=Rr,o.wrapPointer=Cr,o.castObject=function(r,t){return Cr(r.ptr,t)},o.NULL=Cr(0),o.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Rr(r.__class__)[r.ptr]},o.compare=function(r,t){return r.ptr===t.ptr},o.getPointer=function(r){return r.ptr},o.getClass=function(r){return r.__class__};var zr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(zr.needed){for(var r=0;r=zr.size?(y(i>0),zr.needed+=i,e=o._malloc(i),zr.temps.push(e)):(e=zr.buffer+zr.pos,zr.pos+=i),e},copy:function(r,t,e){switch(e>>>=0,t.BYTES_PER_ELEMENT){case 2:e>>>=1;break;case 4:e>>>=2;break;case 8:e>>>=3}for(var n=0;n\n\n')}}function w(r,t){var e,n=m({images:[],files:[]},t);h(h([],n.files,!0),(e=n.images,e.map(v)),!0).forEach((function(t){return r.createFile(t.path,t.data)}))}var _={layout:function(r,t,e,n){return void 0===t&&(t="svg"),void 0===e&&(e="dot"),r?s(p,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);w(i,n);var a=i.layout(r,t,e);if(o.destroy(i),!a)throw new Error(o.Graphviz.prototype.lastError());return a})):Promise.resolve("")},circo:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"circo",e)},dot:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"dot",e)},fdp:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"fdp",e)},sfdp:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"sfdp",e)},neato:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"neato",e)},osage:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"osage",e)},patchwork:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"patchwork",e)},twopi:function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"twopi",e)}},y=function(){function r(r){this._wasm=r}return r.prototype.layout=function(r,t,e,n){if(void 0===t&&(t="svg"),void 0===e&&(e="dot"),!r)return"";var o=new this._wasm.Graphviz((null==n?void 0:n.yInvert)?1:0,(null==n?void 0:n.nop)?null==n?void 0:n.nop:0);w(o,n);var i=o.layout(r,t,e);if(this._wasm.destroy(o),!i)throw new Error(this._wasm.Graphviz.prototype.lastError());return i},r.prototype.circo=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"circo",e)},r.prototype.dot=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"dot",e)},r.prototype.fdp=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"fdp",e)},r.prototype.sfdp=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"sfdp",e)},r.prototype.neato=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"neato",e)},r.prototype.osage=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"osage",e)},r.prototype.patchwork=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"patchwork",e)},r.prototype.twopi=function(r,t,e){return void 0===t&&(t="svg"),this.layout(r,t,"twopi",e)},r}();r.GraphvizSync=y,r.StackElement=u,r.StackParser=c,r.expatVersion=function(r,t){return s(o,r,t).then((function(r){return r.CExpat.prototype.version()}))},r.graphviz=_,r.graphvizSync=function(r,t){return s(p,r,t).then((function(r){return new y(r)}))},r.graphvizVersion=function(r,t){return s(p,r,t).then((function(r){return r.Graphviz.prototype.version()}))},r.parse=f,r.wasmFolder=a,Object.defineProperty(r,"__esModule",{value:!0})}));