dpot-ui 0.4.0 → 0.4.1

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
@@ -1,21 +1,21 @@
1
1
  var Sf = Object.defineProperty, Mf = Object.defineProperties;
2
2
  var Ef = Object.getOwnPropertyDescriptors;
3
- var Fr = Object.getOwnPropertySymbols;
3
+ var Br = Object.getOwnPropertySymbols;
4
4
  var sl = Object.prototype.hasOwnProperty, ol = Object.prototype.propertyIsEnumerable;
5
5
  var io = Math.pow, rl = (n, e, t) => e in n ? Sf(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, Le = (n, e) => {
6
6
  for (var t in e || (e = {}))
7
7
  sl.call(e, t) && rl(n, t, e[t]);
8
- if (Fr)
9
- for (var t of Fr(e))
8
+ if (Br)
9
+ for (var t of Br(e))
10
10
  ol.call(e, t) && rl(n, t, e[t]);
11
11
  return n;
12
12
  }, nt = (n, e) => Mf(n, Ef(e));
13
- var Br = (n, e) => {
13
+ var zr = (n, e) => {
14
14
  var t = {};
15
15
  for (var i in n)
16
16
  sl.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
17
- if (n != null && Fr)
18
- for (var i of Fr(n))
17
+ if (n != null && Br)
18
+ for (var i of Br(n))
19
19
  e.indexOf(i) < 0 && ol.call(n, i) && (t[i] = n[i]);
20
20
  return t;
21
21
  };
@@ -36,7 +36,7 @@ var zt = (n, e, t) => new Promise((i, r) => {
36
36
  a((t = t.apply(n, e)).next());
37
37
  });
38
38
  import bf from "vue";
39
- function Rr(n) {
39
+ function Pr(n) {
40
40
  return n.split("-")[1];
41
41
  }
42
42
  function Ea(n) {
@@ -45,12 +45,12 @@ function Ea(n) {
45
45
  function si(n) {
46
46
  return n.split("-")[0];
47
47
  }
48
- function Pr(n) {
48
+ function Lr(n) {
49
49
  return ["top", "bottom"].includes(si(n)) ? "x" : "y";
50
50
  }
51
51
  function al(n, e, t) {
52
52
  let { reference: i, floating: r } = n;
53
- const s = i.x + i.width / 2 - r.width / 2, o = i.y + i.height / 2 - r.height / 2, a = Pr(e), l = Ea(a), c = i[l] / 2 - r[l] / 2, u = a === "x";
53
+ const s = i.x + i.width / 2 - r.width / 2, o = i.y + i.height / 2 - r.height / 2, a = Lr(e), l = Ea(a), c = i[l] / 2 - r[l] / 2, u = a === "x";
54
54
  let h;
55
55
  switch (si(e)) {
56
56
  case "top":
@@ -68,7 +68,7 @@ function al(n, e, t) {
68
68
  default:
69
69
  h = { x: i.x, y: i.y };
70
70
  }
71
- switch (Rr(e)) {
71
+ switch (Pr(e)) {
72
72
  case "start":
73
73
  h[a] -= c * (t && u ? -1 : 1);
74
74
  break;
@@ -94,14 +94,14 @@ function Xu(n) {
94
94
  return Le({ top: 0, right: 0, bottom: 0, left: 0 }, e);
95
95
  }(n) : { top: n, right: n, bottom: n, left: n };
96
96
  }
97
- function Ts(n) {
97
+ function As(n) {
98
98
  return nt(Le({}, n), { top: n.y, left: n.x, right: n.x + n.width, bottom: n.y + n.height });
99
99
  }
100
- function As(n, e) {
100
+ function Cs(n, e) {
101
101
  return zt(this, null, function* () {
102
102
  var t;
103
103
  e === void 0 && (e = {});
104
- const { x: i, y: r, platform: s, rects: o, elements: a, strategy: l } = n, { boundary: c = "clippingAncestors", rootBoundary: u = "viewport", elementContext: h = "floating", altBoundary: f = !1, padding: d = 0 } = Ki(e, n), g = Xu(d), _ = a[f ? h === "floating" ? "reference" : "floating" : h], m = Ts(yield s.getClippingRect({ element: (t = yield s.isElement == null ? void 0 : s.isElement(_)) == null || t ? _ : _.contextElement || (yield s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)), boundary: c, rootBoundary: u, strategy: l })), p = h === "floating" ? nt(Le({}, o.floating), { x: i, y: r }) : o.reference, S = yield s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating), v = (yield s.isElement == null ? void 0 : s.isElement(S)) && (yield s.getScale == null ? void 0 : s.getScale(S)) || { x: 1, y: 1 }, M = Ts(s.convertOffsetParentRelativeRectToViewportRelativeRect ? yield s.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: p, offsetParent: S, strategy: l }) : p);
104
+ const { x: i, y: r, platform: s, rects: o, elements: a, strategy: l } = n, { boundary: c = "clippingAncestors", rootBoundary: u = "viewport", elementContext: h = "floating", altBoundary: f = !1, padding: d = 0 } = Ki(e, n), g = Xu(d), _ = a[f ? h === "floating" ? "reference" : "floating" : h], m = As(yield s.getClippingRect({ element: (t = yield s.isElement == null ? void 0 : s.isElement(_)) == null || t ? _ : _.contextElement || (yield s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)), boundary: c, rootBoundary: u, strategy: l })), p = h === "floating" ? nt(Le({}, o.floating), { x: i, y: r }) : o.reference, S = yield s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating), v = (yield s.isElement == null ? void 0 : s.isElement(S)) && (yield s.getScale == null ? void 0 : s.getScale(S)) || { x: 1, y: 1 }, M = As(s.convertOffsetParentRelativeRectToViewportRelativeRect ? yield s.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: p, offsetParent: S, strategy: l }) : p);
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
  }
@@ -114,23 +114,23 @@ const Af = (n) => ({ name: "arrow", options: n, fn(t) {
114
114
  const { x: i, y: r, placement: s, rects: o, platform: a, elements: l } = t, { element: c, padding: u = 0 } = Ki(n, t) || {};
115
115
  if (c == null)
116
116
  return {};
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", S = 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);
117
+ const h = Xu(u), f = { x: i, y: r }, d = Lr(s), g = Ea(d), _ = yield a.getDimensions(c), m = d === "y", p = m ? "top" : "left", S = 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
118
  let T = R ? R[v] : 0;
119
119
  T && (yield a.isElement == null ? void 0 : a.isElement(R)) || (T = l.floating[v] || o.floating[g]);
120
- const N = M / 2 - b / 2, x = T / 2 - _[g] / 2 - 1, E = Yo(h[p], x), F = Yo(h[S], x), ee = E, O = T - _[g] - F, U = T / 2 - _[g] / 2 + N, C = Ko(ee, U, O), z = Rr(s) != null && U != C && o.reference[g] / 2 - (U < ee ? E : F) - _[g] / 2 < 0 ? U < ee ? ee - U : O - U : 0;
120
+ const N = M / 2 - b / 2, x = T / 2 - _[g] / 2 - 1, E = Yo(h[p], x), F = Yo(h[S], x), ee = E, O = T - _[g] - F, U = T / 2 - _[g] / 2 + N, C = Ko(ee, U, O), z = Pr(s) != null && U != C && o.reference[g] / 2 - (U < ee ? E : F) - _[g] / 2 < 0 ? U < ee ? ee - U : O - U : 0;
121
121
  return { [d]: f[d] - z, data: { [d]: C, centerOffset: U - C + z } };
122
122
  });
123
123
  } }), $u = ["top", "right", "bottom", "left"];
124
124
  $u.reduce((n, e) => n.concat(e, e + "-start", e + "-end"), []);
125
125
  const Cf = { left: "right", right: "left", bottom: "top", top: "bottom" };
126
- function Cs(n) {
126
+ function Rs(n) {
127
127
  return n.replace(/left|right|bottom|top/g, (e) => Cf[e]);
128
128
  }
129
129
  function Rf(n, e, t) {
130
130
  t === void 0 && (t = !1);
131
- const i = Rr(n), r = Pr(n), s = Ea(r);
131
+ const i = Pr(n), r = Lr(n), s = Ea(r);
132
132
  let o = r === "x" ? i === (t ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
133
- return e.reference[s] > e.floating[s] && (o = Cs(o)), { main: o, cross: Cs(o) };
133
+ return e.reference[s] > e.floating[s] && (o = Rs(o)), { main: o, cross: Rs(o) };
134
134
  }
135
135
  const Pf = { start: "end", end: "start" };
136
136
  function ro(n) {
@@ -140,12 +140,12 @@ const Lf = function(n) {
140
140
  return n === void 0 && (n = {}), { name: "flip", options: n, fn(t) {
141
141
  return zt(this, null, function* () {
142
142
  var i;
143
- const { placement: r, middlewareData: s, rects: o, initialPlacement: a, platform: l, elements: c } = t, ee = Ki(n, t), { mainAxis: u = !0, crossAxis: h = !0, fallbackPlacements: f, fallbackStrategy: d = "bestFit", fallbackAxisSideDirection: g = "none", flipAlignment: _ = !0 } = ee, m = Br(ee, ["mainAxis", "crossAxis", "fallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment"]), p = si(r), S = si(a) === a, v = yield l.isRTL == null ? void 0 : l.isRTL(c.floating), M = f || (S || !_ ? [Cs(a)] : function(O) {
144
- const U = Cs(O);
143
+ const { placement: r, middlewareData: s, rects: o, initialPlacement: a, platform: l, elements: c } = t, ee = Ki(n, t), { mainAxis: u = !0, crossAxis: h = !0, fallbackPlacements: f, fallbackStrategy: d = "bestFit", fallbackAxisSideDirection: g = "none", flipAlignment: _ = !0 } = ee, m = zr(ee, ["mainAxis", "crossAxis", "fallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment"]), p = si(r), S = si(a) === a, v = yield l.isRTL == null ? void 0 : l.isRTL(c.floating), M = f || (S || !_ ? [Rs(a)] : function(O) {
144
+ const U = Rs(O);
145
145
  return [ro(O), U, ro(U)];
146
146
  }(a));
147
147
  f || g === "none" || M.push(...function(O, U, C, z) {
148
- const H = Rr(O);
148
+ const H = Pr(O);
149
149
  let V = function(K, Q, B) {
150
150
  const q = ["left", "right"], oe = ["right", "left"], me = ["top", "bottom"], ge = ["bottom", "top"];
151
151
  switch (K) {
@@ -161,7 +161,7 @@ const Lf = function(n) {
161
161
  }(si(O), C === "start", z);
162
162
  return H && (V = V.map((K) => K + "-" + H), U && (V = V.concat(V.map(ro)))), V;
163
163
  }(a, _, g, v));
164
- const b = [a, ...M], R = yield As(t, m), T = [];
164
+ const b = [a, ...M], R = yield Cs(t, m), T = [];
165
165
  let N = ((i = s.flip) == null ? void 0 : i.overflows) || [];
166
166
  if (u && T.push(R[p]), h) {
167
167
  const { main: O, cross: U } = Rf(r, o, v);
@@ -200,14 +200,14 @@ function cl(n) {
200
200
  const Df = function(n) {
201
201
  return n === void 0 && (n = {}), { name: "hide", options: n, fn(t) {
202
202
  return zt(this, null, function* () {
203
- const { rects: i } = t, o = Ki(n, t), { strategy: r = "referenceHidden" } = o, s = Br(o, ["strategy"]);
203
+ const { rects: i } = t, o = Ki(n, t), { strategy: r = "referenceHidden" } = o, s = zr(o, ["strategy"]);
204
204
  switch (r) {
205
205
  case "referenceHidden": {
206
- const a = ll(yield As(t, nt(Le({}, s), { elementContext: "reference" })), i.reference);
206
+ const a = ll(yield Cs(t, nt(Le({}, s), { elementContext: "reference" })), i.reference);
207
207
  return { data: { referenceHiddenOffsets: a, referenceHidden: cl(a) } };
208
208
  }
209
209
  case "escaped": {
210
- const a = ll(yield As(t, nt(Le({}, s), { altBoundary: !0 })), i.floating);
210
+ const a = ll(yield Cs(t, nt(Le({}, s), { altBoundary: !0 })), i.floating);
211
211
  return { data: { escapedOffsets: a, escaped: cl(a) } };
212
212
  }
213
213
  default:
@@ -220,7 +220,7 @@ const Df = function(n) {
220
220
  return zt(this, null, function* () {
221
221
  const { x: i, y: r } = t, s = yield function(o, a) {
222
222
  return zt(this, null, function* () {
223
- const { placement: l, platform: c, elements: u } = o, h = yield c.isRTL == null ? void 0 : c.isRTL(u.floating), f = si(l), d = Rr(l), g = Pr(l) === "x", _ = ["left", "top"].includes(f) ? -1 : 1, m = h && g ? -1 : 1, p = Ki(a, o);
223
+ const { placement: l, platform: c, elements: u } = o, h = yield c.isRTL == null ? void 0 : c.isRTL(u.floating), f = si(l), d = Pr(l), g = Lr(l) === "x", _ = ["left", "top"].includes(f) ? -1 : 1, m = h && g ? -1 : 1, p = Ki(a, o);
224
224
  let { mainAxis: S, crossAxis: v, alignmentAxis: M } = typeof p == "number" ? { mainAxis: p, crossAxis: 0, alignmentAxis: null } : Le({ mainAxis: 0, crossAxis: 0, alignmentAxis: null }, p);
225
225
  return d && typeof M == "number" && (v = d === "end" ? -1 * M : M), g ? { x: v * m, y: S * _ } : { x: S * _, y: v * m };
226
226
  });
@@ -238,7 +238,7 @@ const Nf = function(n) {
238
238
  const { x: i, y: r, placement: s } = t, p = Ki(n, t), { mainAxis: o = !0, crossAxis: a = !1, limiter: l = { fn: (S) => {
239
239
  let { x: v, y: M } = S;
240
240
  return { x: v, y: M };
241
- } } } = p, c = Br(p, ["mainAxis", "crossAxis", "limiter"]), u = { x: i, y: r }, h = yield As(t, c), f = Pr(si(s)), d = Uf(f);
241
+ } } } = p, c = zr(p, ["mainAxis", "crossAxis", "limiter"]), u = { x: i, y: r }, h = yield Cs(t, c), f = Lr(si(s)), d = Uf(f);
242
242
  let g = u[f], _ = u[d];
243
243
  if (o) {
244
244
  const S = f === "y" ? "bottom" : "right";
@@ -275,7 +275,7 @@ function Pn(n) {
275
275
  function ul(n) {
276
276
  return typeof ShadowRoot != "undefined" && (n instanceof qt(n).ShadowRoot || n instanceof ShadowRoot);
277
277
  }
278
- function vr(n) {
278
+ function xr(n) {
279
279
  const { overflow: e, overflowX: t, overflowY: i, display: r } = on(n);
280
280
  return /auto|scroll|overlay|hidden|clip/.test(e + i + t) && !["inline", "contents"].includes(r);
281
281
  }
@@ -292,11 +292,11 @@ function ba() {
292
292
  function Hs(n) {
293
293
  return ["html", "body", "#document"].includes(qn(n));
294
294
  }
295
- const Jo = Math.min, Bi = Math.max, Rs = Math.round, zr = Math.floor, hi = (n) => ({ x: n, y: n });
295
+ const Jo = Math.min, Bi = Math.max, Ps = Math.round, Hr = Math.floor, hi = (n) => ({ x: n, y: n });
296
296
  function ju(n) {
297
297
  const e = on(n);
298
298
  let t = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
299
- const r = ln(n), s = r ? n.offsetWidth : t, o = r ? n.offsetHeight : i, a = Rs(t) !== s || Rs(i) !== o;
299
+ const r = ln(n), s = r ? n.offsetWidth : t, o = r ? n.offsetHeight : i, a = Ps(t) !== s || Ps(i) !== o;
300
300
  return a && (t = s, i = o), { width: t, height: i, $: a };
301
301
  }
302
302
  function wa(n) {
@@ -307,7 +307,7 @@ function zi(n) {
307
307
  if (!ln(e))
308
308
  return hi(1);
309
309
  const t = e.getBoundingClientRect(), { width: i, height: r, $: s } = ju(e);
310
- let o = (s ? Rs(t.width) : t.width) / i, a = (s ? Rs(t.height) : t.height) / r;
310
+ let o = (s ? Ps(t.width) : t.width) / i, a = (s ? Ps(t.height) : t.height) / r;
311
311
  return o && Number.isFinite(o) || (o = 1), a && Number.isFinite(a) || (a = 1), { x: o, y: a };
312
312
  }
313
313
  const hl = hi(0);
@@ -333,7 +333,7 @@ function fi(n, e, t, i) {
333
333
  l *= _.x, c *= _.y, u *= _.x, h *= _.y, l += S, c += v, g = qt(g).frameElement;
334
334
  }
335
335
  }
336
- return Ts({ width: u, height: h, x: l, y: c });
336
+ return As({ width: u, height: h, x: l, y: c });
337
337
  }
338
338
  function Ln(n) {
339
339
  return ((qu(n) ? n.ownerDocument : n.document) || window.document).documentElement;
@@ -352,13 +352,13 @@ function Gi(n) {
352
352
  }
353
353
  function Zu(n) {
354
354
  const e = Gi(n);
355
- return Hs(e) ? n.ownerDocument ? n.ownerDocument.body : n.body : ln(e) && vr(e) ? e : Zu(e);
355
+ return Hs(e) ? n.ownerDocument ? n.ownerDocument.body : n.body : ln(e) && xr(e) ? e : Zu(e);
356
356
  }
357
- function Ps(n, e) {
357
+ function Ls(n, e) {
358
358
  var t;
359
359
  e === void 0 && (e = []);
360
360
  const i = Zu(n), r = i === ((t = n.ownerDocument) == null ? void 0 : t.body), s = qt(i);
361
- return r ? e.concat(s, s.visualViewport || [], vr(i) ? i : []) : e.concat(i, Ps(i));
361
+ return r ? e.concat(s, s.visualViewport || [], xr(i) ? i : []) : e.concat(i, Ls(i));
362
362
  }
363
363
  function fl(n, e, t) {
364
364
  let i;
@@ -389,7 +389,7 @@ function fl(n, e, t) {
389
389
  const r = Yu(n);
390
390
  i = nt(Le({}, e), { x: e.x - r.x, y: e.y - r.y });
391
391
  }
392
- return Ts(i);
392
+ return As(i);
393
393
  }
394
394
  function Ju(n, e) {
395
395
  const t = Gi(n);
@@ -420,7 +420,7 @@ function Ff(n, e, t) {
420
420
  let a = { scrollLeft: 0, scrollTop: 0 };
421
421
  const l = hi(0);
422
422
  if (i || !i && !s)
423
- if ((qn(e) !== "body" || vr(r)) && (a = ks(e)), ln(e)) {
423
+ if ((qn(e) !== "body" || xr(r)) && (a = ks(e)), ln(e)) {
424
424
  const c = fi(e, !0, s, e);
425
425
  l.x = c.x + e.clientLeft, l.y = c.y + e.clientTop;
426
426
  } else
@@ -433,12 +433,12 @@ const Bf = { getClippingRect: function(n) {
433
433
  const h = u.get(c);
434
434
  if (h)
435
435
  return h;
436
- let f = Ps(c).filter((m) => Pn(m) && qn(m) !== "body"), d = null;
436
+ let f = Ls(c).filter((m) => Pn(m) && qn(m) !== "body"), d = null;
437
437
  const g = on(c).position === "fixed";
438
438
  let _ = g ? Gi(c) : c;
439
439
  for (; Pn(_) && !Hs(_); ) {
440
440
  const m = on(_), p = Zo(_);
441
- p || m.position !== "fixed" || (d = null), (g ? !p && !d : !p && m.position === "static" && d && ["absolute", "fixed"].includes(d.position) || vr(_) && !p && Ju(c, _)) ? f = f.filter((S) => S !== _) : d = m, _ = Gi(_);
441
+ p || m.position !== "fixed" || (d = null), (g ? !p && !d : !p && m.position === "static" && d && ["absolute", "fixed"].includes(d.position) || xr(_) && !p && Ju(c, _)) ? f = f.filter((S) => S !== _) : d = m, _ = Gi(_);
442
442
  }
443
443
  return u.set(c, f), f;
444
444
  }(e, this._c) : [].concat(t), o = [...s, i], a = o[0], l = o.reduce((c, u) => {
@@ -453,7 +453,7 @@ const Bf = { getClippingRect: function(n) {
453
453
  return e;
454
454
  let o = { scrollLeft: 0, scrollTop: 0 }, a = hi(1);
455
455
  const l = hi(0);
456
- if ((r || !r && i !== "fixed") && ((qn(t) !== "body" || vr(s)) && (o = ks(t)), ln(t))) {
456
+ if ((r || !r && i !== "fixed") && ((qn(t) !== "body" || xr(s)) && (o = ks(t)), ln(t))) {
457
457
  const c = fi(t);
458
458
  a = zi(t), l.x = c.x + t.clientLeft, l.y = c.y + t.clientTop;
459
459
  }
@@ -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 = wa(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 ? Ls(c) : [], ...Ls(e)] : [];
473
473
  u.forEach((_) => {
474
474
  r && _.addEventListener("scroll", t, { passive: !0 }), s && _.addEventListener("resize", t);
475
475
  });
@@ -484,7 +484,7 @@ function zf(n, e, t, i) {
484
484
  const { left: N, top: x, width: E, height: F } = _.getBoundingClientRect();
485
485
  if (R || m(), !E || !F)
486
486
  return;
487
- const ee = zr(x), O = zr(v.clientWidth - (N + E)), U = zr(v.clientHeight - (x + F)), C = zr(N);
487
+ const ee = Hr(x), O = Hr(v.clientWidth - (N + E)), U = Hr(v.clientHeight - (x + F)), C = Hr(N);
488
488
  let z = !0;
489
489
  S = new IntersectionObserver((H) => {
490
490
  const V = H[0].intersectionRatio;
@@ -2503,7 +2503,7 @@ const Ap = /* @__PURE__ */ function() {
2503
2503
  * Copyright 2010-2023 Three.js Authors
2504
2504
  * SPDX-License-Identifier: MIT
2505
2505
  */
2506
- const Aa = "156", zn = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, _i = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, Cp = 0, Ll = 1, Rp = 2, nh = 1, Pp = 2, An = 3, jn = 0, Ot = 1, Cn = 2, Wn = 0, Hi = 1, Dl = 2, Il = 3, Ul = 4, Lp = 5, Ni = 100, Dp = 101, Ip = 102, Nl = 103, Ol = 104, Up = 200, Np = 201, Op = 202, Fp = 203, ih = 204, rh = 205, Bp = 206, zp = 207, Hp = 208, kp = 209, Gp = 210, Vp = 0, Wp = 1, Xp = 2, ea = 3, $p = 4, qp = 5, jp = 6, Yp = 7, Ca = 0, Kp = 1, Zp = 2, Xn = 0, Jp = 1, Qp = 2, em = 3, tm = 4, nm = 5, sh = 300, Vi = 301, Wi = 302, ta = 303, na = 304, Gs = 306, ia = 1e3, nn = 1001, ra = 1002, Dt = 1003, Fl = 1004, so = 1005, $t = 1006, im = 1007, xr = 1008, $n = 1009, rm = 1010, sm = 1011, Ra = 1012, oh = 1013, kn = 1014, Gn = 1015, yr = 1016, ah = 1017, lh = 1018, oi = 1020, om = 1021, rn = 1023, am = 1024, lm = 1025, ai = 1026, Xi = 1027, cm = 1028, ch = 1029, um = 1030, uh = 1031, hh = 1033, oo = 33776, ao = 33777, lo = 33778, co = 33779, Bl = 35840, zl = 35841, Hl = 35842, kl = 35843, hm = 36196, Gl = 37492, Vl = 37496, Wl = 37808, Xl = 37809, $l = 37810, ql = 37811, jl = 37812, Yl = 37813, Kl = 37814, Zl = 37815, Jl = 37816, Ql = 37817, ec = 37818, tc = 37819, nc = 37820, ic = 37821, uo = 36492, rc = 36494, sc = 36495, fm = 36283, oc = 36284, ac = 36285, lc = 36286, fh = 3e3, li = 3001, dm = 3200, pm = 3201, dh = 0, mm = 1, ci = "", it = "srgb", gn = "srgb-linear", Vs = "display-p3", ho = 7680, gm = 519, _m = 512, vm = 513, xm = 514, ym = 515, Sm = 516, Mm = 517, Em = 518, bm = 519, sa = 35044, cc = "300 es", oa = 1035, Rn = 2e3, Ls = 2001;
2506
+ const Aa = "156", zn = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, _i = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, Cp = 0, Ll = 1, Rp = 2, nh = 1, Pp = 2, An = 3, jn = 0, Ot = 1, Cn = 2, Wn = 0, Hi = 1, Dl = 2, Il = 3, Ul = 4, Lp = 5, Ni = 100, Dp = 101, Ip = 102, Nl = 103, Ol = 104, Up = 200, Np = 201, Op = 202, Fp = 203, ih = 204, rh = 205, Bp = 206, zp = 207, Hp = 208, kp = 209, Gp = 210, Vp = 0, Wp = 1, Xp = 2, ea = 3, $p = 4, qp = 5, jp = 6, Yp = 7, Ca = 0, Kp = 1, Zp = 2, Xn = 0, Jp = 1, Qp = 2, em = 3, tm = 4, nm = 5, sh = 300, Vi = 301, Wi = 302, ta = 303, na = 304, Gs = 306, ia = 1e3, nn = 1001, ra = 1002, Dt = 1003, Fl = 1004, so = 1005, $t = 1006, im = 1007, yr = 1008, $n = 1009, rm = 1010, sm = 1011, Ra = 1012, oh = 1013, kn = 1014, Gn = 1015, Sr = 1016, ah = 1017, lh = 1018, oi = 1020, om = 1021, rn = 1023, am = 1024, lm = 1025, ai = 1026, Xi = 1027, cm = 1028, ch = 1029, um = 1030, uh = 1031, hh = 1033, oo = 33776, ao = 33777, lo = 33778, co = 33779, Bl = 35840, zl = 35841, Hl = 35842, kl = 35843, hm = 36196, Gl = 37492, Vl = 37496, Wl = 37808, Xl = 37809, $l = 37810, ql = 37811, jl = 37812, Yl = 37813, Kl = 37814, Zl = 37815, Jl = 37816, Ql = 37817, ec = 37818, tc = 37819, nc = 37820, ic = 37821, uo = 36492, rc = 36494, sc = 36495, fm = 36283, oc = 36284, ac = 36285, lc = 36286, fh = 3e3, li = 3001, dm = 3200, pm = 3201, dh = 0, mm = 1, ci = "", it = "srgb", gn = "srgb-linear", Vs = "display-p3", ho = 7680, gm = 519, _m = 512, vm = 513, xm = 514, ym = 515, Sm = 516, Mm = 517, Em = 518, bm = 519, sa = 35044, cc = "300 es", oa = 1035, Rn = 2e3, Ds = 2001;
2507
2507
  class gi {
2508
2508
  addEventListener(e, t) {
2509
2509
  this._listeners === void 0 && (this._listeners = {});
@@ -2540,7 +2540,7 @@ class gi {
2540
2540
  }
2541
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
- const fr = Math.PI / 180, Sr = 180 / Math.PI;
2543
+ const fr = 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
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();
@@ -2590,7 +2590,7 @@ function Nm(n) {
2590
2590
  return n * fr;
2591
2591
  }
2592
2592
  function Om(n) {
2593
- return n * Sr;
2593
+ return n * Mr;
2594
2594
  }
2595
2595
  function aa(n) {
2596
2596
  return (n & n - 1) === 0 && n !== 0;
@@ -2598,7 +2598,7 @@ function aa(n) {
2598
2598
  function Fm(n) {
2599
2599
  return Math.pow(2, Math.ceil(Math.log(n) / Math.LN2));
2600
2600
  }
2601
- function Ds(n) {
2601
+ function Is(n) {
2602
2602
  return Math.pow(2, Math.floor(Math.log(n) / Math.LN2));
2603
2603
  }
2604
2604
  function Bm(n, e, t, i, r) {
@@ -2668,7 +2668,7 @@ function Ye(n, e) {
2668
2668
  }
2669
2669
  const ph = {
2670
2670
  DEG2RAD: fr,
2671
- RAD2DEG: Sr,
2671
+ RAD2DEG: Mr,
2672
2672
  generateUUID: mn,
2673
2673
  clamp: vt,
2674
2674
  euclideanModulo: Pa,
@@ -2687,7 +2687,7 @@ const ph = {
2687
2687
  radToDeg: Om,
2688
2688
  isPowerOfTwo: aa,
2689
2689
  ceilPowerOfTwo: Fm,
2690
- floorPowerOfTwo: Ds,
2690
+ floorPowerOfTwo: Is,
2691
2691
  setQuaternionFromProperEuler: Bm,
2692
2692
  normalize: Ye,
2693
2693
  denormalize: fn
@@ -3079,11 +3079,11 @@ function mh(n) {
3079
3079
  return !0;
3080
3080
  return !1;
3081
3081
  }
3082
- function Is(n) {
3082
+ function Us(n) {
3083
3083
  return document.createElementNS("http://www.w3.org/1999/xhtml", n);
3084
3084
  }
3085
3085
  function zm() {
3086
- const n = Is("canvas");
3086
+ const n = Us("canvas");
3087
3087
  return n.style.display = "block", n;
3088
3088
  }
3089
3089
  const hc = {};
@@ -3169,7 +3169,7 @@ class gh {
3169
3169
  if (e instanceof HTMLCanvasElement)
3170
3170
  t = e;
3171
3171
  else {
3172
- vi === void 0 && (vi = Is("canvas")), vi.width = e.width, vi.height = e.height;
3172
+ vi === void 0 && (vi = Us("canvas")), vi.width = e.width, vi.height = e.height;
3173
3173
  const i = vi.getContext("2d");
3174
3174
  e instanceof ImageData ? i.putImageData(e, 0, 0) : i.drawImage(e, 0, 0, e.width, e.height), t = vi;
3175
3175
  }
@@ -3177,7 +3177,7 @@ class gh {
3177
3177
  }
3178
3178
  static sRGBToLinear(e) {
3179
3179
  if (typeof HTMLImageElement != "undefined" && e instanceof HTMLImageElement || typeof HTMLCanvasElement != "undefined" && e instanceof HTMLCanvasElement || typeof ImageBitmap != "undefined" && e instanceof ImageBitmap) {
3180
- const t = Is("canvas");
3180
+ const t = Us("canvas");
3181
3181
  t.width = e.width, t.height = e.height;
3182
3182
  const i = t.getContext("2d");
3183
3183
  i.drawImage(e, 0, 0, e.width, e.height);
@@ -3237,7 +3237,7 @@ function mo(n) {
3237
3237
  }
3238
3238
  let qm = 0;
3239
3239
  class It extends gi {
3240
- constructor(e = It.DEFAULT_IMAGE, t = It.DEFAULT_MAPPING, i = nn, r = nn, s = $t, o = xr, a = rn, l = $n, c = It.DEFAULT_ANISOTROPY, u = ci) {
3240
+ constructor(e = It.DEFAULT_IMAGE, t = It.DEFAULT_MAPPING, i = nn, r = nn, s = $t, o = yr, a = rn, l = $n, c = It.DEFAULT_ANISOTROPY, u = ci) {
3241
3241
  super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: qm++ }), this.uuid = mn(), this.name = "", this.source = new _h(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = r, this.magFilter = s, this.minFilter = o, this.anisotropy = c, this.format = a, this.internalFormat = null, this.type = l, this.offset = new ue(0, 0), this.repeat = new ue(1, 1), this.center = new ue(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Be(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, typeof u == "string" ? this.colorSpace = u : (pr("THREE.Texture: Property .encoding has been replaced by .colorSpace."), this.colorSpace = u === li ? it : ci), this.userData = {}, this.version = 0, this.onUpdate = null, this.isRenderTargetTexture = !1, this.needsPMREMUpdate = !1;
3242
3242
  }
3243
3243
  get image() {
@@ -4155,7 +4155,7 @@ class Kn {
4155
4155
  intersectsTriangle(e) {
4156
4156
  if (this.isEmpty())
4157
4157
  return !1;
4158
- this.getCenter(tr), Hr.subVectors(this.max, tr), yi.subVectors(e.a, tr), Si.subVectors(e.b, tr), Mi.subVectors(e.c, tr), In.subVectors(Si, yi), Un.subVectors(Mi, Si), Qn.subVectors(yi, Mi);
4158
+ this.getCenter(tr), kr.subVectors(this.max, tr), yi.subVectors(e.a, tr), Si.subVectors(e.b, tr), Mi.subVectors(e.c, tr), In.subVectors(Si, yi), Un.subVectors(Mi, Si), Qn.subVectors(yi, Mi);
4159
4159
  let t = [
4160
4160
  0,
4161
4161
  -In.z,
@@ -4185,7 +4185,7 @@ class Kn {
4185
4185
  Qn.x,
4186
4186
  0
4187
4187
  ];
4188
- return !_o(t, yi, Si, Mi, Hr) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !_o(t, yi, Si, Mi, Hr)) ? !1 : (kr.crossVectors(In, Un), t = [kr.x, kr.y, kr.z], _o(t, yi, Si, Mi, Hr));
4188
+ return !_o(t, yi, Si, Mi, kr) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !_o(t, yi, Si, Mi, kr)) ? !1 : (Gr.crossVectors(In, Un), t = [Gr.x, Gr.y, Gr.z], _o(t, yi, Si, Mi, kr));
4189
4189
  }
4190
4190
  clampPoint(e, t) {
4191
4191
  return t.copy(e).clamp(this.min, this.max);
@@ -4221,7 +4221,7 @@ const Sn = [
4221
4221
  /* @__PURE__ */ new D(),
4222
4222
  /* @__PURE__ */ new D(),
4223
4223
  /* @__PURE__ */ new D()
4224
- ], Mn = /* @__PURE__ */ new D(), xi = /* @__PURE__ */ new Kn(), yi = /* @__PURE__ */ new D(), Si = /* @__PURE__ */ new D(), Mi = /* @__PURE__ */ new D(), In = /* @__PURE__ */ new D(), Un = /* @__PURE__ */ new D(), Qn = /* @__PURE__ */ new D(), tr = /* @__PURE__ */ new D(), Hr = /* @__PURE__ */ new D(), kr = /* @__PURE__ */ new D(), ei = /* @__PURE__ */ new D();
4224
+ ], Mn = /* @__PURE__ */ new D(), xi = /* @__PURE__ */ new Kn(), yi = /* @__PURE__ */ new D(), Si = /* @__PURE__ */ new D(), Mi = /* @__PURE__ */ new D(), In = /* @__PURE__ */ new D(), Un = /* @__PURE__ */ new D(), Qn = /* @__PURE__ */ new D(), tr = /* @__PURE__ */ new D(), kr = /* @__PURE__ */ new D(), Gr = /* @__PURE__ */ new D(), ei = /* @__PURE__ */ new D();
4225
4225
  function _o(n, e, t, i, r) {
4226
4226
  for (let s = 0, o = n.length - 3; s <= o; s += 3) {
4227
4227
  ei.fromArray(n, s);
@@ -4232,7 +4232,7 @@ function _o(n, e, t, i, r) {
4232
4232
  return !0;
4233
4233
  }
4234
4234
  const Km = /* @__PURE__ */ new Kn(), nr = /* @__PURE__ */ new D(), vo = /* @__PURE__ */ new D();
4235
- class Lr {
4235
+ class Dr {
4236
4236
  constructor(e = new D(), t = -1) {
4237
4237
  this.center = e, this.radius = t;
4238
4238
  }
@@ -4306,7 +4306,7 @@ class Lr {
4306
4306
  return new this.constructor().copy(this);
4307
4307
  }
4308
4308
  }
4309
- const En = /* @__PURE__ */ new D(), xo = /* @__PURE__ */ new D(), Gr = /* @__PURE__ */ new D(), Nn = /* @__PURE__ */ new D(), yo = /* @__PURE__ */ new D(), Vr = /* @__PURE__ */ new D(), So = /* @__PURE__ */ new D();
4309
+ const En = /* @__PURE__ */ new D(), xo = /* @__PURE__ */ new D(), Vr = /* @__PURE__ */ new D(), Nn = /* @__PURE__ */ new D(), yo = /* @__PURE__ */ new D(), Wr = /* @__PURE__ */ new D(), So = /* @__PURE__ */ new D();
4310
4310
  class La {
4311
4311
  constructor(e = new D(), t = new D(0, 0, -1)) {
4312
4312
  this.origin = e, this.direction = t;
@@ -4339,8 +4339,8 @@ class La {
4339
4339
  return t < 0 ? this.origin.distanceToSquared(e) : (En.copy(this.origin).addScaledVector(this.direction, t), En.distanceToSquared(e));
4340
4340
  }
4341
4341
  distanceSqToSegment(e, t, i, r) {
4342
- xo.copy(e).add(t).multiplyScalar(0.5), Gr.copy(t).sub(e).normalize(), Nn.copy(this.origin).sub(xo);
4343
- const s = e.distanceTo(t) * 0.5, o = -this.direction.dot(Gr), a = Nn.dot(this.direction), l = -Nn.dot(Gr), c = Nn.lengthSq(), u = Math.abs(1 - o * o);
4342
+ xo.copy(e).add(t).multiplyScalar(0.5), Vr.copy(t).sub(e).normalize(), Nn.copy(this.origin).sub(xo);
4343
+ const s = e.distanceTo(t) * 0.5, o = -this.direction.dot(Vr), a = Nn.dot(this.direction), l = -Nn.dot(Vr), c = Nn.lengthSq(), u = Math.abs(1 - o * o);
4344
4344
  let h, f, d, g;
4345
4345
  if (u > 0)
4346
4346
  if (h = o * l - a, f = o * a - l, g = s * u, h >= 0)
@@ -4356,7 +4356,7 @@ class La {
4356
4356
  f <= -g ? (h = Math.max(0, -(-o * s + a)), f = h > 0 ? -s : Math.min(Math.max(-s, -l), s), d = -h * h + f * (f + 2 * l) + c) : f <= g ? (h = 0, f = Math.min(Math.max(-s, -l), s), d = f * (f + 2 * l) + c) : (h = Math.max(0, -(o * s + a)), f = h > 0 ? s : Math.min(Math.max(-s, -l), s), d = -h * h + f * (f + 2 * l) + c);
4357
4357
  else
4358
4358
  f = o > 0 ? -s : s, h = Math.max(0, -(o * f + a)), d = -h * h + f * (f + 2 * l) + c;
4359
- return i && i.copy(this.origin).addScaledVector(this.direction, h), r && r.copy(xo).addScaledVector(Gr, f), d;
4359
+ return i && i.copy(this.origin).addScaledVector(this.direction, h), r && r.copy(xo).addScaledVector(Vr, f), d;
4360
4360
  }
4361
4361
  intersectSphere(e, t) {
4362
4362
  En.subVectors(e.center, this.origin);
@@ -4393,7 +4393,7 @@ class La {
4393
4393
  return this.intersectBox(e, En) !== null;
4394
4394
  }
4395
4395
  intersectTriangle(e, t, i, r, s) {
4396
- yo.subVectors(t, e), Vr.subVectors(i, e), So.crossVectors(yo, Vr);
4396
+ yo.subVectors(t, e), Wr.subVectors(i, e), So.crossVectors(yo, Wr);
4397
4397
  let o = this.direction.dot(So), a;
4398
4398
  if (o > 0) {
4399
4399
  if (r)
@@ -4404,7 +4404,7 @@ class La {
4404
4404
  else
4405
4405
  return null;
4406
4406
  Nn.subVectors(this.origin, e);
4407
- const l = a * this.direction.dot(Vr.crossVectors(Nn, Vr));
4407
+ const l = a * this.direction.dot(Wr.crossVectors(Nn, Wr));
4408
4408
  if (l < 0)
4409
4409
  return null;
4410
4410
  const c = a * this.direction.dot(yo.cross(Nn));
@@ -4555,7 +4555,7 @@ class rt {
4555
4555
  }
4556
4556
  lookAt(e, t, i) {
4557
4557
  const r = this.elements;
4558
- return Ht.subVectors(e, t), Ht.lengthSq() === 0 && (Ht.z = 1), Ht.normalize(), On.crossVectors(i, Ht), On.lengthSq() === 0 && (Math.abs(i.z) === 1 ? Ht.x += 1e-4 : Ht.z += 1e-4, Ht.normalize(), On.crossVectors(i, Ht)), On.normalize(), Wr.crossVectors(Ht, On), r[0] = On.x, r[4] = Wr.x, r[8] = Ht.x, r[1] = On.y, r[5] = Wr.y, r[9] = Ht.y, r[2] = On.z, r[6] = Wr.z, r[10] = Ht.z, this;
4558
+ return Ht.subVectors(e, t), Ht.lengthSq() === 0 && (Ht.z = 1), Ht.normalize(), On.crossVectors(i, Ht), On.lengthSq() === 0 && (Math.abs(i.z) === 1 ? Ht.x += 1e-4 : Ht.z += 1e-4, Ht.normalize(), On.crossVectors(i, Ht)), On.normalize(), Xr.crossVectors(Ht, On), r[0] = On.x, r[4] = Xr.x, r[8] = Ht.x, r[1] = On.y, r[5] = Xr.y, r[9] = Ht.y, r[2] = On.z, r[6] = Xr.z, r[10] = Ht.z, this;
4559
4559
  }
4560
4560
  multiply(e) {
4561
4561
  return this.multiplyMatrices(this, e);
@@ -4777,7 +4777,7 @@ class rt {
4777
4777
  let d, g;
4778
4778
  if (a === Rn)
4779
4779
  d = -(o + s) / (o - s), g = -2 * o * s / (o - s);
4780
- else if (a === Ls)
4780
+ else if (a === Ds)
4781
4781
  d = -o / (o - s), g = -o * s / (o - s);
4782
4782
  else
4783
4783
  throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + a);
@@ -4788,7 +4788,7 @@ class rt {
4788
4788
  let g, _;
4789
4789
  if (a === Rn)
4790
4790
  g = (o + s) * h, _ = -2 * h;
4791
- else if (a === Ls)
4791
+ else if (a === Ds)
4792
4792
  g = s * h, _ = -1 * h;
4793
4793
  else
4794
4794
  throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + a);
@@ -4811,7 +4811,7 @@ class rt {
4811
4811
  return e[t] = i[0], e[t + 1] = i[1], e[t + 2] = i[2], e[t + 3] = i[3], e[t + 4] = i[4], e[t + 5] = i[5], e[t + 6] = i[6], e[t + 7] = i[7], e[t + 8] = i[8], e[t + 9] = i[9], e[t + 10] = i[10], e[t + 11] = i[11], e[t + 12] = i[12], e[t + 13] = i[13], e[t + 14] = i[14], e[t + 15] = i[15], e;
4812
4812
  }
4813
4813
  }
4814
- const Ei = /* @__PURE__ */ new D(), Jt = /* @__PURE__ */ new rt(), Zm = /* @__PURE__ */ new D(0, 0, 0), Jm = /* @__PURE__ */ new D(1, 1, 1), On = /* @__PURE__ */ new D(), Wr = /* @__PURE__ */ new D(), Ht = /* @__PURE__ */ new D(), dc = /* @__PURE__ */ new rt(), pc = /* @__PURE__ */ new pi();
4814
+ const Ei = /* @__PURE__ */ new D(), Jt = /* @__PURE__ */ new rt(), Zm = /* @__PURE__ */ new D(0, 0, 0), Jm = /* @__PURE__ */ new D(1, 1, 1), On = /* @__PURE__ */ new D(), Xr = /* @__PURE__ */ new D(), Ht = /* @__PURE__ */ new D(), dc = /* @__PURE__ */ new rt(), pc = /* @__PURE__ */ new pi();
4815
4815
  class Ws {
4816
4816
  constructor(e = 0, t = 0, i = 0, r = Ws.DEFAULT_ORDER) {
4817
4817
  this.isEuler = !0, this._x = e, this._y = t, this._z = i, this._order = r;
@@ -4933,7 +4933,7 @@ class Da {
4933
4933
  }
4934
4934
  }
4935
4935
  let Qm = 0;
4936
- const mc = /* @__PURE__ */ new D(), bi = /* @__PURE__ */ new pi(), bn = /* @__PURE__ */ new rt(), Xr = /* @__PURE__ */ new D(), ir = /* @__PURE__ */ new D(), eg = /* @__PURE__ */ new D(), tg = /* @__PURE__ */ new pi(), gc = /* @__PURE__ */ new D(1, 0, 0), _c = /* @__PURE__ */ new D(0, 1, 0), vc = /* @__PURE__ */ new D(0, 0, 1), ng = { type: "added" }, ig = { type: "removed" };
4936
+ const mc = /* @__PURE__ */ new D(), bi = /* @__PURE__ */ new pi(), bn = /* @__PURE__ */ new rt(), $r = /* @__PURE__ */ new D(), ir = /* @__PURE__ */ new D(), eg = /* @__PURE__ */ new D(), tg = /* @__PURE__ */ new pi(), gc = /* @__PURE__ */ new D(1, 0, 0), _c = /* @__PURE__ */ new D(0, 1, 0), vc = /* @__PURE__ */ new D(0, 0, 1), ng = { type: "added" }, ig = { type: "removed" };
4937
4937
  class at extends gi {
4938
4938
  constructor() {
4939
4939
  super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: Qm++ }), this.uuid = mn(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = at.DEFAULT_UP.clone();
@@ -5029,9 +5029,9 @@ class at extends gi {
5029
5029
  return this.updateWorldMatrix(!0, !1), e.applyMatrix4(bn.copy(this.matrixWorld).invert());
5030
5030
  }
5031
5031
  lookAt(e, t, i) {
5032
- e.isVector3 ? Xr.copy(e) : Xr.set(e, t, i);
5032
+ e.isVector3 ? $r.copy(e) : $r.set(e, t, i);
5033
5033
  const r = this.parent;
5034
- this.updateWorldMatrix(!0, !1), ir.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? bn.lookAt(ir, Xr, this.up) : bn.lookAt(Xr, ir, this.up), this.quaternion.setFromRotationMatrix(bn), r && (bn.extractRotation(r.matrixWorld), bi.setFromRotationMatrix(bn), this.quaternion.premultiply(bi.invert()));
5034
+ this.updateWorldMatrix(!0, !1), ir.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? bn.lookAt(ir, $r, this.up) : bn.lookAt($r, ir, this.up), this.quaternion.setFromRotationMatrix(bn), r && (bn.extractRotation(r.matrixWorld), bi.setFromRotationMatrix(bn), this.quaternion.premultiply(bi.invert()));
5035
5035
  }
5036
5036
  add(e) {
5037
5037
  if (arguments.length > 1) {
@@ -5226,7 +5226,7 @@ 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
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
- let $r = !1;
5229
+ let qr = !1;
5230
5230
  class tn {
5231
5231
  constructor(e = new D(), t = new D(), i = new D()) {
5232
5232
  this.a = e, this.b = t, this.c = i;
@@ -5250,7 +5250,7 @@ class tn {
5250
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
- return $r === !1 && (console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."), $r = !0), this.getInterpolation(e, t, i, r, s, o, a, l);
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
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;
@@ -5289,7 +5289,7 @@ class tn {
5289
5289
  return tn.getBarycoord(e, this.a, this.b, this.c, t);
5290
5290
  }
5291
5291
  getUV(e, t, i, r, s) {
5292
- return $r === !1 && (console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."), $r = !0), tn.getInterpolation(e, this.a, this.b, this.c, t, i, r, s);
5292
+ return qr === !1 && (console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."), qr = !0), tn.getInterpolation(e, this.a, this.b, this.c, t, i, r, s);
5293
5293
  }
5294
5294
  getInterpolation(e, t, i, r, s) {
5295
5295
  return tn.getInterpolation(e, this.a, this.b, this.c, t, i, r, s);
@@ -5569,7 +5569,7 @@ const xh = {
5569
5569
  whitesmoke: 16119285,
5570
5570
  yellow: 16776960,
5571
5571
  yellowgreen: 10145074
5572
- }, en = { h: 0, s: 0, l: 0 }, qr = { h: 0, s: 0, l: 0 };
5572
+ }, en = { h: 0, s: 0, l: 0 }, jr = { h: 0, s: 0, l: 0 };
5573
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
  }
@@ -5746,8 +5746,8 @@ class je {
5746
5746
  return this.r = e.r + (t.r - e.r) * i, this.g = e.g + (t.g - e.g) * i, this.b = e.b + (t.b - e.b) * i, this;
5747
5747
  }
5748
5748
  lerpHSL(e, t) {
5749
- this.getHSL(en), e.getHSL(qr);
5750
- const i = dr(en.h, qr.h, t), r = dr(en.s, qr.s, t), s = dr(en.l, qr.l, t);
5749
+ this.getHSL(en), e.getHSL(jr);
5750
+ const i = dr(en.h, jr.h, t), r = dr(en.s, jr.s, t), s = dr(en.l, jr.l, t);
5751
5751
  return this.setHSL(i, r, s), this;
5752
5752
  }
5753
5753
  setFromVector3(e) {
@@ -5786,7 +5786,7 @@ class Ia extends Zi {
5786
5786
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
5787
5787
  }
5788
5788
  }
5789
- const pt = /* @__PURE__ */ new D(), jr = /* @__PURE__ */ new ue();
5789
+ const pt = /* @__PURE__ */ new D(), Yr = /* @__PURE__ */ new ue();
5790
5790
  class an {
5791
5791
  constructor(e, t, i = !1) {
5792
5792
  if (Array.isArray(e))
@@ -5816,7 +5816,7 @@ class an {
5816
5816
  applyMatrix3(e) {
5817
5817
  if (this.itemSize === 2)
5818
5818
  for (let t = 0, i = this.count; t < i; t++)
5819
- jr.fromBufferAttribute(this, t), jr.applyMatrix3(e), this.setXY(t, jr.x, jr.y);
5819
+ Yr.fromBufferAttribute(this, t), Yr.applyMatrix3(e), this.setXY(t, Yr.x, Yr.y);
5820
5820
  else if (this.itemSize === 3)
5821
5821
  for (let t = 0, i = this.count; t < i; t++)
5822
5822
  pt.fromBufferAttribute(this, t), pt.applyMatrix3(e), this.setXYZ(t, pt.x, pt.y, pt.z);
@@ -6016,7 +6016,7 @@ class _n extends gi {
6016
6016
  (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this);
6017
6017
  }
6018
6018
  computeBoundingSphere() {
6019
- this.boundingSphere === null && (this.boundingSphere = new Lr());
6019
+ this.boundingSphere === null && (this.boundingSphere = new Dr());
6020
6020
  const e = this.attributes.position, t = this.morphAttributes.position;
6021
6021
  if (e && e.isGLBufferAttribute) {
6022
6022
  console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', this), this.boundingSphere.set(new D(), 1 / 0);
@@ -6228,7 +6228,7 @@ class _n extends gi {
6228
6228
  this.dispatchEvent({ type: "dispose" });
6229
6229
  }
6230
6230
  }
6231
- const yc = /* @__PURE__ */ new rt(), ti = /* @__PURE__ */ new La(), Yr = /* @__PURE__ */ new Lr(), Sc = /* @__PURE__ */ new D(), Ci = /* @__PURE__ */ new D(), Ri = /* @__PURE__ */ new D(), Pi = /* @__PURE__ */ new D(), Co = /* @__PURE__ */ new D(), Kr = /* @__PURE__ */ new D(), Zr = /* @__PURE__ */ new ue(), Jr = /* @__PURE__ */ new ue(), Qr = /* @__PURE__ */ new ue(), Mc = /* @__PURE__ */ new D(), Ec = /* @__PURE__ */ new D(), bc = /* @__PURE__ */ new D(), es = /* @__PURE__ */ new D(), ts = /* @__PURE__ */ new D();
6231
+ const yc = /* @__PURE__ */ new rt(), ti = /* @__PURE__ */ new La(), Kr = /* @__PURE__ */ new Dr(), Sc = /* @__PURE__ */ new D(), Ci = /* @__PURE__ */ new D(), Ri = /* @__PURE__ */ new D(), Pi = /* @__PURE__ */ new D(), Co = /* @__PURE__ */ new D(), Zr = /* @__PURE__ */ new D(), Jr = /* @__PURE__ */ new ue(), Qr = /* @__PURE__ */ new ue(), es = /* @__PURE__ */ new ue(), Mc = /* @__PURE__ */ new D(), Ec = /* @__PURE__ */ new D(), bc = /* @__PURE__ */ new D(), ts = /* @__PURE__ */ new D(), ns = /* @__PURE__ */ new D();
6232
6232
  class pn extends at {
6233
6233
  constructor(e = new _n(), t = new Ia()) {
6234
6234
  super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.updateMorphTargets();
@@ -6254,18 +6254,18 @@ class pn extends at {
6254
6254
  t.fromBufferAttribute(r, e);
6255
6255
  const a = this.morphTargetInfluences;
6256
6256
  if (s && a) {
6257
- Kr.set(0, 0, 0);
6257
+ Zr.set(0, 0, 0);
6258
6258
  for (let l = 0, c = s.length; l < c; l++) {
6259
6259
  const u = a[l], h = s[l];
6260
- u !== 0 && (Co.fromBufferAttribute(h, e), o ? Kr.addScaledVector(Co, u) : Kr.addScaledVector(Co.sub(t), u));
6260
+ u !== 0 && (Co.fromBufferAttribute(h, e), o ? Zr.addScaledVector(Co, u) : Zr.addScaledVector(Co.sub(t), u));
6261
6261
  }
6262
- t.add(Kr);
6262
+ t.add(Zr);
6263
6263
  }
6264
6264
  return t;
6265
6265
  }
6266
6266
  raycast(e, t) {
6267
6267
  const i = this.geometry, r = this.material, s = this.matrixWorld;
6268
- r !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(), Yr.copy(i.boundingSphere), Yr.applyMatrix4(s), ti.copy(e.ray).recast(e.near), !(Yr.containsPoint(ti.origin) === !1 && (ti.intersectSphere(Yr, Sc) === null || ti.origin.distanceToSquared(Sc) > io(e.far - e.near, 2))) && (yc.copy(s).invert(), ti.copy(e.ray).applyMatrix4(yc), !(i.boundingBox !== null && ti.intersectsBox(i.boundingBox) === !1) && this._computeIntersections(e, t, ti)));
6268
+ r !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(), Kr.copy(i.boundingSphere), Kr.applyMatrix4(s), ti.copy(e.ray).recast(e.near), !(Kr.containsPoint(ti.origin) === !1 && (ti.intersectSphere(Kr, Sc) === null || ti.origin.distanceToSquared(Sc) > io(e.far - e.near, 2))) && (yc.copy(s).invert(), ti.copy(e.ray).applyMatrix4(yc), !(i.boundingBox !== null && ti.intersectsBox(i.boundingBox) === !1) && this._computeIntersections(e, t, ti)));
6269
6269
  }
6270
6270
  _computeIntersections(e, t, i) {
6271
6271
  let r;
@@ -6276,14 +6276,14 @@ class pn extends at {
6276
6276
  const m = f[g], p = o[m.materialIndex], S = 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 = S, b = v; M < b; M += 3) {
6278
6278
  const R = a.getX(M), T = a.getX(M + 1), N = a.getX(M + 2);
6279
- r = ns(this, p, e, i, c, u, h, R, T, N), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6279
+ r = is(this, p, e, i, c, u, h, R, T, N), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6280
6280
  }
6281
6281
  }
6282
6282
  else {
6283
6283
  const g = Math.max(0, d.start), _ = Math.min(a.count, d.start + d.count);
6284
6284
  for (let m = g, p = _; m < p; m += 3) {
6285
6285
  const S = a.getX(m), v = a.getX(m + 1), M = a.getX(m + 2);
6286
- r = ns(this, o, e, i, c, u, h, S, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6286
+ r = is(this, o, e, i, c, u, h, S, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6287
6287
  }
6288
6288
  }
6289
6289
  else if (l !== void 0)
@@ -6292,14 +6292,14 @@ class pn extends at {
6292
6292
  const m = f[g], p = o[m.materialIndex], S = 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 = S, b = v; M < b; M += 3) {
6294
6294
  const R = M, T = M + 1, N = M + 2;
6295
- r = ns(this, p, e, i, c, u, h, R, T, N), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6295
+ r = is(this, p, e, i, c, u, h, R, T, N), r && (r.faceIndex = Math.floor(M / 3), r.face.materialIndex = m.materialIndex, t.push(r));
6296
6296
  }
6297
6297
  }
6298
6298
  else {
6299
6299
  const g = Math.max(0, d.start), _ = Math.min(l.count, d.start + d.count);
6300
6300
  for (let m = g, p = _; m < p; m += 3) {
6301
6301
  const S = m, v = m + 1, M = m + 2;
6302
- r = ns(this, o, e, i, c, u, h, S, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6302
+ r = is(this, o, e, i, c, u, h, S, v, M), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
6303
6303
  }
6304
6304
  }
6305
6305
  }
@@ -6308,19 +6308,19 @@ function og(n, e, t, i, r, s, o, a) {
6308
6308
  let l;
6309
6309
  if (e.side === Ot ? l = i.intersectTriangle(o, s, r, !0, a) : l = i.intersectTriangle(r, s, o, e.side === jn, a), l === null)
6310
6310
  return null;
6311
- ts.copy(a), ts.applyMatrix4(n.matrixWorld);
6312
- const c = t.ray.origin.distanceTo(ts);
6311
+ ns.copy(a), ns.applyMatrix4(n.matrixWorld);
6312
+ const c = t.ray.origin.distanceTo(ns);
6313
6313
  return c < t.near || c > t.far ? null : {
6314
6314
  distance: c,
6315
- point: ts.clone(),
6315
+ point: ns.clone(),
6316
6316
  object: n
6317
6317
  };
6318
6318
  }
6319
- function ns(n, e, t, i, r, s, o, a, l, c) {
6319
+ function is(n, e, t, i, r, s, o, a, l, c) {
6320
6320
  n.getVertexPosition(a, Ci), n.getVertexPosition(l, Ri), n.getVertexPosition(c, Pi);
6321
- const u = og(n, e, t, i, Ci, Ri, Pi, es);
6321
+ const u = og(n, e, t, i, Ci, Ri, Pi, ts);
6322
6322
  if (u) {
6323
- r && (Zr.fromBufferAttribute(r, a), Jr.fromBufferAttribute(r, l), Qr.fromBufferAttribute(r, c), u.uv = tn.getInterpolation(es, Ci, Ri, Pi, Zr, Jr, Qr, new ue())), s && (Zr.fromBufferAttribute(s, a), Jr.fromBufferAttribute(s, l), Qr.fromBufferAttribute(s, c), u.uv1 = tn.getInterpolation(es, Ci, Ri, Pi, Zr, Jr, Qr, new ue()), u.uv2 = u.uv1), o && (Mc.fromBufferAttribute(o, a), Ec.fromBufferAttribute(o, l), bc.fromBufferAttribute(o, c), u.normal = tn.getInterpolation(es, Ci, Ri, Pi, Mc, Ec, bc, new D()), u.normal.dot(i.direction) > 0 && u.normal.multiplyScalar(-1));
6323
+ r && (Jr.fromBufferAttribute(r, a), Qr.fromBufferAttribute(r, l), es.fromBufferAttribute(r, c), u.uv = tn.getInterpolation(ts, Ci, Ri, Pi, Jr, Qr, es, new ue())), s && (Jr.fromBufferAttribute(s, a), Qr.fromBufferAttribute(s, l), es.fromBufferAttribute(s, c), u.uv1 = tn.getInterpolation(ts, Ci, Ri, Pi, Jr, Qr, es, new ue()), u.uv2 = u.uv1), o && (Mc.fromBufferAttribute(o, a), Ec.fromBufferAttribute(o, l), bc.fromBufferAttribute(o, c), u.normal = tn.getInterpolation(ts, Ci, Ri, Pi, Mc, Ec, bc, new D()), u.normal.dot(i.direction) > 0 && u.normal.multiplyScalar(-1));
6324
6324
  const h = {
6325
6325
  a,
6326
6326
  b: l,
@@ -6332,7 +6332,7 @@ function ns(n, e, t, i, r, s, o, a, l, c) {
6332
6332
  }
6333
6333
  return u;
6334
6334
  }
6335
- class Dr extends _n {
6335
+ class Ir extends _n {
6336
6336
  constructor(e = 1, t = 1, i = 1, r = 1, s = 1, o = 1) {
6337
6337
  super(), this.type = "BoxGeometry", this.parameters = {
6338
6338
  width: e,
@@ -6370,7 +6370,7 @@ class Dr extends _n {
6370
6370
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
6371
6371
  }
6372
6372
  static fromJSON(e) {
6373
- return new Dr(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
6373
+ return new Ir(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
6374
6374
  }
6375
6375
  }
6376
6376
  function $i(n) {
@@ -6504,7 +6504,7 @@ class Vt extends Eh {
6504
6504
  */
6505
6505
  setFocalLength(e) {
6506
6506
  const t = 0.5 * this.getFilmHeight() / e;
6507
- this.fov = Sr * 2 * Math.atan(t), this.updateProjectionMatrix();
6507
+ this.fov = Mr * 2 * Math.atan(t), this.updateProjectionMatrix();
6508
6508
  }
6509
6509
  /**
6510
6510
  * Calculates the focal length from the current .fov and .filmGauge.
@@ -6514,7 +6514,7 @@ class Vt extends Eh {
6514
6514
  return 0.5 * this.getFilmHeight() / e;
6515
6515
  }
6516
6516
  getEffectiveFOV() {
6517
- return Sr * 2 * Math.atan(
6517
+ return Mr * 2 * Math.atan(
6518
6518
  Math.tan(fr * 0.5 * this.fov) / this.zoom
6519
6519
  );
6520
6520
  }
@@ -6612,7 +6612,7 @@ class ug extends at {
6612
6612
  this.remove(c);
6613
6613
  if (e === Rn)
6614
6614
  i.up.set(0, 1, 0), i.lookAt(1, 0, 0), r.up.set(0, 1, 0), r.lookAt(-1, 0, 0), s.up.set(0, 0, -1), s.lookAt(0, 1, 0), o.up.set(0, 0, 1), o.lookAt(0, -1, 0), a.up.set(0, 1, 0), a.lookAt(0, 0, 1), l.up.set(0, 1, 0), l.lookAt(0, 0, -1);
6615
- else if (e === Ls)
6615
+ else if (e === Ds)
6616
6616
  i.up.set(0, -1, 0), i.lookAt(-1, 0, 0), r.up.set(0, -1, 0), r.lookAt(1, 0, 0), s.up.set(0, 0, 1), s.lookAt(0, 1, 0), o.up.set(0, 0, -1), o.lookAt(0, -1, 0), a.up.set(0, -1, 0), a.lookAt(0, 0, 1), l.up.set(0, -1, 0), l.lookAt(0, 0, -1);
6617
6617
  else
6618
6618
  throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: " + e);
@@ -6695,7 +6695,7 @@ class hg extends di {
6695
6695
  }
6696
6696
  `
6697
6697
  )
6698
- }, r = new Dr(5, 5, 5), s = new Yn({
6698
+ }, r = new Ir(5, 5, 5), s = new Yn({
6699
6699
  name: "CubemapFromEquirect",
6700
6700
  uniforms: $i(i.uniforms),
6701
6701
  vertexShader: i.vertexShader,
@@ -6705,7 +6705,7 @@ class hg extends di {
6705
6705
  });
6706
6706
  s.uniforms.tEquirect.value = t;
6707
6707
  const o = new pn(r, s), a = t.minFilter;
6708
- return t.minFilter === xr && (t.minFilter = $t), new ug(1, 10, this).update(e, o), t.minFilter = a, o.geometry.dispose(), o.material.dispose(), this;
6708
+ return t.minFilter === yr && (t.minFilter = $t), new ug(1, 10, this).update(e, o), t.minFilter = a, o.geometry.dispose(), o.material.dispose(), this;
6709
6709
  }
6710
6710
  clear(e, t, i, r) {
6711
6711
  const s = e.getRenderTarget();
@@ -6785,7 +6785,7 @@ class Hn {
6785
6785
  return new this.constructor().copy(this);
6786
6786
  }
6787
6787
  }
6788
- const ni = /* @__PURE__ */ new Lr(), is = /* @__PURE__ */ new D();
6788
+ const ni = /* @__PURE__ */ new Dr(), rs = /* @__PURE__ */ new D();
6789
6789
  class Na {
6790
6790
  constructor(e = new Hn(), t = new Hn(), i = new Hn(), r = new Hn(), s = new Hn(), o = new Hn()) {
6791
6791
  this.planes = [e, t, i, r, s, o];
@@ -6804,7 +6804,7 @@ class Na {
6804
6804
  const i = this.planes, r = e.elements, s = r[0], o = r[1], a = r[2], l = r[3], c = r[4], u = r[5], h = r[6], f = r[7], d = r[8], g = r[9], _ = r[10], m = r[11], p = r[12], S = r[13], v = r[14], M = r[15];
6805
6805
  if (i[0].setComponents(l - s, f - c, m - d, M - p).normalize(), i[1].setComponents(l + s, f + c, m + d, M + p).normalize(), i[2].setComponents(l + o, f + u, m + g, M + S).normalize(), i[3].setComponents(l - o, f - u, m - g, M - S).normalize(), i[4].setComponents(l - a, f - h, m - _, M - v).normalize(), t === Rn)
6806
6806
  i[5].setComponents(l + a, f + h, m + _, M + v).normalize();
6807
- else if (t === Ls)
6807
+ else if (t === Ds)
6808
6808
  i[5].setComponents(a, h, _, v).normalize();
6809
6809
  else
6810
6810
  throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + t);
@@ -6833,7 +6833,7 @@ class Na {
6833
6833
  const t = this.planes;
6834
6834
  for (let i = 0; i < 6; i++) {
6835
6835
  const r = t[i];
6836
- if (is.x = r.normal.x > 0 ? e.max.x : e.min.x, is.y = r.normal.y > 0 ? e.max.y : e.min.y, is.z = r.normal.z > 0 ? e.max.z : e.min.z, r.distanceToPoint(is) < 0)
6836
+ if (rs.x = r.normal.x > 0 ? e.max.x : e.min.x, rs.y = r.normal.y > 0 ? e.max.y : e.min.y, rs.z = r.normal.z > 0 ? e.max.z : e.min.z, r.distanceToPoint(rs) < 0)
6837
6837
  return !1;
6838
6838
  }
6839
6839
  return !0;
@@ -10863,7 +10863,7 @@ Ut.physical = {
10863
10863
  vertexShader: Fe.meshphysical_vert,
10864
10864
  fragmentShader: Fe.meshphysical_frag
10865
10865
  };
10866
- const rs = { r: 0, b: 0, g: 0 };
10866
+ const ss = { r: 0, b: 0, g: 0 };
10867
10867
  function $v(n, e, t, i, r, s, o) {
10868
10868
  const a = new je(0);
10869
10869
  let l = s === !0 ? 0 : 1, c, u, h = null, f = 0, d = null;
@@ -10872,7 +10872,7 @@ function $v(n, e, t, i, r, s, o) {
10872
10872
  v && v.isTexture && (v = (p.backgroundBlurriness > 0 ? t : e).get(v)), v === null ? _(a, l) : v && v.isColor && (_(v, 1), S = !0);
10873
10873
  const M = n.xr.getEnvironmentBlendMode();
10874
10874
  M === "additive" ? i.buffers.color.setClear(0, 0, 0, 1, o) : M === "alpha-blend" && i.buffers.color.setClear(0, 0, 0, 0, o), (n.autoClear || S) && n.clear(n.autoClearColor, n.autoClearDepth, n.autoClearStencil), v && (v.isCubeTexture || v.mapping === Gs) ? (u === void 0 && (u = new pn(
10875
- new Dr(1, 1, 1),
10875
+ new Ir(1, 1, 1),
10876
10876
  new Yn({
10877
10877
  name: "BackgroundCubeMaterial",
10878
10878
  uniforms: $i(Ut.backgroundCube.uniforms),
@@ -10908,7 +10908,7 @@ function $v(n, e, t, i, r, s, o) {
10908
10908
  }), r.update(c)), c.material.uniforms.t2D.value = v, c.material.uniforms.backgroundIntensity.value = p.backgroundIntensity, c.material.toneMapped = v.colorSpace !== it, v.matrixAutoUpdate === !0 && v.updateMatrix(), c.material.uniforms.uvTransform.value.copy(v.matrix), (h !== v || f !== v.version || d !== n.toneMapping) && (c.material.needsUpdate = !0, h = v, f = v.version, d = n.toneMapping), c.layers.enableAll(), m.unshift(c, c.geometry, c.material, 0, 0, null));
10909
10909
  }
10910
10910
  function _(m, p) {
10911
- m.getRGB(rs, Mh(n)), i.buffers.color.setClear(rs.r, rs.g, rs.b, p, o);
10911
+ m.getRGB(ss, Mh(n)), i.buffers.color.setClear(ss.r, ss.g, ss.b, p, o);
10912
10912
  }
10913
10913
  return {
10914
10914
  getClearColor: function() {
@@ -11416,7 +11416,7 @@ class Cc {
11416
11416
  this._lodPlanes[e].dispose();
11417
11417
  }
11418
11418
  _cleanup(e) {
11419
- this._renderer.setRenderTarget(Lo), e.scissorTest = !1, ss(e, 0, 0, e.width, e.height);
11419
+ this._renderer.setRenderTarget(Lo), e.scissorTest = !1, os(e, 0, 0, e.width, e.height);
11420
11420
  }
11421
11421
  _fromTexture(e, t) {
11422
11422
  e.mapping === Vi || e.mapping === Wi ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), Lo = this._renderer.getRenderTarget();
@@ -11428,7 +11428,7 @@ class Cc {
11428
11428
  magFilter: $t,
11429
11429
  minFilter: $t,
11430
11430
  generateMipmaps: !1,
11431
- type: yr,
11431
+ type: Sr,
11432
11432
  format: rn,
11433
11433
  colorSpace: gn,
11434
11434
  depthBuffer: !1
@@ -11452,7 +11452,7 @@ class Cc {
11452
11452
  side: Ot,
11453
11453
  depthWrite: !1,
11454
11454
  depthTest: !1
11455
- }), g = new pn(new Dr(), d);
11455
+ }), g = new pn(new Ir(), d);
11456
11456
  let _ = !1;
11457
11457
  const m = e.background;
11458
11458
  m ? m.isColor && (d.color.copy(m), e.background = null, _ = !0) : (d.color.copy(Tc), _ = !0);
@@ -11460,7 +11460,7 @@ class Cc {
11460
11460
  const S = p % 3;
11461
11461
  S === 0 ? (a.up.set(0, l[p], 0), a.lookAt(c[p], 0, 0)) : S === 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]));
11462
11462
  const v = this._cubeSize;
11463
- ss(r, S * v, p > 2 ? v : 0, v, v), u.setRenderTarget(r), _ && u.render(g, a), u.render(e, a);
11463
+ os(r, S * v, p > 2 ? v : 0, v, v), u.setRenderTarget(r), _ && u.render(g, a), u.render(e, a);
11464
11464
  }
11465
11465
  g.geometry.dispose(), g.material.dispose(), u.toneMapping = f, u.autoClear = h, e.background = m;
11466
11466
  }
@@ -11470,7 +11470,7 @@ class Cc {
11470
11470
  const s = r ? this._cubemapMaterial : this._equirectMaterial, o = new pn(this._lodPlanes[0], s), a = s.uniforms;
11471
11471
  a.envMap.value = e;
11472
11472
  const l = this._cubeSize;
11473
- ss(t, 0, 0, 3 * l, 2 * l), i.setRenderTarget(t), i.render(o, Po);
11473
+ os(t, 0, 0, 3 * l, 2 * l), i.setRenderTarget(t), i.render(o, Po);
11474
11474
  }
11475
11475
  _applyPMREM(e) {
11476
11476
  const t = this._renderer, i = t.autoClear;
@@ -11527,7 +11527,7 @@ class Cc {
11527
11527
  const { _lodMax: v } = this;
11528
11528
  f.dTheta.value = g, f.mipInt.value = v - i;
11529
11529
  const M = this._sizeLods[r], b = 3 * M * (r > v - Oi ? r - v + Oi : 0), R = 4 * (this._cubeSize - M);
11530
- ss(t, b, R, 3 * M, 2 * M), l.setRenderTarget(t), l.render(h, Po);
11530
+ os(t, b, R, 3 * M, 2 * M), l.setRenderTarget(t), l.render(h, Po);
11531
11531
  }
11532
11532
  }
11533
11533
  function Qv(n) {
@@ -11574,7 +11574,7 @@ function Rc(n, e, t) {
11574
11574
  const i = new di(n, e, t);
11575
11575
  return i.texture.mapping = Gs, i.texture.name = "PMREM.cubeUv", i.scissorTest = !0, i;
11576
11576
  }
11577
- function ss(n, e, t, i, r) {
11577
+ function os(n, e, t, i, r) {
11578
11578
  n.viewport.set(e, t, i, r), n.scissor.set(e, t, i, r);
11579
11579
  }
11580
11580
  function e0(n, e, t) {
@@ -12540,7 +12540,7 @@ function Q0(n, e, t) {
12540
12540
  }
12541
12541
  }
12542
12542
  }
12543
- class ys {
12543
+ class Ss {
12544
12544
  constructor(e, t) {
12545
12545
  this.seq = [], this.map = {};
12546
12546
  const i = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
@@ -13075,7 +13075,7 @@ Program Info Log: ` + x + `
13075
13075
  r.deleteShader(b), r.deleteShader(R);
13076
13076
  let T;
13077
13077
  this.getUniforms = function() {
13078
- return T === void 0 && (T = new ys(r, _)), T;
13078
+ return T === void 0 && (T = new Ss(r, _)), T;
13079
13079
  };
13080
13080
  let N;
13081
13081
  return this.getAttributes = function() {
@@ -14249,13 +14249,13 @@ function Bx(n, e, t, i, r, s, o) {
14249
14249
  return p ? (
14250
14250
  // eslint-disable-next-line compat/compat
14251
14251
  new OffscreenCanvas(A, y)
14252
- ) : Is("canvas");
14252
+ ) : Us("canvas");
14253
14253
  }
14254
14254
  function v(A, y, W, se) {
14255
14255
  let ie = 1;
14256
14256
  if ((A.width > se || A.height > se) && (ie = se / Math.max(A.width, A.height)), ie < 1 || y === !0)
14257
14257
  if (typeof HTMLImageElement != "undefined" && A instanceof HTMLImageElement || typeof HTMLCanvasElement != "undefined" && A instanceof HTMLCanvasElement || typeof ImageBitmap != "undefined" && A instanceof ImageBitmap) {
14258
- const le = y ? Ds : Math.floor, Ee = le(ie * A.width), ce = le(ie * A.height);
14258
+ const le = y ? Is : Math.floor, Ee = le(ie * A.width), ce = le(ie * A.height);
14259
14259
  _ === void 0 && (_ = S(Ee, ce));
14260
14260
  const X = W ? S(Ee, ce) : _;
14261
14261
  return X.width = Ee, X.height = ce, X.getContext("2d").drawImage(A, 0, 0, Ee, ce), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + A.width + "x" + A.height + ") to (" + Ee + "x" + ce + ")."), X;
@@ -14407,7 +14407,7 @@ function Bx(n, e, t, i, r, s, o) {
14407
14407
  [so]: n.NEAREST_MIPMAP_LINEAR,
14408
14408
  [$t]: n.LINEAR,
14409
14409
  [im]: n.LINEAR_MIPMAP_NEAREST,
14410
- [xr]: n.LINEAR_MIPMAP_LINEAR
14410
+ [yr]: n.LINEAR_MIPMAP_LINEAR
14411
14411
  }, Ae = {
14412
14412
  [_m]: n.NEVER,
14413
14413
  [bm]: n.ALWAYS,
@@ -14421,7 +14421,7 @@ function Bx(n, e, t, i, r, s, o) {
14421
14421
  function Te(A, y, W) {
14422
14422
  if (W ? (n.texParameteri(A, n.TEXTURE_WRAP_S, me[y.wrapS]), n.texParameteri(A, n.TEXTURE_WRAP_T, me[y.wrapT]), (A === n.TEXTURE_3D || A === n.TEXTURE_2D_ARRAY) && n.texParameteri(A, n.TEXTURE_WRAP_R, me[y.wrapR]), n.texParameteri(A, n.TEXTURE_MAG_FILTER, ge[y.magFilter]), n.texParameteri(A, n.TEXTURE_MIN_FILTER, ge[y.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), (y.wrapS !== nn || y.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(y.magFilter)), n.texParameteri(A, n.TEXTURE_MIN_FILTER, E(y.minFilter)), y.minFilter !== Dt && y.minFilter !== $t && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")), y.compareFunction && (n.texParameteri(A, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE), n.texParameteri(A, n.TEXTURE_COMPARE_FUNC, Ae[y.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
14423
14423
  const se = e.get("EXT_texture_filter_anisotropic");
14424
- if (y.magFilter === Dt || y.minFilter !== so && y.minFilter !== xr || y.type === Gn && e.has("OES_texture_float_linear") === !1 || a === !1 && y.type === yr && e.has("OES_texture_half_float_linear") === !1)
14424
+ if (y.magFilter === Dt || y.minFilter !== so && y.minFilter !== yr || y.type === Gn && e.has("OES_texture_float_linear") === !1 || a === !1 && y.type === Sr && e.has("OES_texture_half_float_linear") === !1)
14425
14425
  return;
14426
14426
  (y.anisotropy > 1 || i.get(y).__currentAnisotropy) && (n.texParameterf(A, se.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(y.anisotropy, r.getMaxAnisotropy())), i.get(y).__currentAnisotropy = y.anisotropy);
14427
14427
  }
@@ -14757,7 +14757,7 @@ function Hx(n, e, t) {
14757
14757
  return n.UNSIGNED_INT;
14758
14758
  if (s === Gn)
14759
14759
  return n.FLOAT;
14760
- if (s === yr)
14760
+ if (s === Sr)
14761
14761
  return i ? n.HALF_FLOAT : (a = e.get("OES_texture_half_float"), a !== null ? a.HALF_FLOAT_OES : null);
14762
14762
  if (s === om)
14763
14763
  return n.ALPHA;
@@ -14892,7 +14892,7 @@ class kx extends Vt {
14892
14892
  super(), this.isArrayCamera = !0, this.cameras = e;
14893
14893
  }
14894
14894
  }
14895
- class os extends at {
14895
+ class as extends at {
14896
14896
  constructor() {
14897
14897
  super(), this.isGroup = !0, this.type = "Group";
14898
14898
  }
@@ -14903,13 +14903,13 @@ class Io {
14903
14903
  this._targetRay = null, this._grip = null, this._hand = null;
14904
14904
  }
14905
14905
  getHandSpace() {
14906
- return this._hand === null && (this._hand = new os(), this._hand.matrixAutoUpdate = !1, this._hand.visible = !1, this._hand.joints = {}, this._hand.inputState = { pinching: !1 }), this._hand;
14906
+ return this._hand === null && (this._hand = new as(), this._hand.matrixAutoUpdate = !1, this._hand.visible = !1, this._hand.joints = {}, this._hand.inputState = { pinching: !1 }), this._hand;
14907
14907
  }
14908
14908
  getTargetRaySpace() {
14909
- return this._targetRay === null && (this._targetRay = new os(), this._targetRay.matrixAutoUpdate = !1, this._targetRay.visible = !1, this._targetRay.hasLinearVelocity = !1, this._targetRay.linearVelocity = new D(), this._targetRay.hasAngularVelocity = !1, this._targetRay.angularVelocity = new D()), this._targetRay;
14909
+ return this._targetRay === null && (this._targetRay = new as(), this._targetRay.matrixAutoUpdate = !1, this._targetRay.visible = !1, this._targetRay.hasLinearVelocity = !1, this._targetRay.linearVelocity = new D(), this._targetRay.hasAngularVelocity = !1, this._targetRay.angularVelocity = new D()), this._targetRay;
14910
14910
  }
14911
14911
  getGripSpace() {
14912
- return this._grip === null && (this._grip = new os(), this._grip.matrixAutoUpdate = !1, this._grip.visible = !1, this._grip.hasLinearVelocity = !1, this._grip.linearVelocity = new D(), this._grip.hasAngularVelocity = !1, this._grip.angularVelocity = new D()), this._grip;
14912
+ return this._grip === null && (this._grip = new as(), this._grip.matrixAutoUpdate = !1, this._grip.visible = !1, this._grip.hasLinearVelocity = !1, this._grip.linearVelocity = new D(), this._grip.hasAngularVelocity = !1, this._grip.angularVelocity = new D()), this._grip;
14913
14913
  }
14914
14914
  dispatchEvent(e) {
14915
14915
  return this._targetRay !== null && this._targetRay.dispatchEvent(e), this._grip !== null && this._grip.dispatchEvent(e), this._hand !== null && this._hand.dispatchEvent(e), this;
@@ -14955,7 +14955,7 @@ class Io {
14955
14955
  // private method
14956
14956
  _getHandJoint(e, t) {
14957
14957
  if (e.joints[t.jointName] === void 0) {
14958
- const i = new os();
14958
+ const i = new as();
14959
14959
  i.matrixAutoUpdate = !1, i.visible = !1, e.joints[t.jointName] = i, e.add(i);
14960
14960
  }
14961
14961
  return e.joints[t.jointName];
@@ -15130,7 +15130,7 @@ class Wx extends gi {
15130
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
- 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 = Sr * 2 * Math.atan(1 / B.projectionMatrix.elements[5]), B.zoom = 1);
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
15136
  return T;
@@ -15570,7 +15570,7 @@ class Ph {
15570
15570
  ft.render(ot, Wt);
15571
15571
  }, this.compile = function(w, k) {
15572
15572
  function j(G, Y, Me) {
15573
- G.transparent === !0 && G.side === Cn && G.forceSinglePass === !1 ? (G.side = Ot, G.needsUpdate = !0, Or(G, Y, Me), G.side = jn, G.needsUpdate = !0, Or(G, Y, Me), G.side = Cn) : Or(G, Y, Me);
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
15575
  m = le.get(w), m.init(), S.push(m), w.traverseVisible(function(G) {
15576
15576
  G.isLight && G.layers.test(k.layers) && (m.pushLight(G), G.castShadow && m.pushShadow(G));
@@ -15652,20 +15652,20 @@ class Ph {
15652
15652
  }
15653
15653
  function Qa(w, k, j, G) {
15654
15654
  const Y = w.opaque, Me = w.transmissive, Re = w.transparent;
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 && Nr(Y, k, j), Me.length > 0 && Nr(Me, k, j), Re.length > 0 && Nr(Re, k, j), ne.buffers.depth.setTest(!0), ne.buffers.depth.setMask(!0), ne.buffers.color.setMask(!0), ne.setPolygonOffset(!1);
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
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
- type: J.has("EXT_color_buffer_half_float") ? yr : $n,
15662
- minFilter: xr,
15661
+ type: J.has("EXT_color_buffer_half_float") ? Sr : $n,
15662
+ minFilter: yr,
15663
15663
  samples: Y ? 4 : 0
15664
- })), v.getDrawingBufferSize(we), Y ? Ae.setSize(we.x, we.y) : Ae.setSize(Ds(we.x), Ds(we.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), U = v.getClearAlpha(), U < 1 && v.setClearColor(16777215, 0.5), v.clear();
15667
15667
  const Re = v.toneMapping;
15668
- v.toneMapping = Xn, Nr(w, 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 De = k[Ue], Oe = De.object, ot = De.geometry, ct = De.material, Wt = De.group;
@@ -15676,7 +15676,7 @@ class Ph {
15676
15676
  }
15677
15677
  Ie === !0 && (Se.updateMultisampleRenderTarget(Ae), Se.updateRenderTargetMipmap(Ae)), v.setRenderTarget(Me), v.setClearColor(O, U), v.toneMapping = Re;
15678
15678
  }
15679
- function Nr(w, k, j) {
15679
+ function Or(w, k, j) {
15680
15680
  const G = k.isScene === !0 ? k.overrideMaterial : null;
15681
15681
  for (let Y = 0, Me = w.length; Y < Me; Y++) {
15682
15682
  const Re = w[Y], Ie = Re.object, Ue = Re.geometry, ke = G === null ? Re.material : G, De = Re.group;
@@ -15686,7 +15686,7 @@ class Ph {
15686
15686
  function el(w, k, j, G, Y, Me) {
15687
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 Or(w, k, j) {
15689
+ function Fr(w, k, j) {
15690
15690
  k.isScene !== !0 && (k = Ze);
15691
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;
@@ -15699,7 +15699,7 @@ class Ph {
15699
15699
  Ie.uniforms = W.getUniforms(w), w.onBuild(j, Ie, v), w.onBeforeCompile(Ie, v), De = W.acquireProgram(Ie, Ue), ke.set(Ue, De), G.uniforms = Ie.uniforms;
15700
15700
  const Oe = G.uniforms;
15701
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
- const ot = De.getUniforms(), ct = ys.seqWithValue(ot.seq, Oe);
15702
+ const ot = De.getUniforms(), ct = Ss.seqWithValue(ot.seq, Oe);
15703
15703
  return G.currentProgram = De, G.uniformsList = ct, De;
15704
15704
  }
15705
15705
  function tl(w, k) {
@@ -15719,7 +15719,7 @@ class Ph {
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 !== De || 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);
15721
15721
  let Zn = Ge.currentProgram;
15722
- dt === !0 && (Zn = Or(G, k, Y));
15722
+ dt === !0 && (Zn = Fr(G, k, Y));
15723
15723
  let nl = !1, er = !1, eo = !1;
15724
15724
  const Rt = Zn.getUniforms(), Jn = Ge.uniforms;
15725
15725
  if (ne.useProgram(Zn.program) && (nl = !0, er = !0, eo = !0), G.id !== N && (N = G.id, er = !0), nl || x !== w) {
@@ -15737,7 +15737,7 @@ class Ph {
15737
15737
  Bt && (ae.floatVertexTextures ? (Bt.boneTexture === null && Bt.computeBoneTexture(), Rt.setValue(P, "boneTexture", Bt.boneTexture, Se), Rt.setValue(P, "boneTextureSize", Bt.boneTextureSize)) : console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."));
15738
15738
  }
15739
15739
  const to = j.morphAttributes;
15740
- if ((to.position !== void 0 || to.normal !== void 0 || to.color !== void 0 && ae.isWebGL2 === !0) && L.update(Y, j, Zn), (er || Ge.receiveShadow !== Y.receiveShadow) && (Ge.receiveShadow = Y.receiveShadow, Rt.setValue(P, "receiveShadow", Y.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (Jn.envMap.value = Ue, Jn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), er && (Rt.setValue(P, "toneMappingExposure", v.toneMappingExposure), Ge.needsLights && vf(Jn, eo), Me && G.fog === !0 && se.refreshFogUniforms(Jn, Me), se.refreshMaterialUniforms(Jn, G, H, z, Ae), ys.upload(P, Ge.uniformsList, Jn, Se)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (ys.upload(P, Ge.uniformsList, Jn, Se), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && Rt.setValue(P, "center", Y.center), Rt.setValue(P, "modelViewMatrix", Y.modelViewMatrix), Rt.setValue(P, "normalMatrix", Y.normalMatrix), Rt.setValue(P, "modelMatrix", Y.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
15740
+ if ((to.position !== void 0 || to.normal !== void 0 || to.color !== void 0 && ae.isWebGL2 === !0) && L.update(Y, j, Zn), (er || Ge.receiveShadow !== Y.receiveShadow) && (Ge.receiveShadow = Y.receiveShadow, Rt.setValue(P, "receiveShadow", Y.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (Jn.envMap.value = Ue, Jn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), er && (Rt.setValue(P, "toneMappingExposure", v.toneMappingExposure), Ge.needsLights && vf(Jn, eo), Me && G.fog === !0 && se.refreshFogUniforms(Jn, Me), se.refreshMaterialUniforms(Jn, G, H, z, Ae), Ss.upload(P, Ge.uniformsList, Jn, Se)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Ss.upload(P, Ge.uniformsList, Jn, Se), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && Rt.setValue(P, "center", Y.center), Rt.setValue(P, "modelViewMatrix", Y.modelViewMatrix), Rt.setValue(P, "normalMatrix", Y.normalMatrix), Rt.setValue(P, "modelMatrix", Y.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
15741
15741
  const Bt = G.uniformsGroups;
15742
15742
  for (let no = 0, yf = Bt.length; no < yf; no++)
15743
15743
  if (ae.isWebGL2) {
@@ -15801,7 +15801,7 @@ class Ph {
15801
15801
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
15802
15802
  return;
15803
15803
  }
15804
- const Oe = De === yr && (J.has("EXT_color_buffer_half_float") || ae.isWebGL2 && J.has("EXT_color_buffer_float"));
15804
+ const Oe = De === Sr && (J.has("EXT_color_buffer_half_float") || ae.isWebGL2 && J.has("EXT_color_buffer_float"));
15805
15805
  if (De !== $n && pe.convert(De) !== P.getParameter(P.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
15806
15806
  !(De === Gn && (ae.isWebGL2 || J.has("OES_texture_float") || J.has("WEBGL_color_buffer_float"))) && // Chrome Mac >= 52 and Firefox
15807
15807
  !Oe) {
@@ -16217,7 +16217,7 @@ function za() {
16217
16217
  }
16218
16218
  };
16219
16219
  }
16220
- const as = /* @__PURE__ */ new D(), Uo = /* @__PURE__ */ new za(), No = /* @__PURE__ */ new za(), Oo = /* @__PURE__ */ new za();
16220
+ const ls = /* @__PURE__ */ new D(), Uo = /* @__PURE__ */ new za(), No = /* @__PURE__ */ new za(), Oo = /* @__PURE__ */ new za();
16221
16221
  class Zx extends vn {
16222
16222
  constructor(e = [], t = !1, i = "centripetal", r = 0.5) {
16223
16223
  super(), this.isCatmullRomCurve3 = !0, this.type = "CatmullRomCurve3", this.points = e, this.closed = t, this.curveType = i, this.tension = r;
@@ -16227,9 +16227,9 @@ class Zx extends vn {
16227
16227
  let a = Math.floor(o), l = o - a;
16228
16228
  this.closed ? a += a > 0 ? 0 : (Math.floor(Math.abs(a) / s) + 1) * s : l === 0 && a === s - 1 && (a = s - 2, l = 1);
16229
16229
  let c, u;
16230
- this.closed || a > 0 ? c = r[(a - 1) % s] : (as.subVectors(r[0], r[1]).add(r[0]), c = as);
16230
+ this.closed || a > 0 ? c = r[(a - 1) % s] : (ls.subVectors(r[0], r[1]).add(r[0]), c = ls);
16231
16231
  const h = r[a % s], f = r[(a + 1) % s];
16232
- if (this.closed || a + 2 < s ? u = r[(a + 2) % s] : (as.subVectors(r[s - 1], r[s - 2]).add(r[s - 1]), u = as), this.curveType === "centripetal" || this.curveType === "chordal") {
16232
+ if (this.closed || a + 2 < s ? u = r[(a + 2) % s] : (ls.subVectors(r[s - 1], r[s - 2]).add(r[s - 1]), u = ls), this.curveType === "centripetal" || this.curveType === "chordal") {
16233
16233
  const d = this.curveType === "chordal" ? 0.5 : 0.25;
16234
16234
  let g = Math.pow(c.distanceToSquared(h), d), _ = Math.pow(h.distanceToSquared(f), d), m = Math.pow(f.distanceToSquared(u), d);
16235
16235
  _ < 1e-4 && (_ = 1), g < 1e-4 && (g = _), m < 1e-4 && (m = _), Uo.initNonuniformCatmullRom(c.x, h.x, f.x, u.x, g, _, m), No.initNonuniformCatmullRom(c.y, h.y, f.y, u.y, g, _, m), Oo.initNonuniformCatmullRom(c.z, h.z, f.z, u.z, g, _, m);
@@ -16729,7 +16729,7 @@ const cy = {
16729
16729
  h = n[g], f = n[g + 1], h < a && (a = h), f < l && (l = f), h > c && (c = h), f > u && (u = f);
16730
16730
  d = Math.max(c - a, u - l), d = d !== 0 ? 32767 / d : 0;
16731
16731
  }
16732
- return Mr(s, o, t, a, l, d, 0), o;
16732
+ return Er(s, o, t, a, l, d, 0), o;
16733
16733
  }
16734
16734
  };
16735
16735
  function Oh(n, e, t, i, r) {
@@ -16740,7 +16740,7 @@ function Oh(n, e, t, i, r) {
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) && (br(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 (br(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
@@ -16757,18 +16757,18 @@ function mi(n, e) {
16757
16757
  while (i || t !== e);
16758
16758
  return e;
16759
16759
  }
16760
- function Mr(n, e, t, i, r, s, o) {
16760
+ function Er(n, e, t, i, r, s, o) {
16761
16761
  if (!n)
16762
16762
  return;
16763
16763
  !o && s && xy(n, i, r, s);
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), br(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) {
16771
- o ? o === 1 ? (n = fy(mi(n), e, t), Mr(n, e, t, i, r, s, 2)) : o === 2 && dy(n, e, t, i, r, s) : Mr(mi(n), e, t, i, r, s, 1);
16771
+ o ? o === 1 ? (n = fy(mi(n), e, t), Er(n, e, t, i, r, s, 2)) : o === 2 && dy(n, e, t, i, r, s) : Er(mi(n), e, t, i, r, s, 1);
16772
16772
  break;
16773
16773
  }
16774
16774
  }
@@ -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) && Er(r, s) && Er(s, r) && (e.push(r.i / t | 0), e.push(i.i / t | 0), e.push(s.i / t | 0), br(i), br(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
  }
@@ -16824,7 +16824,7 @@ function dy(n, e, t, i, r, s) {
16824
16824
  for (; a !== o.prev; ) {
16825
16825
  if (o.i !== a.i && My(o, a)) {
16826
16826
  let l = Bh(o, a);
16827
- o = mi(o, o.next), l = mi(l, l.next), Mr(o, e, t, i, r, s, 0), Mr(l, e, t, i, r, s, 0);
16827
+ o = mi(o, o.next), l = mi(l, l.next), Er(o, e, t, i, r, s, 0), Er(l, e, t, i, r, s, 0);
16828
16828
  return;
16829
16829
  }
16830
16830
  a = a.next;
@@ -16868,7 +16868,7 @@ function _y(n, e) {
16868
16868
  let u = 1 / 0, h;
16869
16869
  t = r;
16870
16870
  do
16871
- s >= t.x && t.x >= l && s !== t.x && Fi(o < c ? s : i, o, l, c, o < c ? i : s, o, t.x, t.y) && (h = Math.abs(o - t.y) / (s - t.x), Er(t, n) && (h < u || h === u && (t.x > r.x || t.x === r.x && vy(r, t))) && (r = t, u = h)), t = t.next;
16871
+ s >= t.x && t.x >= l && s !== t.x && Fi(o < c ? s : i, o, l, c, o < c ? i : s, o, t.x, t.y) && (h = Math.abs(o - t.y) / (s - t.x), br(t, n) && (h < u || h === u && (t.x > r.x || t.x === r.x && vy(r, t))) && (r = t, u = h)), t = t.next;
16872
16872
  while (t !== a);
16873
16873
  return r;
16874
16874
  }
@@ -16911,7 +16911,7 @@ function Fi(n, e, t, i, r, s, o, a) {
16911
16911
  }
16912
16912
  function My(n, e) {
16913
16913
  return n.next.i !== e.i && n.prev.i !== e.i && !Ey(n, e) && // dones't intersect other edges
16914
- (Er(n, e) && Er(e, n) && by(n, e) && // locally visible
16914
+ (br(n, e) && br(e, n) && by(n, e) && // locally visible
16915
16915
  (st(n.prev, n, e.prev) || st(n, e.prev, e)) || // does not create opposite-facing sectors
16916
16916
  $s(n, e) && st(n.prev, n, n.next) > 0 && st(e.prev, e, e.next) > 0);
16917
16917
  }
@@ -16922,13 +16922,13 @@ function $s(n, e) {
16922
16922
  return n.x === e.x && n.y === e.y;
16923
16923
  }
16924
16924
  function Fh(n, e, t, i) {
16925
- const r = cs(st(n, e, t)), s = cs(st(n, e, i)), o = cs(st(t, i, n)), a = cs(st(t, i, e));
16926
- return !!(r !== s && o !== a || r === 0 && ls(n, t, e) || s === 0 && ls(n, i, e) || o === 0 && ls(t, n, i) || a === 0 && ls(t, e, i));
16925
+ const r = us(st(n, e, t)), s = us(st(n, e, i)), o = us(st(t, i, n)), a = us(st(t, i, e));
16926
+ return !!(r !== s && o !== a || r === 0 && cs(n, t, e) || s === 0 && cs(n, i, e) || o === 0 && cs(t, n, i) || a === 0 && cs(t, e, i));
16927
16927
  }
16928
- function ls(n, e, t) {
16928
+ function cs(n, e, t) {
16929
16929
  return e.x <= Math.max(n.x, t.x) && e.x >= Math.min(n.x, t.x) && e.y <= Math.max(n.y, t.y) && e.y >= Math.min(n.y, t.y);
16930
16930
  }
16931
- function cs(n) {
16931
+ function us(n) {
16932
16932
  return n > 0 ? 1 : n < 0 ? -1 : 0;
16933
16933
  }
16934
16934
  function Ey(n, e) {
@@ -16940,7 +16940,7 @@ function Ey(n, e) {
16940
16940
  } while (t !== n);
16941
16941
  return !1;
16942
16942
  }
16943
- function Er(n, e) {
16943
+ function br(n, e) {
16944
16944
  return st(n.prev, n, n.next) < 0 ? st(n, e, n.next) >= 0 && st(n, n.prev, e) >= 0 : st(n, e, n.prev) < 0 || st(n, n.next, e) < 0;
16945
16945
  }
16946
16946
  function by(n, e) {
@@ -16959,7 +16959,7 @@ 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 br(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) {
@@ -17495,7 +17495,7 @@ class iu {
17495
17495
  return new this.constructor().copy(this);
17496
17496
  }
17497
17497
  }
17498
- const ru = /* @__PURE__ */ new D(), us = /* @__PURE__ */ new D();
17498
+ const ru = /* @__PURE__ */ new D(), hs = /* @__PURE__ */ new D();
17499
17499
  class Oy {
17500
17500
  constructor(e = new D(), t = new D()) {
17501
17501
  this.start = e, this.end = t;
@@ -17522,9 +17522,9 @@ class Oy {
17522
17522
  return this.delta(t).multiplyScalar(e).add(this.start);
17523
17523
  }
17524
17524
  closestPointToPointParameter(e, t) {
17525
- ru.subVectors(e, this.start), us.subVectors(this.end, this.start);
17526
- const i = us.dot(us);
17527
- let s = us.dot(ru) / i;
17525
+ ru.subVectors(e, this.start), hs.subVectors(this.end, this.start);
17526
+ const i = hs.dot(hs);
17527
+ let s = hs.dot(ru) / i;
17528
17528
  return t && (s = vt(s, 0, 1)), s;
17529
17529
  }
17530
17530
  closestPointToPoint(e, t, i) {
@@ -17545,7 +17545,7 @@ typeof __THREE_DEVTOOLS__ != "undefined" && __THREE_DEVTOOLS__.dispatchEvent(new
17545
17545
  revision: Aa
17546
17546
  } }));
17547
17547
  typeof window != "undefined" && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = Aa);
17548
- const su = { type: "change" }, zo = { type: "start" }, ou = { type: "end" }, hs = new La(), au = new Hn(), Fy = Math.cos(70 * ph.DEG2RAD);
17548
+ const su = { type: "change" }, zo = { type: "start" }, ou = { type: "end" }, fs = new La(), au = new Hn(), Fy = Math.cos(70 * ph.DEG2RAD);
17549
17549
  class By extends gi {
17550
17550
  constructor(e, t) {
17551
17551
  super(), this.object = e, this.domElement = t, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new D(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: zn.ROTATE, MIDDLE: zn.DOLLY, RIGHT: zn.PAN }, this.touches = { ONE: _i.ROTATE, TWO: _i.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
@@ -17584,7 +17584,7 @@ class By extends gi {
17584
17584
  Ft.unproject(i.object), i.object.position.sub(Ft).add(Je), i.object.updateMatrixWorld(), qe = L.length();
17585
17585
  } else
17586
17586
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), i.zoomToCursor = !1;
17587
- qe !== null && (this.screenSpacePanning ? i.target.set(0, 0, -1).transformDirection(i.object.matrix).multiplyScalar(qe).add(i.object.position) : (hs.origin.copy(i.object.position), hs.direction.set(0, 0, -1).transformDirection(i.object.matrix), Math.abs(i.object.up.dot(hs.direction)) < Fy ? e.lookAt(i.target) : (au.setFromNormalAndCoplanarPoint(i.object.up, i.target), hs.intersectPlane(au, i.target))));
17587
+ qe !== null && (this.screenSpacePanning ? i.target.set(0, 0, -1).transformDirection(i.object.matrix).multiplyScalar(qe).add(i.object.position) : (fs.origin.copy(i.object.position), fs.direction.set(0, 0, -1).transformDirection(i.object.matrix), Math.abs(i.object.up.dot(fs.direction)) < Fy ? e.lookAt(i.target) : (au.setFromNormalAndCoplanarPoint(i.object.up, i.target), fs.intersectPlane(au, i.target))));
17588
17588
  } else
17589
17589
  i.object.isOrthographicCamera && (i.object.zoom = Math.max(i.minZoom, Math.min(i.maxZoom, i.object.zoom / c)), i.object.updateProjectionMatrix(), He = !0);
17590
17590
  return c = 1, R = !1, He || pe.distanceToSquared(i.object.position) > o || 8 * (1 - ve.dot(i.object.quaternion)) > o || Ne.distanceToSquared(i.target) > 0 ? (i.dispatchEvent(su), pe.copy(i.object.position), ve.copy(i.object.quaternion), Ne.copy(i.target), He = !1, !0) : !1;
@@ -17996,7 +17996,7 @@ class zy {
17996
17996
  }
17997
17997
  }
17998
17998
  }
17999
- const fu = new Kn(), fs = new D();
17999
+ const fu = new Kn(), ds = new D();
18000
18000
  class zh extends Uy {
18001
18001
  constructor() {
18002
18002
  super(), this.isLineSegmentsGeometry = !0, this.type = "LineSegmentsGeometry";
@@ -18038,14 +18038,14 @@ class zh extends Uy {
18038
18038
  e !== void 0 && t !== void 0 && (this.boundingBox.setFromBufferAttribute(e), fu.setFromBufferAttribute(t), this.boundingBox.union(fu));
18039
18039
  }
18040
18040
  computeBoundingSphere() {
18041
- this.boundingSphere === null && (this.boundingSphere = new Lr()), this.boundingBox === null && this.computeBoundingBox();
18041
+ this.boundingSphere === null && (this.boundingSphere = new Dr()), this.boundingBox === null && this.computeBoundingBox();
18042
18042
  const e = this.attributes.instanceStart, t = this.attributes.instanceEnd;
18043
18043
  if (e !== void 0 && t !== void 0) {
18044
18044
  const i = this.boundingSphere.center;
18045
18045
  this.boundingBox.getCenter(i);
18046
18046
  let r = 0;
18047
18047
  for (let s = 0, o = e.count; s < o; s++)
18048
- fs.fromBufferAttribute(e, s), r = Math.max(r, i.distanceToSquared(fs)), fs.fromBufferAttribute(t, s), r = Math.max(r, i.distanceToSquared(fs));
18048
+ ds.fromBufferAttribute(e, s), r = Math.max(r, i.distanceToSquared(ds)), ds.fromBufferAttribute(t, s), r = Math.max(r, i.distanceToSquared(ds));
18049
18049
  this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
18050
18050
  }
18051
18051
  }
@@ -18579,7 +18579,7 @@ class Ga extends Yn {
18579
18579
  }), this.setValues(e);
18580
18580
  }
18581
18581
  }
18582
- const du = new D(), pu = new D(), Mt = new Ke(), Et = new Ke(), un = new Ke(), ko = new D(), Go = new rt(), bt = new Oy(), mu = new D(), ds = new Kn(), ps = new Lr(), hn = new Ke();
18582
+ const du = new D(), pu = new D(), Mt = new Ke(), Et = new Ke(), un = new Ke(), ko = new D(), Go = new rt(), bt = new Oy(), mu = new D(), ps = new Kn(), ms = new Dr(), hn = new Ke();
18583
18583
  let dn, ui;
18584
18584
  function gu(n, e, t) {
18585
18585
  return hn.set(0, 0, -e, 1).applyMatrix4(n.projectionMatrix), hn.multiplyScalar(1 / hn.w), hn.x = ui / t.width, hn.y = ui / t.height, hn.applyMatrix4(n.projectionMatrixInverse), hn.multiplyScalar(1 / hn.w), Math.abs(Math.max(hn.x, hn.y));
@@ -18652,25 +18652,25 @@ class Gy extends pn {
18652
18652
  const s = e.params.Line2 !== void 0 && e.params.Line2.threshold || 0;
18653
18653
  dn = e.ray;
18654
18654
  const o = this.matrixWorld, a = this.geometry, l = this.material;
18655
- ui = l.linewidth + s, a.boundingSphere === null && a.computeBoundingSphere(), ps.copy(a.boundingSphere).applyMatrix4(o);
18655
+ ui = l.linewidth + s, a.boundingSphere === null && a.computeBoundingSphere(), ms.copy(a.boundingSphere).applyMatrix4(o);
18656
18656
  let c;
18657
18657
  if (i)
18658
18658
  c = ui * 0.5;
18659
18659
  else {
18660
- const h = Math.max(r.near, ps.distanceToPoint(dn.origin));
18660
+ const h = Math.max(r.near, ms.distanceToPoint(dn.origin));
18661
18661
  c = gu(r, h, l.resolution);
18662
18662
  }
18663
- if (ps.radius += c, dn.intersectsSphere(ps) === !1)
18663
+ if (ms.radius += c, dn.intersectsSphere(ms) === !1)
18664
18664
  return;
18665
- a.boundingBox === null && a.computeBoundingBox(), ds.copy(a.boundingBox).applyMatrix4(o);
18665
+ a.boundingBox === null && a.computeBoundingBox(), ps.copy(a.boundingBox).applyMatrix4(o);
18666
18666
  let u;
18667
18667
  if (i)
18668
18668
  u = ui * 0.5;
18669
18669
  else {
18670
- const h = Math.max(r.near, ds.distanceToPoint(dn.origin));
18670
+ const h = Math.max(r.near, ps.distanceToPoint(dn.origin));
18671
18671
  u = gu(r, h, l.resolution);
18672
18672
  }
18673
- ds.expandByScalar(u), dn.intersectsBox(ds) !== !1 && (i ? Hy(this, t) : ky(this, r, t));
18673
+ ps.expandByScalar(u), dn.intersectsBox(ps) !== !1 && (i ? Hy(this, t) : ky(this, r, t));
18674
18674
  }
18675
18675
  }
18676
18676
  class Hh extends zh {
@@ -18730,27 +18730,27 @@ 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) {
18737
18737
  return n > 1 ? 0 : n < -1 ? Xe : Math.acos(n);
18738
18738
  }
18739
- function Tr(n) {
18739
+ function Ar(n) {
18740
18740
  return n > 1 ? Nt : n < -1 ? -Nt : Math.asin(n);
18741
18741
  }
18742
18742
  function cr() {
18743
18743
  }
18744
- function Us(n, e) {
18744
+ function Ns(n, e) {
18745
18745
  n && xu.hasOwnProperty(n.type) && xu[n.type](n, e);
18746
18746
  }
18747
18747
  var vu = {
18748
18748
  Feature: function(n, e) {
18749
- Us(n.geometry, e);
18749
+ Ns(n.geometry, e);
18750
18750
  },
18751
18751
  FeatureCollection: function(n, e) {
18752
18752
  for (var t = n.features, i = -1, r = t.length; ++i < r; )
18753
- Us(t[i].geometry, e);
18753
+ Ns(t[i].geometry, e);
18754
18754
  }
18755
18755
  }, xu = {
18756
18756
  Sphere: function(n, e) {
@@ -18779,7 +18779,7 @@ var vu = {
18779
18779
  },
18780
18780
  GeometryCollection: function(n, e) {
18781
18781
  for (var t = n.geometries, i = -1, r = t.length; ++i < r; )
18782
- Us(t[i], e);
18782
+ Ns(t[i], e);
18783
18783
  }
18784
18784
  };
18785
18785
  function da(n, e, t) {
@@ -18795,25 +18795,25 @@ function yu(n, e) {
18795
18795
  e.polygonEnd();
18796
18796
  }
18797
18797
  function Jy(n, e) {
18798
- n && vu.hasOwnProperty(n.type) ? vu[n.type](n, e) : Us(n, e);
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]), Tr(n[2])];
18801
+ return [Tr(n[1], n[0]), Ar(n[2])];
18802
18802
  }
18803
18803
  function qi(n) {
18804
18804
  var e = n[0], t = n[1], i = ut(t);
18805
18805
  return [i * ut(e), i * ht(e), ht(t)];
18806
18806
  }
18807
- function ms(n, e) {
18807
+ function gs(n, e) {
18808
18808
  return n[0] * e[0] + n[1] * e[1] + n[2] * e[2];
18809
18809
  }
18810
- function Ns(n, e) {
18810
+ function Os(n, e) {
18811
18811
  return [n[1] * e[2] - n[2] * e[1], n[2] * e[0] - n[0] * e[2], n[0] * e[1] - n[1] * e[0]];
18812
18812
  }
18813
18813
  function Vo(n, e) {
18814
18814
  n[0] += e[0], n[1] += e[1], n[2] += e[2];
18815
18815
  }
18816
- function gs(n, e) {
18816
+ function _s(n, e) {
18817
18817
  return [n[0] * e, n[1] * e, n[2] * e];
18818
18818
  }
18819
18819
  function ma(n) {
@@ -18849,15 +18849,15 @@ 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),
18853
- Tr(d * r + h * s)
18852
+ Tr(h * r - d * s, u * t - f * i),
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),
18860
- Tr(d * t - u * i)
18859
+ Tr(h * r + f * s, u * t + d * i),
18860
+ Ar(d * t - u * i)
18861
18861
  ];
18862
18862
  }, o;
18863
18863
  }
@@ -18902,10 +18902,10 @@ function Wh() {
18902
18902
  }
18903
18903
  };
18904
18904
  }
18905
- function Ss(n, e) {
18905
+ function Ms(n, e) {
18906
18906
  return lt(n[0] - e[0]) < Qe && lt(n[1] - e[1]) < Qe;
18907
18907
  }
18908
- function _s(n, e, t, i) {
18908
+ function vs(n, e, t, i) {
18909
18909
  this.x = n, this.z = e, this.o = t, this.e = i, this.v = !1, this.n = this.p = null;
18910
18910
  }
18911
18911
  function Xh(n, e, t, i, r) {
@@ -18913,7 +18913,7 @@ function Xh(n, e, t, i, r) {
18913
18913
  if (n.forEach(function(g) {
18914
18914
  if (!((_ = g.length - 1) <= 0)) {
18915
18915
  var _, m = g[0], p = g[_], S;
18916
- if (Ss(m, p)) {
18916
+ if (Ms(m, p)) {
18917
18917
  if (!m[2] && !p[2]) {
18918
18918
  for (r.lineStart(), a = 0; a < _; ++a)
18919
18919
  r.point((m = g[a])[0], m[1]);
@@ -18922,7 +18922,7 @@ function Xh(n, e, t, i, r) {
18922
18922
  }
18923
18923
  p[0] += 2 * Qe;
18924
18924
  }
18925
- s.push(S = new _s(m, g, null, !0)), o.push(S.o = new _s(m, null, S, !1)), s.push(S = new _s(p, g, null, !1)), o.push(S.o = new _s(p, null, S, !0));
18925
+ s.push(S = new vs(m, g, null, !0)), o.push(S.o = new vs(m, null, S, !1)), s.push(S = new vs(p, g, null, !1)), o.push(S.o = new vs(p, null, S, !0));
18926
18926
  }
18927
18927
  }), !!s.length) {
18928
18928
  for (o.sort(e), wu(s), wu(o), a = 0, l = o.length; a < l; ++a)
@@ -18971,12 +18971,12 @@ function tS(n, e) {
18971
18971
  if (f = (h = n[c]).length)
18972
18972
  for (var h, f, d = h[f - 1], g = Wo(d), _ = d[1] / 2 + _u, m = ht(_), p = ut(_), S = 0; S < f; ++S, g = M, m = R, p = T, d = v) {
18973
18973
  var v = h[S], M = Wo(v), b = v[1] / 2 + _u, R = ht(b), T = ut(b), N = M - g, x = N >= 0 ? 1 : -1, E = x * N, F = E > Xe, ee = m * R;
18974
- if (l.add(wr(ee * x * ht(E), p * T + ee * ut(E))), o += F ? N + x * Kt : N, F ^ g >= t ^ M >= t) {
18975
- var O = Ns(qi(d), qi(v));
18974
+ if (l.add(Tr(ee * x * ht(E), p * T + ee * ut(E))), o += F ? N + x * Kt : N, F ^ g >= t ^ M >= t) {
18975
+ var O = Os(qi(d), qi(v));
18976
18976
  ma(O);
18977
- var U = Ns(s, O);
18977
+ var U = Os(s, O);
18978
18978
  ma(U);
18979
- var C = (F ^ N >= 0 ? -1 : 1) * Tr(U[2]);
18979
+ var C = (F ^ N >= 0 ? -1 : 1) * Ar(U[2]);
18980
18980
  (i > C || i === C && (O[0] || O[1])) && (a += F ^ N >= 0 ? 1 : -1);
18981
18981
  }
18982
18982
  }
@@ -19098,13 +19098,13 @@ function aS(n) {
19098
19098
  },
19099
19099
  point: function(m, p) {
19100
19100
  var S = [m, p], v, M = o(m, p), b = i ? M ? 0 : c(m, p) : M ? c(m + (m < 0 ? Xe : -Xe), p) : 0;
19101
- if (!h && (g = d = M) && u.lineStart(), M !== d && (v = l(h, S), (!v || Ss(h, v) || Ss(S, v)) && (S[2] = 1)), M !== d)
19101
+ if (!h && (g = d = M) && u.lineStart(), M !== d && (v = l(h, S), (!v || Ms(h, v) || Ms(S, v)) && (S[2] = 1)), M !== d)
19102
19102
  _ = 0, M ? (u.lineStart(), v = l(S, h), u.point(v[0], v[1])) : (v = l(h, S), u.point(v[0], v[1], 2), u.lineEnd()), h = v;
19103
19103
  else if (r && h && i ^ M) {
19104
19104
  var R;
19105
19105
  !(b & f) && (R = l(S, h, !0)) && (_ = 0, i ? (u.lineStart(), u.point(R[0][0], R[0][1]), u.point(R[1][0], R[1][1]), u.lineEnd()) : (u.point(R[1][0], R[1][1]), u.lineEnd(), u.lineStart(), u.point(R[0][0], R[0][1], 3)));
19106
19106
  }
19107
- M && (!h || !Ss(h, S)) && u.point(S[0], S[1]), h = S, d = M, f = b;
19107
+ M && (!h || !Ms(h, S)) && u.point(S[0], S[1]), h = S, d = M, f = b;
19108
19108
  },
19109
19109
  lineEnd: function() {
19110
19110
  d && u.lineEnd(), h = null;
@@ -19117,21 +19117,21 @@ function aS(n) {
19117
19117
  };
19118
19118
  }
19119
19119
  function l(u, h, f) {
19120
- var d = qi(u), g = qi(h), _ = [1, 0, 0], m = Ns(d, g), p = ms(m, m), S = m[0], v = p - S * S;
19120
+ var d = qi(u), g = qi(h), _ = [1, 0, 0], m = Os(d, g), p = gs(m, m), S = m[0], v = p - S * S;
19121
19121
  if (!v)
19122
19122
  return !f && u;
19123
- var M = e * p / v, b = -e * S / v, R = Ns(_, m), T = gs(_, M), N = gs(m, b);
19123
+ var M = e * p / v, b = -e * S / v, R = Os(_, m), T = _s(_, M), N = _s(m, b);
19124
19124
  Vo(T, N);
19125
- var x = R, E = ms(T, x), F = ms(x, x), ee = E * E - F * (ms(T, T) - 1);
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
- var O = qs(ee), U = gs(x, (-E - O) / F);
19127
+ var O = qs(ee), U = _s(x, (-E - O) / F);
19128
19128
  if (Vo(U, T), U = pa(U), !f)
19129
19129
  return U;
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 ^ U[1] < (lt(U[0] - C) < Qe ? H : V) : H <= U[1] && U[1] <= V : Q > Xe ^ (C <= U[0] && U[0] <= z)) {
19134
- var oe = gs(x, (-E + O) / F);
19134
+ var oe = _s(x, (-E + O) / F);
19135
19135
  return Vo(oe, T), [U, pa(oe)];
19136
19136
  }
19137
19137
  }
@@ -19190,7 +19190,7 @@ function lS(n, e, t, i, r, s) {
19190
19190
  }
19191
19191
  }
19192
19192
  }
19193
- var ur = 1e9, vs = -ur;
19193
+ var ur = 1e9, xs = -ur;
19194
19194
  function cS(n, e, t, i) {
19195
19195
  function r(c, u) {
19196
19196
  return n <= c && c <= t && e <= u && u <= i;
@@ -19251,7 +19251,7 @@ function cS(n, e, t, i) {
19251
19251
  else if (H && M)
19252
19252
  u.point(C, z);
19253
19253
  else {
19254
- var V = [S = Math.max(vs, Math.min(ur, S)), v = Math.max(vs, Math.min(ur, v))], K = [C = Math.max(vs, Math.min(ur, C)), z = Math.max(vs, Math.min(ur, z))];
19254
+ var V = [S = Math.max(xs, Math.min(ur, S)), v = Math.max(xs, Math.min(ur, v))], K = [C = Math.max(xs, Math.min(ur, C)), z = Math.max(xs, Math.min(ur, z))];
19255
19255
  lS(V, K, n, e, t, i) ? (M || (u.lineStart(), u.point(V[0], V[1])), u.point(K[0], K[1]), H || u.lineEnd(), R = !1) : H && (u.lineStart(), u.point(C, z), R = !1);
19256
19256
  }
19257
19257
  S = C, v = z, M = H;
@@ -19260,19 +19260,19 @@ function cS(n, e, t, i) {
19260
19260
  };
19261
19261
  }
19262
19262
  const Au = (n) => n;
19263
- var ji = 1 / 0, Os = ji, Ar = -ji, Fs = Ar, uS = {
19263
+ var ji = 1 / 0, Fs = ji, Cr = -ji, Bs = Cr, uS = {
19264
19264
  point: hS,
19265
19265
  lineStart: cr,
19266
19266
  lineEnd: cr,
19267
19267
  polygonStart: cr,
19268
19268
  polygonEnd: cr,
19269
19269
  result: function() {
19270
- var n = [[ji, Os], [Ar, Fs]];
19271
- return Ar = Fs = -(Os = ji = 1 / 0), n;
19270
+ var n = [[ji, Fs], [Cr, Bs]];
19271
+ return Cr = Bs = -(Fs = ji = 1 / 0), n;
19272
19272
  }
19273
19273
  };
19274
19274
  function hS(n, e) {
19275
- n < ji && (ji = n), n > Ar && (Ar = n), e < Os && (Os = e), e > Fs && (Fs = e);
19275
+ n < ji && (ji = n), n > Cr && (Cr = n), e < Fs && (Fs = e), e > Bs && (Bs = e);
19276
19276
  }
19277
19277
  const Cu = uS;
19278
19278
  function Va(n) {
@@ -19346,7 +19346,7 @@ 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, S = u - r, v = p * p + S * S;
19348
19348
  if (v > 4 * e && _--) {
19349
- var M = o + f, b = a + d, R = l + g, T = qs(M * M + b * b + R * R), N = Tr(R /= T), x = lt(lt(R) - 1) < Qe || lt(s - h) < Qe ? (s + h) / 2 : wr(b, M), E = n(x, N), F = E[0], ee = E[1], O = F - i, U = ee - r, C = S * O - p * U;
19349
+ var M = o + f, b = a + d, R = l + g, T = qs(M * M + b * b + R * R), N = Ar(R /= T), x = lt(lt(R) - 1) < Qe || lt(s - h) < Qe ? (s + h) / 2 : Tr(b, M), E = n(x, N), F = E[0], ee = E[1], O = F - i, U = ee - r, C = S * O - p * U;
19350
19350
  (C * C / v > e || lt((p * O + S * U) / 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
  }
@@ -19552,16 +19552,16 @@ function jh(n, e) {
19552
19552
  const { toString: bS } = Object.prototype, { getPrototypeOf: $a } = Object, js = ((n) => (e) => {
19553
19553
  const t = bS.call(e);
19554
19554
  return n[t] || (n[t] = t.slice(8, -1).toLowerCase());
19555
- })(/* @__PURE__ */ Object.create(null)), xn = (n) => (n = n.toLowerCase(), (e) => js(e) === n), Ys = (n) => (e) => typeof e === n, { isArray: Qi } = Array, Cr = Ys("undefined");
19555
+ })(/* @__PURE__ */ Object.create(null)), xn = (n) => (n = n.toLowerCase(), (e) => js(e) === n), Ys = (n) => (e) => typeof e === n, { isArray: Qi } = Array, Rr = Ys("undefined");
19556
19556
  function wS(n) {
19557
- return n !== null && !Cr(n) && n.constructor !== null && !Cr(n.constructor) && Yt(n.constructor.isBuffer) && n.constructor.isBuffer(n);
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
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
  }
19564
- const AS = Ys("string"), Yt = Ys("function"), Kh = Ys("number"), Ks = (n) => n !== null && typeof n == "object", CS = (n) => n === !0 || n === !1, Ms = (n) => {
19564
+ const AS = Ys("string"), Yt = Ys("function"), Kh = Ys("number"), Ks = (n) => n !== null && typeof n == "object", CS = (n) => n === !0 || n === !1, Es = (n) => {
19565
19565
  if (js(n) !== "object")
19566
19566
  return !1;
19567
19567
  const e = $a(n);
@@ -19571,7 +19571,7 @@ const AS = Ys("string"), Yt = Ys("function"), Kh = Ys("number"), Ks = (n) => n !
19571
19571
  return n && (typeof FormData == "function" && n instanceof FormData || Yt(n.append) && ((e = js(n)) === "formdata" || // detect form-data instance
19572
19572
  e === "object" && Yt(n.toString) && n.toString() === "[object FormData]"));
19573
19573
  }, NS = xn("URLSearchParams"), OS = (n) => n.trim ? n.trim() : n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
19574
- function Ir(n, e, { allOwnKeys: t = !1 } = {}) {
19574
+ function Ur(n, e, { allOwnKeys: t = !1 } = {}) {
19575
19575
  if (n === null || typeof n == "undefined")
19576
19576
  return;
19577
19577
  let i, r;
@@ -19594,17 +19594,17 @@ function Zh(n, e) {
19594
19594
  return r;
19595
19595
  return null;
19596
19596
  }
19597
- const Jh = (() => typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global)(), Qh = (n) => !Cr(n) && n !== Jh;
19597
+ const Jh = (() => typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global)(), Qh = (n) => !Rr(n) && n !== Jh;
19598
19598
  function xa() {
19599
19599
  const { caseless: n } = Qh(this) && this || {}, e = {}, t = (i, r) => {
19600
19600
  const s = n && Zh(e, r) || r;
19601
- Ms(e[s]) && Ms(i) ? e[s] = xa(e[s], i) : Ms(i) ? e[s] = xa({}, i) : Qi(i) ? e[s] = i.slice() : e[s] = i;
19601
+ Es(e[s]) && Es(i) ? e[s] = xa(e[s], i) : Es(i) ? e[s] = xa({}, i) : Qi(i) ? e[s] = i.slice() : e[s] = i;
19602
19602
  };
19603
19603
  for (let i = 0, r = arguments.length; i < r; i++)
19604
- arguments[i] && Ir(arguments[i], t);
19604
+ arguments[i] && Ur(arguments[i], t);
19605
19605
  return e;
19606
19606
  }
19607
- const FS = (n, e, t, { allOwnKeys: i } = {}) => (Ir(e, (r, s) => {
19607
+ const FS = (n, e, t, { allOwnKeys: i } = {}) => (Ur(e, (r, s) => {
19608
19608
  t && Yt(r) ? n[s] = jh(r, t) : n[s] = r;
19609
19609
  }, { allOwnKeys: i }), n), BS = (n) => (n.charCodeAt(0) === 65279 && (n = n.slice(1)), n), zS = (n, e, t, i) => {
19610
19610
  n.prototype = Object.create(e.prototype, i), n.prototype.constructor = n, Object.defineProperty(n, "super", {
@@ -19657,7 +19657,7 @@ const FS = (n, e, t, { allOwnKeys: i } = {}) => (Ir(e, (r, s) => {
19657
19657
  }
19658
19658
  ), Iu = (({ hasOwnProperty: n }) => (e, t) => n.call(e, t))(Object.prototype), jS = xn("RegExp"), ef = (n, e) => {
19659
19659
  const t = Object.getOwnPropertyDescriptors(n), i = {};
19660
- Ir(t, (r, s) => {
19660
+ Ur(t, (r, s) => {
19661
19661
  let o;
19662
19662
  (o = e(r, s, n)) !== !1 && (i[s] = o || r);
19663
19663
  }), Object.defineProperties(n, i);
@@ -19706,9 +19706,9 @@ const tM = (n) => {
19706
19706
  if (!("toJSON" in i)) {
19707
19707
  e[r] = i;
19708
19708
  const s = Qi(i) ? [] : {};
19709
- return Ir(i, (o, a) => {
19709
+ return Ur(i, (o, a) => {
19710
19710
  const l = t(o, r + 1);
19711
- !Cr(l) && (s[a] = l);
19711
+ !Rr(l) && (s[a] = l);
19712
19712
  }), e[r] = void 0, s;
19713
19713
  }
19714
19714
  }
@@ -19725,8 +19725,8 @@ const tM = (n) => {
19725
19725
  isNumber: Kh,
19726
19726
  isBoolean: CS,
19727
19727
  isObject: Ks,
19728
- isPlainObject: Ms,
19729
- isUndefined: Cr,
19728
+ isPlainObject: Es,
19729
+ isUndefined: Rr,
19730
19730
  isDate: RS,
19731
19731
  isFile: PS,
19732
19732
  isBlob: LS,
@@ -19736,7 +19736,7 @@ const tM = (n) => {
19736
19736
  isURLSearchParams: NS,
19737
19737
  isTypedArray: VS,
19738
19738
  isFileList: DS,
19739
- forEach: Ir,
19739
+ forEach: Ur,
19740
19740
  merge: xa,
19741
19741
  extend: FS,
19742
19742
  trim: OS,
@@ -20154,8 +20154,8 @@ const Ya = ja, vM = Z.toObjectSet([
20154
20154
  function or(n) {
20155
20155
  return n && String(n).trim().toLowerCase();
20156
20156
  }
20157
- function Es(n) {
20158
- return n === !1 || n == null ? n : Z.isArray(n) ? n.map(Es) : String(n);
20157
+ function bs(n) {
20158
+ return n === !1 || n == null ? n : Z.isArray(n) ? n.map(bs) : String(n);
20159
20159
  }
20160
20160
  function yM(n) {
20161
20161
  const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -20200,7 +20200,7 @@ class Js {
20200
20200
  if (!u)
20201
20201
  throw new Error("header name must be a non-empty string");
20202
20202
  const h = Z.findKey(r, u);
20203
- (!h || r[h] === void 0 || c === !0 || c === void 0 && r[h] !== !1) && (r[h || l] = Es(a));
20203
+ (!h || r[h] === void 0 || c === !0 || c === void 0 && r[h] !== !1) && (r[h || l] = bs(a));
20204
20204
  }
20205
20205
  const o = (a, l) => Z.forEach(a, (c, u) => s(c, u, l));
20206
20206
  return Z.isPlainObject(e) || e instanceof this.constructor ? o(e, t) : Z.isString(e) && (e = e.trim()) && !SM(e) ? o(xM(e), t) : e != null && s(t, e, i), this;
@@ -20254,11 +20254,11 @@ class Js {
20254
20254
  return Z.forEach(this, (r, s) => {
20255
20255
  const o = Z.findKey(i, s);
20256
20256
  if (o) {
20257
- t[o] = Es(r), delete t[s];
20257
+ t[o] = bs(r), delete t[s];
20258
20258
  return;
20259
20259
  }
20260
20260
  const a = e ? MM(s) : String(s).trim();
20261
- a !== s && delete t[s], t[a] = Es(r), i[a] = !0;
20261
+ a !== s && delete t[s], t[a] = bs(r), i[a] = !0;
20262
20262
  }), this;
20263
20263
  }
20264
20264
  concat(...e) {
@@ -20320,10 +20320,10 @@ function qo(n, e) {
20320
20320
  function uf(n) {
20321
20321
  return !!(n && n.__CANCEL__);
20322
20322
  }
20323
- function Ur(n, e, t) {
20323
+ function Nr(n, e, t) {
20324
20324
  $e.call(this, n == null ? "canceled" : n, $e.ERR_CANCELED, e, t), this.name = "CanceledError";
20325
20325
  }
20326
- Z.inherits(Ur, $e, {
20326
+ Z.inherits(Nr, $e, {
20327
20327
  __CANCEL__: !0
20328
20328
  });
20329
20329
  function bM(n, e, t) {
@@ -20503,7 +20503,7 @@ const LM = typeof XMLHttpRequest != "undefined", DM = LM && function(n) {
20503
20503
  r === void 0 && s.setContentType(null), "setRequestHeader" in c && Z.forEach(s.toJSON(), function(g, _) {
20504
20504
  c.setRequestHeader(_, g);
20505
20505
  }), Z.isUndefined(n.withCredentials) || (c.withCredentials = !!n.withCredentials), o && o !== "json" && (c.responseType = n.responseType), typeof n.onDownloadProgress == "function" && c.addEventListener("progress", zu(n.onDownloadProgress, !0)), typeof n.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", zu(n.onUploadProgress)), (n.cancelToken || n.signal) && (a = (d) => {
20506
- c && (i(!d || d.type ? new Ur(null, n, c) : d), c.abort(), c = null);
20506
+ c && (i(!d || d.type ? new Nr(null, n, c) : d), c.abort(), c = null);
20507
20507
  }, n.cancelToken && n.cancelToken.subscribe(a), n.signal && (n.signal.aborted ? a() : n.signal.addEventListener("abort", a)));
20508
20508
  const f = RM(u);
20509
20509
  if (f && sn.protocols.indexOf(f) === -1) {
@@ -20512,11 +20512,11 @@ const LM = typeof XMLHttpRequest != "undefined", DM = LM && function(n) {
20512
20512
  }
20513
20513
  c.send(r || null);
20514
20514
  });
20515
- }, bs = {
20515
+ }, ws = {
20516
20516
  http: rM,
20517
20517
  xhr: DM
20518
20518
  };
20519
- Z.forEach(bs, (n, e) => {
20519
+ Z.forEach(ws, (n, e) => {
20520
20520
  if (n) {
20521
20521
  try {
20522
20522
  Object.defineProperty(n, "name", { value: e });
@@ -20530,24 +20530,24 @@ 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) ? bs[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(bs, 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: bs
20546
+ adapters: ws
20547
20547
  };
20548
20548
  function jo(n) {
20549
20549
  if (n.cancelToken && n.cancelToken.throwIfRequested(), n.signal && n.signal.aborted)
20550
- throw new Ur(null, n);
20550
+ throw new Nr(null, n);
20551
20551
  }
20552
20552
  function Hu(n) {
20553
20553
  return jo(n), n.headers = Dn.from(n.headers), n.data = qo.call(
@@ -20679,7 +20679,7 @@ const Sa = {
20679
20679
  assertOptions: IM,
20680
20680
  validators: Ka
20681
20681
  }, Fn = Sa.validators;
20682
- class Bs {
20682
+ class zs {
20683
20683
  constructor(e) {
20684
20684
  this.defaults = e, this.interceptors = {
20685
20685
  request: new Fu(),
@@ -20760,7 +20760,7 @@ class Bs {
20760
20760
  }
20761
20761
  }
20762
20762
  Z.forEach(["delete", "get", "head", "options"], function(e) {
20763
- Bs.prototype[e] = function(t, i) {
20763
+ zs.prototype[e] = function(t, i) {
20764
20764
  return this.request(Yi(i || {}, {
20765
20765
  method: e,
20766
20766
  url: t,
@@ -20781,9 +20781,9 @@ Z.forEach(["post", "put", "patch"], function(e) {
20781
20781
  }));
20782
20782
  };
20783
20783
  }
20784
- Bs.prototype[e] = t(), Bs.prototype[e + "Form"] = t(!0);
20784
+ zs.prototype[e] = t(), zs.prototype[e + "Form"] = t(!0);
20785
20785
  });
20786
- const ws = Bs;
20786
+ const Ts = zs;
20787
20787
  class Za {
20788
20788
  constructor(e) {
20789
20789
  if (typeof e != "function")
@@ -20809,7 +20809,7 @@ class Za {
20809
20809
  i.unsubscribe(s);
20810
20810
  }, o;
20811
20811
  }, e(function(s, o, a) {
20812
- i.reason || (i.reason = new Ur(s, o, a), t(i.reason));
20812
+ i.reason || (i.reason = new Nr(s, o, a), t(i.reason));
20813
20813
  });
20814
20814
  }
20815
20815
  /**
@@ -20931,14 +20931,14 @@ 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(Yi(n, r));
20937
20937
  }, t;
20938
20938
  }
20939
20939
  const gt = pf(Ya);
20940
- gt.Axios = ws;
20941
- gt.CanceledError = Ur;
20940
+ gt.Axios = Ts;
20941
+ gt.CanceledError = Nr;
20942
20942
  gt.CancelToken = UM;
20943
20943
  gt.isCancel = uf;
20944
20944
  gt.VERSION = df;
@@ -21017,8 +21017,8 @@ class HM {
21017
21017
  this.data.clear();
21018
21018
  }
21019
21019
  }
21020
- let zs = new HM();
21021
- const xs = zs.track.bind(zs), kM = bf.extend({
21020
+ let vr = new HM();
21021
+ const ys = vr.track.bind(vr), kM = bf.extend({
21022
21022
  props: {
21023
21023
  adcode: {
21024
21024
  // 地图code
@@ -21062,7 +21062,7 @@ const xs = zs.track.bind(zs), kM = bf.extend({
21062
21062
  this.adcode && (this.computCode = null);
21063
21063
  },
21064
21064
  code() {
21065
- zs.dispose(), this.getData();
21065
+ vr.dispose(), this.getData();
21066
21066
  },
21067
21067
  areaObj() {
21068
21068
  var i;
@@ -21123,7 +21123,7 @@ const xs = zs.track.bind(zs), kM = bf.extend({
21123
21123
  // 获取地图数据
21124
21124
  getData() {
21125
21125
  this.code && (this.loading = !0, mf(this.code).then((n) => {
21126
- this.mapScale = n.scale, this.mapData = n;
21126
+ this.mapScale = Math.max(n.scale * 0.8, 1), this.mapData = n;
21127
21127
  let e = Le({}, this.centroidMapList);
21128
21128
  if (n.features.forEach((t) => {
21129
21129
  e[t.adcode] = t.centroid || t.center;
@@ -21148,6 +21148,7 @@ const xs = zs.track.bind(zs), kM = bf.extend({
21148
21148
  },
21149
21149
  // 设置宽高及修正地图位置
21150
21150
  updateViewSize() {
21151
+ vr.dispose();
21151
21152
  const n = this.$el, e = n.querySelector("canvas");
21152
21153
  e && (e.style.position = "absolute"), this.baseRem = Math.max(window.outerWidth / 1920, 1), this.size = {
21153
21154
  width: n.clientWidth,
@@ -21170,13 +21171,13 @@ const xs = zs.track.bind(zs), kM = bf.extend({
21170
21171
  return;
21171
21172
  }
21172
21173
  this.tipsMesh && this.tipsMesh.remove(...this.tipsMesh.children), this.circleMesh && this.circleMesh.remove(...this.circleMesh.children), this.activeMesh.length && (this.activeMesh = []), this.scene.remove(...this.scene.children);
21173
- const n = xs(new at());
21174
+ const n = ys(new at());
21174
21175
  n.name = "map";
21175
21176
  const e = Du().center(this.centroid).scale(this.scale).translate([0, 0]), { blockList: t, infoData: i } = this.drawItemArea(e);
21176
- n.add(...t), this.scene.add(n), this.circleMesh = xs(new at()), this.circleMesh.name = "circle";
21177
+ n.add(...t), this.scene.add(n), this.circleMesh = ys(new at()), this.circleMesh.name = "circle";
21177
21178
  const r = this.drawActiveTag(i, e);
21178
21179
  r.length && this.circleMesh.add(...r), this.scene.add(this.circleMesh);
21179
- const s = xs(new Iy(16777215, 3e3));
21180
+ const s = ys(new Iy(16777215, 3e3));
21180
21181
  s.position.set(0, 8, 20), this.scene.add(s), this.loading = !1, this.animate();
21181
21182
  },
21182
21183
  // 绘制地图区域
@@ -21264,7 +21265,7 @@ const xs = zs.track.bind(zs), kM = bf.extend({
21264
21265
  }
21265
21266
  this.tipsMesh ? (this.tipsMesh.children.filter((s) => s.name === "tips").forEach((s) => {
21266
21267
  s.element.removeEventListener("pointerdown", this.handleTipsItemClick);
21267
- }), this.tipsMesh.remove(...this.tipsMesh.children)) : this.tipsMesh = xs(new at()), this.activeMesh.length && (this.activeMesh.forEach((s) => {
21268
+ }), this.tipsMesh.remove(...this.tipsMesh.children)) : this.tipsMesh = ys(new at()), this.activeMesh.length && (this.activeMesh.forEach((s) => {
21268
21269
  switch (s.type) {
21269
21270
  case "Mesh":
21270
21271
  s.material[0].color.set(Bn.meshHasData);
@@ -21346,7 +21347,7 @@ const xs = zs.track.bind(zs), kM = bf.extend({
21346
21347
  }
21347
21348
  },
21348
21349
  beforeDestroy() {
21349
- zs.dispose();
21350
+ vr.dispose();
21350
21351
  }
21351
21352
  });
21352
21353
  var GM = function() {
@@ -21373,7 +21374,7 @@ var WM = /* @__PURE__ */ wt(
21373
21374
  VM,
21374
21375
  !1,
21375
21376
  XM,
21376
- "2c9637d0",
21377
+ "67ef87c3",
21377
21378
  null,
21378
21379
  null
21379
21380
  );