dpot-ui 0.4.8 → 0.4.9

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.es.js CHANGED
@@ -77,7 +77,7 @@ function al(n, e, t) {
77
77
  }
78
78
  return h;
79
79
  }
80
- const Tf = (n, e, t) => zt(void 0, null, function* () {
80
+ const wf = (n, e, t) => zt(void 0, null, function* () {
81
81
  const { placement: i = "bottom", strategy: r = "absolute", middleware: s = [], platform: o } = t, a = s.filter(Boolean), l = yield o.isRTL == null ? void 0 : o.isRTL(e);
82
82
  let c = yield o.getElementRects({ reference: n, floating: e, strategy: r }), { x: u, y: h } = al(c, i, l), f = i, d = {}, g = 0;
83
83
  for (let _ = 0; _ < a.length; _++) {
@@ -105,9 +105,9 @@ function Cs(n, e) {
105
105
  return { top: (m.top - M.top + g.top) / v.y, bottom: (M.bottom - m.bottom + g.bottom) / v.y, left: (m.left - M.left + g.left) / v.x, right: (M.right - m.right + g.right) / v.x };
106
106
  });
107
107
  }
108
- const Yo = Math.min, wf = Math.max;
108
+ const Yo = Math.min, Tf = Math.max;
109
109
  function Ko(n, e, t) {
110
- return wf(n, Yo(e, t));
110
+ return Tf(n, Yo(e, t));
111
111
  }
112
112
  const Af = (n) => ({ name: "arrow", options: n, fn(t) {
113
113
  return zt(this, null, function* () {
@@ -115,9 +115,9 @@ const Af = (n) => ({ name: "arrow", options: n, fn(t) {
115
115
  if (c == null)
116
116
  return {};
117
117
  const h = Xu(u), f = { x: i, y: r }, d = Pr(s), g = Ea(d), _ = yield a.getDimensions(c), m = d === "y", p = m ? "top" : "left", y = m ? "bottom" : "right", v = m ? "clientHeight" : "clientWidth", M = o.reference[g] + o.reference[d] - f[d] - o.floating[g], b = f[d] - o.reference[d], R = yield a.getOffsetParent == null ? void 0 : a.getOffsetParent(c);
118
- let w = R ? R[v] : 0;
119
- w && (yield a.isElement == null ? void 0 : a.isElement(R)) || (w = l.floating[v] || o.floating[g]);
120
- const U = M / 2 - b / 2, x = w / 2 - _[g] / 2 - 1, E = Yo(h[p], x), F = Yo(h[y], x), ee = E, O = w - _[g] - F, N = w / 2 - _[g] / 2 + U, C = Ko(ee, N, O), z = Lr(s) != null && N != C && o.reference[g] / 2 - (N < ee ? E : F) - _[g] / 2 < 0 ? N < ee ? ee - N : O - N : 0;
118
+ let T = R ? R[v] : 0;
119
+ T && (yield a.isElement == null ? void 0 : a.isElement(R)) || (T = l.floating[v] || o.floating[g]);
120
+ const U = M / 2 - b / 2, x = T / 2 - _[g] / 2 - 1, E = Yo(h[p], x), F = Yo(h[y], x), ee = E, O = T - _[g] - F, N = T / 2 - _[g] / 2 + U, C = Ko(ee, N, O), z = Lr(s) != null && N != C && o.reference[g] / 2 - (N < ee ? E : F) - _[g] / 2 < 0 ? N < ee ? ee - N : O - N : 0;
121
121
  return { [d]: f[d] - z, data: { [d]: C, centerOffset: N - C + z } };
122
122
  });
123
123
  } }), $u = ["top", "right", "bottom", "left"];
@@ -161,13 +161,13 @@ const Pf = function(n) {
161
161
  }(si(O), C === "start", z);
162
162
  return H && (V = V.map((K) => K + "-" + H), N && (V = V.concat(V.map(ro)))), V;
163
163
  }(a, _, g, v));
164
- const b = [a, ...M], R = yield Cs(t, m), w = [];
164
+ const b = [a, ...M], R = yield Cs(t, m), T = [];
165
165
  let U = ((i = s.flip) == null ? void 0 : i.overflows) || [];
166
- if (u && w.push(R[p]), h) {
166
+ if (u && T.push(R[p]), h) {
167
167
  const { main: O, cross: N } = Rf(r, o, v);
168
- w.push(R[O], R[N]);
168
+ T.push(R[O], R[N]);
169
169
  }
170
- if (U = [...U, { placement: r, overflows: w }], !w.every((O) => O <= 0)) {
170
+ if (U = [...U, { placement: r, overflows: T }], !T.every((O) => O <= 0)) {
171
171
  var x, E;
172
172
  const O = (((x = s.flip) == null ? void 0 : x.index) || 0) + 1, N = b[O];
173
173
  if (N)
@@ -299,11 +299,11 @@ function ju(n) {
299
299
  const r = ln(n), s = r ? n.offsetWidth : t, o = r ? n.offsetHeight : i, a = Ls(t) !== s || Ls(i) !== o;
300
300
  return a && (t = s, i = o), { width: t, height: i, $: a };
301
301
  }
302
- function Ta(n) {
302
+ function wa(n) {
303
303
  return Ln(n) ? n : n.contextElement;
304
304
  }
305
305
  function Hi(n) {
306
- const e = Ta(n);
306
+ const e = wa(n);
307
307
  if (!ln(e))
308
308
  return hi(1);
309
309
  const t = e.getBoundingClientRect(), { width: i, height: r, $: s } = ju(e);
@@ -320,7 +320,7 @@ function Yu(n, e, t) {
320
320
  }
321
321
  function fi(n, e, t, i) {
322
322
  e === void 0 && (e = !1), t === void 0 && (t = !1);
323
- const r = n.getBoundingClientRect(), s = Ta(n);
323
+ const r = n.getBoundingClientRect(), s = wa(n);
324
324
  let o = hi(1);
325
325
  e && (i ? Ln(i) && (o = Hi(i)) : o = Hi(n));
326
326
  const a = Yu(s, t, i);
@@ -469,7 +469,7 @@ const Bf = { getClippingRect: function(n) {
469
469
  }, getClientRects: (n) => Array.from(n.getClientRects()), isRTL: (n) => on(n).direction === "rtl" };
470
470
  function zf(n, e, t, i) {
471
471
  i === void 0 && (i = {});
472
- const { ancestorScroll: r = !0, ancestorResize: s = !0, elementResize: o = !0, layoutShift: a = typeof IntersectionObserver == "function", animationFrame: l = !1 } = i, c = Ta(n), u = r || s ? [...c ? Ps(c) : [], ...Ps(e)] : [];
472
+ const { ancestorScroll: r = !0, ancestorResize: s = !0, elementResize: o = !0, layoutShift: a = typeof IntersectionObserver == "function", animationFrame: l = !1 } = i, c = wa(n), u = r || s ? [...c ? Ps(c) : [], ...Ps(e)] : [];
473
473
  u.forEach((_) => {
474
474
  r && _.addEventListener("scroll", t, { passive: !0 }), s && _.addEventListener("resize", t);
475
475
  });
@@ -479,8 +479,8 @@ function zf(n, e, t, i) {
479
479
  function M() {
480
480
  clearTimeout(p), y && y.disconnect(), y = null;
481
481
  }
482
- return function b(R, w) {
483
- R === void 0 && (R = !1), w === void 0 && (w = 1), M();
482
+ return function b(R, T) {
483
+ R === void 0 && (R = !1), T === void 0 && (T = 1), M();
484
484
  const { left: U, top: x, width: E, height: F } = _.getBoundingClientRect();
485
485
  if (R || m(), !E || !F)
486
486
  return;
@@ -488,7 +488,7 @@ function zf(n, e, t, i) {
488
488
  let z = !0;
489
489
  y = new IntersectionObserver((H) => {
490
490
  const V = H[0].intersectionRatio;
491
- if (V !== w) {
491
+ if (V !== T) {
492
492
  if (!z)
493
493
  return b();
494
494
  V ? b(!1, V) : p = setTimeout(() => {
@@ -496,7 +496,7 @@ function zf(n, e, t, i) {
496
496
  }, 100);
497
497
  }
498
498
  z = !1;
499
- }, { rootMargin: -ee + "px " + -O + "px " + -N + "px " + -C + "px", threshold: zi(0, Jo(1, w)) || 1 }), y.observe(_);
499
+ }, { rootMargin: -ee + "px " + -O + "px " + -N + "px " + -C + "px", threshold: zi(0, Jo(1, T)) || 1 }), y.observe(_);
500
500
  }(!0), M;
501
501
  }(c, t) : null;
502
502
  let f, d = null;
@@ -513,7 +513,7 @@ function zf(n, e, t, i) {
513
513
  }
514
514
  const Hf = (n, e, t) => {
515
515
  const i = /* @__PURE__ */ new Map(), r = De({ platform: Bf }, t), s = rt(De({}, r.platform), { _c: i });
516
- return Tf(n, e, rt(De({}, r), { platform: s }));
516
+ return wf(n, e, rt(De({}, r), { platform: s }));
517
517
  };
518
518
  var kf = function() {
519
519
  var n = this, e = n.$createElement, t = n._self._c || e;
@@ -545,7 +545,7 @@ var kf = function() {
545
545
  }
546
546
  }, [n._t("reference")], 2)]);
547
547
  }, Gf = [];
548
- function Tt(n, e, t, i, r, s, o, a) {
548
+ function wt(n, e, t, i, r, s, o, a) {
549
549
  var l = typeof n == "function" ? n.options : n;
550
550
  e && (l.render = e, l.staticRenderFns = t, l._compiled = !0), i && (l.functional = !0), s && (l._scopeId = "data-v-" + s);
551
551
  var c;
@@ -671,7 +671,7 @@ const Vf = {
671
671
  n && (n.removeEventListener("mouseenter", this.handleMouseEnter), n.removeEventListener("mouseleave", this.handleMouseLeave), e.removeEventListener("mouseenter", this.handleMouseEnter), e.removeEventListener("mouseleave", this.handleMouseLeave));
672
672
  }
673
673
  }, ml = {};
674
- var Wf = /* @__PURE__ */ Tt(
674
+ var Wf = /* @__PURE__ */ wt(
675
675
  Vf,
676
676
  kf,
677
677
  Gf,
@@ -685,7 +685,7 @@ function Xf(n) {
685
685
  for (let e in ml)
686
686
  this[e] = ml[e];
687
687
  }
688
- const wa = /* @__PURE__ */ function() {
688
+ const Ta = /* @__PURE__ */ function() {
689
689
  return Wf.exports;
690
690
  }();
691
691
  var $f = function() {
@@ -728,7 +728,7 @@ const jf = {
728
728
  }
729
729
  }
730
730
  }, gl = {};
731
- var Yf = /* @__PURE__ */ Tt(
731
+ var Yf = /* @__PURE__ */ wt(
732
732
  jf,
733
733
  $f,
734
734
  qf,
@@ -784,7 +784,7 @@ const ed = {
784
784
  }
785
785
  }
786
786
  }, _l = {};
787
- var td = /* @__PURE__ */ Tt(
787
+ var td = /* @__PURE__ */ wt(
788
788
  ed,
789
789
  Jf,
790
790
  Qf,
@@ -853,7 +853,7 @@ var rd = function() {
853
853
  const od = {
854
854
  name: "dp-checkfilter",
855
855
  components: {
856
- DpPopover: wa,
856
+ DpPopover: Ta,
857
857
  DpCheck: Zf,
858
858
  DpRadio: id
859
859
  },
@@ -885,7 +885,7 @@ const od = {
885
885
  }
886
886
  }
887
887
  }, vl = {};
888
- var ad = /* @__PURE__ */ Tt(
888
+ var ad = /* @__PURE__ */ wt(
889
889
  od,
890
890
  rd,
891
891
  sd,
@@ -947,7 +947,7 @@ const hd = {
947
947
  }
948
948
  }
949
949
  }, xl = {};
950
- var fd = /* @__PURE__ */ Tt(
950
+ var fd = /* @__PURE__ */ wt(
951
951
  hd,
952
952
  cd,
953
953
  ud,
@@ -1020,7 +1020,7 @@ var md = function() {
1020
1020
  const _d = {
1021
1021
  name: "dp-select",
1022
1022
  components: {
1023
- DpPopover: wa
1023
+ DpPopover: Ta
1024
1024
  },
1025
1025
  props: {
1026
1026
  value: {
@@ -1068,7 +1068,7 @@ const _d = {
1068
1068
  }
1069
1069
  }
1070
1070
  }, yl = {};
1071
- var vd = /* @__PURE__ */ Tt(
1071
+ var vd = /* @__PURE__ */ wt(
1072
1072
  _d,
1073
1073
  md,
1074
1074
  gd,
@@ -1175,21 +1175,21 @@ const Ed = {
1175
1175
  }
1176
1176
  }
1177
1177
  }, Sl = {};
1178
- var bd = /* @__PURE__ */ Tt(
1178
+ var bd = /* @__PURE__ */ wt(
1179
1179
  Ed,
1180
1180
  Sd,
1181
1181
  Md,
1182
1182
  !1,
1183
- Td,
1183
+ wd,
1184
1184
  "cf64bc14",
1185
1185
  null,
1186
1186
  null
1187
1187
  );
1188
- function Td(n) {
1188
+ function wd(n) {
1189
1189
  for (let e in Sl)
1190
1190
  this[e] = Sl[e];
1191
1191
  }
1192
- const wd = /* @__PURE__ */ function() {
1192
+ const Td = /* @__PURE__ */ function() {
1193
1193
  return bd.exports;
1194
1194
  }();
1195
1195
  var Ad = function() {
@@ -1278,7 +1278,7 @@ const Rd = {
1278
1278
  name: "dp-pagin",
1279
1279
  components: {
1280
1280
  DpSelect: yd,
1281
- DpInput: wd
1281
+ DpInput: Td
1282
1282
  },
1283
1283
  props: {
1284
1284
  pageInfo: {
@@ -1327,7 +1327,7 @@ const Rd = {
1327
1327
  }
1328
1328
  }
1329
1329
  }, Ml = {};
1330
- var Ld = /* @__PURE__ */ Tt(
1330
+ var Ld = /* @__PURE__ */ wt(
1331
1331
  Rd,
1332
1332
  Ad,
1333
1333
  Cd,
@@ -1443,7 +1443,7 @@ const Ud = {
1443
1443
  }
1444
1444
  }
1445
1445
  }, El = {};
1446
- var Nd = /* @__PURE__ */ Tt(
1446
+ var Nd = /* @__PURE__ */ wt(
1447
1447
  Ud,
1448
1448
  Dd,
1449
1449
  Id,
@@ -1597,7 +1597,7 @@ const Hd = {
1597
1597
  this.item.children || this.$nextTick(this.handleResize);
1598
1598
  }
1599
1599
  }, bl = {};
1600
- var kd = /* @__PURE__ */ Tt(
1600
+ var kd = /* @__PURE__ */ wt(
1601
1601
  Hd,
1602
1602
  Bd,
1603
1603
  zd,
@@ -1740,8 +1740,8 @@ const $d = {
1740
1740
  this.key++, this.widthInfo = {}, this.$emit("changeBlock", this.isBlock);
1741
1741
  }
1742
1742
  }
1743
- }, Tl = {};
1744
- var qd = /* @__PURE__ */ Tt(
1743
+ }, wl = {};
1744
+ var qd = /* @__PURE__ */ wt(
1745
1745
  $d,
1746
1746
  Wd,
1747
1747
  Xd,
@@ -1752,8 +1752,8 @@ var qd = /* @__PURE__ */ Tt(
1752
1752
  null
1753
1753
  );
1754
1754
  function jd(n) {
1755
- for (let e in Tl)
1756
- this[e] = Tl[e];
1755
+ for (let e in wl)
1756
+ this[e] = wl[e];
1757
1757
  }
1758
1758
  const Yd = /* @__PURE__ */ function() {
1759
1759
  return qd.exports;
@@ -2191,8 +2191,8 @@ const Jd = {
2191
2191
  this.filterInfo = De(De({}, this.filterInfo), n), this.beforeIndex = 0, this.currentIndex = 50, this.$refs.table.scrollTop = 0, this.$emit("changeFilter", Object.values(this.filterInfo).map((e) => ({ key: e.key, value: e.value })));
2192
2192
  }
2193
2193
  }
2194
- }, wl = {};
2195
- var Qd = /* @__PURE__ */ Tt(
2194
+ }, Tl = {};
2195
+ var Qd = /* @__PURE__ */ wt(
2196
2196
  Jd,
2197
2197
  Kd,
2198
2198
  Zd,
@@ -2203,8 +2203,8 @@ var Qd = /* @__PURE__ */ Tt(
2203
2203
  null
2204
2204
  );
2205
2205
  function ep(n) {
2206
- for (let e in wl)
2207
- this[e] = wl[e];
2206
+ for (let e in Tl)
2207
+ this[e] = Tl[e];
2208
2208
  }
2209
2209
  const tp = /* @__PURE__ */ function() {
2210
2210
  return Qd.exports;
@@ -2252,7 +2252,7 @@ const rp = {
2252
2252
  }
2253
2253
  }
2254
2254
  }, Al = {};
2255
- var sp = /* @__PURE__ */ Tt(
2255
+ var sp = /* @__PURE__ */ wt(
2256
2256
  rp,
2257
2257
  np,
2258
2258
  ip,
@@ -2314,7 +2314,7 @@ const fp = {
2314
2314
  }
2315
2315
  }
2316
2316
  }, Cl = {};
2317
- var dp = /* @__PURE__ */ Tt(
2317
+ var dp = /* @__PURE__ */ wt(
2318
2318
  fp,
2319
2319
  up,
2320
2320
  hp,
@@ -2400,7 +2400,7 @@ const vp = {
2400
2400
  }
2401
2401
  }
2402
2402
  }, Rl = {};
2403
- var xp = /* @__PURE__ */ Tt(
2403
+ var xp = /* @__PURE__ */ wt(
2404
2404
  vp,
2405
2405
  gp,
2406
2406
  _p,
@@ -2446,7 +2446,7 @@ const bp = {
2446
2446
  name: "dp-toggleraw",
2447
2447
  components: {
2448
2448
  DpIcon: mp,
2449
- DpPopover: wa,
2449
+ DpPopover: Ta,
2450
2450
  DpCapsule: Sp
2451
2451
  },
2452
2452
  props: {
@@ -2481,22 +2481,22 @@ const bp = {
2481
2481
  }
2482
2482
  }
2483
2483
  }, Ll = {};
2484
- var Tp = /* @__PURE__ */ Tt(
2484
+ var wp = /* @__PURE__ */ wt(
2485
2485
  bp,
2486
2486
  Mp,
2487
2487
  Ep,
2488
2488
  !1,
2489
- wp,
2489
+ Tp,
2490
2490
  "1a73bbf6",
2491
2491
  null,
2492
2492
  null
2493
2493
  );
2494
- function wp(n) {
2494
+ function Tp(n) {
2495
2495
  for (let e in Ll)
2496
2496
  this[e] = Ll[e];
2497
2497
  }
2498
2498
  const Ap = /* @__PURE__ */ function() {
2499
- return Tp.exports;
2499
+ return wp.exports;
2500
2500
  }();
2501
2501
  /**
2502
2502
  * @license
@@ -2538,12 +2538,12 @@ class gi {
2538
2538
  }
2539
2539
  }
2540
2540
  }
2541
- const wt = ["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"];
2541
+ const Tt = ["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"];
2542
2542
  let uc = 1234567;
2543
2543
  const dr = Math.PI / 180, Mr = 180 / Math.PI;
2544
2544
  function mn() {
2545
2545
  const n = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0;
2546
- return (wt[n & 255] + wt[n >> 8 & 255] + wt[n >> 16 & 255] + wt[n >> 24 & 255] + "-" + wt[e & 255] + wt[e >> 8 & 255] + "-" + wt[e >> 16 & 15 | 64] + wt[e >> 24 & 255] + "-" + wt[t & 63 | 128] + wt[t >> 8 & 255] + "-" + wt[t >> 16 & 255] + wt[t >> 24 & 255] + wt[i & 255] + wt[i >> 8 & 255] + wt[i >> 16 & 255] + wt[i >> 24 & 255]).toLowerCase();
2546
+ return (Tt[n & 255] + Tt[n >> 8 & 255] + Tt[n >> 16 & 255] + Tt[n >> 24 & 255] + "-" + Tt[e & 255] + Tt[e >> 8 & 255] + "-" + Tt[e >> 16 & 15 | 64] + Tt[e >> 24 & 255] + "-" + Tt[t & 63 | 128] + Tt[t >> 8 & 255] + "-" + Tt[t >> 16 & 255] + Tt[t >> 24 & 255] + Tt[i & 255] + Tt[i >> 8 & 255] + Tt[i >> 16 & 255] + Tt[i >> 24 & 255]).toLowerCase();
2547
2547
  }
2548
2548
  function vt(n, e, t) {
2549
2549
  return Math.max(e, Math.min(t, n));
@@ -2551,10 +2551,10 @@ function vt(n, e, t) {
2551
2551
  function La(n, e) {
2552
2552
  return (n % e + e) % e;
2553
2553
  }
2554
- function Tm(n, e, t, i, r) {
2554
+ function wm(n, e, t, i, r) {
2555
2555
  return i + (n - e) * (r - i) / (t - e);
2556
2556
  }
2557
- function wm(n, e, t) {
2557
+ function Tm(n, e, t) {
2558
2558
  return n !== e ? (t - n) / (e - n) : 0;
2559
2559
  }
2560
2560
  function pr(n, e, t) {
@@ -2672,8 +2672,8 @@ const ph = {
2672
2672
  generateUUID: mn,
2673
2673
  clamp: vt,
2674
2674
  euclideanModulo: La,
2675
- mapLinear: Tm,
2676
- inverseLerp: wm,
2675
+ mapLinear: wm,
2676
+ inverseLerp: Tm,
2677
2677
  lerp: pr,
2678
2678
  damp: Am,
2679
2679
  pingpong: Cm,
@@ -2946,8 +2946,8 @@ class Be {
2946
2946
  return this.multiplyMatrices(e, this);
2947
2947
  }
2948
2948
  multiplyMatrices(e, t) {
2949
- const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[3], l = i[6], c = i[1], u = i[4], h = i[7], f = i[2], d = i[5], g = i[8], _ = r[0], m = r[3], p = r[6], y = r[1], v = r[4], M = r[7], b = r[2], R = r[5], w = r[8];
2950
- return s[0] = o * _ + a * y + l * b, s[3] = o * m + a * v + l * R, s[6] = o * p + a * M + l * w, s[1] = c * _ + u * y + h * b, s[4] = c * m + u * v + h * R, s[7] = c * p + u * M + h * w, s[2] = f * _ + d * y + g * b, s[5] = f * m + d * v + g * R, s[8] = f * p + d * M + g * w, this;
2949
+ const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[3], l = i[6], c = i[1], u = i[4], h = i[7], f = i[2], d = i[5], g = i[8], _ = r[0], m = r[3], p = r[6], y = r[1], v = r[4], M = r[7], b = r[2], R = r[5], T = r[8];
2950
+ return s[0] = o * _ + a * y + l * b, s[3] = o * m + a * v + l * R, s[6] = o * p + a * M + l * T, s[1] = c * _ + u * y + h * b, s[4] = c * m + u * v + h * R, s[7] = c * p + u * M + h * T, s[2] = f * _ + d * y + g * b, s[5] = f * m + d * v + g * R, s[8] = f * p + d * M + g * T, this;
2951
2951
  }
2952
2952
  multiplyScalar(e) {
2953
2953
  const t = this.elements;
@@ -3453,8 +3453,8 @@ class Ke {
3453
3453
  if (Math.abs(u + f) < 0.1 && Math.abs(h + _) < 0.1 && Math.abs(g + m) < 0.1 && Math.abs(c + d + p - 3) < 0.1)
3454
3454
  return this.set(1, 0, 0, 0), this;
3455
3455
  t = Math.PI;
3456
- const v = (c + 1) / 2, M = (d + 1) / 2, b = (p + 1) / 2, R = (u + f) / 4, w = (h + _) / 4, U = (g + m) / 4;
3457
- return v > M && v > b ? v < 0.01 ? (i = 0, r = 0.707106781, s = 0.707106781) : (i = Math.sqrt(v), r = R / i, s = w / i) : M > b ? M < 0.01 ? (i = 0.707106781, r = 0, s = 0.707106781) : (r = Math.sqrt(M), i = R / r, s = U / r) : b < 0.01 ? (i = 0.707106781, r = 0.707106781, s = 0) : (s = Math.sqrt(b), i = w / s, r = U / s), this.set(i, r, s, t), this;
3456
+ const v = (c + 1) / 2, M = (d + 1) / 2, b = (p + 1) / 2, R = (u + f) / 4, T = (h + _) / 4, U = (g + m) / 4;
3457
+ return v > M && v > b ? v < 0.01 ? (i = 0, r = 0.707106781, s = 0.707106781) : (i = Math.sqrt(v), r = R / i, s = T / i) : M > b ? M < 0.01 ? (i = 0.707106781, r = 0, s = 0.707106781) : (r = Math.sqrt(M), i = R / r, s = U / r) : b < 0.01 ? (i = 0.707106781, r = 0.707106781, s = 0) : (s = Math.sqrt(b), i = T / s, r = U / s), this.set(i, r, s, t), this;
3458
3458
  }
3459
3459
  let y = Math.sqrt((m - g) * (m - g) + (h - _) * (h - _) + (f - u) * (f - u));
3460
3460
  return Math.abs(y) < 1e-3 && (y = 1), this.x = (m - g) / y, this.y = (h - _) / y, this.z = (f - u) / y, this.w = Math.acos((c + d + p - 1) / 2), this;
@@ -4564,8 +4564,8 @@ class it {
4564
4564
  return this.multiplyMatrices(e, this);
4565
4565
  }
4566
4566
  multiplyMatrices(e, t) {
4567
- const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[4], l = i[8], c = i[12], u = i[1], h = i[5], f = i[9], d = i[13], g = i[2], _ = i[6], m = i[10], p = i[14], y = i[3], v = i[7], M = i[11], b = i[15], R = r[0], w = r[4], U = r[8], x = r[12], E = r[1], F = r[5], ee = r[9], O = r[13], N = r[2], C = r[6], z = r[10], H = r[14], V = r[3], K = r[7], Q = r[11], B = r[15];
4568
- return s[0] = o * R + a * E + l * N + c * V, s[4] = o * w + a * F + l * C + c * K, s[8] = o * U + a * ee + l * z + c * Q, s[12] = o * x + a * O + l * H + c * B, s[1] = u * R + h * E + f * N + d * V, s[5] = u * w + h * F + f * C + d * K, s[9] = u * U + h * ee + f * z + d * Q, s[13] = u * x + h * O + f * H + d * B, s[2] = g * R + _ * E + m * N + p * V, s[6] = g * w + _ * F + m * C + p * K, s[10] = g * U + _ * ee + m * z + p * Q, s[14] = g * x + _ * O + m * H + p * B, s[3] = y * R + v * E + M * N + b * V, s[7] = y * w + v * F + M * C + b * K, s[11] = y * U + v * ee + M * z + b * Q, s[15] = y * x + v * O + M * H + b * B, this;
4567
+ const i = e.elements, r = t.elements, s = this.elements, o = i[0], a = i[4], l = i[8], c = i[12], u = i[1], h = i[5], f = i[9], d = i[13], g = i[2], _ = i[6], m = i[10], p = i[14], y = i[3], v = i[7], M = i[11], b = i[15], R = r[0], T = r[4], U = r[8], x = r[12], E = r[1], F = r[5], ee = r[9], O = r[13], N = r[2], C = r[6], z = r[10], H = r[14], V = r[3], K = r[7], Q = r[11], B = r[15];
4568
+ return s[0] = o * R + a * E + l * N + c * V, s[4] = o * T + a * F + l * C + c * K, s[8] = o * U + a * ee + l * z + c * Q, s[12] = o * x + a * O + l * H + c * B, s[1] = u * R + h * E + f * N + d * V, s[5] = u * T + h * F + f * C + d * K, s[9] = u * U + h * ee + f * z + d * Q, s[13] = u * x + h * O + f * H + d * B, s[2] = g * R + _ * E + m * N + p * V, s[6] = g * T + _ * F + m * C + p * K, s[10] = g * U + _ * ee + m * z + p * Q, s[14] = g * x + _ * O + m * H + p * B, s[3] = y * R + v * E + M * N + b * V, s[7] = y * T + v * F + M * C + b * K, s[11] = y * U + v * ee + M * z + b * Q, s[15] = y * x + v * O + M * H + b * B, this;
4569
4569
  }
4570
4570
  multiplyScalar(e) {
4571
4571
  const t = this.elements;
@@ -4588,8 +4588,8 @@ class it {
4588
4588
  const e = this.elements, t = e[0], i = e[1], r = e[2], s = e[3], o = e[4], a = e[5], l = e[6], c = e[7], u = e[8], h = e[9], f = e[10], d = e[11], g = e[12], _ = e[13], m = e[14], p = e[15], y = h * m * c - _ * f * c + _ * l * d - a * m * d - h * l * p + a * f * p, v = g * f * c - u * m * c - g * l * d + o * m * d + u * l * p - o * f * p, M = u * _ * c - g * h * c + g * a * d - o * _ * d - u * a * p + o * h * p, b = g * h * l - u * _ * l - g * a * f + o * _ * f + u * a * m - o * h * m, R = t * y + i * v + r * M + s * b;
4589
4589
  if (R === 0)
4590
4590
  return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
4591
- const w = 1 / R;
4592
- return e[0] = y * w, e[1] = (_ * f * s - h * m * s - _ * r * d + i * m * d + h * r * p - i * f * p) * w, e[2] = (a * m * s - _ * l * s + _ * r * c - i * m * c - a * r * p + i * l * p) * w, e[3] = (h * l * s - a * f * s - h * r * c + i * f * c + a * r * d - i * l * d) * w, e[4] = v * w, e[5] = (u * m * s - g * f * s + g * r * d - t * m * d - u * r * p + t * f * p) * w, e[6] = (g * l * s - o * m * s - g * r * c + t * m * c + o * r * p - t * l * p) * w, e[7] = (o * f * s - u * l * s + u * r * c - t * f * c - o * r * d + t * l * d) * w, e[8] = M * w, e[9] = (g * h * s - u * _ * s - g * i * d + t * _ * d + u * i * p - t * h * p) * w, e[10] = (o * _ * s - g * a * s + g * i * c - t * _ * c - o * i * p + t * a * p) * w, e[11] = (u * a * s - o * h * s - u * i * c + t * h * c + o * i * d - t * a * d) * w, e[12] = b * w, e[13] = (u * _ * r - g * h * r + g * i * f - t * _ * f - u * i * m + t * h * m) * w, e[14] = (g * a * r - o * _ * r - g * i * l + t * _ * l + o * i * m - t * a * m) * w, e[15] = (o * h * r - u * a * r + u * i * l - t * h * l - o * i * f + t * a * f) * w, this;
4591
+ const T = 1 / R;
4592
+ return e[0] = y * T, e[1] = (_ * f * s - h * m * s - _ * r * d + i * m * d + h * r * p - i * f * p) * T, e[2] = (a * m * s - _ * l * s + _ * r * c - i * m * c - a * r * p + i * l * p) * T, e[3] = (h * l * s - a * f * s - h * r * c + i * f * c + a * r * d - i * l * d) * T, e[4] = v * T, e[5] = (u * m * s - g * f * s + g * r * d - t * m * d - u * r * p + t * f * p) * T, e[6] = (g * l * s - o * m * s - g * r * c + t * m * c + o * r * p - t * l * p) * T, e[7] = (o * f * s - u * l * s + u * r * c - t * f * c - o * r * d + t * l * d) * T, e[8] = M * T, e[9] = (g * h * s - u * _ * s - g * i * d + t * _ * d + u * i * p - t * h * p) * T, e[10] = (o * _ * s - g * a * s + g * i * c - t * _ * c - o * i * p + t * a * p) * T, e[11] = (u * a * s - o * h * s - u * i * c + t * h * c + o * i * d - t * a * d) * T, e[12] = b * T, e[13] = (u * _ * r - g * h * r + g * i * f - t * _ * f - u * i * m + t * h * m) * T, e[14] = (g * a * r - o * _ * r - g * i * l + t * _ * l + o * i * m - t * a * m) * T, e[15] = (o * h * r - u * a * r + u * i * l - t * h * l - o * i * f + t * a * f) * T, this;
4593
4593
  }
4594
4594
  scale(e) {
4595
4595
  const t = this.elements, i = e.x, r = e.y, s = e.z;
@@ -4761,8 +4761,8 @@ class it {
4761
4761
  ), this;
4762
4762
  }
4763
4763
  compose(e, t, i) {
4764
- const r = this.elements, s = t._x, o = t._y, a = t._z, l = t._w, c = s + s, u = o + o, h = a + a, f = s * c, d = s * u, g = s * h, _ = o * u, m = o * h, p = a * h, y = l * c, v = l * u, M = l * h, b = i.x, R = i.y, w = i.z;
4765
- return r[0] = (1 - (_ + p)) * b, r[1] = (d + M) * b, r[2] = (g - v) * b, r[3] = 0, r[4] = (d - M) * R, r[5] = (1 - (f + p)) * R, r[6] = (m + y) * R, r[7] = 0, r[8] = (g + v) * w, r[9] = (m - y) * w, r[10] = (1 - (f + _)) * w, r[11] = 0, r[12] = e.x, r[13] = e.y, r[14] = e.z, r[15] = 1, this;
4764
+ const r = this.elements, s = t._x, o = t._y, a = t._z, l = t._w, c = s + s, u = o + o, h = a + a, f = s * c, d = s * u, g = s * h, _ = o * u, m = o * h, p = a * h, y = l * c, v = l * u, M = l * h, b = i.x, R = i.y, T = i.z;
4765
+ return r[0] = (1 - (_ + p)) * b, r[1] = (d + M) * b, r[2] = (g - v) * b, r[3] = 0, r[4] = (d - M) * R, r[5] = (1 - (f + p)) * R, r[6] = (m + y) * R, r[7] = 0, r[8] = (g + v) * T, r[9] = (m - y) * T, r[10] = (1 - (f + _)) * T, r[11] = 0, r[12] = e.x, r[13] = e.y, r[14] = e.z, r[15] = 1, this;
4766
4766
  }
4767
4767
  decompose(e, t, i) {
4768
4768
  const r = this.elements;
@@ -5225,7 +5225,7 @@ class at extends gi {
5225
5225
  at.DEFAULT_UP = /* @__PURE__ */ new D(0, 1, 0);
5226
5226
  at.DEFAULT_MATRIX_AUTO_UPDATE = !0;
5227
5227
  at.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
5228
- const Qt = /* @__PURE__ */ new D(), Tn = /* @__PURE__ */ new D(), Mo = /* @__PURE__ */ new D(), wn = /* @__PURE__ */ new D(), Ti = /* @__PURE__ */ new D(), wi = /* @__PURE__ */ new D(), xc = /* @__PURE__ */ new D(), Eo = /* @__PURE__ */ new D(), bo = /* @__PURE__ */ new D(), To = /* @__PURE__ */ new D();
5228
+ const Qt = /* @__PURE__ */ new D(), wn = /* @__PURE__ */ new D(), Mo = /* @__PURE__ */ new D(), Tn = /* @__PURE__ */ new D(), wi = /* @__PURE__ */ new D(), Ti = /* @__PURE__ */ new D(), xc = /* @__PURE__ */ new D(), Eo = /* @__PURE__ */ new D(), bo = /* @__PURE__ */ new D(), wo = /* @__PURE__ */ new D();
5229
5229
  let qr = !1;
5230
5230
  class tn {
5231
5231
  constructor(e = new D(), t = new D(), i = new D()) {
@@ -5239,24 +5239,24 @@ class tn {
5239
5239
  // static/instance method to calculate barycentric coordinates
5240
5240
  // based on: http://www.blackpawn.com/texts/pointinpoly/default.html
5241
5241
  static getBarycoord(e, t, i, r, s) {
5242
- Qt.subVectors(r, t), Tn.subVectors(i, t), Mo.subVectors(e, t);
5243
- const o = Qt.dot(Qt), a = Qt.dot(Tn), l = Qt.dot(Mo), c = Tn.dot(Tn), u = Tn.dot(Mo), h = o * c - a * a;
5242
+ Qt.subVectors(r, t), wn.subVectors(i, t), Mo.subVectors(e, t);
5243
+ const o = Qt.dot(Qt), a = Qt.dot(wn), l = Qt.dot(Mo), c = wn.dot(wn), u = wn.dot(Mo), h = o * c - a * a;
5244
5244
  if (h === 0)
5245
5245
  return s.set(-2, -1, -1);
5246
5246
  const f = 1 / h, d = (c * l - a * u) * f, g = (o * u - a * l) * f;
5247
5247
  return s.set(1 - d - g, g, d);
5248
5248
  }
5249
5249
  static containsPoint(e, t, i, r) {
5250
- return this.getBarycoord(e, t, i, r, wn), wn.x >= 0 && wn.y >= 0 && wn.x + wn.y <= 1;
5250
+ return this.getBarycoord(e, t, i, r, Tn), Tn.x >= 0 && Tn.y >= 0 && Tn.x + Tn.y <= 1;
5251
5251
  }
5252
5252
  static getUV(e, t, i, r, s, o, a, l) {
5253
5253
  return qr === !1 && (console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."), qr = !0), this.getInterpolation(e, t, i, r, s, o, a, l);
5254
5254
  }
5255
5255
  static getInterpolation(e, t, i, r, s, o, a, l) {
5256
- return this.getBarycoord(e, t, i, r, wn), l.setScalar(0), l.addScaledVector(s, wn.x), l.addScaledVector(o, wn.y), l.addScaledVector(a, wn.z), l;
5256
+ return this.getBarycoord(e, t, i, r, Tn), l.setScalar(0), l.addScaledVector(s, Tn.x), l.addScaledVector(o, Tn.y), l.addScaledVector(a, Tn.z), l;
5257
5257
  }
5258
5258
  static isFrontFacing(e, t, i, r) {
5259
- return Qt.subVectors(i, t), Tn.subVectors(e, t), Qt.cross(Tn).dot(r) < 0;
5259
+ return Qt.subVectors(i, t), wn.subVectors(e, t), Qt.cross(wn).dot(r) < 0;
5260
5260
  }
5261
5261
  set(e, t, i) {
5262
5262
  return this.a.copy(e), this.b.copy(t), this.c.copy(i), this;
@@ -5274,7 +5274,7 @@ class tn {
5274
5274
  return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this;
5275
5275
  }
5276
5276
  getArea() {
5277
- return Qt.subVectors(this.c, this.b), Tn.subVectors(this.a, this.b), Qt.cross(Tn).length() * 0.5;
5277
+ return Qt.subVectors(this.c, this.b), wn.subVectors(this.a, this.b), Qt.cross(wn).length() * 0.5;
5278
5278
  }
5279
5279
  getMidpoint(e) {
5280
5280
  return e.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);
@@ -5306,29 +5306,29 @@ class tn {
5306
5306
  closestPointToPoint(e, t) {
5307
5307
  const i = this.a, r = this.b, s = this.c;
5308
5308
  let o, a;
5309
- Ti.subVectors(r, i), wi.subVectors(s, i), Eo.subVectors(e, i);
5310
- const l = Ti.dot(Eo), c = wi.dot(Eo);
5309
+ wi.subVectors(r, i), Ti.subVectors(s, i), Eo.subVectors(e, i);
5310
+ const l = wi.dot(Eo), c = Ti.dot(Eo);
5311
5311
  if (l <= 0 && c <= 0)
5312
5312
  return t.copy(i);
5313
5313
  bo.subVectors(e, r);
5314
- const u = Ti.dot(bo), h = wi.dot(bo);
5314
+ const u = wi.dot(bo), h = Ti.dot(bo);
5315
5315
  if (u >= 0 && h <= u)
5316
5316
  return t.copy(r);
5317
5317
  const f = l * h - u * c;
5318
5318
  if (f <= 0 && l >= 0 && u <= 0)
5319
- return o = l / (l - u), t.copy(i).addScaledVector(Ti, o);
5320
- To.subVectors(e, s);
5321
- const d = Ti.dot(To), g = wi.dot(To);
5319
+ return o = l / (l - u), t.copy(i).addScaledVector(wi, o);
5320
+ wo.subVectors(e, s);
5321
+ const d = wi.dot(wo), g = Ti.dot(wo);
5322
5322
  if (g >= 0 && d <= g)
5323
5323
  return t.copy(s);
5324
5324
  const _ = d * c - l * g;
5325
5325
  if (_ <= 0 && c >= 0 && g <= 0)
5326
- return a = c / (c - g), t.copy(i).addScaledVector(wi, a);
5326
+ return a = c / (c - g), t.copy(i).addScaledVector(Ti, a);
5327
5327
  const m = u * g - d * h;
5328
5328
  if (m <= 0 && h - u >= 0 && d - g >= 0)
5329
5329
  return xc.subVectors(s, r), a = (h - u) / (h - u + (d - g)), t.copy(r).addScaledVector(xc, a);
5330
5330
  const p = 1 / (m + _ + f);
5331
- return o = _ * p, a = f * p, t.copy(i).addScaledVector(Ti, o).addScaledVector(wi, a);
5331
+ return o = _ * p, a = f * p, t.copy(i).addScaledVector(wi, o).addScaledVector(Ti, a);
5332
5332
  }
5333
5333
  equals(e) {
5334
5334
  return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c);
@@ -5570,7 +5570,7 @@ const xh = {
5570
5570
  yellow: 16776960,
5571
5571
  yellowgreen: 10145074
5572
5572
  }, en = { h: 0, s: 0, l: 0 }, jr = { h: 0, s: 0, l: 0 };
5573
- function wo(n, e, t) {
5573
+ function To(n, e, t) {
5574
5574
  return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (e - n) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? n + (e - n) * 6 * (2 / 3 - t) : n;
5575
5575
  }
5576
5576
  class je {
@@ -5599,7 +5599,7 @@ class je {
5599
5599
  this.r = this.g = this.b = i;
5600
5600
  else {
5601
5601
  const s = i <= 0.5 ? i * (1 + t) : i + t - i * t, o = 2 * i - s;
5602
- this.r = wo(o, s, e + 1 / 3), this.g = wo(o, s, e), this.b = wo(o, s, e - 1 / 3);
5602
+ this.r = To(o, s, e + 1 / 3), this.g = To(o, s, e), this.b = To(o, s, e - 1 / 3);
5603
5603
  }
5604
5604
  return Zt.toWorkingColorSpace(this, r), this;
5605
5605
  }
@@ -6073,11 +6073,11 @@ class _n extends gi {
6073
6073
  i[C + 2]
6074
6074
  );
6075
6075
  }
6076
- const b = new D(), R = new D(), w = new D(), U = new D();
6076
+ const b = new D(), R = new D(), T = new D(), U = new D();
6077
6077
  function x(E) {
6078
- w.fromArray(s, E * 3), U.copy(w);
6078
+ T.fromArray(s, E * 3), U.copy(T);
6079
6079
  const F = c[E];
6080
- b.copy(F), b.sub(w.multiplyScalar(w.dot(F))).normalize(), R.crossVectors(U, F);
6080
+ b.copy(F), b.sub(T.multiplyScalar(T.dot(F))).normalize(), R.crossVectors(U, F);
6081
6081
  const O = R.dot(u[E]) < 0 ? -1 : 1;
6082
6082
  l[E * 4] = b.x, l[E * 4 + 1] = b.y, l[E * 4 + 2] = b.z, l[E * 4 + 3] = O;
6083
6083
  }
@@ -6275,8 +6275,8 @@ class pn extends at {
6275
6275
  for (let g = 0, _ = f.length; g < _; g++) {
6276
6276
  const m = f[g], p = o[m.materialIndex], y = Math.max(m.start, d.start), v = Math.min(a.count, Math.min(m.start + m.count, d.start + d.count));
6277
6277
  for (let M = y, b = v; M < b; M += 3) {
6278
- const R = a.getX(M), w = a.getX(M + 1), U = a.getX(M + 2);
6279
- r = is(this, p, e, i, c, u, h, R, w, U), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6278
+ const R = a.getX(M), T = a.getX(M + 1), U = a.getX(M + 2);
6279
+ r = is(this, p, e, i, c, u, h, R, T, U), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6280
6280
  }
6281
6281
  }
6282
6282
  else {
@@ -6291,8 +6291,8 @@ class pn extends at {
6291
6291
  for (let g = 0, _ = f.length; g < _; g++) {
6292
6292
  const m = f[g], p = o[m.materialIndex], y = Math.max(m.start, d.start), v = Math.min(l.count, Math.min(m.start + m.count, d.start + d.count));
6293
6293
  for (let M = y, b = v; M < b; M += 3) {
6294
- const R = M, w = M + 1, U = M + 2;
6295
- r = is(this, p, e, i, c, u, h, R, w, U), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6294
+ const R = M, T = M + 1, U = M + 2;
6295
+ r = is(this, p, e, i, c, u, h, R, T, U), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6296
6296
  }
6297
6297
  }
6298
6298
  else {
@@ -6347,19 +6347,19 @@ class Ir extends _n {
6347
6347
  const l = [], c = [], u = [], h = [];
6348
6348
  let f = 0, d = 0;
6349
6349
  g("z", "y", "x", -1, -1, i, t, e, o, s, 0), g("z", "y", "x", 1, -1, i, t, -e, o, s, 1), g("x", "z", "y", 1, 1, e, i, t, r, o, 2), g("x", "z", "y", 1, -1, e, i, -t, r, o, 3), g("x", "y", "z", 1, -1, e, t, i, r, s, 4), g("x", "y", "z", -1, -1, e, t, -i, r, s, 5), this.setIndex(l), this.setAttribute("position", new jt(c, 3)), this.setAttribute("normal", new jt(u, 3)), this.setAttribute("uv", new jt(h, 2));
6350
- function g(_, m, p, y, v, M, b, R, w, U, x) {
6351
- const E = M / w, F = b / U, ee = M / 2, O = b / 2, N = R / 2, C = w + 1, z = U + 1;
6350
+ function g(_, m, p, y, v, M, b, R, T, U, x) {
6351
+ const E = M / T, F = b / U, ee = M / 2, O = b / 2, N = R / 2, C = T + 1, z = U + 1;
6352
6352
  let H = 0, V = 0;
6353
6353
  const K = new D();
6354
6354
  for (let Q = 0; Q < z; Q++) {
6355
6355
  const B = Q * F - O;
6356
6356
  for (let q = 0; q < C; q++) {
6357
6357
  const oe = q * E - ee;
6358
- K[_] = oe * y, K[m] = B * v, K[p] = N, c.push(K.x, K.y, K.z), K[_] = 0, K[m] = 0, K[p] = R > 0 ? 1 : -1, u.push(K.x, K.y, K.z), h.push(q / w), h.push(1 - Q / U), H += 1;
6358
+ K[_] = oe * y, K[m] = B * v, K[p] = N, c.push(K.x, K.y, K.z), K[_] = 0, K[m] = 0, K[p] = R > 0 ? 1 : -1, u.push(K.x, K.y, K.z), h.push(q / T), h.push(1 - Q / U), H += 1;
6359
6359
  }
6360
6360
  }
6361
6361
  for (let Q = 0; Q < U; Q++)
6362
- for (let B = 0; B < w; B++) {
6362
+ for (let B = 0; B < T; B++) {
6363
6363
  const q = f + B + C * Q, oe = f + B + C * (Q + 1), me = f + (B + 1) + C * (Q + 1), ge = f + (B + 1) + C * Q;
6364
6364
  l.push(q, oe, ge), l.push(oe, me, ge), V += 6;
6365
6365
  }
@@ -6849,7 +6849,7 @@ class Na {
6849
6849
  return new this.constructor().copy(this);
6850
6850
  }
6851
6851
  }
6852
- function Th() {
6852
+ function wh() {
6853
6853
  let n = null, e = !1, t = null, i = null;
6854
6854
  function r(s, o) {
6855
6855
  t(s, o), i = n.requestAnimationFrame(r);
@@ -7040,7 +7040,7 @@ var mg = `#ifdef USE_ALPHAHASH
7040
7040
  #endif`, bg = `vec3 objectNormal = vec3( normal );
7041
7041
  #ifdef USE_TANGENT
7042
7042
  vec3 objectTangent = vec3( tangent.xyz );
7043
- #endif`, Tg = `float G_BlinnPhong_Implicit( ) {
7043
+ #endif`, wg = `float G_BlinnPhong_Implicit( ) {
7044
7044
  return 0.25;
7045
7045
  }
7046
7046
  float D_BlinnPhong( const in float shininess, const in float dotNH ) {
@@ -7054,7 +7054,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
7054
7054
  float G = G_BlinnPhong_Implicit( );
7055
7055
  float D = D_BlinnPhong( shininess, dotNH );
7056
7056
  return F * ( G * D );
7057
- } // validated`, wg = `#ifdef USE_IRIDESCENCE
7057
+ } // validated`, Tg = `#ifdef USE_IRIDESCENCE
7058
7058
  const mat3 XYZ_TO_REC709 = mat3(
7059
7059
  3.2404542, -0.9692660, 0.0556434,
7060
7060
  -1.5371385, 1.8760108, -0.2040259,
@@ -8294,9 +8294,9 @@ IncidentLight directLight;
8294
8294
  #ifdef USE_METALNESSMAP
8295
8295
  vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
8296
8296
  metalnessFactor *= texelMetalness.b;
8297
- #endif`, T_ = `#ifdef USE_METALNESSMAP
8297
+ #endif`, w_ = `#ifdef USE_METALNESSMAP
8298
8298
  uniform sampler2D metalnessMap;
8299
- #endif`, w_ = `#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
8299
+ #endif`, T_ = `#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
8300
8300
  vColor *= morphTargetBaseInfluence;
8301
8301
  for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
8302
8302
  #if defined( USE_COLOR_ALPHA )
@@ -9478,7 +9478,7 @@ void main() {
9478
9478
  #include <logdepthbuf_vertex>
9479
9479
  #include <clipping_planes_vertex>
9480
9480
  #include <fog_vertex>
9481
- }`, Tv = `uniform vec3 diffuse;
9481
+ }`, wv = `uniform vec3 diffuse;
9482
9482
  uniform float opacity;
9483
9483
  uniform float dashSize;
9484
9484
  uniform float totalSize;
@@ -9506,7 +9506,7 @@ void main() {
9506
9506
  #include <colorspace_fragment>
9507
9507
  #include <fog_fragment>
9508
9508
  #include <premultiplied_alpha_fragment>
9509
- }`, wv = `#include <common>
9509
+ }`, Tv = `#include <common>
9510
9510
  #include <uv_pars_vertex>
9511
9511
  #include <envmap_pars_vertex>
9512
9512
  #include <color_pars_vertex>
@@ -10301,8 +10301,8 @@ void main() {
10301
10301
  aomap_pars_fragment: Mg,
10302
10302
  begin_vertex: Eg,
10303
10303
  beginnormal_vertex: bg,
10304
- bsdfs: Tg,
10305
- iridescence_fragment: wg,
10304
+ bsdfs: wg,
10305
+ iridescence_fragment: Tg,
10306
10306
  bumpmap_pars_fragment: Ag,
10307
10307
  clipping_planes_fragment: Cg,
10308
10308
  clipping_planes_pars_fragment: Rg,
@@ -10355,8 +10355,8 @@ void main() {
10355
10355
  map_particle_fragment: M_,
10356
10356
  map_particle_pars_fragment: E_,
10357
10357
  metalnessmap_fragment: b_,
10358
- metalnessmap_pars_fragment: T_,
10359
- morphcolor_vertex: w_,
10358
+ metalnessmap_pars_fragment: w_,
10359
+ morphcolor_vertex: T_,
10360
10360
  morphnormal_vertex: A_,
10361
10361
  morphtarget_pars_vertex: C_,
10362
10362
  morphtarget_vertex: R_,
@@ -10409,8 +10409,8 @@ void main() {
10409
10409
  equirect_vert: Mv,
10410
10410
  equirect_frag: Ev,
10411
10411
  linedashed_vert: bv,
10412
- linedashed_frag: Tv,
10413
- meshbasic_vert: wv,
10412
+ linedashed_frag: wv,
10413
+ meshbasic_vert: Tv,
10414
10414
  meshbasic_frag: Av,
10415
10415
  meshlambert_vert: Cv,
10416
10416
  meshlambert_frag: Rv,
@@ -10883,8 +10883,8 @@ function $v(n, e, t, i, r, s, o) {
10883
10883
  depthWrite: !1,
10884
10884
  fog: !1
10885
10885
  })
10886
- ), u.geometry.deleteAttribute("normal"), u.geometry.deleteAttribute("uv"), u.onBeforeRender = function(b, R, w) {
10887
- this.matrixWorld.copyPosition(w.matrixWorld);
10886
+ ), u.geometry.deleteAttribute("normal"), u.geometry.deleteAttribute("uv"), u.onBeforeRender = function(b, R, T) {
10887
+ this.matrixWorld.copyPosition(T.matrixWorld);
10888
10888
  }, Object.defineProperty(u.material, "envMap", {
10889
10889
  get: function() {
10890
10890
  return this.uniforms.envMap.value;
@@ -11019,7 +11019,7 @@ function qv(n, e, t, i) {
11019
11019
  for (let z = 0, H = C.length; z < H; z++)
11020
11020
  C[z] !== N[z] && (n.disableVertexAttribArray(z), C[z] = 0);
11021
11021
  }
11022
- function w(N, C, z, H, V, K, Q) {
11022
+ function T(N, C, z, H, V, K, Q) {
11023
11023
  Q === !0 ? n.vertexAttribIPointer(N, C, z, V, K) : n.vertexAttribPointer(N, C, z, H, V, K);
11024
11024
  }
11025
11025
  function U(N, C, z, H) {
@@ -11035,7 +11035,7 @@ function qv(n, e, t, i) {
11035
11035
  const me = oe.normalized, ge = oe.itemSize, Ae = t.get(oe);
11036
11036
  if (Ae === void 0)
11037
11037
  continue;
11038
- const we = Ae.buffer, Te = Ae.type, Ve = Ae.bytesPerElement, Ze = i.isWebGL2 === !0 && (Te === n.INT || Te === n.UNSIGNED_INT || oe.gpuType === oh);
11038
+ const Te = Ae.buffer, we = Ae.type, Ve = Ae.bytesPerElement, Ze = i.isWebGL2 === !0 && (we === n.INT || we === n.UNSIGNED_INT || oe.gpuType === oh);
11039
11039
  if (oe.isInterleavedBufferAttribute) {
11040
11040
  const Ce = oe.data, L = Ce.stride, he = oe.offset;
11041
11041
  if (Ce.isInstancedInterleavedBuffer) {
@@ -11045,12 +11045,12 @@ function qv(n, e, t, i) {
11045
11045
  } else
11046
11046
  for (let J = 0; J < q.locationSize; J++)
11047
11047
  M(q.location + J);
11048
- n.bindBuffer(n.ARRAY_BUFFER, we);
11048
+ n.bindBuffer(n.ARRAY_BUFFER, Te);
11049
11049
  for (let J = 0; J < q.locationSize; J++)
11050
- w(
11050
+ T(
11051
11051
  q.location + J,
11052
11052
  ge / q.locationSize,
11053
- Te,
11053
+ we,
11054
11054
  me,
11055
11055
  L * Ve,
11056
11056
  (he + ge / q.locationSize * J) * Ve,
@@ -11064,12 +11064,12 @@ function qv(n, e, t, i) {
11064
11064
  } else
11065
11065
  for (let Ce = 0; Ce < q.locationSize; Ce++)
11066
11066
  M(q.location + Ce);
11067
- n.bindBuffer(n.ARRAY_BUFFER, we);
11067
+ n.bindBuffer(n.ARRAY_BUFFER, Te);
11068
11068
  for (let Ce = 0; Ce < q.locationSize; Ce++)
11069
- w(
11069
+ T(
11070
11070
  q.location + Ce,
11071
11071
  ge / q.locationSize,
11072
- Te,
11072
+ we,
11073
11073
  me,
11074
11074
  ge * Ve,
11075
11075
  ge / q.locationSize * Ce * Ve,
@@ -11180,19 +11180,19 @@ function Yv(n, e, t) {
11180
11180
  if (i !== void 0)
11181
11181
  return i;
11182
11182
  if (e.has("EXT_texture_filter_anisotropic") === !0) {
11183
- const w = e.get("EXT_texture_filter_anisotropic");
11184
- i = n.getParameter(w.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
11183
+ const T = e.get("EXT_texture_filter_anisotropic");
11184
+ i = n.getParameter(T.MAX_TEXTURE_MAX_ANISOTROPY_EXT);
11185
11185
  } else
11186
11186
  i = 0;
11187
11187
  return i;
11188
11188
  }
11189
- function s(w) {
11190
- if (w === "highp") {
11189
+ function s(T) {
11190
+ if (T === "highp") {
11191
11191
  if (n.getShaderPrecisionFormat(n.VERTEX_SHADER, n.HIGH_FLOAT).precision > 0 && n.getShaderPrecisionFormat(n.FRAGMENT_SHADER, n.HIGH_FLOAT).precision > 0)
11192
11192
  return "highp";
11193
- w = "mediump";
11193
+ T = "mediump";
11194
11194
  }
11195
- return w === "mediump" && n.getShaderPrecisionFormat(n.VERTEX_SHADER, n.MEDIUM_FLOAT).precision > 0 && n.getShaderPrecisionFormat(n.FRAGMENT_SHADER, n.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp";
11195
+ return T === "mediump" && n.getShaderPrecisionFormat(n.VERTEX_SHADER, n.MEDIUM_FLOAT).precision > 0 && n.getShaderPrecisionFormat(n.FRAGMENT_SHADER, n.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp";
11196
11196
  }
11197
11197
  const o = typeof WebGL2RenderingContext != "undefined" && n.constructor.name === "WebGL2RenderingContext";
11198
11198
  let a = t.precision !== void 0 ? t.precision : "highp";
@@ -11338,7 +11338,7 @@ class Jv extends Eh {
11338
11338
  return t.object.zoom = this.zoom, t.object.left = this.left, t.object.right = this.right, t.object.top = this.top, t.object.bottom = this.bottom, t.object.near = this.near, t.object.far = this.far, this.view !== null && (t.object.view = Object.assign({}, this.view)), t;
11339
11339
  }
11340
11340
  }
11341
- const Oi = 4, Tc = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], ri = 20, Lo = /* @__PURE__ */ new Jv(), wc = /* @__PURE__ */ new je();
11341
+ const Oi = 4, wc = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], ri = 20, Lo = /* @__PURE__ */ new Jv(), Tc = /* @__PURE__ */ new je();
11342
11342
  let Po = null;
11343
11343
  const ii = (1 + Math.sqrt(5)) / 2, Ii = 1 / ii, Ac = [
11344
11344
  /* @__PURE__ */ new D(1, 1, 1),
@@ -11446,7 +11446,7 @@ class Cc {
11446
11446
  }
11447
11447
  _sceneToCubeUV(e, t, i, r) {
11448
11448
  const a = new Vt(90, 1, t, i), l = [1, -1, 1, 1, 1, 1], c = [1, 1, 1, -1, -1, -1], u = this._renderer, h = u.autoClear, f = u.toneMapping;
11449
- u.getClearColor(wc), u.toneMapping = Xn, u.autoClear = !1;
11449
+ u.getClearColor(Tc), u.toneMapping = Xn, u.autoClear = !1;
11450
11450
  const d = new Ia({
11451
11451
  name: "PMREM.Background",
11452
11452
  side: Ot,
@@ -11455,7 +11455,7 @@ class Cc {
11455
11455
  }), g = new pn(new Ir(), d);
11456
11456
  let _ = !1;
11457
11457
  const m = e.background;
11458
- m ? m.isColor && (d.color.copy(m), e.background = null, _ = !0) : (d.color.copy(wc), _ = !0);
11458
+ m ? m.isColor && (d.color.copy(m), e.background = null, _ = !0) : (d.color.copy(Tc), _ = !0);
11459
11459
  for (let p = 0; p < 6; p++) {
11460
11460
  const y = p % 3;
11461
11461
  y === 0 ? (a.up.set(0, l[p], 0), a.lookAt(c[p], 0, 0)) : y === 1 ? (a.up.set(0, 0, l[p]), a.lookAt(0, c[p], 0)) : (a.up.set(0, l[p], 0), a.lookAt(0, 0, c[p]));
@@ -11517,12 +11517,12 @@ class Cc {
11517
11517
  m > ri && console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${ri}`);
11518
11518
  const p = [];
11519
11519
  let y = 0;
11520
- for (let w = 0; w < ri; ++w) {
11521
- const U = w / _, x = Math.exp(-U * U / 2);
11522
- p.push(x), w === 0 ? y += x : w < m && (y += 2 * x);
11520
+ for (let T = 0; T < ri; ++T) {
11521
+ const U = T / _, x = Math.exp(-U * U / 2);
11522
+ p.push(x), T === 0 ? y += x : T < m && (y += 2 * x);
11523
11523
  }
11524
- for (let w = 0; w < p.length; w++)
11525
- p[w] = p[w] / y;
11524
+ for (let T = 0; T < p.length; T++)
11525
+ p[T] = p[T] / y;
11526
11526
  f.envMap.value = e.texture, f.samples.value = m, f.weights.value = p, f.latitudinal.value = o === "latitudinal", a && (f.poleAxis.value = a);
11527
11527
  const { _lodMax: v } = this;
11528
11528
  f.dTheta.value = g, f.mipInt.value = v - i;
@@ -11533,31 +11533,31 @@ class Cc {
11533
11533
  function Qv(n) {
11534
11534
  const e = [], t = [], i = [];
11535
11535
  let r = n;
11536
- const s = n - Oi + 1 + Tc.length;
11536
+ const s = n - Oi + 1 + wc.length;
11537
11537
  for (let o = 0; o < s; o++) {
11538
11538
  const a = Math.pow(2, r);
11539
11539
  t.push(a);
11540
11540
  let l = 1 / a;
11541
- o > n - Oi ? l = Tc[o - n + Oi - 1] : o === 0 && (l = 0), i.push(l);
11541
+ o > n - Oi ? l = wc[o - n + Oi - 1] : o === 0 && (l = 0), i.push(l);
11542
11542
  const c = 1 / (a - 2), u = -c, h = 1 + c, f = [u, u, h, u, h, h, u, u, h, h, u, h], d = 6, g = 6, _ = 3, m = 2, p = 1, y = new Float32Array(_ * g * d), v = new Float32Array(m * g * d), M = new Float32Array(p * g * d);
11543
11543
  for (let R = 0; R < d; R++) {
11544
- const w = R % 3 * 2 / 3 - 1, U = R > 2 ? 0 : -1, x = [
11545
- w,
11544
+ const T = R % 3 * 2 / 3 - 1, U = R > 2 ? 0 : -1, x = [
11545
+ T,
11546
11546
  U,
11547
11547
  0,
11548
- w + 2 / 3,
11548
+ T + 2 / 3,
11549
11549
  U,
11550
11550
  0,
11551
- w + 2 / 3,
11551
+ T + 2 / 3,
11552
11552
  U + 1,
11553
11553
  0,
11554
- w,
11554
+ T,
11555
11555
  U,
11556
11556
  0,
11557
- w + 2 / 3,
11557
+ T + 2 / 3,
11558
11558
  U + 1,
11559
11559
  0,
11560
- w,
11560
+ T,
11561
11561
  U + 1,
11562
11562
  0
11563
11563
  ];
@@ -11916,15 +11916,15 @@ function i0(n, e, t, i) {
11916
11916
  const y = d.array;
11917
11917
  _ = d.version;
11918
11918
  for (let v = 0, M = y.length; v < M; v += 3) {
11919
- const b = y[v + 0], R = y[v + 1], w = y[v + 2];
11920
- f.push(b, R, R, w, w, b);
11919
+ const b = y[v + 0], R = y[v + 1], T = y[v + 2];
11920
+ f.push(b, R, R, T, T, b);
11921
11921
  }
11922
11922
  } else if (g !== void 0) {
11923
11923
  const y = g.array;
11924
11924
  _ = g.version;
11925
11925
  for (let v = 0, M = y.length / 3 - 1; v < M; v += 3) {
11926
- const b = v + 0, R = v + 1, w = v + 2;
11927
- f.push(b, R, R, w, w, b);
11926
+ const b = v + 0, R = v + 1, T = v + 2;
11927
+ f.push(b, R, R, T, T, b);
11928
11928
  }
11929
11929
  } else
11930
11930
  return;
@@ -12040,7 +12040,7 @@ function l0(n, e, t) {
12040
12040
  ee.dispose(), s.delete(u), u.removeEventListener("dispose", N);
12041
12041
  };
12042
12042
  _ !== void 0 && _.texture.dispose();
12043
- const y = u.morphAttributes.position !== void 0, v = u.morphAttributes.normal !== void 0, M = u.morphAttributes.color !== void 0, b = u.morphAttributes.position || [], R = u.morphAttributes.normal || [], w = u.morphAttributes.color || [];
12043
+ const y = u.morphAttributes.position !== void 0, v = u.morphAttributes.normal !== void 0, M = u.morphAttributes.color !== void 0, b = u.morphAttributes.position || [], R = u.morphAttributes.normal || [], T = u.morphAttributes.color || [];
12044
12044
  let U = 0;
12045
12045
  y === !0 && (U = 1), v === !0 && (U = 2), M === !0 && (U = 3);
12046
12046
  let x = u.attributes.position.count * U, E = 1;
@@ -12049,7 +12049,7 @@ function l0(n, e, t) {
12049
12049
  ee.type = Gn, ee.needsUpdate = !0;
12050
12050
  const O = U * 4;
12051
12051
  for (let C = 0; C < g; C++) {
12052
- const z = b[C], H = R[C], V = w[C], K = x * E * 4 * C;
12052
+ const z = b[C], H = R[C], V = T[C], K = x * E * 4 * C;
12053
12053
  for (let Q = 0; Q < z.count; Q++) {
12054
12054
  const B = Q * O;
12055
12055
  y === !0 && (o.fromBufferAttribute(z, Q), F[K + B + 0] = o.x, F[K + B + 1] = o.y, F[K + B + 2] = o.z, F[K + B + 3] = 0), v === !0 && (o.fromBufferAttribute(H, Q), F[K + B + 4] = o.x, F[K + B + 5] = o.y, F[K + B + 6] = o.z, F[K + B + 7] = 0), M === !0 && (o.fromBufferAttribute(V, Q), F[K + B + 8] = o.x, F[K + B + 9] = o.y, F[K + B + 10] = o.z, F[K + B + 11] = V.itemSize === 4 ? o.w : 1);
@@ -12119,7 +12119,7 @@ function c0(n, e, t, i) {
12119
12119
  dispose: o
12120
12120
  };
12121
12121
  }
12122
- const wh = /* @__PURE__ */ new It(), Ah = /* @__PURE__ */ new vh(), Ch = /* @__PURE__ */ new Ym(), Rh = /* @__PURE__ */ new bh(), Dc = [], Ic = [], Uc = new Float32Array(16), Nc = new Float32Array(9), Oc = new Float32Array(4);
12122
+ const Th = /* @__PURE__ */ new It(), Ah = /* @__PURE__ */ new vh(), Ch = /* @__PURE__ */ new Ym(), Rh = /* @__PURE__ */ new bh(), Dc = [], Ic = [], Uc = new Float32Array(16), Nc = new Float32Array(9), Oc = new Float32Array(4);
12123
12123
  function Qi(n, e, t) {
12124
12124
  const i = n[0];
12125
12125
  if (i <= 0 || i > 0)
@@ -12292,11 +12292,11 @@ function b0(n, e) {
12292
12292
  n.uniform4uiv(this.addr, e), yt(t, e);
12293
12293
  }
12294
12294
  }
12295
- function T0(n, e, t) {
12295
+ function w0(n, e, t) {
12296
12296
  const i = this.cache, r = t.allocateTextureUnit();
12297
- i[0] !== r && (n.uniform1i(this.addr, r), i[0] = r), t.setTexture2D(e || wh, r);
12297
+ i[0] !== r && (n.uniform1i(this.addr, r), i[0] = r), t.setTexture2D(e || Th, r);
12298
12298
  }
12299
- function w0(n, e, t) {
12299
+ function T0(n, e, t) {
12300
12300
  const i = this.cache, r = t.allocateTextureUnit();
12301
12301
  i[0] !== r && (n.uniform1i(this.addr, r), i[0] = r), t.setTexture3D(e || Ch, r);
12302
12302
  }
@@ -12349,11 +12349,11 @@ function R0(n) {
12349
12349
  case 36298:
12350
12350
  case 36306:
12351
12351
  case 35682:
12352
- return T0;
12352
+ return w0;
12353
12353
  case 35679:
12354
12354
  case 36299:
12355
12355
  case 36307:
12356
- return w0;
12356
+ return T0;
12357
12357
  case 35680:
12358
12358
  case 36300:
12359
12359
  case 36308:
@@ -12421,7 +12421,7 @@ function X0(n, e, t) {
12421
12421
  const i = this.cache, r = e.length, s = Xs(t, r);
12422
12422
  xt(i, s) || (n.uniform1iv(this.addr, s), yt(i, s));
12423
12423
  for (let o = 0; o !== r; ++o)
12424
- t.setTexture2D(e[o] || wh, s[o]);
12424
+ t.setTexture2D(e[o] || Th, s[o]);
12425
12425
  }
12426
12426
  function $0(n, e, t) {
12427
12427
  const i = this.cache, r = e.length, s = Xs(t, r);
@@ -13073,9 +13073,9 @@ Program Info Log: ` + x + `
13073
13073
  });
13074
13074
  }
13075
13075
  r.deleteShader(b), r.deleteShader(R);
13076
- let w;
13076
+ let T;
13077
13077
  this.getUniforms = function() {
13078
- return w === void 0 && (w = new Ss(r, _)), w;
13078
+ return T === void 0 && (T = new Ss(r, _)), T;
13079
13079
  };
13080
13080
  let U;
13081
13081
  return this.getAttributes = function() {
@@ -13159,9 +13159,9 @@ function Mx(n, e, t, i, r, s, o) {
13159
13159
  oe = et.vertexShader, me = et.fragmentShader;
13160
13160
  } else
13161
13161
  oe = x.vertexShader, me = x.fragmentShader, l.update(x), ge = l.getVertexShaderID(x), Ae = l.getFragmentShaderID(x);
13162
- const we = n.getRenderTarget(), Te = O.isInstancedMesh === !0, Ve = !!x.map, Ze = !!x.matcap, Ce = !!H, L = !!x.aoMap, he = !!x.lightMap, J = !!x.bumpMap, ae = !!x.normalMap, ne = !!x.displacementMap, be = !!x.emissiveMap, ye = !!x.metalnessMap, Se = !!x.roughnessMap, Le = x.anisotropy > 0, ze = x.clearcoat > 0, tt = x.iridescence > 0, A = x.sheen > 0, S = x.transmission > 0, W = Le && !!x.anisotropyMap, se = ze && !!x.clearcoatMap, ie = ze && !!x.clearcoatNormalMap, le = ze && !!x.clearcoatRoughnessMap, Ee = tt && !!x.iridescenceMap, ce = tt && !!x.iridescenceThicknessMap, X = A && !!x.sheenColorMap, P = A && !!x.sheenRoughnessMap, te = !!x.specularMap, xe = !!x.specularColorMap, pe = !!x.specularIntensityMap, ve = S && !!x.transmissionMap, Ne = S && !!x.thicknessMap, We = !!x.gradientMap, I = !!x.alphaMap, _e = x.alphaTest > 0, $ = !!x.alphaHash, re = !!x.extensions, fe = !!C.attributes.uv1, He = !!C.attributes.uv2, qe = !!C.attributes.uv3;
13162
+ const Te = n.getRenderTarget(), we = O.isInstancedMesh === !0, Ve = !!x.map, Ze = !!x.matcap, Ce = !!H, L = !!x.aoMap, he = !!x.lightMap, J = !!x.bumpMap, ae = !!x.normalMap, ne = !!x.displacementMap, be = !!x.emissiveMap, ye = !!x.metalnessMap, Se = !!x.roughnessMap, Le = x.anisotropy > 0, ze = x.clearcoat > 0, tt = x.iridescence > 0, A = x.sheen > 0, S = x.transmission > 0, W = Le && !!x.anisotropyMap, se = ze && !!x.clearcoatMap, ie = ze && !!x.clearcoatNormalMap, le = ze && !!x.clearcoatRoughnessMap, Ee = tt && !!x.iridescenceMap, ce = tt && !!x.iridescenceThicknessMap, X = A && !!x.sheenColorMap, P = A && !!x.sheenRoughnessMap, te = !!x.specularMap, xe = !!x.specularColorMap, pe = !!x.specularIntensityMap, ve = S && !!x.transmissionMap, Ne = S && !!x.thicknessMap, We = !!x.gradientMap, I = !!x.alphaMap, _e = x.alphaTest > 0, $ = !!x.alphaHash, re = !!x.extensions, fe = !!C.attributes.uv1, He = !!C.attributes.uv2, qe = !!C.attributes.uv3;
13163
13163
  let Je = Xn;
13164
- return x.toneMapped && (we === null || we.isXRRenderTarget === !0) && (Je = n.toneMapping), {
13164
+ return x.toneMapped && (Te === null || Te.isXRRenderTarget === !0) && (Je = n.toneMapping), {
13165
13165
  isWebGL2: u,
13166
13166
  shaderID: K,
13167
13167
  shaderType: x.type,
@@ -13174,10 +13174,10 @@ function Mx(n, e, t, i, r, s, o) {
13174
13174
  isRawShaderMaterial: x.isRawShaderMaterial === !0,
13175
13175
  glslVersion: x.glslVersion,
13176
13176
  precision: d,
13177
- instancing: Te,
13178
- instancingColor: Te && O.instanceColor !== null,
13177
+ instancing: we,
13178
+ instancingColor: we && O.instanceColor !== null,
13179
13179
  supportsVertexTextures: f,
13180
- outputColorSpace: we === null ? n.outputColorSpace : we.isXRRenderTarget === !0 ? we.texture.colorSpace : gn,
13180
+ outputColorSpace: Te === null ? n.outputColorSpace : Te.isXRRenderTarget === !0 ? Te.texture.colorSpace : gn,
13181
13181
  map: Ve,
13182
13182
  matcap: Ze,
13183
13183
  envMap: Ce,
@@ -13335,7 +13335,7 @@ function Mx(n, e, t, i, r, s, o) {
13335
13335
  c[E] = c[c.length - 1], c.pop(), x.destroy();
13336
13336
  }
13337
13337
  }
13338
- function w(x) {
13338
+ function T(x) {
13339
13339
  l.remove(x);
13340
13340
  }
13341
13341
  function U() {
@@ -13347,7 +13347,7 @@ function Mx(n, e, t, i, r, s, o) {
13347
13347
  getUniforms: M,
13348
13348
  acquireProgram: b,
13349
13349
  releaseProgram: R,
13350
- releaseShaderCache: w,
13350
+ releaseShaderCache: T,
13351
13351
  // Exposed for resource monitoring & error feedback via renderer.info:
13352
13352
  programs: c,
13353
13353
  dispose: U
@@ -13431,7 +13431,7 @@ function Xc() {
13431
13431
  sort: c
13432
13432
  };
13433
13433
  }
13434
- function Tx() {
13434
+ function wx() {
13435
13435
  let n = /* @__PURE__ */ new WeakMap();
13436
13436
  function e(i, r) {
13437
13437
  const s = n.get(i);
@@ -13446,7 +13446,7 @@ function Tx() {
13446
13446
  dispose: t
13447
13447
  };
13448
13448
  }
13449
- function wx() {
13449
+ function Tx() {
13450
13450
  const n = {};
13451
13451
  return {
13452
13452
  get: function(e) {
@@ -13543,7 +13543,7 @@ function Rx(n, e) {
13543
13543
  return (e.castShadow ? 2 : 0) - (n.castShadow ? 2 : 0) + (e.map ? 1 : 0) - (n.map ? 1 : 0);
13544
13544
  }
13545
13545
  function Lx(n, e) {
13546
- const t = new wx(), i = Ax(), r = {
13546
+ const t = new Tx(), i = Ax(), r = {
13547
13547
  version: 0,
13548
13548
  hash: {
13549
13549
  directionalLength: -1,
@@ -13584,7 +13584,7 @@ function Lx(n, e) {
13584
13584
  let f = 0, d = 0, g = 0;
13585
13585
  for (let F = 0; F < 9; F++)
13586
13586
  r.probe[F].set(0, 0, 0);
13587
- let _ = 0, m = 0, p = 0, y = 0, v = 0, M = 0, b = 0, R = 0, w = 0, U = 0;
13587
+ let _ = 0, m = 0, p = 0, y = 0, v = 0, M = 0, b = 0, R = 0, T = 0, U = 0;
13588
13588
  u.sort(Rx);
13589
13589
  const x = h === !0 ? Math.PI : 1;
13590
13590
  for (let F = 0, ee = u.length; F < ee; F++) {
@@ -13605,7 +13605,7 @@ function Lx(n, e) {
13605
13605
  const V = t.get(O);
13606
13606
  V.position.setFromMatrixPosition(O.matrixWorld), V.color.copy(N).multiplyScalar(C * x), V.distance = z, V.coneCos = Math.cos(O.angle), V.penumbraCos = Math.cos(O.angle * (1 - O.penumbra)), V.decay = O.decay, r.spot[p] = V;
13607
13607
  const K = O.shadow;
13608
- if (O.map && (r.spotLightMap[w] = O.map, w++, K.updateMatrices(O), O.castShadow && U++), r.spotLightMatrix[p] = K.matrix, O.castShadow) {
13608
+ if (O.map && (r.spotLightMap[T] = O.map, T++, K.updateMatrices(O), O.castShadow && U++), r.spotLightMatrix[p] = K.matrix, O.castShadow) {
13609
13609
  const Q = i.get(O);
13610
13610
  Q.shadowBias = K.bias, Q.shadowNormalBias = K.normalBias, Q.shadowRadius = K.radius, Q.shadowMapSize = K.mapSize, r.spotShadow[p] = Q, r.spotShadowMap[p] = H, R++;
13611
13611
  }
@@ -13627,7 +13627,7 @@ function Lx(n, e) {
13627
13627
  }
13628
13628
  y > 0 && (e.isWebGL2 || n.has("OES_texture_float_linear") === !0 ? (r.rectAreaLTC1 = de.LTC_FLOAT_1, r.rectAreaLTC2 = de.LTC_FLOAT_2) : n.has("OES_texture_half_float_linear") === !0 ? (r.rectAreaLTC1 = de.LTC_HALF_1, r.rectAreaLTC2 = de.LTC_HALF_2) : console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")), r.ambient[0] = f, r.ambient[1] = d, r.ambient[2] = g;
13629
13629
  const E = r.hash;
13630
- (E.directionalLength !== _ || E.pointLength !== m || E.spotLength !== p || E.rectAreaLength !== y || E.hemiLength !== v || E.numDirectionalShadows !== M || E.numPointShadows !== b || E.numSpotShadows !== R || E.numSpotMaps !== w) && (r.directional.length = _, r.spot.length = p, r.rectArea.length = y, r.point.length = m, r.hemi.length = v, r.directionalShadow.length = M, r.directionalShadowMap.length = M, r.pointShadow.length = b, r.pointShadowMap.length = b, r.spotShadow.length = R, r.spotShadowMap.length = R, r.directionalShadowMatrix.length = M, r.pointShadowMatrix.length = b, r.spotLightMatrix.length = R + w - U, r.spotLightMap.length = w, r.numSpotLightShadowsWithMaps = U, E.directionalLength = _, E.pointLength = m, E.spotLength = p, E.rectAreaLength = y, E.hemiLength = v, E.numDirectionalShadows = M, E.numPointShadows = b, E.numSpotShadows = R, E.numSpotMaps = w, r.version = Cx++);
13630
+ (E.directionalLength !== _ || E.pointLength !== m || E.spotLength !== p || E.rectAreaLength !== y || E.hemiLength !== v || E.numDirectionalShadows !== M || E.numPointShadows !== b || E.numSpotShadows !== R || E.numSpotMaps !== T) && (r.directional.length = _, r.spot.length = p, r.rectArea.length = y, r.point.length = m, r.hemi.length = v, r.directionalShadow.length = M, r.directionalShadowMap.length = M, r.pointShadow.length = b, r.pointShadowMap.length = b, r.spotShadow.length = R, r.spotShadowMap.length = R, r.directionalShadowMatrix.length = M, r.pointShadowMatrix.length = b, r.spotLightMatrix.length = R + T - U, r.spotLightMap.length = T, r.numSpotLightShadowsWithMaps = U, E.directionalLength = _, E.pointLength = m, E.spotLength = p, E.rectAreaLength = y, E.hemiLength = v, E.numDirectionalShadows = M, E.numPointShadows = b, E.numSpotShadows = R, E.numSpotMaps = T, r.version = Cx++);
13631
13631
  }
13632
13632
  function c(u, h) {
13633
13633
  let f = 0, d = 0, g = 0, _ = 0, m = 0;
@@ -13774,7 +13774,7 @@ function Ox(n, e, t) {
13774
13774
  const _ = new pn(g, f), m = this;
13775
13775
  this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = nh;
13776
13776
  let p = this.type;
13777
- this.render = function(b, R, w) {
13777
+ this.render = function(b, R, T) {
13778
13778
  if (m.enabled === !1 || m.autoUpdate === !1 && m.needsUpdate === !1 || b.length === 0)
13779
13779
  return;
13780
13780
  const U = n.getRenderTarget(), x = n.getActiveCubeFace(), E = n.getActiveMipmapLevel(), F = n.state;
@@ -13803,39 +13803,39 @@ function Ox(n, e, t) {
13803
13803
  s.y * B.y,
13804
13804
  s.x * B.z,
13805
13805
  s.y * B.w
13806
- ), F.viewport(o), H.updateMatrices(z, Q), i = H.getFrustum(), M(R, w, H.camera, z, this.type);
13806
+ ), F.viewport(o), H.updateMatrices(z, Q), i = H.getFrustum(), M(R, T, H.camera, z, this.type);
13807
13807
  }
13808
- H.isPointLightShadow !== !0 && this.type === An && y(H, w), H.needsUpdate = !1;
13808
+ H.isPointLightShadow !== !0 && this.type === An && y(H, T), H.needsUpdate = !1;
13809
13809
  }
13810
13810
  p = this.type, m.needsUpdate = !1, n.setRenderTarget(U, x, E);
13811
13811
  };
13812
13812
  function y(b, R) {
13813
- const w = e.update(_);
13814
- f.defines.VSM_SAMPLES !== b.blurSamples && (f.defines.VSM_SAMPLES = b.blurSamples, d.defines.VSM_SAMPLES = b.blurSamples, f.needsUpdate = !0, d.needsUpdate = !0), b.mapPass === null && (b.mapPass = new di(r.x, r.y)), f.uniforms.shadow_pass.value = b.map.texture, f.uniforms.resolution.value = b.mapSize, f.uniforms.radius.value = b.radius, n.setRenderTarget(b.mapPass), n.clear(), n.renderBufferDirect(R, null, w, f, _, null), d.uniforms.shadow_pass.value = b.mapPass.texture, d.uniforms.resolution.value = b.mapSize, d.uniforms.radius.value = b.radius, n.setRenderTarget(b.map), n.clear(), n.renderBufferDirect(R, null, w, d, _, null);
13813
+ const T = e.update(_);
13814
+ f.defines.VSM_SAMPLES !== b.blurSamples && (f.defines.VSM_SAMPLES = b.blurSamples, d.defines.VSM_SAMPLES = b.blurSamples, f.needsUpdate = !0, d.needsUpdate = !0), b.mapPass === null && (b.mapPass = new di(r.x, r.y)), f.uniforms.shadow_pass.value = b.map.texture, f.uniforms.resolution.value = b.mapSize, f.uniforms.radius.value = b.radius, n.setRenderTarget(b.mapPass), n.clear(), n.renderBufferDirect(R, null, T, f, _, null), d.uniforms.shadow_pass.value = b.mapPass.texture, d.uniforms.resolution.value = b.mapSize, d.uniforms.radius.value = b.radius, n.setRenderTarget(b.map), n.clear(), n.renderBufferDirect(R, null, T, d, _, null);
13815
13815
  }
13816
- function v(b, R, w, U) {
13816
+ function v(b, R, T, U) {
13817
13817
  let x = null;
13818
- const E = w.isPointLight === !0 ? b.customDistanceMaterial : b.customDepthMaterial;
13818
+ const E = T.isPointLight === !0 ? b.customDistanceMaterial : b.customDepthMaterial;
13819
13819
  if (E !== void 0)
13820
13820
  x = E;
13821
- else if (x = w.isPointLight === !0 ? l : a, n.localClippingEnabled && R.clipShadows === !0 && Array.isArray(R.clippingPlanes) && R.clippingPlanes.length !== 0 || R.displacementMap && R.displacementScale !== 0 || R.alphaMap && R.alphaTest > 0 || R.map && R.alphaTest > 0) {
13821
+ else if (x = T.isPointLight === !0 ? l : a, n.localClippingEnabled && R.clipShadows === !0 && Array.isArray(R.clippingPlanes) && R.clippingPlanes.length !== 0 || R.displacementMap && R.displacementScale !== 0 || R.alphaMap && R.alphaTest > 0 || R.map && R.alphaTest > 0) {
13822
13822
  const F = x.uuid, ee = R.uuid;
13823
13823
  let O = c[F];
13824
13824
  O === void 0 && (O = {}, c[F] = O);
13825
13825
  let N = O[ee];
13826
13826
  N === void 0 && (N = x.clone(), O[ee] = N), x = N;
13827
13827
  }
13828
- if (x.visible = R.visible, x.wireframe = R.wireframe, U === An ? x.side = R.shadowSide !== null ? R.shadowSide : R.side : x.side = R.shadowSide !== null ? R.shadowSide : h[R.side], x.alphaMap = R.alphaMap, x.alphaTest = R.alphaTest, x.map = R.map, x.clipShadows = R.clipShadows, x.clippingPlanes = R.clippingPlanes, x.clipIntersection = R.clipIntersection, x.displacementMap = R.displacementMap, x.displacementScale = R.displacementScale, x.displacementBias = R.displacementBias, x.wireframeLinewidth = R.wireframeLinewidth, x.linewidth = R.linewidth, w.isPointLight === !0 && x.isMeshDistanceMaterial === !0) {
13828
+ if (x.visible = R.visible, x.wireframe = R.wireframe, U === An ? x.side = R.shadowSide !== null ? R.shadowSide : R.side : x.side = R.shadowSide !== null ? R.shadowSide : h[R.side], x.alphaMap = R.alphaMap, x.alphaTest = R.alphaTest, x.map = R.map, x.clipShadows = R.clipShadows, x.clippingPlanes = R.clippingPlanes, x.clipIntersection = R.clipIntersection, x.displacementMap = R.displacementMap, x.displacementScale = R.displacementScale, x.displacementBias = R.displacementBias, x.wireframeLinewidth = R.wireframeLinewidth, x.linewidth = R.linewidth, T.isPointLight === !0 && x.isMeshDistanceMaterial === !0) {
13829
13829
  const F = n.properties.get(x);
13830
- F.light = w;
13830
+ F.light = T;
13831
13831
  }
13832
13832
  return x;
13833
13833
  }
13834
- function M(b, R, w, U, x) {
13834
+ function M(b, R, T, U, x) {
13835
13835
  if (b.visible === !1)
13836
13836
  return;
13837
13837
  if (b.layers.test(R.layers) && (b.isMesh || b.isLine || b.isPoints) && (b.castShadow || b.receiveShadow && x === An) && (!b.frustumCulled || i.intersectsObject(b))) {
13838
- b.modelViewMatrix.multiplyMatrices(w.matrixWorldInverse, b.matrixWorld);
13838
+ b.modelViewMatrix.multiplyMatrices(T.matrixWorldInverse, b.matrixWorld);
13839
13839
  const ee = e.update(b), O = b.material;
13840
13840
  if (Array.isArray(O)) {
13841
13841
  const N = ee.groups;
@@ -13843,17 +13843,17 @@ function Ox(n, e, t) {
13843
13843
  const H = N[C], V = O[H.materialIndex];
13844
13844
  if (V && V.visible) {
13845
13845
  const K = v(b, V, U, x);
13846
- n.renderBufferDirect(w, null, ee, K, b, H);
13846
+ n.renderBufferDirect(T, null, ee, K, b, H);
13847
13847
  }
13848
13848
  }
13849
13849
  } else if (O.visible) {
13850
13850
  const N = v(b, O, U, x);
13851
- n.renderBufferDirect(w, null, ee, N, b, null);
13851
+ n.renderBufferDirect(T, null, ee, N, b, null);
13852
13852
  }
13853
13853
  }
13854
13854
  const F = b.children;
13855
13855
  for (let ee = 0, O = F.length; ee < O; ee++)
13856
- M(F[ee], R, w, U, x);
13856
+ M(F[ee], R, T, U, x);
13857
13857
  }
13858
13858
  }
13859
13859
  function Fx(n, e, t) {
@@ -13882,7 +13882,7 @@ function Fx(n, e, t) {
13882
13882
  let I = !1, _e = null, $ = null, re = null;
13883
13883
  return {
13884
13884
  setTest: function(fe) {
13885
- fe ? we(n.DEPTH_TEST) : Te(n.DEPTH_TEST);
13885
+ fe ? Te(n.DEPTH_TEST) : we(n.DEPTH_TEST);
13886
13886
  },
13887
13887
  setMask: function(fe) {
13888
13888
  _e !== fe && !I && (n.depthMask(fe), _e = fe);
@@ -13935,7 +13935,7 @@ function Fx(n, e, t) {
13935
13935
  let I = !1, _e = null, $ = null, re = null, fe = null, He = null, qe = null, Je = null, Ft = null;
13936
13936
  return {
13937
13937
  setTest: function(et) {
13938
- I || (et ? we(n.STENCIL_TEST) : Te(n.STENCIL_TEST));
13938
+ I || (et ? Te(n.STENCIL_TEST) : we(n.STENCIL_TEST));
13939
13939
  },
13940
13940
  setMask: function(et) {
13941
13941
  _e !== et && !I && (n.stencilMask(et), _e = et);
@@ -13958,7 +13958,7 @@ function Fx(n, e, t) {
13958
13958
  };
13959
13959
  }
13960
13960
  const a = new r(), l = new s(), c = new o(), u = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap();
13961
- let f = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, y = null, v = null, M = null, b = null, R = null, w = null, U = null, x = !1, E = null, F = null, ee = null, O = null, N = null;
13961
+ let f = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, y = null, v = null, M = null, b = null, R = null, T = null, U = null, x = !1, E = null, F = null, ee = null, O = null, N = null;
13962
13962
  const C = n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
13963
13963
  let z = !1, H = 0;
13964
13964
  const V = n.getParameter(n.VERSION);
@@ -13973,11 +13973,11 @@ function Fx(n, e, t) {
13973
13973
  return He;
13974
13974
  }
13975
13975
  const Ae = {};
13976
- Ae[n.TEXTURE_2D] = ge(n.TEXTURE_2D, n.TEXTURE_2D, 1), Ae[n.TEXTURE_CUBE_MAP] = ge(n.TEXTURE_CUBE_MAP, n.TEXTURE_CUBE_MAP_POSITIVE_X, 6), i && (Ae[n.TEXTURE_2D_ARRAY] = ge(n.TEXTURE_2D_ARRAY, n.TEXTURE_2D_ARRAY, 1, 1), Ae[n.TEXTURE_3D] = ge(n.TEXTURE_3D, n.TEXTURE_3D, 1, 1)), a.setClear(0, 0, 0, 1), l.setClear(1), c.setClear(0), we(n.DEPTH_TEST), l.setFunc(ea), ne(!1), be(Pl), we(n.CULL_FACE), J(Wn);
13977
- function we(I) {
13976
+ Ae[n.TEXTURE_2D] = ge(n.TEXTURE_2D, n.TEXTURE_2D, 1), Ae[n.TEXTURE_CUBE_MAP] = ge(n.TEXTURE_CUBE_MAP, n.TEXTURE_CUBE_MAP_POSITIVE_X, 6), i && (Ae[n.TEXTURE_2D_ARRAY] = ge(n.TEXTURE_2D_ARRAY, n.TEXTURE_2D_ARRAY, 1, 1), Ae[n.TEXTURE_3D] = ge(n.TEXTURE_3D, n.TEXTURE_3D, 1, 1)), a.setClear(0, 0, 0, 1), l.setClear(1), c.setClear(0), Te(n.DEPTH_TEST), l.setFunc(ea), ne(!1), be(Pl), Te(n.CULL_FACE), J(Wn);
13977
+ function Te(I) {
13978
13978
  f[I] !== !0 && (n.enable(I), f[I] = !0);
13979
13979
  }
13980
- function Te(I) {
13980
+ function we(I) {
13981
13981
  f[I] !== !1 && (n.disable(I), f[I] = !1);
13982
13982
  }
13983
13983
  function Ve(I, _e) {
@@ -14028,10 +14028,10 @@ function Fx(n, e, t) {
14028
14028
  };
14029
14029
  function J(I, _e, $, re, fe, He, qe, Je) {
14030
14030
  if (I === Wn) {
14031
- p === !0 && (Te(n.BLEND), p = !1);
14031
+ p === !0 && (we(n.BLEND), p = !1);
14032
14032
  return;
14033
14033
  }
14034
- if (p === !1 && (we(n.BLEND), p = !0), I !== Pp) {
14034
+ if (p === !1 && (Te(n.BLEND), p = !0), I !== Pp) {
14035
14035
  if (I !== y || Je !== x) {
14036
14036
  if ((v !== Ni || R !== Ni) && (n.blendEquation(n.FUNC_ADD), v = Ni, R = Ni), Je)
14037
14037
  switch (I) {
@@ -14069,33 +14069,33 @@ function Fx(n, e, t) {
14069
14069
  console.error("THREE.WebGLState: Invalid blending: ", I);
14070
14070
  break;
14071
14071
  }
14072
- M = null, b = null, w = null, U = null, y = I, x = Je;
14072
+ M = null, b = null, T = null, U = null, y = I, x = Je;
14073
14073
  }
14074
14074
  return;
14075
14075
  }
14076
- fe = fe || _e, He = He || $, qe = qe || re, (_e !== v || fe !== R) && (n.blendEquationSeparate(L[_e], L[fe]), v = _e, R = fe), ($ !== M || re !== b || He !== w || qe !== U) && (n.blendFuncSeparate(he[$], he[re], he[He], he[qe]), M = $, b = re, w = He, U = qe), y = I, x = !1;
14076
+ fe = fe || _e, He = He || $, qe = qe || re, (_e !== v || fe !== R) && (n.blendEquationSeparate(L[_e], L[fe]), v = _e, R = fe), ($ !== M || re !== b || He !== T || qe !== U) && (n.blendFuncSeparate(he[$], he[re], he[He], he[qe]), M = $, b = re, T = He, U = qe), y = I, x = !1;
14077
14077
  }
14078
14078
  function ae(I, _e) {
14079
- I.side === Cn ? Te(n.CULL_FACE) : we(n.CULL_FACE);
14079
+ I.side === Cn ? we(n.CULL_FACE) : Te(n.CULL_FACE);
14080
14080
  let $ = I.side === Ot;
14081
14081
  _e && ($ = !$), ne($), I.blending === ki && I.transparent === !1 ? J(Wn) : J(I.blending, I.blendEquation, I.blendSrc, I.blendDst, I.blendEquationAlpha, I.blendSrcAlpha, I.blendDstAlpha, I.premultipliedAlpha), l.setFunc(I.depthFunc), l.setTest(I.depthTest), l.setMask(I.depthWrite), a.setMask(I.colorWrite);
14082
14082
  const re = I.stencilWrite;
14083
- c.setTest(re), re && (c.setMask(I.stencilWriteMask), c.setFunc(I.stencilFunc, I.stencilRef, I.stencilFuncMask), c.setOp(I.stencilFail, I.stencilZFail, I.stencilZPass)), Se(I.polygonOffset, I.polygonOffsetFactor, I.polygonOffsetUnits), I.alphaToCoverage === !0 ? we(n.SAMPLE_ALPHA_TO_COVERAGE) : Te(n.SAMPLE_ALPHA_TO_COVERAGE);
14083
+ c.setTest(re), re && (c.setMask(I.stencilWriteMask), c.setFunc(I.stencilFunc, I.stencilRef, I.stencilFuncMask), c.setOp(I.stencilFail, I.stencilZFail, I.stencilZPass)), Se(I.polygonOffset, I.polygonOffsetFactor, I.polygonOffsetUnits), I.alphaToCoverage === !0 ? Te(n.SAMPLE_ALPHA_TO_COVERAGE) : we(n.SAMPLE_ALPHA_TO_COVERAGE);
14084
14084
  }
14085
14085
  function ne(I) {
14086
14086
  E !== I && (I ? n.frontFace(n.CW) : n.frontFace(n.CCW), E = I);
14087
14087
  }
14088
14088
  function be(I) {
14089
- I !== Cp ? (we(n.CULL_FACE), I !== F && (I === Pl ? n.cullFace(n.BACK) : I === Rp ? n.cullFace(n.FRONT) : n.cullFace(n.FRONT_AND_BACK))) : Te(n.CULL_FACE), F = I;
14089
+ I !== Cp ? (Te(n.CULL_FACE), I !== F && (I === Pl ? n.cullFace(n.BACK) : I === Rp ? n.cullFace(n.FRONT) : n.cullFace(n.FRONT_AND_BACK))) : we(n.CULL_FACE), F = I;
14090
14090
  }
14091
14091
  function ye(I) {
14092
14092
  I !== ee && (z && n.lineWidth(I), ee = I);
14093
14093
  }
14094
14094
  function Se(I, _e, $) {
14095
- I ? (we(n.POLYGON_OFFSET_FILL), (O !== _e || N !== $) && (n.polygonOffset(_e, $), O = _e, N = $)) : Te(n.POLYGON_OFFSET_FILL);
14095
+ I ? (Te(n.POLYGON_OFFSET_FILL), (O !== _e || N !== $) && (n.polygonOffset(_e, $), O = _e, N = $)) : we(n.POLYGON_OFFSET_FILL);
14096
14096
  }
14097
14097
  function Le(I) {
14098
- I ? we(n.SCISSOR_TEST) : Te(n.SCISSOR_TEST);
14098
+ I ? Te(n.SCISSOR_TEST) : we(n.SCISSOR_TEST);
14099
14099
  }
14100
14100
  function ze(I) {
14101
14101
  I === void 0 && (I = n.TEXTURE0 + C - 1), K !== I && (n.activeTexture(I), K = I);
@@ -14196,7 +14196,7 @@ function Fx(n, e, t) {
14196
14196
  u.get(_e) !== re && (n.uniformBlockBinding(_e, re, I.__bindingPointIndex), u.set(_e, re));
14197
14197
  }
14198
14198
  function We() {
14199
- n.disable(n.BLEND), n.disable(n.CULL_FACE), n.disable(n.DEPTH_TEST), n.disable(n.POLYGON_OFFSET_FILL), n.disable(n.SCISSOR_TEST), n.disable(n.STENCIL_TEST), n.disable(n.SAMPLE_ALPHA_TO_COVERAGE), n.blendEquation(n.FUNC_ADD), n.blendFunc(n.ONE, n.ZERO), n.blendFuncSeparate(n.ONE, n.ZERO, n.ONE, n.ZERO), n.colorMask(!0, !0, !0, !0), n.clearColor(0, 0, 0, 0), n.depthMask(!0), n.depthFunc(n.LESS), n.clearDepth(1), n.stencilMask(4294967295), n.stencilFunc(n.ALWAYS, 0, 4294967295), n.stencilOp(n.KEEP, n.KEEP, n.KEEP), n.clearStencil(0), n.cullFace(n.BACK), n.frontFace(n.CCW), n.polygonOffset(0, 0), n.activeTexture(n.TEXTURE0), n.bindFramebuffer(n.FRAMEBUFFER, null), i === !0 && (n.bindFramebuffer(n.DRAW_FRAMEBUFFER, null), n.bindFramebuffer(n.READ_FRAMEBUFFER, null)), n.useProgram(null), n.lineWidth(1), n.scissor(0, 0, n.canvas.width, n.canvas.height), n.viewport(0, 0, n.canvas.width, n.canvas.height), f = {}, K = null, Q = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, y = null, v = null, M = null, b = null, R = null, w = null, U = null, x = !1, E = null, F = null, ee = null, O = null, N = null, oe.set(0, 0, n.canvas.width, n.canvas.height), me.set(0, 0, n.canvas.width, n.canvas.height), a.reset(), l.reset(), c.reset();
14199
+ n.disable(n.BLEND), n.disable(n.CULL_FACE), n.disable(n.DEPTH_TEST), n.disable(n.POLYGON_OFFSET_FILL), n.disable(n.SCISSOR_TEST), n.disable(n.STENCIL_TEST), n.disable(n.SAMPLE_ALPHA_TO_COVERAGE), n.blendEquation(n.FUNC_ADD), n.blendFunc(n.ONE, n.ZERO), n.blendFuncSeparate(n.ONE, n.ZERO, n.ONE, n.ZERO), n.colorMask(!0, !0, !0, !0), n.clearColor(0, 0, 0, 0), n.depthMask(!0), n.depthFunc(n.LESS), n.clearDepth(1), n.stencilMask(4294967295), n.stencilFunc(n.ALWAYS, 0, 4294967295), n.stencilOp(n.KEEP, n.KEEP, n.KEEP), n.clearStencil(0), n.cullFace(n.BACK), n.frontFace(n.CCW), n.polygonOffset(0, 0), n.activeTexture(n.TEXTURE0), n.bindFramebuffer(n.FRAMEBUFFER, null), i === !0 && (n.bindFramebuffer(n.DRAW_FRAMEBUFFER, null), n.bindFramebuffer(n.READ_FRAMEBUFFER, null)), n.useProgram(null), n.lineWidth(1), n.scissor(0, 0, n.canvas.width, n.canvas.height), n.viewport(0, 0, n.canvas.width, n.canvas.height), f = {}, K = null, Q = {}, d = {}, g = /* @__PURE__ */ new WeakMap(), _ = [], m = null, p = !1, y = null, v = null, M = null, b = null, R = null, T = null, U = null, x = !1, E = null, F = null, ee = null, O = null, N = null, oe.set(0, 0, n.canvas.width, n.canvas.height), me.set(0, 0, n.canvas.width, n.canvas.height), a.reset(), l.reset(), c.reset();
14200
14200
  }
14201
14201
  return {
14202
14202
  buffers: {
@@ -14204,8 +14204,8 @@ function Fx(n, e, t) {
14204
14204
  depth: l,
14205
14205
  stencil: c
14206
14206
  },
14207
- enable: we,
14208
- disable: Te,
14207
+ enable: Te,
14208
+ disable: we,
14209
14209
  bindFramebuffer: Ve,
14210
14210
  drawBuffers: Ze,
14211
14211
  useProgram: Ce,
@@ -14272,7 +14272,7 @@ function Bx(n, e, t, i, r, s, o) {
14272
14272
  function R(A, S) {
14273
14273
  return A.generateMipmaps && S && A.minFilter !== Dt && A.minFilter !== $t;
14274
14274
  }
14275
- function w(A) {
14275
+ function T(A) {
14276
14276
  n.generateMipmap(A);
14277
14277
  }
14278
14278
  function U(A, S, W, se, ie = !1) {
@@ -14418,7 +14418,7 @@ function Bx(n, e, t, i, r, s, o) {
14418
14418
  [Sm]: n.GREATER,
14419
14419
  [Mm]: n.NOTEQUAL
14420
14420
  };
14421
- function we(A, S, W) {
14421
+ function Te(A, S, W) {
14422
14422
  if (W ? (n.texParameteri(A, n.TEXTURE_WRAP_S, me[S.wrapS]), n.texParameteri(A, n.TEXTURE_WRAP_T, me[S.wrapT]), (A === n.TEXTURE_3D || A === n.TEXTURE_2D_ARRAY) && n.texParameteri(A, n.TEXTURE_WRAP_R, me[S.wrapR]), n.texParameteri(A, n.TEXTURE_MAG_FILTER, ge[S.magFilter]), n.texParameteri(A, n.TEXTURE_MIN_FILTER, ge[S.minFilter])) : (n.texParameteri(A, n.TEXTURE_WRAP_S, n.CLAMP_TO_EDGE), n.texParameteri(A, n.TEXTURE_WRAP_T, n.CLAMP_TO_EDGE), (A === n.TEXTURE_3D || A === n.TEXTURE_2D_ARRAY) && n.texParameteri(A, n.TEXTURE_WRAP_R, n.CLAMP_TO_EDGE), (S.wrapS !== nn || S.wrapT !== nn) && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."), n.texParameteri(A, n.TEXTURE_MAG_FILTER, E(S.magFilter)), n.texParameteri(A, n.TEXTURE_MIN_FILTER, E(S.minFilter)), S.minFilter !== Dt && S.minFilter !== $t && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")), S.compareFunction && (n.texParameteri(A, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE), n.texParameteri(A, n.TEXTURE_COMPARE_FUNC, Ae[S.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
14423
14423
  const se = e.get("EXT_texture_filter_anisotropic");
14424
14424
  if (S.magFilter === Dt || S.minFilter !== so && S.minFilter !== yr || S.type === Gn && e.has("OES_texture_float_linear") === !1 || a === !1 && S.type === Sr && e.has("OES_texture_half_float_linear") === !1)
@@ -14426,7 +14426,7 @@ function Bx(n, e, t, i, r, s, o) {
14426
14426
  (S.anisotropy > 1 || i.get(S).__currentAnisotropy) && (n.texParameterf(A, se.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(S.anisotropy, r.getMaxAnisotropy())), i.get(S).__currentAnisotropy = S.anisotropy);
14427
14427
  }
14428
14428
  }
14429
- function Te(A, S) {
14429
+ function we(A, S) {
14430
14430
  let W = !1;
14431
14431
  A.__webglInit === void 0 && (A.__webglInit = !0, S.addEventListener("dispose", F));
14432
14432
  const se = S.source;
@@ -14446,7 +14446,7 @@ function Bx(n, e, t, i, r, s, o) {
14446
14446
  function Ve(A, S, W) {
14447
14447
  let se = n.TEXTURE_2D;
14448
14448
  (S.isDataArrayTexture || S.isCompressedArrayTexture) && (se = n.TEXTURE_2D_ARRAY), S.isData3DTexture && (se = n.TEXTURE_3D);
14449
- const ie = Te(A, S), le = S.source;
14449
+ const ie = we(A, S), le = S.source;
14450
14450
  t.bindTexture(se, A.__webglTexture, n.TEXTURE0 + W);
14451
14451
  const Ee = i.get(le);
14452
14452
  if (le.version !== Ee.__version || ie === !0) {
@@ -14456,7 +14456,7 @@ function Bx(n, e, t, i, r, s, o) {
14456
14456
  X = tt(S, X);
14457
14457
  const P = M(X) || a, te = s.convert(S.format, S.colorSpace);
14458
14458
  let xe = s.convert(S.type), pe = U(S.internalFormat, te, xe, S.colorSpace, S.isVideoTexture);
14459
- we(se, S, P);
14459
+ Te(se, S, P);
14460
14460
  let ve;
14461
14461
  const Ne = S.mipmaps, We = a && S.isVideoTexture !== !0, I = Ee.__version === void 0 || ie === !0, _e = x(S, X, P);
14462
14462
  if (S.isDepthTexture)
@@ -14499,14 +14499,14 @@ function Bx(n, e, t, i, r, s, o) {
14499
14499
  S.generateMipmaps = !1;
14500
14500
  } else
14501
14501
  We ? (I && t.texStorage2D(n.TEXTURE_2D, _e, pe, X.width, X.height), t.texSubImage2D(n.TEXTURE_2D, 0, 0, 0, te, xe, X)) : t.texImage2D(n.TEXTURE_2D, 0, pe, te, xe, X);
14502
- R(S, P) && w(se), Ee.__version = le.version, S.onUpdate && S.onUpdate(S);
14502
+ R(S, P) && T(se), Ee.__version = le.version, S.onUpdate && S.onUpdate(S);
14503
14503
  }
14504
14504
  A.__version = S.version;
14505
14505
  }
14506
14506
  function Ze(A, S, W) {
14507
14507
  if (S.image.length !== 6)
14508
14508
  return;
14509
- const se = Te(A, S), ie = S.source;
14509
+ const se = we(A, S), ie = S.source;
14510
14510
  t.bindTexture(n.TEXTURE_CUBE_MAP, A.__webglTexture, n.TEXTURE0 + W);
14511
14511
  const le = i.get(ie);
14512
14512
  if (ie.version !== le.__version || se === !0) {
@@ -14516,7 +14516,7 @@ function Bx(n, e, t, i, r, s, o) {
14516
14516
  !Ee && !ce ? X[$] = v(S.image[$], !1, !0, c) : X[$] = ce ? S.image[$].image : S.image[$], X[$] = tt(S, X[$]);
14517
14517
  const P = X[0], te = M(P) || a, xe = s.convert(S.format, S.colorSpace), pe = s.convert(S.type), ve = U(S.internalFormat, xe, pe, S.colorSpace), Ne = a && S.isVideoTexture !== !0, We = le.__version === void 0 || se === !0;
14518
14518
  let I = x(S, P, te);
14519
- we(n.TEXTURE_CUBE_MAP, S, te);
14519
+ Te(n.TEXTURE_CUBE_MAP, S, te);
14520
14520
  let _e;
14521
14521
  if (Ee) {
14522
14522
  Ne && We && t.texStorage2D(n.TEXTURE_CUBE_MAP, I, ve, P.width, P.height);
@@ -14544,7 +14544,7 @@ function Bx(n, e, t, i, r, s, o) {
14544
14544
  }
14545
14545
  }
14546
14546
  }
14547
- R(S, te) && w(n.TEXTURE_CUBE_MAP), le.__version = ie.version, S.onUpdate && S.onUpdate(S);
14547
+ R(S, te) && T(n.TEXTURE_CUBE_MAP), le.__version = ie.version, S.onUpdate && S.onUpdate(S);
14548
14548
  }
14549
14549
  A.__version = S.version;
14550
14550
  }
@@ -14653,29 +14653,29 @@ function Bx(n, e, t, i, r, s, o) {
14653
14653
  }
14654
14654
  }
14655
14655
  if (ie) {
14656
- t.bindTexture(n.TEXTURE_CUBE_MAP, se.__webglTexture), we(n.TEXTURE_CUBE_MAP, S, Ee);
14656
+ t.bindTexture(n.TEXTURE_CUBE_MAP, se.__webglTexture), Te(n.TEXTURE_CUBE_MAP, S, Ee);
14657
14657
  for (let ce = 0; ce < 6; ce++)
14658
14658
  if (a && S.mipmaps && S.mipmaps.length > 0)
14659
14659
  for (let X = 0; X < S.mipmaps.length; X++)
14660
14660
  Ce(W.__webglFramebuffer[ce][X], A, S, n.COLOR_ATTACHMENT0, n.TEXTURE_CUBE_MAP_POSITIVE_X + ce, X);
14661
14661
  else
14662
14662
  Ce(W.__webglFramebuffer[ce], A, S, n.COLOR_ATTACHMENT0, n.TEXTURE_CUBE_MAP_POSITIVE_X + ce, 0);
14663
- R(S, Ee) && w(n.TEXTURE_CUBE_MAP), t.unbindTexture();
14663
+ R(S, Ee) && T(n.TEXTURE_CUBE_MAP), t.unbindTexture();
14664
14664
  } else if (le) {
14665
14665
  const ce = A.texture;
14666
14666
  for (let X = 0, P = ce.length; X < P; X++) {
14667
14667
  const te = ce[X], xe = i.get(te);
14668
- t.bindTexture(n.TEXTURE_2D, xe.__webglTexture), we(n.TEXTURE_2D, te, Ee), Ce(W.__webglFramebuffer, A, te, n.COLOR_ATTACHMENT0 + X, n.TEXTURE_2D, 0), R(te, Ee) && w(n.TEXTURE_2D);
14668
+ t.bindTexture(n.TEXTURE_2D, xe.__webglTexture), Te(n.TEXTURE_2D, te, Ee), Ce(W.__webglFramebuffer, A, te, n.COLOR_ATTACHMENT0 + X, n.TEXTURE_2D, 0), R(te, Ee) && T(n.TEXTURE_2D);
14669
14669
  }
14670
14670
  t.unbindTexture();
14671
14671
  } else {
14672
14672
  let ce = n.TEXTURE_2D;
14673
- if ((A.isWebGL3DRenderTarget || A.isWebGLArrayRenderTarget) && (a ? ce = A.isWebGL3DRenderTarget ? n.TEXTURE_3D : n.TEXTURE_2D_ARRAY : console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")), t.bindTexture(ce, se.__webglTexture), we(ce, S, Ee), a && S.mipmaps && S.mipmaps.length > 0)
14673
+ if ((A.isWebGL3DRenderTarget || A.isWebGLArrayRenderTarget) && (a ? ce = A.isWebGL3DRenderTarget ? n.TEXTURE_3D : n.TEXTURE_2D_ARRAY : console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")), t.bindTexture(ce, se.__webglTexture), Te(ce, S, Ee), a && S.mipmaps && S.mipmaps.length > 0)
14674
14674
  for (let X = 0; X < S.mipmaps.length; X++)
14675
14675
  Ce(W.__webglFramebuffer[X], A, S, n.COLOR_ATTACHMENT0, ce, X);
14676
14676
  else
14677
14677
  Ce(W.__webglFramebuffer, A, S, n.COLOR_ATTACHMENT0, ce, 0);
14678
- R(S, Ee) && w(ce), t.unbindTexture();
14678
+ R(S, Ee) && T(ce), t.unbindTexture();
14679
14679
  }
14680
14680
  A.depthBuffer && J(A);
14681
14681
  }
@@ -14685,7 +14685,7 @@ function Bx(n, e, t, i, r, s, o) {
14685
14685
  const le = W[se];
14686
14686
  if (R(le, S)) {
14687
14687
  const Ee = A.isWebGLCubeRenderTarget ? n.TEXTURE_CUBE_MAP : n.TEXTURE_2D, ce = i.get(le).__webglTexture;
14688
- t.bindTexture(Ee, ce), w(Ee), t.unbindTexture();
14688
+ t.bindTexture(Ee, ce), T(Ee), t.unbindTexture();
14689
14689
  }
14690
14690
  }
14691
14691
  }
@@ -14986,8 +14986,8 @@ class Wx extends gi {
14986
14986
  M.layers.enable(1), M.viewport = new Ke();
14987
14987
  const b = new Vt();
14988
14988
  b.layers.enable(2), b.viewport = new Ke();
14989
- const R = [M, b], w = new kx();
14990
- w.layers.enable(1), w.layers.enable(2);
14989
+ const R = [M, b], T = new kx();
14990
+ T.layers.enable(1), T.layers.enable(2);
14991
14991
  let U = null, x = null;
14992
14992
  this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(B) {
14993
14993
  let q = y[B];
@@ -15108,9 +15108,9 @@ class Wx extends gi {
15108
15108
  const O = new D(), N = new D();
15109
15109
  function C(B, q, oe) {
15110
15110
  O.setFromMatrixPosition(q.matrixWorld), N.setFromMatrixPosition(oe.matrixWorld);
15111
- const me = O.distanceTo(N), ge = q.projectionMatrix.elements, Ae = oe.projectionMatrix.elements, we = ge[14] / (ge[10] - 1), Te = ge[14] / (ge[10] + 1), Ve = (ge[9] + 1) / ge[5], Ze = (ge[9] - 1) / ge[5], Ce = (ge[8] - 1) / ge[0], L = (Ae[8] + 1) / Ae[0], he = we * Ce, J = we * L, ae = me / (-Ce + L), ne = ae * -Ce;
15111
+ const me = O.distanceTo(N), ge = q.projectionMatrix.elements, Ae = oe.projectionMatrix.elements, Te = ge[14] / (ge[10] - 1), we = ge[14] / (ge[10] + 1), Ve = (ge[9] + 1) / ge[5], Ze = (ge[9] - 1) / ge[5], Ce = (ge[8] - 1) / ge[0], L = (Ae[8] + 1) / Ae[0], he = Te * Ce, J = Te * L, ae = me / (-Ce + L), ne = ae * -Ce;
15112
15112
  q.matrixWorld.decompose(B.position, B.quaternion, B.scale), B.translateX(ne), B.translateZ(ae), B.matrixWorld.compose(B.position, B.quaternion, B.scale), B.matrixWorldInverse.copy(B.matrixWorld).invert();
15113
- const be = we + ae, ye = Te + ae, Se = he - ne, Le = J + (me - ne), ze = Ve * Te / ye * be, tt = Ze * Te / ye * be;
15113
+ const be = Te + ae, ye = we + ae, Se = he - ne, Le = J + (me - ne), ze = Ve * we / ye * be, tt = Ze * we / ye * be;
15114
15114
  B.projectionMatrix.makePerspective(Se, Le, ze, tt, be, ye), B.projectionMatrixInverse.copy(B.projectionMatrix).invert();
15115
15115
  }
15116
15116
  function z(B, q) {
@@ -15119,21 +15119,21 @@ class Wx extends gi {
15119
15119
  this.updateCamera = function(B) {
15120
15120
  if (r === null)
15121
15121
  return;
15122
- w.near = b.near = M.near = B.near, w.far = b.far = M.far = B.far, (U !== w.near || x !== w.far) && (r.updateRenderState({
15123
- depthNear: w.near,
15124
- depthFar: w.far
15125
- }), U = w.near, x = w.far);
15126
- const q = B.parent, oe = w.cameras;
15127
- z(w, q);
15122
+ T.near = b.near = M.near = B.near, T.far = b.far = M.far = B.far, (U !== T.near || x !== T.far) && (r.updateRenderState({
15123
+ depthNear: T.near,
15124
+ depthFar: T.far
15125
+ }), U = T.near, x = T.far);
15126
+ const q = B.parent, oe = T.cameras;
15127
+ z(T, q);
15128
15128
  for (let me = 0; me < oe.length; me++)
15129
15129
  z(oe[me], q);
15130
- oe.length === 2 ? C(w, M, b) : w.projectionMatrix.copy(M.projectionMatrix), H(B, w, q);
15130
+ oe.length === 2 ? C(T, M, b) : T.projectionMatrix.copy(M.projectionMatrix), H(B, T, q);
15131
15131
  };
15132
15132
  function H(B, q, oe) {
15133
15133
  oe === null ? B.matrix.copy(q.matrixWorld) : (B.matrix.copy(oe.matrixWorld), B.matrix.invert(), B.matrix.multiply(q.matrixWorld)), B.matrix.decompose(B.position, B.quaternion, B.scale), B.updateMatrixWorld(!0), B.projectionMatrix.copy(q.projectionMatrix), B.projectionMatrixInverse.copy(q.projectionMatrixInverse), B.isPerspectiveCamera && (B.fov = Mr * 2 * Math.atan(1 / B.projectionMatrix.elements[5]), B.zoom = 1);
15134
15134
  }
15135
15135
  this.getCamera = function() {
15136
- return w;
15136
+ return T;
15137
15137
  }, this.getFoveation = function() {
15138
15138
  if (!(f === null && d === null))
15139
15139
  return l;
@@ -15146,22 +15146,22 @@ class Wx extends gi {
15146
15146
  const oe = u.views;
15147
15147
  d !== null && (e.setRenderTargetFramebuffer(p, d.framebuffer), e.setRenderTarget(p));
15148
15148
  let me = !1;
15149
- oe.length !== w.cameras.length && (w.cameras.length = 0, me = !0);
15149
+ oe.length !== T.cameras.length && (T.cameras.length = 0, me = !0);
15150
15150
  for (let ge = 0; ge < oe.length; ge++) {
15151
15151
  const Ae = oe[ge];
15152
- let we = null;
15152
+ let Te = null;
15153
15153
  if (d !== null)
15154
- we = d.getViewport(Ae);
15154
+ Te = d.getViewport(Ae);
15155
15155
  else {
15156
15156
  const Ve = h.getViewSubImage(f, Ae);
15157
- we = Ve.viewport, ge === 0 && (e.setRenderTargetTextures(
15157
+ Te = Ve.viewport, ge === 0 && (e.setRenderTargetTextures(
15158
15158
  p,
15159
15159
  Ve.colorTexture,
15160
15160
  f.ignoreDepthValues ? void 0 : Ve.depthStencilTexture
15161
15161
  ), e.setRenderTarget(p));
15162
15162
  }
15163
- let Te = R[ge];
15164
- Te === void 0 && (Te = new Vt(), Te.layers.enable(ge), Te.viewport = new Ke(), R[ge] = Te), Te.matrix.fromArray(Ae.transform.matrix), Te.matrix.decompose(Te.position, Te.quaternion, Te.scale), Te.projectionMatrix.fromArray(Ae.projectionMatrix), Te.projectionMatrixInverse.copy(Te.projectionMatrix).invert(), Te.viewport.set(we.x, we.y, we.width, we.height), ge === 0 && (w.matrix.copy(Te.matrix), w.matrix.decompose(w.position, w.quaternion, w.scale)), me === !0 && w.cameras.push(Te);
15163
+ let we = R[ge];
15164
+ we === void 0 && (we = new Vt(), we.layers.enable(ge), we.viewport = new Ke(), R[ge] = we), we.matrix.fromArray(Ae.transform.matrix), we.matrix.decompose(we.position, we.quaternion, we.scale), we.projectionMatrix.fromArray(Ae.projectionMatrix), we.projectionMatrixInverse.copy(we.projectionMatrix).invert(), we.viewport.set(Te.x, Te.y, Te.width, Te.height), ge === 0 && (T.matrix.copy(we.matrix), T.matrix.decompose(T.position, T.quaternion, T.scale)), me === !0 && T.cameras.push(we);
15165
15165
  }
15166
15166
  }
15167
15167
  for (let oe = 0; oe < y.length; oe++) {
@@ -15170,7 +15170,7 @@ class Wx extends gi {
15170
15170
  }
15171
15171
  V && V(B, q), q.detectedPlanes && i.dispatchEvent({ type: "planesdetected", data: q }), g = null;
15172
15172
  }
15173
- const Q = new Th();
15173
+ const Q = new wh();
15174
15174
  Q.setAnimationLoop(K), this.setAnimationLoop = function(B) {
15175
15175
  V = B;
15176
15176
  }, this.dispose = function() {
@@ -15263,7 +15263,7 @@ function $x(n, e, t, i) {
15263
15263
  function f(y) {
15264
15264
  const v = r[y.id], M = y.uniforms, b = y.__cache;
15265
15265
  n.bindBuffer(n.UNIFORM_BUFFER, v);
15266
- for (let R = 0, w = M.length; R < w; R++) {
15266
+ for (let R = 0, T = M.length; R < T; R++) {
15267
15267
  const U = M[R];
15268
15268
  if (d(U, R, b) === !0) {
15269
15269
  const x = U.__offset, E = Array.isArray(U.value) ? U.value : [U.value];
@@ -15283,21 +15283,21 @@ function $x(n, e, t, i) {
15283
15283
  if (typeof b == "number")
15284
15284
  M[v] = b;
15285
15285
  else {
15286
- const R = Array.isArray(b) ? b : [b], w = [];
15286
+ const R = Array.isArray(b) ? b : [b], T = [];
15287
15287
  for (let U = 0; U < R.length; U++)
15288
- w.push(R[U].clone());
15289
- M[v] = w;
15288
+ T.push(R[U].clone());
15289
+ M[v] = T;
15290
15290
  }
15291
15291
  return !0;
15292
15292
  } else if (typeof b == "number") {
15293
15293
  if (M[v] !== b)
15294
15294
  return M[v] = b, !0;
15295
15295
  } else {
15296
- const R = Array.isArray(M[v]) ? M[v] : [M[v]], w = Array.isArray(b) ? b : [b];
15296
+ const R = Array.isArray(M[v]) ? M[v] : [M[v]], T = Array.isArray(b) ? b : [b];
15297
15297
  for (let U = 0; U < R.length; U++) {
15298
15298
  const x = R[U];
15299
- if (x.equals(w[U]) === !1)
15300
- return x.copy(w[U]), !0;
15299
+ if (x.equals(T[U]) === !1)
15300
+ return x.copy(T[U]), !0;
15301
15301
  }
15302
15302
  }
15303
15303
  return !1;
@@ -15307,8 +15307,8 @@ function $x(n, e, t, i) {
15307
15307
  let M = 0;
15308
15308
  const b = 16;
15309
15309
  let R = 0;
15310
- for (let w = 0, U = v.length; w < U; w++) {
15311
- const x = v[w], E = {
15310
+ for (let T = 0, U = v.length; T < U; T++) {
15311
+ const x = v[T], E = {
15312
15312
  boundary: 0,
15313
15313
  // bytes
15314
15314
  storage: 0
@@ -15318,7 +15318,7 @@ function $x(n, e, t, i) {
15318
15318
  const N = F[ee], C = _(N);
15319
15319
  E.boundary += C.boundary, E.storage += C.storage;
15320
15320
  }
15321
- if (x.__data = new Float32Array(E.storage / Float32Array.BYTES_PER_ELEMENT), x.__offset = M, w > 0) {
15321
+ if (x.__data = new Float32Array(E.storage / Float32Array.BYTES_PER_ELEMENT), x.__offset = M, T > 0) {
15322
15322
  R = M % b;
15323
15323
  const ee = b - R;
15324
15324
  R !== 0 && ee - E.boundary < 0 && (M += b - R, x.__offset = M);
@@ -15386,7 +15386,7 @@ class Lh {
15386
15386
  onShaderError: null
15387
15387
  }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.outputColorSpace = nt, this._useLegacyLights = !1, this.toneMapping = Xn, this.toneMappingExposure = 1;
15388
15388
  const v = this;
15389
- let M = !1, b = 0, R = 0, w = null, U = -1, x = null;
15389
+ let M = !1, b = 0, R = 0, T = null, U = -1, x = null;
15390
15390
  const E = new Ke(), F = new Ke();
15391
15391
  let ee = null;
15392
15392
  const O = new je(0);
@@ -15395,21 +15395,21 @@ class Lh {
15395
15395
  let q = !1;
15396
15396
  const oe = new Na();
15397
15397
  let me = !1, ge = !1, Ae = null;
15398
- const we = new it(), Te = new ue(), Ve = new D(), Ze = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
15398
+ const Te = new it(), we = new ue(), Ve = new D(), Ze = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
15399
15399
  function Ce() {
15400
- return w === null ? H : 1;
15400
+ return T === null ? H : 1;
15401
15401
  }
15402
15402
  let L = i;
15403
- function he(T, k) {
15404
- for (let j = 0; j < T.length; j++) {
15405
- const G = T[j], Y = t.getContext(G, k);
15403
+ function he(w, k) {
15404
+ for (let j = 0; j < w.length; j++) {
15405
+ const G = w[j], Y = t.getContext(G, k);
15406
15406
  if (Y !== null)
15407
15407
  return Y;
15408
15408
  }
15409
15409
  return null;
15410
15410
  }
15411
15411
  try {
15412
- const T = {
15412
+ const w = {
15413
15413
  alpha: !0,
15414
15414
  depth: r,
15415
15415
  stencil: s,
@@ -15421,18 +15421,18 @@ class Lh {
15421
15421
  };
15422
15422
  if ("setAttribute" in t && t.setAttribute("data-engine", `three.js r${Aa}`), t.addEventListener("webglcontextlost", _e, !1), t.addEventListener("webglcontextrestored", $, !1), t.addEventListener("webglcontextcreationerror", re, !1), L === null) {
15423
15423
  const k = ["webgl2", "webgl", "experimental-webgl"];
15424
- if (v.isWebGL1Renderer === !0 && k.shift(), L = he(k, T), L === null)
15424
+ if (v.isWebGL1Renderer === !0 && k.shift(), L = he(k, w), L === null)
15425
15425
  throw he(k) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
15426
15426
  }
15427
15427
  typeof WebGLRenderingContext != "undefined" && L instanceof WebGLRenderingContext && console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."), L.getShaderPrecisionFormat === void 0 && (L.getShaderPrecisionFormat = function() {
15428
15428
  return { rangeMin: 1, rangeMax: 1, precision: 1 };
15429
15429
  });
15430
- } catch (T) {
15431
- throw console.error("THREE.WebGLRenderer: " + T.message), T;
15430
+ } catch (w) {
15431
+ throw console.error("THREE.WebGLRenderer: " + w.message), w;
15432
15432
  }
15433
15433
  let J, ae, ne, be, ye, Se, Le, ze, tt, A, S, W, se, ie, le, Ee, ce, X, P, te, xe, pe, ve, Ne;
15434
15434
  function We() {
15435
- J = new n0(L), ae = new Yv(L, J, e), J.init(ae), pe = new Hx(L, J, ae), ne = new Fx(L, J, ae), be = new s0(L), ye = new Ex(), Se = new Bx(L, J, ne, ye, ae, pe, be), Le = new Zv(v), ze = new t0(v), tt = new pg(L, ae), ve = new qv(L, J, tt, ae), A = new i0(L, tt, be, ve), S = new c0(L, A, tt, be), P = new l0(L, ae, Se), Ee = new Kv(ye), W = new Mx(v, Le, ze, J, ae, ve, Ee), se = new Xx(v, ye), ie = new Tx(), le = new Px(J, ae), X = new $v(v, Le, ze, ne, S, f, l), ce = new Ox(v, S, ae), Ne = new $x(L, be, ae, ne), te = new jv(L, J, be, ae), xe = new r0(L, J, be, ae), be.programs = W.programs, v.capabilities = ae, v.extensions = J, v.properties = ye, v.renderLists = ie, v.shadowMap = ce, v.state = ne, v.info = be;
15435
+ J = new n0(L), ae = new Yv(L, J, e), J.init(ae), pe = new Hx(L, J, ae), ne = new Fx(L, J, ae), be = new s0(L), ye = new Ex(), Se = new Bx(L, J, ne, ye, ae, pe, be), Le = new Zv(v), ze = new t0(v), tt = new pg(L, ae), ve = new qv(L, J, tt, ae), A = new i0(L, tt, be, ve), S = new c0(L, A, tt, be), P = new l0(L, ae, Se), Ee = new Kv(ye), W = new Mx(v, Le, ze, J, ae, ve, Ee), se = new Xx(v, ye), ie = new wx(), le = new Px(J, ae), X = new $v(v, Le, ze, ne, S, f, l), ce = new Ox(v, S, ae), Ne = new $x(L, be, ae, ne), te = new jv(L, J, be, ae), xe = new r0(L, J, be, ae), be.programs = W.programs, v.capabilities = ae, v.extensions = J, v.properties = ye, v.renderLists = ie, v.shadowMap = ce, v.state = ne, v.info = be;
15436
15436
  }
15437
15437
  We();
15438
15438
  const I = new Wx(v, L);
@@ -15441,63 +15441,63 @@ class Lh {
15441
15441
  }, this.getContextAttributes = function() {
15442
15442
  return L.getContextAttributes();
15443
15443
  }, this.forceContextLoss = function() {
15444
- const T = J.get("WEBGL_lose_context");
15445
- T && T.loseContext();
15444
+ const w = J.get("WEBGL_lose_context");
15445
+ w && w.loseContext();
15446
15446
  }, this.forceContextRestore = function() {
15447
- const T = J.get("WEBGL_lose_context");
15448
- T && T.restoreContext();
15447
+ const w = J.get("WEBGL_lose_context");
15448
+ w && w.restoreContext();
15449
15449
  }, this.getPixelRatio = function() {
15450
15450
  return H;
15451
- }, this.setPixelRatio = function(T) {
15452
- T !== void 0 && (H = T, this.setSize(C, z, !1));
15453
- }, this.getSize = function(T) {
15454
- return T.set(C, z);
15455
- }, this.setSize = function(T, k, j = !0) {
15451
+ }, this.setPixelRatio = function(w) {
15452
+ w !== void 0 && (H = w, this.setSize(C, z, !1));
15453
+ }, this.getSize = function(w) {
15454
+ return w.set(C, z);
15455
+ }, this.setSize = function(w, k, j = !0) {
15456
15456
  if (I.isPresenting) {
15457
15457
  console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");
15458
15458
  return;
15459
15459
  }
15460
- C = T, z = k, t.width = Math.floor(T * H), t.height = Math.floor(k * H), j === !0 && (t.style.width = T + "px", t.style.height = k + "px"), this.setViewport(0, 0, T, k);
15461
- }, this.getDrawingBufferSize = function(T) {
15462
- return T.set(C * H, z * H).floor();
15463
- }, this.setDrawingBufferSize = function(T, k, j) {
15464
- C = T, z = k, H = j, t.width = Math.floor(T * j), t.height = Math.floor(k * j), this.setViewport(0, 0, T, k);
15465
- }, this.getCurrentViewport = function(T) {
15466
- return T.copy(E);
15467
- }, this.getViewport = function(T) {
15468
- return T.copy(Q);
15469
- }, this.setViewport = function(T, k, j, G) {
15470
- T.isVector4 ? Q.set(T.x, T.y, T.z, T.w) : Q.set(T, k, j, G), ne.viewport(E.copy(Q).multiplyScalar(H).floor());
15471
- }, this.getScissor = function(T) {
15472
- return T.copy(B);
15473
- }, this.setScissor = function(T, k, j, G) {
15474
- T.isVector4 ? B.set(T.x, T.y, T.z, T.w) : B.set(T, k, j, G), ne.scissor(F.copy(B).multiplyScalar(H).floor());
15460
+ C = w, z = k, t.width = Math.floor(w * H), t.height = Math.floor(k * H), j === !0 && (t.style.width = w + "px", t.style.height = k + "px"), this.setViewport(0, 0, w, k);
15461
+ }, this.getDrawingBufferSize = function(w) {
15462
+ return w.set(C * H, z * H).floor();
15463
+ }, this.setDrawingBufferSize = function(w, k, j) {
15464
+ C = w, z = k, H = j, t.width = Math.floor(w * j), t.height = Math.floor(k * j), this.setViewport(0, 0, w, k);
15465
+ }, this.getCurrentViewport = function(w) {
15466
+ return w.copy(E);
15467
+ }, this.getViewport = function(w) {
15468
+ return w.copy(Q);
15469
+ }, this.setViewport = function(w, k, j, G) {
15470
+ w.isVector4 ? Q.set(w.x, w.y, w.z, w.w) : Q.set(w, k, j, G), ne.viewport(E.copy(Q).multiplyScalar(H).floor());
15471
+ }, this.getScissor = function(w) {
15472
+ return w.copy(B);
15473
+ }, this.setScissor = function(w, k, j, G) {
15474
+ w.isVector4 ? B.set(w.x, w.y, w.z, w.w) : B.set(w, k, j, G), ne.scissor(F.copy(B).multiplyScalar(H).floor());
15475
15475
  }, this.getScissorTest = function() {
15476
15476
  return q;
15477
- }, this.setScissorTest = function(T) {
15478
- ne.setScissorTest(q = T);
15479
- }, this.setOpaqueSort = function(T) {
15480
- V = T;
15481
- }, this.setTransparentSort = function(T) {
15482
- K = T;
15483
- }, this.getClearColor = function(T) {
15484
- return T.copy(X.getClearColor());
15477
+ }, this.setScissorTest = function(w) {
15478
+ ne.setScissorTest(q = w);
15479
+ }, this.setOpaqueSort = function(w) {
15480
+ V = w;
15481
+ }, this.setTransparentSort = function(w) {
15482
+ K = w;
15483
+ }, this.getClearColor = function(w) {
15484
+ return w.copy(X.getClearColor());
15485
15485
  }, this.setClearColor = function() {
15486
15486
  X.setClearColor.apply(X, arguments);
15487
15487
  }, this.getClearAlpha = function() {
15488
15488
  return X.getClearAlpha();
15489
15489
  }, this.setClearAlpha = function() {
15490
15490
  X.setClearAlpha.apply(X, arguments);
15491
- }, this.clear = function(T = !0, k = !0, j = !0) {
15491
+ }, this.clear = function(w = !0, k = !0, j = !0) {
15492
15492
  let G = 0;
15493
- if (T) {
15493
+ if (w) {
15494
15494
  let Y = !1;
15495
- if (w !== null) {
15496
- const Me = w.texture.format;
15495
+ if (T !== null) {
15496
+ const Me = T.texture.format;
15497
15497
  Y = Me === hh || Me === uh || Me === ch;
15498
15498
  }
15499
15499
  if (Y) {
15500
- const Me = w.texture.type, Re = Me === $n || Me === kn || Me === Ra || Me === oi || Me === ah || Me === lh, Ie = X.getClearColor(), Ue = X.getClearAlpha(), ke = Ie.r, Pe = Ie.g, Oe = Ie.b;
15500
+ const Me = T.texture.type, Re = Me === $n || Me === kn || Me === Ra || Me === oi || Me === ah || Me === lh, Ie = X.getClearColor(), Ue = X.getClearAlpha(), ke = Ie.r, Pe = Ie.g, Oe = Ie.b;
15501
15501
  Re ? (d[0] = ke, d[1] = Pe, d[2] = Oe, d[3] = Ue, L.clearBufferuiv(L.COLOR, 0, d)) : (g[0] = ke, g[1] = Pe, g[2] = Oe, g[3] = Ue, L.clearBufferiv(L.COLOR, 0, g));
15502
15502
  } else
15503
15503
  G |= L.COLOR_BUFFER_BIT;
@@ -15512,33 +15512,33 @@ class Lh {
15512
15512
  }, this.dispose = function() {
15513
15513
  t.removeEventListener("webglcontextlost", _e, !1), t.removeEventListener("webglcontextrestored", $, !1), t.removeEventListener("webglcontextcreationerror", re, !1), ie.dispose(), le.dispose(), ye.dispose(), Le.dispose(), ze.dispose(), S.dispose(), ve.dispose(), Ne.dispose(), W.dispose(), I.dispose(), I.removeEventListener("sessionstart", et), I.removeEventListener("sessionend", cn), Ae && (Ae.dispose(), Ae = null), Ct.stop();
15514
15514
  };
15515
- function _e(T) {
15516
- T.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), M = !0;
15515
+ function _e(w) {
15516
+ w.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), M = !0;
15517
15517
  }
15518
15518
  function $() {
15519
15519
  console.log("THREE.WebGLRenderer: Context Restored."), M = !1;
15520
- const T = be.autoReset, k = ce.enabled, j = ce.autoUpdate, G = ce.needsUpdate, Y = ce.type;
15521
- We(), be.autoReset = T, ce.enabled = k, ce.autoUpdate = j, ce.needsUpdate = G, ce.type = Y;
15520
+ const w = be.autoReset, k = ce.enabled, j = ce.autoUpdate, G = ce.needsUpdate, Y = ce.type;
15521
+ We(), be.autoReset = w, ce.enabled = k, ce.autoUpdate = j, ce.needsUpdate = G, ce.type = Y;
15522
15522
  }
15523
- function re(T) {
15524
- console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ", T.statusMessage);
15523
+ function re(w) {
15524
+ console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ", w.statusMessage);
15525
15525
  }
15526
- function fe(T) {
15527
- const k = T.target;
15526
+ function fe(w) {
15527
+ const k = w.target;
15528
15528
  k.removeEventListener("dispose", fe), He(k);
15529
15529
  }
15530
- function He(T) {
15531
- qe(T), ye.remove(T);
15530
+ function He(w) {
15531
+ qe(w), ye.remove(w);
15532
15532
  }
15533
- function qe(T) {
15534
- const k = ye.get(T).programs;
15533
+ function qe(w) {
15534
+ const k = ye.get(w).programs;
15535
15535
  k !== void 0 && (k.forEach(function(j) {
15536
15536
  W.releaseProgram(j);
15537
- }), T.isShaderMaterial && W.releaseShaderCache(T));
15537
+ }), w.isShaderMaterial && W.releaseShaderCache(w));
15538
15538
  }
15539
- this.renderBufferDirect = function(T, k, j, G, Y, Me) {
15539
+ this.renderBufferDirect = function(w, k, j, G, Y, Me) {
15540
15540
  k === null && (k = Ze);
15541
- const Re = Y.isMesh && Y.matrixWorld.determinant() < 0, Ie = _f(T, k, j, G, Y);
15541
+ const Re = Y.isMesh && Y.matrixWorld.determinant() < 0, Ie = _f(w, k, j, G, Y);
15542
15542
  ne.setMaterial(G, Re);
15543
15543
  let Ue = j.index, ke = 1;
15544
15544
  if (G.wireframe === !0) {
@@ -15568,27 +15568,27 @@ class Lh {
15568
15568
  ft.renderInstances(ot, Wt, Qs);
15569
15569
  } else
15570
15570
  ft.render(ot, Wt);
15571
- }, this.compile = function(T, k) {
15571
+ }, this.compile = function(w, k) {
15572
15572
  function j(G, Y, Me) {
15573
15573
  G.transparent === !0 && G.side === Cn && G.forceSinglePass === !1 ? (G.side = Ot, G.needsUpdate = !0, Fr(G, Y, Me), G.side = jn, G.needsUpdate = !0, Fr(G, Y, Me), G.side = Cn) : Fr(G, Y, Me);
15574
15574
  }
15575
- m = le.get(T), m.init(), y.push(m), T.traverseVisible(function(G) {
15575
+ m = le.get(w), m.init(), y.push(m), w.traverseVisible(function(G) {
15576
15576
  G.isLight && G.layers.test(k.layers) && (m.pushLight(G), G.castShadow && m.pushShadow(G));
15577
- }), m.setupLights(v._useLegacyLights), T.traverse(function(G) {
15577
+ }), m.setupLights(v._useLegacyLights), w.traverse(function(G) {
15578
15578
  const Y = G.material;
15579
15579
  if (Y)
15580
15580
  if (Array.isArray(Y))
15581
15581
  for (let Me = 0; Me < Y.length; Me++) {
15582
15582
  const Re = Y[Me];
15583
- j(Re, T, G);
15583
+ j(Re, w, G);
15584
15584
  }
15585
15585
  else
15586
- j(Y, T, G);
15586
+ j(Y, w, G);
15587
15587
  }), y.pop(), m = null;
15588
15588
  };
15589
15589
  let Je = null;
15590
- function Ft(T) {
15591
- Je && Je(T);
15590
+ function Ft(w) {
15591
+ Je && Je(w);
15592
15592
  }
15593
15593
  function et() {
15594
15594
  Ct.stop();
@@ -15596,76 +15596,76 @@ class Lh {
15596
15596
  function cn() {
15597
15597
  Ct.start();
15598
15598
  }
15599
- const Ct = new Th();
15600
- Ct.setAnimationLoop(Ft), typeof self != "undefined" && Ct.setContext(self), this.setAnimationLoop = function(T) {
15601
- Je = T, I.setAnimationLoop(T), T === null ? Ct.stop() : Ct.start();
15602
- }, I.addEventListener("sessionstart", et), I.addEventListener("sessionend", cn), this.render = function(T, k) {
15599
+ const Ct = new wh();
15600
+ Ct.setAnimationLoop(Ft), typeof self != "undefined" && Ct.setContext(self), this.setAnimationLoop = function(w) {
15601
+ Je = w, I.setAnimationLoop(w), w === null ? Ct.stop() : Ct.start();
15602
+ }, I.addEventListener("sessionstart", et), I.addEventListener("sessionend", cn), this.render = function(w, k) {
15603
15603
  if (k !== void 0 && k.isCamera !== !0) {
15604
15604
  console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");
15605
15605
  return;
15606
15606
  }
15607
15607
  if (M === !0)
15608
15608
  return;
15609
- T.matrixWorldAutoUpdate === !0 && T.updateMatrixWorld(), k.parent === null && k.matrixWorldAutoUpdate === !0 && k.updateMatrixWorld(), I.enabled === !0 && I.isPresenting === !0 && (I.cameraAutoUpdate === !0 && I.updateCamera(k), k = I.getCamera()), T.isScene === !0 && T.onBeforeRender(v, T, k, w), m = le.get(T, y.length), m.init(), y.push(m), we.multiplyMatrices(k.projectionMatrix, k.matrixWorldInverse), oe.setFromProjectionMatrix(we), ge = this.localClippingEnabled, me = Ee.init(this.clippingPlanes, ge), _ = ie.get(T, p.length), _.init(), p.push(_), Ja(T, k, 0, v.sortObjects), _.finish(), v.sortObjects === !0 && _.sort(V, K), this.info.render.frame++, me === !0 && Ee.beginShadows();
15609
+ w.matrixWorldAutoUpdate === !0 && w.updateMatrixWorld(), k.parent === null && k.matrixWorldAutoUpdate === !0 && k.updateMatrixWorld(), I.enabled === !0 && I.isPresenting === !0 && (I.cameraAutoUpdate === !0 && I.updateCamera(k), k = I.getCamera()), w.isScene === !0 && w.onBeforeRender(v, w, k, T), m = le.get(w, y.length), m.init(), y.push(m), Te.multiplyMatrices(k.projectionMatrix, k.matrixWorldInverse), oe.setFromProjectionMatrix(Te), ge = this.localClippingEnabled, me = Ee.init(this.clippingPlanes, ge), _ = ie.get(w, p.length), _.init(), p.push(_), Ja(w, k, 0, v.sortObjects), _.finish(), v.sortObjects === !0 && _.sort(V, K), this.info.render.frame++, me === !0 && Ee.beginShadows();
15610
15610
  const j = m.state.shadowsArray;
15611
- if (ce.render(j, T, k), me === !0 && Ee.endShadows(), this.info.autoReset === !0 && this.info.reset(), X.render(_, T), m.setupLights(v._useLegacyLights), k.isArrayCamera) {
15611
+ if (ce.render(j, w, k), me === !0 && Ee.endShadows(), this.info.autoReset === !0 && this.info.reset(), X.render(_, w), m.setupLights(v._useLegacyLights), k.isArrayCamera) {
15612
15612
  const G = k.cameras;
15613
15613
  for (let Y = 0, Me = G.length; Y < Me; Y++) {
15614
15614
  const Re = G[Y];
15615
- Qa(_, T, Re, Re.viewport);
15615
+ Qa(_, w, Re, Re.viewport);
15616
15616
  }
15617
15617
  } else
15618
- Qa(_, T, k);
15619
- w !== null && (Se.updateMultisampleRenderTarget(w), Se.updateRenderTargetMipmap(w)), T.isScene === !0 && T.onAfterRender(v, T, k), ve.resetDefaultState(), U = -1, x = null, y.pop(), y.length > 0 ? m = y[y.length - 1] : m = null, p.pop(), p.length > 0 ? _ = p[p.length - 1] : _ = null;
15618
+ Qa(_, w, k);
15619
+ T !== null && (Se.updateMultisampleRenderTarget(T), Se.updateRenderTargetMipmap(T)), w.isScene === !0 && w.onAfterRender(v, w, k), ve.resetDefaultState(), U = -1, x = null, y.pop(), y.length > 0 ? m = y[y.length - 1] : m = null, p.pop(), p.length > 0 ? _ = p[p.length - 1] : _ = null;
15620
15620
  };
15621
- function Ja(T, k, j, G) {
15622
- if (T.visible === !1)
15621
+ function Ja(w, k, j, G) {
15622
+ if (w.visible === !1)
15623
15623
  return;
15624
- if (T.layers.test(k.layers)) {
15625
- if (T.isGroup)
15626
- j = T.renderOrder;
15627
- else if (T.isLOD)
15628
- T.autoUpdate === !0 && T.update(k);
15629
- else if (T.isLight)
15630
- m.pushLight(T), T.castShadow && m.pushShadow(T);
15631
- else if (T.isSprite) {
15632
- if (!T.frustumCulled || oe.intersectsSprite(T)) {
15633
- G && Ve.setFromMatrixPosition(T.matrixWorld).applyMatrix4(we);
15634
- const Re = S.update(T), Ie = T.material;
15635
- Ie.visible && _.push(T, Re, Ie, j, Ve.z, null);
15624
+ if (w.layers.test(k.layers)) {
15625
+ if (w.isGroup)
15626
+ j = w.renderOrder;
15627
+ else if (w.isLOD)
15628
+ w.autoUpdate === !0 && w.update(k);
15629
+ else if (w.isLight)
15630
+ m.pushLight(w), w.castShadow && m.pushShadow(w);
15631
+ else if (w.isSprite) {
15632
+ if (!w.frustumCulled || oe.intersectsSprite(w)) {
15633
+ G && Ve.setFromMatrixPosition(w.matrixWorld).applyMatrix4(Te);
15634
+ const Re = S.update(w), Ie = w.material;
15635
+ Ie.visible && _.push(w, Re, Ie, j, Ve.z, null);
15636
15636
  }
15637
- } else if ((T.isMesh || T.isLine || T.isPoints) && (!T.frustumCulled || oe.intersectsObject(T))) {
15638
- const Re = S.update(T), Ie = T.material;
15639
- if (G && (T.boundingSphere !== void 0 ? (T.boundingSphere === null && T.computeBoundingSphere(), Ve.copy(T.boundingSphere.center)) : (Re.boundingSphere === null && Re.computeBoundingSphere(), Ve.copy(Re.boundingSphere.center)), Ve.applyMatrix4(T.matrixWorld).applyMatrix4(we)), Array.isArray(Ie)) {
15637
+ } else if ((w.isMesh || w.isLine || w.isPoints) && (!w.frustumCulled || oe.intersectsObject(w))) {
15638
+ const Re = S.update(w), Ie = w.material;
15639
+ if (G && (w.boundingSphere !== void 0 ? (w.boundingSphere === null && w.computeBoundingSphere(), Ve.copy(w.boundingSphere.center)) : (Re.boundingSphere === null && Re.computeBoundingSphere(), Ve.copy(Re.boundingSphere.center)), Ve.applyMatrix4(w.matrixWorld).applyMatrix4(Te)), Array.isArray(Ie)) {
15640
15640
  const Ue = Re.groups;
15641
15641
  for (let ke = 0, Pe = Ue.length; ke < Pe; ke++) {
15642
15642
  const Oe = Ue[ke], ot = Ie[Oe.materialIndex];
15643
- ot && ot.visible && _.push(T, Re, ot, j, Ve.z, Oe);
15643
+ ot && ot.visible && _.push(w, Re, ot, j, Ve.z, Oe);
15644
15644
  }
15645
15645
  } else
15646
- Ie.visible && _.push(T, Re, Ie, j, Ve.z, null);
15646
+ Ie.visible && _.push(w, Re, Ie, j, Ve.z, null);
15647
15647
  }
15648
15648
  }
15649
- const Me = T.children;
15649
+ const Me = w.children;
15650
15650
  for (let Re = 0, Ie = Me.length; Re < Ie; Re++)
15651
15651
  Ja(Me[Re], k, j, G);
15652
15652
  }
15653
- function Qa(T, k, j, G) {
15654
- const Y = T.opaque, Me = T.transmissive, Re = T.transparent;
15653
+ function Qa(w, k, j, G) {
15654
+ const Y = w.opaque, Me = w.transmissive, Re = w.transparent;
15655
15655
  m.setupLightsView(j), me === !0 && Ee.setGlobalState(v.clippingPlanes, j), Me.length > 0 && gf(Y, Me, k, j), G && ne.viewport(E.copy(G)), Y.length > 0 && Or(Y, k, j), Me.length > 0 && Or(Me, k, j), Re.length > 0 && Or(Re, k, j), ne.buffers.depth.setTest(!0), ne.buffers.depth.setMask(!0), ne.buffers.color.setMask(!0), ne.setPolygonOffset(!1);
15656
15656
  }
15657
- function gf(T, k, j, G) {
15657
+ function gf(w, k, j, G) {
15658
15658
  const Y = ae.isWebGL2;
15659
15659
  Ae === null && (Ae = new di(1, 1, {
15660
15660
  generateMipmaps: !0,
15661
15661
  type: J.has("EXT_color_buffer_half_float") ? Sr : $n,
15662
15662
  minFilter: yr,
15663
15663
  samples: Y ? 4 : 0
15664
- })), v.getDrawingBufferSize(Te), Y ? Ae.setSize(Te.x, Te.y) : Ae.setSize(Is(Te.x), Is(Te.y));
15664
+ })), v.getDrawingBufferSize(we), Y ? Ae.setSize(we.x, we.y) : Ae.setSize(Is(we.x), Is(we.y));
15665
15665
  const Me = v.getRenderTarget();
15666
15666
  v.setRenderTarget(Ae), v.getClearColor(O), N = v.getClearAlpha(), N < 1 && v.setClearColor(16777215, 0.5), v.clear();
15667
15667
  const Re = v.toneMapping;
15668
- v.toneMapping = Xn, Or(T, j, G), Se.updateMultisampleRenderTarget(Ae), Se.updateRenderTargetMipmap(Ae);
15668
+ v.toneMapping = Xn, Or(w, j, G), Se.updateMultisampleRenderTarget(Ae), Se.updateRenderTargetMipmap(Ae);
15669
15669
  let Ie = !1;
15670
15670
  for (let Ue = 0, ke = k.length; Ue < ke; Ue++) {
15671
15671
  const Pe = k[Ue], Oe = Pe.object, ot = Pe.geometry, ct = Pe.material, Wt = Pe.group;
@@ -15676,45 +15676,45 @@ class Lh {
15676
15676
  }
15677
15677
  Ie === !0 && (Se.updateMultisampleRenderTarget(Ae), Se.updateRenderTargetMipmap(Ae)), v.setRenderTarget(Me), v.setClearColor(O, N), v.toneMapping = Re;
15678
15678
  }
15679
- function Or(T, k, j) {
15679
+ function Or(w, k, j) {
15680
15680
  const G = k.isScene === !0 ? k.overrideMaterial : null;
15681
- for (let Y = 0, Me = T.length; Y < Me; Y++) {
15682
- const Re = T[Y], Ie = Re.object, Ue = Re.geometry, ke = G === null ? Re.material : G, Pe = Re.group;
15681
+ for (let Y = 0, Me = w.length; Y < Me; Y++) {
15682
+ const Re = w[Y], Ie = Re.object, Ue = Re.geometry, ke = G === null ? Re.material : G, Pe = Re.group;
15683
15683
  Ie.layers.test(j.layers) && el(Ie, k, j, Ue, ke, Pe);
15684
15684
  }
15685
15685
  }
15686
- function el(T, k, j, G, Y, Me) {
15687
- T.onBeforeRender(v, k, j, G, Y, Me), T.modelViewMatrix.multiplyMatrices(j.matrixWorldInverse, T.matrixWorld), T.normalMatrix.getNormalMatrix(T.modelViewMatrix), Y.onBeforeRender(v, k, j, G, T, Me), Y.transparent === !0 && Y.side === Cn && Y.forceSinglePass === !1 ? (Y.side = Ot, Y.needsUpdate = !0, v.renderBufferDirect(j, k, G, Y, T, Me), Y.side = jn, Y.needsUpdate = !0, v.renderBufferDirect(j, k, G, Y, T, Me), Y.side = Cn) : v.renderBufferDirect(j, k, G, Y, T, Me), T.onAfterRender(v, k, j, G, Y, Me);
15686
+ function el(w, k, j, G, Y, Me) {
15687
+ w.onBeforeRender(v, k, j, G, Y, Me), w.modelViewMatrix.multiplyMatrices(j.matrixWorldInverse, w.matrixWorld), w.normalMatrix.getNormalMatrix(w.modelViewMatrix), Y.onBeforeRender(v, k, j, G, w, Me), Y.transparent === !0 && Y.side === Cn && Y.forceSinglePass === !1 ? (Y.side = Ot, Y.needsUpdate = !0, v.renderBufferDirect(j, k, G, Y, w, Me), Y.side = jn, Y.needsUpdate = !0, v.renderBufferDirect(j, k, G, Y, w, Me), Y.side = Cn) : v.renderBufferDirect(j, k, G, Y, w, Me), w.onAfterRender(v, k, j, G, Y, Me);
15688
15688
  }
15689
- function Fr(T, k, j) {
15689
+ function Fr(w, k, j) {
15690
15690
  k.isScene !== !0 && (k = Ze);
15691
- const G = ye.get(T), Y = m.state.lights, Me = m.state.shadowsArray, Re = Y.state.version, Ie = W.getParameters(T, Y.state, Me, k, j), Ue = W.getProgramCacheKey(Ie);
15691
+ const G = ye.get(w), Y = m.state.lights, Me = m.state.shadowsArray, Re = Y.state.version, Ie = W.getParameters(w, Y.state, Me, k, j), Ue = W.getProgramCacheKey(Ie);
15692
15692
  let ke = G.programs;
15693
- G.environment = T.isMeshStandardMaterial ? k.environment : null, G.fog = k.fog, G.envMap = (T.isMeshStandardMaterial ? ze : Le).get(T.envMap || G.environment), ke === void 0 && (T.addEventListener("dispose", fe), ke = /* @__PURE__ */ new Map(), G.programs = ke);
15693
+ G.environment = w.isMeshStandardMaterial ? k.environment : null, G.fog = k.fog, G.envMap = (w.isMeshStandardMaterial ? ze : Le).get(w.envMap || G.environment), ke === void 0 && (w.addEventListener("dispose", fe), ke = /* @__PURE__ */ new Map(), G.programs = ke);
15694
15694
  let Pe = ke.get(Ue);
15695
15695
  if (Pe !== void 0) {
15696
15696
  if (G.currentProgram === Pe && G.lightsStateVersion === Re)
15697
- return tl(T, Ie), Pe;
15697
+ return tl(w, Ie), Pe;
15698
15698
  } else
15699
- Ie.uniforms = W.getUniforms(T), T.onBuild(j, Ie, v), T.onBeforeCompile(Ie, v), Pe = W.acquireProgram(Ie, Ue), ke.set(Ue, Pe), G.uniforms = Ie.uniforms;
15699
+ Ie.uniforms = W.getUniforms(w), w.onBuild(j, Ie, v), w.onBeforeCompile(Ie, v), Pe = W.acquireProgram(Ie, Ue), ke.set(Ue, Pe), G.uniforms = Ie.uniforms;
15700
15700
  const Oe = G.uniforms;
15701
- (!T.isShaderMaterial && !T.isRawShaderMaterial || T.clipping === !0) && (Oe.clippingPlanes = Ee.uniform), tl(T, Ie), G.needsLights = xf(T), G.lightsStateVersion = Re, G.needsLights && (Oe.ambientLightColor.value = Y.state.ambient, Oe.lightProbe.value = Y.state.probe, Oe.directionalLights.value = Y.state.directional, Oe.directionalLightShadows.value = Y.state.directionalShadow, Oe.spotLights.value = Y.state.spot, Oe.spotLightShadows.value = Y.state.spotShadow, Oe.rectAreaLights.value = Y.state.rectArea, Oe.ltc_1.value = Y.state.rectAreaLTC1, Oe.ltc_2.value = Y.state.rectAreaLTC2, Oe.pointLights.value = Y.state.point, Oe.pointLightShadows.value = Y.state.pointShadow, Oe.hemisphereLights.value = Y.state.hemi, Oe.directionalShadowMap.value = Y.state.directionalShadowMap, Oe.directionalShadowMatrix.value = Y.state.directionalShadowMatrix, Oe.spotShadowMap.value = Y.state.spotShadowMap, Oe.spotLightMatrix.value = Y.state.spotLightMatrix, Oe.spotLightMap.value = Y.state.spotLightMap, Oe.pointShadowMap.value = Y.state.pointShadowMap, Oe.pointShadowMatrix.value = Y.state.pointShadowMatrix);
15701
+ (!w.isShaderMaterial && !w.isRawShaderMaterial || w.clipping === !0) && (Oe.clippingPlanes = Ee.uniform), tl(w, Ie), G.needsLights = xf(w), G.lightsStateVersion = Re, G.needsLights && (Oe.ambientLightColor.value = Y.state.ambient, Oe.lightProbe.value = Y.state.probe, Oe.directionalLights.value = Y.state.directional, Oe.directionalLightShadows.value = Y.state.directionalShadow, Oe.spotLights.value = Y.state.spot, Oe.spotLightShadows.value = Y.state.spotShadow, Oe.rectAreaLights.value = Y.state.rectArea, Oe.ltc_1.value = Y.state.rectAreaLTC1, Oe.ltc_2.value = Y.state.rectAreaLTC2, Oe.pointLights.value = Y.state.point, Oe.pointLightShadows.value = Y.state.pointShadow, Oe.hemisphereLights.value = Y.state.hemi, Oe.directionalShadowMap.value = Y.state.directionalShadowMap, Oe.directionalShadowMatrix.value = Y.state.directionalShadowMatrix, Oe.spotShadowMap.value = Y.state.spotShadowMap, Oe.spotLightMatrix.value = Y.state.spotLightMatrix, Oe.spotLightMap.value = Y.state.spotLightMap, Oe.pointShadowMap.value = Y.state.pointShadowMap, Oe.pointShadowMatrix.value = Y.state.pointShadowMatrix);
15702
15702
  const ot = Pe.getUniforms(), ct = Ss.seqWithValue(ot.seq, Oe);
15703
15703
  return G.currentProgram = Pe, G.uniformsList = ct, Pe;
15704
15704
  }
15705
- function tl(T, k) {
15706
- const j = ye.get(T);
15705
+ function tl(w, k) {
15706
+ const j = ye.get(w);
15707
15707
  j.outputColorSpace = k.outputColorSpace, j.instancing = k.instancing, j.instancingColor = k.instancingColor, j.skinning = k.skinning, j.morphTargets = k.morphTargets, j.morphNormals = k.morphNormals, j.morphColors = k.morphColors, j.morphTargetsCount = k.morphTargetsCount, j.numClippingPlanes = k.numClippingPlanes, j.numIntersection = k.numClipIntersection, j.vertexAlphas = k.vertexAlphas, j.vertexTangents = k.vertexTangents, j.toneMapping = k.toneMapping;
15708
15708
  }
15709
- function _f(T, k, j, G, Y) {
15709
+ function _f(w, k, j, G, Y) {
15710
15710
  k.isScene !== !0 && (k = Ze), Se.resetTextureUnits();
15711
- const Me = k.fog, Re = G.isMeshStandardMaterial ? k.environment : null, Ie = w === null ? v.outputColorSpace : w.isXRRenderTarget === !0 ? w.texture.colorSpace : gn, Ue = (G.isMeshStandardMaterial ? ze : Le).get(G.envMap || Re), ke = G.vertexColors === !0 && !!j.attributes.color && j.attributes.color.itemSize === 4, Pe = !!j.attributes.tangent && (!!G.normalMap || G.anisotropy > 0), Oe = !!j.morphAttributes.position, ot = !!j.morphAttributes.normal, ct = !!j.morphAttributes.color;
15711
+ const Me = k.fog, Re = G.isMeshStandardMaterial ? k.environment : null, Ie = T === null ? v.outputColorSpace : T.isXRRenderTarget === !0 ? T.texture.colorSpace : gn, Ue = (G.isMeshStandardMaterial ? ze : Le).get(G.envMap || Re), ke = G.vertexColors === !0 && !!j.attributes.color && j.attributes.color.itemSize === 4, Pe = !!j.attributes.tangent && (!!G.normalMap || G.anisotropy > 0), Oe = !!j.morphAttributes.position, ot = !!j.morphAttributes.normal, ct = !!j.morphAttributes.color;
15712
15712
  let Wt = Xn;
15713
- G.toneMapped && (w === null || w.isXRRenderTarget === !0) && (Wt = v.toneMapping);
15713
+ G.toneMapped && (T === null || T.isXRRenderTarget === !0) && (Wt = v.toneMapping);
15714
15714
  const yn = j.morphAttributes.position || j.morphAttributes.normal || j.morphAttributes.color, ft = yn !== void 0 ? yn.length : 0, Ge = ye.get(G), Qs = m.state.lights;
15715
- if (me === !0 && (ge === !0 || T !== x)) {
15716
- const Bt = T === x && G.id === U;
15717
- Ee.setState(G, T, Bt);
15715
+ if (me === !0 && (ge === !0 || w !== x)) {
15716
+ const Bt = w === x && G.id === U;
15717
+ Ee.setState(G, w, Bt);
15718
15718
  }
15719
15719
  let dt = !1;
15720
15720
  G.version === Ge.__version ? (Ge.needsLights && Ge.lightsStateVersion !== Qs.state.version || Ge.outputColorSpace !== Ie || Y.isInstancedMesh && Ge.instancing === !1 || !Y.isInstancedMesh && Ge.instancing === !0 || Y.isSkinnedMesh && Ge.skinning === !1 || !Y.isSkinnedMesh && Ge.skinning === !0 || Y.isInstancedMesh && Ge.instancingColor === !0 && Y.instanceColor === null || Y.isInstancedMesh && Ge.instancingColor === !1 && Y.instanceColor !== null || Ge.envMap !== Ue || G.fog === !0 && Ge.fog !== Me || Ge.numClippingPlanes !== void 0 && (Ge.numClippingPlanes !== Ee.numPlanes || Ge.numIntersection !== Ee.numIntersection) || Ge.vertexAlphas !== ke || Ge.vertexTangents !== Pe || Ge.morphTargets !== Oe || Ge.morphNormals !== ot || Ge.morphColors !== ct || Ge.toneMapping !== Wt || ae.isWebGL2 === !0 && Ge.morphTargetsCount !== ft) && (dt = !0) : (dt = !0, Ge.__version = G.version);
@@ -15722,14 +15722,14 @@ class Lh {
15722
15722
  dt === !0 && (Zn = Fr(G, k, Y));
15723
15723
  let nl = !1, tr = !1, eo = !1;
15724
15724
  const Rt = Zn.getUniforms(), Jn = Ge.uniforms;
15725
- if (ne.useProgram(Zn.program) && (nl = !0, tr = !0, eo = !0), G.id !== U && (U = G.id, tr = !0), nl || x !== T) {
15726
- Rt.setValue(L, "projectionMatrix", T.projectionMatrix), Rt.setValue(L, "viewMatrix", T.matrixWorldInverse);
15725
+ if (ne.useProgram(Zn.program) && (nl = !0, tr = !0, eo = !0), G.id !== U && (U = G.id, tr = !0), nl || x !== w) {
15726
+ Rt.setValue(L, "projectionMatrix", w.projectionMatrix), Rt.setValue(L, "viewMatrix", w.matrixWorldInverse);
15727
15727
  const Bt = Rt.map.cameraPosition;
15728
- Bt !== void 0 && Bt.setValue(L, Ve.setFromMatrixPosition(T.matrixWorld)), ae.logarithmicDepthBuffer && Rt.setValue(
15728
+ Bt !== void 0 && Bt.setValue(L, Ve.setFromMatrixPosition(w.matrixWorld)), ae.logarithmicDepthBuffer && Rt.setValue(
15729
15729
  L,
15730
15730
  "logDepthBufFC",
15731
- 2 / (Math.log(T.far + 1) / Math.LN2)
15732
- ), (G.isMeshPhongMaterial || G.isMeshToonMaterial || G.isMeshLambertMaterial || G.isMeshBasicMaterial || G.isMeshStandardMaterial || G.isShaderMaterial) && Rt.setValue(L, "isOrthographic", T.isOrthographicCamera === !0), x !== T && (x = T, tr = !0, eo = !0);
15731
+ 2 / (Math.log(w.far + 1) / Math.LN2)
15732
+ ), (G.isMeshPhongMaterial || G.isMeshToonMaterial || G.isMeshLambertMaterial || G.isMeshBasicMaterial || G.isMeshStandardMaterial || G.isShaderMaterial) && Rt.setValue(L, "isOrthographic", w.isOrthographicCamera === !0), x !== w && (x = w, tr = !0, eo = !0);
15733
15733
  }
15734
15734
  if (Y.isSkinnedMesh) {
15735
15735
  Rt.setOptional(L, Y, "bindMatrix"), Rt.setOptional(L, Y, "bindMatrixInverse");
@@ -15748,55 +15748,55 @@ class Lh {
15748
15748
  }
15749
15749
  return Zn;
15750
15750
  }
15751
- function vf(T, k) {
15752
- T.ambientLightColor.needsUpdate = k, T.lightProbe.needsUpdate = k, T.directionalLights.needsUpdate = k, T.directionalLightShadows.needsUpdate = k, T.pointLights.needsUpdate = k, T.pointLightShadows.needsUpdate = k, T.spotLights.needsUpdate = k, T.spotLightShadows.needsUpdate = k, T.rectAreaLights.needsUpdate = k, T.hemisphereLights.needsUpdate = k;
15751
+ function vf(w, k) {
15752
+ w.ambientLightColor.needsUpdate = k, w.lightProbe.needsUpdate = k, w.directionalLights.needsUpdate = k, w.directionalLightShadows.needsUpdate = k, w.pointLights.needsUpdate = k, w.pointLightShadows.needsUpdate = k, w.spotLights.needsUpdate = k, w.spotLightShadows.needsUpdate = k, w.rectAreaLights.needsUpdate = k, w.hemisphereLights.needsUpdate = k;
15753
15753
  }
15754
- function xf(T) {
15755
- return T.isMeshLambertMaterial || T.isMeshToonMaterial || T.isMeshPhongMaterial || T.isMeshStandardMaterial || T.isShadowMaterial || T.isShaderMaterial && T.lights === !0;
15754
+ function xf(w) {
15755
+ return w.isMeshLambertMaterial || w.isMeshToonMaterial || w.isMeshPhongMaterial || w.isMeshStandardMaterial || w.isShadowMaterial || w.isShaderMaterial && w.lights === !0;
15756
15756
  }
15757
15757
  this.getActiveCubeFace = function() {
15758
15758
  return b;
15759
15759
  }, this.getActiveMipmapLevel = function() {
15760
15760
  return R;
15761
15761
  }, this.getRenderTarget = function() {
15762
- return w;
15763
- }, this.setRenderTargetTextures = function(T, k, j) {
15764
- ye.get(T.texture).__webglTexture = k, ye.get(T.depthTexture).__webglTexture = j;
15765
- const G = ye.get(T);
15762
+ return T;
15763
+ }, this.setRenderTargetTextures = function(w, k, j) {
15764
+ ye.get(w.texture).__webglTexture = k, ye.get(w.depthTexture).__webglTexture = j;
15765
+ const G = ye.get(w);
15766
15766
  G.__hasExternalTextures = !0, G.__hasExternalTextures && (G.__autoAllocateDepthBuffer = j === void 0, G.__autoAllocateDepthBuffer || J.has("WEBGL_multisampled_render_to_texture") === !0 && (console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"), G.__useRenderToTexture = !1));
15767
- }, this.setRenderTargetFramebuffer = function(T, k) {
15768
- const j = ye.get(T);
15767
+ }, this.setRenderTargetFramebuffer = function(w, k) {
15768
+ const j = ye.get(w);
15769
15769
  j.__webglFramebuffer = k, j.__useDefaultFramebuffer = k === void 0;
15770
- }, this.setRenderTarget = function(T, k = 0, j = 0) {
15771
- w = T, b = k, R = j;
15770
+ }, this.setRenderTarget = function(w, k = 0, j = 0) {
15771
+ T = w, b = k, R = j;
15772
15772
  let G = !0, Y = null, Me = !1, Re = !1;
15773
- if (T) {
15774
- const Ue = ye.get(T);
15775
- Ue.__useDefaultFramebuffer !== void 0 ? (ne.bindFramebuffer(L.FRAMEBUFFER, null), G = !1) : Ue.__webglFramebuffer === void 0 ? Se.setupRenderTarget(T) : Ue.__hasExternalTextures && Se.rebindTextures(T, ye.get(T.texture).__webglTexture, ye.get(T.depthTexture).__webglTexture);
15776
- const ke = T.texture;
15773
+ if (w) {
15774
+ const Ue = ye.get(w);
15775
+ Ue.__useDefaultFramebuffer !== void 0 ? (ne.bindFramebuffer(L.FRAMEBUFFER, null), G = !1) : Ue.__webglFramebuffer === void 0 ? Se.setupRenderTarget(w) : Ue.__hasExternalTextures && Se.rebindTextures(w, ye.get(w.texture).__webglTexture, ye.get(w.depthTexture).__webglTexture);
15776
+ const ke = w.texture;
15777
15777
  (ke.isData3DTexture || ke.isDataArrayTexture || ke.isCompressedArrayTexture) && (Re = !0);
15778
- const Pe = ye.get(T).__webglFramebuffer;
15779
- T.isWebGLCubeRenderTarget ? (Array.isArray(Pe[k]) ? Y = Pe[k][j] : Y = Pe[k], Me = !0) : ae.isWebGL2 && T.samples > 0 && Se.useMultisampledRTT(T) === !1 ? Y = ye.get(T).__webglMultisampledFramebuffer : Array.isArray(Pe) ? Y = Pe[j] : Y = Pe, E.copy(T.viewport), F.copy(T.scissor), ee = T.scissorTest;
15778
+ const Pe = ye.get(w).__webglFramebuffer;
15779
+ w.isWebGLCubeRenderTarget ? (Array.isArray(Pe[k]) ? Y = Pe[k][j] : Y = Pe[k], Me = !0) : ae.isWebGL2 && w.samples > 0 && Se.useMultisampledRTT(w) === !1 ? Y = ye.get(w).__webglMultisampledFramebuffer : Array.isArray(Pe) ? Y = Pe[j] : Y = Pe, E.copy(w.viewport), F.copy(w.scissor), ee = w.scissorTest;
15780
15780
  } else
15781
15781
  E.copy(Q).multiplyScalar(H).floor(), F.copy(B).multiplyScalar(H).floor(), ee = q;
15782
- if (ne.bindFramebuffer(L.FRAMEBUFFER, Y) && ae.drawBuffers && G && ne.drawBuffers(T, Y), ne.viewport(E), ne.scissor(F), ne.setScissorTest(ee), Me) {
15783
- const Ue = ye.get(T.texture);
15782
+ if (ne.bindFramebuffer(L.FRAMEBUFFER, Y) && ae.drawBuffers && G && ne.drawBuffers(w, Y), ne.viewport(E), ne.scissor(F), ne.setScissorTest(ee), Me) {
15783
+ const Ue = ye.get(w.texture);
15784
15784
  L.framebufferTexture2D(L.FRAMEBUFFER, L.COLOR_ATTACHMENT0, L.TEXTURE_CUBE_MAP_POSITIVE_X + k, Ue.__webglTexture, j);
15785
15785
  } else if (Re) {
15786
- const Ue = ye.get(T.texture), ke = k || 0;
15786
+ const Ue = ye.get(w.texture), ke = k || 0;
15787
15787
  L.framebufferTextureLayer(L.FRAMEBUFFER, L.COLOR_ATTACHMENT0, Ue.__webglTexture, j || 0, ke);
15788
15788
  }
15789
15789
  U = -1;
15790
- }, this.readRenderTargetPixels = function(T, k, j, G, Y, Me, Re) {
15791
- if (!(T && T.isWebGLRenderTarget)) {
15790
+ }, this.readRenderTargetPixels = function(w, k, j, G, Y, Me, Re) {
15791
+ if (!(w && w.isWebGLRenderTarget)) {
15792
15792
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
15793
15793
  return;
15794
15794
  }
15795
- let Ie = ye.get(T).__webglFramebuffer;
15796
- if (T.isWebGLCubeRenderTarget && Re !== void 0 && (Ie = Ie[Re]), Ie) {
15795
+ let Ie = ye.get(w).__webglFramebuffer;
15796
+ if (w.isWebGLCubeRenderTarget && Re !== void 0 && (Ie = Ie[Re]), Ie) {
15797
15797
  ne.bindFramebuffer(L.FRAMEBUFFER, Ie);
15798
15798
  try {
15799
- const Ue = T.texture, ke = Ue.format, Pe = Ue.type;
15799
+ const Ue = w.texture, ke = Ue.format, Pe = Ue.type;
15800
15800
  if (ke !== rn && pe.convert(ke) !== L.getParameter(L.IMPLEMENTATION_COLOR_READ_FORMAT)) {
15801
15801
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
15802
15802
  return;
@@ -15808,24 +15808,24 @@ class Lh {
15808
15808
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
15809
15809
  return;
15810
15810
  }
15811
- k >= 0 && k <= T.width - G && j >= 0 && j <= T.height - Y && L.readPixels(k, j, G, Y, pe.convert(ke), pe.convert(Pe), Me);
15811
+ k >= 0 && k <= w.width - G && j >= 0 && j <= w.height - Y && L.readPixels(k, j, G, Y, pe.convert(ke), pe.convert(Pe), Me);
15812
15812
  } finally {
15813
- const Ue = w !== null ? ye.get(w).__webglFramebuffer : null;
15813
+ const Ue = T !== null ? ye.get(T).__webglFramebuffer : null;
15814
15814
  ne.bindFramebuffer(L.FRAMEBUFFER, Ue);
15815
15815
  }
15816
15816
  }
15817
- }, this.copyFramebufferToTexture = function(T, k, j = 0) {
15817
+ }, this.copyFramebufferToTexture = function(w, k, j = 0) {
15818
15818
  const G = Math.pow(2, -j), Y = Math.floor(k.image.width * G), Me = Math.floor(k.image.height * G);
15819
- Se.setTexture2D(k, 0), L.copyTexSubImage2D(L.TEXTURE_2D, j, 0, 0, T.x, T.y, Y, Me), ne.unbindTexture();
15820
- }, this.copyTextureToTexture = function(T, k, j, G = 0) {
15819
+ Se.setTexture2D(k, 0), L.copyTexSubImage2D(L.TEXTURE_2D, j, 0, 0, w.x, w.y, Y, Me), ne.unbindTexture();
15820
+ }, this.copyTextureToTexture = function(w, k, j, G = 0) {
15821
15821
  const Y = k.image.width, Me = k.image.height, Re = pe.convert(j.format), Ie = pe.convert(j.type);
15822
- Se.setTexture2D(j, 0), L.pixelStorei(L.UNPACK_FLIP_Y_WEBGL, j.flipY), L.pixelStorei(L.UNPACK_PREMULTIPLY_ALPHA_WEBGL, j.premultiplyAlpha), L.pixelStorei(L.UNPACK_ALIGNMENT, j.unpackAlignment), k.isDataTexture ? L.texSubImage2D(L.TEXTURE_2D, G, T.x, T.y, Y, Me, Re, Ie, k.image.data) : k.isCompressedTexture ? L.compressedTexSubImage2D(L.TEXTURE_2D, G, T.x, T.y, k.mipmaps[0].width, k.mipmaps[0].height, Re, k.mipmaps[0].data) : L.texSubImage2D(L.TEXTURE_2D, G, T.x, T.y, Re, Ie, k.image), G === 0 && j.generateMipmaps && L.generateMipmap(L.TEXTURE_2D), ne.unbindTexture();
15823
- }, this.copyTextureToTexture3D = function(T, k, j, G, Y = 0) {
15822
+ Se.setTexture2D(j, 0), L.pixelStorei(L.UNPACK_FLIP_Y_WEBGL, j.flipY), L.pixelStorei(L.UNPACK_PREMULTIPLY_ALPHA_WEBGL, j.premultiplyAlpha), L.pixelStorei(L.UNPACK_ALIGNMENT, j.unpackAlignment), k.isDataTexture ? L.texSubImage2D(L.TEXTURE_2D, G, w.x, w.y, Y, Me, Re, Ie, k.image.data) : k.isCompressedTexture ? L.compressedTexSubImage2D(L.TEXTURE_2D, G, w.x, w.y, k.mipmaps[0].width, k.mipmaps[0].height, Re, k.mipmaps[0].data) : L.texSubImage2D(L.TEXTURE_2D, G, w.x, w.y, Re, Ie, k.image), G === 0 && j.generateMipmaps && L.generateMipmap(L.TEXTURE_2D), ne.unbindTexture();
15823
+ }, this.copyTextureToTexture3D = function(w, k, j, G, Y = 0) {
15824
15824
  if (v.isWebGL1Renderer) {
15825
15825
  console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");
15826
15826
  return;
15827
15827
  }
15828
- const Me = T.max.x - T.min.x + 1, Re = T.max.y - T.min.y + 1, Ie = T.max.z - T.min.z + 1, Ue = pe.convert(G.format), ke = pe.convert(G.type);
15828
+ const Me = w.max.x - w.min.x + 1, Re = w.max.y - w.min.y + 1, Ie = w.max.z - w.min.z + 1, Ue = pe.convert(G.format), ke = pe.convert(G.type);
15829
15829
  let Pe;
15830
15830
  if (G.isData3DTexture)
15831
15831
  Se.setTexture3D(G, 0), Pe = L.TEXTURE_3D;
@@ -15837,11 +15837,11 @@ class Lh {
15837
15837
  }
15838
15838
  L.pixelStorei(L.UNPACK_FLIP_Y_WEBGL, G.flipY), L.pixelStorei(L.UNPACK_PREMULTIPLY_ALPHA_WEBGL, G.premultiplyAlpha), L.pixelStorei(L.UNPACK_ALIGNMENT, G.unpackAlignment);
15839
15839
  const Oe = L.getParameter(L.UNPACK_ROW_LENGTH), ot = L.getParameter(L.UNPACK_IMAGE_HEIGHT), ct = L.getParameter(L.UNPACK_SKIP_PIXELS), Wt = L.getParameter(L.UNPACK_SKIP_ROWS), yn = L.getParameter(L.UNPACK_SKIP_IMAGES), ft = j.isCompressedTexture ? j.mipmaps[0] : j.image;
15840
- L.pixelStorei(L.UNPACK_ROW_LENGTH, ft.width), L.pixelStorei(L.UNPACK_IMAGE_HEIGHT, ft.height), L.pixelStorei(L.UNPACK_SKIP_PIXELS, T.min.x), L.pixelStorei(L.UNPACK_SKIP_ROWS, T.min.y), L.pixelStorei(L.UNPACK_SKIP_IMAGES, T.min.z), j.isDataTexture || j.isData3DTexture ? L.texSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft.data) : j.isCompressedArrayTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), L.compressedTexSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ft.data)) : L.texSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft), L.pixelStorei(L.UNPACK_ROW_LENGTH, Oe), L.pixelStorei(L.UNPACK_IMAGE_HEIGHT, ot), L.pixelStorei(L.UNPACK_SKIP_PIXELS, ct), L.pixelStorei(L.UNPACK_SKIP_ROWS, Wt), L.pixelStorei(L.UNPACK_SKIP_IMAGES, yn), Y === 0 && G.generateMipmaps && L.generateMipmap(Pe), ne.unbindTexture();
15841
- }, this.initTexture = function(T) {
15842
- T.isCubeTexture ? Se.setTextureCube(T, 0) : T.isData3DTexture ? Se.setTexture3D(T, 0) : T.isDataArrayTexture || T.isCompressedArrayTexture ? Se.setTexture2DArray(T, 0) : Se.setTexture2D(T, 0), ne.unbindTexture();
15840
+ L.pixelStorei(L.UNPACK_ROW_LENGTH, ft.width), L.pixelStorei(L.UNPACK_IMAGE_HEIGHT, ft.height), L.pixelStorei(L.UNPACK_SKIP_PIXELS, w.min.x), L.pixelStorei(L.UNPACK_SKIP_ROWS, w.min.y), L.pixelStorei(L.UNPACK_SKIP_IMAGES, w.min.z), j.isDataTexture || j.isData3DTexture ? L.texSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft.data) : j.isCompressedArrayTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), L.compressedTexSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ft.data)) : L.texSubImage3D(Pe, Y, k.x, k.y, k.z, Me, Re, Ie, Ue, ke, ft), L.pixelStorei(L.UNPACK_ROW_LENGTH, Oe), L.pixelStorei(L.UNPACK_IMAGE_HEIGHT, ot), L.pixelStorei(L.UNPACK_SKIP_PIXELS, ct), L.pixelStorei(L.UNPACK_SKIP_ROWS, Wt), L.pixelStorei(L.UNPACK_SKIP_IMAGES, yn), Y === 0 && G.generateMipmaps && L.generateMipmap(Pe), ne.unbindTexture();
15841
+ }, this.initTexture = function(w) {
15842
+ w.isCubeTexture ? Se.setTextureCube(w, 0) : w.isData3DTexture ? Se.setTexture3D(w, 0) : w.isDataArrayTexture || w.isCompressedArrayTexture ? Se.setTexture2DArray(w, 0) : Se.setTexture2D(w, 0), ne.unbindTexture();
15843
15843
  }, this.resetState = function() {
15844
- b = 0, R = 0, w = null, ne.reset(), ve.reset();
15844
+ b = 0, R = 0, T = null, ne.reset(), ve.reset();
15845
15845
  }, typeof __THREE_DEVTOOLS__ != "undefined" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
15846
15846
  }
15847
15847
  get coordinateSystem() {
@@ -16734,13 +16734,13 @@ const cy = {
16734
16734
  };
16735
16735
  function Oh(n, e, t, i, r) {
16736
16736
  let s, o;
16737
- if (r === Ty(n, e, t, i) > 0)
16737
+ if (r === wy(n, e, t, i) > 0)
16738
16738
  for (s = e; s < t; s += i)
16739
16739
  o = Yc(s, n[s], n[s + 1], o);
16740
16740
  else
16741
16741
  for (s = t - i; s >= e; s -= i)
16742
16742
  o = Yc(s, n[s], n[s + 1], o);
16743
- return o && $s(o, o.next) && (Tr(o), o = o.next), o;
16743
+ return o && $s(o, o.next) && (wr(o), o = o.next), o;
16744
16744
  }
16745
16745
  function mi(n, e) {
16746
16746
  if (!n)
@@ -16749,7 +16749,7 @@ function mi(n, e) {
16749
16749
  let t = n, i;
16750
16750
  do
16751
16751
  if (i = !1, !t.steiner && ($s(t, t.next) || st(t.prev, t, t.next) === 0)) {
16752
- if (Tr(t), t = e = t.prev, t === t.next)
16752
+ if (wr(t), t = e = t.prev, t === t.next)
16753
16753
  break;
16754
16754
  i = !0;
16755
16755
  } else
@@ -16764,7 +16764,7 @@ function Er(n, e, t, i, r, s, o) {
16764
16764
  let a = n, l, c;
16765
16765
  for (; n.prev !== n.next; ) {
16766
16766
  if (l = n.prev, c = n.next, s ? hy(n, i, r, s) : uy(n)) {
16767
- e.push(l.i / t | 0), e.push(n.i / t | 0), e.push(c.i / t | 0), Tr(n), n = c.next, a = c.next;
16767
+ e.push(l.i / t | 0), e.push(n.i / t | 0), e.push(c.i / t | 0), wr(n), n = c.next, a = c.next;
16768
16768
  continue;
16769
16769
  }
16770
16770
  if (n = c, n === a) {
@@ -16813,7 +16813,7 @@ function fy(n, e, t) {
16813
16813
  let i = n;
16814
16814
  do {
16815
16815
  const r = i.prev, s = i.next.next;
16816
- !$s(r, s) && Fh(r, i, i.next, s) && br(r, s) && br(s, r) && (e.push(r.i / t | 0), e.push(i.i / t | 0), e.push(s.i / t | 0), Tr(i), Tr(i.next), i = n = s), i = i.next;
16816
+ !$s(r, s) && Fh(r, i, i.next, s) && br(r, s) && br(s, r) && (e.push(r.i / t | 0), e.push(i.i / t | 0), e.push(s.i / t | 0), wr(i), wr(i.next), i = n = s), i = i.next;
16817
16817
  } while (i !== n);
16818
16818
  return mi(i);
16819
16819
  }
@@ -16959,13 +16959,13 @@ function Yc(n, e, t, i) {
16959
16959
  const r = new ua(n, e, t);
16960
16960
  return i ? (r.next = i.next, r.prev = i, i.next.prev = r, i.next = r) : (r.prev = r, r.next = r), r;
16961
16961
  }
16962
- function Tr(n) {
16962
+ function wr(n) {
16963
16963
  n.next.prev = n.prev, n.prev.next = n.next, n.prevZ && (n.prevZ.nextZ = n.nextZ), n.nextZ && (n.nextZ.prevZ = n.prevZ);
16964
16964
  }
16965
16965
  function ua(n, e, t) {
16966
16966
  this.i = n, this.x = e, this.y = t, this.prev = null, this.next = null, this.z = 0, this.prevZ = null, this.nextZ = null, this.steiner = !1;
16967
16967
  }
16968
- function Ty(n, e, t, i) {
16968
+ function wy(n, e, t, i) {
16969
16969
  let r = 0;
16970
16970
  for (let s = e, o = t - i; s < t; s += i)
16971
16971
  r += (n[o] - n[s]) * (n[s + 1] + n[o + 1]), o = s;
@@ -17019,9 +17019,9 @@ class ka extends _n {
17019
17019
  function o(a) {
17020
17020
  const l = [], c = t.curveSegments !== void 0 ? t.curveSegments : 12, u = t.steps !== void 0 ? t.steps : 1, h = t.depth !== void 0 ? t.depth : 1;
17021
17021
  let f = t.bevelEnabled !== void 0 ? t.bevelEnabled : !0, d = t.bevelThickness !== void 0 ? t.bevelThickness : 0.2, g = t.bevelSize !== void 0 ? t.bevelSize : d - 0.1, _ = t.bevelOffset !== void 0 ? t.bevelOffset : 0, m = t.bevelSegments !== void 0 ? t.bevelSegments : 3;
17022
- const p = t.extrudePath, y = t.UVGenerator !== void 0 ? t.UVGenerator : wy;
17023
- let v, M = !1, b, R, w, U;
17024
- p && (v = p.getSpacedPoints(u), M = !0, f = !1, b = p.computeFrenetFrames(u, !1), R = new D(), w = new D(), U = new D()), f || (m = 0, d = 0, g = 0, _ = 0);
17022
+ const p = t.extrudePath, y = t.UVGenerator !== void 0 ? t.UVGenerator : Ty;
17023
+ let v, M = !1, b, R, T, U;
17024
+ p && (v = p.getSpacedPoints(u), M = !0, f = !1, b = p.computeFrenetFrames(u, !1), R = new D(), T = new D(), U = new D()), f || (m = 0, d = 0, g = 0, _ = 0);
17025
17025
  const x = a.extractPoints(c);
17026
17026
  let E = x.shape;
17027
17027
  const F = x.holes;
@@ -17073,39 +17073,39 @@ class ka extends _n {
17073
17073
  const he = L / m, J = d * Math.cos(he * Math.PI / 2), ae = g * Math.sin(he * Math.PI / 2) + _;
17074
17074
  for (let ne = 0, be = N.length; ne < be; ne++) {
17075
17075
  const ye = C(N[ne], K[ne], ae);
17076
- we(ye.x, ye.y, -J);
17076
+ Te(ye.x, ye.y, -J);
17077
17077
  }
17078
17078
  for (let ne = 0, be = F.length; ne < be; ne++) {
17079
17079
  const ye = F[ne];
17080
17080
  B = Q[ne];
17081
17081
  for (let Se = 0, Le = ye.length; Se < Le; Se++) {
17082
17082
  const ze = C(ye[Se], B[Se], ae);
17083
- we(ze.x, ze.y, -J);
17083
+ Te(ze.x, ze.y, -J);
17084
17084
  }
17085
17085
  }
17086
17086
  }
17087
17087
  const oe = g + _;
17088
17088
  for (let L = 0; L < z; L++) {
17089
17089
  const he = f ? C(E[L], q[L], oe) : E[L];
17090
- M ? (w.copy(b.normals[0]).multiplyScalar(he.x), R.copy(b.binormals[0]).multiplyScalar(he.y), U.copy(v[0]).add(w).add(R), we(U.x, U.y, U.z)) : we(he.x, he.y, 0);
17090
+ M ? (T.copy(b.normals[0]).multiplyScalar(he.x), R.copy(b.binormals[0]).multiplyScalar(he.y), U.copy(v[0]).add(T).add(R), Te(U.x, U.y, U.z)) : Te(he.x, he.y, 0);
17091
17091
  }
17092
17092
  for (let L = 1; L <= u; L++)
17093
17093
  for (let he = 0; he < z; he++) {
17094
17094
  const J = f ? C(E[he], q[he], oe) : E[he];
17095
- M ? (w.copy(b.normals[L]).multiplyScalar(J.x), R.copy(b.binormals[L]).multiplyScalar(J.y), U.copy(v[L]).add(w).add(R), we(U.x, U.y, U.z)) : we(J.x, J.y, h / u * L);
17095
+ M ? (T.copy(b.normals[L]).multiplyScalar(J.x), R.copy(b.binormals[L]).multiplyScalar(J.y), U.copy(v[L]).add(T).add(R), Te(U.x, U.y, U.z)) : Te(J.x, J.y, h / u * L);
17096
17096
  }
17097
17097
  for (let L = m - 1; L >= 0; L--) {
17098
17098
  const he = L / m, J = d * Math.cos(he * Math.PI / 2), ae = g * Math.sin(he * Math.PI / 2) + _;
17099
17099
  for (let ne = 0, be = N.length; ne < be; ne++) {
17100
17100
  const ye = C(N[ne], K[ne], ae);
17101
- we(ye.x, ye.y, h + J);
17101
+ Te(ye.x, ye.y, h + J);
17102
17102
  }
17103
17103
  for (let ne = 0, be = F.length; ne < be; ne++) {
17104
17104
  const ye = F[ne];
17105
17105
  B = Q[ne];
17106
17106
  for (let Se = 0, Le = ye.length; Se < Le; Se++) {
17107
17107
  const ze = C(ye[Se], B[Se], ae);
17108
- M ? we(ze.x, ze.y + v[u - 1].y, v[u - 1].x + J) : we(ze.x, ze.y, h + J);
17108
+ M ? Te(ze.x, ze.y + v[u - 1].y, v[u - 1].x + J) : Te(ze.x, ze.y, h + J);
17109
17109
  }
17110
17110
  }
17111
17111
  }
@@ -17116,21 +17116,21 @@ class ka extends _n {
17116
17116
  let he = 0, J = z * he;
17117
17117
  for (let ae = 0; ae < H; ae++) {
17118
17118
  const ne = O[ae];
17119
- Te(ne[2] + J, ne[1] + J, ne[0] + J);
17119
+ we(ne[2] + J, ne[1] + J, ne[0] + J);
17120
17120
  }
17121
17121
  he = u + m * 2, J = z * he;
17122
17122
  for (let ae = 0; ae < H; ae++) {
17123
17123
  const ne = O[ae];
17124
- Te(ne[0] + J, ne[1] + J, ne[2] + J);
17124
+ we(ne[0] + J, ne[1] + J, ne[2] + J);
17125
17125
  }
17126
17126
  } else {
17127
17127
  for (let he = 0; he < H; he++) {
17128
17128
  const J = O[he];
17129
- Te(J[2], J[1], J[0]);
17129
+ we(J[2], J[1], J[0]);
17130
17130
  }
17131
17131
  for (let he = 0; he < H; he++) {
17132
17132
  const J = O[he];
17133
- Te(J[0] + z * u, J[1] + z * u, J[2] + z * u);
17133
+ we(J[0] + z * u, J[1] + z * u, J[2] + z * u);
17134
17134
  }
17135
17135
  }
17136
17136
  i.addGroup(L, r.length / 3 - L, 0);
@@ -17157,10 +17157,10 @@ class ka extends _n {
17157
17157
  }
17158
17158
  }
17159
17159
  }
17160
- function we(L, he, J) {
17160
+ function Te(L, he, J) {
17161
17161
  l.push(L), l.push(he), l.push(J);
17162
17162
  }
17163
- function Te(L, he, J) {
17163
+ function we(L, he, J) {
17164
17164
  Ze(L), Ze(he), Ze(J);
17165
17165
  const ae = r.length / 3, ne = y.generateTopUV(i, r, ae - 3, ae - 2, ae - 1);
17166
17166
  Ce(ne[0]), Ce(ne[1]), Ce(ne[2]);
@@ -17195,7 +17195,7 @@ class ka extends _n {
17195
17195
  return r !== void 0 && (e.options.extrudePath = new Uh[r.type]().fromJSON(r)), new ka(i, e.options);
17196
17196
  }
17197
17197
  }
17198
- const wy = {
17198
+ const Ty = {
17199
17199
  generateTopUV: function(n, e, t, i, r) {
17200
17200
  const s = e[t * 3], o = e[t * 3 + 1], a = e[i * 3], l = e[i * 3 + 1], c = e[r * 3], u = e[r * 3 + 1];
17201
17201
  return [
@@ -17607,7 +17607,7 @@ class By extends gi {
17607
17607
  let c = 1;
17608
17608
  const u = new D(), h = new ue(), f = new ue(), d = new ue(), g = new ue(), _ = new ue(), m = new ue(), p = new ue(), y = new ue(), v = new ue(), M = new D(), b = new ue();
17609
17609
  let R = !1;
17610
- const w = [], U = {};
17610
+ const T = [], U = {};
17611
17611
  function x(P) {
17612
17612
  return P !== null ? 2 * Math.PI / 60 * i.autoRotateSpeed * P : 2 * Math.PI / 60 / 60 * i.autoRotateSpeed;
17613
17613
  }
@@ -17682,7 +17682,7 @@ class By extends gi {
17682
17682
  function Ae(P) {
17683
17683
  V(P), P.deltaY < 0 ? H(E()) : P.deltaY > 0 && z(E()), i.update();
17684
17684
  }
17685
- function we(P) {
17685
+ function Te(P) {
17686
17686
  let te = !1;
17687
17687
  switch (P.code) {
17688
17688
  case i.keys.UP:
@@ -17700,34 +17700,34 @@ class By extends gi {
17700
17700
  }
17701
17701
  te && (P.preventDefault(), i.update());
17702
17702
  }
17703
- function Te() {
17704
- if (w.length === 1)
17705
- h.set(w[0].pageX, w[0].pageY);
17703
+ function we() {
17704
+ if (T.length === 1)
17705
+ h.set(T[0].pageX, T[0].pageY);
17706
17706
  else {
17707
- const P = 0.5 * (w[0].pageX + w[1].pageX), te = 0.5 * (w[0].pageY + w[1].pageY);
17707
+ const P = 0.5 * (T[0].pageX + T[1].pageX), te = 0.5 * (T[0].pageY + T[1].pageY);
17708
17708
  h.set(P, te);
17709
17709
  }
17710
17710
  }
17711
17711
  function Ve() {
17712
- if (w.length === 1)
17713
- g.set(w[0].pageX, w[0].pageY);
17712
+ if (T.length === 1)
17713
+ g.set(T[0].pageX, T[0].pageY);
17714
17714
  else {
17715
- const P = 0.5 * (w[0].pageX + w[1].pageX), te = 0.5 * (w[0].pageY + w[1].pageY);
17715
+ const P = 0.5 * (T[0].pageX + T[1].pageX), te = 0.5 * (T[0].pageY + T[1].pageY);
17716
17716
  g.set(P, te);
17717
17717
  }
17718
17718
  }
17719
17719
  function Ze() {
17720
- const P = w[0].pageX - w[1].pageX, te = w[0].pageY - w[1].pageY, xe = Math.sqrt(P * P + te * te);
17720
+ const P = T[0].pageX - T[1].pageX, te = T[0].pageY - T[1].pageY, xe = Math.sqrt(P * P + te * te);
17721
17721
  p.set(0, xe);
17722
17722
  }
17723
17723
  function Ce() {
17724
17724
  i.enableZoom && Ze(), i.enablePan && Ve();
17725
17725
  }
17726
17726
  function L() {
17727
- i.enableZoom && Ze(), i.enableRotate && Te();
17727
+ i.enableZoom && Ze(), i.enableRotate && we();
17728
17728
  }
17729
17729
  function he(P) {
17730
- if (w.length == 1)
17730
+ if (T.length == 1)
17731
17731
  f.set(P.pageX, P.pageY);
17732
17732
  else {
17733
17733
  const xe = X(P), pe = 0.5 * (P.pageX + xe.x), ve = 0.5 * (P.pageY + xe.y);
@@ -17738,7 +17738,7 @@ class By extends gi {
17738
17738
  F(2 * Math.PI * d.x / te.clientHeight), ee(2 * Math.PI * d.y / te.clientHeight), h.copy(f);
17739
17739
  }
17740
17740
  function J(P) {
17741
- if (w.length === 1)
17741
+ if (T.length === 1)
17742
17742
  _.set(P.pageX, P.pageY);
17743
17743
  else {
17744
17744
  const te = X(P), xe = 0.5 * (P.pageX + te.x), pe = 0.5 * (P.pageY + te.y);
@@ -17757,13 +17757,13 @@ class By extends gi {
17757
17757
  i.enableZoom && ae(P), i.enableRotate && he(P);
17758
17758
  }
17759
17759
  function ye(P) {
17760
- i.enabled !== !1 && (w.length === 0 && (i.domElement.setPointerCapture(P.pointerId), i.domElement.addEventListener("pointermove", Se), i.domElement.addEventListener("pointerup", Le)), le(P), P.pointerType === "touch" ? W(P) : ze(P));
17760
+ i.enabled !== !1 && (T.length === 0 && (i.domElement.setPointerCapture(P.pointerId), i.domElement.addEventListener("pointermove", Se), i.domElement.addEventListener("pointerup", Le)), le(P), P.pointerType === "touch" ? W(P) : ze(P));
17761
17761
  }
17762
17762
  function Se(P) {
17763
17763
  i.enabled !== !1 && (P.pointerType === "touch" ? se(P) : tt(P));
17764
17764
  }
17765
17765
  function Le(P) {
17766
- Ee(P), w.length === 0 && (i.domElement.releasePointerCapture(P.pointerId), i.domElement.removeEventListener("pointermove", Se), i.domElement.removeEventListener("pointerup", Le)), i.dispatchEvent(ou), s = r.NONE;
17766
+ Ee(P), T.length === 0 && (i.domElement.releasePointerCapture(P.pointerId), i.domElement.removeEventListener("pointermove", Se), i.domElement.removeEventListener("pointerup", Le)), i.dispatchEvent(ou), s = r.NONE;
17767
17767
  }
17768
17768
  function ze(P) {
17769
17769
  let te;
@@ -17836,16 +17836,16 @@ class By extends gi {
17836
17836
  i.enabled === !1 || i.enableZoom === !1 || s !== r.NONE || (P.preventDefault(), i.dispatchEvent(zo), Ae(P), i.dispatchEvent(ou));
17837
17837
  }
17838
17838
  function S(P) {
17839
- i.enabled === !1 || i.enablePan === !1 || we(P);
17839
+ i.enabled === !1 || i.enablePan === !1 || Te(P);
17840
17840
  }
17841
17841
  function W(P) {
17842
- switch (ce(P), w.length) {
17842
+ switch (ce(P), T.length) {
17843
17843
  case 1:
17844
17844
  switch (i.touches.ONE) {
17845
17845
  case _i.ROTATE:
17846
17846
  if (i.enableRotate === !1)
17847
17847
  return;
17848
- Te(), s = r.TOUCH_ROTATE;
17848
+ we(), s = r.TOUCH_ROTATE;
17849
17849
  break;
17850
17850
  case _i.PAN:
17851
17851
  if (i.enablePan === !1)
@@ -17907,13 +17907,13 @@ class By extends gi {
17907
17907
  i.enabled !== !1 && P.preventDefault();
17908
17908
  }
17909
17909
  function le(P) {
17910
- w.push(P);
17910
+ T.push(P);
17911
17911
  }
17912
17912
  function Ee(P) {
17913
17913
  delete U[P.pointerId];
17914
- for (let te = 0; te < w.length; te++)
17915
- if (w[te].pointerId == P.pointerId) {
17916
- w.splice(te, 1);
17914
+ for (let te = 0; te < T.length; te++)
17915
+ if (T[te].pointerId == P.pointerId) {
17916
+ T.splice(te, 1);
17917
17917
  return;
17918
17918
  }
17919
17919
  }
@@ -17922,7 +17922,7 @@ class By extends gi {
17922
17922
  te === void 0 && (te = new ue(), U[P.pointerId] = te), te.set(P.pageX, P.pageY);
17923
17923
  }
17924
17924
  function X(P) {
17925
- const te = P.pointerId === w[0].pointerId ? w[1] : w[0];
17925
+ const te = P.pointerId === T[0].pointerId ? T[1] : T[0];
17926
17926
  return U[te.pointerId];
17927
17927
  }
17928
17928
  i.domElement.addEventListener("contextmenu", ie), i.domElement.addEventListener("pointerdown", ye), i.domElement.addEventListener("pointercancel", Le), i.domElement.addEventListener("wheel", A, { passive: !1 }), this.update();
@@ -18730,7 +18730,7 @@ function* Xy(n) {
18730
18730
  function kh(n) {
18731
18731
  return Array.from(Xy(n));
18732
18732
  }
18733
- var Qe = 1e-6, $y = 1e-12, Xe = Math.PI, Nt = Xe / 2, _u = Xe / 4, Kt = Xe * 2, Gt = 180 / Xe, mt = Xe / 180, lt = Math.abs, Gh = Math.atan, wr = Math.atan2, ut = Math.cos, qy = Math.exp, jy = Math.log, ht = Math.sin, Yy = Math.sign || function(n) {
18733
+ var Qe = 1e-6, $y = 1e-12, Xe = Math.PI, Nt = Xe / 2, _u = Xe / 4, Kt = Xe * 2, Gt = 180 / Xe, mt = Xe / 180, lt = Math.abs, Gh = Math.atan, Tr = Math.atan2, ut = Math.cos, qy = Math.exp, jy = Math.log, ht = Math.sin, Yy = Math.sign || function(n) {
18734
18734
  return n > 0 ? 1 : n < 0 ? -1 : 0;
18735
18735
  }, qs = Math.sqrt, Ky = Math.tan;
18736
18736
  function Zy(n) {
@@ -18798,7 +18798,7 @@ function Jy(n, e) {
18798
18798
  n && vu.hasOwnProperty(n.type) ? vu[n.type](n, e) : Ns(n, e);
18799
18799
  }
18800
18800
  function pa(n) {
18801
- return [wr(n[1], n[0]), Ar(n[2])];
18801
+ return [Tr(n[1], n[0]), Ar(n[2])];
18802
18802
  }
18803
18803
  function ji(n) {
18804
18804
  var e = n[0], t = n[1], i = ut(t);
@@ -18849,14 +18849,14 @@ function Eu(n, e) {
18849
18849
  function o(a, l) {
18850
18850
  var c = ut(l), u = ut(a) * c, h = ht(a) * c, f = ht(l), d = f * t + u * i;
18851
18851
  return [
18852
- wr(h * r - d * s, u * t - f * i),
18852
+ Tr(h * r - d * s, u * t - f * i),
18853
18853
  Ar(d * r + h * s)
18854
18854
  ];
18855
18855
  }
18856
18856
  return o.invert = function(a, l) {
18857
18857
  var c = ut(l), u = ut(a) * c, h = ht(a) * c, f = ht(l), d = f * r - h * s;
18858
18858
  return [
18859
- wr(h * r + f * s, u * t + d * i),
18859
+ Tr(h * r + f * s, u * t + d * i),
18860
18860
  Ar(d * t - u * i)
18861
18861
  ];
18862
18862
  }, o;
@@ -18925,7 +18925,7 @@ function Xh(n, e, t, i, r) {
18925
18925
  s.push(y = new vs(m, g, null, !0)), o.push(y.o = new vs(m, null, y, !1)), s.push(y = new vs(p, g, null, !1)), o.push(y.o = new vs(p, null, y, !0));
18926
18926
  }
18927
18927
  }), !!s.length) {
18928
- for (o.sort(e), Tu(s), Tu(o), a = 0, l = o.length; a < l; ++a)
18928
+ for (o.sort(e), wu(s), wu(o), a = 0, l = o.length; a < l; ++a)
18929
18929
  o[a].e = t = !t;
18930
18930
  for (var c = s[0], u, h; ; ) {
18931
18931
  for (var f = c, d = !0; f.v; )
@@ -18954,7 +18954,7 @@ function Xh(n, e, t, i, r) {
18954
18954
  }
18955
18955
  }
18956
18956
  }
18957
- function Tu(n) {
18957
+ function wu(n) {
18958
18958
  if (e = n.length) {
18959
18959
  for (var e, t = 0, i = n[0], r; ++t < e; )
18960
18960
  i.n = r = n[t], r.p = i, i = r;
@@ -18969,9 +18969,9 @@ function tS(n, e) {
18969
18969
  r === 1 ? i = Nt + Qe : r === -1 && (i = -Nt - Qe);
18970
18970
  for (var c = 0, u = n.length; c < u; ++c)
18971
18971
  if (f = (h = n[c]).length)
18972
- for (var h, f, d = h[f - 1], g = Wo(d), _ = d[1] / 2 + _u, m = ht(_), p = ut(_), y = 0; y < f; ++y, g = M, m = R, p = w, d = v) {
18973
- var v = h[y], M = Wo(v), b = v[1] / 2 + _u, R = ht(b), w = ut(b), U = M - g, x = U >= 0 ? 1 : -1, E = x * U, F = E > Xe, ee = m * R;
18974
- if (l.add(wr(ee * x * ht(E), p * w + ee * ut(E))), o += F ? U + x * Kt : U, F ^ g >= t ^ M >= t) {
18972
+ for (var h, f, d = h[f - 1], g = Wo(d), _ = d[1] / 2 + _u, m = ht(_), p = ut(_), y = 0; y < f; ++y, g = M, m = R, p = T, d = v) {
18973
+ var v = h[y], M = Wo(v), b = v[1] / 2 + _u, R = ht(b), T = ut(b), U = M - g, x = U >= 0 ? 1 : -1, E = x * U, F = E > Xe, ee = m * R;
18974
+ if (l.add(Tr(ee * x * ht(E), p * T + ee * ut(E))), o += F ? U + x * Kt : U, F ^ g >= t ^ M >= t) {
18975
18975
  var O = Os(ji(d), ji(v));
18976
18976
  ma(O);
18977
18977
  var N = Os(s, O);
@@ -19020,8 +19020,8 @@ function $h(n, e, t, i) {
19020
19020
  }
19021
19021
  function v() {
19022
19022
  p(h[0][0], h[0][1]), a.lineEnd();
19023
- var M = a.clean(), b = o.result(), R, w = b.length, U, x, E;
19024
- if (h.pop(), c.push(h), h = null, !!w) {
19023
+ var M = a.clean(), b = o.result(), R, T = b.length, U, x, E;
19024
+ if (h.pop(), c.push(h), h = null, !!T) {
19025
19025
  if (M & 1) {
19026
19026
  if (x = b[0], (U = x.length - 1) > 0) {
19027
19027
  for (l || (r.polygonStart(), l = !0), r.lineStart(), R = 0; R < U; ++R)
@@ -19030,7 +19030,7 @@ function $h(n, e, t, i) {
19030
19030
  }
19031
19031
  return;
19032
19032
  }
19033
- w > 1 && M & 2 && b.push(b.pop().concat(b.shift())), u.push(b.filter(nS));
19033
+ T > 1 && M & 2 && b.push(b.pop().concat(b.shift())), u.push(b.filter(nS));
19034
19034
  }
19035
19035
  }
19036
19036
  return f;
@@ -19042,7 +19042,7 @@ function nS(n) {
19042
19042
  function iS(n, e) {
19043
19043
  return ((n = n.x)[0] < 0 ? n[1] - Nt - Qe : Nt - n[1]) - ((e = e.x)[0] < 0 ? e[1] - Nt - Qe : Nt - e[1]);
19044
19044
  }
19045
- const wu = $h(
19045
+ const Tu = $h(
19046
19046
  function() {
19047
19047
  return !0;
19048
19048
  },
@@ -19120,19 +19120,19 @@ function aS(n) {
19120
19120
  var d = ji(u), g = ji(h), _ = [1, 0, 0], m = Os(d, g), p = gs(m, m), y = m[0], v = p - y * y;
19121
19121
  if (!v)
19122
19122
  return !f && u;
19123
- var M = e * p / v, b = -e * y / v, R = Os(_, m), w = _s(_, M), U = _s(m, b);
19124
- Vo(w, U);
19125
- var x = R, E = gs(w, x), F = gs(x, x), ee = E * E - F * (gs(w, w) - 1);
19123
+ var M = e * p / v, b = -e * y / v, R = Os(_, m), T = _s(_, M), U = _s(m, b);
19124
+ Vo(T, U);
19125
+ var x = R, E = gs(T, x), F = gs(x, x), ee = E * E - F * (gs(T, T) - 1);
19126
19126
  if (!(ee < 0)) {
19127
19127
  var O = qs(ee), N = _s(x, (-E - O) / F);
19128
- if (Vo(N, w), N = pa(N), !f)
19128
+ if (Vo(N, T), N = pa(N), !f)
19129
19129
  return N;
19130
19130
  var C = u[0], z = h[0], H = u[1], V = h[1], K;
19131
19131
  z < C && (K = C, C = z, z = K);
19132
19132
  var Q = z - C, B = lt(Q - Xe) < Qe, q = B || Q < Qe;
19133
19133
  if (!B && V < H && (K = H, H = V, V = K), q ? B ? H + V > 0 ^ N[1] < (lt(N[0] - C) < Qe ? H : V) : H <= N[1] && N[1] <= V : Q > Xe ^ (C <= N[0] && N[0] <= z)) {
19134
19134
  var oe = _s(x, (-E + O) / F);
19135
- return Vo(oe, w), [N, pa(oe)];
19135
+ return Vo(oe, T), [N, pa(oe)];
19136
19136
  }
19137
19137
  }
19138
19138
  }
@@ -19215,7 +19215,7 @@ function cS(n, e, t, i) {
19215
19215
  return h !== f ? h - f : h === 0 ? u[1] - c[1] : h === 1 ? c[0] - u[0] : h === 2 ? c[1] - u[1] : u[0] - c[0];
19216
19216
  }
19217
19217
  return function(c) {
19218
- var u = c, h = Wh(), f, d, g, _, m, p, y, v, M, b, R, w = {
19218
+ var u = c, h = Wh(), f, d, g, _, m, p, y, v, M, b, R, T = {
19219
19219
  point: U,
19220
19220
  lineStart: ee,
19221
19221
  lineEnd: O,
@@ -19239,10 +19239,10 @@ function cS(n, e, t, i) {
19239
19239
  (z || H) && (c.polygonStart(), z && (c.lineStart(), s(null, null, 1, c), c.lineEnd()), H && Xh(f, a, C, s, c), c.polygonEnd()), u = c, f = d = g = null;
19240
19240
  }
19241
19241
  function ee() {
19242
- w.point = N, d && d.push(g = []), b = !0, M = !1, y = v = NaN;
19242
+ T.point = N, d && d.push(g = []), b = !0, M = !1, y = v = NaN;
19243
19243
  }
19244
19244
  function O() {
19245
- f && (N(_, m), p && M && h.rejoin(), f.push(h.result())), w.point = U, M && u.lineEnd();
19245
+ f && (N(_, m), p && M && h.rejoin(), f.push(h.result())), T.point = U, M && u.lineEnd();
19246
19246
  }
19247
19247
  function N(C, z) {
19248
19248
  var H = r(C, z);
@@ -19256,7 +19256,7 @@ function cS(n, e, t, i) {
19256
19256
  }
19257
19257
  y = C, v = z, M = H;
19258
19258
  }
19259
- return w;
19259
+ return T;
19260
19260
  };
19261
19261
  }
19262
19262
  const Au = (n) => n;
@@ -19346,8 +19346,8 @@ function _S(n, e) {
19346
19346
  function t(i, r, s, o, a, l, c, u, h, f, d, g, _, m) {
19347
19347
  var p = c - i, y = u - r, v = p * p + y * y;
19348
19348
  if (v > 4 * e && _--) {
19349
- var M = o + f, b = a + d, R = l + g, w = qs(M * M + b * b + R * R), U = Ar(R /= w), x = lt(lt(R) - 1) < Qe || lt(s - h) < Qe ? (s + h) / 2 : wr(b, M), E = n(x, U), F = E[0], ee = E[1], O = F - i, N = ee - r, C = y * O - p * N;
19350
- (C * C / v > e || lt((p * O + y * N) / v - 0.5) > 0.3 || o * f + a * d + l * g < mS) && (t(i, r, s, o, a, l, F, ee, x, M /= w, b /= w, R, _, m), m.point(F, ee), t(F, ee, x, M, b, R, c, u, h, f, d, g, _, m));
19349
+ var M = o + f, b = a + d, R = l + g, T = qs(M * M + b * b + R * R), U = Ar(R /= T), x = lt(lt(R) - 1) < Qe || lt(s - h) < Qe ? (s + h) / 2 : Tr(b, M), E = n(x, U), F = E[0], ee = E[1], O = F - i, N = ee - r, C = y * O - p * N;
19350
+ (C * C / v > e || lt((p * O + y * N) / v - 0.5) > 0.3 || o * f + a * d + l * g < mS) && (t(i, r, s, o, a, l, F, ee, x, M /= T, b /= T, R, _, m), m.point(F, ee), t(F, ee, x, M, b, R, c, u, h, f, d, g, _, m));
19351
19351
  }
19352
19352
  }
19353
19353
  return function(i) {
@@ -19376,12 +19376,12 @@ function _S(n, e) {
19376
19376
  m.point = p, i.lineEnd();
19377
19377
  }
19378
19378
  function b() {
19379
- y(), m.point = R, m.lineEnd = w;
19379
+ y(), m.point = R, m.lineEnd = T;
19380
19380
  }
19381
19381
  function R(U, x) {
19382
19382
  v(r = U, x), s = h, o = f, a = d, l = g, c = _, m.point = v;
19383
19383
  }
19384
- function w() {
19384
+ function T() {
19385
19385
  t(h, f, u, d, g, _, s, o, r, a, l, c, Ru, i), m.lineEnd = M, M();
19386
19386
  }
19387
19387
  return m;
@@ -19425,7 +19425,7 @@ function SS(n) {
19425
19425
  })();
19426
19426
  }
19427
19427
  function MS(n) {
19428
- var e, t = 150, i = 480, r = 250, s = 0, o = 0, a = 0, l = 0, c = 0, u, h = 0, f = 1, d = 1, g = null, _ = wu, m = null, p, y, v, M = Au, b = 0.5, R, w, U, x, E;
19428
+ var e, t = 150, i = 480, r = 250, s = 0, o = 0, a = 0, l = 0, c = 0, u, h = 0, f = 1, d = 1, g = null, _ = Tu, m = null, p, y, v, M = Au, b = 0.5, R, T, U, x, E;
19429
19429
  function F(C) {
19430
19430
  return U(C[0] * mt, C[1] * mt);
19431
19431
  }
@@ -19439,7 +19439,7 @@ function MS(n) {
19439
19439
  }, F.postclip = function(C) {
19440
19440
  return arguments.length ? (M = C, m = p = y = v = null, N()) : M;
19441
19441
  }, F.clipAngle = function(C) {
19442
- return arguments.length ? (_ = +C ? aS(g = C * mt) : (g = null, wu), N()) : g * Gt;
19442
+ return arguments.length ? (_ = +C ? aS(g = C * mt) : (g = null, Tu), N()) : g * Gt;
19443
19443
  }, F.clipExtent = function(C) {
19444
19444
  return arguments.length ? (M = C == null ? (m = p = y = v = null, Au) : cS(m = +C[0][0], p = +C[0][1], y = +C[1][0], v = +C[1][1]), N()) : m == null ? null : [[m, p], [y, v]];
19445
19445
  }, F.scale = function(C) {
@@ -19457,7 +19457,7 @@ function MS(n) {
19457
19457
  }, F.reflectY = function(C) {
19458
19458
  return arguments.length ? (d = C ? -1 : 1, O()) : d < 0;
19459
19459
  }, F.precision = function(C) {
19460
- return arguments.length ? (R = Lu(w, b = C * C), N()) : qs(b);
19460
+ return arguments.length ? (R = Lu(T, b = C * C), N()) : qs(b);
19461
19461
  }, F.fitExtent = function(C, z) {
19462
19462
  return qh(F, C, z);
19463
19463
  }, F.fitSize = function(C, z) {
@@ -19469,7 +19469,7 @@ function MS(n) {
19469
19469
  };
19470
19470
  function O() {
19471
19471
  var C = Pu(t, 0, 0, f, d, h).apply(null, e(s, o)), z = Pu(t, i - C[0], r - C[1], f, d, h);
19472
- return u = Vh(a, l, c), w = ga(e, z), U = ga(u, w), R = Lu(w, b), N();
19472
+ return u = Vh(a, l, c), T = ga(e, z), U = ga(u, T), R = Lu(T, b), N();
19473
19473
  }
19474
19474
  function N() {
19475
19475
  return x = E = null, F;
@@ -19553,11 +19553,11 @@ const { toString: bS } = Object.prototype, { getPrototypeOf: $a } = Object, js =
19553
19553
  const t = bS.call(e);
19554
19554
  return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
19555
19555
  })(/* @__PURE__ */ Object.create(null)), xn = (n) => (n = n.toLowerCase(), (e) => js(e) === n), Ys = (n) => (e) => typeof e === n, { isArray: er } = Array, Rr = Ys("undefined");
19556
- function TS(n) {
19556
+ function wS(n) {
19557
19557
  return n !== null && !Rr(n) && n.constructor !== null && !Rr(n.constructor) && Yt(n.constructor.isBuffer) && n.constructor.isBuffer(n);
19558
19558
  }
19559
19559
  const Yh = xn("ArrayBuffer");
19560
- function wS(n) {
19560
+ function TS(n) {
19561
19561
  let e;
19562
19562
  return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? e = ArrayBuffer.isView(n) : e = n && n.buffer && Yh(n.buffer), e;
19563
19563
  }
@@ -19718,9 +19718,9 @@ const tM = (n) => {
19718
19718
  }, nM = xn("AsyncFunction"), iM = (n) => n && (Ks(n) || Yt(n)) && Yt(n.then) && Yt(n.catch), Z = {
19719
19719
  isArray: er,
19720
19720
  isArrayBuffer: Yh,
19721
- isBuffer: TS,
19721
+ isBuffer: wS,
19722
19722
  isFormData: US,
19723
- isArrayBufferView: wS,
19723
+ isArrayBufferView: TS,
19724
19724
  isString: AS,
19725
19725
  isNumber: Kh,
19726
19726
  isBoolean: CS,
@@ -20336,7 +20336,7 @@ function bM(n, e, t) {
20336
20336
  t
20337
20337
  ));
20338
20338
  }
20339
- const TM = sn.isStandardBrowserEnv ? (
20339
+ const wM = sn.isStandardBrowserEnv ? (
20340
20340
  // Standard browser envs support document.cookie
20341
20341
  function() {
20342
20342
  return {
@@ -20367,14 +20367,14 @@ const TM = sn.isStandardBrowserEnv ? (
20367
20367
  };
20368
20368
  }()
20369
20369
  );
20370
- function wM(n) {
20370
+ function TM(n) {
20371
20371
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
20372
20372
  }
20373
20373
  function AM(n, e) {
20374
20374
  return e ? n.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : n;
20375
20375
  }
20376
20376
  function hf(n, e) {
20377
- return n && !wM(e) ? AM(n, e) : e;
20377
+ return n && !TM(e) ? AM(n, e) : e;
20378
20378
  }
20379
20379
  const CM = sn.isStandardBrowserEnv ? (
20380
20380
  // Standard browser envs have full support of the APIs needed to test
@@ -20497,7 +20497,7 @@ const PM = typeof XMLHttpRequest != "undefined", DM = PM && function(n) {
20497
20497
  c
20498
20498
  )), c = null;
20499
20499
  }, sn.isStandardBrowserEnv) {
20500
- const d = (n.withCredentials || CM(u)) && n.xsrfCookieName && TM.read(n.xsrfCookieName);
20500
+ const d = (n.withCredentials || CM(u)) && n.xsrfCookieName && wM.read(n.xsrfCookieName);
20501
20501
  d && s.set(n.xsrfHeaderName, d);
20502
20502
  }
20503
20503
  r === void 0 && s.setContentType(null), "setRequestHeader" in c && Z.forEach(s.toJSON(), function(g, _) {
@@ -20512,11 +20512,11 @@ const PM = typeof XMLHttpRequest != "undefined", DM = PM && function(n) {
20512
20512
  }
20513
20513
  c.send(r || null);
20514
20514
  });
20515
- }, Ts = {
20515
+ }, ws = {
20516
20516
  http: rM,
20517
20517
  xhr: DM
20518
20518
  };
20519
- Z.forEach(Ts, (n, e) => {
20519
+ Z.forEach(ws, (n, e) => {
20520
20520
  if (n) {
20521
20521
  try {
20522
20522
  Object.defineProperty(n, "name", { value: e });
@@ -20530,20 +20530,20 @@ const ff = {
20530
20530
  n = Z.isArray(n) ? n : [n];
20531
20531
  const { length: e } = n;
20532
20532
  let t, i;
20533
- for (let r = 0; r < e && (t = n[r], !(i = Z.isString(t) ? Ts[t.toLowerCase()] : t)); r++)
20533
+ for (let r = 0; r < e && (t = n[r], !(i = Z.isString(t) ? ws[t.toLowerCase()] : t)); r++)
20534
20534
  ;
20535
20535
  if (!i)
20536
20536
  throw i === !1 ? new $e(
20537
20537
  `Adapter ${t} is not supported by the environment`,
20538
20538
  "ERR_NOT_SUPPORT"
20539
20539
  ) : new Error(
20540
- Z.hasOwnProp(Ts, t) ? `Adapter '${t}' is not available in the build` : `Unknown adapter '${t}'`
20540
+ Z.hasOwnProp(ws, t) ? `Adapter '${t}' is not available in the build` : `Unknown adapter '${t}'`
20541
20541
  );
20542
20542
  if (!Z.isFunction(i))
20543
20543
  throw new TypeError("adapter is not a function");
20544
20544
  return i;
20545
20545
  },
20546
- adapters: Ts
20546
+ adapters: ws
20547
20547
  };
20548
20548
  function jo(n) {
20549
20549
  if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
@@ -20783,7 +20783,7 @@ Z.forEach(["post", "put", "patch"], function(e) {
20783
20783
  }
20784
20784
  zs.prototype[e] = t(), zs.prototype[e + "Form"] = t(!0);
20785
20785
  });
20786
- const ws = zs;
20786
+ const Ts = zs;
20787
20787
  class Za {
20788
20788
  constructor(e) {
20789
20789
  if (typeof e != "function")
@@ -20931,13 +20931,13 @@ Object.entries(Ma).forEach(([n, e]) => {
20931
20931
  });
20932
20932
  const FM = Ma;
20933
20933
  function pf(n) {
20934
- const e = new ws(n), t = jh(ws.prototype.request, e);
20935
- return Z.extend(t, ws.prototype, e, { allOwnKeys: !0 }), Z.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(r) {
20934
+ const e = new Ts(n), t = jh(Ts.prototype.request, e);
20935
+ return Z.extend(t, Ts.prototype, e, { allOwnKeys: !0 }), Z.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(r) {
20936
20936
  return pf(Ki(n, r));
20937
20937
  }, t;
20938
20938
  }
20939
20939
  const gt = pf(Ya);
20940
- gt.Axios = ws;
20940
+ gt.Axios = Ts;
20941
20941
  gt.CanceledError = Nr;
20942
20942
  gt.CancelToken = UM;
20943
20943
  gt.isCancel = uf;
@@ -21064,7 +21064,7 @@ const ys = Bi.track.bind(Bi), kM = bf.extend({
21064
21064
  let i = (r = this.areaObj) != null && r.areaList ? this.areaObj.areaList.map((s) => s) : [];
21065
21065
  if (i.forEach((s) => {
21066
21066
  s.gps && (n.push(s.province), e.push(s.city), t.push(s.area));
21067
- }), n.length) {
21067
+ }), n = [...new Set(n)], e = [...new Set(e)], t = [...new Set(t)], n.length) {
21068
21068
  let s = "";
21069
21069
  return n.length === 1 ? e.length > 1 ? (this.computCode = n[0], s = "city") : t.length > 1 ? (this.computCode = e[0], s = "area") : (this.computCode = t[0], s = "area") : (this.computCode = 1e5, s = "province"), i.map((o) => rt(De({}, o), { code: o[s] }));
21070
21070
  } else
@@ -21289,7 +21289,7 @@ const ys = Bi.track.bind(Bi), kM = bf.extend({
21289
21289
  return Math.min(...u) === s[0] && (o[0] = this.mouseScale * -1.2, a[0] = this.mouseScale * -6.5, l = "left"), (Math.min(...h) === s[1] || i.find((f) => f.x === l && f.y === "top" && s[1] < f.yVal)) && (o[1] = this.mouseScale * -2, a[1] = this.mouseScale * -2, c = "bottom"), i.push({ x: l, y: c, yVal: s[1] }), { middle: o, end: a };
21290
21290
  };
21291
21291
  e.forEach((s) => {
21292
- var R, w;
21292
+ var R, T;
21293
21293
  const o = s.properties, a = n(s.userData.gps || o.centroid || o.center), { middle: l, end: c } = r(s.userData.gps || o.centroid || o.center), u = document.createElement("div");
21294
21294
  u.textContent = o.name, u.style.cssText = `color:#fff;border:1px solid #78f0fe;padding:${this.baseRem * 3}px ${this.baseRem * 5}px;border-radius: 0 ${this.baseRem * 10}px;background:linear-gradient(180deg,#78f0fe,#005276);opacity:0.8;min-width:${this.baseRem * 50}px;text-align:center;`;
21295
21295
  const h = new Ho(u);
@@ -21308,7 +21308,7 @@ const ys = Bi.track.bind(Bi), kM = bf.extend({
21308
21308
  v.push(new D(a[0], -a[1], 1)), v.push(new D(a[0] + l[0], -a[1] + l[1], 1)), v.push(new D(a[0] + c[0], -a[1] + c[1], 1));
21309
21309
  const M = this.drawLine(v, "#ffda57");
21310
21310
  this.tipsMesh.add(h), this.tipsMesh.add(y), this.tipsMesh.add(M);
21311
- const b = (w = (R = this.scene.children.find((U) => U.name === "map")) == null ? void 0 : R.children.find((U) => U.name === o.adcode)) == null ? void 0 : w.children;
21311
+ const b = (T = (R = this.scene.children.find((U) => U.name === "map")) == null ? void 0 : R.children.find((U) => U.name === o.adcode)) == null ? void 0 : T.children;
21312
21312
  b == null || b.forEach((U) => {
21313
21313
  U.name === o.adcode && this.activeMesh.push(U);
21314
21314
  }), this.activeMesh.forEach((U) => {
@@ -21372,13 +21372,13 @@ var GM = function() {
21372
21372
  })]);
21373
21373
  }, VM = [];
21374
21374
  const Wu = {};
21375
- var WM = /* @__PURE__ */ Tt(
21375
+ var WM = /* @__PURE__ */ wt(
21376
21376
  kM,
21377
21377
  GM,
21378
21378
  VM,
21379
21379
  !1,
21380
21380
  XM,
21381
- "1ffdc164",
21381
+ "79328f5e",
21382
21382
  null,
21383
21383
  null
21384
21384
  );