itowns
Version:
A JS/WebGL framework for 3D geospatial data visualization
1 lines • 96.5 kB
JavaScript
var e={876:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Step=t.Scale=t.Key=t.Getter=t.Dimension=t.Bounds=t.Binary=void 0,i(r(16882),t);var o=r(33359);Object.defineProperty(t,"Binary",{enumerable:!0,get:function(){return o.Binary}});var a=r(19459);Object.defineProperty(t,"Bounds",{enumerable:!0,get:function(){return a.Bounds}});var s=r(44324);Object.defineProperty(t,"Dimension",{enumerable:!0,get:function(){return s.Dimension}});var u=r(27201);Object.defineProperty(t,"Getter",{enumerable:!0,get:function(){return u.Getter}});var c=r(54623);Object.defineProperty(t,"Key",{enumerable:!0,get:function(){return c.Key}});var l=r(66838);Object.defineProperty(t,"Scale",{enumerable:!0,get:function(){return l.Scale}});var d=r(95192);Object.defineProperty(t,"Step",{enumerable:!0,get:function(){return d.Step}})},10539:()=>{},11677:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Extractor=void 0;const n=r(876);function i(e){const{scale:t,offset:r}=e,i=s(e);function o(e,t){return e.getUint8(i(t)+14)}function a(e,t){return e.getUint8(i(t)+15)}function u(e,t){return 31&a(e,t)}return{X:(e,o)=>n.Scale.unapply(e.getInt32(i(o),!0),t[0],r[0]),Y:(e,o)=>n.Scale.unapply(e.getInt32(i(o)+4,!0),t[1],r[1]),Z:(e,o)=>n.Scale.unapply(e.getInt32(i(o)+8,!0),t[2],r[2]),Intensity:(e,t)=>e.getUint16(i(t)+12,!0),ReturnNumber:(e,t)=>7&o(e,t),NumberOfReturns:(e,t)=>(56&o(e,t))>>3,ScanDirectionFlag:(e,t)=>(64&o(e,t))>>6,EdgeOfFlightLine:(e,t)=>(128&o(e,t))>>7,Classification:(e,t)=>{const r=u(e,t);return 12===r?0:r},Synthetic:(e,t)=>(32&a(e,t))>>5,KeyPoint:(e,t)=>(64&a(e,t))>>6,Withheld:(e,t)=>(128&a(e,t))>>7,Overlap:(e,t)=>12===u(e,t)?1:0,ScanAngle:(e,t)=>e.getInt8(i(t)+16),UserData:(e,t)=>e.getUint8(i(t)+17),PointSourceId:(e,t)=>e.getUint16(i(t)+18,!0)}}function o(e){const{scale:t,offset:r}=e,i=s(e);function o(e,t){return e.getUint8(i(t)+15)}return{X:(e,o)=>n.Scale.unapply(e.getInt32(i(o),!0),t[0],r[0]),Y:(e,o)=>n.Scale.unapply(e.getInt32(i(o)+4,!0),t[1],r[1]),Z:(e,o)=>n.Scale.unapply(e.getInt32(i(o)+8,!0),t[2],r[2]),Intensity:(e,t)=>e.getUint16(i(t)+12,!0),ReturnNumber:(e,t)=>15&e.getUint16(i(t)+14,!0),NumberOfReturns:(e,t)=>(240&e.getUint16(i(t)+14,!0))>>4,Synthetic:(e,t)=>1&o(e,t),KeyPoint:(e,t)=>(2&o(e,t))>>1,Withheld:(e,t)=>(4&o(e,t))>>2,Overlap:(e,t)=>(8&o(e,t))>>3,ScannerChannel:(e,t)=>(48&o(e,t))>>4,ScanDirectionFlag:(e,t)=>(64&o(e,t))>>6,EdgeOfFlightLine:(e,t)=>(128&o(e,t))>>7,Classification:(e,t)=>e.getUint8(i(t)+16),UserData:(e,t)=>e.getUint8(i(t)+17),ScanAngle:(e,t)=>.006*e.getInt16(i(t)+18,!0),PointSourceId:(e,t)=>e.getUint16(i(t)+20,!0),GpsTime:(e,t)=>e.getFloat64(i(t)+22,!0)}}function a(e){const t=s(e);return{...o(e),Red:(e,r)=>e.getUint16(t(r)+30,!0),Green:(e,r)=>e.getUint16(t(r)+32,!0),Blue:(e,r)=>e.getUint16(t(r)+34,!0)}}function s(e){const{pointDataRecordLength:t}=e;return function(e){return e*t}}t.Extractor={create:function(e,t=[]){const r=function(e,t){let r=function(e){switch(e){case 0:return 20;case 1:return 28;case 2:return 26;case 3:return 34;case 6:return 30;case 7:return 36;case 8:return 38;default:throw new Error(`Unsupported point data record format: ${e}`)}}(e.pointDataRecordFormat);return t.reduce(((t,i)=>{const o=r;r+=i.length;const a=function(e,t,{type:r,length:i}){const o=s(e);switch(r){case"signed":switch(i){case 1:return(e,r)=>e.getInt8(o(r)+t);case 2:return(e,r)=>e.getInt16(o(r)+t,!0);case 4:return(e,r)=>e.getInt32(o(r)+t,!0);case 8:return(e,r)=>(0,n.parseBigInt)(e.getBigInt64(o(r)+t,!0))}case"unsigned":switch(i){case 1:return(e,r)=>e.getUint8(o(r)+t);case 2:return(e,r)=>e.getUint16(o(r)+t,!0);case 4:return(e,r)=>e.getUint32(o(r)+t,!0);case 8:return(e,r)=>(0,n.parseBigInt)((0,n.getBigUint64)(e,o(r)+t,!0))}case"float":switch(i){case 4:return(e,r)=>e.getFloat32(o(r)+t,!0);case 8:return(e,r)=>e.getFloat64(o(r)+t,!0)}}}(e,o,i);if(!a)return t;return{...t,[i.name]:(e,t)=>n.Scale.unapply(a(e,t),i.scale,i.offset)}}),{})}(e,t);return{...(()=>{const{pointDataRecordFormat:t}=e;switch(t){case 0:return i(e);case 1:return function(e){const t=s(e);return{...i(e),GpsTime:(e,r)=>e.getFloat64(t(r)+20,!0)}}(e);case 2:return function(e){const t=s(e);return{...i(e),Red:(e,r)=>e.getUint16(t(r)+20,!0),Green:(e,r)=>e.getUint16(t(r)+22,!0),Blue:(e,r)=>e.getUint16(t(r)+24,!0)}}(e);case 3:return function(e){const t=s(e);return{...i(e),GpsTime:(e,r)=>e.getFloat64(t(r)+20,!0),Red:(e,r)=>e.getUint16(t(r)+28,!0),Green:(e,r)=>e.getUint16(t(r)+30,!0),Blue:(e,r)=>e.getUint16(t(r)+32,!0)}}(e);case 6:return o(e);case 7:return a(e);case 8:return function(e){const t=s(e);return{...a(e),Infrared:(e,r)=>e.getUint16(t(r)+36,!0)}}(e);default:throw new Error(`Unsupported point data record format: ${t}`)}})(),...r}}}},11854:function(e,t,r){var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.expose=t.isWorkerRuntime=t.Transfer=t.registerSerializer=void 0;const o=i(r(95409)),a=r(99278),s=r(66712),u=r(12781),c=i(r(64304));var l=r(99278);Object.defineProperty(t,"registerSerializer",{enumerable:!0,get:function(){return l.registerSerializer}});var d=r(66712);Object.defineProperty(t,"Transfer",{enumerable:!0,get:function(){return d.Transfer}}),t.isWorkerRuntime=c.default.isWorkerRuntime;let f=!1;const p=new Map,h=e=>e&&e.type===u.MasterMessageType.run,g=e=>o.default(e)||function(e){return e&&"object"==typeof e&&"function"==typeof e.subscribe}(e);function y(e){return s.isTransferDescriptor(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function m(e,t){const{payload:r,transferables:n}=y(t),i={type:u.WorkerMessageType.error,uid:e,error:a.serialize(r)};c.default.postMessageToMaster(i,n)}function v(e,t,r){const{payload:n,transferables:i}=y(r),o={type:u.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:n};c.default.postMessageToMaster(o,i)}function b(e){try{const t={type:u.WorkerMessageType.uncaughtError,error:a.serialize(e)};c.default.postMessageToMaster(t)}catch(t){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\nLatest error:",t,"\nOriginal error:",e)}}function _(e,t,r){return n(this,void 0,void 0,(function*(){let n;try{n=t(...r)}catch(t){return m(e,t)}const i=g(n)?"observable":"promise";if(function(e,t){const r={type:u.WorkerMessageType.running,uid:e,resultType:t};c.default.postMessageToMaster(r)}(e,i),g(n)){const t=n.subscribe((t=>v(e,!1,a.serialize(t))),(t=>{m(e,a.serialize(t)),p.delete(e)}),(()=>{v(e,!0),p.delete(e)}));p.set(e,t)}else try{const t=yield n;v(e,!0,a.serialize(t))}catch(t){m(e,a.serialize(t))}}))}t.expose=function(e){if(!c.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(f)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(f=!0,"function"==typeof e)c.default.subscribeToMasterMessages((t=>{h(t)&&!t.method&&_(t.uid,e,t.args.map(a.deserialize))})),function(){const e={type:u.WorkerMessageType.init,exposed:{type:"function"}};c.default.postMessageToMaster(e)}();else{if("object"!=typeof e||!e)throw Error(`Invalid argument passed to expose(). Expected a function or an object, got: ${e}`);c.default.subscribeToMasterMessages((t=>{h(t)&&t.method&&_(t.uid,e[t.method],t.args.map(a.deserialize))})),function(e){const t={type:u.WorkerMessageType.init,exposed:{type:"module",methods:e}};c.default.postMessageToMaster(t)}(Object.keys(e).filter((t=>"function"==typeof e[t])))}c.default.subscribeToMasterMessages((e=>{if((t=e)&&t.type===u.MasterMessageType.cancel){const t=e.uid,r=p.get(t);r&&(r.unsubscribe(),p.delete(t))}var t}))},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&c.default.isWorkerRuntime()&&(self.addEventListener("error",(e=>{setTimeout((()=>b(e.error||e)),250)})),self.addEventListener("unhandledrejection",(e=>{const t=e.reason;t&&"string"==typeof t.message&&setTimeout((()=>b(t)),250)}))),"undefined"!=typeof process&&"function"==typeof process.on&&c.default.isWorkerRuntime()&&(process.on("uncaughtException",(e=>{setTimeout((()=>b(e)),250)})),process.on("unhandledRejection",(e=>{e&&"string"==typeof e.message&&setTimeout((()=>b(e)),250)})))},12781:(e,t)=>{var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerMessageType=t.MasterMessageType=void 0,(n=t.MasterMessageType||(t.MasterMessageType={})).cancel="cancel",n.run="run",(r=t.WorkerMessageType||(t.WorkerMessageType={})).error="error",r.init="init",r.result="result",r.running="running",r.uncaughtError="uncaughtError"},15234:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Las=t.Ept=void 0,t.Ept=o(r(68962)),a(r(36564),t),t.Las=o(r(30549)),a(r(876),t)},15690:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Info=void 0;const n=r(876),i=r(50329);t.Info={parse:function(e){const t=n.Binary.toDataView(e);if(t.byteLength!==i.infoLength)throw new Error(`Invalid COPC info VLR length (should be ${i.infoLength}): ${t.byteLength}`);const r=[t.getFloat64(0,!0),t.getFloat64(8,!0),t.getFloat64(16,!0)],o=t.getFloat64(24,!0);return{cube:[r[0]-o,r[1]-o,r[2]-o,r[0]+o,r[1]+o,r[2]+o],spacing:t.getFloat64(32,!0),rootHierarchyPage:{pageOffset:(0,n.parseBigInt)((0,n.getBigUint64)(t,40,!0)),pageLength:(0,n.parseBigInt)((0,n.getBigUint64)(t,48,!0))},gpsTimeRange:[t.getFloat64(56,!0),t.getFloat64(64,!0)]}}}},16882:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getBigUint64=t.parseBigInt=void 0,t.parseBigInt=function(e){if(e>BigInt(Number.MAX_SAFE_INTEGER)||e<BigInt(-Number.MAX_SAFE_INTEGER))throw new Error(`Cannot convert bigint to number: ${e}`);return Number(e)},t.getBigUint64=function(e,t,r){if(e.getBigUint64)return e.getBigUint64(t,r);const[n,i]=r?[4,0]:[0,4],o=BigInt(e.getUint32(t+n,r)),a=BigInt(e.getUint32(t+i,r));return(o<<BigInt(32))+a}},19459:(e,t)=>{function r([e,t,r,n,i,o]){return[e+(n-e)/2,t+(i-t)/2,r+(o-r)/2]}function n(e){return e[3]-e[0]}function i(e){return e[4]-e[1]}function o(e){return e[5]-e[2]}function a(e,[t,n,i]){const[o,a,s,u,c,l]=e,[d,f,p]=r(e);return[t?d:o,n?f:a,i?p:s,t?u:d,n?c:f,i?l:p]}Object.defineProperty(t,"__esModule",{value:!0}),t.Bounds=void 0,t.Bounds={min:function(e){return[e[0],e[1],e[2]]},max:function(e){return[e[3],e[4],e[5]]},mid:r,width:n,depth:i,height:o,cube:function(e){const t=r(e),a=Math.max(n(e),i(e),o(e))/2;return[t[0]-a,t[1]-a,t[2]-a,t[0]+a,t[1]+a,t[2]+a]},step:a,stepTo:function(e,[t,r,n,i]){for(let o=t-1;o>=0;--o)e=a(e,[r>>o&1,n>>o&1,i>>o&1]);return e},intersection:function(e,t){return[Math.max(e[0],t[0]),Math.max(e[1],t[1]),Math.max(e[2],t[2]),Math.min(e[3],t[3]),Math.min(e[4],t[4]),Math.min(e[5],t[5])]}}},24305:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Hierarchy=void 0,t.Hierarchy={parse:function(e){return Object.entries(e).reduce(((e,[t,r])=>(-1===r?e.pages[t]={}:r&&(e.nodes[t]={pointCount:r}),e)),{nodes:{},pages:{}})}}},25914:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultSerializer=t.extendSerializer=void 0,t.extendSerializer=function(e,t){const r=e.deserialize.bind(e),n=e.serialize.bind(e);return{deserialize:e=>t.deserialize(e,r),serialize:e=>t.serialize(e,n)}};const r=e=>Object.assign(Error(e.message),{name:e.name,stack:e.stack}),n=e=>({__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack});t.DefaultSerializer={deserialize(e){return(t=e)&&"object"==typeof t&&"__error_marker"in t&&"$$error"===t.__error_marker?r(e):e;var t},serialize:e=>e instanceof Error?n(e):e}},26977:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LazPerf=t.create=t.createLazPerf=void 0;const i=n(r(67316));t.createLazPerf=i.default,t.create=i.default,t.LazPerf={create:i.default}},27201:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Getter=void 0;const s=a(r(74945));function u(e){return async function(t,r){if(t<0||r<0||t>r)throw new Error("Invalid range");const n=await(0,s.default)(e,{headers:{Range:`bytes=${t}-${r-1}`}}),i=await n.arrayBuffer();return new Uint8Array(i)}}function c(e){return async function(t,n){const i=await Promise.resolve().then((()=>o(r(10539))));return async function(t=0,r=1/0){if(t<0||r<0||t>r)throw new Error("Invalid range");return await i.promises.access(e),async function(e){return await new Promise(((t,r)=>{const n=[];e.on("data",(e=>n.push(e))),e.on("error",r),e.on("end",(()=>t(Buffer.concat(n))))}))}(i.createReadStream(e,{start:t,end:r-1,autoClose:!0}))}(t,n)}}t.Getter={create:function(e){return"function"==typeof e?e:e.startsWith("http://")||e.startsWith("https://")?u(e):c(e)},http:u,file:c}},30549:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Vlr=t.View=t.PointData=t.Header=t.Extractor=t.ExtraBytes=t.Dimensions=t.Constants=void 0,t.Constants=o(r(48300));var a=r(51652);Object.defineProperty(t,"Dimensions",{enumerable:!0,get:function(){return a.Dimensions}});var s=r(94553);Object.defineProperty(t,"ExtraBytes",{enumerable:!0,get:function(){return s.ExtraBytes}});var u=r(11677);Object.defineProperty(t,"Extractor",{enumerable:!0,get:function(){return u.Extractor}});var c=r(68916);Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return c.Header}});var l=r(90380);Object.defineProperty(t,"PointData",{enumerable:!0,get:function(){return l.PointData}});var d=r(58148);Object.defineProperty(t,"View",{enumerable:!0,get:function(){return d.View}});var f=r(32101);Object.defineProperty(t,"Vlr",{enumerable:!0,get:function(){return f.Vlr}})},32101:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Vlr=void 0;const n=r(876),i=r(48300);function o(e,t,r){return e.find((e=>e.userId===t&&e.recordId===r))}function a(e,t){return(t?u:s)(e)}function s(e){const t=n.Binary.toDataView(e);if(t.byteLength!==i.vlrHeaderLength)throw new Error(`Invalid VLR header length (must be ${i.vlrHeaderLength}): ${t.byteLength}`);return{userId:n.Binary.toCString(e.slice(2,18)),recordId:t.getUint16(18,!0),contentLength:t.getUint16(20,!0),description:n.Binary.toCString(e.slice(22,54)),isExtended:!1}}function u(e){const t=n.Binary.toDataView(e);if(t.byteLength!==i.evlrHeaderLength)throw new Error(`Invalid EVLR header length (must be ${i.evlrHeaderLength}): ${t.byteLength}`);return{userId:n.Binary.toCString(e.slice(2,18)),recordId:t.getUint16(18,!0),contentLength:(0,n.parseBigInt)((0,n.getBigUint64)(t,20,!0)),description:n.Binary.toCString(e.slice(28,60)),isExtended:!0}}async function c({get:e,startOffset:t,count:r,isExtended:n}){const o=[];let s=t;const u=n?i.evlrHeaderLength:i.vlrHeaderLength;for(let t=0;t<r;++t){const t=u?await e(s,s+u):new Uint8Array,{userId:r,recordId:i,contentLength:c,description:l}=a(t,n);o.push({userId:r,recordId:i,contentOffset:s+u,contentLength:c,description:l,isExtended:n}),s+=u+c}return o}t.Vlr={walk:async function(e,t){const r=n.Getter.create(e);return[...await c({get:r,startOffset:t.headerLength,count:t.vlrCount,isExtended:!1}),...await c({get:r,startOffset:t.evlrOffset,count:t.evlrCount,isExtended:!0})]},parse:a,find:o,at:function(e,t,r){const n=o(e,t,r);if(!n)throw new Error(`VLR not found: ${t}/${r}`);return n},fetch:function(e,{contentOffset:t,contentLength:r}){return 0===r?new Uint8Array:n.Getter.create(e)(t,t+r)}}},33359:(e,t)=>{function r(e){return new DataView(e.buffer,e.byteOffset,e.length)}function n(e){const t=r(e);let n="";for(let e=0;e<t.byteLength;++e){const r=t.getInt8(e);if(0===r)return n;n+=String.fromCharCode(r)}return n}Object.defineProperty(t,"__esModule",{value:!0}),t.toCString=t.toDataView=t.Binary=void 0,t.Binary={toDataView:r,toCString:n},t.toDataView=r,t.toCString=n},36564:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Info=t.Hierarchy=t.Copc=t.Constants=void 0,t.Constants=o(r(50329));var a=r(86601);Object.defineProperty(t,"Copc",{enumerable:!0,get:function(){return a.Copc}});var s=r(98363);Object.defineProperty(t,"Hierarchy",{enumerable:!0,get:function(){return s.Hierarchy}});var u=r(15690);Object.defineProperty(t,"Info",{enumerable:!0,get:function(){return u.Info}})},44324:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Dimension=void 0,t.Dimension={Type:{int8:{type:"signed",size:1},int16:{type:"signed",size:2},int32:{type:"signed",size:4},int64:{type:"signed",size:8},uint8:{type:"unsigned",size:1},uint16:{type:"unsigned",size:2},uint32:{type:"unsigned",size:4},uint64:{type:"unsigned",size:8},float32:{type:"float",size:4},float64:{type:"float",size:8},float:{type:"float",size:4},double:{type:"float",size:8},bool:{type:"unsigned",size:1},boolean:{type:"unsigned",size:1}},ctype:function({type:e,size:t}){switch(e){case"signed":switch(t){case 1:return"int8";case 2:return"int16";case 4:return"int32";case 8:return"int64"}case"unsigned":switch(t){case 1:return"uint8";case 2:return"uint16";case 4:return"uint32";case 8:return"uint64"}case"float":switch(t){case 4:return"float";case 8:return"double"}}throw new Error(`Invalid dimension type/size: ${e}/${t}`)}}},47952:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatGuid=t.parsePoint=void 0;const n=r(876);t.parsePoint=function(e){const t=n.Binary.toDataView(e);if(24!==t.byteLength)throw new Error(`Invalid tuple buffer length: ${t.byteLength}`);return[t.getFloat64(0,!0),t.getFloat64(8,!0),t.getFloat64(16,!0)]},t.formatGuid=function(e){const t=n.Binary.toDataView(e);if(16!==t.byteLength)throw new Error(`Invalid GUID buffer length: ${t.byteLength}`);let r="";for(let e=0;e<t.byteLength;e+=4)r+=t.getUint32(e,!0).toString(16).padStart(8,"0");return[r.slice(0,8),r.slice(8,12),r.slice(12,16),r.slice(16,32)].join("-")}},48300:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.evlrHeaderLength=t.vlrHeaderLength=t.minHeaderLength=void 0,t.minHeaderLength=375,t.vlrHeaderLength=54,t.evlrHeaderLength=60},50329:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hierarchyItemLength=t.infoLength=void 0,t.infoLength=160,t.hierarchyItemLength=32},51652:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Dimensions=void 0;const n=r(876),i=r(94553);t.Dimensions={create:function(e,t=[]){return Object.keys(e).reduce(((e,r)=>{const n=a[r];if(n)return{...e,[r]:n};const o=t.find((e=>e.name===r)),s=o&&i.ExtraBytes.getDimension(o);if(s)return{...e,[r]:s};throw new Error(`Failed to look up LAS type: ${r}`)}),{})}};const{Type:o}=n.Dimension,a={X:o.float64,Y:o.float64,Z:o.float64,Intensity:o.uint16,ReturnNumber:o.uint8,NumberOfReturns:o.uint8,ScanDirectionFlag:o.boolean,EdgeOfFlightLine:o.boolean,Classification:o.uint8,Synthetic:o.boolean,KeyPoint:o.boolean,Withheld:o.boolean,Overlap:o.boolean,ScanAngle:o.float32,UserData:o.uint8,PointSourceId:o.uint16,GpsTime:o.float64,Red:o.uint16,Green:o.uint16,Blue:o.uint16,ScannerChannel:o.uint8,Infrared:o.uint16}},54623:(e,t)=>{function r(e){if("string"!=typeof e)return e;const[t,r,n,i,...o]=e.split("-").map((e=>parseInt(e,10))),a=[t,r,n,i];if(0!==o.length||a.some((e=>"number"!=typeof e||Number.isNaN(e))))throw new Error(`Invalid key: ${e}`);return a}Object.defineProperty(t,"__esModule",{value:!0}),t.Key=void 0,t.Key={create:function(e,t=0,n=0,i=0){return"number"!=typeof e?r(e):[e,t,n,i]},parse:r,toString:function(e){return"string"==typeof e?e:e.join("-")},step:function(e,[r,n,i]){const[o,a,s,u]=t.Key.create(e);return[o+1,2*a+r,2*s+n,2*u+i]},up:function(e,r=1){const[n,i,o,a]=t.Key.create(e);return[n-r,i>>r,o>>r,a>>r]},compare:function(e,t){for(let r=0;r<e.length;++r){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},depth:function(e){return e[0]}}},58148:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.View=void 0;const n=r(876),i=r(51652),o=r(11677);t.View={create:function(e,t,r=[],a){let s=o.Extractor.create(t,r);if(a){const e=new Set([...a]);s=Object.entries(s).reduce(((t,[r,n])=>(e.has(r)&&(t[r]=n),t)),{})}const u=i.Dimensions.create(s,r),c=n.Binary.toDataView(e),l=t.pointDataRecordLength;if(c.byteLength%l!=0)throw new Error(`Invalid buffer length (${c.byteLength}) for point length ${l}`);const d=c.byteLength/t.pointDataRecordLength;return{pointCount:d,dimensions:u,getter:function(e){const t=s[e];if(!t)throw new Error(`No extractor for dimension: ${e}`);return function(e){if(e>=d)throw new RangeError(`View index (${e}) out of range: ${d}`);return t(c,e)}}}}}},64304:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={isWorkerRuntime:function(){const e="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||e)},postMessageToMaster:function(e,t){self.postMessage(e,t)},subscribeToMasterMessages:function(e){const t=t=>{e(t.data)};return self.addEventListener("message",t),()=>{self.removeEventListener("message",t)}}}},66712:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Transfer=t.isTransferDescriptor=void 0;const n=r(83682);t.isTransferDescriptor=function(e){return e&&"object"==typeof e&&e[n.$transferable]},t.Transfer=function(e,t){if(!t){if(!(r=e)||"object"!=typeof r)throw Error();t=[e]}var r;return{[n.$transferable]:!0,send:e,transferables:t}}},66838:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Scale=void 0,t.Scale={apply:(e,t=1,r=0)=>(e-r)/t,unapply:(e,t=1,r=0)=>e*t+r}},67316:e=>{var t,r=(t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var r,n,i=void 0!==(e=e||{})?e:{};i.ready=new Promise((function(e,t){r=e,n=t})),["_main","___getTypeName","__embind_initialize_bindings","_fflush","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(i.ready,e)||Object.defineProperty(i.ready,e,{get:()=>H("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:()=>H("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 o=Object.assign({},i),a=[],s="./this.program";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 u="";if("undefined"!=typeof document&&document.currentScript&&(u=document.currentScript.src),t&&(u=t),u=0!==u.indexOf("blob:")?u.substr(0,u.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)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 c,l,d,f=i.print||console.log.bind(console),p=i.printErr||console.warn.bind(console);function h(e,t){Object.getOwnPropertyDescriptor(i,e)||Object.defineProperty(i,e,{configurable:!0,get:function(){H("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 g(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}Object.assign(i,o),o=null,c="fetchSettings",Object.getOwnPropertyDescriptor(i,c)&&H("`Module."+c+"` was supplied but `"+c+"` not included in INCOMING_MODULE_JS_API"),i.arguments&&(a=i.arguments),h("arguments","arguments_"),i.thisProgram&&(s=i.thisProgram),h("thisProgram","thisProgram"),i.quit&&i.quit,h("quit","quit_"),m(void 0===i.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),m(void 0===i.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),m(void 0===i.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),m(void 0===i.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),m(void 0===i.read,"Module.read option was removed (modify read_ in JS)"),m(void 0===i.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),m(void 0===i.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),m(void 0===i.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),m(void 0===i.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),h("read","read_"),h("readAsync","readAsync"),h("readBinary","readBinary"),h("setWindowTitle","setWindowTitle"),m(!0,"worker environment detected but not enabled at build time. Add 'worker' to `-sENVIRONMENT` to enable."),m(!0,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),m(!0,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),i.wasmBinary&&(l=i.wasmBinary),h("wasmBinary","wasmBinary"),i.noExitRuntime,h("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&H("no native wasm support detected");var y=!1;function m(e,t){e||H("Assertion failed"+(t?": "+t:""))}var v,b,_,w,T,P,E,C,S,O="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function I(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&O)return O.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|u:(240!=(248&a)&&Q("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|u<<6|63&e[t++]),a<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function M(e,t){return e?I(_,e,t):""}function D(e,t,r,n){if(!(n>0))return 0;for(var i=r,o=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=o)break;s>1114111&&Q("Invalid Unicode code point 0x"+s.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|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-i}function F(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}function A(e){v=e,i.HEAP8=b=new Int8Array(e),i.HEAP16=w=new Int16Array(e),i.HEAP32=P=new Int32Array(e),i.HEAPU8=_=new Uint8Array(e),i.HEAPU16=T=new Uint16Array(e),i.HEAPU32=E=new Uint32Array(e),i.HEAPF32=C=new Float32Array(e),i.HEAPF64=S=new Float64Array(e)}var L=65536;i.TOTAL_STACK&&m(L===i.TOTAL_STACK,"the stack size can no longer be determined at runtime");var U,R=i.INITIAL_MEMORY||262144;function k(){if(!y){var e=_t(),t=E[e>>2],r=E[e+4>>2];34821223==t&&2310721022==r||H("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)),1668509029!==E[0]&&H("Runtime error: The application has corrupted its heap memory area (address zero)!")}}h("INITIAL_MEMORY","INITIAL_MEMORY"),m(R>=L,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+R+"! (TOTAL_STACK="+L+")"),m("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),m(!i.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),m(262144==R,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var j=[],x=[],B=[],$=!1;m(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),m(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),m(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),m(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,W=null,N=null,V={};function H(e){i.onAbort&&i.onAbort(e),p(e="Aborted("+e+")"),y=!0;var t=new WebAssembly.RuntimeError(e);throw n(t),t}var G,Y,q={error:function(){H("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(){q.error()},createDataFile:function(){q.error()},createPreloadedFile:function(){q.error()},createLazyFile:function(){q.error()},open:function(){q.error()},mkdev:function(){q.error()},registerDevice:function(){q.error()},analyzePath:function(){q.error()},loadFilesFromDB:function(){q.error()},ErrnoError:function(){q.error()}};function J(e){return e.startsWith("data:application/octet-stream;base64,")}function K(e,t){return function(){var r=e,n=t;return t||(n=i.asm),m($,"native function `"+r+"` called before runtime initialization"),n[e]||m(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function X(e){try{if(e==G&&l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}catch(e){H(e)}}function Z(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 ee(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){E[this.ptr+4>>2]=e},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(e){E[this.ptr+8>>2]=e},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_refcount=function(e){P[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,b[this.ptr+12|0]=e},this.get_caught=function(){return 0!=b[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,b[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=b[this.ptr+13|0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=P[this.ptr>>2];P[this.ptr>>2]=e+1},this.release_ref=function(){var e=P[this.ptr>>2];return P[this.ptr>>2]=e-1,m(e>0),1===e},this.set_adjusted_ptr=function(e){E[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(wt(this.get_type()))return E[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function te(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)}}i.FS_createDataFile=q.createDataFile,i.FS_createPreloadedFile=q.createPreloadedFile,J(G="laz-perf.wasm")||(Y=G,G=i.locateFile?i.locateFile(Y,u):u+Y);var re=void 0;function ne(e){for(var t="",r=e;_[r];)t+=re[_[r++]];return t}var ie={},oe={},ae={};function se(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function ue(e,t){return e=se(e),function(){return t.apply(this,arguments)}}function ce(e,t){var r=ue(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var le=void 0;function de(e){throw new le(e)}var fe=void 0;function pe(e){throw new fe(e)}function he(e,t,r){function n(t){var n=r(t);n.length!==e.length&&pe("Mismatched type converter count");for(var i=0;i<e.length;++i)ge(e[i],n[i])}e.forEach((function(e){ae[e]=t}));var i=new Array(t.length),o=[],a=0;t.forEach(((e,t)=>{oe.hasOwnProperty(e)?i[t]=oe[e]:(o.push(e),ie.hasOwnProperty(e)||(ie[e]=[]),ie[e].push((()=>{i[t]=oe[e],++a===o.length&&n(i)})))})),0===o.length&&n(i)}function ge(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||de('type "'+n+'" must have a positive integer typeid pointer'),oe.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;de("Cannot register type '"+n+"' twice")}if(oe[e]=t,delete ae[e],ie.hasOwnProperty(e)){var i=ie[e];delete ie[e],i.forEach((e=>e()))}}function ye(e){de(e.$$.ptrType.registeredClass.name+" instance already deleted")}var me=!1;function ve(e){}function be(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function _e(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=_e(e,t,r.baseClass);return null===n?null:r.downcast(n)}var we={};var Te=[];function Pe(){for(;Te.length;){var e=Te.pop();e.$$.deleteScheduled=!1,e.delete()}}var Ee=void 0;var Ce={};function Se(e,t){return t.ptrType&&t.ptr||pe("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&pe("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ie(Object.create(e,{$$:{value:t}}))}function Oe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=function(e,t){return t=function(e,t){for(void 0===t&&de("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),Ce[t]}(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?Se(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Se(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o,a=this.registeredClass.getActualType(t),s=we[a];if(!s)return i.call(this);o=this.isConst?s.constPointerType:s.pointerType;var u=_e(t,this.registeredClass,o.registeredClass);return null===u?i.call(this):this.isSmartPointer?Se(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:e}):Se(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}function Ie(e){return"undefined"==typeof FinalizationRegistry?(Ie=e=>e,e):(me=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),be(e.$$)})),Ie=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t},n=t.ptrType.registeredClass;r.leakWarning=new Error("Embind found a leaked C++ instance "+n.name+" <0x"+t.ptr.toString(16)+">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"),"captureStackTrace"in Error&&Error.captureStackTrace(r.leakWarning,Oe),me.register(e,r,e)}return e},ve=e=>me.unregister(e),Ie(e))}function Me(){}function De(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||de("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 Fe(e,t,r,n,i,o,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=o,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Ae(e,t,r){for(;t!==r;)t.upcast||de("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Le(e,t){if(null===t)return this.isReference&&de("null is not a valid "+this.name),0;t.$$||de('Cannot pass "'+Je(t)+'" as a '+this.name),t.$$.ptr||de("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Ae(t.$$.ptr,r,this.registeredClass)}function Ue(e,t){var r;if(null===t)return this.isReference&&de("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||de('Cannot pass "'+Je(t)+'" as a '+this.name),t.$$.ptr||de("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&de("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=Ae(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&de("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:de("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 i=t.clone();r=this.rawShare(r,qe.toHandle((function(){i.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:de("Unsupporting sharing policy")}return r}function Re(e,t){if(null===t)return this.isReference&&de("null is not a valid "+this.name),0;t.$$||de('Cannot pass "'+Je(t)+'" as a '+this.name),t.$$.ptr||de("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&de("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Ae(t.$$.ptr,r,this.registeredClass)}function ke(e){return this.fromWireType(P[e>>2])}function je(e,t,r,n,i,o,a,s,u,c,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=o,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Ue:n?(this.toWireType=Le,this.destructorFunction=null):(this.toWireType=Re,this.destructorFunction=null)}var xe=[];function Be(e){var t=xe[e];return t||(e>=xe.length&&(xe.length=e+1),xe[e]=t=U.get(e)),m(U.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function $e(e,t){var r=(e=ne(e)).includes("j")?function(e,t){m(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),function(e,t,r){return e.includes("j")?function(e,t,r){m("dynCall_"+e in i,"bad function pointer type - no table for sig '"+e+"'"),r&&r.length?m(r.length===e.substring(1).replace(/j/g,"--").length):m(1==e.length);var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)}(e,t,r):(m(Be(t),"missing table entry in dynCall: "+t),Be(t).apply(null,r))}(e,t,r)}}(e,t):Be(t);return"function"!=typeof r&&de("unknown function pointer with signature "+e+": "+t),r}var ze=void 0;function We(e){var t=vt(e),r=ne(t);return mt(t),r}function Ne(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||oe[t]||(ae[t]?ae[t].forEach(e):(r.push(t),n[t]=!0))})),new ze(e+": "+r.map(We).join([", "]))}function Ve(e,t){for(var r=[],n=0;n<e;n++)r.push(E[t+4*n>>2]);return r}function He(e,t,r,n,i){var o=t.length;o<2&&de("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,l=o-2,d=new Array(l),f=[],p=[];return function(){var r;arguments.length!==l&&de("function "+e+" called with "+arguments.length+" arguments, expected "+l+" args!"),p.length=0,f.length=a?2:1,f[0]=i,a&&(r=t[1].toWireType(p,this),f[1]=r);for(var o=0;o<l;++o)d[o]=t[o+2].toWireType(p,arguments[o]),f.push(d[o]);return function(e){if(s)!function(e){for(;e.length;){var t=e.pop();e.pop()(t)}}(p);else for(var n=a?1:2;n<t.length;n++){var i=1===n?r:d[n-2];null!==t[n].destructorFunction&&t[n].destructorFunction(i)}if(c)return t[0].fromWireType(e)}(n.apply(null,f))}}var Ge=[],Ye=[{},{value:void 0},{value:null},{value:!0},{value:!1}];var qe={toValue:e=>(e||de("Cannot use deleted val. handle = "+e),Ye[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=Ge.length?Ge.pop():Ye.length;return Ye[t]={refcount:1,value:e},t}}};function Je(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Ke(e,t){switch(t){case 2:return function(e){return this.fromWireType(C[e>>2])};case 3:return function(e){return this.fromWireType(S[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Xe(e,t,r){switch(t){case 0:return r?function(e){return b[e]}:function(e){return _[e]};case 1:return r?function(e){return w[e>>1]}:function(e){return T[e>>1]};case 2:return r?function(e){return P[e>>2]}:function(e){return E[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var Ze="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Qe(e,t){m(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&T[n];)++n;if((r=n<<1)-e>32&&Ze)return Ze.decode(_.subarray(e,r));for(var o="",a=0;!(a>=t/2);++a){var s=w[e+2*a>>1];if(0==s)break;o+=String.fromCharCode(s)}return o}function et(e,t,r){if(m(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),m("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,o=0;o<i;++o){var a=e.charCodeAt(o);w[t>>1]=a,t+=2}return w[t>>1]=0,t-n}function tt(e){return 2*e.length}function rt(e,t){m(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var i=P[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var o=i-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(i)}return n}function nt(e,t,r){if(m(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),m("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),P[t>>2]=a,(t+=4)+4>i)break}return P[t>>2]=0,t-n}function it(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 ot(e){try{return d.grow(e-v.byteLength+65535>>>16),A(d.buffer),1}catch(t){p("emscripten_realloc_buffer: Attempted to grow heap from "+v.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}var at={};function st(){if(!st.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",_:s||"./this.program"};for(var t in at)void 0===at[t]?delete e[t]:e[t]=at[t];var r=[];for(var t in e)r.push(t+"="+e[t]);st.strings=r}return st.strings}var ut=[null,[],[]];function ct(e,t){var r=ut[e];m(r),0===t||10===t?((1===e?f:p)(I(r,0)),r.length=0):r.push(t)}function lt(e){return e%4==0&&(e%100!=0||e%400==0)}var dt=[31,29,31,30,31,30,31,31,30,31,30,31],ft=[31,28,31,30,31,30,31,31,30,31,30,31];function pt(e,t,r,n){var i=P[n+40>>2],o={tm_sec:P[n>>2],tm_min:P[n+4>>2],tm_hour:P[n+8>>2],tm_mday:P[n+12>>2],tm_mon:P[n+16>>2],tm_year:P[n+20>>2],tm_wday:P[n+24>>2],tm_yday:P[n+28>>2],tm_isdst:P[n+32>>2],tm_gmtoff:P[n+36>>2],tm_zone:i?M(i):""},a=M(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return d(e,t,"0")}function p(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function h(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function g(e){var t=function(e,t){for(var r=new Date(e.getTime());t>0;){var n=lt(r.getFullYear()),i=r.getMonth(),o=(n?dt:ft)[i];if(!(t>o-r.getDate()))return r.setDate(r.getDate()+t),r;t-=o-r.getDate()+1,r.setDate(1),i<11?r.setMonth(i+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),i=h(r),o=h(n);return p(i,t)<=0?p(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var y={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return g(e).toString().substring(2)},"%G":function(e){return g(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+function(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}(lt(e.tm_year+190