@navaramap/font 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,96 +1,17 @@
1
+ import e, { parseCssUnicodeRange as t, parseFontFamilyFromCss as n } from "@navaramap/engine-api";
1
2
  //#region src/cssFontFamily.ts
2
- function e(e) {
3
- let t = [];
4
- for (let n of e.split(",")) {
5
- let e = n.trim();
6
- if (!e) continue;
7
- let r = /^u\+([0-9a-f?]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);
8
- if (!r) throw Error(`Invalid unicode-range token: "${e}"`);
9
- let [, i, a] = r, o;
10
- if (i.includes("?")) {
11
- if (a !== void 0) throw Error(`Invalid unicode-range token: "${e}"`);
12
- o = {
13
- from: parseInt(i.replace(/\?/g, "0"), 16),
14
- to: parseInt(i.replace(/\?/g, "f"), 16)
15
- };
16
- } else {
17
- let e = parseInt(i, 16);
18
- o = {
19
- from: e,
20
- to: a === void 0 ? e : parseInt(a, 16)
21
- };
22
- }
23
- if (o.from > o.to || o.to > 1114111) throw Error(`Invalid unicode-range token: "${e}"`);
24
- t.push(o);
25
- }
26
- return t;
3
+ var r;
4
+ function i() {
5
+ return r ??= e();
27
6
  }
28
- var t = [{
29
- from: 0,
30
- to: 1114111
31
- }];
32
- function n(e) {
33
- let t = e[0];
34
- return (t === "\"" || t === "'") && e.endsWith(t) ? e.slice(1, -1) : e;
35
- }
36
- function r(e) {
37
- let t = [...e.matchAll(/url\(\s*("[^"]*"|'[^']*'|[^)]*?)\s*\)(\s*format\(\s*("[^"]*"|'[^']*'|[^)]*?)\s*\))?/gi)];
38
- if (t.length !== 0) return n((t.find((e) => e[3] && n(e[3]).toLowerCase() === "woff2") ?? t[0])[1].trim());
39
- }
40
- function i(e) {
41
- let t = e.replace(/\/\*[\s\S]*?\*\//g, ""), r = [];
42
- for (let [, e] of t.matchAll(/@font-face\s*\{([^}]*)\}/gi)) {
43
- let t = {};
44
- for (let r of e.split(";")) {
45
- let e = r.indexOf(":");
46
- if (e < 0) continue;
47
- let i = r.slice(0, e).trim().toLowerCase(), a = r.slice(e + 1).trim();
48
- i === "font-family" ? t.fontFamily = n(a) : i === "font-style" ? t.fontStyle = a : i === "font-weight" ? t.fontWeight = a : i === "src" ? t.src = a : i === "unicode-range" && (t.unicodeRange = a);
49
- }
50
- r.push(t);
51
- }
52
- return r;
53
- }
54
- function a(e) {
55
- return e.trim().replace(/\s+/g, " ").toLowerCase();
7
+ async function a(e) {
8
+ return await i(), t(e);
56
9
  }
57
- function o(e, t) {
58
- if (t.fontFamily !== void 0) {
59
- let n = Array.isArray(t.fontFamily) ? t.fontFamily : [t.fontFamily], r = e.fontFamily?.toLowerCase();
60
- if (!n.some((e) => e.toLowerCase() === r)) return !1;
61
- }
62
- return !(t.fontWeight !== void 0 && a(e.fontWeight ?? "") !== a(String(t.fontWeight)) || t.fontStyle !== void 0 && a(e.fontStyle ?? "") !== a(t.fontStyle));
63
- }
64
- function s(n, a, s = {}) {
65
- let c = [];
66
- for (let n of i(a)) {
67
- if (!o(n, s) || n.src === void 0) continue;
68
- let i = r(n.src);
69
- if (i === void 0) continue;
70
- let a = s.baseUrl ? new URL(i, s.baseUrl).toString() : i, l = n.unicodeRange ? e(n.unicodeRange) : t;
71
- c.push({
72
- face: {
73
- url: a,
74
- unicodeRanges: l
75
- },
76
- cssFamily: n.fontFamily?.toLowerCase() ?? ""
77
- });
78
- }
79
- if (c.length === 0) throw Error(`parseFontFamilyFromCss: no @font-face rules matched for family "${n}"`);
80
- if (c.reverse(), Array.isArray(s.fontFamily)) {
81
- let e = s.fontFamily.map((e) => e.toLowerCase()), t = (t) => {
82
- let n = e.indexOf(t);
83
- return n === -1 ? e.length : n;
84
- };
85
- c.sort((e, n) => t(e.cssFamily) - t(n.cssFamily));
86
- }
87
- return {
88
- family: n,
89
- faces: c.map(({ face: e }) => e)
90
- };
10
+ async function o(e, t, r = {}) {
11
+ return await i(), n(e, t, r);
91
12
  }
92
- async function c(e, t, n = {}) {
93
- let r = Array.isArray(t) ? t : [t], { requestInit: i, ...a } = n, o = [], c = await Promise.all(r.map(async (e) => {
13
+ async function s(e, t, n = {}) {
14
+ let r = Array.isArray(t) ? t : [t], { requestInit: i, ...a } = n, s = [], c = await Promise.all(r.map(async (e) => {
94
15
  let t = await fetch(e, i);
95
16
  if (!t.ok) throw Error(`fetchFontFamilyFromCss: failed to fetch "${e}" (${t.status})`);
96
17
  return {
@@ -98,24 +19,27 @@ async function c(e, t, n = {}) {
98
19
  baseUrl: t.url || e
99
20
  };
100
21
  }));
101
- for (let { text: t, baseUrl: n } of c) o.push(...s(e, t, {
102
- ...a,
103
- baseUrl: n
104
- }).faces);
22
+ for (let { text: t, baseUrl: n } of c) {
23
+ let r = await o(e, t, {
24
+ ...a,
25
+ baseUrl: n
26
+ });
27
+ s.push(...r.faces);
28
+ }
105
29
  return {
106
30
  family: e,
107
- faces: o
31
+ faces: s
108
32
  };
109
33
  }
110
- var l = 1e3, u = 1001, d = 1002, f = 1003, p = 1006, m = 1008, h = 1009, g = 1023, _ = 1028, v = 2300, y = 2301, b = 2302, x = 2303, S = 2400, C = 2401, w = 2402, T = "srgb", E = "srgb-linear", D = "linear", O = "srgb", k = 2e3;
111
- function A(e) {
34
+ var c = 1e3, l = 1001, u = 1002, d = 1003, f = 1006, p = 1008, m = 1009, h = 1023, g = 1028, _ = 2300, v = 2301, y = 2302, b = 2303, x = 2400, S = 2401, C = 2402, w = "srgb", T = "srgb-linear", E = "linear", D = "srgb", O = 2e3;
35
+ function k(e) {
112
36
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
113
37
  }
114
- function j(e) {
38
+ function A(e) {
115
39
  return document.createElementNS("http://www.w3.org/1999/xhtml", e);
116
40
  }
117
- var M = {}, N = null;
118
- function P(e) {
41
+ var ee = {};
42
+ function te(e) {
119
43
  let t = e[0];
120
44
  if (typeof t == "string" && t.startsWith("TSL:")) {
121
45
  let t = e[1];
@@ -123,29 +47,27 @@ function P(e) {
123
47
  }
124
48
  return e;
125
49
  }
126
- function F(...e) {
127
- e = P(e);
50
+ function j(...e) {
51
+ e = te(e);
128
52
  let t = "THREE." + e.shift();
129
- if (N) N("warn", t, ...e);
130
- else {
53
+ {
131
54
  let n = e[0];
132
55
  n && n.isStackTrace ? console.warn(n.getError(t)) : console.warn(t, ...e);
133
56
  }
134
57
  }
135
- function I(...e) {
136
- e = P(e);
58
+ function M(...e) {
59
+ e = te(e);
137
60
  let t = "THREE." + e.shift();
138
- if (N) N("error", t, ...e);
139
- else {
61
+ {
140
62
  let n = e[0];
141
63
  n && n.isStackTrace ? console.error(n.getError(t)) : console.error(t, ...e);
142
64
  }
143
65
  }
144
- function ee(...e) {
66
+ function N(...e) {
145
67
  let t = e.join(" ");
146
- t in M || (M[t] = !0, F(...e));
68
+ t in ee || (ee[t] = !0, j(...e));
147
69
  }
148
- var te = class {
70
+ var P = class {
149
71
  addEventListener(e, t) {
150
72
  this._listeners === void 0 && (this._listeners = {});
151
73
  let n = this._listeners;
@@ -153,7 +75,7 @@ var te = class {
153
75
  }
154
76
  hasEventListener(e, t) {
155
77
  let n = this._listeners;
156
- return n === void 0 ? !1 : n[e] !== void 0 && n[e].indexOf(t) !== -1;
78
+ return n !== void 0 && n[e] !== void 0 && n[e].indexOf(t) !== -1;
157
79
  }
158
80
  removeEventListener(e, t) {
159
81
  let n = this._listeners;
@@ -175,13 +97,13 @@ var te = class {
175
97
  e.target = null;
176
98
  }
177
99
  }
178
- }, L = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split(".");
100
+ }, F = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split(".");
179
101
  Math.PI / 180, 180 / Math.PI;
180
102
  function ne() {
181
103
  let e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0, r = Math.random() * 4294967295 | 0;
182
- return (L[e & 255] + L[e >> 8 & 255] + L[e >> 16 & 255] + L[e >> 24 & 255] + "-" + L[t & 255] + L[t >> 8 & 255] + "-" + L[t >> 16 & 15 | 64] + L[t >> 24 & 255] + "-" + L[n & 63 | 128] + L[n >> 8 & 255] + "-" + L[n >> 16 & 255] + L[n >> 24 & 255] + L[r & 255] + L[r >> 8 & 255] + L[r >> 16 & 255] + L[r >> 24 & 255]).toLowerCase();
104
+ return (F[e & 255] + F[e >> 8 & 255] + F[e >> 16 & 255] + F[e >> 24 & 255] + "-" + F[t & 255] + F[t >> 8 & 255] + "-" + F[t >> 16 & 15 | 64] + F[t >> 24 & 255] + "-" + F[n & 63 | 128] + F[n >> 8 & 255] + "-" + F[n >> 16 & 255] + F[n >> 24 & 255] + F[r & 255] + F[r >> 8 & 255] + F[r >> 16 & 255] + F[r >> 24 & 255]).toLowerCase();
183
105
  }
184
- function R(e, t, n) {
106
+ function I(e, t, n) {
185
107
  return Math.max(t, Math.min(n, e));
186
108
  }
187
109
  function re(e, t) {
@@ -229,7 +151,7 @@ var ae = class e {
229
151
  case 1:
230
152
  this.y = t;
231
153
  break;
232
- default: throw Error("index is out of range: " + e);
154
+ default: throw Error("THREE.Vector2: index is out of range: " + e);
233
155
  }
234
156
  return this;
235
157
  }
@@ -237,7 +159,7 @@ var ae = class e {
237
159
  switch (e) {
238
160
  case 0: return this.x;
239
161
  case 1: return this.y;
240
- default: throw Error("index is out of range: " + e);
162
+ default: throw Error("THREE.Vector2: index is out of range: " + e);
241
163
  }
242
164
  }
243
165
  clone() {
@@ -290,14 +212,14 @@ var ae = class e {
290
212
  return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this;
291
213
  }
292
214
  clamp(e, t) {
293
- return this.x = R(this.x, e.x, t.x), this.y = R(this.y, e.y, t.y), this;
215
+ return this.x = I(this.x, e.x, t.x), this.y = I(this.y, e.y, t.y), this;
294
216
  }
295
217
  clampScalar(e, t) {
296
- return this.x = R(this.x, e, t), this.y = R(this.y, e, t), this;
218
+ return this.x = I(this.x, e, t), this.y = I(this.y, e, t), this;
297
219
  }
298
220
  clampLength(e, t) {
299
221
  let n = this.length();
300
- return this.divideScalar(n || 1).multiplyScalar(R(n, e, t));
222
+ return this.divideScalar(n || 1).multiplyScalar(I(n, e, t));
301
223
  }
302
224
  floor() {
303
225
  return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this;
@@ -339,7 +261,7 @@ var ae = class e {
339
261
  let t = Math.sqrt(this.lengthSq() * e.lengthSq());
340
262
  if (t === 0) return Math.PI / 2;
341
263
  let n = this.dot(e) / t;
342
- return Math.acos(R(n, -1, 1));
264
+ return Math.acos(I(n, -1, 1));
343
265
  }
344
266
  distanceTo(e) {
345
267
  return Math.sqrt(this.distanceToSquared(e));
@@ -382,7 +304,7 @@ var ae = class e {
382
304
  *[Symbol.iterator]() {
383
305
  yield this.x, yield this.y;
384
306
  }
385
- }, z = class {
307
+ }, L = class {
386
308
  constructor(e = 0, t = 0, n = 0, r = 1) {
387
309
  this.isQuaternion = !0, this._x = e, this._y = t, this._z = n, this._w = r;
388
310
  }
@@ -461,7 +383,7 @@ var ae = class e {
461
383
  case "XZY":
462
384
  this._x = d * l * u - c * f * p, this._y = c * f * u - d * l * p, this._z = c * l * p + d * f * u, this._w = c * l * u + d * f * p;
463
385
  break;
464
- default: F("Quaternion: .setFromEuler() encountered an unknown order: " + a);
386
+ default: j("Quaternion: .setFromEuler() encountered an unknown order: " + a);
465
387
  }
466
388
  return t === !0 && this._onChangeCallback(), this;
467
389
  }
@@ -491,7 +413,7 @@ var ae = class e {
491
413
  return n < 1e-8 ? (n = 0, Math.abs(e.x) > Math.abs(e.z) ? (this._x = -e.y, this._y = e.x, this._z = 0, this._w = n) : (this._x = 0, this._y = -e.z, this._z = e.y, this._w = n)) : (this._x = e.y * t.z - e.z * t.y, this._y = e.z * t.x - e.x * t.z, this._z = e.x * t.y - e.y * t.x, this._w = n), this.normalize();
492
414
  }
493
415
  angleTo(e) {
494
- return 2 * Math.acos(Math.abs(R(this.dot(e), -1, 1)));
416
+ return 2 * Math.acos(Math.abs(I(this.dot(e), -1, 1)));
495
417
  }
496
418
  rotateTowards(e, t) {
497
419
  let n = this.angleTo(e);
@@ -570,7 +492,7 @@ var ae = class e {
570
492
  *[Symbol.iterator]() {
571
493
  yield this._x, yield this._y, yield this._z, yield this._w;
572
494
  }
573
- }, B = class e {
495
+ }, R = class e {
574
496
  static {
575
497
  e.prototype.isVector3 = !0;
576
498
  }
@@ -603,7 +525,7 @@ var ae = class e {
603
525
  case 2:
604
526
  this.z = t;
605
527
  break;
606
- default: throw Error("index is out of range: " + e);
528
+ default: throw Error("THREE.Vector3: index is out of range: " + e);
607
529
  }
608
530
  return this;
609
531
  }
@@ -612,7 +534,7 @@ var ae = class e {
612
534
  case 0: return this.x;
613
535
  case 1: return this.y;
614
536
  case 2: return this.z;
615
- default: throw Error("index is out of range: " + e);
537
+ default: throw Error("THREE.Vector3: index is out of range: " + e);
616
538
  }
617
539
  }
618
540
  clone() {
@@ -695,14 +617,14 @@ var ae = class e {
695
617
  return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this;
696
618
  }
697
619
  clamp(e, t) {
698
- return this.x = R(this.x, e.x, t.x), this.y = R(this.y, e.y, t.y), this.z = R(this.z, e.z, t.z), this;
620
+ return this.x = I(this.x, e.x, t.x), this.y = I(this.y, e.y, t.y), this.z = I(this.z, e.z, t.z), this;
699
621
  }
700
622
  clampScalar(e, t) {
701
- return this.x = R(this.x, e, t), this.y = R(this.y, e, t), this.z = R(this.z, e, t), this;
623
+ return this.x = I(this.x, e, t), this.y = I(this.y, e, t), this.z = I(this.z, e, t), this;
702
624
  }
703
625
  clampLength(e, t) {
704
626
  let n = this.length();
705
- return this.divideScalar(n || 1).multiplyScalar(R(n, e, t));
627
+ return this.divideScalar(n || 1).multiplyScalar(I(n, e, t));
706
628
  }
707
629
  floor() {
708
630
  return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this;
@@ -766,7 +688,7 @@ var ae = class e {
766
688
  let t = Math.sqrt(this.lengthSq() * e.lengthSq());
767
689
  if (t === 0) return Math.PI / 2;
768
690
  let n = this.dot(e) / t;
769
- return Math.acos(R(n, -1, 1));
691
+ return Math.acos(I(n, -1, 1));
770
692
  }
771
693
  distanceTo(e) {
772
694
  return Math.sqrt(this.distanceToSquared(e));
@@ -833,7 +755,7 @@ var ae = class e {
833
755
  *[Symbol.iterator]() {
834
756
  yield this.x, yield this.y, yield this.z;
835
757
  }
836
- }, oe = /* @__PURE__ */ new B(), se = /* @__PURE__ */ new z(), ce = class e {
758
+ }, oe = /*@__PURE__*/ new R(), se = /*@__PURE__*/ new L(), ce = class e {
837
759
  static {
838
760
  e.prototype.isMatrix3 = !0;
839
761
  }
@@ -908,13 +830,13 @@ var ae = class e {
908
830
  return this.set(n * s, n * c, -n * (s * a + c * o) + a + e, -r * c, r * s, -r * (-c * a + s * o) + o + t, 0, 0, 1), this;
909
831
  }
910
832
  scale(e, t) {
911
- return this.premultiply(le.makeScale(e, t)), this;
833
+ return N("Matrix3: .scale() is deprecated. Use .makeScale() instead."), this.premultiply(le.makeScale(e, t)), this;
912
834
  }
913
835
  rotate(e) {
914
- return this.premultiply(le.makeRotation(-e)), this;
836
+ return N("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."), this.premultiply(le.makeRotation(-e)), this;
915
837
  }
916
838
  translate(e, t) {
917
- return this.premultiply(le.makeTranslation(e, t)), this;
839
+ return N("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."), this.premultiply(le.makeTranslation(e, t)), this;
918
840
  }
919
841
  makeTranslation(e, t) {
920
842
  return e.isVector2 ? this.set(1, 0, e.x, 0, 1, e.y, 0, 0, 1) : this.set(1, 0, e, 0, 1, t, 0, 0, 1), this;
@@ -942,14 +864,14 @@ var ae = class e {
942
864
  clone() {
943
865
  return new this.constructor().fromArray(this.elements);
944
866
  }
945
- }, le = /* @__PURE__ */ new ce(), ue = /* @__PURE__ */ new ce().set(.4123908, .3575843, .1804808, .212639, .7151687, .0721923, .0193308, .1191948, .9505322), de = /* @__PURE__ */ new ce().set(3.2409699, -1.5373832, -.4986108, -.9692436, 1.8759675, .0415551, .0556301, -.203977, 1.0569715);
867
+ }, le = /*@__PURE__*/ new ce(), ue = /*@__PURE__*/ new ce().set(.4123908, .3575843, .1804808, .212639, .7151687, .0721923, .0193308, .1191948, .9505322), de = /*@__PURE__*/ new ce().set(3.2409699, -1.5373832, -.4986108, -.9692436, 1.8759675, .0415551, .0556301, -.203977, 1.0569715);
946
868
  function fe() {
947
869
  let e = {
948
870
  enabled: !0,
949
- workingColorSpace: E,
871
+ workingColorSpace: T,
950
872
  spaces: {},
951
873
  convert: function(e, t, n) {
952
- return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r = H(e.r), e.g = H(e.g), e.b = H(e.b)), this.spaces[t].primaries !== this.spaces[n].primaries && (e.applyMatrix3(this.spaces[t].toXYZ), e.applyMatrix3(this.spaces[n].fromXYZ)), this.spaces[n].transfer === "srgb" && (e.r = U(e.r), e.g = U(e.g), e.b = U(e.b)), e);
874
+ return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r = B(e.r), e.g = B(e.g), e.b = B(e.b)), this.spaces[t].primaries !== this.spaces[n].primaries && (e.applyMatrix3(this.spaces[t].toXYZ), e.applyMatrix3(this.spaces[n].fromXYZ)), this.spaces[n].transfer === "srgb" && (e.r = V(e.r), e.g = V(e.g), e.b = V(e.b)), e);
953
875
  },
954
876
  workingToColorSpace: function(e, t) {
955
877
  return this.convert(e, this.workingColorSpace, t);
@@ -961,7 +883,7 @@ function fe() {
961
883
  return this.spaces[e].primaries;
962
884
  },
963
885
  getTransfer: function(e) {
964
- return e === "" ? D : this.spaces[e].transfer;
886
+ return e === "" ? E : this.spaces[e].transfer;
965
887
  },
966
888
  getToneMappingMode: function(e) {
967
889
  return this.spaces[e].outputColorSpaceConfig.toneMappingMode || "standard";
@@ -982,10 +904,10 @@ function fe() {
982
904
  return this.spaces[e].workingColorSpaceConfig.unpackColorSpace;
983
905
  },
984
906
  fromWorkingColorSpace: function(t, n) {
985
- return ee("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(t, n);
907
+ return N("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(t, n);
986
908
  },
987
909
  toWorkingColorSpace: function(t, n) {
988
- return ee("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(t, n);
910
+ return N("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(t, n);
989
911
  }
990
912
  }, t = [
991
913
  .64,
@@ -1000,64 +922,64 @@ function fe() {
1000
922
  .0722
1001
923
  ], r = [.3127, .329];
1002
924
  return e.define({
1003
- [E]: {
925
+ [T]: {
1004
926
  primaries: t,
1005
927
  whitePoint: r,
1006
- transfer: D,
928
+ transfer: E,
1007
929
  toXYZ: ue,
1008
930
  fromXYZ: de,
1009
931
  luminanceCoefficients: n,
1010
- workingColorSpaceConfig: { unpackColorSpace: T },
1011
- outputColorSpaceConfig: { drawingBufferColorSpace: T }
932
+ workingColorSpaceConfig: { unpackColorSpace: w },
933
+ outputColorSpaceConfig: { drawingBufferColorSpace: w }
1012
934
  },
1013
- [T]: {
935
+ [w]: {
1014
936
  primaries: t,
1015
937
  whitePoint: r,
1016
- transfer: O,
938
+ transfer: D,
1017
939
  toXYZ: ue,
1018
940
  fromXYZ: de,
1019
941
  luminanceCoefficients: n,
1020
- outputColorSpaceConfig: { drawingBufferColorSpace: T }
942
+ outputColorSpaceConfig: { drawingBufferColorSpace: w }
1021
943
  }
1022
944
  }), e;
1023
945
  }
1024
- var V = /* @__PURE__ */ fe();
1025
- function H(e) {
946
+ var z = /*@__PURE__*/ fe();
947
+ function B(e) {
1026
948
  return e < .04045 ? e * .0773993808 : (e * .9478672986 + .0521327014) ** 2.4;
1027
949
  }
1028
- function U(e) {
950
+ function V(e) {
1029
951
  return e < .0031308 ? e * 12.92 : 1.055 * e ** .41666 - .055;
1030
952
  }
1031
- var W, pe = class {
953
+ var H, pe = class {
1032
954
  static getDataURL(e, t = "image/png") {
1033
955
  if (/^data:/i.test(e.src) || typeof HTMLCanvasElement > "u") return e.src;
1034
956
  let n;
1035
957
  if (e instanceof HTMLCanvasElement) n = e;
1036
958
  else {
1037
- W === void 0 && (W = j("canvas")), W.width = e.width, W.height = e.height;
1038
- let t = W.getContext("2d");
1039
- e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n = W;
959
+ H === void 0 && (H = A("canvas")), H.width = e.width, H.height = e.height;
960
+ let t = H.getContext("2d");
961
+ e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n = H;
1040
962
  }
1041
963
  return n.toDataURL(t);
1042
964
  }
1043
965
  static sRGBToLinear(e) {
1044
966
  if (typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap) {
1045
- let t = j("canvas");
967
+ let t = A("canvas");
1046
968
  t.width = e.width, t.height = e.height;
1047
969
  let n = t.getContext("2d");
1048
970
  n.drawImage(e, 0, 0, e.width, e.height);
1049
971
  let r = n.getImageData(0, 0, e.width, e.height), i = r.data;
1050
- for (let e = 0; e < i.length; e++) i[e] = H(i[e] / 255) * 255;
972
+ for (let e = 0; e < i.length; e++) i[e] = B(i[e] / 255) * 255;
1051
973
  return n.putImageData(r, 0, 0), t;
1052
974
  } else if (e.data) {
1053
975
  let t = e.data.slice(0);
1054
- for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(H(t[e] / 255) * 255) : t[e] = H(t[e]);
976
+ for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(B(t[e] / 255) * 255) : t[e] = B(t[e]);
1055
977
  return {
1056
978
  data: t,
1057
979
  width: e.width,
1058
980
  height: e.height
1059
981
  };
1060
- } else return F("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."), e;
982
+ } else return j("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."), e;
1061
983
  }
1062
984
  }, me = 0, he = class {
1063
985
  constructor(e = null) {
@@ -1094,11 +1016,11 @@ function ge(e) {
1094
1016
  width: e.width,
1095
1017
  height: e.height,
1096
1018
  type: e.data.constructor.name
1097
- } : (F("Texture: Unable to serialize Texture."), {});
1019
+ } : (j("Texture: Unable to serialize Texture."), {});
1098
1020
  }
1099
- var _e = 0, ve = /* @__PURE__ */ new B(), ye = class e extends te {
1100
- constructor(t = e.DEFAULT_IMAGE, n = e.DEFAULT_MAPPING, r = u, i = u, a = p, o = m, s = g, c = h, l = e.DEFAULT_ANISOTROPY, d = "") {
1101
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: _e++ }), this.uuid = ne(), this.name = "", this.source = new he(t), this.mipmaps = [], this.mapping = n, this.channel = 0, this.wrapS = r, this.wrapT = i, this.magFilter = a, this.minFilter = o, this.anisotropy = l, this.format = s, this.internalFormat = null, this.type = c, this.offset = new ae(0, 0), this.repeat = new ae(1, 1), this.center = new ae(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ce(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = d, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0, this.normalized = !1;
1021
+ var _e = 0, ve = /*@__PURE__*/ new R(), ye = class e extends P {
1022
+ constructor(t = e.DEFAULT_IMAGE, n = e.DEFAULT_MAPPING, r = l, i = l, a = f, o = p, s = h, c = m, u = e.DEFAULT_ANISOTROPY, d = "") {
1023
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: _e++ }), this.uuid = ne(), this.name = "", this.source = new he(t), this.mipmaps = [], this.mapping = n, this.channel = 0, this.wrapS = r, this.wrapT = i, this.magFilter = a, this.minFilter = o, this.anisotropy = u, this.format = s, this.internalFormat = null, this.type = c, this.offset = new ae(0, 0), this.repeat = new ae(1, 1), this.center = new ae(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ce(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = d, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0, this.normalized = !1;
1102
1024
  }
1103
1025
  get width() {
1104
1026
  return this.source.getSize(ve).x;
@@ -1137,12 +1059,12 @@ var _e = 0, ve = /* @__PURE__ */ new B(), ye = class e extends te {
1137
1059
  for (let t in e) {
1138
1060
  let n = e[t];
1139
1061
  if (n === void 0) {
1140
- F(`Texture.setValues(): parameter '${t}' has value of undefined.`);
1062
+ j(`Texture.setValues(): parameter '${t}' has value of undefined.`);
1141
1063
  continue;
1142
1064
  }
1143
1065
  let r = this[t];
1144
1066
  if (r === void 0) {
1145
- F(`Texture.setValues(): property '${t}' does not exist.`);
1067
+ j(`Texture.setValues(): property '${t}' does not exist.`);
1146
1068
  continue;
1147
1069
  }
1148
1070
  r && n && r.isVector2 && n.isVector2 || r && n && r.isVector3 && n.isVector3 || r && n && r.isMatrix3 && n.isMatrix3 ? r.copy(n) : this[t] = n;
@@ -1188,24 +1110,24 @@ var _e = 0, ve = /* @__PURE__ */ new B(), ye = class e extends te {
1188
1110
  transformUv(e) {
1189
1111
  if (this.mapping !== 300) return e;
1190
1112
  if (e.applyMatrix3(this.matrix), e.x < 0 || e.x > 1) switch (this.wrapS) {
1191
- case l:
1113
+ case c:
1192
1114
  e.x -= Math.floor(e.x);
1193
1115
  break;
1194
- case u:
1116
+ case l:
1195
1117
  e.x = e.x < 0 ? 0 : 1;
1196
1118
  break;
1197
- case d:
1119
+ case u:
1198
1120
  Math.abs(Math.floor(e.x) % 2) === 1 ? e.x = Math.ceil(e.x) - e.x : e.x -= Math.floor(e.x);
1199
1121
  break;
1200
1122
  }
1201
1123
  if (e.y < 0 || e.y > 1) switch (this.wrapT) {
1202
- case l:
1124
+ case c:
1203
1125
  e.y -= Math.floor(e.y);
1204
1126
  break;
1205
- case u:
1127
+ case l:
1206
1128
  e.y = e.y < 0 ? 0 : 1;
1207
1129
  break;
1208
- case d:
1130
+ case u:
1209
1131
  Math.abs(Math.floor(e.y) % 2) === 1 ? e.y = Math.ceil(e.y) - e.y : e.y -= Math.floor(e.y);
1210
1132
  break;
1211
1133
  }
@@ -1269,7 +1191,7 @@ ye.DEFAULT_IMAGE = null, ye.DEFAULT_MAPPING = 300, ye.DEFAULT_ANISOTROPY = 1, cl
1269
1191
  case 3:
1270
1192
  this.w = t;
1271
1193
  break;
1272
- default: throw Error("index is out of range: " + e);
1194
+ default: throw Error("THREE.Vector4: index is out of range: " + e);
1273
1195
  }
1274
1196
  return this;
1275
1197
  }
@@ -1279,7 +1201,7 @@ ye.DEFAULT_IMAGE = null, ye.DEFAULT_MAPPING = 300, ye.DEFAULT_ANISOTROPY = 1, cl
1279
1201
  case 1: return this.y;
1280
1202
  case 2: return this.z;
1281
1203
  case 3: return this.w;
1282
- default: throw Error("index is out of range: " + e);
1204
+ default: throw Error("THREE.Vector4: index is out of range: " + e);
1283
1205
  }
1284
1206
  }
1285
1207
  clone() {
@@ -1352,14 +1274,14 @@ ye.DEFAULT_IMAGE = null, ye.DEFAULT_MAPPING = 300, ye.DEFAULT_ANISOTROPY = 1, cl
1352
1274
  return this.x = Math.max(this.x, e.x), this.y = Math.max(this.y, e.y), this.z = Math.max(this.z, e.z), this.w = Math.max(this.w, e.w), this;
1353
1275
  }
1354
1276
  clamp(e, t) {
1355
- return this.x = R(this.x, e.x, t.x), this.y = R(this.y, e.y, t.y), this.z = R(this.z, e.z, t.z), this.w = R(this.w, e.w, t.w), this;
1277
+ return this.x = I(this.x, e.x, t.x), this.y = I(this.y, e.y, t.y), this.z = I(this.z, e.z, t.z), this.w = I(this.w, e.w, t.w), this;
1356
1278
  }
1357
1279
  clampScalar(e, t) {
1358
- return this.x = R(this.x, e, t), this.y = R(this.y, e, t), this.z = R(this.z, e, t), this.w = R(this.w, e, t), this;
1280
+ return this.x = I(this.x, e, t), this.y = I(this.y, e, t), this.z = I(this.z, e, t), this.w = I(this.w, e, t), this;
1359
1281
  }
1360
1282
  clampLength(e, t) {
1361
1283
  let n = this.length();
1362
- return this.divideScalar(n || 1).multiplyScalar(R(n, e, t));
1284
+ return this.divideScalar(n || 1).multiplyScalar(I(n, e, t));
1363
1285
  }
1364
1286
  floor() {
1365
1287
  return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this.w = Math.floor(this.w), this;
@@ -1419,7 +1341,7 @@ ye.DEFAULT_IMAGE = null, ye.DEFAULT_MAPPING = 300, ye.DEFAULT_ANISOTROPY = 1, cl
1419
1341
  yield this.x, yield this.y, yield this.z, yield this.w;
1420
1342
  }
1421
1343
  };
1422
- var be = class e {
1344
+ var U = class e {
1423
1345
  static {
1424
1346
  e.prototype.isMatrix4 = !0;
1425
1347
  }
@@ -1466,14 +1388,14 @@ var be = class e {
1466
1388
  return this.set(t[0], t[3], t[6], 0, t[1], t[4], t[7], 0, t[2], t[5], t[8], 0, 0, 0, 0, 1), this;
1467
1389
  }
1468
1390
  extractBasis(e, t, n) {
1469
- return this.determinant() === 0 ? (e.set(1, 0, 0), t.set(0, 1, 0), n.set(0, 0, 1), this) : (e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), n.setFromMatrixColumn(this, 2), this);
1391
+ return this.determinantAffine() === 0 ? (e.set(1, 0, 0), t.set(0, 1, 0), n.set(0, 0, 1), this) : (e.setFromMatrixColumn(this, 0), t.setFromMatrixColumn(this, 1), n.setFromMatrixColumn(this, 2), this);
1470
1392
  }
1471
1393
  makeBasis(e, t, n) {
1472
1394
  return this.set(e.x, t.x, n.x, 0, e.y, t.y, n.y, 0, e.z, t.z, n.z, 0, 0, 0, 0, 1), this;
1473
1395
  }
1474
1396
  extractRotation(e) {
1475
- if (e.determinant() === 0) return this.identity();
1476
- let t = this.elements, n = e.elements, r = 1 / xe.setFromMatrixColumn(e, 0).length(), i = 1 / xe.setFromMatrixColumn(e, 1).length(), a = 1 / xe.setFromMatrixColumn(e, 2).length();
1397
+ if (e.determinantAffine() === 0) return this.identity();
1398
+ let t = this.elements, n = e.elements, r = 1 / W.setFromMatrixColumn(e, 0).length(), i = 1 / W.setFromMatrixColumn(e, 1).length(), a = 1 / W.setFromMatrixColumn(e, 2).length();
1477
1399
  return t[0] = n[0] * r, t[1] = n[1] * r, t[2] = n[2] * r, t[3] = 0, t[4] = n[4] * i, t[5] = n[5] * i, t[6] = n[6] * i, t[7] = 0, t[8] = n[8] * a, t[9] = n[9] * a, t[10] = n[10] * a, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
1478
1400
  }
1479
1401
  makeRotationFromEuler(e) {
@@ -1500,11 +1422,11 @@ var be = class e {
1500
1422
  return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
1501
1423
  }
1502
1424
  makeRotationFromQuaternion(e) {
1503
- return this.compose(Se, e, Ce);
1425
+ return this.compose(be, e, xe);
1504
1426
  }
1505
1427
  lookAt(e, t, n) {
1506
1428
  let r = this.elements;
1507
- return q.subVectors(e, t), q.lengthSq() === 0 && (q.z = 1), q.normalize(), K.crossVectors(n, q), K.lengthSq() === 0 && (Math.abs(n.z) === 1 ? q.x += 1e-4 : q.z += 1e-4, q.normalize(), K.crossVectors(n, q)), K.normalize(), we.crossVectors(q, K), r[0] = K.x, r[4] = we.x, r[8] = q.x, r[1] = K.y, r[5] = we.y, r[9] = q.y, r[2] = K.z, r[6] = we.z, r[10] = q.z, this;
1429
+ return q.subVectors(e, t), q.lengthSq() === 0 && (q.z = 1), q.normalize(), K.crossVectors(n, q), K.lengthSq() === 0 && (Math.abs(n.z) === 1 ? q.x += 1e-4 : q.z += 1e-4, q.normalize(), K.crossVectors(n, q)), K.normalize(), Se.crossVectors(q, K), r[0] = K.x, r[4] = Se.x, r[8] = q.x, r[1] = K.y, r[5] = Se.y, r[9] = q.y, r[2] = K.z, r[6] = Se.z, r[10] = q.z, this;
1508
1430
  }
1509
1431
  multiply(e) {
1510
1432
  return this.multiplyMatrices(this, e);
@@ -1513,8 +1435,8 @@ var be = class e {
1513
1435
  return this.multiplyMatrices(e, this);
1514
1436
  }
1515
1437
  multiplyMatrices(e, t) {
1516
- let n = e.elements, r = t.elements, i = this.elements, a = n[0], o = n[4], s = n[8], c = n[12], l = n[1], u = n[5], d = n[9], f = n[13], p = n[2], m = n[6], h = n[10], g = n[14], _ = n[3], v = n[7], y = n[11], b = n[15], x = r[0], S = r[4], C = r[8], w = r[12], T = r[1], E = r[5], D = r[9], O = r[13], k = r[2], A = r[6], j = r[10], M = r[14], N = r[3], P = r[7], F = r[11], I = r[15];
1517
- return i[0] = a * x + o * T + s * k + c * N, i[4] = a * S + o * E + s * A + c * P, i[8] = a * C + o * D + s * j + c * F, i[12] = a * w + o * O + s * M + c * I, i[1] = l * x + u * T + d * k + f * N, i[5] = l * S + u * E + d * A + f * P, i[9] = l * C + u * D + d * j + f * F, i[13] = l * w + u * O + d * M + f * I, i[2] = p * x + m * T + h * k + g * N, i[6] = p * S + m * E + h * A + g * P, i[10] = p * C + m * D + h * j + g * F, i[14] = p * w + m * O + h * M + g * I, i[3] = _ * x + v * T + y * k + b * N, i[7] = _ * S + v * E + y * A + b * P, i[11] = _ * C + v * D + y * j + b * F, i[15] = _ * w + v * O + y * M + b * I, this;
1438
+ let n = e.elements, r = t.elements, i = this.elements, a = n[0], o = n[4], s = n[8], c = n[12], l = n[1], u = n[5], d = n[9], f = n[13], p = n[2], m = n[6], h = n[10], g = n[14], _ = n[3], v = n[7], y = n[11], b = n[15], x = r[0], S = r[4], C = r[8], w = r[12], T = r[1], E = r[5], D = r[9], O = r[13], k = r[2], A = r[6], ee = r[10], te = r[14], j = r[3], M = r[7], N = r[11], P = r[15];
1439
+ return i[0] = a * x + o * T + s * k + c * j, i[4] = a * S + o * E + s * A + c * M, i[8] = a * C + o * D + s * ee + c * N, i[12] = a * w + o * O + s * te + c * P, i[1] = l * x + u * T + d * k + f * j, i[5] = l * S + u * E + d * A + f * M, i[9] = l * C + u * D + d * ee + f * N, i[13] = l * w + u * O + d * te + f * P, i[2] = p * x + m * T + h * k + g * j, i[6] = p * S + m * E + h * A + g * M, i[10] = p * C + m * D + h * ee + g * N, i[14] = p * w + m * O + h * te + g * P, i[3] = _ * x + v * T + y * k + b * j, i[7] = _ * S + v * E + y * A + b * M, i[11] = _ * C + v * D + y * ee + b * N, i[15] = _ * w + v * O + y * te + b * P, this;
1518
1440
  }
1519
1441
  multiplyScalar(e) {
1520
1442
  let t = this.elements;
@@ -1524,6 +1446,10 @@ var be = class e {
1524
1446
  let e = this.elements, t = e[0], n = e[4], r = e[8], i = e[12], a = e[1], o = e[5], s = e[9], c = e[13], l = e[2], u = e[6], d = e[10], f = e[14], p = e[3], m = e[7], h = e[11], g = e[15], _ = s * f - c * d, v = o * f - c * u, y = o * d - s * u, b = a * f - c * l, x = a * d - s * l, S = a * u - o * l;
1525
1447
  return t * (m * _ - h * v + g * y) - n * (p * _ - h * b + g * x) + r * (p * v - m * b + g * S) - i * (p * y - m * x + h * S);
1526
1448
  }
1449
+ determinantAffine() {
1450
+ let e = this.elements, t = e[0], n = e[4], r = e[8], i = e[1], a = e[5], o = e[9], s = e[2], c = e[6], l = e[10];
1451
+ return t * (a * l - o * c) - n * (i * l - o * s) + r * (i * c - a * s);
1452
+ }
1527
1453
  transpose() {
1528
1454
  let e = this.elements, t;
1529
1455
  return t = e[1], e[1] = e[4], e[4] = t, t = e[2], e[2] = e[8], e[8] = t, t = e[6], e[6] = e[9], e[9] = t, t = e[3], e[3] = e[12], e[12] = t, t = e[7], e[7] = e[13], e[13] = t, t = e[11], e[11] = e[14], e[14] = t, this;
@@ -1578,14 +1504,14 @@ var be = class e {
1578
1504
  decompose(e, t, n) {
1579
1505
  let r = this.elements;
1580
1506
  e.x = r[12], e.y = r[13], e.z = r[14];
1581
- let i = this.determinant();
1507
+ let i = this.determinantAffine();
1582
1508
  if (i === 0) return n.set(1, 1, 1), t.identity(), this;
1583
- let a = xe.set(r[0], r[1], r[2]).length(), o = xe.set(r[4], r[5], r[6]).length(), s = xe.set(r[8], r[9], r[10]).length();
1509
+ let a = W.set(r[0], r[1], r[2]).length(), o = W.set(r[4], r[5], r[6]).length(), s = W.set(r[8], r[9], r[10]).length();
1584
1510
  i < 0 && (a = -a), G.copy(this);
1585
1511
  let c = 1 / a, l = 1 / o, u = 1 / s;
1586
1512
  return G.elements[0] *= c, G.elements[1] *= c, G.elements[2] *= c, G.elements[4] *= l, G.elements[5] *= l, G.elements[6] *= l, G.elements[8] *= u, G.elements[9] *= u, G.elements[10] *= u, t.setFromRotationMatrix(G), n.x = a, n.y = o, n.z = s, this;
1587
1513
  }
1588
- makePerspective(e, t, n, r, i, a, o = k, s = !1) {
1514
+ makePerspective(e, t, n, r, i, a, o = O, s = !1) {
1589
1515
  let c = this.elements, l = 2 * i / (t - e), u = 2 * i / (n - r), d = (t + e) / (t - e), f = (n + r) / (n - r), p, m;
1590
1516
  if (s) p = i / (a - i), m = a * i / (a - i);
1591
1517
  else if (o === 2e3) p = -(a + i) / (a - i), m = -2 * a * i / (a - i);
@@ -1593,7 +1519,7 @@ var be = class e {
1593
1519
  else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
1594
1520
  return c[0] = l, c[4] = 0, c[8] = d, c[12] = 0, c[1] = 0, c[5] = u, c[9] = f, c[13] = 0, c[2] = 0, c[6] = 0, c[10] = p, c[14] = m, c[3] = 0, c[7] = 0, c[11] = -1, c[15] = 0, this;
1595
1521
  }
1596
- makeOrthographic(e, t, n, r, i, a, o = k, s = !1) {
1522
+ makeOrthographic(e, t, n, r, i, a, o = O, s = !1) {
1597
1523
  let c = this.elements, l = 2 / (t - e), u = 2 / (n - r), d = -(t + e) / (t - e), f = -(n + r) / (n - r), p, m;
1598
1524
  if (s) p = 1 / (a - i), m = a / (a - i);
1599
1525
  else if (o === 2e3) p = -2 / (a - i), m = -(a + i) / (a - i);
@@ -1614,7 +1540,7 @@ var be = class e {
1614
1540
  let n = this.elements;
1615
1541
  return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e[t + 9] = n[9], e[t + 10] = n[10], e[t + 11] = n[11], e[t + 12] = n[12], e[t + 13] = n[13], e[t + 14] = n[14], e[t + 15] = n[15], e;
1616
1542
  }
1617
- }, xe = /* @__PURE__ */ new B(), G = /* @__PURE__ */ new be(), Se = /* @__PURE__ */ new B(0, 0, 0), Ce = /* @__PURE__ */ new B(1, 1, 1), K = /* @__PURE__ */ new B(), we = /* @__PURE__ */ new B(), q = /* @__PURE__ */ new B(), Te = /* @__PURE__ */ new be(), Ee = /* @__PURE__ */ new z(), De = class e {
1543
+ }, W = /*@__PURE__*/ new R(), G = /*@__PURE__*/ new U(), be = /*@__PURE__*/ new R(0, 0, 0), xe = /*@__PURE__*/ new R(1, 1, 1), K = /*@__PURE__*/ new R(), Se = /*@__PURE__*/ new R(), q = /*@__PURE__*/ new R(), Ce = /*@__PURE__*/ new U(), we = /*@__PURE__*/ new L(), Te = class e {
1618
1544
  constructor(t = 0, n = 0, r = 0, i = e.DEFAULT_ORDER) {
1619
1545
  this.isEuler = !0, this._x = t, this._y = n, this._z = r, this._order = i;
1620
1546
  }
@@ -1655,35 +1581,35 @@ var be = class e {
1655
1581
  let r = e.elements, i = r[0], a = r[4], o = r[8], s = r[1], c = r[5], l = r[9], u = r[2], d = r[6], f = r[10];
1656
1582
  switch (t) {
1657
1583
  case "XYZ":
1658
- this._y = Math.asin(R(o, -1, 1)), Math.abs(o) < .9999999 ? (this._x = Math.atan2(-l, f), this._z = Math.atan2(-a, i)) : (this._x = Math.atan2(d, c), this._z = 0);
1584
+ this._y = Math.asin(I(o, -1, 1)), Math.abs(o) < .9999999 ? (this._x = Math.atan2(-l, f), this._z = Math.atan2(-a, i)) : (this._x = Math.atan2(d, c), this._z = 0);
1659
1585
  break;
1660
1586
  case "YXZ":
1661
- this._x = Math.asin(-R(l, -1, 1)), Math.abs(l) < .9999999 ? (this._y = Math.atan2(o, f), this._z = Math.atan2(s, c)) : (this._y = Math.atan2(-u, i), this._z = 0);
1587
+ this._x = Math.asin(-I(l, -1, 1)), Math.abs(l) < .9999999 ? (this._y = Math.atan2(o, f), this._z = Math.atan2(s, c)) : (this._y = Math.atan2(-u, i), this._z = 0);
1662
1588
  break;
1663
1589
  case "ZXY":
1664
- this._x = Math.asin(R(d, -1, 1)), Math.abs(d) < .9999999 ? (this._y = Math.atan2(-u, f), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(s, i));
1590
+ this._x = Math.asin(I(d, -1, 1)), Math.abs(d) < .9999999 ? (this._y = Math.atan2(-u, f), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(s, i));
1665
1591
  break;
1666
1592
  case "ZYX":
1667
- this._y = Math.asin(-R(u, -1, 1)), Math.abs(u) < .9999999 ? (this._x = Math.atan2(d, f), this._z = Math.atan2(s, i)) : (this._x = 0, this._z = Math.atan2(-a, c));
1593
+ this._y = Math.asin(-I(u, -1, 1)), Math.abs(u) < .9999999 ? (this._x = Math.atan2(d, f), this._z = Math.atan2(s, i)) : (this._x = 0, this._z = Math.atan2(-a, c));
1668
1594
  break;
1669
1595
  case "YZX":
1670
- this._z = Math.asin(R(s, -1, 1)), Math.abs(s) < .9999999 ? (this._x = Math.atan2(-l, c), this._y = Math.atan2(-u, i)) : (this._x = 0, this._y = Math.atan2(o, f));
1596
+ this._z = Math.asin(I(s, -1, 1)), Math.abs(s) < .9999999 ? (this._x = Math.atan2(-l, c), this._y = Math.atan2(-u, i)) : (this._x = 0, this._y = Math.atan2(o, f));
1671
1597
  break;
1672
1598
  case "XZY":
1673
- this._z = Math.asin(-R(a, -1, 1)), Math.abs(a) < .9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(o, i)) : (this._x = Math.atan2(-l, f), this._y = 0);
1599
+ this._z = Math.asin(-I(a, -1, 1)), Math.abs(a) < .9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(o, i)) : (this._x = Math.atan2(-l, f), this._y = 0);
1674
1600
  break;
1675
- default: F("Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
1601
+ default: j("Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
1676
1602
  }
1677
1603
  return this._order = t, n === !0 && this._onChangeCallback(), this;
1678
1604
  }
1679
1605
  setFromQuaternion(e, t, n) {
1680
- return Te.makeRotationFromQuaternion(e), this.setFromRotationMatrix(Te, t, n);
1606
+ return Ce.makeRotationFromQuaternion(e), this.setFromRotationMatrix(Ce, t, n);
1681
1607
  }
1682
1608
  setFromVector3(e, t = this._order) {
1683
1609
  return this.set(e.x, e.y, e.z, t);
1684
1610
  }
1685
1611
  reorder(e) {
1686
- return Ee.setFromEuler(this), this.setFromQuaternion(Ee, e);
1612
+ return we.setFromEuler(this), this.setFromQuaternion(we, e);
1687
1613
  }
1688
1614
  equals(e) {
1689
1615
  return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order;
@@ -1702,8 +1628,8 @@ var be = class e {
1702
1628
  yield this._x, yield this._y, yield this._z, yield this._order;
1703
1629
  }
1704
1630
  };
1705
- De.DEFAULT_ORDER = "XYZ";
1706
- var Oe = class {
1631
+ Te.DEFAULT_ORDER = "XYZ";
1632
+ var Ee = class {
1707
1633
  constructor() {
1708
1634
  this.mask = 1;
1709
1635
  }
@@ -1731,16 +1657,16 @@ var Oe = class {
1731
1657
  isEnabled(e) {
1732
1658
  return (this.mask & (1 << e | 0)) != 0;
1733
1659
  }
1734
- }, ke = 0, Ae = /* @__PURE__ */ new B(), je = /* @__PURE__ */ new z(), J = /* @__PURE__ */ new be(), Me = /* @__PURE__ */ new B(), Ne = /* @__PURE__ */ new B(), Pe = /* @__PURE__ */ new B(), Fe = /* @__PURE__ */ new z(), Ie = /* @__PURE__ */ new B(1, 0, 0), Le = /* @__PURE__ */ new B(0, 1, 0), Re = /* @__PURE__ */ new B(0, 0, 1), ze = { type: "added" }, Be = { type: "removed" }, Ve = {
1660
+ }, De = 0, Oe = /*@__PURE__*/ new R(), ke = /*@__PURE__*/ new L(), J = /*@__PURE__*/ new U(), Ae = /*@__PURE__*/ new R(), je = /*@__PURE__*/ new R(), Me = /*@__PURE__*/ new R(), Ne = /*@__PURE__*/ new L(), Pe = /*@__PURE__*/ new R(1, 0, 0), Fe = /*@__PURE__*/ new R(0, 1, 0), Ie = /*@__PURE__*/ new R(0, 0, 1), Le = { type: "added" }, Re = { type: "removed" }, ze = {
1735
1661
  type: "childadded",
1736
1662
  child: null
1737
- }, He = {
1663
+ }, Be = {
1738
1664
  type: "childremoved",
1739
1665
  child: null
1740
- }, Ue = class e extends te {
1666
+ }, Ve = class e extends P {
1741
1667
  constructor() {
1742
- super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: ke++ }), this.uuid = ne(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
1743
- let t = new B(), n = new De(), r = new z(), i = new B(1, 1, 1);
1668
+ super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: De++ }), this.uuid = ne(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
1669
+ let t = new R(), n = new Te(), r = new L(), i = new R(1, 1, 1);
1744
1670
  function a() {
1745
1671
  r.setFromEuler(n, !1);
1746
1672
  }
@@ -1768,9 +1694,9 @@ var Oe = class {
1768
1694
  enumerable: !0,
1769
1695
  value: i
1770
1696
  },
1771
- modelViewMatrix: { value: new be() },
1697
+ modelViewMatrix: { value: new U() },
1772
1698
  normalMatrix: { value: new ce() }
1773
- }), this.matrix = new be(), this.matrixWorld = new be(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new Oe(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
1699
+ }), this.matrix = new U(), this.matrixWorld = new U(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new Ee(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
1774
1700
  }
1775
1701
  onBeforeShadow() {}
1776
1702
  onAfterShadow() {}
@@ -1795,31 +1721,31 @@ var Oe = class {
1795
1721
  this.quaternion.copy(e);
1796
1722
  }
1797
1723
  rotateOnAxis(e, t) {
1798
- return je.setFromAxisAngle(e, t), this.quaternion.multiply(je), this;
1724
+ return ke.setFromAxisAngle(e, t), this.quaternion.multiply(ke), this;
1799
1725
  }
1800
1726
  rotateOnWorldAxis(e, t) {
1801
- return je.setFromAxisAngle(e, t), this.quaternion.premultiply(je), this;
1727
+ return ke.setFromAxisAngle(e, t), this.quaternion.premultiply(ke), this;
1802
1728
  }
1803
1729
  rotateX(e) {
1804
- return this.rotateOnAxis(Ie, e);
1730
+ return this.rotateOnAxis(Pe, e);
1805
1731
  }
1806
1732
  rotateY(e) {
1807
- return this.rotateOnAxis(Le, e);
1733
+ return this.rotateOnAxis(Fe, e);
1808
1734
  }
1809
1735
  rotateZ(e) {
1810
- return this.rotateOnAxis(Re, e);
1736
+ return this.rotateOnAxis(Ie, e);
1811
1737
  }
1812
1738
  translateOnAxis(e, t) {
1813
- return Ae.copy(e).applyQuaternion(this.quaternion), this.position.add(Ae.multiplyScalar(t)), this;
1739
+ return Oe.copy(e).applyQuaternion(this.quaternion), this.position.add(Oe.multiplyScalar(t)), this;
1814
1740
  }
1815
1741
  translateX(e) {
1816
- return this.translateOnAxis(Ie, e);
1742
+ return this.translateOnAxis(Pe, e);
1817
1743
  }
1818
1744
  translateY(e) {
1819
- return this.translateOnAxis(Le, e);
1745
+ return this.translateOnAxis(Fe, e);
1820
1746
  }
1821
1747
  translateZ(e) {
1822
- return this.translateOnAxis(Re, e);
1748
+ return this.translateOnAxis(Ie, e);
1823
1749
  }
1824
1750
  localToWorld(e) {
1825
1751
  return this.updateWorldMatrix(!0, !1), e.applyMatrix4(this.matrixWorld);
@@ -1828,16 +1754,16 @@ var Oe = class {
1828
1754
  return this.updateWorldMatrix(!0, !1), e.applyMatrix4(J.copy(this.matrixWorld).invert());
1829
1755
  }
1830
1756
  lookAt(e, t, n) {
1831
- e.isVector3 ? Me.copy(e) : Me.set(e, t, n);
1757
+ e.isVector3 ? Ae.copy(e) : Ae.set(e, t, n);
1832
1758
  let r = this.parent;
1833
- this.updateWorldMatrix(!0, !1), Ne.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? J.lookAt(Ne, Me, this.up) : J.lookAt(Me, Ne, this.up), this.quaternion.setFromRotationMatrix(J), r && (J.extractRotation(r.matrixWorld), je.setFromRotationMatrix(J), this.quaternion.premultiply(je.invert()));
1759
+ this.updateWorldMatrix(!0, !1), je.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? J.lookAt(je, Ae, this.up) : J.lookAt(Ae, je, this.up), this.quaternion.setFromRotationMatrix(J), r && (J.extractRotation(r.matrixWorld), ke.setFromRotationMatrix(J), this.quaternion.premultiply(ke.invert()));
1834
1760
  }
1835
1761
  add(e) {
1836
1762
  if (arguments.length > 1) {
1837
1763
  for (let e = 0; e < arguments.length; e++) this.add(arguments[e]);
1838
1764
  return this;
1839
1765
  }
1840
- return e === this ? (I("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(ze), Ve.child = e, this.dispatchEvent(Ve), Ve.child = null) : I("Object3D.add: object not an instance of THREE.Object3D.", e), this);
1766
+ return e === this ? (M("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Le), ze.child = e, this.dispatchEvent(ze), ze.child = null) : M("Object3D.add: object not an instance of THREE.Object3D.", e), this);
1841
1767
  }
1842
1768
  remove(e) {
1843
1769
  if (arguments.length > 1) {
@@ -1845,7 +1771,7 @@ var Oe = class {
1845
1771
  return this;
1846
1772
  }
1847
1773
  let t = this.children.indexOf(e);
1848
- return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(Be), He.child = e, this.dispatchEvent(He), He.child = null), this;
1774
+ return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(Re), Be.child = e, this.dispatchEvent(Be), Be.child = null), this;
1849
1775
  }
1850
1776
  removeFromParent() {
1851
1777
  let e = this.parent;
@@ -1855,7 +1781,7 @@ var Oe = class {
1855
1781
  return this.remove(...this.children);
1856
1782
  }
1857
1783
  attach(e) {
1858
- return this.updateWorldMatrix(!0, !1), J.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), J.multiply(e.parent.matrixWorld)), e.applyMatrix4(J), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(ze), Ve.child = e, this.dispatchEvent(Ve), Ve.child = null, this;
1784
+ return this.updateWorldMatrix(!0, !1), J.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), J.multiply(e.parent.matrixWorld)), e.applyMatrix4(J), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Le), ze.child = e, this.dispatchEvent(ze), ze.child = null, this;
1859
1785
  }
1860
1786
  getObjectById(e) {
1861
1787
  return this.getObjectByProperty("id", e);
@@ -1880,10 +1806,10 @@ var Oe = class {
1880
1806
  return this.updateWorldMatrix(!0, !1), e.setFromMatrixPosition(this.matrixWorld);
1881
1807
  }
1882
1808
  getWorldQuaternion(e) {
1883
- return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Ne, e, Pe), e;
1809
+ return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(je, e, Me), e;
1884
1810
  }
1885
1811
  getWorldScale(e) {
1886
- return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Ne, Fe, e), e;
1812
+ return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(je, Ne, e), e;
1887
1813
  }
1888
1814
  getWorldDirection(e) {
1889
1815
  this.updateWorldMatrix(!0, !1);
@@ -1920,11 +1846,11 @@ var Oe = class {
1920
1846
  let t = this.children;
1921
1847
  for (let n = 0, r = t.length; n < r; n++) t[n].updateMatrixWorld(e);
1922
1848
  }
1923
- updateWorldMatrix(e, t) {
1924
- let n = this.parent;
1925
- if (e === !0 && n !== null && n.updateWorldMatrix(!0, !1), this.matrixAutoUpdate && this.updateMatrix(), this.matrixWorldAutoUpdate === !0 && (this.parent === null ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix)), t === !0) {
1849
+ updateWorldMatrix(e, t, n = !1) {
1850
+ let r = this.parent;
1851
+ if (e === !0 && r !== null && r.updateWorldMatrix(!0, !1), this.matrixAutoUpdate && this.updateMatrix(), (this.matrixWorldNeedsUpdate || n) && (this.matrixWorldAutoUpdate === !0 && (this.parent === null ? this.matrixWorld.copy(this.matrix) : this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix)), this.matrixWorldNeedsUpdate = !1, n = !0), t === !0) {
1926
1852
  let e = this.children;
1927
- for (let t = 0, n = e.length; t < n; t++) e[t].updateWorldMatrix(!1, !0);
1853
+ for (let t = 0, r = e.length; t < r; t++) e[t].updateWorldMatrix(!1, !0, n);
1928
1854
  }
1929
1855
  }
1930
1856
  toJSON(e) {
@@ -2006,8 +1932,8 @@ var Oe = class {
2006
1932
  return this;
2007
1933
  }
2008
1934
  };
2009
- Ue.DEFAULT_UP = /* @__PURE__ */ new B(0, 1, 0), Ue.DEFAULT_MATRIX_AUTO_UPDATE = !0, Ue.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
2010
- var We = {
1935
+ Ve.DEFAULT_UP = /*@__PURE__*/ new R(0, 1, 0), Ve.DEFAULT_MATRIX_AUTO_UPDATE = !0, Ve.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
1936
+ var He = {
2011
1937
  aliceblue: 15792383,
2012
1938
  antiquewhite: 16444375,
2013
1939
  aqua: 65535,
@@ -2160,15 +2086,15 @@ var We = {
2160
2086
  h: 0,
2161
2087
  s: 0,
2162
2088
  l: 0
2163
- }, Ge = {
2089
+ }, Ue = {
2164
2090
  h: 0,
2165
2091
  s: 0,
2166
2092
  l: 0
2167
2093
  };
2168
- function Ke(e, t, n) {
2094
+ function We(e, t, n) {
2169
2095
  return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * 6 * (2 / 3 - n) : e;
2170
2096
  }
2171
- var qe = class {
2097
+ var Ge = class {
2172
2098
  constructor(e, t, n) {
2173
2099
  return this.isColor = !0, this.r = 1, this.g = 1, this.b = 1, this.set(e, t, n);
2174
2100
  }
@@ -2182,23 +2108,23 @@ var qe = class {
2182
2108
  setScalar(e) {
2183
2109
  return this.r = e, this.g = e, this.b = e, this;
2184
2110
  }
2185
- setHex(e, t = T) {
2186
- return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, V.colorSpaceToWorking(this, t), this;
2111
+ setHex(e, t = w) {
2112
+ return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, z.colorSpaceToWorking(this, t), this;
2187
2113
  }
2188
- setRGB(e, t, n, r = V.workingColorSpace) {
2189
- return this.r = e, this.g = t, this.b = n, V.colorSpaceToWorking(this, r), this;
2114
+ setRGB(e, t, n, r = z.workingColorSpace) {
2115
+ return this.r = e, this.g = t, this.b = n, z.colorSpaceToWorking(this, r), this;
2190
2116
  }
2191
- setHSL(e, t, n, r = V.workingColorSpace) {
2192
- if (e = re(e, 1), t = R(t, 0, 1), n = R(n, 0, 1), t === 0) this.r = this.g = this.b = n;
2117
+ setHSL(e, t, n, r = z.workingColorSpace) {
2118
+ if (e = re(e, 1), t = I(t, 0, 1), n = I(n, 0, 1), t === 0) this.r = this.g = this.b = n;
2193
2119
  else {
2194
2120
  let r = n <= .5 ? n * (1 + t) : n + t - n * t, i = 2 * n - r;
2195
- this.r = Ke(i, r, e + 1 / 3), this.g = Ke(i, r, e), this.b = Ke(i, r, e - 1 / 3);
2121
+ this.r = We(i, r, e + 1 / 3), this.g = We(i, r, e), this.b = We(i, r, e - 1 / 3);
2196
2122
  }
2197
- return V.colorSpaceToWorking(this, r), this;
2123
+ return z.colorSpaceToWorking(this, r), this;
2198
2124
  }
2199
- setStyle(e, t = T) {
2125
+ setStyle(e, t = w) {
2200
2126
  function n(t) {
2201
- t !== void 0 && parseFloat(t) < 1 && F("Color: Alpha component of " + e + " will be ignored.");
2127
+ t !== void 0 && parseFloat(t) < 1 && j("Color: Alpha component of " + e + " will be ignored.");
2202
2128
  }
2203
2129
  let r;
2204
2130
  if (r = /^(\w+)\(([^\)]*)\)/.exec(e)) {
@@ -2213,19 +2139,19 @@ var qe = class {
2213
2139
  case "hsla":
2214
2140
  if (i = /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)) return n(i[4]), this.setHSL(parseFloat(i[1]) / 360, parseFloat(i[2]) / 100, parseFloat(i[3]) / 100, t);
2215
2141
  break;
2216
- default: F("Color: Unknown color model " + e);
2142
+ default: j("Color: Unknown color model " + e);
2217
2143
  }
2218
2144
  } else if (r = /^\#([A-Fa-f\d]+)$/.exec(e)) {
2219
2145
  let n = r[1], i = n.length;
2220
2146
  if (i === 3) return this.setRGB(parseInt(n.charAt(0), 16) / 15, parseInt(n.charAt(1), 16) / 15, parseInt(n.charAt(2), 16) / 15, t);
2221
2147
  if (i === 6) return this.setHex(parseInt(n, 16), t);
2222
- F("Color: Invalid hex color " + e);
2148
+ j("Color: Invalid hex color " + e);
2223
2149
  } else if (e && e.length > 0) return this.setColorName(e, t);
2224
2150
  return this;
2225
2151
  }
2226
- setColorName(e, t = T) {
2227
- let n = We[e.toLowerCase()];
2228
- return n === void 0 ? F("Color: Unknown color " + e) : this.setHex(n, t), this;
2152
+ setColorName(e, t = w) {
2153
+ let n = He[e.toLowerCase()];
2154
+ return n === void 0 ? j("Color: Unknown color " + e) : this.setHex(n, t), this;
2229
2155
  }
2230
2156
  clone() {
2231
2157
  return new this.constructor(this.r, this.g, this.b);
@@ -2234,10 +2160,10 @@ var qe = class {
2234
2160
  return this.r = e.r, this.g = e.g, this.b = e.b, this;
2235
2161
  }
2236
2162
  copySRGBToLinear(e) {
2237
- return this.r = H(e.r), this.g = H(e.g), this.b = H(e.b), this;
2163
+ return this.r = B(e.r), this.g = B(e.g), this.b = B(e.b), this;
2238
2164
  }
2239
2165
  copyLinearToSRGB(e) {
2240
- return this.r = U(e.r), this.g = U(e.g), this.b = U(e.b), this;
2166
+ return this.r = V(e.r), this.g = V(e.g), this.b = V(e.b), this;
2241
2167
  }
2242
2168
  convertSRGBToLinear() {
2243
2169
  return this.copySRGBToLinear(this), this;
@@ -2245,14 +2171,14 @@ var qe = class {
2245
2171
  convertLinearToSRGB() {
2246
2172
  return this.copyLinearToSRGB(this), this;
2247
2173
  }
2248
- getHex(e = T) {
2249
- return V.workingToColorSpace(X.copy(this), e), Math.round(R(X.r * 255, 0, 255)) * 65536 + Math.round(R(X.g * 255, 0, 255)) * 256 + Math.round(R(X.b * 255, 0, 255));
2174
+ getHex(e = w) {
2175
+ return z.workingToColorSpace(X.copy(this), e), Math.round(I(X.r * 255, 0, 255)) * 65536 + Math.round(I(X.g * 255, 0, 255)) * 256 + Math.round(I(X.b * 255, 0, 255));
2250
2176
  }
2251
- getHexString(e = T) {
2177
+ getHexString(e = w) {
2252
2178
  return ("000000" + this.getHex(e).toString(16)).slice(-6);
2253
2179
  }
2254
- getHSL(e, t = V.workingColorSpace) {
2255
- V.workingToColorSpace(X.copy(this), t);
2180
+ getHSL(e, t = z.workingColorSpace) {
2181
+ z.workingToColorSpace(X.copy(this), t);
2256
2182
  let n = X.r, r = X.g, i = X.b, a = Math.max(n, r, i), o = Math.min(n, r, i), s, c, l = (o + a) / 2;
2257
2183
  if (o === a) s = 0, c = 0;
2258
2184
  else {
@@ -2272,11 +2198,11 @@ var qe = class {
2272
2198
  }
2273
2199
  return e.h = s, e.s = c, e.l = l, e;
2274
2200
  }
2275
- getRGB(e, t = V.workingColorSpace) {
2276
- return V.workingToColorSpace(X.copy(this), t), e.r = X.r, e.g = X.g, e.b = X.b, e;
2201
+ getRGB(e, t = z.workingColorSpace) {
2202
+ return z.workingToColorSpace(X.copy(this), t), e.r = X.r, e.g = X.g, e.b = X.b, e;
2277
2203
  }
2278
- getStyle(e = T) {
2279
- V.workingToColorSpace(X.copy(this), e);
2204
+ getStyle(e = w) {
2205
+ z.workingToColorSpace(X.copy(this), e);
2280
2206
  let t = X.r, n = X.g, r = X.b;
2281
2207
  return e === "srgb" ? `rgb(${Math.round(t * 255)},${Math.round(n * 255)},${Math.round(r * 255)})` : `color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`;
2282
2208
  }
@@ -2308,8 +2234,8 @@ var qe = class {
2308
2234
  return this.r = e.r + (t.r - e.r) * n, this.g = e.g + (t.g - e.g) * n, this.b = e.b + (t.b - e.b) * n, this;
2309
2235
  }
2310
2236
  lerpHSL(e, t) {
2311
- this.getHSL(Y), e.getHSL(Ge);
2312
- let n = ie(Y.h, Ge.h, t), r = ie(Y.s, Ge.s, t), i = ie(Y.l, Ge.l, t);
2237
+ this.getHSL(Y), e.getHSL(Ue);
2238
+ let n = ie(Y.h, Ue.h, t), r = ie(Y.s, Ue.s, t), i = ie(Y.l, Ue.l, t);
2313
2239
  return this.setHSL(n, r, i), this;
2314
2240
  }
2315
2241
  setFromVector3(e) {
@@ -2337,21 +2263,21 @@ var qe = class {
2337
2263
  *[Symbol.iterator]() {
2338
2264
  yield this.r, yield this.g, yield this.b;
2339
2265
  }
2340
- }, X = /* @__PURE__ */ new qe();
2341
- qe.NAMES = We;
2342
- var Je = class extends ye {
2343
- constructor(e = null, t = 1, n = 1, r, i, a, o, s, c = f, l = f, u, d) {
2344
- super(null, a, o, s, c, l, r, i, u, d), this.isDataTexture = !0, this.image = {
2266
+ }, X = /*@__PURE__*/ new Ge();
2267
+ Ge.NAMES = He;
2268
+ var Ke = class extends ye {
2269
+ constructor(e = null, t = 1, n = 1, r, i, a, o, s, c = d, l = d, u, f) {
2270
+ super(null, a, o, s, c, l, r, i, u, f), this.isDataTexture = !0, this.image = {
2345
2271
  data: e,
2346
2272
  width: t,
2347
2273
  height: n
2348
2274
  }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
2349
2275
  }
2350
2276
  };
2351
- function Ye(e, t) {
2277
+ function qe(e, t) {
2352
2278
  return !e || e.constructor === t ? e : typeof t.BYTES_PER_ELEMENT == "number" ? new t(e) : Array.prototype.slice.call(e);
2353
2279
  }
2354
- var Xe = class {
2280
+ var Je = class {
2355
2281
  constructor(e, t, n, r) {
2356
2282
  this.parameterPositions = e, this._cachedIndex = 0, this.resultBuffer = r === void 0 ? new t.constructor(n) : r, this.sampleValues = t, this.valueSize = n, this.settings = null, this.DefaultSettings_ = {};
2357
2283
  }
@@ -2406,32 +2332,32 @@ var Xe = class {
2406
2332
  return t;
2407
2333
  }
2408
2334
  interpolate_() {
2409
- throw Error("call to abstract method");
2335
+ throw Error("THREE.Interpolant: Call to abstract method.");
2410
2336
  }
2411
2337
  intervalChanged_() {}
2412
- }, Ze = class extends Xe {
2338
+ }, Ye = class extends Je {
2413
2339
  constructor(e, t, n, r) {
2414
2340
  super(e, t, n, r), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0, this.DefaultSettings_ = {
2415
- endingStart: S,
2416
- endingEnd: S
2341
+ endingStart: x,
2342
+ endingEnd: x
2417
2343
  };
2418
2344
  }
2419
2345
  intervalChanged_(e, t, n) {
2420
2346
  let r = this.parameterPositions, i = e - 2, a = e + 1, o = r[i], s = r[a];
2421
2347
  if (o === void 0) switch (this.getSettings_().endingStart) {
2422
- case C:
2348
+ case S:
2423
2349
  i = e, o = 2 * t - n;
2424
2350
  break;
2425
- case w:
2351
+ case C:
2426
2352
  i = r.length - 2, o = t + r[i] - r[i + 1];
2427
2353
  break;
2428
2354
  default: i = e, o = n;
2429
2355
  }
2430
2356
  if (s === void 0) switch (this.getSettings_().endingEnd) {
2431
- case C:
2357
+ case S:
2432
2358
  a = e, s = 2 * n - t;
2433
2359
  break;
2434
- case w:
2360
+ case C:
2435
2361
  a = 1, s = n + r[1] - r[0];
2436
2362
  break;
2437
2363
  default: a = e - 1, s = t;
@@ -2444,7 +2370,7 @@ var Xe = class {
2444
2370
  for (let e = 0; e !== o; ++e) i[e] = g * a[l + e] + _ * a[c + e] + v * a[s + e] + y * a[u + e];
2445
2371
  return i;
2446
2372
  }
2447
- }, Qe = class extends Xe {
2373
+ }, Xe = class extends Je {
2448
2374
  constructor(e, t, n, r) {
2449
2375
  super(e, t, n, r);
2450
2376
  }
@@ -2453,24 +2379,24 @@ var Xe = class {
2453
2379
  for (let e = 0; e !== o; ++e) i[e] = a[c + e] * u + a[s + e] * l;
2454
2380
  return i;
2455
2381
  }
2456
- }, $e = class extends Xe {
2382
+ }, Ze = class extends Je {
2457
2383
  constructor(e, t, n, r) {
2458
2384
  super(e, t, n, r);
2459
2385
  }
2460
2386
  interpolate_(e) {
2461
2387
  return this.copySampleValue_(e - 1);
2462
2388
  }
2463
- }, et = class extends Xe {
2389
+ }, Qe = class extends Je {
2464
2390
  interpolate_(e, t, n, r) {
2465
- let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = e * o, c = s - o, l = this.settings || this.DefaultSettings_, u = l.inTangents, d = l.outTangents;
2466
- if (!u || !d) {
2391
+ let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = e * o, c = s - o, l = this.inTangents, u = this.outTangents;
2392
+ if (!l || !u) {
2467
2393
  let e = (n - t) / (r - t), l = 1 - e;
2468
2394
  for (let t = 0; t !== o; ++t) i[t] = a[c + t] * l + a[s + t] * e;
2469
2395
  return i;
2470
2396
  }
2471
- let f = o * 2, p = e - 1;
2472
- for (let l = 0; l !== o; ++l) {
2473
- let o = a[c + l], m = a[s + l], h = p * f + l * 2, g = d[h], _ = d[h + 1], v = e * f + l * 2, y = u[v], b = u[v + 1], x = (n - t) / (r - t), S, C, w, T, E;
2397
+ let d = o * 2, f = e - 1;
2398
+ for (let p = 0; p !== o; ++p) {
2399
+ let o = a[c + p], m = a[s + p], h = f * d + p * 2, g = u[h], _ = u[h + 1], v = e * d + p * 2, y = l[v], b = l[v + 1], x = (n - t) / (r - t), S, C, w, T, E;
2474
2400
  for (let e = 0; e < 8; e++) {
2475
2401
  S = x * x, C = S * x, w = 1 - x, T = w * w, E = T * w;
2476
2402
  let e = E * t + 3 * T * x * g + 3 * w * S * y + C * r - n;
@@ -2479,7 +2405,7 @@ var Xe = class {
2479
2405
  if (Math.abs(i) < 1e-10) break;
2480
2406
  x -= e / i, x = Math.max(0, Math.min(1, x));
2481
2407
  }
2482
- i[l] = E * o + 3 * T * x * _ + 3 * w * S * b + C * m;
2408
+ i[p] = E * o + 3 * T * x * _ + 3 * w * S * b + C * m;
2483
2409
  }
2484
2410
  return i;
2485
2411
  }
@@ -2487,7 +2413,7 @@ var Xe = class {
2487
2413
  constructor(e, t, n, r) {
2488
2414
  if (e === void 0) throw Error("THREE.KeyframeTrack: track name is undefined");
2489
2415
  if (t === void 0 || t.length === 0) throw Error("THREE.KeyframeTrack: no keyframes in track named " + e);
2490
- this.name = e, this.times = Ye(t, this.TimeBufferType), this.values = Ye(n, this.ValueBufferType), this.setInterpolation(r || this.DefaultInterpolation);
2416
+ this.name = e, this.times = qe(t, this.TimeBufferType), this.values = qe(n, this.ValueBufferType), this.setInterpolation(r || this.DefaultInterpolation);
2491
2417
  }
2492
2418
  static toJSON(e) {
2493
2419
  let t = e.constructor, n;
@@ -2495,8 +2421,8 @@ var Xe = class {
2495
2421
  else {
2496
2422
  n = {
2497
2423
  name: e.name,
2498
- times: Ye(e.times, Array),
2499
- values: Ye(e.values, Array)
2424
+ times: qe(e.times, Array),
2425
+ values: qe(e.values, Array)
2500
2426
  };
2501
2427
  let t = e.getInterpolation();
2502
2428
  t !== e.DefaultInterpolation && (n.interpolation = t);
@@ -2504,31 +2430,31 @@ var Xe = class {
2504
2430
  return n.type = e.ValueTypeName, n;
2505
2431
  }
2506
2432
  InterpolantFactoryMethodDiscrete(e) {
2507
- return new $e(this.times, this.values, this.getValueSize(), e);
2433
+ return new Ze(this.times, this.values, this.getValueSize(), e);
2508
2434
  }
2509
2435
  InterpolantFactoryMethodLinear(e) {
2510
- return new Qe(this.times, this.values, this.getValueSize(), e);
2436
+ return new Xe(this.times, this.values, this.getValueSize(), e);
2511
2437
  }
2512
2438
  InterpolantFactoryMethodSmooth(e) {
2513
- return new Ze(this.times, this.values, this.getValueSize(), e);
2439
+ return new Ye(this.times, this.values, this.getValueSize(), e);
2514
2440
  }
2515
2441
  InterpolantFactoryMethodBezier(e) {
2516
- let t = new et(this.times, this.values, this.getValueSize(), e);
2517
- return this.settings && (t.settings = this.settings), t;
2442
+ let t = new Qe(this.times, this.values, this.getValueSize(), e);
2443
+ return this.settings && (t.inTangents = this.settings.inTangents, t.outTangents = this.settings.outTangents), t;
2518
2444
  }
2519
2445
  setInterpolation(e) {
2520
2446
  let t;
2521
2447
  switch (e) {
2522
- case v:
2448
+ case _:
2523
2449
  t = this.InterpolantFactoryMethodDiscrete;
2524
2450
  break;
2525
- case y:
2451
+ case v:
2526
2452
  t = this.InterpolantFactoryMethodLinear;
2527
2453
  break;
2528
- case b:
2454
+ case y:
2529
2455
  t = this.InterpolantFactoryMethodSmooth;
2530
2456
  break;
2531
- case x:
2457
+ case b:
2532
2458
  t = this.InterpolantFactoryMethodBezier;
2533
2459
  break;
2534
2460
  }
@@ -2536,16 +2462,16 @@ var Xe = class {
2536
2462
  let t = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name;
2537
2463
  if (this.createInterpolant === void 0) if (e !== this.DefaultInterpolation) this.setInterpolation(this.DefaultInterpolation);
2538
2464
  else throw Error(t);
2539
- return F("KeyframeTrack:", t), this;
2465
+ return j("KeyframeTrack:", t), this;
2540
2466
  }
2541
2467
  return this.createInterpolant = t, this;
2542
2468
  }
2543
2469
  getInterpolation() {
2544
2470
  switch (this.createInterpolant) {
2545
- case this.InterpolantFactoryMethodDiscrete: return v;
2546
- case this.InterpolantFactoryMethodLinear: return y;
2547
- case this.InterpolantFactoryMethodSmooth: return b;
2548
- case this.InterpolantFactoryMethodBezier: return x;
2471
+ case this.InterpolantFactoryMethodDiscrete: return _;
2472
+ case this.InterpolantFactoryMethodLinear: return v;
2473
+ case this.InterpolantFactoryMethodSmooth: return y;
2474
+ case this.InterpolantFactoryMethodBezier: return b;
2549
2475
  }
2550
2476
  }
2551
2477
  getValueSize() {
@@ -2578,33 +2504,33 @@ var Xe = class {
2578
2504
  }
2579
2505
  validate() {
2580
2506
  let e = !0, t = this.getValueSize();
2581
- t - Math.floor(t) !== 0 && (I("KeyframeTrack: Invalid value size in track.", this), e = !1);
2507
+ t - Math.floor(t) !== 0 && (M("KeyframeTrack: Invalid value size in track.", this), e = !1);
2582
2508
  let n = this.times, r = this.values, i = n.length;
2583
- i === 0 && (I("KeyframeTrack: Track is empty.", this), e = !1);
2509
+ i === 0 && (M("KeyframeTrack: Track is empty.", this), e = !1);
2584
2510
  let a = null;
2585
2511
  for (let t = 0; t !== i; t++) {
2586
2512
  let r = n[t];
2587
2513
  if (typeof r == "number" && isNaN(r)) {
2588
- I("KeyframeTrack: Time is not a valid number.", this, t, r), e = !1;
2514
+ M("KeyframeTrack: Time is not a valid number.", this, t, r), e = !1;
2589
2515
  break;
2590
2516
  }
2591
2517
  if (a !== null && a > r) {
2592
- I("KeyframeTrack: Out of order keys.", this, t, r, a), e = !1;
2518
+ M("KeyframeTrack: Out of order keys.", this, t, r, a), e = !1;
2593
2519
  break;
2594
2520
  }
2595
2521
  a = r;
2596
2522
  }
2597
- if (r !== void 0 && A(r)) for (let t = 0, n = r.length; t !== n; ++t) {
2523
+ if (r !== void 0 && k(r)) for (let t = 0, n = r.length; t !== n; ++t) {
2598
2524
  let n = r[t];
2599
2525
  if (isNaN(n)) {
2600
- I("KeyframeTrack: Value is not a valid number.", this, t, n), e = !1;
2526
+ M("KeyframeTrack: Value is not a valid number.", this, t, n), e = !1;
2601
2527
  break;
2602
2528
  }
2603
2529
  }
2604
2530
  return e;
2605
2531
  }
2606
2532
  optimize() {
2607
- let e = this.times.slice(), t = this.values.slice(), n = this.getValueSize(), r = this.getInterpolation() === b, i = e.length - 1, a = 1;
2533
+ let e = this.times.slice(), t = this.values.slice(), n = this.getValueSize(), r = this.getInterpolation() === y, i = e.length - 1, a = 1;
2608
2534
  for (let o = 1; o < i; ++o) {
2609
2535
  let i = !1, s = e[o];
2610
2536
  if (s !== e[o + 1] && (o !== 1 || s !== e[0])) if (r) i = !0;
@@ -2639,56 +2565,56 @@ var Xe = class {
2639
2565
  return r.createInterpolant = this.createInterpolant, r;
2640
2566
  }
2641
2567
  };
2642
- Z.prototype.ValueTypeName = "", Z.prototype.TimeBufferType = Float32Array, Z.prototype.ValueBufferType = Float32Array, Z.prototype.DefaultInterpolation = y;
2643
- var tt = class extends Z {
2568
+ Z.prototype.ValueTypeName = "", Z.prototype.TimeBufferType = Float32Array, Z.prototype.ValueBufferType = Float32Array, Z.prototype.DefaultInterpolation = v;
2569
+ var $e = class extends Z {
2644
2570
  constructor(e, t, n) {
2645
2571
  super(e, t, n);
2646
2572
  }
2647
2573
  };
2648
- tt.prototype.ValueTypeName = "bool", tt.prototype.ValueBufferType = Array, tt.prototype.DefaultInterpolation = v, tt.prototype.InterpolantFactoryMethodLinear = void 0, tt.prototype.InterpolantFactoryMethodSmooth = void 0;
2649
- var nt = class extends Z {
2574
+ $e.prototype.ValueTypeName = "bool", $e.prototype.ValueBufferType = Array, $e.prototype.DefaultInterpolation = _, $e.prototype.InterpolantFactoryMethodLinear = void 0, $e.prototype.InterpolantFactoryMethodSmooth = void 0;
2575
+ var et = class extends Z {
2650
2576
  constructor(e, t, n, r) {
2651
2577
  super(e, t, n, r);
2652
2578
  }
2653
2579
  };
2654
- nt.prototype.ValueTypeName = "color";
2655
- var rt = class extends Z {
2580
+ et.prototype.ValueTypeName = "color";
2581
+ var tt = class extends Z {
2656
2582
  constructor(e, t, n, r) {
2657
2583
  super(e, t, n, r);
2658
2584
  }
2659
2585
  };
2660
- rt.prototype.ValueTypeName = "number";
2661
- var it = class extends Xe {
2586
+ tt.prototype.ValueTypeName = "number";
2587
+ var nt = class extends Je {
2662
2588
  constructor(e, t, n, r) {
2663
2589
  super(e, t, n, r);
2664
2590
  }
2665
2591
  interpolate_(e, t, n, r) {
2666
2592
  let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = (n - t) / (r - t), c = e * o;
2667
- for (let e = c + o; c !== e; c += 4) z.slerpFlat(i, 0, a, c - o, a, c, s);
2593
+ for (let e = c + o; c !== e; c += 4) L.slerpFlat(i, 0, a, c - o, a, c, s);
2668
2594
  return i;
2669
2595
  }
2670
- }, at = class extends Z {
2596
+ }, rt = class extends Z {
2671
2597
  constructor(e, t, n, r) {
2672
2598
  super(e, t, n, r);
2673
2599
  }
2674
2600
  InterpolantFactoryMethodLinear(e) {
2675
- return new it(this.times, this.values, this.getValueSize(), e);
2601
+ return new nt(this.times, this.values, this.getValueSize(), e);
2676
2602
  }
2677
2603
  };
2678
- at.prototype.ValueTypeName = "quaternion", at.prototype.InterpolantFactoryMethodSmooth = void 0;
2679
- var ot = class extends Z {
2604
+ rt.prototype.ValueTypeName = "quaternion", rt.prototype.InterpolantFactoryMethodSmooth = void 0;
2605
+ var it = class extends Z {
2680
2606
  constructor(e, t, n) {
2681
2607
  super(e, t, n);
2682
2608
  }
2683
2609
  };
2684
- ot.prototype.ValueTypeName = "string", ot.prototype.ValueBufferType = Array, ot.prototype.DefaultInterpolation = v, ot.prototype.InterpolantFactoryMethodLinear = void 0, ot.prototype.InterpolantFactoryMethodSmooth = void 0;
2685
- var st = class extends Z {
2610
+ it.prototype.ValueTypeName = "string", it.prototype.ValueBufferType = Array, it.prototype.DefaultInterpolation = _, it.prototype.InterpolantFactoryMethodLinear = void 0, it.prototype.InterpolantFactoryMethodSmooth = void 0;
2611
+ var at = class extends Z {
2686
2612
  constructor(e, t, n, r) {
2687
2613
  super(e, t, n, r);
2688
2614
  }
2689
2615
  };
2690
- st.prototype.ValueTypeName = "vector";
2691
- var ct = /* @__PURE__ */ new class {
2616
+ at.prototype.ValueTypeName = "vector";
2617
+ var ot = /*@__PURE__*/ new class {
2692
2618
  constructor(e, t, n) {
2693
2619
  let r = this, i = !1, a = 0, o = 0, s, c = [];
2694
2620
  this.onStart = void 0, this.onLoad = e, this.onProgress = t, this.onError = n, this._abortController = null, this.itemStart = function(e) {
@@ -2698,7 +2624,7 @@ var ct = /* @__PURE__ */ new class {
2698
2624
  }, this.itemError = function(e) {
2699
2625
  r.onError !== void 0 && r.onError(e);
2700
2626
  }, this.resolveURL = function(e) {
2701
- return s ? s(e) : e;
2627
+ return e = e.normalize("NFC"), s ? s(e) : e;
2702
2628
  }, this.setURLModifier = function(e) {
2703
2629
  return s = e, this;
2704
2630
  }, this.addHandler = function(e, t) {
@@ -2719,9 +2645,9 @@ var ct = /* @__PURE__ */ new class {
2719
2645
  get abortController() {
2720
2646
  return this._abortController ||= new AbortController(), this._abortController;
2721
2647
  }
2722
- }(), lt = class {
2648
+ }(), st = class {
2723
2649
  constructor(e) {
2724
- this.manager = e === void 0 ? ct : e, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
2650
+ this.manager = e === void 0 ? ot : e, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
2725
2651
  }
2726
2652
  load() {}
2727
2653
  loadAsync(e, t) {
@@ -2750,13 +2676,13 @@ var ct = /* @__PURE__ */ new class {
2750
2676
  return this;
2751
2677
  }
2752
2678
  };
2753
- lt.DEFAULT_MATERIAL_NAME = "__DEFAULT";
2754
- var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]", pt = "[^" + ut.replace("\\.", "") + "]", mt = /* @__PURE__ */ "((?:WC+[\\/:])*)".replace("WC", ft), ht = /* @__PURE__ */ "(WCOD+)?".replace("WCOD", pt), gt = /* @__PURE__ */ "(?:\\.(WC+)(?:\\[(.+)\\])?)?".replace("WC", ft), _t = /* @__PURE__ */ "\\.(WC+)(?:\\[(.+)\\])?".replace("WC", ft), vt = RegExp("^" + mt + ht + gt + _t + "$"), yt = [
2679
+ st.DEFAULT_MATERIAL_NAME = "__DEFAULT";
2680
+ var ct = "\\[\\]\\.:\\/", lt = /* @__PURE__ */ RegExp("[\\[\\]\\.:\\/]", "g"), ut = "[^\\[\\]\\.:\\/]", dt = "[^" + ct.replace("\\.", "") + "]", ft = /*@__PURE__*/ "((?:WC+[\\/:])*)".replace("WC", ut), pt = /*@__PURE__*/ "(WCOD+)?".replace("WCOD", dt), mt = /*@__PURE__*/ "(?:\\.(WC+)(?:\\[(.+)\\])?)?".replace("WC", ut), ht = /*@__PURE__*/ "\\.(WC+)(?:\\[(.+)\\])?".replace("WC", ut), gt = RegExp("^" + ft + pt + mt + ht + "$"), _t = [
2755
2681
  "material",
2756
2682
  "materials",
2757
2683
  "bones",
2758
2684
  "map"
2759
- ], bt = class {
2685
+ ], vt = class {
2760
2686
  constructor(e, t, n) {
2761
2687
  let r = n || Q.parseTrackName(t);
2762
2688
  this._targetGroup = e, this._bindings = e.subscribe_(t, r);
@@ -2786,11 +2712,11 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2786
2712
  return t && t.isAnimationObjectGroup ? new e.Composite(t, n, r) : new e(t, n, r);
2787
2713
  }
2788
2714
  static sanitizeNodeName(e) {
2789
- return e.replace(/\s/g, "_").replace(dt, "");
2715
+ return e.replace(/\s/g, "_").replace(lt, "");
2790
2716
  }
2791
2717
  static parseTrackName(e) {
2792
- let t = vt.exec(e);
2793
- if (t === null) throw Error("PropertyBinding: Cannot parse trackName: " + e);
2718
+ let t = gt.exec(e);
2719
+ if (t === null) throw Error("THREE.PropertyBinding: Cannot parse trackName: " + e);
2794
2720
  let n = {
2795
2721
  nodeName: t[2],
2796
2722
  objectName: t[3],
@@ -2800,9 +2726,9 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2800
2726
  }, r = n.nodeName && n.nodeName.lastIndexOf(".");
2801
2727
  if (r !== void 0 && r !== -1) {
2802
2728
  let e = n.nodeName.substring(r + 1);
2803
- yt.indexOf(e) !== -1 && (n.nodeName = n.nodeName.substring(0, r), n.objectName = e);
2729
+ _t.indexOf(e) !== -1 && (n.nodeName = n.nodeName.substring(0, r), n.objectName = e);
2804
2730
  }
2805
- if (n.propertyName === null || n.propertyName.length === 0) throw Error("PropertyBinding: can not parse propertyName from trackName: " + e);
2731
+ if (n.propertyName === null || n.propertyName.length === 0) throw Error("THREE.PropertyBinding: can not parse propertyName from trackName: " + e);
2806
2732
  return n;
2807
2733
  }
2808
2734
  static findNode(e, t) {
@@ -2890,7 +2816,7 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2890
2816
  bind() {
2891
2817
  let t = this.node, n = this.parsedPath, r = n.objectName, i = n.propertyName, a = n.propertyIndex;
2892
2818
  if (t || (t = e.findNode(this.rootNode, n.nodeName), this.node = t), this.getValue = this._getValue_unavailable, this.setValue = this._setValue_unavailable, !t) {
2893
- F("PropertyBinding: No target node found for track: " + this.path + ".");
2819
+ j("PropertyBinding: No target node found for track: " + this.path + ".");
2894
2820
  return;
2895
2821
  }
2896
2822
  if (r) {
@@ -2898,18 +2824,18 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2898
2824
  switch (r) {
2899
2825
  case "materials":
2900
2826
  if (!t.material) {
2901
- I("PropertyBinding: Can not bind to material as node does not have a material.", this);
2827
+ M("PropertyBinding: Can not bind to material as node does not have a material.", this);
2902
2828
  return;
2903
2829
  }
2904
2830
  if (!t.material.materials) {
2905
- I("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", this);
2831
+ M("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.", this);
2906
2832
  return;
2907
2833
  }
2908
2834
  t = t.material.materials;
2909
2835
  break;
2910
2836
  case "bones":
2911
2837
  if (!t.skeleton) {
2912
- I("PropertyBinding: Can not bind to bones as node does not have a skeleton.", this);
2838
+ M("PropertyBinding: Can not bind to bones as node does not have a skeleton.", this);
2913
2839
  return;
2914
2840
  }
2915
2841
  t = t.skeleton.bones;
@@ -2924,25 +2850,25 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2924
2850
  break;
2925
2851
  }
2926
2852
  if (!t.material) {
2927
- I("PropertyBinding: Can not bind to material as node does not have a material.", this);
2853
+ M("PropertyBinding: Can not bind to material as node does not have a material.", this);
2928
2854
  return;
2929
2855
  }
2930
2856
  if (!t.material.map) {
2931
- I("PropertyBinding: Can not bind to material.map as node.material does not have a map.", this);
2857
+ M("PropertyBinding: Can not bind to material.map as node.material does not have a map.", this);
2932
2858
  return;
2933
2859
  }
2934
2860
  t = t.material.map;
2935
2861
  break;
2936
2862
  default:
2937
2863
  if (t[r] === void 0) {
2938
- I("PropertyBinding: Can not bind to objectName of node undefined.", this);
2864
+ M("PropertyBinding: Can not bind to objectName of node undefined.", this);
2939
2865
  return;
2940
2866
  }
2941
2867
  t = t[r];
2942
2868
  }
2943
2869
  if (e !== void 0) {
2944
2870
  if (t[e] === void 0) {
2945
- I("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", this, t);
2871
+ M("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.", this, t);
2946
2872
  return;
2947
2873
  }
2948
2874
  t = t[e];
@@ -2951,7 +2877,7 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2951
2877
  let o = t[i];
2952
2878
  if (o === void 0) {
2953
2879
  let e = n.nodeName;
2954
- I("PropertyBinding: Trying to update property for track: " + e + "." + i + " but it wasn't found.", t);
2880
+ M("PropertyBinding: Trying to update property for track: " + e + "." + i + " but it wasn't found.", t);
2955
2881
  return;
2956
2882
  }
2957
2883
  let s = this.Versioning.None;
@@ -2960,11 +2886,11 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2960
2886
  if (a !== void 0) {
2961
2887
  if (i === "morphTargetInfluences") {
2962
2888
  if (!t.geometry) {
2963
- I("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", this);
2889
+ M("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.", this);
2964
2890
  return;
2965
2891
  }
2966
2892
  if (!t.geometry.morphAttributes) {
2967
- I("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", this);
2893
+ M("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.", this);
2968
2894
  return;
2969
2895
  }
2970
2896
  t.morphTargetDictionary[a] !== void 0 && (a = t.morphTargetDictionary[a]);
@@ -2977,7 +2903,7 @@ var ut = "\\[\\]\\.:\\/", dt = RegExp("[" + ut + "]", "g"), ft = "[^" + ut + "]"
2977
2903
  this.node = null, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound;
2978
2904
  }
2979
2905
  };
2980
- Q.Composite = bt, Q.prototype.BindingType = {
2906
+ Q.Composite = vt, Q.prototype.BindingType = {
2981
2907
  Direct: 0,
2982
2908
  EntireArray: 1,
2983
2909
  ArrayElement: 2,
@@ -3035,10 +2961,10 @@ Q.Composite = bt, Q.prototype.BindingType = {
3035
2961
  let i = this.elements;
3036
2962
  return i[0] = e, i[2] = t, i[1] = n, i[3] = r, this;
3037
2963
  }
3038
- }, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "184" } })), typeof window < "u" && (window.__THREE__ ? F("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = "184");
2964
+ }, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "185" } })), typeof window < "u" && (window.__THREE__ ? j("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = "185");
3039
2965
  //#endregion
3040
2966
  //#region src/FontWorkerClient.ts
3041
- var xt = class {
2967
+ var yt = class {
3042
2968
  _worker;
3043
2969
  _concurrencyManager;
3044
2970
  _nextId = 0;
@@ -3117,7 +3043,7 @@ var xt = class {
3117
3043
  }, n ?? []);
3118
3044
  });
3119
3045
  }
3120
- }, St = class {
3046
+ }, bt = class {
3121
3047
  _map = /* @__PURE__ */ new Map();
3122
3048
  _maxSize;
3123
3049
  constructor(e) {
@@ -3146,24 +3072,24 @@ var xt = class {
3146
3072
  this._map.clear();
3147
3073
  }
3148
3074
  }, $ = (e, t) => `${e}#q=${t}`;
3149
- function Ct(e, t, n, r) {
3150
- return Tt(e, t, n, r === 4 ? g : _, "");
3075
+ function xt(e, t, n, r) {
3076
+ return Ct(e, t, n, r === 4 ? h : g, "");
3151
3077
  }
3152
- function wt(e, t, n) {
3153
- return Tt(e, t, n, g, T);
3078
+ function St(e, t, n) {
3079
+ return Ct(e, t, n, h, w);
3154
3080
  }
3155
- function Tt(e, t, n, r, i) {
3156
- let a = new Je(e, t, n, r, h);
3157
- return a.minFilter = p, a.magFilter = p, a.generateMipmaps = !1, a.colorSpace = i, a.needsUpdate = !0, a;
3081
+ function Ct(e, t, n, r, i) {
3082
+ let a = new Ke(e, t, n, r, m);
3083
+ return a.minFilter = f, a.magFilter = f, a.generateMipmaps = !1, a.colorSpace = i, a.needsUpdate = !0, a;
3158
3084
  }
3159
- var Et = 1e4, Dt = (e) => {
3085
+ var wt = 1e4, Tt = (e) => {
3160
3086
  let t = [];
3161
3087
  for (let n = 0; n + 1 < e.length; n += 2) t.push({
3162
3088
  from: e[n],
3163
3089
  to: e[n + 1]
3164
3090
  });
3165
3091
  return t;
3166
- }, Ot = class {
3092
+ }, Et = class {
3167
3093
  _workerUrl;
3168
3094
  _client;
3169
3095
  _clientPromise;
@@ -3246,7 +3172,7 @@ var Et = 1e4, Dt = (e) => {
3246
3172
  if (!this._concurrencyManager) return Promise.reject(/* @__PURE__ */ Error("FontManager: concurrencyManager not set"));
3247
3173
  let e = this._concurrencyManager;
3248
3174
  return this._clientPromise = (async () => {
3249
- let t = new xt(this._workerUrl, e, { fontBudgetBytes: this._fontBudgetBytes });
3175
+ let t = new yt(this._workerUrl, e, { fontBudgetBytes: this._fontBudgetBytes });
3250
3176
  return await t.ready(), this._client = t, t;
3251
3177
  })(), this._clientPromise.catch(() => {
3252
3178
  this._clientPromise = void 0;
@@ -3266,7 +3192,7 @@ var Et = 1e4, Dt = (e) => {
3266
3192
  }
3267
3193
  if (this._pending.has(r)) return this._refCount.set(r, (this._refCount.get(r) ?? 0) + 1), this._pending.get(r);
3268
3194
  let i = n ? $(n, t) : void 0, a = this._fetchAndLoad(e, r, i, t);
3269
- this._refCount.set(r, 1), this._pending.set(r, a), this._shapeCache.set(r, new St(Et));
3195
+ this._refCount.set(r, 1), this._pending.set(r, a), this._shapeCache.set(r, new bt(wt));
3270
3196
  try {
3271
3197
  await a, this._loaded.add(r), this._atlasKeys.set(r, i ?? r);
3272
3198
  } catch (e) {
@@ -3336,7 +3262,7 @@ var Et = 1e4, Dt = (e) => {
3336
3262
  let e = this._segmentTextByFace(t.faces, n);
3337
3263
  await Promise.all(e.map((e) => this._prepareSingleFontText(e.url, e.text, r)));
3338
3264
  let a = this._stitchSegments(e, r), o = this._shapeCache.get(i);
3339
- o || (o = new St(Et), this._shapeCache.set(i, o)), a._generation = this._currentGen(i), o.set(n, a);
3265
+ o || (o = new bt(wt), this._shapeCache.set(i, o)), a._generation = this._currentGen(i), o.set(n, a);
3340
3266
  })();
3341
3267
  this._preparePending.set(a, o);
3342
3268
  try {
@@ -3385,14 +3311,14 @@ var Et = 1e4, Dt = (e) => {
3385
3311
  return this._atlasCache.get(n);
3386
3312
  }
3387
3313
  getAtlasTexture(e, t) {
3388
- return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._atlasCache, this._atlasDirty, this._textureCache, (e) => Ct(e.data, e.width, e.height, e.channels));
3314
+ return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._atlasCache, this._atlasDirty, this._textureCache, (e) => xt(e.data, e.width, e.height, e.channels));
3389
3315
  }
3390
3316
  getColorAtlas(e, t) {
3391
3317
  let n = this._resolveAtlasKey(e, t);
3392
3318
  return this._colorAtlasCache.get(n);
3393
3319
  }
3394
3320
  getColorAtlasTexture(e, t) {
3395
- return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._colorAtlasCache, this._colorAtlasDirty, this._colorTextureCache, (e) => wt(e.data, e.width, e.height));
3321
+ return this._getOrUpdateTexture(this._resolveAtlasKey(e, t), this._colorAtlasCache, this._colorAtlasDirty, this._colorTextureCache, (e) => St(e.data, e.width, e.height));
3396
3322
  }
3397
3323
  _getOrUpdateTexture(e, t, n, r, i) {
3398
3324
  if (!n.has(e)) {
@@ -3479,7 +3405,7 @@ var Et = 1e4, Dt = (e) => {
3479
3405
  if (!a.ok) throw Error(`FontManager: failed to fetch font from ${e}: ${a.status}`);
3480
3406
  let o = await a.arrayBuffer(), s = await i.loadFont(t, o, n, r);
3481
3407
  if (!s.ok) throw Error(`FontManager: WASM failed to load font from ${e}`);
3482
- s.cmapRanges?.length && !this._cmapRanges.has(e) && (this._cmapRanges.set(e, Dt(s.cmapRanges)), this._applyCmapRanges(e));
3408
+ s.cmapRanges?.length && !this._cmapRanges.has(e) && (this._cmapRanges.set(e, Tt(s.cmapRanges)), this._applyCmapRanges(e));
3483
3409
  }
3484
3410
  async _flushBatch() {
3485
3411
  this._batchScheduled = !1;
@@ -3507,11 +3433,11 @@ var Et = 1e4, Dt = (e) => {
3507
3433
  };
3508
3434
  await Promise.all([...e].map(([e, t]) => n(e, t)));
3509
3435
  }
3510
- }, kt = 64, At = (e) => e ? 8 : 35, jt = {
3436
+ }, Dt = 64, Ot = (e) => e ? 8 : 35, kt = {
3511
3437
  Normal: 0,
3512
3438
  Whitespace: 1,
3513
3439
  Newline: 2,
3514
3440
  Ideographic: 3
3515
3441
  };
3516
3442
  //#endregion
3517
- export { kt as COLOR_GLYPH_PX_SIZE, Ot as FontManager, xt as FontWorkerClient, jt as GlyphCharClass, St as LRUMap, At as atlasRangePx, wt as createColorAtlasTexture, Ct as createSdfAtlasTexture, c as fetchFontFamilyFromCss, e as parseCssUnicodeRange, s as parseFontFamilyFromCss };
3443
+ export { Dt as COLOR_GLYPH_PX_SIZE, Et as FontManager, yt as FontWorkerClient, kt as GlyphCharClass, bt as LRUMap, Ot as atlasRangePx, St as createColorAtlasTexture, xt as createSdfAtlasTexture, s as fetchFontFamilyFromCss, a as parseCssUnicodeRange, o as parseFontFamilyFromCss };