viral-viewer-2 7.0.8 → 7.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ class fs {
26
26
  this.X = 0, this.Y = 0, this.Z = 0;
27
27
  }
28
28
  }
29
- var _i = /* @__PURE__ */ ((s) => (s[s.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", s[s.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", s[s.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", s[s.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", s[s.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", s[s.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", s))(_i || {}), Ls = /* @__PURE__ */ ((s) => (s[s.ON_WAKE = 0] = "ON_WAKE", s[s.ON_SLEEP = 1] = "ON_SLEEP", s[s.ON_UPDATE = 2] = "ON_UPDATE", s))(Ls || {}), lo = /* @__PURE__ */ ((s) => (s[s.KEYDOWN = 0] = "KEYDOWN", s[s.KEYUP = 1] = "KEYUP", s))(lo || {}), At = /* @__PURE__ */ ((s) => (s[s.LOADED_SCENE = 0] = "LOADED_SCENE", s[s.LOADED_MATERIAL_MANAGER = 1] = "LOADED_MATERIAL_MANAGER", s[s.LOADED_RENDERER = 2] = "LOADED_RENDERER", s[s.LOADED_CAMERA = 3] = "LOADED_CAMERA", s[s.LOADED_CUBE = 4] = "LOADED_CUBE", s[s.LOADED_TOOLS = 5] = "LOADED_TOOLS", s[s.LOADED_SEPERATE_MODEL = 6] = "LOADED_SEPERATE_MODEL", s[s.GENERATED_MERGE_MODEL = 7] = "GENERATED_MERGE_MODEL", s[s.LOADED_DATA = 8] = "LOADED_DATA", s[s.SELECT_ELEMENTS = 9] = "SELECT_ELEMENTS", s))(At || {});
29
+ var _i = /* @__PURE__ */ ((s) => (s[s.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", s[s.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", s[s.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", s[s.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", s[s.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", s[s.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", s))(_i || {}), Ls = /* @__PURE__ */ ((s) => (s[s.ON_WAKE = 0] = "ON_WAKE", s[s.ON_SLEEP = 1] = "ON_SLEEP", s[s.ON_UPDATE = 2] = "ON_UPDATE", s))(Ls || {}), lo = /* @__PURE__ */ ((s) => (s[s.KEYDOWN = 0] = "KEYDOWN", s[s.KEYUP = 1] = "KEYUP", s))(lo || {}), Mt = /* @__PURE__ */ ((s) => (s[s.LOADED_SCENE = 0] = "LOADED_SCENE", s[s.LOADED_MATERIAL_MANAGER = 1] = "LOADED_MATERIAL_MANAGER", s[s.LOADED_RENDERER = 2] = "LOADED_RENDERER", s[s.LOADED_CAMERA = 3] = "LOADED_CAMERA", s[s.LOADED_CUBE = 4] = "LOADED_CUBE", s[s.LOADED_TOOLS = 5] = "LOADED_TOOLS", s[s.LOADED_SEPERATE_MODEL = 6] = "LOADED_SEPERATE_MODEL", s[s.GENERATED_MERGE_MODEL = 7] = "GENERATED_MERGE_MODEL", s[s.LOADED_DATA = 8] = "LOADED_DATA", s[s.SELECT_ELEMENTS = 9] = "SELECT_ELEMENTS", s[s.UNSELECT_ELEMENTS = 10] = "UNSELECT_ELEMENTS", s))(Mt || {});
30
30
  class jr {
31
31
  constructor() {
32
32
  this.items = {};
@@ -598,7 +598,7 @@ const { _tr_init: xy, _tr_stored_block: lf, _tr_flush_block: by, _tr_tally: vr,
598
598
  Z_NO_FLUSH: xr,
599
599
  Z_PARTIAL_FLUSH: _y,
600
600
  Z_FULL_FLUSH: wy,
601
- Z_FINISH: Cn,
601
+ Z_FINISH: Pn,
602
602
  Z_BLOCK: Rm,
603
603
  Z_OK: Ui,
604
604
  Z_STREAM_END: Dm,
@@ -674,11 +674,11 @@ const gn = (s) => {
674
674
  }, Zv = (s, e) => {
675
675
  let t = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5, i, n, r, a = 0, o = s.strm.avail_in;
676
676
  do {
677
- if (i = 65535, r = s.bi_valid + 42 >> 3, s.strm.avail_out < r || (r = s.strm.avail_out - r, n = s.strstart - s.block_start, i > n + s.strm.avail_in && (i = n + s.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !== Cn || e === xr || i !== n + s.strm.avail_in)))
677
+ if (i = 65535, r = s.bi_valid + 42 >> 3, s.strm.avail_out < r || (r = s.strm.avail_out - r, n = s.strstart - s.block_start, i > n + s.strm.avail_in && (i = n + s.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !== Pn || e === xr || i !== n + s.strm.avail_in)))
678
678
  break;
679
- a = e === Cn && i === n + s.strm.avail_in ? 1 : 0, lf(s, 0, 0, a), s.pending_buf[s.pending - 4] = i, s.pending_buf[s.pending - 3] = i >> 8, s.pending_buf[s.pending - 2] = ~i, s.pending_buf[s.pending - 1] = ~i >> 8, gn(s.strm), n && (n > i && (n = i), s.strm.output.set(s.window.subarray(s.block_start, s.block_start + n), s.strm.next_out), s.strm.next_out += n, s.strm.avail_out -= n, s.strm.total_out += n, s.block_start += n, i -= n), i && (pf(s.strm, s.strm.output, s.strm.next_out, i), s.strm.next_out += i, s.strm.avail_out -= i, s.strm.total_out += i);
679
+ a = e === Pn && i === n + s.strm.avail_in ? 1 : 0, lf(s, 0, 0, a), s.pending_buf[s.pending - 4] = i, s.pending_buf[s.pending - 3] = i >> 8, s.pending_buf[s.pending - 2] = ~i, s.pending_buf[s.pending - 1] = ~i >> 8, gn(s.strm), n && (n > i && (n = i), s.strm.output.set(s.window.subarray(s.block_start, s.block_start + n), s.strm.next_out), s.strm.next_out += n, s.strm.avail_out -= n, s.strm.total_out += n, s.block_start += n, i -= n), i && (pf(s.strm, s.strm.output, s.strm.next_out, i), s.strm.next_out += i, s.strm.avail_out -= i, s.strm.total_out += i);
680
680
  } while (a === 0);
681
- return o -= s.strm.avail_in, o && (o >= s.w_size ? (s.matches = 2, s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0), s.strstart = s.w_size, s.insert = s.strstart) : (s.window_size - s.strstart <= o && (s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, s.insert > s.strstart && (s.insert = s.strstart)), s.window.set(s.strm.input.subarray(s.strm.next_in - o, s.strm.next_in), s.strstart), s.strstart += o, s.insert += o > s.w_size - s.insert ? s.w_size - s.insert : o), s.block_start = s.strstart), s.high_water < s.strstart && (s.high_water = s.strstart), a ? Ro : e !== xr && e !== Cn && s.strm.avail_in === 0 && s.strstart === s.block_start ? Io : (r = s.window_size - s.strstart, s.strm.avail_in > r && s.block_start >= s.w_size && (s.block_start -= s.w_size, s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, r += s.w_size, s.insert > s.strstart && (s.insert = s.strstart)), r > s.strm.avail_in && (r = s.strm.avail_in), r && (pf(s.strm, s.window, s.strstart, r), s.strstart += r, s.insert += r > s.w_size - s.insert ? s.w_size - s.insert : r), s.high_water < s.strstart && (s.high_water = s.strstart), r = s.bi_valid + 42 >> 3, r = s.pending_buf_size - r > 65535 ? 65535 : s.pending_buf_size - r, t = r > s.w_size ? s.w_size : r, n = s.strstart - s.block_start, (n >= t || (n || e === Cn) && e !== xr && s.strm.avail_in === 0 && n <= r) && (i = n > r ? r : n, a = e === Cn && s.strm.avail_in === 0 && i === n ? 1 : 0, lf(s, s.block_start, i, a), s.block_start += i, gn(s.strm)), a ? aa : Zi);
681
+ return o -= s.strm.avail_in, o && (o >= s.w_size ? (s.matches = 2, s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0), s.strstart = s.w_size, s.insert = s.strstart) : (s.window_size - s.strstart <= o && (s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, s.insert > s.strstart && (s.insert = s.strstart)), s.window.set(s.strm.input.subarray(s.strm.next_in - o, s.strm.next_in), s.strstart), s.strstart += o, s.insert += o > s.w_size - s.insert ? s.w_size - s.insert : o), s.block_start = s.strstart), s.high_water < s.strstart && (s.high_water = s.strstart), a ? Ro : e !== xr && e !== Pn && s.strm.avail_in === 0 && s.strstart === s.block_start ? Io : (r = s.window_size - s.strstart, s.strm.avail_in > r && s.block_start >= s.w_size && (s.block_start -= s.w_size, s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, r += s.w_size, s.insert > s.strstart && (s.insert = s.strstart)), r > s.strm.avail_in && (r = s.strm.avail_in), r && (pf(s.strm, s.window, s.strstart, r), s.strstart += r, s.insert += r > s.w_size - s.insert ? s.w_size - s.insert : r), s.high_water < s.strstart && (s.high_water = s.strstart), r = s.bi_valid + 42 >> 3, r = s.pending_buf_size - r > 65535 ? 65535 : s.pending_buf_size - r, t = r > s.w_size ? s.w_size : r, n = s.strstart - s.block_start, (n >= t || (n || e === Pn) && e !== xr && s.strm.avail_in === 0 && n <= r) && (i = n > r ? r : n, a = e === Pn && s.strm.avail_in === 0 && i === n ? 1 : 0, lf(s, s.block_start, i, a), s.block_start += i, gn(s.strm)), a ? aa : Zi);
682
682
  }, Nd = (s, e) => {
683
683
  let t, i;
684
684
  for (; ; ) {
@@ -702,7 +702,7 @@ const gn = (s) => {
702
702
  if (i && (xn(s, !1), s.strm.avail_out === 0))
703
703
  return Zi;
704
704
  }
705
- return s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
705
+ return s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
706
706
  }, ba = (s, e) => {
707
707
  let t, i, n;
708
708
  for (; ; ) {
@@ -725,7 +725,7 @@ const gn = (s) => {
725
725
  } else
726
726
  s.match_available = 1, s.strstart++, s.lookahead--;
727
727
  }
728
- return s.match_available && (i = vr(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
728
+ return s.match_available && (i = vr(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
729
729
  }, Hy = (s, e) => {
730
730
  let t, i, n, r;
731
731
  const a = s.window;
@@ -746,7 +746,7 @@ const gn = (s) => {
746
746
  if (s.match_length >= Rt ? (t = vr(s, 1, s.match_length - Rt), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0) : (t = vr(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++), t && (xn(s, !1), s.strm.avail_out === 0))
747
747
  return Zi;
748
748
  }
749
- return s.insert = 0, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
749
+ return s.insert = 0, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
750
750
  }, Yy = (s, e) => {
751
751
  let t;
752
752
  for (; ; ) {
@@ -758,7 +758,7 @@ const gn = (s) => {
758
758
  if (s.match_length = 0, t = vr(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, t && (xn(s, !1), s.strm.avail_out === 0))
759
759
  return Zi;
760
760
  }
761
- return s.insert = 0, e === Cn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
761
+ return s.insert = 0, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
762
762
  };
763
763
  function ns(s, e, t, i, n) {
764
764
  this.good_length = s, this.max_lazy = e, this.nice_length = t, this.max_chain = i, this.func = n;
@@ -824,13 +824,13 @@ const sc = (s) => {
824
824
  if (sc(s) || e > Rm || e < 0)
825
825
  return s ? $r(s, vs) : vs;
826
826
  const t = s.state;
827
- if (!s.output || s.avail_in !== 0 && !s.input || t.status === vl && e !== Cn)
827
+ if (!s.output || s.avail_in !== 0 && !s.input || t.status === vl && e !== Pn)
828
828
  return $r(s, s.avail_out === 0 ? Od : vs);
829
829
  const i = t.last_flush;
830
830
  if (t.last_flush = e, t.pending !== 0) {
831
831
  if (gn(s), s.avail_out === 0)
832
832
  return t.last_flush = -1, Ui;
833
- } else if (s.avail_in === 0 && Lm(e) <= Lm(i) && e !== Cn)
833
+ } else if (s.avail_in === 0 && Lm(e) <= Lm(i) && e !== Pn)
834
834
  return $r(s, Od);
835
835
  if (t.status === vl && s.avail_in !== 0)
836
836
  return $r(s, Od);
@@ -908,7 +908,7 @@ const sc = (s) => {
908
908
  if (n === Io && (e === _y ? yy(t) : e !== Rm && (lf(t, 0, 0, !1), e === wy && (hr(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), gn(s), s.avail_out === 0))
909
909
  return t.last_flush = -1, Ui;
910
910
  }
911
- return e !== Cn ? Ui : t.wrap <= 0 ? Dm : (t.wrap === 2 ? (kt(t, s.adler & 255), kt(t, s.adler >> 8 & 255), kt(t, s.adler >> 16 & 255), kt(t, s.adler >> 24 & 255), kt(t, s.total_in & 255), kt(t, s.total_in >> 8 & 255), kt(t, s.total_in >> 16 & 255), kt(t, s.total_in >> 24 & 255)) : (zo(t, s.adler >>> 16), zo(t, s.adler & 65535)), gn(s), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? Ui : Dm);
911
+ return e !== Pn ? Ui : t.wrap <= 0 ? Dm : (t.wrap === 2 ? (kt(t, s.adler & 255), kt(t, s.adler >> 8 & 255), kt(t, s.adler >> 16 & 255), kt(t, s.adler >> 24 & 255), kt(t, s.total_in & 255), kt(t, s.total_in >> 8 & 255), kt(t, s.total_in >> 16 & 255), kt(t, s.total_in >> 24 & 255)) : (zo(t, s.adler >>> 16), zo(t, s.adler & 65535)), gn(s), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? Ui : Dm);
912
912
  }, Zy = (s) => {
913
913
  if (sc(s))
914
914
  return vs;
@@ -1394,7 +1394,7 @@ const I_ = 0, nx = 1, sx = 2, {
1394
1394
  Z_OK: oa,
1395
1395
  Z_STREAM_END: D_,
1396
1396
  Z_NEED_DICT: L_,
1397
- Z_STREAM_ERROR: Un,
1397
+ Z_STREAM_ERROR: Bn,
1398
1398
  Z_DATA_ERROR: rx,
1399
1399
  Z_MEM_ERROR: ax,
1400
1400
  Z_BUF_ERROR: O_,
@@ -1410,23 +1410,23 @@ const pa = (s) => {
1410
1410
  return !e || e.strm !== s || e.mode < dd || e.mode > lx ? 1 : 0;
1411
1411
  }, cx = (s) => {
1412
1412
  if (pa(s))
1413
- return Un;
1413
+ return Bn;
1414
1414
  const e = s.state;
1415
1415
  return s.total_in = s.total_out = e.total = 0, s.msg = "", e.wrap && (s.adler = e.wrap & 1), e.mode = dd, e.last = 0, e.havedict = 0, e.flags = -1, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new Int32Array(N_), e.distcode = e.distdyn = new Int32Array(B_), e.sane = 1, e.back = -1, oa;
1416
1416
  }, hx = (s) => {
1417
1417
  if (pa(s))
1418
- return Un;
1418
+ return Bn;
1419
1419
  const e = s.state;
1420
1420
  return e.wsize = 0, e.whave = 0, e.wnext = 0, cx(s);
1421
1421
  }, dx = (s, e) => {
1422
1422
  let t;
1423
1423
  if (pa(s))
1424
- return Un;
1424
+ return Bn;
1425
1425
  const i = s.state;
1426
- return e < 0 ? (t = 0, e = -e) : (t = (e >> 4) + 5, e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? Un : (i.window !== null && i.wbits !== e && (i.window = null), i.wrap = t, i.wbits = e, hx(s));
1426
+ return e < 0 ? (t = 0, e = -e) : (t = (e >> 4) + 5, e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? Bn : (i.window !== null && i.wbits !== e && (i.window = null), i.wrap = t, i.wbits = e, hx(s));
1427
1427
  }, ux = (s, e) => {
1428
1428
  if (!s)
1429
- return Un;
1429
+ return Bn;
1430
1430
  const t = new z_();
1431
1431
  s.state = t, t.strm = s, t.window = null, t.mode = dd;
1432
1432
  const i = dx(s, e);
@@ -1463,7 +1463,7 @@ const V_ = (s) => {
1463
1463
  new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
1464
1464
  );
1465
1465
  if (pa(s) || !s.output || !s.input && s.avail_in !== 0)
1466
- return Un;
1466
+ return Bn;
1467
1467
  t = s.state, t.mode === Ms && (t.mode = Ud), a = s.next_out, n = s.output, l = s.avail_out, r = s.next_in, i = s.input, o = s.avail_in, c = t.hold, h = t.bits, d = o, u = l, E = oa;
1468
1468
  e:
1469
1469
  for (; ; )
@@ -1880,24 +1880,24 @@ const V_ = (s) => {
1880
1880
  return ax;
1881
1881
  case lx:
1882
1882
  default:
1883
- return Un;
1883
+ return Bn;
1884
1884
  }
1885
1885
  return s.next_out = a, s.avail_out = l, s.next_in = r, s.avail_in = o, t.hold = c, t.bits = h, (t.wsize || u !== s.avail_out && t.mode < ei && (t.mode < zd || e !== Fm)) && fx(s, s.output, s.next_out, u - s.avail_out), d -= s.avail_in, u -= s.avail_out, s.total_in += d, s.total_out += u, t.total += u, t.wrap & 4 && u && (s.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
1886
1886
  t.flags ? Ei(t.check, n, u, s.next_out - u) : zl(t.check, n, u, s.next_out - u)), s.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === Ms ? 128 : 0) + (t.mode === mc || t.mode === Fd ? 256 : 0), (d === 0 && u === 0 || e === Fm) && E === oa && (E = O_), E;
1887
1887
  }, H_ = (s) => {
1888
1888
  if (pa(s))
1889
- return Un;
1889
+ return Bn;
1890
1890
  let e = s.state;
1891
1891
  return e.window && (e.window = null), s.state = null, oa;
1892
1892
  }, Y_ = (s, e) => {
1893
1893
  if (pa(s))
1894
- return Un;
1894
+ return Bn;
1895
1895
  const t = s.state;
1896
- return t.wrap & 2 ? (t.head = e, e.done = !1, oa) : Un;
1896
+ return t.wrap & 2 ? (t.head = e, e.done = !1, oa) : Bn;
1897
1897
  }, G_ = (s, e) => {
1898
1898
  const t = e.length;
1899
1899
  let i, n, r;
1900
- return pa(s) || (i = s.state, i.wrap !== 0 && i.mode !== qh) ? Un : i.mode === qh && (n = 1, n = zl(n, e, t, 0), n !== i.check) ? rx : (r = fx(s, e, t, t), r ? (i.mode = ox, ax) : (i.havedict = 1, oa));
1900
+ return pa(s) || (i = s.state, i.wrap !== 0 && i.mode !== qh) ? Bn : i.mode === qh && (n = 1, n = zl(n, e, t, 0), n !== i.check) ? rx : (r = fx(s, e, t, t), r ? (i.mode = ox, ax) : (i.havedict = 1, oa));
1901
1901
  };
1902
1902
  var W_ = hx, Q_ = dx, j_ = cx, q_ = k_, Z_ = ux, $_ = X_, K_ = H_, J_ = Y_, ew = G_, tw = "pako inflate (from Nodeca project)", Ns = {
1903
1903
  inflateReset: W_,
@@ -2164,7 +2164,7 @@ let yw = class {
2164
2164
  };
2165
2165
  var Wd;
2166
2166
  const _w = "2.9.0", xc = 1 / 8, ww = /Mac/.test((Wd = globalThis == null ? void 0 : globalThis.navigator) === null || Wd === void 0 ? void 0 : Wd.platform);
2167
- let pt, fg, bc, Qd, sn, _t, Ut, Sa, Ho, ss, rs, Rr, pg, mg, Mn, Yo, Ma, gg, jd, vg, qd, Zd, yc;
2167
+ let pt, fg, bc, Qd, sn, _t, Ut, Sa, Ho, ss, rs, Rr, pg, mg, Sn, Yo, Ma, gg, jd, vg, qd, Zd, yc;
2168
2168
  class Vs extends yw {
2169
2169
  /**
2170
2170
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
@@ -2207,7 +2207,7 @@ class Vs extends yw {
2207
2207
  * @category Statics
2208
2208
  */
2209
2209
  static install(e) {
2210
- pt = e.THREE, fg = Object.freeze(new pt.Vector3(0, 0, 0)), bc = Object.freeze(new pt.Vector3(0, 1, 0)), Qd = Object.freeze(new pt.Vector3(0, 0, 1)), sn = new pt.Vector2(), _t = new pt.Vector3(), Ut = new pt.Vector3(), Sa = new pt.Vector3(), Ho = new pt.Vector3(), ss = new pt.Vector3(), rs = new pt.Vector3(), Rr = new pt.Vector3(), pg = new pt.Vector3(), mg = new pt.Vector3(), Mn = new pt.Spherical(), Yo = new pt.Spherical(), Ma = new pt.Box3(), gg = new pt.Box3(), jd = new pt.Sphere(), vg = new pt.Quaternion(), qd = new pt.Quaternion(), Zd = new pt.Matrix4(), yc = new pt.Raycaster();
2210
+ pt = e.THREE, fg = Object.freeze(new pt.Vector3(0, 0, 0)), bc = Object.freeze(new pt.Vector3(0, 1, 0)), Qd = Object.freeze(new pt.Vector3(0, 0, 1)), sn = new pt.Vector2(), _t = new pt.Vector3(), Ut = new pt.Vector3(), Sa = new pt.Vector3(), Ho = new pt.Vector3(), ss = new pt.Vector3(), rs = new pt.Vector3(), Rr = new pt.Vector3(), pg = new pt.Vector3(), mg = new pt.Vector3(), Sn = new pt.Spherical(), Yo = new pt.Spherical(), Ma = new pt.Box3(), gg = new pt.Box3(), jd = new pt.Sphere(), vg = new pt.Quaternion(), qd = new pt.Quaternion(), Zd = new pt.Matrix4(), yc = new pt.Raycaster();
2211
2211
  }
2212
2212
  /**
2213
2213
  * list all ACTIONs
@@ -2888,11 +2888,11 @@ class Vs extends yw {
2888
2888
  lerpLookAt(e, t, i, n, r, a, o, l, c, h, d, u, f, p = !1) {
2889
2889
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = _a.NONE, this._changedDolly = 0;
2890
2890
  const v = _t.set(n, r, a), g = Ut.set(e, t, i);
2891
- Mn.setFromVector3(g.sub(v).applyQuaternion(this._yAxisUpSpace));
2891
+ Sn.setFromVector3(g.sub(v).applyQuaternion(this._yAxisUpSpace));
2892
2892
  const m = Sa.set(h, d, u), b = Ut.set(o, l, c);
2893
2893
  Yo.setFromVector3(b.sub(m).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(v.lerp(m, f));
2894
- const x = Yo.theta - Mn.theta, y = Yo.phi - Mn.phi, _ = Yo.radius - Mn.radius;
2895
- this._sphericalEnd.set(Mn.radius + _ * f, Mn.phi + y * f, Mn.theta + x * f), this.normalizeRotations(), this._needsUpdate = !0, p || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
2894
+ const x = Yo.theta - Sn.theta, y = Yo.phi - Sn.phi, _ = Yo.radius - Sn.radius;
2895
+ this._sphericalEnd.set(Sn.radius + _ * f, Sn.phi + y * f, Sn.theta + x * f), this.normalizeRotations(), this._needsUpdate = !0, p || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
2896
2896
  const w = !p || Vt(this._target.x, this._targetEnd.x, this.restThreshold) && Vt(this._target.y, this._targetEnd.y, this.restThreshold) && Vt(this._target.z, this._targetEnd.z, this.restThreshold) && Vt(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Vt(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Vt(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
2897
2897
  return this._createOnRestPromise(w);
2898
2898
  }
@@ -3204,7 +3204,7 @@ class Vs extends yw {
3204
3204
  */
3205
3205
  fromJSON(e, t = !1) {
3206
3206
  const i = JSON.parse(e);
3207
- this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = Xo(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = Xo(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = Xo(i.maxPolarAngle), this.minAzimuthAngle = Xo(i.minAzimuthAngle), this.maxAzimuthAngle = Xo(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t), Mn.setFromVector3(_t.fromArray(i.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(Mn.theta, Mn.phi, t), this.dollyTo(Mn.radius, t), this.zoomTo(i.zoom, t), this.setFocalOffset(i.focalOffset[0], i.focalOffset[1], i.focalOffset[2], t), this._needsUpdate = !0;
3207
+ this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = Xo(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = Xo(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = Xo(i.maxPolarAngle), this.minAzimuthAngle = Xo(i.minAzimuthAngle), this.maxAzimuthAngle = Xo(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t), Sn.setFromVector3(_t.fromArray(i.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(Sn.theta, Sn.phi, t), this.dollyTo(Sn.radius, t), this.zoomTo(i.zoom, t), this.setFocalOffset(i.focalOffset[0], i.focalOffset[1], i.focalOffset[2], t), this._needsUpdate = !0;
3208
3208
  }
3209
3209
  /**
3210
3210
  * Attach all internal event handlers to enable drag control.
@@ -3365,7 +3365,7 @@ class Vs extends yw {
3365
3365
  * Copyright 2010-2025 Three.js Authors
3366
3366
  * SPDX-License-Identifier: MIT
3367
3367
  */
3368
- const Do = "181", Sw = 0, xg = 1, Mw = 2, gx = 1, Aw = 2, ds = 3, wn = 0, Ki = 1, pi = 2, $t = 0, ho = 1, Hl = 2, bg = 3, yg = 4, Zh = 5, Qn = 100, Tw = 101, Ew = 102, Pw = 103, Cw = 104, Yl = 200, Iw = 201, Rw = 202, Dw = 203, mf = 204, gf = 205, Rp = 206, Lw = 207, Dp = 208, Ow = 209, Nw = 210, Bw = 211, Uw = 212, Fw = 213, zw = 214, vf = 0, xf = 1, bf = 2, la = 3, yf = 4, _f = 5, wf = 6, Sf = 7, ud = 0, kw = 1, Vw = 2, yr = 0, vx = 1, xx = 2, bx = 3, yx = 4, _x = 5, wx = 6, Sx = 7, _g = "attached", Xw = "detached", Lp = 300, ca = 301, ha = 302, $h = 303, Kh = 304, ac = 306, Jn = 1e3, Zn = 1001, Gl = 1002, Dt = 1003, Op = 1004, io = 1005, jt = 1006, El = 1007, gs = 1008, ys = 1009, Mx = 1010, Ax = 1011, _r = 1012, Np = 1013, $n = 1014, $i = 1015, Ht = 1016, Bp = 1017, Up = 1018, wr = 1020, Tx = 35902, Ex = 35899, Px = 1021, Cx = 1022, Kt = 1023, da = 1026, Sr = 1027, oc = 1028, fd = 1029, Fp = 1030, zp = 1031, kp = 1033, zh = 33776, kh = 33777, Vh = 33778, Xh = 33779, Mf = 35840, Af = 35841, Tf = 35842, Ef = 35843, Pf = 36196, Cf = 37492, If = 37496, Rf = 37808, Df = 37809, Lf = 37810, Of = 37811, Nf = 37812, Bf = 37813, Uf = 37814, Ff = 37815, zf = 37816, kf = 37817, Vf = 37818, Xf = 37819, Hf = 37820, Yf = 37821, Gf = 36492, Wf = 36494, Qf = 36495, jf = 36283, qf = 36284, Zf = 36285, $f = 36286, Hw = 2200, Yw = 2201, Gw = 2202, Wl = 2300, Ql = 2301, $d = 2302, no = 2400, so = 2401, Jh = 2402, Vp = 2500, Ww = 2501, Qw = 0, Ix = 1, Kf = 2, jw = 3200, Rx = 3201, ma = 0, qw = 1, Us = "", Pi = "srgb", Ji = "srgb-linear", ed = "linear", Gt = "srgb", Aa = 7680, wg = 519, Zw = 512, $w = 513, Kw = 514, Dx = 515, Jw = 516, e1 = 517, t1 = 518, i1 = 519, Jf = 35044, ep = "300 es", In = 2e3, jl = 2001;
3368
+ const Do = "181", Sw = 0, xg = 1, Mw = 2, gx = 1, Aw = 2, ds = 3, Un = 0, Ki = 1, fi = 2, $t = 0, ho = 1, Hl = 2, bg = 3, yg = 4, Zh = 5, Qn = 100, Tw = 101, Ew = 102, Pw = 103, Cw = 104, Yl = 200, Iw = 201, Rw = 202, Dw = 203, mf = 204, gf = 205, Rp = 206, Lw = 207, Dp = 208, Ow = 209, Nw = 210, Bw = 211, Uw = 212, Fw = 213, zw = 214, vf = 0, xf = 1, bf = 2, la = 3, yf = 4, _f = 5, wf = 6, Sf = 7, ud = 0, kw = 1, Vw = 2, yr = 0, vx = 1, xx = 2, bx = 3, yx = 4, _x = 5, wx = 6, Sx = 7, _g = "attached", Xw = "detached", Lp = 300, ca = 301, ha = 302, $h = 303, Kh = 304, ac = 306, Jn = 1e3, Zn = 1001, Gl = 1002, Dt = 1003, Op = 1004, io = 1005, jt = 1006, El = 1007, gs = 1008, ys = 1009, Mx = 1010, Ax = 1011, _r = 1012, Np = 1013, $n = 1014, $i = 1015, Ht = 1016, Bp = 1017, Up = 1018, wr = 1020, Tx = 35902, Ex = 35899, Px = 1021, Cx = 1022, Kt = 1023, da = 1026, Sr = 1027, oc = 1028, fd = 1029, Fp = 1030, zp = 1031, kp = 1033, zh = 33776, kh = 33777, Vh = 33778, Xh = 33779, Mf = 35840, Af = 35841, Tf = 35842, Ef = 35843, Pf = 36196, Cf = 37492, If = 37496, Rf = 37808, Df = 37809, Lf = 37810, Of = 37811, Nf = 37812, Bf = 37813, Uf = 37814, Ff = 37815, zf = 37816, kf = 37817, Vf = 37818, Xf = 37819, Hf = 37820, Yf = 37821, Gf = 36492, Wf = 36494, Qf = 36495, jf = 36283, qf = 36284, Zf = 36285, $f = 36286, Hw = 2200, Yw = 2201, Gw = 2202, Wl = 2300, Ql = 2301, $d = 2302, no = 2400, so = 2401, Jh = 2402, Vp = 2500, Ww = 2501, Qw = 0, Ix = 1, Kf = 2, jw = 3200, Rx = 3201, ma = 0, qw = 1, Us = "", Pi = "srgb", Ji = "srgb-linear", ed = "linear", Gt = "srgb", Aa = 7680, wg = 519, Zw = 512, $w = 513, Kw = 514, Dx = 515, Jw = 516, e1 = 517, t1 = 518, i1 = 519, Jf = 35044, ep = "300 es", Cn = 2e3, jl = 2001;
3369
3369
  function Lx(s) {
3370
3370
  for (let e = s.length - 1; e >= 0; --e)
3371
3371
  if (s[e] >= 65535)
@@ -3488,7 +3488,7 @@ let Ws = class {
3488
3488
  const zi = ["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"];
3489
3489
  let Mg = 1234567;
3490
3490
  const uo = Math.PI / 180, bo = 180 / Math.PI;
3491
- function Nn() {
3491
+ function On() {
3492
3492
  const s = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0;
3493
3493
  return (zi[s & 255] + zi[s >> 8 & 255] + zi[s >> 16 & 255] + zi[s >> 24 & 255] + "-" + zi[e & 255] + zi[e >> 8 & 255] + "-" + zi[e >> 16 & 15 | 64] + zi[e >> 24 & 255] + "-" + zi[t & 63 | 128] + zi[t >> 8 & 255] + "-" + zi[t >> 16 & 255] + zi[t >> 24 & 255] + zi[i & 255] + zi[i >> 8 & 255] + zi[i >> 16 & 255] + zi[i >> 24 & 255]).toLowerCase();
3494
3494
  }
@@ -3624,7 +3624,7 @@ const pd = {
3624
3624
  * @method
3625
3625
  * @return {string} The UUID.
3626
3626
  */
3627
- generateUUID: Nn,
3627
+ generateUUID: On,
3628
3628
  /**
3629
3629
  * Clamps the given value between min and max.
3630
3630
  *
@@ -6155,7 +6155,7 @@ class Kr {
6155
6155
  * @param {any} [data=null] - The data definition of a texture.
6156
6156
  */
6157
6157
  constructor(e = null) {
6158
- this.isSource = !0, Object.defineProperty(this, "id", { value: M1++ }), this.uuid = Nn(), this.data = e, this.dataReady = !0, this.version = 0;
6158
+ this.isSource = !0, Object.defineProperty(this, "id", { value: M1++ }), this.uuid = On(), this.data = e, this.dataReady = !0, this.version = 0;
6159
6159
  }
6160
6160
  /**
6161
6161
  * Returns the dimensions of the source into the given target vector.
@@ -6233,7 +6233,7 @@ class ci extends Ws {
6233
6233
  * @param {string} [colorSpace=NoColorSpace] - The color space.
6234
6234
  */
6235
6235
  constructor(e = ci.DEFAULT_IMAGE, t = ci.DEFAULT_MAPPING, i = Zn, n = Zn, r = jt, a = gs, o = Kt, l = ys, c = ci.DEFAULT_ANISOTROPY, h = Us) {
6236
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: A1++ }), this.uuid = Nn(), this.name = "", this.source = new Kr(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new K(0, 0), this.repeat = new K(1, 1), this.center = new K(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new yt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
6236
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: A1++ }), this.uuid = On(), this.name = "", this.source = new Kr(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new K(0, 0), this.repeat = new K(1, 1), this.center = new K(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new yt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
6237
6237
  }
6238
6238
  /**
6239
6239
  * The width of the texture in pixels.
@@ -6434,7 +6434,7 @@ class ci extends Ws {
6434
6434
  ci.DEFAULT_IMAGE = null;
6435
6435
  ci.DEFAULT_MAPPING = Lp;
6436
6436
  ci.DEFAULT_ANISOTROPY = 1;
6437
- class Mt {
6437
+ class At {
6438
6438
  /**
6439
6439
  * Constructs a new 4D vector.
6440
6440
  *
@@ -6444,7 +6444,7 @@ class Mt {
6444
6444
  * @param {number} [w=1] - The w value of this vector.
6445
6445
  */
6446
6446
  constructor(e = 0, t = 0, i = 0, n = 1) {
6447
- Mt.prototype.isVector4 = !0, this.x = e, this.y = t, this.z = i, this.w = n;
6447
+ At.prototype.isVector4 = !0, this.x = e, this.y = t, this.z = i, this.w = n;
6448
6448
  }
6449
6449
  /**
6450
6450
  * Alias for {@link Vector4#z}.
@@ -7025,7 +7025,7 @@ class T1 extends Ws {
7025
7025
  count: 1,
7026
7026
  depth: 1,
7027
7027
  multiview: !1
7028
- }, i), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = i.depth, this.scissor = new Mt(0, 0, e, t), this.scissorTest = !1, this.viewport = new Mt(0, 0, e, t);
7028
+ }, i), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = i.depth, this.scissor = new At(0, 0, e, t), this.scissorTest = !1, this.viewport = new At(0, 0, e, t);
7029
7029
  const n = { width: e, height: t, depth: i.depth }, r = new ci(n);
7030
7030
  this.textures = [];
7031
7031
  const a = i.count;
@@ -8709,12 +8709,12 @@ class Ce {
8709
8709
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
8710
8710
  * @return {Matrix4} A reference to this matrix.
8711
8711
  */
8712
- makePerspective(e, t, i, n, r, a, o = In, l = !1) {
8712
+ makePerspective(e, t, i, n, r, a, o = Cn, l = !1) {
8713
8713
  const c = this.elements, h = 2 * r / (t - e), d = 2 * r / (i - n), u = (t + e) / (t - e), f = (i + n) / (i - n);
8714
8714
  let p, v;
8715
8715
  if (l)
8716
8716
  p = r / (a - r), v = a * r / (a - r);
8717
- else if (o === In)
8717
+ else if (o === Cn)
8718
8718
  p = -(a + r) / (a - r), v = -2 * a * r / (a - r);
8719
8719
  else if (o === jl)
8720
8720
  p = -a / (a - r), v = -a * r / (a - r);
@@ -8736,12 +8736,12 @@ class Ce {
8736
8736
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
8737
8737
  * @return {Matrix4} A reference to this matrix.
8738
8738
  */
8739
- makeOrthographic(e, t, i, n, r, a, o = In, l = !1) {
8739
+ makeOrthographic(e, t, i, n, r, a, o = Cn, l = !1) {
8740
8740
  const c = this.elements, h = 2 / (t - e), d = 2 / (i - n), u = -(t + e) / (t - e), f = -(i + n) / (i - n);
8741
8741
  let p, v;
8742
8742
  if (l)
8743
8743
  p = 1 / (a - r), v = a / (a - r);
8744
- else if (o === In)
8744
+ else if (o === Cn)
8745
8745
  p = -2 / (a - r), v = -(a + r) / (a - r);
8746
8746
  else if (o === jl)
8747
8747
  p = -1 / (a - r), v = -r / (a - r);
@@ -9065,7 +9065,7 @@ class Lt extends Ws {
9065
9065
  * Constructs a new 3D object.
9066
9066
  */
9067
9067
  constructor() {
9068
- super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid = Nn(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Lt.DEFAULT_UP.clone();
9068
+ super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid = On(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Lt.DEFAULT_UP.clone();
9069
9069
  const e = new P(), t = new hn(), i = new ui(), n = new P(1, 1, 1);
9070
9070
  function r() {
9071
9071
  i.setFromEuler(t, !1);
@@ -9719,7 +9719,7 @@ class Lt extends Ws {
9719
9719
  Lt.DEFAULT_UP = /* @__PURE__ */ new P(0, 1, 0);
9720
9720
  Lt.DEFAULT_MATRIX_AUTO_UPDATE = !0;
9721
9721
  Lt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
9722
- const Hn = /* @__PURE__ */ new P(), Ps = /* @__PURE__ */ new P(), lu = /* @__PURE__ */ new P(), Cs = /* @__PURE__ */ new P(), La = /* @__PURE__ */ new P(), Oa = /* @__PURE__ */ new P(), Ng = /* @__PURE__ */ new P(), cu = /* @__PURE__ */ new P(), hu = /* @__PURE__ */ new P(), du = /* @__PURE__ */ new P(), uu = /* @__PURE__ */ new Mt(), fu = /* @__PURE__ */ new Mt(), pu = /* @__PURE__ */ new Mt();
9722
+ const Hn = /* @__PURE__ */ new P(), Ps = /* @__PURE__ */ new P(), lu = /* @__PURE__ */ new P(), Cs = /* @__PURE__ */ new P(), La = /* @__PURE__ */ new P(), Oa = /* @__PURE__ */ new P(), Ng = /* @__PURE__ */ new P(), cu = /* @__PURE__ */ new P(), hu = /* @__PURE__ */ new P(), du = /* @__PURE__ */ new P(), uu = /* @__PURE__ */ new At(), fu = /* @__PURE__ */ new At(), pu = /* @__PURE__ */ new At();
9723
9723
  let vn = class to {
9724
9724
  /**
9725
9725
  * Constructs a new triangle.
@@ -10635,7 +10635,7 @@ class Li extends Ws {
10635
10635
  * Constructs a new material.
10636
10636
  */
10637
10637
  constructor() {
10638
- super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: N1++ }), this.uuid = Nn(), this.name = "", this.type = "Material", this.blending = ho, this.side = wn, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = mf, this.blendDst = gf, this.blendEquation = Qn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ie(0, 0, 0), this.blendAlpha = 0, this.depthFunc = la, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = wg, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Aa, this.stencilZFail = Aa, this.stencilZPass = Aa, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
10638
+ super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: N1++ }), this.uuid = On(), this.name = "", this.type = "Material", this.blending = ho, this.side = Un, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = mf, this.blendDst = gf, this.blendEquation = Qn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ie(0, 0, 0), this.blendAlpha = 0, this.depthFunc = la, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = wg, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Aa, this.stencilZFail = Aa, this.stencilZPass = Aa, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
10639
10639
  }
10640
10640
  /**
10641
10641
  * Sets the alpha value to be used when running an alpha test. The material
@@ -10734,7 +10734,7 @@ class Li extends Ws {
10734
10734
  generator: "Material.toJSON"
10735
10735
  }
10736
10736
  };
10737
- i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== ho && (i.blending = this.blending), this.side !== wn && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== mf && (i.blendSrc = this.blendSrc), this.blendDst !== gf && (i.blendDst = this.blendDst), this.blendEquation !== Qn && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== la && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== wg && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Aa && (i.stencilFail = this.stencilFail), this.stencilZFail !== Aa && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== Aa && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
10737
+ i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== ho && (i.blending = this.blending), this.side !== Un && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== mf && (i.blendSrc = this.blendSrc), this.blendDst !== gf && (i.blendDst = this.blendDst), this.blendEquation !== Qn && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== la && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== wg && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Aa && (i.stencilFail = this.stencilFail), this.stencilZFail !== Aa && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== Aa && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
10738
10738
  function n(r) {
10739
10739
  const a = [];
10740
10740
  for (const o in r) {
@@ -11186,13 +11186,13 @@ class et extends ot {
11186
11186
  }
11187
11187
  }
11188
11188
  let F1 = 0;
11189
- const An = /* @__PURE__ */ new Ce(), gu = /* @__PURE__ */ new Lt(), Na = /* @__PURE__ */ new P(), mn = /* @__PURE__ */ new ut(), jo = /* @__PURE__ */ new ut(), Ai = /* @__PURE__ */ new P();
11189
+ const Mn = /* @__PURE__ */ new Ce(), gu = /* @__PURE__ */ new Lt(), Na = /* @__PURE__ */ new P(), mn = /* @__PURE__ */ new ut(), jo = /* @__PURE__ */ new ut(), Ai = /* @__PURE__ */ new P();
11190
11190
  class dt extends Ws {
11191
11191
  /**
11192
11192
  * Constructs a new geometry.
11193
11193
  */
11194
11194
  constructor() {
11195
- super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: F1++ }), this.uuid = Nn(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
11195
+ super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: F1++ }), this.uuid = On(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
11196
11196
  }
11197
11197
  /**
11198
11198
  * Returns the index of this geometry.
@@ -11321,7 +11321,7 @@ class dt extends Ws {
11321
11321
  * @return {BufferGeometry} A reference to this instance.
11322
11322
  */
11323
11323
  applyQuaternion(e) {
11324
- return An.makeRotationFromQuaternion(e), this.applyMatrix4(An), this;
11324
+ return Mn.makeRotationFromQuaternion(e), this.applyMatrix4(Mn), this;
11325
11325
  }
11326
11326
  /**
11327
11327
  * Rotates the geometry about the X axis. This is typically done as a one time
@@ -11332,7 +11332,7 @@ class dt extends Ws {
11332
11332
  * @return {BufferGeometry} A reference to this instance.
11333
11333
  */
11334
11334
  rotateX(e) {
11335
- return An.makeRotationX(e), this.applyMatrix4(An), this;
11335
+ return Mn.makeRotationX(e), this.applyMatrix4(Mn), this;
11336
11336
  }
11337
11337
  /**
11338
11338
  * Rotates the geometry about the Y axis. This is typically done as a one time
@@ -11343,7 +11343,7 @@ class dt extends Ws {
11343
11343
  * @return {BufferGeometry} A reference to this instance.
11344
11344
  */
11345
11345
  rotateY(e) {
11346
- return An.makeRotationY(e), this.applyMatrix4(An), this;
11346
+ return Mn.makeRotationY(e), this.applyMatrix4(Mn), this;
11347
11347
  }
11348
11348
  /**
11349
11349
  * Rotates the geometry about the Z axis. This is typically done as a one time
@@ -11354,7 +11354,7 @@ class dt extends Ws {
11354
11354
  * @return {BufferGeometry} A reference to this instance.
11355
11355
  */
11356
11356
  rotateZ(e) {
11357
- return An.makeRotationZ(e), this.applyMatrix4(An), this;
11357
+ return Mn.makeRotationZ(e), this.applyMatrix4(Mn), this;
11358
11358
  }
11359
11359
  /**
11360
11360
  * Translates the geometry. This is typically done as a one time
@@ -11367,7 +11367,7 @@ class dt extends Ws {
11367
11367
  * @return {BufferGeometry} A reference to this instance.
11368
11368
  */
11369
11369
  translate(e, t, i) {
11370
- return An.makeTranslation(e, t, i), this.applyMatrix4(An), this;
11370
+ return Mn.makeTranslation(e, t, i), this.applyMatrix4(Mn), this;
11371
11371
  }
11372
11372
  /**
11373
11373
  * Scales the geometry. This is typically done as a one time
@@ -11380,7 +11380,7 @@ class dt extends Ws {
11380
11380
  * @return {BufferGeometry} A reference to this instance.
11381
11381
  */
11382
11382
  scale(e, t, i) {
11383
- return An.makeScale(e, t, i), this.applyMatrix4(An), this;
11383
+ return Mn.makeScale(e, t, i), this.applyMatrix4(Mn), this;
11384
11384
  }
11385
11385
  /**
11386
11386
  * Rotates the geometry to face a point in 3D space. This is typically done as a one time
@@ -11818,7 +11818,7 @@ class Q extends Lt {
11818
11818
  }
11819
11819
  function z1(s, e, t, i, n, r, a, o) {
11820
11820
  let l;
11821
- if (e.side === Ki ? l = i.intersectTriangle(a, r, n, !0, o) : l = i.intersectTriangle(n, r, a, e.side === wn, o), l === null)
11821
+ if (e.side === Ki ? l = i.intersectTriangle(a, r, n, !0, o) : l = i.intersectTriangle(n, r, a, e.side === Un, o), l === null)
11822
11822
  return null;
11823
11823
  Nc.copy(o), Nc.applyMatrix4(s.matrixWorld);
11824
11824
  const c = t.ray.origin.distanceTo(Nc);
@@ -12006,7 +12006,7 @@ class Yp extends Lt {
12006
12006
  * Constructs a new camera.
12007
12007
  */
12008
12008
  constructor() {
12009
- super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Ce(), this.projectionMatrix = new Ce(), this.projectionMatrixInverse = new Ce(), this.coordinateSystem = In, this._reversedDepth = !1;
12009
+ super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Ce(), this.projectionMatrix = new Ce(), this.projectionMatrixInverse = new Ce(), this.coordinateSystem = Cn, this._reversedDepth = !1;
12010
12010
  }
12011
12011
  /**
12012
12012
  * The flag that indicates whether the camera uses a reversed depth buffer.
@@ -12240,7 +12240,7 @@ let H1 = class extends Lt {
12240
12240
  const e = this.coordinateSystem, t = this.children.concat(), [i, n, r, a, o, l] = t;
12241
12241
  for (const c of t)
12242
12242
  this.remove(c);
12243
- if (e === In)
12243
+ if (e === Cn)
12244
12244
  i.up.set(0, 1, 0), i.lookAt(1, 0, 0), n.up.set(0, 1, 0), n.lookAt(-1, 0, 0), r.up.set(0, 0, -1), r.lookAt(0, 1, 0), a.up.set(0, 0, 1), a.lookAt(0, -1, 0), o.up.set(0, 1, 0), o.lookAt(0, 0, 1), l.up.set(0, 1, 0), l.lookAt(0, 0, -1);
12245
12245
  else if (e === jl)
12246
12246
  i.up.set(0, -1, 0), i.lookAt(-1, 0, 0), n.up.set(0, -1, 0), n.lookAt(1, 0, 0), r.up.set(0, 0, 1), r.lookAt(0, 1, 0), a.up.set(0, 0, -1), a.lookAt(0, -1, 0), o.up.set(0, -1, 0), o.lookAt(0, 0, 1), l.up.set(0, -1, 0), l.lookAt(0, 0, -1);
@@ -12605,7 +12605,7 @@ class gd {
12605
12605
  * @param {number} stride - The number of typed-array elements per vertex.
12606
12606
  */
12607
12607
  constructor(e, t) {
12608
- this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e !== void 0 ? e.length / t : 0, this.usage = Jf, this.updateRanges = [], this.version = 0, this.uuid = Nn();
12608
+ this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e !== void 0 ? e.length / t : 0, this.usage = Jf, this.updateRanges = [], this.version = 0, this.uuid = On();
12609
12609
  }
12610
12610
  /**
12611
12611
  * A callback function that is executed after the renderer has transferred the attribute array
@@ -12690,7 +12690,7 @@ class gd {
12690
12690
  * @return {InterleavedBuffer} A clone of this instance.
12691
12691
  */
12692
12692
  clone(e) {
12693
- e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = Nn()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
12693
+ e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = On()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
12694
12694
  const t = new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]), i = new this.constructor(t, this.stride);
12695
12695
  return i.setUsage(this.usage), i;
12696
12696
  }
@@ -12712,7 +12712,7 @@ class gd {
12712
12712
  * @return {Object} A JSON object representing the serialized interleaved buffer.
12713
12713
  */
12714
12714
  toJSON(e) {
12715
- return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = Nn()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
12715
+ return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = On()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
12716
12716
  uuid: this.uuid,
12717
12717
  buffer: this.array.buffer._uuid,
12718
12718
  type: this.array.constructor.name,
@@ -13216,7 +13216,7 @@ class kx extends Lt {
13216
13216
  return t;
13217
13217
  }
13218
13218
  }
13219
- const Yg = /* @__PURE__ */ new P(), Gg = /* @__PURE__ */ new Mt(), Wg = /* @__PURE__ */ new Mt(), W1 = /* @__PURE__ */ new P(), Qg = /* @__PURE__ */ new Ce(), Vc = /* @__PURE__ */ new P(), yu = /* @__PURE__ */ new ni(), jg = /* @__PURE__ */ new Ce(), _u = /* @__PURE__ */ new Lo();
13219
+ const Yg = /* @__PURE__ */ new P(), Gg = /* @__PURE__ */ new At(), Wg = /* @__PURE__ */ new At(), W1 = /* @__PURE__ */ new P(), Qg = /* @__PURE__ */ new Ce(), Vc = /* @__PURE__ */ new P(), yu = /* @__PURE__ */ new ni(), jg = /* @__PURE__ */ new Ce(), _u = /* @__PURE__ */ new Lo();
13220
13220
  class Vx extends Q {
13221
13221
  /**
13222
13222
  * Constructs a new skinned mesh.
@@ -13284,7 +13284,7 @@ class Vx extends Q {
13284
13284
  * in the skinned mesh's geometry.
13285
13285
  */
13286
13286
  normalizeSkinWeights() {
13287
- const e = new Mt(), t = this.geometry.attributes.skinWeight;
13287
+ const e = new At(), t = this.geometry.attributes.skinWeight;
13288
13288
  for (let i = 0, n = t.count; i < n; i++) {
13289
13289
  e.fromBufferAttribute(t, i);
13290
13290
  const r = 1 / e.manhattanLength();
@@ -13324,7 +13324,7 @@ class Qp extends Lt {
13324
13324
  super(), this.isBone = !0, this.type = "Bone";
13325
13325
  }
13326
13326
  }
13327
- class Bn extends ci {
13327
+ class Nn extends ci {
13328
13328
  /**
13329
13329
  * Constructs a new data texture.
13330
13330
  *
@@ -13355,7 +13355,7 @@ class vd {
13355
13355
  * If not provided, these matrices will be computed automatically via {@link Skeleton#calculateInverses}.
13356
13356
  */
13357
13357
  constructor(e = [], t = []) {
13358
- this.uuid = Nn(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.boneTexture = null, this.init();
13358
+ this.uuid = On(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.boneTexture = null, this.init();
13359
13359
  }
13360
13360
  /**
13361
13361
  * Initializes the skeleton. This method gets automatically called by the constructor
@@ -13425,7 +13425,7 @@ class vd {
13425
13425
  e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
13426
13426
  const t = new Float32Array(e * e * 4);
13427
13427
  t.set(this.boneMatrices);
13428
- const i = new Bn(t, e, e, Kt, $i);
13428
+ const i = new Nn(t, e, e, Kt, $i);
13429
13429
  return i.needsUpdate = !0, this.boneMatrices = t, this.boneTexture = i, this;
13430
13430
  }
13431
13431
  /**
@@ -13622,7 +13622,7 @@ class Hs extends Q {
13622
13622
  */
13623
13623
  setMorphAt(e, t) {
13624
13624
  const i = t.morphTargetInfluences, n = i.length + 1;
13625
- this.morphTexture === null && (this.morphTexture = new Bn(new Float32Array(n * this.count), n, this.count, oc, $i));
13625
+ this.morphTexture === null && (this.morphTexture = new Nn(new Float32Array(n * this.count), n, this.count, oc, $i));
13626
13626
  const r = this.morphTexture.source.data.data;
13627
13627
  let a = 0;
13628
13628
  for (let c = 0; c < i.length; c++)
@@ -13901,11 +13901,11 @@ class Oo {
13901
13901
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
13902
13902
  * @return {Frustum} A reference to this frustum.
13903
13903
  */
13904
- setFromProjectionMatrix(e, t = In, i = !1) {
13904
+ setFromProjectionMatrix(e, t = Cn, i = !1) {
13905
13905
  const n = this.planes, r = e.elements, a = r[0], o = r[1], l = r[2], c = r[3], h = r[4], d = r[5], u = r[6], f = r[7], p = r[8], v = r[9], g = r[10], m = r[11], b = r[12], x = r[13], y = r[14], _ = r[15];
13906
13906
  if (n[0].setComponents(c - a, f - h, m - p, _ - b).normalize(), n[1].setComponents(c + a, f + h, m + p, _ + b).normalize(), n[2].setComponents(c + o, f + d, m + v, _ + x).normalize(), n[3].setComponents(c - o, f - d, m - v, _ - x).normalize(), i)
13907
13907
  n[4].setComponents(l, u, g, y).normalize(), n[5].setComponents(c - l, f - u, m - g, _ - y).normalize();
13908
- else if (n[4].setComponents(c - l, f - u, m - g, _ - y).normalize(), t === In)
13908
+ else if (n[4].setComponents(c - l, f - u, m - g, _ - y).normalize(), t === Cn)
13909
13909
  n[5].setComponents(c + l, f + u, m + g, _ + y).normalize();
13910
13910
  else if (t === jl)
13911
13911
  n[5].setComponents(l, u, g, y).normalize();
@@ -13998,7 +13998,7 @@ class jp {
13998
13998
  *
13999
13999
  */
14000
14000
  constructor() {
14001
- this.coordinateSystem = In;
14001
+ this.coordinateSystem = Cn;
14002
14002
  }
14003
14003
  /**
14004
14004
  * Returns `true` if the 3D object's bounding sphere is intersecting any frustum
@@ -14235,19 +14235,19 @@ class Xx extends Q {
14235
14235
  _initMatricesTexture() {
14236
14236
  let e = Math.sqrt(this._maxInstanceCount * 4);
14237
14237
  e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
14238
- const t = new Float32Array(e * e * 4), i = new Bn(t, e, e, Kt, $i);
14238
+ const t = new Float32Array(e * e * 4), i = new Nn(t, e, e, Kt, $i);
14239
14239
  this._matricesTexture = i;
14240
14240
  }
14241
14241
  _initIndirectTexture() {
14242
14242
  let e = Math.sqrt(this._maxInstanceCount);
14243
14243
  e = Math.ceil(e);
14244
- const t = new Uint32Array(e * e), i = new Bn(t, e, e, fd, $n);
14244
+ const t = new Uint32Array(e * e), i = new Nn(t, e, e, fd, $n);
14245
14245
  this._indirectTexture = i;
14246
14246
  }
14247
14247
  _initColorsTexture() {
14248
14248
  let e = Math.sqrt(this._maxInstanceCount);
14249
14249
  e = Math.ceil(e);
14250
- const t = new Float32Array(e * e * 4).fill(1), i = new Bn(t, e, e, Kt, $i);
14250
+ const t = new Float32Array(e * e * 4).fill(1), i = new Nn(t, e, e, Kt, $i);
14251
14251
  i.colorSpace = It.workingColorSpace, this._colorsTexture = i;
14252
14252
  }
14253
14253
  _initializeGeometry(e) {
@@ -16641,7 +16641,7 @@ class tm extends o0 {
16641
16641
  * @param {Array<Vector2>} [points] - An array of 2D points defining the shape.
16642
16642
  */
16643
16643
  constructor(e) {
16644
- super(e), this.uuid = Nn(), this.type = "Shape", this.holes = [];
16644
+ super(e), this.uuid = On(), this.type = "Shape", this.holes = [];
16645
16645
  }
16646
16646
  /**
16647
16647
  * Returns an array representing each contour of the holes
@@ -19049,7 +19049,7 @@ class ad {
19049
19049
  * is blended/combined when two or more animations are simultaneously played.
19050
19050
  */
19051
19051
  constructor(e = "", t = -1, i = [], n = Vp) {
19052
- this.name = e, this.tracks = i, this.duration = t, this.blendMode = n, this.uuid = Nn(), this.userData = {}, this.duration < 0 && this.resetDuration();
19052
+ this.name = e, this.tracks = i, this.duration = t, this.blendMode = n, this.uuid = On(), this.userData = {}, this.duration < 0 && this.resetDuration();
19053
19053
  }
19054
19054
  /**
19055
19055
  * Factory method for creating an animation clip from the given JSON.
@@ -19829,7 +19829,7 @@ class um {
19829
19829
  */
19830
19830
  constructor(e) {
19831
19831
  this.camera = e, this.intensity = 1, this.bias = 0, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new K(512, 512), this.mapType = ys, this.map = null, this.mapPass = null, this.matrix = new Ce(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new Oo(), this._frameExtents = new K(1, 1), this._viewportCount = 1, this._viewports = [
19832
- new Mt(0, 0, 1, 1)
19832
+ new At(0, 0, 1, 1)
19833
19833
  ];
19834
19834
  }
19835
19835
  /**
@@ -20012,17 +20012,17 @@ class eM extends um {
20012
20012
  // Z - Positive z direction
20013
20013
  // z - Negative z direction
20014
20014
  // positive X
20015
- new Mt(2, 1, 1, 1),
20015
+ new At(2, 1, 1, 1),
20016
20016
  // negative X
20017
- new Mt(0, 1, 1, 1),
20017
+ new At(0, 1, 1, 1),
20018
20018
  // positive Z
20019
- new Mt(3, 1, 1, 1),
20019
+ new At(3, 1, 1, 1),
20020
20020
  // negative Z
20021
- new Mt(1, 1, 1, 1),
20021
+ new At(1, 1, 1, 1),
20022
20022
  // positive Y
20023
- new Mt(3, 0, 1, 1),
20023
+ new At(3, 0, 1, 1),
20024
20024
  // negative Y
20025
- new Mt(1, 0, 1, 1)
20025
+ new At(1, 0, 1, 1)
20026
20026
  ], this._cubeDirections = [
20027
20027
  new P(1, 0, 0),
20028
20028
  new P(-1, 0, 0),
@@ -20465,7 +20465,7 @@ class fm extends Qs {
20465
20465
  n.uniforms[r].value = new P().fromArray(a.value);
20466
20466
  break;
20467
20467
  case "v4":
20468
- n.uniforms[r].value = new Mt().fromArray(a.value);
20468
+ n.uniforms[r].value = new At().fromArray(a.value);
20469
20469
  break;
20470
20470
  case "m3":
20471
20471
  n.uniforms[r].value = new yt().fromArray(a.value);
@@ -20849,7 +20849,7 @@ class aM extends Qs {
20849
20849
  const f = [];
20850
20850
  for (let p = 0, v = u.length; p < v; p++) {
20851
20851
  const g = u[p], m = o(g);
20852
- m !== null && (m instanceof HTMLImageElement ? f.push(m) : f.push(new Bn(m.data, m.width, m.height)));
20852
+ m !== null && (m instanceof HTMLImageElement ? f.push(m) : f.push(new Nn(m.data, m.width, m.height)));
20853
20853
  }
20854
20854
  n[d.uuid] = new Kr(f);
20855
20855
  } else {
@@ -20882,7 +20882,7 @@ class aM extends Qs {
20882
20882
  const h = [];
20883
20883
  for (let d = 0, u = c.length; d < u; d++) {
20884
20884
  const f = c[d], p = await r(f);
20885
- p !== null && (p instanceof HTMLImageElement ? h.push(p) : h.push(new Bn(p.data, p.width, p.height)));
20885
+ p !== null && (p instanceof HTMLImageElement ? h.push(p) : h.push(new Nn(p.data, p.width, p.height)));
20886
20886
  }
20887
20887
  i[l.uuid] = new Kr(h);
20888
20888
  } else {
@@ -20904,7 +20904,7 @@ class aM extends Qs {
20904
20904
  o.image === void 0 && Je('ObjectLoader: No "image" specified for', o.uuid), t[o.image] === void 0 && Je("ObjectLoader: Undefined image", o.image);
20905
20905
  const l = t[o.image], c = l.data;
20906
20906
  let h;
20907
- Array.isArray(c) ? (h = new Gp(), c.length === 6 && (h.needsUpdate = !0)) : (c && c.data ? h = new Bn() : h = new ci(), c && (h.needsUpdate = !0)), h.source = l, h.uuid = o.uuid, o.name !== void 0 && (h.name = o.name), o.mapping !== void 0 && (h.mapping = i(o.mapping, oM)), o.channel !== void 0 && (h.channel = o.channel), o.offset !== void 0 && h.offset.fromArray(o.offset), o.repeat !== void 0 && h.repeat.fromArray(o.repeat), o.center !== void 0 && h.center.fromArray(o.center), o.rotation !== void 0 && (h.rotation = o.rotation), o.wrap !== void 0 && (h.wrapS = i(o.wrap[0], v0), h.wrapT = i(o.wrap[1], v0)), o.format !== void 0 && (h.format = o.format), o.internalFormat !== void 0 && (h.internalFormat = o.internalFormat), o.type !== void 0 && (h.type = o.type), o.colorSpace !== void 0 && (h.colorSpace = o.colorSpace), o.minFilter !== void 0 && (h.minFilter = i(o.minFilter, x0)), o.magFilter !== void 0 && (h.magFilter = i(o.magFilter, x0)), o.anisotropy !== void 0 && (h.anisotropy = o.anisotropy), o.flipY !== void 0 && (h.flipY = o.flipY), o.generateMipmaps !== void 0 && (h.generateMipmaps = o.generateMipmaps), o.premultiplyAlpha !== void 0 && (h.premultiplyAlpha = o.premultiplyAlpha), o.unpackAlignment !== void 0 && (h.unpackAlignment = o.unpackAlignment), o.compareFunction !== void 0 && (h.compareFunction = o.compareFunction), o.userData !== void 0 && (h.userData = o.userData), n[o.uuid] = h;
20907
+ Array.isArray(c) ? (h = new Gp(), c.length === 6 && (h.needsUpdate = !0)) : (c && c.data ? h = new Nn() : h = new ci(), c && (h.needsUpdate = !0)), h.source = l, h.uuid = o.uuid, o.name !== void 0 && (h.name = o.name), o.mapping !== void 0 && (h.mapping = i(o.mapping, oM)), o.channel !== void 0 && (h.channel = o.channel), o.offset !== void 0 && h.offset.fromArray(o.offset), o.repeat !== void 0 && h.repeat.fromArray(o.repeat), o.center !== void 0 && h.center.fromArray(o.center), o.rotation !== void 0 && (h.rotation = o.rotation), o.wrap !== void 0 && (h.wrapS = i(o.wrap[0], v0), h.wrapT = i(o.wrap[1], v0)), o.format !== void 0 && (h.format = o.format), o.internalFormat !== void 0 && (h.internalFormat = o.internalFormat), o.type !== void 0 && (h.type = o.type), o.colorSpace !== void 0 && (h.colorSpace = o.colorSpace), o.minFilter !== void 0 && (h.minFilter = i(o.minFilter, x0)), o.magFilter !== void 0 && (h.magFilter = i(o.magFilter, x0)), o.anisotropy !== void 0 && (h.anisotropy = o.anisotropy), o.flipY !== void 0 && (h.flipY = o.flipY), o.generateMipmaps !== void 0 && (h.generateMipmaps = o.generateMipmaps), o.premultiplyAlpha !== void 0 && (h.premultiplyAlpha = o.premultiplyAlpha), o.unpackAlignment !== void 0 && (h.unpackAlignment = o.unpackAlignment), o.compareFunction !== void 0 && (h.compareFunction = o.compareFunction), o.userData !== void 0 && (h.userData = o.userData), n[o.uuid] = h;
20908
20908
  }
20909
20909
  return n;
20910
20910
  }
@@ -22764,13 +22764,13 @@ class AM extends Ii {
22764
22764
  let r, a;
22765
22765
  if (hi.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.camera.reversedDepth === !0)
22766
22766
  r = 1, a = 0;
22767
- else if (this.camera.coordinateSystem === In)
22767
+ else if (this.camera.coordinateSystem === Cn)
22768
22768
  r = -1, a = 1;
22769
22769
  else if (this.camera.coordinateSystem === jl)
22770
22770
  r = 0, a = 1;
22771
22771
  else
22772
22772
  throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: " + this.camera.coordinateSystem);
22773
- fi("c", t, e, hi, 0, 0, r), fi("t", t, e, hi, 0, 0, a), fi("n1", t, e, hi, -i, -n, r), fi("n2", t, e, hi, i, -n, r), fi("n3", t, e, hi, -i, n, r), fi("n4", t, e, hi, i, n, r), fi("f1", t, e, hi, -i, -n, a), fi("f2", t, e, hi, i, -n, a), fi("f3", t, e, hi, -i, n, a), fi("f4", t, e, hi, i, n, a), fi("u1", t, e, hi, i * 0.7, n * 1.1, r), fi("u2", t, e, hi, -i * 0.7, n * 1.1, r), fi("u3", t, e, hi, 0, n * 2, r), fi("cf1", t, e, hi, -i, 0, a), fi("cf2", t, e, hi, i, 0, a), fi("cf3", t, e, hi, 0, -n, a), fi("cf4", t, e, hi, 0, n, a), fi("cn1", t, e, hi, -i, 0, r), fi("cn2", t, e, hi, i, 0, r), fi("cn3", t, e, hi, 0, -n, r), fi("cn4", t, e, hi, 0, n, r), e.getAttribute("position").needsUpdate = !0;
22773
+ pi("c", t, e, hi, 0, 0, r), pi("t", t, e, hi, 0, 0, a), pi("n1", t, e, hi, -i, -n, r), pi("n2", t, e, hi, i, -n, r), pi("n3", t, e, hi, -i, n, r), pi("n4", t, e, hi, i, n, r), pi("f1", t, e, hi, -i, -n, a), pi("f2", t, e, hi, i, -n, a), pi("f3", t, e, hi, -i, n, a), pi("f4", t, e, hi, i, n, a), pi("u1", t, e, hi, i * 0.7, n * 1.1, r), pi("u2", t, e, hi, -i * 0.7, n * 1.1, r), pi("u3", t, e, hi, 0, n * 2, r), pi("cf1", t, e, hi, -i, 0, a), pi("cf2", t, e, hi, i, 0, a), pi("cf3", t, e, hi, 0, -n, a), pi("cf4", t, e, hi, 0, n, a), pi("cn1", t, e, hi, -i, 0, r), pi("cn2", t, e, hi, i, 0, r), pi("cn3", t, e, hi, 0, -n, r), pi("cn4", t, e, hi, 0, n, r), e.getAttribute("position").needsUpdate = !0;
22774
22774
  }
22775
22775
  /**
22776
22776
  * Frees the GPU-related resources allocated by this instance. Call this
@@ -22780,7 +22780,7 @@ class AM extends Ii {
22780
22780
  this.geometry.dispose(), this.material.dispose();
22781
22781
  }
22782
22782
  }
22783
- function fi(s, e, t, i, n, r, a) {
22783
+ function pi(s, e, t, i, n, r, a) {
22784
22784
  sh.set(n, r, a).unproject(i);
22785
22785
  const o = e[s];
22786
22786
  if (o !== void 0) {
@@ -27366,7 +27366,7 @@ function uE(s, e, t, i, n, r, a) {
27366
27366
  uniforms: yo(an.background.uniforms),
27367
27367
  vertexShader: an.background.vertexShader,
27368
27368
  fragmentShader: an.background.fragmentShader,
27369
- side: wn,
27369
+ side: Un,
27370
27370
  depthTest: !1,
27371
27371
  depthWrite: !1,
27372
27372
  fog: !1,
@@ -28635,7 +28635,7 @@ function EE(s) {
28635
28635
  };
28636
28636
  }
28637
28637
  function PE(s, e, t) {
28638
- const i = /* @__PURE__ */ new WeakMap(), n = new Mt();
28638
+ const i = /* @__PURE__ */ new WeakMap(), n = new At();
28639
28639
  function r(a, o, l) {
28640
28640
  const c = a.morphTargetInfluences, h = o.morphAttributes.position || o.morphAttributes.normal || o.morphAttributes.color, d = h !== void 0 ? h.length : 0;
28641
28641
  let u = i.get(o);
@@ -29905,7 +29905,7 @@ function Y2(s, e, t, i, n, r, a) {
29905
29905
  decodeVideoTexture: ht && S.map.isVideoTexture === !0 && It.getTransfer(S.map.colorSpace) === Gt,
29906
29906
  decodeVideoTextureEmissive: ve && S.emissiveMap.isVideoTexture === !0 && It.getTransfer(S.emissiveMap.colorSpace) === Gt,
29907
29907
  premultipliedAlpha: S.premultipliedAlpha,
29908
- doubleSided: S.side === pi,
29908
+ doubleSided: S.side === fi,
29909
29909
  flipSided: S.side === Ki,
29910
29910
  useDepthPacking: S.depthPacking >= 0,
29911
29911
  depthPacking: S.depthPacking || 0,
@@ -30368,7 +30368,7 @@ void main() {
30368
30368
  }`;
30369
30369
  function iP(s, e, t) {
30370
30370
  let i = new Oo();
30371
- const n = new K(), r = new K(), a = new Mt(), o = new dm({ depthPacking: Rx }), l = new tb(), c = {}, h = t.maxTextureSize, d = { [wn]: Ki, [Ki]: wn, [pi]: pi }, u = new mt({
30371
+ const n = new K(), r = new K(), a = new At(), o = new dm({ depthPacking: Rx }), l = new tb(), c = {}, h = t.maxTextureSize, d = { [Un]: Ki, [Ki]: Un, [fi]: fi }, u = new mt({
30372
30372
  defines: {
30373
30373
  VSM_SAMPLES: 8
30374
30374
  },
@@ -30494,9 +30494,9 @@ const nP = {
30494
30494
  function sP(s, e) {
30495
30495
  function t() {
30496
30496
  let V = !1;
30497
- const be = new Mt();
30497
+ const be = new At();
30498
30498
  let Re = null;
30499
- const Le = new Mt(0, 0, 0, 0);
30499
+ const Le = new At(0, 0, 0, 0);
30500
30500
  return {
30501
30501
  setMask: function(_e) {
30502
30502
  Re !== _e && !V && (s.colorMask(_e, _e, _e, _e), Re = _e);
@@ -30609,7 +30609,7 @@ function sP(s, e) {
30609
30609
  const Z = s.getParameter(s.VERSION);
30610
30610
  Z.indexOf("WebGL") !== -1 ? (re = parseFloat(/^WebGL (\d)/.exec(Z)[1]), j = re >= 1) : Z.indexOf("OpenGL ES") !== -1 && (re = parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]), j = re >= 2);
30611
30611
  let ie = null, ue = {};
30612
- const Oe = s.getParameter(s.SCISSOR_BOX), ce = s.getParameter(s.VIEWPORT), Se = new Mt().fromArray(Oe), ct = new Mt().fromArray(ce);
30612
+ const Oe = s.getParameter(s.SCISSOR_BOX), ce = s.getParameter(s.VIEWPORT), Se = new At().fromArray(Oe), ct = new At().fromArray(ce);
30613
30613
  function Fe(V, be, Re, Le) {
30614
30614
  const _e = new Uint8Array(4), le = s.createTexture();
30615
30615
  s.bindTexture(V, le), s.texParameteri(V, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(V, s.TEXTURE_MAG_FILTER, s.NEAREST);
@@ -30718,7 +30718,7 @@ function sP(s, e) {
30718
30718
  _e = _e || be, le = le || Re, Ze = Ze || Le, (be !== m || _e !== y) && (s.blendEquationSeparate(gt[be], gt[_e]), m = be, y = _e), (Re !== b || Le !== x || le !== _ || Ze !== w) && (s.blendFuncSeparate(it[Re], it[Le], it[le], it[Ze]), b = Re, x = Le, _ = le, w = Ze), (lt.equals(T) === !1 || Ot !== E) && (s.blendColor(lt.r, lt.g, lt.b, Ot), T.copy(lt), E = Ot), g = V, S = !1;
30719
30719
  }
30720
30720
  function B(V, be) {
30721
- V.side === pi ? Te(s.CULL_FACE) : ee(s.CULL_FACE);
30721
+ V.side === fi ? Te(s.CULL_FACE) : ee(s.CULL_FACE);
30722
30722
  let Re = V.side === Ki;
30723
30723
  be && (Re = !Re), he(Re), V.blending === ho && V.transparent === !1 ? de($t) : de(V.blending, V.blendEquation, V.blendSrc, V.blendDst, V.blendEquationAlpha, V.blendSrcAlpha, V.blendDstAlpha, V.blendColor, V.blendAlpha, V.premultipliedAlpha), a.setFunc(V.depthFunc), a.setTest(V.depthTest), a.setMask(V.depthWrite), r.setMask(V.colorWrite);
30724
30724
  const Le = V.stencilWrite;
@@ -31724,9 +31724,9 @@ class hP extends Ws {
31724
31724
  const _ = [], w = [], T = new K();
31725
31725
  let E = null;
31726
31726
  const S = new xi();
31727
- S.viewport = new Mt();
31727
+ S.viewport = new At();
31728
31728
  const M = new xi();
31729
- M.viewport = new Mt();
31729
+ M.viewport = new At();
31730
31730
  const C = [S, M], L = new cM();
31731
31731
  let U = null, z = null;
31732
31732
  this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(ne) {
@@ -31916,7 +31916,7 @@ class hP extends Ws {
31916
31916
  ), e.setRenderTarget(y));
31917
31917
  }
31918
31918
  let he = C[it];
31919
- he === void 0 && (he = new xi(), he.layers.enable(it), he.viewport = new Mt(), C[it] = he), he.matrix.fromArray(de.transform.matrix), he.matrix.decompose(he.position, he.quaternion, he.scale), he.projectionMatrix.fromArray(de.projectionMatrix), he.projectionMatrixInverse.copy(he.projectionMatrix).invert(), he.viewport.set(B.x, B.y, B.width, B.height), it === 0 && (L.matrix.copy(he.matrix), L.matrix.decompose(L.position, L.quaternion, L.scale)), Xe === !0 && L.cameras.push(he);
31919
+ he === void 0 && (he = new xi(), he.layers.enable(it), he.viewport = new At(), C[it] = he), he.matrix.fromArray(de.transform.matrix), he.matrix.decompose(he.position, he.quaternion, he.scale), he.projectionMatrix.fromArray(de.projectionMatrix), he.projectionMatrixInverse.copy(he.projectionMatrix).invert(), he.viewport.set(B.x, B.y, B.width, B.height), it === 0 && (L.matrix.copy(he.matrix), L.matrix.decompose(L.position, L.quaternion, L.scale)), Xe === !0 && L.cameras.push(he);
31920
31920
  }
31921
31921
  const Ge = n.enabledFeatures;
31922
31922
  if (Ge && Ge.includes("depth-sensing") && n.depthUsage == "gpu-optimized" && v) {
@@ -34158,7 +34158,7 @@ const pP = new Uint16Array([
34158
34158
  ]);
34159
34159
  let Rs = null;
34160
34160
  function mP() {
34161
- return Rs === null && (Rs = new Bn(pP, 32, 32, Fp, Ht), Rs.minFilter = jt, Rs.magFilter = jt, Rs.wrapS = Zn, Rs.wrapT = Zn, Rs.generateMipmaps = !1, Rs.needsUpdate = !0), Rs;
34161
+ return Rs === null && (Rs = new Nn(pP, 32, 32, Fp, Ht), Rs.minFilter = jt, Rs.magFilter = jt, Rs.wrapS = Zn, Rs.wrapT = Zn, Rs.generateMipmaps = !1, Rs.needsUpdate = !0), Rs;
34162
34162
  }
34163
34163
  class vb {
34164
34164
  /**
@@ -34218,15 +34218,15 @@ class vb {
34218
34218
  let T = !1;
34219
34219
  this._outputColorSpace = Pi;
34220
34220
  let E = 0, S = 0, M = null, C = -1, L = null;
34221
- const U = new Mt(), z = new Mt();
34221
+ const U = new At(), z = new At();
34222
34222
  let X = null;
34223
34223
  const j = new Ie(0);
34224
34224
  let re = 0, Z = t.width, ie = t.height, ue = 1, Oe = null, ce = null;
34225
- const Se = new Mt(0, 0, Z, ie), ct = new Mt(0, 0, Z, ie);
34225
+ const Se = new At(0, 0, Z, ie), ct = new At(0, 0, Z, ie);
34226
34226
  let Fe = !1;
34227
34227
  const ne = new Oo();
34228
34228
  let ee = !1, Te = !1;
34229
- const Xe = new Ce(), Ge = new P(), ht = new Mt(), gt = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
34229
+ const Xe = new Ce(), Ge = new P(), ht = new At(), gt = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
34230
34230
  let it = !1;
34231
34231
  function de() {
34232
34232
  return M === null ? ue : 1;
@@ -34404,7 +34404,7 @@ class vb {
34404
34404
  zt.render(at, Nt);
34405
34405
  };
34406
34406
  function mi(D, Y, $) {
34407
- D.transparent === !0 && D.side === pi && D.forceSinglePass === !1 ? (D.side = Ki, D.needsUpdate = !0, F(D, Y, $), D.side = wn, D.needsUpdate = !0, F(D, Y, $), D.side = pi) : F(D, Y, $);
34407
+ D.transparent === !0 && D.side === fi && D.forceSinglePass === !1 ? (D.side = Ki, D.needsUpdate = !0, F(D, Y, $), D.side = Un, D.needsUpdate = !0, F(D, Y, $), D.side = fi) : F(D, Y, $);
34408
34408
  }
34409
34409
  this.compile = function(D, Y, $ = null) {
34410
34410
  $ === null && ($ = D), x = Ke.get($), x.init(Y), _.push(x), $.traverseVisible(function(W) {
@@ -34461,7 +34461,7 @@ class vb {
34461
34461
  }
34462
34462
  if (T === !0)
34463
34463
  return;
34464
- if (D.matrixWorldAutoUpdate === !0 && D.updateMatrixWorld(), Y.parent === null && Y.matrixWorldAutoUpdate === !0 && Y.updateMatrixWorld(), Le.enabled === !0 && Le.isPresenting === !0 && (Le.cameraAutoUpdate === !0 && Le.updateCamera(Y), Y = Le.getCamera()), D.isScene === !0 && D.onBeforeRender(w, D, Y, M), x = Ke.get(D, _.length), x.init(Y), _.push(x), Xe.multiplyMatrices(Y.projectionMatrix, Y.matrixWorldInverse), ne.setFromProjectionMatrix(Xe, In, Y.reversedDepth), Te = this.localClippingEnabled, ee = We.init(this.clippingPlanes, Te), b = Ne.get(D, y.length), b.init(), y.push(b), Le.enabled === !0 && Le.isPresenting === !0) {
34464
+ if (D.matrixWorldAutoUpdate === !0 && D.updateMatrixWorld(), Y.parent === null && Y.matrixWorldAutoUpdate === !0 && Y.updateMatrixWorld(), Le.enabled === !0 && Le.isPresenting === !0 && (Le.cameraAutoUpdate === !0 && Le.updateCamera(Y), Y = Le.getCamera()), D.isScene === !0 && D.onBeforeRender(w, D, Y, M), x = Ke.get(D, _.length), x.init(Y), _.push(x), Xe.multiplyMatrices(Y.projectionMatrix, Y.matrixWorldInverse), ne.setFromProjectionMatrix(Xe, Cn, Y.reversedDepth), Te = this.localClippingEnabled, ee = We.init(this.clippingPlanes, Te), b = Ne.get(D, y.length), b.init(), y.push(b), Le.enabled === !0 && Le.isPresenting === !0) {
34465
34465
  const xe = w.xr.getDepthSensingMesh();
34466
34466
  xe !== null && Ss(xe, Y, -1 / 0, w.sortObjects);
34467
34467
  }
@@ -34545,7 +34545,7 @@ class vb {
34545
34545
  let at = !1;
34546
34546
  for (let wt = 0, Nt = Y.length; wt < Nt; wt++) {
34547
34547
  const Yt = Y[wt], { object: zt, geometry: tt, material: si, group: Bt } = Yt;
34548
- if (si.side === pi && zt.layers.test(G.layers)) {
34548
+ if (si.side === fi && zt.layers.test(G.layers)) {
34549
34549
  const un = si.side;
34550
34550
  si.side = Ki, si.needsUpdate = !0, O(zt, $, G, tt, si, Bt), si.side = un, si.needsUpdate = !0, at = !0;
34551
34551
  }
@@ -34563,7 +34563,7 @@ class vb {
34563
34563
  }
34564
34564
  }
34565
34565
  function O(D, Y, $, G, W, xe) {
34566
- D.onBeforeRender(w, Y, $, G, W, xe), D.modelViewMatrix.multiplyMatrices($.matrixWorldInverse, D.matrixWorld), D.normalMatrix.getNormalMatrix(D.modelViewMatrix), W.onBeforeRender(w, Y, $, G, D, xe), W.transparent === !0 && W.side === pi && W.forceSinglePass === !1 ? (W.side = Ki, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = wn, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = pi) : w.renderBufferDirect($, Y, G, W, D, xe), D.onAfterRender(w, Y, $, G, W, xe);
34566
+ D.onBeforeRender(w, Y, $, G, W, xe), D.modelViewMatrix.multiplyMatrices($.matrixWorldInverse, D.matrixWorld), D.normalMatrix.getNormalMatrix(D.modelViewMatrix), W.onBeforeRender(w, Y, $, G, D, xe), W.transparent === !0 && W.side === fi && W.forceSinglePass === !1 ? (W.side = Ki, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = Un, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = fi) : w.renderBufferDirect($, Y, G, W, D, xe), D.onAfterRender(w, Y, $, G, W, xe);
34567
34567
  }
34568
34568
  function F(D, Y, $) {
34569
34569
  Y.isScene !== !0 && (Y = gt);
@@ -34621,8 +34621,8 @@ class vb {
34621
34621
  Yi && (Yi.boneTexture === null && Yi.computeBoneTexture(), ri.setValue(B, "boneTexture", Yi.boneTexture, ke));
34622
34622
  }
34623
34623
  W.isBatchedMesh && (ri.setOptional(B, W, "batchingTexture"), ri.setValue(B, "batchingTexture", W._matricesTexture, ke), ri.setOptional(B, W, "batchingIdTexture"), ri.setValue(B, "batchingIdTexture", W._indirectTexture, ke), ri.setOptional(B, W, "batchingColorTexture"), W._colorsTexture !== null && ri.setValue(B, "batchingColorTexture", W._colorsTexture, ke));
34624
- const Sn = $.morphAttributes;
34625
- if ((Sn.position !== void 0 || Sn.normal !== void 0 || Sn.color !== void 0) && rt.update(W, $, un), (fn || tt.receiveShadow !== W.receiveShadow) && (tt.receiveShadow = W.receiveShadow, ri.setValue(B, "receiveShadow", W.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (tn.envMap.value = Ue, tn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && Y.environment !== null && (tn.envMapIntensity.value = Y.environmentIntensity), tn.dfgLUT !== void 0 && (tn.dfgLUT.value = mP()), fn && (ri.setValue(B, "toneMappingExposure", w.toneMappingExposure), tt.needsLights && we(tn, Fo), xe && G.fog === !0 && $e.refreshFogUniforms(tn, xe), $e.refreshMaterialUniforms(tn, G, ue, ie, x.state.transmissionRenderTarget[D.id]), Hh.upload(B, q(tt), tn, ke)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Hh.upload(B, q(tt), tn, ke), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && ri.setValue(B, "center", W.center), ri.setValue(B, "modelViewMatrix", W.modelViewMatrix), ri.setValue(B, "normalMatrix", W.normalMatrix), ri.setValue(B, "modelMatrix", W.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
34624
+ const wn = $.morphAttributes;
34625
+ if ((wn.position !== void 0 || wn.normal !== void 0 || wn.color !== void 0) && rt.update(W, $, un), (fn || tt.receiveShadow !== W.receiveShadow) && (tt.receiveShadow = W.receiveShadow, ri.setValue(B, "receiveShadow", W.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (tn.envMap.value = Ue, tn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && Y.environment !== null && (tn.envMapIntensity.value = Y.environmentIntensity), tn.dfgLUT !== void 0 && (tn.dfgLUT.value = mP()), fn && (ri.setValue(B, "toneMappingExposure", w.toneMappingExposure), tt.needsLights && we(tn, Fo), xe && G.fog === !0 && $e.refreshFogUniforms(tn, xe), $e.refreshMaterialUniforms(tn, G, ue, ie, x.state.transmissionRenderTarget[D.id]), Hh.upload(B, q(tt), tn, ke)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Hh.upload(B, q(tt), tn, ke), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && ri.setValue(B, "center", W.center), ri.setValue(B, "modelViewMatrix", W.modelViewMatrix), ri.setValue(B, "normalMatrix", W.normalMatrix), ri.setValue(B, "modelMatrix", W.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
34626
34626
  const Yi = G.uniformsGroups;
34627
34627
  for (let nn = 0, Cd = Yi.length; nn < Cd; nn++) {
34628
34628
  const Cr = Yi[nn];
@@ -34746,8 +34746,8 @@ class vb {
34746
34746
  if ($ !== null)
34747
34747
  ye = $.max.x - $.min.x, He = $.max.y - $.min.y, Ue = $.isBox3 ? $.max.z - $.min.z : 1, qe = $.min.x, ze = $.min.y, je = $.isBox3 ? $.min.z : 0;
34748
34748
  else {
34749
- const Sn = Math.pow(2, -W);
34750
- ye = Math.floor(Yt.width * Sn), He = Math.floor(Yt.height * Sn), D.isDataArrayTexture ? Ue = Yt.depth : D.isData3DTexture ? Ue = Math.floor(Yt.depth * Sn) : Ue = 1, qe = 0, ze = 0, je = 0;
34749
+ const wn = Math.pow(2, -W);
34750
+ ye = Math.floor(Yt.width * wn), He = Math.floor(Yt.height * wn), D.isDataArrayTexture ? Ue = Yt.depth : D.isData3DTexture ? Ue = Math.floor(Yt.depth * wn) : Ue = 1, qe = 0, ze = 0, je = 0;
34751
34751
  }
34752
34752
  G !== null ? (at = G.x, wt = G.y, Nt = G.z) : (at = 0, wt = 0, Nt = 0);
34753
34753
  const zt = st.convert(Y.format), tt = st.convert(Y.type);
@@ -34757,16 +34757,16 @@ class vb {
34757
34757
  B.pixelStorei(B.UNPACK_ROW_LENGTH, Yt.width), B.pixelStorei(B.UNPACK_IMAGE_HEIGHT, Yt.height), B.pixelStorei(B.UNPACK_SKIP_PIXELS, qe), B.pixelStorei(B.UNPACK_SKIP_ROWS, ze), B.pixelStorei(B.UNPACK_SKIP_IMAGES, je);
34758
34758
  const ri = D.isDataArrayTexture || D.isData3DTexture, tn = Y.isDataArrayTexture || Y.isData3DTexture;
34759
34759
  if (D.isDepthTexture) {
34760
- const Sn = fe.get(D), Yi = fe.get(Y), nn = fe.get(Sn.__renderTarget), Cd = fe.get(Yi.__renderTarget);
34760
+ const wn = fe.get(D), Yi = fe.get(Y), nn = fe.get(wn.__renderTarget), Cd = fe.get(Yi.__renderTarget);
34761
34761
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, nn.__webglFramebuffer), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, Cd.__webglFramebuffer);
34762
34762
  for (let Cr = 0; Cr < Ue; Cr++)
34763
34763
  ri && (B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, fe.get(D).__webglTexture, W, je + Cr), B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, fe.get(Y).__webglTexture, xe, Nt + Cr)), B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.DEPTH_BUFFER_BIT, B.NEAREST);
34764
34764
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, null), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, null);
34765
34765
  } else if (W !== 0 || D.isRenderTargetTexture || fe.has(D)) {
34766
- const Sn = fe.get(D), Yi = fe.get(Y);
34766
+ const wn = fe.get(D), Yi = fe.get(Y);
34767
34767
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, Be), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, xt);
34768
34768
  for (let nn = 0; nn < Ue; nn++)
34769
- ri ? B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, Sn.__webglTexture, W, je + nn) : B.framebufferTexture2D(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, Sn.__webglTexture, W), tn ? B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, Yi.__webglTexture, xe, Nt + nn) : B.framebufferTexture2D(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, Yi.__webglTexture, xe), W !== 0 ? B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.COLOR_BUFFER_BIT, B.NEAREST) : tn ? B.copyTexSubImage3D(si, xe, at, wt, Nt + nn, qe, ze, ye, He) : B.copyTexSubImage2D(si, xe, at, wt, qe, ze, ye, He);
34769
+ ri ? B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, wn.__webglTexture, W, je + nn) : B.framebufferTexture2D(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, wn.__webglTexture, W), tn ? B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, Yi.__webglTexture, xe, Nt + nn) : B.framebufferTexture2D(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, Yi.__webglTexture, xe), W !== 0 ? B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.COLOR_BUFFER_BIT, B.NEAREST) : tn ? B.copyTexSubImage3D(si, xe, at, wt, Nt + nn, qe, ze, ye, He) : B.copyTexSubImage2D(si, xe, at, wt, qe, ze, ye, He);
34770
34770
  ve.bindFramebuffer(B.READ_FRAMEBUFFER, null), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, null);
34771
34771
  } else
34772
34772
  tn ? D.isDataTexture || D.isData3DTexture ? B.texSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, tt, Yt.data) : Y.isCompressedArrayTexture ? B.compressedTexSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, Yt.data) : B.texSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, tt, Yt) : D.isDataTexture ? B.texSubImage2D(B.TEXTURE_2D, xe, at, wt, ye, He, zt, tt, Yt.data) : D.isCompressedTexture ? B.compressedTexSubImage2D(B.TEXTURE_2D, xe, at, wt, Yt.width, Yt.height, zt, Yt.data) : B.texSubImage2D(B.TEXTURE_2D, xe, at, wt, ye, He, zt, tt, Yt);
@@ -34789,7 +34789,7 @@ class vb {
34789
34789
  * @readonly
34790
34790
  */
34791
34791
  get coordinateSystem() {
34792
- return In;
34792
+ return Cn;
34793
34793
  }
34794
34794
  /**
34795
34795
  * Defines the output color space of the renderer.
@@ -34809,7 +34809,7 @@ class vb {
34809
34809
  const gP = {
34810
34810
  Vector2: K,
34811
34811
  Vector3: P,
34812
- Vector4: Mt,
34812
+ Vector4: At,
34813
34813
  Quaternion: ui,
34814
34814
  Matrix4: Ce,
34815
34815
  Spherical: db,
@@ -34821,7 +34821,7 @@ const gP = {
34821
34821
  Vs.install({ THREE: gP });
34822
34822
  class vP {
34823
34823
  constructor(e) {
34824
- this.viralViewerApi = e, this.raycaster = new _d(), this.camera = null, this._orthoCamera = null, this._perspectiveCamera = null, this._frustumSize = 200, this.cameraControls = null, this.onUsing = !1, this.modelId = "0", this.elementId = "243274", this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.cameraUpdateQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.emit(At.LOADED_CAMERA);
34824
+ this.viralViewerApi = e, this.raycaster = new _d(), this.camera = null, this._orthoCamera = null, this._perspectiveCamera = null, this._frustumSize = 200, this.cameraControls = null, this.onUsing = !1, this.modelId = "0", this.elementId = "243274", this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.cameraUpdateQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.emit(Mt.LOADED_CAMERA);
34825
34825
  }
34826
34826
  setupCamera() {
34827
34827
  this._perspectiveCamera = new xi(
@@ -35304,7 +35304,7 @@ class yP {
35304
35304
  let d = null, u = null, f = null, p = null;
35305
35305
  for (let E = 0; E < a.count; E++) {
35306
35306
  const S = new P().fromBufferAttribute(a, E);
35307
- o && (u = new K().fromBufferAttribute(o, E)), l && (f = new P().fromBufferAttribute(l, E)), c && (d = new Mt().fromBufferAttribute(c, E)), h && (p = new Ie().fromBufferAttribute(h, E));
35307
+ o && (u = new K().fromBufferAttribute(o, E)), l && (f = new P().fromBufferAttribute(l, E)), c && (d = new At().fromBufferAttribute(c, E)), h && (p = new Ie().fromBufferAttribute(h, E));
35308
35308
  const M = new TP(S, u, f, d, p);
35309
35309
  n.push(M);
35310
35310
  }
@@ -36235,7 +36235,7 @@ class NP extends Q {
36235
36235
  constructor() {
36236
36236
  super(
36237
36237
  new ii(1e5, 1e5, 2, 2),
36238
- new Ri({ visible: !1, wireframe: !0, side: pi, transparent: !0, opacity: 0.1, toneMapped: !1 })
36238
+ new Ri({ visible: !1, wireframe: !0, side: fi, transparent: !0, opacity: 0.1, toneMapped: !1 })
36239
36239
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
36240
36240
  }
36241
36241
  updateMatrixWorld(e) {
@@ -37011,7 +37011,7 @@ class bb extends mt {
37011
37011
  this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
37012
37012
  }
37013
37013
  }
37014
- const Xu = new Mt(), sv = new P(), rv = new P(), Oi = new Mt(), Ni = new Mt(), cs = new Mt(), Hu = new P(), Yu = new Ce(), Fi = new _s(), av = new P(), uh = new ut(), fh = new ni(), hs = new Mt();
37014
+ const Xu = new At(), sv = new P(), rv = new P(), Oi = new At(), Ni = new At(), cs = new At(), Hu = new P(), Yu = new Ce(), Fi = new _s(), av = new P(), uh = new ut(), fh = new ni(), hs = new At();
37015
37015
  let ms, sa;
37016
37016
  function ov(s, e, t) {
37017
37017
  return hs.set(0, 0, -e, 1).applyMatrix4(s.projectionMatrix), hs.multiplyScalar(1 / hs.w), hs.x = sa / t.width, hs.y = sa / t.height, hs.applyMatrix4(s.projectionMatrixInverse), hs.multiplyScalar(1 / hs.w), Math.abs(Math.max(hs.x, hs.y));
@@ -37715,7 +37715,7 @@ class aC {
37715
37715
  return null;
37716
37716
  const n = t.meshes[i.mesh];
37717
37717
  for (const c of n.primitives)
37718
- if (c.mode !== En.TRIANGLES && c.mode !== En.TRIANGLE_STRIP && c.mode !== En.TRIANGLE_FAN && c.mode !== void 0)
37718
+ if (c.mode !== Tn.TRIANGLES && c.mode !== Tn.TRIANGLE_STRIP && c.mode !== Tn.TRIANGLE_FAN && c.mode !== void 0)
37719
37719
  return null;
37720
37720
  const a = i.extensions[this.name].attributes, o = [], l = {};
37721
37721
  for (const c in a)
@@ -37841,7 +37841,7 @@ class uC extends _b {
37841
37841
  return dC.fromArray(r).normalize().toArray(r), r;
37842
37842
  }
37843
37843
  }
37844
- const En = {
37844
+ const Tn = {
37845
37845
  FLOAT: 5126,
37846
37846
  //FLOAT_MAT2: 35674,
37847
37847
  FLOAT_MAT3: 35675,
@@ -37922,7 +37922,7 @@ function pC(s) {
37922
37922
  roughness: 1,
37923
37923
  transparent: !1,
37924
37924
  depthTest: !0,
37925
- side: wn
37925
+ side: Un
37926
37926
  })), s.DefaultMaterial;
37927
37927
  }
37928
37928
  function Vr(s, e, t) {
@@ -38434,7 +38434,7 @@ class yC {
38434
38434
  return u.extendMaterialParams && u.extendMaterialParams(e, o);
38435
38435
  })));
38436
38436
  }
38437
- r.doubleSided === !0 && (o.side = pi);
38437
+ r.doubleSided === !0 && (o.side = fi);
38438
38438
  const h = r.alphaMode || Wu.OPAQUE;
38439
38439
  if (h === Wu.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, h === Wu.MASK && (o.alphaTest = r.alphaCutoff !== void 0 ? r.alphaCutoff : 0.5)), r.normalTexture !== void 0 && a !== Ri && (c.push(t.assignTexture(o, "normalMap", r.normalTexture)), o.normalScale = new K(1, 1), r.normalTexture.scale !== void 0)) {
38440
38440
  const d = r.normalTexture.scale;
@@ -38507,15 +38507,15 @@ class yC {
38507
38507
  const v = h[f], g = a[f];
38508
38508
  let m;
38509
38509
  const b = c[f];
38510
- if (g.mode === En.TRIANGLES || g.mode === En.TRIANGLE_STRIP || g.mode === En.TRIANGLE_FAN || g.mode === void 0)
38511
- m = r.isSkinnedMesh === !0 ? new Vx(v, b) : new Q(v, b), m.isSkinnedMesh === !0 && m.normalizeSkinWeights(), g.mode === En.TRIANGLE_STRIP ? m.geometry = W0(m.geometry, Ix) : g.mode === En.TRIANGLE_FAN && (m.geometry = W0(m.geometry, Kf));
38512
- else if (g.mode === En.LINES)
38510
+ if (g.mode === Tn.TRIANGLES || g.mode === Tn.TRIANGLE_STRIP || g.mode === Tn.TRIANGLE_FAN || g.mode === void 0)
38511
+ m = r.isSkinnedMesh === !0 ? new Vx(v, b) : new Q(v, b), m.isSkinnedMesh === !0 && m.normalizeSkinWeights(), g.mode === Tn.TRIANGLE_STRIP ? m.geometry = W0(m.geometry, Ix) : g.mode === Tn.TRIANGLE_FAN && (m.geometry = W0(m.geometry, Kf));
38512
+ else if (g.mode === Tn.LINES)
38513
38513
  m = new Ii(v, b);
38514
- else if (g.mode === En.LINE_STRIP)
38514
+ else if (g.mode === Tn.LINE_STRIP)
38515
38515
  m = new Hi(v, b);
38516
- else if (g.mode === En.LINE_LOOP)
38516
+ else if (g.mode === Tn.LINE_LOOP)
38517
38517
  m = new Hx(v, b);
38518
- else if (g.mode === En.POINTS)
38518
+ else if (g.mode === Tn.POINTS)
38519
38519
  m = new _o(v, b);
38520
38520
  else
38521
38521
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + g.mode);
@@ -39308,7 +39308,7 @@ class mr extends zn {
39308
39308
  constructor(e, t, i, n) {
39309
39309
  super(), this.renderScene = t, this.renderCamera = i, this.selectedObjects = n !== void 0 ? n : [], this.visibleEdgeColor = new Ie(1, 1, 1), this.hiddenEdgeColor = new Ie(0.1, 0.04, 0.02), this.edgeGlow = 0, this.usePatternTexture = !1, this.patternTexture = null, this.edgeThickness = 1, this.edgeStrength = 3, this.downSampleRatio = 2, this.pulsePeriod = 0, this._visibilityCache = /* @__PURE__ */ new Map(), this._selectionCache = /* @__PURE__ */ new Set(), this.resolution = e !== void 0 ? new K(e.x, e.y) : new K(256, 256);
39310
39310
  const r = Math.round(this.resolution.x / this.downSampleRatio), a = Math.round(this.resolution.y / this.downSampleRatio);
39311
- this.renderTargetMaskBuffer = new Tt(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new dm(), this.depthMaterial.side = pi, this.depthMaterial.depthPacking = Rx, this.depthMaterial.blending = $t, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = pi, this.prepareMaskMaterial.fragmentShader = h(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new Tt(this.resolution.x, this.resolution.y, { type: Ht }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new Tt(r, a, { type: Ht }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1;
39311
+ this.renderTargetMaskBuffer = new Tt(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new dm(), this.depthMaterial.side = fi, this.depthMaterial.depthPacking = Rx, this.depthMaterial.blending = $t, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = fi, this.prepareMaskMaterial.fragmentShader = h(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new Tt(this.resolution.x, this.resolution.y, { type: Ht }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new Tt(r, a, { type: Ht }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1;
39312
39312
  const o = 4, l = 4;
39313
39313
  this.separableBlurMaterial1 = this._getSeparableBlurMaterial(o), this.separableBlurMaterial1.uniforms.texSize.value.set(r, a), this.separableBlurMaterial1.uniforms.kernelRadius.value = 1, this.separableBlurMaterial2 = this._getSeparableBlurMaterial(l), this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(r / 2), Math.round(a / 2)), this.separableBlurMaterial2.uniforms.kernelRadius.value = l, this.overlayMaterial = this._getOverlayMaterial();
39314
39314
  const c = Kn;
@@ -41217,7 +41217,7 @@ class qn extends zn {
41217
41217
  const o = Math.random() * 2 - 1, l = Math.random() * 2 - 1, c = 0;
41218
41218
  r[a] = i.noise3d(o, l, c);
41219
41219
  }
41220
- this.noiseTexture = new Bn(r, 4, 4, oc, $i), this.noiseTexture.wrapS = Jn, this.noiseTexture.wrapT = Jn, this.noiseTexture.needsUpdate = !0;
41220
+ this.noiseTexture = new Nn(r, 4, 4, oc, $i), this.noiseTexture.wrapS = Jn, this.noiseTexture.wrapT = Jn, this.noiseTexture.needsUpdate = !0;
41221
41221
  }
41222
41222
  _overrideVisibility() {
41223
41223
  const e = this.scene, t = this._visibilityCache;
@@ -42021,44 +42021,13 @@ class Fn extends Q {
42021
42021
  * Select elements (highlights them with accent color)
42022
42022
  */
42023
42023
  select(e, t = []) {
42024
- this.unselect();
42025
- const i = [];
42026
- e.forEach((n) => {
42027
- if (this._isolatingElements.length === 0) {
42028
- this._selectedElements.push(n), i.push(n);
42029
- return;
42030
- }
42031
- this._isolatingElements.length > 0 && this._isolatingElements.find(
42032
- (r) => r.elementId == n.elementId && r.modelId == n.modelId
42033
- ) && (this._selectedElements.push(n), i.push(n));
42034
- }), this.changeColor(i, OC);
42024
+ this._selectedElements = e, this.resetColor(null), this.changeColor(this._selectedElements, OC);
42035
42025
  }
42036
42026
  get selectedElements() {
42037
42027
  return this._selectedElements;
42038
42028
  }
42039
42029
  unselect() {
42040
- var e;
42041
- if (this._selectedElements.length !== 0) {
42042
- if (this._colors && this._originalColor) {
42043
- const { r: t, g: i, b: n } = this._originalColor, r = new Set(
42044
- this._hidingElements.map((o) => `${o.modelId}:${o.elementId}`)
42045
- );
42046
- for (const { modelId: o, elementId: l } of this._selectedElements) {
42047
- if (r.has(`${o}:${l}`))
42048
- continue;
42049
- const c = (e = this._elementMap.get(o)) == null ? void 0 : e.get(l);
42050
- if (c)
42051
- for (const h of c) {
42052
- const d = h.start * 4, u = d + h.count * 4;
42053
- for (let f = d; f < u; f += 4)
42054
- this._colors[f] = t, this._colors[f + 1] = i, this._colors[f + 2] = n, this._colors[f + 3] = 1;
42055
- }
42056
- }
42057
- const a = this.geometry.getAttribute("color");
42058
- a.needsUpdate = !0;
42059
- }
42060
- this._selectedElements = [];
42061
- }
42030
+ this._selectedElements.length !== 0 && (this.resetColor(null), this._selectedElements = []);
42062
42031
  }
42063
42032
  //#endregion
42064
42033
  //#region Hide/Isolate/Show
@@ -42587,7 +42556,7 @@ class Fn extends Q {
42587
42556
  */
42588
42557
  async createSimplifiedLODs(e) {
42589
42558
  var n, r;
42590
- const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-keNCYakv.mjs"), i = [this];
42559
+ const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-Dg6taIi9.mjs"), i = [this];
42591
42560
  console.log(
42592
42561
  `🔨 Creating ${e.length} LOD levels for batched mesh...`
42593
42562
  );
@@ -42631,7 +42600,7 @@ class Fn extends Q {
42631
42600
  * ```
42632
42601
  */
42633
42602
  async createSimplifiedLODFast(e) {
42634
- const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-keNCYakv.mjs");
42603
+ const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-Dg6taIi9.mjs");
42635
42604
  return t(this, e);
42636
42605
  }
42637
42606
  /**
@@ -42767,13 +42736,10 @@ const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
42767
42736
  }
42768
42737
  //#region Selection and Color Control
42769
42738
  select(e, t = []) {
42770
- this.unselect(), e.forEach((i) => {
42771
- var r;
42772
- ((r = this._elementMap.get(i.modelId)) == null ? void 0 : r.get(i.elementId)) && this._selectedElements.push(i);
42773
- }), this.changeColor(e, NC);
42739
+ this._selectedElements = e, this.resetColor(null), this.changeColor(this._selectedElements, NC);
42774
42740
  }
42775
42741
  unselect() {
42776
- this._selectedElements.length > 0 && (this.resetElementOpacity(), this._selectedElements = []);
42742
+ this._selectedElements.length > 0 && (this.resetColor(null), this._selectedElements = []);
42777
42743
  }
42778
42744
  changeColor(e, t) {
42779
42745
  e.forEach(({ modelId: i, elementId: n }) => {
@@ -42850,7 +42816,7 @@ const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
42850
42816
  Ol.ZERO_MATRIX
42851
42817
  ), o.instanceMatrix.needsUpdate = !0;
42852
42818
  });
42853
- }), this.hideEdge(t));
42819
+ }));
42854
42820
  }
42855
42821
  /**
42856
42822
  * Isolate elements - show ONLY these elements, hide everything else
@@ -44059,9 +44025,9 @@ class FC extends Q {
44059
44025
  */
44060
44026
  setElementGhost(e, t = 0.1) {
44061
44027
  this._batchedMeshes.forEach((i) => {
44062
- i.setElementGhost(e, t);
44028
+ i.setElementGhost(e, t, !0);
44063
44029
  }), this._instancedMeshes.forEach((i) => {
44064
- i.setElementGhost(e, t);
44030
+ i.setElementGhost(e, t / 10, !0);
44065
44031
  });
44066
44032
  }
44067
44033
  /**
@@ -44073,7 +44039,7 @@ class FC extends Q {
44073
44039
  this._batchedMeshes.forEach((i) => {
44074
44040
  i.ghostExcept(e, t);
44075
44041
  }), this._instancedMeshes.forEach((i) => {
44076
- i.ghostExcept(e, t);
44042
+ i.ghostExcept(e, t / 10);
44077
44043
  });
44078
44044
  }
44079
44045
  /**
@@ -44331,8 +44297,8 @@ class kC {
44331
44297
  this.viralViewerApi = e, this.scene = new lc(), this.objects = [], this.models = [], this.mainModels = [], this.isolateModel = new Q(), this.mergedModel = new FC(), this.outlineModel = new Q(), this.hideables = [], this.selectables = [], this.edges = [], this.sunLight = null, this.lights = [], this.transformControls = null, this.lightHelpers = [], this.fullScreenQuadMaterial = new Ri({
44332
44298
  map: null,
44333
44299
  // Use the render target's texture
44334
- side: pi
44335
- }), this.fullScreenQuad = null, this.viralViewerApi.emit(At.LOADED_SCENE), this.isolateModel.name = Qr.isolateModel, this.addModel(this.isolateModel), this.mergedModel.name = Qr.mergedModel, this.addModel(this.mergedModel), this.outlineModel.name = Qr.outlineModel, this.outlineModel.renderOrder = 0, this.addModel(this.outlineModel);
44300
+ side: fi
44301
+ }), this.fullScreenQuad = null, this.viralViewerApi.emit(Mt.LOADED_SCENE), this.isolateModel.name = Qr.isolateModel, this.addModel(this.isolateModel), this.mergedModel.name = Qr.mergedModel, this.addModel(this.mergedModel), this.outlineModel.name = Qr.outlineModel, this.outlineModel.renderOrder = 0, this.addModel(this.outlineModel);
44336
44302
  const t = new So(5, 32, 32), i = new on({
44337
44303
  color: 16768256,
44338
44304
  emissive: 16755200,
@@ -45668,7 +45634,7 @@ class JC extends zn {
45668
45634
  stencilBuffer: !1,
45669
45635
  depthBuffer: !1,
45670
45636
  alpha: !0
45671
- }), this.bluenoise = new Bn(ZC, 128, 128), this.accumulationQuad = new Qa(new mt({
45637
+ }), this.bluenoise = new Nn(ZC, 128, 128), this.accumulationQuad = new Qa(new mt({
45672
45638
  uniforms: {
45673
45639
  frame: {
45674
45640
  value: 0
@@ -46059,7 +46025,7 @@ class t3 {
46059
46025
  }
46060
46026
  function i3() {
46061
46027
  const s = new bd({
46062
- side: pi
46028
+ side: fi
46063
46029
  });
46064
46030
  return s.onBeforeCompile = (e) => {
46065
46031
  e.vertexShader = `attribute vec4 color;
@@ -46082,7 +46048,7 @@ function i3() {
46082
46048
  function n3() {
46083
46049
  const s = new Ri({
46084
46050
  colorWrite: !1,
46085
- side: pi
46051
+ side: fi
46086
46052
  });
46087
46053
  return s.onBeforeCompile = (e) => {
46088
46054
  e.vertexShader = `attribute vec4 color;
@@ -46355,7 +46321,7 @@ class c3 extends zn {
46355
46321
  ), this.normalMaterial = i3(), this.depthMaterial = n3(), this.objectIdMaterial = new mt({
46356
46322
  vertexShader: o3,
46357
46323
  fragmentShader: l3,
46358
- side: pi
46324
+ side: fi
46359
46325
  }), this.edgeMaterial = new mt({
46360
46326
  uniforms: {
46361
46327
  tDiffuse: { value: null },
@@ -46738,7 +46704,7 @@ class d3 {
46738
46704
  ), this.renderer.outputColorSpace = Pi, this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = ds, this.renderer.shadowMap.autoUpdate = !1, this.renderer.shadowMap.needsUpdate = !0, this.renderer.info.autoReset = !1, this.viralViewerApi.targetElement.appendChild(this.renderer.domElement), this.viralViewerApi.options.enablePostProcessing !== !1 && (this.postProcessingRenderer = new h3(
46739
46705
  this.renderer,
46740
46706
  this.viralViewerApi
46741
- )), this.jitterOffsets = this.generateJitterOffsets(), this.viralViewerApi.emit(At.LOADED_RENDERER);
46707
+ )), this.jitterOffsets = this.generateJitterOffsets(), this.viralViewerApi.emit(Mt.LOADED_RENDERER);
46742
46708
  }
46743
46709
  updateSize(e, t) {
46744
46710
  this.renderer.setSize(e, t), this.postProcessingRenderer && this.postProcessingRenderer.composer.setSize(e, t);
@@ -47768,7 +47734,7 @@ class Ab {
47768
47734
  // polygonOffset: true,
47769
47735
  // polygonOffsetFactor: 1,
47770
47736
  // polygonOffsetUnits: 0.1,
47771
- side: wn
47737
+ side: Un
47772
47738
  // 🔧 FIX: Changed from DoubleSide to halve draw calls
47773
47739
  });
47774
47740
  l.userData.red = r.Red, l.userData.green = r.Green, l.userData.blue = r.Blue, l.userData.opacity = r.Opacity, this.viralViewerApi.viralMaterialManager.materials.push(l);
@@ -47916,7 +47882,7 @@ class Ab {
47916
47882
  return l.multiplyScalar(o), l;
47917
47883
  }, n = e.transparent || e.opacity < 1, r = t ? new on({
47918
47884
  vertexColors: !0,
47919
- side: wn,
47885
+ side: fi,
47920
47886
  // 🔧 FIX: Changed from DoubleSide to halve draw calls
47921
47887
  opacity: e.opacity,
47922
47888
  transparent: !0,
@@ -48148,7 +48114,7 @@ class A3 {
48148
48114
  z,
48149
48115
  () => {
48150
48116
  L += 1, L == C && (this.viralViewerApi.emit(
48151
- At.LOADED_SEPERATE_MODEL,
48117
+ Mt.LOADED_SEPERATE_MODEL,
48152
48118
  { modelId: M }
48153
48119
  ), console.log(
48154
48120
  this._loadElementPatchWorker.getSpatialMeshManager()
@@ -48157,7 +48123,7 @@ class A3 {
48157
48123
  ), r());
48158
48124
  }
48159
48125
  ) : (L += 1, L == C && (this.viralViewerApi.emit(
48160
- At.LOADED_SEPERATE_MODEL,
48126
+ Mt.LOADED_SEPERATE_MODEL,
48161
48127
  { modelId: M }
48162
48128
  ), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralScene.mergedModel.enableEdge(
48163
48129
  this.viralViewerApi.viralMaterialManager.edgeMaterial
@@ -48169,7 +48135,7 @@ class A3 {
48169
48135
  }
48170
48136
  };
48171
48137
  (o = this.viralViewerApi.viralGeometryHandler) != null && o.isGeneratingMergeModel ? this.viralViewerApi.on(
48172
- At.GENERATED_MERGE_MODEL,
48138
+ Mt.GENERATED_MERGE_MODEL,
48173
48139
  async () => {
48174
48140
  await a();
48175
48141
  }
@@ -49114,21 +49080,21 @@ void main() {
49114
49080
  return i('var t;!function(t){t[t.POSITION_CARTESIAN=0]="POSITION_CARTESIAN",t[t.COLOR_PACKED=1]="COLOR_PACKED",t[t.COLOR_FLOATS_1=2]="COLOR_FLOATS_1",t[t.COLOR_FLOATS_255=3]="COLOR_FLOATS_255",t[t.NORMAL_FLOATS=4]="NORMAL_FLOATS",t[t.FILLER=5]="FILLER",t[t.INTENSITY=6]="INTENSITY",t[t.CLASSIFICATION=7]="CLASSIFICATION",t[t.NORMAL_SPHEREMAPPED=8]="NORMAL_SPHEREMAPPED",t[t.NORMAL_OCT16=9]="NORMAL_OCT16",t[t.NORMAL=10]="NORMAL"}(t||(t={}));const e={ordinal:1,size:4},n={ordinal:2,size:1},r={ordinal:3,size:1};function i(t,e,n){return{name:t,type:e,numElements:n,byteSize:n*e.size}}const s=i(t.COLOR_PACKED,n,4),a={POSITION_CARTESIAN:i(t.POSITION_CARTESIAN,e,3),RGBA_PACKED:s,COLOR_PACKED:s,RGB_PACKED:i(t.COLOR_PACKED,n,3),NORMAL_FLOATS:i(t.NORMAL_FLOATS,e,3),FILLER_1B:i(t.FILLER,r,1),INTENSITY:i(t.INTENSITY,{ordinal:5,size:2},1),CLASSIFICATION:i(t.CLASSIFICATION,r,1),NORMAL_SPHEREMAPPED:i(t.NORMAL_SPHEREMAPPED,r,2),NORMAL_OCT16:i(t.NORMAL_OCT16,r,2),NORMAL:i(t.NORMAL,e,3)};class o{constructor(t){this.versionMinor=0,this.version=t;const e=-1===t.indexOf(".")?t.length:t.indexOf(".");this.versionMajor=parseInt(t.substr(0,e),10),this.versionMinor=parseInt(t.substr(e+1),10),isNaN(this.versionMinor)&&(this.versionMinor=0)}newerThan(t){const e=new o(t);return this.versionMajor>e.versionMajor||this.versionMajor===e.versionMajor&&this.versionMinor>e.versionMinor}equalOrHigher(t){const e=new o(t);return this.versionMajor>e.versionMajor||this.versionMajor===e.versionMajor&&this.versionMinor>=e.versionMinor}upTo(t){return!this.newerThan(t)}}class u{constructor(t){this.tmp=new ArrayBuffer(4),this.tmpf=new Float32Array(this.tmp),this.tmpu8=new Uint8Array(this.tmp),this.u8=new Uint8Array(t)}getUint32(t){return this.u8[t+3]<<24|this.u8[t+2]<<16|this.u8[t+1]<<8|this.u8[t]}getUint16(t){return this.u8[t+1]<<8|this.u8[t]}getFloat32(t){const e=this.tmpu8,n=this.u8,r=this.tmpf;return e[0]=n[t+0],e[1]=n[t+1],e[2]=n[t+2],e[3]=n[t+3],r[0]}getUint8(t){return this.u8[t]}}const f=Math.sign||function(t){return 0==(t=Number(t))||t!=t?t:t<0?-1:1};function A(e,n){const r=function(e,n){switch(e.name){case t.POSITION_CARTESIAN:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){let n,i,s;e.version.newerThan("1.3")?(n=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+0)*e.scale,i=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+4)*e.scale,s=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+8)*e.scale):(n=e.data.getFloat32(t*e.pointAttributes.byteSize+0)+e.nodeOffset[0],i=e.data.getFloat32(t*e.pointAttributes.byteSize+4)+e.nodeOffset[1],s=e.data.getFloat32(t*e.pointAttributes.byteSize+8)+e.nodeOffset[2]),r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s,e.mean[0]+=n/e.numPoints,e.mean[1]+=i/e.numPoints,e.mean[2]+=s/e.numPoints,e.tightBoxMin[0]=Math.min(e.tightBoxMin[0],n),e.tightBoxMin[1]=Math.min(e.tightBoxMin[1],i),e.tightBoxMin[2]=Math.min(e.tightBoxMin[2],s),e.tightBoxMax[0]=Math.max(e.tightBoxMax[0],n),e.tightBoxMax[1]=Math.max(e.tightBoxMax[1],i),e.tightBoxMax[2]=Math.max(e.tightBoxMax[2],s)}return{buffer:n,attribute:t}}(e,n);case t.COLOR_PACKED:return function(t,e){const n=new ArrayBuffer(3*e.numPoints),r=new Uint8Array(n);for(let t=0;t<e.numPoints;t++)r[3*t+0]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0),r[3*t+1]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1),r[3*t+2]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+2);return{buffer:n,attribute:t}}(e,n);case t.INTENSITY:return function(t,e){const n=new ArrayBuffer(4*e.numPoints),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++)r[t]=e.data.getUint16(e.currentOffset+t*e.pointAttributes.byteSize);return{buffer:n,attribute:t}}(e,n);case t.CLASSIFICATION:return function(t,e){const n=new ArrayBuffer(e.numPoints),r=new Uint8Array(n);for(let t=0;t<e.numPoints;t++)r[t]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize);return{buffer:n,attribute:t}}(e,n);case t.NORMAL_SPHEREMAPPED:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){let n=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0)/255*2-1,i=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1)/255*2-1,s=1;const a=n*-n+i*-i+1*s;s=a,n*=Math.sqrt(a),i*=Math.sqrt(a),n*=2,i*=2,s=2*s-1,r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);case t.NORMAL_OCT16:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){const n=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0)/255*2-1,i=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1)/255*2-1;let s=1-Math.abs(n)-Math.abs(i),a=0,o=0;s>=0?(a=n,o=i):(a=-(i/f(i)-1)/f(n),o=-(n/f(n)-1)/f(i));const u=Math.sqrt(a*a+o*o+s*s);a/=u,o/=u,s/=u,r[3*t+0]=a,r[3*t+1]=o,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);case t.NORMAL:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){const n=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+0),i=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+4),s=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+8);r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);default:return}}(e,n);void 0!==r&&(n.attributeBuffers[r.attribute.name]=r,n.transferables.push(r.buffer))}onmessage=function(e){const n=e.data.buffer,r=e.data.pointAttributes,i={attributeBuffers:{},currentOffset:0,data:new u(n),mean:[0,0,0],nodeOffset:e.data.offset,numPoints:e.data.buffer.byteLength/r.byteSize,pointAttributes:r,scale:e.data.scale,tightBoxMax:[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],tightBoxMin:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transferables:[],version:new o(e.data.version)};for(const t of i.pointAttributes.attributes)A(t,i),i.currentOffset+=t.byteSize;const s=new ArrayBuffer(4*i.numPoints),f=new Uint32Array(s);for(let t=0;t<i.numPoints;t++)f[t]=t;i.attributeBuffers[t.CLASSIFICATION]||function(e){const n=new ArrayBuffer(4*e.numPoints),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++)r[t]=0;e.attributeBuffers[t.CLASSIFICATION]={buffer:n,attribute:a.CLASSIFICATION}}(i);const O={buffer:n,mean:i.mean,attributeBuffers:i.attributeBuffers,tightBoundingBox:{min:i.tightBoxMin,max:i.tightBoxMax},indices:s};postMessage(O,i.transferables)};', "Worker", void 0, void 0);
49115
49081
  }
49116
49082
  } }, pv = {};
49117
- function Pn(s) {
49083
+ function En(s) {
49118
49084
  var e = pv[s];
49119
49085
  if (e !== void 0)
49120
49086
  return e.exports;
49121
49087
  var t = pv[s] = { exports: {} };
49122
- return T3[s](t, t.exports, Pn), t.exports;
49088
+ return T3[s](t, t.exports, En), t.exports;
49123
49089
  }
49124
- Pn.d = (s, e) => {
49090
+ En.d = (s, e) => {
49125
49091
  for (var t in e)
49126
- Pn.o(e, t) && !Pn.o(s, t) && Object.defineProperty(s, t, { enumerable: !0, get: e[t] });
49127
- }, Pn.o = (s, e) => Object.prototype.hasOwnProperty.call(s, e);
49092
+ En.o(e, t) && !En.o(s, t) && Object.defineProperty(s, t, { enumerable: !0, get: e[t] });
49093
+ }, En.o = (s, e) => Object.prototype.hasOwnProperty.call(s, e);
49128
49094
  var Ft = {};
49129
49095
  (() => {
49130
- Pn.d(Ft, { HY: () => c, K8: () => i, vF: () => g, jM: () => m, st: () => b, J7: () => ht, KV: () => Te, Tl: () => ee, gv: () => gt, LR: () => ce, C9: () => I, zF: () => Ee, XL: () => ge, uv: () => ve, vs: () => fe, YJ: () => N, i9: () => l, uD: () => o, lV: () => r, Sp: () => n, RJ: () => Ss, SB: () => kn, TL: () => x, oe: () => y, AB: () => a, dZ: () => _, Gf: () => le, gK: () => w, BT: () => S, bt: () => T, sX: () => E });
49131
- const s = (e = { AdditiveBlending: () => Hl, Box3: () => ut, BufferAttribute: () => ot, BufferGeometry: () => dt, CanvasTexture: () => np, Color: () => Ie, DataTexture: () => Bn, EventDispatcher: () => Ws, Frustum: () => Oo, GLSL3: () => ep, LessEqualDepth: () => la, LineBasicMaterial: () => dn, LineSegments: () => Ii, LinearFilter: () => jt, Matrix4: () => Ce, NearestFilter: () => Dt, NoBlending: () => $t, Object3D: () => Lt, Points: () => _o, RGBAFormat: () => Kt, RawShaderMaterial: () => hm, Scene: () => lc, ShaderMaterial: () => mt, Sphere: () => ni, Texture: () => ci, Uint8BufferAttribute: () => U1, Vector2: () => K, Vector3: () => P, Vector4: () => Mt, WebGLRenderTarget: () => Tt }, t = {}, Pn.d(t, e), t);
49096
+ En.d(Ft, { HY: () => c, K8: () => i, vF: () => g, jM: () => m, st: () => b, J7: () => ht, KV: () => Te, Tl: () => ee, gv: () => gt, LR: () => ce, C9: () => I, zF: () => Ee, XL: () => ge, uv: () => ve, vs: () => fe, YJ: () => N, i9: () => l, uD: () => o, lV: () => r, Sp: () => n, RJ: () => Ss, SB: () => kn, TL: () => x, oe: () => y, AB: () => a, dZ: () => _, Gf: () => le, gK: () => w, BT: () => S, bt: () => T, sX: () => E });
49097
+ const s = (e = { AdditiveBlending: () => Hl, Box3: () => ut, BufferAttribute: () => ot, BufferGeometry: () => dt, CanvasTexture: () => np, Color: () => Ie, DataTexture: () => Nn, EventDispatcher: () => Ws, Frustum: () => Oo, GLSL3: () => ep, LessEqualDepth: () => la, LineBasicMaterial: () => dn, LineSegments: () => Ii, LinearFilter: () => jt, Matrix4: () => Ce, NearestFilter: () => Dt, NoBlending: () => $t, Object3D: () => Lt, Points: () => _o, RGBAFormat: () => Kt, RawShaderMaterial: () => hm, Scene: () => lc, ShaderMaterial: () => mt, Sphere: () => ni, Texture: () => ci, Uint8BufferAttribute: () => U1, Vector2: () => K, Vector3: () => P, Vector4: () => At, WebGLRenderTarget: () => Tt }, t = {}, En.d(t, e), t);
49132
49098
  var e, t, i, n, r, a, o, l;
49133
49099
  class c extends s.ShaderMaterial {
49134
49100
  constructor() {
@@ -49202,7 +49168,7 @@ var Ft = {};
49202
49168
  (F = k[pe]) && (J = (q < 3 ? F(J) : q > 3 ? F(A, R, J) : F(A, R)) || J);
49203
49169
  return q > 3 && J && Object.defineProperty(A, R, J), J;
49204
49170
  };
49205
- const L = Pn(776).Z, U = Pn(746).Z, z = { [a.OCTREE]: "tree_type_octree", [a.KDTREE]: "tree_type_kdtree" }, X = { [n.FIXED]: "fixed_point_size", [n.ATTENUATED]: "attenuated_point_size", [n.ADAPTIVE]: "adaptive_point_size" }, j = { [o.ATTENUATED]: "attenuated_opacity", [o.FIXED]: "fixed_opacity" }, re = { [r.SQUARE]: "square_point_shape", [r.CIRCLE]: "circle_point_shape", [r.PARABOLOID]: "paraboloid_point_shape" }, Z = { [l.RGB]: "color_type_rgb", [l.COLOR]: "color_type_color", [l.DEPTH]: "color_type_depth", [l.HEIGHT]: "color_type_height", [l.INTENSITY]: "color_type_intensity", [l.INTENSITY_GRADIENT]: "color_type_intensity_gradient", [l.LOD]: "color_type_lod", [l.POINT_INDEX]: "color_type_point_index", [l.CLASSIFICATION]: "color_type_classification", [l.RETURN_NUMBER]: "color_type_return_number", [l.SOURCE]: "color_type_source", [l.NORMAL]: "color_type_normal", [l.PHONG]: "color_type_phong", [l.RGB_HEIGHT]: "color_type_rgb_height", [l.COMPOSITE]: "color_type_composite" }, ie = { [i.DISABLED]: "clip_disabled", [i.CLIP_OUTSIDE]: "clip_outside", [i.HIGHLIGHT_INSIDE]: "clip_highlight_inside" }, ue = { [M.LINEAR]: "input_color_encoding_linear", [M.SRGB]: "input_color_encoding_sRGB" }, Oe = { [M.LINEAR]: "output_color_encoding_linear", [M.SRGB]: "output_color_encoding_sRGB" };
49171
+ const L = En(776).Z, U = En(746).Z, z = { [a.OCTREE]: "tree_type_octree", [a.KDTREE]: "tree_type_kdtree" }, X = { [n.FIXED]: "fixed_point_size", [n.ATTENUATED]: "attenuated_point_size", [n.ADAPTIVE]: "adaptive_point_size" }, j = { [o.ATTENUATED]: "attenuated_opacity", [o.FIXED]: "fixed_opacity" }, re = { [r.SQUARE]: "square_point_shape", [r.CIRCLE]: "circle_point_shape", [r.PARABOLOID]: "paraboloid_point_shape" }, Z = { [l.RGB]: "color_type_rgb", [l.COLOR]: "color_type_color", [l.DEPTH]: "color_type_depth", [l.HEIGHT]: "color_type_height", [l.INTENSITY]: "color_type_intensity", [l.INTENSITY_GRADIENT]: "color_type_intensity_gradient", [l.LOD]: "color_type_lod", [l.POINT_INDEX]: "color_type_point_index", [l.CLASSIFICATION]: "color_type_classification", [l.RETURN_NUMBER]: "color_type_return_number", [l.SOURCE]: "color_type_source", [l.NORMAL]: "color_type_normal", [l.PHONG]: "color_type_phong", [l.RGB_HEIGHT]: "color_type_rgb_height", [l.COMPOSITE]: "color_type_composite" }, ie = { [i.DISABLED]: "clip_disabled", [i.CLIP_OUTSIDE]: "clip_outside", [i.HIGHLIGHT_INSIDE]: "clip_highlight_inside" }, ue = { [M.LINEAR]: "input_color_encoding_linear", [M.SRGB]: "input_color_encoding_sRGB" }, Oe = { [M.LINEAR]: "output_color_encoding_linear", [M.SRGB]: "output_color_encoding_sRGB" };
49206
49172
  class ce extends s.RawShaderMaterial {
49207
49173
  constructor(A = {}) {
49208
49174
  super(), this.lights = !1, this.fog = !1, this.numClipBoxes = 0, this.clipBoxes = [], this.visibleNodeTextureOffsets = /* @__PURE__ */ new Map(), this._gradient = y, this.gradientTexture = E(this._gradient), this._classification = v, this.classificationTexture = S(this._classification), this.uniforms = { bbSize: Se("fv", [0, 0, 0]), blendDepthSupplement: Se("f", 0), blendHardness: Se("f", 2), classificationLUT: Se("t", this.classificationTexture || new s.Texture()), clipBoxCount: Se("f", 0), clipBoxes: Se("Matrix4fv", []), depthMap: Se("t", null), diffuse: Se("fv", [1, 1, 1]), fov: Se("f", 1), gradient: Se("t", this.gradientTexture || new s.Texture()), heightMax: Se("f", 1), heightMin: Se("f", 0), intensityBrightness: Se("f", 0), intensityContrast: Se("f", 0), intensityGamma: Se("f", 1), intensityRange: Se("fv", [0, 65e3]), isLeafNode: Se("b", 0), level: Se("f", 0), maxSize: Se("f", 50), minSize: Se("f", 2), octreeSize: Se("f", 0), opacity: Se("f", 1), pcIndex: Se("f", 0), rgbBrightness: Se("f", 0), rgbContrast: Se("f", 0), rgbGamma: Se("f", 1), screenHeight: Se("f", 1), screenWidth: Se("f", 1), size: Se("f", 1), spacing: Se("f", 1), toModel: Se("Matrix4f", []), transition: Se("f", 0.5), uColor: Se("c", new s.Color(16777215)), visibleNodes: Se("t", this.visibleNodesTexture || new s.Texture()), vnStart: Se("f", 0), wClassification: Se("f", 0), wElevation: Se("f", 0), wIntensity: Se("f", 0), wReturnNumber: Se("f", 0), wRGB: Se("f", 1), wSourceID: Se("f", 0), opacityAttenuation: Se("f", 1), filterByNormalThreshold: Se("f", 0), highlightedPointCoordinate: Se("fv", new s.Vector3()), highlightedPointColor: Se("fv", u.clone()), enablePointHighlighting: Se("b", !0), highlightedPointScale: Se("f", 2) }, this.useClipBox = !1, this.weighted = !1, this.pointColorType = l.RGB, this.pointSizeType = n.ADAPTIVE, this.clipMode = i.DISABLED, this.useEDL = !1, this.shape = r.SQUARE, this.treeType = a.OCTREE, this.pointOpacityType = o.FIXED, this.useFilterByNormal = !1, this.highlightPoint = !1, this.inputColorEncoding = M.SRGB, this.outputColorEncoding = M.LINEAR, this.attributes = { position: { type: "fv", value: [] }, color: { type: "fv", value: [] }, normal: { type: "fv", value: [] }, intensity: { type: "f", value: [] }, classification: { type: "f", value: [] }, returnNumber: { type: "f", value: [] }, numberOfReturns: { type: "f", value: [] }, pointSourceID: { type: "f", value: [] }, indices: { type: "fv", value: [] } };
@@ -49763,7 +49729,7 @@ var Ft = {};
49763
49729
  return !1;
49764
49730
  }
49765
49731
  }
49766
- const Ne = Pn(955).Z, Ke = Pn(325).Z;
49732
+ const Ne = En(955).Z, Ke = En(325).Z;
49767
49733
  var We;
49768
49734
  (function(k) {
49769
49735
  k.DECODER_WORKER_BROTLI = "DECODER_WORKER_BROTLI", k.DECODER_WORKER = "DECODER_WORKER";
@@ -50039,7 +50005,7 @@ var Ft = {};
50039
50005
  return !this.newerThan(A);
50040
50006
  }
50041
50007
  }
50042
- const Ze = Pn(417).Z;
50008
+ const Ze = En(417).Z;
50043
50009
  class lt {
50044
50010
  constructor({ getUrl: A = (J) => Promise.resolve(J), version: R, boundingBox: O, scale: F, xhrRequest: q }) {
50045
50011
  this.disposed = !1, this.workers = [], console.log([A, R, O, F, q]), this.version = typeof R == "string" ? new le(R) : R, this.xhrRequest = q, this.getUrl = A, this.boundingBox = O, this.scale = F, this.callbacks = [];
@@ -50669,7 +50635,7 @@ class D3 {
50669
50635
  v,
50670
50636
  () => {
50671
50637
  p += 1, p == f && (this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(
50672
- At.LOADED_SEPERATE_MODEL,
50638
+ Mt.LOADED_SEPERATE_MODEL,
50673
50639
  { modelId: d }
50674
50640
  ), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralVisibilityManager.enableScreenSpaceEdge(
50675
50641
  "shaded"
@@ -50677,7 +50643,7 @@ class D3 {
50677
50643
  },
50678
50644
  u
50679
50645
  ) : (p += 1, p == f && (this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(
50680
- At.LOADED_SEPERATE_MODEL,
50646
+ Mt.LOADED_SEPERATE_MODEL,
50681
50647
  { modelId: d }
50682
50648
  ), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralVisibilityManager.enableScreenSpaceEdge(
50683
50649
  "shaded"
@@ -50692,7 +50658,7 @@ class D3 {
50692
50658
  }
50693
50659
  };
50694
50660
  (a = this.viralViewerApi.viralGeometryHandler) != null && a.isGeneratingMergeModel ? this.viralViewerApi.on(
50695
- At.GENERATED_MERGE_MODEL,
50661
+ Mt.GENERATED_MERGE_MODEL,
50696
50662
  async () => {
50697
50663
  await r();
50698
50664
  }
@@ -50751,7 +50717,7 @@ class D3 {
50751
50717
  T,
50752
50718
  a.Elements,
50753
50719
  () => {
50754
- this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(At.LOADED_SEPERATE_MODEL, {
50720
+ this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(Mt.LOADED_SEPERATE_MODEL, {
50755
50721
  modelId: T
50756
50722
  }), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), i();
50757
50723
  }
@@ -50762,7 +50728,7 @@ class D3 {
50762
50728
  }
50763
50729
  };
50764
50730
  (r = this.viralViewerApi.viralGeometryHandler) != null && r.isGeneratingMergeModel ? this.viralViewerApi.on(
50765
- At.GENERATED_MERGE_MODEL,
50731
+ Mt.GENERATED_MERGE_MODEL,
50766
50732
  async () => {
50767
50733
  await n();
50768
50734
  }
@@ -51280,13 +51246,13 @@ function ln(s, e) {
51280
51246
  function _n(s, e) {
51281
51247
  return e[s + 6];
51282
51248
  }
51283
- function Rn(s, e) {
51249
+ function In(s, e) {
51284
51250
  return e[s + 14];
51285
51251
  }
51286
- function Dn(s) {
51252
+ function Rn(s) {
51287
51253
  return s + 8;
51288
51254
  }
51289
- function Ln(s, e) {
51255
+ function Dn(s, e) {
51290
51256
  return e[s + 6];
51291
51257
  }
51292
51258
  function Cb(s, e) {
@@ -51468,7 +51434,7 @@ const eI = function() {
51468
51434
  return !1;
51469
51435
  };
51470
51436
  }(), iI = ["x", "y", "z"], Bs = 1e-15, yv = Bs * Bs;
51471
- function Tn(s) {
51437
+ function An(s) {
51472
51438
  return Math.abs(s) < Bs;
51473
51439
  }
51474
51440
  class es extends vn {
@@ -51543,11 +51509,11 @@ es.prototype.intersectsTriangle = function() {
51543
51509
  }
51544
51510
  function v(x, y, _, w) {
51545
51511
  const T = y.degenerateSegment, E = x.plane.distanceToPoint(T.start), S = x.plane.distanceToPoint(T.end);
51546
- return Tn(E) ? Tn(S) ? u(x, y, _, w) : (_ && (_.start.copy(T.start), _.end.copy(T.start)), x.containsPoint(T.start)) : Tn(S) ? (_ && (_.start.copy(T.end), _.end.copy(T.end)), x.containsPoint(T.end)) : x.plane.intersectLine(T, i) != null ? (_ && (_.start.copy(i), _.end.copy(i)), x.containsPoint(i)) : !1;
51512
+ return An(E) ? An(S) ? u(x, y, _, w) : (_ && (_.start.copy(T.start), _.end.copy(T.start)), x.containsPoint(T.start)) : An(S) ? (_ && (_.start.copy(T.end), _.end.copy(T.end)), x.containsPoint(T.end)) : x.plane.intersectLine(T, i) != null ? (_ && (_.start.copy(i), _.end.copy(i)), x.containsPoint(i)) : !1;
51547
51513
  }
51548
51514
  function g(x, y, _) {
51549
51515
  const w = y.a;
51550
- return Tn(x.plane.distanceToPoint(w)) && x.containsPoint(w) ? (_ && (_.start.copy(w), _.end.copy(w)), !0) : !1;
51516
+ return An(x.plane.distanceToPoint(w)) && x.containsPoint(w) ? (_ && (_.start.copy(w), _.end.copy(w)), !0) : !1;
51551
51517
  }
51552
51518
  function m(x, y, _) {
51553
51519
  const w = x.degenerateSegment, T = y.a;
@@ -51559,13 +51525,13 @@ es.prototype.intersectsTriangle = function() {
51559
51525
  const T = x.degenerateSegment, E = y.degenerateSegment, S = n, M = r;
51560
51526
  T.delta(S), E.delta(M);
51561
51527
  const C = i.subVectors(E.start, T.start), L = S.x * M.y - S.y * M.x;
51562
- if (Tn(L))
51528
+ if (An(L))
51563
51529
  return !1;
51564
51530
  const U = (C.x * M.y - C.y * M.x) / L, z = -(S.x * C.y - S.y * C.x) / L;
51565
51531
  if (U < 0 || U > 1 || z < 0 || z > 1)
51566
51532
  return !1;
51567
51533
  const X = T.start.z + S.z * U, j = E.start.z + M.z * z;
51568
- return Tn(X - j) ? (_ && (_.start.copy(T.start).addScaledVector(S, U), _.end.copy(T.start).addScaledVector(S, U)), !0) : !1;
51534
+ return An(X - j) ? (_ && (_.start.copy(T.start).addScaledVector(S, U), _.end.copy(T.start).addScaledVector(S, U)), !0) : !1;
51569
51535
  } else
51570
51536
  return y.isDegenerateIntoPoint ? m(x, y, _) : v(y, x, _, w);
51571
51537
  else {
@@ -51584,12 +51550,12 @@ es.prototype.intersectsTriangle = function() {
51584
51550
  return T;
51585
51551
  const E = this.plane, S = y.plane;
51586
51552
  let M = S.distanceToPoint(this.a), C = S.distanceToPoint(this.b), L = S.distanceToPoint(this.c);
51587
- Tn(M) && (M = 0), Tn(C) && (C = 0), Tn(L) && (L = 0);
51553
+ An(M) && (M = 0), An(C) && (C = 0), An(L) && (L = 0);
51588
51554
  const U = M * C, z = M * L;
51589
51555
  if (U > 0 && z > 0)
51590
51556
  return !1;
51591
51557
  let X = E.distanceToPoint(y.a), j = E.distanceToPoint(y.b), re = E.distanceToPoint(y.c);
51592
- Tn(X) && (X = 0), Tn(j) && (j = 0), Tn(re) && (re = 0);
51558
+ An(X) && (X = 0), An(j) && (j = 0), An(re) && (re = 0);
51593
51559
  const Z = X * j, ie = X * re;
51594
51560
  if (Z > 0 && ie > 0)
51595
51561
  return !1;
@@ -51791,7 +51757,7 @@ class nI extends xm {
51791
51757
  super(() => new es());
51792
51758
  }
51793
51759
  }
51794
- const On = /* @__PURE__ */ new nI();
51760
+ const Ln = /* @__PURE__ */ new nI();
51795
51761
  class sI {
51796
51762
  constructor() {
51797
51763
  this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
@@ -51818,23 +51784,23 @@ function pp(s, e, t, i, n = null, r = 0, a = 0) {
51818
51784
  const { float32Array: o, uint16Array: l, uint32Array: c } = Jt;
51819
51785
  let h = s * 2;
51820
51786
  if (ln(h, l)) {
51821
- const u = _n(s, c), f = Rn(h, l);
51787
+ const u = _n(s, c), f = In(h, l);
51822
51788
  return di(s, o, gr), i(u, f, !1, a, r + s, gr);
51823
51789
  } else {
51824
51790
  let M = function(L) {
51825
51791
  const { uint16Array: U, uint32Array: z } = Jt;
51826
51792
  let X = L * 2;
51827
51793
  for (; !ln(X, U); )
51828
- L = Dn(L), X = L * 2;
51794
+ L = Rn(L), X = L * 2;
51829
51795
  return _n(L, z);
51830
51796
  }, C = function(L) {
51831
51797
  const { uint16Array: U, uint32Array: z } = Jt;
51832
51798
  let X = L * 2;
51833
51799
  for (; !ln(X, U); )
51834
- L = Ln(L, z), X = L * 2;
51835
- return _n(L, z) + Rn(X, U);
51800
+ L = Dn(L, z), X = L * 2;
51801
+ return _n(L, z) + In(X, U);
51836
51802
  };
51837
- const u = Dn(s), f = Ln(s, c);
51803
+ const u = Rn(s), f = Dn(s, c);
51838
51804
  let p = u, v = f, g, m, b, x;
51839
51805
  if (n && (b = gr, x = oo, di(p, o, b), di(v, o, x), g = n(b), m = n(x), m < g)) {
51840
51806
  p = f, v = u;
@@ -51900,7 +51866,7 @@ function aI(s, e, t = {}, i = 0, n = 1 / 0) {
51900
51866
  const Mh = parseInt(Do) >= 169, oI = parseInt(Do) <= 161, Xr = /* @__PURE__ */ new P(), Hr = /* @__PURE__ */ new P(), Yr = /* @__PURE__ */ new P(), Ah = /* @__PURE__ */ new K(), Th = /* @__PURE__ */ new K(), Eh = /* @__PURE__ */ new K(), _v = /* @__PURE__ */ new P(), wv = /* @__PURE__ */ new P(), Sv = /* @__PURE__ */ new P(), hl = /* @__PURE__ */ new P();
51901
51867
  function lI(s, e, t, i, n, r, a, o) {
51902
51868
  let l;
51903
- if (r === Ki ? l = s.intersectTriangle(i, t, e, !0, n) : l = s.intersectTriangle(e, t, i, r !== pi, n), l === null)
51869
+ if (r === Ki ? l = s.intersectTriangle(i, t, e, !0, n) : l = s.intersectTriangle(e, t, i, r !== fi, n), l === null)
51904
51870
  return null;
51905
51871
  const c = s.origin.distanceTo(n);
51906
51872
  return c < a || c > o ? null : {
@@ -52051,12 +52017,12 @@ function vI(s, e, t, i, n, r, a) {
52051
52017
  function mp(s, e, t, i, n, r, a) {
52052
52018
  const { float32Array: o, uint16Array: l, uint32Array: c } = Jt, h = s * 2;
52053
52019
  if (ln(h, l)) {
52054
- const u = _n(s, c), f = Rn(h, l);
52020
+ const u = _n(s, c), f = In(h, l);
52055
52021
  hI(e, t, i, u, f, n, r, a);
52056
52022
  } else {
52057
- const u = Dn(s);
52023
+ const u = Rn(s);
52058
52024
  Tr(u, o, i, r, a) && mp(u, e, t, i, n, r, a);
52059
- const f = Ln(s, c);
52025
+ const f = Dn(s, c);
52060
52026
  Tr(f, o, i, r, a) && mp(f, e, t, i, n, r, a);
52061
52027
  }
52062
52028
  }
@@ -52070,12 +52036,12 @@ function gp(s, e, t, i, n, r) {
52070
52036
  const { float32Array: a, uint16Array: o, uint32Array: l } = Jt;
52071
52037
  let c = s * 2;
52072
52038
  if (ln(c, o)) {
52073
- const d = _n(s, l), u = Rn(c, o);
52039
+ const d = _n(s, l), u = In(c, o);
52074
52040
  return dI(e, t, i, d, u, n, r);
52075
52041
  } else {
52076
52042
  const d = Cb(s, l), u = xI[d], p = i.direction[u] >= 0;
52077
52043
  let v, g;
52078
- p ? (v = Dn(s), g = Ln(s, l)) : (v = Ln(s, l), g = Dn(s));
52044
+ p ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
52079
52045
  const b = Tr(v, a, i, n, r) ? gp(v, e, t, i, n, r) : null;
52080
52046
  if (b) {
52081
52047
  const _ = b.point[u];
@@ -52099,7 +52065,7 @@ function vp(s, e, t, i, n = null) {
52099
52065
  const { float32Array: r, uint16Array: a, uint32Array: o } = Jt;
52100
52066
  let l = s * 2;
52101
52067
  if (n === null && (t.boundingBox || t.computeBoundingBox(), Mv.set(t.boundingBox.min, t.boundingBox.max, i), n = Mv), ln(l, a)) {
52102
- const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = Rn(l, a);
52068
+ const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = In(l, a);
52103
52069
  if (dl.copy(i).invert(), t.boundsTree)
52104
52070
  return di(s, r, Ch), Ch.matrix.copy(dl), Ch.needsUpdate = !0, t.boundsTree.shapecast({
52105
52071
  intersectsBounds: (b) => Ch.intersectsBox(b),
@@ -52128,7 +52094,7 @@ function vp(s, e, t, i, n = null) {
52128
52094
  const Ih = /* @__PURE__ */ new Ce(), ef = /* @__PURE__ */ new en(), ul = /* @__PURE__ */ new en(), _I = /* @__PURE__ */ new P(), wI = /* @__PURE__ */ new P(), SI = /* @__PURE__ */ new P(), MI = /* @__PURE__ */ new P();
52129
52095
  function AI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52130
52096
  e.boundingBox || e.computeBoundingBox(), ef.set(e.boundingBox.min, e.boundingBox.max, t), ef.needsUpdate = !0;
52131
- const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = On.getPrimitive(), f = On.getPrimitive();
52097
+ const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
52132
52098
  let p = _I, v = wI, g = null, m = null;
52133
52099
  n && (g = SI, m = MI);
52134
52100
  let b = 1 / 0, x = null, y = null;
@@ -52167,7 +52133,7 @@ function AI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52167
52133
  }
52168
52134
  }
52169
52135
  }
52170
- ), On.releasePrimitive(u), On.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Ih), v.applyMatrix4(Ih), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52136
+ ), Ln.releasePrimitive(u), Ln.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Ih), v.applyMatrix4(Ih), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52171
52137
  }
52172
52138
  function TI(s, e = null) {
52173
52139
  e && Array.isArray(e) && (e = new Set(e));
@@ -52216,12 +52182,12 @@ function EI(s, e, t, i, n, r, a) {
52216
52182
  function xp(s, e, t, i, n, r, a) {
52217
52183
  const { float32Array: o, uint16Array: l, uint32Array: c } = Jt, h = s * 2;
52218
52184
  if (ln(h, l)) {
52219
- const u = _n(s, c), f = Rn(h, l);
52185
+ const u = _n(s, c), f = In(h, l);
52220
52186
  pI(e, t, i, u, f, n, r, a);
52221
52187
  } else {
52222
- const u = Dn(s);
52188
+ const u = Rn(s);
52223
52189
  Tr(u, o, i, r, a) && xp(u, e, t, i, n, r, a);
52224
- const f = Ln(s, c);
52190
+ const f = Dn(s, c);
52225
52191
  Tr(f, o, i, r, a) && xp(f, e, t, i, n, r, a);
52226
52192
  }
52227
52193
  }
@@ -52235,12 +52201,12 @@ function bp(s, e, t, i, n, r) {
52235
52201
  const { float32Array: a, uint16Array: o, uint32Array: l } = Jt;
52236
52202
  let c = s * 2;
52237
52203
  if (ln(c, o)) {
52238
- const d = _n(s, l), u = Rn(c, o);
52204
+ const d = _n(s, l), u = In(c, o);
52239
52205
  return mI(e, t, i, d, u, n, r);
52240
52206
  } else {
52241
52207
  const d = Cb(s, l), u = PI[d], p = i.direction[u] >= 0;
52242
52208
  let v, g;
52243
- p ? (v = Dn(s), g = Ln(s, l)) : (v = Ln(s, l), g = Dn(s));
52209
+ p ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
52244
52210
  const b = Tr(v, a, i, n, r) ? bp(v, e, t, i, n, r) : null;
52245
52211
  if (b) {
52246
52212
  const _ = b.point[u];
@@ -52264,7 +52230,7 @@ function yp(s, e, t, i, n = null) {
52264
52230
  const { float32Array: r, uint16Array: a, uint32Array: o } = Jt;
52265
52231
  let l = s * 2;
52266
52232
  if (n === null && (t.boundingBox || t.computeBoundingBox(), Av.set(t.boundingBox.min, t.boundingBox.max, i), n = Av), ln(l, a)) {
52267
- const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = Rn(l, a);
52233
+ const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = In(l, a);
52268
52234
  if (fl.copy(i).invert(), t.boundsTree)
52269
52235
  return di(s, r, Dh), Dh.matrix.copy(fl), Dh.needsUpdate = !0, t.boundsTree.shapecast({
52270
52236
  intersectsBounds: (b) => Dh.intersectsBox(b),
@@ -52294,7 +52260,7 @@ function yp(s, e, t, i, n = null) {
52294
52260
  const Lh = /* @__PURE__ */ new Ce(), tf = /* @__PURE__ */ new en(), pl = /* @__PURE__ */ new en(), RI = /* @__PURE__ */ new P(), DI = /* @__PURE__ */ new P(), LI = /* @__PURE__ */ new P(), OI = /* @__PURE__ */ new P();
52295
52261
  function NI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52296
52262
  e.boundingBox || e.computeBoundingBox(), tf.set(e.boundingBox.min, e.boundingBox.max, t), tf.needsUpdate = !0;
52297
- const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = On.getPrimitive(), f = On.getPrimitive();
52263
+ const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
52298
52264
  let p = RI, v = DI, g = null, m = null;
52299
52265
  n && (g = LI, m = OI);
52300
52266
  let b = 1 / 0, x = null, y = null;
@@ -52337,7 +52303,7 @@ function NI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
52337
52303
  }
52338
52304
  }
52339
52305
  }
52340
- ), On.releasePrimitive(u), On.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Lh), v.applyMatrix4(Lh), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52306
+ ), Ln.releasePrimitive(u), Ln.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Lh), v.applyMatrix4(Lh), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
52341
52307
  }
52342
52308
  function BI() {
52343
52309
  return typeof SharedArrayBuffer < "u";
@@ -52381,18 +52347,18 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52381
52347
  if (w && _)
52382
52348
  h ? T = n(
52383
52349
  _n(e, m),
52384
- Rn(e * 2, b),
52350
+ In(e * 2, b),
52385
52351
  _n(s, p),
52386
- Rn(s * 2, v),
52352
+ In(s * 2, v),
52387
52353
  l,
52388
52354
  a + e,
52389
52355
  o,
52390
52356
  r + s
52391
52357
  ) : T = n(
52392
52358
  _n(s, p),
52393
- Rn(s * 2, v),
52359
+ In(s * 2, v),
52394
52360
  _n(e, m),
52395
- Rn(e * 2, b),
52361
+ In(e * 2, b),
52396
52362
  o,
52397
52363
  r + s,
52398
52364
  l,
@@ -52401,7 +52367,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52401
52367
  else if (w) {
52402
52368
  const E = or.getPrimitive();
52403
52369
  di(e, g, E), E.applyMatrix4(t);
52404
- const S = Dn(s), M = Ln(s, p);
52370
+ const S = Rn(s), M = Dn(s, p);
52405
52371
  di(S, f, Ja), di(M, f, eo);
52406
52372
  const C = E.intersectsBox(Ja), L = E.intersectsBox(eo);
52407
52373
  T = C && Gn(
@@ -52430,7 +52396,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52430
52396
  !h
52431
52397
  ), or.releasePrimitive(E);
52432
52398
  } else {
52433
- const E = Dn(e), S = Ln(e, m);
52399
+ const E = Rn(e), S = Dn(e, m);
52434
52400
  di(E, g, nf), di(S, g, sf);
52435
52401
  const M = c.intersectsBox(nf), C = c.intersectsBox(sf);
52436
52402
  if (M && C)
@@ -52477,7 +52443,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52477
52443
  else {
52478
52444
  const L = or.getPrimitive();
52479
52445
  L.copy(nf).applyMatrix4(t);
52480
- const U = Dn(s), z = Ln(s, p);
52446
+ const U = Rn(s), z = Dn(s, p);
52481
52447
  di(U, f, Ja), di(z, f, eo);
52482
52448
  const X = L.intersectsBox(Ja), j = L.intersectsBox(eo);
52483
52449
  T = X && Gn(
@@ -52524,7 +52490,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
52524
52490
  else {
52525
52491
  const L = or.getPrimitive();
52526
52492
  L.copy(sf).applyMatrix4(t);
52527
- const U = Dn(s), z = Ln(s, p);
52493
+ const U = Rn(s), z = Dn(s, p);
52528
52494
  di(U, f, Ja), di(z, f, eo);
52529
52495
  const X = L.intersectsBox(Ja), j = L.intersectsBox(eo);
52530
52496
  T = X && Gn(
@@ -52638,7 +52604,7 @@ class bm {
52638
52604
  }
52639
52605
  }
52640
52606
  /* Core Cast Functions */
52641
- raycast(e, t = wn, i = 0, n = 1 / 0) {
52607
+ raycast(e, t = Un, i = 0, n = 1 / 0) {
52642
52608
  const r = this._roots, a = this.geometry, o = [], l = t.isMaterial, c = Array.isArray(t), h = a.groups, d = l ? t.side : t, u = this.indirect ? EI : vI;
52643
52609
  for (let f = 0, p = r.length; f < p; f++) {
52644
52610
  const v = c ? t[h[f].materialIndex].side : d, g = o.length;
@@ -52650,7 +52616,7 @@ class bm {
52650
52616
  }
52651
52617
  return o;
52652
52618
  }
52653
- raycastFirst(e, t = wn, i = 0, n = 1 / 0) {
52619
+ raycastFirst(e, t = Un, i = 0, n = 1 / 0) {
52654
52620
  const r = this._roots, a = this.geometry, o = t.isMaterial, l = Array.isArray(t);
52655
52621
  let c = null;
52656
52622
  const h = a.groups, d = o ? t.side : t, u = this.indirect ? CI : bI;
@@ -52668,7 +52634,7 @@ class bm {
52668
52634
  return i;
52669
52635
  }
52670
52636
  shapecast(e) {
52671
- const t = On.getPrimitive(), i = this.indirect ? gI : uI;
52637
+ const t = Ln.getPrimitive(), i = this.indirect ? gI : uI;
52672
52638
  let {
52673
52639
  boundsTraverseOrder: n,
52674
52640
  intersectsBounds: r,
@@ -52688,19 +52654,19 @@ class bm {
52688
52654
  break;
52689
52655
  c += f.byteLength;
52690
52656
  }
52691
- return On.releasePrimitive(t), l;
52657
+ return Ln.releasePrimitive(t), l;
52692
52658
  }
52693
52659
  bvhcast(e, t, i) {
52694
52660
  let {
52695
52661
  intersectsRanges: n,
52696
52662
  intersectsTriangles: r
52697
52663
  } = i;
52698
- const a = On.getPrimitive(), o = this.geometry.index, l = this.geometry.attributes.position, c = this.indirect ? (p) => {
52664
+ const a = Ln.getPrimitive(), o = this.geometry.index, l = this.geometry.attributes.position, c = this.indirect ? (p) => {
52699
52665
  const v = this.resolveTriangleIndex(p);
52700
52666
  bi(a, v * 3, o, l);
52701
52667
  } : (p) => {
52702
52668
  bi(a, p * 3, o, l);
52703
- }, h = On.getPrimitive(), d = e.geometry.index, u = e.geometry.attributes.position, f = e.indirect ? (p) => {
52669
+ }, h = Ln.getPrimitive(), d = e.geometry.index, u = e.geometry.attributes.position, f = e.indirect ? (p) => {
52704
52670
  const v = e.resolveTriangleIndex(p);
52705
52671
  bi(h, v * 3, d, u);
52706
52672
  } : (p) => {
@@ -52860,7 +52826,7 @@ class QI {
52860
52826
  }), this.outlineMaterial = new on({
52861
52827
  transparent: !0,
52862
52828
  opacity: 0
52863
- }), this.materials = [], this.mergeMaterials = [], this.originalColors = [], this.viralViewerApi.emit(At.LOADED_MATERIAL_MANAGER);
52829
+ }), this.materials = [], this.mergeMaterials = [], this.originalColors = [], this.viralViewerApi.emit(Mt.LOADED_MATERIAL_MANAGER);
52864
52830
  }
52865
52831
  /**
52866
52832
  * Checks if a material has a color property.
@@ -52889,15 +52855,15 @@ class QI {
52889
52855
  class jI {
52890
52856
  constructor() {
52891
52857
  this.events = {
52892
- [At.LOADED_SCENE]: [],
52893
- [At.LOADED_MATERIAL_MANAGER]: [],
52894
- [At.LOADED_RENDERER]: [],
52895
- [At.LOADED_CAMERA]: [],
52896
- [At.LOADED_CUBE]: [],
52897
- [At.LOADED_TOOLS]: [],
52898
- [At.LOADED_SEPERATE_MODEL]: [],
52899
- [At.GENERATED_MERGE_MODEL]: [],
52900
- [At.LOADED_DATA]: []
52858
+ [Mt.LOADED_SCENE]: [],
52859
+ [Mt.LOADED_MATERIAL_MANAGER]: [],
52860
+ [Mt.LOADED_RENDERER]: [],
52861
+ [Mt.LOADED_CAMERA]: [],
52862
+ [Mt.LOADED_CUBE]: [],
52863
+ [Mt.LOADED_TOOLS]: [],
52864
+ [Mt.LOADED_SEPERATE_MODEL]: [],
52865
+ [Mt.GENERATED_MERGE_MODEL]: [],
52866
+ [Mt.LOADED_DATA]: []
52901
52867
  };
52902
52868
  }
52903
52869
  /**
@@ -52929,43 +52895,43 @@ class jI {
52929
52895
  class qI {
52930
52896
  constructor(e, t) {
52931
52897
  this.viralViewerApi = e, this.options = t, this.viralViewerApi.on(
52932
- At.LOADED_SCENE,
52898
+ Mt.LOADED_SCENE,
52933
52899
  () => this.loadedScene()
52934
52900
  ), this.viralViewerApi.on(
52935
- At.LOADED_MATERIAL_MANAGER,
52901
+ Mt.LOADED_MATERIAL_MANAGER,
52936
52902
  () => this.loadedMaterialManager()
52937
52903
  ), this.viralViewerApi.on(
52938
- At.LOADED_RENDERER,
52904
+ Mt.LOADED_RENDERER,
52939
52905
  () => this.loadedRenderer()
52940
52906
  ), this.viralViewerApi.on(
52941
- At.LOADED_CAMERA,
52907
+ Mt.LOADED_CAMERA,
52942
52908
  () => this.loadedCamera()
52943
52909
  ), this.viralViewerApi.on(
52944
- At.LOADED_CUBE,
52910
+ Mt.LOADED_CUBE,
52945
52911
  () => this.loadedCube()
52946
52912
  ), this.viralViewerApi.on(
52947
- At.LOADED_TOOLS,
52913
+ Mt.LOADED_TOOLS,
52948
52914
  () => this.loadedTools()
52949
52915
  ), this.viralViewerApi.on(
52950
- At.LOADED_SEPERATE_MODEL,
52916
+ Mt.LOADED_SEPERATE_MODEL,
52951
52917
  (i) => this.loadedModels(i)
52952
52918
  );
52953
52919
  }
52954
52920
  loadedScene() {
52955
52921
  this.options.isDev && Ci.information("scene loaded!"), this.viralViewerApi.off(
52956
- At.LOADED_SCENE,
52922
+ Mt.LOADED_SCENE,
52957
52923
  () => this.loadedScene()
52958
52924
  );
52959
52925
  }
52960
52926
  loadedMaterialManager() {
52961
52927
  this.options.isDev && Ci.information("material manager loaded!"), this.viralViewerApi.off(
52962
- At.LOADED_MATERIAL_MANAGER,
52928
+ Mt.LOADED_MATERIAL_MANAGER,
52963
52929
  () => this.loadedMaterialManager()
52964
52930
  );
52965
52931
  }
52966
52932
  loadedRenderer() {
52967
52933
  this.options.isDev && Ci.information("renderer loaded!"), this.viralViewerApi.off(
52968
- At.LOADED_RENDERER,
52934
+ Mt.LOADED_RENDERER,
52969
52935
  () => this.loadedRenderer()
52970
52936
  );
52971
52937
  }
@@ -52974,13 +52940,13 @@ class qI {
52974
52940
  }
52975
52941
  loadedCube() {
52976
52942
  this.options.isDev && Ci.information("cube loaded!"), this.viralViewerApi.off(
52977
- At.LOADED_CUBE,
52943
+ Mt.LOADED_CUBE,
52978
52944
  () => this.loadedCube()
52979
52945
  );
52980
52946
  }
52981
52947
  loadedTools() {
52982
52948
  this.options.isDev && Ci.information("tools loaded!"), this.viralViewerApi.off(
52983
- At.LOADED_TOOLS,
52949
+ Mt.LOADED_TOOLS,
52984
52950
  () => this.loadedTools()
52985
52951
  );
52986
52952
  }
@@ -53010,7 +52976,7 @@ const Db = {
53010
52976
  };
53011
52977
  class KI {
53012
52978
  constructor(e) {
53013
- this.viralViewerApi = e, this.hoverMeshes = [], this.hoverInstancedMesh = null, this.selectedMeshes = [], this.selectedInstancedMeshes = [], this.isolateMeshes = [], this.isolateInstancedMeshes = [], this.hiddenMeshes = [], this.hiddenInstancedMeshes = [], this.exceptElements = [], this.isolateModelId = "0", this.sunConfiguration = Fb, this._ground = null, this.opacity = 1, this._fog = new md(13421772, 1, 1e3), this.rainGeometry = new dt(), this.rain = null, this._isGeneratedRain = !1, this._batchColors = /* @__PURE__ */ new Map(), this._originalBatchMaterials = /* @__PURE__ */ new Map(), this._batchVisualizationEnabled = !1, this.showHidePercentage = 100, this.randomColor = 100;
52979
+ this.viralViewerApi = e, this.hoverMeshes = [], this.hoverInstancedMesh = null, this.selectedMeshes = [], this.selectedInstancedMeshes = [], this.isolateMeshes = [], this.isolateInstancedMeshes = [], this.hiddenMeshes = [], this.hiddenInstancedMeshes = [], this.exceptElements = [], this.isolateModelId = "0", this.sunConfiguration = Fb, this._ground = null, this.opacity = 1, this._fog = new md(13421772, 1, 1e3), this.rainGeometry = new dt(), this.rain = null, this._isGeneratedRain = !1, this.ghostMode = !0, this._batchColors = /* @__PURE__ */ new Map(), this._originalBatchMaterials = /* @__PURE__ */ new Map(), this._batchVisualizationEnabled = !1, this.showHidePercentage = 100, this.randomColor = 100;
53014
52980
  }
53015
52981
  reverseColor() {
53016
52982
  var e, t;
@@ -53066,8 +53032,12 @@ class KI {
53066
53032
  }), e.hideObjects(), this.hiddenInstancedMeshes.push(e);
53067
53033
  }), (this.hiddenMeshes.length > 0 || this.hiddenInstancedMeshes.length > 0) && this.viralViewerApi.viralRenderer.render();
53068
53034
  }
53069
- hide2() {
53070
- this.viralViewerApi.viralMaterialManager.edgeMaterial.opacity = 0.05, this.viralViewerApi.viralScene.mergedModel.hide(), this.viralViewerApi.viralRenderer.render();
53035
+ /**
53036
+ *
53037
+ * @param elements default will get selected elements or we can input specific elements
53038
+ */
53039
+ hide2(e) {
53040
+ this.viralViewerApi.viralScene.mergedModel.hide(), this.viralViewerApi.viralRenderer.render();
53071
53041
  }
53072
53042
  /**
53073
53043
  * @deprecated using isolate2 instead
@@ -53090,12 +53060,27 @@ class KI {
53090
53060
  ), this.viralViewerApi.viralRenderer.render());
53091
53061
  }
53092
53062
  }
53063
+ /**
53064
+ *
53065
+ * @param elements default will get selected elements or we can input specific elements
53066
+ */
53093
53067
  isolate2(e) {
53094
- this.viralViewerApi.viralMaterialManager.edgeMaterial.opacity = 0.05, this.viralViewerApi.viralScene.mergedModel.isolate(e), this.viralViewerApi.viralRenderer.render();
53068
+ if (this.ghostMode) {
53069
+ this.ghostExcept(
53070
+ e || this.viralViewerApi.viralScene.mergedModel.getSelectedElements(),
53071
+ 0.101
53072
+ );
53073
+ return;
53074
+ }
53075
+ this.viralViewerApi.viralScene.mergedModel.isolate(e), this.viralViewerApi.viralRenderer.render();
53095
53076
  }
53096
- zoomTo() {
53077
+ /**
53078
+ *
53079
+ * @param elements default will get selected elements
53080
+ */
53081
+ zoomTo(e) {
53097
53082
  this.viralViewerApi.viralCamera.zoomTo(
53098
- this.viralViewerApi.viralScene.mergedModel.getSelectedElements()
53083
+ e || this.viralViewerApi.viralScene.mergedModel.getSelectedElements()
53099
53084
  );
53100
53085
  }
53101
53086
  //#region change color
@@ -53106,7 +53091,7 @@ class KI {
53106
53091
  * Select elements (replaces current selection)
53107
53092
  */
53108
53093
  selectElements(e) {
53109
- e.length > 0 && (this.viralViewerApi.emit(At.SELECT_ELEMENTS, e), this.viralViewerApi.viralScene.mergedModel.select(
53094
+ e.length > 0 && (this.viralViewerApi.emit(Mt.SELECT_ELEMENTS, e), this.viralViewerApi.viralScene.mergedModel.select(
53110
53095
  e,
53111
53096
  this.exceptElements
53112
53097
  ), this.viralViewerApi.viralRenderer.render());
@@ -53137,7 +53122,7 @@ class KI {
53137
53122
  * Unselect all elements
53138
53123
  */
53139
53124
  unselectElements() {
53140
- this.viralViewerApi.viralScene.mergedModel.unselect();
53125
+ this.viralViewerApi.viralScene.mergedModel.unselect(), this.viralViewerApi.emit(Mt.UNSELECT_ELEMENTS);
53141
53126
  }
53142
53127
  selectAllElements() {
53143
53128
  console.time("⏱️ selectAllElements - gathering elements");
@@ -53504,8 +53489,9 @@ class KI {
53504
53489
  window.innerHeight
53505
53490
  );
53506
53491
  }
53507
- //#endregion
53508
- //#region Element Opacity Control
53492
+ setGhostMode(e) {
53493
+ this.ghostMode = e;
53494
+ }
53509
53495
  /**
53510
53496
  * Set opacity for specific elements
53511
53497
  * @param elements - Elements to set opacity for
@@ -53534,10 +53520,10 @@ class KI {
53534
53520
  * @param ghostOpacity - Opacity for all other elements (default 0.1)
53535
53521
  */
53536
53522
  ghostExcept(e, t = 0.1) {
53537
- this.viralViewerApi.viralScene.mergedModel.ghostExcept(
53523
+ e.length > 0 && (this.viralViewerApi.viralScene.mergedModel.ghostExcept(
53538
53524
  e,
53539
53525
  t
53540
- ), this.viralViewerApi.viralRenderer.render();
53526
+ ), this.viralViewerApi.viralRenderer.render());
53541
53527
  }
53542
53528
  /**
53543
53529
  * Reset all elements to full opacity
@@ -54154,7 +54140,7 @@ class mR {
54154
54140
  `[DataManager] Adding ${i} elements to data tree...`
54155
54141
  );
54156
54142
  const n = new zb();
54157
- n.addElements(e), this.dataTree.push(n), this.viralViewerApi.emit(At.LOADED_DATA, { modelId: this.dataTree.length - 1 }), console.log(
54143
+ n.addElements(e), this.dataTree.push(n), this.viralViewerApi.emit(Mt.LOADED_DATA, { modelId: this.dataTree.length - 1 }), console.log(
54158
54144
  `[DataManager] Data tree created in ${(performance.now() - t).toFixed(2)}ms`
54159
54145
  ), console.log(`[DataManager] Total models loaded: ${this.dataTree.length}`);
54160
54146
  }
@@ -54987,7 +54973,7 @@ class MR {
54987
54973
  }
54988
54974
  ]
54989
54975
  }
54990
- ], this.items = [], this.viralToolAvatar = new bR(this), this.viralToolDarkMode = new yR(this), this.viralToolSunlight = new SR(this), this.viralToolElevation = new _R(this), this.viralToolMeasure = new wR(this), this.viralToolAmbientOcclusion = new xR(this), this.dehydratedCachedData(), this.executeToolsByDefault(), this.injectTools(), this.viralViewerApi.emit(At.LOADED_TOOLS);
54976
+ ], this.items = [], this.viralToolAvatar = new bR(this), this.viralToolDarkMode = new yR(this), this.viralToolSunlight = new SR(this), this.viralToolElevation = new _R(this), this.viralToolMeasure = new wR(this), this.viralToolAmbientOcclusion = new xR(this), this.dehydratedCachedData(), this.executeToolsByDefault(), this.injectTools(), this.viralViewerApi.emit(Mt.LOADED_TOOLS);
54991
54977
  }
54992
54978
  //#region Init
54993
54979
  injectTools() {
@@ -55157,7 +55143,7 @@ class ER {
55157
55143
  addPlanes() {
55158
55144
  const e = this.cubeScale;
55159
55145
  let t = new Ri({
55160
- side: pi,
55146
+ side: fi,
55161
55147
  color: 6659921,
55162
55148
  transparent: !0,
55163
55149
  opacity: 0,
@@ -55489,7 +55475,7 @@ class PR {
55489
55475
  class CR {
55490
55476
  //* view cube from third party (new approach)
55491
55477
  constructor(e, t = 1) {
55492
- this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.cubeScale = 1, this.cubeScale = Math.round(Math.max(0.1, Math.min(1, t)) * 10) / 10, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new ER(this, this.cubeScale), this.cubeRenderer = new TR(this), this.cubeCamera = new AR(this), this.cubeMouse = new PR(this)), this.viralViewerApi.emit(At.LOADED_CUBE);
55478
+ this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.cubeScale = 1, this.cubeScale = Math.round(Math.max(0.1, Math.min(1, t)) * 10) / 10, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new ER(this, this.cubeScale), this.cubeRenderer = new TR(this), this.cubeCamera = new AR(this), this.cubeMouse = new PR(this)), this.viralViewerApi.emit(Mt.LOADED_CUBE);
55493
55479
  }
55494
55480
  injectCubeWrapperElement() {
55495
55481
  if (this.viralViewerApi.targetElement) {
@@ -55739,7 +55725,7 @@ class OR {
55739
55725
  const a = new on({
55740
55726
  vertexColors: !0,
55741
55727
  // Enable vertex coloring
55742
- side: pi,
55728
+ side: fi,
55743
55729
  // Ensure both sides render colors
55744
55730
  opacity: r.opacity,
55745
55731
  transparent: r.transparent,
@@ -55758,14 +55744,14 @@ class OR {
55758
55744
  const o = new Fn(void 0, a);
55759
55745
  o.addBufferElements(i, r.color), o.castShadow = !0, o.receiveShadow = !0, this.viralViewerApi.viralScene.mergedModel.addMergedMesh(o), this.viralViewerApi.options.isDev && Ci.memory("after generate merge mesh");
55760
55746
  }
55761
- }), this.viralViewerApi.options.isDev && Ci.memory("merge model successfully!"), this.viralViewerApi.viralScene.mergedModel.setReady(!0), this.isGeneratingMergeModel = !1, console.log(this.viralViewerApi.viralScene.mergedModel.children), console.log("Time to generate model: ", performance.now() - e), this.viralViewerApi.emit(At.GENERATED_MERGE_MODEL);
55747
+ }), this.viralViewerApi.options.isDev && Ci.memory("merge model successfully!"), this.viralViewerApi.viralScene.mergedModel.setReady(!0), this.isGeneratingMergeModel = !1, console.log(this.viralViewerApi.viralScene.mergedModel.children), console.log("Time to generate model: ", performance.now() - e), this.viralViewerApi.emit(Mt.GENERATED_MERGE_MODEL);
55762
55748
  }
55763
55749
  }
55764
55750
  class NR {
55765
55751
  constructor(e) {
55766
55752
  this.viralViewerApi = e, this.planeEdges = null, this._isGenerated = !1, this.planeMaterial = new Ri({
55767
55753
  color: 16777215,
55768
- side: pi,
55754
+ side: fi,
55769
55755
  transparent: !0,
55770
55756
  opacity: 0.1
55771
55757
  // wireframe: true,
@@ -58547,7 +58533,7 @@ export {
58547
58533
  _i as h,
58548
58534
  Ls as i,
58549
58535
  lo as j,
58550
- At as k,
58536
+ Mt as k,
58551
58537
  _m as l,
58552
58538
  Bb as m,
58553
58539
  wm as n,