easycomponentstools 1.2.3 → 1.2.5

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.
@@ -0,0 +1,1535 @@
1
+ //#region node_modules/@probe.gl/env/dist/lib/globals.js
2
+ var e = globalThis;
3
+ globalThis.document;
4
+ var t = globalThis.process || {};
5
+ globalThis.console;
6
+ var n = globalThis.navigator || {};
7
+ //#endregion
8
+ //#region node_modules/@probe.gl/env/dist/lib/is-electron.js
9
+ function r(e) {
10
+ if (typeof window < "u" && window.process?.type === "renderer" || typeof process < "u" && process.versions?.electron) return !0;
11
+ let t = typeof navigator < "u" && navigator.userAgent, n = e || t;
12
+ return !!(n && n.indexOf("Electron") >= 0);
13
+ }
14
+ //#endregion
15
+ //#region node_modules/@probe.gl/env/dist/lib/is-browser.js
16
+ function i() {
17
+ return !(typeof process == "object" && String(process) === "[object process]" && !process?.browser) || r();
18
+ }
19
+ //#endregion
20
+ //#region node_modules/@probe.gl/env/dist/index.js
21
+ var a = "4.1.2";
22
+ //#endregion
23
+ //#region node_modules/@probe.gl/log/dist/utils/assert.js
24
+ function o(e, t) {
25
+ if (!e) throw Error(t || "Assertion failed");
26
+ }
27
+ //#endregion
28
+ //#region node_modules/@probe.gl/log/dist/loggers/log-utils.js
29
+ function s(e) {
30
+ if (!e) return 0;
31
+ let t;
32
+ switch (typeof e) {
33
+ case "number":
34
+ t = e;
35
+ break;
36
+ case "object":
37
+ t = e.logLevel || e.priority || 0;
38
+ break;
39
+ default: return 0;
40
+ }
41
+ return o(Number.isFinite(t) && t >= 0), t;
42
+ }
43
+ function c(e) {
44
+ let { logLevel: t, message: n } = e;
45
+ e.logLevel = s(t);
46
+ let r = e.args ? Array.from(e.args) : [];
47
+ for (; r.length && r.shift() !== n;);
48
+ switch (typeof t) {
49
+ case "string":
50
+ case "function":
51
+ n !== void 0 && r.unshift(n), e.message = t;
52
+ break;
53
+ case "object": Object.assign(e, t);
54
+ }
55
+ typeof e.message == "function" && (e.message = e.message());
56
+ let i = typeof e.message;
57
+ return o(i === "string" || i === "object"), Object.assign(e, { args: r }, e.opts);
58
+ }
59
+ //#endregion
60
+ //#region node_modules/@probe.gl/log/dist/loggers/base-log.js
61
+ var l = () => {}, u = class {
62
+ constructor({ level: e = 0 } = {}) {
63
+ this.userData = {}, this._onceCache = /* @__PURE__ */ new Set(), this._level = e;
64
+ }
65
+ set level(e) {
66
+ this.setLevel(e);
67
+ }
68
+ get level() {
69
+ return this.getLevel();
70
+ }
71
+ setLevel(e) {
72
+ return this._level = e, this;
73
+ }
74
+ getLevel() {
75
+ return this._level;
76
+ }
77
+ warn(e, ...t) {
78
+ return this._log("warn", 0, e, t, { once: !0 });
79
+ }
80
+ error(e, ...t) {
81
+ return this._log("error", 0, e, t);
82
+ }
83
+ log(e, t, ...n) {
84
+ return this._log("log", e, t, n);
85
+ }
86
+ info(e, t, ...n) {
87
+ return this._log("info", e, t, n);
88
+ }
89
+ once(e, t, ...n) {
90
+ return this._log("once", e, t, n, { once: !0 });
91
+ }
92
+ _log(e, t, n, r, i = {}) {
93
+ let a = c({
94
+ logLevel: t,
95
+ message: n,
96
+ args: this._buildArgs(t, n, r),
97
+ opts: i
98
+ });
99
+ return this._createLogFunction(e, a, i);
100
+ }
101
+ _buildArgs(e, t, n) {
102
+ return [
103
+ e,
104
+ t,
105
+ ...n
106
+ ];
107
+ }
108
+ _createLogFunction(e, t, n) {
109
+ if (!this._shouldLog(t.logLevel)) return l;
110
+ let r = this._getOnceTag(n.tag ?? t.tag ?? t.message);
111
+ if ((n.once || t.once) && r !== void 0) {
112
+ if (this._onceCache.has(r)) return l;
113
+ this._onceCache.add(r);
114
+ }
115
+ return this._emit(e, t);
116
+ }
117
+ _shouldLog(e) {
118
+ return this.getLevel() >= s(e);
119
+ }
120
+ _getOnceTag(e) {
121
+ if (e !== void 0) try {
122
+ return typeof e == "string" ? e : String(e);
123
+ } catch {
124
+ return;
125
+ }
126
+ }
127
+ };
128
+ //#endregion
129
+ //#region node_modules/@probe.gl/log/dist/utils/local-storage.js
130
+ function ee(e) {
131
+ try {
132
+ let t = window[e], n = "__storage_test__";
133
+ return t.setItem(n, n), t.removeItem(n), t;
134
+ } catch {
135
+ return null;
136
+ }
137
+ }
138
+ var te = class {
139
+ constructor(e, t, n = "sessionStorage") {
140
+ this.storage = ee(n), this.id = e, this.config = t, this._loadConfiguration();
141
+ }
142
+ getConfiguration() {
143
+ return this.config;
144
+ }
145
+ setConfiguration(e) {
146
+ if (Object.assign(this.config, e), this.storage) {
147
+ let e = JSON.stringify(this.config);
148
+ this.storage.setItem(this.id, e);
149
+ }
150
+ }
151
+ _loadConfiguration() {
152
+ let e = {};
153
+ if (this.storage) {
154
+ let t = this.storage.getItem(this.id);
155
+ e = t ? JSON.parse(t) : {};
156
+ }
157
+ return Object.assign(this.config, e), this;
158
+ }
159
+ };
160
+ //#endregion
161
+ //#region node_modules/@probe.gl/log/dist/utils/formatters.js
162
+ function ne(e) {
163
+ let t;
164
+ return t = e < 10 ? `${e.toFixed(2)}ms` : e < 100 ? `${e.toFixed(1)}ms` : e < 1e3 ? `${e.toFixed(0)}ms` : `${(e / 1e3).toFixed(2)}s`, t;
165
+ }
166
+ function re(e, t = 8) {
167
+ let n = Math.max(t - e.length, 0);
168
+ return `${" ".repeat(n)}${e}`;
169
+ }
170
+ //#endregion
171
+ //#region node_modules/@probe.gl/log/dist/utils/color.js
172
+ var d;
173
+ (function(e) {
174
+ e[e.BLACK = 30] = "BLACK", e[e.RED = 31] = "RED", e[e.GREEN = 32] = "GREEN", e[e.YELLOW = 33] = "YELLOW", e[e.BLUE = 34] = "BLUE", e[e.MAGENTA = 35] = "MAGENTA", e[e.CYAN = 36] = "CYAN", e[e.WHITE = 37] = "WHITE", e[e.BRIGHT_BLACK = 90] = "BRIGHT_BLACK", e[e.BRIGHT_RED = 91] = "BRIGHT_RED", e[e.BRIGHT_GREEN = 92] = "BRIGHT_GREEN", e[e.BRIGHT_YELLOW = 93] = "BRIGHT_YELLOW", e[e.BRIGHT_BLUE = 94] = "BRIGHT_BLUE", e[e.BRIGHT_MAGENTA = 95] = "BRIGHT_MAGENTA", e[e.BRIGHT_CYAN = 96] = "BRIGHT_CYAN", e[e.BRIGHT_WHITE = 97] = "BRIGHT_WHITE";
175
+ })(d ||= {});
176
+ var ie = 10;
177
+ function f(e) {
178
+ return typeof e == "string" ? (e = e.toUpperCase(), d[e] || d.WHITE) : e;
179
+ }
180
+ function ae(e, t, n) {
181
+ return !i && typeof e == "string" && (t && (e = `\u001b[${f(t)}m${e}\u001b[39m`), n && (e = `\u001b[${f(n) + ie}m${e}\u001b[49m`)), e;
182
+ }
183
+ //#endregion
184
+ //#region node_modules/@probe.gl/log/dist/utils/autobind.js
185
+ function oe(e, t = ["constructor"]) {
186
+ let n = Object.getPrototypeOf(e), r = Object.getOwnPropertyNames(n), i = e;
187
+ for (let n of r) {
188
+ let r = i[n];
189
+ typeof r == "function" && (t.find((e) => n === e) || (i[n] = r.bind(e)));
190
+ }
191
+ }
192
+ //#endregion
193
+ //#region node_modules/@probe.gl/log/dist/probe.js
194
+ var p = class {
195
+ getHighResolutionTimer() {
196
+ let n;
197
+ if (i() && e.performance) n = e?.performance?.now?.();
198
+ else if ("hrtime" in t) {
199
+ let e = t?.hrtime?.();
200
+ n = e[0] * 1e3 + e[1] / 1e6;
201
+ } else n = Date.now();
202
+ return n;
203
+ }
204
+ getMemoryUsageMB() {
205
+ let t = (e?.performance)?.memory?.usedJSHeapSize;
206
+ return t == null ? null : Math.trunc(t / 1024 / 1024);
207
+ }
208
+ }, m = new p();
209
+ globalThis.Probe = p, globalThis.probe = m;
210
+ //#endregion
211
+ //#region node_modules/@probe.gl/log/dist/loggers/probe-log.js
212
+ var h = {
213
+ debug: i() && console.debug || console.log,
214
+ log: console.log,
215
+ info: console.info,
216
+ warn: console.warn,
217
+ error: console.error
218
+ }, g = {
219
+ enabled: !0,
220
+ level: 0
221
+ }, _ = class extends u {
222
+ constructor({ id: e } = { id: "" }) {
223
+ super({ level: 0 }), this.VERSION = a, this._startTs = m.getHighResolutionTimer(), this._deltaTs = m.getHighResolutionTimer(), this.userData = {}, this.LOG_THROTTLE_TIMEOUT = 0, this.id = e, this.userData = {}, this._storage = new te(`__probe-${this.id}__`, { [this.id]: g }), this.timeStamp(`${this.id} started`), oe(this), Object.seal(this);
224
+ }
225
+ isEnabled() {
226
+ return this._getConfiguration().enabled;
227
+ }
228
+ getLevel() {
229
+ return this._getConfiguration().level;
230
+ }
231
+ getTotal() {
232
+ return Number((m.getHighResolutionTimer() - this._startTs).toPrecision(10));
233
+ }
234
+ getDelta() {
235
+ return Number((m.getHighResolutionTimer() - this._deltaTs).toPrecision(10));
236
+ }
237
+ set priority(e) {
238
+ this.level = e;
239
+ }
240
+ get priority() {
241
+ return this.level;
242
+ }
243
+ getPriority() {
244
+ return this.level;
245
+ }
246
+ enable(e = !0) {
247
+ return this._updateConfiguration({ enabled: e }), this;
248
+ }
249
+ setLevel(e) {
250
+ return this._updateConfiguration({ level: e }), this;
251
+ }
252
+ get(e) {
253
+ return this._getConfiguration()[e];
254
+ }
255
+ set(e, t) {
256
+ this._updateConfiguration({ [e]: t });
257
+ }
258
+ settings() {
259
+ console.table ? console.table(this._storage.config) : console.log(this._storage.config);
260
+ }
261
+ assert(e, t) {
262
+ if (!e) throw Error(t || "Assertion failed");
263
+ }
264
+ warn(e, ...t) {
265
+ return this._log("warn", 0, e, t, {
266
+ method: h.warn,
267
+ once: !0
268
+ });
269
+ }
270
+ error(e, ...t) {
271
+ return this._log("error", 0, e, t, { method: h.error });
272
+ }
273
+ deprecated(e, t) {
274
+ return this.warn(`\`${e}\` is deprecated and will be removed \
275
+ in a later version. Use \`${t}\` instead`);
276
+ }
277
+ removed(e, t) {
278
+ return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`);
279
+ }
280
+ probe(e, t, ...n) {
281
+ let r = m.getMemoryUsageMB();
282
+ if (r !== null) {
283
+ let e = `${r}MB `;
284
+ typeof t == "function" ? t = () => `${e}${t()}` : typeof t == "string" && (t = `${e}${t}`);
285
+ }
286
+ return this._log("log", e, t, n, {
287
+ method: h.log,
288
+ time: !0,
289
+ once: !0
290
+ });
291
+ }
292
+ log(e, t, ...n) {
293
+ return this._log("log", e, t, n, { method: h.debug });
294
+ }
295
+ info(e, t, ...n) {
296
+ return this._log("info", e, t, n, { method: console.info });
297
+ }
298
+ once(e, t, ...n) {
299
+ return this._log("once", e, t, n, {
300
+ method: h.debug || h.info,
301
+ once: !0
302
+ });
303
+ }
304
+ table(e, t, n) {
305
+ return t ? this._log("table", e, t, n && [n] || [], {
306
+ method: console.table || l,
307
+ tag: ce(t)
308
+ }) : l;
309
+ }
310
+ time(e, t) {
311
+ return this._log("time", e, t, [], { method: console.time ? console.time : console.info });
312
+ }
313
+ timeEnd(e, t) {
314
+ return this._log("time", e, t, [], { method: console.timeEnd ? console.timeEnd : console.info });
315
+ }
316
+ timeStamp(e, t) {
317
+ return this._log("time", e, t, [], { method: console.timeStamp || l });
318
+ }
319
+ group(e, t, n = { collapsed: !1 }) {
320
+ let r = (n.collapsed ? console.groupCollapsed : console.group) || console.info;
321
+ return this._log("group", e, t, [], { method: r });
322
+ }
323
+ groupCollapsed(e, t, n = {}) {
324
+ return this.group(e, t, Object.assign({}, n, { collapsed: !0 }));
325
+ }
326
+ groupEnd(e) {
327
+ return this._log("groupEnd", e, "", [], { method: console.groupEnd || l });
328
+ }
329
+ withGroup(e, t, n) {
330
+ this.group(e, t)();
331
+ try {
332
+ n();
333
+ } finally {
334
+ this.groupEnd(e)();
335
+ }
336
+ }
337
+ trace() {
338
+ console.trace && console.trace();
339
+ }
340
+ _shouldLog(e) {
341
+ return this.isEnabled() && super._shouldLog(e);
342
+ }
343
+ _emit(e, t) {
344
+ let n = t.method;
345
+ o(n), t.total = this.getTotal(), t.delta = this.getDelta(), this._deltaTs = m.getHighResolutionTimer();
346
+ let r = se(this.id, t.message, t);
347
+ return n.bind(console, r, ...t.args);
348
+ }
349
+ _getConfiguration() {
350
+ return this._storage.config[this.id] || this._updateConfiguration(g), this._storage.config[this.id];
351
+ }
352
+ _updateConfiguration(e) {
353
+ let t = this._storage.config[this.id] || { ...g };
354
+ this._storage.setConfiguration({ [this.id]: {
355
+ ...t,
356
+ ...e
357
+ } });
358
+ }
359
+ };
360
+ _.VERSION = a;
361
+ function se(e, t, n) {
362
+ if (typeof t == "string") {
363
+ let r = n.time ? re(ne(n.total)) : "";
364
+ t = n.time ? `${e}: ${r} ${t}` : `${e}: ${t}`, t = ae(t, n.color, n.background);
365
+ }
366
+ return t;
367
+ }
368
+ function ce(e) {
369
+ for (let t in e) for (let n in e[t]) return n || "untitled";
370
+ return "empty";
371
+ }
372
+ //#endregion
373
+ //#region node_modules/@luma.gl/core/dist/utils/log.js
374
+ var v = new _({ id: "luma.gl" }), y = {};
375
+ function b(e = "id") {
376
+ return y[e] = y[e] || 1, `${e}-${y[e]++}`;
377
+ }
378
+ //#endregion
379
+ //#region node_modules/@luma.gl/core/dist/adapter/resources/resource.js
380
+ var le = "cpu-hotspot-profiler", x = "GPU Resource Counts", S = "Resource Counts", C = "GPU Time and Memory", ue = [
381
+ "Resources",
382
+ "Buffers",
383
+ "Textures",
384
+ "Samplers",
385
+ "TextureViews",
386
+ "Framebuffers",
387
+ "QuerySets",
388
+ "Shaders",
389
+ "RenderPipelines",
390
+ "ComputePipelines",
391
+ "PipelineLayouts",
392
+ "VertexArrays",
393
+ "RenderPasss",
394
+ "RenderBundleEncoders",
395
+ "RenderBundles",
396
+ "ComputePasss",
397
+ "CommandEncoders",
398
+ "CommandBuffers"
399
+ ], de = [
400
+ "Resources",
401
+ "Buffers",
402
+ "Textures",
403
+ "Samplers",
404
+ "TextureViews",
405
+ "Framebuffers",
406
+ "QuerySets",
407
+ "Shaders",
408
+ "RenderPipelines",
409
+ "SharedRenderPipelines",
410
+ "ComputePipelines",
411
+ "PipelineLayouts",
412
+ "VertexArrays",
413
+ "RenderPasss",
414
+ "RenderBundleEncoders",
415
+ "RenderBundles",
416
+ "ComputePasss",
417
+ "CommandEncoders",
418
+ "CommandBuffers"
419
+ ], fe = ue.flatMap((e) => [`${e} Created`, `${e} Active`]), pe = de.flatMap((e) => [`${e} Created`, `${e} Active`]), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = class {
420
+ static defaultProps = {
421
+ id: "undefined",
422
+ handle: void 0,
423
+ _isHandleBorrowed: !1,
424
+ userData: void 0
425
+ };
426
+ toString() {
427
+ return `${this[Symbol.toStringTag] || this.constructor.name}:"${this.id}"`;
428
+ }
429
+ toJSON() {
430
+ return this.toString();
431
+ }
432
+ id;
433
+ props;
434
+ userData = {};
435
+ _device;
436
+ destroyed = !1;
437
+ allocatedBytes = 0;
438
+ allocatedBytesName = null;
439
+ _attachedResources = /* @__PURE__ */ new Set();
440
+ get ownsHandle() {
441
+ return (this.props.handle === void 0 || this.props.handle === null) && !this.isHandleBorrowed;
442
+ }
443
+ get isHandleBorrowed() {
444
+ return !!this.props._isHandleBorrowed;
445
+ }
446
+ constructor(e, t, n) {
447
+ if (!e) throw Error("no device");
448
+ this._device = e, this.props = me(t, n);
449
+ let r = this.props.id === "undefined" ? b(this[Symbol.toStringTag]) : this.props.id;
450
+ this.props.id = r, this.id = r, this.userData = this.props.userData || {}, this.addStats();
451
+ }
452
+ destroy() {
453
+ this.destroyed || this.destroyResource();
454
+ }
455
+ delete() {
456
+ return this.destroy(), this;
457
+ }
458
+ getProps() {
459
+ return this.props;
460
+ }
461
+ attachResource(e) {
462
+ this._attachedResources.add(e);
463
+ }
464
+ detachResource(e) {
465
+ this._attachedResources.delete(e);
466
+ }
467
+ destroyAttachedResource(e) {
468
+ this._attachedResources.delete(e) && e.destroy();
469
+ }
470
+ destroyAttachedResources() {
471
+ for (let e of this._attachedResources) e.destroy();
472
+ this._attachedResources = /* @__PURE__ */ new Set();
473
+ }
474
+ destroyResource() {
475
+ this.destroyed ||= (this.destroyAttachedResources(), this.removeStats(), !0);
476
+ }
477
+ removeStats() {
478
+ let e = k(this._device), t = e ? A() : 0, n = [this._device.statsManager.getStats(x), this._device.statsManager.getStats(S)], r = O(this._device);
479
+ for (let e of n) D(e, r);
480
+ let i = this.getStatsName();
481
+ for (let e of n) e.get("Resources Active").decrementCount(), e.get(`${i}s Active`).decrementCount();
482
+ e && (e.statsBookkeepingCalls = (e.statsBookkeepingCalls || 0) + 1, e.statsBookkeepingTimeMs = (e.statsBookkeepingTimeMs || 0) + (A() - t));
483
+ }
484
+ trackAllocatedMemory(e, t = this.getStatsName()) {
485
+ let n = k(this._device), r = n ? A() : 0, i = this._device.statsManager.getStats(C);
486
+ this.allocatedBytes > 0 && this.allocatedBytesName && (i.get("GPU Memory").subtractCount(this.allocatedBytes), i.get(`${this.allocatedBytesName} Memory`).subtractCount(this.allocatedBytes)), i.get("GPU Memory").addCount(e), i.get(`${t} Memory`).addCount(e), n && (n.statsBookkeepingCalls = (n.statsBookkeepingCalls || 0) + 1, n.statsBookkeepingTimeMs = (n.statsBookkeepingTimeMs || 0) + (A() - r)), this.allocatedBytes = e, this.allocatedBytesName = t;
487
+ }
488
+ trackReferencedMemory(e, t = this.getStatsName()) {
489
+ this.trackAllocatedMemory(e, `External ${t}`);
490
+ }
491
+ trackDeallocatedMemory(e = this.getStatsName()) {
492
+ if (this.allocatedBytes === 0) {
493
+ this.allocatedBytesName = null;
494
+ return;
495
+ }
496
+ let t = k(this._device), n = t ? A() : 0, r = this._device.statsManager.getStats(C);
497
+ r.get("GPU Memory").subtractCount(this.allocatedBytes), r.get(`${this.allocatedBytesName || e} Memory`).subtractCount(this.allocatedBytes), t && (t.statsBookkeepingCalls = (t.statsBookkeepingCalls || 0) + 1, t.statsBookkeepingTimeMs = (t.statsBookkeepingTimeMs || 0) + (A() - n)), this.allocatedBytes = 0, this.allocatedBytesName = null;
498
+ }
499
+ trackDeallocatedReferencedMemory(e = this.getStatsName()) {
500
+ this.trackDeallocatedMemory(`Referenced ${e}`);
501
+ }
502
+ addStats() {
503
+ let e = this.getStatsName(), t = k(this._device), n = t ? A() : 0, r = [this._device.statsManager.getStats(x), this._device.statsManager.getStats(S)], i = O(this._device);
504
+ for (let e of r) D(e, i);
505
+ for (let t of r) t.get("Resources Created").incrementCount(), t.get("Resources Active").incrementCount(), t.get(`${e}s Created`).incrementCount(), t.get(`${e}s Active`).incrementCount();
506
+ t && (t.statsBookkeepingCalls = (t.statsBookkeepingCalls || 0) + 1, t.statsBookkeepingTimeMs = (t.statsBookkeepingTimeMs || 0) + (A() - n)), he(this._device, e);
507
+ }
508
+ getStatsName() {
509
+ return ge(this);
510
+ }
511
+ };
512
+ function me(e, t) {
513
+ let n = { ...t };
514
+ for (let t in e) e[t] !== void 0 && (n[t] = e[t]);
515
+ return n;
516
+ }
517
+ function D(e, t) {
518
+ let n = e.stats, r = !1;
519
+ for (let i of t) n[i] || (e.get(i), r = !0);
520
+ let i = Object.keys(n).length, a = w.get(e);
521
+ if (!r && a?.orderedStatNames === t && a.statCount === i) return;
522
+ let o = {}, s = T.get(t);
523
+ s || (s = new Set(t), T.set(t, s));
524
+ for (let e of t) n[e] && (o[e] = n[e]);
525
+ for (let [e, t] of Object.entries(n)) s.has(e) || (o[e] = t);
526
+ for (let e of Object.keys(n)) delete n[e];
527
+ Object.assign(n, o), w.set(e, {
528
+ orderedStatNames: t,
529
+ statCount: i
530
+ });
531
+ }
532
+ function O(e) {
533
+ return e.type === "webgl" ? pe : fe;
534
+ }
535
+ function k(e) {
536
+ let t = e.userData[le];
537
+ return t?.enabled ? t : null;
538
+ }
539
+ function A() {
540
+ return globalThis.performance?.now?.() ?? Date.now();
541
+ }
542
+ function he(e, t) {
543
+ let n = k(e);
544
+ if (n && n.activeDefaultFramebufferAcquireDepth) switch (n.transientCanvasResourceCreates = (n.transientCanvasResourceCreates || 0) + 1, t) {
545
+ case "Texture":
546
+ n.transientCanvasTextureCreates = (n.transientCanvasTextureCreates || 0) + 1;
547
+ break;
548
+ case "TextureView":
549
+ n.transientCanvasTextureViewCreates = (n.transientCanvasTextureViewCreates || 0) + 1;
550
+ break;
551
+ case "Sampler":
552
+ n.transientCanvasSamplerCreates = (n.transientCanvasSamplerCreates || 0) + 1;
553
+ break;
554
+ case "Framebuffer": n.transientCanvasFramebufferCreates = (n.transientCanvasFramebufferCreates || 0) + 1;
555
+ }
556
+ }
557
+ function ge(e) {
558
+ let t = Object.getPrototypeOf(e);
559
+ for (; t;) {
560
+ let n = Object.getPrototypeOf(t);
561
+ if (!n || n === E.prototype) return _e(t) || e[Symbol.toStringTag] || e.constructor.name;
562
+ t = n;
563
+ }
564
+ return e[Symbol.toStringTag] || e.constructor.name;
565
+ }
566
+ function _e(e) {
567
+ let t = Object.getOwnPropertyDescriptor(e, Symbol.toStringTag);
568
+ return typeof t?.get == "function" ? t.get.call(e) : typeof t?.value == "string" ? t.value : null;
569
+ }
570
+ //#endregion
571
+ //#region node_modules/@luma.gl/core/dist/adapter/resources/buffer.js
572
+ var ve = class e extends E {
573
+ static INDEX = 16;
574
+ static VERTEX = 32;
575
+ static UNIFORM = 64;
576
+ static STORAGE = 128;
577
+ static INDIRECT = 256;
578
+ static QUERY_RESOLVE = 512;
579
+ static MAP_READ = 1;
580
+ static MAP_WRITE = 2;
581
+ static COPY_SRC = 4;
582
+ static COPY_DST = 8;
583
+ get [Symbol.toStringTag]() {
584
+ return "Buffer";
585
+ }
586
+ usage;
587
+ indexType;
588
+ updateTimestamp;
589
+ constructor(t, n) {
590
+ let r = { ...n };
591
+ (n.usage || 0) & e.INDEX && !n.indexType && (n.data instanceof Uint32Array ? r.indexType = "uint32" : n.data instanceof Uint16Array ? r.indexType = "uint16" : n.data instanceof Uint8Array && (r.indexType = "uint8")), delete r.data, super(t, r, e.defaultProps), this.usage = r.usage || 0, this.indexType = r.indexType, this.updateTimestamp = t.incrementTimestamp();
592
+ }
593
+ clone(e) {
594
+ return this.device.createBuffer({
595
+ ...this.props,
596
+ ...e
597
+ });
598
+ }
599
+ static DEBUG_DATA_MAX_LENGTH = 32;
600
+ debugData = /* @__PURE__ */ new ArrayBuffer(0);
601
+ _setDebugData(t, n, r) {
602
+ if (!this.device.props.debug) return;
603
+ let i = null, a;
604
+ ArrayBuffer.isView(t) ? (i = t, a = t.buffer) : a = t;
605
+ let o = Math.min(t ? t.byteLength : r, e.DEBUG_DATA_MAX_LENGTH);
606
+ if (a === null) this.debugData = new ArrayBuffer(o);
607
+ else {
608
+ let e = Math.min(i?.byteOffset || 0, a.byteLength), t = Math.max(0, a.byteLength - e), n = Math.min(o, t);
609
+ this.debugData = new Uint8Array(a, e, n).slice().buffer;
610
+ }
611
+ }
612
+ static defaultProps = {
613
+ ...E.defaultProps,
614
+ handle: void 0,
615
+ usage: 0,
616
+ byteLength: 0,
617
+ byteOffset: 0,
618
+ data: null,
619
+ indexType: "uint16",
620
+ onMapped: void 0
621
+ };
622
+ }, j = globalThis.Float16Array;
623
+ function ye() {
624
+ return j ?? Uint16Array;
625
+ }
626
+ function be(e) {
627
+ return !!(j && e === j);
628
+ }
629
+ //#endregion
630
+ //#region node_modules/@luma.gl/core/dist/shadertypes/data-types/decode-data-types.js
631
+ function xe(e) {
632
+ let t = e.includes("norm"), n = !t && !e.startsWith("float"), r = e.startsWith("s"), [i, a, o] = I[e] || [
633
+ "uint8 ",
634
+ "i32",
635
+ 1
636
+ ];
637
+ return {
638
+ signedType: i,
639
+ primitiveType: a,
640
+ byteLength: o,
641
+ normalized: t,
642
+ integer: n,
643
+ signed: r
644
+ };
645
+ }
646
+ function Se(e) {
647
+ let t = e;
648
+ switch (t) {
649
+ case "uint8": return "unorm8";
650
+ case "sint8": return "snorm8";
651
+ case "uint16": return "unorm16";
652
+ case "sint16": return "snorm16";
653
+ default: return t;
654
+ }
655
+ }
656
+ function M(e, t) {
657
+ switch (t) {
658
+ case 1: return e;
659
+ case 2: return e + e % 2;
660
+ default: return e + (4 - e % 4) % 4;
661
+ }
662
+ }
663
+ function N(e) {
664
+ let t = ArrayBuffer.isView(e) ? e.constructor : e;
665
+ if (be(t)) return "float16";
666
+ if (t === Uint8ClampedArray) return "uint8";
667
+ let n = Object.values(I).find((e) => t === e[4]);
668
+ if (!n) throw Error(t.name);
669
+ return n[0];
670
+ }
671
+ function Ce(e) {
672
+ return N(e);
673
+ }
674
+ function P(e) {
675
+ if (e === "float16") return ye();
676
+ let t = I[e];
677
+ if (!t) throw Error(e);
678
+ let [, , , , n] = t;
679
+ return n;
680
+ }
681
+ function F(e) {
682
+ return P(e);
683
+ }
684
+ var I = {
685
+ uint8: [
686
+ "uint8",
687
+ "u32",
688
+ 1,
689
+ !1,
690
+ Uint8Array
691
+ ],
692
+ sint8: [
693
+ "sint8",
694
+ "i32",
695
+ 1,
696
+ !1,
697
+ Int8Array
698
+ ],
699
+ unorm8: [
700
+ "uint8",
701
+ "f32",
702
+ 1,
703
+ !0,
704
+ Uint8Array
705
+ ],
706
+ snorm8: [
707
+ "sint8",
708
+ "f32",
709
+ 1,
710
+ !0,
711
+ Int8Array
712
+ ],
713
+ uint16: [
714
+ "uint16",
715
+ "u32",
716
+ 2,
717
+ !1,
718
+ Uint16Array
719
+ ],
720
+ sint16: [
721
+ "sint16",
722
+ "i32",
723
+ 2,
724
+ !1,
725
+ Int16Array
726
+ ],
727
+ unorm16: [
728
+ "uint16",
729
+ "u32",
730
+ 2,
731
+ !0,
732
+ Uint16Array
733
+ ],
734
+ snorm16: [
735
+ "sint16",
736
+ "i32",
737
+ 2,
738
+ !0,
739
+ Int16Array
740
+ ],
741
+ float16: [
742
+ "float16",
743
+ "f16",
744
+ 2,
745
+ !1,
746
+ Uint16Array
747
+ ],
748
+ float32: [
749
+ "float32",
750
+ "f32",
751
+ 4,
752
+ !1,
753
+ Float32Array
754
+ ],
755
+ uint32: [
756
+ "uint32",
757
+ "u32",
758
+ 4,
759
+ !1,
760
+ Uint32Array
761
+ ],
762
+ sint32: [
763
+ "sint32",
764
+ "i32",
765
+ 4,
766
+ !1,
767
+ Int32Array
768
+ ]
769
+ }, L = new class {
770
+ getDataTypeInfo(e) {
771
+ return xe(e);
772
+ }
773
+ getNormalizedDataType(e) {
774
+ return Se(e);
775
+ }
776
+ alignTo(e, t) {
777
+ return M(e, t);
778
+ }
779
+ getDataType(e) {
780
+ return Ce(e);
781
+ }
782
+ getTypedArrayConstructor(e) {
783
+ return F(e);
784
+ }
785
+ }(), we = new class {
786
+ getVertexFormatInfo(e) {
787
+ if (e === "unorm10-10-10-2") return {
788
+ type: "unorm8",
789
+ components: 4,
790
+ byteLength: 4,
791
+ integer: !1,
792
+ signed: !1,
793
+ normalized: !0
794
+ };
795
+ let t = e === "unorm8x4-bgra" ? "unorm8x4" : e, n;
796
+ t.endsWith("-webgl") && (t = t.slice(0, -6), n = !0);
797
+ let r = t.split("x");
798
+ if (r.length > 2) throw Error(`Unsupported vertex format: ${e}`);
799
+ let [i, a] = r, o = i, s = Ee(e, a), c = Te(e, o), l;
800
+ try {
801
+ l = n ? De(e, o, s) : this.makeVertexFormat(c.signedType, s, c.normalized);
802
+ } catch {
803
+ throw Error(`Unsupported vertex format: ${e}`);
804
+ }
805
+ if (l !== (n ? e : t)) throw Error(`Unsupported vertex format: ${e}`);
806
+ let u = {
807
+ type: o,
808
+ components: s,
809
+ byteLength: c.byteLength * s,
810
+ integer: c.integer,
811
+ signed: c.signed,
812
+ normalized: c.normalized
813
+ };
814
+ return n && (u.webglOnly = !0), u;
815
+ }
816
+ makeVertexFormat(e, t, n) {
817
+ let r = n ? L.getNormalizedDataType(e) : e;
818
+ switch (r) {
819
+ case "unorm8": return t === 1 ? "unorm8" : t === 3 ? "unorm8x3-webgl" : `${r}x${t}`;
820
+ case "snorm8": return t === 1 ? "snorm8" : t === 3 ? "snorm8x3-webgl" : `${r}x${t}`;
821
+ case "uint8":
822
+ case "sint8":
823
+ if (t === 3) throw Error(`size: ${t}`);
824
+ return t === 1 ? r : `${r}x${t}`;
825
+ case "uint16": return t === 1 ? "uint16" : t === 3 ? "uint16x3-webgl" : `${r}x${t}`;
826
+ case "sint16": return t === 1 ? "sint16" : t === 3 ? "sint16x3-webgl" : `${r}x${t}`;
827
+ case "unorm16": return t === 1 ? "unorm16" : t === 3 ? "unorm16x3-webgl" : `${r}x${t}`;
828
+ case "snorm16": return t === 1 ? "snorm16" : t === 3 ? "snorm16x3-webgl" : `${r}x${t}`;
829
+ case "float16":
830
+ if (t === 3) throw Error(`size: ${t}`);
831
+ return t === 1 ? r : `${r}x${t}`;
832
+ default: return t === 1 ? r : `${r}x${t}`;
833
+ }
834
+ }
835
+ getVertexFormatFromAttribute(e, t, n) {
836
+ if (!t || t > 4) throw Error(`size ${t}`);
837
+ let r = t, i = L.getDataType(e);
838
+ return this.makeVertexFormat(i, r, n);
839
+ }
840
+ getCompatibleVertexFormat(e) {
841
+ let t;
842
+ switch (e.primitiveType) {
843
+ case "f32":
844
+ t = "float32";
845
+ break;
846
+ case "i32":
847
+ t = "sint32";
848
+ break;
849
+ case "u32":
850
+ t = "uint32";
851
+ break;
852
+ case "f16": return e.components <= 2 ? "float16x2" : "float16x4";
853
+ }
854
+ return e.components === 1 ? t : `${t}x${e.components}`;
855
+ }
856
+ }();
857
+ function Te(e, t) {
858
+ try {
859
+ return L.getDataTypeInfo(t);
860
+ } catch {
861
+ throw Error(`Unsupported vertex format: ${e}`);
862
+ }
863
+ }
864
+ function Ee(e, t) {
865
+ if (!t) return 1;
866
+ let n = Number(t);
867
+ if (n === 2 || n === 3 || n === 4) return n;
868
+ throw Error(`Unsupported vertex format: ${e}`);
869
+ }
870
+ function De(e, t, n) {
871
+ if (n !== 3) throw Error(`Unsupported vertex format: ${e}`);
872
+ switch (t) {
873
+ case "uint8":
874
+ case "sint8":
875
+ case "unorm8":
876
+ case "snorm8":
877
+ case "uint16":
878
+ case "sint16":
879
+ case "unorm16":
880
+ case "snorm16": return `${t}x3-webgl`;
881
+ default: throw Error(`Unsupported vertex format: ${e}`);
882
+ }
883
+ }
884
+ //#endregion
885
+ //#region node_modules/@luma.gl/core/dist/utils/assert.js
886
+ function R(e, t) {
887
+ if (!e) {
888
+ let e = Error(t ?? "luma.gl assertion failed.");
889
+ throw Error.captureStackTrace?.(e, R), e;
890
+ }
891
+ }
892
+ function Oe(e, t) {
893
+ return R(e, t), e;
894
+ }
895
+ //#endregion
896
+ //#region node_modules/@luma.gl/core/dist/adapter-utils/format-compiler-log.js
897
+ function ke(e, t, n) {
898
+ let r = "", i = t.split(/\r?\n/), a = e.slice().sort((e, t) => e.lineNum - t.lineNum);
899
+ switch (n?.showSourceCode || "no") {
900
+ case "all":
901
+ let t = 0;
902
+ for (let e = 1; e <= i.length; e++) {
903
+ let o = i[e - 1], s = a[t];
904
+ for (o && s && (r += B(o, e, n)); a.length > t && s.lineNum === e;) {
905
+ let e = a[t++];
906
+ e && (r += z(e, i, e.lineNum, {
907
+ ...n,
908
+ inlineSource: !1
909
+ }));
910
+ }
911
+ }
912
+ for (; a.length > t;) {
913
+ let e = a[t++];
914
+ e && (r += z(e, [], 0, {
915
+ ...n,
916
+ inlineSource: !1
917
+ }));
918
+ }
919
+ return r;
920
+ case "issues":
921
+ case "no":
922
+ for (let t of e) r += z(t, i, t.lineNum, { inlineSource: n?.showSourceCode !== "no" });
923
+ return r;
924
+ }
925
+ }
926
+ function z(e, t, n, r) {
927
+ if (r?.inlineSource) return `
928
+ ${Ae(t, n)}${e.linePos > 0 ? `${" ".repeat(e.linePos + 5)}^^^\n` : ""}${e.type.toUpperCase()}: ${e.message}
929
+
930
+ `;
931
+ let i = e.type === "error" ? "red" : "orange";
932
+ return r?.html ? `<div class='luma-compiler-log-${e.type}' style="color:${i};"><b> ${e.type.toUpperCase()}: ${e.message}</b></div>` : `${e.type.toUpperCase()}: ${e.message}`;
933
+ }
934
+ function Ae(e, t, n) {
935
+ let r = "";
936
+ for (let i = t - 2; i <= t; i++) {
937
+ let a = e[i - 1];
938
+ a !== void 0 && (r += B(a, t, n));
939
+ }
940
+ return r;
941
+ }
942
+ function B(e, t, n) {
943
+ let r = n?.html ? Me(e) : e;
944
+ return `${je(String(t), 4)}: ${r}${n?.html ? "<br/>" : "\n"}`;
945
+ }
946
+ function je(e, t) {
947
+ let n = "";
948
+ for (let r = e.length; r < t; ++r) n += " ";
949
+ return n + e;
950
+ }
951
+ function Me(e) {
952
+ return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&#039;");
953
+ }
954
+ //#endregion
955
+ //#region node_modules/@luma.gl/core/dist/adapter/resources/shader.js
956
+ var Ne = class e extends E {
957
+ get [Symbol.toStringTag]() {
958
+ return "Shader";
959
+ }
960
+ stage;
961
+ source;
962
+ compilationStatus = "pending";
963
+ constructor(t, n) {
964
+ n = {
965
+ ...n,
966
+ debugShaders: n.debugShaders || t.props.debugShaders || "errors"
967
+ }, super(t, {
968
+ id: Pe(n),
969
+ ...n
970
+ }, e.defaultProps), this.stage = this.props.stage, this.source = this.props.source;
971
+ }
972
+ getCompilationInfoSync() {
973
+ return null;
974
+ }
975
+ getTranslatedSource() {
976
+ return null;
977
+ }
978
+ async debugShader() {
979
+ let e = this.props.debugShaders;
980
+ switch (e) {
981
+ case "never": return;
982
+ case "errors": if (this.compilationStatus === "success") return;
983
+ }
984
+ try {
985
+ let t = await this.getCompilationInfo();
986
+ if (e === "warnings" && t?.length === 0) return;
987
+ this._displayShaderLog(t, this.id);
988
+ } catch (e) {
989
+ v.warn(`Shader ${this.id}: failed to fetch compilation info during debug logging`, e)();
990
+ }
991
+ }
992
+ _displayShaderLog(e, t) {
993
+ if (typeof document > "u" || !document?.createElement) return;
994
+ let n = t, r = `${this.stage} shader "${n}"`, i = ke(e, this.source, {
995
+ showSourceCode: "all",
996
+ html: !0
997
+ }), a = this.getTranslatedSource(), o = document.createElement("div");
998
+ o.innerHTML = `\
999
+ <h1>Compilation error in ${r}</h1>
1000
+ <div style="display:flex;position:fixed;top:10px;right:20px;gap:2px;">
1001
+ <button id="copy">Copy source</button><br/>
1002
+ <button id="close">Close</button>
1003
+ </div>
1004
+ <code><pre>${i}</pre></code>`, a && (o.innerHTML += `<br /><h1>Translated Source</h1><br /><br /><code><pre>${a}</pre></code>`), o.style.top = "0", o.style.left = "0", o.style.background = "white", o.style.position = "fixed", o.style.zIndex = "9999", o.style.maxWidth = "100vw", o.style.maxHeight = "100vh", o.style.overflowY = "auto", document.body.appendChild(o), o.querySelector(".luma-compiler-log-error")?.scrollIntoView(), o.querySelector("button#close").onclick = () => {
1005
+ o.remove();
1006
+ }, o.querySelector("button#copy").onclick = () => {
1007
+ navigator.clipboard.writeText(this.source);
1008
+ };
1009
+ }
1010
+ static defaultProps = {
1011
+ ...E.defaultProps,
1012
+ language: "auto",
1013
+ stage: void 0,
1014
+ source: "",
1015
+ sourceMap: null,
1016
+ entryPoint: "main",
1017
+ debugShaders: void 0
1018
+ };
1019
+ };
1020
+ function Pe(e) {
1021
+ return Fe(e.source) || e.id || b(`unnamed ${e.stage}-shader`);
1022
+ }
1023
+ function Fe(e, t = "unnamed") {
1024
+ return /#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/.exec(e)?.[1] ?? t;
1025
+ }
1026
+ //#endregion
1027
+ //#region node_modules/@luma.gl/core/dist/adapter/resources/render-pipeline.js
1028
+ var Ie = class e extends E {
1029
+ get [Symbol.toStringTag]() {
1030
+ return "RenderPipeline";
1031
+ }
1032
+ shaderLayout;
1033
+ bufferLayout;
1034
+ linkStatus = "pending";
1035
+ hash = "";
1036
+ sharedRenderPipeline = null;
1037
+ get isPending() {
1038
+ return this.linkStatus === "pending" || this.vs.compilationStatus === "pending" || this.fs?.compilationStatus === "pending";
1039
+ }
1040
+ get isErrored() {
1041
+ return this.linkStatus === "error" || this.vs.compilationStatus === "error" || this.fs?.compilationStatus === "error";
1042
+ }
1043
+ constructor(t, n) {
1044
+ super(t, n, e.defaultProps), this.shaderLayout = this.props.shaderLayout, this.bufferLayout = this.props.bufferLayout || [], this.sharedRenderPipeline = this.props._sharedRenderPipeline || null;
1045
+ }
1046
+ static defaultProps = {
1047
+ ...E.defaultProps,
1048
+ vs: null,
1049
+ vertexEntryPoint: "vertexMain",
1050
+ vsConstants: {},
1051
+ fs: null,
1052
+ fragmentEntryPoint: "fragmentMain",
1053
+ fsConstants: {},
1054
+ shaderLayout: null,
1055
+ bufferLayout: [],
1056
+ topology: "triangle-list",
1057
+ colorAttachmentFormats: void 0,
1058
+ depthStencilAttachmentFormat: void 0,
1059
+ parameters: {},
1060
+ varyings: void 0,
1061
+ bufferMode: void 0,
1062
+ disableWarnings: !1,
1063
+ _sharedRenderPipeline: void 0,
1064
+ _uniformBlockLayouts: [],
1065
+ bindings: void 0,
1066
+ bindGroups: void 0
1067
+ };
1068
+ };
1069
+ //#endregion
1070
+ //#region node_modules/@luma.gl/core/dist/shadertypes/shader-types/shader-type-decoder.js
1071
+ function V(e) {
1072
+ let t = Ue[U(e)];
1073
+ if (!t) throw Error(`Unsupported variable shader type: ${e}`);
1074
+ return t;
1075
+ }
1076
+ function Le(e) {
1077
+ let t = He[H(e)];
1078
+ if (!t) throw Error(`Unsupported attribute shader type: ${e}`);
1079
+ let [n, r] = t, i = n === "i32" || n === "u32", a = n !== "u32";
1080
+ return {
1081
+ primitiveType: n,
1082
+ components: r,
1083
+ byteLength: Ve[n] * r,
1084
+ integer: i,
1085
+ signed: a
1086
+ };
1087
+ }
1088
+ var Re = class {
1089
+ getVariableShaderTypeInfo(e) {
1090
+ return V(e);
1091
+ }
1092
+ getAttributeShaderTypeInfo(e) {
1093
+ return Le(e);
1094
+ }
1095
+ makeShaderAttributeType(e, t) {
1096
+ return ze(e, t);
1097
+ }
1098
+ resolveAttributeShaderTypeAlias(e) {
1099
+ return H(e);
1100
+ }
1101
+ resolveVariableShaderTypeAlias(e) {
1102
+ return U(e);
1103
+ }
1104
+ };
1105
+ function ze(e, t) {
1106
+ return t === 1 ? e : `vec${t}<${e}>`;
1107
+ }
1108
+ function H(e) {
1109
+ return We[e] || e;
1110
+ }
1111
+ function U(e) {
1112
+ return Ge[e] || e;
1113
+ }
1114
+ var Be = new Re(), Ve = {
1115
+ f32: 4,
1116
+ f16: 2,
1117
+ i32: 4,
1118
+ u32: 4
1119
+ }, He = {
1120
+ f32: ["f32", 1],
1121
+ "vec2<f32>": ["f32", 2],
1122
+ "vec3<f32>": ["f32", 3],
1123
+ "vec4<f32>": ["f32", 4],
1124
+ f16: ["f16", 1],
1125
+ "vec2<f16>": ["f16", 2],
1126
+ "vec3<f16>": ["f16", 3],
1127
+ "vec4<f16>": ["f16", 4],
1128
+ i32: ["i32", 1],
1129
+ "vec2<i32>": ["i32", 2],
1130
+ "vec3<i32>": ["i32", 3],
1131
+ "vec4<i32>": ["i32", 4],
1132
+ u32: ["u32", 1],
1133
+ "vec2<u32>": ["u32", 2],
1134
+ "vec3<u32>": ["u32", 3],
1135
+ "vec4<u32>": ["u32", 4]
1136
+ }, Ue = {
1137
+ f32: {
1138
+ type: "f32",
1139
+ components: 1
1140
+ },
1141
+ f16: {
1142
+ type: "f16",
1143
+ components: 1
1144
+ },
1145
+ i32: {
1146
+ type: "i32",
1147
+ components: 1
1148
+ },
1149
+ u32: {
1150
+ type: "u32",
1151
+ components: 1
1152
+ },
1153
+ "vec2<f32>": {
1154
+ type: "f32",
1155
+ components: 2
1156
+ },
1157
+ "vec3<f32>": {
1158
+ type: "f32",
1159
+ components: 3
1160
+ },
1161
+ "vec4<f32>": {
1162
+ type: "f32",
1163
+ components: 4
1164
+ },
1165
+ "vec2<f16>": {
1166
+ type: "f16",
1167
+ components: 2
1168
+ },
1169
+ "vec3<f16>": {
1170
+ type: "f16",
1171
+ components: 3
1172
+ },
1173
+ "vec4<f16>": {
1174
+ type: "f16",
1175
+ components: 4
1176
+ },
1177
+ "vec2<i32>": {
1178
+ type: "i32",
1179
+ components: 2
1180
+ },
1181
+ "vec3<i32>": {
1182
+ type: "i32",
1183
+ components: 3
1184
+ },
1185
+ "vec4<i32>": {
1186
+ type: "i32",
1187
+ components: 4
1188
+ },
1189
+ "vec2<u32>": {
1190
+ type: "u32",
1191
+ components: 2
1192
+ },
1193
+ "vec3<u32>": {
1194
+ type: "u32",
1195
+ components: 3
1196
+ },
1197
+ "vec4<u32>": {
1198
+ type: "u32",
1199
+ components: 4
1200
+ },
1201
+ "mat2x2<f32>": {
1202
+ type: "f32",
1203
+ components: 4
1204
+ },
1205
+ "mat2x3<f32>": {
1206
+ type: "f32",
1207
+ components: 6
1208
+ },
1209
+ "mat2x4<f32>": {
1210
+ type: "f32",
1211
+ components: 8
1212
+ },
1213
+ "mat3x2<f32>": {
1214
+ type: "f32",
1215
+ components: 6
1216
+ },
1217
+ "mat3x3<f32>": {
1218
+ type: "f32",
1219
+ components: 9
1220
+ },
1221
+ "mat3x4<f32>": {
1222
+ type: "f32",
1223
+ components: 12
1224
+ },
1225
+ "mat4x2<f32>": {
1226
+ type: "f32",
1227
+ components: 8
1228
+ },
1229
+ "mat4x3<f32>": {
1230
+ type: "f32",
1231
+ components: 12
1232
+ },
1233
+ "mat4x4<f32>": {
1234
+ type: "f32",
1235
+ components: 16
1236
+ },
1237
+ "mat2x2<f16>": {
1238
+ type: "f16",
1239
+ components: 4
1240
+ },
1241
+ "mat2x3<f16>": {
1242
+ type: "f16",
1243
+ components: 6
1244
+ },
1245
+ "mat2x4<f16>": {
1246
+ type: "f16",
1247
+ components: 8
1248
+ },
1249
+ "mat3x2<f16>": {
1250
+ type: "f16",
1251
+ components: 6
1252
+ },
1253
+ "mat3x3<f16>": {
1254
+ type: "f16",
1255
+ components: 9
1256
+ },
1257
+ "mat3x4<f16>": {
1258
+ type: "f16",
1259
+ components: 12
1260
+ },
1261
+ "mat4x2<f16>": {
1262
+ type: "f16",
1263
+ components: 8
1264
+ },
1265
+ "mat4x3<f16>": {
1266
+ type: "f16",
1267
+ components: 12
1268
+ },
1269
+ "mat4x4<f16>": {
1270
+ type: "f16",
1271
+ components: 16
1272
+ },
1273
+ "mat2x2<i32>": {
1274
+ type: "i32",
1275
+ components: 4
1276
+ },
1277
+ "mat2x3<i32>": {
1278
+ type: "i32",
1279
+ components: 6
1280
+ },
1281
+ "mat2x4<i32>": {
1282
+ type: "i32",
1283
+ components: 8
1284
+ },
1285
+ "mat3x2<i32>": {
1286
+ type: "i32",
1287
+ components: 6
1288
+ },
1289
+ "mat3x3<i32>": {
1290
+ type: "i32",
1291
+ components: 9
1292
+ },
1293
+ "mat3x4<i32>": {
1294
+ type: "i32",
1295
+ components: 12
1296
+ },
1297
+ "mat4x2<i32>": {
1298
+ type: "i32",
1299
+ components: 8
1300
+ },
1301
+ "mat4x3<i32>": {
1302
+ type: "i32",
1303
+ components: 12
1304
+ },
1305
+ "mat4x4<i32>": {
1306
+ type: "i32",
1307
+ components: 16
1308
+ },
1309
+ "mat2x2<u32>": {
1310
+ type: "u32",
1311
+ components: 4
1312
+ },
1313
+ "mat2x3<u32>": {
1314
+ type: "u32",
1315
+ components: 6
1316
+ },
1317
+ "mat2x4<u32>": {
1318
+ type: "u32",
1319
+ components: 8
1320
+ },
1321
+ "mat3x2<u32>": {
1322
+ type: "u32",
1323
+ components: 6
1324
+ },
1325
+ "mat3x3<u32>": {
1326
+ type: "u32",
1327
+ components: 9
1328
+ },
1329
+ "mat3x4<u32>": {
1330
+ type: "u32",
1331
+ components: 12
1332
+ },
1333
+ "mat4x2<u32>": {
1334
+ type: "u32",
1335
+ components: 8
1336
+ },
1337
+ "mat4x3<u32>": {
1338
+ type: "u32",
1339
+ components: 12
1340
+ },
1341
+ "mat4x4<u32>": {
1342
+ type: "u32",
1343
+ components: 16
1344
+ }
1345
+ }, We = {
1346
+ vec2i: "vec2<i32>",
1347
+ vec3i: "vec3<i32>",
1348
+ vec4i: "vec4<i32>",
1349
+ vec2u: "vec2<u32>",
1350
+ vec3u: "vec3<u32>",
1351
+ vec4u: "vec4<u32>",
1352
+ vec2f: "vec2<f32>",
1353
+ vec3f: "vec3<f32>",
1354
+ vec4f: "vec4<f32>",
1355
+ vec2h: "vec2<f16>",
1356
+ vec3h: "vec3<f16>",
1357
+ vec4h: "vec4<f16>"
1358
+ }, Ge = {
1359
+ vec2i: "vec2<i32>",
1360
+ vec3i: "vec3<i32>",
1361
+ vec4i: "vec4<i32>",
1362
+ vec2u: "vec2<u32>",
1363
+ vec3u: "vec3<u32>",
1364
+ vec4u: "vec4<u32>",
1365
+ vec2f: "vec2<f32>",
1366
+ vec3f: "vec3<f32>",
1367
+ vec4f: "vec4<f32>",
1368
+ vec2h: "vec2<f16>",
1369
+ vec3h: "vec3<f16>",
1370
+ vec4h: "vec4<f16>",
1371
+ mat2x2f: "mat2x2<f32>",
1372
+ mat2x3f: "mat2x3<f32>",
1373
+ mat2x4f: "mat2x4<f32>",
1374
+ mat3x2f: "mat3x2<f32>",
1375
+ mat3x3f: "mat3x3<f32>",
1376
+ mat3x4f: "mat3x4<f32>",
1377
+ mat4x2f: "mat4x2<f32>",
1378
+ mat4x3f: "mat4x3<f32>",
1379
+ mat4x4f: "mat4x4<f32>",
1380
+ mat2x2i: "mat2x2<i32>",
1381
+ mat2x3i: "mat2x3<i32>",
1382
+ mat2x4i: "mat2x4<i32>",
1383
+ mat3x2i: "mat3x2<i32>",
1384
+ mat3x3i: "mat3x3<i32>",
1385
+ mat3x4i: "mat3x4<i32>",
1386
+ mat4x2i: "mat4x2<i32>",
1387
+ mat4x3i: "mat4x3<i32>",
1388
+ mat4x4i: "mat4x4<i32>",
1389
+ mat2x2u: "mat2x2<u32>",
1390
+ mat2x3u: "mat2x3<u32>",
1391
+ mat2x4u: "mat2x4<u32>",
1392
+ mat3x2u: "mat3x2<u32>",
1393
+ mat3x3u: "mat3x3<u32>",
1394
+ mat3x4u: "mat3x4<u32>",
1395
+ mat4x2u: "mat4x2<u32>",
1396
+ mat4x3u: "mat4x3<u32>",
1397
+ mat4x4u: "mat4x4<u32>",
1398
+ mat2x2h: "mat2x2<f16>",
1399
+ mat2x3h: "mat2x3<f16>",
1400
+ mat2x4h: "mat2x4<f16>",
1401
+ mat3x2h: "mat3x2<f16>",
1402
+ mat3x3h: "mat3x3<f16>",
1403
+ mat3x4h: "mat3x4<f16>",
1404
+ mat4x2h: "mat4x2<f16>",
1405
+ mat4x3h: "mat4x3<f16>",
1406
+ mat4x4h: "mat4x4<f16>"
1407
+ };
1408
+ //#endregion
1409
+ //#region node_modules/@luma.gl/core/dist/shadertypes/shader-types/shader-block-layout.js
1410
+ function Ke(e, t = {}) {
1411
+ let n = { ...e }, r = t.layout ?? "std140", i = {}, a = 0;
1412
+ for (let [e, t] of Object.entries(n)) a = K(i, e, t, a, r);
1413
+ return a = M(a, J(n, r)), {
1414
+ layout: r,
1415
+ byteLength: a * 4,
1416
+ uniformTypes: n,
1417
+ fields: i
1418
+ };
1419
+ }
1420
+ function W(e, t) {
1421
+ let n = U(e), r = V(n), i = /^mat(\d)x(\d)<.+>$/.exec(n);
1422
+ if (i) {
1423
+ let e = Number(i[1]), a = Number(i[2]), o = Y(a, n, r.type, t), s = Je(o.size, o.alignment, t);
1424
+ return {
1425
+ alignment: o.alignment,
1426
+ size: e * s,
1427
+ components: e * a,
1428
+ columns: e,
1429
+ rows: a,
1430
+ columnStride: s,
1431
+ shaderType: n,
1432
+ type: r.type
1433
+ };
1434
+ }
1435
+ let a = /^vec(\d)<.+>$/.exec(n);
1436
+ return a ? Y(Number(a[1]), n, r.type, t) : {
1437
+ alignment: 1,
1438
+ size: 1,
1439
+ components: 1,
1440
+ columns: 1,
1441
+ rows: 1,
1442
+ columnStride: 1,
1443
+ shaderType: n,
1444
+ type: r.type
1445
+ };
1446
+ }
1447
+ function G(e) {
1448
+ return !!e && typeof e == "object" && !Array.isArray(e);
1449
+ }
1450
+ function K(e, t, n, r, i) {
1451
+ if (typeof n == "string") {
1452
+ let a = W(n, i), o = M(r, a.alignment);
1453
+ return e[t] = {
1454
+ offset: o,
1455
+ ...a
1456
+ }, o + a.size;
1457
+ }
1458
+ if (Array.isArray(n)) {
1459
+ if (Array.isArray(n[0])) throw Error(`Nested arrays are not supported for ${t}`);
1460
+ let a = n[0], o = n[1], s = X(a, i), c = M(r, J(n, i));
1461
+ for (let n = 0; n < o; n++) K(e, `${t}[${n}]`, a, c + n * s, i);
1462
+ return c + s * o;
1463
+ }
1464
+ if (G(n)) {
1465
+ let a = J(n, i), o = M(r, a);
1466
+ for (let [r, a] of Object.entries(n)) o = K(e, `${t}.${r}`, a, o, i);
1467
+ return M(o, a);
1468
+ }
1469
+ throw Error(`Unsupported CompositeShaderType for ${t}`);
1470
+ }
1471
+ function q(e, t) {
1472
+ if (typeof e == "string") return W(e, t).size;
1473
+ if (Array.isArray(e)) {
1474
+ let n = e[0], r = e[1];
1475
+ if (Array.isArray(n)) throw Error("Nested arrays are not supported");
1476
+ return X(n, t) * r;
1477
+ }
1478
+ let n = 0;
1479
+ for (let r of Object.values(e)) {
1480
+ let e = r;
1481
+ n = M(n, J(e, t)), n += q(e, t);
1482
+ }
1483
+ return M(n, J(e, t));
1484
+ }
1485
+ function J(e, t) {
1486
+ if (typeof e == "string") return W(e, t).alignment;
1487
+ if (Array.isArray(e)) {
1488
+ let n = e[0], r = J(n, t);
1489
+ return Z(t) ? Math.max(r, 4) : r;
1490
+ }
1491
+ let n = 1;
1492
+ for (let r of Object.values(e)) {
1493
+ let e = J(r, t);
1494
+ n = Math.max(n, e);
1495
+ }
1496
+ return Ye(t) ? Math.max(n, 4) : n;
1497
+ }
1498
+ function Y(e, t, n, r) {
1499
+ return {
1500
+ alignment: e === 2 ? 2 : 4,
1501
+ size: e === 3 ? 3 : e,
1502
+ components: e,
1503
+ columns: 1,
1504
+ rows: e,
1505
+ columnStride: e === 3 ? 3 : e,
1506
+ shaderType: t,
1507
+ type: n
1508
+ };
1509
+ }
1510
+ function X(e, t) {
1511
+ return qe(q(e, t), J(e, t), t);
1512
+ }
1513
+ function qe(e, t, n) {
1514
+ return M(e, Z(n) ? 4 : t);
1515
+ }
1516
+ function Je(e, t, n) {
1517
+ return n === "std140" ? 4 : M(e, t);
1518
+ }
1519
+ function Z(e) {
1520
+ return e === "std140" || e === "wgsl-uniform";
1521
+ }
1522
+ function Ye(e) {
1523
+ return e === "std140" || e === "wgsl-uniform";
1524
+ }
1525
+ //#endregion
1526
+ //#region node_modules/@luma.gl/core/dist/utils/array-utils-flat.js
1527
+ var Q;
1528
+ function $(e) {
1529
+ return (!Q || Q.byteLength < e) && (Q = new ArrayBuffer(e)), Q;
1530
+ }
1531
+ function Xe(e, t) {
1532
+ return new e($(e.BYTES_PER_ELEMENT * t), 0, t);
1533
+ }
1534
+ //#endregion
1535
+ export { r as C, i as S, ve as _, Ke as a, v as b, Ie as c, Oe as d, we as f, P as g, F as h, G as i, Ne as l, N as m, $ as n, V as o, L as p, W as r, Be as s, Xe as t, R as u, E as v, n as w, _ as x, b as y };