@arcgis/core 4.30.0-next.20240402 → 4.30.0-next.20240404
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Graphic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/187d13558c818042dce2.js +2 -0
- package/assets/esri/core/workers/chunks/192b4783c7bd392f4095.js +2 -0
- package/assets/esri/core/workers/chunks/19ad69a889bf06d30f0f.js +1 -0
- package/assets/esri/core/workers/chunks/3fb75cfe3bf6261438c1.js +1 -0
- package/assets/esri/core/workers/chunks/445736c106994e792cdd.js +1 -0
- package/assets/esri/core/workers/chunks/{6443e784d4b1df548e3a.js → 4516017b51153599364f.js} +1 -1
- package/assets/esri/core/workers/chunks/4b7641b1c6c9d7bdb1b0.js +1 -0
- package/assets/esri/core/workers/chunks/52c72913758d0a87fb5e.js +1 -0
- package/assets/esri/core/workers/chunks/572bcf3f4b326c2fb4a6.js +1 -0
- package/assets/esri/core/workers/chunks/5810a48ef774bfaafb3e.js +1 -0
- package/assets/esri/core/workers/chunks/{57c7c2c5885b46a951e1.js → 5a074e8ca7c657419c46.js} +1 -1
- package/assets/esri/core/workers/chunks/6c7ec73e329218395132.js +2 -0
- package/assets/esri/core/workers/chunks/{2707b8ef8ca636e184ba.js → 838f7bd33be5a2e16553.js} +1 -1
- package/assets/esri/core/workers/chunks/{25370810357cb045c23b.js → 940ac9bd8ca35559380a.js} +1 -1
- package/assets/esri/core/workers/chunks/993e98b39e84ffe90305.js +1 -0
- package/assets/esri/core/workers/chunks/{85430aa0db62e775f8b5.js → 9affdbb59c86b84cbb31.js} +1 -1
- package/assets/esri/core/workers/chunks/a36c566ea7a650765c2e.js +1 -0
- package/assets/esri/core/workers/chunks/a6ef33c6f7d2063fd8af.js +1 -0
- package/assets/esri/core/workers/chunks/c7ef165d3ef7993ae929.js +2 -0
- package/assets/esri/core/workers/chunks/{2ee7affa1feab912dd70.js → cc02c83d69c6dca4dae2.js} +1 -1
- package/assets/esri/core/workers/chunks/f585a368008de26b54b6.js +1 -0
- package/assets/esri/themes/base/_mixins.scss +11 -0
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +4 -0
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -54
- package/assets/esri/themes/base/widgets/_Grid.scss +4 -0
- package/assets/esri/themes/base/widgets/_LayerList.scss +4 -0
- package/assets/esri/themes/base/widgets/_TableList.scss +4 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Viewshed.glsl.js +9 -9
- package/chunks/i3s.js +1 -1
- package/chunks/lclayout.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/interfaces.d.ts +133 -23
- package/layers/WMSLayer.js +1 -1
- package/layers/graphics/controllers/StreamController.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/mediaUtils.js +1 -1
- package/package.json +2 -2
- package/renderers/VectorFieldRenderer.js +1 -1
- package/rest/places.js +1 -1
- package/rest/support/PlaceResult.js +1 -1
- package/rest/support/PlacesParameters.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/I3SProjectionUtil.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentBVH.js +5 -0
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +5 -0
- package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +5 -0
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginInput.js +5 -0
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedFaceCamera.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +5 -0
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/symbols.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GraphicHandler.js +1 -1
- package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
- package/assets/esri/core/workers/chunks/052005514ce006ce0027.js +0 -1
- package/assets/esri/core/workers/chunks/078397f7c17a9bbbf8c0.js +0 -1
- package/assets/esri/core/workers/chunks/4a561d50115868d129db.js +0 -2
- package/assets/esri/core/workers/chunks/4e4c146796a47da2c5a1.js +0 -1
- package/assets/esri/core/workers/chunks/4e5e76b028022728c594.js +0 -1
- package/assets/esri/core/workers/chunks/6204698fb1f20f1b41fe.js +0 -1
- package/assets/esri/core/workers/chunks/6cf429ec513941f4a4e1.js +0 -1
- package/assets/esri/core/workers/chunks/757b3cfb82ca1eebab48.js +0 -1
- package/assets/esri/core/workers/chunks/7ce30bf0770b2b8c6f82.js +0 -1
- package/assets/esri/core/workers/chunks/81405b2bfb52dd7668c7.js +0 -1
- package/assets/esri/core/workers/chunks/c379c12ceca66cd5adc1.js +0 -2
- package/assets/esri/core/workers/chunks/d187b93d67d730621474.js +0 -1
- package/assets/esri/core/workers/chunks/e8c2ae67995f5ed46898.js +0 -2
- package/assets/esri/core/workers/chunks/ec3c06632caf9c61230e.js +0 -2
- package/assets/esri/core/workers/chunks/f9e331890bd3576e2448.js +0 -1
- /package/assets/esri/core/workers/chunks/{c379c12ceca66cd5adc1.js.LICENSE.txt → 187d13558c818042dce2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4a561d50115868d129db.js.LICENSE.txt → 192b4783c7bd392f4095.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{e8c2ae67995f5ed46898.js.LICENSE.txt → 6c7ec73e329218395132.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ec3c06632caf9c61230e.js.LICENSE.txt → c7ef165d3ef7993ae929.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2343,1053],{11053:(e,r,t)=>{t.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2343:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,o,a,i=t(11053),s={exports:{}};n=s,o="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,a=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var a,s,u=Object.assign({},n),l="./this.program",d=(e,r)=>{throw r},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),o&&(c=o),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=(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 f,h,m=n.print||console.log.bind(console),p=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(f=n.wasmBinary),"object"!=typeof WebAssembly&&O("no native wasm support detected");var v,y,w,g,E,_,b,k,F=!1;function A(e,r){e||O(r)}function S(){var e=h.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=g=new Uint16Array(e),n.HEAP32=E=new Int32Array(e),n.HEAPU32=_=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=k=new Float64Array(e)}var D=[],P=[],T=[];function $(e){D.unshift(e)}function C(e){T.unshift(e)}var M=0,j=null;function x(e){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function R(e){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&j){var r=j;j=null,r()}}function O(e){n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),F=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var z,W,N,L=e=>e.startsWith("data:application/octet-stream;base64,");function B(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function U(e,r,t){return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>B(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>B(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),O(e)}))}function I(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}L(z="lyr3DWorker.wasm")||(z=function(e){return n.locateFile?n.locateFile(e,c):c+e}(z));var H=e=>{for(;e.length>0;)e.shift()(n)},Y=n.noExitRuntime||!0;function q(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12|0]=e},this.get_caught=function(){return 0!=v[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Fr(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var V={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=V.isAbs(e),t="/"===e.substr(-1);return(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=V.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=V.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return V.normalize(e.join("/"))},join2:(e,r)=>V.normalize(e+"/"+r)},X=e=>(X=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);O("initRandomDevice")})())(e),G={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=V.isAbs(n)}return(r?"/":"")+(e=V.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=G.resolve(e).substr(1),r=G.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&J)return J.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Z=[],Q=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},ee=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function re(e,r,t){var n=t>0?t:Q(e)+1,o=new Array(n),a=ee(e,o,0,o.length);return r&&(o.length=a),o}var te={ttys:[],init(){},shutdown(){},register(e,r){te.ttys[e]={input:[],output:[],ops:r},ue.registerDevice(e,te.stream_ops)},stream_ops:{open(e){var r=te.ttys[e.node.rdev];if(!r)throw new ue.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new ue.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new ue.ErrnoError(29)}if(void 0===s&&0===a)throw new ue.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new ue.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Z.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;Z=re(e,!0)}return Z.shift()})(),put_char(e,r){null===r||10===r?(m(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(K(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(K(e.output,0)),e.output=[])}}},ne=e=>{O()},oe={ops_table:null,mount:e=>oe.createNode(null,"/",16895,0),createNode(e,r,t,n){if(ue.isBlkdev(t)||ue.isFIFO(t))throw new ue.ErrnoError(63);oe.ops_table||(oe.ops_table={dir:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,lookup:oe.node_ops.lookup,mknod:oe.node_ops.mknod,rename:oe.node_ops.rename,unlink:oe.node_ops.unlink,rmdir:oe.node_ops.rmdir,readdir:oe.node_ops.readdir,symlink:oe.node_ops.symlink},stream:{llseek:oe.stream_ops.llseek}},file:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:{llseek:oe.stream_ops.llseek,read:oe.stream_ops.read,write:oe.stream_ops.write,allocate:oe.stream_ops.allocate,mmap:oe.stream_ops.mmap,msync:oe.stream_ops.msync}},link:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,readlink:oe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:ue.chrdev_stream_ops}});var o=ue.createNode(e,r,t,n);return ue.isDir(o.mode)?(o.node_ops=oe.ops_table.dir.node,o.stream_ops=oe.ops_table.dir.stream,o.contents={}):ue.isFile(o.mode)?(o.node_ops=oe.ops_table.file.node,o.stream_ops=oe.ops_table.file.stream,o.usedBytes=0,o.contents=null):ue.isLink(o.mode)?(o.node_ops=oe.ops_table.link.node,o.stream_ops=oe.ops_table.link.stream):ue.isChrdev(o.mode)&&(o.node_ops=oe.ops_table.chrdev.node,o.stream_ops=oe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(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(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(e){var r={};return r.dev=ue.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,ue.isDir(e.mode)?r.size=4096:ue.isFile(e.mode)?r.size=e.usedBytes:ue.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(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&oe.resizeFileStorage(e,r.size)},lookup(e,r){throw ue.genericErrors[44]},mknod:(e,r,t,n)=>oe.createNode(e,r,t,n),rename(e,r,t){if(ue.isDir(e.mode)){var n;try{n=ue.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new ue.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(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=ue.lookupNode(e,r);for(var n in t.contents)throw new ue.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=oe.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!ue.isLink(e.mode))throw new ue.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(oe.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ue.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new ue.ErrnoError(28);return n},allocate(e,r,t){oe.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!ue.isFile(e.node.mode))throw new ue.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ne()))throw new ue.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(oe.stream_ops.write(e,r,0,n,t,!1),0)}},ae=(e,r,t,n)=>{var o=n?"":`al ${e}`;s(e,(t=>{A(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&R()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&x()},ie=n.preloadPlugins||[],se=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},ue={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=G.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new ue.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=ue.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=ue.lookupNode(n,t[a]),o=V.join2(o,t[a]),ue.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;ue.isLink(n.mode);){var u=ue.readlink(o);if(o=G.resolve(V.dirname(o),u),n=ue.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new ue.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(ue.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)%ue.nameTable.length},hashAddNode(e){var r=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[r],ue.nameTable[r]=e},hashRemoveNode(e){var r=ue.hashName(e.parent.id,e.name);if(ue.nameTable[r]===e)ue.nameTable[r]=e.name_next;else for(var t=ue.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=ue.mayLookup(e);if(t)throw new ue.ErrnoError(t,e);for(var n=ue.hashName(e.id,r),o=ue.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return ue.lookup(e,r)},createNode(e,r,t,n){var o=new ue.FSNode(e,r,t,n);return ue.hashAddNode(o),o},destroyNode(e){ue.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),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>ue.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>ue.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,r){try{return ue.lookupNode(e,r),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=ue.lookupNode(e,r)}catch(e){return e.errno}var o=ue.nodePermissions(e,"wx");if(o)return o;if(t){if(!ue.isDir(n.mode))return 54;if(ue.isRoot(n)||ue.getPath(n)===ue.cwd())return 10}else if(ue.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(r)||512&r)?31:ue.nodePermissions(e,ue.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=ue.MAX_OPEN_FDS;e++)if(!ue.streams[e])return e;throw new ue.ErrnoError(33)},getStreamChecked(e){var r=ue.getStream(e);if(!r)throw new ue.ErrnoError(8);return r},getStream:e=>ue.streams[e],createStream:(e,r=-1)=>(ue.FSStream||(ue.FSStream=function(){this.shared={}},ue.FSStream.prototype={},Object.defineProperties(ue.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new ue.FSStream,e),-1==r&&(r=ue.nextfd()),e.fd=r,ue.streams[r]=e,e),closeStream(e){ue.streams[e]=null},chrdev_stream_ops:{open(e){var r=ue.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new ue.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){ue.devices[e]={stream_ops:r}},getDevice:e=>ue.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),ue.syncFSRequests++,ue.syncFSRequests>1&&p(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ue.getMounts(ue.root.mount),n=0;function o(e){return ue.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&&ue.root)throw new ue.ErrnoError(10);if(!o&&!a){var i=ue.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ue.isMountpoint(n))throw new ue.ErrnoError(10);if(!ue.isDir(n.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?ue.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(r.node))throw new ue.ErrnoError(28);var t=r.node,n=t.mounted,o=ue.getMounts(n);Object.keys(ue.nameTable).forEach((e=>{for(var r=ue.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&ue.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=ue.lookupPath(e,{parent:!0}).node,o=V.basename(e);if(!o||"."===o||".."===o)throw new ue.ErrnoError(28);var a=ue.mayCreate(n,o);if(a)throw new ue.ErrnoError(a);if(!n.node_ops.mknod)throw new ue.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,ue.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,ue.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{ue.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,ue.mknod(e,r,t)),symlink(e,r){if(!G.resolve(e))throw new ue.ErrnoError(44);var t=ue.lookupPath(r,{parent:!0}).node;if(!t)throw new ue.ErrnoError(44);var n=V.basename(r),o=ue.mayCreate(t,n);if(o)throw new ue.ErrnoError(o);if(!t.node_ops.symlink)throw new ue.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=V.dirname(e),a=V.dirname(r),i=V.basename(e),s=V.basename(r);if(t=ue.lookupPath(e,{parent:!0}).node,n=ue.lookupPath(r,{parent:!0}).node,!t||!n)throw new ue.ErrnoError(44);if(t.mount!==n.mount)throw new ue.ErrnoError(75);var u,l=ue.lookupNode(t,i),d=G.relative(e,a);if("."!==d.charAt(0))throw new ue.ErrnoError(28);if("."!==(d=G.relative(r,o)).charAt(0))throw new ue.ErrnoError(55);try{u=ue.lookupNode(n,s)}catch(e){}if(l!==u){var c=ue.isDir(l.mode),f=ue.mayDelete(t,i,c);if(f)throw new ue.ErrnoError(f);if(f=u?ue.mayDelete(n,s,c):ue.mayCreate(n,s))throw new ue.ErrnoError(f);if(!t.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(l)||u&&ue.isMountpoint(u))throw new ue.ErrnoError(10);if(n!==t&&(f=ue.nodePermissions(t,"w")))throw new ue.ErrnoError(f);ue.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(e){throw e}finally{ue.hashAddNode(l)}}},rmdir(e){var r=ue.lookupPath(e,{parent:!0}).node,t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!0);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.rmdir(r,t),ue.destroyNode(n)},readdir(e){var r=ue.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new ue.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=ue.lookupPath(e,{parent:!0}).node;if(!r)throw new ue.ErrnoError(44);var t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!1);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.unlink(r,t),ue.destroyNode(n)},readlink(e){var r=ue.lookupPath(e).node;if(!r)throw new ue.ErrnoError(44);if(!r.node_ops.readlink)throw new ue.ErrnoError(28);return G.resolve(ue.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=ue.lookupPath(e,{follow:!r}).node;if(!t)throw new ue.ErrnoError(44);if(!t.node_ops.getattr)throw new ue.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>ue.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?ue.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){ue.chmod(e,r,!0)},fchmod(e,r){var t=ue.getStreamChecked(e);ue.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?ue.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){ue.chown(e,r,t,!0)},fchown(e,r,t){var n=ue.getStreamChecked(e);ue.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new ue.ErrnoError(28);var t;if(!(t="string"==typeof e?ue.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(t.mode))throw new ue.ErrnoError(31);if(!ue.isFile(t.mode))throw new ue.ErrnoError(28);var n=ue.nodePermissions(t,"w");if(n)throw new ue.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=ue.getStreamChecked(e);if(!(2097155&t.flags))throw new ue.ErrnoError(28);ue.truncate(t.node,r)},utime(e,r,t){var n=ue.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new ue.ErrnoError(44);var o;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)o=e;else{e=V.normalize(e);try{o=ue.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(o){if(128&r)throw new ue.ErrnoError(20)}else o=ue.mknod(e,t,0),a=!0;if(!o)throw new ue.ErrnoError(44);if(ue.isChrdev(o.mode)&&(r&=-513),65536&r&&!ue.isDir(o.mode))throw new ue.ErrnoError(54);if(!a){var i=ue.mayOpen(o,r);if(i)throw new ue.ErrnoError(i)}512&r&&!a&&ue.truncate(o,0),r&=-131713;var s=ue.createStream({node:o,path:ue.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(ue.readFiles||(ue.readFiles={}),e in ue.readFiles||(ue.readFiles[e]=1)),s},close(e){if(ue.isClosed(e))throw new ue.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ue.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ue.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ue.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 ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(1==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.read)throw new ue.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.write)throw new ue.ErrnoError(28);e.seekable&&1024&e.flags&&ue.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(r<0||t<=0)throw new ue.ErrnoError(28);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(!ue.isFile(e.node.mode)&&!ue.isDir(e.node.mode))throw new ue.ErrnoError(43);if(!e.stream_ops.allocate)throw new ue.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 ue.ErrnoError(2);if(1==(2097155&e.flags))throw new ue.ErrnoError(2);if(!e.stream_ops.mmap)throw new ue.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 ue.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=ue.open(e,r.flags),o=ue.stat(e).size,a=new Uint8Array(o);return ue.read(n,a,0,o,0),"utf8"===r.encoding?t=K(a,0):"binary"===r.encoding&&(t=a),ue.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=ue.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Q(r)+1),a=ee(r,o,0,o.length);ue.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");ue.write(n,r,0,r.byteLength,void 0,t.canOwn)}ue.close(n)},cwd:()=>ue.currentPath,chdir(e){var r=ue.lookupPath(e,{follow:!0});if(null===r.node)throw new ue.ErrnoError(44);if(!ue.isDir(r.node.mode))throw new ue.ErrnoError(54);var t=ue.nodePermissions(r.node,"x");if(t)throw new ue.ErrnoError(t);ue.currentPath=r.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),ue.mkdev("/dev/null",ue.makedev(1,3)),te.register(ue.makedev(5,0),te.default_tty_ops),te.register(ue.makedev(6,0),te.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=X(e).byteLength),e[--r]);ue.createDevice("/dev","random",t),ue.createDevice("/dev","urandom",t),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var e=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var r=ue.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=ue.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?ue.createDevice("/dev","stdin",n.stdin):ue.symlink("/dev/tty","/dev/stdin"),n.stdout?ue.createDevice("/dev","stdout",null,n.stdout):ue.symlink("/dev/tty","/dev/stdout"),n.stderr?ue.createDevice("/dev","stderr",null,n.stderr):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},ensureErrnoError(){ue.ErrnoError||(ue.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ue.ErrnoError.prototype=new Error,ue.ErrnoError.prototype.constructor=ue.ErrnoError,[44].forEach((e=>{ue.genericErrors[e]=new ue.ErrnoError(e),ue.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){ue.ensureErrnoError(),ue.nameTable=new Array(4096),ue.mount(oe,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:oe}},init(e,r,t){ue.init.initialized=!0,ue.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=r||n.stdout,n.stderr=t||n.stderr,ue.createStandardStreams()},quit(){ue.init.initialized=!1;for(var e=0;e<ue.streams.length;e++){var r=ue.streams[e];r&&ue.close(r)}},findObject(e,r){var t=ue.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=ue.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=ue.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=V.basename(e),n=ue.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:ue.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=V.join2(e,a);try{ue.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=V.join2("string"==typeof e?e:ue.getPath(e),r),i=se(n,o);return ue.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:ue.getPath(e),i=r?V.join2(e,r):e);var s=se(n,o),u=ue.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}ue.chmod(u,146|s);var f=ue.open(u,577);ue.write(f,t,0,t.length,0,a),ue.close(f),ue.chmod(u,s)}return u},createDevice(e,r,t,n){var o=V.join2("string"==typeof e?e:ue.getPath(e),r),a=se(!!t,!!n);ue.createDevice.major||(ue.createDevice.major=64);var i=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new ue.ErrnoError(29)}if(void 0===u&&0===i)throw new ue.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new ue.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),ue.mkdev(o,a,i)},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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=re(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ue.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,i=1048576;o||(i=n);var s=(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!==i&&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||[]):re(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=ue.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return ue.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(ue.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{ue.forceLoadFile(s);var a=ne();if(!a)throw new ue.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},le=(e,r)=>e?K(y,e,r):"",de={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(V.isAbs(r))return r;var n;if(n=-100===e?ue.cwd():de.getStreamFromFD(e).path,0==r.length){if(!t)throw new ue.ErrnoError(44);return n}return V.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&V.normalize(r)!==V.normalize(ue.getPath(e.node)))return-54;throw e}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,N=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+24>>2]=N[0],E[t+28>>2]=N[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return N=[Math.floor(o/1e3)>>>0,(W=Math.floor(o/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+40>>2]=N[0],E[t+44>>2]=N[1],_[t+48>>2]=o%1e3*1e3,N=[Math.floor(a/1e3)>>>0,(W=Math.floor(a/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+56>>2]=N[0],E[t+60>>2]=N[1],_[t+64>>2]=a%1e3*1e3,N=[Math.floor(i/1e3)>>>0,(W=Math.floor(i/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+72>>2]=N[0],E[t+76>>2]=N[1],_[t+80>>2]=i%1e3*1e3,N=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+88>>2]=N[0],E[t+92>>2]=N[1],0},doMsync(e,r,t,n,o){if(!ue.isFile(r.node.mode))throw new ue.ErrnoError(43);if(2&n)return 0;var a=y.slice(e,e+t);ue.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[+de.varargs>>2];return de.varargs+=4,e},getp:()=>de.get(),getStr:e=>le(e),getStreamFromFD:e=>ue.getStreamChecked(e)},ce={},fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function he(e){return this.fromWireType(E[e>>2])}var me,pe,ve,ye={},we={},ge={},Ee=e=>{throw new me(e)},_e=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ee("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){ge[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{we.hasOwnProperty(e)?o[r]=we[e]:(a.push(e),ye.hasOwnProperty(e)||(ye[e]=[]),ye[e].push((()=>{o[r]=we[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},be=e=>{for(var r="",t=e;y[t];)r+=pe[y[t++]];return r},ke=e=>{throw new ve(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||ke(`type "${n}" must have a positive integer typeid pointer`),we.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ke(`Cannot register type '${n}' twice`)}if(we[e]=r,delete ge[e],ye.hasOwnProperty(e)){var o=ye[e];delete ye[e],o.forEach((e=>e()))}}(e,r,t)}function Ae(){this.allocated=[void 0],this.freelist=[]}var Se,De,Pe=new Ae,Te=e=>{e>=Pe.reserved&&0==--Pe.get(e).refcount&&Pe.free(e)},$e=e=>(e||ke("Cannot use deleted val. handle = "+e),Pe.get(e).value),Ce=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Pe.allocate({refcount:1,value:e})}},Me=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},je=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e},xe=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||ke(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},Re=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ke(`Cannot register public name '${e}' twice`),xe(n,e,e),n.hasOwnProperty(t)&&ke(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},Oe=(e,r,t)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},ze=[],We=e=>{var r=ze[e];return r||(e>=ze.length&&(ze.length=e+1),ze[e]=r=Se.get(e)),r},Ne=(e,r)=>{var t=(e=be(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var o=n["dynCall_"+e];return t&&t.length?o.apply(null,[r].concat(t)):o.call(null,r)})(e,r,t):We(r).apply(null,t))(e,r,t)}})(e,r):We(r);return"function"!=typeof t&&ke(`unknown function pointer with signature ${e}: ${r}`),t},Le=e=>{var r=gr(e),t=be(r);return vr(r),t},Be=(e,r,t)=>{switch(r){case 1:return t?e=>v[0|e]:e=>y[0|e];case 2:return t?e=>w[e>>1]:e=>g[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function Ue(e){return this.fromWireType(_[e>>2])}var Ie,He="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Ye=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&g[n];)++n;if((t=n<<1)-e>32&&He)return He.decode(y.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},qe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},Ve=e=>2*e.length,Xe=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Ge=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},Je=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Ke=(e,r)=>{var t=we[e];return void 0===t&&ke(r+" has unknown type "+Le(e)),t},Ze={},Qe=e=>{var r=Ze[e];return void 0===r?be(e):r},er=[],rr=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof i.c&&e(i.c)?$$$embind_global$$$=i.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},tr=e=>{var r=(e-h.buffer.byteLength+65535)/65536;try{return h.grow(r),S(),1}catch(e){}},nr={},or=()=>{if(!or.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",_:l||"./this.program"};for(var r in nr)void 0===nr[r]?delete e[r]:e[r]=nr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);or.strings=t}return or.strings},ar=e=>e%4==0&&(e%100!=0||e%400==0),ir=[31,29,31,30,31,30,31,31,30,31,30,31],sr=[31,28,31,30,31,30,31,31,30,31,30,31],ur=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},lr=[],dr=(e,r)=>{Se.set(e,r),ze[e]=Se.get(e)},cr=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},fr=365,hr=146;Object.defineProperties(cr.prototype,{read:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=~fr}},write:{get:function(){return(this.mode&hr)===hr},set:function(e){e?this.mode|=hr:this.mode&=~hr}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=cr,ue.createPreloadedFile=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?G.resolve(V.join2(e,r)):e;function c(t){function c(t){l&&l(),s||((e,r,t,n,o,a)=>{ue.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,u),a&&a(),R()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ie.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,d,c,(()=>{i&&i(),R()}))||c(t)}x(),"string"==typeof t?ae(t,(e=>c(e)),i):c(t)},ue.staticInit(),n.FS_createPath=ue.createPath,n.FS_createDataFile=ue.createDataFile,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_unlink=ue.unlink,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,me=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);pe=e})(),ve=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(Ae.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Pe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Pe.reserved=Pe.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=Pe.reserved;r<Pe.allocated.length;++r)void 0!==Pe.allocated[r]&&++e;return e},De=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return{[e=je(e)]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var mr={m:(e,r,t)=>{throw new q(e).init(r,t),e},x:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 0:if((o=de.get())<0)return-28;for(;ue.streams[o];)o++;return ue.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=de.get();return n.flags|=o,0;case 5:return o=de.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return E[wr()>>2]=28,-1}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=de.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17|0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=de.getp();var s=E[a>>2],u=E[a+4>>2],l=E[a+8>>2],d=E[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17|0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=de.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=de.getp(),ue.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=de.getp(),w[a>>1]=f[0],w[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},O:function(e,r,t,n){de.varargs=n;try{r=de.getStr(r),r=de.calculateAt(e,r);var o=n?de.get():0;return ue.open(r,t,o).fd}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},V:e=>{var r=ce[e];delete ce[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));_e([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),fe(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:he,destructorFunction:n}]}))},G:(e,r,t,n,o)=>{},R:(e,r,t,n)=>{Fe(e,{name:r=be(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},Q:(e,r)=>{Fe(e,{name:r=be(r),fromWireType:e=>{var r=$e(e);return Te(e),r},toWireType:(e,r)=>Ce(r),argPackAdvance:8,readValueFromPointer:he,destructorFunction:null})},z:(e,r,t)=>{Fe(e,{name:r=be(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:Me(r,t),destructorFunction:null})},r:(e,r,t,n,o,a,i)=>{var s=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(A(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e})(e=be(e)),o=Ne(n,o),Re(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||we[r]||(ge[r]?ge[r].forEach(e):(t.push(r),n[r]=!0))})),new De(`${e}: `+t.map(Le).join([", "]))})(`Cannot call ${e} due to unbound types`,s)}),r-1),_e([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Oe(e,function(e,r,t,n,o,a){var i=r.length;i<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&!1,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),h=[],m=[];return function(){var t;arguments.length!==c&&ke(`function ${e} called with ${arguments.length} arguments, expected ${c}`),m.length=0,h.length=s?2:1,h[0]=o,s&&(t=r[1].toWireType(m,this),h[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(m,arguments[a]),h.push(f[a]);return function(e){if(u)fe(m);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,o,a),r-1),[]}))},d:(e,r,t,n,o)=>{r=be(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Be(r,t,0!==n),destructorFunction:null})},b:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=be(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},y:(e,r)=>{var t="std::string"===(r=be(r));Fe(e,{name:r,fromWireType(e){var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var u=le(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(y[o+i]);r=l.join("")}return vr(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||ke("Cannot pass non-string to std::string"),n=t&&o?Q(r):r.length;var a=yr(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)((e,r,t)=>{ee(e,y,r,t)})(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(vr(i),ke("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=u}else for(s=0;s<n;++s)y[i+s]=r[s];return null!==e&&e.push(vr,a),a},argPackAdvance:8,readValueFromPointer:Ue,destructorFunction(e){vr(e)}})},p:(e,r,t)=>{var n,o,a,i,s;t=be(t),2===r?(n=Ye,o=qe,i=Ve,a=()=>g,s=1):4===r&&(n=Xe,o=Ge,i=Je,a=()=>_,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return vr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&ke(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=yr(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(vr,u),u},argPackAdvance:8,readValueFromPointer:he,destructorFunction(e){vr(e)}})},W:(e,r,t,n,o,a)=>{ce[e]={name:be(r),rawConstructor:Ne(t,n),rawDestructor:Ne(o,a),fields:[]}},j:(e,r,t,n,o,a,i,s,u,l)=>{ce[e].fields.push({fieldName:be(r),getterReturnType:t,getter:Ne(n,o),getterContext:a,setterArgumentType:i,setter:Ne(s,u),setterContext:l})},S:(e,r)=>{Fe(e,{isVoid:!0,name:r=be(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},U:e=>{do{var r=_[e>>2],t=_[(e+=4)>>2],n=_[(e+=4)>>2];e+=4;var o=le(r);ue.createPath("/",V.dirname(o),!0,!0),ue.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(_[e>>2])},I:()=>{throw 1/0},Y:(e,r,t)=>{e=$e(e),r=Ke(r,"emval::as");var n=[],o=Ce(n);return _[t>>2]=o,r.toWireType(n,e)},A:(e,r,t,n,o)=>{var a=[],i=(e=er[e])(r=$e(r),t=Qe(t),a,o);return a.length&&(_[n>>2]=Ce(a)),i},a:Te,Z:e=>0===e?Ce(rr()):(e=Qe(e),Ce(rr()[e])),B:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Ke(_[r+4*n>>2],"parameter "+n);return t})(e,r),n=t.shift();e--;var o=new Array(e);return(e=>{var r=er.length;return er.push(e),r})(((r,a,i,s)=>{for(var u=0,l=0;l<e;++l)o[l]=t[l].readValueFromPointer(s+u),u+=t[l].argPackAdvance;var d=r[a].apply(r,o);for(l=0;l<e;++l)t[l].deleteObject&&t[l].deleteObject(o[l]);return n.toWireType(i,d)}))},l:(e,r)=>(e=$e(e),r=$e(r),Ce(e[r])),g:e=>{e>4&&(Pe.get(e).refcount+=1)},C:()=>Ce([]),h:e=>Ce(Qe(e)),s:e=>{var r=$e(e);fe(r),Te(e)},X:(e,r,t)=>{e=$e(e),r=$e(r),t=$e(t),e[r]=t},k:(e,r)=>{var t=(e=Ke(e,"_emval_take_value")).readValueFromPointer(r);return Ce(t)},q:()=>{O("")},P:(e,r,t)=>y.copyWithin(e,r,r+t),J:e=>{var r=y.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(tr(i))return!0}return!1},K:(e,r)=>{var t=0;return or().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[0|r++]=e.charCodeAt(t);v[0|r]=0})(n,a),t+=n.length+1})),0},L:(e,r)=>{var t=or();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0},T:(e,r)=>{(e=>{Y||(n.onExit&&n.onExit(e),F=!0),d(e,new I(e))})(e)},v:function(e){try{var r=de.getStreamFromFD(e);return ue.close(r),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},M:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},F:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=de.getStreamFromFD(e);return ue.llseek(i,a,n),N=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[o>>2]=N[0],E[o+4>>2]=N[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.write(e,v,i,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},n:function(e,r){var t=br();try{return We(e)(r)}catch(e){if(kr(t),e!==e+0)throw e;_r(1,0)}},i:function(e,r,t){var n=br();try{return We(e)(r,t)}catch(e){if(kr(n),e!==e+0)throw e;_r(1,0)}},o:function(e,r,t,n){var o=br();try{return We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},t:function(e,r,t,n,o){var a=br();try{return We(e)(r,t,n,o)}catch(e){if(kr(a),e!==e+0)throw e;_r(1,0)}},E:function(e,r,t,n,o,a,i,s,u,l){var d=br();try{return We(e)(r,t,n,o,a,i,s,u,l)}catch(e){if(kr(d),e!==e+0)throw e;_r(1,0)}},u:function(e){var r=br();try{We(e)()}catch(e){if(kr(r),e!==e+0)throw e;_r(1,0)}},c:function(e,r){var t=br();try{We(e)(r)}catch(e){if(kr(t),e!==e+0)throw e;_r(1,0)}},D:function(e,r,t,n){var o=br();try{We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},e:function(e,r,t){var n=br();try{We(e)(r,t)}catch(e){if(kr(n),e!==e+0)throw e;_r(1,0)}},f:function(e,r,t,n){var o=br();try{We(e)(r,t,n)}catch(e){if(kr(o),e!==e+0)throw e;_r(1,0)}},H:(e,r,t,n,o)=>((e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?le(o):""},i=le(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function h(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 p(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=ar(t.getFullYear()),o=t.getMonth(),a=(n?ir:sr)[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 h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(ar(e.tm_year+1900)?ir:sr,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":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&&ar(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&ar(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":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":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var w=re(i=i.replace(/\0\0/g,"%"),!1);return w.length>r?0:(((e,r)=>{v.set(e,r)})(w,e),w.length-1)})(e,r,t,n)},pr=function(){var e={a:mr};function r(e,r){return pr=e.exports,h=pr._,S(),Se=pr.aa,function(e){P.unshift(e)}(pr.$),R(),pr}if(x(),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||L(r)||"function"!=typeof fetch?U(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),U(r,t,n)}))))}(f,z,e,(function(e){r(e.instance)})).catch(t),{}}(),vr=n._free=e=>(vr=n._free=pr.ba)(e),yr=n._malloc=e=>(yr=n._malloc=pr.ca)(e),wr=()=>(wr=pr.da)(),gr=e=>(gr=pr.ea)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=pr.fa)();var Er,_r=(e,r)=>(_r=pr.ga)(e,r),br=()=>(br=pr.ha)(),kr=e=>(kr=pr.ia)(e),Fr=e=>(Fr=pr.ja)(e);function Ar(){function e(){Er||(Er=!0,n.calledRun=!0,F||(n.noFSInit||ue.init.initialized||ue.init(),ue.ignorePermissions=!1,H(P),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)C(n.postRun.shift());H(T)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)$(n.preRun.shift());H(D)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viji=(e,r,t,o,a)=>(n.dynCall_viji=pr.ka)(e,r,t,o,a),n.dynCall_ji=(e,r)=>(n.dynCall_ji=pr.la)(e,r),n.dynCall_jiji=(e,r,t,o,a)=>(n.dynCall_jiji=pr.ma)(e,r,t,o,a),n.dynCall_viijii=(e,r,t,o,a,i,s)=>(n.dynCall_viijii=pr.na)(e,r,t,o,a,i,s),n.dynCall_iiiiij=(e,r,t,o,a,i,s)=>(n.dynCall_iiiiij=pr.oa)(e,r,t,o,a,i,s),n.dynCall_iiiiijj=(e,r,t,o,a,i,s,u,l)=>(n.dynCall_iiiiijj=pr.pa)(e,r,t,o,a,i,s,u,l),n.dynCall_iiiiiijj=(e,r,t,o,a,i,s,u,l,d)=>(n.dynCall_iiiiiijj=pr.qa)(e,r,t,o,a,i,s,u,l,d),n.___emscripten_embedded_file_data=1273528,n.addRunDependency=x,n.removeRunDependency=R,n.FS_createPath=ue.createPath,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,n.addFunction=(e,r)=>{var t=(e=>(Ie||(Ie=new WeakMap,((e,r)=>{if(Ie)for(var t=0;t<0+r;t++){var n=We(t);n&&Ie.set(n,t)}})(0,Se.length)),Ie.get(e)||0))(e);if(t)return t;var n=(()=>{if(lr.length)return lr.pop();try{Se.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return Se.length-1})();try{dr(n,e)}catch(t){if(!(t instanceof TypeError))throw t;var o=((e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t})(r),e);var t=[1];((e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),ur(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])})(r,t);var n=[0,97,115,109,1,0,0,0,1];ur(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f})(e,r);dr(n,o)}return Ie.set(e,n),n},n.UTF8ToString=le,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_createDataFile=ue.createDataFile,n.FS_unlink=ue.unlink,j=function e(){Er||Ar(),Er||(j=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Ar(),e.ready},n.exports=a;const u=(0,i.g)(s.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2343,1053],{11053:(e,r,t)=>{t.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2343:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,o,a,i=t(11053),s={exports:{}};n=s,o="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,a=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var a,s,u=Object.assign({},n),l="./this.program",d=(e,r)=>{throw r},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),o&&(c=o),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=(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 f,h,m=n.print||console.log.bind(console),p=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(f=n.wasmBinary),"object"!=typeof WebAssembly&&O("no native wasm support detected");var v,y,w,g,E,_,b,k,F=!1;function A(e,r){e||O(r)}function S(){var e=h.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=g=new Uint16Array(e),n.HEAP32=E=new Int32Array(e),n.HEAPU32=_=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=k=new Float64Array(e)}var D=[],P=[],T=[];function $(e){D.unshift(e)}function C(e){T.unshift(e)}var M=0,j=null;function x(e){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function R(e){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&j){var r=j;j=null,r()}}function O(e){n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),F=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var z,W,N,L=e=>e.startsWith("data:application/octet-stream;base64,");function B(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function U(e,r,t){return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>B(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>B(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),O(e)}))}function I(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}L(z="lyr3DWorker.wasm")||(z=function(e){return n.locateFile?n.locateFile(e,c):c+e}(z));var H=e=>{for(;e.length>0;)e.shift()(n)},Y=n.noExitRuntime||!0;function q(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12|0]=e},this.get_caught=function(){return 0!=v[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(kr(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var V={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=V.isAbs(e),t="/"===e.substr(-1);return(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=V.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=V.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return V.normalize(e.join("/"))},join2:(e,r)=>V.normalize(e+"/"+r)},X=e=>(X=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);O("initRandomDevice")})())(e),G={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=V.isAbs(n)}return(r?"/":"")+(e=V.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=G.resolve(e).substr(1),r=G.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&J)return J.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Z=[],Q=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},ee=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function re(e,r,t){var n=t>0?t:Q(e)+1,o=new Array(n),a=ee(e,o,0,o.length);return r&&(o.length=a),o}var te={ttys:[],init(){},shutdown(){},register(e,r){te.ttys[e]={input:[],output:[],ops:r},ue.registerDevice(e,te.stream_ops)},stream_ops:{open(e){var r=te.ttys[e.node.rdev];if(!r)throw new ue.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new ue.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new ue.ErrnoError(29)}if(void 0===s&&0===a)throw new ue.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new ue.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Z.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;Z=re(e,!0)}return Z.shift()})(),put_char(e,r){null===r||10===r?(m(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(K(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(K(e.output,0)),e.output=[])}}},ne=e=>{O()},oe={ops_table:null,mount:e=>oe.createNode(null,"/",16895,0),createNode(e,r,t,n){if(ue.isBlkdev(t)||ue.isFIFO(t))throw new ue.ErrnoError(63);oe.ops_table||(oe.ops_table={dir:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,lookup:oe.node_ops.lookup,mknod:oe.node_ops.mknod,rename:oe.node_ops.rename,unlink:oe.node_ops.unlink,rmdir:oe.node_ops.rmdir,readdir:oe.node_ops.readdir,symlink:oe.node_ops.symlink},stream:{llseek:oe.stream_ops.llseek}},file:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:{llseek:oe.stream_ops.llseek,read:oe.stream_ops.read,write:oe.stream_ops.write,allocate:oe.stream_ops.allocate,mmap:oe.stream_ops.mmap,msync:oe.stream_ops.msync}},link:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,readlink:oe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:ue.chrdev_stream_ops}});var o=ue.createNode(e,r,t,n);return ue.isDir(o.mode)?(o.node_ops=oe.ops_table.dir.node,o.stream_ops=oe.ops_table.dir.stream,o.contents={}):ue.isFile(o.mode)?(o.node_ops=oe.ops_table.file.node,o.stream_ops=oe.ops_table.file.stream,o.usedBytes=0,o.contents=null):ue.isLink(o.mode)?(o.node_ops=oe.ops_table.link.node,o.stream_ops=oe.ops_table.link.stream):ue.isChrdev(o.mode)&&(o.node_ops=oe.ops_table.chrdev.node,o.stream_ops=oe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(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(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(e){var r={};return r.dev=ue.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,ue.isDir(e.mode)?r.size=4096:ue.isFile(e.mode)?r.size=e.usedBytes:ue.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(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&oe.resizeFileStorage(e,r.size)},lookup(e,r){throw ue.genericErrors[44]},mknod:(e,r,t,n)=>oe.createNode(e,r,t,n),rename(e,r,t){if(ue.isDir(e.mode)){var n;try{n=ue.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new ue.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(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=ue.lookupNode(e,r);for(var n in t.contents)throw new ue.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=oe.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!ue.isLink(e.mode))throw new ue.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(oe.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ue.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new ue.ErrnoError(28);return n},allocate(e,r,t){oe.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!ue.isFile(e.node.mode))throw new ue.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ne()))throw new ue.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(oe.stream_ops.write(e,r,0,n,t,!1),0)}},ae=(e,r,t,n)=>{var o=n?"":`al ${e}`;s(e,(t=>{A(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&R()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&x()},ie=n.preloadPlugins||[],se=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},ue={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=G.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new ue.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=ue.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=ue.lookupNode(n,t[a]),o=V.join2(o,t[a]),ue.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;ue.isLink(n.mode);){var u=ue.readlink(o);if(o=G.resolve(V.dirname(o),u),n=ue.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new ue.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(ue.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)%ue.nameTable.length},hashAddNode(e){var r=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[r],ue.nameTable[r]=e},hashRemoveNode(e){var r=ue.hashName(e.parent.id,e.name);if(ue.nameTable[r]===e)ue.nameTable[r]=e.name_next;else for(var t=ue.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=ue.mayLookup(e);if(t)throw new ue.ErrnoError(t,e);for(var n=ue.hashName(e.id,r),o=ue.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return ue.lookup(e,r)},createNode(e,r,t,n){var o=new ue.FSNode(e,r,t,n);return ue.hashAddNode(o),o},destroyNode(e){ue.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),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>ue.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>ue.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,r){try{return ue.lookupNode(e,r),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=ue.lookupNode(e,r)}catch(e){return e.errno}var o=ue.nodePermissions(e,"wx");if(o)return o;if(t){if(!ue.isDir(n.mode))return 54;if(ue.isRoot(n)||ue.getPath(n)===ue.cwd())return 10}else if(ue.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(r)||512&r)?31:ue.nodePermissions(e,ue.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=ue.MAX_OPEN_FDS;e++)if(!ue.streams[e])return e;throw new ue.ErrnoError(33)},getStreamChecked(e){var r=ue.getStream(e);if(!r)throw new ue.ErrnoError(8);return r},getStream:e=>ue.streams[e],createStream:(e,r=-1)=>(ue.FSStream||(ue.FSStream=function(){this.shared={}},ue.FSStream.prototype={},Object.defineProperties(ue.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new ue.FSStream,e),-1==r&&(r=ue.nextfd()),e.fd=r,ue.streams[r]=e,e),closeStream(e){ue.streams[e]=null},chrdev_stream_ops:{open(e){var r=ue.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new ue.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){ue.devices[e]={stream_ops:r}},getDevice:e=>ue.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),ue.syncFSRequests++,ue.syncFSRequests>1&&p(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ue.getMounts(ue.root.mount),n=0;function o(e){return ue.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&&ue.root)throw new ue.ErrnoError(10);if(!o&&!a){var i=ue.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ue.isMountpoint(n))throw new ue.ErrnoError(10);if(!ue.isDir(n.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?ue.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(r.node))throw new ue.ErrnoError(28);var t=r.node,n=t.mounted,o=ue.getMounts(n);Object.keys(ue.nameTable).forEach((e=>{for(var r=ue.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&ue.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=ue.lookupPath(e,{parent:!0}).node,o=V.basename(e);if(!o||"."===o||".."===o)throw new ue.ErrnoError(28);var a=ue.mayCreate(n,o);if(a)throw new ue.ErrnoError(a);if(!n.node_ops.mknod)throw new ue.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,ue.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,ue.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{ue.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,ue.mknod(e,r,t)),symlink(e,r){if(!G.resolve(e))throw new ue.ErrnoError(44);var t=ue.lookupPath(r,{parent:!0}).node;if(!t)throw new ue.ErrnoError(44);var n=V.basename(r),o=ue.mayCreate(t,n);if(o)throw new ue.ErrnoError(o);if(!t.node_ops.symlink)throw new ue.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=V.dirname(e),a=V.dirname(r),i=V.basename(e),s=V.basename(r);if(t=ue.lookupPath(e,{parent:!0}).node,n=ue.lookupPath(r,{parent:!0}).node,!t||!n)throw new ue.ErrnoError(44);if(t.mount!==n.mount)throw new ue.ErrnoError(75);var u,l=ue.lookupNode(t,i),d=G.relative(e,a);if("."!==d.charAt(0))throw new ue.ErrnoError(28);if("."!==(d=G.relative(r,o)).charAt(0))throw new ue.ErrnoError(55);try{u=ue.lookupNode(n,s)}catch(e){}if(l!==u){var c=ue.isDir(l.mode),f=ue.mayDelete(t,i,c);if(f)throw new ue.ErrnoError(f);if(f=u?ue.mayDelete(n,s,c):ue.mayCreate(n,s))throw new ue.ErrnoError(f);if(!t.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(l)||u&&ue.isMountpoint(u))throw new ue.ErrnoError(10);if(n!==t&&(f=ue.nodePermissions(t,"w")))throw new ue.ErrnoError(f);ue.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(e){throw e}finally{ue.hashAddNode(l)}}},rmdir(e){var r=ue.lookupPath(e,{parent:!0}).node,t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!0);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.rmdir(r,t),ue.destroyNode(n)},readdir(e){var r=ue.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new ue.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=ue.lookupPath(e,{parent:!0}).node;if(!r)throw new ue.ErrnoError(44);var t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!1);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.unlink(r,t),ue.destroyNode(n)},readlink(e){var r=ue.lookupPath(e).node;if(!r)throw new ue.ErrnoError(44);if(!r.node_ops.readlink)throw new ue.ErrnoError(28);return G.resolve(ue.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=ue.lookupPath(e,{follow:!r}).node;if(!t)throw new ue.ErrnoError(44);if(!t.node_ops.getattr)throw new ue.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>ue.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?ue.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){ue.chmod(e,r,!0)},fchmod(e,r){var t=ue.getStreamChecked(e);ue.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?ue.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){ue.chown(e,r,t,!0)},fchown(e,r,t){var n=ue.getStreamChecked(e);ue.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new ue.ErrnoError(28);var t;if(!(t="string"==typeof e?ue.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(t.mode))throw new ue.ErrnoError(31);if(!ue.isFile(t.mode))throw new ue.ErrnoError(28);var n=ue.nodePermissions(t,"w");if(n)throw new ue.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=ue.getStreamChecked(e);if(!(2097155&t.flags))throw new ue.ErrnoError(28);ue.truncate(t.node,r)},utime(e,r,t){var n=ue.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new ue.ErrnoError(44);var o;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)o=e;else{e=V.normalize(e);try{o=ue.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(o){if(128&r)throw new ue.ErrnoError(20)}else o=ue.mknod(e,t,0),a=!0;if(!o)throw new ue.ErrnoError(44);if(ue.isChrdev(o.mode)&&(r&=-513),65536&r&&!ue.isDir(o.mode))throw new ue.ErrnoError(54);if(!a){var i=ue.mayOpen(o,r);if(i)throw new ue.ErrnoError(i)}512&r&&!a&&ue.truncate(o,0),r&=-131713;var s=ue.createStream({node:o,path:ue.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(ue.readFiles||(ue.readFiles={}),e in ue.readFiles||(ue.readFiles[e]=1)),s},close(e){if(ue.isClosed(e))throw new ue.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ue.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ue.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ue.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 ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(1==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.read)throw new ue.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.write)throw new ue.ErrnoError(28);e.seekable&&1024&e.flags&&ue.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(r<0||t<=0)throw new ue.ErrnoError(28);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(!ue.isFile(e.node.mode)&&!ue.isDir(e.node.mode))throw new ue.ErrnoError(43);if(!e.stream_ops.allocate)throw new ue.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 ue.ErrnoError(2);if(1==(2097155&e.flags))throw new ue.ErrnoError(2);if(!e.stream_ops.mmap)throw new ue.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 ue.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=ue.open(e,r.flags),o=ue.stat(e).size,a=new Uint8Array(o);return ue.read(n,a,0,o,0),"utf8"===r.encoding?t=K(a,0):"binary"===r.encoding&&(t=a),ue.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=ue.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Q(r)+1),a=ee(r,o,0,o.length);ue.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");ue.write(n,r,0,r.byteLength,void 0,t.canOwn)}ue.close(n)},cwd:()=>ue.currentPath,chdir(e){var r=ue.lookupPath(e,{follow:!0});if(null===r.node)throw new ue.ErrnoError(44);if(!ue.isDir(r.node.mode))throw new ue.ErrnoError(54);var t=ue.nodePermissions(r.node,"x");if(t)throw new ue.ErrnoError(t);ue.currentPath=r.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),ue.mkdev("/dev/null",ue.makedev(1,3)),te.register(ue.makedev(5,0),te.default_tty_ops),te.register(ue.makedev(6,0),te.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=X(e).byteLength),e[--r]);ue.createDevice("/dev","random",t),ue.createDevice("/dev","urandom",t),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var e=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var r=ue.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=ue.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?ue.createDevice("/dev","stdin",n.stdin):ue.symlink("/dev/tty","/dev/stdin"),n.stdout?ue.createDevice("/dev","stdout",null,n.stdout):ue.symlink("/dev/tty","/dev/stdout"),n.stderr?ue.createDevice("/dev","stderr",null,n.stderr):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},ensureErrnoError(){ue.ErrnoError||(ue.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ue.ErrnoError.prototype=new Error,ue.ErrnoError.prototype.constructor=ue.ErrnoError,[44].forEach((e=>{ue.genericErrors[e]=new ue.ErrnoError(e),ue.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){ue.ensureErrnoError(),ue.nameTable=new Array(4096),ue.mount(oe,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:oe}},init(e,r,t){ue.init.initialized=!0,ue.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=r||n.stdout,n.stderr=t||n.stderr,ue.createStandardStreams()},quit(){ue.init.initialized=!1;for(var e=0;e<ue.streams.length;e++){var r=ue.streams[e];r&&ue.close(r)}},findObject(e,r){var t=ue.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=ue.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=ue.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=V.basename(e),n=ue.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:ue.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=V.join2(e,a);try{ue.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=V.join2("string"==typeof e?e:ue.getPath(e),r),i=se(n,o);return ue.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:ue.getPath(e),i=r?V.join2(e,r):e);var s=se(n,o),u=ue.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}ue.chmod(u,146|s);var f=ue.open(u,577);ue.write(f,t,0,t.length,0,a),ue.close(f),ue.chmod(u,s)}return u},createDevice(e,r,t,n){var o=V.join2("string"==typeof e?e:ue.getPath(e),r),a=se(!!t,!!n);ue.createDevice.major||(ue.createDevice.major=64);var i=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new ue.ErrnoError(29)}if(void 0===u&&0===i)throw new ue.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new ue.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),ue.mkdev(o,a,i)},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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=re(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ue.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,i=1048576;o||(i=n);var s=(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!==i&&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||[]):re(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=ue.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return ue.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(ue.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{ue.forceLoadFile(s);var a=ne();if(!a)throw new ue.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},le=(e,r)=>e?K(y,e,r):"",de={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(V.isAbs(r))return r;var n;if(n=-100===e?ue.cwd():de.getStreamFromFD(e).path,0==r.length){if(!t)throw new ue.ErrnoError(44);return n}return V.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&V.normalize(r)!==V.normalize(ue.getPath(e.node)))return-54;throw e}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,N=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+24>>2]=N[0],E[t+28>>2]=N[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return N=[Math.floor(o/1e3)>>>0,(W=Math.floor(o/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+40>>2]=N[0],E[t+44>>2]=N[1],_[t+48>>2]=o%1e3*1e3,N=[Math.floor(a/1e3)>>>0,(W=Math.floor(a/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+56>>2]=N[0],E[t+60>>2]=N[1],_[t+64>>2]=a%1e3*1e3,N=[Math.floor(i/1e3)>>>0,(W=Math.floor(i/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+72>>2]=N[0],E[t+76>>2]=N[1],_[t+80>>2]=i%1e3*1e3,N=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+88>>2]=N[0],E[t+92>>2]=N[1],0},doMsync(e,r,t,n,o){if(!ue.isFile(r.node.mode))throw new ue.ErrnoError(43);if(2&n)return 0;var a=y.slice(e,e+t);ue.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[+de.varargs>>2];return de.varargs+=4,e},getp:()=>de.get(),getStr:e=>le(e),getStreamFromFD:e=>ue.getStreamChecked(e)},ce={},fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function he(e){return this.fromWireType(E[e>>2])}var me,pe,ve,ye={},we={},ge={},Ee=e=>{throw new me(e)},_e=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ee("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){ge[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{we.hasOwnProperty(e)?o[r]=we[e]:(a.push(e),ye.hasOwnProperty(e)||(ye[e]=[]),ye[e].push((()=>{o[r]=we[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},be=e=>{for(var r="",t=e;y[t];)r+=pe[y[t++]];return r},ke=e=>{throw new ve(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||ke(`type "${n}" must have a positive integer typeid pointer`),we.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ke(`Cannot register type '${n}' twice`)}if(we[e]=r,delete ge[e],ye.hasOwnProperty(e)){var o=ye[e];delete ye[e],o.forEach((e=>e()))}}(e,r,t)}function Ae(){this.allocated=[void 0],this.freelist=[]}var Se,De,Pe=new Ae,Te=e=>{e>=Pe.reserved&&0==--Pe.get(e).refcount&&Pe.free(e)},$e=e=>(e||ke("Cannot use deleted val. handle = "+e),Pe.get(e).value),Ce=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Pe.allocate({refcount:1,value:e})}},Me=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},je=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||ke(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},xe=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ke(`Cannot register public name '${e}' twice`),je(n,e,e),n.hasOwnProperty(t)&&ke(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},Re=(e,r,t)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},Oe=[],ze=e=>{var r=Oe[e];return r||(e>=Oe.length&&(Oe.length=e+1),Oe[e]=r=Se.get(e)),r},We=(e,r)=>{var t=(e=be(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var o=n["dynCall_"+e];return t&&t.length?o.apply(null,[r].concat(t)):o.call(null,r)})(e,r,t):ze(r).apply(null,t))(e,r,t)}})(e,r):ze(r);return"function"!=typeof t&&ke(`unknown function pointer with signature ${e}: ${r}`),t},Ne=e=>{var r=wr(e),t=be(r);return pr(r),t},Le=(e,r,t)=>{switch(r){case 1:return t?e=>v[0|e]:e=>y[0|e];case 2:return t?e=>w[e>>1]:e=>g[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function Be(e){return this.fromWireType(_[e>>2])}var Ue,Ie="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,He=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&g[n];)++n;if((t=n<<1)-e>32&&Ie)return Ie.decode(y.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Ye=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},qe=e=>2*e.length,Ve=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Xe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},Ge=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Je=(e,r)=>{var t=we[e];return void 0===t&&ke(r+" has unknown type "+Ne(e)),t},Ke={},Ze=e=>{var r=Ke[e];return void 0===r?be(e):r},Qe=[],er=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof i.c&&e(i.c)?$$$embind_global$$$=i.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},rr=e=>{var r=(e-h.buffer.byteLength+65535)/65536;try{return h.grow(r),S(),1}catch(e){}},tr={},nr=()=>{if(!nr.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",_:l||"./this.program"};for(var r in tr)void 0===tr[r]?delete e[r]:e[r]=tr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);nr.strings=t}return nr.strings},or=e=>e%4==0&&(e%100!=0||e%400==0),ar=[31,29,31,30,31,30,31,31,30,31,30,31],ir=[31,28,31,30,31,30,31,31,30,31,30,31],sr=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},ur=[],lr=(e,r)=>{Se.set(e,r),Oe[e]=Se.get(e)},dr=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,fr=146;Object.defineProperties(dr.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(e){e?this.mode|=cr:this.mode&=~cr}},write:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=~fr}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=dr,ue.createPreloadedFile=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?G.resolve(V.join2(e,r)):e;function c(t){function c(t){l&&l(),s||((e,r,t,n,o,a)=>{ue.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,u),a&&a(),R()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ie.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,d,c,(()=>{i&&i(),R()}))||c(t)}x(),"string"==typeof t?ae(t,(e=>c(e)),i):c(t)},ue.staticInit(),n.FS_createPath=ue.createPath,n.FS_createDataFile=ue.createDataFile,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_unlink=ue.unlink,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,me=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);pe=e})(),ve=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(Ae.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Pe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Pe.reserved=Pe.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=Pe.reserved;r<Pe.allocated.length;++r)void 0!==Pe.allocated[r]&&++e;return e},De=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return e=(e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e})(e),{[e]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var hr={m:(e,r,t)=>{throw new q(e).init(r,t),e},x:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 0:if((o=de.get())<0)return-28;for(;ue.streams[o];)o++;return ue.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=de.get();return n.flags|=o,0;case 5:return o=de.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return E[yr()>>2]=28,-1}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=de.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17|0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=de.getp();var s=E[a>>2],u=E[a+4>>2],l=E[a+8>>2],d=E[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17|0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=de.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=de.getp(),ue.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=de.getp(),w[a>>1]=f[0],w[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},O:function(e,r,t,n){de.varargs=n;try{r=de.getStr(r),r=de.calculateAt(e,r);var o=n?de.get():0;return ue.open(r,t,o).fd}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},V:e=>{var r=ce[e];delete ce[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));_e([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),fe(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:he,destructorFunction:n}]}))},G:(e,r,t,n,o)=>{},R:(e,r,t,n)=>{Fe(e,{name:r=be(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},Q:(e,r)=>{Fe(e,{name:r=be(r),fromWireType:e=>{var r=$e(e);return Te(e),r},toWireType:(e,r)=>Ce(r),argPackAdvance:8,readValueFromPointer:he,destructorFunction:null})},z:(e,r,t)=>{Fe(e,{name:r=be(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:Me(r,t),destructorFunction:null})},r:(e,r,t,n,o,a,i)=>{var s=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(A(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e})(e=be(e)),o=We(n,o),xe(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||we[r]||(ge[r]?ge[r].forEach(e):(t.push(r),n[r]=!0))})),new De(`${e}: `+t.map(Ne).join([", "]))})(`Cannot call ${e} due to unbound types`,s)}),r-1),_e([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Re(e,function(e,r,t,n,o,a){var i=r.length;i<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&!1,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),h=[],m=[];return function(){var t;arguments.length!==c&&ke(`function ${e} called with ${arguments.length} arguments, expected ${c}`),m.length=0,h.length=s?2:1,h[0]=o,s&&(t=r[1].toWireType(m,this),h[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(m,arguments[a]),h.push(f[a]);return function(e){if(u)fe(m);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,o,a),r-1),[]}))},d:(e,r,t,n,o)=>{r=be(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Le(r,t,0!==n),destructorFunction:null})},b:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=be(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},y:(e,r)=>{var t="std::string"===(r=be(r));Fe(e,{name:r,fromWireType(e){var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var u=le(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(y[o+i]);r=l.join("")}return pr(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||ke("Cannot pass non-string to std::string"),n=t&&o?Q(r):r.length;var a=vr(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)((e,r,t)=>{ee(e,y,r,t)})(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(pr(i),ke("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=u}else for(s=0;s<n;++s)y[i+s]=r[s];return null!==e&&e.push(pr,a),a},argPackAdvance:8,readValueFromPointer:Be,destructorFunction(e){pr(e)}})},p:(e,r,t)=>{var n,o,a,i,s;t=be(t),2===r?(n=He,o=Ye,i=qe,a=()=>g,s=1):4===r&&(n=Ve,o=Xe,i=Ge,a=()=>_,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return pr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&ke(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=vr(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(pr,u),u},argPackAdvance:8,readValueFromPointer:he,destructorFunction(e){pr(e)}})},W:(e,r,t,n,o,a)=>{ce[e]={name:be(r),rawConstructor:We(t,n),rawDestructor:We(o,a),fields:[]}},j:(e,r,t,n,o,a,i,s,u,l)=>{ce[e].fields.push({fieldName:be(r),getterReturnType:t,getter:We(n,o),getterContext:a,setterArgumentType:i,setter:We(s,u),setterContext:l})},S:(e,r)=>{Fe(e,{isVoid:!0,name:r=be(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},U:e=>{do{var r=_[e>>2],t=_[(e+=4)>>2],n=_[(e+=4)>>2];e+=4;var o=le(r);ue.createPath("/",V.dirname(o),!0,!0),ue.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(_[e>>2])},I:()=>{throw 1/0},Y:(e,r,t)=>{e=$e(e),r=Je(r,"emval::as");var n=[],o=Ce(n);return _[t>>2]=o,r.toWireType(n,e)},A:(e,r,t,n,o)=>{var a=[],i=(e=Qe[e])(r=$e(r),t=Ze(t),a,o);return a.length&&(_[n>>2]=Ce(a)),i},a:Te,Z:e=>0===e?Ce(er()):(e=Ze(e),Ce(er()[e])),B:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Je(_[r+4*n>>2],"parameter "+n);return t})(e,r),n=t.shift();e--;var o=new Array(e);return(e=>{var r=Qe.length;return Qe.push(e),r})(((r,a,i,s)=>{for(var u=0,l=0;l<e;++l)o[l]=t[l].readValueFromPointer(s+u),u+=t[l].argPackAdvance;var d=r[a].apply(r,o);for(l=0;l<e;++l)t[l].deleteObject&&t[l].deleteObject(o[l]);return n.toWireType(i,d)}))},l:(e,r)=>(e=$e(e),r=$e(r),Ce(e[r])),g:e=>{e>4&&(Pe.get(e).refcount+=1)},C:()=>Ce([]),h:e=>Ce(Ze(e)),s:e=>{var r=$e(e);fe(r),Te(e)},X:(e,r,t)=>{e=$e(e),r=$e(r),t=$e(t),e[r]=t},k:(e,r)=>{var t=(e=Je(e,"_emval_take_value")).readValueFromPointer(r);return Ce(t)},q:()=>{O("")},P:(e,r,t)=>y.copyWithin(e,r,r+t),J:e=>{var r=y.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(rr(i))return!0}return!1},K:(e,r)=>{var t=0;return nr().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[0|r++]=e.charCodeAt(t);v[0|r]=0})(n,a),t+=n.length+1})),0},L:(e,r)=>{var t=nr();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0},T:(e,r)=>{(e=>{Y||(n.onExit&&n.onExit(e),F=!0),d(e,new I(e))})(e)},v:function(e){try{var r=de.getStreamFromFD(e);return ue.close(r),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},M:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},F:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=de.getStreamFromFD(e);return ue.llseek(i,a,n),N=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[o>>2]=N[0],E[o+4>>2]=N[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.write(e,v,i,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},n:function(e,r){var t=_r();try{return ze(e)(r)}catch(e){if(br(t),e!==e+0)throw e;Er(1,0)}},i:function(e,r,t){var n=_r();try{return ze(e)(r,t)}catch(e){if(br(n),e!==e+0)throw e;Er(1,0)}},o:function(e,r,t,n){var o=_r();try{return ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},t:function(e,r,t,n,o){var a=_r();try{return ze(e)(r,t,n,o)}catch(e){if(br(a),e!==e+0)throw e;Er(1,0)}},E:function(e,r,t,n,o,a,i,s,u,l){var d=_r();try{return ze(e)(r,t,n,o,a,i,s,u,l)}catch(e){if(br(d),e!==e+0)throw e;Er(1,0)}},u:function(e){var r=_r();try{ze(e)()}catch(e){if(br(r),e!==e+0)throw e;Er(1,0)}},c:function(e,r){var t=_r();try{ze(e)(r)}catch(e){if(br(t),e!==e+0)throw e;Er(1,0)}},D:function(e,r,t,n){var o=_r();try{ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},e:function(e,r,t){var n=_r();try{ze(e)(r,t)}catch(e){if(br(n),e!==e+0)throw e;Er(1,0)}},f:function(e,r,t,n){var o=_r();try{ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},H:(e,r,t,n,o)=>((e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?le(o):""},i=le(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function h(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 p(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=or(t.getFullYear()),o=t.getMonth(),a=(n?ar:ir)[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 h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(or(e.tm_year+1900)?ar:ir,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":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&&or(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&or(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":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":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var w=re(i=i.replace(/\0\0/g,"%"),!1);return w.length>r?0:(((e,r)=>{v.set(e,r)})(w,e),w.length-1)})(e,r,t,n)},mr=function(){var e={a:hr};function r(e,r){return mr=e.exports,h=mr._,S(),Se=mr.aa,function(e){P.unshift(e)}(mr.$),R(),mr}if(x(),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||L(r)||"function"!=typeof fetch?U(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),U(r,t,n)}))))}(f,z,e,(function(e){r(e.instance)})).catch(t),{}}(),pr=n._free=e=>(pr=n._free=mr.ba)(e),vr=n._malloc=e=>(vr=n._malloc=mr.ca)(e),yr=()=>(yr=mr.da)(),wr=e=>(wr=mr.ea)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=mr.fa)();var gr,Er=(e,r)=>(Er=mr.ga)(e,r),_r=()=>(_r=mr.ha)(),br=e=>(br=mr.ia)(e),kr=e=>(kr=mr.ja)(e);function Fr(){function e(){gr||(gr=!0,n.calledRun=!0,F||(n.noFSInit||ue.init.initialized||ue.init(),ue.ignorePermissions=!1,H(P),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)C(n.postRun.shift());H(T)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)$(n.preRun.shift());H(D)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viji=(e,r,t,o,a)=>(n.dynCall_viji=mr.ka)(e,r,t,o,a),n.dynCall_ji=(e,r)=>(n.dynCall_ji=mr.la)(e,r),n.dynCall_jiji=(e,r,t,o,a)=>(n.dynCall_jiji=mr.ma)(e,r,t,o,a),n.dynCall_viijii=(e,r,t,o,a,i,s)=>(n.dynCall_viijii=mr.na)(e,r,t,o,a,i,s),n.dynCall_iiiiij=(e,r,t,o,a,i,s)=>(n.dynCall_iiiiij=mr.oa)(e,r,t,o,a,i,s),n.dynCall_iiiiijj=(e,r,t,o,a,i,s,u,l)=>(n.dynCall_iiiiijj=mr.pa)(e,r,t,o,a,i,s,u,l),n.dynCall_iiiiiijj=(e,r,t,o,a,i,s,u,l,d)=>(n.dynCall_iiiiiijj=mr.qa)(e,r,t,o,a,i,s,u,l,d),n.___emscripten_embedded_file_data=1273528,n.addRunDependency=x,n.removeRunDependency=R,n.FS_createPath=ue.createPath,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,n.addFunction=(e,r)=>{var t=(e=>(Ue||(Ue=new WeakMap,((e,r)=>{if(Ue)for(var t=0;t<0+r;t++){var n=ze(t);n&&Ue.set(n,t)}})(0,Se.length)),Ue.get(e)||0))(e);if(t)return t;var n=(()=>{if(ur.length)return ur.pop();try{Se.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return Se.length-1})();try{lr(n,e)}catch(t){if(!(t instanceof TypeError))throw t;var o=((e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t})(r),e);var t=[1];((e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),sr(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])})(r,t);var n=[0,97,115,109,1,0,0,0,1];sr(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f})(e,r);lr(n,o)}return Ue.set(e,n),n},n.UTF8ToString=le,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_createDataFile=ue.createDataFile,n.FS_unlink=ue.unlink,j=function e(){gr||Fr(),gr||(j=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Fr(),e.ready},n.exports=a;const u=(0,i.g)(s.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3666],{3666:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,a,i,o=t(11053),u={exports:{}};n=u,a="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(a=a||__filename),i=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var i,o,u,s=Object.assign({},n),l="./this.program",c="object"==typeof window,f="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(d){var p=require("fs"),m=require("path");h=f?m.dirname(h)+"/":__dirname+"/",i=(e,r)=>(e=I(e)?new URL(e):m.normalize(e),p.readFileSync(e,r?void 0:"utf8")),u=e=>{var r=i(e,!0);return r.buffer||(r=new Uint8Array(r)),r},o=(e,r,t,n=!0)=>{e=I(e)?new URL(e):m.normalize(e),p.readFile(e,n?void 0:"utf8",((e,a)=>{e?t(e):r(n?a.buffer:a)}))},!n.thisProgram&&process.argv.length>1&&(l=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(c||f)&&(f?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),a&&(h=a),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},f&&(u=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),o=(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)});n.print||console.log.bind(console);var v,y,g=n.printErr||console.error.bind(console);Object.assign(n,s),s=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(v=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&$("no native wasm support detected");var w,_,b,A,T,C,E,F,P=!1;function S(){var e=y.buffer;n.HEAP8=w=new Int8Array(e),n.HEAP16=b=new Int16Array(e),n.HEAPU8=_=new Uint8Array(e),n.HEAPU16=A=new Uint16Array(e),n.HEAP32=T=new Int32Array(e),n.HEAPU32=C=new Uint32Array(e),n.HEAPF32=E=new Float32Array(e),n.HEAPF64=F=new Float64Array(e)}var W=[],R=[],M=[];function j(e){W.unshift(e)}function O(e){M.unshift(e)}var D=0,k=null;function $(e){n.onAbort&&n.onAbort(e),g(e="Aborted("+e+")"),P=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var x;function U(e){return e.startsWith("data:application/octet-stream;base64,")}function I(e){return e.startsWith("file://")}function H(e){if(e==x&&v)return new Uint8Array(v);if(u)return u(e);throw"both async and sync fetching of the wasm failed"}function Y(e,r,t){return function(e){if(!v&&(c||f)){if("function"==typeof fetch&&!I(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>H(e)));if(o)return new Promise(((r,t)=>{o(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>H(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{g(`failed to asynchronously prepare wasm: ${e}`),$(e)}))}U(x="lclayout.wasm")||(x=function(e){return n.locateFile?n.locateFile(e,h):h+e}(x));var z=e=>{for(;e.length>0;)e.shift()(n)};function V(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,w[this.ptr+12|0]=e},this.get_caught=function(){return 0!=w[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,w[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=w[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(He(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var B,q,L,G=e=>{for(var r="",t=e;_[t];)r+=B[_[t++]];return r},X={},N={},J={},Z=e=>{throw new q(e)},K=e=>{throw new L(e)},Q=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&K("Mismatched type converter count");for(var a=0;a<e.length;++a)ee(e[a],n[a])}e.forEach((function(e){J[e]=r}));var a=new Array(r.length),i=[],o=0;r.forEach(((e,r)=>{N.hasOwnProperty(e)?a[r]=N[e]:(i.push(e),X.hasOwnProperty(e)||(X[e]=[]),X[e].push((()=>{a[r]=N[e],++o===i.length&&n(a)})))})),0===i.length&&n(a)};function ee(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Z(`type "${n}" must have a positive integer typeid pointer`),N.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Z(`Cannot register type '${n}' twice`)}if(N[e]=r,delete J[e],X.hasOwnProperty(e)){var a=X[e];delete X[e],a.forEach((e=>e()))}}(e,r,t)}function re(){this.allocated=[void 0],this.freelist=[]}var te=new re;function ne(e){return this.fromWireType(T[e>>2])}var ae,ie,oe=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(E[e>>2])};case 8:return function(e){return this.fromWireType(F[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ue=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Z(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},se=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&Z(`Cannot register public name '${e}' twice`),ue(n,e,e),n.hasOwnProperty(t)&&Z(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},le=(e,r,t)=>{n.hasOwnProperty(e)||K("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},ce=[],fe=e=>{var r=ce[e];return r||(e>=ce.length&&(ce.length=e+1),ce[e]=r=ae.get(e)),r},de=(e,r)=>{var t=(e=G(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var a=n["dynCall_"+e];return t&&t.length?a.apply(null,[r].concat(t)):a.call(null,r)})(e,r,t):fe(r).apply(null,t))(e,r,t)}})(e,r):fe(r);return"function"!=typeof t&&Z(`unknown function pointer with signature ${e}: ${r}`),t},he=e=>{var r=$e(e),t=G(r);return Ie(r),t},pe=(e,r,t)=>{switch(r){case 1:return t?e=>w[0|e]:e=>_[0|e];case 2:return t?e=>b[e>>1]:e=>A[e>>1];case 4:return t?e=>T[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function me(e){return this.fromWireType(C[e>>2])}var ve,ye=(e,r,t,n)=>{if(!(n>0))return 0;for(var a=t,i=t+n-1,o=0;o<e.length;++o){var u=e.charCodeAt(o);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&e.charCodeAt(++o)),u<=127){if(t>=i)break;r[t++]=u}else if(u<=2047){if(t+1>=i)break;r[t++]=192|u>>6,r[t++]=128|63&u}else if(u<=65535){if(t+2>=i)break;r[t++]=224|u>>12,r[t++]=128|u>>6&63,r[t++]=128|63&u}else{if(t+3>=i)break;r[t++]=240|u>>18,r[t++]=128|u>>12&63,r[t++]=128|u>>6&63,r[t++]=128|63&u}}return r[t]=0,t-a},ge=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},we="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,_e=(e,r)=>e?((e,r,t)=>{for(var n=r+t,a=r;e[a]&&!(a>=n);)++a;if(a-r>16&&e.buffer&&we)return we.decode(e.subarray(r,a));for(var i="";r<a;){var o=e[r++];if(128&o){var u=63&e[r++];if(192!=(224&o)){var s=63&e[r++];if((o=224==(240&o)?(15&o)<<12|u<<6|s:(7&o)<<18|u<<12|s<<6|63&e[r++])<65536)i+=String.fromCharCode(o);else{var l=o-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&o)<<6|u)}else i+=String.fromCharCode(o)}return i})(_,e,r):"",be="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Ae=(e,r)=>{for(var t=e,n=t>>1,a=n+r/2;!(n>=a)&&A[n];)++n;if((t=n<<1)-e>32&&be)return be.decode(_.subarray(e,t));for(var i="",o=0;!(o>=r/2);++o){var u=b[e+2*o>>1];if(0==u)break;i+=String.fromCharCode(u)}return i},Te=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,i=0;i<a;++i){var o=e.charCodeAt(i);b[r>>1]=o,r+=2}return b[r>>1]=0,r-n},Ce=e=>2*e.length,Ee=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var a=T[e+4*t>>2];if(0==a)break;if(++t,a>=65536){var i=a-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(a)}return n},Fe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,a=n+t-4,i=0;i<e.length;++i){var o=e.charCodeAt(i);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),T[r>>2]=o,(r+=4)+4>a)break}return T[r>>2]=0,r-n},Pe=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r};ve=()=>performance.now();var Se=e=>{var r=(e-y.buffer.byteLength+65535)/65536;try{return y.grow(r),S(),1}catch(e){}},We={},Re=()=>{if(!Re.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",_:l||"./this.program"};for(var r in We)void 0===We[r]?delete e[r]:e[r]=We[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Re.strings=t}return Re.strings},Me=e=>e%4==0&&(e%100!=0||e%400==0),je=[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];(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);B=e})(),q=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},L=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(re.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),te.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),te.reserved=te.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=te.reserved;r<te.allocated.length;++r)void 0!==te.allocated[r]&&++e;return e},ie=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return e=(e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e})(e),{[e]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var De={a:(e,r,t)=>{throw new V(e).init(r,t),e},m:(e,r,t,n,a)=>{},k:(e,r,t,n)=>{ee(e,{name:r=G(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(_[e])},destructorFunction:null})},i:(e,r,t)=>{e=G(e),Q([],[r],(function(r){return r=r[0],n[e]=r.fromWireType(t),[]}))},j:(e,r)=>{ee(e,{name:r=G(r),fromWireType:e=>{var r=(e=>(e||Z("Cannot use deleted val. handle = "+e),te.get(e).value))(e);return(e=>{e>=te.reserved&&0==--te.get(e).refcount&&te.free(e)})(e),r},toWireType:(e,r)=>(e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return te.allocate({refcount:1,value:e})}})(r),argPackAdvance:8,readValueFromPointer:ne,destructorFunction:null})},h:(e,r,t)=>{ee(e,{name:r=G(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:oe(r,t),destructorFunction:null})},b:(e,r,t,n,a,i,o)=>{var u=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(C[r+4*n>>2]);return t})(r,t);e=G(e),a=de(n,a),se(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||N[r]||(J[r]?J[r].forEach(e):(t.push(r),n[r]=!0))})),new ie(`${e}: `+t.map(he).join([", "]))})(`Cannot call ${e} due to unbound types`,u)}),r-1),Q([],u,(function(t){var n=[t[0],null].concat(t.slice(1));return le(e,function(e,r,t,n,a,i){var o=r.length;o<2&&Z("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=null!==r[1]&&!1,s=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){s=!0;break}var c="void"!==r[0].name,f=o-2,d=new Array(f),h=[],p=[];return function(){var t;arguments.length!==f&&Z(`function ${e} called with ${arguments.length} arguments, expected ${f}`),p.length=0,h.length=u?2:1,h[0]=a,u&&(t=r[1].toWireType(p,this),h[1]=t);for(var i=0;i<f;++i)d[i]=r[i+2].toWireType(p,arguments[i]),h.push(d[i]);return function(e){if(s)(e=>{for(;e.length;){var r=e.pop();e.pop()(r)}})(p);else for(var n=u?1:2;n<r.length;n++){var a=1===n?t:d[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(a)}if(c)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,a,i),r-1),[]}))},d:(e,r,t,n,a)=>{r=G(r);var i=e=>e;if(0===n){var o=32-8*t;i=e=>e<<o>>>o}var u=r.includes("unsigned");ee(e,{name:r,fromWireType:i,toWireType:u?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:pe(r,t,0!==n),destructorFunction:null})},c:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(e){var r=C[e>>2],t=C[e+4>>2];return new n(w.buffer,t,r)}ee(e,{name:t=G(t),fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},g:(e,r)=>{var t="std::string"===(r=G(r));ee(e,{name:r,fromWireType(e){var r,n=C[e>>2],a=e+4;if(t)for(var i=a,o=0;o<=n;++o){var u=a+o;if(o==n||0==_[u]){var s=_e(i,u-i);void 0===r?r=s:(r+=String.fromCharCode(0),r+=s),i=u+1}}else{var l=new Array(n);for(o=0;o<n;++o)l[o]=String.fromCharCode(_[a+o]);r=l.join("")}return Ie(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var a="string"==typeof r;a||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Z("Cannot pass non-string to std::string"),n=t&&a?ge(r):r.length;var i=Ue(4+n+1),o=i+4;if(C[i>>2]=n,t&&a)((e,r,t)=>{ye(e,_,r,t)})(r,o,n+1);else if(a)for(var u=0;u<n;++u){var s=r.charCodeAt(u);s>255&&(Ie(o),Z("String has UTF-16 code units that do not fit in 8 bits")),_[o+u]=s}else for(u=0;u<n;++u)_[o+u]=r[u];return null!==e&&e.push(Ie,i),i},argPackAdvance:8,readValueFromPointer:me,destructorFunction(e){Ie(e)}})},e:(e,r,t)=>{var n,a,i,o,u;t=G(t),2===r?(n=Ae,a=Te,o=Ce,i=()=>A,u=1):4===r&&(n=Ee,a=Fe,o=Pe,i=()=>C,u=2),ee(e,{name:t,fromWireType:e=>{for(var t,a=C[e>>2],o=i(),s=e+4,l=0;l<=a;++l){var c=e+4+l*r;if(l==a||0==o[c>>u]){var f=n(s,c-s);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),s=c+r}}return Ie(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Z(`Cannot pass non-string to C++ string type ${t}`);var i=o(n),s=Ue(4+i+r);return C[s>>2]=i>>u,a(n,s+4,i+r),null!==e&&e.push(Ie,s),s},argPackAdvance:8,readValueFromPointer:ne,destructorFunction(e){Ie(e)}})},l:(e,r)=>{ee(e,{isVoid:!0,name:r=G(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},r:()=>!0,f:()=>{$("")},s:()=>Date.now(),n:()=>2147483648,u:ve,v:(e,r,t)=>_.copyWithin(e,r,r+t),t:e=>{var r=_.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var o=Math.min(t,n(Math.max(e,i),65536));if(Se(o))return!0}return!1},p:(e,r)=>{var t=0;return Re().forEach(((n,a)=>{var i=r+t;C[e+4*a>>2]=i,((e,r)=>{for(var t=0;t<e.length;++t)w[0|r++]=e.charCodeAt(t);w[0|r]=0})(n,i),t+=n.length+1})),0},q:(e,r)=>{var t=Re();C[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),C[r>>2]=n,0},o:(e,r,t,n,a)=>((e,r,t,n)=>{var a=C[n+40>>2],i={tm_sec:T[n>>2],tm_min:T[n+4>>2],tm_hour:T[n+8>>2],tm_mday:T[n+12>>2],tm_mon:T[n+16>>2],tm_year:T[n+20>>2],tm_wday:T[n+24>>2],tm_yday:T[n+28>>2],tm_isdst:T[n+32>>2],tm_gmtoff:T[n+36>>2],tm_zone:a?_e(a):""},o=_e(t),u={"%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 s in u)o=o.replace(new RegExp(s,"g"),u[s]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["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 d(e,r){return f(e,r,"0")}function h(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 p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=Me(t.getFullYear()),a=t.getMonth(),i=(n?je:Oe)[a];if(!(r>i-t.getDate()))return t.setDate(t.getDate()+r),t;r-=i-t.getDate()+1,t.setDate(1),a<11?t.setMonth(a+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),a=p(t),i=p(n);return h(a,r)<=0?h(i,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var v={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>c[e.tm_mon].substring(0,3),"%B":e=>c[e.tm_mon],"%C":e=>d((e.tm_year+1900)/100|0,2),"%d":e=>d(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>m(e).toString().substring(2),"%G":e=>m(e),"%H":e=>d(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),d(r,2)},"%j":e=>d(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(Me(e.tm_year+1900)?je:Oe,e.tm_mon-1),3),"%m":e=>d(e.tm_mon+1,2),"%M":e=>d(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>d(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return d(Math.floor(r/7),2)},"%V":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&&Me(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Me(e.tm_year%400-1))&&r++}return d(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":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":e=>e.tm_zone,"%%":()=>"%"};for(var s in o=o.replace(/%%/g,"\0\0"),v)o.includes(s)&&(o=o.replace(new RegExp(s,"g"),v[s](i)));var y=function(e,r,t){var n=ge(e)+1,a=new Array(n);return ye(e,a,0,a.length),a}(o=o.replace(/\0\0/g,"%"));return y.length>r?0:(((e,r)=>{w.set(e,r)})(y,e),y.length-1)})(e,r,t,n)},ke=function(){var e={a:De};function r(e,r){return ke=e.exports,y=ke.w,S(),ae=ke.y,function(e){R.unshift(e)}(ke.x),function(e){if(D--,n.monitorRunDependencies&&n.monitorRunDependencies(D),0==D&&k){var r=k;k=null,r()}}(),ke}if(D++,n.monitorRunDependencies&&n.monitorRunDependencies(D),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){g(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||U(r)||I(r)||d||"function"!=typeof fetch?Y(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return g(`wasm streaming compile failed: ${e}`),g("falling back to ArrayBuffer instantiation"),Y(r,t,n)}))))}(v,x,e,(function(e){r(e.instance)})).catch(t),{}}(),$e=e=>($e=ke.z)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=ke.A)();var xe,Ue=n._malloc=e=>(Ue=n._malloc=ke.B)(e),Ie=n._free=e=>(Ie=n._free=ke.C)(e),He=e=>(He=ke.D)(e);function Ye(){function e(){xe||(xe=!0,n.calledRun=!0,P||(z(R),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)O(n.postRun.shift());z(M)}()))}D>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)j(n.preRun.shift());z(W)}(),D>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viijii=(e,r,t,a,i,o,u)=>(n.dynCall_viijii=ke.E)(e,r,t,a,i,o,u),n.dynCall_iiiiij=(e,r,t,a,i,o,u)=>(n.dynCall_iiiiij=ke.F)(e,r,t,a,i,o,u),n.dynCall_iiiiijj=(e,r,t,a,i,o,u,s,l)=>(n.dynCall_iiiiijj=ke.G)(e,r,t,a,i,o,u,s,l),n.dynCall_iiiiiijj=(e,r,t,a,i,o,u,s,l,c)=>(n.dynCall_iiiiiijj=ke.H)(e,r,t,a,i,o,u,s,l,c),k=function e(){xe||Ye(),xe||(k=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Ye(),e.ready},n.exports=i;const s=(0,o.g)(u.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:s},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4349],{71903:(e,t,i)=>{var l;i.d(t,{u:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},89186:(e,t,i)=>{i.d(t,{f:()=>p});var l=i(90237),s=(i(59456),i(10107)),o=(i(44208),i(53966),i(87811),i(36005)),r=i(40608),n=i(87045),a=i(65509),c=i(25943),h=i(16930);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const l=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:o,minScale:r,maxScale:h}=t;if(null==s&&null==o&&0!==r&&0!==h){const e=e=>Math.round(1e4*e)/1e4;r=e(r||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=r?i.level:s,o=t>=h?i.level:o}}if(l)return new c.d({layer:this,minLOD:s,maxLOD:o});if(t.tileInfo){const e=new n.A;return e.read(t.tileInfo,i),new a.A(e,s,o)}return null}};return(0,l._)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"minScale",void 0),(0,l._)([(0,o.w)("service","minScale")],t.prototype,"readMinScale",null),(0,l._)([(0,s.MZ)()],t.prototype,"maxScale",void 0),(0,l._)([(0,o.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,l._)([(0,s.MZ)({type:h.A})],t.prototype,"spatialReference",void 0),(0,l._)([(0,s.MZ)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,l._)([(0,s.MZ)({type:n.A})],t.prototype,"tileInfo",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"tilemapCache",void 0),(0,l._)([(0,o.w)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,l._)([(0,s.MZ)()],t.prototype,"version",void 0),t=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISCachedService")],t),t}},18768:(e,t,i)=>{i.d(t,{b:()=>a});var l=i(90237),s=i(53966),o=i(10107),r=(i(44208),i(87811),i(40608)),n=i(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,l._)([(0,o.MZ)()],t.prototype,"title",null),(0,l._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISService")],t),t}},91806:(e,t,i)=>{i.d(t,{A:()=>h});var l,s=i(90237),o=i(25482),r=i(10107),n=i(56507),a=(i(87811),i(44208),i(40608));let c=l=class extends o.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,s._)([(0,r.MZ)({type:n.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=l=(0,s._)([(0,a.$)("esri.layers.support.LOD")],c);const h=c},87045:(e,t,i)=>{i.d(t,{A:()=>M});var l,s=i(90237),o=i(66552),r=i(25482),n=i(83047),a=i(10107),c=i(56507),h=(i(87811),i(44208),i(36005)),p=i(40608),u=i(43937),f=i(86738),d=i(16930),v=i(19419),m=i(21325),y=i(28735),w=i(91806),g=i(72802);const _=new o.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=l=class extends r.oY{static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:o=d.A.WebMercator,numLODs:r=24}=e;if(!(0,m.fn)(o)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new w.A({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=r-1;i>=0;i--)e.unshift(new w.A({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new f.A(0,0,o),size:[s,s],spatialReference:o})}const a=(0,m.Vp)(o),c=e.origin?new f.A({x:e.origin.x,y:e.origin.y,spatialReference:o}):new f.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:o}:{x:0,y:0,spatialReference:o}),h=1/(39.37*(0,n.GA)(o)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*h;p.push(new w.A({level:e,scale:t,resolution:l}))}else{let e=(0,m.EA)(o)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(r/t);p.push(new w.A({level:0,scale:e,resolution:e*h}));for(let l=1;l<i;l++){const i=e/2**t,s=i*h;p.push(new w.A({level:l,scale:i,resolution:s})),e=i}}return new l({dpi:96,lods:p,origin:c,size:[s,s],spatialReference:o})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return f.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e}))),this._set("scales",l),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],s=t[l+1];if(i<=e)return l;if(s===e)return l+1;if(i>e&&s<e)return l+Math.log(i/e)/Math.log(i/s)}return l}tileAt(e,t,i,l){const s=this.lodAt(e);if(!s)return null;let o,r;if("number"==typeof t)o=t,r=i;else if((0,m.aI)(t.spatialReference,this.spatialReference))o=t.x,r=t.y,l=i;else{const e=(0,y.Cv)(t,this.spatialReference);if(null==e)return null;o=e.x,r=e.y,l=i}const n=s.resolution*this.size[0],a=s.resolution*this.size[1];return l||(l=new g.U(null,0,0,0,(0,v.vt)())),l.level=e,l.row=Math.floor((this.origin.y-r)/a+.001),l.col=Math.floor((o-this.origin.x)/n+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,o=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.vt)()),e.extent[0]=this.origin.x+e.col*o,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+o,e.extent[3]=e.extent[1]+r}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,s=l*this.size[0],o=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*o,e[2]=e[0]+s,e[3]=e[1]+o,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],s=this.lods.length-t;for(let e=0;e<s;e++){const l=e+t,{scale:s,resolution:o}=l>=0?this.lods[l]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new w.A({level:e,scale:s,resolution:o}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var A,O;(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,s._)([(0,a.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],b.prototype,"isWrappable",null),(0,s._)([(0,a.MZ)({type:f.A,json:{write:!0}})],b.prototype,"origin",void 0),(0,s._)([(0,h.w)("origin")],b.prototype,"readOrigin",null),(0,s._)([(0,a.MZ)({type:[w.A],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,s._)([(0,a.MZ)({readOnly:!0})],b.prototype,"scales",void 0),(0,s._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,s._)([(0,h.w)("size",["rows","cols"])],b.prototype,"readSize",null),(0,s._)([(0,u.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],b.prototype,"writeSize",null),(0,s._)([(0,a.MZ)({type:d.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=l=(0,s._)([(0,p.$)("esri.layers.support.TileInfo")],b),(O=(A=b||(b={})).ExtrapolateOptions||(A.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO";const M=b},65509:(e,t,i)=>{i.d(t,{A:()=>o});var l=i(49186),s=i(74887);class o{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const l=this.tileInfo?.lodAt(e);return!l||e<this.minLOD||e>this.maxLOD?"unavailable":l.cols&&l.rows?i>=l.cols[0]&&i<=l.cols[1]&&t>=l.rows[0]&&t<=l.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,o){await(0,s.NO)(o);const r=this.getAvailability(e,t,i);if("unavailable"===r)throw new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return r}async fetchAvailabilityUpsample(e,t,i,l,o){await(0,s.NO)(o),l.level=e,l.row=t,l.col=i;const r=this.tileInfo;return r.updateTileInfo(l),this.fetchAvailability(e,t,i,o).catch((e=>{if((0,s.zf)(e))throw e;if(r.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,o);throw e}))}}},72802:(e,t,i)=>{i.d(t,{U:()=>l});class l{constructor(e,t,i,l,s=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=s}}},25943:(e,t,i)=>{i.d(t,{d:()=>M});var l,s=i(90237),o=i(78888),r=i(69622),n=i(71903),a=i(49186),c=i(36563),h=i(55359),p=i(3694),u=i(74887),f=i(36708),d=i(11932),v=i(84952),m=i(10107),y=(i(44208),i(53966),i(87811),i(40608)),w=i(72802),g=i(4576),_=i(4718),b=i(34275);class A{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.o8)(t));const l=this.location.width,s=this.location.height;let o=!0,r=!0;const n=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*s/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(r=!1,n[c]|=1<<t):o=!1,31===t&&++c}r?(this._availability="unavailable",this.byteSize=40):o?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,b.Ek)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,s=i>>5,o=this._availability;return s<0||s>o.length?"unknown":o[s]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||o.A,{row:l,col:s,width:r,height:n}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:l,left:s,width:r,height:n},valid:!0,data:(0,g.dY)(r*n,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==l||e.location.left!==s||e.location.width!==r||e.location.height!==n))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:s,width:r,height:n}});return A.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new A(e))}}function O(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let M=l=class extends r.A{constructor(e){super(e),this._pendingTilemapRequests={},this.request=o.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2*n.u.MEGABYTES),this.addHandles((0,f.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),f.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}fetchTilemap(e,t,i,l){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,o=this._tilemapFromCache(e,t,i,s);if(o)return Promise.resolve(o);const r=l?.signal;return l={...l,signal:null},new Promise(((e,t)=>{(0,u.u7)(r,(()=>t((0,u.NK)())));const i=O(s);let o=this._pendingTilemapRequests[i];if(!o){o=A.fromDefinition(s,l).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=o,o.then(e,e)}o.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,l).catch((e=>e)).then((l=>{if(l instanceof A){const s=l.getAvailability(t,i);if("unavailable"===s)throw new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}if((0,u.zf)(l))throw l;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,l,s){l.level=e,l.row=t,l.col=i;const o=this.layer.tileInfo;o.updateTileInfo(l);const r=this.fetchAvailability(e,t,i,s).catch((e=>{if((0,u.zf)(e))throw e;if(o.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,s);throw e}));return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,s,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,o,r){if(!this._prefetchingEnabled||null==e)return;const n=`prefetch-${e}`;if(this.hasHandles(n))return;const a=new AbortController;r.then((()=>a.abort()),(()=>a.abort()));let h=!1;const p=(0,c.hA)((()=>{h||(h=!0,a.abort())}));if(this.addHandles(p,n),await(0,d.md)(10,a.signal).catch((()=>{})),h||(h=!0,this.removeHandles(n)),(0,u.G4)(a))return;const f=new w.U(e,t,i,s),v={...o,signal:a.signal},m=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&m.upsampleTile(f);++e){const e=this.fetchAvailability(f.level,f.row,f.col,v);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,v.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const s=O(l);return this._tilemapCache.get(s)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,l)=>!!e._tilemapFromCache(t,i,l,e._tmpTilemapDefinition)}}};M._maxPrefetch=4,M._prefetches=new p.A({initialSize:l._maxPrefetch}),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=l=(0,s._)([(0,y.$)("esri.layers.support.TilemapCache")],M)}}]);
|