@takram/three-geospatial 0.2.2 → 0.3.0

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