@ifc-lite/viewer 1.21.0 → 1.22.0
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/.turbo/turbo-build.log +57 -50
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +10 -0
- package/dist/assets/arrow-fie-E7fe.js +20 -0
- package/dist/assets/ascii-points-source-bTjLVmUX.js +1 -0
- package/dist/assets/{basketViewActivator-Bzw51jhm.js → basketViewActivator-EHAhHlwN.js} +12 -13
- package/dist/assets/bcf-Bhx-K17f.js +281 -0
- package/dist/assets/{browser-C5TFR7sH.js → browser-CVf8ATeW.js} +6 -6
- package/dist/assets/cesium-B4ZIU9jS.js +17742 -0
- package/dist/assets/decode-worker-CYqSjk1n.js +172 -0
- package/dist/assets/e57-source-CQHxE8n3.js +1 -0
- package/dist/assets/emscripten-module.browser-DcFZLAUx.js +1 -0
- package/dist/assets/exporters-KTio0Tdm.js +5723 -0
- package/dist/assets/geometry-controller.worker-Cm2P_EJr.js +7 -0
- package/dist/assets/geometry.worker-DchLBqZ8.js +1 -0
- package/dist/assets/{ids-B7AXEv7h.js → ids-CS7VCFin.js} +5 -5
- package/dist/assets/ifc-lite-C6wEhXa6.js +7 -0
- package/dist/assets/{ifc-lite_bg-DlKs5-yM.wasm → ifc-lite_bg-CSeT3fNI.wasm} +0 -0
- package/dist/assets/{ifc-lite_bg-PqmRe3Ph.wasm → ifc-lite_bg-ns4cSnX2.wasm} +0 -0
- package/dist/assets/{index-DVNSvEMh.js → index-8k9h-ANq.js} +60997 -59926
- package/dist/assets/index-BZC2YaOP.css +1 -0
- package/dist/assets/index-HqAIQkr6.js +22 -0
- package/dist/assets/inline-worker-BpBzlmd6.js +1 -0
- package/dist/assets/las-BW6LIc_j.js +1 -0
- package/dist/assets/las-source-C_IGrgRq.js +1 -0
- package/dist/assets/laz-source-jj3xI5Y4.js +125 -0
- package/dist/assets/maplibre-gl-C4LXKM6c.js +808 -0
- package/dist/assets/{native-bridge-BiD01jI9.js → native-bridge-DNrEhx2R.js} +5 -8
- package/dist/assets/{parser.worker-Bnbrl6gy.js → parser.worker-BcjkIo89.js} +2 -2
- package/dist/assets/pcd-source-Ck0UnVDn.js +3 -0
- package/dist/assets/ply-source-C8jjyzxE.js +4 -0
- package/dist/assets/{exporters-u0sz2Upj.js → sandbox-BSn5MyEJ.js} +11745 -7412
- package/dist/assets/{server-client-DP8fMPY9.js → server-client-D-kU2XAF.js} +4 -4
- package/dist/assets/{three-CDRZThFA.js → three-DwNDHx9-.js} +163 -171
- package/dist/assets/wasm-bridge-Cha08LdC.js +1 -0
- package/dist/assets/{workerHelpers-CBbWSJmd.js → workerHelpers-pUUnk9Wc.js} +1 -1
- package/dist/assets/zip-BJqVbRkU.js +2 -0
- package/dist/index.html +10 -12
- package/package.json +11 -11
- package/src/components/mcp/PlaygroundChat.tsx +90 -52
- package/src/components/viewer/CesiumOverlay.tsx +150 -91
- package/src/components/viewer/CesiumPlacementEditor.tsx +1009 -0
- package/src/components/viewer/ChatPanel.tsx +76 -93
- package/src/components/viewer/EntityContextMenu.tsx +68 -10
- package/src/components/viewer/MainToolbar.tsx +33 -3
- package/src/components/viewer/ViewportContainer.tsx +70 -16
- package/src/components/viewer/ViewportOverlays.tsx +2 -98
- package/src/components/viewer/chat/ByokKeyModal.tsx +338 -0
- package/src/components/viewer/chat/ByokStreamingPill.tsx +62 -0
- package/src/components/viewer/chat/ByokTrustDiagram.tsx +192 -0
- package/src/components/viewer/properties/GeoreferencingPanel.tsx +49 -52
- package/src/components/viewer/properties/ModelMetadataPanel.tsx +55 -44
- package/src/components/viewer/selectionHandlers.ts +7 -1
- package/src/lib/geo/cesium-bridge.ts +86 -50
- package/src/lib/geo/cesium-placement.test.ts +244 -0
- package/src/lib/geo/cesium-placement.ts +231 -0
- package/src/lib/geo/effective-georef.test.ts +74 -1
- package/src/lib/geo/effective-georef.ts +40 -93
- package/src/lib/geo/geo-scale.ts +104 -0
- package/src/lib/geo/reproject.test.ts +130 -0
- package/src/lib/geo/reproject.ts +37 -12
- package/src/lib/geo/terrain-elevation.ts +198 -89
- package/src/lib/lens/adapter.ts +52 -6
- package/src/lib/llm/clipboard-detect.test.ts +150 -0
- package/src/lib/llm/clipboard-detect.ts +90 -0
- package/src/lib/llm/models.ts +28 -0
- package/src/lib/llm/stream-direct.ts +16 -4
- package/src/lib/llm/types.ts +8 -0
- package/src/services/playground-model.ts +55 -0
- package/src/store/index.ts +4 -5
- package/src/store/slices/cesiumSlice.ts +100 -19
- package/src/store.ts +3 -0
- package/dist/assets/arrow-CZ5kQ26f.js +0 -20
- package/dist/assets/bcf-4K724hw0.js +0 -281
- package/dist/assets/cesium-DUOzBlqv.js +0 -17817
- package/dist/assets/decode-worker-t2EGKAxO.js +0 -1708
- package/dist/assets/emscripten-module.browser-CY5t0Vfq.js +0 -1
- package/dist/assets/geometry-controller.worker-NH8pZmrU.js +0 -7
- package/dist/assets/geometry.worker-Bp4rW_R1.js +0 -1
- package/dist/assets/ifc-lite-DfZHk36-.js +0 -7
- package/dist/assets/index-CSWgTe1s.css +0 -1
- package/dist/assets/index-XwKzDuw6.js +0 -22
- package/dist/assets/maplibre-gl-CGLcoNXc.js +0 -811
- package/dist/assets/sandbox-DPD1ROr0.js +0 -9700
- package/dist/assets/wasm-bridge-CErti6zX.js +0 -1
- package/dist/assets/zip-DBEtpeu6.js +0 -12
- package/src/components/viewer/CesiumSettingsDialog.tsx +0 -100
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function On(k,X){return X.forEach(function(I){I&&typeof I!="string"&&!Array.isArray(I)&&Object.keys(I).forEach(function(Y){if(Y!=="default"&&!(Y in k)){var G=Object.getOwnPropertyDescriptor(I,Y);Object.defineProperty(k,Y,G.get?G:{enumerable:!0,get:function(){return I[Y]}})}})}),Object.freeze(k)}function Rn(k){return k&&k.__esModule&&Object.prototype.hasOwnProperty.call(k,"default")?k.default:k}var L={},Je={exports:{}},At;function Dn(){return At||(At=1,(function(k,X){var I=(()=>{var Y=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return(function(G){G=G||{};var i=typeof G<"u"?G:{},qe,Se;i.ready=new Promise(function(e,t){qe=e,Se=t}),["_main","___getTypeName","__embind_initialize_bindings","_fflush","onRuntimeInitialized"].forEach(e=>{Object.getOwnPropertyDescriptor(i.ready,e)||Object.defineProperty(i.ready,e,{get:()=>F("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>F("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})});var Ke=Object.assign({},i),Xe="./this.program",Ot=!0;if(i.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var x="";function Rt(e){return i.locateFile?i.locateFile(e,x):x+e}var Dt;if(typeof document<"u"&&document.currentScript&&(x=document.currentScript.src),Y&&(x=Y),x.indexOf("blob:")!==0?x=x.substr(0,x.replace(/[?#].*/,"").lastIndexOf("/")+1):x="",!(typeof window=="object"||typeof importScripts=="function"))throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var Mt=i.print||console.log.bind(console),P=i.printErr||console.warn.bind(console);Object.assign(i,Ke),Ke=null,Pn(),i.arguments&&i.arguments,U("arguments","arguments_"),i.thisProgram&&(Xe=i.thisProgram),U("thisProgram","thisProgram"),i.quit&&i.quit,U("quit","quit_"),d(typeof i.memoryInitializerPrefixURL>"u","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),d(typeof i.pthreadMainPrefixURL>"u","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),d(typeof i.cdInitializerPrefixURL>"u","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),d(typeof i.filePackagePrefixURL>"u","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),d(typeof i.read>"u","Module.read option was removed (modify read_ in JS)"),d(typeof i.readAsync>"u","Module.readAsync option was removed (modify readAsync in JS)"),d(typeof i.readBinary>"u","Module.readBinary option was removed (modify readBinary in JS)"),d(typeof i.setWindowTitle>"u","Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),d(typeof i.TOTAL_MEMORY>"u","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),U("read","read_"),U("readAsync","readAsync"),U("readBinary","readBinary"),U("setWindowTitle","setWindowTitle"),d(!0,"worker environment detected but not enabled at build time. Add 'worker' to `-sENVIRONMENT` to enable."),d(!0,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),d(!0,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");function U(e,t){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get:function(){F("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function Lt(e){Object.getOwnPropertyDescriptor(i,e)&&F("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function Qe(e){return e==="FS_createPath"||e==="FS_createDataFile"||e==="FS_createPreloadedFile"||e==="FS_unlink"||e==="addRunDependency"||e==="FS_createLazyFile"||e==="FS_createDevice"||e==="removeRunDependency"}function Ut(e){typeof globalThis<"u"&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line";Qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),q(t)}})}function $t(e){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";Qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),F(t)}})}var ie;i.wasmBinary&&(ie=i.wasmBinary),U("wasmBinary","wasmBinary"),i.noExitRuntime,U("noExitRuntime","noExitRuntime"),typeof WebAssembly!="object"&&F("no native wasm support detected");var ae,ge=!1;function d(e,t){e||F("Assertion failed"+(t?": "+t:""))}var Ze=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function et(e,t,r){for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&Ze)return Ze.decode(e.subarray(t,a));for(var s="";t<a;){var u=e[t++];if(!(u&128)){s+=String.fromCharCode(u);continue}var o=e[t++]&63;if((u&224)==192){s+=String.fromCharCode((u&31)<<6|o);continue}var l=e[t++]&63;if((u&240)==224?u=(u&15)<<12|o<<6|l:((u&248)!=240&&q("Invalid UTF-8 leading byte 0x"+u.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),u=(u&7)<<18|o<<12|l<<6|e[t++]&63),u<65536)s+=String.fromCharCode(u);else{var f=u-65536;s+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return s}function Fe(e,t){return e?et(S,e,t):""}function tt(e,t,r,n){if(!(n>0))return 0;for(var a=r,s=r+n-1,u=0;u<e.length;++u){var o=e.charCodeAt(u);if(o>=55296&&o<=57343){var l=e.charCodeAt(++u);o=65536+((o&1023)<<10)|l&1023}if(o<=127){if(r>=s)break;t[r++]=o}else if(o<=2047){if(r+1>=s)break;t[r++]=192|o>>6,t[r++]=128|o&63}else if(o<=65535){if(r+2>=s)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|o&63}else{if(r+3>=s)break;o>1114111&&q("Invalid Unicode code point 0x"+o.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|o&63}}return t[r]=0,r-a}function Wt(e,t,r){return d(typeof r=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),tt(e,S,t,r)}function rt(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t}var me,$,S,Q,_e,y,v,nt,it;function at(e){me=e,i.HEAP8=$=new Int8Array(e),i.HEAP16=Q=new Int16Array(e),i.HEAP32=y=new Int32Array(e),i.HEAPU8=S=new Uint8Array(e),i.HEAPU16=_e=new Uint16Array(e),i.HEAPU32=v=new Uint32Array(e),i.HEAPF32=nt=new Float32Array(e),i.HEAPF64=it=new Float64Array(e)}var Ae=65536;i.TOTAL_STACK&&d(Ae===i.TOTAL_STACK,"the stack size can no longer be determined at runtime");var ke=i.INITIAL_MEMORY||262144;U("INITIAL_MEMORY","INITIAL_MEMORY"),d(ke>=Ae,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+ke+"! (TOTAL_STACK="+Ae+")"),d(typeof Int32Array<"u"&&typeof Float64Array<"u"&&Int32Array.prototype.subarray!=null&&Int32Array.prototype.set!=null,"JS engine does not provide full typed array support"),d(!i.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),d(ke==262144,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");var he;function Nt(){var e=ze();d((e&3)==0),v[e>>2]=34821223,v[e+4>>2]=2310721022,v[0]=1668509029}function Ie(){if(!ge){var e=ze(),t=v[e>>2],r=v[e+4>>2];(t!=34821223||r!=2310721022)&&F("Stack overflow! Stack cookie has been overwritten at 0x"+e.toString(16)+", expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),v[0]!==1668509029&&F("Runtime error: The application has corrupted its heap memory area (address zero)!")}}(function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,t[0]!==115||t[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();var ot=[],st=[],lt=[],Oe=!1;function xt(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)Yt(i.preRun.shift());Re(ot)}function jt(){d(!Oe),Oe=!0,Ie(),Re(st)}function Ht(){if(Ie(),i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)Bt(i.postRun.shift());Re(lt)}function Yt(e){ot.unshift(e)}function Gt(e){st.unshift(e)}function Bt(e){lt.unshift(e)}d(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),d(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),d(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),d(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var z=0,J=null,oe=null,se={};function Vt(e){z++,i.monitorRunDependencies&&i.monitorRunDependencies(z),d(!se[e]),se[e]=1,J===null&&typeof setInterval<"u"&&(J=setInterval(function(){if(ge){clearInterval(J),J=null;return}var t=!1;for(var r in se)t||(t=!0,P("still waiting on run dependencies:")),P("dependency: "+r);t&&P("(end of list)")},1e4))}function zt(e){if(z--,i.monitorRunDependencies&&i.monitorRunDependencies(z),d(se[e]),delete se[e],z==0&&(J!==null&&(clearInterval(J),J=null),oe)){var t=oe;oe=null,t()}}function F(e){i.onAbort&&i.onAbort(e),e="Aborted("+e+")",P(e),ge=!0;var t=new WebAssembly.RuntimeError(e);throw Se(t),t}var D={error:function(){F("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init:function(){D.error()},createDataFile:function(){D.error()},createPreloadedFile:function(){D.error()},createLazyFile:function(){D.error()},open:function(){D.error()},mkdev:function(){D.error()},registerDevice:function(){D.error()},analyzePath:function(){D.error()},loadFilesFromDB:function(){D.error()},ErrnoError:function(){D.error()}};i.FS_createDataFile=D.createDataFile,i.FS_createPreloadedFile=D.createPreloadedFile;var Jt="data:application/octet-stream;base64,";function ut(e){return e.startsWith(Jt)}function qt(e){return e.startsWith("file://")}function T(e,t){return function(){var r=e,n=t;return n=i.asm,d(Oe,"native function `"+r+"` called before runtime initialization"),n[e]||d(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}var O;O="laz-perf.wasm",ut(O)||(O=Rt(O));function ct(e){try{if(e==O&&ie)return new Uint8Array(ie);throw"both async and sync fetching of the wasm failed"}catch(t){F(t)}}function Kt(){return!ie&&Ot&&typeof fetch=="function"?fetch(O,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+O+"'";return e.arrayBuffer()}).catch(function(){return ct(O)}):Promise.resolve().then(function(){return ct(O)})}function Xt(){var e={env:Pt,wasi_snapshot_preview1:Pt};function t(o,l){var f=o.exports;i.asm=f,ae=i.asm.memory,d(ae,"memory not found in wasm exports"),at(ae.buffer),he=i.asm.__indirect_function_table,d(he,"table not found in wasm exports"),Gt(i.asm.__wasm_call_ctors),zt("wasm-instantiate")}Vt("wasm-instantiate");var r=i;function n(o){d(i===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(o.instance)}function a(o){return Kt().then(function(l){return WebAssembly.instantiate(l,e)}).then(function(l){return l}).then(o,function(l){P("failed to asynchronously prepare wasm: "+l),qt(O)&&P("warning: Loading from a file URI ("+O+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),F(l)})}function s(){return!ie&&typeof WebAssembly.instantiateStreaming=="function"&&!ut(O)&&typeof fetch=="function"?fetch(O,{credentials:"same-origin"}).then(function(o){var l=WebAssembly.instantiateStreaming(o,e);return l.then(n,function(f){return P("wasm streaming compile failed: "+f),P("falling back to ArrayBuffer instantiation"),a(n)})}):a(n)}if(i.instantiateWasm)try{var u=i.instantiateWasm(e,t);return u}catch(o){return P("Module.instantiateWasm callback failed with error: "+o),!1}return s().catch(Se),{}}function Re(e){for(;e.length>0;)e.shift()(i)}function q(e){q.shown||(q.shown={}),q.shown[e]||(q.shown[e]=1,P(e))}function Qt(e,t){d(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),$.set(e,t)}function Zt(e){return Ve(e+24)+24}function er(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){v[this.ptr+4>>2]=t},this.get_type=function(){return v[this.ptr+4>>2]},this.set_destructor=function(t){v[this.ptr+8>>2]=t},this.get_destructor=function(){return v[this.ptr+8>>2]},this.set_refcount=function(t){y[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,$[this.ptr+12>>0]=t},this.get_caught=function(){return $[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,$[this.ptr+13>>0]=t},this.get_rethrown=function(){return $[this.ptr+13>>0]!=0},this.init=function(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=y[this.ptr>>2];y[this.ptr>>2]=t+1},this.release_ref=function(){var t=y[this.ptr>>2];return y[this.ptr>>2]=t-1,d(t>0),t===1},this.set_adjusted_ptr=function(t){v[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return v[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=Fn(this.get_type());if(t)return v[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function tr(e,t,r){var n=new er(e);throw n.init(t,r),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -sNO_DISABLE_EXCEPTION_CATCHING or -sEXCEPTION_CATCHING_ALLOWED=[..] to catch."}function rr(e,t,r,n,a){}function De(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function nr(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ft=e}var ft=void 0;function M(e){for(var t="",r=e;S[r];)t+=ft[S[r++]];return t}var Z={},ee={},ve={},ir=48,ar=57;function Me(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=ir&&t<=ar?"_"+e:e}function Le(e,t){return e=Me(e),new Function("body","return function "+e+`() {
|
|
2
|
+
"use strict"; return body.apply(this, arguments);
|
|
3
|
+
};
|
|
4
|
+
`)(t)}function Ue(e,t){var r=Le(t,function(n){this.name=t,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
|
|
5
|
+
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},r}var te=void 0;function h(e){throw new te(e)}var dt=void 0;function ye(e){throw new dt(e)}function le(e,t,r){e.forEach(function(o){ve[o]=t});function n(o){var l=r(o);l.length!==e.length&&ye("Mismatched type converter count");for(var f=0;f<e.length;++f)j(e[f],l[f])}var a=new Array(t.length),s=[],u=0;t.forEach((o,l)=>{ee.hasOwnProperty(o)?a[l]=ee[o]:(s.push(o),Z.hasOwnProperty(o)||(Z[o]=[]),Z[o].push(()=>{a[l]=ee[o],++u,u===s.length&&n(a)}))}),s.length===0&&n(a)}function j(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||h('type "'+n+'" must have a positive integer typeid pointer'),ee.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;h("Cannot register type '"+n+"' twice")}if(ee[e]=t,delete ve[e],Z.hasOwnProperty(e)){var a=Z[e];delete Z[e],a.forEach(s=>s())}}function or(e,t,r,n,a){var s=De(r);t=M(t),j(e,{name:t,fromWireType:function(u){return!!u},toWireType:function(u,o){return o?n:a},argPackAdvance:8,readValueFromPointer:function(u){var o;if(r===1)o=$;else if(r===2)o=Q;else if(r===4)o=y;else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(o[u>>s])},destructorFunction:null})}function sr(e){if(!(this instanceof B)||!(e instanceof B))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,a=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return t===n&&r===a}function lr(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function $e(e){function t(r){return r.$$.ptrType.registeredClass.name}h(t(e)+" instance already deleted")}var We=!1;function pt(e){}function ur(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function gt(e){e.count.value-=1;var t=e.count.value===0;t&&ur(e)}function mt(e,t,r){if(t===r)return e;if(r.baseClass===void 0)return null;var n=mt(e,t,r.baseClass);return n===null?null:r.downcast(n)}var _t={};function cr(){return Object.keys(fe).length}function fr(){var e=[];for(var t in fe)fe.hasOwnProperty(t)&&e.push(fe[t]);return e}var ue=[];function Ne(){for(;ue.length;){var e=ue.pop();e.$$.deleteScheduled=!1,e.delete()}}var ce=void 0;function dr(e){ce=e,ue.length&&ce&&ce(Ne)}function pr(){i.getInheritedInstanceCount=cr,i.getLiveInheritedInstances=fr,i.flushPendingDeletes=Ne,i.setDelayFunction=dr}var fe={};function gr(e,t){for(t===void 0&&h("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function mr(e,t){return t=gr(e,t),fe[t]}function be(e,t){(!t.ptrType||!t.ptr)&&ye("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&ye("Both smartPtrType and smartPtr must be specified"),t.count={value:1},de(Object.create(e,{$$:{value:t}}))}function ht(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=mr(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?be(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):be(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s=this.registeredClass.getActualType(t),u=_t[s];if(!u)return a.call(this);var o;this.isConst?o=u.constPointerType:o=u.pointerType;var l=mt(t,this.registeredClass,o.registeredClass);return l===null?a.call(this):this.isSmartPointer?be(o.registeredClass.instancePrototype,{ptrType:o,ptr:l,smartPtrType:this,smartPtr:e}):be(o.registeredClass.instancePrototype,{ptrType:o,ptr:l})}function de(e){return typeof FinalizationRegistry>"u"?(de=t=>t,e):(We=new FinalizationRegistry(t=>{console.warn(t.leakWarning.stack.replace(/^Error: /,"")),gt(t.$$)}),de=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var a={$$:r},s=r.ptrType.registeredClass;a.leakWarning=new Error("Embind found a leaked C++ instance "+s.name+" <0x"+r.ptr.toString(16)+`>.
|
|
6
|
+
We'll free it automatically in this case, but this functionality is not reliable across various environments.
|
|
7
|
+
Make sure to invoke .delete() manually once you're done with the instance instead.
|
|
8
|
+
Originally allocated`),"captureStackTrace"in Error&&Error.captureStackTrace(a.leakWarning,ht),We.register(t,a,t)}return t},pt=t=>We.unregister(t),de(e))}function _r(){if(this.$$.ptr||$e(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=de(Object.create(Object.getPrototypeOf(this),{$$:{value:lr(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function hr(){this.$$.ptr||$e(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&h("Object already scheduled for deletion"),pt(this),gt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function vr(){return!this.$$.ptr}function yr(){return this.$$.ptr||$e(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&h("Object already scheduled for deletion"),ue.push(this),ue.length===1&&ce&&ce(Ne),this.$$.deleteScheduled=!0,this}function br(){B.prototype.isAliasOf=sr,B.prototype.clone=_r,B.prototype.delete=hr,B.prototype.isDeleted=vr,B.prototype.deleteLater=yr}function B(){}function vt(e,t,r){if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||h("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Tr(e,t,r){i.hasOwnProperty(e)?(h("Cannot register public name '"+e+"' twice"),vt(i,e,e),i.hasOwnProperty(r)&&h("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),i[e].overloadTable[r]=t):i[e]=t}function wr(e,t,r,n,a,s,u,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=s,this.upcast=u,this.downcast=o,this.pureVirtualFunctions=[]}function xe(e,t,r){for(;t!==r;)t.upcast||h("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Cr(e,t){if(t===null)return this.isReference&&h("null is not a valid "+this.name),0;t.$$||h('Cannot pass "'+ne(t)+'" as a '+this.name),t.$$.ptr||h("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass,n=xe(t.$$.ptr,r,this.registeredClass);return n}function Er(e,t){var r;if(t===null)return this.isReference&&h("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;t.$$||h('Cannot pass "'+ne(t)+'" as a '+this.name),t.$$.ptr||h("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&h("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=xe(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&h("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:h("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var a=t.clone();r=this.rawShare(r,Ge.toHandle(function(){a.delete()})),e!==null&&e.push(this.rawDestructor,r)}break;default:h("Unsupporting sharing policy")}return r}function Pr(e,t){if(t===null)return this.isReference&&h("null is not a valid "+this.name),0;t.$$||h('Cannot pass "'+ne(t)+'" as a '+this.name),t.$$.ptr||h("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&h("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass,n=xe(t.$$.ptr,r,this.registeredClass);return n}function Te(e){return this.fromWireType(y[e>>2])}function Sr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Fr(e){this.rawDestructor&&this.rawDestructor(e)}function Ar(e){e!==null&&e.delete()}function kr(){H.prototype.getPointee=Sr,H.prototype.destructor=Fr,H.prototype.argPackAdvance=8,H.prototype.readValueFromPointer=Te,H.prototype.deleteObject=Ar,H.prototype.fromWireType=ht}function H(e,t,r,n,a,s,u,o,l,f,_){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=s,this.sharingPolicy=u,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=_,!a&&t.baseClass===void 0?n?(this.toWireType=Cr,this.destructorFunction=null):(this.toWireType=Pr,this.destructorFunction=null):this.toWireType=Er}function Ir(e,t,r){i.hasOwnProperty(e)||ye("Replacing nonexistant public symbol"),i[e].overloadTable!==void 0&&r!==void 0||(i[e]=t,i[e].argCount=r)}function Or(e,t,r){d("dynCall_"+e in i,"bad function pointer type - no table for sig '"+e+"'"),r&&r.length?d(r.length===e.substring(1).replace(/j/g,"--").length):d(e.length==1);var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)}var we=[];function je(e){var t=we[e];return t||(e>=we.length&&(we.length=e+1),we[e]=t=he.get(e)),d(he.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function Rr(e,t,r){if(e.includes("j"))return Or(e,t,r);d(je(t),"missing table entry in dynCall: "+t);var n=je(t).apply(null,r);return n}function Dr(e,t){d(e.includes("j")||e.includes("p"),"getDynCaller should only be called with i64 sigs");var r=[];return function(){return r.length=0,Object.assign(r,arguments),Rr(e,t,r)}}function re(e,t){e=M(e);function r(){return e.includes("j")?Dr(e,t):je(t)}var n=r();return typeof n!="function"&&h("unknown function pointer with signature "+e+": "+t),n}var yt=void 0;function Mr(e){var t=Sn(e),r=M(t);return V(t),r}function He(e,t){var r=[],n={};function a(s){if(!n[s]&&!ee[s]){if(ve[s]){ve[s].forEach(a);return}r.push(s),n[s]=!0}}throw t.forEach(a),new yt(e+": "+r.map(Mr).join([", "]))}function Lr(e,t,r,n,a,s,u,o,l,f,_,m,g){_=M(_),s=re(a,s),o&&(o=re(u,o)),f&&(f=re(l,f)),g=re(m,g);var b=Me(_);Tr(b,function(){He("Cannot construct "+_+" due to unbound types",[n])}),le([e,t,r],n?[n]:[],function(w){w=w[0];var E,R;n?(E=w.registeredClass,R=E.instancePrototype):R=B.prototype;var N=Le(b,function(){if(Object.getPrototypeOf(this)!==c)throw new te("Use 'new' to construct "+_);if(p.constructor_body===void 0)throw new te(_+" has no accessible constructor");var Pe=p.constructor_body[arguments.length];if(Pe===void 0)throw new te("Tried to invoke ctor of "+_+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(p.constructor_body).toString()+") parameters instead!");return Pe.apply(this,arguments)}),c=Object.create(R,{constructor:{value:N}});N.prototype=c;var p=new wr(_,N,c,g,E,s,o,f),A=new H(_,p,!0,!1,!1),C=new H(_+"*",p,!1,!1,!1),K=new H(_+" const*",p,!1,!0,!1);return _t[e]={pointerType:C,constPointerType:K},Ir(b,N),[A,C,K]})}function bt(e,t){for(var r=[],n=0;n<e;n++)r.push(v[t+n*4>>2]);return r}function Ur(e){for(;e.length;){var t=e.pop(),r=e.pop();r(t)}}function $r(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Le(e.name||"unknownFunctionName",function(){});r.prototype=e.prototype;var n=new r,a=e.apply(n,t);return a instanceof Object?a:n}function Tt(e,t,r,n,a){var s=t.length;s<2&&h("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=t[1]!==null&&r!==null,o=!1,l=1;l<t.length;++l)if(t[l]!==null&&t[l].destructorFunction===void 0){o=!0;break}for(var f=t[0].name!=="void",_="",m="",l=0;l<s-2;++l)_+=(l!==0?", ":"")+"arg"+l,m+=(l!==0?", ":"")+"arg"+l+"Wired";var g="return function "+Me(e)+"("+_+`) {
|
|
9
|
+
if (arguments.length !== `+(s-2)+`) {
|
|
10
|
+
throwBindingError('function `+e+" called with ' + arguments.length + ' arguments, expected "+(s-2)+` args!');
|
|
11
|
+
}
|
|
12
|
+
`;o&&(g+=`var destructors = [];
|
|
13
|
+
`);var b=o?"destructors":"null",w=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],E=[h,n,a,Ur,t[0],t[1]];u&&(g+="var thisWired = classParam.toWireType("+b+`, this);
|
|
14
|
+
`);for(var l=0;l<s-2;++l)g+="var arg"+l+"Wired = argType"+l+".toWireType("+b+", arg"+l+"); // "+t[l+2].name+`
|
|
15
|
+
`,w.push("argType"+l),E.push(t[l+2]);if(u&&(m="thisWired"+(m.length>0?", ":"")+m),g+=(f?"var rv = ":"")+"invoker(fn"+(m.length>0?", ":"")+m+`);
|
|
16
|
+
`,o)g+=`runDestructors(destructors);
|
|
17
|
+
`;else for(var l=u?1:2;l<t.length;++l){var R=l===1?"thisWired":"arg"+(l-2)+"Wired";t[l].destructorFunction!==null&&(g+=R+"_dtor("+R+"); // "+t[l].name+`
|
|
18
|
+
`,w.push(R+"_dtor"),E.push(t[l].destructorFunction))}f&&(g+=`var ret = retType.fromWireType(rv);
|
|
19
|
+
return ret;
|
|
20
|
+
`),g+=`}
|
|
21
|
+
`,w.push(g);var N=$r(Function,w).apply(null,E);return N}function Wr(e,t,r,n,a,s){d(t>0);var u=bt(t,r);a=re(n,a),le([],[e],function(o){o=o[0];var l="constructor "+o.name;if(o.registeredClass.constructor_body===void 0&&(o.registeredClass.constructor_body=[]),o.registeredClass.constructor_body[t-1]!==void 0)throw new te("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+o.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return o.registeredClass.constructor_body[t-1]=()=>{He("Cannot construct "+o.name+" due to unbound types",u)},le([],u,function(f){return f.splice(1,0,null),o.registeredClass.constructor_body[t-1]=Tt(l,f,null,a,s),[]}),[]})}function Nr(e,t,r,n,a,s,u,o){var l=bt(r,n);t=M(t),s=re(a,s),le([],[e],function(f){f=f[0];var _=f.name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&f.registeredClass.pureVirtualFunctions.push(t);function m(){He("Cannot call "+_+" due to unbound types",l)}var g=f.registeredClass.instancePrototype,b=g[t];return b===void 0||b.overloadTable===void 0&&b.className!==f.name&&b.argCount===r-2?(m.argCount=r-2,m.className=f.name,g[t]=m):(vt(g,t,_),g[t].overloadTable[r-2]=m),le([],l,function(w){var E=Tt(_,w,f,s,u);return g[t].overloadTable===void 0?(E.argCount=r-2,g[t]=E):g[t].overloadTable[r-2]=E,[]}),[]})}var Ye=[],W=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function xr(e){e>4&&--W[e].refcount===0&&(W[e]=void 0,Ye.push(e))}function jr(){for(var e=0,t=5;t<W.length;++t)W[t]!==void 0&&++e;return e}function Hr(){for(var e=5;e<W.length;++e)if(W[e]!==void 0)return W[e];return null}function Yr(){i.count_emval_handles=jr,i.get_first_emval=Hr}var Ge={toValue:e=>(e||h("Cannot use deleted val. handle = "+e),W[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:{var t=Ye.length?Ye.pop():W.length;return W[t]={refcount:1,value:e},t}}}};function Gr(e,t){t=M(t),j(e,{name:t,fromWireType:function(r){var n=Ge.toValue(r);return xr(r),n},toWireType:function(r,n){return Ge.toHandle(n)},argPackAdvance:8,readValueFromPointer:Te,destructorFunction:null})}function ne(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function Br(e,t){switch(t){case 2:return function(r){return this.fromWireType(nt[r>>2])};case 3:return function(r){return this.fromWireType(it[r>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Vr(e,t,r){var n=De(r);t=M(t),j(e,{name:t,fromWireType:function(a){return a},toWireType:function(a,s){if(typeof s!="number"&&typeof s!="boolean")throw new TypeError('Cannot convert "'+ne(s)+'" to '+this.name);return s},argPackAdvance:8,readValueFromPointer:Br(t,n),destructorFunction:null})}function zr(e,t,r){switch(t){case 0:return r?function(a){return $[a]}:function(a){return S[a]};case 1:return r?function(a){return Q[a>>1]}:function(a){return _e[a>>1]};case 2:return r?function(a){return y[a>>2]}:function(a){return v[a>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Jr(e,t,r,n,a){t=M(t),a===-1&&(a=4294967295);var s=De(r),u=m=>m;if(n===0){var o=32-8*r;u=m=>m<<o>>>o}var l=t.includes("unsigned"),f=(m,g)=>{if(typeof m!="number"&&typeof m!="boolean")throw new TypeError('Cannot convert "'+ne(m)+'" to '+g);if(m<n||m>a)throw new TypeError('Passing a number "'+ne(m)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+a+"]!")},_;l?_=function(m,g){return f(g,this.name),g>>>0}:_=function(m,g){return f(g,this.name),g},j(e,{name:t,fromWireType:u,toWireType:_,argPackAdvance:8,readValueFromPointer:zr(t,s,n!==0),destructorFunction:null})}function qr(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[t];function s(u){u=u>>2;var o=v,l=o[u],f=o[u+1];return new a(me,f,l)}r=M(r),j(e,{name:r,fromWireType:s,argPackAdvance:8,readValueFromPointer:s},{ignoreDuplicateRegistrations:!0})}function Kr(e,t){t=M(t);var r=t==="std::string";j(e,{name:t,fromWireType:function(n){var a=v[n>>2],s=n+4,u;if(r)for(var o=s,l=0;l<=a;++l){var f=s+l;if(l==a||S[f]==0){var _=f-o,m=Fe(o,_);u===void 0?u=m:(u+="\0",u+=m),o=f+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(S[s+l]);u=g.join("")}return V(n),u},toWireType:function(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var s,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||h("Cannot pass non-string to std::string"),r&&u?s=rt(a):s=a.length;var o=Ve(4+s+1),l=o+4;if(v[o>>2]=s,r&&u)Wt(a,l,s+1);else if(u)for(var f=0;f<s;++f){var _=a.charCodeAt(f);_>255&&(V(l),h("String has UTF-16 code units that do not fit in 8 bits")),S[l+f]=_}else for(var f=0;f<s;++f)S[l+f]=a[f];return n!==null&&n.push(V,o),o},argPackAdvance:8,readValueFromPointer:Te,destructorFunction:function(n){V(n)}})}var wt=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function Xr(e,t){d(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,a=n+t/2;!(n>=a)&&_e[n];)++n;if(r=n<<1,r-e>32&&wt)return wt.decode(S.subarray(e,r));for(var s="",u=0;!(u>=t/2);++u){var o=Q[e+u*2>>1];if(o==0)break;s+=String.fromCharCode(o)}return s}function Qr(e,t,r){if(d(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),d(typeof r=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=t,a=r<e.length*2?r/2:e.length,s=0;s<a;++s){var u=e.charCodeAt(s);Q[t>>1]=u,t+=2}return Q[t>>1]=0,t-n}function Zr(e){return e.length*2}function en(e,t){d(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var a=y[e+r*4>>2];if(a==0)break;if(++r,a>=65536){var s=a-65536;n+=String.fromCharCode(55296|s>>10,56320|s&1023)}else n+=String.fromCharCode(a)}return n}function tn(e,t,r){if(d(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),d(typeof r=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<4)return 0;for(var n=t,a=n+r-4,s=0;s<e.length;++s){var u=e.charCodeAt(s);if(u>=55296&&u<=57343){var o=e.charCodeAt(++s);u=65536+((u&1023)<<10)|o&1023}if(y[t>>2]=u,t+=4,t+4>a)break}return y[t>>2]=0,t-n}function rn(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function nn(e,t,r){r=M(r);var n,a,s,u,o;t===2?(n=Xr,a=Qr,u=Zr,s=()=>_e,o=1):t===4&&(n=en,a=tn,u=rn,s=()=>v,o=2),j(e,{name:r,fromWireType:function(l){for(var f=v[l>>2],_=s(),m,g=l+4,b=0;b<=f;++b){var w=l+4+b*t;if(b==f||_[w>>o]==0){var E=w-g,R=n(g,E);m===void 0?m=R:(m+="\0",m+=R),g=w+t}}return V(l),m},toWireType:function(l,f){typeof f!="string"&&h("Cannot pass non-string to C++ string type "+r);var _=u(f),m=Ve(4+_+t);return v[m>>2]=_>>o,a(f,m+4,_+t),l!==null&&l.push(V,m),m},argPackAdvance:8,readValueFromPointer:Te,destructorFunction:function(l){V(l)}})}function an(e,t){t=M(t),j(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(r,n){}})}function on(){F("native code called abort()")}function sn(e,t,r){S.copyWithin(e,t,t+r)}function ln(){return 2147483648}function un(e){try{return ae.grow(e-me.byteLength+65535>>>16),at(ae.buffer),1}catch(t){P("emscripten_realloc_buffer: Attempted to grow heap from "+me.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function cn(e){var t=S.length;e=e>>>0,d(e>t);var r=ln();if(e>r)return P("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+r+" bytes!"),!1;let n=(l,f)=>l+(f-l%f)%f;for(var a=1;a<=4;a*=2){var s=t*(1+.2/a);s=Math.min(s,e+100663296);var u=Math.min(r,n(Math.max(e,s),65536)),o=un(u);if(o)return!0}return P("Failed to grow the heap from "+t+" bytes to "+u+" bytes, not enough memory!"),!1}var Be={};function fn(){return Xe||"./this.program"}function pe(){if(!pe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:fn()};for(var r in Be)Be[r]===void 0?delete t[r]:t[r]=Be[r];var n=[];for(var r in t)n.push(r+"="+t[r]);pe.strings=n}return pe.strings}function dn(e,t,r){for(var n=0;n<e.length;++n)d(e.charCodeAt(n)===(e.charCodeAt(n)&255)),$[t++>>0]=e.charCodeAt(n);$[t>>0]=0}function pn(e,t){var r=0;return pe().forEach(function(n,a){var s=t+r;v[e+a*4>>2]=s,dn(n,s),r+=n.length+1}),0}function gn(e,t){var r=pe();v[e>>2]=r.length;var n=0;return r.forEach(function(a){n+=a.length+1}),v[t>>2]=n,0}function mn(e){F("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM")}function _n(e,t,r,n,a){return 70}var hn=[null,[],[]];function vn(e,t){var r=hn[e];d(r),t===0||t===10?((e===1?Mt:P)(et(r,0)),r.length=0):r.push(t)}function yn(e,t,r,n){for(var a=0,s=0;s<r;s++){var u=v[t>>2],o=v[t+4>>2];t+=8;for(var l=0;l<o;l++)vn(e,S[u+l]);a+=o}return v[n>>2]=a,0}function Ce(e){return e%4===0&&(e%100!==0||e%400===0)}function bn(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var Ct=[31,29,31,30,31,30,31,31,30,31,30,31],Et=[31,28,31,30,31,30,31,31,30,31,30,31];function Tn(e,t){for(var r=new Date(e.getTime());t>0;){var n=Ce(r.getFullYear()),a=r.getMonth(),s=(n?Ct:Et)[a];if(t>s-r.getDate())t-=s-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+t),r}return r}function wn(e,t,r){var n=rt(e)+1,a=new Array(n);return tt(e,a,0,a.length),a}function Cn(e,t,r,n){var a=y[n+40>>2],s={tm_sec:y[n>>2],tm_min:y[n+4>>2],tm_hour:y[n+8>>2],tm_mday:y[n+12>>2],tm_mon:y[n+16>>2],tm_year:y[n+20>>2],tm_wday:y[n+24>>2],tm_yday:y[n+28>>2],tm_isdst:y[n+32>>2],tm_gmtoff:y[n+36>>2],tm_zone:a?Fe(a):""},u=Fe(r),o={"%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 l in o)u=u.replace(new RegExp(l,"g"),o[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(c,p,A){for(var C=typeof c=="number"?c.toString():c||"";C.length<p;)C=A[0]+C;return C}function g(c,p){return m(c,p,"0")}function b(c,p){function A(K){return K<0?-1:K>0?1:0}var C;return(C=A(c.getFullYear()-p.getFullYear()))===0&&(C=A(c.getMonth()-p.getMonth()))===0&&(C=A(c.getDate()-p.getDate())),C}function w(c){switch(c.getDay()){case 0:return new Date(c.getFullYear()-1,11,29);case 1:return c;case 2:return new Date(c.getFullYear(),0,3);case 3:return new Date(c.getFullYear(),0,2);case 4:return new Date(c.getFullYear(),0,1);case 5:return new Date(c.getFullYear()-1,11,31);case 6:return new Date(c.getFullYear()-1,11,30)}}function E(c){var p=Tn(new Date(c.tm_year+1900,0,1),c.tm_yday),A=new Date(p.getFullYear(),0,4),C=new Date(p.getFullYear()+1,0,4),K=w(A),Pe=w(C);return b(K,p)<=0?b(Pe,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var R={"%a":function(c){return f[c.tm_wday].substring(0,3)},"%A":function(c){return f[c.tm_wday]},"%b":function(c){return _[c.tm_mon].substring(0,3)},"%B":function(c){return _[c.tm_mon]},"%C":function(c){var p=c.tm_year+1900;return g(p/100|0,2)},"%d":function(c){return g(c.tm_mday,2)},"%e":function(c){return m(c.tm_mday,2," ")},"%g":function(c){return E(c).toString().substring(2)},"%G":function(c){return E(c)},"%H":function(c){return g(c.tm_hour,2)},"%I":function(c){var p=c.tm_hour;return p==0?p=12:p>12&&(p-=12),g(p,2)},"%j":function(c){return g(c.tm_mday+bn(Ce(c.tm_year+1900)?Ct:Et,c.tm_mon-1),3)},"%m":function(c){return g(c.tm_mon+1,2)},"%M":function(c){return g(c.tm_min,2)},"%n":function(){return`
|
|
22
|
+
`},"%p":function(c){return c.tm_hour>=0&&c.tm_hour<12?"AM":"PM"},"%S":function(c){return g(c.tm_sec,2)},"%t":function(){return" "},"%u":function(c){return c.tm_wday||7},"%U":function(c){var p=c.tm_yday+7-c.tm_wday;return g(Math.floor(p/7),2)},"%V":function(c){var p=Math.floor((c.tm_yday+7-(c.tm_wday+6)%7)/7);if((c.tm_wday+371-c.tm_yday-2)%7<=2&&p++,p){if(p==53){var C=(c.tm_wday+371-c.tm_yday)%7;C!=4&&(C!=3||!Ce(c.tm_year))&&(p=1)}}else{p=52;var A=(c.tm_wday+7-c.tm_yday-1)%7;(A==4||A==5&&Ce(c.tm_year%400-1))&&p++}return g(p,2)},"%w":function(c){return c.tm_wday},"%W":function(c){var p=c.tm_yday+7-(c.tm_wday+6)%7;return g(Math.floor(p/7),2)},"%y":function(c){return(c.tm_year+1900).toString().substring(2)},"%Y":function(c){return c.tm_year+1900},"%z":function(c){var p=c.tm_gmtoff,A=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(A?"+":"-")+("0000"+p).slice(-4)},"%Z":function(c){return c.tm_zone},"%%":function(){return"%"}};u=u.replace(/%%/g,"\0\0");for(var l in R)u.includes(l)&&(u=u.replace(new RegExp(l,"g"),R[l](s)));u=u.replace(/\0\0/g,"%");var N=wn(u);return N.length>t?0:(Qt(N,e),N.length-1)}function En(e,t,r,n){return Cn(e,t,r,n)}nr(),te=i.BindingError=Ue(Error,"BindingError"),dt=i.InternalError=Ue(Error,"InternalError"),br(),pr(),kr(),yt=i.UnboundTypeError=Ue(Error,"UnboundTypeError"),Yr();function Pn(){Lt("fetchSettings")}var Pt={__cxa_allocate_exception:Zt,__cxa_throw:tr,_embind_register_bigint:rr,_embind_register_bool:or,_embind_register_class:Lr,_embind_register_class_constructor:Wr,_embind_register_class_function:Nr,_embind_register_emval:Gr,_embind_register_float:Vr,_embind_register_integer:Jr,_embind_register_memory_view:qr,_embind_register_std_string:Kr,_embind_register_std_wstring:nn,_embind_register_void:an,abort:on,emscripten_memcpy_big:sn,emscripten_resize_heap:cn,environ_get:pn,environ_sizes_get:gn,fd_close:mn,fd_seek:_n,fd_write:yn,strftime_l:En};Xt(),i.___wasm_call_ctors=T("__wasm_call_ctors");var Ve=i._malloc=T("malloc"),V=i._free=T("free"),Sn=i.___getTypeName=T("__getTypeName");i.__embind_initialize_bindings=T("_embind_initialize_bindings"),i.___errno_location=T("__errno_location"),i._fflush=T("fflush");var St=i._emscripten_stack_init=function(){return(St=i._emscripten_stack_init=i.asm.emscripten_stack_init).apply(null,arguments)};i._emscripten_stack_get_free=function(){return(i._emscripten_stack_get_free=i.asm.emscripten_stack_get_free).apply(null,arguments)},i._emscripten_stack_get_base=function(){return(i._emscripten_stack_get_base=i.asm.emscripten_stack_get_base).apply(null,arguments)};var ze=i._emscripten_stack_get_end=function(){return(ze=i._emscripten_stack_get_end=i.asm.emscripten_stack_get_end).apply(null,arguments)};i.stackSave=T("stackSave"),i.stackRestore=T("stackRestore"),i.stackAlloc=T("stackAlloc");var Fn=i.___cxa_is_pointer_type=T("__cxa_is_pointer_type");i.dynCall_viijii=T("dynCall_viijii"),i.dynCall_ji=T("dynCall_ji"),i.dynCall_jiji=T("dynCall_jiji"),i.dynCall_iiiiij=T("dynCall_iiiiij"),i.dynCall_iiiiijj=T("dynCall_iiiiijj"),i.dynCall_iiiiiijj=T("dynCall_iiiiiijj");var An=["run","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createPreloadedFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","getLEB","getFunctionTables","alignFunctionTables","registerFunctions","prettyPrint","getCompilerSetting","print","printErr","callMain","abort","keepRuntimeAlive","wasmMemory","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","writeStackCookie","checkStackCookie","ptrToString","zeroMemory","stringToNewUTF8","exitJS","getHeapMax","emscripten_realloc_buffer","ENV","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","DNS","getHostByName","Protocols","Sockets","getRandomDevice","warnOnce","traverseStack","UNWIND_CACHE","convertPCtoSourceLocation","readAsmConstArgsArray","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","getExecutableName","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","setValue","getValue","PATH","PATH_FS","intArrayFromString","intArrayToString","AsciiToString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","allocateUTF8","allocateUTF8OnStack","writeStringToMemory","writeArrayToMemory","writeAsciiToMemory","SYSCALLS","getSocketFromFD","getSocketAddress","JSEvents","registerKeyEventCallback","specialHTMLTargets","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","currentFullscreenStrategy","restoreOldWindowedStyle","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","demangle","demangleAll","jsStackTrace","stackTrace","ExitStatus","getEnvStrings","checkWasiClock","flush_NO_FILESYSTEM","dlopenMissingError","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","exception_addRef","exception_decRef","Browser","setMainLoop","wget","FS","MEMFS","TTY","PIPEFS","SOCKFS","_setNetworkCallback","tempFixedLengthArray","miniTempWebGLFloatBuffers","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","GL","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","AL","SDL_unicode","SDL_ttfContext","SDL_audio","SDL","SDL_gfx","GLUT","EGL","GLFW_Window","GLFW","GLEW","IDBStore","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","InternalError","BindingError","UnboundTypeError","PureVirtualError","init_embind","throwInternalError","throwBindingError","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","registerInheritedInstance","unregisterInheritedInstance","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredTypes","awaitingDependencies","typeDependencies","registeredPointers","registerType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","heap32VectorToArray","requireRegisteredType","getShiftFromSize","integerReadValueFromPointer","enumReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","runDestructors","new_","craftInvokerFunction","embind__requireFunction","tupleRegistrations","structRegistrations","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_getPointee","RegisteredPointer_destructor","RegisteredPointer_deleteObject","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","ClassHandle_isAliasOf","throwInstanceAlreadyDeleted","ClassHandle_clone","ClassHandle_delete","deletionQueue","ClassHandle_isDeleted","ClassHandle_deleteLater","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_handle_array","emval_free_list","emval_symbols","init_emval","count_emval_handles","get_first_emval","getStringOrSymbol","Emval","emval_newers","craftEmvalAllocator","emval_get_global","emval_lookupTypes","emval_allocateDestructors","emval_methodCallers","emval_addMethodCaller","emval_registeredMethods"];An.forEach($t);var kn=["ptrToString","zeroMemory","stringToNewUTF8","exitJS","setErrNo","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getHostByName","getRandomDevice","traverseStack","convertPCtoSourceLocation","readAsmConstArgs","mainThreadEM_ASM","jstoi_q","jstoi_s","listenOnce","autoResumeAudioContext","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asmjsMangle","asyncLoad","alignMemory","mmapAlloc","writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","reallyNegative","unSign","strLen","reSign","formatString","getSocketFromFD","getSocketAddress","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","checkWasiClock","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","exception_addRef","exception_decRef","setMainLoop","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","emscriptenWebGLGet","computeUnpackAlignedImageSize","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","writeGLArray","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","runAndAbortIfError","registerInheritedInstance","unregisterInheritedInstance","requireRegisteredType","enumReadValueFromPointer","validateThis","getStringOrSymbol","craftEmvalAllocator","emval_get_global","emval_lookupTypes","emval_allocateDestructors","emval_addMethodCaller"];kn.forEach(Ut);var Ee;oe=function e(){Ee||Ft(),Ee||(oe=e)};function In(){St(),Nt()}function Ft(e){if(z>0||(In(),xt(),z>0))return;function t(){Ee||(Ee=!0,i.calledRun=!0,!ge&&(jt(),qe(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),d(!i._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),Ht()))}i.setStatus?(i.setStatus("Running..."),setTimeout(function(){setTimeout(function(){i.setStatus("")},1),t()},1)):t(),Ie()}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Ft(),G.ready})})();k.exports=I})(Je)),Je.exports}var kt;function Mn(){if(kt)return L;kt=1;var k=L&&L.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(L,"__esModule",{value:!0}),L.LazPerf=L.create=L.createLazPerf=void 0;const X=k(Dn());return L.createLazPerf=X.default,L.create=X.default,L.LazPerf={create:X.default},L}var It=Mn(),Ln=Rn(It),Un=On({__proto__:null,default:Ln},[It]);export{Un as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const E=null;export{E as INLINE_WORKER_CODE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const y={0:20,1:28,2:26,3:34,4:57,5:63,6:30,7:36,8:38,9:59,10:67},D=new Set([1,3,4,5,6,7,8,9,10]),E=new Set([2,3,5,7,8,10]);function O(e){const n=e instanceof Uint8Array?e:new Uint8Array(e);if(n.length<227)throw new Error("LAS: header truncated");const t=new DataView(n.buffer,n.byteOffset,n.byteLength);if(t.getUint32(0,!0)!==1179861324)throw new Error('LAS: bad magic — expected "LASF"');const g=t.getUint8(24),a=t.getUint8(25),i=t.getUint16(94,!0),c=t.getUint32(96,!0),F=t.getUint32(100,!0),o=t.getUint8(104)&63,r=t.getUint16(105,!0);let u=t.getUint32(107,!0);if(g>=1&&a>=4&&n.length>=255){const U=M(t,247);U>0&&(u=U)}if(!Number.isFinite(u)||u<0)throw new Error("LAS: invalid point count");const m=[t.getFloat64(131,!0),t.getFloat64(139,!0),t.getFloat64(147,!0)],w=[t.getFloat64(155,!0),t.getFloat64(163,!0),t.getFloat64(171,!0)],b=t.getFloat64(179,!0),A=t.getFloat64(187,!0),x=t.getFloat64(195,!0),I=t.getFloat64(203,!0),s=t.getFloat64(211,!0),f=t.getFloat64(219,!0),h={min:[A,I,f],max:[b,x,s]};if(y[o]===void 0)throw new Error(`LAS: unsupported point data format ${o}`);const p=y[o];if(r<p)throw new Error(`LAS: header point-record length (${r}) smaller than format ${o} baseline (${p})`);return{versionMajor:g,versionMinor:a,headerSize:i,pointDataOffset:c,numberOfVlrs:F,pointDataFormatId:o,pointRecordLength:r,pointCount:u,scale:m,offset:w,bbox:h,hasGpsTime:D.has(o),hasRgb:E.has(o)}}function R(e,n,t,g=n.pointRecordLength,a=1){if(e.length<t*g)throw new Error(`LAS: decode expects ${t*g} bytes, got ${e.length}`);const i=new DataView(e.buffer,e.byteOffset,e.byteLength),c=new Float32Array(t*3),F=new Uint16Array(t),o=new Uint8Array(t),r=n.hasRgb?new Float32Array(t*3):void 0,l=L(n.pointDataFormatId),u=n.pointDataFormatId>=6?16:15;let m=1/0,w=1/0,b=1/0,A=-1/0,x=-1/0,I=-1/0;for(let s=0;s<t;s++){const f=s*g,h=i.getInt32(f,!0)*n.scale[0]+n.offset[0],p=i.getInt32(f+4,!0)*n.scale[1]+n.offset[1],U=i.getInt32(f+8,!0)*n.scale[2]+n.offset[2];if(c[s*3]=h,c[s*3+1]=p,c[s*3+2]=U,h<m&&(m=h),h>A&&(A=h),p<w&&(w=p),p>x&&(x=p),U<b&&(b=U),U>I&&(I=U),F[s]=i.getUint16(f+12,!0),o[s]=n.pointDataFormatId>=6?i.getUint8(f+u):i.getUint8(f+u)&31,r&&l>=0){const d=i.getUint16(f+l,!0),S=i.getUint16(f+l+2,!0),C=i.getUint16(f+l+4,!0);r[s*3]=d*a/65535,r[s*3+1]=S*a/65535,r[s*3+2]=C*a/65535}}return{positions:c,colors:r,classifications:o,intensities:F,pointCount:t,bbox:{min:[m,w,b],max:[A,x,I]}}}function v(e,n,t=1024){if(!n.hasRgb)return 0;const g=n.pointRecordLength,a=Math.min(n.pointCount,Math.floor(e.length/g));if(a===0)return 0;const i=new DataView(e.buffer,e.byteOffset,e.byteLength),c=L(n.pointDataFormatId);if(c<0)return 0;const F=Math.max(1,Math.floor(a/Math.min(t,a)));let o=0;for(let r=0;r<a;r+=F){const l=r*g,u=i.getUint16(l+c,!0),m=i.getUint16(l+c+2,!0),w=i.getUint16(l+c+4,!0);u>o&&(o=u),m>o&&(o=m),w>o&&(o=w)}return o}function L(e){switch(e){case 2:return 20;case 3:return 28;case 5:return 28;case 7:return 30;case 8:return 30;case 10:return 30;default:return-1}}function M(e,n){const t=e.getUint32(n,!0);return e.getUint32(n+4,!0)*4294967296+t}export{R as d,O as p,v as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as S,s as L,d as f}from"./las-BW6LIc_j.js";class B{constructor(t){this.blob=t}get size(){return this.blob.size}async read(t,s){const e=Math.max(0,t),r=Math.min(s,this.blob.size);if(r<=e)return new Uint8Array(0);const n=await this.blob.slice(e,r).arrayBuffer();return new Uint8Array(n)}}const M=1024,C=4096;class O{bytes;header=null;cursor=0;rgbScale=1;downsample;label;constructor(t,s={}){this.bytes=new B(t),this.downsample=s.downsample??{stride:1},this.label=s.label}async open(t){if(this.header)return this.toInfo(this.header);i(t);const s=await this.bytes.read(0,M);i(t);const e=S(s);let r=1;if(e.hasRgb){const o=Math.min(C*e.pointRecordLength,Math.max(0,this.bytes.size-e.pointDataOffset));if(o>0){const n=await this.bytes.read(e.pointDataOffset,e.pointDataOffset+o);i(t);const h=L(n,e);r=h>0&&h<=255?65535/255:1}}return this.header=e,this.rgbScale=r,this.cursor=0,this.toInfo(e)}async next(t,s){if(i(s),!Number.isFinite(t)||t<=0)throw new Error(`LasStreamingSource: maxPoints must be > 0 (got ${t})`);if(!this.header)throw new Error("LasStreamingSource: open() must be awaited before next()");const e=Math.max(1,this.downsample.stride|0);if(this.cursor>=this.header.pointCount)return null;if(e===1){const c=this.header.pointCount-this.cursor,a=Math.min(t,c),l=this.header.pointDataOffset+this.cursor*this.header.pointRecordLength,w=l+a*this.header.pointRecordLength,y=await this.bytes.read(l,w);i(s);const R=f(y,this.header,a,this.header.pointRecordLength,this.rgbScale);return this.cursor+=a,R}const r=this.header.pointCount-this.cursor,o=Math.min(t*e,r),n=Math.ceil(o/e),h=this.header.pointDataOffset+this.cursor*this.header.pointRecordLength,p=h+o*this.header.pointRecordLength,m=await this.bytes.read(h,p);i(s);const b=new Uint8Array(n*this.header.pointRecordLength);let u=0;for(let c=0;c<n;c++){const a=c*e*this.header.pointRecordLength;b.set(m.subarray(a,a+this.header.pointRecordLength),u),u+=this.header.pointRecordLength}const g=f(b,this.header,n,this.header.pointRecordLength,this.rgbScale);return this.cursor+=o,g}close(){this.header=null,this.cursor=0}toInfo(t){const s=Math.max(1,this.downsample.stride|0);return{totalPointCount:s===1?t.pointCount:Math.ceil(t.pointCount/s),bbox:t.bbox,hasColor:t.hasRgb,hasClassification:!0,hasIntensity:!0,label:this.label}}}function i(d){if(d?.aborted)throw new DOMException("Aborted","AbortError")}export{O as LasStreamingSource};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { p as y, s as P, d as z } from "./las-BW6LIc_j.js";
|
|
2
|
+
let A;
|
|
3
|
+
let __tla = (async ()=>{
|
|
4
|
+
let d = null;
|
|
5
|
+
async function g() {
|
|
6
|
+
return d || (d = (async ()=>{
|
|
7
|
+
const n = await L(), e = await import("./index-HqAIQkr6.js").then(function(i) {
|
|
8
|
+
return i.i;
|
|
9
|
+
}), t = e.default, s = [
|
|
10
|
+
e.createLazPerf,
|
|
11
|
+
typeof t == "object" && t !== null ? t.createLazPerf : void 0,
|
|
12
|
+
t,
|
|
13
|
+
e
|
|
14
|
+
].find((i)=>typeof i == "function");
|
|
15
|
+
if (!s) {
|
|
16
|
+
const i = Object.keys(e).join(", ");
|
|
17
|
+
throw new Error(`laz-perf: could not find createLazPerf factory (saw keys: ${i || "<empty>"})`);
|
|
18
|
+
}
|
|
19
|
+
return s({
|
|
20
|
+
wasmBinary: n
|
|
21
|
+
});
|
|
22
|
+
})()), d;
|
|
23
|
+
}
|
|
24
|
+
async function L() {
|
|
25
|
+
let n;
|
|
26
|
+
try {
|
|
27
|
+
n = (await import("./laz-perf-Cvr_Lepg.js")).default;
|
|
28
|
+
} catch (r) {
|
|
29
|
+
throw new Error(`laz-perf: could not resolve wasm asset URL (${r instanceof Error ? r.message : String(r)}). Ensure the bundler treats \`laz-perf/lib/web/laz-perf.wasm?url\` as a static asset.`);
|
|
30
|
+
}
|
|
31
|
+
const e = await fetch(n);
|
|
32
|
+
if (!e.ok) throw new Error(`laz-perf: wasm fetch failed (${e.status} ${e.statusText}) for ${n}`);
|
|
33
|
+
const t = await e.arrayBuffer();
|
|
34
|
+
return new Uint8Array(t);
|
|
35
|
+
}
|
|
36
|
+
A = class {
|
|
37
|
+
blob;
|
|
38
|
+
downsample;
|
|
39
|
+
label;
|
|
40
|
+
mod = null;
|
|
41
|
+
laszip = null;
|
|
42
|
+
header = null;
|
|
43
|
+
fileBytes = null;
|
|
44
|
+
filePtr = 0;
|
|
45
|
+
pointPtr = 0;
|
|
46
|
+
pointBuffer = null;
|
|
47
|
+
cursor = 0;
|
|
48
|
+
rgbScale = 1;
|
|
49
|
+
constructor(e, t = {}){
|
|
50
|
+
this.blob = e, this.downsample = t.downsample ?? {
|
|
51
|
+
stride: 1
|
|
52
|
+
}, this.label = t.label;
|
|
53
|
+
}
|
|
54
|
+
async open(e) {
|
|
55
|
+
if (this.header) return this.toInfo(this.header);
|
|
56
|
+
f(e);
|
|
57
|
+
let t, r = 0, s = 0, i;
|
|
58
|
+
try {
|
|
59
|
+
const a = await this.blob.arrayBuffer();
|
|
60
|
+
f(e);
|
|
61
|
+
const o = new Uint8Array(a), l = y(o);
|
|
62
|
+
t = await g(), f(e), r = t._malloc(o.byteLength), t.HEAPU8.set(o, r), i = new t.LASZip, i.open(r, o.byteLength);
|
|
63
|
+
const h = i.getPointLength();
|
|
64
|
+
s = t._malloc(h);
|
|
65
|
+
const c = new Uint8Array(h);
|
|
66
|
+
let p = 1;
|
|
67
|
+
if (l.hasRgb) {
|
|
68
|
+
const b = Math.min(4096, l.pointCount), m = new Uint8Array(b * h);
|
|
69
|
+
for(let u = 0; u < b; u++)i.getPoint(s), m.set(t.HEAPU8.subarray(s, s + h), u * h);
|
|
70
|
+
const w = P(m, l);
|
|
71
|
+
p = w > 0 && w <= 255 ? 65535 / 255 : 1, i.delete(), i = new t.LASZip, i.open(r, o.byteLength);
|
|
72
|
+
}
|
|
73
|
+
return this.fileBytes = o, this.mod = t, this.filePtr = r, this.laszip = i, this.pointPtr = s, this.pointBuffer = c, this.rgbScale = p, this.header = l, this.cursor = 0, this.toInfo(l);
|
|
74
|
+
} catch (a) {
|
|
75
|
+
try {
|
|
76
|
+
i?.delete();
|
|
77
|
+
} catch {}
|
|
78
|
+
if (t && s) try {
|
|
79
|
+
t._free(s);
|
|
80
|
+
} catch {}
|
|
81
|
+
if (t && r) try {
|
|
82
|
+
t._free(r);
|
|
83
|
+
} catch {}
|
|
84
|
+
throw a;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async next(e, t) {
|
|
88
|
+
if (f(t), !Number.isFinite(e) || e <= 0) throw new Error(`LazStreamingSource: maxPoints must be > 0 (got ${e})`);
|
|
89
|
+
if (!this.header || !this.mod || !this.laszip || !this.pointBuffer) throw new Error("LazStreamingSource: open() must be awaited before next()");
|
|
90
|
+
const r = Math.max(1, this.downsample.stride | 0);
|
|
91
|
+
if (this.cursor >= this.header.pointCount) return null;
|
|
92
|
+
const s = this.pointBuffer.byteLength, i = this.header.pointCount - this.cursor, a = Math.min(r === 1 ? e : e * r, i), o = r === 1 ? a : Math.ceil(a / r), l = new Uint8Array(o * s);
|
|
93
|
+
let h = 0;
|
|
94
|
+
for(let c = 0; c < a; c++)this.laszip.getPoint(this.pointPtr), (r === 1 || c % r === 0) && (l.set(this.mod.HEAPU8.subarray(this.pointPtr, this.pointPtr + s), h * s), h++);
|
|
95
|
+
return this.cursor += a, z(l, this.header, o, s, this.rgbScale);
|
|
96
|
+
}
|
|
97
|
+
close() {
|
|
98
|
+
try {
|
|
99
|
+
this.laszip?.delete();
|
|
100
|
+
} catch {}
|
|
101
|
+
if (this.mod && this.pointPtr) try {
|
|
102
|
+
this.mod._free(this.pointPtr);
|
|
103
|
+
} catch {}
|
|
104
|
+
if (this.mod && this.filePtr) try {
|
|
105
|
+
this.mod._free(this.filePtr);
|
|
106
|
+
} catch {}
|
|
107
|
+
this.laszip = null, this.mod = null, this.header = null, this.fileBytes = null, this.pointBuffer = null, this.filePtr = 0, this.pointPtr = 0, this.cursor = 0;
|
|
108
|
+
}
|
|
109
|
+
toInfo(e) {
|
|
110
|
+
const t = Math.max(1, this.downsample.stride | 0);
|
|
111
|
+
return {
|
|
112
|
+
totalPointCount: t === 1 ? e.pointCount : Math.ceil(e.pointCount / t),
|
|
113
|
+
bbox: e.bbox,
|
|
114
|
+
hasColor: e.hasRgb,
|
|
115
|
+
hasClassification: !0,
|
|
116
|
+
hasIntensity: !0,
|
|
117
|
+
label: this.label
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
function f(n) {
|
|
122
|
+
if (n?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
123
|
+
}
|
|
124
|
+
})();
|
|
125
|
+
export { A as LazStreamingSource, __tla };
|