@luma.gl/core 9.0.0-alpha.24 → 9.0.0-alpha.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.dev.js CHANGED
@@ -73,52 +73,6 @@ var __exports__ = (() => {
73
73
  var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
74
74
  var isBrowser2 = isBrowser();
75
75
 
76
- // ../../node_modules/@babel/runtime/helpers/esm/typeof.js
77
- function _typeof(obj) {
78
- "@babel/helpers - typeof";
79
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
80
- return typeof obj2;
81
- } : function(obj2) {
82
- return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
83
- }, _typeof(obj);
84
- }
85
-
86
- // ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
87
- function _toPrimitive(input, hint) {
88
- if (_typeof(input) !== "object" || input === null)
89
- return input;
90
- var prim = input[Symbol.toPrimitive];
91
- if (prim !== void 0) {
92
- var res = prim.call(input, hint || "default");
93
- if (_typeof(res) !== "object")
94
- return res;
95
- throw new TypeError("@@toPrimitive must return a primitive value.");
96
- }
97
- return (hint === "string" ? String : Number)(input);
98
- }
99
-
100
- // ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
101
- function _toPropertyKey(arg) {
102
- var key = _toPrimitive(arg, "string");
103
- return _typeof(key) === "symbol" ? key : String(key);
104
- }
105
-
106
- // ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
107
- function _defineProperty(obj, key, value) {
108
- key = _toPropertyKey(key);
109
- if (key in obj) {
110
- Object.defineProperty(obj, key, {
111
- value,
112
- enumerable: true,
113
- configurable: true,
114
- writable: true
115
- });
116
- } else {
117
- obj[key] = value;
118
- }
119
- return obj;
120
- }
121
-
122
76
  // ../../node_modules/@probe.gl/log/dist/utils/local-storage.js
123
77
  function getStorage(type) {
124
78
  try {
@@ -134,9 +88,9 @@ var __exports__ = (() => {
134
88
  var LocalStorage = class {
135
89
  constructor(id, defaultConfig) {
136
90
  let type = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "sessionStorage";
137
- _defineProperty(this, "storage", void 0);
138
- _defineProperty(this, "id", void 0);
139
- _defineProperty(this, "config", void 0);
91
+ this.storage = void 0;
92
+ this.id = void 0;
93
+ this.config = void 0;
140
94
  this.storage = getStorage(type);
141
95
  this.id = id;
142
96
  this.config = defaultConfig;
@@ -300,13 +254,13 @@ var __exports__ = (() => {
300
254
  } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
301
255
  id: ""
302
256
  };
303
- _defineProperty(this, "id", void 0);
304
- _defineProperty(this, "VERSION", VERSION);
305
- _defineProperty(this, "_startTs", getHiResTimestamp());
306
- _defineProperty(this, "_deltaTs", getHiResTimestamp());
307
- _defineProperty(this, "_storage", void 0);
308
- _defineProperty(this, "userData", {});
309
- _defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
257
+ this.id = void 0;
258
+ this.VERSION = VERSION;
259
+ this._startTs = getHiResTimestamp();
260
+ this._deltaTs = getHiResTimestamp();
261
+ this._storage = void 0;
262
+ this.userData = {};
263
+ this.LOG_THROTTLE_TIMEOUT = 0;
310
264
  this.id = id;
311
265
  this.userData = {};
312
266
  this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_LOG_CONFIGURATION);
@@ -504,7 +458,7 @@ var __exports__ = (() => {
504
458
  return noop;
505
459
  }
506
460
  };
507
- _defineProperty(Log, "VERSION", VERSION);
461
+ Log.VERSION = VERSION;
508
462
  function normalizeLogLevel(logLevel) {
509
463
  if (!logLevel) {
510
464
  return 0;
@@ -635,20 +589,20 @@ var __exports__ = (() => {
635
589
  // ../../node_modules/@probe.gl/stats/dist/lib/stat.js
636
590
  var Stat = class {
637
591
  constructor(name, type) {
638
- _defineProperty(this, "name", void 0);
639
- _defineProperty(this, "type", void 0);
640
- _defineProperty(this, "sampleSize", 1);
641
- _defineProperty(this, "time", 0);
642
- _defineProperty(this, "count", 0);
643
- _defineProperty(this, "samples", 0);
644
- _defineProperty(this, "lastTiming", 0);
645
- _defineProperty(this, "lastSampleTime", 0);
646
- _defineProperty(this, "lastSampleCount", 0);
647
- _defineProperty(this, "_count", 0);
648
- _defineProperty(this, "_time", 0);
649
- _defineProperty(this, "_samples", 0);
650
- _defineProperty(this, "_startTime", 0);
651
- _defineProperty(this, "_timerPending", false);
592
+ this.name = void 0;
593
+ this.type = void 0;
594
+ this.sampleSize = 1;
595
+ this.time = 0;
596
+ this.count = 0;
597
+ this.samples = 0;
598
+ this.lastTiming = 0;
599
+ this.lastSampleTime = 0;
600
+ this.lastSampleCount = 0;
601
+ this._count = 0;
602
+ this._time = 0;
603
+ this._samples = 0;
604
+ this._startTime = 0;
605
+ this._timerPending = false;
652
606
  this.name = name;
653
607
  this.type = type;
654
608
  this.reset();
@@ -747,8 +701,8 @@ var __exports__ = (() => {
747
701
  // ../../node_modules/@probe.gl/stats/dist/lib/stats.js
748
702
  var Stats = class {
749
703
  constructor(options) {
750
- _defineProperty(this, "id", void 0);
751
- _defineProperty(this, "stats", {});
704
+ this.id = void 0;
705
+ this.stats = {};
752
706
  this.id = options.id;
753
707
  this.stats = {};
754
708
  this._initializeStats(options.stats);
@@ -1180,9 +1134,9 @@ var __exports__ = (() => {
1180
1134
  };
1181
1135
  if ((props.usage || 0) & Buffer2.INDEX && !props.indexType) {
1182
1136
  if (props.data instanceof Uint32Array) {
1183
- props.indexType = "uint32";
1137
+ newProps.indexType = "uint32";
1184
1138
  } else if (props.data instanceof Uint16Array) {
1185
- props.indexType = "uint16";
1139
+ newProps.indexType = "uint16";
1186
1140
  }
1187
1141
  }
1188
1142
  return newProps;
package/dist.min.js CHANGED
@@ -4,10 +4,10 @@
4
4
  else if (typeof define === 'function' && define.amd) define([], factory);
5
5
  else if (typeof exports === 'object') exports['luma'] = factory();
6
6
  else root['luma'] = factory();})(globalThis, function () {
7
- var __exports__=(()=>{var gt=Object.create;var oe=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var vt=Object.getOwnPropertyNames;var bt=Object.getPrototypeOf,_t=Object.prototype.hasOwnProperty;var ve=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),wt=(r,t)=>{for(var e in t)oe(r,e,{get:t[e],enumerable:!0})},He=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vt(t))!_t.call(r,o)&&o!==e&&oe(r,o,{get:()=>t[o],enumerable:!(n=yt(t,o))||n.enumerable});return r};var St=(r,t,e)=>(e=r!=null?gt(bt(r)):{},He(t||!r||!r.__esModule?oe(e,"default",{value:r,enumerable:!0}):e,r)),Tt=r=>He(oe({},"__esModule",{value:!0}),r);var et=ve((mn,I)=>{function Se(r){return I.exports=Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I.exports.__esModule=!0,I.exports.default=I.exports,Se(r)}I.exports=Se,I.exports.__esModule=!0,I.exports.default=I.exports});var rt=ve((pn,k)=>{var Lt=et().default;function tt(){"use strict";k.exports=tt=function(){return r},k.exports.__esModule=!0,k.exports.default=k.exports;var r={},t=Object.prototype,e=t.hasOwnProperty,n=Object.defineProperty||function(f,i,s){f[i]=s.value},o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function c(f,i,s){return Object.defineProperty(f,i,{value:s,enumerable:!0,configurable:!0,writable:!0}),f[i]}try{c({},"")}catch{c=function(s,m,h){return s[m]=h}}function g(f,i,s,m){var h=i&&i.prototype instanceof R?i:R,p=Object.create(h.prototype),y=new ge(m||[]);return n(p,"_invoke",{value:ht(f,s,y)}),p}function P(f,i,s){try{return{type:"normal",arg:f.call(i,s)}}catch(m){return{type:"throw",arg:m}}}r.wrap=g;var v={};function R(){}function j(){}function N(){}var pe={};c(pe,a,function(){return this});var he=Object.getPrototypeOf,re=he&&he(he(ye([])));re&&re!==t&&e.call(re,a)&&(pe=re);var U=N.prototype=R.prototype=Object.create(pe);function Ge(f){["next","throw","return"].forEach(function(i){c(f,i,function(s){return this._invoke(i,s)})})}function ne(f,i){function s(h,p,y,b){var _=P(f[h],f,p);if(_.type!=="throw"){var L=_.arg,C=L.value;return C&&Lt(C)=="object"&&e.call(C,"__await")?i.resolve(C.__await).then(function(B){s("next",B,y,b)},function(B){s("throw",B,y,b)}):i.resolve(C).then(function(B){L.value=B,y(L)},function(B){return s("throw",B,y,b)})}b(_.arg)}var m;n(this,"_invoke",{value:function(p,y){function b(){return new i(function(_,L){s(p,y,_,L)})}return m=m?m.then(b,b):b()}})}function ht(f,i,s){var m="suspendedStart";return function(h,p){if(m==="executing")throw new Error("Generator is already running");if(m==="completed"){if(h==="throw")throw p;return Fe()}for(s.method=h,s.arg=p;;){var y=s.delegate;if(y){var b=Me(y,s);if(b){if(b===v)continue;return b}}if(s.method==="next")s.sent=s._sent=s.arg;else if(s.method==="throw"){if(m==="suspendedStart")throw m="completed",s.arg;s.dispatchException(s.arg)}else s.method==="return"&&s.abrupt("return",s.arg);m="executing";var _=P(f,i,s);if(_.type==="normal"){if(m=s.done?"completed":"suspendedYield",_.arg===v)continue;return{value:_.arg,done:s.done}}_.type==="throw"&&(m="completed",s.method="throw",s.arg=_.arg)}}}function Me(f,i){var s=i.method,m=f.iterator[s];if(m===void 0)return i.delegate=null,s==="throw"&&f.iterator.return&&(i.method="return",i.arg=void 0,Me(f,i),i.method==="throw")||s!=="return"&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+s+"' method")),v;var h=P(m,f.iterator,i.arg);if(h.type==="throw")return i.method="throw",i.arg=h.arg,i.delegate=null,v;var p=h.arg;return p?p.done?(i[f.resultName]=p.value,i.next=f.nextLoc,i.method!=="return"&&(i.method="next",i.arg=void 0),i.delegate=null,v):p:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,v)}function dt(f){var i={tryLoc:f[0]};1 in f&&(i.catchLoc=f[1]),2 in f&&(i.finallyLoc=f[2],i.afterLoc=f[3]),this.tryEntries.push(i)}function de(f){var i=f.completion||{};i.type="normal",delete i.arg,f.completion=i}function ge(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(dt,this),this.reset(!0)}function ye(f){if(f){var i=f[a];if(i)return i.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var s=-1,m=function h(){for(;++s<f.length;)if(e.call(f,s))return h.value=f[s],h.done=!1,h;return h.value=void 0,h.done=!0,h};return m.next=m}}return{next:Fe}}function Fe(){return{value:void 0,done:!0}}return j.prototype=N,n(U,"constructor",{value:N,configurable:!0}),n(N,"constructor",{value:j,configurable:!0}),j.displayName=c(N,d,"GeneratorFunction"),r.isGeneratorFunction=function(f){var i=typeof f=="function"&&f.constructor;return!!i&&(i===j||(i.displayName||i.name)==="GeneratorFunction")},r.mark=function(f){return Object.setPrototypeOf?Object.setPrototypeOf(f,N):(f.__proto__=N,c(f,d,"GeneratorFunction")),f.prototype=Object.create(U),f},r.awrap=function(f){return{__await:f}},Ge(ne.prototype),c(ne.prototype,l,function(){return this}),r.AsyncIterator=ne,r.async=function(f,i,s,m,h){h===void 0&&(h=Promise);var p=new ne(g(f,i,s,m),h);return r.isGeneratorFunction(i)?p:p.next().then(function(y){return y.done?y.value:p.next()})},Ge(U),c(U,d,"Generator"),c(U,a,function(){return this}),c(U,"toString",function(){return"[object Generator]"}),r.keys=function(f){var i=Object(f),s=[];for(var m in i)s.push(m);return s.reverse(),function h(){for(;s.length;){var p=s.pop();if(p in i)return h.value=p,h.done=!1,h}return h.done=!0,h}},r.values=ye,ge.prototype={constructor:ge,reset:function(i){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(de),!i)for(var s in this)s.charAt(0)==="t"&&e.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=void 0)},stop:function(){this.done=!0;var i=this.tryEntries[0].completion;if(i.type==="throw")throw i.arg;return this.rval},dispatchException:function(i){if(this.done)throw i;var s=this;function m(L,C){return y.type="throw",y.arg=i,s.next=L,C&&(s.method="next",s.arg=void 0),!!C}for(var h=this.tryEntries.length-1;h>=0;--h){var p=this.tryEntries[h],y=p.completion;if(p.tryLoc==="root")return m("end");if(p.tryLoc<=this.prev){var b=e.call(p,"catchLoc"),_=e.call(p,"finallyLoc");if(b&&_){if(this.prev<p.catchLoc)return m(p.catchLoc,!0);if(this.prev<p.finallyLoc)return m(p.finallyLoc)}else if(b){if(this.prev<p.catchLoc)return m(p.catchLoc,!0)}else{if(!_)throw new Error("try statement without catch or finally");if(this.prev<p.finallyLoc)return m(p.finallyLoc)}}}},abrupt:function(i,s){for(var m=this.tryEntries.length-1;m>=0;--m){var h=this.tryEntries[m];if(h.tryLoc<=this.prev&&e.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var p=h;break}}p&&(i==="break"||i==="continue")&&p.tryLoc<=s&&s<=p.finallyLoc&&(p=null);var y=p?p.completion:{};return y.type=i,y.arg=s,p?(this.method="next",this.next=p.finallyLoc,v):this.complete(y)},complete:function(i,s){if(i.type==="throw")throw i.arg;return i.type==="break"||i.type==="continue"?this.next=i.arg:i.type==="return"?(this.rval=this.arg=i.arg,this.method="return",this.next="end"):i.type==="normal"&&s&&(this.next=s),v},finish:function(i){for(var s=this.tryEntries.length-1;s>=0;--s){var m=this.tryEntries[s];if(m.finallyLoc===i)return this.complete(m.completion,m.afterLoc),de(m),v}},catch:function(i){for(var s=this.tryEntries.length-1;s>=0;--s){var m=this.tryEntries[s];if(m.tryLoc===i){var h=m.completion;if(h.type==="throw"){var p=h.arg;de(m)}return p}}throw new Error("illegal catch attempt")},delegateYield:function(i,s,m){return this.delegate={iterator:ye(i),resultName:s,nextLoc:m},this.method==="next"&&(this.arg=void 0),v}},r}k.exports=tt,k.exports.__esModule=!0,k.exports.default=k.exports});var ot=ve((hn,nt)=>{var ce=rt()();nt.exports=ce;try{regeneratorRuntime=ce}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=ce:Function("r","regeneratorRuntime = r")(ce)}});var Kt={};wt(Kt,{Device:()=>le,Timeline:()=>Be,assert:()=>te,log:()=>A,luma:()=>ee,uid:()=>H});function be(r){if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let t=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,e=r||t;return!!(e&&e.indexOf("Electron")>=0)}function w(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||be()}var xt=globalThis.self||globalThis.window||globalThis.global,V=globalThis.window||globalThis.self||globalThis.global,Et=globalThis.document||{},G=globalThis.process||{},Pt=globalThis.console,Zt=globalThis.navigator||{};var ie=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",tr=w();function O(r){return O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},O(r)}function _e(r,t){if(O(r)!=="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(O(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function J(r){var t=_e(r,"string");return O(t)==="symbol"?t:String(t)}function u(r,t,e){return t=J(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Ot(r){try{let t=window[r],e="__storage_test__";return t.setItem(e,e),t.removeItem(e),t}catch{return null}}var ae=class{constructor(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";u(this,"storage",void 0),u(this,"id",void 0),u(this,"config",void 0),this.storage=Ot(n),this.id=t,this.config=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){let e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}}_loadConfiguration(){let t={};if(this.storage){let e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}};function Ue(r){let t;return r<10?t="".concat(r.toFixed(2),"ms"):r<100?t="".concat(r.toFixed(1),"ms"):r<1e3?t="".concat(r.toFixed(0),"ms"):t="".concat((r/1e3).toFixed(2),"s"),t}function Ve(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,e=Math.max(t-r.length,0);return"".concat(" ".repeat(e)).concat(r)}function se(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,o=r.src.replace(/\(/g,"%28").replace(/\)/g,"%29");r.width>n&&(e=Math.min(e,n/r.width));let a=r.width*e,l=r.height*e,d=["font-size:1px;","padding:".concat(Math.floor(l/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(l,"px;"),"background:url(".concat(o,");"),"background-size:".concat(a,"px ").concat(l,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),d]}var ue;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(ue||(ue={}));var At=10;function ze(r){return typeof r!="string"?r:(r=r.toUpperCase(),ue[r]||ue.WHITE)}function Ye(r,t,e){if(!w&&typeof r=="string"){if(t){let n=ze(t);r="\x1B[".concat(n,"m").concat(r,"\x1B[39m")}if(e){let n=ze(e);r="\x1B[".concat(n+At,"m").concat(r,"\x1B[49m")}}return r}function We(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],e=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(e),o=r;for(let a of n){let l=o[a];typeof l=="function"&&(t.find(d=>a===d)||(o[a]=l.bind(r)))}}function z(r,t){if(!r)throw new Error(t||"Assertion failed")}function M(){let r;if(w()&&V.performance){var t,e;r=V===null||V===void 0||(t=V.performance)===null||t===void 0||(e=t.now)===null||e===void 0?void 0:e.call(t)}else if("hrtime"in G){var n;let o=G===null||G===void 0||(n=G.hrtime)===null||n===void 0?void 0:n.call(G);r=o[0]*1e3+o[1]/1e6}else r=Date.now();return r}var Y={debug:w()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},It={enabled:!0,level:0};function x(){}var Ke={},Xe={once:!0},D=class{constructor(){let{id:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};u(this,"id",void 0),u(this,"VERSION",ie),u(this,"_startTs",M()),u(this,"_deltaTs",M()),u(this,"_storage",void 0),u(this,"userData",{}),u(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new ae("__probe-".concat(this.id,"__"),It),this.timeStamp("".concat(this.id," started")),We(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((M()-this._startTs).toPrecision(10))}getDelta(){return Number((M()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){z(t,e)}warn(t){return this._getLogFunction(0,t,Y.warn,arguments,Xe)}error(t){return this._getLogFunction(0,t,Y.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,Y.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,Y.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,Y.debug||Y.info,arguments,Xe)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||x,n&&[n],{tag:Ct(e)}):x}image(t){let{logLevel:e,priority:n,image:o,message:a="",scale:l=1}=t;return this._shouldLog(e||n)?w()?jt({image:o,message:a,scale:l}):Rt({image:o,message:a,scale:l}):x}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||x)}group(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},o=qe({logLevel:t,message:e,opts:n}),{collapsed:a}=n;return o.method=(a?console.groupCollapsed:console.group)||console.info,this._getLogFunction(o)}groupCollapsed(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||x)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=Je(t)}_getLogFunction(t,e,n,o,a){if(this._shouldLog(t)){a=qe({logLevel:t,message:e,args:o,opts:a}),n=n||a.method,z(n),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=M();let l=a.tag||a.message;if(a.once&&l)if(!Ke[l])Ke[l]=M();else return x;return e=kt(this.id,a.message,a),n.bind(console,e,...a.args)}return x}};u(D,"VERSION",ie);function Je(r){if(!r)return 0;let t;switch(typeof r){case"number":t=r;break;case"object":t=r.logLevel||r.priority||0;break;default:return 0}return z(Number.isFinite(t)&&t>=0),t}function qe(r){let{logLevel:t,message:e}=r;r.logLevel=Je(t);let n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==e;);switch(typeof t){case"string":case"function":e!==void 0&&n.unshift(e),r.message=t;break;case"object":Object.assign(r,t);break;default:}typeof r.message=="function"&&(r.message=r.message());let o=typeof r.message;return z(o==="string"||o==="object"),Object.assign(r,{args:n},r.opts)}function kt(r,t,e){if(typeof t=="string"){let n=e.time?Ve(Ue(e.total)):"";t=e.time?"".concat(r,": ").concat(n," ").concat(t):"".concat(r,": ").concat(t),t=Ye(t,e.color,e.background)}return t}function Rt(r){let{image:t,message:e="",scale:n=1}=r;return console.warn("removed"),x}function jt(r){let{image:t,message:e="",scale:n=1}=r;if(typeof t=="string"){let a=new Image;return a.onload=()=>{let l=se(a,e,n);console.log(...l)},a.src=t,x}let o=t.nodeName||"";if(o.toLowerCase()==="img")return console.log(...se(t,e,n)),x;if(o.toLowerCase()==="canvas"){let a=new Image;return a.onload=()=>console.log(...se(a,e,n)),a.src=t.toDataURL(),x}return x}function Ct(r){for(let t in r)for(let e in r[t])return e||"untitled";return"empty"}var Lr=new D({id:"@probe.gl/log"});var A=new D({id:"luma.gl"});function S(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function Qe(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,J(n.key),n)}}function T(r,t,e){return t&&Qe(r.prototype,t),e&&Qe(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Q(){let r;if(typeof window<"u"&&window.performance)r=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();r=t[0]*1e3+t[1]/1e6}else r=Date.now();return r}var F=class{constructor(t,e){u(this,"name",void 0),u(this,"type",void 0),u(this,"sampleSize",1),u(this,"time",0),u(this,"count",0),u(this,"samples",0),u(this,"lastTiming",0),u(this,"lastSampleTime",0),u(this,"lastSampleCount",0),u(this,"_count",0),u(this,"_time",0),u(this,"_samples",0),u(this,"_startTime",0),u(this,"_timerPending",!1),this.name=t,this.type=e,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=Q(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Q()-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 W=class{constructor(t){u(this,"id",void 0),u(this,"stats",{}),this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}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 e of Object.values(this.stats))t(e)}getTable(){let t={};return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(e=>this._getOrCreate(e))}_getOrCreate(t){let{name:e,type:n}=t,o=this.stats[e];return o||(t instanceof F?o=t:o=new F(e,n),this.stats[e]=o),o}};var Dt=function(){function r(){S(this,r),u(this,"stats",new Map)}return T(r,[{key:"getStats",value:function(e){return this.get(e)}},{key:"get",value:function(e){return this.stats.has(e)||this.stats.set(e,new W({id:e})),this.stats.get(e)}}]),r}(),K=new Dt;function Nt(){var r=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",t="set luma.log.level=1 (or higher) to trace rendering";if(globalThis.luma&&globalThis.luma.VERSION!==r)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(r));return globalThis.luma||(w()&&A.log(1,"luma.gl ".concat(r," - ").concat(t))(),globalThis.luma=globalThis.luma||{VERSION:r,version:r,log:A,stats:K}),r}var Ze=Nt();function $e(r,t,e,n,o,a,l){try{var d=r[a](l),c=d.value}catch(g){e(g);return}d.done?t(c):Promise.resolve(c).then(n,o)}function we(r){return function(){var t=this,e=arguments;return new Promise(function(n,o){var a=r.apply(t,e);function l(c){$e(a,n,o,l,d,"next",c)}function d(c){$e(a,n,o,l,d,"throw",c)}l(void 0)})}}var ke=St(ot(),1);var Te={};function H(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"id";Te[r]=Te[r]||1;var t=Te[r]++;return"".concat(r,"-").concat(t)}function Z(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function $(r,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(r,t)}function xe(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&$(r,t)}function Ee(r,t){if(t&&(O(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z(r)}function X(r){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(r)}function it(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function Bt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?it(Object(e),!0).forEach(function(n){u(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):it(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}var Pe={id:"undefined",handle:void 0,userData:void 0},Oe=function(){function r(t,e,n){if(S(this,r),u(this,"id",void 0),u(this,"props",void 0),u(this,"userData",{}),u(this,"device",void 0),u(this,"_device",void 0),u(this,"destroyed",!1),u(this,"allocatedBytes",0),u(this,"_attachedResources",new Set),!t)throw new Error("no device");this._device=t,this.props=Gt(e,n);var o=this.props.id!=="undefined"?this.props.id:H(this[Symbol.toStringTag]);this.props.id=o,this.id=o,this.userData=this.props.userData||{},this.addStats()}return T(r,[{key:"destroy",value:function(){this.destroyResource()}},{key:"delete",value:function(){return this.destroy(),this}},{key:"toString",value:function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}},{key:"getProps",value:function(){return this.props}},{key:"attachResource",value:function(e){this._attachedResources.add(e)}},{key:"detachResource",value:function(e){this._attachedResources.delete(e)}},{key:"destroyAttachedResource",value:function(e){this._attachedResources.delete(e)&&e.destroy()}},{key:"destroyAttachedResources",value:function(){for(var e=0,n=Object.values(this._attachedResources);e<n.length;e++){var o=n[e];o.destroy()}this._attachedResources=new Set}},{key:"destroyResource",value:function(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0}},{key:"removeStats",value:function(){var e=this._device.statsManager.getStats("Resource Counts"),n=this[Symbol.toStringTag];e.get("".concat(n,"s Active")).decrementCount()}},{key:"trackAllocatedMemory",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this[Symbol.toStringTag],o=this._device.statsManager.getStats("Resource Counts");o.get("GPU Memory").addCount(e),o.get("".concat(n," Memory")).addCount(e),this.allocatedBytes=e}},{key:"trackDeallocatedMemory",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this[Symbol.toStringTag],n=this._device.statsManager.getStats("Resource Counts");n.get("GPU Memory").subtractCount(this.allocatedBytes),n.get("".concat(e," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0}},{key:"addStats",value:function(){var e=this._device.statsManager.getStats("Resource Counts"),n=this[Symbol.toStringTag];e.get("Resources Created").incrementCount(),e.get("".concat(n,"s Created")).incrementCount(),e.get("".concat(n,"s Active")).incrementCount()}}]),r}();u(Oe,"defaultProps",Pe);function Gt(r,t){var e=Bt({},t);for(var n in r)r[n]!==void 0&&(e[n]=r[n]);return e}var st;function Mt(r){var t=Ft();return function(){var n=X(r),o;if(t){var a=X(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Ee(this,o)}}function Ft(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function at(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function Ae(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?at(Object(e),!0).forEach(function(n){u(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):at(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}var Ht=Ae(Ae({},Pe),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});st=Symbol.toStringTag;var E=function(r){xe(e,r);var t=Mt(e);function e(n,o){var a;S(this,e);var l=Ae({},o);return(o.usage||0)&e.INDEX&&!o.indexType&&(o.data instanceof Uint32Array?l.indexType="uint32":o.data instanceof Uint16Array&&(l.indexType="uint16")),a=t.call(this,n,l,Ht),u(Z(a),"byteLength",void 0),a}return T(e,[{key:st,get:function(){return"Buffer"}},{key:"write",value:function(o,a){throw new Error("not implemented")}},{key:"readAsync",value:function(o,a){throw new Error("not implemented")}},{key:"getData",value:function(){throw new Error("not implemented")}}]),e}(Oe);u(E,"MAP_READ",1);u(E,"MAP_WRITE",2);u(E,"COPY_SRC",4);u(E,"COPY_DST",8);u(E,"INDEX",16);u(E,"VERTEX",32);u(E,"UNIFORM",64);u(E,"STORAGE",128);u(E,"INDIRECT",256);u(E,"QUERY_RESOLVE",512);var ct;function ut(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function Ie(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ut(Object(e),!0).forEach(function(n){u(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):ut(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}var fe={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(A.get("debug")),break:[],gl:null};ct=Symbol.toStringTag;var le=function(){function r(t){S(this,r),u(this,"id",void 0),u(this,"statsManager",K),u(this,"props",void 0),u(this,"userData",{}),u(this,"info",void 0),u(this,"lost",void 0),u(this,"canvasContext",void 0),this.props=Ie(Ie({},fe),t),this.id=this.props.id||H(this[Symbol.toStringTag].toLowerCase())}return T(r,[{key:ct,get:function(){return"Device"}},{key:"loseDevice",value:function(){return!1}},{key:"createTexture",value:function(e){return(e instanceof Promise||typeof e=="string")&&(e={data:e}),this._createTexture(e)}},{key:"createCommandEncoder",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};throw new Error("not implemented")}},{key:"_getBufferProps",value:function(e){if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{data:e};var n=Ie({},e);return(e.usage||0)&E.INDEX&&!e.indexType&&(e.data instanceof Uint32Array?e.indexType="uint32":e.data instanceof Uint16Array&&(e.indexType="uint16")),n}}]),r}();u(le,"VERSION",Ze);function ft(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function lt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ft(Object(e),!0).forEach(function(n){u(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):ft(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function Ut(r,t){var e=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=Vt(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0,o=function(){};return{s:o,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(g){throw g},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
8
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,l=!1,d;return{s:function(){e=e.call(r)},n:function(){var g=e.next();return a=g.done,g},e:function(g){l=!0,d=g},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(l)throw d}}}}function Vt(r,t){if(r){if(typeof r=="string")return mt(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return mt(r,t)}}function mt(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var q=new Map,ee=function(){function r(){S(this,r)}return T(r,null,[{key:"registerDevices",value:function(e){var n=Ut(e),o;try{for(n.s();!(o=n.n()).done;){var a=o.value;te(a.type&&a.isSupported&&a.create),q.set(a.type,a)}}catch(l){n.e(l)}finally{n.f()}}},{key:"getAvailableDevices",value:function(){return Array.from(q).map(function(e){return e.type})}},{key:"getSupportedDevices",value:function(){return Array.from(q).filter(function(e){return e.isSupported()}).map(function(e){return e.type})}},{key:"setDefaultDeviceProps",value:function(e){Object.assign(fe,e)}},{key:"createDevice",value:function(){var t=we(ke.default.mark(function n(){var o,a,l=arguments;return ke.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:o=l.length>0&&l[0]!==void 0?l[0]:{},o=lt(lt({},fe),o),o.gl&&(o.type="webgl"),c.t0=o.type,c.next=c.t0==="webgpu"?6:c.t0==="webgl"||c.t0==="webgl1"||c.t0==="webgl2"?12:c.t0==="best-available"?18:24;break;case 6:if(a=q.get("webgpu"),!a){c.next=11;break}return c.next=10,a.create(o);case 10:return c.abrupt("return",c.sent);case 11:return c.abrupt("break",24);case 12:if(a=q.get("webgl"),!a){c.next=17;break}return c.next=16,a.create(o);case 16:return c.abrupt("return",c.sent);case 17:return c.abrupt("break",24);case 18:if(a=q.get("webgl"),!(a&&a.isSupported())){c.next=23;break}return c.next=22,a.create(o);case 22:return c.abrupt("return",c.sent);case 23:return c.abrupt("break",24);case 24:throw new Error("No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.");case 25:case"end":return c.stop()}},n)}));function e(){return t.apply(this,arguments)}return e}()}]),r}();u(ee,"stats",K);u(ee,"log",A);function Re(r){if(Array.isArray(r))return r}function je(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,o,a,l,d=[],c=!0,g=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;c=!1}else for(;!(c=(n=a.call(e)).done)&&(d.push(n.value),d.length!==t);c=!0);}catch(P){g=!0,o=P}finally{try{if(!c&&e.return!=null&&(l=e.return(),Object(l)!==l))return}finally{if(g)throw o}}return d}}function me(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function Ce(r,t){if(r){if(typeof r=="string")return me(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return me(r,t)}}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7
+ var __exports__=(()=>{var gt=Object.create;var oe=Object.defineProperty;var yt=Object.getOwnPropertyDescriptor;var vt=Object.getOwnPropertyNames;var bt=Object.getPrototypeOf,_t=Object.prototype.hasOwnProperty;var ve=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),wt=(r,t)=>{for(var e in t)oe(r,e,{get:t[e],enumerable:!0})},He=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vt(t))!_t.call(r,o)&&o!==e&&oe(r,o,{get:()=>t[o],enumerable:!(n=yt(t,o))||n.enumerable});return r};var St=(r,t,e)=>(e=r!=null?gt(bt(r)):{},He(t||!r||!r.__esModule?oe(e,"default",{value:r,enumerable:!0}):e,r)),Tt=r=>He(oe({},"__esModule",{value:!0}),r);var et=ve((un,I)=>{function Se(r){return I.exports=Se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I.exports.__esModule=!0,I.exports.default=I.exports,Se(r)}I.exports=Se,I.exports.__esModule=!0,I.exports.default=I.exports});var rt=ve((cn,k)=>{var Lt=et().default;function tt(){"use strict";k.exports=tt=function(){return r},k.exports.__esModule=!0,k.exports.default=k.exports;var r={},t=Object.prototype,e=t.hasOwnProperty,n=Object.defineProperty||function(c,i,s){c[i]=s.value},o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",f=o.asyncIterator||"@@asyncIterator",d=o.toStringTag||"@@toStringTag";function u(c,i,s){return Object.defineProperty(c,i,{value:s,enumerable:!0,configurable:!0,writable:!0}),c[i]}try{u({},"")}catch{u=function(s,l,h){return s[l]=h}}function g(c,i,s,l){var h=i&&i.prototype instanceof R?i:R,p=Object.create(h.prototype),y=new ge(l||[]);return n(p,"_invoke",{value:ht(c,s,y)}),p}function O(c,i,s){try{return{type:"normal",arg:c.call(i,s)}}catch(l){return{type:"throw",arg:l}}}r.wrap=g;var v={};function R(){}function j(){}function N(){}var pe={};u(pe,a,function(){return this});var he=Object.getPrototypeOf,re=he&&he(he(ye([])));re&&re!==t&&e.call(re,a)&&(pe=re);var U=N.prototype=R.prototype=Object.create(pe);function Ge(c){["next","throw","return"].forEach(function(i){u(c,i,function(s){return this._invoke(i,s)})})}function ne(c,i){function s(h,p,y,b){var _=O(c[h],c,p);if(_.type!=="throw"){var L=_.arg,C=L.value;return C&&Lt(C)=="object"&&e.call(C,"__await")?i.resolve(C.__await).then(function(B){s("next",B,y,b)},function(B){s("throw",B,y,b)}):i.resolve(C).then(function(B){L.value=B,y(L)},function(B){return s("throw",B,y,b)})}b(_.arg)}var l;n(this,"_invoke",{value:function(p,y){function b(){return new i(function(_,L){s(p,y,_,L)})}return l=l?l.then(b,b):b()}})}function ht(c,i,s){var l="suspendedStart";return function(h,p){if(l==="executing")throw new Error("Generator is already running");if(l==="completed"){if(h==="throw")throw p;return Fe()}for(s.method=h,s.arg=p;;){var y=s.delegate;if(y){var b=Me(y,s);if(b){if(b===v)continue;return b}}if(s.method==="next")s.sent=s._sent=s.arg;else if(s.method==="throw"){if(l==="suspendedStart")throw l="completed",s.arg;s.dispatchException(s.arg)}else s.method==="return"&&s.abrupt("return",s.arg);l="executing";var _=O(c,i,s);if(_.type==="normal"){if(l=s.done?"completed":"suspendedYield",_.arg===v)continue;return{value:_.arg,done:s.done}}_.type==="throw"&&(l="completed",s.method="throw",s.arg=_.arg)}}}function Me(c,i){var s=i.method,l=c.iterator[s];if(l===void 0)return i.delegate=null,s==="throw"&&c.iterator.return&&(i.method="return",i.arg=void 0,Me(c,i),i.method==="throw")||s!=="return"&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+s+"' method")),v;var h=O(l,c.iterator,i.arg);if(h.type==="throw")return i.method="throw",i.arg=h.arg,i.delegate=null,v;var p=h.arg;return p?p.done?(i[c.resultName]=p.value,i.next=c.nextLoc,i.method!=="return"&&(i.method="next",i.arg=void 0),i.delegate=null,v):p:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,v)}function dt(c){var i={tryLoc:c[0]};1 in c&&(i.catchLoc=c[1]),2 in c&&(i.finallyLoc=c[2],i.afterLoc=c[3]),this.tryEntries.push(i)}function de(c){var i=c.completion||{};i.type="normal",delete i.arg,c.completion=i}function ge(c){this.tryEntries=[{tryLoc:"root"}],c.forEach(dt,this),this.reset(!0)}function ye(c){if(c){var i=c[a];if(i)return i.call(c);if(typeof c.next=="function")return c;if(!isNaN(c.length)){var s=-1,l=function h(){for(;++s<c.length;)if(e.call(c,s))return h.value=c[s],h.done=!1,h;return h.value=void 0,h.done=!0,h};return l.next=l}}return{next:Fe}}function Fe(){return{value:void 0,done:!0}}return j.prototype=N,n(U,"constructor",{value:N,configurable:!0}),n(N,"constructor",{value:j,configurable:!0}),j.displayName=u(N,d,"GeneratorFunction"),r.isGeneratorFunction=function(c){var i=typeof c=="function"&&c.constructor;return!!i&&(i===j||(i.displayName||i.name)==="GeneratorFunction")},r.mark=function(c){return Object.setPrototypeOf?Object.setPrototypeOf(c,N):(c.__proto__=N,u(c,d,"GeneratorFunction")),c.prototype=Object.create(U),c},r.awrap=function(c){return{__await:c}},Ge(ne.prototype),u(ne.prototype,f,function(){return this}),r.AsyncIterator=ne,r.async=function(c,i,s,l,h){h===void 0&&(h=Promise);var p=new ne(g(c,i,s,l),h);return r.isGeneratorFunction(i)?p:p.next().then(function(y){return y.done?y.value:p.next()})},Ge(U),u(U,d,"Generator"),u(U,a,function(){return this}),u(U,"toString",function(){return"[object Generator]"}),r.keys=function(c){var i=Object(c),s=[];for(var l in i)s.push(l);return s.reverse(),function h(){for(;s.length;){var p=s.pop();if(p in i)return h.value=p,h.done=!1,h}return h.done=!0,h}},r.values=ye,ge.prototype={constructor:ge,reset:function(i){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(de),!i)for(var s in this)s.charAt(0)==="t"&&e.call(this,s)&&!isNaN(+s.slice(1))&&(this[s]=void 0)},stop:function(){this.done=!0;var i=this.tryEntries[0].completion;if(i.type==="throw")throw i.arg;return this.rval},dispatchException:function(i){if(this.done)throw i;var s=this;function l(L,C){return y.type="throw",y.arg=i,s.next=L,C&&(s.method="next",s.arg=void 0),!!C}for(var h=this.tryEntries.length-1;h>=0;--h){var p=this.tryEntries[h],y=p.completion;if(p.tryLoc==="root")return l("end");if(p.tryLoc<=this.prev){var b=e.call(p,"catchLoc"),_=e.call(p,"finallyLoc");if(b&&_){if(this.prev<p.catchLoc)return l(p.catchLoc,!0);if(this.prev<p.finallyLoc)return l(p.finallyLoc)}else if(b){if(this.prev<p.catchLoc)return l(p.catchLoc,!0)}else{if(!_)throw new Error("try statement without catch or finally");if(this.prev<p.finallyLoc)return l(p.finallyLoc)}}}},abrupt:function(i,s){for(var l=this.tryEntries.length-1;l>=0;--l){var h=this.tryEntries[l];if(h.tryLoc<=this.prev&&e.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var p=h;break}}p&&(i==="break"||i==="continue")&&p.tryLoc<=s&&s<=p.finallyLoc&&(p=null);var y=p?p.completion:{};return y.type=i,y.arg=s,p?(this.method="next",this.next=p.finallyLoc,v):this.complete(y)},complete:function(i,s){if(i.type==="throw")throw i.arg;return i.type==="break"||i.type==="continue"?this.next=i.arg:i.type==="return"?(this.rval=this.arg=i.arg,this.method="return",this.next="end"):i.type==="normal"&&s&&(this.next=s),v},finish:function(i){for(var s=this.tryEntries.length-1;s>=0;--s){var l=this.tryEntries[s];if(l.finallyLoc===i)return this.complete(l.completion,l.afterLoc),de(l),v}},catch:function(i){for(var s=this.tryEntries.length-1;s>=0;--s){var l=this.tryEntries[s];if(l.tryLoc===i){var h=l.completion;if(h.type==="throw"){var p=h.arg;de(l)}return p}}throw new Error("illegal catch attempt")},delegateYield:function(i,s,l){return this.delegate={iterator:ye(i),resultName:s,nextLoc:l},this.method==="next"&&(this.arg=void 0),v}},r}k.exports=tt,k.exports.__esModule=!0,k.exports.default=k.exports});var ot=ve((fn,nt)=>{var ce=rt()();nt.exports=ce;try{regeneratorRuntime=ce}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=ce:Function("r","regeneratorRuntime = r")(ce)}});var Kt={};wt(Kt,{Device:()=>le,Timeline:()=>Be,assert:()=>te,log:()=>P,luma:()=>ee,uid:()=>H});function be(r){if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&Boolean(process.versions.electron))return!0;let t=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,e=r||t;return!!(e&&e.indexOf("Electron")>=0)}function w(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||be()}var xt=globalThis.self||globalThis.window||globalThis.global,V=globalThis.window||globalThis.self||globalThis.global,Et=globalThis.document||{},G=globalThis.process||{},Ot=globalThis.console,Zt=globalThis.navigator||{};var ie=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",tr=w();function Pt(r){try{let t=window[r],e="__storage_test__";return t.setItem(e,e),t.removeItem(e),t}catch{return null}}var ae=class{constructor(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";this.storage=void 0,this.id=void 0,this.config=void 0,this.storage=Pt(n),this.id=t,this.config=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){let e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}}_loadConfiguration(){let t={};if(this.storage){let e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}};function Ue(r){let t;return r<10?t="".concat(r.toFixed(2),"ms"):r<100?t="".concat(r.toFixed(1),"ms"):r<1e3?t="".concat(r.toFixed(0),"ms"):t="".concat((r/1e3).toFixed(2),"s"),t}function Ve(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,e=Math.max(t-r.length,0);return"".concat(" ".repeat(e)).concat(r)}function se(r,t,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,o=r.src.replace(/\(/g,"%28").replace(/\)/g,"%29");r.width>n&&(e=Math.min(e,n/r.width));let a=r.width*e,f=r.height*e,d=["font-size:1px;","padding:".concat(Math.floor(f/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(f,"px;"),"background:url(".concat(o,");"),"background-size:".concat(a,"px ").concat(f,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),d]}var ue;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(ue||(ue={}));var At=10;function ze(r){return typeof r!="string"?r:(r=r.toUpperCase(),ue[r]||ue.WHITE)}function Ye(r,t,e){if(!w&&typeof r=="string"){if(t){let n=ze(t);r="\x1B[".concat(n,"m").concat(r,"\x1B[39m")}if(e){let n=ze(e);r="\x1B[".concat(n+At,"m").concat(r,"\x1B[49m")}}return r}function We(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],e=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(e),o=r;for(let a of n){let f=o[a];typeof f=="function"&&(t.find(d=>a===d)||(o[a]=f.bind(r)))}}function z(r,t){if(!r)throw new Error(t||"Assertion failed")}function M(){let r;if(w()&&V.performance){var t,e;r=V===null||V===void 0||(t=V.performance)===null||t===void 0||(e=t.now)===null||e===void 0?void 0:e.call(t)}else if("hrtime"in G){var n;let o=G===null||G===void 0||(n=G.hrtime)===null||n===void 0?void 0:n.call(G);r=o[0]*1e3+o[1]/1e6}else r=Date.now();return r}var Y={debug:w()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},It={enabled:!0,level:0};function x(){}var Ke={},Xe={once:!0},D=class{constructor(){let{id:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=ie,this._startTs=M(),this._deltaTs=M(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new ae("__probe-".concat(this.id,"__"),It),this.timeStamp("".concat(this.id," started")),We(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((M()-this._startTs).toPrecision(10))}getDelta(){return Number((M()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){z(t,e)}warn(t){return this._getLogFunction(0,t,Y.warn,arguments,Xe)}error(t){return this._getLogFunction(0,t,Y.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,Y.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,Y.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,Y.debug||Y.info,arguments,Xe)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||x,n&&[n],{tag:Ct(e)}):x}image(t){let{logLevel:e,priority:n,image:o,message:a="",scale:f=1}=t;return this._shouldLog(e||n)?w()?jt({image:o,message:a,scale:f}):Rt({image:o,message:a,scale:f}):x}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||x)}group(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},o=qe({logLevel:t,message:e,opts:n}),{collapsed:a}=n;return o.method=(a?console.groupCollapsed:console.group)||console.info,this._getLogFunction(o)}groupCollapsed(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||x)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=Je(t)}_getLogFunction(t,e,n,o,a){if(this._shouldLog(t)){a=qe({logLevel:t,message:e,args:o,opts:a}),n=n||a.method,z(n),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=M();let f=a.tag||a.message;if(a.once&&f)if(!Ke[f])Ke[f]=M();else return x;return e=kt(this.id,a.message,a),n.bind(console,e,...a.args)}return x}};D.VERSION=ie;function Je(r){if(!r)return 0;let t;switch(typeof r){case"number":t=r;break;case"object":t=r.logLevel||r.priority||0;break;default:return 0}return z(Number.isFinite(t)&&t>=0),t}function qe(r){let{logLevel:t,message:e}=r;r.logLevel=Je(t);let n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==e;);switch(typeof t){case"string":case"function":e!==void 0&&n.unshift(e),r.message=t;break;case"object":Object.assign(r,t);break;default:}typeof r.message=="function"&&(r.message=r.message());let o=typeof r.message;return z(o==="string"||o==="object"),Object.assign(r,{args:n},r.opts)}function kt(r,t,e){if(typeof t=="string"){let n=e.time?Ve(Ue(e.total)):"";t=e.time?"".concat(r,": ").concat(n," ").concat(t):"".concat(r,": ").concat(t),t=Ye(t,e.color,e.background)}return t}function Rt(r){let{image:t,message:e="",scale:n=1}=r;return console.warn("removed"),x}function jt(r){let{image:t,message:e="",scale:n=1}=r;if(typeof t=="string"){let a=new Image;return a.onload=()=>{let f=se(a,e,n);console.log(...f)},a.src=t,x}let o=t.nodeName||"";if(o.toLowerCase()==="img")return console.log(...se(t,e,n)),x;if(o.toLowerCase()==="canvas"){let a=new Image;return a.onload=()=>console.log(...se(a,e,n)),a.src=t.toDataURL(),x}return x}function Ct(r){for(let t in r)for(let e in r[t])return e||"untitled";return"empty"}var Or=new D({id:"@probe.gl/log"});var P=new D({id:"luma.gl"});function S(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function A(r){return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(r)}function _e(r,t){if(A(r)!=="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var n=e.call(r,t||"default");if(A(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function J(r){var t=_e(r,"string");return A(t)==="symbol"?t:String(t)}function Qe(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,J(n.key),n)}}function T(r,t,e){return t&&Qe(r.prototype,t),e&&Qe(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function m(r,t,e){return t=J(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Q(){let r;if(typeof window<"u"&&window.performance)r=window.performance.now();else if(typeof process<"u"&&process.hrtime){let t=process.hrtime();r=t[0]*1e3+t[1]/1e6}else r=Date.now();return r}var F=class{constructor(t,e){this.name=void 0,this.type=void 0,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=e,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=Q(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Q()-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 W=class{constructor(t){this.id=void 0,this.stats={},this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}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 e of Object.values(this.stats))t(e)}getTable(){let t={};return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(e=>this._getOrCreate(e))}_getOrCreate(t){let{name:e,type:n}=t,o=this.stats[e];return o||(t instanceof F?o=t:o=new F(e,n),this.stats[e]=o),o}};var Dt=function(){function r(){S(this,r),m(this,"stats",new Map)}return T(r,[{key:"getStats",value:function(e){return this.get(e)}},{key:"get",value:function(e){return this.stats.has(e)||this.stats.set(e,new W({id:e})),this.stats.get(e)}}]),r}(),K=new Dt;function Nt(){var r=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",t="set luma.log.level=1 (or higher) to trace rendering";if(globalThis.luma&&globalThis.luma.VERSION!==r)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(r));return globalThis.luma||(w()&&P.log(1,"luma.gl ".concat(r," - ").concat(t))(),globalThis.luma=globalThis.luma||{VERSION:r,version:r,log:P,stats:K}),r}var Ze=Nt();function $e(r,t,e,n,o,a,f){try{var d=r[a](f),u=d.value}catch(g){e(g);return}d.done?t(u):Promise.resolve(u).then(n,o)}function we(r){return function(){var t=this,e=arguments;return new Promise(function(n,o){var a=r.apply(t,e);function f(u){$e(a,n,o,f,d,"next",u)}function d(u){$e(a,n,o,f,d,"throw",u)}f(void 0)})}}var ke=St(ot(),1);var Te={};function H(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"id";Te[r]=Te[r]||1;var t=Te[r]++;return"".concat(r,"-").concat(t)}function Z(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function $(r,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(r,t)}function xe(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),t&&$(r,t)}function Ee(r,t){if(t&&(A(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z(r)}function X(r){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(r)}function it(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function Bt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?it(Object(e),!0).forEach(function(n){m(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):it(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}var Oe={id:"undefined",handle:void 0,userData:void 0},Pe=function(){function r(t,e,n){if(S(this,r),m(this,"id",void 0),m(this,"props",void 0),m(this,"userData",{}),m(this,"device",void 0),m(this,"_device",void 0),m(this,"destroyed",!1),m(this,"allocatedBytes",0),m(this,"_attachedResources",new Set),!t)throw new Error("no device");this._device=t,this.props=Gt(e,n);var o=this.props.id!=="undefined"?this.props.id:H(this[Symbol.toStringTag]);this.props.id=o,this.id=o,this.userData=this.props.userData||{},this.addStats()}return T(r,[{key:"destroy",value:function(){this.destroyResource()}},{key:"delete",value:function(){return this.destroy(),this}},{key:"toString",value:function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}},{key:"getProps",value:function(){return this.props}},{key:"attachResource",value:function(e){this._attachedResources.add(e)}},{key:"detachResource",value:function(e){this._attachedResources.delete(e)}},{key:"destroyAttachedResource",value:function(e){this._attachedResources.delete(e)&&e.destroy()}},{key:"destroyAttachedResources",value:function(){for(var e=0,n=Object.values(this._attachedResources);e<n.length;e++){var o=n[e];o.destroy()}this._attachedResources=new Set}},{key:"destroyResource",value:function(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0}},{key:"removeStats",value:function(){var e=this._device.statsManager.getStats("Resource Counts"),n=this[Symbol.toStringTag];e.get("".concat(n,"s Active")).decrementCount()}},{key:"trackAllocatedMemory",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this[Symbol.toStringTag],o=this._device.statsManager.getStats("Resource Counts");o.get("GPU Memory").addCount(e),o.get("".concat(n," Memory")).addCount(e),this.allocatedBytes=e}},{key:"trackDeallocatedMemory",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this[Symbol.toStringTag],n=this._device.statsManager.getStats("Resource Counts");n.get("GPU Memory").subtractCount(this.allocatedBytes),n.get("".concat(e," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0}},{key:"addStats",value:function(){var e=this._device.statsManager.getStats("Resource Counts"),n=this[Symbol.toStringTag];e.get("Resources Created").incrementCount(),e.get("".concat(n,"s Created")).incrementCount(),e.get("".concat(n,"s Active")).incrementCount()}}]),r}();m(Pe,"defaultProps",Oe);function Gt(r,t){var e=Bt({},t);for(var n in r)r[n]!==void 0&&(e[n]=r[n]);return e}var st;function Mt(r){var t=Ft();return function(){var n=X(r),o;if(t){var a=X(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Ee(this,o)}}function Ft(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function at(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function Ae(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?at(Object(e),!0).forEach(function(n){m(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):at(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}var Ht=Ae(Ae({},Oe),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});st=Symbol.toStringTag;var E=function(r){xe(e,r);var t=Mt(e);function e(n,o){var a;S(this,e);var f=Ae({},o);return(o.usage||0)&e.INDEX&&!o.indexType&&(o.data instanceof Uint32Array?f.indexType="uint32":o.data instanceof Uint16Array&&(f.indexType="uint16")),a=t.call(this,n,f,Ht),m(Z(a),"byteLength",void 0),a}return T(e,[{key:st,get:function(){return"Buffer"}},{key:"write",value:function(o,a){throw new Error("not implemented")}},{key:"readAsync",value:function(o,a){throw new Error("not implemented")}},{key:"getData",value:function(){throw new Error("not implemented")}}]),e}(Pe);m(E,"MAP_READ",1);m(E,"MAP_WRITE",2);m(E,"COPY_SRC",4);m(E,"COPY_DST",8);m(E,"INDEX",16);m(E,"VERTEX",32);m(E,"UNIFORM",64);m(E,"STORAGE",128);m(E,"INDIRECT",256);m(E,"QUERY_RESOLVE",512);var ct;function ut(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function Ie(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ut(Object(e),!0).forEach(function(n){m(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):ut(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}var fe={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(P.get("debug")),break:[],gl:null};ct=Symbol.toStringTag;var le=function(){function r(t){S(this,r),m(this,"id",void 0),m(this,"statsManager",K),m(this,"props",void 0),m(this,"userData",{}),m(this,"info",void 0),m(this,"lost",void 0),m(this,"canvasContext",void 0),this.props=Ie(Ie({},fe),t),this.id=this.props.id||H(this[Symbol.toStringTag].toLowerCase())}return T(r,[{key:ct,get:function(){return"Device"}},{key:"loseDevice",value:function(){return!1}},{key:"createTexture",value:function(e){return(e instanceof Promise||typeof e=="string")&&(e={data:e}),this._createTexture(e)}},{key:"createCommandEncoder",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};throw new Error("not implemented")}},{key:"_getBufferProps",value:function(e){if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{data:e};var n=Ie({},e);return(e.usage||0)&E.INDEX&&!e.indexType&&(e.data instanceof Uint32Array?n.indexType="uint32":e.data instanceof Uint16Array&&(n.indexType="uint16")),n}}]),r}();m(le,"VERSION",Ze);function ft(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),e.push.apply(e,n)}return e}function lt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ft(Object(e),!0).forEach(function(n){m(r,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):ft(Object(e)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(e,n))})}return r}function Ut(r,t){var e=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=Vt(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0,o=function(){};return{s:o,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(g){throw g},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,f=!1,d;return{s:function(){e=e.call(r)},n:function(){var g=e.next();return a=g.done,g},e:function(g){f=!0,d=g},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(f)throw d}}}}function Vt(r,t){if(r){if(typeof r=="string")return mt(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return mt(r,t)}}function mt(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var q=new Map,ee=function(){function r(){S(this,r)}return T(r,null,[{key:"registerDevices",value:function(e){var n=Ut(e),o;try{for(n.s();!(o=n.n()).done;){var a=o.value;te(a.type&&a.isSupported&&a.create),q.set(a.type,a)}}catch(f){n.e(f)}finally{n.f()}}},{key:"getAvailableDevices",value:function(){return Array.from(q).map(function(e){return e.type})}},{key:"getSupportedDevices",value:function(){return Array.from(q).filter(function(e){return e.isSupported()}).map(function(e){return e.type})}},{key:"setDefaultDeviceProps",value:function(e){Object.assign(fe,e)}},{key:"createDevice",value:function(){var t=we(ke.default.mark(function n(){var o,a,f=arguments;return ke.default.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:o=f.length>0&&f[0]!==void 0?f[0]:{},o=lt(lt({},fe),o),o.gl&&(o.type="webgl"),u.t0=o.type,u.next=u.t0==="webgpu"?6:u.t0==="webgl"||u.t0==="webgl1"||u.t0==="webgl2"?12:u.t0==="best-available"?18:24;break;case 6:if(a=q.get("webgpu"),!a){u.next=11;break}return u.next=10,a.create(o);case 10:return u.abrupt("return",u.sent);case 11:return u.abrupt("break",24);case 12:if(a=q.get("webgl"),!a){u.next=17;break}return u.next=16,a.create(o);case 16:return u.abrupt("return",u.sent);case 17:return u.abrupt("break",24);case 18:if(a=q.get("webgl"),!(a&&a.isSupported())){u.next=23;break}return u.next=22,a.create(o);case 22:return u.abrupt("return",u.sent);case 23:return u.abrupt("break",24);case 24:throw new Error("No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.");case 25:case"end":return u.stop()}},n)}));function e(){return t.apply(this,arguments)}return e}()}]),r}();m(ee,"stats",K);m(ee,"log",P);function Re(r){if(Array.isArray(r))return r}function je(r,t){var e=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var n,o,a,f,d=[],u=!0,g=!1;try{if(a=(e=e.call(r)).next,t===0){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=a.call(e)).done)&&(d.push(n.value),d.length!==t);u=!0);}catch(O){g=!0,o=O}finally{try{if(!u&&e.return!=null&&(f=e.return(),Object(f)!==f))return}finally{if(g)throw o}}return d}}function me(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function Ce(r,t){if(r){if(typeof r=="string")return me(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return me(r,t)}}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
9
9
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(r,t){return Re(r)||je(r,t)||Ce(r,t)||De()}function te(r,t){if(!r)throw new Error(t||"luma.gl: assertion failed.")}function Le(r,t){var e=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=zt(r))||t&&r&&typeof r.length=="number"){e&&(r=e);var n=0,o=function(){};return{s:o,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(g){throw g},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
10
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,l=!1,d;return{s:function(){e=e.call(r)},n:function(){var g=e.next();return a=g.done,g},e:function(g){l=!0,d=g},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(l)throw d}}}}function zt(r,t){if(r){if(typeof r=="string")return pt(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return pt(r,t)}}function pt(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var Yt=1,Wt=1,Be=function(){function r(){S(this,r),u(this,"time",0),u(this,"channels",new Map),u(this,"animations",new Map),u(this,"playing",!1),u(this,"lastEngineTime",-1)}return T(r,[{key:"addChannel",value:function(e){var n=e.delay,o=n===void 0?0:n,a=e.duration,l=a===void 0?Number.POSITIVE_INFINITY:a,d=e.rate,c=d===void 0?1:d,g=e.repeat,P=g===void 0?1:g,v=Yt++,R={time:0,delay:o,duration:l,rate:c,repeat:P};return this._setChannelTime(R,this.time),this.channels.set(v,R),v}},{key:"removeChannel",value:function(e){this.channels.delete(e);var n=Le(this.animations),o;try{for(n.s();!(o=n.n()).done;){var a=Ne(o.value,2),l=a[0],d=a[1];d.channel===e&&this.detachAnimation(l)}}catch(c){n.e(c)}finally{n.f()}}},{key:"isFinished",value:function(e){var n=this.channels.get(e);return n===void 0?!1:this.time>=n.delay+n.duration*n.repeat}},{key:"getTime",value:function(e){if(e===void 0)return this.time;var n=this.channels.get(e);return n===void 0?-1:n.time}},{key:"setTime",value:function(e){this.time=Math.max(0,e);var n=this.channels.values(),o=Le(n),a;try{for(o.s();!(a=o.n()).done;){var l=a.value;this._setChannelTime(l,this.time)}}catch(j){o.e(j)}finally{o.f()}var d=this.animations.values(),c=Le(d),g;try{for(c.s();!(g=c.n()).done;){var P=g.value,v=P.animation,R=P.channel;v.setTime(this.getTime(R))}}catch(j){c.e(j)}finally{c.f()}}},{key:"play",value:function(){this.playing=!0}},{key:"pause",value:function(){this.playing=!1,this.lastEngineTime=-1}},{key:"reset",value:function(){this.setTime(0)}},{key:"attachAnimation",value:function(e,n){var o=Wt++;return this.animations.set(o,{animation:e,channel:n}),e.setTime(this.getTime(n)),o}},{key:"detachAnimation",value:function(e){this.animations.delete(e)}},{key:"update",value:function(e){this.playing&&(this.lastEngineTime===-1&&(this.lastEngineTime=e),this.setTime(this.time+(e-this.lastEngineTime)),this.lastEngineTime=e)}},{key:"_setChannelTime",value:function(e,n){var o=n-e.delay,a=e.duration*e.repeat;o>=a?e.time=e.duration*e.rate:(e.time=Math.max(0,o)%e.duration,e.time*=e.rate)}}]),r}();return Tt(Kt);})();
10
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,f=!1,d;return{s:function(){e=e.call(r)},n:function(){var g=e.next();return a=g.done,g},e:function(g){f=!0,d=g},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(f)throw d}}}}function zt(r,t){if(r){if(typeof r=="string")return pt(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);if(e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set")return Array.from(r);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return pt(r,t)}}function pt(r,t){(t==null||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var Yt=1,Wt=1,Be=function(){function r(){S(this,r),m(this,"time",0),m(this,"channels",new Map),m(this,"animations",new Map),m(this,"playing",!1),m(this,"lastEngineTime",-1)}return T(r,[{key:"addChannel",value:function(e){var n=e.delay,o=n===void 0?0:n,a=e.duration,f=a===void 0?Number.POSITIVE_INFINITY:a,d=e.rate,u=d===void 0?1:d,g=e.repeat,O=g===void 0?1:g,v=Yt++,R={time:0,delay:o,duration:f,rate:u,repeat:O};return this._setChannelTime(R,this.time),this.channels.set(v,R),v}},{key:"removeChannel",value:function(e){this.channels.delete(e);var n=Le(this.animations),o;try{for(n.s();!(o=n.n()).done;){var a=Ne(o.value,2),f=a[0],d=a[1];d.channel===e&&this.detachAnimation(f)}}catch(u){n.e(u)}finally{n.f()}}},{key:"isFinished",value:function(e){var n=this.channels.get(e);return n===void 0?!1:this.time>=n.delay+n.duration*n.repeat}},{key:"getTime",value:function(e){if(e===void 0)return this.time;var n=this.channels.get(e);return n===void 0?-1:n.time}},{key:"setTime",value:function(e){this.time=Math.max(0,e);var n=this.channels.values(),o=Le(n),a;try{for(o.s();!(a=o.n()).done;){var f=a.value;this._setChannelTime(f,this.time)}}catch(j){o.e(j)}finally{o.f()}var d=this.animations.values(),u=Le(d),g;try{for(u.s();!(g=u.n()).done;){var O=g.value,v=O.animation,R=O.channel;v.setTime(this.getTime(R))}}catch(j){u.e(j)}finally{u.f()}}},{key:"play",value:function(){this.playing=!0}},{key:"pause",value:function(){this.playing=!1,this.lastEngineTime=-1}},{key:"reset",value:function(){this.setTime(0)}},{key:"attachAnimation",value:function(e,n){var o=Wt++;return this.animations.set(o,{animation:e,channel:n}),e.setTime(this.getTime(n)),o}},{key:"detachAnimation",value:function(e){this.animations.delete(e)}},{key:"update",value:function(e){this.playing&&(this.lastEngineTime===-1&&(this.lastEngineTime=e),this.setTime(this.time+(e-this.lastEngineTime)),this.lastEngineTime=e)}},{key:"_setChannelTime",value:function(e,n){var o=n-e.delay,a=e.duration*e.repeat;o>=a?e.time=e.duration*e.rate:(e.time=Math.max(0,o)%e.duration,e.time*=e.rate)}}]),r}();return Tt(Kt);})();
11
11
  /*! Bundled license information:
12
12
 
13
13
  @babel/runtime/helpers/regeneratorRuntime.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luma.gl/core",
3
- "version": "9.0.0-alpha.24",
3
+ "version": "9.0.0-alpha.26",
4
4
  "description": "WebGL2 Components for High Performance Rendering and Computation",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,10 +40,10 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@babel/runtime": "^7.0.0",
43
- "@luma.gl/constants": "9.0.0-alpha.24",
44
- "@luma.gl/engine": "9.0.0-alpha.24",
45
- "@luma.gl/shadertools": "9.0.0-alpha.24",
46
- "@luma.gl/webgl": "9.0.0-alpha.24"
43
+ "@luma.gl/constants": "9.0.0-alpha.26",
44
+ "@luma.gl/engine": "9.0.0-alpha.26",
45
+ "@luma.gl/shadertools": "9.0.0-alpha.26",
46
+ "@luma.gl/webgl": "9.0.0-alpha.26"
47
47
  },
48
- "gitHead": "3707968c288edbfef7ab4060195493ca8f00e7d5"
48
+ "gitHead": "e255f78c1c0a4555808c6e9282bcecb6accd147b"
49
49
  }