@datagrok/eda 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/111.js +1 -1
  3. package/dist/111.js.map +1 -1
  4. package/dist/128.js +1 -1
  5. package/dist/128.js.map +1 -1
  6. package/dist/153.js +1 -1
  7. package/dist/153.js.map +1 -1
  8. package/dist/23.js +1 -1
  9. package/dist/23.js.map +1 -1
  10. package/dist/234.js +1 -1
  11. package/dist/234.js.map +1 -1
  12. package/dist/242.js +1 -1
  13. package/dist/242.js.map +1 -1
  14. package/dist/260.js +1 -1
  15. package/dist/260.js.map +1 -1
  16. package/dist/33.js +1 -1
  17. package/dist/348.js +1 -1
  18. package/dist/348.js.map +1 -1
  19. package/dist/377.js +1 -1
  20. package/dist/377.js.map +1 -1
  21. package/dist/412.js +1 -1
  22. package/dist/412.js.map +1 -1
  23. package/dist/415.js +1 -1
  24. package/dist/415.js.map +1 -1
  25. package/dist/501.js +1 -1
  26. package/dist/501.js.map +1 -1
  27. package/dist/531.js +1 -1
  28. package/dist/531.js.map +1 -1
  29. package/dist/583.js +1 -1
  30. package/dist/583.js.map +1 -1
  31. package/dist/589.js +1 -1
  32. package/dist/589.js.map +1 -1
  33. package/dist/603.js +1 -1
  34. package/dist/603.js.map +1 -1
  35. package/dist/656.js +1 -1
  36. package/dist/656.js.map +1 -1
  37. package/dist/682.js +1 -1
  38. package/dist/682.js.map +1 -1
  39. package/dist/705.js +1 -1
  40. package/dist/705.js.map +1 -1
  41. package/dist/727.js +1 -1
  42. package/dist/727.js.map +1 -1
  43. package/dist/731.js +1 -1
  44. package/dist/731.js.map +1 -1
  45. package/dist/738.js +1 -1
  46. package/dist/738.js.map +1 -1
  47. package/dist/763.js +1 -1
  48. package/dist/763.js.map +1 -1
  49. package/dist/778.js +1 -1
  50. package/dist/778.js.map +1 -1
  51. package/dist/783.js +1 -1
  52. package/dist/783.js.map +1 -1
  53. package/dist/793.js +1 -1
  54. package/dist/793.js.map +1 -1
  55. package/dist/801.js.map +1 -1
  56. package/dist/810.js +1 -1
  57. package/dist/810.js.map +1 -1
  58. package/dist/860.js +1 -1
  59. package/dist/860.js.map +1 -1
  60. package/dist/907.js +1 -1
  61. package/dist/907.js.map +1 -1
  62. package/dist/950.js +1 -1
  63. package/dist/950.js.map +1 -1
  64. package/dist/980.js +1 -1
  65. package/dist/980.js.map +1 -1
  66. package/dist/990.js +1 -1
  67. package/dist/990.js.map +1 -1
  68. package/dist/package-test.js +1 -1
  69. package/dist/package-test.js.map +1 -1
  70. package/dist/package.js +1 -1
  71. package/dist/package.js.map +1 -1
  72. package/package.json +5 -4
  73. package/src/package-api.ts +259 -0
  74. package/src/package.g.ts +522 -0
  75. package/src/package.ts +907 -678
  76. package/test-console-output-1.log +52 -58
  77. package/test-record-1.mp4 +0 -0
  78. package/tsconfig.json +2 -2
  79. package/webpack.config.js +6 -1
package/dist/990.js CHANGED
@@ -1,2 +1,2 @@
1
- var eda;(()=>{"use strict";var r={686:(r,e,t)=>{r.exports=t.p+"77573759e3857711e15b.wasm"},1101:(r,e,t)=>{t.d(e,{p:()=>o}),r=t.hmd(r);var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var e,o,a=void 0!==(r=r||{})?r:{};a.ready=new Promise((function(r,t){e=r,o=t}));var s,i,u,c=Object.assign({},a),d=[],f="./this.program",l=(r,e)=>{throw e},p="object"==typeof window,m="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,w="";(p||m)&&(m?w=self.location.href:"undefined"!=typeof document&&document.currentScript&&(w=document.currentScript.src),n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},m&&(u=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),i=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)});var v,y=a.print||console.log.bind(console),g=a.printErr||console.warn.bind(console);Object.assign(a,c),c=null,a.arguments&&(d=a.arguments),a.thisProgram&&(f=a.thisProgram),a.quit&&(l=a.quit),a.wasmBinary&&(v=a.wasmBinary);var E,_=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&$("no native wasm support detected");var k=!1;function b(r,e){r||$(e)}var S,D,M,A,F,P,x,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function N(r,e,t){for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&O)return O.decode(r.subarray(e,o));for(var a="";e<o;){var s=r[e++];if(128&s){var i=63&r[e++];if(192!=(224&s)){var u=63&r[e++];if((s=224==(240&s)?(15&s)<<12|i<<6|u:(7&s)<<18|i<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|i)}else a+=String.fromCharCode(s)}return a}function R(r,e){return r?N(M,r,e):""}function C(r,e,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,s=0;s<r.length;++s){var i=r.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++s)),i<=127){if(t>=a)break;e[t++]=i}else if(i<=2047){if(t+1>=a)break;e[t++]=192|i>>6,e[t++]=128|63&i}else if(i<=65535){if(t+2>=a)break;e[t++]=224|i>>12,e[t++]=128|i>>6&63,e[t++]=128|63&i}else{if(t+3>=a)break;e[t++]=240|i>>18,e[t++]=128|i>>12&63,e[t++]=128|i>>6&63,e[t++]=128|63&i}}return e[t]=0,t-o}function T(r){for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e}function j(r){S=r,a.HEAP8=D=new Int8Array(r),a.HEAP16=A=new Int16Array(r),a.HEAP32=P=new Int32Array(r),a.HEAPU8=M=new Uint8Array(r),a.HEAPU16=F=new Uint16Array(r),a.HEAPU32=x=new Uint32Array(r),a.HEAPF32=new Float32Array(r),a.HEAPF64=new Float64Array(r)}a.INITIAL_MEMORY;var B,L,z,I,U=[],H=[],q=[],Y=0,G=null,W=null;function X(r){Y++,a.monitorRunDependencies&&a.monitorRunDependencies(Y)}function V(r){if(Y--,a.monitorRunDependencies&&a.monitorRunDependencies(Y),0==Y&&(null!==G&&(clearInterval(G),G=null),W)){var e=W;W=null,e()}}function $(r){a.onAbort&&a.onAbort(r),g(r="Aborted("+r+")"),k=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw o(e),e}function K(r){return r.startsWith("data:application/octet-stream;base64,")}function Z(r){try{if(r==B&&v)return new Uint8Array(v);if(u)return u(r);throw"both async and sync fetching of the wasm failed"}catch(r){$(r)}}function J(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function Q(r){for(;r.length>0;)r.shift()(a)}function rr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){P[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,D[this.ptr+12|0]=r},this.get_caught=function(){return 0!=D[this.ptr+12|0]},this.set_rethrown=function(r){r=r?1:0,D[this.ptr+13|0]=r},this.get_rethrown=function(){return 0!=D[this.ptr+13|0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=P[this.ptr>>2];P[this.ptr>>2]=r+1},this.release_ref=function(){var r=P[this.ptr>>2];return P[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Gr(this.get_type()))return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}K(B="XGBoostAPI.wasm")||(L=B,B=a.locateFile?a.locateFile(L,w):w+L);var er={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=er.isAbs(r),t="/"===r.substr(-1);return(r=er.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=er.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=er.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return er.normalize(r.join("/"))},join2:(r,e)=>er.normalize(r+"/"+e)},tr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:ur.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=er.isAbs(n)}return(e?"/":"")+(r=er.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=tr.resolve(r).substr(1),e=tr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),s=a,i=0;i<a;i++)if(n[i]!==o[i]){s=i;break}var u=[];for(i=s;i<n.length;i++)u.push("..");return(u=u.concat(o.slice(s))).join("/")}};function nr(r,e,t){var n=t>0?t:T(r)+1,o=new Array(n),a=C(r,o,0,o.length);return e&&(o.length=a),o}var or={ttys:[],init:function(){},shutdown:function(){},register:function(r,e){or.ttys[r]={input:[],output:[],ops:e},ur.registerDevice(r,or.stream_ops)},stream_ops:{open:function(r){var e=or.ttys[r.node.rdev];if(!e)throw new ur.ErrnoError(43);r.tty=e,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new ur.ErrnoError(60);for(var a=0,s=0;s<n;s++){var i;try{i=r.tty.ops.get_char(r.tty)}catch(r){throw new ur.ErrnoError(29)}if(void 0===i&&0===a)throw new ur.ErrnoError(6);if(null==i)break;a++,e[t+s]=i}return a&&(r.node.timestamp=Date.now()),a},write:function(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new ur.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new ur.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;r.input=nr(e,!0)}return r.input.shift()},put_char:function(r,e){null===e||10===e?(y(N(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(y(N(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,e){null===e||10===e?(g(N(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync:function(r){r.output&&r.output.length>0&&(g(N(r.output,0)),r.output=[])}}};function ar(r,e){return M.fill(0,r,r+e),r}function sr(r){r=function(r){return 65536*Math.ceil(r/65536)}(r);var e=Ur(65536,r);return e?ar(e,r):0}var ir={ops_table:null,mount:function(r){return ir.createNode(null,"/",16895,0)},createNode:function(r,e,t,n){if(ur.isBlkdev(t)||ur.isFIFO(t))throw new ur.ErrnoError(63);ir.ops_table||(ir.ops_table={dir:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,lookup:ir.node_ops.lookup,mknod:ir.node_ops.mknod,rename:ir.node_ops.rename,unlink:ir.node_ops.unlink,rmdir:ir.node_ops.rmdir,readdir:ir.node_ops.readdir,symlink:ir.node_ops.symlink},stream:{llseek:ir.stream_ops.llseek}},file:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:{llseek:ir.stream_ops.llseek,read:ir.stream_ops.read,write:ir.stream_ops.write,allocate:ir.stream_ops.allocate,mmap:ir.stream_ops.mmap,msync:ir.stream_ops.msync}},link:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr,readlink:ir.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ir.node_ops.getattr,setattr:ir.node_ops.setattr},stream:ur.chrdev_stream_ops}});var o=ur.createNode(r,e,t,n);return ur.isDir(o.mode)?(o.node_ops=ir.ops_table.dir.node,o.stream_ops=ir.ops_table.dir.stream,o.contents={}):ur.isFile(o.mode)?(o.node_ops=ir.ops_table.file.node,o.stream_ops=ir.ops_table.file.stream,o.usedBytes=0,o.contents=null):ur.isLink(o.mode)?(o.node_ops=ir.ops_table.link.node,o.stream_ops=ir.ops_table.link.stream):ur.isChrdev(o.mode)&&(o.node_ops=ir.ops_table.chrdev.node,o.stream_ops=ir.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr:function(r){var e={};return e.dev=ur.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,ur.isDir(r.mode)?e.size=4096:ur.isFile(r.mode)?e.size=r.usedBytes:ur.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&ir.resizeFileStorage(r,e.size)},lookup:function(r,e){throw ur.genericErrors[44]},mknod:function(r,e,t,n){return ir.createNode(r,e,t,n)},rename:function(r,e,t){if(ur.isDir(r.mode)){var n;try{n=ur.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new ur.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink:function(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir:function(r,e){var t=ur.lookupNode(r,e);for(var n in t.contents)throw new ur.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir:function(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink:function(r,e,t){var n=ir.createNode(r,e,41471,0);return n.link=t,n},readlink:function(r){if(!ur.isLink(r.mode))throw new ur.ErrnoError(28);return r.link}},stream_ops:{read:function(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var s=Math.min(r.node.usedBytes-o,n);if(s>8&&a.subarray)e.set(a.subarray(o,o+s),t);else for(var i=0;i<s;i++)e[t+i]=a[o+i];return s},write:function(r,e,t,n,o,a){if(e.buffer===D.buffer&&(a=!1),!n)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=e.subarray(t,t+n),s.usedBytes=n,n;if(0===s.usedBytes&&0===o)return s.contents=e.slice(t,t+n),s.usedBytes=n,n;if(o+n<=s.usedBytes)return s.contents.set(e.subarray(t,t+n),o),n}if(ir.expandFileStorage(s,o+n),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(t,t+n),o);else for(var i=0;i<n;i++)s.contents[o+i]=e[t+i];return s.usedBytes=Math.max(s.usedBytes,o+n),n},llseek:function(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&ur.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new ur.ErrnoError(28);return n},allocate:function(r,e,t){ir.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap:function(r,e,t,n,o){if(!ur.isFile(r.node.mode))throw new ur.ErrnoError(43);var a,s,i=r.node.contents;if(2&o||i.buffer!==S){if((t>0||t+e<i.length)&&(i=i.subarray?i.subarray(t,t+e):Array.prototype.slice.call(i,t,t+e)),s=!0,!(a=sr(e)))throw new ur.ErrnoError(48);D.set(i,a)}else s=!1,a=i.byteOffset;return{ptr:a,allocated:s}},msync:function(r,e,t,n,o){return ir.stream_ops.write(r,e,0,n,t,!1),0}}},ur={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,e={})=>{if(!(r=tr.resolve(r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new ur.ErrnoError(32);for(var t=r.split("/").filter((r=>!!r)),n=ur.root,o="/",a=0;a<t.length;a++){var s=a===t.length-1;if(s&&e.parent)break;if(n=ur.lookupNode(n,t[a]),o=er.join2(o,t[a]),ur.isMountpoint(n)&&(!s||s&&e.follow_mount)&&(n=n.mounted.root),!s||e.follow)for(var i=0;ur.isLink(n.mode);){var u=ur.readlink(o);if(o=tr.resolve(er.dirname(o),u),n=ur.lookupPath(o,{recurse_count:e.recurse_count+1}).node,i++>40)throw new ur.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var e;;){if(ur.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?t+"/"+e:t+e:t}e=e?r.name+"/"+e:r.name,r=r.parent}},hashName:(r,e)=>{for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%ur.nameTable.length},hashAddNode:r=>{var e=ur.hashName(r.parent.id,r.name);r.name_next=ur.nameTable[e],ur.nameTable[e]=r},hashRemoveNode:r=>{var e=ur.hashName(r.parent.id,r.name);if(ur.nameTable[e]===r)ur.nameTable[e]=r.name_next;else for(var t=ur.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode:(r,e)=>{var t=ur.mayLookup(r);if(t)throw new ur.ErrnoError(t,r);for(var n=ur.hashName(r.id,e),o=ur.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return ur.lookup(r,e)},createNode:(r,e,t,n)=>{var o=new ur.FSNode(r,e,t,n);return ur.hashAddNode(o),o},destroyNode:r=>{ur.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var e=ur.flagModes[r];if(void 0===e)throw new Error("Unknown file open mode: "+r);return e},flagsToPermissionString:r=>{var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>ur.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>ur.nodePermissions(r,"x")||(r.node_ops.lookup?0:2),mayCreate:(r,e)=>{try{return ur.lookupNode(r,e),20}catch(r){}return ur.nodePermissions(r,"wx")},mayDelete:(r,e,t)=>{var n;try{n=ur.lookupNode(r,e)}catch(r){return r.errno}var o=ur.nodePermissions(r,"wx");if(o)return o;if(t){if(!ur.isDir(n.mode))return 54;if(ur.isRoot(n)||ur.getPath(n)===ur.cwd())return 10}else if(ur.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?ur.isLink(r.mode)?32:ur.isDir(r.mode)&&("r"!==ur.flagsToPermissionString(e)||512&e)?31:ur.nodePermissions(r,ur.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,e=ur.MAX_OPEN_FDS)=>{for(var t=r;t<=e;t++)if(!ur.streams[t])return t;throw new ur.ErrnoError(33)},getStream:r=>ur.streams[r],createStream:(r,e,t)=>{ur.FSStream||(ur.FSStream=function(){this.shared={}},ur.FSStream.prototype={},Object.defineProperties(ur.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!!(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new ur.FSStream,r);var n=ur.nextfd(e,t);return r.fd=n,ur.streams[n]=r,r},closeStream:r=>{ur.streams[r]=null},chrdev_stream_ops:{open:r=>{var e=ur.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new ur.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice:(r,e)=>{ur.devices[r]={stream_ops:e}},getDevice:r=>ur.devices[r],getMounts:r=>{for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs:(r,e)=>{"function"==typeof r&&(e=r,r=!1),ur.syncFSRequests++,ur.syncFSRequests>1&&g("warning: "+ur.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=ur.getMounts(ur.root.mount),n=0;function o(r){return ur.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount:(r,e,t)=>{var n,o="/"===t,a=!t;if(o&&ur.root)throw new ur.ErrnoError(10);if(!o&&!a){var s=ur.lookupPath(t,{follow_mount:!1});if(t=s.path,n=s.node,ur.isMountpoint(n))throw new ur.ErrnoError(10);if(!ur.isDir(n.mode))throw new ur.ErrnoError(54)}var i={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(i);return u.mount=i,i.root=u,o?ur.root=u:n&&(n.mounted=i,n.mount&&n.mount.mounts.push(i)),u},unmount:r=>{var e=ur.lookupPath(r,{follow_mount:!1});if(!ur.isMountpoint(e.node))throw new ur.ErrnoError(28);var t=e.node,n=t.mounted,o=ur.getMounts(n);Object.keys(ur.nameTable).forEach((r=>{for(var e=ur.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&ur.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod:(r,e,t)=>{var n=ur.lookupPath(r,{parent:!0}).node,o=er.basename(r);if(!o||"."===o||".."===o)throw new ur.ErrnoError(28);var a=ur.mayCreate(n,o);if(a)throw new ur.ErrnoError(a);if(!n.node_ops.mknod)throw new ur.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,ur.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,ur.mknod(r,e,0)),mkdirTree:(r,e)=>{for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ur.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,ur.mknod(r,e,t)),symlink:(r,e)=>{if(!tr.resolve(r))throw new ur.ErrnoError(44);var t=ur.lookupPath(e,{parent:!0}).node;if(!t)throw new ur.ErrnoError(44);var n=er.basename(e),o=ur.mayCreate(t,n);if(o)throw new ur.ErrnoError(o);if(!t.node_ops.symlink)throw new ur.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename:(r,e)=>{var t,n,o=er.dirname(r),a=er.dirname(e),s=er.basename(r),i=er.basename(e);if(t=ur.lookupPath(r,{parent:!0}).node,n=ur.lookupPath(e,{parent:!0}).node,!t||!n)throw new ur.ErrnoError(44);if(t.mount!==n.mount)throw new ur.ErrnoError(75);var u,c=ur.lookupNode(t,s),d=tr.relative(r,a);if("."!==d.charAt(0))throw new ur.ErrnoError(28);if("."!==(d=tr.relative(e,o)).charAt(0))throw new ur.ErrnoError(55);try{u=ur.lookupNode(n,i)}catch(r){}if(c!==u){var f=ur.isDir(c.mode),l=ur.mayDelete(t,s,f);if(l)throw new ur.ErrnoError(l);if(l=u?ur.mayDelete(n,i,f):ur.mayCreate(n,i))throw new ur.ErrnoError(l);if(!t.node_ops.rename)throw new ur.ErrnoError(63);if(ur.isMountpoint(c)||u&&ur.isMountpoint(u))throw new ur.ErrnoError(10);if(n!==t&&(l=ur.nodePermissions(t,"w")))throw new ur.ErrnoError(l);ur.hashRemoveNode(c);try{t.node_ops.rename(c,n,i)}catch(r){throw r}finally{ur.hashAddNode(c)}}},rmdir:r=>{var e=ur.lookupPath(r,{parent:!0}).node,t=er.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!0);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.rmdir)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.rmdir(e,t),ur.destroyNode(n)},readdir:r=>{var e=ur.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new ur.ErrnoError(54);return e.node_ops.readdir(e)},unlink:r=>{var e=ur.lookupPath(r,{parent:!0}).node;if(!e)throw new ur.ErrnoError(44);var t=er.basename(r),n=ur.lookupNode(e,t),o=ur.mayDelete(e,t,!1);if(o)throw new ur.ErrnoError(o);if(!e.node_ops.unlink)throw new ur.ErrnoError(63);if(ur.isMountpoint(n))throw new ur.ErrnoError(10);e.node_ops.unlink(e,t),ur.destroyNode(n)},readlink:r=>{var e=ur.lookupPath(r).node;if(!e)throw new ur.ErrnoError(44);if(!e.node_ops.readlink)throw new ur.ErrnoError(28);return tr.resolve(ur.getPath(e.parent),e.node_ops.readlink(e))},stat:(r,e)=>{var t=ur.lookupPath(r,{follow:!e}).node;if(!t)throw new ur.ErrnoError(44);if(!t.node_ops.getattr)throw new ur.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>ur.stat(r,!0),chmod:(r,e,t)=>{var n;if(!(n="string"==typeof r?ur.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,e)=>{ur.chmod(r,e,!0)},fchmod:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);ur.chmod(t.node,e)},chown:(r,e,t,n)=>{var o;if(!(o="string"==typeof r?ur.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,e,t)=>{ur.chown(r,e,t,!0)},fchown:(r,e,t)=>{var n=ur.getStream(r);if(!n)throw new ur.ErrnoError(8);ur.chown(n.node,e,t)},truncate:(r,e)=>{if(e<0)throw new ur.ErrnoError(28);var t;if(!(t="string"==typeof r?ur.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new ur.ErrnoError(63);if(ur.isDir(t.mode))throw new ur.ErrnoError(31);if(!ur.isFile(t.mode))throw new ur.ErrnoError(28);var n=ur.nodePermissions(t,"w");if(n)throw new ur.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate:(r,e)=>{var t=ur.getStream(r);if(!t)throw new ur.ErrnoError(8);if(!(2097155&t.flags))throw new ur.ErrnoError(28);ur.truncate(t.node,e)},utime:(r,e,t)=>{var n=ur.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open:(r,e,t)=>{if(""===r)throw new ur.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(e="string"==typeof e?ur.modeStringToFlags(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=er.normalize(r);try{n=ur.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var o=!1;if(64&e)if(n){if(128&e)throw new ur.ErrnoError(20)}else n=ur.mknod(r,t,0),o=!0;if(!n)throw new ur.ErrnoError(44);if(ur.isChrdev(n.mode)&&(e&=-513),65536&e&&!ur.isDir(n.mode))throw new ur.ErrnoError(54);if(!o){var s=ur.mayOpen(n,e);if(s)throw new ur.ErrnoError(s)}512&e&&!o&&ur.truncate(n,0),e&=-131713;var i=ur.createStream({node:n,path:ur.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!a.logReadFiles||1&e||(ur.readFiles||(ur.readFiles={}),r in ur.readFiles||(ur.readFiles[r]=1)),i},close:r=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{ur.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new ur.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ur.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read:(r,e,t,n,o)=>{if(n<0||o<0)throw new ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(1==(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.read)throw new ur.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new ur.ErrnoError(70)}else o=r.position;var s=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=s),s},write:(r,e,t,n,o,a)=>{if(n<0||o<0)throw new ur.ErrnoError(28);if(ur.isClosed(r))throw new ur.ErrnoError(8);if(!(2097155&r.flags))throw new ur.ErrnoError(8);if(ur.isDir(r.node.mode))throw new ur.ErrnoError(31);if(!r.stream_ops.write)throw new ur.ErrnoError(28);r.seekable&&1024&r.flags&&ur.llseek(r,0,2);var s=void 0!==o;if(s){if(!r.seekable)throw new ur.ErrnoError(70)}else o=r.position;var i=r.stream_ops.write(r,e,t,n,o,a);return s||(r.position+=i),i},allocate:(r,e,t)=>{if(ur.isClosed(r))throw new ur.ErrnoError(8);if(e<0||t<=0)throw new ur.ErrnoError(28);if(!(2097155&r.flags))throw new ur.ErrnoError(8);if(!ur.isFile(r.node.mode)&&!ur.isDir(r.node.mode))throw new ur.ErrnoError(43);if(!r.stream_ops.allocate)throw new ur.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap:(r,e,t,n,o)=>{if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new ur.ErrnoError(2);if(1==(2097155&r.flags))throw new ur.ErrnoError(2);if(!r.stream_ops.mmap)throw new ur.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl:(r,e,t)=>{if(!r.stream_ops.ioctl)throw new ur.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile:(r,e={})=>{if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var t,n=ur.open(r,e.flags),o=ur.stat(r).size,a=new Uint8Array(o);return ur.read(n,a,0,o,0),"utf8"===e.encoding?t=N(a,0):"binary"===e.encoding&&(t=a),ur.close(n),t},writeFile:(r,e,t={})=>{t.flags=t.flags||577;var n=ur.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(T(e)+1),a=C(e,o,0,o.length);ur.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ur.write(n,e,0,e.byteLength,void 0,t.canOwn)}ur.close(n)},cwd:()=>ur.currentPath,chdir:r=>{var e=ur.lookupPath(r,{follow:!0});if(null===e.node)throw new ur.ErrnoError(44);if(!ur.isDir(e.node.mode))throw new ur.ErrnoError(54);var t=ur.nodePermissions(e.node,"x");if(t)throw new ur.ErrnoError(t);ur.currentPath=e.path},createDefaultDirectories:()=>{ur.mkdir("/tmp"),ur.mkdir("/home"),ur.mkdir("/home/web_user")},createDefaultDevices:()=>{ur.mkdir("/dev"),ur.registerDevice(ur.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),ur.mkdev("/dev/null",ur.makedev(1,3)),or.register(ur.makedev(5,0),or.default_tty_ops),or.register(ur.makedev(6,0),or.default_tty1_ops),ur.mkdev("/dev/tty",ur.makedev(5,0)),ur.mkdev("/dev/tty1",ur.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>$("randomDevice")}();ur.createDevice("/dev","random",r),ur.createDevice("/dev","urandom",r),ur.mkdir("/dev/shm"),ur.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{ur.mkdir("/proc");var r=ur.mkdir("/proc/self");ur.mkdir("/proc/self/fd"),ur.mount({mount:()=>{var e=ur.createNode(r,"fd",16895,73);return e.node_ops={lookup:(r,e)=>{var t=+e,n=ur.getStream(t);if(!n)throw new ur.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{a.stdin?ur.createDevice("/dev","stdin",a.stdin):ur.symlink("/dev/tty","/dev/stdin"),a.stdout?ur.createDevice("/dev","stdout",null,a.stdout):ur.symlink("/dev/tty","/dev/stdout"),a.stderr?ur.createDevice("/dev","stderr",null,a.stderr):ur.symlink("/dev/tty1","/dev/stderr"),ur.open("/dev/stdin",0),ur.open("/dev/stdout",1),ur.open("/dev/stderr",1)},ensureErrnoError:()=>{ur.ErrnoError||(ur.ErrnoError=function(r,e){this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},ur.ErrnoError.prototype=new Error,ur.ErrnoError.prototype.constructor=ur.ErrnoError,[44].forEach((r=>{ur.genericErrors[r]=new ur.ErrnoError(r),ur.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{ur.ensureErrnoError(),ur.nameTable=new Array(4096),ur.mount(ir,{},"/"),ur.createDefaultDirectories(),ur.createDefaultDevices(),ur.createSpecialDirectories(),ur.filesystems={MEMFS:ir}},init:(r,e,t)=>{ur.init.initialized=!0,ur.ensureErrnoError(),a.stdin=r||a.stdin,a.stdout=e||a.stdout,a.stderr=t||a.stderr,ur.createStandardStreams()},quit:()=>{ur.init.initialized=!1;for(var r=0;r<ur.streams.length;r++){var e=ur.streams[r];e&&ur.close(e)}},getMode:(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},findObject:(r,e)=>{var t=ur.analyzePath(r,e);return t.exists?t.object:null},analyzePath:(r,e)=>{try{r=(n=ur.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ur.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=er.basename(r),n=ur.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath:(r,e,t,n)=>{r="string"==typeof r?r:ur.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var s=er.join2(r,a);try{ur.mkdir(s)}catch(r){}r=s}}return s},createFile:(r,e,t,n,o)=>{var a=er.join2("string"==typeof r?r:ur.getPath(r),e),s=ur.getMode(n,o);return ur.create(a,s)},createDataFile:(r,e,t,n,o,a)=>{var s=e;r&&(r="string"==typeof r?r:ur.getPath(r),s=e?er.join2(r,e):r);var i=ur.getMode(n,o),u=ur.create(s,i);if(t){if("string"==typeof t){for(var c=new Array(t.length),d=0,f=t.length;d<f;++d)c[d]=t.charCodeAt(d);t=c}ur.chmod(u,146|i);var l=ur.open(u,577);ur.write(l,t,0,t.length,0,a),ur.close(l),ur.chmod(u,i)}return u},createDevice:(r,e,t,n)=>{var o=er.join2("string"==typeof r?r:ur.getPath(r),e),a=ur.getMode(!!t,!!n);ur.createDevice.major||(ur.createDevice.major=64);var s=ur.makedev(ur.createDevice.major++,0);return ur.registerDevice(s,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,e,n,o,a)=>{for(var s=0,i=0;i<o;i++){var u;try{u=t()}catch(r){throw new ur.ErrnoError(29)}if(void 0===u&&0===s)throw new ur.ErrnoError(6);if(null==u)break;s++,e[n+i]=u}return s&&(r.node.timestamp=Date.now()),s},write:(r,e,t,o,a)=>{for(var s=0;s<o;s++)try{n(e[t+s])}catch(r){throw new ur.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),s}}),ur.mkdev(o,a,s)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=nr(s(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new ur.ErrnoError(29)}},createLazyFile:(r,e,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,s=1048576;o||(s=n);var i=this;i.setDataGetter((r=>{var e=r*s,o=(r+1)*s-1;if(o=Math.min(o,n-1),void 0===i.chunks[r]&&(i.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==s&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):nr(o.responseText||"",!0)})(e,o)),void 0===i.chunks[r])throw new Error("doXHR failed!");return i.chunks[r]})),!a&&n||(s=n=1,n=this.getter(0).length,s=n,y("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var i={isDevice:!1,contents:s}}else i={isDevice:!1,url:t};var u=ur.createFile(r,e,i,n,o);i.contents?u.contents=i.contents:i.url&&(u.contents=null,u.url=i.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function d(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var s=Math.min(a.length-o,n);if(a.slice)for(var i=0;i<s;i++)e[t+i]=a[o+i];else for(i=0;i<s;i++)e[t+i]=a.get(o+i);return s}return Object.keys(u.stream_ops).forEach((r=>{var e=u.stream_ops[r];c[r]=function(){return ur.forceLoadFile(u),e.apply(null,arguments)}})),c.read=(r,e,t,n,o)=>(ur.forceLoadFile(u),d(r,e,t,n,o)),c.mmap=(r,e,t,n,o)=>{ur.forceLoadFile(u);var a=sr(e);if(!a)throw new ur.ErrnoError(48);return d(r,D,a,e,t),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,e,t,n,o,a,s,u,c,d)=>{var f=e?tr.resolve(er.join2(r,e)):r;function l(t){function i(t){d&&d(),u||ur.createDataFile(r,e,t,n,o,c),a&&a(),V()}Browser.handledByPreloadPlugin(t,f,i,(()=>{s&&s(),V()}))||i(t)}X(),"string"==typeof t?function(r,e,t){var n="al "+r;i(r,(e=>{b(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),l(new Uint8Array(e)),n&&V()}),(e=>{if(!t)throw'Loading data file "'+r+'" failed.';t()})),n&&X()}(t,0,s):l(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=()=>{y("creating db"),o.result.createObjectStore(ur.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([ur.DB_STORE_NAME],"readwrite"),a=n.objectStore(ur.DB_STORE_NAME),s=0,i=0,u=r.length;function c(){0==i?e():t()}r.forEach((r=>{var e=a.put(ur.analyzePath(r).object.contents,r);e.onsuccess=()=>{++s+i==u&&c()},e.onerror=()=>{i++,s+i==u&&c()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(r,e,t)=>{e=e||(()=>{}),t=t||(()=>{});var n=ur.indexedDB();try{var o=n.open(ur.DB_NAME(),ur.DB_VERSION)}catch(r){return t(r)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([ur.DB_STORE_NAME],"readonly")}catch(r){return void t(r)}var s=a.objectStore(ur.DB_STORE_NAME),i=0,u=0,c=r.length;function d(){0==u?e():t()}r.forEach((r=>{var e=s.get(r);e.onsuccess=()=>{ur.analyzePath(r).exists&&ur.unlink(r),ur.createDataFile(er.dirname(r),er.basename(r),e.result,!0,!0,!0),++i+u==c&&d()},e.onerror=()=>{u++,i+u==c&&d()}})),a.onerror=t},o.onerror=t}},cr={mount:function(r){return a.websocket=a.websocket&&"object"==typeof a.websocket?a.websocket:{},a.websocket._callbacks={},a.websocket.on=function(r,e){return"function"==typeof e&&(this._callbacks[r]=e),this},a.websocket.emit=function(r,e){"function"==typeof this._callbacks[r]&&this._callbacks[r].call(this,e)},ur.createNode(null,"/",16895,0)},createSocket:function(r,e,t){if(1==(e&=-526337)&&t&&6!=t)throw new ur.ErrnoError(66);var n={family:r,type:e,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:cr.websocket_sock_ops},o=cr.nextname(),a=ur.createNode(cr.root,o,49152,0);a.sock=n;var s=ur.createStream({path:o,node:a,flags:2,seekable:!1,stream_ops:cr.stream_ops});return n.stream=s,n},getSocket:function(r){var e=ur.getStream(r);return e&&ur.isSocket(e.node.mode)?e.node.sock:null},stream_ops:{poll:function(r){var e=r.node.sock;return e.sock_ops.poll(e)},ioctl:function(r,e,t){var n=r.node.sock;return n.sock_ops.ioctl(n,e,t)},read:function(r,e,t,n,o){var a=r.node.sock,s=a.sock_ops.recvmsg(a,n);return s?(e.set(s.buffer,t),s.buffer.length):0},write:function(r,e,t,n,o){var a=r.node.sock;return a.sock_ops.sendmsg(a,e,t,n)},close:function(r){var e=r.node.sock;e.sock_ops.close(e)}},nextname:function(){return cr.nextname.current||(cr.nextname.current=0),"socket["+cr.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(r,e,t){var n;if("object"==typeof e&&(n=e,e=null,t=null),n)if(n._socket)e=n._socket.remoteAddress,t=n._socket.remotePort;else{var o=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!o)throw new Error("WebSocket URL must be in the format ws(s)://address:port");e=o[1],t=parseInt(o[2],10)}else try{var s=a.websocket&&"object"==typeof a.websocket,i="ws:#".replace("#","//");if(s&&"string"==typeof a.websocket.url&&(i=a.websocket.url),"ws://"===i||"wss://"===i){var u=e.split("/");i=i+u[0]+":"+t+"/"+u.slice(1).join("/")}var c="binary";s&&"string"==typeof a.websocket.subprotocol&&(c=a.websocket.subprotocol);var d=void 0;"null"!==c&&(d=c=c.replace(/^ +| +$/g,"").split(/ *, */)),s&&null===a.websocket.subprotocol&&(c="null",d=void 0),(n=new WebSocket(i,d)).binaryType="arraybuffer"}catch(r){throw new ur.ErrnoError(23)}var f={addr:e,port:t,socket:n,dgram_send_queue:[]};return cr.websocket_sock_ops.addPeer(r,f),cr.websocket_sock_ops.handlePeerEvents(r,f),2===r.type&&void 0!==r.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&r.sport)>>8,255&r.sport])),f},getPeer:function(r,e,t){return r.peers[e+":"+t]},addPeer:function(r,e){r.peers[e.addr+":"+e.port]=e},removePeer:function(r,e){delete r.peers[e.addr+":"+e.port]},handlePeerEvents:function(r,e){var t=!0,n=function(){a.websocket.emit("open",r.stream.fd);try{for(var t=e.dgram_send_queue.shift();t;)e.socket.send(t),t=e.dgram_send_queue.shift()}catch(r){e.socket.close()}};function o(n){if("string"==typeof n)n=(new TextEncoder).encode(n);else{if(b(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var o=t;if(t=!1,o&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var s=n[8]<<8|n[9];return cr.websocket_sock_ops.removePeer(r,e),e.port=s,void cr.websocket_sock_ops.addPeer(r,e)}r.recv_queue.push({addr:e.addr,port:e.port,data:n}),a.websocket.emit("message",r.stream.fd)}h?(e.socket.on("open",n),e.socket.on("message",(function(r,e){e&&o(new Uint8Array(r).buffer)})),e.socket.on("close",(function(){a.websocket.emit("close",r.stream.fd)})),e.socket.on("error",(function(e){r.error=14,a.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])}))):(e.socket.onopen=n,e.socket.onclose=function(){a.websocket.emit("close",r.stream.fd)},e.socket.onmessage=function(r){o(r.data)},e.socket.onerror=function(e){r.error=14,a.websocket.emit("error",[r.stream.fd,r.error,"ECONNREFUSED: Connection refused"])})},poll:function(r){if(1===r.type&&r.server)return r.pending.length?65:0;var e=0,t=1===r.type?cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport):null;return(r.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(e|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(e|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(e|=16),e},ioctl:function(r,e,t){if(21531===e){var n=0;return r.recv_queue.length&&(n=r.recv_queue[0].data.length),P[t>>2]=n,0}return 28},close:function(r){if(r.server){try{r.server.close()}catch(r){}r.server=null}for(var e=Object.keys(r.peers),t=0;t<e.length;t++){var n=r.peers[e[t]];try{n.socket.close()}catch(r){}cr.websocket_sock_ops.removePeer(r,n)}return 0},bind:function(r,e,t){if(void 0!==r.saddr||void 0!==r.sport)throw new ur.ErrnoError(28);if(r.saddr=e,r.sport=t,2===r.type){r.server&&(r.server.close(),r.server=null);try{r.sock_ops.listen(r,0)}catch(r){if(!(r instanceof ur.ErrnoError))throw r;if(138!==r.errno)throw r}}},connect:function(r,e,t){if(r.server)throw new ur.ErrnoError(138);if(void 0!==r.daddr&&void 0!==r.dport){var n=cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new ur.ErrnoError(7):new ur.ErrnoError(30)}var o=cr.websocket_sock_ops.createPeer(r,e,t);throw r.daddr=o.addr,r.dport=o.port,new ur.ErrnoError(26)},listen:function(r,e){if(!h)throw new ur.ErrnoError(138)},accept:function(r){if(!r.server||!r.pending.length)throw new ur.ErrnoError(28);var e=r.pending.shift();return e.stream.flags=r.stream.flags,e},getname:function(r,e){var t,n;if(e){if(void 0===r.daddr||void 0===r.dport)throw new ur.ErrnoError(53);t=r.daddr,n=r.dport}else t=r.saddr||0,n=r.sport||0;return{addr:t,port:n}},sendmsg:function(r,e,t,n,o,a){if(2===r.type){if(void 0!==o&&void 0!==a||(o=r.daddr,a=r.dport),void 0===o||void 0===a)throw new ur.ErrnoError(17)}else o=r.daddr,a=r.dport;var s,i=cr.websocket_sock_ops.getPeer(r,o,a);if(1===r.type){if(!i||i.socket.readyState===i.socket.CLOSING||i.socket.readyState===i.socket.CLOSED)throw new ur.ErrnoError(53);if(i.socket.readyState===i.socket.CONNECTING)throw new ur.ErrnoError(6)}if(ArrayBuffer.isView(e)&&(t+=e.byteOffset,e=e.buffer),s=e.slice(t,t+n),2===r.type&&(!i||i.socket.readyState!==i.socket.OPEN))return i&&i.socket.readyState!==i.socket.CLOSING&&i.socket.readyState!==i.socket.CLOSED||(i=cr.websocket_sock_ops.createPeer(r,o,a)),i.dgram_send_queue.push(s),n;try{return i.socket.send(s),n}catch(r){throw new ur.ErrnoError(28)}},recvmsg:function(r,e){if(1===r.type&&r.server)throw new ur.ErrnoError(53);var t=r.recv_queue.shift();if(!t){if(1===r.type){var n=cr.websocket_sock_ops.getPeer(r,r.daddr,r.dport);if(!n)throw new ur.ErrnoError(53);if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new ur.ErrnoError(6)}throw new ur.ErrnoError(6)}var o=t.data.byteLength||t.data.length,a=t.data.byteOffset||0,s=t.data.buffer||t.data,i=Math.min(e,o),u={buffer:new Uint8Array(s,a,i),addr:t.addr,port:t.port};if(1===r.type&&i<o){var c=o-i;t.data=new Uint8Array(s,a+i,c),r.recv_queue.unshift(t)}return u}}};function dr(r){var e=cr.getSocket(r);if(!e)throw new ur.ErrnoError(8);return e}function fr(r){for(var e=r.split("."),t=0;t<4;t++){var n=Number(e[t]);if(isNaN(n))return null;e[t]=n}return(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0}function lr(r){return parseInt(r)}function pr(r){var e,t,n,o,a=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(r))return null;if("::"===r)return[0,0,0,0,0,0,0,0];for((r=r.startsWith("::")?r.replace("::","Z:"):r.replace("::",":Z:")).indexOf(".")>0?((e=(r=r.replace(new RegExp("[.]","g"),":")).split(":"))[e.length-4]=lr(e[e.length-4])+256*lr(e[e.length-3]),e[e.length-3]=lr(e[e.length-2])+256*lr(e[e.length-1]),e=e.slice(0,e.length-2)):e=r.split(":"),n=0,o=0,t=0;t<e.length;t++)if("string"==typeof e[t])if("Z"===e[t]){for(o=0;o<8-e.length+1;o++)a[t+o]=0;n=o-1}else a[t+n]=Br(parseInt(e[t],16));else a[t+n]=e[t];return[a[1]<<16|a[0],a[3]<<16|a[2],a[5]<<16|a[4],a[7]<<16|a[6]]}function mr(r,e,t,n,o){switch(e){case 2:t=fr(t),ar(r,16),o&&(P[o>>2]=16),A[r>>1]=e,P[r+4>>2]=t,A[r+2>>1]=Br(n);break;case 10:t=pr(t),ar(r,28),o&&(P[o>>2]=28),P[r>>2]=e,P[r+8>>2]=t[0],P[r+12>>2]=t[1],P[r+16>>2]=t[2],P[r+20>>2]=t[3],A[r+2>>1]=Br(n);break;default:return 5}return 0}var hr={address_map:{id:1,addrs:{},names:{}},lookup_name:function(r){var e,t=fr(r);if(null!==t)return r;if(null!==(t=pr(r)))return r;if(hr.address_map.addrs[r])e=hr.address_map.addrs[r];else{var n=hr.address_map.id++;b(n<65535,"exceeded max address mappings of 65535"),e="172.29."+(255&n)+"."+(65280&n),hr.address_map.names[e]=r,hr.address_map.addrs[r]=e}return e},lookup_addr:function(r){return hr.address_map.names[r]?hr.address_map.names[r]:null}},wr={DEFAULT_POLLMASK:5,calculateAt:function(r,e,t){if(er.isAbs(e))return e;var n;if(n=-100===r?ur.cwd():wr.getStreamFromFD(r).path,0==e.length){if(!t)throw new ur.ErrnoError(44);return n}return er.join2(n,e)},doStat:function(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&er.normalize(e)!==er.normalize(ur.getPath(r.node)))return-54;throw r}P[t>>2]=n.dev,P[t+8>>2]=n.ino,P[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,P[t+20>>2]=n.uid,P[t+24>>2]=n.gid,P[t+28>>2]=n.rdev,I=[n.size>>>0,(z=n.size,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+40>>2]=I[0],P[t+44>>2]=I[1],P[t+48>>2]=4096,P[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),s=n.ctime.getTime();return I=[Math.floor(o/1e3)>>>0,(z=Math.floor(o/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+56>>2]=I[0],P[t+60>>2]=I[1],x[t+64>>2]=o%1e3*1e3,I=[Math.floor(a/1e3)>>>0,(z=Math.floor(a/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+72>>2]=I[0],P[t+76>>2]=I[1],x[t+80>>2]=a%1e3*1e3,I=[Math.floor(s/1e3)>>>0,(z=Math.floor(s/1e3),+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+88>>2]=I[0],P[t+92>>2]=I[1],x[t+96>>2]=s%1e3*1e3,I=[n.ino>>>0,(z=n.ino,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[t+104>>2]=I[0],P[t+108>>2]=I[1],0},doMsync:function(r,e,t,n,o){if(!ur.isFile(e.node.mode))throw new ur.ErrnoError(43);if(2&n)return 0;var a=M.slice(r,r+t);ur.msync(e,a,o,t,n)},varargs:void 0,get:function(){return wr.varargs+=4,P[wr.varargs-4>>2]},getStr:function(r){return R(r)},getStreamFromFD:function(r){var e=ur.getStream(r);if(!e)throw new ur.ErrnoError(8);return e}};function vr(r){return(255&r)+"."+(r>>8&255)+"."+(r>>16&255)+"."+(r>>24&255)}function yr(r){var e="",t=0,n=0,o=0,a=0,s=0,i=0,u=[65535&r[0],r[0]>>16,65535&r[1],r[1]>>16,65535&r[2],r[2]>>16,65535&r[3],r[3]>>16],c=!0,d="";for(i=0;i<5;i++)if(0!==u[i]){c=!1;break}if(c){if(d=vr(u[6]|u[7]<<16),-1===u[5])return(e="::ffff:")+d;if(0===u[5])return"0.0.0.0"===d&&(d=""),"0.0.0.1"===d&&(d="1"),(e="::")+d}for(t=0;t<8;t++)0===u[t]&&(t-o>1&&(s=0),o=t,s++),s>n&&(a=t-(n=s)+1);for(t=0;t<8;t++)n>1&&0===u[t]&&t>=a&&t<a+n?t===a&&(e+=":",0===a&&(e+=":")):(e+=Number(zr(65535&u[t])).toString(16),e+=t<7?":":"");return e}function gr(r,e,t){if(t&&0===r)return null;var n=function(r,e){var t,n=A[r>>1],o=zr(F[r+2>>1]);switch(n){case 2:if(16!==e)return{errno:28};t=vr(t=P[r+4>>2]);break;case 10:if(28!==e)return{errno:28};t=yr(t=[P[r+8>>2],P[r+12>>2],P[r+16>>2],P[r+20>>2]]);break;default:return{errno:5}}return{family:n,addr:t,port:o}}(r,e);if(n.errno)throw new ur.ErrnoError(n.errno);return n.addr=hr.lookup_addr(n.addr)||n.addr,n}function Er(r){return r%4==0&&(r%100!=0||r%400==0)}var _r,kr=[0,31,60,91,121,152,182,213,244,274,305,335],br=[0,31,59,90,120,151,181,212,243,273,304,334];function Sr(r){var e=T(r)+1,t=jr(e);return t&&C(r,D,t,e),t}function Dr(r){try{return E.grow(r-S.byteLength+65535>>>16),j(E.buffer),1}catch(r){}}_r=()=>performance.now();var Mr={};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",_:f||"./this.program"};for(var e in Mr)void 0===Mr[e]?delete r[e]:r[e]=Mr[e];var t=[];for(var e in r)t.push(e+"="+r[e]);Ar.strings=t}return Ar.strings}var Fr=[31,29,31,30,31,30,31,31,30,31,30,31],Pr=[31,28,31,30,31,30,31,31,30,31,30,31];function xr(r,e){D.set(r,e)}function Or(r){return a["_"+r]}function Nr(r,e,t,n,o){var a={string:r=>{var e=0;if(null!=r&&0!==r){var t=1+(r.length<<2);!function(r,e,t){C(r,M,e,t)}(r,e=Yr(t),t)}return e},array:r=>{var e=Yr(r.length);return xr(r,e),e}},s=Or(r),i=[],u=0;if(n)for(var c=0;c<n.length;c++){var d=a[t[c]];d?(0===u&&(u=Hr()),i[c]=d(n[c])):i[c]=n[c]}var f=s.apply(null,i);return function(r){return 0!==u&&qr(u),function(r){return"string"===e?R(r):"boolean"===e?Boolean(r):r}(r)}(f)}var Rr=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=ur.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Rr.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return ur.isDir(this.mode)}},isDevice:{get:function(){return ur.isChrdev(this.mode)}}}),ur.FSNode=Rr,ur.staticInit();var Cr,Tr={a:function(r,e,t){throw new rr(r).init(e,t),r},r:function(r,e,t,n){try{var o=dr(r),a=o.sock_ops.accept(o);return e&&mr(e,a.family,hr.lookup_name(a.daddr),a.dport,t),a.stream.fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},q:function(r,e,t){try{var n=dr(r),o=gr(e,t);return n.sock_ops.connect(n,o.addr,o.port),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},b:function(r,e,t){wr.varargs=t;try{var n=wr.getStreamFromFD(r);switch(e){case 0:return(o=wr.get())<0?-28:ur.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=wr.get();return n.flags|=o,0;case 5:return o=wr.get(),A[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return P[Lr()>>2]=28,-1}}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},p:function(r,e,t,n,o){try{var a=dr(r);return 1===e&&4===t?(P[n>>2]=a.error,P[o>>2]=4,a.error=null,0):-50}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},x:function(r,e,t){try{for(var n=0,o=0;o<e;o++){var a=r+8*o,s=P[a>>2],i=A[a+4>>1],u=32,c=ur.getStream(s);c&&(u=wr.DEFAULT_POLLMASK,c.stream_ops.poll&&(u=c.stream_ops.poll(c))),(u&=24|i)&&n++,A[a+6>>1]=u}return n}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},o:function(r,e,t,n,o,a){try{var s=dr(r),i=s.sock_ops.recvmsg(s,t);return i?(o&&mr(o,s.family,hr.lookup_name(i.addr),i.port,a),M.set(i.buffer,e),i.buffer.byteLength):0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},n:function(r,e,t,n,o,a){try{var s=dr(r),i=gr(o,a,!0);return i?s.sock_ops.sendmsg(s,D,e,t,i.addr,i.port):ur.write(s.stream,D,e,t)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},m:function(r,e,t){try{return cr.createSocket(r,e,t).stream.fd}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},y:function(r,e){try{return r=wr.getStr(r),wr.doStat(ur.stat,r,e)}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return-r.errno}},g:function(){return!0},i:function(r,e){var t,n=new Date(1e3*(x[(t=r)>>2]+4294967296*P[t+4>>2]));P[e>>2]=n.getSeconds(),P[e+4>>2]=n.getMinutes(),P[e+8>>2]=n.getHours(),P[e+12>>2]=n.getDate(),P[e+16>>2]=n.getMonth(),P[e+20>>2]=n.getFullYear()-1900,P[e+24>>2]=n.getDay();var o=0|function(r){return(Er(r.getFullYear())?kr:br)[r.getMonth()]+r.getDate()-1}(n);P[e+28>>2]=o,P[e+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),0,1),s=new Date(n.getFullYear(),6,1).getTimezoneOffset(),i=a.getTimezoneOffset(),u=0|(s!=i&&n.getTimezoneOffset()==Math.min(i,s));P[e+32>>2]=u},j:function(r,e,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),s=o.getTimezoneOffset(),i=a.getTimezoneOffset(),u=Math.max(s,i);function c(r){var e=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}x[r>>2]=60*u,P[e>>2]=Number(s!=i);var d=c(o),f=c(a),l=Sr(d),p=Sr(f);i<s?(x[t>>2]=l,x[t+4>>2]=p):(x[t>>2]=p,x[t+4>>2]=l)},c:function(){$("")},h:function(){return Date.now()},d:_r,k:function(r,e,t){M.copyWithin(r,e,e+t)},w:function(r){var e,t=M.length,n=2147483648;if((r>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var a=t*(1+.2/o);if(a=Math.min(a,r+100663296),Dr(Math.min(n,(e=Math.max(r,a))+(65536-e%65536)%65536)))return!0}return!1},u:function(r,e){var t=0;return Ar().forEach((function(n,o){var a=e+t;x[r+4*o>>2]=a,function(r,e){for(var t=0;t<r.length;++t)D[0|e++]=r.charCodeAt(t);D[0|e]=0}(n,a),t+=n.length+1})),0},v:function(r,e){var t=Ar();x[r>>2]=t.length;var n=0;return t.forEach((function(r){n+=r.length+1})),x[e>>2]=n,0},s:function(r,e){var t;t=r,_||(a.onExit&&a.onExit(t),k=!0),l(t,new J(t))},e:function(r){try{var e=wr.getStreamFromFD(r);return ur.close(e),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},z:function(r,e,t,n){try{var o=function(r,e,t){for(var n=0,o=0;o<t;o++){var a=x[e>>2],s=x[e+4>>2];e+=8;var i=ur.read(r,D,a,s,undefined);if(i<0)return-1;if(n+=i,i<s)break}return n}(wr.getStreamFromFD(r),e,t);return x[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},l:function(r,e,t,n,o){try{var a=(u=t)+2097152>>>0<4194305-!!(i=e)?(i>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var s=wr.getStreamFromFD(r);return ur.llseek(s,a,n),I=[s.position>>>0,(z=s.position,+Math.abs(z)>=1?z>0?(0|Math.min(+Math.floor(z/4294967296),4294967295))>>>0:~~+Math.ceil((z-+(~~z>>>0))/4294967296)>>>0:0)],P[o>>2]=I[0],P[o+4>>2]=I[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}var i,u},f:function(r,e,t,n){try{var o=function(r,e,t){for(var n=0,o=0;o<t;o++){var a=x[e>>2],s=x[e+4>>2];e+=8;var i=ur.write(r,D,a,s,undefined);if(i<0)return-1;n+=i}return n}(wr.getStreamFromFD(r),e,t);return x[n>>2]=o,0}catch(r){if(void 0===ur||!(r instanceof ur.ErrnoError))throw r;return r.errno}},A:function(r,e,t,n){var o,a=0,s=0,i=0,u=0,c=0,d=0;function f(r,e,t,n,o,a){var s,i,u;return i=10===r?28:16,o=10===r?yr(o):vr(o),b(!mr(s=jr(i),r,o,a)),u=jr(32),P[u+4>>2]=r,P[u+8>>2]=e,P[u+12>>2]=t,P[u+24>>2]=n,x[u+20>>2]=s,P[u+16>>2]=10===r?28:16,P[u+28>>2]=0,u}if(t&&(i=P[t>>2],u=P[t+4>>2],c=P[t+8>>2],d=P[t+12>>2]),c&&!d&&(d=2===c?17:6),!c&&d&&(c=17===d?2:1),0===d&&(d=6),0===c&&(c=1),!r&&!e)return-2;if(-1088&i)return-1;if(0!==t&&2&P[t>>2]&&!r)return-1;if(32&i)return-2;if(0!==c&&1!==c&&2!==c)return-7;if(0!==u&&2!==u&&10!==u)return-6;if(e&&(e=R(e),s=parseInt(e,10),isNaN(s)))return 1024&i?-2:-8;if(!r)return 0===u&&(u=2),1&i||(a=2===u?Ir(2130706433):[0,0,0,1]),o=f(u,c,d,null,a,s),x[n>>2]=o,0;if(null!==(a=fr(r=R(r))))if(0===u||2===u)u=2;else{if(!(10===u&&8&i))return-2;a=[0,0,Ir(65535),a],u=10}else if(null!==(a=pr(r))){if(0!==u&&10!==u)return-2;u=10}return null!=a?(o=f(u,c,d,r,a,s),x[n>>2]=o,0):4&i?-2:(a=fr(r=hr.lookup_name(r)),0===u?u=2:10===u&&(a=[0,0,Ir(65535),a]),o=f(u,c,d,null,a,s),x[n>>2]=o,0)},t:function(r,e,t,n,o){return function(r,e,t,n){var o=P[n+40>>2],a={tm_sec:P[n>>2],tm_min:P[n+4>>2],tm_hour:P[n+8>>2],tm_mday:P[n+12>>2],tm_mon:P[n+16>>2],tm_year:P[n+20>>2],tm_wday:P[n+24>>2],tm_yday:P[n+28>>2],tm_isdst:P[n+32>>2],tm_gmtoff:P[n+36>>2],tm_zone:o?R(o):""},s=R(t),i={"%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 i)s=s.replace(new RegExp(u,"g"),i[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,e,t){for(var n="number"==typeof r?r.toString():r||"";n.length<e;)n=t[0]+n;return n}function l(r,e){return f(r,e,"0")}function p(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.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 e=function(r,e){for(var t=new Date(r.getTime());e>0;){var n=Er(t.getFullYear()),o=t.getMonth(),a=(n?Fr:Pr)[o];if(!(e>a-t.getDate()))return t.setDate(t.getDate()+e),t;e-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=m(t),a=m(n);return p(o,e)<=0?p(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var w={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return d[r.tm_mon].substring(0,3)},"%B":function(r){return d[r.tm_mon]},"%C":function(r){return l((r.tm_year+1900)/100|0,2)},"%d":function(r){return l(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return h(r).toString().substring(2)},"%G":function(r){return h(r)},"%H":function(r){return l(r.tm_hour,2)},"%I":function(r){var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),l(e,2)},"%j":function(r){return l(r.tm_mday+function(r,e){for(var t=0,n=0;n<=e;t+=r[n++]);return t}(Er(r.tm_year+1900)?Fr:Pr,r.tm_mon-1),3)},"%m":function(r){return l(r.tm_mon+1,2)},"%M":function(r){return l(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 l(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var e=r.tm_yday+7-r.tm_wday;return l(Math.floor(e/7),2)},"%V":function(r){var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&Er(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&Er(r.tm_year%400-1))&&e++}return l(e,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var e=r.tm_yday+7-(r.tm_wday+6)%7;return l(Math.floor(e/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var e=r.tm_gmtoff,t=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in s=s.replace(/%%/g,"\0\0"),w)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),w[u](a)));var v=nr(s=s.replace(/\0\0/g,"%"),!1);return v.length>e?0:(xr(v,r),v.length-1)}(r,e,t,n)}},jr=(function(){var r={a:Tr};function e(r,e){var t,n=r.exports;a.asm=n,j((E=a.asm.B).buffer),a.asm.H,t=a.asm.C,H.unshift(t),V()}function n(r){e(r.instance)}function s(e){return(v||!p&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return Z(B)})):fetch(new URL(t(686),t.b)).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+B+"'";return r.arrayBuffer()})).catch((function(){return Z(B)}))).then((function(e){return WebAssembly.instantiate(e,r)})).then((function(r){return r})).then(e,(function(r){g("failed to asynchronously prepare wasm: "+r),$(r)}))}if(X(),a.instantiateWasm)try{return a.instantiateWasm(r,e)}catch(r){g("Module.instantiateWasm callback failed with error: "+r),o(r)}(v||"function"!=typeof WebAssembly.instantiateStreaming||K(B)||"function"!=typeof fetch?s(n):fetch(new URL(t(686),t.b)).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(n,(function(r){return g("wasm streaming compile failed: "+r),g("falling back to ArrayBuffer instantiation"),s(n)}))}))).catch(o)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.C).apply(null,arguments)},a._train=function(){return(a._train=a.asm.D).apply(null,arguments)},a._free=function(){return(a._free=a.asm.E).apply(null,arguments)},a._predict=function(){return(a._predict=a.asm.F).apply(null,arguments)},a._malloc=function(){return(jr=a._malloc=a.asm.G).apply(null,arguments)}),Br=a._htons=function(){return(Br=a._htons=a.asm.I).apply(null,arguments)},Lr=a.___errno_location=function(){return(Lr=a.___errno_location=a.asm.J).apply(null,arguments)},zr=a._ntohs=function(){return(zr=a._ntohs=a.asm.K).apply(null,arguments)},Ir=a._htonl=function(){return(Ir=a._htonl=a.asm.L).apply(null,arguments)},Ur=a._emscripten_builtin_memalign=function(){return(Ur=a._emscripten_builtin_memalign=a.asm.M).apply(null,arguments)},Hr=a.stackSave=function(){return(Hr=a.stackSave=a.asm.N).apply(null,arguments)},qr=a.stackRestore=function(){return(qr=a.stackRestore=a.asm.O).apply(null,arguments)},Yr=a.stackAlloc=function(){return(Yr=a.stackAlloc=a.asm.P).apply(null,arguments)},Gr=a.___cxa_is_pointer_type=function(){return(Gr=a.___cxa_is_pointer_type=a.asm.Q).apply(null,arguments)};function Wr(r){function t(){Cr||(Cr=!0,a.calledRun=!0,k||(cr.root=ur.mount(cr,{},null),a.noFSInit||ur.init.initialized||ur.init(),ur.ignorePermissions=!1,or.init(),Q(H),e(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)r=a.postRun.shift(),q.unshift(r);var r;Q(q)}()))}r=r||d,Y>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)r=a.preRun.shift(),U.unshift(r);var r;Q(U)}(),Y>0||(a.setStatus?(a.setStatus("Running..."),setTimeout((function(){setTimeout((function(){a.setStatus("")}),1),t()}),1)):t()))}if(a.ccall=Nr,a.cwrap=function(r,e,t,n){var o=(t=t||[]).every((r=>"number"===r||"boolean"===r));return"string"!==e&&o&&!n?Or(r):function(){return Nr(r,e,t,arguments)}},W=function r(){Cr||Wr(),Cr||(W=r)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return Wr(),r.ready});"object"==typeof exports?r.exports=o:"function"==typeof define&&t.amdO?define([],(function(){return o})):"object"==typeof exports&&(exports.XGBoost=o)}},e={};function t(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return r[n](a,a.exports,t),a.loaded=!0,a.exports}t.m=r,t.amdO={},t.d=(r,e)=>{for(var n in e)t.o(e,n)&&!t.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:e[n]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),t.hmd=r=>((r=Object.create(r)).children||(r.children=[]),Object.defineProperty(r,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+r.id)}}),r),t.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{var r;t.g.importScripts&&(r=t.g.location+"");var e=t.g.document;if(!r&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(r=e.currentScript.src),!r)){var n=e.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!r||!/^http(s?):/.test(r));)r=n[o--].src}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=r})(),t.b=self.location+"";var n=t(1101);onmessage=async function(r){(0,n.p)().then((e=>{const t=r.data.features,n=r.data.target,o=r.data.samplesCount,a=r.data.featuresCount,s=r.data.modelReserve,i=r.data.utilsLength,u=r.data.iterations,c=r.data.eta,d=r.data.maxDepth,f=r.data.lambda,l=r.data.alpha,p=r.data.missingValue,m=e._malloc(o*a*4),h=e._malloc(4*o),w=e._malloc(4*s),v=e._malloc(4*i),y=e.HEAPF32,g=o*a;for(let r=0;r<g;++r)y[m/4+r]=t[r];for(let r=0;r<o;++r)y[h/4+r]=n[r];e._train(m,o,a,p,h,o,u,c,d,f,l,v,i,w,s);const E=e.HEAP32,_=E[v/4+0],k=new Int32Array(_);for(let r=0;r<_;++r)k[r]=E[w/4+r];e._free(m),e._free(h),e._free(v),e._free(w),postMessage({params:k})}))},eda={}})();
1
+ var eda;(()=>{"use strict";var e={686:(e,r,t)=>{e.exports=t.p+"77573759e3857711e15b.wasm"},1101:(e,r,t)=>{t.d(r,{p:()=>o}),e=t.hmd(e);var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var r,o,a=void 0!==(e=e||{})?e:{};a.ready=new Promise(function(e,t){r=e,o=t});var s,i,u,c=Object.assign({},a),d=[],f="./this.program",l=(e,r)=>{throw r},p="object"==typeof window,m="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,w="";(p||m)&&(m?w=self.location.href:"undefined"!=typeof document&&document.currentScript&&(w=document.currentScript.src),n&&(w=n),w=0!==w.indexOf("blob:")?w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},m&&(u=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)});var v,y=a.print||console.log.bind(console),g=a.printErr||console.warn.bind(console);Object.assign(a,c),c=null,a.arguments&&(d=a.arguments),a.thisProgram&&(f=a.thisProgram),a.quit&&(l=a.quit),a.wasmBinary&&(v=a.wasmBinary);var E,_=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var k=!1;function b(e,r){e||Z(r)}var S,D,M,A,F,P,x,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function N(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&O)return O.decode(e.subarray(r,o));for(var a="";r<o;){var s=e[r++];if(128&s){var i=63&e[r++];if(192!=(224&s)){var u=63&e[r++];if((s=224==(240&s)?(15&s)<<12|i<<6|u:(7&s)<<18|i<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|i)}else a+=String.fromCharCode(s)}return a}function R(e,r){return e?N(M,e,r):""}function C(e,r,t,n){if(!(n>0))return 0;for(var o=t,a=t+n-1,s=0;s<e.length;++s){var i=e.charCodeAt(s);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++s)),i<=127){if(t>=a)break;r[t++]=i}else if(i<=2047){if(t+1>=a)break;r[t++]=192|i>>6,r[t++]=128|63&i}else if(i<=65535){if(t+2>=a)break;r[t++]=224|i>>12,r[t++]=128|i>>6&63,r[t++]=128|63&i}else{if(t+3>=a)break;r[t++]=240|i>>18,r[t++]=128|i>>12&63,r[t++]=128|i>>6&63,r[t++]=128|63&i}}return r[t]=0,t-o}function T(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r}function j(e){S=e,a.HEAP8=D=new Int8Array(e),a.HEAP16=A=new Int16Array(e),a.HEAP32=P=new Int32Array(e),a.HEAPU8=M=new Uint8Array(e),a.HEAPU16=F=new Uint16Array(e),a.HEAPU32=x=new Uint32Array(e),a.HEAPF32=new Float32Array(e),a.HEAPF64=new Float64Array(e)}a.INITIAL_MEMORY;var B=[],L=[],z=[];function I(e){B.unshift(e)}function U(e){z.unshift(e)}var H,q,Y,G,W=0,X=null,V=null;function $(e){W++,a.monitorRunDependencies&&a.monitorRunDependencies(W)}function K(e){if(W--,a.monitorRunDependencies&&a.monitorRunDependencies(W),0==W&&(null!==X&&(clearInterval(X),X=null),V)){var r=V;V=null,r()}}function Z(e){a.onAbort&&a.onAbort(e),g(e="Aborted("+e+")"),k=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw o(r),r}function J(e){return e.startsWith("data:application/octet-stream;base64,")}function Q(e){try{if(e==H&&v)return new Uint8Array(v);if(u)return u(e);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}}function ee(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function re(e){for(;e.length>0;)e.shift()(a)}function te(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){x[this.ptr+4>>2]=e},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(e){x[this.ptr+8>>2]=e},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(e){P[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,D[this.ptr+12|0]=e},this.get_caught=function(){return 0!=D[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,D[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=D[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=P[this.ptr>>2];P[this.ptr>>2]=e+1},this.release_ref=function(){var e=P[this.ptr>>2];return P[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){x[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Xe(this.get_type()))return x[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}J(H="XGBoostAPI.wasm")||(q=H,H=a.locateFile?a.locateFile(q,w):w+q);var ne={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=ne.isAbs(e),t="/"===e.substr(-1);return(e=ne.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=ne.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=ne.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ne.normalize(e.join("/"))},join2:(e,r)=>ne.normalize(e+"/"+r)},oe={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:de.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=ne.isAbs(n)}return(r?"/":"")+(e=ne.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=oe.resolve(e).substr(1),r=oe.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),s=a,i=0;i<a;i++)if(n[i]!==o[i]){s=i;break}var u=[];for(i=s;i<n.length;i++)u.push("..");return(u=u.concat(o.slice(s))).join("/")}};function ae(e,r,t){var n=t>0?t:T(e)+1,o=new Array(n),a=C(e,o,0,o.length);return r&&(o.length=a),o}var se={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){se.ttys[e]={input:[],output:[],ops:r},de.registerDevice(e,se.stream_ops)},stream_ops:{open:function(e){var r=se.ttys[e.node.rdev];if(!r)throw new de.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new de.ErrnoError(60);for(var a=0,s=0;s<n;s++){var i;try{i=e.tty.ops.get_char(e.tty)}catch(e){throw new de.ErrnoError(29)}if(void 0===i&&0===a)throw new de.ErrnoError(6);if(null==i)break;a++,r[t+s]=i}return a&&(e.node.timestamp=Date.now()),a},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new de.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new de.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;e.input=ae(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(y(N(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(y(N(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(g(N(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync:function(e){e.output&&e.output.length>0&&(g(N(e.output,0)),e.output=[])}}};function ie(e,r){return M.fill(0,e,e+r),e}function ue(e){e=function(e){return 65536*Math.ceil(e/65536)}(e);var r=qe(65536,e);return r?ie(r,e):0}var ce={ops_table:null,mount:function(e){return ce.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(de.isBlkdev(t)||de.isFIFO(t))throw new de.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:de.chrdev_stream_ops}});var o=de.createNode(e,r,t,n);return de.isDir(o.mode)?(o.node_ops=ce.ops_table.dir.node,o.stream_ops=ce.ops_table.dir.stream,o.contents={}):de.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):de.isLink(o.mode)?(o.node_ops=ce.ops_table.link.node,o.stream_ops=ce.ops_table.link.stream):de.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[r]=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,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr:function(e){var r={};return r.dev=de.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,de.isDir(e.mode)?r.size=4096:de.isFile(e.mode)?r.size=e.usedBytes:de.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&ce.resizeFileStorage(e,r.size)},lookup:function(e,r){throw de.genericErrors[44]},mknod:function(e,r,t,n){return ce.createNode(e,r,t,n)},rename:function(e,r,t){if(de.isDir(e.mode)){var n;try{n=de.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new de.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=de.lookupNode(e,r);for(var n in t.contents)throw new de.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=ce.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!de.isLink(e.mode))throw new de.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-o,n);if(s>8&&a.subarray)r.set(a.subarray(o,o+s),t);else for(var i=0;i<s;i++)r[t+i]=a[o+i];return s},write:function(e,r,t,n,o,a){if(r.buffer===D.buffer&&(a=!1),!n)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(a)return s.contents=r.subarray(t,t+n),s.usedBytes=n,n;if(0===s.usedBytes&&0===o)return s.contents=r.slice(t,t+n),s.usedBytes=n,n;if(o+n<=s.usedBytes)return s.contents.set(r.subarray(t,t+n),o),n}if(ce.expandFileStorage(s,o+n),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(t,t+n),o);else for(var i=0;i<n;i++)s.contents[o+i]=r[t+i];return s.usedBytes=Math.max(s.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&de.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new de.ErrnoError(28);return n},allocate:function(e,r,t){ce.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o){if(!de.isFile(e.node.mode))throw new de.ErrnoError(43);var a,s,i=e.node.contents;if(2&o||i.buffer!==S){if((t>0||t+r<i.length)&&(i=i.subarray?i.subarray(t,t+r):Array.prototype.slice.call(i,t,t+r)),s=!0,!(a=ue(r)))throw new de.ErrnoError(48);D.set(i,a)}else s=!1,a=i.byteOffset;return{ptr:a,allocated:s}},msync:function(e,r,t,n,o){return ce.stream_ops.write(e,r,0,n,t,!1),0}}},de={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,r={})=>{if(!(e=oe.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new de.ErrnoError(32);for(var t=e.split("/").filter(e=>!!e),n=de.root,o="/",a=0;a<t.length;a++){var s=a===t.length-1;if(s&&r.parent)break;if(n=de.lookupNode(n,t[a]),o=ne.join2(o,t[a]),de.isMountpoint(n)&&(!s||s&&r.follow_mount)&&(n=n.mounted.root),!s||r.follow)for(var i=0;de.isLink(n.mode);){var u=de.readlink(o);if(o=oe.resolve(ne.dirname(o),u),n=de.lookupPath(o,{recurse_count:r.recurse_count+1}).node,i++>40)throw new de.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var r;;){if(de.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%de.nameTable.length},hashAddNode:e=>{var r=de.hashName(e.parent.id,e.name);e.name_next=de.nameTable[r],de.nameTable[r]=e},hashRemoveNode:e=>{var r=de.hashName(e.parent.id,e.name);if(de.nameTable[r]===e)de.nameTable[r]=e.name_next;else for(var t=de.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=de.mayLookup(e);if(t)throw new de.ErrnoError(t,e);for(var n=de.hashName(e.id,r),o=de.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return de.lookup(e,r)},createNode:(e,r,t,n)=>{var o=new de.FSNode(e,r,t,n);return de.hashAddNode(o),o},destroyNode:e=>{de.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=de.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>de.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>de.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,r)=>{try{return de.lookupNode(e,r),20}catch(e){}return de.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=de.lookupNode(e,r)}catch(e){return e.errno}var o=de.nodePermissions(e,"wx");if(o)return o;if(t){if(!de.isDir(n.mode))return 54;if(de.isRoot(n)||de.getPath(n)===de.cwd())return 10}else if(de.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?de.isLink(e.mode)?32:de.isDir(e.mode)&&("r"!==de.flagsToPermissionString(r)||512&r)?31:de.nodePermissions(e,de.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,r=de.MAX_OPEN_FDS)=>{for(var t=e;t<=r;t++)if(!de.streams[t])return t;throw new de.ErrnoError(33)},getStream:e=>de.streams[e],createStream:(e,r,t)=>{de.FSStream||(de.FSStream=function(){this.shared={}},de.FSStream.prototype={},Object.defineProperties(de.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!!(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 de.FSStream,e);var n=de.nextfd(r,t);return e.fd=n,de.streams[n]=e,e},closeStream:e=>{de.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=de.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new de.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{de.devices[e]={stream_ops:r}},getDevice:e=>de.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),de.syncFSRequests++,de.syncFSRequests>1&&g("warning: "+de.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=de.getMounts(de.root.mount),n=0;function o(e){return de.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach(r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)})},mount:(e,r,t)=>{var n,o="/"===t,a=!t;if(o&&de.root)throw new de.ErrnoError(10);if(!o&&!a){var s=de.lookupPath(t,{follow_mount:!1});if(t=s.path,n=s.node,de.isMountpoint(n))throw new de.ErrnoError(10);if(!de.isDir(n.mode))throw new de.ErrnoError(54)}var i={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(i);return u.mount=i,i.root=u,o?de.root=u:n&&(n.mounted=i,n.mount&&n.mount.mounts.push(i)),u},unmount:e=>{var r=de.lookupPath(e,{follow_mount:!1});if(!de.isMountpoint(r.node))throw new de.ErrnoError(28);var t=r.node,n=t.mounted,o=de.getMounts(n);Object.keys(de.nameTable).forEach(e=>{for(var r=de.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&de.destroyNode(r),r=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=de.lookupPath(e,{parent:!0}).node,o=ne.basename(e);if(!o||"."===o||".."===o)throw new de.ErrnoError(28);var a=de.mayCreate(n,o);if(a)throw new de.ErrnoError(a);if(!n.node_ops.mknod)throw new de.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,de.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,de.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{de.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,de.mknod(e,r,t)),symlink:(e,r)=>{if(!oe.resolve(e))throw new de.ErrnoError(44);var t=de.lookupPath(r,{parent:!0}).node;if(!t)throw new de.ErrnoError(44);var n=ne.basename(r),o=de.mayCreate(t,n);if(o)throw new de.ErrnoError(o);if(!t.node_ops.symlink)throw new de.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o=ne.dirname(e),a=ne.dirname(r),s=ne.basename(e),i=ne.basename(r);if(t=de.lookupPath(e,{parent:!0}).node,n=de.lookupPath(r,{parent:!0}).node,!t||!n)throw new de.ErrnoError(44);if(t.mount!==n.mount)throw new de.ErrnoError(75);var u,c=de.lookupNode(t,s),d=oe.relative(e,a);if("."!==d.charAt(0))throw new de.ErrnoError(28);if("."!==(d=oe.relative(r,o)).charAt(0))throw new de.ErrnoError(55);try{u=de.lookupNode(n,i)}catch(e){}if(c!==u){var f=de.isDir(c.mode),l=de.mayDelete(t,s,f);if(l)throw new de.ErrnoError(l);if(l=u?de.mayDelete(n,i,f):de.mayCreate(n,i))throw new de.ErrnoError(l);if(!t.node_ops.rename)throw new de.ErrnoError(63);if(de.isMountpoint(c)||u&&de.isMountpoint(u))throw new de.ErrnoError(10);if(n!==t&&(l=de.nodePermissions(t,"w")))throw new de.ErrnoError(l);de.hashRemoveNode(c);try{t.node_ops.rename(c,n,i)}catch(e){throw e}finally{de.hashAddNode(c)}}},rmdir:e=>{var r=de.lookupPath(e,{parent:!0}).node,t=ne.basename(e),n=de.lookupNode(r,t),o=de.mayDelete(r,t,!0);if(o)throw new de.ErrnoError(o);if(!r.node_ops.rmdir)throw new de.ErrnoError(63);if(de.isMountpoint(n))throw new de.ErrnoError(10);r.node_ops.rmdir(r,t),de.destroyNode(n)},readdir:e=>{var r=de.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new de.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=de.lookupPath(e,{parent:!0}).node;if(!r)throw new de.ErrnoError(44);var t=ne.basename(e),n=de.lookupNode(r,t),o=de.mayDelete(r,t,!1);if(o)throw new de.ErrnoError(o);if(!r.node_ops.unlink)throw new de.ErrnoError(63);if(de.isMountpoint(n))throw new de.ErrnoError(10);r.node_ops.unlink(r,t),de.destroyNode(n)},readlink:e=>{var r=de.lookupPath(e).node;if(!r)throw new de.ErrnoError(44);if(!r.node_ops.readlink)throw new de.ErrnoError(28);return oe.resolve(de.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=de.lookupPath(e,{follow:!r}).node;if(!t)throw new de.ErrnoError(44);if(!t.node_ops.getattr)throw new de.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>de.stat(e,!0),chmod:(e,r,t)=>{var n;if(!(n="string"==typeof e?de.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new de.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{de.chmod(e,r,!0)},fchmod:(e,r)=>{var t=de.getStream(e);if(!t)throw new de.ErrnoError(8);de.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;if(!(o="string"==typeof e?de.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new de.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{de.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=de.getStream(e);if(!n)throw new de.ErrnoError(8);de.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new de.ErrnoError(28);var t;if(!(t="string"==typeof e?de.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new de.ErrnoError(63);if(de.isDir(t.mode))throw new de.ErrnoError(31);if(!de.isFile(t.mode))throw new de.ErrnoError(28);var n=de.nodePermissions(t,"w");if(n)throw new de.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=de.getStream(e);if(!t)throw new de.ErrnoError(8);if(!(2097155&t.flags))throw new de.ErrnoError(28);de.truncate(t.node,r)},utime:(e,r,t)=>{var n=de.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(e,r,t)=>{if(""===e)throw new de.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?de.modeStringToFlags(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=ne.normalize(e);try{n=de.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new de.ErrnoError(20)}else n=de.mknod(e,t,0),o=!0;if(!n)throw new de.ErrnoError(44);if(de.isChrdev(n.mode)&&(r&=-513),65536&r&&!de.isDir(n.mode))throw new de.ErrnoError(54);if(!o){var s=de.mayOpen(n,r);if(s)throw new de.ErrnoError(s)}512&r&&!o&&de.truncate(n,0),r&=-131713;var i=de.createStream({node:n,path:de.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!a.logReadFiles||1&r||(de.readFiles||(de.readFiles={}),e in de.readFiles||(de.readFiles[e]=1)),i},close:e=>{if(de.isClosed(e))throw new de.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{de.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(de.isClosed(e))throw new de.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new de.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new de.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new de.ErrnoError(28);if(de.isClosed(e))throw new de.ErrnoError(8);if(1==(2097155&e.flags))throw new de.ErrnoError(8);if(de.isDir(e.node.mode))throw new de.ErrnoError(31);if(!e.stream_ops.read)throw new de.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new de.ErrnoError(70)}else o=e.position;var s=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=s),s},write:(e,r,t,n,o,a)=>{if(n<0||o<0)throw new de.ErrnoError(28);if(de.isClosed(e))throw new de.ErrnoError(8);if(!(2097155&e.flags))throw new de.ErrnoError(8);if(de.isDir(e.node.mode))throw new de.ErrnoError(31);if(!e.stream_ops.write)throw new de.ErrnoError(28);e.seekable&&1024&e.flags&&de.llseek(e,0,2);var s=void 0!==o;if(s){if(!e.seekable)throw new de.ErrnoError(70)}else o=e.position;var i=e.stream_ops.write(e,r,t,n,o,a);return s||(e.position+=i),i},allocate:(e,r,t)=>{if(de.isClosed(e))throw new de.ErrnoError(8);if(r<0||t<=0)throw new de.ErrnoError(28);if(!(2097155&e.flags))throw new de.ErrnoError(8);if(!de.isFile(e.node.mode)&&!de.isDir(e.node.mode))throw new de.ErrnoError(43);if(!e.stream_ops.allocate)throw new de.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new de.ErrnoError(2);if(1==(2097155&e.flags))throw new de.ErrnoError(2);if(!e.stream_ops.mmap)throw new de.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new de.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:(e,r={})=>{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 t,n=de.open(e,r.flags),o=de.stat(e).size,a=new Uint8Array(o);return de.read(n,a,0,o,0),"utf8"===r.encoding?t=N(a,0):"binary"===r.encoding&&(t=a),de.close(n),t},writeFile:(e,r,t={})=>{t.flags=t.flags||577;var n=de.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(T(r)+1),a=C(r,o,0,o.length);de.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");de.write(n,r,0,r.byteLength,void 0,t.canOwn)}de.close(n)},cwd:()=>de.currentPath,chdir:e=>{var r=de.lookupPath(e,{follow:!0});if(null===r.node)throw new de.ErrnoError(44);if(!de.isDir(r.node.mode))throw new de.ErrnoError(54);var t=de.nodePermissions(r.node,"x");if(t)throw new de.ErrnoError(t);de.currentPath=r.path},createDefaultDirectories:()=>{de.mkdir("/tmp"),de.mkdir("/home"),de.mkdir("/home/web_user")},createDefaultDevices:()=>{de.mkdir("/dev"),de.registerDevice(de.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),de.mkdev("/dev/null",de.makedev(1,3)),se.register(de.makedev(5,0),se.default_tty_ops),se.register(de.makedev(6,0),se.default_tty1_ops),de.mkdev("/dev/tty",de.makedev(5,0)),de.mkdev("/dev/tty1",de.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>Z("randomDevice")}();de.createDevice("/dev","random",e),de.createDevice("/dev","urandom",e),de.mkdir("/dev/shm"),de.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{de.mkdir("/proc");var e=de.mkdir("/proc/self");de.mkdir("/proc/self/fd"),de.mount({mount:()=>{var r=de.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=+r,n=de.getStream(t);if(!n)throw new de.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{a.stdin?de.createDevice("/dev","stdin",a.stdin):de.symlink("/dev/tty","/dev/stdin"),a.stdout?de.createDevice("/dev","stdout",null,a.stdout):de.symlink("/dev/tty","/dev/stdout"),a.stderr?de.createDevice("/dev","stderr",null,a.stderr):de.symlink("/dev/tty1","/dev/stderr"),de.open("/dev/stdin",0),de.open("/dev/stdout",1),de.open("/dev/stderr",1)},ensureErrnoError:()=>{de.ErrnoError||(de.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},de.ErrnoError.prototype=new Error,de.ErrnoError.prototype.constructor=de.ErrnoError,[44].forEach(e=>{de.genericErrors[e]=new de.ErrnoError(e),de.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:()=>{de.ensureErrnoError(),de.nameTable=new Array(4096),de.mount(ce,{},"/"),de.createDefaultDirectories(),de.createDefaultDevices(),de.createSpecialDirectories(),de.filesystems={MEMFS:ce}},init:(e,r,t)=>{de.init.initialized=!0,de.ensureErrnoError(),a.stdin=e||a.stdin,a.stdout=r||a.stdout,a.stderr=t||a.stderr,de.createStandardStreams()},quit:()=>{de.init.initialized=!1;for(var e=0;e<de.streams.length;e++){var r=de.streams[e];r&&de.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=de.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{e=(n=de.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=de.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=ne.basename(e),n=de.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath:(e,r,t,n)=>{e="string"==typeof e?e:de.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var s=ne.join2(e,a);try{de.mkdir(s)}catch(e){}e=s}}return s},createFile:(e,r,t,n,o)=>{var a=ne.join2("string"==typeof e?e:de.getPath(e),r),s=de.getMode(n,o);return de.create(a,s)},createDataFile:(e,r,t,n,o,a)=>{var s=r;e&&(e="string"==typeof e?e:de.getPath(e),s=r?ne.join2(e,r):e);var i=de.getMode(n,o),u=de.create(s,i);if(t){if("string"==typeof t){for(var c=new Array(t.length),d=0,f=t.length;d<f;++d)c[d]=t.charCodeAt(d);t=c}de.chmod(u,146|i);var l=de.open(u,577);de.write(l,t,0,t.length,0,a),de.close(l),de.chmod(u,i)}return u},createDevice:(e,r,t,n)=>{var o=ne.join2("string"==typeof e?e:de.getPath(e),r),a=de.getMode(!!t,!!n);de.createDevice.major||(de.createDevice.major=64);var s=de.makedev(de.createDevice.major++,0);return de.registerDevice(s,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,a)=>{for(var s=0,i=0;i<o;i++){var u;try{u=t()}catch(e){throw new de.ErrnoError(29)}if(void 0===u&&0===s)throw new de.ErrnoError(6);if(null==u)break;s++,r[n+i]=u}return s&&(e.node.timestamp=Date.now()),s},write:(e,r,t,o,a)=>{for(var s=0;s<o;s++)try{n(r[t+s])}catch(e){throw new de.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),s}}),de.mkdev(o,a,s)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=ae(s(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new de.ErrnoError(29)}},createLazyFile:(e,r,t,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,s=1048576;o||(s=n);var i=this;i.setDataGetter(e=>{var r=e*s,o=(e+1)*s-1;if(o=Math.min(o,n-1),void 0===i.chunks[e]&&(i.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==s&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ae(o.responseText||"",!0)})(r,o)),void 0===i.chunks[e])throw new Error("doXHR failed!");return i.chunks[e]}),!a&&n||(s=n=1,n=this.getter(0).length,s=n,y("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=s,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!m)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new a;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var i={isDevice:!1,contents:s}}else i={isDevice:!1,url:t};var u=de.createFile(e,r,i,n,o);i.contents?u.contents=i.contents:i.url&&(u.contents=null,u.url=i.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function d(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var s=Math.min(a.length-o,n);if(a.slice)for(var i=0;i<s;i++)r[t+i]=a[o+i];else for(i=0;i<s;i++)r[t+i]=a.get(o+i);return s}return Object.keys(u.stream_ops).forEach(e=>{var r=u.stream_ops[e];c[e]=function(){return de.forceLoadFile(u),r.apply(null,arguments)}}),c.read=(e,r,t,n,o)=>(de.forceLoadFile(u),d(e,r,t,n,o)),c.mmap=(e,r,t,n,o)=>{de.forceLoadFile(u);var a=ue(r);if(!a)throw new de.ErrnoError(48);return d(e,D,a,r,t),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(e,r,t,n,o,a,s,u,c,d)=>{var f=r?oe.resolve(ne.join2(e,r)):e;function l(t){function i(t){d&&d(),u||de.createDataFile(e,r,t,n,o,c),a&&a(),K()}Browser.handledByPreloadPlugin(t,f,i,()=>{s&&s(),K()})||i(t)}$(),"string"==typeof t?function(e,r,t){var n="al "+e;i(e,r=>{b(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),l(new Uint8Array(r)),n&&K()},r=>{if(!t)throw'Loading data file "'+e+'" failed.';t()}),n&&$()}(t,0,s):l(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=de.indexedDB();try{var o=n.open(de.DB_NAME(),de.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=()=>{y("creating db"),o.result.createObjectStore(de.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([de.DB_STORE_NAME],"readwrite"),a=n.objectStore(de.DB_STORE_NAME),s=0,i=0,u=e.length;function c(){0==i?r():t()}e.forEach(e=>{var r=a.put(de.analyzePath(e).object.contents,e);r.onsuccess=()=>{++s+i==u&&c()},r.onerror=()=>{i++,s+i==u&&c()}}),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=de.indexedDB();try{var o=n.open(de.DB_NAME(),de.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([de.DB_STORE_NAME],"readonly")}catch(e){return void t(e)}var s=a.objectStore(de.DB_STORE_NAME),i=0,u=0,c=e.length;function d(){0==u?r():t()}e.forEach(e=>{var r=s.get(e);r.onsuccess=()=>{de.analyzePath(e).exists&&de.unlink(e),de.createDataFile(ne.dirname(e),ne.basename(e),r.result,!0,!0,!0),++i+u==c&&d()},r.onerror=()=>{u++,i+u==c&&d()}}),a.onerror=t},o.onerror=t}},fe={mount:function(e){return a.websocket=a.websocket&&"object"==typeof a.websocket?a.websocket:{},a.websocket._callbacks={},a.websocket.on=function(e,r){return"function"==typeof r&&(this._callbacks[e]=r),this},a.websocket.emit=function(e,r){"function"==typeof this._callbacks[e]&&this._callbacks[e].call(this,r)},de.createNode(null,"/",16895,0)},createSocket:function(e,r,t){if(1==(r&=-526337)&&t&&6!=t)throw new de.ErrnoError(66);var n={family:e,type:r,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:fe.websocket_sock_ops},o=fe.nextname(),a=de.createNode(fe.root,o,49152,0);a.sock=n;var s=de.createStream({path:o,node:a,flags:2,seekable:!1,stream_ops:fe.stream_ops});return n.stream=s,n},getSocket:function(e){var r=de.getStream(e);return r&&de.isSocket(r.node.mode)?r.node.sock:null},stream_ops:{poll:function(e){var r=e.node.sock;return r.sock_ops.poll(r)},ioctl:function(e,r,t){var n=e.node.sock;return n.sock_ops.ioctl(n,r,t)},read:function(e,r,t,n,o){var a=e.node.sock,s=a.sock_ops.recvmsg(a,n);return s?(r.set(s.buffer,t),s.buffer.length):0},write:function(e,r,t,n,o){var a=e.node.sock;return a.sock_ops.sendmsg(a,r,t,n)},close:function(e){var r=e.node.sock;r.sock_ops.close(r)}},nextname:function(){return fe.nextname.current||(fe.nextname.current=0),"socket["+fe.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(e,r,t){var n;if("object"==typeof r&&(n=r,r=null,t=null),n)if(n._socket)r=n._socket.remoteAddress,t=n._socket.remotePort;else{var o=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!o)throw new Error("WebSocket URL must be in the format ws(s)://address:port");r=o[1],t=parseInt(o[2],10)}else try{var s=a.websocket&&"object"==typeof a.websocket,i="ws:#".replace("#","//");if(s&&"string"==typeof a.websocket.url&&(i=a.websocket.url),"ws://"===i||"wss://"===i){var u=r.split("/");i=i+u[0]+":"+t+"/"+u.slice(1).join("/")}var c="binary";s&&"string"==typeof a.websocket.subprotocol&&(c=a.websocket.subprotocol);var d=void 0;"null"!==c&&(d=c=c.replace(/^ +| +$/g,"").split(/ *, */)),s&&null===a.websocket.subprotocol&&(c="null",d=void 0),(n=new WebSocket(i,d)).binaryType="arraybuffer"}catch(e){throw new de.ErrnoError(23)}var f={addr:r,port:t,socket:n,dgram_send_queue:[]};return fe.websocket_sock_ops.addPeer(e,f),fe.websocket_sock_ops.handlePeerEvents(e,f),2===e.type&&void 0!==e.sport&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&e.sport)>>8,255&e.sport])),f},getPeer:function(e,r,t){return e.peers[r+":"+t]},addPeer:function(e,r){e.peers[r.addr+":"+r.port]=r},removePeer:function(e,r){delete e.peers[r.addr+":"+r.port]},handlePeerEvents:function(e,r){var t=!0,n=function(){a.websocket.emit("open",e.stream.fd);try{for(var t=r.dgram_send_queue.shift();t;)r.socket.send(t),t=r.dgram_send_queue.shift()}catch(e){r.socket.close()}};function o(n){if("string"==typeof n)n=(new TextEncoder).encode(n);else{if(b(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var o=t;if(t=!1,o&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var s=n[8]<<8|n[9];return fe.websocket_sock_ops.removePeer(e,r),r.port=s,void fe.websocket_sock_ops.addPeer(e,r)}e.recv_queue.push({addr:r.addr,port:r.port,data:n}),a.websocket.emit("message",e.stream.fd)}h?(r.socket.on("open",n),r.socket.on("message",function(e,r){r&&o(new Uint8Array(e).buffer)}),r.socket.on("close",function(){a.websocket.emit("close",e.stream.fd)}),r.socket.on("error",function(r){e.error=14,a.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})):(r.socket.onopen=n,r.socket.onclose=function(){a.websocket.emit("close",e.stream.fd)},r.socket.onmessage=function(e){o(e.data)},r.socket.onerror=function(r){e.error=14,a.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll:function(e){if(1===e.type&&e.server)return e.pending.length?65:0;var r=0,t=1===e.type?fe.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(r|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=16),r},ioctl:function(e,r,t){if(21531===r){var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),P[t>>2]=n,0}return 28},close:function(e){if(e.server){try{e.server.close()}catch(e){}e.server=null}for(var r=Object.keys(e.peers),t=0;t<r.length;t++){var n=e.peers[r[t]];try{n.socket.close()}catch(e){}fe.websocket_sock_ops.removePeer(e,n)}return 0},bind:function(e,r,t){if(void 0!==e.saddr||void 0!==e.sport)throw new de.ErrnoError(28);if(e.saddr=r,e.sport=t,2===e.type){e.server&&(e.server.close(),e.server=null);try{e.sock_ops.listen(e,0)}catch(e){if(!(e instanceof de.ErrnoError))throw e;if(138!==e.errno)throw e}}},connect:function(e,r,t){if(e.server)throw new de.ErrnoError(138);if(void 0!==e.daddr&&void 0!==e.dport){var n=fe.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new de.ErrnoError(7):new de.ErrnoError(30)}var o=fe.websocket_sock_ops.createPeer(e,r,t);throw e.daddr=o.addr,e.dport=o.port,new de.ErrnoError(26)},listen:function(e,r){if(!h)throw new de.ErrnoError(138)},accept:function(e){if(!e.server||!e.pending.length)throw new de.ErrnoError(28);var r=e.pending.shift();return r.stream.flags=e.stream.flags,r},getname:function(e,r){var t,n;if(r){if(void 0===e.daddr||void 0===e.dport)throw new de.ErrnoError(53);t=e.daddr,n=e.dport}else t=e.saddr||0,n=e.sport||0;return{addr:t,port:n}},sendmsg:function(e,r,t,n,o,a){if(2===e.type){if(void 0!==o&&void 0!==a||(o=e.daddr,a=e.dport),void 0===o||void 0===a)throw new de.ErrnoError(17)}else o=e.daddr,a=e.dport;var s,i=fe.websocket_sock_ops.getPeer(e,o,a);if(1===e.type){if(!i||i.socket.readyState===i.socket.CLOSING||i.socket.readyState===i.socket.CLOSED)throw new de.ErrnoError(53);if(i.socket.readyState===i.socket.CONNECTING)throw new de.ErrnoError(6)}if(ArrayBuffer.isView(r)&&(t+=r.byteOffset,r=r.buffer),s=r.slice(t,t+n),2===e.type&&(!i||i.socket.readyState!==i.socket.OPEN))return i&&i.socket.readyState!==i.socket.CLOSING&&i.socket.readyState!==i.socket.CLOSED||(i=fe.websocket_sock_ops.createPeer(e,o,a)),i.dgram_send_queue.push(s),n;try{return i.socket.send(s),n}catch(e){throw new de.ErrnoError(28)}},recvmsg:function(e,r){if(1===e.type&&e.server)throw new de.ErrnoError(53);var t=e.recv_queue.shift();if(!t){if(1===e.type){var n=fe.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(!n)throw new de.ErrnoError(53);if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new de.ErrnoError(6)}throw new de.ErrnoError(6)}var o=t.data.byteLength||t.data.length,a=t.data.byteOffset||0,s=t.data.buffer||t.data,i=Math.min(r,o),u={buffer:new Uint8Array(s,a,i),addr:t.addr,port:t.port};if(1===e.type&&i<o){var c=o-i;t.data=new Uint8Array(s,a+i,c),e.recv_queue.unshift(t)}return u}}};function le(e){var r=fe.getSocket(e);if(!r)throw new de.ErrnoError(8);return r}function pe(e){for(var r=e.split("."),t=0;t<4;t++){var n=Number(r[t]);if(isNaN(n))return null;r[t]=n}return(r[0]|r[1]<<8|r[2]<<16|r[3]<<24)>>>0}function me(e){return parseInt(e)}function he(e){var r,t,n,o,a=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(e))return null;if("::"===e)return[0,0,0,0,0,0,0,0];for((e=e.startsWith("::")?e.replace("::","Z:"):e.replace("::",":Z:")).indexOf(".")>0?((r=(e=e.replace(new RegExp("[.]","g"),":")).split(":"))[r.length-4]=me(r[r.length-4])+256*me(r[r.length-3]),r[r.length-3]=me(r[r.length-2])+256*me(r[r.length-1]),r=r.slice(0,r.length-2)):r=e.split(":"),n=0,o=0,t=0;t<r.length;t++)if("string"==typeof r[t])if("Z"===r[t]){for(o=0;o<8-r.length+1;o++)a[t+o]=0;n=o-1}else a[t+n]=ze(parseInt(r[t],16));else a[t+n]=r[t];return[a[1]<<16|a[0],a[3]<<16|a[2],a[5]<<16|a[4],a[7]<<16|a[6]]}function we(e,r,t,n,o){switch(r){case 2:t=pe(t),ie(e,16),o&&(P[o>>2]=16),A[e>>1]=r,P[e+4>>2]=t,A[e+2>>1]=ze(n);break;case 10:t=he(t),ie(e,28),o&&(P[o>>2]=28),P[e>>2]=r,P[e+8>>2]=t[0],P[e+12>>2]=t[1],P[e+16>>2]=t[2],P[e+20>>2]=t[3],A[e+2>>1]=ze(n);break;default:return 5}return 0}var ve={address_map:{id:1,addrs:{},names:{}},lookup_name:function(e){var r,t=pe(e);if(null!==t)return e;if(null!==(t=he(e)))return e;if(ve.address_map.addrs[e])r=ve.address_map.addrs[e];else{var n=ve.address_map.id++;b(n<65535,"exceeded max address mappings of 65535"),r="172.29."+(255&n)+"."+(65280&n),ve.address_map.names[r]=e,ve.address_map.addrs[e]=r}return r},lookup_addr:function(e){return ve.address_map.names[e]?ve.address_map.names[e]:null}},ye={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(ne.isAbs(r))return r;var n;if(n=-100===e?de.cwd():ye.getStreamFromFD(e).path,0==r.length){if(!t)throw new de.ErrnoError(44);return n}return ne.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&ne.normalize(r)!==ne.normalize(de.getPath(e.node)))return-54;throw e}P[t>>2]=n.dev,P[t+8>>2]=n.ino,P[t+12>>2]=n.mode,x[t+16>>2]=n.nlink,P[t+20>>2]=n.uid,P[t+24>>2]=n.gid,P[t+28>>2]=n.rdev,G=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[t+40>>2]=G[0],P[t+44>>2]=G[1],P[t+48>>2]=4096,P[t+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),s=n.ctime.getTime();return G=[Math.floor(o/1e3)>>>0,(Y=Math.floor(o/1e3),+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[t+56>>2]=G[0],P[t+60>>2]=G[1],x[t+64>>2]=o%1e3*1e3,G=[Math.floor(a/1e3)>>>0,(Y=Math.floor(a/1e3),+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[t+72>>2]=G[0],P[t+76>>2]=G[1],x[t+80>>2]=a%1e3*1e3,G=[Math.floor(s/1e3)>>>0,(Y=Math.floor(s/1e3),+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[t+88>>2]=G[0],P[t+92>>2]=G[1],x[t+96>>2]=s%1e3*1e3,G=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[t+104>>2]=G[0],P[t+108>>2]=G[1],0},doMsync:function(e,r,t,n,o){if(!de.isFile(r.node.mode))throw new de.ErrnoError(43);if(2&n)return 0;var a=M.slice(e,e+t);de.msync(r,a,o,t,n)},varargs:void 0,get:function(){return ye.varargs+=4,P[ye.varargs-4>>2]},getStr:function(e){return R(e)},getStreamFromFD:function(e){var r=de.getStream(e);if(!r)throw new de.ErrnoError(8);return r}};function ge(e){return(255&e)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255)}function Ee(e){var r="",t=0,n=0,o=0,a=0,s=0,i=0,u=[65535&e[0],e[0]>>16,65535&e[1],e[1]>>16,65535&e[2],e[2]>>16,65535&e[3],e[3]>>16],c=!0,d="";for(i=0;i<5;i++)if(0!==u[i]){c=!1;break}if(c){if(d=ge(u[6]|u[7]<<16),-1===u[5])return(r="::ffff:")+d;if(0===u[5])return"0.0.0.0"===d&&(d=""),"0.0.0.1"===d&&(d="1"),(r="::")+d}for(t=0;t<8;t++)0===u[t]&&(t-o>1&&(s=0),o=t,s++),s>n&&(a=t-(n=s)+1);for(t=0;t<8;t++)n>1&&0===u[t]&&t>=a&&t<a+n?t===a&&(r+=":",0===a&&(r+=":")):(r+=Number(Ue(65535&u[t])).toString(16),r+=t<7?":":"");return r}function _e(e,r,t){if(t&&0===e)return null;var n=function(e,r){var t,n=A[e>>1],o=Ue(F[e+2>>1]);switch(n){case 2:if(16!==r)return{errno:28};t=ge(t=P[e+4>>2]);break;case 10:if(28!==r)return{errno:28};t=Ee(t=[P[e+8>>2],P[e+12>>2],P[e+16>>2],P[e+20>>2]]);break;default:return{errno:5}}return{family:n,addr:t,port:o}}(e,r);if(n.errno)throw new de.ErrnoError(n.errno);return n.addr=ve.lookup_addr(n.addr)||n.addr,n}function ke(e){return e%4==0&&(e%100!=0||e%400==0)}var be,Se=[0,31,60,91,121,152,182,213,244,274,305,335],De=[0,31,59,90,120,151,181,212,243,273,304,334];function Me(e){var r=T(e)+1,t=Le(r);return t&&C(e,D,t,r),t}function Ae(e){try{return E.grow(e-S.byteLength+65535>>>16),j(E.buffer),1}catch(e){}}be=()=>performance.now();var Fe={};function Pe(){if(!Pe.strings){var e={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",_:f||"./this.program"};for(var r in Fe)void 0===Fe[r]?delete e[r]:e[r]=Fe[r];var t=[];for(var r in e)t.push(r+"="+e[r]);Pe.strings=t}return Pe.strings}var xe=[31,29,31,30,31,30,31,31,30,31,30,31],Oe=[31,28,31,30,31,30,31,31,30,31,30,31];function Ne(e,r){D.set(e,r)}function Re(e){return a["_"+e]}function Ce(e,r,t,n,o){var a={string:e=>{var r=0;if(null!=e&&0!==e){var t=1+(e.length<<2);!function(e,r,t){C(e,M,r,t)}(e,r=We(t),t)}return r},array:e=>{var r=We(e.length);return Ne(e,r),r}},s=Re(e),i=[],u=0;if(n)for(var c=0;c<n.length;c++){var d=a[t[c]];d?(0===u&&(u=Ye()),i[c]=d(n[c])):i[c]=n[c]}var f=s.apply(null,i);return function(e){return 0!==u&&Ge(u),function(e){return"string"===r?R(e):"boolean"===r?Boolean(e):e}(e)}(f)}var Te=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=de.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Te.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return de.isDir(this.mode)}},isDevice:{get:function(){return de.isChrdev(this.mode)}}}),de.FSNode=Te,de.staticInit();var je,Be={a:function(e,r,t){throw new te(e).init(r,t),e},r:function(e,r,t,n){try{var o=le(e),a=o.sock_ops.accept(o);return r&&we(r,a.family,ve.lookup_name(a.daddr),a.dport,t),a.stream.fd}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},q:function(e,r,t){try{var n=le(e),o=_e(r,t);return n.sock_ops.connect(n,o.addr,o.port),0}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},b:function(e,r,t){ye.varargs=t;try{var n=ye.getStreamFromFD(e);switch(r){case 0:return(o=ye.get())<0?-28:de.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=ye.get();return n.flags|=o,0;case 5:return o=ye.get(),A[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return P[Ie()>>2]=28,-1}}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},p:function(e,r,t,n,o){try{var a=le(e);return 1===r&&4===t?(P[n>>2]=a.error,P[o>>2]=4,a.error=null,0):-50}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},x:function(e,r,t){try{for(var n=0,o=0;o<r;o++){var a=e+8*o,s=P[a>>2],i=A[a+4>>1],u=32,c=de.getStream(s);c&&(u=ye.DEFAULT_POLLMASK,c.stream_ops.poll&&(u=c.stream_ops.poll(c))),(u&=24|i)&&n++,A[a+6>>1]=u}return n}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},o:function(e,r,t,n,o,a){try{var s=le(e),i=s.sock_ops.recvmsg(s,t);return i?(o&&we(o,s.family,ve.lookup_name(i.addr),i.port,a),M.set(i.buffer,r),i.buffer.byteLength):0}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},n:function(e,r,t,n,o,a){try{var s=le(e),i=_e(o,a,!0);return i?s.sock_ops.sendmsg(s,D,r,t,i.addr,i.port):de.write(s.stream,D,r,t)}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},m:function(e,r,t){try{return fe.createSocket(e,r,t).stream.fd}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},y:function(e,r){try{return e=ye.getStr(e),ye.doStat(de.stat,e,r)}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return-e.errno}},g:function(){return!0},i:function(e,r){var t,n=new Date(1e3*(x[(t=e)>>2]+4294967296*P[t+4>>2]));P[r>>2]=n.getSeconds(),P[r+4>>2]=n.getMinutes(),P[r+8>>2]=n.getHours(),P[r+12>>2]=n.getDate(),P[r+16>>2]=n.getMonth(),P[r+20>>2]=n.getFullYear()-1900,P[r+24>>2]=n.getDay();var o=0|function(e){return(ke(e.getFullYear())?Se:De)[e.getMonth()]+e.getDate()-1}(n);P[r+28>>2]=o,P[r+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),0,1),s=new Date(n.getFullYear(),6,1).getTimezoneOffset(),i=a.getTimezoneOffset(),u=0|(s!=i&&n.getTimezoneOffset()==Math.min(i,s));P[r+32>>2]=u},j:function(e,r,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),s=o.getTimezoneOffset(),i=a.getTimezoneOffset(),u=Math.max(s,i);function c(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}x[e>>2]=60*u,P[r>>2]=Number(s!=i);var d=c(o),f=c(a),l=Me(d),p=Me(f);i<s?(x[t>>2]=l,x[t+4>>2]=p):(x[t>>2]=p,x[t+4>>2]=l)},c:function(){Z("")},h:function(){return Date.now()},d:be,k:function(e,r,t){M.copyWithin(e,r,r+t)},w:function(e){var r=M.length,t=2147483648;if((e>>>=0)>t)return!1;let n=(e,r)=>e+(r-e%r)%r;for(var o=1;o<=4;o*=2){var a=r*(1+.2/o);if(a=Math.min(a,e+100663296),Ae(Math.min(t,n(Math.max(e,a),65536))))return!0}return!1},u:function(e,r){var t=0;return Pe().forEach(function(n,o){var a=r+t;x[e+4*o>>2]=a,function(e,r){for(var t=0;t<e.length;++t)D[0|r++]=e.charCodeAt(t);D[0|r]=0}(n,a),t+=n.length+1}),0},v:function(e,r){var t=Pe();x[e>>2]=t.length;var n=0;return t.forEach(function(e){n+=e.length+1}),x[r>>2]=n,0},s:function(e,r){var t;t=e,_||(a.onExit&&a.onExit(t),k=!0),l(t,new ee(t))},e:function(e){try{var r=ye.getStreamFromFD(e);return de.close(r),0}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return e.errno}},z:function(e,r,t,n){try{var o=function(e,r,t){for(var n=0,o=0;o<t;o++){var a=x[r>>2],s=x[r+4>>2];r+=8;var i=de.read(e,D,a,s,undefined);if(i<0)return-1;if(n+=i,i<s)break}return n}(ye.getStreamFromFD(e),r,t);return x[n>>2]=o,0}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return e.errno}},l:function(e,r,t,n,o){try{var a=(u=t)+2097152>>>0<4194305-!!(i=r)?(i>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var s=ye.getStreamFromFD(e);return de.llseek(s,a,n),G=[s.position>>>0,(Y=s.position,+Math.abs(Y)>=1?Y>0?(0|Math.min(+Math.floor(Y/4294967296),4294967295))>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],P[o>>2]=G[0],P[o+4>>2]=G[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return e.errno}var i,u},f:function(e,r,t,n){try{var o=function(e,r,t){for(var n=0,o=0;o<t;o++){var a=x[r>>2],s=x[r+4>>2];r+=8;var i=de.write(e,D,a,s,undefined);if(i<0)return-1;n+=i}return n}(ye.getStreamFromFD(e),r,t);return x[n>>2]=o,0}catch(e){if(void 0===de||!(e instanceof de.ErrnoError))throw e;return e.errno}},A:function(e,r,t,n){var o,a=0,s=0,i=0,u=0,c=0,d=0;function f(e,r,t,n,o,a){var s,i,u;return i=10===e?28:16,o=10===e?Ee(o):ge(o),b(!we(s=Le(i),e,o,a)),u=Le(32),P[u+4>>2]=e,P[u+8>>2]=r,P[u+12>>2]=t,P[u+24>>2]=n,x[u+20>>2]=s,P[u+16>>2]=10===e?28:16,P[u+28>>2]=0,u}if(t&&(i=P[t>>2],u=P[t+4>>2],c=P[t+8>>2],d=P[t+12>>2]),c&&!d&&(d=2===c?17:6),!c&&d&&(c=17===d?2:1),0===d&&(d=6),0===c&&(c=1),!e&&!r)return-2;if(-1088&i)return-1;if(0!==t&&2&P[t>>2]&&!e)return-1;if(32&i)return-2;if(0!==c&&1!==c&&2!==c)return-7;if(0!==u&&2!==u&&10!==u)return-6;if(r&&(r=R(r),s=parseInt(r,10),isNaN(s)))return 1024&i?-2:-8;if(!e)return 0===u&&(u=2),1&i||(a=2===u?He(2130706433):[0,0,0,1]),o=f(u,c,d,null,a,s),x[n>>2]=o,0;if(null!==(a=pe(e=R(e))))if(0===u||2===u)u=2;else{if(!(10===u&&8&i))return-2;a=[0,0,He(65535),a],u=10}else if(null!==(a=he(e))){if(0!==u&&10!==u)return-2;u=10}return null!=a?(o=f(u,c,d,e,a,s),x[n>>2]=o,0):4&i?-2:(a=pe(e=ve.lookup_name(e)),0===u?u=2:10===u&&(a=[0,0,He(65535),a]),o=f(u,c,d,null,a,s),x[n>>2]=o,0)},t:function(e,r,t,n,o){return function(e,r,t,n){var o=P[n+40>>2],a={tm_sec:P[n>>2],tm_min:P[n+4>>2],tm_hour:P[n+8>>2],tm_mday:P[n+12>>2],tm_mon:P[n+16>>2],tm_year:P[n+20>>2],tm_wday:P[n+24>>2],tm_yday:P[n+28>>2],tm_isdst:P[n+32>>2],tm_gmtoff:P[n+36>>2],tm_zone:o?R(o):""},s=R(t),i={"%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 i)s=s.replace(new RegExp(u,"g"),i[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function l(e,r){return f(e,r,"0")}function p(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function m(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 h(e){var r=function(e,r){for(var t=new Date(e.getTime());r>0;){var n=ke(t.getFullYear()),o=t.getMonth(),a=(n?xe:Oe)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=m(t),a=m(n);return p(o,r)<=0?p(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var w={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return d[e.tm_mon].substring(0,3)},"%B":function(e){return d[e.tm_mon]},"%C":function(e){return l((e.tm_year+1900)/100|0,2)},"%d":function(e){return l(e.tm_mday,2)},"%e":function(e){return f(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return l(e.tm_hour,2)},"%I":function(e){var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),l(r,2)},"%j":function(e){return l(e.tm_mday+function(e,r){for(var t=0,n=0;n<=r;t+=e[n++]);return t}(ke(e.tm_year+1900)?xe:Oe,e.tm_mon-1),3)},"%m":function(e){return l(e.tm_mon+1,2)},"%M":function(e){return l(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 l(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var r=e.tm_yday+7-e.tm_wday;return l(Math.floor(r/7),2)},"%V":function(e){var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&ke(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&ke(e.tm_year%400-1))&&r++}return l(r,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var r=e.tm_yday+7-(e.tm_wday+6)%7;return l(Math.floor(r/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 r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in s=s.replace(/%%/g,"\0\0"),w)s.includes(u)&&(s=s.replace(new RegExp(u,"g"),w[u](a)));var v=ae(s=s.replace(/\0\0/g,"%"),!1);return v.length>r?0:(Ne(v,e),v.length-1)}(e,r,t,n)}},Le=(function(){var e={a:Be};function r(e,r){var t,n=e.exports;a.asm=n,j((E=a.asm.B).buffer),a.asm.H,t=a.asm.C,L.unshift(t),K()}function n(e){r(e.instance)}function s(r){return(v||!p&&!m||"function"!=typeof fetch?Promise.resolve().then(function(){return Q(H)}):fetch(new URL(t(686),t.b)).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+H+"'";return e.arrayBuffer()}).catch(function(){return Q(H)})).then(function(r){return WebAssembly.instantiate(r,e)}).then(function(e){return e}).then(r,function(e){g("failed to asynchronously prepare wasm: "+e),Z(e)})}if($(),a.instantiateWasm)try{return a.instantiateWasm(e,r)}catch(e){g("Module.instantiateWasm callback failed with error: "+e),o(e)}(v||"function"!=typeof WebAssembly.instantiateStreaming||J(H)||"function"!=typeof fetch?s(n):fetch(new URL(t(686),t.b)).then(function(r){return WebAssembly.instantiateStreaming(r,e).then(n,function(e){return g("wasm streaming compile failed: "+e),g("falling back to ArrayBuffer instantiation"),s(n)})})).catch(o)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.C).apply(null,arguments)},a._train=function(){return(a._train=a.asm.D).apply(null,arguments)},a._free=function(){return(a._free=a.asm.E).apply(null,arguments)},a._predict=function(){return(a._predict=a.asm.F).apply(null,arguments)},a._malloc=function(){return(Le=a._malloc=a.asm.G).apply(null,arguments)}),ze=a._htons=function(){return(ze=a._htons=a.asm.I).apply(null,arguments)},Ie=a.___errno_location=function(){return(Ie=a.___errno_location=a.asm.J).apply(null,arguments)},Ue=a._ntohs=function(){return(Ue=a._ntohs=a.asm.K).apply(null,arguments)},He=a._htonl=function(){return(He=a._htonl=a.asm.L).apply(null,arguments)},qe=a._emscripten_builtin_memalign=function(){return(qe=a._emscripten_builtin_memalign=a.asm.M).apply(null,arguments)},Ye=a.stackSave=function(){return(Ye=a.stackSave=a.asm.N).apply(null,arguments)},Ge=a.stackRestore=function(){return(Ge=a.stackRestore=a.asm.O).apply(null,arguments)},We=a.stackAlloc=function(){return(We=a.stackAlloc=a.asm.P).apply(null,arguments)},Xe=a.___cxa_is_pointer_type=function(){return(Xe=a.___cxa_is_pointer_type=a.asm.Q).apply(null,arguments)};function Ve(e){function t(){je||(je=!0,a.calledRun=!0,k||(fe.root=de.mount(fe,{},null),a.noFSInit||de.init.initialized||de.init(),de.ignorePermissions=!1,se.init(),re(L),r(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)U(a.postRun.shift());re(z)}()))}e=e||d,W>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)I(a.preRun.shift());re(B)}(),W>0||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),t()},1)):t()))}if(a.ccall=Ce,a.cwrap=function(e,r,t,n){var o=(t=t||[]).every(e=>"number"===e||"boolean"===e);return"string"!==r&&o&&!n?Re(e):function(){return Ce(e,r,t,arguments)}},V=function e(){je||Ve(),je||(V=e)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return Ve(),e.ready});"object"==typeof exports?e.exports=o:"function"==typeof define&&t.amdO?define([],function(){return o}):"object"==typeof exports&&(exports.XGBoost=o)}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var a=r[n]={id:n,loaded:!1,exports:{}};return e[n](a,a.exports,t),a.loaded=!0,a.exports}t.m=e,t.amdO={},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var r=t.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var n=r.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})(),t.b=self.location+"";var n=t(1101);onmessage=async function(e){(0,n.p)().then(r=>{const t=e.data.features,n=e.data.target,o=e.data.samplesCount,a=e.data.featuresCount,s=e.data.modelReserve,i=e.data.utilsLength,u=e.data.iterations,c=e.data.eta,d=e.data.maxDepth,f=e.data.lambda,l=e.data.alpha,p=e.data.missingValue,m=r._malloc(o*a*4),h=r._malloc(4*o),w=r._malloc(4*s),v=r._malloc(4*i),y=r.HEAPF32,g=o*a;for(let e=0;e<g;++e)y[m/4+e]=t[e];for(let e=0;e<o;++e)y[h/4+e]=n[e];r._train(m,o,a,p,h,o,u,c,d,f,l,v,i,w,s);const E=r.HEAP32,_=E[v/4+0],k=new Int32Array(_);for(let e=0;e<_;++e)k[e]=E[w/4+e];r._free(m),r._free(h),r._free(v),r._free(w),postMessage({params:k})})},eda={}})();
2
2
  //# sourceMappingURL=990.js.map