deck.gl 9.2.0-alpha.1 → 9.2.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist.min.js +1 -1
  2. package/package.json +15 -15
package/dist.min.js CHANGED
@@ -15,7 +15,7 @@
15
15
  } catch (error) {
16
16
  console.error(error);
17
17
  throw error;
18
- }`}function Iy(e,t=!0,r){let n=r||new Set;if(e){if(fS(e))n.add(e);else if(fS(e.buffer))n.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(t&&typeof e=="object")for(let s in e)Iy(e[s],t,n)}}return r===void 0?Array.from(n):[]}function fS(e){return e?e instanceof ArrayBuffer||typeof MessagePort<"u"&&e instanceof MessagePort||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas:!1}var Ry=()=>{},ei=class{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Oe||typeof sc<"u"&&!Oe}constructor(t){let{name:r,source:n,url:s}=t;ze(n||s),this.name=r,this.source=n,this.url=s,this.onMessage=Ry,this.onError=i=>console.log(i),this.worker=Oe?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=Ry,this.onError=Ry,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(t,r){r=r||Iy(t),this.worker.postMessage(t,r)}_getErrorFromErrorEvent(t){let r="Failed to load ";return r+=`worker ${this.name} from ${this.url}. `,t.message&&(r+=`${t.message} in `),t.lineno&&(r+=`:${t.lineno}:${t.colno}`),new Error(r)}_createBrowserWorker(){this._loadableURL=cS({source:this.source,url:this.url});let t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=r=>{r.data?this.onMessage(r.data):this.onError(new Error("No data received"))},t.onerror=r=>{this.onError(this._getErrorFromErrorEvent(r)),this.terminated=!0},t.onmessageerror=r=>console.error(r),t}_createNodeWorker(){let t;if(this.url){let n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;t=new sc(n,{eval:!1})}else if(this.source)t=new sc(this.source,{eval:!0});else throw new Error("no worker");return t.on("message",r=>{this.onMessage(r)}),t.on("error",r=>{this.onError(r)}),t.on("exit",r=>{}),t}};var Pf=class{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return ei.isSupported()}constructor(t){this.source=t.source,this.url=t.url,this.setProps(t)}destroy(){this.idleQueue.forEach(t=>t.destroy()),this.isDestroyed=!0}setProps(t){this.props={...this.props,...t},t.name!==void 0&&(this.name=t.name),t.maxConcurrency!==void 0&&(this.maxConcurrency=t.maxConcurrency),t.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=t.maxMobileConcurrency),t.reuseWorkers!==void 0&&(this.reuseWorkers=t.reuseWorkers),t.onDebug!==void 0&&(this.onDebug=t.onDebug)}async startJob(t,r=(s,i,o)=>s.done(o),n=(s,i)=>s.error(i)){let s=new Promise(i=>(this.jobQueue.push({name:t,onMessage:r,onError:n,onStart:i}),this));return this._startQueuedJob(),await s}async _startQueuedJob(){if(!this.jobQueue.length)return;let t=this._getAvailableWorker();if(!t)return;let r=this.jobQueue.shift();if(r){this.onDebug({message:"Starting job",name:r.name,workerThread:t,backlog:this.jobQueue.length});let n=new Cf(r.name,t);t.onMessage=s=>r.onMessage(n,s.type,s.payload),t.onError=s=>r.onError(n,s),r.onStart(n);try{await n.result}catch(s){console.error(`Worker exception: ${s}`)}finally{this.returnWorkerToQueue(t)}}}returnWorkerToQueue(t){!Oe||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;let t=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new ei({name:t,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return aS?this.maxMobileConcurrency:this.maxConcurrency}};var jW={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}},lo=class{props;workerPools=new Map;static isSupported(){return ei.isSupported()}static getWorkerFarm(t={}){return lo._workerFarm=lo._workerFarm||new lo({}),lo._workerFarm.setProps(t),lo._workerFarm}constructor(t){this.props={...jW},this.setProps(t),this.workerPools=new Map}destroy(){for(let t of this.workerPools.values())t.destroy();this.workerPools=new Map}setProps(t){this.props={...this.props,...t};for(let r of this.workerPools.values())r.setProps(this._getWorkerPoolProps())}getWorkerPool(t){let{name:r,source:n,url:s}=t,i=this.workerPools.get(r);return i||(i=new Pf({name:r,source:n,url:s}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(r,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}},ri=lo;Y(ri,"_workerFarm");function Oy(e,t={}){let r=t[e.id]||{},n=Oe?`${e.id}-worker.js`:`${e.id}-worker-node.js`,s=r.workerUrl;if(!s&&e.id==="compression"&&(s=t.workerUrl),t._workerType==="test"&&(Oe?s=`modules/${e.module}/dist/${n}`:s=`modules/${e.module}/src/workers/${e.id}-worker-node.ts`),!s){let i=e.version;i==="latest"&&(i=iS);let o=i?`@${i}`:"";s=`https://unpkg.com/@loaders.gl/${e.module}${o}/dist/${n}`}return ze(s),s}function Ly(e,t=Sf){ze(e,"no worker provided");let r=e.version;return!(!t||!r)}var Ny={};async function zn(e,t=null,r={},n=null){return t&&(e=hS(e,t,r,n)),Ny[e]=Ny[e]||qW(e),await Ny[e]}function hS(e,t,r={},n=null){if(!r.useLocalLibraries&&e.startsWith("http"))return e;n=n||e;let s=r.modules||{};return s[n]?s[n]:Oe?r.CDN?(ze(r.CDN.startsWith("http")),`${r.CDN}/${t}@${Sf}/dist/libs/${n}`):wf?`../src/libs/${n}`:`modules/${t}/src/libs/${n}`:`modules/${t}/dist/libs/${n}`}async function qW(e){if(e.endsWith("wasm"))return await XW(e);if(!Oe)try{let{requireFromFile:r}=globalThis.loaders||{};return await r?.(e)}catch(r){return console.error(r),null}if(wf)return importScripts(e);let t=await YW(e);return $W(t,e)}function $W(e,t){if(!Oe){let{requireFromString:n}=globalThis.loaders||{};return n?.(e,t)}if(wf)return eval.call(globalThis,e),null;let r=document.createElement("script");r.id=t;try{r.appendChild(document.createTextNode(e))}catch{r.text=e}return document.body.appendChild(r),null}async function XW(e){let{readFileAsArrayBuffer:t}=globalThis.loaders||{};return Oe||!t||e.startsWith("http")?await(await fetch(e)).arrayBuffer():await t(e)}async function YW(e){let{readFileAsText:t}=globalThis.loaders||{};return Oe||!t||e.startsWith("http")?await(await fetch(e)).text():await t(e)}function By(e,t){return!ri.isSupported()||!Oe&&!t?._nodeWorkers?!1:e.worker&&t?.worker}async function Fy(e,t,r,n,s){let i=e.id,o=Oy(e,r),c=ri.getWorkerFarm(r).getWorkerPool({name:i,url:o});r=JSON.parse(JSON.stringify(r)),n=JSON.parse(JSON.stringify(n||{}));let l=await c.startJob("process-on-worker",KW.bind(null,s));return l.postMessage("process",{input:t,options:r,context:n}),await(await l.result).result}async function KW(e,t,r,n){switch(r){case"done":t.done(n);break;case"error":t.error(new Error(n.error));break;case"process":let{id:s,input:i,options:o}=n;try{let a=await e(i,o);t.postMessage("done",{id:s,result:a})}catch(a){let c=a instanceof Error?a.message:"unknown error";t.postMessage("error",{id:s,error:c})}break;default:console.warn(`parse-with-worker unknown message ${r}`)}}function dS(e,t=5){return typeof e=="string"?e.slice(0,t):ArrayBuffer.isView(e)?uS(e.buffer,e.byteOffset,t):e instanceof ArrayBuffer?uS(e,0,t):""}function uS(e,t,r){if(e.byteLength<=t+r)return"";let n=new DataView(e),s="";for(let i=0;i<r;i++)s+=String.fromCharCode(n.getUint8(t+i));return s}function ky(e){try{return JSON.parse(e)}catch{throw new Error(`Failed to parse JSON from data starting with "${dS(e)}"`)}}function Dy(e,t,r){if(r=r||e.byteLength,e.byteLength<r||t.byteLength<r)return!1;let n=new Uint8Array(e),s=new Uint8Array(t);for(let i=0;i<n.length;++i)if(n[i]!==s[i])return!1;return!0}function Uy(...e){return pS(e)}function pS(e){let t=e.map(i=>i instanceof ArrayBuffer?new Uint8Array(i):i),r=t.reduce((i,o)=>i+o.byteLength,0),n=new Uint8Array(r),s=0;for(let i of t)n.set(i,s),s+=i.byteLength;return n.buffer}function If(...e){let t=e,r=t&&t.length>1&&t[0].constructor||null;if(!r)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');let n=t.reduce((o,a)=>o+a.length,0),s=new r(n),i=0;for(let o of t)s.set(o,i),i+=o.length;return s}function fo(e,t,r){let n=r!==void 0?new Uint8Array(e).subarray(t,t+r):new Uint8Array(e).subarray(t);return new Uint8Array(n).buffer}function ni(e,t){return ut(e>=0),ut(t>0),e+(t-1)&~(t-1)}function zy(e,t,r){let n;if(e instanceof ArrayBuffer)n=new Uint8Array(e);else{let s=e.byteOffset,i=e.byteLength;n=new Uint8Array(e.buffer||e.arrayBuffer,s,i)}return t.set(n,r),r+ni(n.byteLength,4)}async function Vy(e){let t=[];for await(let r of e)t.push(r);return Uy(...t)}function Rf(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();e=t[0]*1e3+t[1]/1e6}else e=Date.now();return e}var ho=class{constructor(t,r){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=t,this.type=r,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Rf(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Rf()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}};var qe=class{constructor(t){this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t,r="count"){return this._getOrCreate({name:t,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let t of Object.values(this.stats))t.reset();return this}forEach(t){for(let r of Object.values(this.stats))t(r)}getTable(){let t={};return this.forEach(r=>{t[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,s=this.stats[r];return s||(t instanceof ho?s=t:s=new ho(r,n),this.stats[r]=s),s}};var ZW="Queued Requests",JW="Active Requests",QW="Cancelled Requests",tH="Queued Requests Ever",eH="Active Requests Ever",rH={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},si=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(t={}){this.props={...rH,...t},this.stats=new qe({id:this.props.id}),this.stats.get(ZW),this.stats.get(JW),this.stats.get(QW),this.stats.get(tH),this.stats.get(eH)}scheduleRequest(t,r=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);let n={handle:t,priority:0,getPriority:r},s=new Promise(i=>(n.resolve=i,n));return this.requestQueue.push(n),this.requestMap.set(t,s),this._issueNewRequests(),s}_issueRequest(t){let{handle:r,resolve:n}=t,s=!1,i=()=>{s||(s=!0,this.requestMap.delete(r),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),this.props.debounceTime)}_issueNewRequestsAsync(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=null;let t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(t!==0){this._updateAllRequests();for(let r=0;r<t;++r){let n=this.requestQueue.shift();n&&this._issueRequest(n)}}}_updateAllRequests(){let t=this.requestQueue;for(let r=0;r<t.length;++r){let n=t[r];this._updateRequest(n)||(t.splice(r,1),this.requestMap.delete(n.handle),r--)}t.sort((r,n)=>r.priority-n.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),t.priority<0?(t.resolve(null),!1):!0}};var nH="",mS={};function Wy(e){for(let t in mS)if(e.startsWith(t)){let r=mS[t];e=e.replace(t,r)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${nH}${e}`),e}function gS(e){return e&&typeof e=="object"&&e.isBuffer}function Vp(e){if(gS(e))return e;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let t=e;return new TextEncoder().encode(t).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}var Rr={};$t(Rr,{dirname:()=>iH,filename:()=>sH,join:()=>oH,resolve:()=>aH});function xS(){if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let e=window.location?.pathname;return e?.slice(0,e.lastIndexOf("/")+1)||""}function sH(e){let t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(t+1):""}function iH(e){let t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(0,t):""}function oH(...e){let t="/";return e=e.map((r,n)=>(n&&(r=r.replace(new RegExp(`^${t}`),"")),n!==e.length-1&&(r=r.replace(new RegExp(`${t}$`),"")),r)),e.join(t)}function aH(...e){let t=[];for(let i=0;i<e.length;i++)t[i]=e[i];let r="",n=!1,s;for(let i=t.length-1;i>=-1&&!n;i--){let o;i>=0?o=t[i]:(s===void 0&&(s=xS()),o=s),o.length!==0&&(r=`${o}/${r}`,n=o.charCodeAt(0)===Of)}return r=cH(r,!n),n?`/${r}`:r.length>0?r:"."}var Of=47,Hy=46;function cH(e,t){let r="",n=-1,s=0,i,o=!1;for(let a=0;a<=e.length;++a){if(a<e.length)i=e.charCodeAt(a);else{if(i===Of)break;i=Of}if(i===Of){if(!(n===a-1||s===1))if(n!==a-1&&s===2){if(r.length<2||!o||r.charCodeAt(r.length-1)!==Hy||r.charCodeAt(r.length-2)!==Hy){if(r.length>2){let c=r.length-1,l=c;for(;l>=0&&r.charCodeAt(l)!==Of;--l);if(l!==c){r=l===-1?"":r.slice(0,l),n=a,s=0,o=!1;continue}}else if(r.length===2||r.length===1){r="",n=a,s=0,o=!1;continue}}t&&(r.length>0?r+="/..":r="..",o=!0)}else{let c=e.slice(n+1,a);r.length>0?r+=`/${c}`:r=c,o=!1}n=a,s=0}else i===Hy&&s!==-1?++s:s=-1}return r}var Wp=class{fetch;loadOptions;_needsRefresh=!0;props;constructor(t){this.props={...t},this.loadOptions={...t.loadOptions},this.fetch=lH(this.loadOptions)}setProps(t){this.props=Object.assign(this.props,t),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(t=!0){let r=this._needsRefresh;return t&&(this._needsRefresh=!1),r}};function lH(e){let t=e?.fetch;if(t&&typeof t=="function")return(n,s)=>t(n,s);let r=e?.fetch;return r&&typeof r!="function"?n=>fetch(n,r):n=>fetch(n)}var Wr=class extends Wp{};Y(Wr,"type","template"),Y(Wr,"testURL",t=>!1);var fH=e=>typeof e=="boolean",Lf=e=>typeof e=="function",uo=e=>e!==null&&typeof e=="object",Gy=e=>uo(e)&&e.constructor==={}.constructor;var _S=e=>Boolean(e)&&typeof e[Symbol.iterator]=="function",yS=e=>e&&typeof e[Symbol.asyncIterator]=="function";var Hr=e=>typeof Response<"u"&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json;var Gr=e=>typeof Blob<"u"&&e instanceof Blob,AS=e=>e&&typeof e=="object"&&e.isBuffer;var hH=e=>typeof ReadableStream<"u"&&e instanceof ReadableStream||uo(e)&&Lf(e.tee)&&Lf(e.cancel)&&Lf(e.getReader);var uH=e=>uo(e)&&Lf(e.read)&&Lf(e.pipe)&&fH(e.readable),Hp=e=>hH(e)||uH(e);var Gp=class extends Error{constructor(t,r){super(t),this.reason=r.reason,this.url=r.url,this.response=r.response}reason;url;response};var dH=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,pH=/^([-\w.]+\/[-\w.+]+)/;function jy(e,t){return e.toLowerCase()===t.toLowerCase()}function vS(e){let t=pH.exec(e);return t?t[1]:e}function qy(e){let t=dH.exec(e);return t?t[1]:""}var bS=/\?.*/;function TS(e){let t=e.match(bS);return t&&t[0]}function ic(e){return e.replace(bS,"")}function MS(e){if(e.length<50)return e;let t=e.slice(e.length-15);return`${e.substr(0,32)}...${t}`}function po(e){return Hr(e)?e.url:Gr(e)?e.name||"":typeof e=="string"?e:""}function Nf(e){if(Hr(e)){let t=e,r=t.headers.get("content-type")||"",n=ic(t.url);return vS(r)||qy(n)}return Gr(e)?e.type||"":typeof e=="string"?qy(e):""}function ES(e){return Hr(e)?e.headers["content-length"]||-1:Gr(e)?e.size:typeof e=="string"?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}async function jp(e){if(Hr(e))return e;let t={},r=ES(e);r>=0&&(t["content-length"]=String(r));let n=po(e),s=Nf(e);s&&(t["content-type"]=s);let i=await gH(e);i&&(t["x-first-bytes"]=i),typeof e=="string"&&(e=new TextEncoder().encode(e));let o=new Response(e,{headers:t});return Object.defineProperty(o,"url",{value:n}),o}async function SS(e){if(!e.ok)throw await mH(e)}async function mH(e){let t=MS(e.url),r=`Failed to fetch resource (${e.status}) ${e.statusText}: ${t}`;r=r.length>100?`${r.slice(0,100)}...`:r;let n={reason:e.statusText,url:e.url,response:e};try{let s=e.headers.get("Content-Type");n.reason=s?.includes("application/json")?await e.json():e.text()}catch{}return new Gp(r,n)}async function gH(e){if(typeof e=="string")return`data:,${e.slice(0,5)}`;if(e instanceof Blob){let r=e.slice(0,5);return await new Promise(n=>{let s=new FileReader;s.onload=i=>n(i?.target?.result),s.readAsDataURL(r)})}if(e instanceof ArrayBuffer){let r=e.slice(0,5);return`data:base64,${xH(r)}`}return null}function xH(e){let t="",r=new Uint8Array(e);for(let n=0;n<r.byteLength;n++)t+=String.fromCharCode(r[n]);return btoa(t)}function _H(e){return!yH(e)&&!AH(e)}function yH(e){return e.startsWith("http:")||e.startsWith("https:")}function AH(e){return e.startsWith("data:")}async function oc(e,t){if(typeof e=="string"){let r=Wy(e);return _H(r)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(r,t):await fetch(r,t)}return await jp(e)}var $y=new _r({id:"loaders.gl"}),qp=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},$p=class{console;constructor(){this.console=console}log(...t){return this.console.log.bind(this.console,...t)}info(...t){return this.console.info.bind(this.console,...t)}warn(...t){return this.console.warn.bind(this.console,...t)}error(...t){return this.console.error.bind(this.console,...t)}};var Xy={fetch:null,mimeType:void 0,nothrow:!1,log:new $p,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:xs,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},wS={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function Yy(){globalThis.loaders=globalThis.loaders||{};let{loaders:e}=globalThis;return e._state||(e._state={}),e._state}function Ky(){let e=Yy();return e.globalOptions=e.globalOptions||{...Xy},e.globalOptions}function IS(e,t,r,n){return r=r||[],r=Array.isArray(r)?r:[r],vH(e,r),TH(t,e,n)}function vH(e,t){CS(e,null,Xy,wS,t);for(let r of t){let n=e&&e[r.id]||{},s=r.options&&r.options[r.id]||{},i=r.deprecatedOptions&&r.deprecatedOptions[r.id]||{};CS(n,r.id,s,i,t)}}function CS(e,t,r,n,s){let i=t||"Top level",o=t?`${t}.`:"";for(let a in e){let c=!t&&uo(e[a]),l=a==="baseUri"&&!t,f=a==="workerUrl"&&t;if(!(a in r)&&!l&&!f){if(a in n)$y.warn(`${i} loader option '${o}${a}' no longer supported, use '${n[a]}'`)();else if(!c){let h=bH(a,s);$y.warn(`${i} loader option '${o}${a}' not recognized. ${h}`)()}}}}function bH(e,t){let r=e.toLowerCase(),n="";for(let s of t)for(let i in s.options){if(e===i)return`Did you mean '${s.id}.${i}'?`;let o=i.toLowerCase();(r.startsWith(o)||o.startsWith(r))&&(n=n||`Did you mean '${s.id}.${i}'?`)}return n}function TH(e,t,r){let s={...e.options||{}};return MH(s,r),s.log===null&&(s.log=new qp),PS(s,Ky()),PS(s,t),s}function PS(e,t){for(let r in t)if(r in t){let n=t[r];Gy(n)&&Gy(e[r])?e[r]={...e[r],...t[r]}:e[r]=t[r]}}function MH(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)}function Bf(e){return e?(Array.isArray(e)&&(e=e[0]),Array.isArray(e?.extensions)):!1}function Ff(e){ut(e,"null loader"),ut(Bf(e),"invalid loader");let t;return Array.isArray(e)&&(t=e[1],e=e[0],e={...e,options:{...e.options,...t}}),(e?.parseTextSync||e?.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}var RS=()=>{let e=Yy();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function kf(e){let t=RS();e=Array.isArray(e)?e:[e];for(let r of e){let n=Ff(r);t.find(s=>n===s)||t.unshift(n)}}function OS(){return RS()}var LS=new _r({id:"loaders.gl"});var EH=/\.([^.]+)$/;async function FS(e,t=[],r,n){if(!kS(e))return null;let s=NS(e,t,{...r,nothrow:!0},n);if(s)return s;if(Gr(e)&&(e=await e.slice(0,10).arrayBuffer(),s=NS(e,t,r,n)),!s&&!r?.nothrow)throw new Error(DS(e));return s}function NS(e,t=[],r,n){if(!kS(e))return null;if(t&&!Array.isArray(t))return Ff(t);let s=[];t&&(s=s.concat(t)),r?.ignoreRegisteredLoaders||s.push(...OS()),wH(s);let i=SH(e,s,r,n);if(!i&&!r?.nothrow)throw new Error(DS(e));return i}function SH(e,t,r,n){let s=po(e),i=Nf(e),o=ic(s)||n?.url,a=null,c="";return r?.mimeType&&(a=Zy(t,r?.mimeType),c=`match forced by supplied MIME type ${r?.mimeType}`),a=a||CH(t,o),c=c||(a?`matched url ${o}`:""),a=a||Zy(t,i),c=c||(a?`matched MIME type ${i}`:""),a=a||IH(t,e),c=c||(a?`matched initial data ${US(e)}`:""),r?.fallbackMimeType&&(a=a||Zy(t,r?.fallbackMimeType),c=c||(a?`matched fallback MIME type ${i}`:"")),c&&LS.log(1,`selectLoader selected ${a?.name}: ${c}.`),a}function kS(e){return!(e instanceof Response&&e.status===204)}function DS(e){let t=po(e),r=Nf(e),n="No valid loader found (";n+=t?`${Rr.filename(t)}, `:"no url provided, ",n+=`MIME type: ${r?`"${r}"`:"not provided"}, `;let s=e?US(e):"";return n+=s?` first bytes: "${s}"`:"first bytes: not available",n+=")",n}function wH(e){for(let t of e)Ff(t)}function CH(e,t){let r=t&&EH.exec(t),n=r&&r[1];return n?PH(e,n):null}function PH(e,t){t=t.toLowerCase();for(let r of e)for(let n of r.extensions)if(n.toLowerCase()===t)return r;return null}function Zy(e,t){for(let r of e)if(r.mimeTypes?.some(n=>jy(t,n))||jy(t,`application/x.${r.id}`))return r;return null}function IH(e,t){if(!t)return null;for(let r of e)if(typeof t=="string"){if(RH(t,r))return r}else if(ArrayBuffer.isView(t)){if(BS(t.buffer,t.byteOffset,r))return r}else if(t instanceof ArrayBuffer&&BS(t,0,r))return r;return null}function RH(e,t){return t.testText?t.testText(e):(Array.isArray(t.tests)?t.tests:[t.tests]).some(n=>e.startsWith(n))}function BS(e,t,r){return(Array.isArray(r.tests)?r.tests:[r.tests]).some(s=>OH(e,t,r,s))}function OH(e,t,r,n){if(n instanceof ArrayBuffer)return Dy(n,e,n.byteLength);switch(typeof n){case"function":return n(e);case"string":let s=Jy(e,t,n.length);return n===s;default:return!1}}function US(e,t=5){return typeof e=="string"?e.slice(0,t):ArrayBuffer.isView(e)?Jy(e.buffer,e.byteOffset,t):e instanceof ArrayBuffer?Jy(e,0,t):""}function Jy(e,t,r){if(e.byteLength<t+r)return"";let n=new DataView(e),s="";for(let i=0;i<r;i++)s+=String.fromCharCode(n.getUint8(t+i));return s}function*zS(e,t){let r=t?.chunkSize||262144,n=0,s=new TextEncoder;for(;n<e.length;){let i=Math.min(e.length-n,r),o=e.slice(n,n+i);n+=i,yield s.encode(o)}}function*VS(e,t={}){let{chunkSize:r=262144}=t,n=0;for(;n<e.byteLength;){let s=Math.min(e.byteLength-n,r),i=new ArrayBuffer(s),o=new Uint8Array(e,n,s);new Uint8Array(i).set(o),n+=s,yield i}}async function*WS(e,t){let r=t?.chunkSize||1048576,n=0;for(;n<e.size;){let s=n+r,i=await e.slice(n,s).arrayBuffer();n=s,yield i}}function Qy(e,t){return xs?LH(e,t):NH(e,t)}async function*LH(e,t){let r=e.getReader(),n;try{for(;;){let s=n||r.read();t?._streamReadAhead&&(n=r.read());let{done:i,value:o}=await s;if(i)return;yield Vp(o)}}catch{r.releaseLock()}}async function*NH(e,t){for await(let r of e)yield Vp(r)}function HS(e,t){if(typeof e=="string")return zS(e,t);if(e instanceof ArrayBuffer)return VS(e,t);if(Gr(e))return WS(e,t);if(Hp(e))return Qy(e,t);if(Hr(e))return Qy(e.body,t);throw new Error("makeIterator")}var GS="Cannot convert supplied data type";function BH(e,t,r){if(t.text&&typeof e=="string")return e;if(AS(e)&&(e=e.buffer),e instanceof ArrayBuffer){let n=e;return t.text&&!t.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)){if(t.text&&!t.binary)return new TextDecoder("utf8").decode(e);let n=e.buffer,s=e.byteLength||e.length;return(e.byteOffset!==0||s!==n.byteLength)&&(n=n.slice(e.byteOffset,e.byteOffset+s)),n}throw new Error(GS)}async function jS(e,t,r){let n=e instanceof ArrayBuffer||ArrayBuffer.isView(e);if(typeof e=="string"||n)return BH(e,t,r);if(Gr(e)&&(e=await jp(e)),Hr(e)){let s=e;return await SS(s),t.binary?await s.arrayBuffer():await s.text()}if(Hp(e)&&(e=HS(e,r)),_S(e)||yS(e))return Vy(e);throw new Error(GS)}function Xp(e,t){let r=Ky(),n=e||r;return typeof n.fetch=="function"?n.fetch:uo(n.fetch)?s=>oc(s,n.fetch):t?.fetch?t?.fetch:oc}function qS(e,t,r){if(r)return r;let n={fetch:Xp(t,e),...e};if(n.url){let s=ic(n.url);n.baseUrl=s,n.queryString=TS(n.url),n.filename=Rr.filename(s),n.baseUrl=Rr.dirname(s)}return Array.isArray(n.loaders)||(n.loaders=null),n}function $S(e,t){if(e&&!Array.isArray(e))return e;let r;if(e&&(r=Array.isArray(e)?e:[e]),t&&t.loaders){let n=Array.isArray(t.loaders)?t.loaders:[t.loaders];r=r?[...r,...n]:n}return r&&r.length?r:void 0}async function ii(e,t,r,n){t&&!Array.isArray(t)&&!Bf(t)&&(n=void 0,r=t,t=void 0),e=await e,r=r||{};let s=po(e),o=$S(t,n),a=await FS(e,o,r);return a?(r=IS(r,a,o,s),n=qS({url:s,_parse:ii,loaders:o},r,n||null),await FH(a,e,r,n)):null}async function FH(e,t,r,n){if(Ly(e),r=Ef(e.options,r),Hr(t)){let i=t,{ok:o,redirected:a,status:c,statusText:l,type:f,url:h}=i,u=Object.fromEntries(i.headers.entries());n.response={headers:u,ok:o,redirected:a,status:c,statusText:l,type:f,url:h}}t=await jS(t,e,r);let s=e;if(s.parseTextSync&&typeof t=="string")return s.parseTextSync(t,r,n);if(By(e,r))return await Fy(e,t,r,n,ii);if(s.parseText&&typeof t=="string")return await s.parseText(t,r,n);if(s.parse)return await s.parse(t,r,n);throw ze(!s.parseSync),new Error(`${e.id} loader - no parser found and worker is disabled`)}function XS(e){switch(e.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function _s(e){let t=1/0,r=1/0,n=1/0,s=-1/0,i=-1/0,o=-1/0,a=e.POSITION?e.POSITION.value:[],c=a&&a.length;for(let l=0;l<c;l+=3){let f=a[l],h=a[l+1],u=a[l+2];t=f<t?f:t,r=h<r?h:r,n=u<n?u:n,s=f>s?f:s,i=h>i?h:i,o=u>o?u:o}return[[t,r,n],[s,i,o]]}function t2(e,t,r){let n=XS(t.value),s=r||YS(t);return{name:e,type:{type:"fixed-size-list",listSize:t.size,children:[{name:"value",type:n}]},nullable:!1,metadata:s}}function YS(e){let t={};return"byteOffset"in e&&(t.byteOffset=e.byteOffset.toString(10)),"byteStride"in e&&(t.byteStride=e.byteStride.toString(10)),"normalized"in e&&(t.normalized=e.normalized.toString()),t}async function ve(e,t,r,n){let s,i;!Array.isArray(t)&&!Bf(t)?(s=[],i=t,n=void 0):(s=t,i=r);let o=Xp(i),a=e;return typeof e=="string"&&(a=await o(e)),Gr(e)&&(a=await o(e)),Array.isArray(s)?await ii(a,s,i):await ii(a,s,i)}var KS="4.2.1";var kH=globalThis.loaders?.parseImageNode,e2=typeof Image<"u",r2=typeof ImageBitmap<"u",DH=Boolean(kH),n2=xs?!0:DH;function ZS(e){switch(e){case"auto":return r2||e2||n2;case"imagebitmap":return r2;case"image":return e2;case"data":return n2;default:throw new Error(`@loaders.gl/images: image ${e} not supported in this environment`)}}function JS(){if(r2)return"imagebitmap";if(e2)return"image";if(n2)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function QS(e){let t=UH(e);if(!t)throw new Error("Not an image");return t}function Df(e){switch(QS(e)){case"data":return e;case"image":case"imagebitmap":let t=document.createElement("canvas"),r=t.getContext("2d");if(!r)throw new Error("getImageData");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0),r.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function UH(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&e instanceof Image?"image":e&&typeof e=="object"&&e.data&&e.width&&e.height?"data":null}var zH=/^data:image\/svg\+xml/,VH=/\.svg((\?|#).*)?$/;function Yp(e){return e&&(zH.test(e)||VH.test(e))}function tw(e,t){if(Yp(t)){let n=new TextDecoder().decode(e);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(i){throw new Error(i.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return s2(e,t)}function s2(e,t){if(Yp(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function Kp(e,t,r){let n=tw(e,r),s=self.URL||self.webkitURL,i=typeof n!="string"&&s.createObjectURL(n);try{return await WH(i||n,t)}finally{i&&s.revokeObjectURL(i)}}async function WH(e,t){let r=new Image;return r.src=e,t.image&&t.image.decode&&r.decode?(await r.decode(),r):await new Promise((n,s)=>{try{r.onload=()=>n(r),r.onerror=i=>{let o=i instanceof Error?i.message:"error";s(new Error(o))}}catch(i){s(i)}})}var HH={},ew=!0;async function rw(e,t,r){let n;Yp(r)?n=await Kp(e,t,r):n=s2(e,r);let s=t&&t.imagebitmap;return await GH(n,s)}async function GH(e,t=null){if((jH(t)||!ew)&&(t=null),t)try{return await createImageBitmap(e,t)}catch(r){console.warn(r),ew=!1}return await createImageBitmap(e)}function jH(e){for(let t in e||HH)return!1;return!0}function nw(e){return!YH(e,"ftyp",4)||!(e[8]&96)?null:qH(e)}function qH(e){switch($H(e,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function $H(e,t,r){return String.fromCharCode(...e.slice(t,r))}function XH(e){return[...e].map(t=>t.charCodeAt(0))}function YH(e,t,r=0){let n=XH(t);for(let s=0;s<n.length;++s)if(n[s]!==e[s+r])return!1;return!0}var Vn=!1,Uf=!0;function mo(e){let t=zf(e);return ZH(t)||tG(t)||JH(t)||QH(t)||KH(t)}function KH(e){let t=new Uint8Array(e instanceof DataView?e.buffer:e),r=nw(t);return r?{mimeType:r.mimeType,width:0,height:0}:null}function ZH(e){let t=zf(e);return t.byteLength>=24&&t.getUint32(0,Vn)===2303741511?{mimeType:"image/png",width:t.getUint32(16,Vn),height:t.getUint32(20,Vn)}:null}function JH(e){let t=zf(e);return t.byteLength>=10&&t.getUint32(0,Vn)===1195984440?{mimeType:"image/gif",width:t.getUint16(6,Uf),height:t.getUint16(8,Uf)}:null}function QH(e){let t=zf(e);return t.byteLength>=14&&t.getUint16(0,Vn)===16973&&t.getUint32(2,Uf)===t.byteLength?{mimeType:"image/bmp",width:t.getUint32(18,Uf),height:t.getUint32(22,Uf)}:null}function tG(e){let t=zf(e);if(!(t.byteLength>=3&&t.getUint16(0,Vn)===65496&&t.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:s}=eG(),i=2;for(;i+9<t.byteLength;){let o=t.getUint16(i,Vn);if(s.has(o))return{mimeType:"image/jpeg",height:t.getUint16(i+5,Vn),width:t.getUint16(i+7,Vn)};if(!n.has(o))return null;i+=2,i+=t.getUint16(i,Vn)}return null}function eG(){let e=new Set([65499,65476,65484,65501,65534]);for(let r=65504;r<65520;++r)e.add(r);return{tableMarkers:e,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function zf(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}async function sw(e,t){let{mimeType:r}=mo(e)||{},n=globalThis.loaders?.parseImageNode;return ut(n),await n(e,r)}async function iw(e,t,r){t=t||{};let s=(t.image||{}).type||"auto",{url:i}=r||{},o=rG(s),a;switch(o){case"imagebitmap":a=await rw(e,t,i);break;case"image":a=await Kp(e,t,i);break;case"data":a=await sw(e,t);break;default:ut(!1)}return s==="data"&&(a=Df(a)),a}function rG(e){switch(e){case"auto":case"data":return JS();default:return ZS(e),e}}var nG=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],sG=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],iG={image:{type:"auto",decode:!0}},Wn={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:KS,mimeTypes:sG,extensions:nG,parse:iw,tests:[e=>Boolean(mo(new DataView(e)))],options:iG};var i2={};function o2(e){if(i2[e]===void 0){let t=xs?aG(e):oG(e);i2[e]=t}return i2[e]}function oG(e){let t=["image/png","image/jpeg","image/gif"],r=globalThis.loaders?.imageFormatsNode||t,n=globalThis.loaders?.parseImageNode;return Boolean(n)&&r.includes(e)}function aG(e){switch(e){case"image/avif":case"image/webp":return cG(e);default:return!0}}function cG(e){try{return document.createElement("canvas").toDataURL(e).indexOf(`data:${e}`)===0}catch{return!1}}var lG=new _r({id:"deck"}),H=lG;var a2={};function Zp(e){a2=e}function se(e,t,r,n){H.level>0&&a2[e]&&a2[e].call(null,t,r,n)}function fG(e){let t=e[0],r=e[e.length-1];return t==="{"&&r==="}"||t==="["&&r==="]"}var ow={dataType:null,batchType:null,id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:fG,parseTextSync:JSON.parse};function hG(){let e="9.2.0-alpha.1",t=globalThis.deck&&globalThis.deck.VERSION;if(t&&t!==e)throw new Error(`deck.gl - multiple versions detected: ${t} vs ${e}`);return t||(H.log(1,`deck.gl ${e}`)(),globalThis.deck={...globalThis.deck,VERSION:e,version:e,log:H,_registerLoggers:Zp},kf([ow,[Wn,{imagebitmap:{premultiplyAlpha:"none"}}]])),e}var Jp=hG();function Qp(e,t){if(!e)throw new Error(t||"shadertools: assertion failed.")}var c2={number:{type:"number",validate(e,t){return Number.isFinite(e)&&typeof t=="object"&&(t.max===void 0||e<=t.max)&&(t.min===void 0||e>=t.min)}},array:{type:"array",validate(e,t){return Array.isArray(e)||ArrayBuffer.isView(e)}}};function cw(e){let t={};for(let[r,n]of Object.entries(e))t[r]=uG(n);return t}function uG(e){let t=aw(e);if(t!=="object")return{value:e,...c2[t],type:t};if(typeof e=="object")return e?e.type!==void 0?{...e,...c2[e.type],type:e.type}:e.value===void 0?{type:"object",value:e}:(t=aw(e.value),{...e,...c2[t],type:t}):{type:"object",value:null};throw new Error("props")}function aw(e){return Array.isArray(e)||ArrayBuffer.isView(e)?"array":typeof e}var lw=`#ifdef MODULE_LOGDEPTH
18
+ }`}function Iy(e,t=!0,r){let n=r||new Set;if(e){if(fS(e))n.add(e);else if(fS(e.buffer))n.add(e.buffer);else if(!ArrayBuffer.isView(e)){if(t&&typeof e=="object")for(let s in e)Iy(e[s],t,n)}}return r===void 0?Array.from(n):[]}function fS(e){return e?e instanceof ArrayBuffer||typeof MessagePort<"u"&&e instanceof MessagePort||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas:!1}var Ry=()=>{},ei=class{name;source;url;terminated=!1;worker;onMessage;onError;_loadableURL="";static isSupported(){return typeof Worker<"u"&&Oe||typeof sc<"u"&&!Oe}constructor(t){let{name:r,source:n,url:s}=t;ze(n||s),this.name=r,this.source=n,this.url=s,this.onMessage=Ry,this.onError=i=>console.log(i),this.worker=Oe?this._createBrowserWorker():this._createNodeWorker()}destroy(){this.onMessage=Ry,this.onError=Ry,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(t,r){r=r||Iy(t),this.worker.postMessage(t,r)}_getErrorFromErrorEvent(t){let r="Failed to load ";return r+=`worker ${this.name} from ${this.url}. `,t.message&&(r+=`${t.message} in `),t.lineno&&(r+=`:${t.lineno}:${t.colno}`),new Error(r)}_createBrowserWorker(){this._loadableURL=cS({source:this.source,url:this.url});let t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=r=>{r.data?this.onMessage(r.data):this.onError(new Error("No data received"))},t.onerror=r=>{this.onError(this._getErrorFromErrorEvent(r)),this.terminated=!0},t.onmessageerror=r=>console.error(r),t}_createNodeWorker(){let t;if(this.url){let n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;t=new sc(n,{eval:!1})}else if(this.source)t=new sc(this.source,{eval:!0});else throw new Error("no worker");return t.on("message",r=>{this.onMessage(r)}),t.on("error",r=>{this.onError(r)}),t.on("exit",r=>{}),t}};var Pf=class{name="unnamed";source;url;maxConcurrency=1;maxMobileConcurrency=1;onDebug=()=>{};reuseWorkers=!0;props={};jobQueue=[];idleQueue=[];count=0;isDestroyed=!1;static isSupported(){return ei.isSupported()}constructor(t){this.source=t.source,this.url=t.url,this.setProps(t)}destroy(){this.idleQueue.forEach(t=>t.destroy()),this.isDestroyed=!0}setProps(t){this.props={...this.props,...t},t.name!==void 0&&(this.name=t.name),t.maxConcurrency!==void 0&&(this.maxConcurrency=t.maxConcurrency),t.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=t.maxMobileConcurrency),t.reuseWorkers!==void 0&&(this.reuseWorkers=t.reuseWorkers),t.onDebug!==void 0&&(this.onDebug=t.onDebug)}async startJob(t,r=(s,i,o)=>s.done(o),n=(s,i)=>s.error(i)){let s=new Promise(i=>(this.jobQueue.push({name:t,onMessage:r,onError:n,onStart:i}),this));return this._startQueuedJob(),await s}async _startQueuedJob(){if(!this.jobQueue.length)return;let t=this._getAvailableWorker();if(!t)return;let r=this.jobQueue.shift();if(r){this.onDebug({message:"Starting job",name:r.name,workerThread:t,backlog:this.jobQueue.length});let n=new Cf(r.name,t);t.onMessage=s=>r.onMessage(n,s.type,s.payload),t.onError=s=>r.onError(n,s),r.onStart(n);try{await n.result}catch(s){console.error(`Worker exception: ${s}`)}finally{this.returnWorkerToQueue(t)}}}returnWorkerToQueue(t){!Oe||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;let t=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new ei({name:t,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return aS?this.maxMobileConcurrency:this.maxConcurrency}};var jW={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}},lo=class{props;workerPools=new Map;static isSupported(){return ei.isSupported()}static getWorkerFarm(t={}){return lo._workerFarm=lo._workerFarm||new lo({}),lo._workerFarm.setProps(t),lo._workerFarm}constructor(t){this.props={...jW},this.setProps(t),this.workerPools=new Map}destroy(){for(let t of this.workerPools.values())t.destroy();this.workerPools=new Map}setProps(t){this.props={...this.props,...t};for(let r of this.workerPools.values())r.setProps(this._getWorkerPoolProps())}getWorkerPool(t){let{name:r,source:n,url:s}=t,i=this.workerPools.get(r);return i||(i=new Pf({name:r,source:n,url:s}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(r,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}},ri=lo;Y(ri,"_workerFarm");function Oy(e,t={}){let r=t[e.id]||{},n=Oe?`${e.id}-worker.js`:`${e.id}-worker-node.js`,s=r.workerUrl;if(!s&&e.id==="compression"&&(s=t.workerUrl),t._workerType==="test"&&(Oe?s=`modules/${e.module}/dist/${n}`:s=`modules/${e.module}/src/workers/${e.id}-worker-node.ts`),!s){let i=e.version;i==="latest"&&(i=iS);let o=i?`@${i}`:"";s=`https://unpkg.com/@loaders.gl/${e.module}${o}/dist/${n}`}return ze(s),s}function Ly(e,t=Sf){ze(e,"no worker provided");let r=e.version;return!(!t||!r)}var Ny={};async function zn(e,t=null,r={},n=null){return t&&(e=hS(e,t,r,n)),Ny[e]=Ny[e]||qW(e),await Ny[e]}function hS(e,t,r={},n=null){if(!r.useLocalLibraries&&e.startsWith("http"))return e;n=n||e;let s=r.modules||{};return s[n]?s[n]:Oe?r.CDN?(ze(r.CDN.startsWith("http")),`${r.CDN}/${t}@${Sf}/dist/libs/${n}`):wf?`../src/libs/${n}`:`modules/${t}/src/libs/${n}`:`modules/${t}/dist/libs/${n}`}async function qW(e){if(e.endsWith("wasm"))return await XW(e);if(!Oe)try{let{requireFromFile:r}=globalThis.loaders||{};return await r?.(e)}catch(r){return console.error(r),null}if(wf)return importScripts(e);let t=await YW(e);return $W(t,e)}function $W(e,t){if(!Oe){let{requireFromString:n}=globalThis.loaders||{};return n?.(e,t)}if(wf)return eval.call(globalThis,e),null;let r=document.createElement("script");r.id=t;try{r.appendChild(document.createTextNode(e))}catch{r.text=e}return document.body.appendChild(r),null}async function XW(e){let{readFileAsArrayBuffer:t}=globalThis.loaders||{};return Oe||!t||e.startsWith("http")?await(await fetch(e)).arrayBuffer():await t(e)}async function YW(e){let{readFileAsText:t}=globalThis.loaders||{};return Oe||!t||e.startsWith("http")?await(await fetch(e)).text():await t(e)}function By(e,t){return!ri.isSupported()||!Oe&&!t?._nodeWorkers?!1:e.worker&&t?.worker}async function Fy(e,t,r,n,s){let i=e.id,o=Oy(e,r),c=ri.getWorkerFarm(r).getWorkerPool({name:i,url:o});r=JSON.parse(JSON.stringify(r)),n=JSON.parse(JSON.stringify(n||{}));let l=await c.startJob("process-on-worker",KW.bind(null,s));return l.postMessage("process",{input:t,options:r,context:n}),await(await l.result).result}async function KW(e,t,r,n){switch(r){case"done":t.done(n);break;case"error":t.error(new Error(n.error));break;case"process":let{id:s,input:i,options:o}=n;try{let a=await e(i,o);t.postMessage("done",{id:s,result:a})}catch(a){let c=a instanceof Error?a.message:"unknown error";t.postMessage("error",{id:s,error:c})}break;default:console.warn(`parse-with-worker unknown message ${r}`)}}function dS(e,t=5){return typeof e=="string"?e.slice(0,t):ArrayBuffer.isView(e)?uS(e.buffer,e.byteOffset,t):e instanceof ArrayBuffer?uS(e,0,t):""}function uS(e,t,r){if(e.byteLength<=t+r)return"";let n=new DataView(e),s="";for(let i=0;i<r;i++)s+=String.fromCharCode(n.getUint8(t+i));return s}function ky(e){try{return JSON.parse(e)}catch{throw new Error(`Failed to parse JSON from data starting with "${dS(e)}"`)}}function Dy(e,t,r){if(r=r||e.byteLength,e.byteLength<r||t.byteLength<r)return!1;let n=new Uint8Array(e),s=new Uint8Array(t);for(let i=0;i<n.length;++i)if(n[i]!==s[i])return!1;return!0}function Uy(...e){return pS(e)}function pS(e){let t=e.map(i=>i instanceof ArrayBuffer?new Uint8Array(i):i),r=t.reduce((i,o)=>i+o.byteLength,0),n=new Uint8Array(r),s=0;for(let i of t)n.set(i,s),s+=i.byteLength;return n.buffer}function If(...e){let t=e,r=t&&t.length>1&&t[0].constructor||null;if(!r)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');let n=t.reduce((o,a)=>o+a.length,0),s=new r(n),i=0;for(let o of t)s.set(o,i),i+=o.length;return s}function fo(e,t,r){let n=r!==void 0?new Uint8Array(e).subarray(t,t+r):new Uint8Array(e).subarray(t);return new Uint8Array(n).buffer}function ni(e,t){return ut(e>=0),ut(t>0),e+(t-1)&~(t-1)}function zy(e,t,r){let n;if(e instanceof ArrayBuffer)n=new Uint8Array(e);else{let s=e.byteOffset,i=e.byteLength;n=new Uint8Array(e.buffer||e.arrayBuffer,s,i)}return t.set(n,r),r+ni(n.byteLength,4)}async function Vy(e){let t=[];for await(let r of e)t.push(r);return Uy(...t)}function Rf(){let e;if(typeof window<"u"&&window.performance)e=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();e=t[0]*1e3+t[1]/1e6}else e=Date.now();return e}var ho=class{constructor(t,r){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=t,this.type=r,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Rf(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Rf()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}};var qe=class{constructor(t){this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t,r="count"){return this._getOrCreate({name:t,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let t of Object.values(this.stats))t.reset();return this}forEach(t){for(let r of Object.values(this.stats))t(r)}getTable(){let t={};return this.forEach(r=>{t[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(r=>this._getOrCreate(r))}_getOrCreate(t){let{name:r,type:n}=t,s=this.stats[r];return s||(t instanceof ho?s=t:s=new ho(r,n),this.stats[r]=s),s}};var ZW="Queued Requests",JW="Active Requests",QW="Cancelled Requests",tH="Queued Requests Ever",eH="Active Requests Ever",rH={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0},si=class{props;stats;activeRequestCount=0;requestQueue=[];requestMap=new Map;updateTimer=null;constructor(t={}){this.props={...rH,...t},this.stats=new qe({id:this.props.id}),this.stats.get(ZW),this.stats.get(JW),this.stats.get(QW),this.stats.get(tH),this.stats.get(eH)}scheduleRequest(t,r=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);let n={handle:t,priority:0,getPriority:r},s=new Promise(i=>(n.resolve=i,n));return this.requestQueue.push(n),this.requestMap.set(t,s),this._issueNewRequests(),s}_issueRequest(t){let{handle:r,resolve:n}=t,s=!1,i=()=>{s||(s=!0,this.requestMap.delete(r),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,n?n({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),this.props.debounceTime)}_issueNewRequestsAsync(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=null;let t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(t!==0){this._updateAllRequests();for(let r=0;r<t;++r){let n=this.requestQueue.shift();n&&this._issueRequest(n)}}}_updateAllRequests(){let t=this.requestQueue;for(let r=0;r<t.length;++r){let n=t[r];this._updateRequest(n)||(t.splice(r,1),this.requestMap.delete(n.handle),r--)}t.sort((r,n)=>r.priority-n.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),t.priority<0?(t.resolve(null),!1):!0}};var nH="",mS={};function Wy(e){for(let t in mS)if(e.startsWith(t)){let r=mS[t];e=e.replace(t,r)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${nH}${e}`),e}function gS(e){return e&&typeof e=="object"&&e.isBuffer}function Vp(e){if(gS(e))return e;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let t=e;return new TextEncoder().encode(t).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}var Rr={};$t(Rr,{dirname:()=>iH,filename:()=>sH,join:()=>oH,resolve:()=>aH});function xS(){if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let e=window.location?.pathname;return e?.slice(0,e.lastIndexOf("/")+1)||""}function sH(e){let t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(t+1):""}function iH(e){let t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(0,t):""}function oH(...e){let t="/";return e=e.map((r,n)=>(n&&(r=r.replace(new RegExp(`^${t}`),"")),n!==e.length-1&&(r=r.replace(new RegExp(`${t}$`),"")),r)),e.join(t)}function aH(...e){let t=[];for(let i=0;i<e.length;i++)t[i]=e[i];let r="",n=!1,s;for(let i=t.length-1;i>=-1&&!n;i--){let o;i>=0?o=t[i]:(s===void 0&&(s=xS()),o=s),o.length!==0&&(r=`${o}/${r}`,n=o.charCodeAt(0)===Of)}return r=cH(r,!n),n?`/${r}`:r.length>0?r:"."}var Of=47,Hy=46;function cH(e,t){let r="",n=-1,s=0,i,o=!1;for(let a=0;a<=e.length;++a){if(a<e.length)i=e.charCodeAt(a);else{if(i===Of)break;i=Of}if(i===Of){if(!(n===a-1||s===1))if(n!==a-1&&s===2){if(r.length<2||!o||r.charCodeAt(r.length-1)!==Hy||r.charCodeAt(r.length-2)!==Hy){if(r.length>2){let c=r.length-1,l=c;for(;l>=0&&r.charCodeAt(l)!==Of;--l);if(l!==c){r=l===-1?"":r.slice(0,l),n=a,s=0,o=!1;continue}}else if(r.length===2||r.length===1){r="",n=a,s=0,o=!1;continue}}t&&(r.length>0?r+="/..":r="..",o=!0)}else{let c=e.slice(n+1,a);r.length>0?r+=`/${c}`:r=c,o=!1}n=a,s=0}else i===Hy&&s!==-1?++s:s=-1}return r}var Wp=class{fetch;loadOptions;_needsRefresh=!0;props;constructor(t){this.props={...t},this.loadOptions={...t.loadOptions},this.fetch=lH(this.loadOptions)}setProps(t){this.props=Object.assign(this.props,t),this.setNeedsRefresh()}setNeedsRefresh(){this._needsRefresh=!0}getNeedsRefresh(t=!0){let r=this._needsRefresh;return t&&(this._needsRefresh=!1),r}};function lH(e){let t=e?.fetch;if(t&&typeof t=="function")return(n,s)=>t(n,s);let r=e?.fetch;return r&&typeof r!="function"?n=>fetch(n,r):n=>fetch(n)}var Wr=class extends Wp{};Y(Wr,"type","template"),Y(Wr,"testURL",t=>!1);var fH=e=>typeof e=="boolean",Lf=e=>typeof e=="function",uo=e=>e!==null&&typeof e=="object",Gy=e=>uo(e)&&e.constructor==={}.constructor;var _S=e=>Boolean(e)&&typeof e[Symbol.iterator]=="function",yS=e=>e&&typeof e[Symbol.asyncIterator]=="function";var Hr=e=>typeof Response<"u"&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json;var Gr=e=>typeof Blob<"u"&&e instanceof Blob,AS=e=>e&&typeof e=="object"&&e.isBuffer;var hH=e=>typeof ReadableStream<"u"&&e instanceof ReadableStream||uo(e)&&Lf(e.tee)&&Lf(e.cancel)&&Lf(e.getReader);var uH=e=>uo(e)&&Lf(e.read)&&Lf(e.pipe)&&fH(e.readable),Hp=e=>hH(e)||uH(e);var Gp=class extends Error{constructor(t,r){super(t),this.reason=r.reason,this.url=r.url,this.response=r.response}reason;url;response};var dH=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,pH=/^([-\w.]+\/[-\w.+]+)/;function jy(e,t){return e.toLowerCase()===t.toLowerCase()}function vS(e){let t=pH.exec(e);return t?t[1]:e}function qy(e){let t=dH.exec(e);return t?t[1]:""}var bS=/\?.*/;function TS(e){let t=e.match(bS);return t&&t[0]}function ic(e){return e.replace(bS,"")}function MS(e){if(e.length<50)return e;let t=e.slice(e.length-15);return`${e.substr(0,32)}...${t}`}function po(e){return Hr(e)?e.url:Gr(e)?e.name||"":typeof e=="string"?e:""}function Nf(e){if(Hr(e)){let t=e,r=t.headers.get("content-type")||"",n=ic(t.url);return vS(r)||qy(n)}return Gr(e)?e.type||"":typeof e=="string"?qy(e):""}function ES(e){return Hr(e)?e.headers["content-length"]||-1:Gr(e)?e.size:typeof e=="string"?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}async function jp(e){if(Hr(e))return e;let t={},r=ES(e);r>=0&&(t["content-length"]=String(r));let n=po(e),s=Nf(e);s&&(t["content-type"]=s);let i=await gH(e);i&&(t["x-first-bytes"]=i),typeof e=="string"&&(e=new TextEncoder().encode(e));let o=new Response(e,{headers:t});return Object.defineProperty(o,"url",{value:n}),o}async function SS(e){if(!e.ok)throw await mH(e)}async function mH(e){let t=MS(e.url),r=`Failed to fetch resource (${e.status}) ${e.statusText}: ${t}`;r=r.length>100?`${r.slice(0,100)}...`:r;let n={reason:e.statusText,url:e.url,response:e};try{let s=e.headers.get("Content-Type");n.reason=s?.includes("application/json")?await e.json():e.text()}catch{}return new Gp(r,n)}async function gH(e){if(typeof e=="string")return`data:,${e.slice(0,5)}`;if(e instanceof Blob){let r=e.slice(0,5);return await new Promise(n=>{let s=new FileReader;s.onload=i=>n(i?.target?.result),s.readAsDataURL(r)})}if(e instanceof ArrayBuffer){let r=e.slice(0,5);return`data:base64,${xH(r)}`}return null}function xH(e){let t="",r=new Uint8Array(e);for(let n=0;n<r.byteLength;n++)t+=String.fromCharCode(r[n]);return btoa(t)}function _H(e){return!yH(e)&&!AH(e)}function yH(e){return e.startsWith("http:")||e.startsWith("https:")}function AH(e){return e.startsWith("data:")}async function oc(e,t){if(typeof e=="string"){let r=Wy(e);return _H(r)&&globalThis.loaders?.fetchNode?globalThis.loaders?.fetchNode(r,t):await fetch(r,t)}return await jp(e)}var $y=new _r({id:"loaders.gl"}),qp=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},$p=class{console;constructor(){this.console=console}log(...t){return this.console.log.bind(this.console,...t)}info(...t){return this.console.info.bind(this.console,...t)}warn(...t){return this.console.warn.bind(this.console,...t)}error(...t){return this.console.error.bind(this.console,...t)}};var Xy={fetch:null,mimeType:void 0,nothrow:!1,log:new $p,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:xs,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},wS={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function Yy(){globalThis.loaders=globalThis.loaders||{};let{loaders:e}=globalThis;return e._state||(e._state={}),e._state}function Ky(){let e=Yy();return e.globalOptions=e.globalOptions||{...Xy},e.globalOptions}function IS(e,t,r,n){return r=r||[],r=Array.isArray(r)?r:[r],vH(e,r),TH(t,e,n)}function vH(e,t){CS(e,null,Xy,wS,t);for(let r of t){let n=e&&e[r.id]||{},s=r.options&&r.options[r.id]||{},i=r.deprecatedOptions&&r.deprecatedOptions[r.id]||{};CS(n,r.id,s,i,t)}}function CS(e,t,r,n,s){let i=t||"Top level",o=t?`${t}.`:"";for(let a in e){let c=!t&&uo(e[a]),l=a==="baseUri"&&!t,f=a==="workerUrl"&&t;if(!(a in r)&&!l&&!f){if(a in n)$y.warn(`${i} loader option '${o}${a}' no longer supported, use '${n[a]}'`)();else if(!c){let h=bH(a,s);$y.warn(`${i} loader option '${o}${a}' not recognized. ${h}`)()}}}}function bH(e,t){let r=e.toLowerCase(),n="";for(let s of t)for(let i in s.options){if(e===i)return`Did you mean '${s.id}.${i}'?`;let o=i.toLowerCase();(r.startsWith(o)||o.startsWith(r))&&(n=n||`Did you mean '${s.id}.${i}'?`)}return n}function TH(e,t,r){let s={...e.options||{}};return MH(s,r),s.log===null&&(s.log=new qp),PS(s,Ky()),PS(s,t),s}function PS(e,t){for(let r in t)if(r in t){let n=t[r];Gy(n)&&Gy(e[r])?e[r]={...e[r],...t[r]}:e[r]=t[r]}}function MH(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)}function Bf(e){return e?(Array.isArray(e)&&(e=e[0]),Array.isArray(e?.extensions)):!1}function Ff(e){ut(e,"null loader"),ut(Bf(e),"invalid loader");let t;return Array.isArray(e)&&(t=e[1],e=e[0],e={...e,options:{...e.options,...t}}),(e?.parseTextSync||e?.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}var RS=()=>{let e=Yy();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function kf(e){let t=RS();e=Array.isArray(e)?e:[e];for(let r of e){let n=Ff(r);t.find(s=>n===s)||t.unshift(n)}}function OS(){return RS()}var LS=new _r({id:"loaders.gl"});var EH=/\.([^.]+)$/;async function FS(e,t=[],r,n){if(!kS(e))return null;let s=NS(e,t,{...r,nothrow:!0},n);if(s)return s;if(Gr(e)&&(e=await e.slice(0,10).arrayBuffer(),s=NS(e,t,r,n)),!s&&!r?.nothrow)throw new Error(DS(e));return s}function NS(e,t=[],r,n){if(!kS(e))return null;if(t&&!Array.isArray(t))return Ff(t);let s=[];t&&(s=s.concat(t)),r?.ignoreRegisteredLoaders||s.push(...OS()),wH(s);let i=SH(e,s,r,n);if(!i&&!r?.nothrow)throw new Error(DS(e));return i}function SH(e,t,r,n){let s=po(e),i=Nf(e),o=ic(s)||n?.url,a=null,c="";return r?.mimeType&&(a=Zy(t,r?.mimeType),c=`match forced by supplied MIME type ${r?.mimeType}`),a=a||CH(t,o),c=c||(a?`matched url ${o}`:""),a=a||Zy(t,i),c=c||(a?`matched MIME type ${i}`:""),a=a||IH(t,e),c=c||(a?`matched initial data ${US(e)}`:""),r?.fallbackMimeType&&(a=a||Zy(t,r?.fallbackMimeType),c=c||(a?`matched fallback MIME type ${i}`:"")),c&&LS.log(1,`selectLoader selected ${a?.name}: ${c}.`),a}function kS(e){return!(e instanceof Response&&e.status===204)}function DS(e){let t=po(e),r=Nf(e),n="No valid loader found (";n+=t?`${Rr.filename(t)}, `:"no url provided, ",n+=`MIME type: ${r?`"${r}"`:"not provided"}, `;let s=e?US(e):"";return n+=s?` first bytes: "${s}"`:"first bytes: not available",n+=")",n}function wH(e){for(let t of e)Ff(t)}function CH(e,t){let r=t&&EH.exec(t),n=r&&r[1];return n?PH(e,n):null}function PH(e,t){t=t.toLowerCase();for(let r of e)for(let n of r.extensions)if(n.toLowerCase()===t)return r;return null}function Zy(e,t){for(let r of e)if(r.mimeTypes?.some(n=>jy(t,n))||jy(t,`application/x.${r.id}`))return r;return null}function IH(e,t){if(!t)return null;for(let r of e)if(typeof t=="string"){if(RH(t,r))return r}else if(ArrayBuffer.isView(t)){if(BS(t.buffer,t.byteOffset,r))return r}else if(t instanceof ArrayBuffer&&BS(t,0,r))return r;return null}function RH(e,t){return t.testText?t.testText(e):(Array.isArray(t.tests)?t.tests:[t.tests]).some(n=>e.startsWith(n))}function BS(e,t,r){return(Array.isArray(r.tests)?r.tests:[r.tests]).some(s=>OH(e,t,r,s))}function OH(e,t,r,n){if(n instanceof ArrayBuffer)return Dy(n,e,n.byteLength);switch(typeof n){case"function":return n(e);case"string":let s=Jy(e,t,n.length);return n===s;default:return!1}}function US(e,t=5){return typeof e=="string"?e.slice(0,t):ArrayBuffer.isView(e)?Jy(e.buffer,e.byteOffset,t):e instanceof ArrayBuffer?Jy(e,0,t):""}function Jy(e,t,r){if(e.byteLength<t+r)return"";let n=new DataView(e),s="";for(let i=0;i<r;i++)s+=String.fromCharCode(n.getUint8(t+i));return s}function*zS(e,t){let r=t?.chunkSize||262144,n=0,s=new TextEncoder;for(;n<e.length;){let i=Math.min(e.length-n,r),o=e.slice(n,n+i);n+=i,yield s.encode(o)}}function*VS(e,t={}){let{chunkSize:r=262144}=t,n=0;for(;n<e.byteLength;){let s=Math.min(e.byteLength-n,r),i=new ArrayBuffer(s),o=new Uint8Array(e,n,s);new Uint8Array(i).set(o),n+=s,yield i}}async function*WS(e,t){let r=t?.chunkSize||1048576,n=0;for(;n<e.size;){let s=n+r,i=await e.slice(n,s).arrayBuffer();n=s,yield i}}function Qy(e,t){return xs?LH(e,t):NH(e,t)}async function*LH(e,t){let r=e.getReader(),n;try{for(;;){let s=n||r.read();t?._streamReadAhead&&(n=r.read());let{done:i,value:o}=await s;if(i)return;yield Vp(o)}}catch{r.releaseLock()}}async function*NH(e,t){for await(let r of e)yield Vp(r)}function HS(e,t){if(typeof e=="string")return zS(e,t);if(e instanceof ArrayBuffer)return VS(e,t);if(Gr(e))return WS(e,t);if(Hp(e))return Qy(e,t);if(Hr(e))return Qy(e.body,t);throw new Error("makeIterator")}var GS="Cannot convert supplied data type";function BH(e,t,r){if(t.text&&typeof e=="string")return e;if(AS(e)&&(e=e.buffer),e instanceof ArrayBuffer){let n=e;return t.text&&!t.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)){if(t.text&&!t.binary)return new TextDecoder("utf8").decode(e);let n=e.buffer,s=e.byteLength||e.length;return(e.byteOffset!==0||s!==n.byteLength)&&(n=n.slice(e.byteOffset,e.byteOffset+s)),n}throw new Error(GS)}async function jS(e,t,r){let n=e instanceof ArrayBuffer||ArrayBuffer.isView(e);if(typeof e=="string"||n)return BH(e,t,r);if(Gr(e)&&(e=await jp(e)),Hr(e)){let s=e;return await SS(s),t.binary?await s.arrayBuffer():await s.text()}if(Hp(e)&&(e=HS(e,r)),_S(e)||yS(e))return Vy(e);throw new Error(GS)}function Xp(e,t){let r=Ky(),n=e||r;return typeof n.fetch=="function"?n.fetch:uo(n.fetch)?s=>oc(s,n.fetch):t?.fetch?t?.fetch:oc}function qS(e,t,r){if(r)return r;let n={fetch:Xp(t,e),...e};if(n.url){let s=ic(n.url);n.baseUrl=s,n.queryString=TS(n.url),n.filename=Rr.filename(s),n.baseUrl=Rr.dirname(s)}return Array.isArray(n.loaders)||(n.loaders=null),n}function $S(e,t){if(e&&!Array.isArray(e))return e;let r;if(e&&(r=Array.isArray(e)?e:[e]),t&&t.loaders){let n=Array.isArray(t.loaders)?t.loaders:[t.loaders];r=r?[...r,...n]:n}return r&&r.length?r:void 0}async function ii(e,t,r,n){t&&!Array.isArray(t)&&!Bf(t)&&(n=void 0,r=t,t=void 0),e=await e,r=r||{};let s=po(e),o=$S(t,n),a=await FS(e,o,r);return a?(r=IS(r,a,o,s),n=qS({url:s,_parse:ii,loaders:o},r,n||null),await FH(a,e,r,n)):null}async function FH(e,t,r,n){if(Ly(e),r=Ef(e.options,r),Hr(t)){let i=t,{ok:o,redirected:a,status:c,statusText:l,type:f,url:h}=i,u=Object.fromEntries(i.headers.entries());n.response={headers:u,ok:o,redirected:a,status:c,statusText:l,type:f,url:h}}t=await jS(t,e,r);let s=e;if(s.parseTextSync&&typeof t=="string")return s.parseTextSync(t,r,n);if(By(e,r))return await Fy(e,t,r,n,ii);if(s.parseText&&typeof t=="string")return await s.parseText(t,r,n);if(s.parse)return await s.parse(t,r,n);throw ze(!s.parseSync),new Error(`${e.id} loader - no parser found and worker is disabled`)}function XS(e){switch(e.constructor){case Int8Array:return"int8";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int16Array:return"int16";case Uint16Array:return"uint16";case Int32Array:return"int32";case Uint32Array:return"uint32";case Float32Array:return"float32";case Float64Array:return"float64";default:return"null"}}function _s(e){let t=1/0,r=1/0,n=1/0,s=-1/0,i=-1/0,o=-1/0,a=e.POSITION?e.POSITION.value:[],c=a&&a.length;for(let l=0;l<c;l+=3){let f=a[l],h=a[l+1],u=a[l+2];t=f<t?f:t,r=h<r?h:r,n=u<n?u:n,s=f>s?f:s,i=h>i?h:i,o=u>o?u:o}return[[t,r,n],[s,i,o]]}function t2(e,t,r){let n=XS(t.value),s=r||YS(t);return{name:e,type:{type:"fixed-size-list",listSize:t.size,children:[{name:"value",type:n}]},nullable:!1,metadata:s}}function YS(e){let t={};return"byteOffset"in e&&(t.byteOffset=e.byteOffset.toString(10)),"byteStride"in e&&(t.byteStride=e.byteStride.toString(10)),"normalized"in e&&(t.normalized=e.normalized.toString()),t}async function ve(e,t,r,n){let s,i;!Array.isArray(t)&&!Bf(t)?(s=[],i=t,n=void 0):(s=t,i=r);let o=Xp(i),a=e;return typeof e=="string"&&(a=await o(e)),Gr(e)&&(a=await o(e)),Array.isArray(s)?await ii(a,s,i):await ii(a,s,i)}var KS="4.2.1";var kH=globalThis.loaders?.parseImageNode,e2=typeof Image<"u",r2=typeof ImageBitmap<"u",DH=Boolean(kH),n2=xs?!0:DH;function ZS(e){switch(e){case"auto":return r2||e2||n2;case"imagebitmap":return r2;case"image":return e2;case"data":return n2;default:throw new Error(`@loaders.gl/images: image ${e} not supported in this environment`)}}function JS(){if(r2)return"imagebitmap";if(e2)return"image";if(n2)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function QS(e){let t=UH(e);if(!t)throw new Error("Not an image");return t}function Df(e){switch(QS(e)){case"data":return e;case"image":case"imagebitmap":let t=document.createElement("canvas"),r=t.getContext("2d");if(!r)throw new Error("getImageData");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0),r.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}function UH(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&e instanceof Image?"image":e&&typeof e=="object"&&e.data&&e.width&&e.height?"data":null}var zH=/^data:image\/svg\+xml/,VH=/\.svg((\?|#).*)?$/;function Yp(e){return e&&(zH.test(e)||VH.test(e))}function tw(e,t){if(Yp(t)){let n=new TextDecoder().decode(e);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(i){throw new Error(i.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return s2(e,t)}function s2(e,t){if(Yp(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}async function Kp(e,t,r){let n=tw(e,r),s=self.URL||self.webkitURL,i=typeof n!="string"&&s.createObjectURL(n);try{return await WH(i||n,t)}finally{i&&s.revokeObjectURL(i)}}async function WH(e,t){let r=new Image;return r.src=e,t.image&&t.image.decode&&r.decode?(await r.decode(),r):await new Promise((n,s)=>{try{r.onload=()=>n(r),r.onerror=i=>{let o=i instanceof Error?i.message:"error";s(new Error(o))}}catch(i){s(i)}})}var HH={},ew=!0;async function rw(e,t,r){let n;Yp(r)?n=await Kp(e,t,r):n=s2(e,r);let s=t&&t.imagebitmap;return await GH(n,s)}async function GH(e,t=null){if((jH(t)||!ew)&&(t=null),t)try{return await createImageBitmap(e,t)}catch(r){console.warn(r),ew=!1}return await createImageBitmap(e)}function jH(e){for(let t in e||HH)return!1;return!0}function nw(e){return!YH(e,"ftyp",4)||!(e[8]&96)?null:qH(e)}function qH(e){switch($H(e,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function $H(e,t,r){return String.fromCharCode(...e.slice(t,r))}function XH(e){return[...e].map(t=>t.charCodeAt(0))}function YH(e,t,r=0){let n=XH(t);for(let s=0;s<n.length;++s)if(n[s]!==e[s+r])return!1;return!0}var Vn=!1,Uf=!0;function mo(e){let t=zf(e);return ZH(t)||tG(t)||JH(t)||QH(t)||KH(t)}function KH(e){let t=new Uint8Array(e instanceof DataView?e.buffer:e),r=nw(t);return r?{mimeType:r.mimeType,width:0,height:0}:null}function ZH(e){let t=zf(e);return t.byteLength>=24&&t.getUint32(0,Vn)===2303741511?{mimeType:"image/png",width:t.getUint32(16,Vn),height:t.getUint32(20,Vn)}:null}function JH(e){let t=zf(e);return t.byteLength>=10&&t.getUint32(0,Vn)===1195984440?{mimeType:"image/gif",width:t.getUint16(6,Uf),height:t.getUint16(8,Uf)}:null}function QH(e){let t=zf(e);return t.byteLength>=14&&t.getUint16(0,Vn)===16973&&t.getUint32(2,Uf)===t.byteLength?{mimeType:"image/bmp",width:t.getUint32(18,Uf),height:t.getUint32(22,Uf)}:null}function tG(e){let t=zf(e);if(!(t.byteLength>=3&&t.getUint16(0,Vn)===65496&&t.getUint8(2)===255))return null;let{tableMarkers:n,sofMarkers:s}=eG(),i=2;for(;i+9<t.byteLength;){let o=t.getUint16(i,Vn);if(s.has(o))return{mimeType:"image/jpeg",height:t.getUint16(i+5,Vn),width:t.getUint16(i+7,Vn)};if(!n.has(o))return null;i+=2,i+=t.getUint16(i,Vn)}return null}function eG(){let e=new Set([65499,65476,65484,65501,65534]);for(let r=65504;r<65520;++r)e.add(r);return{tableMarkers:e,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function zf(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}async function sw(e,t){let{mimeType:r}=mo(e)||{},n=globalThis.loaders?.parseImageNode;return ut(n),await n(e,r)}async function iw(e,t,r){t=t||{};let s=(t.image||{}).type||"auto",{url:i}=r||{},o=rG(s),a;switch(o){case"imagebitmap":a=await rw(e,t,i);break;case"image":a=await Kp(e,t,i);break;case"data":a=await sw(e,t);break;default:ut(!1)}return s==="data"&&(a=Df(a)),a}function rG(e){switch(e){case"auto":case"data":return JS();default:return ZS(e),e}}var nG=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],sG=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],iG={image:{type:"auto",decode:!0}},Wn={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:KS,mimeTypes:sG,extensions:nG,parse:iw,tests:[e=>Boolean(mo(new DataView(e)))],options:iG};var i2={};function o2(e){if(i2[e]===void 0){let t=xs?aG(e):oG(e);i2[e]=t}return i2[e]}function oG(e){let t=["image/png","image/jpeg","image/gif"],r=globalThis.loaders?.imageFormatsNode||t,n=globalThis.loaders?.parseImageNode;return Boolean(n)&&r.includes(e)}function aG(e){switch(e){case"image/avif":case"image/webp":return cG(e);default:return!0}}function cG(e){try{return document.createElement("canvas").toDataURL(e).indexOf(`data:${e}`)===0}catch{return!1}}var lG=new _r({id:"deck"}),H=lG;var a2={};function Zp(e){a2=e}function se(e,t,r,n){H.level>0&&a2[e]&&a2[e].call(null,t,r,n)}function fG(e){let t=e[0],r=e[e.length-1];return t==="{"&&r==="}"||t==="["&&r==="]"}var ow={dataType:null,batchType:null,id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:fG,parseTextSync:JSON.parse};function hG(){let e="9.2.0-alpha.2",t=globalThis.deck&&globalThis.deck.VERSION;if(t&&t!==e)throw new Error(`deck.gl - multiple versions detected: ${t} vs ${e}`);return t||(H.log(1,`deck.gl ${e}`)(),globalThis.deck={...globalThis.deck,VERSION:e,version:e,log:H,_registerLoggers:Zp},kf([ow,[Wn,{imagebitmap:{premultiplyAlpha:"none"}}]])),e}var Jp=hG();function Qp(e,t){if(!e)throw new Error(t||"shadertools: assertion failed.")}var c2={number:{type:"number",validate(e,t){return Number.isFinite(e)&&typeof t=="object"&&(t.max===void 0||e<=t.max)&&(t.min===void 0||e>=t.min)}},array:{type:"array",validate(e,t){return Array.isArray(e)||ArrayBuffer.isView(e)}}};function cw(e){let t={};for(let[r,n]of Object.entries(e))t[r]=uG(n);return t}function uG(e){let t=aw(e);if(t!=="object")return{value:e,...c2[t],type:t};if(typeof e=="object")return e?e.type!==void 0?{...e,...c2[e.type],type:e.type}:e.value===void 0?{type:"object",value:e}:(t=aw(e.value),{...e,...c2[t],type:t}):{type:"object",value:null};throw new Error("props")}function aw(e){return Array.isArray(e)||ArrayBuffer.isView(e)?"array":typeof e}var lw=`#ifdef MODULE_LOGDEPTH
19
19
  logdepth_adjustPosition(gl_Position);
20
20
  #endif
21
21
  `,fw=`#ifdef MODULE_MATERIAL
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A suite of 3D-enabled data visualization overlays, suitable for react-map-gl",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "9.2.0-alpha.1",
6
+ "version": "9.2.0-alpha.2",
7
7
  "keywords": [
8
8
  "webgl",
9
9
  "visualization",
@@ -39,19 +39,19 @@
39
39
  "prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
40
40
  },
41
41
  "dependencies": {
42
- "@deck.gl/aggregation-layers": "9.2.0-alpha.1",
43
- "@deck.gl/arcgis": "9.2.0-alpha.1",
44
- "@deck.gl/carto": "9.2.0-alpha.1",
45
- "@deck.gl/core": "9.2.0-alpha.1",
46
- "@deck.gl/extensions": "9.2.0-alpha.1",
47
- "@deck.gl/geo-layers": "9.2.0-alpha.1",
48
- "@deck.gl/google-maps": "9.2.0-alpha.1",
49
- "@deck.gl/json": "9.2.0-alpha.1",
50
- "@deck.gl/layers": "9.2.0-alpha.1",
51
- "@deck.gl/mapbox": "9.2.0-alpha.1",
52
- "@deck.gl/mesh-layers": "9.2.0-alpha.1",
53
- "@deck.gl/react": "9.2.0-alpha.1",
54
- "@deck.gl/widgets": "9.2.0-alpha.1",
42
+ "@deck.gl/aggregation-layers": "9.2.0-alpha.2",
43
+ "@deck.gl/arcgis": "9.2.0-alpha.2",
44
+ "@deck.gl/carto": "9.2.0-alpha.2",
45
+ "@deck.gl/core": "9.2.0-alpha.2",
46
+ "@deck.gl/extensions": "9.2.0-alpha.2",
47
+ "@deck.gl/geo-layers": "9.2.0-alpha.2",
48
+ "@deck.gl/google-maps": "9.2.0-alpha.2",
49
+ "@deck.gl/json": "9.2.0-alpha.2",
50
+ "@deck.gl/layers": "9.2.0-alpha.2",
51
+ "@deck.gl/mapbox": "9.2.0-alpha.2",
52
+ "@deck.gl/mesh-layers": "9.2.0-alpha.2",
53
+ "@deck.gl/react": "9.2.0-alpha.2",
54
+ "@deck.gl/widgets": "9.2.0-alpha.2",
55
55
  "@loaders.gl/core": "^4.2.0",
56
56
  "@luma.gl/core": "^9.1.9",
57
57
  "@luma.gl/engine": "^9.1.9"
@@ -72,5 +72,5 @@
72
72
  "optional": true
73
73
  }
74
74
  },
75
- "gitHead": "630b2d2cb555c01bd73f258442755794aa5e5acc"
75
+ "gitHead": "f9ca91bb15011ff5552ca8966b4207ada03a08fc"
76
76
  }