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