!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=e(t((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}))),n=t((function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),o=e(n),i=t((function(e){var t=n.default;e.exports=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports}));e(i);var a=t((function(e){var t=n.default;e.exports=function(e){var r=i(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports}));e(a);var s=e(t((function(e){function t(e,t){for(var r=0;r1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",(function(e){if(!(e instanceof te))throw e})),process.on("unhandledRejection",(function(e){throw e})),e.inspect=function(){return"[Emscripten Module object]"}):(p||h)&&(h?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),l&&(v=l),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"",n=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(a=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),i=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var y=e.print||console.log.bind(console),g=e.printErr||console.warn.bind(console);Object.assign(e,f),f=null,e.arguments&&e.arguments,e.thisProgram&&(d=e.thisProgram),e.quit&&e.quit;var w,_,b=4;e.wasmBinary&&(w=e.wasmBinary),e.noExitRuntime,"object"!=("undefined"==typeof WebAssembly?"undefined":o(WebAssembly))&&q("no native wasm support detected");var E=!1;function k(e,t){e||q(t)}var P,T,C,S,D,F,A,x,j,M,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function $(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&O)return O.decode(e.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 R(e,t){return e?$(C,e,t):""}function B(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function W(e){for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t}e.INITIAL_MEMORY;var z=[],N=[],U=[],I=0,L=null;function H(t){I++,e.monitorRunDependencies&&e.monitorRunDependencies(I)}function V(t){if(I--,e.monitorRunDependencies&&e.monitorRunDependencies(I),0==I&&L){var r=L;L=null,r()}}function q(t){e.onAbort&&e.onAbort(t),g(t="Aborted("+t+")"),E=!0,t+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(t);throw r(n),n}var Y,X,G,J,K="data:application/octet-stream;base64,";function Z(e){return e.startsWith(K)}function Q(e){return e.startsWith("file://")}function ee(e){try{if(e==Y&&w)return new Uint8Array(w);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}catch(e){q(e)}}function te(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function re(t){for(;t.length>0;)t.shift()(e)}function ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){A[this.ptr+4>>2]=e},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(e){A[this.ptr+8>>2]=e},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(e){F[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,T[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=T[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,T[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=T[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=F[this.ptr>>2];F[this.ptr>>2]=e+1},this.release_ref=function(){var e=F[this.ptr>>2];return F[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){A[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(ar(this.get_type()))return A[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}e.locateFile?Z(Y="jessibuca-pro-object-detector-decoder.wasm")||(X=Y,Y=e.locateFile?e.locateFile(X,v):v+X):Y=new URL("jessibuca-pro-object-detector-decoder.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("jessibuca-pro-object-detector-demo.js",document.baseURI).href).toString();var oe={isAbs:function(e){return"/"===e.charAt(0)},splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t=oe.isAbs(e),r="/"===e.substr(-1);return(e=oe.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=oe.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=oe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return oe.normalize(e.join("/"))},join2:function(e,t){return oe.normalize(e+"/"+t)}},ie={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:fe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=oe.isAbs(n)}return(t?"/":"")+(e=oe.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ie.resolve(e).substr(1),t=ie.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s0?r:W(e)+1,o=new Array(n),i=B(e,o,0,o.length);return t&&(o.length=i),o}var se={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){se.ttys[e]={input:[],output:[],ops:t},fe.registerDevice(e,se.stream_ops)},stream_ops:{open:function(e){var t=se.ttys[e.node.rdev];if(!t)throw new fe.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new fe.ErrnoError(60);for(var i=0,a=0;a0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=ae(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(y($(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(y($(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(g($(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(g($(e.output,0)),e.output=[])}}};function ue(e){q()}var ce={ops_table:null,mount:function(e){return ce.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(fe.isBlkdev(r)||fe.isFIFO(r))throw new fe.ErrnoError(63);ce.ops_table||(ce.ops_table={dir:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,lookup:ce.node_ops.lookup,mknod:ce.node_ops.mknod,rename:ce.node_ops.rename,unlink:ce.node_ops.unlink,rmdir:ce.node_ops.rmdir,readdir:ce.node_ops.readdir,symlink:ce.node_ops.symlink},stream:{llseek:ce.stream_ops.llseek}},file:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:{llseek:ce.stream_ops.llseek,read:ce.stream_ops.read,write:ce.stream_ops.write,allocate:ce.stream_ops.allocate,mmap:ce.stream_ops.mmap,msync:ce.stream_ops.msync}},link:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,readlink:ce.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:fe.chrdev_stream_ops}});var o=fe.createNode(e,t,r,n);return fe.isDir(o.mode)?(o.node_ops=ce.ops_table.dir.node,o.stream_ops=ce.ops_table.dir.stream,o.contents={}):fe.isFile(o.mode)?(o.node_ops=ce.ops_table.file.node,o.stream_ops=ce.ops_table.file.stream,o.usedBytes=0,o.contents=null):fe.isLink(o.mode)?(o.node_ops=ce.ops_table.link.node,o.stream_ops=ce.ops_table.link.stream):fe.isChrdev(o.mode)&&(o.node_ops=ce.ops_table.chrdev.node,o.stream_ops=ce.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=fe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,fe.isDir(e.mode)?t.size=4096:fe.isFile(e.mode)?t.size=e.usedBytes:fe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ce.resizeFileStorage(e,t.size)},lookup:function(e,t){throw fe.genericErrors[44]},mknod:function(e,t,r,n){return ce.createNode(e,t,r,n)},rename:function(e,t,r){if(fe.isDir(e.mode)){var n;try{n=fe.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=fe.lookupNode(e,t);for(var n in r.contents)throw new fe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=ce.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!fe.isLink(e.mode))throw new fe.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s0||r+t1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ie.resolve(fe.cwd(),e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new fe.ErrnoError(32);for(var r=oe.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),n=fe.root,o="/",i=0;i40)throw new fe.ErrnoError(32)}}return{path:o,node:n}},getPath:function(e){for(var t;;){if(fe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n>>0)%fe.nameTable.length},hashAddNode:function(e){var t=fe.hashName(e.parent.id,e.name);e.name_next=fe.nameTable[t],fe.nameTable[t]=e},hashRemoveNode:function(e){var t=fe.hashName(e.parent.id,e.name);if(fe.nameTable[t]===e)fe.nameTable[t]=e.name_next;else for(var r=fe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=fe.mayLookup(e);if(r)throw new fe.ErrnoError(r,e);for(var n=fe.hashName(e.id,t),o=fe.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return fe.lookup(e,t)},createNode:function(e,t,r,n){var o=new fe.FSNode(e,t,r,n);return fe.hashAddNode(o),o},destroyNode:function(e){fe.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(e){var t=fe.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return fe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2},mayLookup:function(e){var t=fe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return fe.lookupNode(e,t),20}catch(e){}return fe.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=fe.lookupNode(e,t)}catch(e){return e.errno}var o=fe.nodePermissions(e,"wx");if(o)return o;if(r){if(!fe.isDir(n.mode))return 54;if(fe.isRoot(n)||fe.getPath(n)===fe.cwd())return 10}else if(fe.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?fe.isLink(e.mode)?32:fe.isDir(e.mode)&&("r"!==fe.flagsToPermissionString(t)||512&t)?31:fe.nodePermissions(e,fe.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe.MAX_OPEN_FDS,r=e;r<=t;r++)if(!fe.streams[r])return r;throw new fe.ErrnoError(33)},getStream:function(e){return fe.streams[e]},createStream:function(e,t,r){fe.FSStream||(fe.FSStream=function(){this.shared={}},fe.FSStream.prototype={},Object.defineProperties(fe.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new fe.FSStream,e);var n=fe.nextfd(t,r);return e.fd=n,fe.streams[n]=e,e},closeStream:function(e){fe.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=fe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new fe.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){fe.devices[e]={stream_ops:t}},getDevice:function(e){return fe.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),fe.syncFSRequests++,fe.syncFSRequests>1&&g("warning: "+fe.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=fe.getMounts(fe.root.mount),n=0;function o(e){return fe.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:function(e,t,r){var n,o="/"===r,i=!r;if(o&&fe.root)throw new fe.ErrnoError(10);if(!o&&!i){var a=fe.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,fe.isMountpoint(n))throw new fe.ErrnoError(10);if(!fe.isDir(n.mode))throw new fe.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?fe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(e){var t=fe.lookupPath(e,{follow_mount:!1});if(!fe.isMountpoint(t.node))throw new fe.ErrnoError(28);var r=t.node,n=r.mounted,o=fe.getMounts(n);Object.keys(fe.nameTable).forEach((function(e){for(var t=fe.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&fe.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=fe.lookupPath(e,{parent:!0}).node,o=oe.basename(e);if(!o||"."===o||".."===o)throw new fe.ErrnoError(28);var i=fe.mayCreate(n,o);if(i)throw new fe.ErrnoError(i);if(!n.node_ops.mknod)throw new fe.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,fe.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,fe.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var n=fe.open(e,r.flags),o=fe.stat(e).size,i=new Uint8Array(o);return fe.read(n,i,0,o,0),"utf8"===r.encoding?t=$(i,0):"binary"===r.encoding&&(t=i),fe.close(n),t},writeFile:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=fe.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(W(t)+1),i=B(t,o,0,o.length);fe.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");fe.write(n,t,0,t.byteLength,void 0,r.canOwn)}fe.close(n)},cwd:function(){return fe.currentPath},chdir:function(e){var t=fe.lookupPath(e,{follow:!0});if(null===t.node)throw new fe.ErrnoError(44);if(!fe.isDir(t.node.mode))throw new fe.ErrnoError(54);var r=fe.nodePermissions(t.node,"x");if(r)throw new fe.ErrnoError(r);fe.currentPath=t.path},createDefaultDirectories:function(){fe.mkdir("/tmp"),fe.mkdir("/home"),fe.mkdir("/home/web_user")},createDefaultDevices:function(){fe.mkdir("/dev"),fe.registerDevice(fe.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),fe.mkdev("/dev/null",fe.makedev(1,3)),se.register(fe.makedev(5,0),se.default_tty_ops),se.register(fe.makedev(6,0),se.default_tty1_ops),fe.mkdev("/dev/tty",fe.makedev(5,0)),fe.mkdev("/dev/tty1",fe.makedev(6,0));var e=function(){if("object"==("undefined"==typeof crypto?"undefined":o(crypto))&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(m)try{var t=require("crypto");return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){return q("randomDevice")}}();fe.createDevice("/dev","random",e),fe.createDevice("/dev","urandom",e),fe.mkdir("/dev/shm"),fe.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){fe.mkdir("/proc");var e=fe.mkdir("/proc/self");fe.mkdir("/proc/self/fd"),fe.mount({mount:function(){var t=fe.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(e,t){var r=+t,n=fe.getStream(r);if(!n)throw new fe.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){e.stdin?fe.createDevice("/dev","stdin",e.stdin):fe.symlink("/dev/tty","/dev/stdin"),e.stdout?fe.createDevice("/dev","stdout",null,e.stdout):fe.symlink("/dev/tty","/dev/stdout"),e.stderr?fe.createDevice("/dev","stderr",null,e.stderr):fe.symlink("/dev/tty1","/dev/stderr"),fe.open("/dev/stdin",0),fe.open("/dev/stdout",1),fe.open("/dev/stderr",1)},ensureErrnoError:function(){fe.ErrnoError||(fe.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},fe.ErrnoError.prototype=new Error,fe.ErrnoError.prototype.constructor=fe.ErrnoError,[44].forEach((function(e){fe.genericErrors[e]=new fe.ErrnoError(e),fe.genericErrors[e].stack=""})))},staticInit:function(){fe.ensureErrnoError(),fe.nameTable=new Array(4096),fe.mount(ce,{},"/"),fe.createDefaultDirectories(),fe.createDefaultDevices(),fe.createSpecialDirectories(),fe.filesystems={MEMFS:ce}},init:function(t,r,n){fe.init.initialized=!0,fe.ensureErrnoError(),e.stdin=t||e.stdin,e.stdout=r||e.stdout,e.stderr=n||e.stderr,fe.createStandardStreams()},quit:function(){fe.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(e){var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+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",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),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 "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ae(o.responseText||"",!0)}(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,y("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){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=fe.createFile(e,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function f(e,t,r,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s>2]=n.dev,F[r+4>>2]=0,F[r+8>>2]=n.ino,F[r+12>>2]=n.mode,F[r+16>>2]=n.nlink,F[r+20>>2]=n.uid,F[r+24>>2]=n.gid,F[r+28>>2]=n.rdev,F[r+32>>2]=0,J=[n.size>>>0,(G=n.size,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],F[r+40>>2]=J[0],F[r+44>>2]=J[1],F[r+48>>2]=4096,F[r+52>>2]=n.blocks,J=[Math.floor(n.atime.getTime()/1e3)>>>0,(G=Math.floor(n.atime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],F[r+56>>2]=J[0],F[r+60>>2]=J[1],F[r+64>>2]=0,J=[Math.floor(n.mtime.getTime()/1e3)>>>0,(G=Math.floor(n.mtime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],F[r+72>>2]=J[0],F[r+76>>2]=J[1],F[r+80>>2]=0,J=[Math.floor(n.ctime.getTime()/1e3)>>>0,(G=Math.floor(n.ctime.getTime()/1e3),+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],F[r+88>>2]=J[0],F[r+92>>2]=J[1],F[r+96>>2]=0,J=[n.ino>>>0,(G=n.ino,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],F[r+104>>2]=J[0],F[r+108>>2]=J[1],0},doMsync:function(e,t,r,n,o){var i=C.slice(e,e+r);fe.msync(t,i,o,r,n)},varargs:void 0,get:function(){return le.varargs+=4,F[le.varargs-4>>2]},getStr:function(e){return R(e)},getStreamFromFD:function(e){var t=fe.getStream(e);if(!t)throw new fe.ErrnoError(8);return t}},de={};function pe(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function he(e){return this.fromWireType(F[e>>2])}var me={},ve={},ye={},ge=48,we=57;function _e(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=ge&&t<=we?"_"+e:e}function be(e,t){return e=_e(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Ee(e,t){var r=be(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var ke=void 0;function Pe(e){throw new ke(e)}function Te(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Pe("Mismatched type converter count");for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||Ae('type "'+n+'" must have a positive integer typeid pointer'),ve.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ae("Cannot register type '"+n+"' twice")}if(ve[e]=t,delete ye[e],me.hasOwnProperty(e)){var o=me[e];delete me[e],o.forEach((function(e){return e()}))}}function je(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function Me(e){Ae(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Oe=!1;function $e(e){}function Re(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function Be(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=Be(e,t,r.baseClass);return null===n?null:r.downcast(n)}var We={};function ze(){return Object.keys(Ve).length}function Ne(){var e=[];for(var t in Ve)Ve.hasOwnProperty(t)&&e.push(Ve[t]);return e}var Ue=[];function Ie(){for(;Ue.length;){var e=Ue.pop();e.$$.deleteScheduled=!1,e.delete()}}var Le=void 0;function He(e){Le=e,Ue.length&&Le&&Le(Ie)}var Ve={};function qe(e,t){return t=function(e,t){for(void 0===t&&Ae("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),Ve[t]}function Ye(e,t){return t.ptrType&&t.ptr||Pe("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Pe("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ge(Object.create(e,{$$:{value:t}}))}function Xe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=qe(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Ye(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ye(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=We[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Be(t,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ye(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:e}):Ye(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function Ge(e){return"undefined"==typeof FinalizationRegistry?(Ge=function(e){return e},e):(Oe=new FinalizationRegistry((function(e){Re(e.$$)})),Ge=function(e){var t=e.$$;if(t.smartPtr){var r={$$:t};Oe.register(e,r,e)}return e},$e=function(e){return Oe.unregister(e)},Ge(e))}function Je(){if(this.$$.ptr||Me(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Ge(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Ke(){this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),$e(this),Re(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ze(){return!this.$$.ptr}function Qe(){return this.$$.ptr||Me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Ue.push(this),1===Ue.length&&Le&&Le(Ie),this.$$.deleteScheduled=!0,this}function et(){}function tt(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ae("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function rt(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function nt(e,t,r){for(;t!==r;)t.upcast||Ae("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function ot(e,t){if(null===t)return this.isReference&&Ae("null is not a valid "+this.name),0;t.$$||Ae('Cannot pass "'+St(t)+'" as a '+this.name),t.$$.ptr||Ae("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return nt(t.$$.ptr,r,this.registeredClass)}function it(e,t){var r;if(null===t)return this.isReference&&Ae("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ae('Cannot pass "'+St(t)+'" as a '+this.name),t.$$.ptr||Ae("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Ae("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=nt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ae("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,Ct.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ae("Unsupporting sharing policy")}return r}function at(e,t){if(null===t)return this.isReference&&Ae("null is not a valid "+this.name),0;t.$$||Ae('Cannot pass "'+St(t)+'" as a '+this.name),t.$$.ptr||Ae("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Ae("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return nt(t.$$.ptr,r,this.registeredClass)}function st(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function ut(e){this.rawDestructor&&this.rawDestructor(e)}function ct(e){null!==e&&e.delete()}function ft(e,t,r,n,o,i,a,s,u,c,f){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=it:n?(this.toWireType=ot,this.destructorFunction=null):(this.toWireType=at,this.destructorFunction=null)}var lt=[];function dt(e){var t=lt[e];return t||(e>=lt.length&&(lt.length=e+1),lt[e]=t=M.get(e)),t}function pt(t,r,n){return t.includes("j")?function(t,r,n){var o=e["dynCall_"+t];return n&&n.length?o.apply(null,[r].concat(n)):o.call(null,r)}(t,r,n):dt(r).apply(null,n)}function ht(e,t){var r,n,o,i=(e=De(e)).includes("j")?(r=e,n=t,o=[],function(){return o.length=0,Object.assign(o,arguments),pt(r,n,o)}):dt(t);return"function"!=typeof i&&Ae("unknown function pointer with signature "+e+": "+t),i}var mt=void 0;function vt(e){var t=or(e),r=De(t);return rr(t),r}function yt(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||ve[t]||(ye[t]?ye[t].forEach(e):(r.push(t),n[t]=!0))})),new mt(e+": "+r.map(vt).join([", "]))}function gt(e,t){for(var r=[],n=0;n>2]);return r}function wt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+o(e)+" which is not a function");var r=be(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function _t(e,t,r,n,o){var i=t.length;i<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,u=1;u0?", ":"")+l),d+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)d+="runDestructors(destructors);\n";else for(u=a?1:2;u4&&0==--Et[e].refcount&&(Et[e]=void 0,bt.push(e))}function Pt(){for(var e=0,t=5;t>2])};case 3:return function(e){return this.fromWireType(j[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Ft(e,t,r){switch(t){case 0:return r?function(e){return T[e]}:function(e){return C[e]};case 1:return r?function(e){return S[e>>1]}:function(e){return D[e>>1]};case 2:return r?function(e){return F[e>>2]}:function(e){return A[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var At="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function xt(e,t){for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&D[n];)++n;if((r=n<<1)-e>32&&At)return At.decode(C.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=S[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function jt(e,t,r){if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i>1]=a,t+=2}return S[t>>1]=0,t-n}function Mt(e){return 2*e.length}function Ot(e,t){for(var r=0,n="";!(r>=t/4);){var o=F[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function $t(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),F[t>>2]=a,(t+=4)+4>o)break}return F[t>>2]=0,t-n}function Rt(e){for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t}var Bt=!0;function Wt(e,t){var r=ve[e];return void 0===r&&Ae(t+" has unknown type "+vt(e)),r}var zt={};function Nt(e){var t=zt[e];return void 0===t?De(e):t}var Ut=[];function It(){return"object"==("undefined"==typeof globalThis?"undefined":o(globalThis))?globalThis:Function("return this")()}var Lt,Ht=[];Lt=m?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:function(){return performance.now()};var Vt={};function qt(){if(!qt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==("undefined"==typeof navigator?"undefined":o(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:d||"./this.program"};for(var t in Vt)void 0===Vt[t]?delete e[t]:e[t]=Vt[t];var r=[];for(var t in e)r.push(t+"="+e[t]);qt.strings=r}return qt.strings}function Yt(e){return e%4==0&&(e%100!=0||e%400==0)}var Xt=[31,29,31,30,31,30,31,31,30,31,30,31],Gt=[31,28,31,30,31,30,31,31,30,31,30,31];function Jt(e,t,r,n){var o=F[n+40>>2],i={tm_sec:F[n>>2],tm_min:F[n+4>>2],tm_hour:F[n+8>>2],tm_mday:F[n+12>>2],tm_mon:F[n+16>>2],tm_year:F[n+20>>2],tm_wday:F[n+24>>2],tm_yday:F[n+28>>2],tm_isdst:F[n+32>>2],tm_gmtoff:F[n+36>>2],tm_zone:o?R(o):""},a=R(r),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(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function h(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=function(e,t){for(var r=new Date(e.getTime());t>0;){var n=Yt(r.getFullYear()),o=r.getMonth(),i=(n?Xt:Gt)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=h(r),i=h(n);return p(o,t)<=0?p(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return f[e.tm_mon].substring(0,3)},"%B":function(e){return f[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return l(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+function(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}(Yt(e.tm_year+1900)?Xt:Gt,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return d(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&Yt(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Yt(e.tm_year%400-1))&&t++}return d(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),v)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),v[u](i)));var y=ae(a=a.replace(/\0\0/g,"%"),!1);return y.length>t?0:(function(e,t){T.set(e,t)}(y,e),y.length-1)}var Kt=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=fe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Zt=365,Qt=146;Object.defineProperties(Kt.prototype,{read:{get:function(){return(this.mode&Zt)===Zt},set:function(e){e?this.mode|=Zt:this.mode&=-366}},write:{get:function(){return(this.mode&Qt)===Qt},set:function(e){e?this.mode|=Qt:this.mode&=-147}},isFolder:{get:function(){return fe.isDir(this.mode)}},isDevice:{get:function(){return fe.isChrdev(this.mode)}}}),fe.FSNode=Kt,fe.staticInit(),e.FS_createPath=fe.createPath,e.FS_createDataFile=fe.createDataFile,e.FS_createPreloadedFile=fe.createPreloadedFile,e.FS_unlink=fe.unlink,e.FS_createLazyFile=fe.createLazyFile,e.FS_createDevice=fe.createDevice,ke=e.InternalError=Ee(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Se=e}(),Fe=e.BindingError=Ee(Error,"BindingError"),et.prototype.isAliasOf=je,et.prototype.clone=Je,et.prototype.delete=Ke,et.prototype.isDeleted=Ze,et.prototype.deleteLater=Qe,e.getInheritedInstanceCount=ze,e.getLiveInheritedInstances=Ne,e.flushPendingDeletes=Ie,e.setDelayFunction=He,ft.prototype.getPointee=st,ft.prototype.destructor=ut,ft.prototype.argPackAdvance=8,ft.prototype.readValueFromPointer=he,ft.prototype.deleteObject=ct,ft.prototype.fromWireType=Xe,mt=e.UnboundTypeError=Ee(Error,"UnboundTypeError"),e.count_emval_handles=Pt,e.get_first_emval=Tt;var er={j:function(e){return tr(e+24)+24},i:function(e,t,r){throw new ne(e).init(t,r),e},v:function(e,t,r){le.varargs=r;try{var n=le.getStreamFromFD(e);switch(t){case 0:return(o=le.get())<0?-28:fe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=le.get();return n.flags|=o,0;case 5:return o=le.get(),S[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,F[nr()>>2]=i,-1}}catch(e){if(void 0===fe||!(e instanceof fe.ErrnoError))throw e;return-e.errno}var i},I:function(e,t,r){le.varargs=r;try{var n=le.getStreamFromFD(e);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=le.get();return F[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=le.get(),fe.ioctl(n,t,o);default:q("bad ioctl syscall "+t)}}catch(e){if(void 0===fe||!(e instanceof fe.ErrnoError))throw e;return-e.errno}},u:function(e,t,r,n){le.varargs=n;try{t=le.getStr(t),t=le.calculateAt(e,t);var o=n?le.get():0;return fe.open(t,r,o).fd}catch(e){if(void 0===fe||!(e instanceof fe.ErrnoError))throw e;return-e.errno}},y:function(e){var t=de[e];delete de[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Te([e],o.map((function(e){return e.getterReturnType})).concat(o.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return o.forEach((function(t,r){var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+o.length],f=t.setter,l=t.setterContext;i[n]={read:function(e){return a.fromWireType(s(u,e))},write:function(e,t){var r=[];f(l,e,c.toWireType(r,t)),pe(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:function(e,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(n,a),a},argPackAdvance:8,readValueFromPointer:he,destructorFunction:n}]}))},D:function(e,t,r,n,o){},O:function(e,t,r,n,o){var i=Ce(r);xe(e,{name:t=De(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=T;else if(2===r)n=S;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=F}return this.fromWireType(n[e>>i])},destructorFunction:null})},T:function(t,r,n,o,i,a,s,u,c,f,l,d,p){l=De(l),a=ht(i,a),u&&(u=ht(s,u)),f&&(f=ht(c,f)),p=ht(d,p);var h=_e(l);!function(t,r,n){e.hasOwnProperty(t)?((void 0===n||void 0!==e[t].overloadTable&&void 0!==e[t].overloadTable[n])&&Ae("Cannot register public name '"+t+"' twice"),tt(e,t,t),e.hasOwnProperty(n)&&Ae("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),e[t].overloadTable[n]=r):(e[t]=r,void 0!==n&&(e[t].numArguments=n))}(h,(function(){yt("Cannot construct "+l+" due to unbound types",[o])})),Te([t,r,n],o?[o]:[],(function(r){var n,i;r=r[0],i=o?(n=r.registeredClass).instancePrototype:et.prototype;var s=be(h,(function(){if(Object.getPrototypeOf(this)!==c)throw new Fe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Fe(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Fe("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:s}});s.prototype=c;var d=new rt(l,s,c,p,n,a,u,f),m=new ft(l,d,!0,!1,!1),v=new ft(l+"*",d,!1,!1,!1),y=new ft(l+" const*",d,!1,!0,!1);return We[t]={pointerType:v,constPointerType:y},function(t,r,n){e.hasOwnProperty(t)||Pe("Replacing nonexistant public symbol"),void 0!==e[t].overloadTable&&void 0!==n?e[t].overloadTable[n]=r:(e[t]=r,e[t].argCount=n)}(h,s),[m,v,y]}))},S:function(e,t,r,n,o,i){k(t>0);var a=gt(t,r);o=ht(n,o),Te([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Fe("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){yt("Cannot construct "+e.name+" due to unbound types",a)},Te([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=_t(r,n,null,o,i),[]})),[]}))},k:function(e,t,r,n,o,i,a,s){var u=gt(r,n);t=De(t),i=ht(o,i),Te([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){yt("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===r-2?(o.argCount=r-2,o.className=e.name,c[t]=o):(tt(c,t,n),c[t].overloadTable[r-2]=o),Te([],u,(function(o){var s=_t(n,o,e,i,a);return void 0===c[t].overloadTable?(s.argCount=r-2,c[t]=s):c[t].overloadTable[r-2]=s,[]})),[]}))},N:function(e,t){xe(e,{name:t=De(t),fromWireType:function(e){var t=Ct.toValue(e);return kt(e),t},toWireType:function(e,t){return Ct.toHandle(t)},argPackAdvance:8,readValueFromPointer:he,destructorFunction:null})},x:function(e,t,r){var n=Ce(r);xe(e,{name:t=De(t),fromWireType:function(e){return e},toWireType:function(e,t){return t},argPackAdvance:8,readValueFromPointer:Dt(t,n),destructorFunction:null})},e:function(e,t,r,n,o){t=De(t);var i=Ce(r),a=function(e){return e};if(0===n){var s=32-8*r;a=function(e){return e<>>s}}var u=t.includes("unsigned");xe(e,{name:t,fromWireType:a,toWireType:u?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Ft(t,i,0!==n),destructorFunction:null})},b:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=A,r=t[e>>=2],o=t[e+1];return new n(P,o,r)}xe(e,{name:r=De(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},w:function(e,t){var r="std::string"===(t=De(t));xe(e,{name:t,fromWireType:function(e){var t,n=A[e>>2],o=e+4;if(r)for(var i=o,a=0;a<=n;++a){var s=o+a;if(a==n||0==C[s]){var u=R(i,s-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=s+1}}else{var c=new Array(n);for(a=0;a>2]=n,r&&o)B(t,C,a,n+1);else if(o)for(var s=0;s255&&(rr(a),Ae("String has UTF-16 code units that do not fit in 8 bits")),C[a+s]=u}else for(s=0;s>2],a=i(),u=e+4,c=0;c<=o;++c){var f=e+4+c*t;if(c==o||0==a[f>>s]){var l=n(u,f-u);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),u=f+t}}return rr(e),r},toWireType:function(e,n){"string"!=typeof n&&Ae("Cannot pass non-string to C++ string type "+r);var i=a(n),u=tr(4+i+t);return A[u>>2]=i>>s,o(n,u+4,i+t),null!==e&&e.push(rr,u),u},argPackAdvance:8,readValueFromPointer:he,destructorFunction:function(e){rr(e)}})},z:function(e,t,r,n,o,i){de[e]={name:De(t),rawConstructor:ht(r,n),rawDestructor:ht(o,i),fields:[]}},h:function(e,t,r,n,o,i,a,s,u,c){de[e].fields.push({fieldName:De(t),getterReturnType:r,getter:ht(n,o),getterContext:i,setterArgumentType:a,setter:ht(s,u),setterContext:c})},P:function(e,t){xe(e,{isVoid:!0,name:t=De(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},L:function(){return Date.now()},Q:function(e){do{var t=A[e>>2],r=A[(e+=4)>>2],n=A[(e+=4)>>2];e+=4;var o=R(t);fe.createPath("/",oe.dirname(o),!0,!0),fe.createDataFile(o,null,T.subarray(n,n+r),!0,!0,!0)}while(A[e>>2])},K:function(){return Bt},g:function(e,t,r){e=Ct.toValue(e),t=Wt(t,"emval::as");var n=[],o=Ct.toHandle(n);return A[r>>2]=o,t.toWireType(n,e)},A:function(e,t,r,n,o){return(e=Ut[e])(t=Ct.toValue(t),r=Nt(r),function(e){var t=[];return A[e>>2]=Ct.toHandle(t),t}(n),o)},s:function(e,t,r,n){(e=Ut[e])(t=Ct.toValue(t),r=Nt(r),null,n)},a:kt,B:function(e){return 0===e?Ct.toHandle(It()):(e=Nt(e),Ct.toHandle(It()[e]))},m:function(e,t){var r=function(e,t){for(var r=new Array(e),n=0;n>2],"parameter "+n);return r}(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=Ht[o];if(void 0!==i)return i;for(var a=["retType"],s=[n],u="",c=0;c4&&(Et[e].refcount+=1)},R:function(){return Ct.toHandle([])},c:function(e){return Ct.toHandle(Nt(e))},f:function(e){pe(Ct.toValue(e)),kt(e)},o:function(){q("")},J:Lt,M:function(e,t,r){C.copyWithin(e,t,t+r)},F:function(e){C.length,q("OOM")},G:function(e,t){var r=0;return qt().forEach((function(n,o){var i=t+r;A[e+4*o>>2]=i,function(e,t,r){for(var n=0;n>0]=e.charCodeAt(n);r||(T[t>>0]=0)}(n,i),r+=n.length+1})),0},H:function(e,t){var r=qt();A[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),A[t>>2]=n,0},q:function(e){try{var t=le.getStreamFromFD(e);return fe.close(t),0}catch(e){if(void 0===fe||!(e instanceof fe.ErrnoError))throw e;return e.errno}},t:function(e,t,r,n){try{var o=function(e,t,r,n){for(var o=0,i=0;i>2],s=A[t+4>>2];t+=8;var u=fe.read(e,T,a,s,n);if(u<0)return-1;if(o+=u,u>2]=o,0}catch(e){if(void 0===fe||!(e instanceof fe.ErrnoError))throw e;return e.errno}},C:function(e,t,r,n,o){try{var i=(u=r)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=le.getStreamFromFD(e);return fe.llseek(a,i,n),J=[a.position>>>0,(G=a.position,+Math.abs(G)>=1?G>0?(0|Math.min(+Math.floor(G/4294967296),4294967295))>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],F[o>>2]=J[0],F[o+4>>2]=J[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(e){if(void 0===fe||!(e instanceof fe.ErrnoError))throw e;return e.errno}var s,u},p:function(e,t,r,n){try{var o=function(e,t,r,n){for(var o=0,i=0;i>2],s=A[t+4>>2];t+=8;var u=fe.write(e,T,a,s,n);if(u<0)return-1;o+=u}return o}(le.getStreamFromFD(e),t,r);return A[n>>2]=o,0}catch(e){if(void 0===fe||!(e instanceof fe.ErrnoError))throw e;return e.errno}},n:function(e){},E:function(e,t,r,n){return Jt(e,t,r,n)}};!function(){var t={a:er};function n(t,r){var n,o,i=t.exports;e.asm=i,_=e.asm.U,n=_.buffer,P=n,e.HEAP8=T=new Int8Array(n),e.HEAP16=S=new Int16Array(n),e.HEAP32=F=new Int32Array(n),e.HEAPU8=C=new Uint8Array(n),e.HEAPU16=D=new Uint16Array(n),e.HEAPU32=A=new Uint32Array(n),e.HEAPF32=x=new Float32Array(n),e.HEAPF64=j=new Float64Array(n),M=e.asm.X,o=e.asm.V,N.unshift(o),V()}function o(e){n(e.instance)}function a(e){return function(){if(!w&&(p||h)){if("function"==typeof fetch&&!Q(Y))return fetch(Y,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Y+"'";return e.arrayBuffer()})).catch((function(){return ee(Y)}));if(i)return new Promise((function(e,t){i(Y,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return ee(Y)}))}().then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(e,(function(e){g("failed to asynchronously prepare wasm: "+e),q(e)}))}if(H(),e.instantiateWasm)try{return e.instantiateWasm(t,n)}catch(e){return g("Module.instantiateWasm callback failed with error: "+e),!1}(w||"function"!=typeof WebAssembly.instantiateStreaming||Z(Y)||Q(Y)||m||"function"!=typeof fetch?a(o):fetch(Y,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(o,(function(e){return g("wasm streaming compile failed: "+e),g("falling back to ArrayBuffer instantiation"),a(o)}))}))).catch(r)}(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.V).apply(null,arguments)};var tr=e._malloc=function(){return(tr=e._malloc=e.asm.W).apply(null,arguments)},rr=e._free=function(){return(rr=e._free=e.asm.Y).apply(null,arguments)},nr=e.___errno_location=function(){return(nr=e.___errno_location=e.asm.Z).apply(null,arguments)},or=e.___getTypeName=function(){return(or=e.___getTypeName=e.asm._).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.$).apply(null,arguments)};var ir,ar=e.___cxa_is_pointer_type=function(){return(ar=e.___cxa_is_pointer_type=e.asm.aa).apply(null,arguments)};function sr(r){function n(){ir||(ir=!0,e.calledRun=!0,E||(e.noFSInit||fe.init.initialized||fe.init(),fe.ignorePermissions=!1,re(N),t(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)t=e.postRun.shift(),U.unshift(t);var t;re(U)}()))}I>0||(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)t=e.preRun.shift(),z.unshift(t);var t;re(z)}(),I>0||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),n()}),1)):n()))}if(e.dynCall_ji=function(){return(e.dynCall_ji=e.asm.ba).apply(null,arguments)},e.dynCall_jiii=function(){return(e.dynCall_jiii=e.asm.ca).apply(null,arguments)},e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.da).apply(null,arguments)},e.dynCall_viijii=function(){return(e.dynCall_viijii=e.asm.ea).apply(null,arguments)},e.dynCall_iiiiij=function(){return(e.dynCall_iiiiij=e.asm.fa).apply(null,arguments)},e.dynCall_iiiiijj=function(){return(e.dynCall_iiiiijj=e.asm.ga).apply(null,arguments)},e.dynCall_iiiiiijj=function(){return(e.dynCall_iiiiiijj=e.asm.ha).apply(null,arguments)},e.___emscripten_embedded_file_data=3932636,e.addRunDependency=H,e.removeRunDependency=V,e.FS_createPath=fe.createPath,e.FS_createDataFile=fe.createDataFile,e.FS_createPreloadedFile=fe.createPreloadedFile,e.FS_createLazyFile=fe.createLazyFile,e.FS_createDevice=fe.createDevice,e.FS_unlink=fe.unlink,L=function e(){ir||sr(),ir||(L=e)},e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return sr(),e.ready}),y=function(){function e(){r(this,e)}return s(e,[{key:"on",value:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this}},{key:"once",value:function(e,t,r){var n=this;function o(){n.off(e,o);for(var i=arguments.length,a=new Array(i),s=0;s1?r-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),(e=t.call(this)).module=null,e.detector=null,e.startTimestamp=null,e.detectWidth=o.detectWidth||192,e.showRect=!1!==o.showRect,e.textColor=o.textColor||{r:0,g:255,b:0},e.rectangleColor=o.rectangleColor||{r:0,g:0,b:255},e.currentTs=null,e}return s(n,[{key:"destroy",value:function(){this.off(),this.detector&&(this.detector.clear(),this.detector.delete()),this.module&&(this.module=null),this.startTimestamp=null,this.currentTs=null}},{key:"load",value:function(){var e=this;return new Promise((function(t,r){v().then((function(n){e.module=n,e.module.ObjectDetector?(e.detector=new e.module.ObjectDetector(e),e.detector.setDetectWidth(e.detectWidth),e.detector.setParams({showInfo:e.showRect,rectangleColor:e.rectangleColor,textColor:e.textColor}),t()):r("load jessibuca object detector fail")})).catch((function(e){console.error(e),r("load jessibuca object detector error")}))}))}},{key:"updateConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.detectWidth&&(this.detectWidth=e.detectWidth,this.detector&&this.detector.setDetectWidth(this.detectWidth));var t={};g(e.showRect)&&(this.showRect=e.showRect,t.showInfo=e.showRect),g(e.rectangleColor)&&(this.rectangleColor=e.rectangleColor,t.rectangleColor=e.rectangleColor),g(e.textColor)&&(this.textColor=e.textColor,t.textColor=e.textColor),w(t)&&this.detector&&this.detector.setParams(t)}},{key:"notifyDetectInfo",value:function(e){if(this.detector){var t={list:[],ts:this.currentTs||0};t.list=(e||[]).map((function(e){return{en:e.className,zh:b[e.className]||e.className,rect:e.box,confidence:e.confidence}})),this.emit("jessibuca-pro-object-detector-info",t)}}},{key:"detect",value:function(e){if(!this.detector)return e.data;if(null===this.startTimestamp&&(this.startTimestamp=Date.now()),Date.now()-this.startTimestamp>6e5)return e.data;this.currentTs=e.ts;var t=this.detector.detect(e.data,e.width,e.height),r=t+3*(e.width*e.height)/2;return this.module.HEAPU8.subarray(t,r)}}]),n}(y);window.JessibucaProObjectDetector=E}));