@luma.gl/engine 9.0.0-beta.2 → 9.0.0-beta.4

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
@@ -1209,12 +1209,15 @@ var __exports__ = (() => {
1209
1209
  readPixelsToArrayWebGL(source, options) {
1210
1210
  throw new Error("not implemented");
1211
1211
  }
1212
- readPixelsToBufferWebGL2(source, options) {
1212
+ readPixelsToBufferWebGL(source, options) {
1213
1213
  throw new Error("not implemented");
1214
1214
  }
1215
1215
  setParametersWebGL(parameters) {
1216
1216
  throw new Error("not implemented");
1217
1217
  }
1218
+ getParametersWebGL(parameters) {
1219
+ throw new Error("not implemented");
1220
+ }
1218
1221
  withParametersWebGL(parameters, func) {
1219
1222
  throw new Error("not implemented");
1220
1223
  }
@@ -9126,6 +9129,7 @@ void main() {
9126
9129
 
9127
9130
  // src/lib/clip-space.ts
9128
9131
  var CLIPSPACE_VERTEX_SHADER = glsl`\
9132
+ #version 300 es
9129
9133
  in vec2 aClipSpacePosition;
9130
9134
  in vec2 aTexCoord;
9131
9135
  in vec2 aCoordinate;
package/dist/index.cjs CHANGED
@@ -1709,6 +1709,7 @@ var Geometry = class {
1709
1709
 
1710
1710
  // src/lib/clip-space.ts
1711
1711
  var CLIPSPACE_VERTEX_SHADER = import_core12.glsl`\
1712
+ #version 300 es
1712
1713
  in vec2 aClipSpacePosition;
1713
1714
  in vec2 aTexCoord;
1714
1715
  in vec2 aCoordinate;
@@ -4,6 +4,6 @@ import { Model, ModelProps } from '../model/model';
4
4
  * A flat geometry that covers the "visible area" that the GPU renders.
5
5
  */
6
6
  export declare class ClipSpace extends Model {
7
- constructor(device: Device, opts?: ModelProps);
7
+ constructor(device: Device, opts: Omit<ModelProps, 'vs' | 'vertexCount' | 'geometry'>);
8
8
  }
9
9
  //# sourceMappingURL=clip-space.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clip-space.d.ts","sourceRoot":"","sources":["../../src/lib/clip-space.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAO,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAC,KAAK,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAuBjD;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;gBACtB,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU;CAqB9C"}
1
+ {"version":3,"file":"clip-space.d.ts","sourceRoot":"","sources":["../../src/lib/clip-space.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,MAAM,EAAO,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAC,KAAK,EAAE,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAwBjD;;GAEG;AACH,qBAAa,SAAU,SAAQ,KAAK;gBACtB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,aAAa,GAAG,UAAU,CAAC;CAqBtF"}
@@ -2,6 +2,7 @@ import { glsl } from '@luma.gl/core';
2
2
  import { Model } from "../model/model.js";
3
3
  import { Geometry } from "../geometry/geometry.js";
4
4
  const CLIPSPACE_VERTEX_SHADER = glsl`\
5
+ #version 300 es
5
6
  in vec2 aClipSpacePosition;
6
7
  in vec2 aTexCoord;
7
8
  in vec2 aCoordinate;
@@ -1 +1 @@
1
- {"version":3,"file":"clip-space.js","names":["glsl","Model","Geometry","CLIPSPACE_VERTEX_SHADER","POSITIONS","ClipSpace","constructor","device","opts","TEX_COORDS","map","coord","vs","vertexCount","geometry","topology","attributes","aClipSpacePosition","size","value","Float32Array","aTexCoord","aCoordinate"],"sources":["../../src/lib/clip-space.ts"],"sourcesContent":["\n// ClipSpace\nimport {Device, glsl} from '@luma.gl/core';\nimport {Model, ModelProps} from '../model/model';\nimport {Geometry} from '../geometry/geometry';\n\nconst CLIPSPACE_VERTEX_SHADER = glsl`\\\nin vec2 aClipSpacePosition;\nin vec2 aTexCoord;\nin vec2 aCoordinate;\n\nout vec2 position;\nout vec2 coordinate;\nout vec2 uv;\n\nvoid main(void) {\n gl_Position = vec4(aClipSpacePosition, 0., 1.);\n position = aClipSpacePosition;\n coordinate = aCoordinate;\n uv = aTexCoord;\n}\n`;\n\n/* eslint-disable indent, no-multi-spaces */\nconst POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];\n\n/**\n * A flat geometry that covers the \"visible area\" that the GPU renders.\n */\nexport class ClipSpace extends Model {\n constructor(device: Device, opts?: ModelProps) {\n const TEX_COORDS = POSITIONS.map((coord) => (coord === -1 ? 0 : coord));\n\n super(\n device,\n {\n ...opts,\n vs: CLIPSPACE_VERTEX_SHADER,\n vertexCount: 4,\n geometry: new Geometry({\n topology: 'triangle-strip',\n vertexCount: 4,\n attributes: {\n aClipSpacePosition: {size: 2, value: new Float32Array(POSITIONS)},\n aTexCoord: {size: 2, value: new Float32Array(TEX_COORDS)},\n aCoordinate: {size: 2, value: new Float32Array(TEX_COORDS)}\n }\n })\n }\n );\n }\n}\n"],"mappings":"AAEA,SAAgBA,IAAI,QAAO,eAAe;AAAC,SACnCC,KAAK;AAAA,SACLC,QAAQ;AAEhB,MAAMC,uBAAuB,GAAGH,IAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAGD,MAAMI,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAK9C,OAAO,MAAMC,SAAS,SAASJ,KAAK,CAAC;EACnCK,WAAWA,CAACC,MAAc,EAAEC,IAAiB,EAAE;IAC7C,MAAMC,UAAU,GAAGL,SAAS,CAACM,GAAG,CAAEC,KAAK,IAAMA,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,GAAGA,KAAM,CAAC;IAEvE,KAAK,CACHJ,MAAM,EACN;MACE,GAAGC,IAAI;MACPI,EAAE,EAAET,uBAAuB;MAC3BU,WAAW,EAAE,CAAC;MACdC,QAAQ,EAAE,IAAIZ,QAAQ,CAAC;QACrBa,QAAQ,EAAE,gBAAgB;QAC1BF,WAAW,EAAE,CAAC;QACdG,UAAU,EAAE;UACVC,kBAAkB,EAAE;YAACC,IAAI,EAAE,CAAC;YAAEC,KAAK,EAAE,IAAIC,YAAY,CAAChB,SAAS;UAAC,CAAC;UACjEiB,SAAS,EAAE;YAACH,IAAI,EAAE,CAAC;YAAEC,KAAK,EAAE,IAAIC,YAAY,CAACX,UAAU;UAAC,CAAC;UACzDa,WAAW,EAAE;YAACJ,IAAI,EAAE,CAAC;YAAEC,KAAK,EAAE,IAAIC,YAAY,CAACX,UAAU;UAAC;QAC5D;MACF,CAAC;IACH,CACF,CAAC;EACH;AACF"}
1
+ {"version":3,"file":"clip-space.js","names":["glsl","Model","Geometry","CLIPSPACE_VERTEX_SHADER","POSITIONS","ClipSpace","constructor","device","opts","TEX_COORDS","map","coord","vs","vertexCount","geometry","topology","attributes","aClipSpacePosition","size","value","Float32Array","aTexCoord","aCoordinate"],"sources":["../../src/lib/clip-space.ts"],"sourcesContent":["\n// ClipSpace\nimport {Device, glsl} from '@luma.gl/core';\nimport {Model, ModelProps} from '../model/model';\nimport {Geometry} from '../geometry/geometry';\n\nconst CLIPSPACE_VERTEX_SHADER = glsl`\\\n#version 300 es\nin vec2 aClipSpacePosition;\nin vec2 aTexCoord;\nin vec2 aCoordinate;\n\nout vec2 position;\nout vec2 coordinate;\nout vec2 uv;\n\nvoid main(void) {\n gl_Position = vec4(aClipSpacePosition, 0., 1.);\n position = aClipSpacePosition;\n coordinate = aCoordinate;\n uv = aTexCoord;\n}\n`;\n\n/* eslint-disable indent, no-multi-spaces */\nconst POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];\n\n/**\n * A flat geometry that covers the \"visible area\" that the GPU renders.\n */\nexport class ClipSpace extends Model {\n constructor(device: Device, opts: Omit<ModelProps, 'vs' | 'vertexCount' | 'geometry'>) {\n const TEX_COORDS = POSITIONS.map((coord) => (coord === -1 ? 0 : coord));\n\n super(\n device,\n {\n ...opts,\n vs: CLIPSPACE_VERTEX_SHADER,\n vertexCount: 4,\n geometry: new Geometry({\n topology: 'triangle-strip',\n vertexCount: 4,\n attributes: {\n aClipSpacePosition: {size: 2, value: new Float32Array(POSITIONS)},\n aTexCoord: {size: 2, value: new Float32Array(TEX_COORDS)},\n aCoordinate: {size: 2, value: new Float32Array(TEX_COORDS)}\n }\n })\n }\n );\n }\n}\n"],"mappings":"AAEA,SAAgBA,IAAI,QAAO,eAAe;AAAC,SACnCC,KAAK;AAAA,SACLC,QAAQ;AAEhB,MAAMC,uBAAuB,GAAGH,IAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAGD,MAAMI,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAK9C,OAAO,MAAMC,SAAS,SAASJ,KAAK,CAAC;EACnCK,WAAWA,CAACC,MAAc,EAAEC,IAAyD,EAAE;IACrF,MAAMC,UAAU,GAAGL,SAAS,CAACM,GAAG,CAAEC,KAAK,IAAMA,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,GAAGA,KAAM,CAAC;IAEvE,KAAK,CACHJ,MAAM,EACN;MACE,GAAGC,IAAI;MACPI,EAAE,EAAET,uBAAuB;MAC3BU,WAAW,EAAE,CAAC;MACdC,QAAQ,EAAE,IAAIZ,QAAQ,CAAC;QACrBa,QAAQ,EAAE,gBAAgB;QAC1BF,WAAW,EAAE,CAAC;QACdG,UAAU,EAAE;UACVC,kBAAkB,EAAE;YAACC,IAAI,EAAE,CAAC;YAAEC,KAAK,EAAE,IAAIC,YAAY,CAAChB,SAAS;UAAC,CAAC;UACjEiB,SAAS,EAAE;YAACH,IAAI,EAAE,CAAC;YAAEC,KAAK,EAAE,IAAIC,YAAY,CAACX,UAAU;UAAC,CAAC;UACzDa,WAAW,EAAE;YAACJ,IAAI,EAAE,CAAC;YAAEC,KAAK,EAAE,IAAIC,YAAY,CAACX,UAAU;UAAC;QAC5D;MACF,CAAC;IACH,CACF,CAAC;EACH;AACF"}
package/dist.min.js CHANGED
@@ -6,7 +6,7 @@
6
6
  else root['luma'] = factory();})(globalThis, function () {
7
7
  "use strict";var __exports__=(()=>{var en=Object.defineProperty;var mf=Object.getOwnPropertyDescriptor;var df=Object.getOwnPropertyNames;var yf=Object.prototype.hasOwnProperty;var vf=(t,e)=>{for(var r in e)en(t,r,{get:e[r],enumerable:!0})},gf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of df(e))!yf.call(t,i)&&i!==r&&en(t,i,{get:()=>e[i],enumerable:!(n=mf(e,i))||n.enumerable});return t};var _f=t=>gf(en({},"__esModule",{value:!0}),t);var mv={};vf(mv,{AnimationLoop:()=>_r,AnimationLoopTemplate:()=>ci,BufferTransform:()=>iu,ClipSpace:()=>bu,ConeGeometry:()=>Lu,CubeGeometry:()=>Cu,CylinderGeometry:()=>Bu,GPUGeometry:()=>Fr,Geometry:()=>ut,GroupNode:()=>Su,IcoSphereGeometry:()=>Hu,KeyFrames:()=>si,Model:()=>bt,ModelNode:()=>Pu,PipelineFactory:()=>Je,PlaneGeometry:()=>Zu,ScenegraphNode:()=>Wt,SphereGeometry:()=>ef,TextureTransform:()=>fu,Timeline:()=>oi,TruncatedConeGeometry:()=>ve,_ShaderInputs:()=>Cr,makeAnimationLoop:()=>To});function Oe(t){return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(t)}function bf(t,e){return Sf(t)||xf(t,e)||ii(t,e)||wf()}function wf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
8
8
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xf(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,u=[],s=!0,f=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(p){f=!0,i=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}function Sf(t){if(Array.isArray(t))return t}function rn(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ii(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
9
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(t)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function ii(t,e){if(t){if(typeof t=="string")return ri(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ri(t,e)}}function ri(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pf(n.key),n)}}function Of(t,e,r){return e&&ni(t.prototype,e),r&&ni(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pf(t){var e=Ef(t,"string");return Oe(e)==="symbol"?e:String(e)}function Ef(t,e){if(Oe(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Oe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Af(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Tf=1,kf=1,oi=function(){function t(){Af(this,t),this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}var e=t.prototype;return e.addChannel=function(n){var i=n.delay,o=i===void 0?0:i,a=n.duration,u=a===void 0?Number.POSITIVE_INFINITY:a,s=n.rate,f=s===void 0?1:s,p=n.repeat,d=p===void 0?1:p,g=Tf++,S={time:0,delay:o,duration:u,rate:f,repeat:d};return this._setChannelTime(S,this.time),this.channels.set(g,S),g},e.removeChannel=function(n){this.channels.delete(n);var i=rn(this.animations),o;try{for(i.s();!(o=i.n()).done;){var a=bf(o.value,2),u=a[0],s=a[1];s.channel===n&&this.detachAnimation(u)}}catch(f){i.e(f)}finally{i.f()}},e.isFinished=function(n){var i=this.channels.get(n);return i===void 0?!1:this.time>=i.delay+i.duration*i.repeat},e.getTime=function(n){if(n===void 0)return this.time;var i=this.channels.get(n);return i===void 0?-1:i.time},e.setTime=function(n){this.time=Math.max(0,n);var i=this.channels.values(),o=rn(i),a;try{for(o.s();!(a=o.n()).done;){var u=a.value;this._setChannelTime(u,this.time)}}catch(x){o.e(x)}finally{o.f()}var s=this.animations.values(),f=rn(s),p;try{for(f.s();!(p=f.n()).done;){var d=p.value,g=d.animation,S=d.channel;g.setTime(this.getTime(S))}}catch(x){f.e(x)}finally{f.f()}},e.play=function(){this.playing=!0},e.pause=function(){this.playing=!1,this.lastEngineTime=-1},e.reset=function(){this.setTime(0)},e.attachAnimation=function(n,i){var o=kf++;return this.animations.set(o,{animation:n,channel:i}),n.setTime(this.getTime(i)),o},e.detachAnimation=function(n){this.animations.delete(n)},e.update=function(n){this.playing&&(this.lastEngineTime===-1&&(this.lastEngineTime=n),this.setTime(this.time+(n-this.lastEngineTime)),this.lastEngineTime=n)},e._setChannelTime=function(n,i){var o=i-n.delay,a=n.duration*n.repeat;o>=a?n.time=n.duration*n.rate:(n.time=Math.max(0,o)%n.duration,n.time*=n.rate)},Of(t)}();function Pe(t){return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function ai(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,If(n.key),n)}}function Mf(t,e,r){return e&&ai(t.prototype,e),r&&ai(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function If(t){var e=Rf(t,"string");return Pe(e)==="symbol"?e:String(e)}function Rf(t,e){if(Pe(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Pe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var si=function(){function t(r){Lf(this,t),this.startIndex=-1,this.endIndex=-1,this.factor=0,this.times=[],this.values=[],this._lastTime=-1,this.setKeyFrames(r),this.setTime(0)}var e=t.prototype;return e.setKeyFrames=function(n){var i=n.length;this.times.length=i,this.values.length=i;for(var o=0;o<i;++o)this.times[o]=n[o][0],this.values[o]=n[o][1];this._calculateKeys(this._lastTime)},e.setTime=function(n){n=Math.max(0,n),n!==this._lastTime&&(this._calculateKeys(n),this._lastTime=n)},e.getStartTime=function(){return this.times[this.startIndex]},e.getEndTime=function(){return this.times[this.endIndex]},e.getStartData=function(){return this.values[this.startIndex]},e.getEndData=function(){return this.values[this.endIndex]},e._calculateKeys=function(n){var i=0,o=this.times.length;for(i=0;i<o-2&&!(this.times[i+1]>n);++i);this.startIndex=i,this.endIndex=i+1;var a=this.times[this.startIndex],u=this.times[this.endIndex];this.factor=Math.min(Math.max(0,(n-a)/(u-a)),1)},Mf(t)}();function Ht(t){return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(t)}function nn(){"use strict";nn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(h,c,l){h[c]=l.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(h,c,l){return Object.defineProperty(h,c,{value:l,enumerable:!0,configurable:!0,writable:!0}),h[c]}try{s({},"")}catch{s=function(l,y,b){return l[y]=b}}function f(h,c,l,y){var b=c&&c.prototype instanceof g?c:g,v=Object.create(b.prototype),T=new V(y||[]);return n(v,"_invoke",{value:I(h,l,T)}),v}function p(h,c,l){try{return{type:"normal",arg:h.call(c,l)}}catch(y){return{type:"throw",arg:y}}}t.wrap=f;var d={};function g(){}function S(){}function x(){}var O={};s(O,o,function(){return this});var A=Object.getPrototypeOf,P=A&&A(A(B([])));P&&P!==e&&r.call(P,o)&&(O=P);var M=x.prototype=g.prototype=Object.create(O);function k(h){["next","throw","return"].forEach(function(c){s(h,c,function(l){return this._invoke(c,l)})})}function L(h,c){function l(b,v,T,R){var N=p(h[b],h,v);if(N.type!=="throw"){var q=N.arg,z=q.value;return z&&Ht(z)=="object"&&r.call(z,"__await")?c.resolve(z.__await).then(function(K){l("next",K,T,R)},function(K){l("throw",K,T,R)}):c.resolve(z).then(function(K){q.value=K,T(q)},function(K){return l("throw",K,T,R)})}R(N.arg)}var y;n(this,"_invoke",{value:function(v,T){function R(){return new c(function(N,q){l(v,T,N,q)})}return y=y?y.then(R,R):R()}})}function I(h,c,l){var y="suspendedStart";return function(b,v){if(y==="executing")throw new Error("Generator is already running");if(y==="completed"){if(b==="throw")throw v;return F()}for(l.method=b,l.arg=v;;){var T=l.delegate;if(T){var R=j(T,l);if(R){if(R===d)continue;return R}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(y==="suspendedStart")throw y="completed",l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);y="executing";var N=p(h,c,l);if(N.type==="normal"){if(y=l.done?"completed":"suspendedYield",N.arg===d)continue;return{value:N.arg,done:l.done}}N.type==="throw"&&(y="completed",l.method="throw",l.arg=N.arg)}}}function j(h,c){var l=c.method,y=h.iterator[l];if(y===void 0)return c.delegate=null,l==="throw"&&h.iterator.return&&(c.method="return",c.arg=void 0,j(h,c),c.method==="throw")||l!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+l+"' method")),d;var b=p(y,h.iterator,c.arg);if(b.type==="throw")return c.method="throw",c.arg=b.arg,c.delegate=null,d;var v=b.arg;return v?v.done?(c[h.resultName]=v.value,c.next=h.nextLoc,c.method!=="return"&&(c.method="next",c.arg=void 0),c.delegate=null,d):v:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,d)}function U(h){var c={tryLoc:h[0]};1 in h&&(c.catchLoc=h[1]),2 in h&&(c.finallyLoc=h[2],c.afterLoc=h[3]),this.tryEntries.push(c)}function G(h){var c=h.completion||{};c.type="normal",delete c.arg,h.completion=c}function V(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(U,this),this.reset(!0)}function B(h){if(h){var c=h[o];if(c)return c.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var l=-1,y=function b(){for(;++l<h.length;)if(r.call(h,l))return b.value=h[l],b.done=!1,b;return b.value=void 0,b.done=!0,b};return y.next=y}}return{next:F}}function F(){return{value:void 0,done:!0}}return S.prototype=x,n(M,"constructor",{value:x,configurable:!0}),n(x,"constructor",{value:S,configurable:!0}),S.displayName=s(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(h){var c=typeof h=="function"&&h.constructor;return!!c&&(c===S||(c.displayName||c.name)==="GeneratorFunction")},t.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,x):(h.__proto__=x,s(h,u,"GeneratorFunction")),h.prototype=Object.create(M),h},t.awrap=function(h){return{__await:h}},k(L.prototype),s(L.prototype,a,function(){return this}),t.AsyncIterator=L,t.async=function(h,c,l,y,b){b===void 0&&(b=Promise);var v=new L(f(h,c,l,y),b);return t.isGeneratorFunction(c)?v:v.next().then(function(T){return T.done?T.value:v.next()})},k(M),s(M,u,"Generator"),s(M,o,function(){return this}),s(M,"toString",function(){return"[object Generator]"}),t.keys=function(h){var c=Object(h),l=[];for(var y in c)l.push(y);return l.reverse(),function b(){for(;l.length;){var v=l.pop();if(v in c)return b.value=v,b.done=!1,b}return b.done=!0,b}},t.values=B,V.prototype={constructor:V,reset:function(c){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(G),!c)for(var l in this)l.charAt(0)==="t"&&r.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=void 0)},stop:function(){this.done=!0;var c=this.tryEntries[0].completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(c){if(this.done)throw c;var l=this;function y(q,z){return T.type="throw",T.arg=c,l.next=q,z&&(l.method="next",l.arg=void 0),!!z}for(var b=this.tryEntries.length-1;b>=0;--b){var v=this.tryEntries[b],T=v.completion;if(v.tryLoc==="root")return y("end");if(v.tryLoc<=this.prev){var R=r.call(v,"catchLoc"),N=r.call(v,"finallyLoc");if(R&&N){if(this.prev<v.catchLoc)return y(v.catchLoc,!0);if(this.prev<v.finallyLoc)return y(v.finallyLoc)}else if(R){if(this.prev<v.catchLoc)return y(v.catchLoc,!0)}else{if(!N)throw new Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return y(v.finallyLoc)}}}},abrupt:function(c,l){for(var y=this.tryEntries.length-1;y>=0;--y){var b=this.tryEntries[y];if(b.tryLoc<=this.prev&&r.call(b,"finallyLoc")&&this.prev<b.finallyLoc){var v=b;break}}v&&(c==="break"||c==="continue")&&v.tryLoc<=l&&l<=v.finallyLoc&&(v=null);var T=v?v.completion:{};return T.type=c,T.arg=l,v?(this.method="next",this.next=v.finallyLoc,d):this.complete(T)},complete:function(c,l){if(c.type==="throw")throw c.arg;return c.type==="break"||c.type==="continue"?this.next=c.arg:c.type==="return"?(this.rval=this.arg=c.arg,this.method="return",this.next="end"):c.type==="normal"&&l&&(this.next=l),d},finish:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.finallyLoc===c)return this.complete(y.completion,y.afterLoc),G(y),d}},catch:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.tryLoc===c){var b=y.completion;if(b.type==="throw"){var v=b.arg;G(y)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(c,l,y){return this.delegate={iterator:B(c),resultName:l,nextLoc:y},this.method==="next"&&(this.arg=void 0),d}},t}function ui(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(f){r(f);return}u.done?e(s):Promise.resolve(s).then(n,i)}function jf(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(s){ui(o,n,i,a,u,"next",s)}function u(s){ui(o,n,i,a,u,"throw",s)}a(void 0)})}}function fi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Df(n.key),n)}}function Nf(t,e,r){return e&&fi(t.prototype,e),r&&fi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Df(t){var e=Cf(t,"string");return Ht(e)==="symbol"?e:String(e)}function Cf(t,e){if(Ht(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ht(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ff(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ci=function(){function t(r){Ff(this,t)}var e=t.prototype;return e.onInitialize=function(){var r=jf(nn().mark(function i(o){return nn().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",null);case 1:case"end":return u.stop()}},i)}));function n(i){return r.apply(this,arguments)}return n}(),Nf(t)}();function on(t){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 e=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,r=t||e;return!!(r&&r.indexOf("Electron")>=0)}function ft(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||on()}var Uf=globalThis.self||globalThis.window||globalThis.global,Kt=globalThis.window||globalThis.self||globalThis.global,Gf=globalThis.document||{},Nt=globalThis.process||{},zf=globalThis.console,xv=globalThis.navigator||{};var cr=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",Pv=ft();function Bf(t){try{let e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}var lr=class{constructor(e,r){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=Bf(n),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){let r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}};function li(t){let e;return t<10?e="".concat(t.toFixed(2),"ms"):t<100?e="".concat(t.toFixed(1),"ms"):t<1e3?e="".concat(t.toFixed(0),"ms"):e="".concat((t/1e3).toFixed(2),"s"),e}function hi(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,r=Math.max(e-t.length,0);return"".concat(" ".repeat(r)).concat(t)}function hr(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(r=Math.min(r,n/t.width));let o=t.width*r,a=t.height*r,u=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),u]}var pr;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(pr||(pr={}));var Vf=10;function pi(t){return typeof t!="string"?t:(t=t.toUpperCase(),pr[t]||pr.WHITE)}function mi(t,e,r){if(!ft&&typeof t=="string"){if(e){let n=pi(e);t="\x1B[".concat(n,"m").concat(t,"\x1B[39m")}if(r){let n=pi(r);t="\x1B[".concat(n+Vf,"m").concat(t,"\x1B[49m")}}return t}function di(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r),i=t;for(let o of n){let a=i[o];typeof a=="function"&&(e.find(u=>o===u)||(i[o]=a.bind(t)))}}function Yt(t,e){if(!t)throw new Error(e||"Assertion failed")}function Dt(){let t;if(ft()&&Kt.performance){var e,r;t=Kt===null||Kt===void 0||(e=Kt.performance)===null||e===void 0||(r=e.now)===null||r===void 0?void 0:r.call(e)}else if("hrtime"in Nt){var n;let i=Nt===null||Nt===void 0||(n=Nt.hrtime)===null||n===void 0?void 0:n.call(Nt);t=i[0]*1e3+i[1]/1e6}else t=Date.now();return t}var Xt={debug:ft()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},qf={enabled:!0,level:0};function pt(){}var yi={},vi={once:!0},At=class{constructor(){let{id:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=cr,this._startTs=Dt(),this._deltaTs=Dt(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new lr("__probe-".concat(this.id,"__"),qf),this.timeStamp("".concat(this.id," started")),di(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Dt()-this._startTs).toPrecision(10))}getDelta(){return Number((Dt()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){Yt(e,r)}warn(e){return this._getLogFunction(0,e,Xt.warn,arguments,vi)}error(e){return this._getLogFunction(0,e,Xt.error,arguments)}deprecated(e,r){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(r,"` instead"))}removed(e,r){return this.error("`".concat(e,"` has been removed. Use `").concat(r,"` instead"))}probe(e,r){return this._getLogFunction(e,r,Xt.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,Xt.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,Xt.debug||Xt.info,arguments,vi)}table(e,r,n){return r?this._getLogFunction(e,r,console.table||pt,n&&[n],{tag:Yf(r)}):pt}image(e){let{logLevel:r,priority:n,image:i,message:o="",scale:a=1}=e;return this._shouldLog(r||n)?ft()?Kf({image:i,message:o,scale:a}):Hf({image:i,message:o,scale:a}):pt}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||pt)}group(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=gi({logLevel:e,message:r,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(e,r,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||pt)}withGroup(e,r,n){this.group(e,r)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=_i(e)}_getLogFunction(e,r,n,i,o){if(this._shouldLog(e)){o=gi({logLevel:e,message:r,args:i,opts:o}),n=n||o.method,Yt(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Dt();let a=o.tag||o.message;if(o.once&&a)if(!yi[a])yi[a]=Dt();else return pt;return r=Wf(this.id,o.message,o),n.bind(console,r,...o.args)}return pt}};At.VERSION=cr;function _i(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return Yt(Number.isFinite(e)&&e>=0),e}function gi(t){let{logLevel:e,message:r}=t;t.logLevel=_i(e);let n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break;default:}typeof t.message=="function"&&(t.message=t.message());let i=typeof t.message;return Yt(i==="string"||i==="object"),Object.assign(t,{args:n},t.opts)}function Wf(t,e,r){if(typeof e=="string"){let n=r.time?hi(li(r.total)):"";e=r.time?"".concat(t,": ").concat(n," ").concat(e):"".concat(t,": ").concat(e),e=mi(e,r.color,r.background)}return e}function Hf(t){let{image:e,message:r="",scale:n=1}=t;return console.warn("removed"),pt}function Kf(t){let{image:e,message:r="",scale:n=1}=t;if(typeof e=="string"){let o=new Image;return o.onload=()=>{let a=hr(o,r,n);console.log(...a)},o.src=e,pt}let i=e.nodeName||"";if(i.toLowerCase()==="img")return console.log(...hr(e,r,n)),pt;if(i.toLowerCase()==="canvas"){let o=new Image;return o.onload=()=>console.log(...hr(o,r,n)),o.src=e.toDataURL(),pt}return pt}function Yf(t){for(let e in t)for(let r in t[e])return r||"untitled";return"empty"}var $v=new At({id:"@probe.gl/log"});var Y=new At({id:"luma.gl"});function Ee(){let t;if(typeof window<"u"&&window.performance)t=window.performance.now();else if(typeof process<"u"&&process.hrtime){let e=process.hrtime();t=e[0]*1e3+e[1]/1e6}else t=Date.now();return t}var Ct=class{constructor(e,r){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=e,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(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Ee(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Ee()-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 Tt=class{constructor(e){this.id=void 0,this.stats={},this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"count";return this._getOrCreate({name:e,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let e of Object.values(this.stats))e.reset();return this}forEach(e){for(let r of Object.values(this.stats))e(r)}getTable(){let e={};return this.forEach(r=>{e[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),e}_initializeStats(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(r=>this._getOrCreate(r))}_getOrCreate(e){let{name:r,type:n}=e,i=this.stats[r];return i||(e instanceof Ct?i=e:i=new Ct(r,n),this.stats[r]=i),i}};function Ae(t){return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(t)}function bi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$f(n.key),n)}}function Xf(t,e,r){return e&&bi(t.prototype,e),r&&bi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $f(t){var e=Zf(t,"string");return Ae(e)==="symbol"?e:String(e)}function Zf(t,e){if(Ae(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ae(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Qf=function(){function t(){Jf(this,t),this.stats=new Map}var e=t.prototype;return e.getStats=function(n){return this.get(n)},e.get=function(n){return this.stats.has(n)||this.stats.set(n,new Tt({id:n})),this.stats.get(n)},Xf(t)}(),$t=new Qf;function tc(){var t=typeof __VERSION__<"u"?__VERSION__:"running from source",e="set luma.log.level=1 (or higher) to trace rendering";if(globalThis.luma&&globalThis.luma.VERSION!==t)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(t));return globalThis.luma||(ft()&&Y.log(1,"".concat(t," - ").concat(e))(),globalThis.luma=globalThis.luma||{VERSION:t,version:t,log:Y,stats:$t}),t}var wi=tc();function xi(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)?t:null}function mt(t){return Array.isArray(t)?t.length===0||typeof t[0]=="number"?t:null:xi(t)}var an={};function X(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"id";an[t]=an[t]||1;var e=an[t]++;return"".concat(t,"-").concat(e)}function Te(t){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(t)}function Si(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ec(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Si(Object(r),!0).forEach(function(n){rc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rc(t,e,r){return e=Pi(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Oi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pi(n.key),n)}}function nc(t,e,r){return e&&Oi(t.prototype,e),r&&Oi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pi(t){var e=ic(t,"string");return Te(e)==="symbol"?e:String(e)}function ic(t,e){if(Te(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Te(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ft=function(){function t(r,n,i){if(oc(this,t),this.id=void 0,this.props=void 0,this.userData={},this.device=void 0,this._device=void 0,this.destroyed=!1,this.allocatedBytes=0,this._attachedResources=new Set,!r)throw new Error("no device");this._device=r,this.props=ac(n,i);var o=this.props.id!=="undefined"?this.props.id:X(this[Symbol.toStringTag]);this.props.id=o,this.id=o,this.userData=this.props.userData||{},this.addStats()}var e=t.prototype;return e.destroy=function(){this.destroyResource()},e.delete=function(){return this.destroy(),this},e.toString=function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")},e.getProps=function(){return this.props},e.attachResource=function(n){this._attachedResources.add(n)},e.detachResource=function(n){this._attachedResources.delete(n)},e.destroyAttachedResource=function(n){this._attachedResources.delete(n)&&n.destroy()},e.destroyAttachedResources=function(){for(var n=0,i=Object.values(this._attachedResources);n<i.length;n++){var o=i[n];o.destroy()}this._attachedResources=new Set},e.destroyResource=function(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0},e.removeStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("".concat(i,"s Active")).decrementCount()},e.trackAllocatedMemory=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this[Symbol.toStringTag],o=this._device.statsManager.getStats("Resource Counts");o.get("GPU Memory").addCount(n),o.get("".concat(i," Memory")).addCount(n),this.allocatedBytes=n},e.trackDeallocatedMemory=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this[Symbol.toStringTag],i=this._device.statsManager.getStats("Resource Counts");i.get("GPU Memory").subtractCount(this.allocatedBytes),i.get("".concat(n," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0},e.addStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("Resources Created").incrementCount(),n.get("".concat(i,"s Created")).incrementCount(),n.get("".concat(i,"s Active")).incrementCount()},nc(t)}();Ft.defaultProps={id:"undefined",handle:void 0,userData:void 0};function ac(t,e){var r=ec({},e);for(var n in t)t[n]!==void 0&&(r[n]=t[n]);return r}function Zt(t){return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zt(t)}var Ti;function Ei(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function sn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ei(Object(r),!0).forEach(function(n){sc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ei(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sc(t,e,r){return e=ki(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ai(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ki(n.key),n)}}function fc(t,e,r){return e&&Ai(t.prototype,e),r&&Ai(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ki(t){var e=cc(t,"string");return Zt(e)==="symbol"?e:String(e)}function cc(t,e){if(Zt(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Zt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function lc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&un(t,e)}function un(t,e){return un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},un(t,e)}function hc(t){var e=dc();return function(){var n=mr(t),i;if(e){var o=mr(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return pc(this,i)}}function pc(t,e){if(e&&(Zt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mc(t)}function mc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dc(){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 mr(t){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mr(t)}Ti=Symbol.toStringTag;var $=function(t){lc(r,t);var e=hc(r);function r(i,o){var a;uc(this,r);var u=sn({},o);return(o.usage||0)&r.INDEX&&!o.indexType&&(o.data instanceof Uint32Array?u.indexType="uint32":o.data instanceof Uint16Array&&(u.indexType="uint16")),a=e.call(this,i,u,r.defaultProps),a.usage=void 0,a.indexType=void 0,a.byteLength=void 0,a.debugData=new ArrayBuffer(0),a.usage=o.usage||0,a.indexType=u.indexType,a}var n=r.prototype;return n.readSyncWebGL2=function(o,a){throw new Error("not implemented")},n._setDebugData=function(o,a,u){var s=ArrayBuffer.isView(o)?o.buffer:o,f=Math.min(o?o.byteLength:u,r.DEBUG_DATA_MAX_LENGTH);o===null?this.debugData=new ArrayBuffer(f):a===0&&u===o.byteLength?this.debugData=s.slice(0,f):this.debugData=s.slice(a,a+f)},fc(r,[{key:Ti,get:function(){return"Buffer"}}]),r}(Ft);$.defaultProps=sn(sn({},Ft.defaultProps),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});$.MAP_READ=1;$.MAP_WRITE=2;$.COPY_SRC=4;$.COPY_DST=8;$.INDEX=16;$.VERTEX=32;$.UNIFORM=64;$.STORAGE=128;$.INDIRECT=256;$.QUERY_RESOLVE=512;$.DEBUG_DATA_MAX_LENGTH=32;function ke(t){return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(t)}var Ri;function Mi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mi(Object(r),!0).forEach(function(n){yc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mi(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yc(t,e,r){return e=Li(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ii(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Li(n.key),n)}}function gc(t,e,r){return e&&Ii(t.prototype,e),r&&Ii(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Li(t){var e=_c(t,"string");return ke(e)==="symbol"?e:String(e)}function _c(t,e){if(ke(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ke(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}Ri=Symbol.toStringTag;var Me=function(){function t(r){vc(this,t),this.id=void 0,this.statsManager=$t,this.props=void 0,this.userData={},this._lumaData={},this.info=void 0,this.lost=void 0,this.canvasContext=void 0,this.props=fn(fn({},t.defaultProps),r),this.id=this.props.id||X(this[Symbol.toStringTag].toLowerCase())}var e=t.prototype;return e.loseDevice=function(){return!1},e.getCanvasContext=function(){if(!this.canvasContext)throw new Error("Device has no CanvasContext");return this.canvasContext},e.createTexture=function(n){return(n instanceof Promise||typeof n=="string")&&(n={data:n}),this._createTexture(n)},e.createCommandEncoder=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};throw new Error("not implemented")},e.readPixelsToArrayWebGL=function(n,i){throw new Error("not implemented")},e.readPixelsToBufferWebGL2=function(n,i){throw new Error("not implemented")},e.setParametersWebGL=function(n){throw new Error("not implemented")},e.withParametersWebGL=function(n,i){throw new Error("not implemented")},e.clearWebGL=function(n){throw new Error("not implemented")},e._getBufferProps=function(n){(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});var i=fn({},n);return(n.usage||0)&$.INDEX&&!n.indexType&&(n.data instanceof Uint32Array?i.indexType="uint32":n.data instanceof Uint16Array?i.indexType="uint16":Y.warn("indices buffer content must be of integer type")()),i},gc(t,[{key:Ri,get:function(){return"Device"}}]),t}();Me.defaultProps={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(Y.get("debug")),break:[],gl:null};Me.VERSION=wi;function et(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}function Jt(t){return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(t)}function cn(){"use strict";cn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(h,c,l){h[c]=l.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(h,c,l){return Object.defineProperty(h,c,{value:l,enumerable:!0,configurable:!0,writable:!0}),h[c]}try{s({},"")}catch{s=function(l,y,b){return l[y]=b}}function f(h,c,l,y){var b=c&&c.prototype instanceof g?c:g,v=Object.create(b.prototype),T=new V(y||[]);return n(v,"_invoke",{value:I(h,l,T)}),v}function p(h,c,l){try{return{type:"normal",arg:h.call(c,l)}}catch(y){return{type:"throw",arg:y}}}t.wrap=f;var d={};function g(){}function S(){}function x(){}var O={};s(O,o,function(){return this});var A=Object.getPrototypeOf,P=A&&A(A(B([])));P&&P!==e&&r.call(P,o)&&(O=P);var M=x.prototype=g.prototype=Object.create(O);function k(h){["next","throw","return"].forEach(function(c){s(h,c,function(l){return this._invoke(c,l)})})}function L(h,c){function l(b,v,T,R){var N=p(h[b],h,v);if(N.type!=="throw"){var q=N.arg,z=q.value;return z&&Jt(z)=="object"&&r.call(z,"__await")?c.resolve(z.__await).then(function(K){l("next",K,T,R)},function(K){l("throw",K,T,R)}):c.resolve(z).then(function(K){q.value=K,T(q)},function(K){return l("throw",K,T,R)})}R(N.arg)}var y;n(this,"_invoke",{value:function(v,T){function R(){return new c(function(N,q){l(v,T,N,q)})}return y=y?y.then(R,R):R()}})}function I(h,c,l){var y="suspendedStart";return function(b,v){if(y==="executing")throw new Error("Generator is already running");if(y==="completed"){if(b==="throw")throw v;return F()}for(l.method=b,l.arg=v;;){var T=l.delegate;if(T){var R=j(T,l);if(R){if(R===d)continue;return R}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(y==="suspendedStart")throw y="completed",l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);y="executing";var N=p(h,c,l);if(N.type==="normal"){if(y=l.done?"completed":"suspendedYield",N.arg===d)continue;return{value:N.arg,done:l.done}}N.type==="throw"&&(y="completed",l.method="throw",l.arg=N.arg)}}}function j(h,c){var l=c.method,y=h.iterator[l];if(y===void 0)return c.delegate=null,l==="throw"&&h.iterator.return&&(c.method="return",c.arg=void 0,j(h,c),c.method==="throw")||l!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+l+"' method")),d;var b=p(y,h.iterator,c.arg);if(b.type==="throw")return c.method="throw",c.arg=b.arg,c.delegate=null,d;var v=b.arg;return v?v.done?(c[h.resultName]=v.value,c.next=h.nextLoc,c.method!=="return"&&(c.method="next",c.arg=void 0),c.delegate=null,d):v:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,d)}function U(h){var c={tryLoc:h[0]};1 in h&&(c.catchLoc=h[1]),2 in h&&(c.finallyLoc=h[2],c.afterLoc=h[3]),this.tryEntries.push(c)}function G(h){var c=h.completion||{};c.type="normal",delete c.arg,h.completion=c}function V(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(U,this),this.reset(!0)}function B(h){if(h){var c=h[o];if(c)return c.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var l=-1,y=function b(){for(;++l<h.length;)if(r.call(h,l))return b.value=h[l],b.done=!1,b;return b.value=void 0,b.done=!0,b};return y.next=y}}return{next:F}}function F(){return{value:void 0,done:!0}}return S.prototype=x,n(M,"constructor",{value:x,configurable:!0}),n(x,"constructor",{value:S,configurable:!0}),S.displayName=s(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(h){var c=typeof h=="function"&&h.constructor;return!!c&&(c===S||(c.displayName||c.name)==="GeneratorFunction")},t.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,x):(h.__proto__=x,s(h,u,"GeneratorFunction")),h.prototype=Object.create(M),h},t.awrap=function(h){return{__await:h}},k(L.prototype),s(L.prototype,a,function(){return this}),t.AsyncIterator=L,t.async=function(h,c,l,y,b){b===void 0&&(b=Promise);var v=new L(f(h,c,l,y),b);return t.isGeneratorFunction(c)?v:v.next().then(function(T){return T.done?T.value:v.next()})},k(M),s(M,u,"Generator"),s(M,o,function(){return this}),s(M,"toString",function(){return"[object Generator]"}),t.keys=function(h){var c=Object(h),l=[];for(var y in c)l.push(y);return l.reverse(),function b(){for(;l.length;){var v=l.pop();if(v in c)return b.value=v,b.done=!1,b}return b.done=!0,b}},t.values=B,V.prototype={constructor:V,reset:function(c){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(G),!c)for(var l in this)l.charAt(0)==="t"&&r.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=void 0)},stop:function(){this.done=!0;var c=this.tryEntries[0].completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(c){if(this.done)throw c;var l=this;function y(q,z){return T.type="throw",T.arg=c,l.next=q,z&&(l.method="next",l.arg=void 0),!!z}for(var b=this.tryEntries.length-1;b>=0;--b){var v=this.tryEntries[b],T=v.completion;if(v.tryLoc==="root")return y("end");if(v.tryLoc<=this.prev){var R=r.call(v,"catchLoc"),N=r.call(v,"finallyLoc");if(R&&N){if(this.prev<v.catchLoc)return y(v.catchLoc,!0);if(this.prev<v.finallyLoc)return y(v.finallyLoc)}else if(R){if(this.prev<v.catchLoc)return y(v.catchLoc,!0)}else{if(!N)throw new Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return y(v.finallyLoc)}}}},abrupt:function(c,l){for(var y=this.tryEntries.length-1;y>=0;--y){var b=this.tryEntries[y];if(b.tryLoc<=this.prev&&r.call(b,"finallyLoc")&&this.prev<b.finallyLoc){var v=b;break}}v&&(c==="break"||c==="continue")&&v.tryLoc<=l&&l<=v.finallyLoc&&(v=null);var T=v?v.completion:{};return T.type=c,T.arg=l,v?(this.method="next",this.next=v.finallyLoc,d):this.complete(T)},complete:function(c,l){if(c.type==="throw")throw c.arg;return c.type==="break"||c.type==="continue"?this.next=c.arg:c.type==="return"?(this.rval=this.arg=c.arg,this.method="return",this.next="end"):c.type==="normal"&&l&&(this.next=l),d},finish:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.finallyLoc===c)return this.complete(y.completion,y.afterLoc),G(y),d}},catch:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.tryLoc===c){var b=y.completion;if(b.type==="throw"){var v=b.arg;G(y)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(c,l,y){return this.delegate={iterator:B(c),resultName:l,nextLoc:y},this.method==="next"&&(this.arg=void 0),d}},t}function ji(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ni(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ji(Object(r),!0).forEach(function(n){bc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ji(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function bc(t,e,r){return e=Ui(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Di(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(f){r(f);return}u.done?e(s):Promise.resolve(s).then(n,i)}function wc(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(s){Di(o,n,i,a,u,"next",s)}function u(s){Di(o,n,i,a,u,"throw",s)}a(void 0)})}}function xc(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Sc(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(t)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function ii(t,e){if(t){if(typeof t=="string")return ri(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ri(t,e)}}function ri(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pf(n.key),n)}}function Of(t,e,r){return e&&ni(t.prototype,e),r&&ni(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pf(t){var e=Ef(t,"string");return Oe(e)==="symbol"?e:String(e)}function Ef(t,e){if(Oe(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Oe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Af(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Tf=1,kf=1,oi=function(){function t(){Af(this,t),this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}var e=t.prototype;return e.addChannel=function(n){var i=n.delay,o=i===void 0?0:i,a=n.duration,u=a===void 0?Number.POSITIVE_INFINITY:a,s=n.rate,f=s===void 0?1:s,p=n.repeat,d=p===void 0?1:p,g=Tf++,S={time:0,delay:o,duration:u,rate:f,repeat:d};return this._setChannelTime(S,this.time),this.channels.set(g,S),g},e.removeChannel=function(n){this.channels.delete(n);var i=rn(this.animations),o;try{for(i.s();!(o=i.n()).done;){var a=bf(o.value,2),u=a[0],s=a[1];s.channel===n&&this.detachAnimation(u)}}catch(f){i.e(f)}finally{i.f()}},e.isFinished=function(n){var i=this.channels.get(n);return i===void 0?!1:this.time>=i.delay+i.duration*i.repeat},e.getTime=function(n){if(n===void 0)return this.time;var i=this.channels.get(n);return i===void 0?-1:i.time},e.setTime=function(n){this.time=Math.max(0,n);var i=this.channels.values(),o=rn(i),a;try{for(o.s();!(a=o.n()).done;){var u=a.value;this._setChannelTime(u,this.time)}}catch(x){o.e(x)}finally{o.f()}var s=this.animations.values(),f=rn(s),p;try{for(f.s();!(p=f.n()).done;){var d=p.value,g=d.animation,S=d.channel;g.setTime(this.getTime(S))}}catch(x){f.e(x)}finally{f.f()}},e.play=function(){this.playing=!0},e.pause=function(){this.playing=!1,this.lastEngineTime=-1},e.reset=function(){this.setTime(0)},e.attachAnimation=function(n,i){var o=kf++;return this.animations.set(o,{animation:n,channel:i}),n.setTime(this.getTime(i)),o},e.detachAnimation=function(n){this.animations.delete(n)},e.update=function(n){this.playing&&(this.lastEngineTime===-1&&(this.lastEngineTime=n),this.setTime(this.time+(n-this.lastEngineTime)),this.lastEngineTime=n)},e._setChannelTime=function(n,i){var o=i-n.delay,a=n.duration*n.repeat;o>=a?n.time=n.duration*n.rate:(n.time=Math.max(0,o)%n.duration,n.time*=n.rate)},Of(t)}();function Pe(t){return Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function ai(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,If(n.key),n)}}function Mf(t,e,r){return e&&ai(t.prototype,e),r&&ai(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function If(t){var e=Rf(t,"string");return Pe(e)==="symbol"?e:String(e)}function Rf(t,e){if(Pe(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Pe(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var si=function(){function t(r){Lf(this,t),this.startIndex=-1,this.endIndex=-1,this.factor=0,this.times=[],this.values=[],this._lastTime=-1,this.setKeyFrames(r),this.setTime(0)}var e=t.prototype;return e.setKeyFrames=function(n){var i=n.length;this.times.length=i,this.values.length=i;for(var o=0;o<i;++o)this.times[o]=n[o][0],this.values[o]=n[o][1];this._calculateKeys(this._lastTime)},e.setTime=function(n){n=Math.max(0,n),n!==this._lastTime&&(this._calculateKeys(n),this._lastTime=n)},e.getStartTime=function(){return this.times[this.startIndex]},e.getEndTime=function(){return this.times[this.endIndex]},e.getStartData=function(){return this.values[this.startIndex]},e.getEndData=function(){return this.values[this.endIndex]},e._calculateKeys=function(n){var i=0,o=this.times.length;for(i=0;i<o-2&&!(this.times[i+1]>n);++i);this.startIndex=i,this.endIndex=i+1;var a=this.times[this.startIndex],u=this.times[this.endIndex];this.factor=Math.min(Math.max(0,(n-a)/(u-a)),1)},Mf(t)}();function Ht(t){return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(t)}function nn(){"use strict";nn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(h,c,l){h[c]=l.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(h,c,l){return Object.defineProperty(h,c,{value:l,enumerable:!0,configurable:!0,writable:!0}),h[c]}try{s({},"")}catch{s=function(l,y,b){return l[y]=b}}function f(h,c,l,y){var b=c&&c.prototype instanceof g?c:g,v=Object.create(b.prototype),T=new V(y||[]);return n(v,"_invoke",{value:I(h,l,T)}),v}function p(h,c,l){try{return{type:"normal",arg:h.call(c,l)}}catch(y){return{type:"throw",arg:y}}}t.wrap=f;var d={};function g(){}function S(){}function x(){}var O={};s(O,o,function(){return this});var A=Object.getPrototypeOf,P=A&&A(A(B([])));P&&P!==e&&r.call(P,o)&&(O=P);var M=x.prototype=g.prototype=Object.create(O);function k(h){["next","throw","return"].forEach(function(c){s(h,c,function(l){return this._invoke(c,l)})})}function L(h,c){function l(b,v,T,R){var N=p(h[b],h,v);if(N.type!=="throw"){var q=N.arg,z=q.value;return z&&Ht(z)=="object"&&r.call(z,"__await")?c.resolve(z.__await).then(function(K){l("next",K,T,R)},function(K){l("throw",K,T,R)}):c.resolve(z).then(function(K){q.value=K,T(q)},function(K){return l("throw",K,T,R)})}R(N.arg)}var y;n(this,"_invoke",{value:function(v,T){function R(){return new c(function(N,q){l(v,T,N,q)})}return y=y?y.then(R,R):R()}})}function I(h,c,l){var y="suspendedStart";return function(b,v){if(y==="executing")throw new Error("Generator is already running");if(y==="completed"){if(b==="throw")throw v;return F()}for(l.method=b,l.arg=v;;){var T=l.delegate;if(T){var R=j(T,l);if(R){if(R===d)continue;return R}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(y==="suspendedStart")throw y="completed",l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);y="executing";var N=p(h,c,l);if(N.type==="normal"){if(y=l.done?"completed":"suspendedYield",N.arg===d)continue;return{value:N.arg,done:l.done}}N.type==="throw"&&(y="completed",l.method="throw",l.arg=N.arg)}}}function j(h,c){var l=c.method,y=h.iterator[l];if(y===void 0)return c.delegate=null,l==="throw"&&h.iterator.return&&(c.method="return",c.arg=void 0,j(h,c),c.method==="throw")||l!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+l+"' method")),d;var b=p(y,h.iterator,c.arg);if(b.type==="throw")return c.method="throw",c.arg=b.arg,c.delegate=null,d;var v=b.arg;return v?v.done?(c[h.resultName]=v.value,c.next=h.nextLoc,c.method!=="return"&&(c.method="next",c.arg=void 0),c.delegate=null,d):v:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,d)}function U(h){var c={tryLoc:h[0]};1 in h&&(c.catchLoc=h[1]),2 in h&&(c.finallyLoc=h[2],c.afterLoc=h[3]),this.tryEntries.push(c)}function G(h){var c=h.completion||{};c.type="normal",delete c.arg,h.completion=c}function V(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(U,this),this.reset(!0)}function B(h){if(h){var c=h[o];if(c)return c.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var l=-1,y=function b(){for(;++l<h.length;)if(r.call(h,l))return b.value=h[l],b.done=!1,b;return b.value=void 0,b.done=!0,b};return y.next=y}}return{next:F}}function F(){return{value:void 0,done:!0}}return S.prototype=x,n(M,"constructor",{value:x,configurable:!0}),n(x,"constructor",{value:S,configurable:!0}),S.displayName=s(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(h){var c=typeof h=="function"&&h.constructor;return!!c&&(c===S||(c.displayName||c.name)==="GeneratorFunction")},t.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,x):(h.__proto__=x,s(h,u,"GeneratorFunction")),h.prototype=Object.create(M),h},t.awrap=function(h){return{__await:h}},k(L.prototype),s(L.prototype,a,function(){return this}),t.AsyncIterator=L,t.async=function(h,c,l,y,b){b===void 0&&(b=Promise);var v=new L(f(h,c,l,y),b);return t.isGeneratorFunction(c)?v:v.next().then(function(T){return T.done?T.value:v.next()})},k(M),s(M,u,"Generator"),s(M,o,function(){return this}),s(M,"toString",function(){return"[object Generator]"}),t.keys=function(h){var c=Object(h),l=[];for(var y in c)l.push(y);return l.reverse(),function b(){for(;l.length;){var v=l.pop();if(v in c)return b.value=v,b.done=!1,b}return b.done=!0,b}},t.values=B,V.prototype={constructor:V,reset:function(c){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(G),!c)for(var l in this)l.charAt(0)==="t"&&r.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=void 0)},stop:function(){this.done=!0;var c=this.tryEntries[0].completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(c){if(this.done)throw c;var l=this;function y(q,z){return T.type="throw",T.arg=c,l.next=q,z&&(l.method="next",l.arg=void 0),!!z}for(var b=this.tryEntries.length-1;b>=0;--b){var v=this.tryEntries[b],T=v.completion;if(v.tryLoc==="root")return y("end");if(v.tryLoc<=this.prev){var R=r.call(v,"catchLoc"),N=r.call(v,"finallyLoc");if(R&&N){if(this.prev<v.catchLoc)return y(v.catchLoc,!0);if(this.prev<v.finallyLoc)return y(v.finallyLoc)}else if(R){if(this.prev<v.catchLoc)return y(v.catchLoc,!0)}else{if(!N)throw new Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return y(v.finallyLoc)}}}},abrupt:function(c,l){for(var y=this.tryEntries.length-1;y>=0;--y){var b=this.tryEntries[y];if(b.tryLoc<=this.prev&&r.call(b,"finallyLoc")&&this.prev<b.finallyLoc){var v=b;break}}v&&(c==="break"||c==="continue")&&v.tryLoc<=l&&l<=v.finallyLoc&&(v=null);var T=v?v.completion:{};return T.type=c,T.arg=l,v?(this.method="next",this.next=v.finallyLoc,d):this.complete(T)},complete:function(c,l){if(c.type==="throw")throw c.arg;return c.type==="break"||c.type==="continue"?this.next=c.arg:c.type==="return"?(this.rval=this.arg=c.arg,this.method="return",this.next="end"):c.type==="normal"&&l&&(this.next=l),d},finish:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.finallyLoc===c)return this.complete(y.completion,y.afterLoc),G(y),d}},catch:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.tryLoc===c){var b=y.completion;if(b.type==="throw"){var v=b.arg;G(y)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(c,l,y){return this.delegate={iterator:B(c),resultName:l,nextLoc:y},this.method==="next"&&(this.arg=void 0),d}},t}function ui(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(f){r(f);return}u.done?e(s):Promise.resolve(s).then(n,i)}function jf(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(s){ui(o,n,i,a,u,"next",s)}function u(s){ui(o,n,i,a,u,"throw",s)}a(void 0)})}}function fi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Df(n.key),n)}}function Nf(t,e,r){return e&&fi(t.prototype,e),r&&fi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Df(t){var e=Cf(t,"string");return Ht(e)==="symbol"?e:String(e)}function Cf(t,e){if(Ht(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ht(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ff(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ci=function(){function t(r){Ff(this,t)}var e=t.prototype;return e.onInitialize=function(){var r=jf(nn().mark(function i(o){return nn().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",null);case 1:case"end":return u.stop()}},i)}));function n(i){return r.apply(this,arguments)}return n}(),Nf(t)}();function on(t){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 e=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent,r=t||e;return!!(r&&r.indexOf("Electron")>=0)}function ft(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||on()}var Uf=globalThis.self||globalThis.window||globalThis.global,Kt=globalThis.window||globalThis.self||globalThis.global,Gf=globalThis.document||{},Nt=globalThis.process||{},zf=globalThis.console,xv=globalThis.navigator||{};var cr=typeof __VERSION__<"u"?__VERSION__:"untranspiled source",Pv=ft();function Bf(t){try{let e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}var lr=class{constructor(e,r){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=Bf(n),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){let r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){let r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}};function li(t){let e;return t<10?e="".concat(t.toFixed(2),"ms"):t<100?e="".concat(t.toFixed(1),"ms"):t<1e3?e="".concat(t.toFixed(0),"ms"):e="".concat((t/1e3).toFixed(2),"s"),e}function hi(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8,r=Math.max(e-t.length,0);return"".concat(" ".repeat(r)).concat(t)}function hr(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600,i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(r=Math.min(r,n/t.width));let o=t.width*r,a=t.height*r,u=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),u]}var pr;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(pr||(pr={}));var Vf=10;function pi(t){return typeof t!="string"?t:(t=t.toUpperCase(),pr[t]||pr.WHITE)}function mi(t,e,r){if(!ft&&typeof t=="string"){if(e){let n=pi(e);t="\x1B[".concat(n,"m").concat(t,"\x1B[39m")}if(r){let n=pi(r);t="\x1B[".concat(n+Vf,"m").concat(t,"\x1B[49m")}}return t}function di(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"],r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r),i=t;for(let o of n){let a=i[o];typeof a=="function"&&(e.find(u=>o===u)||(i[o]=a.bind(t)))}}function Yt(t,e){if(!t)throw new Error(e||"Assertion failed")}function Dt(){let t;if(ft()&&Kt.performance){var e,r;t=Kt===null||Kt===void 0||(e=Kt.performance)===null||e===void 0||(r=e.now)===null||r===void 0?void 0:r.call(e)}else if("hrtime"in Nt){var n;let i=Nt===null||Nt===void 0||(n=Nt.hrtime)===null||n===void 0?void 0:n.call(Nt);t=i[0]*1e3+i[1]/1e6}else t=Date.now();return t}var Xt={debug:ft()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},qf={enabled:!0,level:0};function pt(){}var yi={},vi={once:!0},At=class{constructor(){let{id:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};this.id=void 0,this.VERSION=cr,this._startTs=Dt(),this._deltaTs=Dt(),this._storage=void 0,this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new lr("__probe-".concat(this.id,"__"),qf),this.timeStamp("".concat(this.id," started")),di(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Dt()-this._startTs).toPrecision(10))}getDelta(){return Number((Dt()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){Yt(e,r)}warn(e){return this._getLogFunction(0,e,Xt.warn,arguments,vi)}error(e){return this._getLogFunction(0,e,Xt.error,arguments)}deprecated(e,r){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(r,"` instead"))}removed(e,r){return this.error("`".concat(e,"` has been removed. Use `").concat(r,"` instead"))}probe(e,r){return this._getLogFunction(e,r,Xt.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,Xt.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,Xt.debug||Xt.info,arguments,vi)}table(e,r,n){return r?this._getLogFunction(e,r,console.table||pt,n&&[n],{tag:Yf(r)}):pt}image(e){let{logLevel:r,priority:n,image:i,message:o="",scale:a=1}=e;return this._shouldLog(r||n)?ft()?Kf({image:i,message:o,scale:a}):Hf({image:i,message:o,scale:a}):pt}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||pt)}group(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1},i=gi({logLevel:e,message:r,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(e,r,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||pt)}withGroup(e,r,n){this.group(e,r)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=_i(e)}_getLogFunction(e,r,n,i,o){if(this._shouldLog(e)){o=gi({logLevel:e,message:r,args:i,opts:o}),n=n||o.method,Yt(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Dt();let a=o.tag||o.message;if(o.once&&a)if(!yi[a])yi[a]=Dt();else return pt;return r=Wf(this.id,o.message,o),n.bind(console,r,...o.args)}return pt}};At.VERSION=cr;function _i(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return Yt(Number.isFinite(e)&&e>=0),e}function gi(t){let{logLevel:e,message:r}=t;t.logLevel=_i(e);let n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break;default:}typeof t.message=="function"&&(t.message=t.message());let i=typeof t.message;return Yt(i==="string"||i==="object"),Object.assign(t,{args:n},t.opts)}function Wf(t,e,r){if(typeof e=="string"){let n=r.time?hi(li(r.total)):"";e=r.time?"".concat(t,": ").concat(n," ").concat(e):"".concat(t,": ").concat(e),e=mi(e,r.color,r.background)}return e}function Hf(t){let{image:e,message:r="",scale:n=1}=t;return console.warn("removed"),pt}function Kf(t){let{image:e,message:r="",scale:n=1}=t;if(typeof e=="string"){let o=new Image;return o.onload=()=>{let a=hr(o,r,n);console.log(...a)},o.src=e,pt}let i=e.nodeName||"";if(i.toLowerCase()==="img")return console.log(...hr(e,r,n)),pt;if(i.toLowerCase()==="canvas"){let o=new Image;return o.onload=()=>console.log(...hr(o,r,n)),o.src=e.toDataURL(),pt}return pt}function Yf(t){for(let e in t)for(let r in t[e])return r||"untitled";return"empty"}var $v=new At({id:"@probe.gl/log"});var Y=new At({id:"luma.gl"});function Ee(){let t;if(typeof window<"u"&&window.performance)t=window.performance.now();else if(typeof process<"u"&&process.hrtime){let e=process.hrtime();t=e[0]*1e3+e[1]/1e6}else t=Date.now();return t}var Ct=class{constructor(e,r){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=e,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(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Ee(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Ee()-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 Tt=class{constructor(e){this.id=void 0,this.stats={},this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"count";return this._getOrCreate({name:e,type:r})}get size(){return Object.keys(this.stats).length}reset(){for(let e of Object.values(this.stats))e.reset();return this}forEach(e){for(let r of Object.values(this.stats))e(r)}getTable(){let e={};return this.forEach(r=>{e[r.name]={time:r.time||0,count:r.count||0,average:r.getAverageTime()||0,hz:r.getHz()||0}}),e}_initializeStats(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(r=>this._getOrCreate(r))}_getOrCreate(e){let{name:r,type:n}=e,i=this.stats[r];return i||(e instanceof Ct?i=e:i=new Ct(r,n),this.stats[r]=i),i}};function Ae(t){return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(t)}function bi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$f(n.key),n)}}function Xf(t,e,r){return e&&bi(t.prototype,e),r&&bi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $f(t){var e=Zf(t,"string");return Ae(e)==="symbol"?e:String(e)}function Zf(t,e){if(Ae(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ae(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Qf=function(){function t(){Jf(this,t),this.stats=new Map}var e=t.prototype;return e.getStats=function(n){return this.get(n)},e.get=function(n){return this.stats.has(n)||this.stats.set(n,new Tt({id:n})),this.stats.get(n)},Xf(t)}(),$t=new Qf;function tc(){var t=typeof __VERSION__<"u"?__VERSION__:"running from source",e="set luma.log.level=1 (or higher) to trace rendering";if(globalThis.luma&&globalThis.luma.VERSION!==t)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(t));return globalThis.luma||(ft()&&Y.log(1,"".concat(t," - ").concat(e))(),globalThis.luma=globalThis.luma||{VERSION:t,version:t,log:Y,stats:$t}),t}var wi=tc();function xi(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)?t:null}function mt(t){return Array.isArray(t)?t.length===0||typeof t[0]=="number"?t:null:xi(t)}var an={};function X(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"id";an[t]=an[t]||1;var e=an[t]++;return"".concat(t,"-").concat(e)}function Te(t){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(t)}function Si(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ec(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Si(Object(r),!0).forEach(function(n){rc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function rc(t,e,r){return e=Pi(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Oi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pi(n.key),n)}}function nc(t,e,r){return e&&Oi(t.prototype,e),r&&Oi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pi(t){var e=ic(t,"string");return Te(e)==="symbol"?e:String(e)}function ic(t,e){if(Te(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Te(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ft=function(){function t(r,n,i){if(oc(this,t),this.id=void 0,this.props=void 0,this.userData={},this.device=void 0,this._device=void 0,this.destroyed=!1,this.allocatedBytes=0,this._attachedResources=new Set,!r)throw new Error("no device");this._device=r,this.props=ac(n,i);var o=this.props.id!=="undefined"?this.props.id:X(this[Symbol.toStringTag]);this.props.id=o,this.id=o,this.userData=this.props.userData||{},this.addStats()}var e=t.prototype;return e.destroy=function(){this.destroyResource()},e.delete=function(){return this.destroy(),this},e.toString=function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")},e.getProps=function(){return this.props},e.attachResource=function(n){this._attachedResources.add(n)},e.detachResource=function(n){this._attachedResources.delete(n)},e.destroyAttachedResource=function(n){this._attachedResources.delete(n)&&n.destroy()},e.destroyAttachedResources=function(){for(var n=0,i=Object.values(this._attachedResources);n<i.length;n++){var o=i[n];o.destroy()}this._attachedResources=new Set},e.destroyResource=function(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0},e.removeStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("".concat(i,"s Active")).decrementCount()},e.trackAllocatedMemory=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this[Symbol.toStringTag],o=this._device.statsManager.getStats("Resource Counts");o.get("GPU Memory").addCount(n),o.get("".concat(i," Memory")).addCount(n),this.allocatedBytes=n},e.trackDeallocatedMemory=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this[Symbol.toStringTag],i=this._device.statsManager.getStats("Resource Counts");i.get("GPU Memory").subtractCount(this.allocatedBytes),i.get("".concat(n," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0},e.addStats=function(){var n=this._device.statsManager.getStats("Resource Counts"),i=this[Symbol.toStringTag];n.get("Resources Created").incrementCount(),n.get("".concat(i,"s Created")).incrementCount(),n.get("".concat(i,"s Active")).incrementCount()},nc(t)}();Ft.defaultProps={id:"undefined",handle:void 0,userData:void 0};function ac(t,e){var r=ec({},e);for(var n in t)t[n]!==void 0&&(r[n]=t[n]);return r}function Zt(t){return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zt(t)}var Ti;function Ei(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function sn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ei(Object(r),!0).forEach(function(n){sc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ei(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sc(t,e,r){return e=ki(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ai(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ki(n.key),n)}}function fc(t,e,r){return e&&Ai(t.prototype,e),r&&Ai(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ki(t){var e=cc(t,"string");return Zt(e)==="symbol"?e:String(e)}function cc(t,e){if(Zt(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Zt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function lc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&un(t,e)}function un(t,e){return un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},un(t,e)}function hc(t){var e=dc();return function(){var n=mr(t),i;if(e){var o=mr(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return pc(this,i)}}function pc(t,e){if(e&&(Zt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mc(t)}function mc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dc(){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 mr(t){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mr(t)}Ti=Symbol.toStringTag;var $=function(t){lc(r,t);var e=hc(r);function r(i,o){var a;uc(this,r);var u=sn({},o);return(o.usage||0)&r.INDEX&&!o.indexType&&(o.data instanceof Uint32Array?u.indexType="uint32":o.data instanceof Uint16Array&&(u.indexType="uint16")),a=e.call(this,i,u,r.defaultProps),a.usage=void 0,a.indexType=void 0,a.byteLength=void 0,a.debugData=new ArrayBuffer(0),a.usage=o.usage||0,a.indexType=u.indexType,a}var n=r.prototype;return n.readSyncWebGL2=function(o,a){throw new Error("not implemented")},n._setDebugData=function(o,a,u){var s=ArrayBuffer.isView(o)?o.buffer:o,f=Math.min(o?o.byteLength:u,r.DEBUG_DATA_MAX_LENGTH);o===null?this.debugData=new ArrayBuffer(f):a===0&&u===o.byteLength?this.debugData=s.slice(0,f):this.debugData=s.slice(a,a+f)},fc(r,[{key:Ti,get:function(){return"Buffer"}}]),r}(Ft);$.defaultProps=sn(sn({},Ft.defaultProps),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});$.MAP_READ=1;$.MAP_WRITE=2;$.COPY_SRC=4;$.COPY_DST=8;$.INDEX=16;$.VERTEX=32;$.UNIFORM=64;$.STORAGE=128;$.INDIRECT=256;$.QUERY_RESOLVE=512;$.DEBUG_DATA_MAX_LENGTH=32;function ke(t){return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(t)}var Ri;function Mi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mi(Object(r),!0).forEach(function(n){yc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mi(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yc(t,e,r){return e=Li(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ii(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Li(n.key),n)}}function gc(t,e,r){return e&&Ii(t.prototype,e),r&&Ii(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Li(t){var e=_c(t,"string");return ke(e)==="symbol"?e:String(e)}function _c(t,e){if(ke(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ke(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}Ri=Symbol.toStringTag;var Me=function(){function t(r){vc(this,t),this.id=void 0,this.statsManager=$t,this.props=void 0,this.userData={},this._lumaData={},this.info=void 0,this.lost=void 0,this.canvasContext=void 0,this.props=fn(fn({},t.defaultProps),r),this.id=this.props.id||X(this[Symbol.toStringTag].toLowerCase())}var e=t.prototype;return e.loseDevice=function(){return!1},e.getCanvasContext=function(){if(!this.canvasContext)throw new Error("Device has no CanvasContext");return this.canvasContext},e.createTexture=function(n){return(n instanceof Promise||typeof n=="string")&&(n={data:n}),this._createTexture(n)},e.createCommandEncoder=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};throw new Error("not implemented")},e.readPixelsToArrayWebGL=function(n,i){throw new Error("not implemented")},e.readPixelsToBufferWebGL=function(n,i){throw new Error("not implemented")},e.setParametersWebGL=function(n){throw new Error("not implemented")},e.getParametersWebGL=function(n){throw new Error("not implemented")},e.withParametersWebGL=function(n,i){throw new Error("not implemented")},e.clearWebGL=function(n){throw new Error("not implemented")},e._getBufferProps=function(n){(n instanceof ArrayBuffer||ArrayBuffer.isView(n))&&(n={data:n});var i=fn({},n);return(n.usage||0)&$.INDEX&&!n.indexType&&(n.data instanceof Uint32Array?i.indexType="uint32":n.data instanceof Uint16Array?i.indexType="uint16":Y.warn("indices buffer content must be of integer type")()),i},gc(t,[{key:Ri,get:function(){return"Device"}}]),t}();Me.defaultProps={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(Y.get("debug")),break:[],gl:null};Me.VERSION=wi;function et(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}function Jt(t){return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(t)}function cn(){"use strict";cn=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(h,c,l){h[c]=l.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(h,c,l){return Object.defineProperty(h,c,{value:l,enumerable:!0,configurable:!0,writable:!0}),h[c]}try{s({},"")}catch{s=function(l,y,b){return l[y]=b}}function f(h,c,l,y){var b=c&&c.prototype instanceof g?c:g,v=Object.create(b.prototype),T=new V(y||[]);return n(v,"_invoke",{value:I(h,l,T)}),v}function p(h,c,l){try{return{type:"normal",arg:h.call(c,l)}}catch(y){return{type:"throw",arg:y}}}t.wrap=f;var d={};function g(){}function S(){}function x(){}var O={};s(O,o,function(){return this});var A=Object.getPrototypeOf,P=A&&A(A(B([])));P&&P!==e&&r.call(P,o)&&(O=P);var M=x.prototype=g.prototype=Object.create(O);function k(h){["next","throw","return"].forEach(function(c){s(h,c,function(l){return this._invoke(c,l)})})}function L(h,c){function l(b,v,T,R){var N=p(h[b],h,v);if(N.type!=="throw"){var q=N.arg,z=q.value;return z&&Jt(z)=="object"&&r.call(z,"__await")?c.resolve(z.__await).then(function(K){l("next",K,T,R)},function(K){l("throw",K,T,R)}):c.resolve(z).then(function(K){q.value=K,T(q)},function(K){return l("throw",K,T,R)})}R(N.arg)}var y;n(this,"_invoke",{value:function(v,T){function R(){return new c(function(N,q){l(v,T,N,q)})}return y=y?y.then(R,R):R()}})}function I(h,c,l){var y="suspendedStart";return function(b,v){if(y==="executing")throw new Error("Generator is already running");if(y==="completed"){if(b==="throw")throw v;return F()}for(l.method=b,l.arg=v;;){var T=l.delegate;if(T){var R=j(T,l);if(R){if(R===d)continue;return R}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(y==="suspendedStart")throw y="completed",l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);y="executing";var N=p(h,c,l);if(N.type==="normal"){if(y=l.done?"completed":"suspendedYield",N.arg===d)continue;return{value:N.arg,done:l.done}}N.type==="throw"&&(y="completed",l.method="throw",l.arg=N.arg)}}}function j(h,c){var l=c.method,y=h.iterator[l];if(y===void 0)return c.delegate=null,l==="throw"&&h.iterator.return&&(c.method="return",c.arg=void 0,j(h,c),c.method==="throw")||l!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+l+"' method")),d;var b=p(y,h.iterator,c.arg);if(b.type==="throw")return c.method="throw",c.arg=b.arg,c.delegate=null,d;var v=b.arg;return v?v.done?(c[h.resultName]=v.value,c.next=h.nextLoc,c.method!=="return"&&(c.method="next",c.arg=void 0),c.delegate=null,d):v:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,d)}function U(h){var c={tryLoc:h[0]};1 in h&&(c.catchLoc=h[1]),2 in h&&(c.finallyLoc=h[2],c.afterLoc=h[3]),this.tryEntries.push(c)}function G(h){var c=h.completion||{};c.type="normal",delete c.arg,h.completion=c}function V(h){this.tryEntries=[{tryLoc:"root"}],h.forEach(U,this),this.reset(!0)}function B(h){if(h){var c=h[o];if(c)return c.call(h);if(typeof h.next=="function")return h;if(!isNaN(h.length)){var l=-1,y=function b(){for(;++l<h.length;)if(r.call(h,l))return b.value=h[l],b.done=!1,b;return b.value=void 0,b.done=!0,b};return y.next=y}}return{next:F}}function F(){return{value:void 0,done:!0}}return S.prototype=x,n(M,"constructor",{value:x,configurable:!0}),n(x,"constructor",{value:S,configurable:!0}),S.displayName=s(x,u,"GeneratorFunction"),t.isGeneratorFunction=function(h){var c=typeof h=="function"&&h.constructor;return!!c&&(c===S||(c.displayName||c.name)==="GeneratorFunction")},t.mark=function(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,x):(h.__proto__=x,s(h,u,"GeneratorFunction")),h.prototype=Object.create(M),h},t.awrap=function(h){return{__await:h}},k(L.prototype),s(L.prototype,a,function(){return this}),t.AsyncIterator=L,t.async=function(h,c,l,y,b){b===void 0&&(b=Promise);var v=new L(f(h,c,l,y),b);return t.isGeneratorFunction(c)?v:v.next().then(function(T){return T.done?T.value:v.next()})},k(M),s(M,u,"Generator"),s(M,o,function(){return this}),s(M,"toString",function(){return"[object Generator]"}),t.keys=function(h){var c=Object(h),l=[];for(var y in c)l.push(y);return l.reverse(),function b(){for(;l.length;){var v=l.pop();if(v in c)return b.value=v,b.done=!1,b}return b.done=!0,b}},t.values=B,V.prototype={constructor:V,reset:function(c){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(G),!c)for(var l in this)l.charAt(0)==="t"&&r.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=void 0)},stop:function(){this.done=!0;var c=this.tryEntries[0].completion;if(c.type==="throw")throw c.arg;return this.rval},dispatchException:function(c){if(this.done)throw c;var l=this;function y(q,z){return T.type="throw",T.arg=c,l.next=q,z&&(l.method="next",l.arg=void 0),!!z}for(var b=this.tryEntries.length-1;b>=0;--b){var v=this.tryEntries[b],T=v.completion;if(v.tryLoc==="root")return y("end");if(v.tryLoc<=this.prev){var R=r.call(v,"catchLoc"),N=r.call(v,"finallyLoc");if(R&&N){if(this.prev<v.catchLoc)return y(v.catchLoc,!0);if(this.prev<v.finallyLoc)return y(v.finallyLoc)}else if(R){if(this.prev<v.catchLoc)return y(v.catchLoc,!0)}else{if(!N)throw new Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return y(v.finallyLoc)}}}},abrupt:function(c,l){for(var y=this.tryEntries.length-1;y>=0;--y){var b=this.tryEntries[y];if(b.tryLoc<=this.prev&&r.call(b,"finallyLoc")&&this.prev<b.finallyLoc){var v=b;break}}v&&(c==="break"||c==="continue")&&v.tryLoc<=l&&l<=v.finallyLoc&&(v=null);var T=v?v.completion:{};return T.type=c,T.arg=l,v?(this.method="next",this.next=v.finallyLoc,d):this.complete(T)},complete:function(c,l){if(c.type==="throw")throw c.arg;return c.type==="break"||c.type==="continue"?this.next=c.arg:c.type==="return"?(this.rval=this.arg=c.arg,this.method="return",this.next="end"):c.type==="normal"&&l&&(this.next=l),d},finish:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.finallyLoc===c)return this.complete(y.completion,y.afterLoc),G(y),d}},catch:function(c){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.tryLoc===c){var b=y.completion;if(b.type==="throw"){var v=b.arg;G(y)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(c,l,y){return this.delegate={iterator:B(c),resultName:l,nextLoc:y},this.method==="next"&&(this.arg=void 0),d}},t}function ji(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ni(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ji(Object(r),!0).forEach(function(n){bc(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ji(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function bc(t,e,r){return e=Ui(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Di(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(f){r(f);return}u.done?e(s):Promise.resolve(s).then(n,i)}function wc(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(s){Di(o,n,i,a,u,"next",s)}function u(s){Di(o,n,i,a,u,"throw",s)}a(void 0)})}}function xc(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Sc(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
10
10
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(t)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function Sc(t,e){if(t){if(typeof t=="string")return Ci(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ci(t,e)}}function Ci(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ui(n.key),n)}}function Oc(t,e,r){return e&&Fi(t.prototype,e),r&&Fi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ui(t){var e=Pc(t,"string");return Jt(e)==="symbol"?e:String(e)}function Pc(t,e){if(Jt(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Jt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ec(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ut=new Map,Gt=function(){function t(){Ec(this,t)}return t.registerDevices=function(r){var n=xc(r),i;try{for(n.s();!(i=n.n()).done;){var o=i.value;et(o.type&&o.isSupported&&o.create),Ut.set(o.type,o)}}catch(a){n.e(a)}finally{n.f()}},t.getAvailableDevices=function(){return Array.from(Ut).map(function(r){return r.type})},t.getSupportedDevices=function(){return Array.from(Ut).filter(function(r){return r.isSupported()}).map(function(r){return r.type})},t.setDefaultDeviceProps=function(r){Object.assign(Me.defaultProps,r)},t.createDevice=function(){var e=wc(cn().mark(function n(){var i,o,a=arguments;return cn().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:i=a.length>0&&a[0]!==void 0?a[0]:{},i=Ni(Ni({},Me.defaultProps),i),i.gl&&(i.type="webgl"),s.t0=i.type,s.next=s.t0==="webgpu"?6:s.t0==="webgl"||s.t0==="webgl1"||s.t0==="webgl2"?12:s.t0==="best-available"?18:29;break;case 6:if(o=Ut.get("webgpu"),!o){s.next=11;break}return s.next=10,o.create(i);case 10:return s.abrupt("return",s.sent);case 11:return s.abrupt("break",29);case 12:if(o=Ut.get("webgl"),!o){s.next=17;break}return s.next=16,o.create(i);case 16:return s.abrupt("return",s.sent);case 17:return s.abrupt("break",29);case 18:if(o=Ut.get("webgpu"),!(o&&o.isSupported())){s.next=23;break}return s.next=22,o.create(i);case 22:return s.abrupt("return",s.sent);case 23:if(o=Ut.get("webgl"),!(o&&o.isSupported())){s.next=28;break}return s.next=27,o.create(i);case 27:return s.abrupt("return",s.sent);case 28:return s.abrupt("break",29);case 29:throw new Error("No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.");case 30:case"end":return s.stop()}},n)}));function r(){return e.apply(this,arguments)}return r}(),Oc(t)}();Gt.stats=$t;Gt.log=Y;function Qt(t){return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(t)}var Vi;function Gi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function zi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gi(Object(r),!0).forEach(function(n){Ac(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gi(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ac(t,e,r){return e=qi(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qi(n.key),n)}}function kc(t,e,r){return e&&Bi(t.prototype,e),r&&Bi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function qi(t){var e=Mc(t,"string");return Qt(e)==="symbol"?e:String(e)}function Mc(t,e){if(Qt(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Qt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ic(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ln(t,e)}function ln(t,e){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},ln(t,e)}function Rc(t){var e=Nc();return function(){var n=dr(t),i;if(e){var o=dr(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Lc(this,i)}}function Lc(t,e){if(e&&(Qt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jc(t)}function jc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nc(){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 dr(t){return dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dr(t)}Vi=Symbol.toStringTag;var te=function(t){Ic(r,t);var e=Rc(r);function r(n,i){var o;return Tc(this,r),o=e.call(this,n,i,r.defaultProps),o.hash="",o.vs=void 0,o.fs=void 0,o.shaderLayout=void 0,o.bufferLayout=void 0,o.shaderLayout=o.props.shaderLayout,o.bufferLayout=o.props.bufferLayout||[],o}return kc(r,[{key:Vi,get:function(){return"RenderPipeline"}}]),r}(Ft);te.defaultProps=zi(zi({},Ft.defaultProps),{},{vs:null,vsEntryPoint:"",vsConstants:{},fs:null,fsEntryPoint:"",fsConstants:{},shaderLayout:null,bufferLayout:[],topology:"triangle-list",parameters:{},vertexCount:0,instanceCount:0,bindings:{},uniforms:{}});function Dc(t,e){return Gc(t)||Uc(t,e)||Fc(t,e)||Cc()}function Cc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
11
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fc(t,e){if(t){if(typeof t=="string")return Wi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wi(t,e)}}function Wi(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Uc(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,u=[],s=!0,f=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(p){f=!0,i=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}function Gc(t){if(Array.isArray(t))return t}function Hi(t){var e=Dc(Bc[t],2),r=e[0],n=e[1],i=r==="i32"||r==="u32",o=r!=="u32",a=Vc[r]*n,u=zc(r,n);return{dataType:r,components:n,defaultVertexFormat:u,byteLength:a,integer:i,signed:o}}function zc(t,e){var r;switch(t){case"f32":r="float32";break;case"i32":r="sint32";break;case"u32":r="uint32";break;case"f16":return e<=2?"float16x2":"float16x4"}return e===1?r:"".concat(r,"x").concat(e)}var Bc={f32:["f32",1],"vec2<f32>":["f32",2],"vec3<f32>":["f32",3],"vec4<f32>":["f32",4],f16:["f16",1],"vec2<f16>":["f16",2],"vec3<f16>":["f16",3],"vec4<f16>":["f16",4],i32:["i32",1],"vec2<i32>":["i32",2],"vec3<i32>":["i32",3],"vec4<i32>":["i32",4],u32:["u32",1],"vec2<u32>":["u32",2],"vec3<u32>":["u32",3],"vec4<u32>":["u32",4]},Vc={f32:4,f16:2,i32:4,u32:4};function Yi(t){var e=Ki[t],r=qc(e),n=t.includes("norm"),i=!n&&!t.startsWith("float"),o=t.startsWith("s");return{dataType:Ki[t],byteLength:r,integer:i,signed:o,normalized:n}}function qc(t){var e=Wc[t];return e}var Ki={uint8:"uint8",sint8:"sint8",unorm8:"uint8",snorm8:"sint8",uint16:"uint16",sint16:"sint16",unorm16:"uint16",snorm16:"sint16",float16:"float16",float32:"float32",uint32:"uint32",sint32:"sint32"},Wc={uint8:1,sint8:1,uint16:2,sint16:2,float16:2,float32:4,uint32:4,sint32:4};function Hc(t,e){return $c(t)||Xc(t,e)||Yc(t,e)||Kc()}function Kc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
12
12
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yc(t,e){if(t){if(typeof t=="string")return Xi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xi(t,e)}}function Xi(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xc(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,u=[],s=!0,f=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(p){f=!0,i=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}function $c(t){if(Array.isArray(t))return t}function hn(t){var e;t.endsWith("-webgl")&&(t.replace("-webgl",""),e=!0);var r=t.split("x"),n=Hc(r,2),i=n[0],o=n[1],a=i,u=o?parseInt(o):1,s=Yi(a),f={type:a,components:u,byteLength:s.byteLength*u,integer:s.integer,signed:s.signed,normalized:s.normalized};return e&&(f.webglOnly=!0),f}function Ie(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Zc(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
@@ -256,7 +256,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
256
256
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sm(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Om(t){if(Array.isArray(t))return Gn(t)}function Qs(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=zn(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(f){throw f},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
257
257
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,u;return{s:function(){r=r.call(t)},n:function(){var f=r.next();return o=f.done,f},e:function(f){a=!0,u=f},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}}}function tr(t,e){return Am(t)||Em(t,e)||zn(t,e)||Pm()}function Pm(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
258
258
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zn(t,e){if(t){if(typeof t=="string")return Gn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gn(t,e)}}function Gn(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Em(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,u=[],s=!0,f=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(p){f=!0,i=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}function Am(t){if(Array.isArray(t))return t}function Xs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xs(Object(r),!0).forEach(function(n){Tm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xs(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Tm(t,e,r){return e=tu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tu(n.key),n)}}function km(t,e,r){return e&&$s(t.prototype,e),r&&$s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function tu(t){var e=Mm(t,"string");return er(e)==="symbol"?e:String(e)}function Mm(t,e){if(er(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(er(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Im(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var le=2,Rm=1e4,bt=function(){function t(r,n){var i,o,a;Im(this,t),this.device=void 0,this.id=void 0,this.vs=void 0,this.fs=void 0,this.pipelineFactory=void 0,this.userData={},this.parameters=void 0,this.topology=void 0,this.bufferLayout=void 0,this.vertexCount=void 0,this.instanceCount=0,this.indexBuffer=null,this.bufferAttributes={},this.constantAttributes={},this.bindings={},this.uniforms={},this.vertexArray=void 0,this.transformFeedback=null,this.pipeline=void 0,this.shaderInputs=void 0,this._uniformStore=void 0,this._pipelineNeedsUpdate="newly created",this._attributeInfos={},this._gpuGeometry=null,this._getModuleUniforms=void 0,this.props=void 0,this._lastLogTime=0,this._logOpen=!1,this._drawCount=0,this.props=Ot(Ot({},t.defaultProps),n),n=this.props,this.id=n.id||X("model"),this.device=r,Object.assign(this.userData,n.userData);var u=Object.fromEntries(((i=this.props.modules)===null||i===void 0?void 0:i.map(function(P){return[P.name,P]}))||[]);this.setShaderInputs(n.shaderInputs||new Cr(u));var s=this.device.info.type==="webgpu";if(this.props.source){if(s){var f;(f=this.props).shaderLayout||(f.shaderLayout=Tr(this.props.source))}this.props.fs=this.props.source,this.props.vs=this.props.source}if(s&&typeof this.props.vs!="string"){var p;(p=this.props).shaderLayout||(p.shaderLayout=Tr(this.props.vs.wgsl))}var d=Lm(r),g=(((o=this.props.modules)===null||o===void 0?void 0:o.length)>0?this.props.modules:(a=this.shaderInputs)===null||a===void 0?void 0:a.getModules())||[],S=this.props.shaderAssembler.assembleShaders(Ot(Ot({platformInfo:d},this.props),{},{modules:g})),x=S.vs,O=S.fs,A=S.getUniforms;if(this.vs=x,this.fs=O,this._getModuleUniforms=A,this.vertexCount=this.props.vertexCount,this.instanceCount=this.props.instanceCount,this.topology=this.props.topology,this.bufferLayout=this.props.bufferLayout,this.parameters=this.props.parameters,n.geometry&&(this._gpuGeometry=this.setGeometry(n.geometry)),this.pipelineFactory=n.pipelineFactory||Je.getDefaultPipelineFactory(this.device),this.pipeline=this._updatePipeline(),this.vertexArray=r.createVertexArray({renderPipeline:this.pipeline}),this._gpuGeometry&&this._setGeometryAttributes(this._gpuGeometry),n.vertexCount&&this.setVertexCount(n.vertexCount),n.instanceCount&&this.setInstanceCount(n.instanceCount),n.indices)throw new Error("Model.props.indices removed. Use props.indexBuffer");n.indexBuffer&&this.setIndexBuffer(n.indexBuffer),n.attributes&&this.setAttributes(n.attributes),n.constantAttributes&&this.setConstantAttributes(n.constantAttributes),n.bindings&&this.setBindings(n.bindings),n.uniforms&&this.setUniforms(n.uniforms),n.moduleSettings&&(Y.warn("Model.props.moduleSettings is deprecated. Use Model.shaderInputs.setProps()")(),this.updateModuleSettings(n.moduleSettings)),n.transformFeedback&&(this.transformFeedback=n.transformFeedback),Object.seal(this)}var e=t.prototype;return e.destroy=function(){this.pipelineFactory.release(this.pipeline),this._uniformStore.destroy()},e.predraw=function(){this.updateShaderInputs()},e.draw=function(n){this.predraw();try{this._logDrawCallStart(),this.pipeline=this._updatePipeline(),this.pipeline.setBindings(this.bindings),this.pipeline.setUniforms(this.uniforms);var i=this.vertexArray.indexBuffer,o=i?i.byteLength/(i.indexType==="uint32"?4:2):void 0;this.pipeline.draw({renderPass:n,vertexArray:this.vertexArray,vertexCount:this.vertexCount,instanceCount:this.instanceCount,indexCount:o,transformFeedback:this.transformFeedback})}finally{this._logDrawCallEnd()}this._logFramebuffer(n)},e.setGeometry=function(n){var i=n&&zs(this.device,n);return this.setTopology(i.topology||"triangle-list"),this.bufferLayout=Zs(i.bufferLayout,this.bufferLayout),this.vertexArray&&this._setGeometryAttributes(i),i},e._setGeometryAttributes=function(n){for(var i=this,o=Ot({},n.attributes),a=function(){var p=tr(s[u],1),d=p[0];!i.pipeline.shaderLayout.attributes.find(function(g){return g.name===d})&&d!=="positions"&&delete o[d]},u=0,s=Object.entries(o);u<s.length;u++)a();this.vertexCount=n.vertexCount,this.setIndexBuffer(n.indices),this.setAttributes(n.attributes,"ignore-unknown"),this.setAttributes(o)},e.setTopology=function(n){n!==this.topology&&(this.topology=n,this._setPipelineNeedsUpdate("topology"))},e.setBufferLayout=function(n){this.bufferLayout=this._gpuGeometry?Zs(n,this._gpuGeometry.bufferLayout):n,this._setPipelineNeedsUpdate("bufferLayout"),this.pipeline=this._updatePipeline(),this.vertexArray=this.device.createVertexArray({renderPipeline:this.pipeline}),this._gpuGeometry&&this._setGeometryAttributes(this._gpuGeometry)},e.setParameters=function(n){Ne(n,this.parameters,2)||(this.parameters=n,this._setPipelineNeedsUpdate("parameters"))},e.setVertexCount=function(n){this.vertexCount=n},e.setInstanceCount=function(n){this.instanceCount=n},e.setShaderInputs=function(n){this.shaderInputs=n,this._uniformStore=new mn(this.shaderInputs.modules);for(var i=0,o=Object.keys(this.shaderInputs.modules);i<o.length;i++){var a=o[i],u=this._uniformStore.getManagedUniformBuffer(this.device,a);this.bindings["".concat(a,"Uniforms")]=u}},e.setShaderModuleProps=function(n){var i=this._getModuleUniforms(n),o=Object.keys(i).filter(function(p){var d=i[p];return!mt(d)&&typeof d!="number"&&typeof d!="boolean"}),a={},u=Qs(o),s;try{for(u.s();!(s=u.n()).done;){var f=s.value;a[f]=i[f],delete i[f]}}catch(p){u.e(p)}finally{u.f()}},e.updateShaderInputs=function(){this._uniformStore.setUniforms(this.shaderInputs.getUniformValues())},e.updateModuleSettings=function(n){Y.warn("Model.updateModuleSettings is deprecated. Use Model.shaderInputs.setProps()")();var i=vn(this._getModuleUniforms(n)),o=i.bindings,a=i.uniforms;Object.assign(this.bindings,o),Object.assign(this.uniforms,a)},e.setBindings=function(n){Object.assign(this.bindings,n)},e.setUniforms=function(n){this.pipeline.setUniforms(n),Object.assign(this.uniforms,n)},e.setIndexBuffer=function(n){this.vertexArray.setIndexBuffer(n)},e.setTransformFeedback=function(n){this.transformFeedback=n},e.setAttributes=function(n,i){var o=this;n.indices&&Y.warn("Model:".concat(this.id," setAttributes() - indexBuffer should be set using setIndexBuffer()"))();for(var a=function(){var d=tr(s[u],2),g=d[0],S=d[1],x=o.bufferLayout.find(function(I){return Js(I).includes(g)});if(!x)return Y.warn("Model(".concat(o.id,'): Missing layout for buffer "').concat(g,'".'))(),"continue";for(var O=Js(x),A=!1,P=0,M=O;P<M.length;P++){var k=M[P],L=o._attributeInfos[k];L&&(o.vertexArray.setBuffer(L.location,S),A=!0)}!A&&i!=="ignore-unknown"&&Y.warn("Model(".concat(o.id,'): Ignoring buffer "').concat(S.id,'" for unknown attribute "').concat(g,'"'))()},u=0,s=Object.entries(n);u<s.length;u++)var f=a()},e.setConstantAttributes=function(n){for(var i=0,o=Object.entries(n);i<o.length;i++){var a=tr(o[i],2),u=a[0],s=a[1],f=this._attributeInfos[u];f?this.vertexArray.setConstant(f.location,s):Y.warn('Model "'.concat(this.id,': Ignoring constant supplied for unknown attribute "').concat(u,'"'))()}},e._setPipelineNeedsUpdate=function(n){this._pipelineNeedsUpdate=this._pipelineNeedsUpdate||n},e._updatePipeline=function(){if(this._pipelineNeedsUpdate){this.pipeline&&Y.log(1,"Model ".concat(this.id,': Recreating pipeline because "').concat(this._pipelineNeedsUpdate,'".'))(),this._pipelineNeedsUpdate=!1;var n=this.device.createShader({id:"".concat(this.id,"-vertex"),stage:"vertex",source:this.vs}),i=this.fs?this.device.createShader({id:"".concat(this.id,"-fragment"),stage:"fragment",source:this.fs}):null;this.pipeline=this.device.createRenderPipeline(Ot(Ot({},this.props),{},{bufferLayout:this.bufferLayout,topology:this.topology,parameters:this.parameters,vs:n,fs:i})),this._attributeInfos=pn(this.pipeline.shaderLayout,this.bufferLayout)}return this.pipeline},e._logDrawCallStart=function(){var n=Y.level>3?0:Rm;Y.level<2||Date.now()-this._lastLogTime<n||(this._lastLogTime=Date.now(),this._logOpen=!0,Y.group(le,">>> DRAWING MODEL ".concat(this.id),{collapsed:Y.level<=2})())},e._logDrawCallEnd=function(){if(this._logOpen){var n=Ks(this.pipeline.shaderLayout,this.id);Y.table(le,n)();for(var i=this.shaderInputs.getDebugTable(),o=0,a=Object.entries(this.uniforms);o<a.length;o++){var u=tr(a[o],2),s=u[0],f=u[1];i[s]={value:f}}Y.table(le,i)();var p=this._getAttributeDebugTable();Y.table(le,this._attributeInfos)(),Y.table(le,p)(),Y.groupEnd(le)(),this._logOpen=!1}},e._logFramebuffer=function(n){var i=Y.get("framebuffer");if(this._drawCount++,!(!i||this._drawCount++>3&&this._drawCount%60)){var o=n.props.framebuffer;o&&Ys(o,{id:o.id,minimap:!0})}},e._getAttributeDebugTable=function(){for(var n={},i=0,o=Object.entries(this._attributeInfos);i<o.length;i++){var a=tr(o[i],2),u=a[0],s=a[1];n[s.location]={name:u,type:s.shaderType,values:this._getBufferOrConstantValues(this.vertexArray.attributes[s.location],s.bufferDataType)}}if(this.vertexArray.indexBuffer){var f=this.vertexArray.indexBuffer,p=f.indexType==="uint32"?new Uint32Array(f.debugData):new Uint16Array(f.debugData);n.indices={name:"indices",type:f.indexType,values:p.toString()}}return n},e._getBufferOrConstantValues=function(n,i){var o=dn(i),a=n instanceof $?new o(n.debugData):n;return a.toString()},km(t)}();bt.defaultProps=Ot(Ot({},te.defaultProps),{},{source:null,vs:null,fs:null,id:"unnamed",handle:void 0,userData:{},defines:{},modules:[],moduleSettings:void 0,geometry:null,indexBuffer:null,attributes:{},constantAttributes:{},varyings:[],shaderInputs:void 0,pipelineFactory:void 0,transformFeedback:void 0,shaderAssembler:xr.getDefaultShaderAssembler()});function Zs(t,e){var r=wm(t),n=Qs(e),i;try{var o=function(){var u=i.value,s=r.findIndex(function(f){return f.name===u.name});s<0?r.push(u):r[s]=u};for(n.s();!(i=n.n()).done;)o()}catch(a){n.e(a)}finally{n.f()}return r}function Lm(t){return{type:t.info.type,shaderLanguage:t.info.shadingLanguage,shaderLanguageVersion:t.info.shadingLanguageVersion,gpu:t.info.gpu,features:t.features}}function Js(t){var e;return t.attributes?(e=t.attributes)===null||e===void 0?void 0:e.map(function(r){return r.attribute}):[t.name]}function rr(t){return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(t)}function eu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(r),!0).forEach(function(n){Nm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eu(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Nm(t,e,r){return e=nu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ru(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nu(n.key),n)}}function Dm(t,e,r){return e&&ru(t.prototype,e),r&&ru(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function nu(t){var e=Cm(t,"string");return rr(e)==="symbol"?e:String(e)}function Cm(t,e){if(rr(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(rr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var iu=function(){t.isSupported=function(n){return n.features.has("transform-feedback-webgl2")};function t(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bt.defaultProps;Fm(this,t),this.device=void 0,this.model=void 0,this.transformFeedback=void 0,et(r.features.has("transform-feedback-webgl2"),"Device must support transform feedback"),this.device=r,this.model=new bt(this.device,jm({id:n.id||"buffer-transform-model",fs:n.fs||qe({version:300}),topology:n.topology||"point-list"},n)),this.transformFeedback=this.device.createTransformFeedback({layout:this.model.pipeline.shaderLayout,buffers:n.feedbackBuffers}),this.model.setTransformFeedback(this.transformFeedback),Object.seal(this)}var e=t.prototype;return e.destroy=function(){this.model&&this.model.destroy()},e.delete=function(){this.destroy()},e.run=function(n){var i=this.device.beginRenderPass(n);this.model.draw(i),i.end()},e.update=function(){console.warn("TextureTransform#update() not implemented")},e.getBuffer=function(n){return this.transformFeedback.getBuffer(n)},e.readAsync=function(n){var i=this.getBuffer(n);if(i instanceof $)return i.readAsync();var o=i.buffer,a=i.byteOffset,u=a===void 0?0:a,s=i.byteLength,f=s===void 0?o.byteLength:s;return o.readAsync(u,f)},Dm(t)}();function nr(t){return nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nr(t)}function ou(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function au(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ou(Object(r),!0).forEach(function(n){Um(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ou(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Um(t,e,r){return e=uu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function su(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uu(n.key),n)}}function Gm(t,e,r){return e&&su(t.prototype,e),r&&su(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function uu(t){var e=zm(t,"string");return nr(e)==="symbol"?e:String(e)}function zm(t,e){if(nr(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(nr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Vm="transform_output",fu=function(){function t(r,n){Bm(this,t),this.device=void 0,this.model=void 0,this.sampler=void 0,this.currentIndex=0,this.samplerTextureMap=null,this.bindings=[],this.resources={},this.device=r,this.sampler=r.createSampler({addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge",minFilter:"nearest",magFilter:"nearest",mipmapFilter:"nearest"}),this.model=new bt(this.device,au({id:n.id||"texture-transform-model",fs:n.fs||qe({version:300,input:n.targetTextureVarying,inputChannels:n.targetTextureChannels,output:Vm}),vertexCount:n.vertexCount},n)),this._initialize(n),Object.seal(this)}var e=t.prototype;return e.destroy=function(){},e.delete=function(){this.destroy()},e.run=function(n){var i=this.bindings[this.currentIndex].framebuffer,o=this.device.beginRenderPass(au({framebuffer:i},n));this.model.draw(o),o.end()},e.update=function(){console.warn("TextureTransform#update() not implemented")},e.getData=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.packed,o=i===void 0?!1:i;throw new Error("getData() not implemented")},e.getTargetTexture=function(){var n=this.bindings[this.currentIndex].targetTexture;return n},e.getFramebuffer=function(){var n=this.bindings[this.currentIndex];return n.framebuffer},e._initialize=function(n){this._updateBindings(n)},e._updateBindings=function(n){this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],n)},e._updateBinding=function(n,i){var o=i.sourceBuffers,a=i.sourceTextures,u=i.targetTexture;if(n||(n={sourceBuffers:{},sourceTextures:{},targetTexture:null}),Object.assign(n.sourceTextures,a),Object.assign(n.sourceBuffers,o),u){n.targetTexture=u;var s=u.width,f=u.height;n.framebuffer&&n.framebuffer.destroy(),n.framebuffer=this.device.createFramebuffer({id:"transform-framebuffer",width:s,height:f,colorAttachments:[u]}),n.framebuffer.resize({width:s,height:f})}return n},e._setSourceTextureParameters=function(){var n=this.currentIndex,i=this.bindings[n].sourceTextures;for(var o in i)i[o].sampler=this.sampler},Gm(t)}();function ir(t){return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(t)}function cu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function qm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cu(Object(r),!0).forEach(function(n){Wm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cu(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wm(t,e,r){return e=pu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Hm(t,e){return $m(t)||Xm(t,e)||Ym(t,e)||Km()}function Km(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
259
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ym(t,e){if(t){if(typeof t=="string")return lu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lu(t,e)}}function lu(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xm(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,u=[],s=!0,f=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(p){f=!0,i=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}function $m(t){if(Array.isArray(t))return t}function hu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pu(n.key),n)}}function Zm(t,e,r){return e&&hu(t.prototype,e),r&&hu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pu(t){var e=Jm(t,"string");return ir(e)==="symbol"?e:String(e)}function Jm(t,e){if(ir(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ir(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ut=function(){function t(r){Qm(this,t),this.id=void 0,this.topology=void 0,this.vertexCount=void 0,this.indices=void 0,this.attributes=void 0,this.userData={};var n=r.attributes,i=n===void 0?{}:n,o=r.indices,a=o===void 0?null:o,u=r.vertexCount,s=u===void 0?null:u;this.id=r.id||X("geometry"),this.topology=r.topology,a&&(this.indices=ArrayBuffer.isView(a)?{value:a,size:1}:a),this.attributes={};for(var f=0,p=Object.entries(i);f<p.length;f++){var d=Hm(p[f],2),g=d[0],S=d[1],x=ArrayBuffer.isView(S)?{value:S}:S;et(ArrayBuffer.isView(x.value),"".concat(this._print(g),": must be typed array or object with value as typed array")),(g==="POSITION"||g==="positions")&&!x.size&&(x.size=3),g==="indices"?(et(!this.indices),this.indices=x):this.attributes[g]=x}this.indices&&this.indices.isIndexed!==void 0&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this.vertexCount=s||this._calculateVertexCount(this.attributes,this.indices)}var e=t.prototype;return e.getVertexCount=function(){return this.vertexCount},e.getAttributes=function(){return this.indices?qm({indices:this.indices},this.attributes):this.attributes},e._print=function(n){return"Geometry ".concat(this.id," attribute ").concat(n)},e._setAttributes=function(n,i){return this},e._calculateVertexCount=function(n,i){if(i)return i.value.length;for(var o=1/0,a=0,u=Object.values(n);a<u.length;a++){var s=u[a],f=s.value,p=s.size,d=s.constant;!d&&f&&p>=1&&(o=Math.min(o,f.length/p))}return et(Number.isFinite(o)),o},Zm(t)}();function he(t){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(t)}var mu;function du(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?du(Object(r),!0).forEach(function(n){td(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):du(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function td(t,e,r){return e=_u(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_u(n.key),n)}}function ed(t,e,r){return e&&vu(t.prototype,e),r&&vu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _u(t){var e=rd(t,"string");return he(e)==="symbol"?e:String(e)}function rd(t,e){if(he(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(he(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function id(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bn(t,e)}function Bn(t,e){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bn(t,e)}function od(t){var e=ud();return function(){var n=Ur(t),i;if(e){var o=Ur(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return ad(this,i)}}function ad(t,e){if(e&&(he(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sd(t)}function sd(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ud(){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 Ur(t){return Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ur(t)}function fd(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var cd=go(mu||(mu=fd([`in vec2 aClipSpacePosition;
259
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ym(t,e){if(t){if(typeof t=="string")return lu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lu(t,e)}}function lu(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Xm(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,u=[],s=!0,f=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(p){f=!0,i=p}finally{try{if(!s&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw i}}return u}}function $m(t){if(Array.isArray(t))return t}function hu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pu(n.key),n)}}function Zm(t,e,r){return e&&hu(t.prototype,e),r&&hu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pu(t){var e=Jm(t,"string");return ir(e)==="symbol"?e:String(e)}function Jm(t,e){if(ir(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ir(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ut=function(){function t(r){Qm(this,t),this.id=void 0,this.topology=void 0,this.vertexCount=void 0,this.indices=void 0,this.attributes=void 0,this.userData={};var n=r.attributes,i=n===void 0?{}:n,o=r.indices,a=o===void 0?null:o,u=r.vertexCount,s=u===void 0?null:u;this.id=r.id||X("geometry"),this.topology=r.topology,a&&(this.indices=ArrayBuffer.isView(a)?{value:a,size:1}:a),this.attributes={};for(var f=0,p=Object.entries(i);f<p.length;f++){var d=Hm(p[f],2),g=d[0],S=d[1],x=ArrayBuffer.isView(S)?{value:S}:S;et(ArrayBuffer.isView(x.value),"".concat(this._print(g),": must be typed array or object with value as typed array")),(g==="POSITION"||g==="positions")&&!x.size&&(x.size=3),g==="indices"?(et(!this.indices),this.indices=x):this.attributes[g]=x}this.indices&&this.indices.isIndexed!==void 0&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this.vertexCount=s||this._calculateVertexCount(this.attributes,this.indices)}var e=t.prototype;return e.getVertexCount=function(){return this.vertexCount},e.getAttributes=function(){return this.indices?qm({indices:this.indices},this.attributes):this.attributes},e._print=function(n){return"Geometry ".concat(this.id," attribute ").concat(n)},e._setAttributes=function(n,i){return this},e._calculateVertexCount=function(n,i){if(i)return i.value.length;for(var o=1/0,a=0,u=Object.values(n);a<u.length;a++){var s=u[a],f=s.value,p=s.size,d=s.constant;!d&&f&&p>=1&&(o=Math.min(o,f.length/p))}return et(Number.isFinite(o)),o},Zm(t)}();function he(t){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(t)}var mu;function du(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?du(Object(r),!0).forEach(function(n){td(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):du(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function td(t,e,r){return e=_u(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_u(n.key),n)}}function ed(t,e,r){return e&&vu(t.prototype,e),r&&vu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _u(t){var e=rd(t,"string");return he(e)==="symbol"?e:String(e)}function rd(t,e){if(he(t)!=="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(he(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function nd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function id(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bn(t,e)}function Bn(t,e){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Bn(t,e)}function od(t){var e=ud();return function(){var n=Ur(t),i;if(e){var o=Ur(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return ad(this,i)}}function ad(t,e){if(e&&(he(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sd(t)}function sd(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ud(){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 Ur(t){return Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ur(t)}function fd(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var cd=go(mu||(mu=fd([`#version 300 es
260
+ in vec2 aClipSpacePosition;
260
261
  in vec2 aTexCoord;
261
262
  in vec2 aCoordinate;
262
263
 
@@ -271,6 +272,7 @@ void main(void) {
271
272
  uv = aTexCoord;
272
273
  }
273
274
  `],[`\\
275
+ #version 300 es
274
276
  in vec2 aClipSpacePosition;
275
277
  in vec2 aTexCoord;
276
278
  in vec2 aCoordinate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luma.gl/engine",
3
- "version": "9.0.0-beta.2",
3
+ "version": "9.0.0-beta.4",
4
4
  "description": "WebGL2 Components for High Performance Rendering and Computation",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,12 +40,12 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@babel/runtime": "^7.0.0",
43
- "@luma.gl/constants": "9.0.0-beta.2",
44
- "@luma.gl/core": "9.0.0-beta.2",
45
- "@luma.gl/shadertools": "9.0.0-beta.2",
43
+ "@luma.gl/constants": "9.0.0-beta.4",
44
+ "@luma.gl/core": "9.0.0-beta.4",
45
+ "@luma.gl/shadertools": "9.0.0-beta.4",
46
46
  "@math.gl/core": "^4.0.0",
47
47
  "@probe.gl/log": "^4.0.2",
48
48
  "@probe.gl/stats": "^4.0.2"
49
49
  },
50
- "gitHead": "d90ddd6231c3d405d88dfb9e8c232c4dfefcc056"
50
+ "gitHead": "bf6bb45b25d59de5b3d05dab4b2e91ad583059e6"
51
51
  }
@@ -5,6 +5,7 @@ import {Model, ModelProps} from '../model/model';
5
5
  import {Geometry} from '../geometry/geometry';
6
6
 
7
7
  const CLIPSPACE_VERTEX_SHADER = glsl`\
8
+ #version 300 es
8
9
  in vec2 aClipSpacePosition;
9
10
  in vec2 aTexCoord;
10
11
  in vec2 aCoordinate;
@@ -28,7 +29,7 @@ const POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];
28
29
  * A flat geometry that covers the "visible area" that the GPU renders.
29
30
  */
30
31
  export class ClipSpace extends Model {
31
- constructor(device: Device, opts?: ModelProps) {
32
+ constructor(device: Device, opts: Omit<ModelProps, 'vs' | 'vertexCount' | 'geometry'>) {
32
33
  const TEX_COORDS = POSITIONS.map((coord) => (coord === -1 ? 0 : coord));
33
34
 
34
35
  super(