!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r=r||self)["@hpcc-js/wasm"]={})}(this,(function(r){"use strict";function t(r,t){return r(t={exports:{}},t.exports),t.exports}var e=t((function(r,t){var e,n=(e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,n=void 0!==(r=r||{})?r:{},o={};for(t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);var i,a="./this.program",s="";document.currentScript&&(s=document.currentScript.src),e&&(s=e),s=0!==s.indexOf("blob:")?s.substr(0,s.lastIndexOf("/")+1):"",i=function(r){var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText};var u,c,f=n.print||console.log.bind(console),l=n.printErr||console.warn.bind(console);for(t in o)o.hasOwnProperty(t)&&(n[t]=o[t]);o=null,n.arguments&&n.arguments,n.thisProgram&&(a=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(u=n.wasmBinary),n.noExitRuntime&&n.noExitRuntime,"object"!=typeof WebAssembly&&l("no native wasm support detected");var d=new WebAssembly.Table({initial:153,maximum:153,element:"anyfunc"}),p=!1;function m(r,t){r||H("Assertion failed: "+t)}var h,y,v,_,w,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function E(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.subarray&&g)return g.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 k(r,t){return r?E(v,r,t):""}function b(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 D(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 S(r){h=r,n.HEAP8=y=new Int8Array(r),n.HEAP16=new Int16Array(r),n.HEAP32=_=new Int32Array(r),n.HEAPU8=v=new Uint8Array(r),n.HEAPU16=new Uint16Array(r),n.HEAPU32=new Uint32Array(r),n.HEAPF32=new Float32Array(r),n.HEAPF64=w=new Float64Array(r)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var F=n.TOTAL_MEMORY||16777216;function P(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?n.dynCall_v(e):n.dynCall_vi(e,t.arg):e(void 0===t.arg?null:t.arg)}else t()}}(c=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:F/65536}))&&(h=c.buffer),F=h.byteLength,S(h),_[2080]=5251360;var x=[],A=[],M=[],C=[],R=!1,O=Math.abs,j=Math.ceil,T=Math.floor,z=Math.min,B=0,N=null;function L(r){B++,n.monitorRunDependencies&&n.monitorRunDependencies(B)}function I(r){if(B--,n.monitorRunDependencies&&n.monitorRunDependencies(B),0==B&&N){var t=N;N=null,t()}}function H(r){throw n.onAbort&&n.onAbort(r),f(r+=""),l(r),p=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(r)}function U(r){return String.prototype.startsWith?r.startsWith("data:application/octet-stream;base64,"):0===r.indexOf("data:application/octet-stream;base64,")}n.preloadedImages={},n.preloadedAudios={};var W,q,Y,J="expatlib.wasm";function V(){try{if(u)return new Uint8Array(u);throw"both async and sync fetching of the wasm failed"}catch(r){H(r)}}U(J)||(W=J,J=n.locateFile?n.locateFile(W,s):s+W);var X={1184:function(r){var t=n.getCache(n.CExpatJS)[r];if(!t.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";t.startElement()},1404:function(r){var t=n.getCache(n.CExpatJS)[r];if(!t.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";t.endElement()},1616:function(r){var t=n.getCache(n.CExpatJS)[r];if(!t.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";t.characterData()}};function G(){var r=function(){var r=new Error;if(!r.stack){try{throw new Error}catch(t){r=t}if(!r.stack)return"(no stack trace available)"}return r.stack.toString()}();return n.extraStackTrace&&(r+="\n"+n.extraStackTrace()),r.replace(/\b_Z[\w\d_]+/g,(function(r){return r==r?r:r+" ["+r+"]"}))}A.push({func:function(){dr()}});var Z=42,K={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=K.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=K.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.lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return K.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return K.normalize(r.join("/"))},join2:function(r,t){return K.normalize(r+"/"+t)}};function $(r){return n.___errno_location&&(_[n.___errno_location()>>2]=r),r}var Q={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:er.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=K.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=Q.resolve(r).substr(1),t=Q.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&&(f(E(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(l(E(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(l(E(r.output,0)),r.output=[])}}},tr={ops_table:null,mount:function(r){return tr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(er.isBlkdev(e)||er.isFIFO(e))throw new er.ErrnoError(63);tr.ops_table||(tr.ops_table={dir:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr,lookup:tr.node_ops.lookup,mknod:tr.node_ops.mknod,rename:tr.node_ops.rename,unlink:tr.node_ops.unlink,rmdir:tr.node_ops.rmdir,readdir:tr.node_ops.readdir,symlink:tr.node_ops.symlink},stream:{llseek:tr.stream_ops.llseek}},file:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr},stream:{llseek:tr.stream_ops.llseek,read:tr.stream_ops.read,write:tr.stream_ops.write,allocate:tr.stream_ops.allocate,mmap:tr.stream_ops.mmap,msync:tr.stream_ops.msync}},link:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr,readlink:tr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:tr.node_ops.getattr,setattr:tr.node_ops.setattr},stream:er.chrdev_stream_ops}});var o=er.createNode(r,t,e,n);return er.isDir(o.mode)?(o.node_ops=tr.ops_table.dir.node,o.stream_ops=tr.ops_table.dir.stream,o.contents={}):er.isFile(o.mode)?(o.node_ops=tr.ops_table.file.node,o.stream_ops=tr.ops_table.file.stream,o.usedBytes=0,o.contents=null):er.isLink(o.mode)?(o.node_ops=tr.ops_table.link.node,o.stream_ops=tr.ops_table.link.stream):er.isChrdev(o.mode)&&(o.node_ops=tr.ops_table.chrdev.node,o.stream_ops=tr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o),o},getFileDataAsRegularArray:function(r){if(r.contents&&r.contents.subarray){for(var t=[],e=0;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)return r.contents=null,void(r.usedBytes=0);if(!r.contents||r.contents.subarray){var e=r.contents;return r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),void(r.usedBytes=t)}if(r.contents||(r.contents=[]),r.contents.length>t)r.contents.length=t;else for(;r.contents.length=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||o+n8)throw new er.ErrnoError(32);for(var o=K.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),i=er.root,a="/",s=0;s40)throw new er.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var t;;){if(er.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)%er.nameTable.length},hashAddNode:function(r){var t=er.hashName(r.parent.id,r.name);r.name_next=er.nameTable[t],er.nameTable[t]=r},hashRemoveNode:function(r){var t=er.hashName(r.parent.id,r.name);if(er.nameTable[t]===r)er.nameTable[t]=r.name_next;else for(var e=er.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=er.mayLookup(r);if(e)throw new er.ErrnoError(e,r);for(var n=er.hashName(r.id,t),o=er.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===t)return o}return er.lookup(r,t)},createNode:function(r,t,e,n){er.FSNode||(er.FSNode=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=er.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},er.FSNode.prototype={},Object.defineProperties(er.FSNode.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return er.isDir(this.mode)}},isDevice:{get:function(){return er.isChrdev(this.mode)}}}));var o=new er.FSNode(r,t,e,n);return er.hashAddNode(o),o},destroyNode:function(r){er.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,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(r){var t=er.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 er.ignorePermissions||(-1===t.indexOf("r")||292&r.mode)&&(-1===t.indexOf("w")||146&r.mode)&&(-1===t.indexOf("x")||73&r.mode)?0:2},mayLookup:function(r){var t=er.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:function(r,t){try{return er.lookupNode(r,t),20}catch(r){}return er.nodePermissions(r,"wx")},mayDelete:function(r,t,e){var n;try{n=er.lookupNode(r,t)}catch(r){return r.errno}var o=er.nodePermissions(r,"wx");if(o)return o;if(e){if(!er.isDir(n.mode))return 54;if(er.isRoot(n)||er.getPath(n)===er.cwd())return 10}else if(er.isDir(n.mode))return 31;return 0},mayOpen:function(r,t){return r?er.isLink(r.mode)?32:er.isDir(r.mode)&&("r"!==er.flagsToPermissionString(t)||512&t)?31:er.nodePermissions(r,er.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(r,t){r=r||0,t=t||er.MAX_OPEN_FDS;for(var e=r;e<=t;e++)if(!er.streams[e])return e;throw new er.ErrnoError(33)},getStream:function(r){return er.streams[r]},createStream:function(r,t,e){er.FSStream||(er.FSStream=function(){},er.FSStream.prototype={},Object.defineProperties(er.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 er.FSStream;for(var o in r)n[o]=r[o];r=n;var i=er.nextfd(t,e);return r.fd=i,er.streams[i]=r,r},closeStream:function(r){er.streams[r]=null},chrdev_stream_ops:{open:function(r){var t=er.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new er.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){er.devices[r]={stream_ops:t}},getDevice:function(r){return er.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),er.syncFSRequests++,er.syncFSRequests>1&&l("warning: "+er.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=er.getMounts(er.root.mount),n=0;function o(r){return er.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&&er.root)throw new er.ErrnoError(10);if(!o&&!i){var a=er.lookupPath(e,{follow_mount:!1});if(e=a.path,n=a.node,er.isMountpoint(n))throw new er.ErrnoError(10);if(!er.isDir(n.mode))throw new er.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?er.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var t=er.lookupPath(r,{follow_mount:!1});if(!er.isMountpoint(t.node))throw new er.ErrnoError(28);var e=t.node,n=e.mounted,o=er.getMounts(n);Object.keys(er.nameTable).forEach((function(r){for(var t=er.nameTable[r];t;){var e=t.name_next;-1!==o.indexOf(t.mount)&&er.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=er.lookupPath(r,{parent:!0}).node,o=K.basename(r);if(!o||"."===o||".."===o)throw new er.ErrnoError(28);var i=er.mayCreate(n,o);if(i)throw new er.ErrnoError(i);if(!n.node_ops.mknod)throw new er.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,er.mknod(r,t,0)},mkdir:function(r,t){return t=void 0!==t?t:511,t&=1023,t|=16384,er.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||[]):ur(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,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:e},s=er.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(){if(!er.forceLoadFile(s))throw new er.ErrnoError(29);return t.apply(null,arguments)}})),u.read=function(r,t,e,n,o){if(!er.forceLoadFile(s))throw new er.ErrnoError(29);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+4>>2]=0,_[e+8>>2]=n.ino,_[e+12>>2]=n.mode,_[e+16>>2]=n.nlink,_[e+20>>2]=n.uid,_[e+24>>2]=n.gid,_[e+28>>2]=n.rdev,_[e+32>>2]=0,Y=[n.size>>>0,(q=n.size,+O(q)>=1?q>0?(0|z(+T(q/4294967296),4294967295))>>>0:~~+j((q-+(~~q>>>0))/4294967296)>>>0:0)],_[e+40>>2]=Y[0],_[e+44>>2]=Y[1],_[e+48>>2]=4096,_[e+52>>2]=n.blocks,_[e+56>>2]=n.atime.getTime()/1e3|0,_[e+60>>2]=0,_[e+64>>2]=n.mtime.getTime()/1e3|0,_[e+68>>2]=0,_[e+72>>2]=n.ctime.getTime()/1e3|0,_[e+76>>2]=0,Y=[n.ino>>>0,(q=n.ino,+O(q)>=1?q>0?(0|z(+T(q/4294967296),4294967295))>>>0:~~+j((q-+(~~q>>>0))/4294967296)>>>0:0)],_[e+80>>2]=Y[0],_[e+84>>2]=Y[1],0},doMsync:function(r,t,e,n,o){var i=v.slice(r,r+e);er.msync(t,i,o,e,n)},doMkdir:function(r,t){return"/"===(r=K.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),er.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 er.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=er.readlink(r),o=Math.min(e,D(n)),i=y[t+o];return b(n,v,t,e+1),y[t+o]=i,o},doAccess:function(r,t){if(-8&t)return-28;var e;if(!(e=er.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&er.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=er.getStream(e);return n&&er.close(n),er.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,i=0;i>2],s=_[t+(8*i+4)>>2],u=er.read(r,y,a,s,n);if(u<0)return-1;if(o+=u,u>2],s=_[t+(8*i+4)>>2],u=er.write(r,y,a,s,n);if(u<0)return-1;o+=u}return o},varargs:0,get:function(r){return nr.varargs+=4,_[nr.varargs-4>>2]},getStr:function(){return k(nr.get())},getStreamFromFD:function(r){void 0===r&&(r=nr.get());var t=er.getStream(r);if(!t)throw new er.ErrnoError(8);return t},get64:function(){var r=nr.get();return nr.get(),r},getZero:function(){nr.get()}};function or(r){try{return c.grow(r-h.byteLength+65535>>16),S(c.buffer),1}catch(r){}}var ir={};function ar(){if(!ar.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",_:a||"./this.program"};for(var t in ir)r[t]=ir[t];var e=[];for(var t in r)e.push(t+"="+r[t]);ar.strings=e}return ar.strings}function sr(r,t){sr.array||(sr.array=[]);var e,n=sr.array;for(n.length=0;e=v[r++];)100===e||102===e?(t=t+7&-8,n.push(w[t>>3]),t+=8):(t=t+3&-4,n.push(_[t>>2]),t+=4);return n}function ur(r,t,e){var n=e>0?e:D(r)+1,o=new Array(n),i=b(r,o,0,o.length);return t&&(o.length=i),o}er.staticInit();var cr={h:function(r,t){nr.varargs=t;try{return Z}catch(r){return void 0!==er&&r instanceof er.ErrnoError||H(r),-r.errno}},e:function(){H()},a:function(r,t,e){var n=sr(t,e);return X[r].apply(null,n)},c:function(r,t,e){v.set(v.subarray(t,t+e),r)},d:function(r){var t=v.length;if(r>2147418112)return!1;for(var e,n,o=1;o<=4;o*=2){var i=t*(1+.2/o);if(i=Math.min(i,r+100663296),or(Math.min(2147418112,((e=Math.max(16777216,r,i))%(n=65536)>0&&(e+=n-e%n),e))))return!0}return!1},f:function(r,t){var e=ar(),n=0;return e.forEach((function(e,o){var i=t+n;_[r+4*o>>2]=i,function(r,t,e){for(var n=0;n>0]=r.charCodeAt(n);e||(y[t>>0]=0)}(e,i),n+=e.length+1})),0},g:function(r,t){var e=ar();_[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),_[t>>2]=n,0},j:function(r){try{var t=nr.getStreamFromFD(r);return er.close(t),0}catch(r){return void 0!==er&&r instanceof er.ErrnoError||H(r),r.errno}},i:function(r,t,e,n,o){try{var i=nr.getStreamFromFD(r),a=4294967296*e+(t>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(er.llseek(i,a,n),Y=[i.position>>>0,(q=i.position,+O(q)>=1?q>0?(0|z(+T(q/4294967296),4294967295))>>>0:~~+j((q-+(~~q>>>0))/4294967296)>>>0:0)],_[o>>2]=Y[0],_[o+4>>2]=Y[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){return void 0!==er&&r instanceof er.ErrnoError||H(r),r.errno}},b:function(r,t,e,n){try{var o=nr.getStreamFromFD(r),i=nr.doWritev(o,t,e);return _[n>>2]=i,0}catch(r){return void 0!==er&&r instanceof er.ErrnoError||H(r),r.errno}},k:function(r){var t=Date.now();return _[r>>2]=t/1e3|0,_[r+4>>2]=t%1e3*1e3|0,0},memory:c,table:d},fr=function(){var r={a:cr};function t(r,t){var e=r.exports;n.asm=e,I()}function e(r){t(r.instance)}function o(t){return(u||"function"!=typeof fetch?new Promise((function(r,t){r(V())})):fetch(J,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+J+"'";return r.arrayBuffer()})).catch((function(){return V()}))).then((function(t){return WebAssembly.instantiate(t,r)})).then(t,(function(r){l("failed to asynchronously prepare wasm: "+r),H(r)}))}if(L(),n.instantiateWasm)try{return n.instantiateWasm(r,t)}catch(r){return l("Module.instantiateWasm callback failed with error: "+r),!1}return function(){if(u||"function"!=typeof WebAssembly.instantiateStreaming||U(J)||"function"!=typeof fetch)return o(e);fetch(J,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){l("wasm streaming compile failed: "+r),l("falling back to ArrayBuffer instantiation"),o(e)}))}))}(),{}}();n.asm=fr;var lr,dr=n.___wasm_call_ctors=function(){return(dr=n.___wasm_call_ctors=n.asm.l).apply(null,arguments)},pr=n._emscripten_bind_CExpat_CExpat_0=function(){return(pr=n._emscripten_bind_CExpat_CExpat_0=n.asm.m).apply(null,arguments)},mr=n._emscripten_bind_CExpat_create_0=function(){return(mr=n._emscripten_bind_CExpat_create_0=n.asm.n).apply(null,arguments)},hr=n._emscripten_bind_CExpat_destroy_0=function(){return(hr=n._emscripten_bind_CExpat_destroy_0=n.asm.o).apply(null,arguments)},yr=n._emscripten_bind_CExpat_parse_1=function(){return(yr=n._emscripten_bind_CExpat_parse_1=n.asm.p).apply(null,arguments)},vr=n._emscripten_bind_CExpat_tag_0=function(){return(vr=n._emscripten_bind_CExpat_tag_0=n.asm.q).apply(null,arguments)},_r=n._emscripten_bind_CExpat_attrs_0=function(){return(_r=n._emscripten_bind_CExpat_attrs_0=n.asm.r).apply(null,arguments)},wr=n._emscripten_bind_CExpat_content_0=function(){return(wr=n._emscripten_bind_CExpat_content_0=n.asm.s).apply(null,arguments)},gr=n._emscripten_bind_CExpat_startElement_0=function(){return(gr=n._emscripten_bind_CExpat_startElement_0=n.asm.t).apply(null,arguments)},Er=n._emscripten_bind_CExpat_endElement_0=function(){return(Er=n._emscripten_bind_CExpat_endElement_0=n.asm.u).apply(null,arguments)},kr=n._emscripten_bind_CExpat_characterData_0=function(){return(kr=n._emscripten_bind_CExpat_characterData_0=n.asm.v).apply(null,arguments)},br=n._emscripten_bind_CExpat___destroy___0=function(){return(br=n._emscripten_bind_CExpat___destroy___0=n.asm.w).apply(null,arguments)},Dr=n._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Dr=n._emscripten_bind_CExpatJS_CExpatJS_0=n.asm.x).apply(null,arguments)},Sr=n._emscripten_bind_CExpatJS_startElement_0=function(){return(Sr=n._emscripten_bind_CExpatJS_startElement_0=n.asm.y).apply(null,arguments)},Fr=n._emscripten_bind_CExpatJS_endElement_0=function(){return(Fr=n._emscripten_bind_CExpatJS_endElement_0=n.asm.z).apply(null,arguments)},Pr=n._emscripten_bind_CExpatJS_characterData_0=function(){return(Pr=n._emscripten_bind_CExpatJS_characterData_0=n.asm.A).apply(null,arguments)},xr=n._emscripten_bind_CExpatJS___destroy___0=function(){return(xr=n._emscripten_bind_CExpatJS___destroy___0=n.asm.B).apply(null,arguments)},Ar=n._emscripten_bind_VoidPtr___destroy___0=function(){return(Ar=n._emscripten_bind_VoidPtr___destroy___0=n.asm.C).apply(null,arguments)},Mr=n._malloc=function(){return(Mr=n._malloc=n.asm.D).apply(null,arguments)};function Cr(r){function t(){lr||(lr=!0,p||(R=!0,n.noFSInit||er.init.initialized||er.init(),rr.init(),P(A),er.ignorePermissions=!1,P(M),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)r=n.postRun.shift(),C.unshift(r);var r;P(C)}()))}B>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)r=n.preRun.shift(),x.unshift(r);var r;P(x)}(),B>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}if(n._free=function(){return(n._free=n.asm.E).apply(null,arguments)},n.___errno_location=function(){return(n.___errno_location=n.asm.F).apply(null,arguments)},n.stackAlloc=function(){return(n.stackAlloc=n.asm.G).apply(null,arguments)},n.dynCall_vi=function(){return(n.dynCall_vi=n.asm.H).apply(null,arguments)},n.asm=fr,n.then=function(r){if(lr)r(n);else{var t=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){t&&t(),r(n)}}return n},N=function r(){lr||Cr(),lr||(N=r)},n.run=Cr,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function Rr(){}function Or(r){return(r||Rr).__cache__}function jr(r,t){var e=Or(t),n=e[r];return n||((n=Object.create((t||Rr).prototype)).ptr=r,e[r]=n)}Cr(),Rr.prototype=Object.create(Rr.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},n.WrapperObject=Rr,n.getCache=Or,n.wrapPointer=jr,n.castObject=function(r,t){return jr(r.ptr,t)},n.NULL=jr(0),n.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete Or(r.__class__)[r.ptr]},n.compare=function(r,t){return r.ptr===t.ptr},n.getPointer=function(r){return r.ptr},n.getClass=function(r){return r.__class__};var Tr,zr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(zr.needed){for(var r=0;r=zr.size?(m(i>0),zr.needed+=i,e=n._malloc(i),zr.temps.push(e)):(e=zr.buffer+zr.pos,zr.pos+=i),e},copy:function(r,t,e){var n=e;switch(t.BYTES_PER_ELEMENT){case 2:n>>=1;break;case 4:n>>=2;break;case 8:n>>=3}for(var o=0;o=n);)++o;if(o-t>16&&r.subarray&&S)return S.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 P(r,t){return r?F(E,r,t):""}function x(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 M(r){w=r,n.HEAP8=g=new Int8Array(r),n.HEAP16=k=new Int16Array(r),n.HEAP32=b=new Int32Array(r),n.HEAPU8=E=new Uint8Array(r),n.HEAPU16=new Uint16Array(r),n.HEAPU32=new Uint32Array(r),n.HEAPF32=new Float32Array(r),n.HEAPF64=D=new Float64Array(r)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var C=n.TOTAL_MEMORY||16777216;function R(r){for(;r.length>0;){var t=r.shift();if("function"!=typeof t){var e=t.func;"number"==typeof e?void 0===t.arg?n.dynCall_v(e):n.dynCall_vi(e,t.arg):e(void 0===t.arg?null:t.arg)}else t()}}(p=n.wasmMemory?n.wasmMemory:new WebAssembly.Memory({initial:C/65536}))&&(w=p.buffer),C=w.byteLength,M(w),b[54044]=5459216;var O=[],j=[],T=[],z=[],B=!1,N=Math.abs,L=Math.ceil,I=Math.floor,H=Math.min,U=0,W=null;function q(r){U++,n.monitorRunDependencies&&n.monitorRunDependencies(U)}function Y(r){if(U--,n.monitorRunDependencies&&n.monitorRunDependencies(U),0==U&&W){var t=W;W=null,t()}}function J(r){throw n.onAbort&&n.onAbort(r),c(r+=""),f(r),v=!0,r="abort("+r+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(r)}function V(r){return String.prototype.startsWith?r.startsWith("data:application/octet-stream;base64,"):0===r.indexOf("data:application/octet-stream;base64,")}n.preloadedImages={},n.preloadedAudios={};var X,G,Z,K="graphvizlib.wasm";function $(){try{if(l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}catch(r){J(r)}}V(K)||(X=K,K=n.locateFile?n.locateFile(X,u):u+X);var Q={1088:function(r,t){var e=P(r),n=P(t);sr.createPath("/",nr.dirname(e)),sr.writeFile(nr.join("/",e),n)}};function rr(){var r=function(){var r=new Error;if(!r.stack){try{throw new Error}catch(t){r=t}if(!r.stack)return"(no stack trace available)"}return r.stack.toString()}();return n.extraStackTrace&&(r+="\n"+n.extraStackTrace()),r.replace(/\b_Z[\w\d_]+/g,(function(r){return r==r?r:r+" ["+r+"]"}))}function tr(){J()}function er(r){return n.___errno_location&&(b[n.___errno_location()>>2]=r),r}j.push({func:function(){Fr()}});var nr={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=nr.normalizeArray(r.split("/").filter((function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:function(r){var t=nr.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.lastIndexOf("/");return-1===t?r:r.substr(t+1)},extname:function(r){return nr.splitPath(r)[3]},join:function(){var r=Array.prototype.slice.call(arguments,0);return nr.normalize(r.join("/"))},join2:function(r,t){return nr.normalize(r+"/"+t)}},or={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:sr.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=nr.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=or.resolve(r).substr(1),t=or.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&&(c(F(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(f(F(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},flush:function(r){r.output&&r.output.length>0&&(f(F(r.output,0)),r.output=[])}}},ar={ops_table:null,mount:function(r){return ar.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(sr.isBlkdev(e)||sr.isFIFO(e))throw new sr.ErrnoError(63);ar.ops_table||(ar.ops_table={dir:{node:{getattr:ar.node_ops.getattr,setattr:ar.node_ops.setattr,lookup:ar.node_ops.lookup,mknod:ar.node_ops.mknod,rename:ar.node_ops.rename,unlink:ar.node_ops.unlink,rmdir:ar.node_ops.rmdir,readdir:ar.node_ops.readdir,symlink:ar.node_ops.symlink},stream:{llseek:ar.stream_ops.llseek}},file:{node:{getattr:ar.node_ops.getattr,setattr:ar.node_ops.setattr},stream:{llseek:ar.stream_ops.llseek,read:ar.stream_ops.read,write:ar.stream_ops.write,allocate:ar.stream_ops.allocate,mmap:ar.stream_ops.mmap,msync:ar.stream_ops.msync}},link:{node:{getattr:ar.node_ops.getattr,setattr:ar.node_ops.setattr,readlink:ar.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ar.node_ops.getattr,setattr:ar.node_ops.setattr},stream:sr.chrdev_stream_ops}});var o=sr.createNode(r,t,e,n);return sr.isDir(o.mode)?(o.node_ops=ar.ops_table.dir.node,o.stream_ops=ar.ops_table.dir.stream,o.contents={}):sr.isFile(o.mode)?(o.node_ops=ar.ops_table.file.node,o.stream_ops=ar.ops_table.file.stream,o.usedBytes=0,o.contents=null):sr.isLink(o.mode)?(o.node_ops=ar.ops_table.link.node,o.stream_ops=ar.ops_table.link.stream):sr.isChrdev(o.mode)&&(o.node_ops=ar.ops_table.chrdev.node,o.stream_ops=ar.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o),o},getFileDataAsRegularArray:function(r){if(r.contents&&r.contents.subarray){for(var t=[],e=0;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)return r.contents=null,void(r.usedBytes=0);if(!r.contents||r.contents.subarray){var e=r.contents;return r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),void(r.usedBytes=t)}if(r.contents||(r.contents=[]),r.contents.length>t)r.contents.length=t;else for(;r.contents.length=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||o+n8)throw new sr.ErrnoError(32);for(var o=nr.normalizeArray(r.split("/").filter((function(r){return!!r})),!1),i=sr.root,a="/",s=0;s40)throw new sr.ErrnoError(32)}}return{path:a,node:i}},getPath:function(r){for(var t;;){if(sr.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)%sr.nameTable.length},hashAddNode:function(r){var t=sr.hashName(r.parent.id,r.name);r.name_next=sr.nameTable[t],sr.nameTable[t]=r},hashRemoveNode:function(r){var t=sr.hashName(r.parent.id,r.name);if(sr.nameTable[t]===r)sr.nameTable[t]=r.name_next;else for(var e=sr.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=sr.mayLookup(r);if(e)throw new sr.ErrnoError(e,r);for(var n=sr.hashName(r.id,t),o=sr.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===r.id&&i===t)return o}return sr.lookup(r,t)},createNode:function(r,t,e,n){sr.FSNode||(sr.FSNode=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=sr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},sr.FSNode.prototype={},Object.defineProperties(sr.FSNode.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return sr.isDir(this.mode)}},isDevice:{get:function(){return sr.isChrdev(this.mode)}}}));var o=new sr.FSNode(r,t,e,n);return sr.hashAddNode(o),o},destroyNode:function(r){sr.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,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(r){var t=sr.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 sr.ignorePermissions||(-1===t.indexOf("r")||292&r.mode)&&(-1===t.indexOf("w")||146&r.mode)&&(-1===t.indexOf("x")||73&r.mode)?0:2},mayLookup:function(r){var t=sr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:function(r,t){try{return sr.lookupNode(r,t),20}catch(r){}return sr.nodePermissions(r,"wx")},mayDelete:function(r,t,e){var n;try{n=sr.lookupNode(r,t)}catch(r){return r.errno}var o=sr.nodePermissions(r,"wx");if(o)return o;if(e){if(!sr.isDir(n.mode))return 54;if(sr.isRoot(n)||sr.getPath(n)===sr.cwd())return 10}else if(sr.isDir(n.mode))return 31;return 0},mayOpen:function(r,t){return r?sr.isLink(r.mode)?32:sr.isDir(r.mode)&&("r"!==sr.flagsToPermissionString(t)||512&t)?31:sr.nodePermissions(r,sr.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(r,t){r=r||0,t=t||sr.MAX_OPEN_FDS;for(var e=r;e<=t;e++)if(!sr.streams[e])return e;throw new sr.ErrnoError(33)},getStream:function(r){return sr.streams[r]},createStream:function(r,t,e){sr.FSStream||(sr.FSStream=function(){},sr.FSStream.prototype={},Object.defineProperties(sr.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 sr.FSStream;for(var o in r)n[o]=r[o];r=n;var i=sr.nextfd(t,e);return r.fd=i,sr.streams[i]=r,r},closeStream:function(r){sr.streams[r]=null},chrdev_stream_ops:{open:function(r){var t=sr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:function(){throw new sr.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){sr.devices[r]={stream_ops:t}},getDevice:function(r){return sr.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),sr.syncFSRequests++,sr.syncFSRequests>1&&f("warning: "+sr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=sr.getMounts(sr.root.mount),n=0;function o(r){return sr.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&&sr.root)throw new sr.ErrnoError(10);if(!o&&!i){var a=sr.lookupPath(e,{follow_mount:!1});if(e=a.path,n=a.node,sr.isMountpoint(n))throw new sr.ErrnoError(10);if(!sr.isDir(n.mode))throw new sr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?sr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(r){var t=sr.lookupPath(r,{follow_mount:!1});if(!sr.isMountpoint(t.node))throw new sr.ErrnoError(28);var e=t.node,n=e.mounted,o=sr.getMounts(n);Object.keys(sr.nameTable).forEach((function(r){for(var t=sr.nameTable[r];t;){var e=t.name_next;-1!==o.indexOf(t.mount)&&sr.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=sr.lookupPath(r,{parent:!0}).node,o=nr.basename(r);if(!o||"."===o||".."===o)throw new sr.ErrnoError(28);var i=sr.mayCreate(n,o);if(i)throw new sr.ErrnoError(i);if(!n.node_ops.mknod)throw new sr.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,sr.mknod(r,t,0)},mkdir:function(r,t){return t=void 0!==t?t:511,t&=1023,t|=16384,sr.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||[]):kr(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,c("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=sr.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(){if(!sr.forceLoadFile(s))throw new sr.ErrnoError(29);return t.apply(null,arguments)}})),u.read=function(r,t,e,n,o){if(!sr.forceLoadFile(s))throw new sr.ErrnoError(29);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,b[e+4>>2]=0,b[e+8>>2]=n.ino,b[e+12>>2]=n.mode,b[e+16>>2]=n.nlink,b[e+20>>2]=n.uid,b[e+24>>2]=n.gid,b[e+28>>2]=n.rdev,b[e+32>>2]=0,Z=[n.size>>>0,(G=n.size,+N(G)>=1?G>0?(0|H(+I(G/4294967296),4294967295))>>>0:~~+L((G-+(~~G>>>0))/4294967296)>>>0:0)],b[e+40>>2]=Z[0],b[e+44>>2]=Z[1],b[e+48>>2]=4096,b[e+52>>2]=n.blocks,b[e+56>>2]=n.atime.getTime()/1e3|0,b[e+60>>2]=0,b[e+64>>2]=n.mtime.getTime()/1e3|0,b[e+68>>2]=0,b[e+72>>2]=n.ctime.getTime()/1e3|0,b[e+76>>2]=0,Z=[n.ino>>>0,(G=n.ino,+N(G)>=1?G>0?(0|H(+I(G/4294967296),4294967295))>>>0:~~+L((G-+(~~G>>>0))/4294967296)>>>0:0)],b[e+80>>2]=Z[0],b[e+84>>2]=Z[1],0},doMsync:function(r,t,e,n,o){var i=E.slice(r,r+e);sr.msync(t,i,o,e,n)},doMkdir:function(r,t){return"/"===(r=nr.normalize(r))[r.length-1]&&(r=r.substr(0,r.length-1)),sr.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 sr.mknod(r,t,e),0},doReadlink:function(r,t,e){if(e<=0)return-28;var n=sr.readlink(r),o=Math.min(e,A(n)),i=g[t+o];return x(n,E,t,e+1),g[t+o]=i,o},doAccess:function(r,t){if(-8&t)return-28;var e;if(!(e=sr.lookupPath(r,{follow:!0}).node))return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&sr.nodePermissions(e,n)?-2:0},doDup:function(r,t,e){var n=sr.getStream(e);return n&&sr.close(n),sr.open(r,t,0,e,e).fd},doReadv:function(r,t,e,n){for(var o=0,i=0;i>2],s=b[t+(8*i+4)>>2],u=sr.read(r,g,a,s,n);if(u<0)return-1;if(o+=u,u>2],s=b[t+(8*i+4)>>2],u=sr.write(r,g,a,s,n);if(u<0)return-1;o+=u}return o},varargs:0,get:function(r){return ur.varargs+=4,b[ur.varargs-4>>2]},getStr:function(){return P(ur.get())},getStreamFromFD:function(r){void 0===r&&(r=ur.get());var t=sr.getStream(r);if(!t)throw new sr.ErrnoError(8);return t},get64:function(){var r=ur.get();return ur.get(),r},getZero:function(){ur.get()}};function cr(r,t,e){t|=0;var n,o=0,i=0,a=0;if(n=(r|=0)+(e|=0)|0,t&=255,(0|e)>=67){for(;0!=(3&r);)g[r>>0]=t,r=r+1|0;for(a=t|t<<8|t<<16|t<<24,i=(o=-4&n|0)-64|0;(0|r)<=(0|i);)b[r>>2]=a,b[r+4>>2]=a,b[r+8>>2]=a,b[r+12>>2]=a,b[r+16>>2]=a,b[r+20>>2]=a,b[r+24>>2]=a,b[r+28>>2]=a,b[r+32>>2]=a,b[r+36>>2]=a,b[r+40>>2]=a,b[r+44>>2]=a,b[r+48>>2]=a,b[r+52>>2]=a,b[r+56>>2]=a,b[r+60>>2]=a,r=r+64|0;for(;(0|r)<(0|o);)b[r>>2]=a,r=r+4|0}for(;(0|r)<(0|n);)g[r>>0]=t,r=r+1|0;return n-e|0}var fr=42,lr=0;function dr(r){try{return p.grow(r-w.byteLength+65535>>16),M(p.buffer),1}catch(r){}}var pr={};function mr(){if(!mr.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",_:a||"./this.program"};for(var t in pr)r[t]=pr[t];var e=[];for(var t in r)e.push(t+"="+r[t]);mr.strings=e}return mr.strings}function hr(r){return r%4==0&&(r%100!=0||r%400==0)}function yr(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}var vr=[31,29,31,30,31,30,31,31,30,31,30,31],_r=[31,28,31,30,31,30,31,31,30,31,30,31];function wr(r,t){for(var e=new Date(r.getTime());t>0;){var n=hr(e.getFullYear()),o=e.getMonth(),i=(n?vr:_r)[o];if(!(t>i-e.getDate()))return e.setDate(e.getDate()+t),e;t-=i-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}function gr(r,t,e,n){var o=b[n+40>>2],i={tm_sec:b[n>>2],tm_min:b[n+4>>2],tm_hour:b[n+8>>2],tm_mday:b[n+12>>2],tm_mon:b[n+16>>2],tm_year:b[n+20>>2],tm_wday:b[n+24>>2],tm_yday:b[n+28>>2],tm_isdst:b[n+32>>2],tm_gmtoff:b[n+36>>2],tm_zone:o?P(o):""},a=P(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function m(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function h(r){var t=wr(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(e),i=m(n);return p(o,t)<=0?p(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var y={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return h(r).toString().substring(2)},"%G":function(r){return h(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+yr(hr(r.tm_year+1900)?vr:_r,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=new Date(r.tm_year+1900,0,1),e=0===t.getDay()?t:wr(t,7-t.getDay()),n=new Date(r.tm_year+1900,r.tm_mon,r.tm_mday);if(p(e,n)<0){var o=yr(hr(n.getFullYear())?vr:_r,n.getMonth()-1)-31,i=31-e.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(e,t)?"01":"00"},"%V":function(r){var t,e=new Date(r.tm_year+1900,0,4),n=new Date(r.tm_year+1901,0,4),o=m(e),i=m(n),a=wr(new Date(r.tm_year+1900,0,1),r.tm_yday);return p(a,o)<0?"53":p(i,a)<=0?"01":(t=o.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in y)a.indexOf(u)>=0&&(a=a.replace(new RegExp(u,"g"),y[u](i)));var v=kr(a,!1);return v.length>t?0:(function(r,t){g.set(r,t)}(v,r),v.length-1)}function Er(r,t){Er.array||(Er.array=[]);var e,n=Er.array;for(n.length=0;e=E[r++];)100===e||102===e?(t=t+7&-8,n.push(D[t>>3]),t+=8):(t=t+3&-4,n.push(b[t>>2]),t+=4);return n}function kr(r,t,e){var n=e>0?e:A(r)+1,o=new Array(n),i=x(r,o,0,o.length);return t&&(o.length=i),o}tr=function(){return performance.now()},sr.staticInit();var br={M:function(r,t){return function(r,t){var e;if(0===r)e=Date.now();else{if(1!==r&&4!==r)return er(28),-1;e=tr()}return b[t>>2]=e/1e3|0,b[t+4>>2]=e%1e3*1e3*1e3|0,0}(r,t)},k:function(r){return Rr(r)},j:function(r,t,e){throw"uncaught_exception"in zr?zr.uncaught_exceptions++:zr.uncaught_exceptions=1,r},q:function(){},U:function(r,t){return er(63),-1},P:function(r,t){ur.varargs=t;try{var e=ur.getStr();return sr.unlink(e),0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},R:function(r,t){ur.varargs=t;try{return function(r,t,e,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&r%16384!=0)return-28;if(0!=(32&n)){if(!(a=Br(16384,t)))return-48;cr(a,0,t),s=!0}else{var u=sr.getStream(o);if(!u)return-8;var c=sr.mmap(u,E,r,t,i,e,n);a=c.ptr,s=c.allocated}return ur.mappings[a]={malloc:a,len:t,allocated:s,fd:o,flags:n,offset:i},a}(ur.get(),ur.get(),ur.get(),ur.get(),ur.get(),ur.get())}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},S:function(r,t){ur.varargs=t;try{var e=ur.getStr(),n=ur.get();return ur.doStat(sr.stat,e,n)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},T:function(r,t){ur.varargs=t;try{var e=ur.getStreamFromFD(),n=ur.get();return ur.doStat(sr.stat,e.path,n)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},L:function(r,t){ur.varargs=t;try{return fr}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},y:function(r,t){ur.varargs=t;try{var e=ur.getStreamFromFD();switch(ur.get()){case 0:return(n=ur.get())<0?-28:sr.open(e.path,e.flags,0,n).fd;case 1:case 2:return 0;case 3:return e.flags;case 4:var n=ur.get();return e.flags|=n,0;case 12:return n=ur.get(),k[n+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return er(28),-1;default:return-28}}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},K:function(r,t){ur.varargs=t;try{var e=ur.getStr(),n=ur.get();return ur.doAccess(e,n)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},z:function(r,t){ur.varargs=t;try{var e=ur.getStr(),n=ur.get(),o=ur.get();return sr.open(e,n,o).fd}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},O:function(r,t){ur.varargs=t;try{var e=ur.getStreamFromFD(),n=ur.get();switch(n){case 21509:case 21505:return e.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return e.tty?0:-59;case 21519:if(!e.tty)return-59;var o=ur.get();return b[o>>2]=0,0;case 21520:return e.tty?-28:-59;case 21531:return o=ur.get(),sr.ioctl(e,n,o);case 21523:case 21524:return e.tty?0:-59;default:J("bad ioctl syscall "+n)}}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},Q:function(r,t){ur.varargs=t;try{return function(r,t){if(-1===r||0===t)return-28;var e=ur.mappings[r];if(!e)return 0;if(t===e.len){var n=sr.getStream(e.fd);ur.doMsync(r,n,t,e.flags,e.offset),sr.munmap(n),ur.mappings[r]=null,e.allocated&&Or(e.malloc)}return 0}(ur.get(),ur.get())}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),-r.errno}},m:function(){},w:function(){J()},C:function(r,t,e){var n=Er(t,e);return Q[r].apply(null,n)},d:function(r,t){!function(r,t){throw Tr(r,t||1),"longjmp"}(r,t)},E:function(r,t,e){E.set(E.subarray(t,t+e),r)},F:function(r){var t=E.length;if(r>2147418112)return!1;for(var e,n,o=1;o<=4;o*=2){var i=t*(1+.2/o);if(i=Math.min(i,r+100663296),dr(Math.min(2147418112,((e=Math.max(16777216,r,i))%(n=65536)>0&&(e+=n-e%n),e))))return!0}return!1},I:function(r,t){var e=mr(),n=0;return e.forEach((function(e,o){var i=t+n;b[r+4*o>>2]=i,function(r,t,e){for(var n=0;n>0]=r.charCodeAt(n);e||(g[t>>0]=0)}(e,i),n+=e.length+1})),0},J:function(r,t){var e=mr();b[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),b[t>>2]=n,0},l:function(r){!function(r,t){t&&d&&0===r||(d||(v=!0,n.onExit&&n.onExit(r)),s(r,new rt(r)))}(r)},p:function(r){try{var t=ur.getStreamFromFD(r);return sr.close(t),0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},H:function(r,t){try{var e=ur.getStreamFromFD(r),n=e.tty?2:sr.isDir(e.mode)?3:sr.isLink(e.mode)?7:4;return g[t>>0]=n,0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},N:function(r,t,e,n){try{var o=ur.getStreamFromFD(r),i=ur.doReadv(o,t,e);return b[n>>2]=i,0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},D:function(r,t,e,n,o){try{var i=ur.getStreamFromFD(r),a=4294967296*e+(t>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(sr.llseek(i,a,n),Z=[i.position>>>0,(G=i.position,+N(G)>=1?G>0?(0|H(+I(G/4294967296),4294967295))>>>0:~~+L((G-+(~~G>>>0))/4294967296)>>>0:0)],b[o>>2]=Z[0],b[o+4>>2]=Z[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},x:function(r,t,e,n){try{var o=ur.getStreamFromFD(r),i=ur.doWritev(o,t,e);return b[n>>2]=i,0}catch(r){return void 0!==sr&&r instanceof sr.ErrnoError||J(r),r.errno}},a:function(){return 0|m},X:function(r){var t=Date.now();return b[r>>2]=t/1e3|0,b[r+4>>2]=t%1e3*1e3|0,0},Y:function(r){var t=$r();try{return Zr(r)}catch(r){if(Qr(t),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},V:function(r,t){var e=$r();try{return Kr(r,t)}catch(r){if(Qr(e),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},v:function(r){var t=$r();try{return qr(r)}catch(r){if(Qr(t),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},f:function(r,t){var e=$r();try{return Yr(r,t)}catch(r){if(Qr(e),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},e:function(r,t,e){var n=$r();try{return Jr(r,t,e)}catch(r){if(Qr(n),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},g:function(r,t,e,n){var o=$r();try{return Vr(r,t,e,n)}catch(r){if(Qr(o),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},n:function(r,t,e,n,o){var i=$r();try{return Xr(r,t,e,n,o)}catch(r){if(Qr(i),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},W:function(r,t,e,n,o,i,a){var s=$r();try{return Gr(r,t,e,n,o,i,a)}catch(r){if(Qr(s),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},s:function(r){var t=$r();try{Nr(r)}catch(r){if(Qr(t),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},h:function(r,t){var e=$r();try{Lr(r,t)}catch(r){if(Qr(e),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},o:function(r,t,e){var n=$r();try{Ir(r,t,e)}catch(r){if(Qr(n),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},u:function(r,t,e,n){var o=$r();try{Hr(r,t,e,n)}catch(r){if(Qr(o),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},t:function(r,t,e,n,o){var i=$r();try{Ur(r,t,e,n,o)}catch(r){if(Qr(i),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},r:function(r,t,e,n,o,i){var a=$r();try{Wr(r,t,e,n,o,i)}catch(r){if(Qr(a),r!==r+0&&"longjmp"!==r)throw r;Tr(1,0)}},memory:p,i:function r(t,e,n,o){e|=0,n|=0,o|=0;var i=0;for(lr=lr+1|0,b[(t|=0)>>2]=lr;(0|i)<(0|o);){if(0==(0|b[n+(i<<3)>>2]))return b[n+(i<<3)>>2]=lr,b[n+(4+(i<<3))>>2]=e,b[n+(8+(i<<3))>>2]=0,h(0|o),0|n;i=i+1|0}return n=0|r(0|t,0|e,0|(n=0|jr(0|n,8*(1+(o=2*o|0)|0)|0)),0|o),h(0|o),0|n},b:function(r){h(0|r)},G:function(r,t,e,n){return gr(r,t,e,n)},table:y,c:function(r,t,e){r|=0,t|=0,e|=0;for(var n=0,o=0;(0|n)<(0|e)&&0!=(0|(o=0|b[t+(n<<3)>>2]));){if((0|o)==(0|r))return 0|b[t+(4+(n<<3))>>2];n=n+1|0}return 0},A:function(r){var t=Date.now()/1e3|0;return r&&(b[r>>2]=t),t},B:function(r){return 0!==r&&cr(r,0,16),0}},Dr=function(){var r={a:br};function t(r,t){var e=r.exports;n.asm=e,Y()}function e(r){t(r.instance)}function o(t){return(l||"function"!=typeof fetch?new Promise((function(r,t){r($())})):fetch(K,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+K+"'";return r.arrayBuffer()})).catch((function(){return $()}))).then((function(t){return WebAssembly.instantiate(t,r)})).then(t,(function(r){f("failed to asynchronously prepare wasm: "+r),J(r)}))}if(q(),n.instantiateWasm)try{return n.instantiateWasm(r,t)}catch(r){return f("Module.instantiateWasm callback failed with error: "+r),!1}return function(){if(l||"function"!=typeof WebAssembly.instantiateStreaming||V(K)||"function"!=typeof fetch)return o(e);fetch(K,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(r){f("wasm streaming compile failed: "+r),f("falling back to ArrayBuffer instantiation"),o(e)}))}))}(),{}}();n.asm=Dr;var Sr,Fr=n.___wasm_call_ctors=function(){return(Fr=n.___wasm_call_ctors=n.asm.Z).apply(null,arguments)},Pr=n._emscripten_bind_VoidPtr___destroy___0=function(){return(Pr=n._emscripten_bind_VoidPtr___destroy___0=n.asm._).apply(null,arguments)},xr=n._emscripten_bind_Main_layout_3=function(){return(xr=n._emscripten_bind_Main_layout_3=n.asm.$).apply(null,arguments)},Ar=n._emscripten_bind_Main_lastError_0=function(){return(Ar=n._emscripten_bind_Main_lastError_0=n.asm.aa).apply(null,arguments)},Mr=n._emscripten_bind_Main_createFile_2=function(){return(Mr=n._emscripten_bind_Main_createFile_2=n.asm.ba).apply(null,arguments)},Cr=n._emscripten_bind_Main___destroy___0=function(){return(Cr=n._emscripten_bind_Main___destroy___0=n.asm.ca).apply(null,arguments)},Rr=n._malloc=function(){return(Rr=n._malloc=n.asm.da).apply(null,arguments)},Or=n._free=function(){return(Or=n._free=n.asm.ea).apply(null,arguments)},jr=n._realloc=function(){return(jr=n._realloc=n.asm.fa).apply(null,arguments)},Tr=(n.___errno_location=function(){return(n.___errno_location=n.asm.ga).apply(null,arguments)},n._setThrew=function(){return(Tr=n._setThrew=n.asm.ha).apply(null,arguments)}),zr=n.__ZSt18uncaught_exceptionv=function(){return(zr=n.__ZSt18uncaught_exceptionv=n.asm.ia).apply(null,arguments)},Br=n._memalign=function(){return(Br=n._memalign=n.asm.ja).apply(null,arguments)},Nr=n.dynCall_v=function(){return(Nr=n.dynCall_v=n.asm.ka).apply(null,arguments)},Lr=n.dynCall_vi=function(){return(Lr=n.dynCall_vi=n.asm.la).apply(null,arguments)},Ir=n.dynCall_vii=function(){return(Ir=n.dynCall_vii=n.asm.ma).apply(null,arguments)},Hr=n.dynCall_viii=function(){return(Hr=n.dynCall_viii=n.asm.na).apply(null,arguments)},Ur=n.dynCall_viiii=function(){return(Ur=n.dynCall_viiii=n.asm.oa).apply(null,arguments)},Wr=n.dynCall_viiiii=function(){return(Wr=n.dynCall_viiiii=n.asm.pa).apply(null,arguments)},qr=n.dynCall_i=function(){return(qr=n.dynCall_i=n.asm.qa).apply(null,arguments)},Yr=n.dynCall_ii=function(){return(Yr=n.dynCall_ii=n.asm.ra).apply(null,arguments)},Jr=n.dynCall_iii=function(){return(Jr=n.dynCall_iii=n.asm.sa).apply(null,arguments)},Vr=n.dynCall_iiii=function(){return(Vr=n.dynCall_iiii=n.asm.ta).apply(null,arguments)},Xr=n.dynCall_iiiii=function(){return(Xr=n.dynCall_iiiii=n.asm.ua).apply(null,arguments)},Gr=n.dynCall_iiiiiii=function(){return(Gr=n.dynCall_iiiiiii=n.asm.va).apply(null,arguments)},Zr=n.dynCall_d=function(){return(Zr=n.dynCall_d=n.asm.wa).apply(null,arguments)},Kr=n.dynCall_di=function(){return(Kr=n.dynCall_di=n.asm.xa).apply(null,arguments)},$r=n.stackSave=function(){return($r=n.stackSave=n.asm.ya).apply(null,arguments)},Qr=(n.stackAlloc=function(){return(n.stackAlloc=n.asm.za).apply(null,arguments)},n.stackRestore=function(){return(Qr=n.stackRestore=n.asm.Aa).apply(null,arguments)});function rt(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function tt(r){function t(){Sr||(Sr=!0,v||(B=!0,n.noFSInit||sr.init.initialized||sr.init(),ir.init(),R(j),sr.ignorePermissions=!1,R(T),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)r=n.postRun.shift(),z.unshift(r);var r;R(z)}()))}U>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)r=n.preRun.shift(),O.unshift(r);var r;R(O)}(),U>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}if(n.asm=Dr,n.then=function(r){if(Sr)r(n);else{var t=n.onRuntimeInitialized;n.onRuntimeInitialized=function(){t&&t(),r(n)}}return n},W=function r(){Sr||tt(),Sr||(W=r)},n.run=tt,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();function et(){}function nt(r){return(r||et).__cache__}function ot(r,t){var e=nt(t),n=e[r];return n||((n=Object.create((t||et).prototype)).ptr=r,e[r]=n)}d=!0,tt(),et.prototype=Object.create(et.prototype),et.prototype.constructor=et,et.prototype.__class__=et,et.__cache__={},n.WrapperObject=et,n.getCache=nt,n.wrapPointer=ot,n.castObject=function(r,t){return ot(r.ptr,t)},n.NULL=ot(0),n.destroy=function(r){if(!r.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";r.__destroy__(),delete nt(r.__class__)[r.ptr]},n.compare=function(r,t){return r.ptr===t.ptr},n.getPointer=function(r){return r.ptr},n.getClass=function(r){return r.__class__};var it,at={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(at.needed){for(var r=0;r=at.size?(_(i>0),at.needed+=i,e=n._malloc(i),at.temps.push(e)):(e=at.buffer+at.pos,at.pos+=i),e},copy:function(r,t,e){var n=e;switch(t.BYTES_PER_ELEMENT){case 2:n>>=1;break;case 4:n>>=2;break;case 8:n>>=3}for(var o=0;o\n\n'}}function h(r,t){var e,n=d({images:[],files:[]},t);p(n.files,(e=n.images,e.map(m))).forEach((function(t){return r.Main.prototype.createFile(t.path,t.data)}))}var y={layout:function(r,t,e,n){return void 0===t&&(t="svg"),void 0===e&&(e="dot"),r?a(l).then((function(o){h(o,n);var i=o.Main.prototype.layout(r,t,e);if(!i)throw new Error(o.Main.prototype.lastError());return i})):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)},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)}},v=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"";h(this._wasm,n);var o=this._wasm.Main.prototype.layout(r,t,e);if(!o)throw new Error(this._wasm.Main.prototype.lastError());return o},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.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.StackParser=u,r.graphviz=y,r.graphvizSync=function(){return a(l).then((function(r){return new v(r)}))},r.parse=c,r.wasmFolder=i,Object.defineProperty(r,"__esModule",{value:!0})}));