@takram/three-geospatial 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1,22 +1,13 @@
1
- import { Loader as qt, FileLoader as _i, BufferGeometry as bi, BufferAttribute as zr, Box3 as Ni, Vector3 as Re, Sphere as Oi, ByteType as mi, UnsignedByteType as kr, ShortType as Ui, UnsignedShortType as Ci, IntType as Ri, UnsignedIntType as xi, HalfFloatType as lt, FloatType as ft, LinearFilter as zt, RGBAFormat as ln, Data3DTexture as un, DataTexture as Fi, MathUtils as ye, Material as Vt, REVISION as Li, DataTextureLoader as Pi, RedFormat as hn, DataUtils as Zr, Quaternion as Mi, Matrix4 as Di, Ray as Bi, RepeatWrapping as sr, NearestFilter as Hr, Vector2 as fn } from "three";
2
- import { E as Gr, G as st } from "./shared.js";
3
- import { a as oa } from "./shared.js";
4
- var zi = process.env.NODE_ENV === "production", Wr = "Invariant failed";
5
- function vn(r, e) {
6
- if (!r) {
7
- if (zi)
8
- throw new Error(Wr);
9
- var i = Wr;
10
- throw new Error(i);
11
- }
12
- }
13
- class ki extends qt {
1
+ import { Loader as qt, FileLoader as Ii, BufferGeometry as _i, BufferAttribute as zr, Box3 as bi, Vector3 as Re, Sphere as Ni, ByteType as Oi, UnsignedByteType as kr, ShortType as Ui, UnsignedShortType as mi, IntType as Ci, UnsignedIntType as Ri, HalfFloatType as lt, FloatType as ft, LinearFilter as zt, RGBAFormat as cn, Data3DTexture as ln, DataTexture as xi, MathUtils as ye, Material as Vt, REVISION as Fi, DataTextureLoader as Li, RedFormat as un, DataUtils as Zr, Quaternion as Mi, Matrix4 as Pi, Ray as Di, RepeatWrapping as sr, NearestFilter as Hr, Vector2 as hn } from "three";
2
+ import { i as fn, E as Gr, G as st } from "./shared.js";
3
+ import { a as ia } from "./shared.js";
4
+ class Bi extends qt {
14
5
  load(e, i, s, o) {
15
- const c = new _i(this.manager);
6
+ const c = new Ii(this.manager);
16
7
  c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setPath(this.path), c.setWithCredentials(this.withCredentials), c.load(
17
8
  e,
18
9
  (l) => {
19
- vn(l instanceof ArrayBuffer);
10
+ fn(l instanceof ArrayBuffer);
20
11
  try {
21
12
  i(l);
22
13
  } catch (v) {
@@ -28,9 +19,9 @@ class ki extends qt {
28
19
  );
29
20
  }
30
21
  }
31
- function go(r) {
22
+ function wo(r) {
32
23
  }
33
- function So(r) {
24
+ function Ao(r) {
34
25
  var c;
35
26
  const { attributes: e, index: i, boundingBox: s, boundingSphere: o } = r;
36
27
  return [
@@ -43,7 +34,7 @@ function So(r) {
43
34
  ].filter((l) => l != null)
44
35
  ];
45
36
  }
46
- function To(r, e = new bi()) {
37
+ function go(r, e = new _i()) {
47
38
  for (const [i, s] of Object.entries(r.attributes))
48
39
  e.setAttribute(
49
40
  i,
@@ -59,21 +50,21 @@ function To(r, e = new bi()) {
59
50
  r.index.normalized
60
51
  ) : null, r.boundingBox != null) {
61
52
  const { min: i, max: s } = r.boundingBox;
62
- e.boundingBox = new Ni(
53
+ e.boundingBox = new bi(
63
54
  new Re(i.x, i.y, i.z),
64
55
  new Re(s.x, s.y, s.z)
65
56
  );
66
57
  }
67
58
  if (r.boundingSphere != null) {
68
59
  const { center: i, radius: s } = r.boundingSphere;
69
- e.boundingSphere = new Oi(
60
+ e.boundingSphere = new Ni(
70
61
  new Re(i.x, i.y, i.z),
71
62
  s
72
63
  );
73
64
  }
74
65
  return e;
75
66
  }
76
- const Zi = 128, Hi = 128, Gi = 64, Wi = "9627216cc50057994c98a2118f3c4a23765d43b9", Eo = `https://media.githubusercontent.com/media/takram-design-engineering/three-geospatial/${Wi}/packages/core/assets/stbn.bin`, Xi = "This is not an object", Yi = "This is not a Float16Array object", Xr = "This constructor is not a subclass of Float16Array", yn = "The constructor property value is not an object", qi = "Species constructor didn't return TypedArray object", Vi = "Derived constructor created TypedArray object which was too small length", vt = "Attempting to access detached ArrayBuffer", yr = "Cannot convert undefined or null to object", pr = "Cannot mix BigInt and other types, use explicit conversions", Yr = "@@iterator property is not callable", qr = "Reduce of empty array with no initial value", Ji = "The comparison function must be either a function or undefined", or = "Offset is out of bounds";
67
+ const zi = 128, ki = 128, Zi = 64, Hi = "9627216cc50057994c98a2118f3c4a23765d43b9", So = `https://media.githubusercontent.com/media/takram-design-engineering/three-geospatial/${Hi}/packages/core/assets/stbn.bin`, Gi = "This is not an object", Wi = "This is not a Float16Array object", Wr = "This constructor is not a subclass of Float16Array", vn = "The constructor property value is not an object", Xi = "Species constructor didn't return TypedArray object", Yi = "Derived constructor created TypedArray object which was too small length", vt = "Attempting to access detached ArrayBuffer", yr = "Cannot convert undefined or null to object", pr = "Cannot mix BigInt and other types, use explicit conversions", Xr = "@@iterator property is not callable", Yr = "Reduce of empty array with no initial value", qi = "The comparison function must be either a function or undefined", or = "Offset is out of bounds";
77
68
  function Z(r) {
78
69
  return (e, ...i) => ie(r, e, i);
79
70
  }
@@ -88,30 +79,30 @@ function $e(r, e) {
88
79
  const {
89
80
  apply: ie,
90
81
  construct: ut,
91
- defineProperty: Vr,
82
+ defineProperty: qr,
92
83
  get: ar,
93
84
  getOwnPropertyDescriptor: Ye,
94
85
  getPrototypeOf: At,
95
86
  has: dr,
96
- ownKeys: pn,
97
- set: Jr,
98
- setPrototypeOf: dn
99
- } = Reflect, $i = Proxy, {
100
- EPSILON: Qi,
101
- MAX_SAFE_INTEGER: $r,
102
- isFinite: wn,
87
+ ownKeys: yn,
88
+ set: Vr,
89
+ setPrototypeOf: pn
90
+ } = Reflect, Vi = Proxy, {
91
+ EPSILON: Ji,
92
+ MAX_SAFE_INTEGER: Jr,
93
+ isFinite: dn,
103
94
  isNaN: qe
104
95
  } = Number, {
105
96
  iterator: Ie,
106
- species: ji,
97
+ species: $i,
107
98
  toStringTag: Ir,
108
- for: Ki
99
+ for: Qi
109
100
  } = Symbol, Ve = Object, {
110
101
  create: Jt,
111
102
  defineProperty: gt,
112
- freeze: es,
113
- is: Qr
114
- } = Ve, wr = Ve.prototype, ts = (
103
+ freeze: ji,
104
+ is: $r
105
+ } = Ve, wr = Ve.prototype, Ki = (
115
106
  /** @type {any} */
116
107
  wr.__lookupGetter__ ? Z(
117
108
  /** @type {any} */
@@ -131,20 +122,20 @@ const {
131
122
  ), Ce = (
132
123
  /** @type {any} */
133
124
  Ve.hasOwn || Z(wr.hasOwnProperty)
134
- ), An = Array, gn = An.isArray, $t = An.prototype, rs = Z($t.join), ns = Z($t.push), is = Z(
125
+ ), wn = Array, An = wn.isArray, $t = wn.prototype, es = Z($t.join), ts = Z($t.push), rs = Z(
135
126
  $t.toLocaleString
136
- ), _r = $t[Ie], ss = Z(_r), {
137
- abs: os,
138
- trunc: Sn
139
- } = Math, Qt = ArrayBuffer, as = Qt.isView, Tn = Qt.prototype, cs = Z(Tn.slice), ls = $e(Tn, "byteLength"), Ar = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : null, us = Ar && $e(Ar.prototype, "byteLength"), br = At(Uint8Array), hs = br.from, Q = br.prototype, fs = Q[Ie], vs = Z(Q.keys), ys = Z(
127
+ ), _r = $t[Ie], ns = Z(_r), {
128
+ abs: is,
129
+ trunc: gn
130
+ } = Math, Qt = ArrayBuffer, ss = Qt.isView, Sn = Qt.prototype, os = Z(Sn.slice), as = $e(Sn, "byteLength"), Ar = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : null, cs = Ar && $e(Ar.prototype, "byteLength"), br = At(Uint8Array), ls = br.from, Q = br.prototype, us = Q[Ie], hs = Z(Q.keys), fs = Z(
140
131
  Q.values
141
- ), ps = Z(
132
+ ), vs = Z(
142
133
  Q.entries
143
- ), ds = Z(Q.set), jr = Z(
134
+ ), ys = Z(Q.set), Qr = Z(
144
135
  Q.reverse
145
- ), ws = Z(Q.fill), As = Z(
136
+ ), ps = Z(Q.fill), ds = Z(
146
137
  Q.copyWithin
147
- ), Kr = Z(Q.sort), ot = Z(Q.slice), gs = Z(
138
+ ), jr = Z(Q.sort), ot = Z(Q.slice), ws = Z(
148
139
  Q.subarray
149
140
  ), $ = $e(
150
141
  Q,
@@ -155,16 +146,16 @@ const {
155
146
  ), x = $e(
156
147
  Q,
157
148
  "length"
158
- ), En = $e(
149
+ ), Tn = $e(
159
150
  Q,
160
151
  Ir
161
- ), Ss = Uint8Array, ce = Uint16Array, en = (...r) => ie(hs, ce, r), Nr = Uint32Array, Ts = Float32Array, ze = At([][Ie]()), jt = Z(ze.next), Es = Z(function* () {
162
- }().next), Is = At(ze), _s = DataView.prototype, bs = Z(
163
- _s.getUint16
164
- ), X = TypeError, cr = RangeError, In = WeakSet, _n = In.prototype, Ns = Z(_n.add), Os = Z(_n.has), Kt = WeakMap, Or = Kt.prototype, kt = Z(Or.get), ms = Z(Or.has), mr = Z(Or.set), bn = new Kt(), Us = Jt(null, {
152
+ ), As = Uint8Array, ce = Uint16Array, Kr = (...r) => ie(ls, ce, r), Nr = Uint32Array, gs = Float32Array, ze = At([][Ie]()), jt = Z(ze.next), Ss = Z(function* () {
153
+ }().next), Ts = At(ze), Es = DataView.prototype, Is = Z(
154
+ Es.getUint16
155
+ ), X = TypeError, cr = RangeError, En = WeakSet, In = En.prototype, _s = Z(In.add), bs = Z(In.has), Kt = WeakMap, Or = Kt.prototype, kt = Z(Or.get), Ns = Z(Or.has), Ur = Z(Or.set), _n = new Kt(), Os = Jt(null, {
165
156
  next: {
166
157
  value: function() {
167
- const e = kt(bn, this);
158
+ const e = kt(_n, this);
168
159
  return jt(e);
169
160
  }
170
161
  },
@@ -177,41 +168,41 @@ const {
177
168
  function ht(r) {
178
169
  if (r[Ie] === _r && ze.next === jt)
179
170
  return r;
180
- const e = Jt(Us);
181
- return mr(bn, e, ss(r)), e;
171
+ const e = Jt(Os);
172
+ return Ur(_n, e, ns(r)), e;
182
173
  }
183
- const Nn = new Kt(), On = Jt(Is, {
174
+ const bn = new Kt(), Nn = Jt(Ts, {
184
175
  next: {
185
176
  value: function() {
186
- const e = kt(Nn, this);
187
- return Es(e);
177
+ const e = kt(bn, this);
178
+ return Ss(e);
188
179
  },
189
180
  writable: !0,
190
181
  configurable: !0
191
182
  }
192
183
  });
193
- for (const r of pn(ze))
194
- r !== "next" && gt(On, r, Ye(ze, r));
195
- function tn(r) {
196
- const e = Jt(On);
197
- return mr(Nn, e, r), e;
184
+ for (const r of yn(ze))
185
+ r !== "next" && gt(Nn, r, Ye(ze, r));
186
+ function en(r) {
187
+ const e = Jt(Nn);
188
+ return Ur(bn, e, r), e;
198
189
  }
199
190
  function Zt(r) {
200
191
  return r !== null && typeof r == "object" || typeof r == "function";
201
192
  }
202
- function rn(r) {
193
+ function tn(r) {
203
194
  return r !== null && typeof r == "object";
204
195
  }
205
196
  function Ht(r) {
206
- return En(r) !== void 0;
197
+ return Tn(r) !== void 0;
207
198
  }
208
199
  function gr(r) {
209
- const e = En(r);
200
+ const e = Tn(r);
210
201
  return e === "BigInt64Array" || e === "BigUint64Array";
211
202
  }
212
- function Cs(r) {
203
+ function Us(r) {
213
204
  try {
214
- return gn(r) ? !1 : (ls(
205
+ return An(r) ? !1 : (as(
215
206
  /** @type {any} */
216
207
  r
217
208
  ), !0);
@@ -219,11 +210,11 @@ function Cs(r) {
219
210
  return !1;
220
211
  }
221
212
  }
222
- function mn(r) {
213
+ function On(r) {
223
214
  if (Ar === null)
224
215
  return !1;
225
216
  try {
226
- return us(
217
+ return cs(
227
218
  /** @type {any} */
228
219
  r
229
220
  ), !0;
@@ -231,69 +222,69 @@ function mn(r) {
231
222
  return !1;
232
223
  }
233
224
  }
234
- function Rs(r) {
235
- return Cs(r) || mn(r);
225
+ function ms(r) {
226
+ return Us(r) || On(r);
236
227
  }
237
- function nn(r) {
238
- return gn(r) ? r[Ie] === _r && ze.next === jt : !1;
228
+ function rn(r) {
229
+ return An(r) ? r[Ie] === _r && ze.next === jt : !1;
239
230
  }
240
- function xs(r) {
241
- return Ht(r) ? r[Ie] === fs && ze.next === jt : !1;
231
+ function Cs(r) {
232
+ return Ht(r) ? r[Ie] === us && ze.next === jt : !1;
242
233
  }
243
234
  function xt(r) {
244
235
  if (typeof r != "string")
245
236
  return !1;
246
237
  const e = +r;
247
- return r !== e + "" || !wn(e) ? !1 : e === Sn(e);
238
+ return r !== e + "" || !dn(e) ? !1 : e === gn(e);
248
239
  }
249
- const Gt = Ki("__Float16Array__");
250
- function Fs(r) {
251
- if (!rn(r))
240
+ const Gt = Qi("__Float16Array__");
241
+ function Rs(r) {
242
+ if (!tn(r))
252
243
  return !1;
253
244
  const e = At(r);
254
- if (!rn(e))
245
+ if (!tn(e))
255
246
  return !1;
256
247
  const i = e.constructor;
257
248
  if (i === void 0)
258
249
  return !1;
259
250
  if (!Zt(i))
260
- throw X(yn);
251
+ throw X(vn);
261
252
  return dr(i, Gt);
262
253
  }
263
- const Sr = 1 / Qi;
264
- function Ls(r) {
254
+ const Sr = 1 / Ji;
255
+ function xs(r) {
265
256
  return r + Sr - Sr;
266
257
  }
267
- const Un = 6103515625e-14, Ps = 65504, Cn = 9765625e-10, sn = Cn * Un, Ms = Cn * Sr;
268
- function Ds(r) {
258
+ const Un = 6103515625e-14, Fs = 65504, mn = 9765625e-10, nn = mn * Un, Ls = mn * Sr;
259
+ function Ms(r) {
269
260
  const e = +r;
270
- if (!wn(e) || e === 0)
261
+ if (!dn(e) || e === 0)
271
262
  return e;
272
- const i = e > 0 ? 1 : -1, s = os(e);
263
+ const i = e > 0 ? 1 : -1, s = is(e);
273
264
  if (s < Un)
274
- return i * Ls(s / sn) * sn;
275
- const o = (1 + Ms) * s, c = o - (o - s);
276
- return c > Ps || qe(c) ? i * (1 / 0) : i * c;
265
+ return i * xs(s / nn) * nn;
266
+ const o = (1 + Ls) * s, c = o - (o - s);
267
+ return c > Fs || qe(c) ? i * (1 / 0) : i * c;
277
268
  }
278
- const Rn = new Qt(4), xn = new Ts(Rn), Fn = new Nr(Rn), we = new ce(512), Ae = new Ss(512);
269
+ const Cn = new Qt(4), Rn = new gs(Cn), xn = new Nr(Cn), we = new ce(512), Ae = new As(512);
279
270
  for (let r = 0; r < 256; ++r) {
280
271
  const e = r - 127;
281
272
  e < -24 ? (we[r] = 0, we[r | 256] = 32768, Ae[r] = 24, Ae[r | 256] = 24) : e < -14 ? (we[r] = 1024 >> -e - 14, we[r | 256] = 1024 >> -e - 14 | 32768, Ae[r] = -e - 1, Ae[r | 256] = -e - 1) : e <= 15 ? (we[r] = e + 15 << 10, we[r | 256] = e + 15 << 10 | 32768, Ae[r] = 13, Ae[r | 256] = 13) : e < 128 ? (we[r] = 31744, we[r | 256] = 64512, Ae[r] = 24, Ae[r | 256] = 24) : (we[r] = 31744, we[r | 256] = 64512, Ae[r] = 13, Ae[r | 256] = 13);
282
273
  }
283
274
  function Ee(r) {
284
- xn[0] = Ds(r);
285
- const e = Fn[0], i = e >> 23 & 511;
275
+ Rn[0] = Ms(r);
276
+ const e = xn[0], i = e >> 23 & 511;
286
277
  return we[i] + ((e & 8388607) >> Ae[i]);
287
278
  }
288
- const Ur = new Nr(2048);
279
+ const mr = new Nr(2048);
289
280
  for (let r = 1; r < 1024; ++r) {
290
281
  let e = r << 13, i = 0;
291
282
  for (; (e & 8388608) === 0; )
292
283
  e <<= 1, i -= 8388608;
293
- e &= -8388609, i += 947912704, Ur[r] = e | i;
284
+ e &= -8388609, i += 947912704, mr[r] = e | i;
294
285
  }
295
286
  for (let r = 1024; r < 2048; ++r)
296
- Ur[r] = 939524096 + (r - 1024 << 13);
287
+ mr[r] = 939524096 + (r - 1024 << 13);
297
288
  const Qe = new Nr(64);
298
289
  for (let r = 1; r < 31; ++r)
299
290
  Qe[r] = r << 23;
@@ -302,42 +293,42 @@ Qe[32] = 2147483648;
302
293
  for (let r = 33; r < 63; ++r)
303
294
  Qe[r] = 2147483648 + (r - 32 << 23);
304
295
  Qe[63] = 3347054592;
305
- const Ln = new ce(64);
296
+ const Fn = new ce(64);
306
297
  for (let r = 1; r < 64; ++r)
307
- r !== 32 && (Ln[r] = 1024);
298
+ r !== 32 && (Fn[r] = 1024);
308
299
  function L(r) {
309
300
  const e = r >> 10;
310
- return Fn[0] = Ur[Ln[e] + (r & 1023)] + Qe[e], xn[0];
301
+ return xn[0] = mr[Fn[e] + (r & 1023)] + Qe[e], Rn[0];
311
302
  }
312
- function Ue(r) {
303
+ function me(r) {
313
304
  const e = +r;
314
- return qe(e) || e === 0 ? 0 : Sn(e);
305
+ return qe(e) || e === 0 ? 0 : gn(e);
315
306
  }
316
307
  function lr(r) {
317
- const e = Ue(r);
318
- return e < 0 ? 0 : e < $r ? e : $r;
308
+ const e = me(r);
309
+ return e < 0 ? 0 : e < Jr ? e : Jr;
319
310
  }
320
311
  function Ft(r, e) {
321
312
  if (!Zt(r))
322
- throw X(Xi);
313
+ throw X(Gi);
323
314
  const i = r.constructor;
324
315
  if (i === void 0)
325
316
  return e;
326
317
  if (!Zt(i))
327
- throw X(yn);
328
- const s = i[ji];
318
+ throw X(vn);
319
+ const s = i[$i];
329
320
  return s ?? e;
330
321
  }
331
322
  function yt(r) {
332
- if (mn(r))
323
+ if (On(r))
333
324
  return !1;
334
325
  try {
335
- return cs(r, 0, 0), !1;
326
+ return os(r, 0, 0), !1;
336
327
  } catch {
337
328
  }
338
329
  return !0;
339
330
  }
340
- function on(r, e) {
331
+ function sn(r, e) {
341
332
  const i = qe(r), s = qe(e);
342
333
  if (i && s)
343
334
  return 0;
@@ -348,7 +339,7 @@ function on(r, e) {
348
339
  if (r > e)
349
340
  return 1;
350
341
  if (r === 0 && e === 0) {
351
- const o = Qr(r, 0), c = Qr(e, 0);
342
+ const o = $r(r, 0), c = $r(e, 0);
352
343
  if (!o && c)
353
344
  return -1;
354
345
  if (o && !c)
@@ -358,16 +349,16 @@ function on(r, e) {
358
349
  }
359
350
  const Cr = 2, Wt = new Kt();
360
351
  function Xe(r) {
361
- return ms(Wt, r) || !as(r) && Fs(r);
352
+ return Ns(Wt, r) || !ss(r) && Rs(r);
362
353
  }
363
354
  function R(r) {
364
355
  if (!Xe(r))
365
- throw X(Yi);
356
+ throw X(Wi);
366
357
  }
367
358
  function Lt(r, e) {
368
359
  const i = Xe(r), s = Ht(r);
369
360
  if (!i && !s)
370
- throw X(qi);
361
+ throw X(Xi);
371
362
  if (typeof e == "number") {
372
363
  let o;
373
364
  if (i) {
@@ -377,7 +368,7 @@ function Lt(r, e) {
377
368
  o = x(r);
378
369
  if (o < e)
379
370
  throw X(
380
- Vi
371
+ Yi
381
372
  );
382
373
  }
383
374
  if (gr(r))
@@ -406,27 +397,27 @@ function O(r) {
406
397
  ], r.constructor);
407
398
  return kt(Wt, s);
408
399
  }
409
- function an(r) {
400
+ function on(r) {
410
401
  const e = x(r), i = [];
411
402
  for (let s = 0; s < e; ++s)
412
403
  i[s] = L(r[s]);
413
404
  return i;
414
405
  }
415
- const Pn = new In();
416
- for (const r of pn(Q)) {
406
+ const Ln = new En();
407
+ for (const r of yn(Q)) {
417
408
  if (r === Ir)
418
409
  continue;
419
410
  const e = Ye(Q, r);
420
- Ce(e, "get") && typeof e.get == "function" && Ns(Pn, e.get);
411
+ Ce(e, "get") && typeof e.get == "function" && _s(Ln, e.get);
421
412
  }
422
- const Bs = es(
413
+ const Ps = ji(
423
414
  /** @type {ProxyHandler<Float16BitsArray>} */
424
415
  {
425
416
  get(r, e, i) {
426
- return xt(e) && Ce(r, e) ? L(ar(r, e)) : Os(Pn, ts(r, e)) ? ar(r, e) : ar(r, e, i);
417
+ return xt(e) && Ce(r, e) ? L(ar(r, e)) : bs(Ln, Ki(r, e)) ? ar(r, e) : ar(r, e, i);
427
418
  },
428
419
  set(r, e, i, s) {
429
- return xt(e) && Ce(r, e) ? Jr(r, e, Ee(i)) : Jr(r, e, i, s);
420
+ return xt(e) && Ce(r, e) ? Vr(r, e, Ee(i)) : Vr(r, e, i, s);
430
421
  },
431
422
  getOwnPropertyDescriptor(r, e) {
432
423
  if (xt(e) && Ce(r, e)) {
@@ -436,7 +427,7 @@ const Bs = es(
436
427
  return Ye(r, e);
437
428
  },
438
429
  defineProperty(r, e, i) {
439
- return xt(e) && Ce(r, e) && Ce(i, "value") && (i.value = Ee(i.value)), Vr(r, e, i);
430
+ return xt(e) && Ce(r, e) && Ce(i, "value") && (i.value = Ee(i.value)), qr(r, e, i);
440
431
  }
441
432
  }
442
433
  );
@@ -446,7 +437,7 @@ class B {
446
437
  let o;
447
438
  if (Xe(e))
448
439
  o = ut(ce, [O(e)], new.target);
449
- else if (Zt(e) && !Rs(e)) {
440
+ else if (Zt(e) && !ms(e)) {
450
441
  let l, v;
451
442
  if (Ht(e)) {
452
443
  l = e, v = x(e);
@@ -462,8 +453,8 @@ class B {
462
453
  } else {
463
454
  const y = e[Ie];
464
455
  if (y != null && typeof y != "function")
465
- throw X(Yr);
466
- y != null ? nn(e) ? (l = e, v = e.length) : (l = [.../** @type {Iterable<unknown>} */
456
+ throw X(Xr);
457
+ y != null ? rn(e) ? (l = e, v = e.length) : (l = [.../** @type {Iterable<unknown>} */
467
458
  e], v = l.length) : (l = /** @type {ArrayLike<unknown>} */
468
459
  e, v = lr(l.length)), o = ut(ce, [v], new.target);
469
460
  }
@@ -473,9 +464,9 @@ class B {
473
464
  o = ut(ce, arguments, new.target);
474
465
  const c = (
475
466
  /** @type {any} */
476
- new $i(o, Bs)
467
+ new Vi(o, Ps)
477
468
  );
478
- return mr(Wt, c, o), c;
469
+ return Ur(Wt, c, o), c;
479
470
  }
480
471
  /**
481
472
  * limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
@@ -485,31 +476,31 @@ class B {
485
476
  const s = this;
486
477
  if (!dr(s, Gt))
487
478
  throw X(
488
- Xr
479
+ Wr
489
480
  );
490
481
  if (s === B) {
491
482
  if (Xe(e) && i.length === 0) {
492
- const b = O(e), U = new ce(
483
+ const b = O(e), m = new ce(
493
484
  $(b),
494
485
  Be(b),
495
486
  x(b)
496
487
  );
497
488
  return new B(
498
- $(ot(U))
489
+ $(ot(m))
499
490
  );
500
491
  }
501
492
  if (i.length === 0)
502
493
  return new B(
503
494
  $(
504
- en(e, Ee)
495
+ Kr(e, Ee)
505
496
  )
506
497
  );
507
498
  const y = i[0], E = i[1];
508
499
  return new B(
509
500
  $(
510
- en(e, function(b, ...U) {
501
+ Kr(e, function(b, ...m) {
511
502
  return Ee(
512
- ie(y, this, [b, ...ht(U)])
503
+ ie(y, this, [b, ...ht(m)])
513
504
  );
514
505
  }, E)
515
506
  )
@@ -518,9 +509,9 @@ class B {
518
509
  let o, c;
519
510
  const l = e[Ie];
520
511
  if (l != null && typeof l != "function")
521
- throw X(Yr);
512
+ throw X(Xr);
522
513
  if (l != null)
523
- nn(e) ? (o = e, c = e.length) : xs(e) ? (o = e, c = x(e)) : (o = [...e], c = o.length);
514
+ rn(e) ? (o = e, c = e.length) : Cs(e) ? (o = e, c = x(e)) : (o = [...e], c = o.length);
524
515
  else {
525
516
  if (e == null)
526
517
  throw X(
@@ -548,7 +539,7 @@ class B {
548
539
  const i = this;
549
540
  if (!dr(i, Gt))
550
541
  throw X(
551
- Xr
542
+ Wr
552
543
  );
553
544
  const s = e.length;
554
545
  if (i === B) {
@@ -566,7 +557,7 @@ class B {
566
557
  keys() {
567
558
  R(this);
568
559
  const e = O(this);
569
- return vs(e);
560
+ return hs(e);
570
561
  }
571
562
  /**
572
563
  * limitation: returns a object whose prototype is not `%ArrayIteratorPrototype%`
@@ -575,8 +566,8 @@ class B {
575
566
  values() {
576
567
  R(this);
577
568
  const e = O(this);
578
- return tn(function* () {
579
- for (const i of ys(e))
569
+ return en(function* () {
570
+ for (const i of fs(e))
580
571
  yield L(i);
581
572
  }());
582
573
  }
@@ -587,8 +578,8 @@ class B {
587
578
  entries() {
588
579
  R(this);
589
580
  const e = O(this);
590
- return tn(function* () {
591
- for (const [i, s] of ps(e))
581
+ return en(function* () {
582
+ for (const [i, s] of vs(e))
592
583
  yield (
593
584
  /** @type {[number, number]} */
594
585
  [i, L(s)]
@@ -598,14 +589,14 @@ class B {
598
589
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.at */
599
590
  at(e) {
600
591
  R(this);
601
- const i = O(this), s = x(i), o = Ue(e), c = o >= 0 ? o : s + o;
592
+ const i = O(this), s = x(i), o = me(e), c = o >= 0 ? o : s + o;
602
593
  if (!(c < 0 || c >= s))
603
594
  return L(i[c]);
604
595
  }
605
596
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with */
606
597
  with(e, i) {
607
598
  R(this);
608
- const s = O(this), o = x(s), c = Ue(e), l = c >= 0 ? c : o + c, v = +i;
599
+ const s = O(this), o = x(s), c = me(e), l = c >= 0 ? c : o + c, v = +i;
609
600
  if (l < 0 || l >= o)
610
601
  throw cr(or);
611
602
  const y = new ce(
@@ -626,9 +617,9 @@ class B {
626
617
  if (l === B) {
627
618
  const y = new B(o), E = O(y);
628
619
  for (let b = 0; b < o; ++b) {
629
- const U = L(s[b]);
620
+ const m = L(s[b]);
630
621
  E[b] = Ee(
631
- ie(e, c, [U, b, this])
622
+ ie(e, c, [m, b, this])
632
623
  );
633
624
  }
634
625
  return y;
@@ -650,7 +641,7 @@ class B {
650
641
  const s = O(this), o = x(s), c = i[0], l = [];
651
642
  for (let E = 0; E < o; ++E) {
652
643
  const b = L(s[E]);
653
- ie(e, c, [b, E, this]) && ns(l, b);
644
+ ie(e, c, [b, E, this]) && ts(l, b);
654
645
  }
655
646
  const v = Ft(s, B), y = new v(l);
656
647
  return Lt(y), /** @type {any} */
@@ -661,7 +652,7 @@ class B {
661
652
  R(this);
662
653
  const s = O(this), o = x(s);
663
654
  if (o === 0 && i.length === 0)
664
- throw X(qr);
655
+ throw X(Yr);
665
656
  let c, l;
666
657
  i.length === 0 ? (c = L(s[0]), l = 1) : (c = i[0], l = 0);
667
658
  for (let v = l; v < o; ++v)
@@ -678,7 +669,7 @@ class B {
678
669
  R(this);
679
670
  const s = O(this), o = x(s);
680
671
  if (o === 0 && i.length === 0)
681
- throw X(qr);
672
+ throw X(Yr);
682
673
  let c, l;
683
674
  i.length === 0 ? (c = L(s[o - 1]), l = o - 2) : (c = i[0], l = o - 1);
684
675
  for (let v = l; v >= 0; --v)
@@ -772,7 +763,7 @@ class B {
772
763
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.set */
773
764
  set(e, ...i) {
774
765
  R(this);
775
- const s = O(this), o = Ue(i[0]);
766
+ const s = O(this), o = me(i[0]);
776
767
  if (o < 0)
777
768
  throw cr(or);
778
769
  if (e == null)
@@ -784,7 +775,7 @@ class B {
784
775
  pr
785
776
  );
786
777
  if (Xe(e))
787
- return ds(
778
+ return ys(
788
779
  O(this),
789
780
  O(e),
790
781
  o
@@ -804,7 +795,7 @@ class B {
804
795
  reverse() {
805
796
  R(this);
806
797
  const e = O(this);
807
- return jr(e), this;
798
+ return Qr(e), this;
808
799
  }
809
800
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed */
810
801
  toReversed() {
@@ -818,13 +809,13 @@ class B {
818
809
  ot(i)
819
810
  )
820
811
  ), o = O(s);
821
- return jr(o), s;
812
+ return Qr(o), s;
822
813
  }
823
814
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill */
824
815
  fill(e, ...i) {
825
816
  R(this);
826
817
  const s = O(this);
827
- return ws(
818
+ return ps(
828
819
  s,
829
820
  Ee(e),
830
821
  ...ht(i)
@@ -834,21 +825,21 @@ class B {
834
825
  copyWithin(e, i, ...s) {
835
826
  R(this);
836
827
  const o = O(this);
837
- return As(o, e, i, ...ht(s)), this;
828
+ return ds(o, e, i, ...ht(s)), this;
838
829
  }
839
830
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort */
840
831
  sort(e) {
841
832
  R(this);
842
- const i = O(this), s = e !== void 0 ? e : on;
843
- return Kr(i, (o, c) => s(L(o), L(c))), this;
833
+ const i = O(this), s = e !== void 0 ? e : sn;
834
+ return jr(i, (o, c) => s(L(o), L(c))), this;
844
835
  }
845
836
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSorted */
846
837
  toSorted(e) {
847
838
  R(this);
848
839
  const i = O(this);
849
840
  if (e !== void 0 && typeof e != "function")
850
- throw new X(Ji);
851
- const s = e !== void 0 ? e : on, o = new ce(
841
+ throw new X(qi);
842
+ const s = e !== void 0 ? e : sn, o = new ce(
852
843
  $(i),
853
844
  Be(i),
854
845
  x(i)
@@ -857,7 +848,7 @@ class B {
857
848
  ot(o)
858
849
  )
859
850
  ), l = O(c);
860
- return Kr(l, (v, y) => s(L(v), L(y))), c;
851
+ return jr(l, (v, y) => s(L(v), L(y))), c;
861
852
  }
862
853
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice */
863
854
  slice(e, i) {
@@ -875,23 +866,23 @@ class B {
875
866
  )
876
867
  );
877
868
  }
878
- const c = x(s), l = Ue(e), v = i === void 0 ? c : Ue(i);
869
+ const c = x(s), l = me(e), v = i === void 0 ? c : me(i);
879
870
  let y;
880
871
  l === -1 / 0 ? y = 0 : l < 0 ? y = c + l > 0 ? c + l : 0 : y = c < l ? c : l;
881
872
  let E;
882
873
  v === -1 / 0 ? E = 0 : v < 0 ? E = c + v > 0 ? c + v : 0 : E = c < v ? c : v;
883
- const b = E - y > 0 ? E - y : 0, U = new o(b);
884
- if (Lt(U, b), b === 0)
885
- return U;
874
+ const b = E - y > 0 ? E - y : 0, m = new o(b);
875
+ if (Lt(m, b), b === 0)
876
+ return m;
886
877
  const q = $(s);
887
878
  if (yt(q))
888
879
  throw X(vt);
889
880
  let se = 0;
890
881
  for (; y < E; )
891
- U[se] = L(s[y]), ++y, ++se;
882
+ m[se] = L(s[y]), ++y, ++se;
892
883
  return (
893
884
  /** @type {any} */
894
- U
885
+ m
895
886
  );
896
887
  }
897
888
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray */
@@ -901,7 +892,7 @@ class B {
901
892
  $(s),
902
893
  Be(s),
903
894
  x(s)
904
- ), l = gs(c, e, i), v = new o(
895
+ ), l = ws(c, e, i), v = new o(
905
896
  $(l),
906
897
  Be(l),
907
898
  x(l)
@@ -913,7 +904,7 @@ class B {
913
904
  indexOf(e, ...i) {
914
905
  R(this);
915
906
  const s = O(this), o = x(s);
916
- let c = Ue(i[0]);
907
+ let c = me(i[0]);
917
908
  if (c === 1 / 0)
918
909
  return -1;
919
910
  c < 0 && (c += o, c < 0 && (c = 0));
@@ -926,7 +917,7 @@ class B {
926
917
  lastIndexOf(e, ...i) {
927
918
  R(this);
928
919
  const s = O(this), o = x(s);
929
- let c = i.length >= 1 ? Ue(i[0]) : o - 1;
920
+ let c = i.length >= 1 ? me(i[0]) : o - 1;
930
921
  if (c === -1 / 0)
931
922
  return -1;
932
923
  c >= 0 ? c = c < o - 1 ? c : o - 1 : c += o;
@@ -939,7 +930,7 @@ class B {
939
930
  includes(e, ...i) {
940
931
  R(this);
941
932
  const s = O(this), o = x(s);
942
- let c = Ue(i[0]);
933
+ let c = me(i[0]);
943
934
  if (c === 1 / 0)
944
935
  return !1;
945
936
  c < 0 && (c += o, c < 0 && (c = 0));
@@ -954,14 +945,14 @@ class B {
954
945
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join */
955
946
  join(e) {
956
947
  R(this);
957
- const i = O(this), s = an(i);
958
- return rs(s, e);
948
+ const i = O(this), s = on(i);
949
+ return es(s, e);
959
950
  }
960
951
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring */
961
952
  toLocaleString(...e) {
962
953
  R(this);
963
- const i = O(this), s = an(i);
964
- return is(s, ...ht(e));
954
+ const i = O(this), s = on(i);
955
+ return rs(s, ...ht(e));
965
956
  }
966
957
  /** @see https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag */
967
958
  get [Ir]() {
@@ -976,7 +967,7 @@ gt(B, "BYTES_PER_ELEMENT", {
976
967
  value: Cr
977
968
  });
978
969
  gt(B, Gt, {});
979
- dn(B, br);
970
+ pn(B, br);
980
971
  const Xt = B.prototype;
981
972
  gt(Xt, "BYTES_PER_ELEMENT", {
982
973
  value: Cr
@@ -986,18 +977,18 @@ gt(Xt, Ie, {
986
977
  writable: !0,
987
978
  configurable: !0
988
979
  });
989
- dn(Xt, Q);
990
- function zs(r, e, ...i) {
980
+ pn(Xt, Q);
981
+ function Ds(r, e, ...i) {
991
982
  return L(
992
- bs(r, e, ...ht(i))
983
+ Is(r, e, ...ht(i))
993
984
  );
994
985
  }
995
- function Io(r) {
986
+ function To(r) {
996
987
  return r instanceof Int8Array || r instanceof Uint8Array || r instanceof Uint8ClampedArray || r instanceof Int16Array || r instanceof Uint16Array || r instanceof Int32Array || r instanceof Uint32Array || r instanceof B || r instanceof Float32Array || r instanceof Float64Array;
997
988
  }
998
- class ks extends qt {
989
+ class Bs extends qt {
999
990
  load(e, i, s, o) {
1000
- const c = new ki(this.manager);
991
+ const c = new Bi(this.manager);
1001
992
  c.setRequestHeader(this.requestHeader), c.setPath(this.path), c.setWithCredentials(this.withCredentials), c.load(
1002
993
  e,
1003
994
  (l) => {
@@ -1013,25 +1004,25 @@ class ks extends qt {
1013
1004
  }
1014
1005
  }
1015
1006
  function Mn(r) {
1016
- return class extends ks {
1007
+ return class extends Bs {
1017
1008
  constructor() {
1018
1009
  super(...arguments), this.parseTypedArray = r;
1019
1010
  }
1020
1011
  };
1021
1012
  }
1022
- function _o(r) {
1013
+ function Eo(r) {
1023
1014
  return new (Mn(r))();
1024
1015
  }
1025
- function Zs(r) {
1026
- const e = r instanceof Int8Array ? mi : r instanceof Uint8Array ? kr : r instanceof Uint8ClampedArray ? kr : r instanceof Int16Array ? Ui : r instanceof Uint16Array ? Ci : r instanceof Int32Array ? Ri : r instanceof Uint32Array ? xi : r instanceof B ? lt : r instanceof Float32Array ? ft : r instanceof Float64Array ? ft : null;
1027
- return vn(e != null), e;
1016
+ function zs(r) {
1017
+ const e = r instanceof Int8Array ? Oi : r instanceof Uint8Array ? kr : r instanceof Uint8ClampedArray ? kr : r instanceof Int16Array ? Ui : r instanceof Uint16Array ? mi : r instanceof Int32Array ? Ci : r instanceof Uint32Array ? Ri : r instanceof B ? lt : r instanceof Float32Array ? ft : r instanceof Float64Array ? ft : null;
1018
+ return fn(e != null), e;
1028
1019
  }
1029
- const Hs = {
1030
- format: ln,
1020
+ const ks = {
1021
+ format: cn,
1031
1022
  minFilter: zt,
1032
1023
  magFilter: zt
1033
1024
  };
1034
- class Gs extends qt {
1025
+ class Zs extends qt {
1035
1026
  constructor() {
1036
1027
  super(...arguments), this.parameters = {};
1037
1028
  }
@@ -1041,54 +1032,54 @@ class Gs extends qt {
1041
1032
  e,
1042
1033
  (v) => {
1043
1034
  c.image.data = v instanceof B ? new Uint16Array(v.buffer) : v;
1044
- const { width: y, height: E, depth: b, ...U } = this.parameters;
1045
- y != null && (c.image.width = y), E != null && (c.image.height = E), "depth" in c.image && b != null && (c.image.depth = b), c.type = Zs(v), Object.assign(c, U), c.needsUpdate = !0, i(c);
1035
+ const { width: y, height: E, depth: b, ...m } = this.parameters;
1036
+ y != null && (c.image.width = y), E != null && (c.image.height = E), "depth" in c.image && b != null && (c.image.depth = b), c.type = zs(v), Object.assign(c, m), c.needsUpdate = !0, i(c);
1046
1037
  },
1047
1038
  s,
1048
1039
  o
1049
1040
  );
1050
1041
  }
1051
1042
  }
1052
- function Dn(r, e, i) {
1053
- return class extends Gs {
1043
+ function Pn(r, e, i) {
1044
+ return class extends Zs {
1054
1045
  constructor() {
1055
1046
  super(...arguments), this.Texture = r, this.TypedArrayLoader = Mn(e), this.parameters = {
1056
- ...Hs,
1047
+ ...ks,
1057
1048
  ...i
1058
1049
  };
1059
1050
  }
1060
1051
  };
1061
1052
  }
1062
- function Bn(r, e) {
1063
- return Dn(un, r, e);
1053
+ function Dn(r, e) {
1054
+ return Pn(ln, r, e);
1064
1055
  }
1065
- function Ws(r, e) {
1066
- return Dn(Fi, r, e);
1056
+ function Hs(r, e) {
1057
+ return Pn(xi, r, e);
1067
1058
  }
1068
- function bo(r, e) {
1069
- return new (Bn(r, e))();
1059
+ function Io(r, e) {
1060
+ return new (Dn(r, e))();
1070
1061
  }
1071
- function No(r, e) {
1072
- return new (Ws(r, e))();
1062
+ function _o(r, e) {
1063
+ return new (Hs(r, e))();
1073
1064
  }
1074
- const Je = ye.clamp, Oo = ye.euclideanModulo, mo = ye.inverseLerp, Uo = ye.lerp, Co = ye.degToRad, Ro = ye.radToDeg, xo = ye.isPowerOfTwo, Fo = ye.ceilPowerOfTwo, Lo = ye.floorPowerOfTwo, Po = ye.normalize;
1075
- function Mo(r, e, i, s = 0, o = 1) {
1065
+ const Je = ye.clamp, bo = ye.euclideanModulo, No = ye.inverseLerp, Oo = ye.lerp, Uo = ye.degToRad, mo = ye.radToDeg, Co = ye.isPowerOfTwo, Ro = ye.ceilPowerOfTwo, xo = ye.floorPowerOfTwo, Fo = ye.normalize;
1066
+ function Lo(r, e, i, s = 0, o = 1) {
1076
1067
  return ye.mapLinear(r, e, i, s, o);
1077
1068
  }
1078
- function Do(r, e, i, s = 0, o = 1) {
1069
+ function Mo(r, e, i, s = 0, o = 1) {
1079
1070
  return Je(ye.mapLinear(r, e, i, s, o), s, o);
1080
1071
  }
1081
- function Bo(r, e, i) {
1072
+ function Po(r, e, i) {
1082
1073
  return i <= r ? 0 : i >= e ? 1 : (i = (i - r) / (e - r), i * i * (3 - 2 * i));
1083
1074
  }
1084
- function zo(r) {
1075
+ function Do(r) {
1085
1076
  return Math.min(Math.max(r, 0), 1);
1086
1077
  }
1087
- function ko(r, e, i, s = i) {
1078
+ function Bo(r, e, i, s = i) {
1088
1079
  const o = Math.abs(r - e);
1089
1080
  return o <= s || o <= i * Math.max(Math.abs(r), Math.abs(e));
1090
1081
  }
1091
- function Zo(r) {
1082
+ function zo(r) {
1092
1083
  return (e, i) => {
1093
1084
  e instanceof Vt ? Object.defineProperty(e, i, {
1094
1085
  enumerable: !0,
@@ -1111,7 +1102,7 @@ function Zo(r) {
1111
1102
  });
1112
1103
  };
1113
1104
  }
1114
- function Ho(r, {
1105
+ function ko(r, {
1115
1106
  min: e = Number.MIN_SAFE_INTEGER,
1116
1107
  max: i = Number.MAX_SAFE_INTEGER
1117
1108
  } = {}) {
@@ -1140,7 +1131,7 @@ function Ho(r, {
1140
1131
  });
1141
1132
  };
1142
1133
  }
1143
- function Go(r, {
1134
+ function Zo(r, {
1144
1135
  min: e = -1 / 0,
1145
1136
  max: i = 1 / 0,
1146
1137
  precision: s = 7
@@ -1170,7 +1161,7 @@ function Go(r, {
1170
1161
  });
1171
1162
  };
1172
1163
  }
1173
- function Wo(r, { validate: e } = {}) {
1164
+ function Ho(r, { validate: e } = {}) {
1174
1165
  return (i, s) => {
1175
1166
  i instanceof Vt ? Object.defineProperty(i, s, {
1176
1167
  enumerable: !0,
@@ -1204,7 +1195,7 @@ function Wo(r, { validate: e } = {}) {
1204
1195
  });
1205
1196
  };
1206
1197
  }
1207
- function Xo(r, ...e) {
1198
+ function Go(r, ...e) {
1208
1199
  const i = {};
1209
1200
  for (let s = 0; s < e.length; s += 2) {
1210
1201
  const o = e[s], c = e[s + 1];
@@ -1219,7 +1210,7 @@ function Xo(r, ...e) {
1219
1210
  }
1220
1211
  return Object.defineProperties(r, i), r;
1221
1212
  }
1222
- function Yo(r, e, i) {
1213
+ function Wo(r, e, i) {
1223
1214
  const s = {};
1224
1215
  for (const o of i)
1225
1216
  s[o] = {
@@ -1231,8 +1222,8 @@ function Yo(r, e, i) {
1231
1222
  };
1232
1223
  return Object.defineProperties(r, s), r;
1233
1224
  }
1234
- const Xs = parseInt(Li.replace(/\D+/g, ""));
1235
- var ve = Uint8Array, Le = Uint16Array, Tr = Uint32Array, zn = new ve([
1225
+ const Gs = parseInt(Fi.replace(/\D+/g, ""));
1226
+ var ve = Uint8Array, Le = Uint16Array, Tr = Uint32Array, Bn = new ve([
1236
1227
  0,
1237
1228
  0,
1238
1229
  0,
@@ -1267,7 +1258,7 @@ var ve = Uint8Array, Le = Uint16Array, Tr = Uint32Array, zn = new ve([
1267
1258
  0,
1268
1259
  /* impossible */
1269
1260
  0
1270
- ]), kn = new ve([
1261
+ ]), zn = new ve([
1271
1262
  0,
1272
1263
  0,
1273
1264
  0,
@@ -1301,16 +1292,16 @@ var ve = Uint8Array, Le = Uint16Array, Tr = Uint32Array, zn = new ve([
1301
1292
  /* unused */
1302
1293
  0,
1303
1294
  0
1304
- ]), Ys = new ve([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Zn = function(r, e) {
1295
+ ]), Ws = new ve([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), kn = function(r, e) {
1305
1296
  for (var i = new Le(31), s = 0; s < 31; ++s)
1306
1297
  i[s] = e += 1 << r[s - 1];
1307
1298
  for (var o = new Tr(i[30]), s = 1; s < 30; ++s)
1308
1299
  for (var c = i[s]; c < i[s + 1]; ++c)
1309
1300
  o[c] = c - i[s] << 5 | s;
1310
1301
  return [i, o];
1311
- }, Hn = Zn(zn, 2), Gn = Hn[0], qs = Hn[1];
1312
- Gn[28] = 258, qs[258] = 28;
1313
- var Vs = Zn(kn, 0), Js = Vs[0], Er = new Le(32768);
1302
+ }, Zn = kn(Bn, 2), Hn = Zn[0], Xs = Zn[1];
1303
+ Hn[28] = 258, Xs[258] = 28;
1304
+ var Ys = kn(zn, 0), qs = Ys[0], Er = new Le(32768);
1314
1305
  for (var G = 0; G < 32768; ++G) {
1315
1306
  var Fe = (G & 43690) >>> 1 | (G & 21845) << 1;
1316
1307
  Fe = (Fe & 52428) >>> 2 | (Fe & 13107) << 2, Fe = (Fe & 61680) >>> 4 | (Fe & 3855) << 4, Er[G] = ((Fe & 65280) >>> 8 | (Fe & 255) << 8) >>> 1;
@@ -1327,8 +1318,8 @@ var pt = function(r, e, i) {
1327
1318
  var y = 15 - e;
1328
1319
  for (o = 0; o < s; ++o)
1329
1320
  if (r[o])
1330
- for (var E = o << 4 | r[o], b = e - r[o], U = l[r[o] - 1]++ << b, q = U | (1 << b) - 1; U <= q; ++U)
1331
- v[Er[U] >>> y] = E;
1321
+ for (var E = o << 4 | r[o], b = e - r[o], m = l[r[o] - 1]++ << b, q = m | (1 << b) - 1; m <= q; ++m)
1322
+ v[Er[m] >>> y] = E;
1332
1323
  } else
1333
1324
  for (v = new Le(s), o = 0; o < s; ++o)
1334
1325
  r[o] && (v[o] = Er[l[r[o] - 1]++] >>> 15 - r[o]);
@@ -1342,10 +1333,10 @@ for (var G = 256; G < 280; ++G)
1342
1333
  St[G] = 7;
1343
1334
  for (var G = 280; G < 288; ++G)
1344
1335
  St[G] = 8;
1345
- var Wn = new ve(32);
1336
+ var Gn = new ve(32);
1346
1337
  for (var G = 0; G < 32; ++G)
1347
- Wn[G] = 5;
1348
- var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = function(r) {
1338
+ Gn[G] = 5;
1339
+ var Vs = /* @__PURE__ */ pt(St, 9, 1), Js = /* @__PURE__ */ pt(Gn, 5, 1), ur = function(r) {
1349
1340
  for (var e = r[0], i = 1; i < r.length; ++i)
1350
1341
  r[i] > e && (e = r[i]);
1351
1342
  return e;
@@ -1355,37 +1346,37 @@ var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = f
1355
1346
  }, hr = function(r, e) {
1356
1347
  var i = e / 8 | 0;
1357
1348
  return (r[i] | r[i + 1] << 8 | r[i + 2] << 16) >> (e & 7);
1358
- }, js = function(r) {
1349
+ }, $s = function(r) {
1359
1350
  return (r / 8 | 0) + (r & 7 && 1);
1360
- }, Ks = function(r, e, i) {
1351
+ }, Qs = function(r, e, i) {
1361
1352
  (i == null || i > r.length) && (i = r.length);
1362
1353
  var s = new (r instanceof Le ? Le : r instanceof Tr ? Tr : ve)(i - e);
1363
1354
  return s.set(r.subarray(e, i)), s;
1364
- }, eo = function(r, e, i) {
1355
+ }, js = function(r, e, i) {
1365
1356
  var s = r.length;
1366
1357
  if (!s || i && !i.l && s < 5)
1367
1358
  return e || new ve(0);
1368
1359
  var o = !e || i, c = !i || i.i;
1369
1360
  i || (i = {}), e || (e = new ve(s * 3));
1370
- var l = function(P) {
1361
+ var l = function(M) {
1371
1362
  var be = e.length;
1372
- if (P > be) {
1373
- var Ne = new ve(Math.max(be * 2, P));
1363
+ if (M > be) {
1364
+ var Ne = new ve(Math.max(be * 2, M));
1374
1365
  Ne.set(e), e = Ne;
1375
1366
  }
1376
- }, v = i.f || 0, y = i.p || 0, E = i.b || 0, b = i.l, U = i.d, q = i.m, se = i.n, Ze = s * 8;
1367
+ }, v = i.f || 0, y = i.p || 0, E = i.b || 0, b = i.l, m = i.d, q = i.m, se = i.n, Ze = s * 8;
1377
1368
  do {
1378
1369
  if (!b) {
1379
1370
  i.f = v = de(r, y, 1);
1380
1371
  var Tt = de(r, y + 1, 3);
1381
1372
  if (y += 3, Tt)
1382
1373
  if (Tt == 1)
1383
- b = $s, U = Qs, q = 9, se = 5;
1374
+ b = Vs, m = Js, q = 9, se = 5;
1384
1375
  else if (Tt == 2) {
1385
1376
  var _t = de(r, y, 31) + 257, er = de(r, y + 10, 15) + 4, tr = _t + de(r, y + 5, 31) + 1;
1386
1377
  y += 14;
1387
1378
  for (var He = new ve(tr), bt = new ve(19), oe = 0; oe < er; ++oe)
1388
- bt[Ys[oe]] = de(r, y + oe * 3, 7);
1379
+ bt[Ws[oe]] = de(r, y + oe * 3, 7);
1389
1380
  y += er * 3;
1390
1381
  for (var Nt = ur(bt), rr = (1 << Nt) - 1, nr = pt(bt, Nt, 1), oe = 0; oe < tr; ) {
1391
1382
  var le = nr[de(r, y, rr)];
@@ -1400,11 +1391,11 @@ var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = f
1400
1391
  }
1401
1392
  }
1402
1393
  var Ot = He.subarray(0, _t), Se = He.subarray(_t);
1403
- q = ur(Ot), se = ur(Se), b = pt(Ot, q, 1), U = pt(Se, se, 1);
1394
+ q = ur(Ot), se = ur(Se), b = pt(Ot, q, 1), m = pt(Se, se, 1);
1404
1395
  } else
1405
1396
  throw "invalid block type";
1406
1397
  else {
1407
- var pe = js(y) + 4, Et = r[pe - 4] | r[pe - 3] << 8, It = pe + Et;
1398
+ var pe = $s(y) + 4, Et = r[pe - 4] | r[pe - 3] << 8, It = pe + Et;
1408
1399
  if (It > s) {
1409
1400
  if (c)
1410
1401
  throw "unexpected EOF";
@@ -1420,8 +1411,8 @@ var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = f
1420
1411
  }
1421
1412
  }
1422
1413
  o && l(E + 131072);
1423
- for (var mt = (1 << q) - 1, Ut = (1 << se) - 1, je = y; ; je = y) {
1424
- var _e = b[hr(r, y) & mt], ee = _e >>> 4;
1414
+ for (var Ut = (1 << q) - 1, mt = (1 << se) - 1, je = y; ; je = y) {
1415
+ var _e = b[hr(r, y) & Ut], ee = _e >>> 4;
1425
1416
  if (y += _e & 15, y > Ze) {
1426
1417
  if (c)
1427
1418
  throw "unexpected EOF";
@@ -1437,16 +1428,16 @@ var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = f
1437
1428
  } else {
1438
1429
  var Ge = ee - 254;
1439
1430
  if (ee > 264) {
1440
- var oe = ee - 257, re = zn[oe];
1441
- Ge = de(r, y, (1 << re) - 1) + Gn[oe], y += re;
1431
+ var oe = ee - 257, re = Bn[oe];
1432
+ Ge = de(r, y, (1 << re) - 1) + Hn[oe], y += re;
1442
1433
  }
1443
- var Pe = U[hr(r, y) & Ut], Me = Pe >>> 4;
1444
- if (!Pe)
1434
+ var Me = m[hr(r, y) & mt], Pe = Me >>> 4;
1435
+ if (!Me)
1445
1436
  throw "invalid distance";
1446
- y += Pe & 15;
1447
- var Se = Js[Me];
1448
- if (Me > 3) {
1449
- var re = kn[Me];
1437
+ y += Me & 15;
1438
+ var Se = qs[Pe];
1439
+ if (Pe > 3) {
1440
+ var re = zn[Pe];
1450
1441
  Se += hr(r, y) & (1 << re) - 1, y += re;
1451
1442
  }
1452
1443
  if (y > Ze) {
@@ -1460,25 +1451,25 @@ var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = f
1460
1451
  E = Ke;
1461
1452
  }
1462
1453
  }
1463
- i.l = b, i.p = je, i.b = E, b && (v = 1, i.m = q, i.d = U, i.n = se);
1454
+ i.l = b, i.p = je, i.b = E, b && (v = 1, i.m = q, i.d = m, i.n = se);
1464
1455
  } while (!v);
1465
- return E == e.length ? e : Ks(e, 0, E);
1466
- }, to = /* @__PURE__ */ new ve(0), ro = function(r) {
1456
+ return E == e.length ? e : Qs(e, 0, E);
1457
+ }, Ks = /* @__PURE__ */ new ve(0), eo = function(r) {
1467
1458
  if ((r[0] & 15) != 8 || r[0] >>> 4 > 7 || (r[0] << 8 | r[1]) % 31)
1468
1459
  throw "invalid zlib data";
1469
1460
  if (r[1] & 32)
1470
1461
  throw "invalid zlib data: preset dictionaries not supported";
1471
1462
  };
1472
- function Pt(r, e) {
1473
- return eo((ro(r), r.subarray(2, -4)), e);
1463
+ function Mt(r, e) {
1464
+ return js((eo(r), r.subarray(2, -4)), e);
1474
1465
  }
1475
- var no = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), io = 0;
1466
+ var to = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), ro = 0;
1476
1467
  try {
1477
- no.decode(to, { stream: !0 }), io = 1;
1468
+ to.decode(Ks, { stream: !0 }), ro = 1;
1478
1469
  } catch {
1479
1470
  }
1480
- const at = Xs >= 152;
1481
- class so extends Pi {
1471
+ const at = Gs >= 152;
1472
+ class no extends Li {
1482
1473
  constructor(e) {
1483
1474
  super(e), this.type = lt;
1484
1475
  }
@@ -1543,15 +1534,15 @@ class so extends Pi {
1543
1534
  }
1544
1535
  Ot(d);
1545
1536
  }
1546
- function mt(t) {
1537
+ function Ut(t) {
1547
1538
  return t & 63;
1548
1539
  }
1549
- function Ut(t) {
1540
+ function mt(t) {
1550
1541
  return t >> 6;
1551
1542
  }
1552
1543
  function je(t, n, a, u) {
1553
1544
  for (; n <= a; n++) {
1554
- var h = Ut(t[n]), f = mt(t[n]);
1545
+ var h = mt(t[n]), f = Ut(t[n]);
1555
1546
  if (h >> f)
1556
1547
  throw "Invalid table entry";
1557
1548
  if (f > 14) {
@@ -1581,7 +1572,7 @@ class so extends Pi {
1581
1572
  t = t << 8 | Dr(a, u), n += 8, ee.c = t, ee.lc = n;
1582
1573
  }
1583
1574
  const re = { c: 0, lc: 0 };
1584
- function Pe(t, n, a, u, h, f, d, p, g, A) {
1575
+ function Me(t, n, a, u, h, f, d, p, g, A) {
1585
1576
  if (t == n) {
1586
1577
  u < 8 && (Ge(a, u, h, d), a = ee.c, u = ee.lc), u -= 8;
1587
1578
  var S = a >> u, S = new Uint8Array([S])[0];
@@ -1595,61 +1586,61 @@ class so extends Pi {
1595
1586
  return !1;
1596
1587
  re.c = a, re.lc = u;
1597
1588
  }
1598
- function Me(t) {
1589
+ function Pe(t) {
1599
1590
  return t & 65535;
1600
1591
  }
1601
1592
  function Ke(t) {
1602
- var n = Me(t);
1593
+ var n = Pe(t);
1603
1594
  return n > 32767 ? n - 65536 : n;
1604
1595
  }
1605
- const P = { a: 0, b: 0 };
1596
+ const M = { a: 0, b: 0 };
1606
1597
  function be(t, n) {
1607
1598
  var a = Ke(t), u = Ke(n), h = u, f = a + (h & 1) + (h >> 1), d = f, p = f - h;
1608
- P.a = d, P.b = p;
1599
+ M.a = d, M.b = p;
1609
1600
  }
1610
1601
  function Ne(t, n) {
1611
- var a = Me(t), u = Me(n), h = a - (u >> 1) & 65535, f = u + h - 32768 & 65535;
1612
- P.a = f, P.b = h;
1602
+ var a = Pe(t), u = Pe(n), h = a - (u >> 1) & 65535, f = u + h - 32768 & 65535;
1603
+ M.a = f, M.b = h;
1613
1604
  }
1614
- function Vn(t, n, a, u, h, f, d) {
1605
+ function qn(t, n, a, u, h, f, d) {
1615
1606
  for (var p = d < 16384, g = a > h ? h : a, A = 1, S; A <= g; )
1616
1607
  A <<= 1;
1617
1608
  for (A >>= 1, S = A, A >>= 1; A >= 1; ) {
1618
- for (var w = 0, Y = w + f * (h - S), I = f * A, _ = f * S, N = u * A, m = u * S, M, z, V, te; w <= Y; w += _) {
1619
- for (var k = w, Te = w + u * (a - S); k <= Te; k += m) {
1609
+ for (var w = 0, Y = w + f * (h - S), I = f * A, _ = f * S, N = u * A, U = u * S, P, z, V, te; w <= Y; w += _) {
1610
+ for (var k = w, Te = w + u * (a - S); k <= Te; k += U) {
1620
1611
  var H = k + N, J = k + I, Oe = J + N;
1621
- p ? (be(t[k + n], t[J + n]), M = P.a, V = P.b, be(t[H + n], t[Oe + n]), z = P.a, te = P.b, be(M, z), t[k + n] = P.a, t[H + n] = P.b, be(V, te), t[J + n] = P.a, t[Oe + n] = P.b) : (Ne(t[k + n], t[J + n]), M = P.a, V = P.b, Ne(t[H + n], t[Oe + n]), z = P.a, te = P.b, Ne(M, z), t[k + n] = P.a, t[H + n] = P.b, Ne(V, te), t[J + n] = P.a, t[Oe + n] = P.b);
1612
+ p ? (be(t[k + n], t[J + n]), P = M.a, V = M.b, be(t[H + n], t[Oe + n]), z = M.a, te = M.b, be(P, z), t[k + n] = M.a, t[H + n] = M.b, be(V, te), t[J + n] = M.a, t[Oe + n] = M.b) : (Ne(t[k + n], t[J + n]), P = M.a, V = M.b, Ne(t[H + n], t[Oe + n]), z = M.a, te = M.b, Ne(P, z), t[k + n] = M.a, t[H + n] = M.b, Ne(V, te), t[J + n] = M.a, t[Oe + n] = M.b);
1622
1613
  }
1623
1614
  if (a & A) {
1624
1615
  var J = k + I;
1625
- p ? be(t[k + n], t[J + n]) : Ne(t[k + n], t[J + n]), M = P.a, t[J + n] = P.b, t[k + n] = M;
1616
+ p ? be(t[k + n], t[J + n]) : Ne(t[k + n], t[J + n]), P = M.a, t[J + n] = M.b, t[k + n] = P;
1626
1617
  }
1627
1618
  }
1628
1619
  if (h & A)
1629
- for (var k = w, Te = w + u * (a - S); k <= Te; k += m) {
1620
+ for (var k = w, Te = w + u * (a - S); k <= Te; k += U) {
1630
1621
  var H = k + N;
1631
- p ? be(t[k + n], t[H + n]) : Ne(t[k + n], t[H + n]), M = P.a, t[H + n] = P.b, t[k + n] = M;
1622
+ p ? be(t[k + n], t[H + n]) : Ne(t[k + n], t[H + n]), P = M.a, t[H + n] = M.b, t[k + n] = P;
1632
1623
  }
1633
1624
  S = A, A >>= 1;
1634
1625
  }
1635
1626
  return w;
1636
1627
  }
1637
- function Jn(t, n, a, u, h, f, d, p, g, A) {
1628
+ function Vn(t, n, a, u, h, f, d, p, g, A) {
1638
1629
  for (var S = 0, w = 0, Y = p, I = Math.trunc(h.value + (f + 7) / 8); h.value < I; )
1639
1630
  for (Ge(S, w, a, h), S = ee.c, w = ee.lc; w >= 14; ) {
1640
1631
  var _ = S >> w - 14 & 16383, N = n[_];
1641
1632
  if (N.len)
1642
- w -= N.len, Pe(N.lit, d, S, w, a, u, h, g, A, Y), S = re.c, w = re.lc;
1633
+ w -= N.len, Me(N.lit, d, S, w, a, u, h, g, A, Y), S = re.c, w = re.lc;
1643
1634
  else {
1644
1635
  if (!N.p)
1645
1636
  throw "hufDecode issues";
1646
- var m;
1647
- for (m = 0; m < N.lit; m++) {
1648
- for (var M = mt(t[N.p[m]]); w < M && h.value < I; )
1637
+ var U;
1638
+ for (U = 0; U < N.lit; U++) {
1639
+ for (var P = Ut(t[N.p[U]]); w < P && h.value < I; )
1649
1640
  Ge(S, w, a, h), S = ee.c, w = ee.lc;
1650
- if (w >= M && Ut(t[N.p[m]]) == (S >> w - M & (1 << M) - 1)) {
1651
- w -= M, Pe(
1652
- N.p[m],
1641
+ if (w >= P && mt(t[N.p[U]]) == (S >> w - P & (1 << P) - 1)) {
1642
+ w -= P, Me(
1643
+ N.p[U],
1653
1644
  d,
1654
1645
  S,
1655
1646
  w,
@@ -1663,7 +1654,7 @@ class so extends Pi {
1663
1654
  break;
1664
1655
  }
1665
1656
  }
1666
- if (m == N.lit)
1657
+ if (U == N.lit)
1667
1658
  throw "hufDecode issues";
1668
1659
  }
1669
1660
  }
@@ -1671,7 +1662,7 @@ class so extends Pi {
1671
1662
  for (S >>= z, w -= z; w > 0; ) {
1672
1663
  var N = n[S << 14 - w & 16383];
1673
1664
  if (N.len)
1674
- w -= N.len, Pe(N.lit, d, S, w, a, u, h, g, A, Y), S = re.c, w = re.lc;
1665
+ w -= N.len, Me(N.lit, d, S, w, a, u, h, g, A, Y), S = re.c, w = re.lc;
1675
1666
  else
1676
1667
  throw "hufDecode issues";
1677
1668
  }
@@ -1688,9 +1679,9 @@ class so extends Pi {
1688
1679
  var I = u - (a.value - p);
1689
1680
  if (Se(t, n, a, I, g, A, w), S > 8 * (u - (a.value - p)))
1690
1681
  throw "Something wrong with hufUncompress";
1691
- je(w, g, A, Y), Jn(w, Y, t, n, a, S, A, f, h, d);
1682
+ je(w, g, A, Y), Vn(w, Y, t, n, a, S, A, f, h, d);
1692
1683
  }
1693
- function $n(t, n, a) {
1684
+ function Jn(t, n, a) {
1694
1685
  for (var u = 0; u < a; ++u)
1695
1686
  n[u] = t[n[u]];
1696
1687
  }
@@ -1721,10 +1712,10 @@ class so extends Pi {
1721
1712
  }
1722
1713
  return a;
1723
1714
  }
1724
- function Qn(t, n, a, u, h, f) {
1725
- var H = new DataView(f.buffer), d = a[t.idx[0]].width, p = a[t.idx[0]].height, g = 3, A = Math.floor(d / 8), S = Math.ceil(d / 8), w = Math.ceil(p / 8), Y = d - (S - 1) * 8, I = p - (w - 1) * 8, _ = { value: 0 }, N = new Array(g), m = new Array(g), M = new Array(g), z = new Array(g), V = new Array(g);
1715
+ function $n(t, n, a, u, h, f) {
1716
+ var H = new DataView(f.buffer), d = a[t.idx[0]].width, p = a[t.idx[0]].height, g = 3, A = Math.floor(d / 8), S = Math.ceil(d / 8), w = Math.ceil(p / 8), Y = d - (S - 1) * 8, I = p - (w - 1) * 8, _ = { value: 0 }, N = new Array(g), U = new Array(g), P = new Array(g), z = new Array(g), V = new Array(g);
1726
1717
  for (let D = 0; D < g; ++D)
1727
- V[D] = n[t.idx[D]], N[D] = D < 1 ? 0 : N[D - 1] + S * w, m[D] = new Float32Array(64), M[D] = new Uint16Array(64), z[D] = new Uint16Array(S * 64);
1718
+ V[D] = n[t.idx[D]], N[D] = D < 1 ? 0 : N[D - 1] + S * w, U[D] = new Float32Array(64), P[D] = new Uint16Array(64), z[D] = new Uint16Array(S * 64);
1728
1719
  for (let D = 0; D < w; ++D) {
1729
1720
  var te = 8;
1730
1721
  D == w - 1 && (te = I);
@@ -1732,10 +1723,10 @@ class so extends Pi {
1732
1723
  for (let W = 0; W < S; ++W) {
1733
1724
  W == S - 1 && (k = Y);
1734
1725
  for (let F = 0; F < g; ++F)
1735
- M[F].fill(0), M[F][0] = h[N[F]++], jn(_, u, M[F]), Kn(M[F], m[F]), ei(m[F]);
1736
- ti(m);
1726
+ P[F].fill(0), P[F][0] = h[N[F]++], Qn(_, u, P[F]), jn(P[F], U[F]), Kn(U[F]);
1727
+ ei(U);
1737
1728
  for (let F = 0; F < g; ++F)
1738
- ri(m[F], z[F], W * 64);
1729
+ ti(U[F], z[F], W * 64);
1739
1730
  }
1740
1731
  let K = 0;
1741
1732
  for (let W = 0; W < g; ++W) {
@@ -1768,14 +1759,14 @@ class so extends Pi {
1768
1759
  }
1769
1760
  }
1770
1761
  }
1771
- function jn(t, n, a) {
1762
+ function Qn(t, n, a) {
1772
1763
  for (var u, h = 1; h < 64; )
1773
1764
  u = n[t.value], u == 65280 ? h = 64 : u >> 8 == 255 ? h += u & 255 : (a[h] = u, h++), t.value++;
1774
1765
  }
1775
- function Kn(t, n) {
1766
+ function jn(t, n) {
1776
1767
  n[0] = T(t[0]), n[1] = T(t[1]), n[2] = T(t[5]), n[3] = T(t[6]), n[4] = T(t[14]), n[5] = T(t[15]), n[6] = T(t[27]), n[7] = T(t[28]), n[8] = T(t[2]), n[9] = T(t[4]), n[10] = T(t[7]), n[11] = T(t[13]), n[12] = T(t[16]), n[13] = T(t[26]), n[14] = T(t[29]), n[15] = T(t[42]), n[16] = T(t[3]), n[17] = T(t[8]), n[18] = T(t[12]), n[19] = T(t[17]), n[20] = T(t[25]), n[21] = T(t[30]), n[22] = T(t[41]), n[23] = T(t[43]), n[24] = T(t[9]), n[25] = T(t[11]), n[26] = T(t[18]), n[27] = T(t[24]), n[28] = T(t[31]), n[29] = T(t[40]), n[30] = T(t[44]), n[31] = T(t[53]), n[32] = T(t[10]), n[33] = T(t[19]), n[34] = T(t[23]), n[35] = T(t[32]), n[36] = T(t[39]), n[37] = T(t[45]), n[38] = T(t[52]), n[39] = T(t[54]), n[40] = T(t[20]), n[41] = T(t[22]), n[42] = T(t[33]), n[43] = T(t[38]), n[44] = T(t[46]), n[45] = T(t[51]), n[46] = T(t[55]), n[47] = T(t[60]), n[48] = T(t[21]), n[49] = T(t[34]), n[50] = T(t[37]), n[51] = T(t[47]), n[52] = T(t[50]), n[53] = T(t[56]), n[54] = T(t[59]), n[55] = T(t[61]), n[56] = T(t[35]), n[57] = T(t[36]), n[58] = T(t[48]), n[59] = T(t[49]), n[60] = T(t[57]), n[61] = T(t[58]), n[62] = T(t[62]), n[63] = T(t[63]);
1777
1768
  }
1778
- function ei(t) {
1769
+ function Kn(t) {
1779
1770
  const n = 0.5 * Math.cos(0.7853975), a = 0.5 * Math.cos(3.14159 / 16), u = 0.5 * Math.cos(3.14159 / 8), h = 0.5 * Math.cos(3 * 3.14159 / 16), f = 0.5 * Math.cos(5 * 3.14159 / 16), d = 0.5 * Math.cos(3 * 3.14159 / 8), p = 0.5 * Math.cos(7 * 3.14159 / 16);
1780
1771
  for (var g = new Array(4), A = new Array(4), S = new Array(4), w = new Array(4), Y = 0; Y < 8; ++Y) {
1781
1772
  var I = Y * 8;
@@ -1784,31 +1775,31 @@ class so extends Pi {
1784
1775
  for (var _ = 0; _ < 8; ++_)
1785
1776
  g[0] = u * t[16 + _], g[1] = d * t[16 + _], g[2] = u * t[48 + _], g[3] = d * t[48 + _], A[0] = a * t[8 + _] + h * t[24 + _] + f * t[40 + _] + p * t[56 + _], A[1] = h * t[8 + _] - p * t[24 + _] - a * t[40 + _] - f * t[56 + _], A[2] = f * t[8 + _] - a * t[24 + _] + p * t[40 + _] + h * t[56 + _], A[3] = p * t[8 + _] - f * t[24 + _] + h * t[40 + _] - a * t[56 + _], S[0] = n * (t[_] + t[32 + _]), S[3] = n * (t[_] - t[32 + _]), S[1] = g[0] + g[3], S[2] = g[1] - g[2], w[0] = S[0] + S[1], w[1] = S[3] + S[2], w[2] = S[3] - S[2], w[3] = S[0] - S[1], t[0 + _] = w[0] + A[0], t[8 + _] = w[1] + A[1], t[16 + _] = w[2] + A[2], t[24 + _] = w[3] + A[3], t[32 + _] = w[3] - A[3], t[40 + _] = w[2] - A[2], t[48 + _] = w[1] - A[1], t[56 + _] = w[0] - A[0];
1786
1777
  }
1787
- function ti(t) {
1778
+ function ei(t) {
1788
1779
  for (var n = 0; n < 64; ++n) {
1789
1780
  var a = t[0][n], u = t[1][n], h = t[2][n];
1790
1781
  t[0][n] = a + 1.5747 * h, t[1][n] = a - 0.1873 * u - 0.4682 * h, t[2][n] = a + 1.8556 * u;
1791
1782
  }
1792
1783
  }
1793
- function ri(t, n, a) {
1784
+ function ti(t, n, a) {
1794
1785
  for (var u = 0; u < 64; ++u)
1795
- n[a + u] = Zr.toHalfFloat(ni(t[u]));
1786
+ n[a + u] = Zr.toHalfFloat(ri(t[u]));
1796
1787
  }
1797
- function ni(t) {
1788
+ function ri(t) {
1798
1789
  return t <= 1 ? Math.sign(t) * Math.pow(Math.abs(t), 2.2) : Math.sign(t) * Math.pow(Nt, Math.abs(t) - 1);
1799
1790
  }
1800
- function Pr(t) {
1791
+ function Mr(t) {
1801
1792
  return new DataView(t.array.buffer, t.offset.value, t.size);
1802
1793
  }
1803
- function ii(t) {
1794
+ function ni(t) {
1804
1795
  var n = t.viewer.buffer.slice(t.offset.value, t.offset.value + t.size), a = new Uint8Array(Lr(n)), u = new Uint8Array(a.length);
1805
1796
  return xr(a), Fr(a, u), new DataView(u.buffer);
1806
1797
  }
1807
1798
  function ir(t) {
1808
- var n = t.array.slice(t.offset.value, t.offset.value + t.size), a = Pt(n), u = new Uint8Array(a.length);
1799
+ var n = t.array.slice(t.offset.value, t.offset.value + t.size), a = Mt(n), u = new Uint8Array(a.length);
1809
1800
  return xr(a), Fr(a, u), new DataView(u.buffer);
1810
1801
  }
1811
- function si(t) {
1802
+ function ii(t) {
1812
1803
  for (var n = t.viewer, a = { value: t.offset.value }, u = new Uint16Array(t.width * t.scanlineBlockSize * (t.channels * t.type)), h = new Uint8Array(8192), f = 0, d = new Array(t.channels), p = 0; p < t.channels; p++)
1813
1804
  d[p] = {}, d[p].start = f, d[p].end = d[p].start, d[p].nx = t.width, d[p].ny = t.lines, d[p].size = t.type, f += d[p].nx * d[p].ny * d[p].size;
1814
1805
  var g = tt(n, a), A = tt(n, a);
@@ -1821,17 +1812,17 @@ class so extends Pi {
1821
1812
  Rr(t.array, n, a, Y, u, f);
1822
1813
  for (var p = 0; p < t.channels; ++p)
1823
1814
  for (var I = d[p], _ = 0; _ < d[p].size; ++_)
1824
- Vn(u, I.start + _, I.nx, I.size, I.ny, I.nx * I.size, w);
1825
- $n(S, u, f);
1826
- for (var N = 0, m = new Uint8Array(u.buffer.byteLength), M = 0; M < t.lines; M++)
1815
+ qn(u, I.start + _, I.nx, I.size, I.ny, I.nx * I.size, w);
1816
+ Jn(S, u, f);
1817
+ for (var N = 0, U = new Uint8Array(u.buffer.byteLength), P = 0; P < t.lines; P++)
1827
1818
  for (var z = 0; z < t.channels; z++) {
1828
1819
  var I = d[z], V = I.nx * I.size, te = new Uint8Array(u.buffer, I.end * 2, V * 2);
1829
- m.set(te, N), N += V * 2, I.end += V;
1820
+ U.set(te, N), N += V * 2, I.end += V;
1830
1821
  }
1831
- return new DataView(m.buffer);
1822
+ return new DataView(U.buffer);
1832
1823
  }
1833
- function oi(t) {
1834
- var n = t.array.slice(t.offset.value, t.offset.value + t.size), a = Pt(n);
1824
+ function si(t) {
1825
+ var n = t.array.slice(t.offset.value, t.offset.value + t.size), a = Mt(n);
1835
1826
  const u = t.lines * t.channels * t.width, h = t.type == 1 ? new Uint16Array(u) : new Uint32Array(u);
1836
1827
  let f = 0, d = 0;
1837
1828
  const p = new Array(4);
@@ -1857,7 +1848,7 @@ class so extends Pi {
1857
1848
  }
1858
1849
  return new DataView(h.buffer);
1859
1850
  }
1860
- function Mr(t) {
1851
+ function Pr(t) {
1861
1852
  var n = t.viewer, a = { value: t.offset.value }, u = new Uint8Array(t.width * t.lines * (t.channels * t.type * 2)), h = {
1862
1853
  version: ue(n, a),
1863
1854
  unknownUncompressedSize: ue(n, a),
@@ -1883,15 +1874,15 @@ class so extends Pi {
1883
1874
  }), d -= p.length + 3;
1884
1875
  }
1885
1876
  for (var I = nt.channels, _ = new Array(t.channels), N = 0; N < t.channels; ++N) {
1886
- var m = _[N] = {}, M = I[N];
1887
- m.name = M.name, m.compression = 0, m.decoded = !1, m.type = M.pixelType, m.pLinear = M.pLinear, m.width = t.width, m.height = t.lines;
1877
+ var U = _[N] = {}, P = I[N];
1878
+ U.name = P.name, U.compression = 0, U.decoded = !1, U.type = P.pixelType, U.pLinear = P.pLinear, U.width = t.width, U.height = t.lines;
1888
1879
  }
1889
1880
  for (var z = {
1890
1881
  idx: new Array(3)
1891
1882
  }, V = 0; V < t.channels; ++V)
1892
- for (var m = _[V], N = 0; N < f.length; ++N) {
1883
+ for (var U = _[V], N = 0; N < f.length; ++N) {
1893
1884
  var te = f[N];
1894
- m.name == te.name && (m.compression = te.compression, te.index >= 0 && (z.idx[te.index] = V), m.offset = V);
1885
+ U.name == te.name && (U.compression = te.compression, te.index >= 0 && (z.idx[te.index] = V), U.offset = V);
1895
1886
  }
1896
1887
  if (h.acCompressedSize > 0)
1897
1888
  switch (h.acCompression) {
@@ -1907,7 +1898,7 @@ class so extends Pi {
1907
1898
  );
1908
1899
  break;
1909
1900
  case 1:
1910
- var k = t.array.slice(a.value, a.value + h.totalAcUncompressedCount), Te = Pt(k), H = new Uint16Array(Te.buffer);
1901
+ var k = t.array.slice(a.value, a.value + h.totalAcUncompressedCount), Te = Mt(k), H = new Uint16Array(Te.buffer);
1911
1902
  a.value += h.totalAcUncompressedCount;
1912
1903
  break;
1913
1904
  }
@@ -1920,7 +1911,7 @@ class so extends Pi {
1920
1911
  a.value += h.dcCompressedSize;
1921
1912
  }
1922
1913
  if (h.rleRawSize > 0) {
1923
- var k = t.array.slice(a.value, a.value + h.rleCompressedSize), Te = Pt(k), it = Lr(Te.buffer);
1914
+ var k = t.array.slice(a.value, a.value + h.rleCompressedSize), Te = Mt(k), it = Lr(Te.buffer);
1924
1915
  a.value += h.rleCompressedSize;
1925
1916
  }
1926
1917
  for (var he = 0, D = new Array(_.length), N = 0; N < D.length; ++N)
@@ -1928,16 +1919,16 @@ class so extends Pi {
1928
1919
  for (var K = 0; K < t.lines; ++K)
1929
1920
  for (var W = 0; W < _.length; ++W)
1930
1921
  D[W].push(he), he += _[W].width * t.type * 2;
1931
- Qn(z, D, _, H, Oe, u);
1922
+ $n(z, D, _, H, Oe, u);
1932
1923
  for (var N = 0; N < _.length; ++N) {
1933
- var m = _[N];
1934
- if (!m.decoded)
1935
- switch (m.compression) {
1924
+ var U = _[N];
1925
+ if (!U.decoded)
1926
+ switch (U.compression) {
1936
1927
  case 2:
1937
1928
  for (var F = 0, fe = 0, K = 0; K < t.lines; ++K) {
1938
- for (var De = D[N][F], ae = 0; ae < m.width; ++ae) {
1939
- for (var xe = 0; xe < 2 * m.type; ++xe)
1940
- u[De++] = it[fe + xe * m.width * m.height];
1929
+ for (var De = D[N][F], ae = 0; ae < U.width; ++ae) {
1930
+ for (var xe = 0; xe < 2 * U.type; ++xe)
1931
+ u[De++] = it[fe + xe * U.width * U.height];
1941
1932
  fe++;
1942
1933
  }
1943
1934
  F++;
@@ -1956,15 +1947,15 @@ class so extends Pi {
1956
1947
  var h = new TextDecoder().decode(a.slice(n.value, n.value + u));
1957
1948
  return n.value = n.value + u + 1, h;
1958
1949
  }
1959
- function ai(t, n, a) {
1950
+ function oi(t, n, a) {
1960
1951
  var u = new TextDecoder().decode(new Uint8Array(t).slice(n.value, n.value + a));
1961
1952
  return n.value = n.value + a, u;
1962
1953
  }
1963
- function ci(t, n) {
1954
+ function ai(t, n) {
1964
1955
  var a = et(t, n), u = ne(t, n);
1965
1956
  return [a, u];
1966
1957
  }
1967
- function li(t, n) {
1958
+ function ci(t, n) {
1968
1959
  var a = ne(t, n), u = ne(t, n);
1969
1960
  return [a, u];
1970
1961
  }
@@ -1992,7 +1983,7 @@ class so extends Pi {
1992
1983
  var a = t.getFloat32(n.value, !0);
1993
1984
  return n.value += 4, a;
1994
1985
  }
1995
- function ui(t, n) {
1986
+ function li(t, n) {
1996
1987
  return Zr.toHalfFloat(j(t, n));
1997
1988
  }
1998
1989
  function T(t) {
@@ -2003,10 +1994,10 @@ class so extends Pi {
2003
1994
  var a = t.getUint16(n.value, !0);
2004
1995
  return n.value += 2, a;
2005
1996
  }
2006
- function hi(t, n) {
1997
+ function ui(t, n) {
2007
1998
  return T(tt(t, n));
2008
1999
  }
2009
- function fi(t, n, a, u) {
2000
+ function hi(t, n, a, u) {
2010
2001
  for (var h = a.value, f = []; a.value < h + u - 1; ) {
2011
2002
  var d = Ct(n, a), p = et(t, a), g = We(t, a);
2012
2003
  a.value += 3;
@@ -2021,7 +2012,7 @@ class so extends Pi {
2021
2012
  }
2022
2013
  return a.value += 1, f;
2023
2014
  }
2024
- function vi(t, n) {
2015
+ function fi(t, n) {
2025
2016
  var a = j(t, n), u = j(t, n), h = j(t, n), f = j(t, n), d = j(t, n), p = j(t, n), g = j(t, n), A = j(t, n);
2026
2017
  return {
2027
2018
  redX: a,
@@ -2034,7 +2025,7 @@ class so extends Pi {
2034
2025
  whiteY: A
2035
2026
  };
2036
2027
  }
2037
- function yi(t, n) {
2028
+ function vi(t, n) {
2038
2029
  var a = [
2039
2030
  "NO_COMPRESSION",
2040
2031
  "RLE_COMPRESSION",
@@ -2049,52 +2040,52 @@ class so extends Pi {
2049
2040
  ], u = We(t, n);
2050
2041
  return a[u];
2051
2042
  }
2052
- function pi(t, n) {
2043
+ function yi(t, n) {
2053
2044
  var a = ne(t, n), u = ne(t, n), h = ne(t, n), f = ne(t, n);
2054
2045
  return { xMin: a, yMin: u, xMax: h, yMax: f };
2055
2046
  }
2056
- function di(t, n) {
2047
+ function pi(t, n) {
2057
2048
  var a = ["INCREASING_Y"], u = We(t, n);
2058
2049
  return a[u];
2059
2050
  }
2060
- function wi(t, n) {
2051
+ function di(t, n) {
2061
2052
  var a = j(t, n), u = j(t, n);
2062
2053
  return [a, u];
2063
2054
  }
2064
- function Ai(t, n) {
2055
+ function wi(t, n) {
2065
2056
  var a = j(t, n), u = j(t, n), h = j(t, n);
2066
2057
  return [a, u, h];
2067
2058
  }
2068
- function gi(t, n, a, u, h) {
2059
+ function Ai(t, n, a, u, h) {
2069
2060
  if (u === "string" || u === "stringvector" || u === "iccProfile")
2070
- return ai(n, a, h);
2061
+ return oi(n, a, h);
2071
2062
  if (u === "chlist")
2072
- return fi(t, n, a, h);
2063
+ return hi(t, n, a, h);
2073
2064
  if (u === "chromaticities")
2074
- return vi(t, a);
2065
+ return fi(t, a);
2075
2066
  if (u === "compression")
2076
- return yi(t, a);
2067
+ return vi(t, a);
2077
2068
  if (u === "box2i")
2078
- return pi(t, a);
2069
+ return yi(t, a);
2079
2070
  if (u === "lineOrder")
2080
- return di(t, a);
2071
+ return pi(t, a);
2081
2072
  if (u === "float")
2082
2073
  return j(t, a);
2083
2074
  if (u === "v2f")
2084
- return wi(t, a);
2075
+ return di(t, a);
2085
2076
  if (u === "v3f")
2086
- return Ai(t, a);
2077
+ return wi(t, a);
2087
2078
  if (u === "int")
2088
2079
  return et(t, a);
2089
2080
  if (u === "rational")
2090
- return ci(t, a);
2081
+ return ai(t, a);
2091
2082
  if (u === "timecode")
2092
- return li(t, a);
2083
+ return ci(t, a);
2093
2084
  if (u === "preview")
2094
2085
  return a.value += h, "skipped";
2095
2086
  a.value += h;
2096
2087
  }
2097
- function Si(t, n, a) {
2088
+ function gi(t, n, a) {
2098
2089
  const u = {};
2099
2090
  if (t.getUint32(0, !0) != 20000630)
2100
2091
  throw "THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";
@@ -2111,7 +2102,7 @@ class so extends Pi {
2111
2102
  if (d == 0)
2112
2103
  f = !1;
2113
2104
  else {
2114
- var p = Ct(n, a), g = ne(t, a), A = gi(t, n, a, p, g);
2105
+ var p = Ct(n, a), g = ne(t, a), A = Ai(t, n, a, p, g);
2115
2106
  A === void 0 ? console.warn(`EXRLoader.parse: skipped unknown header attribute type '${p}'.`) : u[d] = A;
2116
2107
  }
2117
2108
  }
@@ -2119,7 +2110,7 @@ class so extends Pi {
2119
2110
  throw console.error("EXRHeader:", u), "THREE.EXRLoader: provided file is currently unsupported.";
2120
2111
  return u;
2121
2112
  }
2122
- function Ti(t, n, a, u, h) {
2113
+ function Si(t, n, a, u, h) {
2123
2114
  const f = {
2124
2115
  size: 0,
2125
2116
  viewer: n,
@@ -2139,10 +2130,10 @@ class so extends Pi {
2139
2130
  };
2140
2131
  switch (t.compression) {
2141
2132
  case "NO_COMPRESSION":
2142
- f.lines = 1, f.uncompress = Pr;
2133
+ f.lines = 1, f.uncompress = Mr;
2143
2134
  break;
2144
2135
  case "RLE_COMPRESSION":
2145
- f.lines = 1, f.uncompress = ii;
2136
+ f.lines = 1, f.uncompress = ni;
2146
2137
  break;
2147
2138
  case "ZIPS_COMPRESSION":
2148
2139
  f.lines = 1, f.uncompress = ir;
@@ -2151,16 +2142,16 @@ class so extends Pi {
2151
2142
  f.lines = 16, f.uncompress = ir;
2152
2143
  break;
2153
2144
  case "PIZ_COMPRESSION":
2154
- f.lines = 32, f.uncompress = si;
2145
+ f.lines = 32, f.uncompress = ii;
2155
2146
  break;
2156
2147
  case "PXR24_COMPRESSION":
2157
- f.lines = 16, f.uncompress = oi;
2148
+ f.lines = 16, f.uncompress = si;
2158
2149
  break;
2159
2150
  case "DWAA_COMPRESSION":
2160
- f.lines = 32, f.uncompress = Mr;
2151
+ f.lines = 32, f.uncompress = Pr;
2161
2152
  break;
2162
2153
  case "DWAB_COMPRESSION":
2163
- f.lines = 256, f.uncompress = Mr;
2154
+ f.lines = 256, f.uncompress = Pr;
2164
2155
  break;
2165
2156
  default:
2166
2157
  throw "EXRLoader.parse: " + t.compression + " is unsupported";
@@ -2168,7 +2159,7 @@ class so extends Pi {
2168
2159
  if (f.scanlineBlockSize = f.lines, f.type == 1)
2169
2160
  switch (h) {
2170
2161
  case ft:
2171
- f.getter = hi, f.inputSize = 2;
2162
+ f.getter = ui, f.inputSize = 2;
2172
2163
  break;
2173
2164
  case lt:
2174
2165
  f.getter = tt, f.inputSize = 2;
@@ -2180,7 +2171,7 @@ class so extends Pi {
2180
2171
  f.getter = j, f.inputSize = 4;
2181
2172
  break;
2182
2173
  case lt:
2183
- f.getter = ui, f.inputSize = 4;
2174
+ f.getter = li, f.inputSize = 4;
2184
2175
  }
2185
2176
  else
2186
2177
  throw "EXRLoader.parse: unsupported pixelType " + f.type + " for " + t.compression + ".";
@@ -2200,20 +2191,20 @@ class so extends Pi {
2200
2191
  console.error("THREE.EXRLoader: unsupported type: ", h);
2201
2192
  break;
2202
2193
  }
2203
- return f.bytesPerLine = f.width * f.inputSize * f.channels, f.outputChannels == 4 ? f.format = ln : f.format = hn, at ? f.colorSpace = "srgb-linear" : f.encoding = 3e3, f;
2194
+ return f.bytesPerLine = f.width * f.inputSize * f.channels, f.outputChannels == 4 ? f.format = cn : f.format = un, at ? f.colorSpace = "srgb-linear" : f.encoding = 3e3, f;
2204
2195
  }
2205
- const Rt = new DataView(e), Ei = new Uint8Array(e), rt = { value: 0 }, nt = Si(Rt, e, rt), C = Ti(nt, Rt, Ei, rt, this.type), Br = { value: 0 }, Ii = { R: 0, G: 1, B: 2, A: 3, Y: 0 };
2196
+ const Rt = new DataView(e), Ti = new Uint8Array(e), rt = { value: 0 }, nt = gi(Rt, e, rt), C = Si(nt, Rt, Ti, rt, this.type), Br = { value: 0 }, Ei = { R: 0, G: 1, B: 2, A: 3, Y: 0 };
2206
2197
  for (let t = 0; t < C.height / C.scanlineBlockSize; t++) {
2207
2198
  const n = ne(Rt, rt);
2208
2199
  C.size = ne(Rt, rt), C.lines = n + C.scanlineBlockSize > C.height ? C.height - n : C.scanlineBlockSize;
2209
- const u = C.size < C.lines * C.bytesPerLine ? C.uncompress(C) : Pr(C);
2200
+ const u = C.size < C.lines * C.bytesPerLine ? C.uncompress(C) : Mr(C);
2210
2201
  rt.value += C.size;
2211
2202
  for (let h = 0; h < C.scanlineBlockSize; h++) {
2212
2203
  const f = h + t * C.scanlineBlockSize;
2213
2204
  if (f >= C.height)
2214
2205
  break;
2215
2206
  for (let d = 0; d < C.channels; d++) {
2216
- const p = Ii[nt.channels[d].name];
2207
+ const p = Ei[nt.channels[d].name];
2217
2208
  for (let g = 0; g < C.width; g++) {
2218
2209
  Br.value = (h * (C.channels * C.width) + d * C.width + g) * C.inputSize;
2219
2210
  const A = (C.height - 1 - f) * (C.width * C.outputChannels) + g * C.outputChannels + p;
@@ -2242,19 +2233,19 @@ class so extends Pi {
2242
2233
  return super.load(e, c, s, o);
2243
2234
  }
2244
2235
  }
2245
- class qo extends qt {
2236
+ class Xo extends qt {
2246
2237
  setDepth(e) {
2247
2238
  return this.depth = e, this;
2248
2239
  }
2249
2240
  load(e, i, s, o) {
2250
- const c = new so(this.manager);
2241
+ const c = new no(this.manager);
2251
2242
  c.setRequestHeader(this.requestHeader), c.setPath(this.path), c.setWithCredentials(this.withCredentials), c.load(
2252
2243
  e,
2253
2244
  (l) => {
2254
- const { data: v, width: y, height: E } = l.image, b = this.depth ?? Math.sqrt(E), U = new un(v, y, E / b, b);
2255
- U.type = l.type, U.format = l.format, U.colorSpace = l.colorSpace, U.needsUpdate = !0;
2245
+ const { data: v, width: y, height: E } = l.image, b = this.depth ?? Math.sqrt(E), m = new ln(v, y, E / b, b);
2246
+ m.type = l.type, m.format = l.format, m.colorSpace = l.colorSpace, m.needsUpdate = !0;
2256
2247
  try {
2257
- i(U);
2248
+ i(m);
2258
2249
  } catch (q) {
2259
2250
  o != null ? o(q) : console.error(q), this.manager.itemError(e);
2260
2251
  }
@@ -2264,8 +2255,8 @@ class qo extends qt {
2264
2255
  );
2265
2256
  }
2266
2257
  }
2267
- const fr = 1e-6, Mt = /* @__PURE__ */ new Re(), Dt = /* @__PURE__ */ new Re(), me = /* @__PURE__ */ new Re(), ct = /* @__PURE__ */ new Re(), vr = /* @__PURE__ */ new Re(), oo = /* @__PURE__ */ new Re(), ao = /* @__PURE__ */ new Di(), co = /* @__PURE__ */ new Mi(), lo = /* @__PURE__ */ new Bi();
2268
- class Xn {
2258
+ const fr = 1e-6, Pt = /* @__PURE__ */ new Re(), Dt = /* @__PURE__ */ new Re(), Ue = /* @__PURE__ */ new Re(), ct = /* @__PURE__ */ new Re(), vr = /* @__PURE__ */ new Re(), io = /* @__PURE__ */ new Re(), so = /* @__PURE__ */ new Pi(), oo = /* @__PURE__ */ new Mi(), ao = /* @__PURE__ */ new Di();
2259
+ class Wn {
2269
2260
  constructor(e = 0, i = 0, s = 0, o = 0) {
2270
2261
  this.distance = e, this.heading = i, this.pitch = s, this.roll = o;
2271
2262
  }
@@ -2285,7 +2276,7 @@ class Xn {
2285
2276
  return this.distance = e, this.heading = i, this.pitch = s, o != null && (this.roll = o), this;
2286
2277
  }
2287
2278
  clone() {
2288
- return new Xn(this.distance, this.heading, this.pitch, this.roll);
2279
+ return new Wn(this.distance, this.heading, this.pitch, this.roll);
2289
2280
  }
2290
2281
  copy(e) {
2291
2282
  return this.distance = e.distance, this.heading = e.heading, this.pitch = e.pitch, this.roll = e.roll, this;
@@ -2296,37 +2287,37 @@ class Xn {
2296
2287
  decompose(e, i, s, o, c = Gr.WGS84) {
2297
2288
  c.getEastNorthUpVectors(
2298
2289
  e,
2299
- Mt,
2290
+ Pt,
2300
2291
  Dt,
2301
- me
2302
- ), o == null || o.copy(me);
2303
- const l = ct.copy(Mt).multiplyScalar(Math.cos(this.heading)).add(
2292
+ Ue
2293
+ ), o == null || o.copy(Ue);
2294
+ const l = ct.copy(Pt).multiplyScalar(Math.cos(this.heading)).add(
2304
2295
  vr.copy(Dt).multiplyScalar(Math.sin(this.heading))
2305
- ).multiplyScalar(Math.cos(this.pitch)).add(vr.copy(me).multiplyScalar(Math.sin(this.pitch))).normalize().multiplyScalar(this.distance);
2296
+ ).multiplyScalar(Math.cos(this.pitch)).add(vr.copy(Ue).multiplyScalar(Math.sin(this.pitch))).normalize().multiplyScalar(this.distance);
2306
2297
  if (i.copy(e).sub(l), this.roll !== 0) {
2307
2298
  const v = ct.copy(e).sub(i).normalize();
2308
- me.applyQuaternion(
2309
- co.setFromAxisAngle(v, this.roll)
2299
+ Ue.applyQuaternion(
2300
+ oo.setFromAxisAngle(v, this.roll)
2310
2301
  );
2311
2302
  }
2312
2303
  s.setFromRotationMatrix(
2313
- ao.lookAt(i, e, me)
2304
+ so.lookAt(i, e, Ue)
2314
2305
  );
2315
2306
  }
2316
2307
  setFromCamera(e, i = Gr.WGS84) {
2317
- const s = ct.setFromMatrixPosition(e.matrixWorld), o = vr.set(0, 0, 0.5).unproject(e).sub(s).normalize(), c = i.getIntersection(lo.set(s, o));
2308
+ const s = ct.setFromMatrixPosition(e.matrixWorld), o = vr.set(0, 0, 0.5).unproject(e).sub(s).normalize(), c = i.getIntersection(ao.set(s, o));
2318
2309
  if (c == null)
2319
2310
  return;
2320
2311
  this.distance = s.distanceTo(c), i.getEastNorthUpVectors(
2321
2312
  c,
2322
- Mt,
2313
+ Pt,
2323
2314
  Dt,
2324
- me
2315
+ Ue
2325
2316
  ), this.heading = Math.atan2(
2326
2317
  Dt.dot(o),
2327
- Mt.dot(o)
2328
- ), this.pitch = Math.asin(me.dot(o));
2329
- const l = ct.copy(e.up).applyQuaternion(e.quaternion), v = oo.copy(o).multiplyScalar(-l.dot(o)).add(l).normalize(), y = ct.copy(o).multiplyScalar(-me.dot(o)).add(me).normalize(), E = y.dot(v), b = o.dot(y.cross(v));
2318
+ Pt.dot(o)
2319
+ ), this.pitch = Math.asin(Ue.dot(o));
2320
+ const l = ct.copy(e.up).applyQuaternion(e.quaternion), v = io.copy(o).multiplyScalar(-l.dot(o)).add(l).normalize(), y = ct.copy(o).multiplyScalar(-Ue.dot(o)).add(Ue).normalize(), E = y.dot(v), b = o.dot(y.cross(v));
2330
2321
  return this.roll = Math.atan2(b, E), this;
2331
2322
  }
2332
2323
  }
@@ -2376,49 +2367,49 @@ dt.MAX = /* @__PURE__ */ new dt(
2376
2367
  st.MAX_LATITUDE
2377
2368
  );
2378
2369
  let Yt = dt;
2379
- const uo = /^[ \t]*#include +"([\w\d./]+)"/gm;
2380
- function ho(r, e) {
2381
- return r.replace(uo, (i, s) => {
2370
+ const co = /^[ \t]*#include +"([\w\d./]+)"/gm;
2371
+ function lo(r, e) {
2372
+ return r.replace(co, (i, s) => {
2382
2373
  const c = s.split("/").reduce(
2383
2374
  (l, v) => typeof l != "string" && l != null ? l[v] : void 0,
2384
2375
  e
2385
2376
  );
2386
2377
  if (typeof c != "string")
2387
2378
  throw new Error(`Could not find include for ${s}.`);
2388
- return ho(c, e);
2379
+ return lo(c, e);
2389
2380
  });
2390
2381
  }
2391
2382
  let Bt;
2392
- function fo() {
2383
+ function uo() {
2393
2384
  if (Bt != null)
2394
2385
  return Bt;
2395
2386
  const r = new Uint32Array([268435456]);
2396
2387
  return Bt = new Uint8Array(r.buffer, r.byteOffset, r.byteLength)[0] === 0, Bt;
2397
2388
  }
2398
2389
  function ke(r, e, i, s = !0) {
2399
- if (s === fo())
2390
+ if (s === uo())
2400
2391
  return new e(r);
2401
2392
  const o = Object.assign(new DataView(r), {
2402
2393
  getFloat16(l, v) {
2403
- return zs(this, l, v);
2394
+ return Ds(this, l, v);
2404
2395
  }
2405
2396
  }), c = new e(o.byteLength / e.BYTES_PER_ELEMENT);
2406
2397
  for (let l = 0, v = 0; l < c.length; ++l, v += e.BYTES_PER_ELEMENT)
2407
2398
  c[l] = o[i](v, s);
2408
2399
  return c;
2409
2400
  }
2410
- const vo = (r) => new Uint8Array(r), Vo = (r) => new Int8Array(r), Jo = (r, e) => ke(r, Uint16Array, "getUint16", e), $o = (r, e) => ke(r, Int16Array, "getInt16", e), Qo = (r, e) => ke(r, Int32Array, "getInt32", e), jo = (r, e) => ke(r, Uint32Array, "getUint32", e), Ko = (r, e) => ke(r, B, "getFloat16", e), ea = (r, e) => ke(r, Float32Array, "getFloat32", e), ta = (r, e) => ke(r, Float64Array, "getFloat64", e), ra = Bn(vo, {
2411
- format: hn,
2401
+ const ho = (r) => new Uint8Array(r), Yo = (r) => new Int8Array(r), qo = (r, e) => ke(r, Uint16Array, "getUint16", e), Vo = (r, e) => ke(r, Int16Array, "getInt16", e), Jo = (r, e) => ke(r, Int32Array, "getInt32", e), $o = (r, e) => ke(r, Uint32Array, "getUint32", e), Qo = (r, e) => ke(r, B, "getFloat16", e), jo = (r, e) => ke(r, Float32Array, "getFloat32", e), Ko = (r, e) => ke(r, Float64Array, "getFloat64", e), ea = Dn(ho, {
2402
+ format: un,
2412
2403
  minFilter: Hr,
2413
2404
  magFilter: Hr,
2414
2405
  wrapS: sr,
2415
2406
  wrapT: sr,
2416
2407
  wrapR: sr,
2417
- width: Zi,
2418
- height: Hi,
2419
- depth: Gi
2408
+ width: zi,
2409
+ height: ki,
2410
+ depth: Zi
2420
2411
  });
2421
- function* Yn(r, e, i, s, o) {
2412
+ function* Xn(r, e, i, s, o) {
2422
2413
  if (i >= s)
2423
2414
  return;
2424
2415
  const c = 2 ** i, l = i + 1, v = 2 ** l, y = Math.floor(r / c * v), E = Math.floor(e / c * v), b = [
@@ -2428,12 +2419,12 @@ function* Yn(r, e, i, s, o) {
2428
2419
  [y + 1, E + 1, l]
2429
2420
  ];
2430
2421
  if (l < s)
2431
- for (const U of b)
2432
- for (const q of Yn(...U, s, o))
2422
+ for (const m of b)
2423
+ for (const q of Xn(...m, s, o))
2433
2424
  yield q;
2434
2425
  else
2435
- for (const U of b)
2436
- yield (o ?? new wt()).set(...U);
2426
+ for (const m of b)
2427
+ yield (o ?? new wt()).set(...m);
2437
2428
  }
2438
2429
  class wt {
2439
2430
  constructor(e = 0, i = 0, s = 0) {
@@ -2457,7 +2448,7 @@ class wt {
2457
2448
  }
2458
2449
  *traverseChildren(e, i) {
2459
2450
  const { x: s, y: o, z: c } = this;
2460
- for (const l of Yn(s, o, c, c + e, i))
2451
+ for (const l of Xn(s, o, c, c + e, i))
2461
2452
  yield l;
2462
2453
  }
2463
2454
  fromArray(e, i = 0) {
@@ -2470,105 +2461,105 @@ class wt {
2470
2461
  yield this.x, yield this.y, yield this.z;
2471
2462
  }
2472
2463
  }
2473
- const cn = /* @__PURE__ */ new fn();
2474
- class qn {
2464
+ const an = /* @__PURE__ */ new hn();
2465
+ class Yn {
2475
2466
  constructor(e = 2, i = 1, s = Yt.MAX) {
2476
2467
  this.width = e, this.height = i, this.rectangle = s;
2477
2468
  }
2478
2469
  clone() {
2479
- return new qn(this.width, this.height, this.rectangle.clone());
2470
+ return new Yn(this.width, this.height, this.rectangle.clone());
2480
2471
  }
2481
2472
  copy(e) {
2482
2473
  return this.width = e.width, this.height = e.height, this.rectangle.copy(e.rectangle), this;
2483
2474
  }
2484
- getSize(e, i = new fn()) {
2475
+ getSize(e, i = new hn()) {
2485
2476
  return i.set(this.width << e, this.height << e);
2486
2477
  }
2487
2478
  // Reference: https://github.com/CesiumGS/cesium/blob/1.122/packages/engine/Source/Core/GeographicTilingScheme.js#L210
2488
2479
  getTile(e, i, s = new wt()) {
2489
- const o = this.getSize(i, cn), { rectangle: c } = this, l = c.width / o.x, v = c.height / o.y, { west: y, south: E, east: b } = c;
2490
- let U = e.longitude;
2491
- b < y && (U += Math.PI * 2);
2492
- let q = Math.floor((U - y) / l);
2480
+ const o = this.getSize(i, an), { rectangle: c } = this, l = c.width / o.x, v = c.height / o.y, { west: y, south: E, east: b } = c;
2481
+ let m = e.longitude;
2482
+ b < y && (m += Math.PI * 2);
2483
+ let q = Math.floor((m - y) / l);
2493
2484
  q >= o.x && (q = o.x - 1);
2494
2485
  let se = Math.floor((e.latitude - E) / v);
2495
2486
  return se >= o.y && (se = o.y - 1), s.x = q, s.y = se, s.z = i, s;
2496
2487
  }
2497
2488
  // Reference: https://github.com/CesiumGS/cesium/blob/1.122/packages/engine/Source/Core/GeographicTilingScheme.js#L169
2498
2489
  getRectangle(e, i = new Yt()) {
2499
- const s = this.getSize(e.z, cn), { rectangle: o } = this, c = o.width / s.x, l = o.height / s.y, { west: v, north: y } = o;
2490
+ const s = this.getSize(e.z, an), { rectangle: o } = this, c = o.width / s.x, l = o.height / s.y, { west: v, north: y } = o;
2500
2491
  return i.west = e.x * c + v, i.east = (e.x + 1) * c + v, i.north = y - (s.y - e.y - 1) * l, i.south = y - (s.y - e.y) * l, i;
2501
2492
  }
2502
2493
  }
2503
- const yo = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*(?:i\s*\+\+|\+\+\s*i)\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
2504
- function po(r, e, i, s) {
2494
+ const fo = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*(?:i\s*\+\+|\+\+\s*i)\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
2495
+ function vo(r, e, i, s) {
2505
2496
  let o = "";
2506
2497
  for (let c = parseInt(e); c < parseInt(i); ++c)
2507
2498
  o += s.replace(/\[\s*i\s*\]/g, "[" + c + "]").replace(/UNROLLED_LOOP_INDEX/g, `${c}`);
2508
2499
  return o;
2509
2500
  }
2510
- function na(r) {
2511
- return r.replace(yo, po);
2501
+ function ta(r) {
2502
+ return r.replace(fo, vo);
2512
2503
  }
2513
2504
  export {
2514
- ki as ArrayBufferLoader,
2515
- Eo as DEFAULT_STBN_URL,
2516
- Gs as DataLoader,
2517
- qo as EXR3DLoader,
2505
+ Bi as ArrayBufferLoader,
2506
+ So as DEFAULT_STBN_URL,
2507
+ Zs as DataLoader,
2508
+ Xo as EXR3DLoader,
2518
2509
  Gr as Ellipsoid,
2519
- oa as EllipsoidGeometry,
2510
+ ia as EllipsoidGeometry,
2520
2511
  B as Float16Array,
2521
2512
  st as Geodetic,
2522
- Xn as PointOfView,
2513
+ Wn as PointOfView,
2523
2514
  Yt as Rectangle,
2524
- ra as STBNLoader,
2525
- Gi as STBN_TEXTURE_DEPTH,
2526
- Hi as STBN_TEXTURE_HEIGHT,
2527
- Zi as STBN_TEXTURE_WIDTH,
2515
+ ea as STBNLoader,
2516
+ Zi as STBN_TEXTURE_DEPTH,
2517
+ ki as STBN_TEXTURE_HEIGHT,
2518
+ zi as STBN_TEXTURE_WIDTH,
2528
2519
  wt as TileCoordinate,
2529
- qn as TilingScheme,
2530
- ks as TypedArrayLoader,
2531
- go as assertType,
2532
- Fo as ceilPowerOfTwo,
2520
+ Yn as TilingScheme,
2521
+ Bs as TypedArrayLoader,
2522
+ wo as assertType,
2523
+ Ro as ceilPowerOfTwo,
2533
2524
  Je as clamp,
2534
- ko as closeTo,
2535
- bo as createData3DTextureLoader,
2536
- Bn as createData3DTextureLoaderClass,
2537
- No as createDataTextureLoader,
2538
- Ws as createDataTextureLoaderClass,
2539
- _o as createTypedArrayLoader,
2525
+ Bo as closeTo,
2526
+ Io as createData3DTextureLoader,
2527
+ Dn as createData3DTextureLoaderClass,
2528
+ _o as createDataTextureLoader,
2529
+ Hs as createDataTextureLoaderClass,
2530
+ Eo as createTypedArrayLoader,
2540
2531
  Mn as createTypedArrayLoaderClass,
2541
- Zo as define,
2542
- Wo as defineExpression,
2543
- Go as defineFloat,
2544
- Ho as defineInt,
2545
- Xo as definePropertyShorthand,
2546
- Yo as defineUniformShorthand,
2547
- Ro as degrees,
2548
- Oo as euclideanModulo,
2549
- Lo as floorPowerOfTwo,
2550
- To as fromBufferGeometryLike,
2551
- mo as inverseLerp,
2552
- xo as isPowerOfTwo,
2553
- Io as isTypedArray,
2554
- Uo as lerp,
2555
- Po as normalize,
2556
- Ko as parseFloat16Array,
2557
- ea as parseFloat32Array,
2558
- ta as parseFloat64Array,
2559
- $o as parseInt16Array,
2560
- Qo as parseInt32Array,
2561
- Vo as parseInt8Array,
2562
- Jo as parseUint16Array,
2563
- jo as parseUint32Array,
2564
- vo as parseUint8Array,
2565
- Co as radians,
2566
- Mo as remap,
2567
- Do as remapClamped,
2568
- ho as resolveIncludes,
2569
- zo as saturate,
2570
- Bo as smoothstep,
2571
- So as toBufferGeometryLike,
2572
- na as unrollLoops
2532
+ zo as define,
2533
+ Ho as defineExpression,
2534
+ Zo as defineFloat,
2535
+ ko as defineInt,
2536
+ Go as definePropertyShorthand,
2537
+ Wo as defineUniformShorthand,
2538
+ mo as degrees,
2539
+ bo as euclideanModulo,
2540
+ xo as floorPowerOfTwo,
2541
+ go as fromBufferGeometryLike,
2542
+ No as inverseLerp,
2543
+ Co as isPowerOfTwo,
2544
+ To as isTypedArray,
2545
+ Oo as lerp,
2546
+ Fo as normalize,
2547
+ Qo as parseFloat16Array,
2548
+ jo as parseFloat32Array,
2549
+ Ko as parseFloat64Array,
2550
+ Vo as parseInt16Array,
2551
+ Jo as parseInt32Array,
2552
+ Yo as parseInt8Array,
2553
+ qo as parseUint16Array,
2554
+ $o as parseUint32Array,
2555
+ ho as parseUint8Array,
2556
+ Uo as radians,
2557
+ Lo as remap,
2558
+ Mo as remapClamped,
2559
+ lo as resolveIncludes,
2560
+ Do as saturate,
2561
+ Po as smoothstep,
2562
+ Ao as toBufferGeometryLike,
2563
+ ta as unrollLoops
2573
2564
  };
2574
2565
  //# sourceMappingURL=index.js.map