vitessce 3.4.1 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { g as bf, R as Ff, O as Wr, P as Xr, S as fa, a as bl, N as Bp, A as jp, V as ye, b as V, c as xo, L as Fl, T as da, d as Up, U as Hp, W as Vp, C as Gp, B as Wp, e as Xp, f as Kp, h as Da, M as po, i as _n, j as Yp, _ as Gn, k as Qp, G as lr, l as $e, m as qp, n as pa, o as Bf, p as jf, q as Zp, r as ar, F as Uf, s as Jp, t as $p, D as eh, u as sr, v as Tn, I as th, w as ka, x as nh, y as rh, z as bi, E as ih, H as go, J as Hf, K as ha, Q as sh, X as oh, Y as ba, Z as Vf, $ as lh, a0 as ah, a1 as Wn, a2 as uh, a3 as ch, a4 as fh, a5 as dh, a6 as Gf, a7 as ph, a8 as Wf, a9 as hh, aa as mh, ab as vo, ac as gh, ad as vh, ae as yh, af as xh, ag as wh, ah as Sh, ai as _h, aj as qr, ak as or, al as Eh, am as zc, an as Th, ao as Ye, ap as Jr, aq as Ah, ar as Ph, as as Xf, at as Fa, au as Ch, av as Mr, aw as Lr, ax as Oc, ay as Mh, az as Dc, aA as ma, aB as Lh, aC as Rh, aD as ga, aE as kc, aF as Ui, aG as dn, aH as Di, aI as Kf, aJ as ne, aK as Nh, aL as Ft, aM as Ih, aN as zh, aO as Oh, aP as Dh } from "./index-2cf5436f.js";
1
+ import { g as kf, R as Ff, O as Wr, P as Xr, S as fa, a as kl, N as Bp, A as jp, V as ye, b as V, c as xo, L as Fl, T as da, d as Up, U as Hp, W as Vp, C as Gp, B as Wp, e as Xp, f as Kp, h as Da, M as po, i as _n, j as Yp, _ as Gn, k as Qp, G as lr, l as $e, m as qp, n as pa, o as Bf, p as jf, q as Zp, r as ar, F as Uf, s as Jp, t as $p, D as eh, u as sr, v as Tn, I as th, w as ba, x as nh, y as rh, z as ki, E as ih, H as go, J as Hf, K as ha, Q as sh, X as oh, Y as ka, Z as Vf, $ as lh, a0 as ah, a1 as Wn, a2 as uh, a3 as ch, a4 as fh, a5 as dh, a6 as Gf, a7 as ph, a8 as Wf, a9 as hh, aa as mh, ab as vo, ac as gh, ad as vh, ae as yh, af as xh, ag as wh, ah as Sh, ai as _h, aj as qr, ak as or, al as Eh, am as zc, an as Th, ao as Ye, ap as Jr, aq as Ah, ar as Ph, as as Xf, at as Fa, au as Ch, av as Mr, aw as Lr, ax as Oc, ay as Mh, az as Dc, aA as ma, aB as Lh, aC as Rh, aD as ga, aE as bc, aF as Ui, aG as dn, aH as Di, aI as Kf, aJ as re, aK as Nh, aL as Ft, aM as Ih, aN as zh, aO as Oh, aP as Dh } from "./index-6aa18601.js";
2
2
  import * as B from "react";
3
- import kh, { useState as ht, useRef as pn, useEffect as Sn, useMemo as bh, forwardRef as Fh } from "react";
3
+ import bh, { useState as ht, useRef as pn, useEffect as Sn, useMemo as kh, forwardRef as Fh } from "react";
4
4
  import "react-dom";
5
5
  var Yf = { exports: {} }, fr = {};
6
6
  /**
@@ -35,9 +35,9 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
35
35
  W.push(J);
36
36
  e:
37
37
  for (; 0 < Z; ) {
38
- var re = Z - 1 >>> 1, ge = W[re];
38
+ var te = Z - 1 >>> 1, ge = W[te];
39
39
  if (0 < l(ge, J))
40
- W[re] = J, W[Z] = ge, Z = re;
40
+ W[te] = J, W[Z] = ge, Z = te;
41
41
  else
42
42
  break e;
43
43
  }
@@ -52,12 +52,12 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
52
52
  if (Z !== J) {
53
53
  W[0] = Z;
54
54
  e:
55
- for (var re = 0, ge = W.length, xe = ge >>> 1; re < xe; ) {
56
- var Fe = 2 * (re + 1) - 1, it = W[Fe], gt = Fe + 1, se = W[gt];
55
+ for (var te = 0, ge = W.length, xe = ge >>> 1; te < xe; ) {
56
+ var Fe = 2 * (te + 1) - 1, it = W[Fe], gt = Fe + 1, se = W[gt];
57
57
  if (0 > l(it, Z))
58
- gt < ge && 0 > l(se, it) ? (W[re] = se, W[gt] = Z, re = gt) : (W[re] = it, W[Fe] = Z, re = Fe);
58
+ gt < ge && 0 > l(se, it) ? (W[te] = se, W[gt] = Z, te = gt) : (W[te] = it, W[Fe] = Z, te = Fe);
59
59
  else if (gt < ge && 0 > l(se, Z))
60
- W[re] = se, W[gt] = Z, re = gt;
60
+ W[te] = se, W[gt] = Z, te = gt;
61
61
  else
62
62
  break e;
63
63
  }
@@ -79,7 +79,7 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
79
79
  return a.now() - d;
80
80
  };
81
81
  }
82
- var f = [], g = [], p = 1, m = null, v = 3, x = !1, _ = !1, A = !1, T = typeof setTimeout == "function" ? setTimeout : null, w = typeof clearTimeout == "function" ? clearTimeout : null, S = typeof setImmediate < "u" ? setImmediate : null;
82
+ var f = [], g = [], p = 1, m = null, v = 3, x = !1, _ = !1, P = !1, T = typeof setTimeout == "function" ? setTimeout : null, w = typeof clearTimeout == "function" ? clearTimeout : null, S = typeof setImmediate < "u" ? setImmediate : null;
83
83
  typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
84
84
  function E(W) {
85
85
  for (var J = r(g); J !== null; ) {
@@ -92,24 +92,24 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
92
92
  J = r(g);
93
93
  }
94
94
  }
95
- function P(W) {
96
- if (A = !1, E(W), !_)
95
+ function A(W) {
96
+ if (P = !1, E(W), !_)
97
97
  if (r(f) !== null)
98
- _ = !0, le(M);
98
+ _ = !0, ae(M);
99
99
  else {
100
100
  var J = r(g);
101
- J !== null && Se(P, J.startTime - W);
101
+ J !== null && Se(A, J.startTime - W);
102
102
  }
103
103
  }
104
104
  function M(W, J) {
105
- _ = !1, A && (A = !1, w(I), I = -1), x = !0;
105
+ _ = !1, P && (P = !1, w(z), z = -1), x = !0;
106
106
  var Z = v;
107
107
  try {
108
- for (E(J), m = r(f); m !== null && (!(m.expirationTime > J) || W && !b()); ) {
109
- var re = m.callback;
110
- if (typeof re == "function") {
108
+ for (E(J), m = r(f); m !== null && (!(m.expirationTime > J) || W && !k()); ) {
109
+ var te = m.callback;
110
+ if (typeof te == "function") {
111
111
  m.callback = null, v = m.priorityLevel;
112
- var ge = re(m.expirationTime <= J);
112
+ var ge = te(m.expirationTime <= J);
113
113
  J = o.unstable_now(), typeof ge == "function" ? m.callback = ge : m === r(f) && i(f), E(J);
114
114
  } else
115
115
  i(f);
@@ -119,21 +119,21 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
119
119
  var xe = !0;
120
120
  else {
121
121
  var Fe = r(g);
122
- Fe !== null && Se(P, Fe.startTime - J), xe = !1;
122
+ Fe !== null && Se(A, Fe.startTime - J), xe = !1;
123
123
  }
124
124
  return xe;
125
125
  } finally {
126
126
  m = null, v = Z, x = !1;
127
127
  }
128
128
  }
129
- var L = !1, R = null, I = -1, k = 5, z = -1;
130
- function b() {
131
- return !(o.unstable_now() - z < k);
129
+ var L = !1, R = null, z = -1, b = 5, I = -1;
130
+ function k() {
131
+ return !(o.unstable_now() - I < b);
132
132
  }
133
133
  function j() {
134
134
  if (R !== null) {
135
135
  var W = o.unstable_now();
136
- z = W;
136
+ I = W;
137
137
  var J = !0;
138
138
  try {
139
139
  J = R(!0, W);
@@ -157,20 +157,20 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
157
157
  G = function() {
158
158
  T(j, 0);
159
159
  };
160
- function le(W) {
160
+ function ae(W) {
161
161
  R = W, L || (L = !0, G());
162
162
  }
163
163
  function Se(W, J) {
164
- I = T(function() {
164
+ z = T(function() {
165
165
  W(o.unstable_now());
166
166
  }, J);
167
167
  }
168
168
  o.unstable_IdlePriority = 5, o.unstable_ImmediatePriority = 1, o.unstable_LowPriority = 4, o.unstable_NormalPriority = 3, o.unstable_Profiling = null, o.unstable_UserBlockingPriority = 2, o.unstable_cancelCallback = function(W) {
169
169
  W.callback = null;
170
170
  }, o.unstable_continueExecution = function() {
171
- _ || x || (_ = !0, le(M));
171
+ _ || x || (_ = !0, ae(M));
172
172
  }, o.unstable_forceFrameRate = function(W) {
173
- 0 > W || 125 < W ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : k = 0 < W ? Math.floor(1e3 / W) : 5;
173
+ 0 > W || 125 < W ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : b = 0 < W ? Math.floor(1e3 / W) : 5;
174
174
  }, o.unstable_getCurrentPriorityLevel = function() {
175
175
  return v;
176
176
  }, o.unstable_getFirstCallbackNode = function() {
@@ -213,8 +213,8 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
213
213
  v = Z;
214
214
  }
215
215
  }, o.unstable_scheduleCallback = function(W, J, Z) {
216
- var re = o.unstable_now();
217
- switch (typeof Z == "object" && Z !== null ? (Z = Z.delay, Z = typeof Z == "number" && 0 < Z ? re + Z : re) : Z = re, W) {
216
+ var te = o.unstable_now();
217
+ switch (typeof Z == "object" && Z !== null ? (Z = Z.delay, Z = typeof Z == "number" && 0 < Z ? te + Z : te) : Z = te, W) {
218
218
  case 1:
219
219
  var ge = -1;
220
220
  break;
@@ -230,8 +230,8 @@ var Kr = Yf.exports, Qf = { exports: {} }, qf = { exports: {} }, Zf = {};
230
230
  default:
231
231
  ge = 5e3;
232
232
  }
233
- return ge = Z + ge, W = { id: p++, callback: J, priorityLevel: W, startTime: Z, expirationTime: ge, sortIndex: -1 }, Z > re ? (W.sortIndex = Z, n(g, W), r(f) === null && W === r(g) && (A ? (w(I), I = -1) : A = !0, Se(P, Z - re))) : (W.sortIndex = ge, n(f, W), _ || x || (_ = !0, le(M))), W;
234
- }, o.unstable_shouldYield = b, o.unstable_wrapCallback = function(W) {
233
+ return ge = Z + ge, W = { id: p++, callback: J, priorityLevel: W, startTime: Z, expirationTime: ge, sortIndex: -1 }, Z > te ? (W.sortIndex = Z, n(g, W), r(f) === null && W === r(g) && (P ? (w(z), z = -1) : P = !0, Se(A, Z - te))) : (W.sortIndex = ge, n(f, W), _ || x || (_ = !0, ae(M))), W;
234
+ }, o.unstable_shouldYield = k, o.unstable_wrapCallback = function(W) {
235
235
  var J = v;
236
236
  return function() {
237
237
  var Z = v;
@@ -256,13 +256,13 @@ var va = qf.exports;
256
256
  * LICENSE file in the root directory of this source tree.
257
257
  */
258
258
  var Bh = function(n) {
259
- var r = {}, i = kh, l = va, u = Object.assign;
259
+ var r = {}, i = bh, l = va, u = Object.assign;
260
260
  function a(e) {
261
261
  for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, s = 1; s < arguments.length; s++)
262
262
  t += "&args[]=" + encodeURIComponent(arguments[s]);
263
263
  return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
264
264
  }
265
- var d = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, f = Symbol.for("react.element"), g = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), _ = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), M = Symbol.iterator;
265
+ var d = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, f = Symbol.for("react.element"), g = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), _ = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), A = Symbol.for("react.offscreen"), M = Symbol.iterator;
266
266
  function L(e) {
267
267
  return e === null || typeof e != "object" ? null : (e = M && e[M] || e["@@iterator"], typeof e == "function" ? e : null);
268
268
  }
@@ -293,7 +293,7 @@ var Bh = function(n) {
293
293
  return (e.displayName || "Context") + ".Consumer";
294
294
  case x:
295
295
  return (e._context.displayName || "Context") + ".Provider";
296
- case A:
296
+ case P:
297
297
  var t = e.render;
298
298
  return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
299
299
  case S:
@@ -307,7 +307,7 @@ var Bh = function(n) {
307
307
  }
308
308
  return null;
309
309
  }
310
- function I(e) {
310
+ function z(e) {
311
311
  var t = e.type;
312
312
  switch (e.tag) {
313
313
  case 24:
@@ -359,7 +359,7 @@ var Bh = function(n) {
359
359
  }
360
360
  return null;
361
361
  }
362
- function k(e) {
362
+ function b(e) {
363
363
  var t = e, s = e;
364
364
  if (e.alternate)
365
365
  for (; t.return; )
@@ -372,14 +372,14 @@ var Bh = function(n) {
372
372
  }
373
373
  return t.tag === 3 ? s : null;
374
374
  }
375
- function z(e) {
376
- if (k(e) !== e)
375
+ function I(e) {
376
+ if (b(e) !== e)
377
377
  throw Error(a(188));
378
378
  }
379
- function b(e) {
379
+ function k(e) {
380
380
  var t = e.alternate;
381
381
  if (!t) {
382
- if (t = k(e), t === null)
382
+ if (t = b(e), t === null)
383
383
  throw Error(a(188));
384
384
  return t !== e ? null : e;
385
385
  }
@@ -398,9 +398,9 @@ var Bh = function(n) {
398
398
  if (h.child === y.child) {
399
399
  for (y = h.child; y; ) {
400
400
  if (y === s)
401
- return z(h), e;
401
+ return I(h), e;
402
402
  if (y === c)
403
- return z(h), t;
403
+ return I(h), t;
404
404
  y = y.sibling;
405
405
  }
406
406
  throw Error(a(188));
@@ -443,7 +443,7 @@ var Bh = function(n) {
443
443
  return s.stateNode.current === s ? e : t;
444
444
  }
445
445
  function j(e) {
446
- return e = b(e), e !== null ? G(e) : null;
446
+ return e = k(e), e !== null ? G(e) : null;
447
447
  }
448
448
  function G(e) {
449
449
  if (e.tag === 5 || e.tag === 6)
@@ -469,7 +469,7 @@ var Bh = function(n) {
469
469
  }
470
470
  return null;
471
471
  }
472
- var ee = Array.isArray, le = n.getPublicInstance, Se = n.getRootHostContext, W = n.getChildHostContext, J = n.prepareForCommit, Z = n.resetAfterCommit, re = n.createInstance, ge = n.appendInitialChild, xe = n.finalizeInitialChildren, Fe = n.prepareUpdate, it = n.shouldSetTextContent, gt = n.createTextInstance, se = n.scheduleTimeout, ue = n.cancelTimeout, ce = n.noTimeout, Me = n.isPrimaryRenderer, Pe = n.supportsMutation, Ve = n.supportsPersistence, de = n.supportsHydration, Ie = n.getInstanceFromNode, st = n.preparePortalMount, vt = n.getCurrentEventPriority, Vi = n.detachDeletedInstance, Gi = n.supportsMicrotasks, _o = n.scheduleMicrotask, Kn = n.supportsTestSelectors, Wi = n.findFiberRoot, ei = n.getBoundingRect, ti = n.getTextContent, An = n.isHiddenSubtree, Eo = n.matchAccessibilityRole, To = n.setFocusIfFocusable, Xi = n.setupIntersectionObserver, ni = n.appendChild, Ao = n.appendChildToContainer, Po = n.commitTextUpdate, Ki = n.commitMount, Co = n.commitUpdate, Yi = n.insertBefore, Qi = n.insertInContainerBefore, ri = n.removeChild, D = n.removeChildFromContainer, K = n.resetTextContent, ae = n.hideInstance, _e = n.hideTextInstance, Ge = n.unhideInstance, Wt = n.unhideTextInstance, $t = n.clearContainer, qa = n.cloneInstance, ii = n.createContainerChildSet, Lt = n.appendChildToContainerChildSet, Xt = n.finalizeContainerChildren, Pn = n.replaceContainerChildren, Cn = n.cloneHiddenInstance, Mn = n.cloneHiddenTextInstance, pr = n.canHydrateInstance, Nd = n.canHydrateTextInstance, Id = n.canHydrateSuspenseInstance, Za = n.isSuspenseInstancePending, Mo = n.isSuspenseInstanceFallback, zd = n.registerSuspenseInstanceRetry, si = n.getNextHydratableSibling, Od = n.getFirstHydratableChild, Dd = n.getFirstHydratableChildWithinContainer, kd = n.getFirstHydratableChildWithinSuspenseInstance, bd = n.hydrateInstance, Fd = n.hydrateTextInstance, Bd = n.hydrateSuspenseInstance, jd = n.getNextHydratableInstanceAfterSuspenseInstance, Ja = n.commitHydratedContainer, Ud = n.commitHydratedSuspenseInstance, Hd = n.clearSuspenseBoundary, Vd = n.clearSuspenseBoundaryFromContainer, Gd = n.shouldDeleteUnhydratedTailInstances, Wd = n.didNotMatchHydratedContainerTextInstance, Xd = n.didNotMatchHydratedTextInstance, Lo;
472
+ var ee = Array.isArray, ae = n.getPublicInstance, Se = n.getRootHostContext, W = n.getChildHostContext, J = n.prepareForCommit, Z = n.resetAfterCommit, te = n.createInstance, ge = n.appendInitialChild, xe = n.finalizeInitialChildren, Fe = n.prepareUpdate, it = n.shouldSetTextContent, gt = n.createTextInstance, se = n.scheduleTimeout, fe = n.cancelTimeout, le = n.noTimeout, Me = n.isPrimaryRenderer, Pe = n.supportsMutation, Ve = n.supportsPersistence, ue = n.supportsHydration, Ie = n.getInstanceFromNode, st = n.preparePortalMount, vt = n.getCurrentEventPriority, Vi = n.detachDeletedInstance, Gi = n.supportsMicrotasks, _o = n.scheduleMicrotask, Kn = n.supportsTestSelectors, Wi = n.findFiberRoot, ei = n.getBoundingRect, ti = n.getTextContent, An = n.isHiddenSubtree, Eo = n.matchAccessibilityRole, To = n.setFocusIfFocusable, Xi = n.setupIntersectionObserver, ni = n.appendChild, Ao = n.appendChildToContainer, Po = n.commitTextUpdate, Ki = n.commitMount, Co = n.commitUpdate, Yi = n.insertBefore, Qi = n.insertInContainerBefore, ri = n.removeChild, D = n.removeChildFromContainer, K = n.resetTextContent, ce = n.hideInstance, _e = n.hideTextInstance, Ge = n.unhideInstance, Wt = n.unhideTextInstance, $t = n.clearContainer, qa = n.cloneInstance, ii = n.createContainerChildSet, Lt = n.appendChildToContainerChildSet, Xt = n.finalizeContainerChildren, Pn = n.replaceContainerChildren, Cn = n.cloneHiddenInstance, Mn = n.cloneHiddenTextInstance, pr = n.canHydrateInstance, Nd = n.canHydrateTextInstance, Id = n.canHydrateSuspenseInstance, Za = n.isSuspenseInstancePending, Mo = n.isSuspenseInstanceFallback, zd = n.registerSuspenseInstanceRetry, si = n.getNextHydratableSibling, Od = n.getFirstHydratableChild, Dd = n.getFirstHydratableChildWithinContainer, bd = n.getFirstHydratableChildWithinSuspenseInstance, kd = n.hydrateInstance, Fd = n.hydrateTextInstance, Bd = n.hydrateSuspenseInstance, jd = n.getNextHydratableInstanceAfterSuspenseInstance, Ja = n.commitHydratedContainer, Ud = n.commitHydratedSuspenseInstance, Hd = n.clearSuspenseBoundary, Vd = n.clearSuspenseBoundaryFromContainer, Gd = n.shouldDeleteUnhydratedTailInstances, Wd = n.didNotMatchHydratedContainerTextInstance, Xd = n.didNotMatchHydratedTextInstance, Lo;
473
473
  function oi(e) {
474
474
  if (Lo === void 0)
475
475
  try {
@@ -582,7 +582,7 @@ var Bh = function(n) {
582
582
  c = c.getChildContext();
583
583
  for (var h in c)
584
584
  if (!(h in t))
585
- throw Error(a(108, I(e) || "Unknown", h));
585
+ throw Error(a(108, z(e) || "Unknown", h));
586
586
  return u({}, s, c);
587
587
  }
588
588
  function Zi(e) {
@@ -745,7 +745,7 @@ var Bh = function(n) {
745
745
  function nu(e) {
746
746
  return e &= -e, 1 < e ? 4 < e ? e & 268435455 ? 16 : 536870912 : 4 : 1;
747
747
  }
748
- var ko = l.unstable_scheduleCallback, ru = l.unstable_cancelCallback, ep = l.unstable_shouldYield, tp = l.unstable_requestPaint, qe = l.unstable_now, bo = l.unstable_ImmediatePriority, np = l.unstable_UserBlockingPriority, Fo = l.unstable_NormalPriority, rp = l.unstable_IdlePriority, ts = null, en = null;
748
+ var bo = l.unstable_scheduleCallback, ru = l.unstable_cancelCallback, ep = l.unstable_shouldYield, tp = l.unstable_requestPaint, qe = l.unstable_now, ko = l.unstable_ImmediatePriority, np = l.unstable_UserBlockingPriority, Fo = l.unstable_NormalPriority, rp = l.unstable_IdlePriority, ts = null, en = null;
749
749
  function ip(e) {
750
750
  if (en && typeof en.onCommitFiberRoot == "function")
751
751
  try {
@@ -777,7 +777,7 @@ var Bh = function(n) {
777
777
  }
778
778
  hn = null, ns = !1;
779
779
  } catch (h) {
780
- throw hn !== null && (hn = hn.slice(e + 1)), ko(bo, nn), h;
780
+ throw hn !== null && (hn = hn.slice(e + 1)), bo(ko, nn), h;
781
781
  } finally {
782
782
  Ee = t, Bo = !1;
783
783
  }
@@ -982,7 +982,7 @@ var Bh = function(n) {
982
982
  t = e.memoizedState, s = s(c, t), s = s == null ? t : u({}, t, s), e.memoizedState = s, e.lanes === 0 && (e.updateQueue.baseState = s);
983
983
  }
984
984
  var as = { isMounted: function(e) {
985
- return (e = e._reactInternals) ? k(e) === e : !1;
985
+ return (e = e._reactInternals) ? b(e) === e : !1;
986
986
  }, enqueueSetState: function(e, t, s) {
987
987
  e = e._reactInternals;
988
988
  var c = pt(), h = Dn(e), y = mn(c, h);
@@ -1043,7 +1043,7 @@ var Bh = function(n) {
1043
1043
  }
1044
1044
  var Tt = null, At = null, ze = !1, ui = !1, Qt = null;
1045
1045
  function hu(e, t) {
1046
- var s = kt(5, null, null, 0);
1046
+ var s = bt(5, null, null, 0);
1047
1047
  s.elementType = "DELETED", s.stateNode = t, s.return = e, t = e.deletions, t === null ? (e.deletions = [s], e.flags |= 16) : t.push(s);
1048
1048
  }
1049
1049
  function mu(e, t) {
@@ -1055,7 +1055,7 @@ var Bh = function(n) {
1055
1055
  case 13:
1056
1056
  if (t = Id(t), t !== null) {
1057
1057
  var s = Qn !== null ? { id: gn, overflow: vn } : null;
1058
- return e.memoizedState = { dehydrated: t, treeContext: s, retryLane: 1073741824 }, s = kt(18, null, null, 0), s.stateNode = t, s.return = e, e.child = s, Tt = e, At = null, !0;
1058
+ return e.memoizedState = { dehydrated: t, treeContext: s, retryLane: 1073741824 }, s = bt(18, null, null, 0), s.stateNode = t, s.return = e, e.child = s, Tt = e, At = null, !0;
1059
1059
  }
1060
1060
  return !1;
1061
1061
  default:
@@ -1090,7 +1090,7 @@ var Bh = function(n) {
1090
1090
  Tt = e;
1091
1091
  }
1092
1092
  function ci(e) {
1093
- if (!de || e !== Tt)
1093
+ if (!ue || e !== Tt)
1094
1094
  return !1;
1095
1095
  if (!ze)
1096
1096
  return gu(e), ze = !0, !1;
@@ -1107,7 +1107,7 @@ var Bh = function(n) {
1107
1107
  }
1108
1108
  }
1109
1109
  if (gu(e), e.tag === 13) {
1110
- if (!de)
1110
+ if (!ue)
1111
1111
  throw Error(a(316));
1112
1112
  if (e = e.memoizedState, e = e !== null ? e.dehydrated : null, !e)
1113
1113
  throw Error(a(317));
@@ -1117,7 +1117,7 @@ var Bh = function(n) {
1117
1117
  return !0;
1118
1118
  }
1119
1119
  function wr() {
1120
- de && (At = Tt = null, ui = ze = !1);
1120
+ ue && (At = Tt = null, ui = ze = !1);
1121
1121
  }
1122
1122
  function Zo(e) {
1123
1123
  Qt === null ? Qt = [e] : Qt.push(e);
@@ -1172,7 +1172,7 @@ var Bh = function(n) {
1172
1172
  return F;
1173
1173
  }
1174
1174
  function h(F, O) {
1175
- return F = bn(F, O), F.index = 0, F.sibling = null, F;
1175
+ return F = kn(F, O), F.index = 0, F.sibling = null, F;
1176
1176
  }
1177
1177
  function y(F, O, U) {
1178
1178
  return F.index = U, e ? (U = F.alternate, U !== null ? (U = U.index, U < O ? (F.flags |= 2, O) : U) : (F.flags |= 2, O)) : (F.flags |= 1048576, O);
@@ -1184,14 +1184,14 @@ var Bh = function(n) {
1184
1184
  return O === null || O.tag !== 6 ? (O = Ol(U, F.mode, q), O.return = F, O) : (O = h(O, U), O.return = F, O);
1185
1185
  }
1186
1186
  function H(F, O, U, q) {
1187
- var te = U.type;
1188
- return te === p ? $(F, O, U.props.children, q, U.key) : O !== null && (O.elementType === te || typeof te == "object" && te !== null && te.$$typeof === E && vu(te) === O.type) ? (q = h(O, U.props), q.ref = fi(F, O, U), q.return = F, q) : (q = Hs(U.type, U.key, U.props, null, F.mode, q), q.ref = fi(F, O, U), q.return = F, q);
1187
+ var ne = U.type;
1188
+ return ne === p ? $(F, O, U.props.children, q, U.key) : O !== null && (O.elementType === ne || typeof ne == "object" && ne !== null && ne.$$typeof === E && vu(ne) === O.type) ? (q = h(O, U.props), q.ref = fi(F, O, U), q.return = F, q) : (q = Hs(U.type, U.key, U.props, null, F.mode, q), q.ref = fi(F, O, U), q.return = F, q);
1189
1189
  }
1190
1190
  function X(F, O, U, q) {
1191
1191
  return O === null || O.tag !== 4 || O.stateNode.containerInfo !== U.containerInfo || O.stateNode.implementation !== U.implementation ? (O = Dl(U, F.mode, q), O.return = F, O) : (O = h(O, U.children || []), O.return = F, O);
1192
1192
  }
1193
- function $(F, O, U, q, te) {
1194
- return O === null || O.tag !== 7 ? (O = rr(U, F.mode, q, te), O.return = F, O) : (O = h(O, U), O.return = F, O);
1193
+ function $(F, O, U, q, ne) {
1194
+ return O === null || O.tag !== 7 ? (O = rr(U, F.mode, q, ne), O.return = F, O) : (O = h(O, U), O.return = F, O);
1195
1195
  }
1196
1196
  function pe(F, O, U) {
1197
1197
  if (typeof O == "string" && O !== "" || typeof O == "number")
@@ -1213,115 +1213,115 @@ var Bh = function(n) {
1213
1213
  return null;
1214
1214
  }
1215
1215
  function oe(F, O, U, q) {
1216
- var te = O !== null ? O.key : null;
1216
+ var ne = O !== null ? O.key : null;
1217
1217
  if (typeof U == "string" && U !== "" || typeof U == "number")
1218
- return te !== null ? null : N(F, O, "" + U, q);
1218
+ return ne !== null ? null : N(F, O, "" + U, q);
1219
1219
  if (typeof U == "object" && U !== null) {
1220
1220
  switch (U.$$typeof) {
1221
1221
  case f:
1222
- return U.key === te ? H(F, O, U, q) : null;
1222
+ return U.key === ne ? H(F, O, U, q) : null;
1223
1223
  case g:
1224
- return U.key === te ? X(F, O, U, q) : null;
1224
+ return U.key === ne ? X(F, O, U, q) : null;
1225
1225
  case E:
1226
- return te = U._init, oe(
1226
+ return ne = U._init, oe(
1227
1227
  F,
1228
1228
  O,
1229
- te(U._payload),
1229
+ ne(U._payload),
1230
1230
  q
1231
1231
  );
1232
1232
  }
1233
1233
  if (ee(U) || L(U))
1234
- return te !== null ? null : $(F, O, U, q, null);
1234
+ return ne !== null ? null : $(F, O, U, q, null);
1235
1235
  fs(F, U);
1236
1236
  }
1237
1237
  return null;
1238
1238
  }
1239
- function Ce(F, O, U, q, te) {
1239
+ function Ce(F, O, U, q, ne) {
1240
1240
  if (typeof q == "string" && q !== "" || typeof q == "number")
1241
- return F = F.get(U) || null, N(O, F, "" + q, te);
1241
+ return F = F.get(U) || null, N(O, F, "" + q, ne);
1242
1242
  if (typeof q == "object" && q !== null) {
1243
1243
  switch (q.$$typeof) {
1244
1244
  case f:
1245
- return F = F.get(q.key === null ? U : q.key) || null, H(O, F, q, te);
1245
+ return F = F.get(q.key === null ? U : q.key) || null, H(O, F, q, ne);
1246
1246
  case g:
1247
- return F = F.get(q.key === null ? U : q.key) || null, X(O, F, q, te);
1247
+ return F = F.get(q.key === null ? U : q.key) || null, X(O, F, q, ne);
1248
1248
  case E:
1249
1249
  var me = q._init;
1250
- return Ce(F, O, U, me(q._payload), te);
1250
+ return Ce(F, O, U, me(q._payload), ne);
1251
1251
  }
1252
1252
  if (ee(q) || L(q))
1253
- return F = F.get(U) || null, $(O, F, q, te, null);
1253
+ return F = F.get(U) || null, $(O, F, q, ne, null);
1254
1254
  fs(O, q);
1255
1255
  }
1256
1256
  return null;
1257
1257
  }
1258
1258
  function ie(F, O, U, q) {
1259
- for (var te = null, me = null, he = O, Te = O = 0, Je = null; he !== null && Te < U.length; Te++) {
1259
+ for (var ne = null, me = null, he = O, Te = O = 0, Je = null; he !== null && Te < U.length; Te++) {
1260
1260
  he.index > Te ? (Je = he, he = null) : Je = he.sibling;
1261
1261
  var Ae = oe(F, he, U[Te], q);
1262
1262
  if (Ae === null) {
1263
1263
  he === null && (he = Je);
1264
1264
  break;
1265
1265
  }
1266
- e && he && Ae.alternate === null && t(F, he), O = y(Ae, O, Te), me === null ? te = Ae : me.sibling = Ae, me = Ae, he = Je;
1266
+ e && he && Ae.alternate === null && t(F, he), O = y(Ae, O, Te), me === null ? ne = Ae : me.sibling = Ae, me = Ae, he = Je;
1267
1267
  }
1268
1268
  if (Te === U.length)
1269
- return s(F, he), ze && qn(F, Te), te;
1269
+ return s(F, he), ze && qn(F, Te), ne;
1270
1270
  if (he === null) {
1271
1271
  for (; Te < U.length; Te++)
1272
- he = pe(F, U[Te], q), he !== null && (O = y(he, O, Te), me === null ? te = he : me.sibling = he, me = he);
1273
- return ze && qn(F, Te), te;
1272
+ he = pe(F, U[Te], q), he !== null && (O = y(he, O, Te), me === null ? ne = he : me.sibling = he, me = he);
1273
+ return ze && qn(F, Te), ne;
1274
1274
  }
1275
1275
  for (he = c(F, he); Te < U.length; Te++)
1276
- Je = Ce(he, F, Te, U[Te], q), Je !== null && (e && Je.alternate !== null && he.delete(Je.key === null ? Te : Je.key), O = y(Je, O, Te), me === null ? te = Je : me.sibling = Je, me = Je);
1276
+ Je = Ce(he, F, Te, U[Te], q), Je !== null && (e && Je.alternate !== null && he.delete(Je.key === null ? Te : Je.key), O = y(Je, O, Te), me === null ? ne = Je : me.sibling = Je, me = Je);
1277
1277
  return e && he.forEach(function(Fn) {
1278
1278
  return t(F, Fn);
1279
- }), ze && qn(F, Te), te;
1279
+ }), ze && qn(F, Te), ne;
1280
1280
  }
1281
1281
  function ct(F, O, U, q) {
1282
- var te = L(U);
1283
- if (typeof te != "function")
1282
+ var ne = L(U);
1283
+ if (typeof ne != "function")
1284
1284
  throw Error(a(150));
1285
- if (U = te.call(U), U == null)
1285
+ if (U = ne.call(U), U == null)
1286
1286
  throw Error(a(151));
1287
- for (var me = te = null, he = O, Te = O = 0, Je = null, Ae = U.next(); he !== null && !Ae.done; Te++, Ae = U.next()) {
1287
+ for (var me = ne = null, he = O, Te = O = 0, Je = null, Ae = U.next(); he !== null && !Ae.done; Te++, Ae = U.next()) {
1288
1288
  he.index > Te ? (Je = he, he = null) : Je = he.sibling;
1289
1289
  var Fn = oe(F, he, Ae.value, q);
1290
1290
  if (Fn === null) {
1291
1291
  he === null && (he = Je);
1292
1292
  break;
1293
1293
  }
1294
- e && he && Fn.alternate === null && t(F, he), O = y(Fn, O, Te), me === null ? te = Fn : me.sibling = Fn, me = Fn, he = Je;
1294
+ e && he && Fn.alternate === null && t(F, he), O = y(Fn, O, Te), me === null ? ne = Fn : me.sibling = Fn, me = Fn, he = Je;
1295
1295
  }
1296
1296
  if (Ae.done)
1297
1297
  return s(
1298
1298
  F,
1299
1299
  he
1300
- ), ze && qn(F, Te), te;
1300
+ ), ze && qn(F, Te), ne;
1301
1301
  if (he === null) {
1302
1302
  for (; !Ae.done; Te++, Ae = U.next())
1303
- Ae = pe(F, Ae.value, q), Ae !== null && (O = y(Ae, O, Te), me === null ? te = Ae : me.sibling = Ae, me = Ae);
1304
- return ze && qn(F, Te), te;
1303
+ Ae = pe(F, Ae.value, q), Ae !== null && (O = y(Ae, O, Te), me === null ? ne = Ae : me.sibling = Ae, me = Ae);
1304
+ return ze && qn(F, Te), ne;
1305
1305
  }
1306
1306
  for (he = c(F, he); !Ae.done; Te++, Ae = U.next())
1307
- Ae = Ce(he, F, Te, Ae.value, q), Ae !== null && (e && Ae.alternate !== null && he.delete(Ae.key === null ? Te : Ae.key), O = y(Ae, O, Te), me === null ? te = Ae : me.sibling = Ae, me = Ae);
1307
+ Ae = Ce(he, F, Te, Ae.value, q), Ae !== null && (e && Ae.alternate !== null && he.delete(Ae.key === null ? Te : Ae.key), O = y(Ae, O, Te), me === null ? ne = Ae : me.sibling = Ae, me = Ae);
1308
1308
  return e && he.forEach(function(Fp) {
1309
1309
  return t(F, Fp);
1310
- }), ze && qn(F, Te), te;
1310
+ }), ze && qn(F, Te), ne;
1311
1311
  }
1312
- function bt(F, O, U, q) {
1312
+ function kt(F, O, U, q) {
1313
1313
  if (typeof U == "object" && U !== null && U.type === p && U.key === null && (U = U.props.children), typeof U == "object" && U !== null) {
1314
1314
  switch (U.$$typeof) {
1315
1315
  case f:
1316
1316
  e: {
1317
- for (var te = U.key, me = O; me !== null; ) {
1318
- if (me.key === te) {
1319
- if (te = U.type, te === p) {
1317
+ for (var ne = U.key, me = O; me !== null; ) {
1318
+ if (me.key === ne) {
1319
+ if (ne = U.type, ne === p) {
1320
1320
  if (me.tag === 7) {
1321
1321
  s(F, me.sibling), O = h(me, U.props.children), O.return = F, F = O;
1322
1322
  break e;
1323
1323
  }
1324
- } else if (me.elementType === te || typeof te == "object" && te !== null && te.$$typeof === E && vu(te) === me.type) {
1324
+ } else if (me.elementType === ne || typeof ne == "object" && ne !== null && ne.$$typeof === E && vu(ne) === me.type) {
1325
1325
  s(F, me.sibling), O = h(me, U.props), O.ref = fi(F, me, U), O.return = F, F = O;
1326
1326
  break e;
1327
1327
  }
@@ -1353,7 +1353,7 @@ var Bh = function(n) {
1353
1353
  }
1354
1354
  return C(F);
1355
1355
  case E:
1356
- return me = U._init, bt(F, O, me(U._payload), q);
1356
+ return me = U._init, kt(F, O, me(U._payload), q);
1357
1357
  }
1358
1358
  if (ee(U))
1359
1359
  return ie(F, O, U, q);
@@ -1363,7 +1363,7 @@ var Bh = function(n) {
1363
1363
  }
1364
1364
  return typeof U == "string" && U !== "" || typeof U == "number" ? (U = "" + U, O !== null && O.tag === 6 ? (s(F, O.sibling), O = h(O, U), O.return = F, F = O) : (s(F, O), O = Ol(U, F.mode, q), O.return = F, F = O), C(F)) : s(F, O);
1365
1365
  }
1366
- return bt;
1366
+ return kt;
1367
1367
  }
1368
1368
  var Sr = yu(!0), xu = yu(!1), di = {}, zt = Ln(di), pi = Ln(di), _r = Ln(di);
1369
1369
  function sn(e) {
@@ -1642,14 +1642,14 @@ var Bh = function(n) {
1642
1642
  }
1643
1643
  function fp(e, t, s) {
1644
1644
  var c = Dn(e);
1645
- s = { lane: c, action: s, hasEagerState: !1, eagerState: null, next: null }, Du(e) ? ku(t, s) : (bu(e, t, s), s = pt(), e = Dt(e, c, s), e !== null && Fu(e, t, c));
1645
+ s = { lane: c, action: s, hasEagerState: !1, eagerState: null, next: null }, Du(e) ? bu(t, s) : (ku(e, t, s), s = pt(), e = Dt(e, c, s), e !== null && Fu(e, t, c));
1646
1646
  }
1647
1647
  function dp(e, t, s) {
1648
1648
  var c = Dn(e), h = { lane: c, action: s, hasEagerState: !1, eagerState: null, next: null };
1649
1649
  if (Du(e))
1650
- ku(t, h);
1650
+ bu(t, h);
1651
1651
  else {
1652
- bu(e, t, h);
1652
+ ku(e, t, h);
1653
1653
  var y = e.alternate;
1654
1654
  if (e.lanes === 0 && (y === null || y.lanes === 0) && (y = t.lastRenderedReducer, y !== null))
1655
1655
  try {
@@ -1666,12 +1666,12 @@ var Bh = function(n) {
1666
1666
  var t = e.alternate;
1667
1667
  return e === Be || t !== null && t === Be;
1668
1668
  }
1669
- function ku(e, t) {
1669
+ function bu(e, t) {
1670
1670
  hi = hs = !0;
1671
1671
  var s = e.pending;
1672
1672
  s === null ? t.next = t : (t.next = s.next, s.next = t), e.pending = t;
1673
1673
  }
1674
- function bu(e, t, s) {
1674
+ function ku(e, t, s) {
1675
1675
  We !== null && e.mode & 1 && !(ve & 2) ? (e = t.interleaved, e === null ? (s.next = s, rn === null ? rn = [t] : rn.push(t)) : (s.next = e.next, e.next = s), t.interleaved = s) : (e = t.pending, e === null ? s.next = s : (s.next = e.next, e.next = s), t.pending = s);
1676
1676
  }
1677
1677
  function Fu(e, t, s) {
@@ -2054,11 +2054,11 @@ Error generating stack: ` + y.message + `
2054
2054
  return ut(t), null;
2055
2055
  }
2056
2056
  if (e = sn(zt.current), ci(t)) {
2057
- if (!de)
2057
+ if (!ue)
2058
2058
  throw Error(a(175));
2059
- e = bd(t.stateNode, t.type, t.memoizedProps, s, e, t, !ui), t.updateQueue = e, e !== null && ln(t);
2059
+ e = kd(t.stateNode, t.type, t.memoizedProps, s, e, t, !ui), t.updateQueue = e, e !== null && ln(t);
2060
2060
  } else {
2061
- var y = re(h, c, s, e, t);
2061
+ var y = te(h, c, s, e, t);
2062
2062
  yi(y, t, !1, !1), t.stateNode = y, xe(y, h, c, s, e) && ln(t);
2063
2063
  }
2064
2064
  t.ref !== null && (t.flags |= 512, t.flags |= 2097152);
@@ -2071,7 +2071,7 @@ Error generating stack: ` + y.message + `
2071
2071
  if (typeof c != "string" && t.stateNode === null)
2072
2072
  throw Error(a(166));
2073
2073
  if (e = sn(_r.current), s = sn(zt.current), ci(t)) {
2074
- if (!de)
2074
+ if (!ue)
2075
2075
  throw Error(a(176));
2076
2076
  if (e = t.stateNode, c = t.memoizedProps, (s = Fd(e, c, t, !ui)) && (h = Tt, h !== null))
2077
2077
  switch (y = (h.mode & 1) !== 0, h.tag) {
@@ -2096,7 +2096,7 @@ Error generating stack: ` + y.message + `
2096
2096
  if (c = ci(t), e === null) {
2097
2097
  if (!c)
2098
2098
  throw Error(a(318));
2099
- if (!de)
2099
+ if (!ue)
2100
2100
  throw Error(a(344));
2101
2101
  if (e = t.memoizedState, e = e !== null ? e.dehydrated : null, !e)
2102
2102
  throw Error(a(317));
@@ -2169,7 +2169,7 @@ Error generating stack: ` + y.message + `
2169
2169
  if (s = s.compare, s = s !== null ? s : rs, s(C, c) && e.ref === t.ref)
2170
2170
  return xn(e, t, h);
2171
2171
  }
2172
- return t.flags |= 1, e = bn(y, c), e.ref = t.ref, e.return = t, t.child = e;
2172
+ return t.flags |= 1, e = kn(y, c), e.ref = t.ref, e.return = t, t.child = e;
2173
2173
  }
2174
2174
  function Yu(e, t, s, c, h) {
2175
2175
  if (e !== null && rs(e.memoizedProps, c) && e.ref === t.ref)
@@ -2309,7 +2309,7 @@ Error generating stack: ` + y.message + `
2309
2309
  }
2310
2310
  Il(), t = Ts(e, t, s, Error(a(421)));
2311
2311
  } else
2312
- Za(N) ? (t.flags |= 128, t.child = e.child, t = Np.bind(null, e), zd(N, t), t = null) : (s = h.treeContext, de && (At = kd(N), Tt = t, ze = !0, Qt = null, ui = !1, s !== null && (Nt[It++] = gn, Nt[It++] = vn, Nt[It++] = Qn, gn = s.id, vn = s.overflow, Qn = t)), t = dl(t, t.pendingProps.children), t.flags |= 4096);
2312
+ Za(N) ? (t.flags |= 128, t.child = e.child, t = Np.bind(null, e), zd(N, t), t = null) : (s = h.treeContext, ue && (At = bd(N), Tt = t, ze = !0, Qt = null, ui = !1, s !== null && (Nt[It++] = gn, Nt[It++] = vn, Nt[It++] = Qn, gn = s.id, vn = s.overflow, Qn = t)), t = dl(t, t.pendingProps.children), t.flags |= 4096);
2313
2313
  return t;
2314
2314
  }
2315
2315
  return y ? (c = nc(e, t, c.children, c.fallback, s), y = t.child, h = e.child.memoizedState, y.memoizedState = h === null ? Es(s) : { baseLanes: h.baseLanes | s, cachePool: null }, y.childLanes = e.childLanes & ~s, t.memoizedState = _s, c) : (s = tc(e, t, c.children, s), t.memoizedState = null, s);
@@ -2321,13 +2321,13 @@ Error generating stack: ` + y.message + `
2321
2321
  }
2322
2322
  function tc(e, t, s, c) {
2323
2323
  var h = e.child;
2324
- return e = h.sibling, s = bn(h, { mode: "visible", children: s }), !(t.mode & 1) && (s.lanes = c), s.return = t, s.sibling = null, e !== null && (c = t.deletions, c === null ? (t.deletions = [e], t.flags |= 16) : c.push(e)), t.child = s;
2324
+ return e = h.sibling, s = kn(h, { mode: "visible", children: s }), !(t.mode & 1) && (s.lanes = c), s.return = t, s.sibling = null, e !== null && (c = t.deletions, c === null ? (t.deletions = [e], t.flags |= 16) : c.push(e)), t.child = s;
2325
2325
  }
2326
2326
  function nc(e, t, s, c, h) {
2327
2327
  var y = t.mode;
2328
2328
  e = e.child;
2329
2329
  var C = e.sibling, N = { mode: "hidden", children: s };
2330
- return !(y & 1) && t.child !== e ? (s = t.child, s.childLanes = 0, s.pendingProps = N, t.deletions = null) : (s = bn(e, N), s.subtreeFlags = e.subtreeFlags & 14680064), C !== null ? c = bn(C, c) : (c = rr(c, y, h, null), c.flags |= 2), c.return = t, s.return = t, s.sibling = c, t.child = s, c;
2330
+ return !(y & 1) && t.child !== e ? (s = t.child, s.childLanes = 0, s.pendingProps = N, t.deletions = null) : (s = kn(e, N), s.subtreeFlags = e.subtreeFlags & 14680064), C !== null ? c = kn(C, c) : (c = rr(c, y, h, null), c.flags |= 2), c.return = t, s.return = t, s.sibling = c, t.child = s, c;
2331
2331
  }
2332
2332
  function Ts(e, t, s, c) {
2333
2333
  return c !== null && Zo(c), Sr(t, e.child, null, s), e = dl(t, t.pendingProps.children), e.flags |= 2, t.memoizedState = null, e;
@@ -2401,8 +2401,8 @@ Error generating stack: ` + y.message + `
2401
2401
  if (e !== null && t.child !== e.child)
2402
2402
  throw Error(a(153));
2403
2403
  if (t.child !== null) {
2404
- for (e = t.child, s = bn(e, e.pendingProps), t.child = s, s.return = t; e.sibling !== null; )
2405
- e = e.sibling, s = s.sibling = bn(e, e.pendingProps), s.return = t;
2404
+ for (e = t.child, s = kn(e, e.pendingProps), t.child = s, s.return = t; e.sibling !== null; )
2405
+ e = e.sibling, s = s.sibling = kn(e, e.pendingProps), s.return = t;
2406
2406
  s.sibling = null;
2407
2407
  }
2408
2408
  return t.child;
@@ -2575,7 +2575,7 @@ Error generating stack: ` + y.message + `
2575
2575
  var s = e.stateNode;
2576
2576
  switch (e.tag) {
2577
2577
  case 5:
2578
- e = le(s);
2578
+ e = ae(s);
2579
2579
  break;
2580
2580
  default:
2581
2581
  e = s;
@@ -2771,7 +2771,7 @@ Error generating stack: ` + y.message + `
2771
2771
  s = t.memoizedProps, Po(t.stateNode, e !== null ? e.memoizedProps : s, s);
2772
2772
  return;
2773
2773
  case 3:
2774
- de && e !== null && e.memoizedState.isDehydrated && Ja(t.stateNode.containerInfo);
2774
+ ue && e !== null && e.memoizedState.isDehydrated && Ja(t.stateNode.containerInfo);
2775
2775
  return;
2776
2776
  case 12:
2777
2777
  return;
@@ -2802,7 +2802,7 @@ Error generating stack: ` + y.message + `
2802
2802
  Cs(t);
2803
2803
  return;
2804
2804
  case 3:
2805
- de && e !== null && e.memoizedState.isDehydrated && Ja(t.stateNode.containerInfo);
2805
+ ue && e !== null && e.memoizedState.isDehydrated && Ja(t.stateNode.containerInfo);
2806
2806
  break;
2807
2807
  case 22:
2808
2808
  case 23:
@@ -2846,8 +2846,8 @@ Error generating stack: ` + y.message + `
2846
2846
  Pe ? dc(y, h, t) : lc(y, h, t);
2847
2847
  var C = h.alternate;
2848
2848
  C !== null && (C.return = null), h.return = null;
2849
- } catch (te) {
2850
- _t(h, t, te);
2849
+ } catch (ne) {
2850
+ _t(h, t, ne);
2851
2851
  }
2852
2852
  }
2853
2853
  if (s = t.child, t.subtreeFlags & 12854 && s !== null)
@@ -2882,12 +2882,12 @@ Error generating stack: ` + y.message + `
2882
2882
  if (y === null) {
2883
2883
  y = ie;
2884
2884
  var ct = ie.stateNode;
2885
- h ? ae(ct) : Ge(ie.stateNode, ie.memoizedProps);
2885
+ h ? ce(ct) : Ge(ie.stateNode, ie.memoizedProps);
2886
2886
  }
2887
2887
  } else if (ie.tag === 6) {
2888
2888
  if (y === null) {
2889
- var bt = ie.stateNode;
2890
- h ? _e(bt) : Wt(bt, ie.memoizedProps);
2889
+ var kt = ie.stateNode;
2890
+ h ? _e(kt) : Wt(kt, ie.memoizedProps);
2891
2891
  }
2892
2892
  } else if ((ie.tag !== 22 && ie.tag !== 23 || ie.memoizedState === null || ie === c) && ie.child !== null) {
2893
2893
  ie.child.return = ie, ie = ie.child;
@@ -2923,11 +2923,11 @@ Error generating stack: ` + y.message + `
2923
2923
  var q = c.return;
2924
2924
  try {
2925
2925
  U.props = c.memoizedProps, U.state = c.memoizedState, U.componentWillUnmount();
2926
- } catch (te) {
2926
+ } catch (ne) {
2927
2927
  _t(
2928
2928
  c,
2929
2929
  q,
2930
- te
2930
+ ne
2931
2931
  );
2932
2932
  }
2933
2933
  }
@@ -2963,8 +2963,8 @@ Error generating stack: ` + y.message + `
2963
2963
  case 4:
2964
2964
  yl(t.alternate, t);
2965
2965
  }
2966
- } catch (te) {
2967
- _t(t, t.return, te);
2966
+ } catch (ne) {
2967
+ _t(t, t.return, ne);
2968
2968
  }
2969
2969
  if (s = t.sibling, s !== null) {
2970
2970
  s.return = t.return, Q = s;
@@ -3029,7 +3029,7 @@ Error generating stack: ` + y.message + `
3029
3029
  if (s = null, t.child !== null)
3030
3030
  switch (t.child.tag) {
3031
3031
  case 5:
3032
- s = le(t.child.stateNode);
3032
+ s = ae(t.child.stateNode);
3033
3033
  break;
3034
3034
  case 1:
3035
3035
  s = t.child.stateNode;
@@ -3048,7 +3048,7 @@ Error generating stack: ` + y.message + `
3048
3048
  case 12:
3049
3049
  break;
3050
3050
  case 13:
3051
- if (de && t.memoizedState === null) {
3051
+ if (ue && t.memoizedState === null) {
3052
3052
  var H = t.alternate;
3053
3053
  if (H !== null) {
3054
3054
  var X = H.memoizedState;
@@ -3263,7 +3263,7 @@ Error generating stack: ` + y.message + `
3263
3263
  function Cr() {
3264
3264
  Pl = qe() + 500;
3265
3265
  }
3266
- var Ds = !1, Cl = null, zn = null, ks = !1, On = null, bs = 0, Ai = 0, Ml = null, Fs = -1, Bs = 0;
3266
+ var Ds = !1, Cl = null, zn = null, bs = !1, On = null, ks = 0, Ai = 0, Ml = null, Fs = -1, Bs = 0;
3267
3267
  function pt() {
3268
3268
  return ve & 6 ? qe() : Fs !== -1 ? Fs : Fs = qe();
3269
3269
  }
@@ -3274,7 +3274,7 @@ Error generating stack: ` + y.message + `
3274
3274
  if (50 < Ai)
3275
3275
  throw Ai = 0, Ml = null, Error(a(185));
3276
3276
  var c = js(e, t);
3277
- return c === null ? null : (ai(c, t, s), (!(ve & 2) || c !== We) && (c === We && (!(ve & 2) && (Os |= t), Qe === 4 && kn(c, et)), St(c, s), t === 1 && ve === 0 && !(e.mode & 1) && (Cr(), ns && nn())), c);
3277
+ return c === null ? null : (ai(c, t, s), (!(ve & 2) || c !== We) && (c === We && (!(ve & 2) && (Os |= t), Qe === 4 && bn(c, et)), St(c, s), t === 1 && ve === 0 && !(e.mode & 1) && (Cr(), ns && nn())), c);
3278
3278
  }
3279
3279
  function js(e, t) {
3280
3280
  e.lanes |= t;
@@ -3293,11 +3293,11 @@ Error generating stack: ` + y.message + `
3293
3293
  if (s != null && ru(s), t === 1)
3294
3294
  e.tag === 0 ? op(xc.bind(null, e)) : iu(xc.bind(null, e)), Gi ? _o(function() {
3295
3295
  ve === 0 && nn();
3296
- }) : ko(bo, nn), s = null;
3296
+ }) : bo(ko, nn), s = null;
3297
3297
  else {
3298
3298
  switch (nu(c)) {
3299
3299
  case 1:
3300
- s = bo;
3300
+ s = ko;
3301
3301
  break;
3302
3302
  case 4:
3303
3303
  s = np;
@@ -3345,12 +3345,12 @@ Error generating stack: ` + y.message + `
3345
3345
  }
3346
3346
  if (t !== 0) {
3347
3347
  if (t === 2 && (h = zo(e), h !== 0 && (c = h, t = Ll(e, h))), t === 1)
3348
- throw s = Ei, er(e, 0), kn(e, c), St(e, qe()), s;
3348
+ throw s = Ei, er(e, 0), bn(e, c), St(e, qe()), s;
3349
3349
  if (t === 6)
3350
- kn(e, c);
3350
+ bn(e, c);
3351
3351
  else {
3352
3352
  if (h = e.current.alternate, !(c & 30) && !Pp(h) && (t = Us(e, c), t === 2 && (y = zo(e), y !== 0 && (c = y, t = Ll(e, y))), t === 1))
3353
- throw s = Ei, er(e, 0), kn(e, c), St(e, qe()), s;
3353
+ throw s = Ei, er(e, 0), bn(e, c), St(e, qe()), s;
3354
3354
  switch (e.finishedWork = h, e.finishedLanes = c, t) {
3355
3355
  case 0:
3356
3356
  case 1:
@@ -3359,7 +3359,7 @@ Error generating stack: ` + y.message + `
3359
3359
  tr(e, wt);
3360
3360
  break;
3361
3361
  case 3:
3362
- if (kn(e, c), (c & 130023424) === c && (t = Al + 500 - qe(), 10 < t)) {
3362
+ if (bn(e, c), (c & 130023424) === c && (t = Al + 500 - qe(), 10 < t)) {
3363
3363
  if (es(e, 0) !== 0)
3364
3364
  break;
3365
3365
  if (h = e.suspendedLanes, (h & c) !== c) {
@@ -3372,7 +3372,7 @@ Error generating stack: ` + y.message + `
3372
3372
  tr(e, wt);
3373
3373
  break;
3374
3374
  case 4:
3375
- if (kn(e, c), (c & 4194240) === c)
3375
+ if (bn(e, c), (c & 4194240) === c)
3376
3376
  break;
3377
3377
  for (t = e.eventTimes, h = -1; 0 < c; ) {
3378
3378
  var C = 31 - Kt(c);
@@ -3432,7 +3432,7 @@ Error generating stack: ` + y.message + `
3432
3432
  }
3433
3433
  return !0;
3434
3434
  }
3435
- function kn(e, t) {
3435
+ function bn(e, t) {
3436
3436
  for (t &= ~Tl, t &= ~Os, e.suspendedLanes |= t, e.pingedLanes &= ~t, e = e.expirationTimes; 0 < t; ) {
3437
3437
  var s = 31 - Kt(t), c = 1 << s;
3438
3438
  e[s] = -1, t &= ~c;
@@ -3451,7 +3451,7 @@ Error generating stack: ` + y.message + `
3451
3451
  c !== 0 && (t = c, s = Ll(e, c));
3452
3452
  }
3453
3453
  if (s === 1)
3454
- throw s = Ei, er(e, 0), kn(e, t), St(e, qe()), s;
3454
+ throw s = Ei, er(e, 0), bn(e, t), St(e, qe()), s;
3455
3455
  if (s === 6)
3456
3456
  throw Error(a(345));
3457
3457
  return e.finishedWork = e.current.alternate, e.finishedLanes = t, tr(e, wt), St(e, qe()), null;
@@ -3474,7 +3474,7 @@ Error generating stack: ` + y.message + `
3474
3474
  function er(e, t) {
3475
3475
  e.finishedWork = null, e.finishedLanes = 0;
3476
3476
  var s = e.timeoutHandle;
3477
- if (s !== ce && (e.timeoutHandle = ce, ue(s)), Xe !== null)
3477
+ if (s !== le && (e.timeoutHandle = le, fe(s)), Xe !== null)
3478
3478
  for (s = Xe.return; s !== null; ) {
3479
3479
  var c = s;
3480
3480
  switch (Yo(c), c.tag) {
@@ -3505,7 +3505,7 @@ Error generating stack: ` + y.message + `
3505
3505
  }
3506
3506
  s = s.return;
3507
3507
  }
3508
- if (We = e, Xe = e = bn(e.current, null), et = Ct = t, Qe = 0, Ei = null, Tl = Os = Pr = 0, wt = Ti = null, rn !== null) {
3508
+ if (We = e, Xe = e = kn(e.current, null), et = Ct = t, Qe = 0, Ei = null, Tl = Os = Pr = 0, wt = Ti = null, rn !== null) {
3509
3509
  for (t = 0; t < rn.length; t++)
3510
3510
  if (s = rn[t], c = s.interleaved, c !== null) {
3511
3511
  s.interleaved = null;
@@ -3561,9 +3561,9 @@ Error generating stack: ` + y.message + `
3561
3561
  H = Error(a(426));
3562
3562
  }
3563
3563
  } else if (ze && N.mode & 1) {
3564
- var bt = Hu(C);
3565
- if (bt !== null) {
3566
- !(bt.flags & 65536) && (bt.flags |= 256), Vu(bt, C, N, y, t), Zo(H);
3564
+ var kt = Hu(C);
3565
+ if (kt !== null) {
3566
+ !(kt.flags & 65536) && (kt.flags |= 256), Vu(kt, C, N, y, t), Zo(H);
3567
3567
  break e;
3568
3568
  }
3569
3569
  }
@@ -3589,8 +3589,8 @@ Error generating stack: ` + y.message + `
3589
3589
  } while (N !== null);
3590
3590
  }
3591
3591
  Tc(s);
3592
- } catch (te) {
3593
- t = te, Xe === s && s !== null && (Xe = s = s.return);
3592
+ } catch (ne) {
3593
+ t = ne, Xe === s && s !== null && (Xe = s = s.return);
3594
3594
  continue;
3595
3595
  }
3596
3596
  break;
@@ -3601,7 +3601,7 @@ Error generating stack: ` + y.message + `
3601
3601
  return zs.current = xs, e === null ? xs : e;
3602
3602
  }
3603
3603
  function Il() {
3604
- (Qe === 0 || Qe === 3 || Qe === 2) && (Qe = 4), We === null || !(Pr & 268435455) && !(Os & 268435455) || kn(We, et);
3604
+ (Qe === 0 || Qe === 3 || Qe === 2) && (Qe = 4), We === null || !(Pr & 268435455) && !(Os & 268435455) || bn(We, et);
3605
3605
  }
3606
3606
  function Us(e, t) {
3607
3607
  var s = ve;
@@ -3681,7 +3681,7 @@ Error generating stack: ` + y.message + `
3681
3681
  throw Error(a(177));
3682
3682
  e.callbackNode = null, e.callbackPriority = 0;
3683
3683
  var y = c.lanes | c.childLanes;
3684
- if ($d(e, y), e === We && (Xe = We = null, et = 0), !(c.subtreeFlags & 2064) && !(c.flags & 2064) || ks || (ks = !0, Mc(Fo, function() {
3684
+ if ($d(e, y), e === We && (Xe = We = null, et = 0), !(c.subtreeFlags & 2064) && !(c.flags & 2064) || bs || (bs = !0, Mc(Fo, function() {
3685
3685
  return nr(), null;
3686
3686
  })), y = (c.flags & 15990) !== 0, c.subtreeFlags & 15990 || y) {
3687
3687
  y = He.transition, He.transition = null;
@@ -3691,21 +3691,21 @@ Error generating stack: ` + y.message + `
3691
3691
  ve |= 4, El.current = null, _p(e, c), Ep(e, c), Z(e.containerInfo), e.current = c, Tp(c), tp(), ve = N, Ee = C, He.transition = y;
3692
3692
  } else
3693
3693
  e.current = c;
3694
- if (ks && (ks = !1, On = e, bs = h), y = e.pendingLanes, y === 0 && (zn = null), ip(c.stateNode), St(e, qe()), t !== null)
3694
+ if (bs && (bs = !1, On = e, ks = h), y = e.pendingLanes, y === 0 && (zn = null), ip(c.stateNode), St(e, qe()), t !== null)
3695
3695
  for (s = e.onRecoverableError, c = 0; c < t.length; c++)
3696
3696
  s(t[c]);
3697
3697
  if (Ds)
3698
3698
  throw Ds = !1, e = Cl, Cl = null, e;
3699
- return bs & 1 && e.tag !== 0 && nr(), y = e.pendingLanes, y & 1 ? e === Ml ? Ai++ : (Ai = 0, Ml = e) : Ai = 0, nn(), null;
3699
+ return ks & 1 && e.tag !== 0 && nr(), y = e.pendingLanes, y & 1 ? e === Ml ? Ai++ : (Ai = 0, Ml = e) : Ai = 0, nn(), null;
3700
3700
  }
3701
3701
  function nr() {
3702
3702
  if (On !== null) {
3703
- var e = nu(bs), t = He.transition, s = Ee;
3703
+ var e = nu(ks), t = He.transition, s = Ee;
3704
3704
  try {
3705
3705
  if (He.transition = null, Ee = 16 > e ? 16 : e, On === null)
3706
3706
  var c = !1;
3707
3707
  else {
3708
- if (e = On, On = null, bs = 0, ve & 6)
3708
+ if (e = On, On = null, ks = 0, ve & 6)
3709
3709
  throw Error(a(331));
3710
3710
  var h = ve;
3711
3711
  for (ve |= 4, Q = e.current; Q !== null; ) {
@@ -3748,8 +3748,8 @@ Error generating stack: ` + y.message + `
3748
3748
  if (ct !== null) {
3749
3749
  ie.child = null;
3750
3750
  do {
3751
- var bt = ct.sibling;
3752
- ct.sibling = null, ct = bt;
3751
+ var kt = ct.sibling;
3752
+ ct.sibling = null, ct = kt;
3753
3753
  } while (ct !== null);
3754
3754
  }
3755
3755
  }
@@ -3793,8 +3793,8 @@ Error generating stack: ` + y.message + `
3793
3793
  case 15:
3794
3794
  Si(9, N);
3795
3795
  }
3796
- } catch (te) {
3797
- _t(N, N.return, te);
3796
+ } catch (ne) {
3797
+ _t(N, N.return, ne);
3798
3798
  }
3799
3799
  if (N === C) {
3800
3800
  Q = null;
@@ -3927,7 +3927,7 @@ Error generating stack: ` + y.message + `
3927
3927
  throw Error(a(387));
3928
3928
  c = t.pendingProps, y = t.memoizedState, h = y.element, ou(e, t), ls(t, c, null, s);
3929
3929
  var C = t.memoizedState;
3930
- if (c = C.element, de && y.isDehydrated)
3930
+ if (c = C.element, ue && y.isDehydrated)
3931
3931
  if (y = {
3932
3932
  element: c,
3933
3933
  isDehydrated: !1,
@@ -3940,7 +3940,7 @@ Error generating stack: ` + y.message + `
3940
3940
  h = Error(a(424)), t = $u(e, t, c, s, h);
3941
3941
  break e;
3942
3942
  } else
3943
- for (de && (At = Dd(t.stateNode.containerInfo), Tt = t, ze = !0, Qt = null, ui = !1), s = xu(t, null, c, s), t.child = s; s; )
3943
+ for (ue && (At = Dd(t.stateNode.containerInfo), Tt = t, ze = !0, Qt = null, ui = !1), s = xu(t, null, c, s), t.child = s; s; )
3944
3944
  s.flags = s.flags & -3 | 4096, s = s.sibling;
3945
3945
  else {
3946
3946
  if (wr(), c === h) {
@@ -4040,12 +4040,12 @@ Error generating stack: ` + y.message + `
4040
4040
  throw Error(a(156, t.tag));
4041
4041
  };
4042
4042
  function Mc(e, t) {
4043
- return ko(e, t);
4043
+ return bo(e, t);
4044
4044
  }
4045
4045
  function zp(e, t, s, c) {
4046
4046
  this.tag = e, this.key = s, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = t, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = c, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
4047
4047
  }
4048
- function kt(e, t, s, c) {
4048
+ function bt(e, t, s, c) {
4049
4049
  return new zp(e, t, s, c);
4050
4050
  }
4051
4051
  function zl(e) {
@@ -4055,16 +4055,16 @@ Error generating stack: ` + y.message + `
4055
4055
  if (typeof e == "function")
4056
4056
  return zl(e) ? 1 : 0;
4057
4057
  if (e != null) {
4058
- if (e = e.$$typeof, e === A)
4058
+ if (e = e.$$typeof, e === P)
4059
4059
  return 11;
4060
4060
  if (e === S)
4061
4061
  return 14;
4062
4062
  }
4063
4063
  return 2;
4064
4064
  }
4065
- function bn(e, t) {
4065
+ function kn(e, t) {
4066
4066
  var s = e.alternate;
4067
- return s === null ? (s = kt(e.tag, t, e.key, e.mode), s.elementType = e.elementType, s.type = e.type, s.stateNode = e.stateNode, s.alternate = e, e.alternate = s) : (s.pendingProps = t, s.type = e.type, s.flags = 0, s.subtreeFlags = 0, s.deletions = null), s.flags = e.flags & 14680064, s.childLanes = e.childLanes, s.lanes = e.lanes, s.child = e.child, s.memoizedProps = e.memoizedProps, s.memoizedState = e.memoizedState, s.updateQueue = e.updateQueue, t = e.dependencies, s.dependencies = t === null ? null : { lanes: t.lanes, firstContext: t.firstContext }, s.sibling = e.sibling, s.index = e.index, s.ref = e.ref, s;
4067
+ return s === null ? (s = bt(e.tag, t, e.key, e.mode), s.elementType = e.elementType, s.type = e.type, s.stateNode = e.stateNode, s.alternate = e, e.alternate = s) : (s.pendingProps = t, s.type = e.type, s.flags = 0, s.subtreeFlags = 0, s.deletions = null), s.flags = e.flags & 14680064, s.childLanes = e.childLanes, s.lanes = e.lanes, s.child = e.child, s.memoizedProps = e.memoizedProps, s.memoizedState = e.memoizedState, s.updateQueue = e.updateQueue, t = e.dependencies, s.dependencies = t === null ? null : { lanes: t.lanes, firstContext: t.firstContext }, s.sibling = e.sibling, s.index = e.index, s.ref = e.ref, s;
4068
4068
  }
4069
4069
  function Hs(e, t, s, c, h, y) {
4070
4070
  var C = 2;
@@ -4081,12 +4081,12 @@ Error generating stack: ` + y.message + `
4081
4081
  C = 8, h |= 8;
4082
4082
  break;
4083
4083
  case v:
4084
- return e = kt(12, s, t, h | 2), e.elementType = v, e.lanes = y, e;
4084
+ return e = bt(12, s, t, h | 2), e.elementType = v, e.lanes = y, e;
4085
4085
  case T:
4086
- return e = kt(13, s, t, h), e.elementType = T, e.lanes = y, e;
4086
+ return e = bt(13, s, t, h), e.elementType = T, e.lanes = y, e;
4087
4087
  case w:
4088
- return e = kt(19, s, t, h), e.elementType = w, e.lanes = y, e;
4089
- case P:
4088
+ return e = bt(19, s, t, h), e.elementType = w, e.lanes = y, e;
4089
+ case A:
4090
4090
  return Vs(s, h, y, t);
4091
4091
  default:
4092
4092
  if (typeof e == "object" && e !== null)
@@ -4097,7 +4097,7 @@ Error generating stack: ` + y.message + `
4097
4097
  case _:
4098
4098
  C = 9;
4099
4099
  break e;
4100
- case A:
4100
+ case P:
4101
4101
  C = 11;
4102
4102
  break e;
4103
4103
  case S:
@@ -4109,32 +4109,32 @@ Error generating stack: ` + y.message + `
4109
4109
  }
4110
4110
  throw Error(a(130, e == null ? e : typeof e, ""));
4111
4111
  }
4112
- return t = kt(C, s, t, h), t.elementType = e, t.type = c, t.lanes = y, t;
4112
+ return t = bt(C, s, t, h), t.elementType = e, t.type = c, t.lanes = y, t;
4113
4113
  }
4114
4114
  function rr(e, t, s, c) {
4115
- return e = kt(7, e, c, t), e.lanes = s, e;
4115
+ return e = bt(7, e, c, t), e.lanes = s, e;
4116
4116
  }
4117
4117
  function Vs(e, t, s, c) {
4118
- return e = kt(22, e, c, t), e.elementType = P, e.lanes = s, e.stateNode = {}, e;
4118
+ return e = bt(22, e, c, t), e.elementType = A, e.lanes = s, e.stateNode = {}, e;
4119
4119
  }
4120
4120
  function Ol(e, t, s) {
4121
- return e = kt(6, e, null, t), e.lanes = s, e;
4121
+ return e = bt(6, e, null, t), e.lanes = s, e;
4122
4122
  }
4123
4123
  function Dl(e, t, s) {
4124
- return t = kt(4, e.children !== null ? e.children : [], e.key, t), t.lanes = s, t.stateNode = { containerInfo: e.containerInfo, pendingChildren: null, implementation: e.implementation }, t;
4124
+ return t = bt(4, e.children !== null ? e.children : [], e.key, t), t.lanes = s, t.stateNode = { containerInfo: e.containerInfo, pendingChildren: null, implementation: e.implementation }, t;
4125
4125
  }
4126
4126
  function Dp(e, t, s, c, h) {
4127
- this.tag = t, this.containerInfo = e, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = ce, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = Oo(0), this.expirationTimes = Oo(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Oo(0), this.identifierPrefix = c, this.onRecoverableError = h, de && (this.mutableSourceEagerHydrationData = null);
4127
+ this.tag = t, this.containerInfo = e, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = le, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = Oo(0), this.expirationTimes = Oo(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Oo(0), this.identifierPrefix = c, this.onRecoverableError = h, ue && (this.mutableSourceEagerHydrationData = null);
4128
4128
  }
4129
4129
  function Lc(e, t, s, c, h, y, C, N, H) {
4130
- return e = new Dp(e, t, s, N, H), t === 1 ? (t = 1, y === !0 && (t |= 8)) : t = 0, y = kt(3, null, null, t), e.current = y, y.stateNode = e, y.memoizedState = { element: c, isDehydrated: s, cache: null, transitions: null }, Go(y), e;
4130
+ return e = new Dp(e, t, s, N, H), t === 1 ? (t = 1, y === !0 && (t |= 8)) : t = 0, y = bt(3, null, null, t), e.current = y, y.stateNode = e, y.memoizedState = { element: c, isDehydrated: s, cache: null, transitions: null }, Go(y), e;
4131
4131
  }
4132
4132
  function Rc(e) {
4133
4133
  if (!e)
4134
4134
  return Rn;
4135
4135
  e = e._reactInternals;
4136
4136
  e: {
4137
- if (k(e) !== e || e.tag !== 1)
4137
+ if (b(e) !== e || e.tag !== 1)
4138
4138
  throw Error(a(170));
4139
4139
  var t = e;
4140
4140
  do {
@@ -4171,24 +4171,24 @@ Error generating stack: ` + y.message + `
4171
4171
  e.retryLane = s !== 0 && s < t ? s : t;
4172
4172
  }
4173
4173
  }
4174
- function kl(e, t) {
4174
+ function bl(e, t) {
4175
4175
  Ic(e, t), (e = e.alternate) && Ic(e, t);
4176
4176
  }
4177
- function kp(e) {
4177
+ function bp(e) {
4178
4178
  return e = j(e), e === null ? null : e.stateNode;
4179
4179
  }
4180
- function bp() {
4180
+ function kp() {
4181
4181
  return null;
4182
4182
  }
4183
4183
  return r.attemptContinuousHydration = function(e) {
4184
4184
  if (e.tag === 13) {
4185
4185
  var t = pt();
4186
- Dt(e, 134217728, t), kl(e, 134217728);
4186
+ Dt(e, 134217728, t), bl(e, 134217728);
4187
4187
  }
4188
4188
  }, r.attemptHydrationAtCurrentPriority = function(e) {
4189
4189
  if (e.tag === 13) {
4190
4190
  var t = pt(), s = Dn(e);
4191
- Dt(e, s, t), kl(e, s);
4191
+ Dt(e, s, t), bl(e, s);
4192
4192
  }
4193
4193
  }, r.attemptSynchronousHydration = function(e) {
4194
4194
  switch (e.tag) {
@@ -4203,7 +4203,7 @@ Error generating stack: ` + y.message + `
4203
4203
  var c = pt();
4204
4204
  wc(function() {
4205
4205
  return Dt(e, 1, c);
4206
- }), kl(e, 1);
4206
+ }), bl(e, 1);
4207
4207
  }
4208
4208
  }, r.batchedUpdates = function(e, t) {
4209
4209
  var s = ve;
@@ -4271,7 +4271,7 @@ Error generating stack: ` + y.message + `
4271
4271
  }
4272
4272
  return e;
4273
4273
  }, r.findHostInstance = Nc, r.findHostInstanceWithNoPortals = function(e) {
4274
- return e = b(e), e = e !== null ? Y(e) : null, e === null ? null : e.stateNode;
4274
+ return e = k(e), e = e !== null ? Y(e) : null, e === null ? null : e.stateNode;
4275
4275
  }, r.findHostInstanceWithWarning = function(e) {
4276
4276
  return Nc(e);
4277
4277
  }, r.flushControlled = function(e) {
@@ -4324,12 +4324,12 @@ No matching component was found for:
4324
4324
  return null;
4325
4325
  switch (e.child.tag) {
4326
4326
  case 5:
4327
- return le(e.child.stateNode);
4327
+ return ae(e.child.stateNode);
4328
4328
  default:
4329
4329
  return e.child.stateNode;
4330
4330
  }
4331
4331
  }, r.injectIntoDevTools = function(e) {
4332
- if (e = { bundleType: e.bundleType, version: e.version, rendererPackageName: e.rendererPackageName, rendererConfig: e.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: d.ReactCurrentDispatcher, findHostInstanceByFiber: kp, findFiberByHostInstance: e.findFiberByHostInstance || bp, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.0.0-fc46dba67-20220329" }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u")
4332
+ if (e = { bundleType: e.bundleType, version: e.version, rendererPackageName: e.rendererPackageName, rendererConfig: e.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: d.ReactCurrentDispatcher, findHostInstanceByFiber: bp, findFiberByHostInstance: e.findFiberByHostInstance || kp, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.0.0-fc46dba67-20220329" }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u")
4333
4333
  e = !1;
4334
4334
  else {
4335
4335
  var t = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -4375,7 +4375,7 @@ No matching component was found for:
4375
4375
  };
4376
4376
  Qf.exports = Bh;
4377
4377
  var jh = Qf.exports;
4378
- const Uh = /* @__PURE__ */ bf(jh), Hh = (o) => typeof o == "object" && typeof o.then == "function", Gs = [];
4378
+ const Uh = /* @__PURE__ */ kf(jh), Hh = (o) => typeof o == "object" && typeof o.then == "function", Gs = [];
4379
4379
  function Vh(o, n, r = (i, l) => i === l) {
4380
4380
  if (o === n)
4381
4381
  return !0;
@@ -4419,14 +4419,14 @@ function Gh(o, n = null, r = !1, i = {}) {
4419
4419
  if (Gs.push(l), !r)
4420
4420
  throw l.promise;
4421
4421
  }
4422
- const bc = (o, n, r) => Gh(o, n, !1, r), Ba = {}, ja = (o) => void Object.assign(Ba, o);
4422
+ const kc = (o, n, r) => Gh(o, n, !1, r), Ba = {}, ja = (o) => void Object.assign(Ba, o);
4423
4423
  function Wh(o, n) {
4424
4424
  function r(p, {
4425
4425
  args: m = [],
4426
4426
  attach: v,
4427
4427
  ...x
4428
4428
  }, _) {
4429
- let A = `${p[0].toUpperCase()}${p.slice(1)}`, T;
4429
+ let P = `${p[0].toUpperCase()}${p.slice(1)}`, T;
4430
4430
  if (p === "primitive") {
4431
4431
  if (x.object === void 0)
4432
4432
  throw new Error("R3F: Primitives without 'object' are invalid!");
@@ -4438,9 +4438,9 @@ function Wh(o, n) {
4438
4438
  primitive: !0
4439
4439
  });
4440
4440
  } else {
4441
- const w = Ba[A];
4441
+ const w = Ba[P];
4442
4442
  if (!w)
4443
- throw new Error(`R3F: ${A} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);
4443
+ throw new Error(`R3F: ${P} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);
4444
4444
  if (!Array.isArray(m))
4445
4445
  throw new Error("R3F: The args prop must be an array!");
4446
4446
  T = Vr(new w(...m), {
@@ -4453,7 +4453,7 @@ function Wh(o, n) {
4453
4453
  }
4454
4454
  });
4455
4455
  }
4456
- return T.__r3f.attach === void 0 && (T instanceof Da ? T.__r3f.attach = "geometry" : T instanceof po && (T.__r3f.attach = "material")), A !== "inject" && Ul(T, x), T;
4456
+ return T.__r3f.attach === void 0 && (T instanceof Da ? T.__r3f.attach = "geometry" : T instanceof po && (T.__r3f.attach = "material")), P !== "inject" && Ul(T, x), T;
4457
4457
  }
4458
4458
  function i(p, m) {
4459
4459
  let v = !1;
@@ -4465,7 +4465,7 @@ function Wh(o, n) {
4465
4465
  function l(p, m, v) {
4466
4466
  let x = !1;
4467
4467
  if (m) {
4468
- var _, A;
4468
+ var _, P;
4469
4469
  if ((_ = m.__r3f) != null && _.attach)
4470
4470
  jl(p, m, m.__r3f.attach);
4471
4471
  else if (m.isObject3D && p.isObject3D) {
@@ -4475,7 +4475,7 @@ function Wh(o, n) {
4475
4475
  const T = p.children.filter((S) => S !== m), w = T.indexOf(v);
4476
4476
  p.children = [...T.slice(0, w), m, ...T.slice(w)], x = !0;
4477
4477
  }
4478
- x || (A = p.__r3f) == null || A.objects.push(m), m.__r3f || Vr(m, {}), m.__r3f.parent = p, xa(m), Gr(m);
4478
+ x || (P = p.__r3f) == null || P.objects.push(m), m.__r3f || Vr(m, {}), m.__r3f.parent = p, xa(m), Gr(m);
4479
4479
  }
4480
4480
  }
4481
4481
  function u(p, m, v = !1) {
@@ -4483,34 +4483,34 @@ function Wh(o, n) {
4483
4483
  }
4484
4484
  function a(p, m, v) {
4485
4485
  if (m) {
4486
- var x, _, A;
4487
- if (m.__r3f && (m.__r3f.parent = null), (x = p.__r3f) != null && x.objects && (p.__r3f.objects = p.__r3f.objects.filter((P) => P !== m)), (_ = m.__r3f) != null && _.attach)
4486
+ var x, _, P;
4487
+ if (m.__r3f && (m.__r3f.parent = null), (x = p.__r3f) != null && x.objects && (p.__r3f.objects = p.__r3f.objects.filter((A) => A !== m)), (_ = m.__r3f) != null && _.attach)
4488
4488
  Hc(p, m, m.__r3f.attach);
4489
4489
  else if (m.isObject3D && p.isObject3D) {
4490
4490
  var T;
4491
4491
  p.remove(m), (T = m.__r3f) != null && T.root && Jh(ho(m), m);
4492
4492
  }
4493
- const S = (A = m.__r3f) == null ? void 0 : A.primitive, E = !S && (v === void 0 ? m.dispose !== null : v);
4493
+ const S = (P = m.__r3f) == null ? void 0 : P.primitive, E = !S && (v === void 0 ? m.dispose !== null : v);
4494
4494
  if (!S) {
4495
4495
  var w;
4496
4496
  u((w = m.__r3f) == null ? void 0 : w.objects, m, E), u(m.children, m, E);
4497
4497
  }
4498
4498
  if (delete m.__r3f, E && m.dispose && m.type !== "Scene") {
4499
- const P = () => {
4499
+ const A = () => {
4500
4500
  try {
4501
4501
  m.dispose();
4502
4502
  } catch {
4503
4503
  }
4504
4504
  };
4505
- typeof IS_REACT_ACT_ENVIRONMENT > "u" ? va.unstable_scheduleCallback(va.unstable_IdlePriority, P) : P();
4505
+ typeof IS_REACT_ACT_ENVIRONMENT > "u" ? va.unstable_scheduleCallback(va.unstable_IdlePriority, A) : A();
4506
4506
  }
4507
4507
  Gr(p);
4508
4508
  }
4509
4509
  }
4510
4510
  function d(p, m, v, x) {
4511
4511
  var _;
4512
- const A = (_ = p.__r3f) == null ? void 0 : _.parent;
4513
- if (!A)
4512
+ const P = (_ = p.__r3f) == null ? void 0 : _.parent;
4513
+ if (!P)
4514
4514
  return;
4515
4515
  const T = r(m, v, p.__r3f.root);
4516
4516
  if (p.children) {
@@ -4518,7 +4518,7 @@ function Wh(o, n) {
4518
4518
  w.__r3f && i(T, w);
4519
4519
  p.children = p.children.filter((w) => !w.__r3f);
4520
4520
  }
4521
- p.__r3f.objects.forEach((w) => i(T, w)), p.__r3f.objects = [], p.__r3f.autoRemovedBeforeAppend || a(A, p), T.parent && (T.__r3f.autoRemovedBeforeAppend = !0), i(A, T), T.raycast && T.__r3f.eventCount && ho(T).getState().internal.interaction.push(T), [x, x.alternate].forEach((w) => {
4521
+ p.__r3f.objects.forEach((w) => i(T, w)), p.__r3f.objects = [], p.__r3f.autoRemovedBeforeAppend || a(P, p), T.parent && (T.__r3f.autoRemovedBeforeAppend = !0), i(P, T), T.raycast && T.__r3f.eventCount && ho(T).getState().internal.interaction.push(T), [x, x.alternate].forEach((w) => {
4522
4522
  w !== null && (w.stateNode = T, w.ref && (typeof w.ref == "function" ? w.ref(T) : w.ref.current = T));
4523
4523
  });
4524
4524
  }
@@ -4567,24 +4567,24 @@ function Wh(o, n) {
4567
4567
  ...S
4568
4568
  } = x, {
4569
4569
  args: E = [],
4570
- children: P,
4570
+ children: A,
4571
4571
  ...M
4572
4572
  } = v;
4573
4573
  if (!Array.isArray(T))
4574
4574
  throw new Error("R3F: the args prop must be an array!");
4575
- if (T.some((R, I) => R !== E[I]))
4575
+ if (T.some((R, z) => R !== E[z]))
4576
4576
  return [!0];
4577
4577
  const L = id(p, S, M, !0);
4578
4578
  return L.changes.length ? [!1, L] : null;
4579
4579
  }
4580
4580
  },
4581
- commitUpdate(p, [m, v], x, _, A, T) {
4582
- m ? d(p, x, A, T) : Ul(p, v);
4581
+ commitUpdate(p, [m, v], x, _, P, T) {
4582
+ m ? d(p, x, P, T) : Ul(p, v);
4583
4583
  },
4584
4584
  commitMount(p, m, v, x) {
4585
4585
  var _;
4586
- const A = (_ = p.__r3f) != null ? _ : {};
4587
- p.raycast && A.handlers && A.eventCount && ho(p).getState().internal.interaction.push(p);
4586
+ const P = (_ = p.__r3f) != null ? _ : {};
4587
+ p.raycast && P.handlers && P.eventCount && ho(p).getState().internal.interaction.push(p);
4588
4588
  },
4589
4589
  getPublicInstance: (p) => p,
4590
4590
  prepareForCommit: () => null,
@@ -4801,21 +4801,21 @@ function id(o, {
4801
4801
  var p;
4802
4802
  const m = (p = o?.__r3f) != null ? p : {}, v = Object.entries(l), x = [];
4803
4803
  if (g) {
4804
- const A = Object.keys(f);
4805
- for (let T = 0; T < A.length; T++)
4806
- l.hasOwnProperty(A[T]) || v.unshift([A[T], nd + "remove"]);
4804
+ const P = Object.keys(f);
4805
+ for (let T = 0; T < P.length; T++)
4806
+ l.hasOwnProperty(P[T]) || v.unshift([P[T], nd + "remove"]);
4807
4807
  }
4808
- v.forEach(([A, T]) => {
4808
+ v.forEach(([P, T]) => {
4809
4809
  var w;
4810
- if ((w = o.__r3f) != null && w.primitive && A === "object" || Oe.equ(T, f[A]))
4810
+ if ((w = o.__r3f) != null && w.primitive && P === "object" || Oe.equ(T, f[P]))
4811
4811
  return;
4812
- if (/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(A))
4813
- return x.push([A, T, !0, []]);
4812
+ if (/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(P))
4813
+ return x.push([P, T, !0, []]);
4814
4814
  let S = [];
4815
- A.includes("-") && (S = A.split("-")), x.push([A, T, !1, S]);
4815
+ P.includes("-") && (S = P.split("-")), x.push([P, T, !1, S]);
4816
4816
  for (const E in l) {
4817
- const P = l[E];
4818
- E.startsWith(`${A}-`) && x.push([E, P, !1, E.split("-")]);
4817
+ const A = l[E];
4818
+ E.startsWith(`${P}-`) && x.push([E, A, !1, E.split("-")]);
4819
4819
  }
4820
4820
  });
4821
4821
  const _ = {
@@ -4835,15 +4835,15 @@ function Ul(o, n) {
4835
4835
  } = Yh(n) ? n : id(o, n), p = u.eventCount;
4836
4836
  o.__r3f && (o.__r3f.memoizedProps = f);
4837
4837
  for (let v = 0; v < g.length; v++) {
4838
- let [x, _, A, T] = g[v];
4838
+ let [x, _, P, T] = g[v];
4839
4839
  if (Bl(o)) {
4840
- const P = "srgb", M = "srgb-linear";
4841
- x === "encoding" ? (x = "colorSpace", _ = _ === 3001 ? P : M) : x === "outputEncoding" && (x = "outputColorSpace", _ = _ === 3001 ? P : M);
4840
+ const A = "srgb", M = "srgb-linear";
4841
+ x === "encoding" ? (x = "colorSpace", _ = _ === 3001 ? A : M) : x === "outputEncoding" && (x = "outputColorSpace", _ = _ === 3001 ? A : M);
4842
4842
  }
4843
4843
  let w = o, S = w[x];
4844
- if (T.length && (S = T.reduce((E, P) => E[P], o), !(S && S.set))) {
4845
- const [E, ...P] = T.reverse();
4846
- w = P.reverse().reduce((M, L) => M[L], o), x = E;
4844
+ if (T.length && (S = T.reduce((E, A) => E[A], o), !(S && S.set))) {
4845
+ const [E, ...A] = T.reverse();
4846
+ w = A.reverse().reduce((M, L) => M[L], o), x = E;
4847
4847
  }
4848
4848
  if (_ === nd + "remove")
4849
4849
  if (w.constructor) {
@@ -4851,7 +4851,7 @@ function Ul(o, n) {
4851
4851
  E || (E = new w.constructor(), jc.set(w.constructor, E)), _ = E[x];
4852
4852
  } else
4853
4853
  _ = 0;
4854
- if (A)
4854
+ if (P)
4855
4855
  _ ? u.handlers[x] = _ : delete u.handlers[x], u.eventCount = Object.keys(u.handlers).length;
4856
4856
  else if (S && S.set && (S.copy || S instanceof Fl)) {
4857
4857
  if (Array.isArray(_))
@@ -4961,15 +4961,15 @@ function $h(o) {
4961
4961
  }
4962
4962
  return S.raycaster.camera ? S.raycaster.intersectObject(w, !0) : [];
4963
4963
  }
4964
- let A = x.flatMap(_).sort((w, S) => {
4965
- const E = Pi(w.object), P = Pi(S.object);
4966
- return !E || !P ? w.distance - S.distance : P.events.priority - E.events.priority || w.distance - S.distance;
4964
+ let P = x.flatMap(_).sort((w, S) => {
4965
+ const E = Pi(w.object), A = Pi(S.object);
4966
+ return !E || !A ? w.distance - S.distance : A.events.priority - E.events.priority || w.distance - S.distance;
4967
4967
  }).filter((w) => {
4968
4968
  const S = Ws(w);
4969
4969
  return m.has(S) ? !1 : (m.add(S), !0);
4970
4970
  });
4971
- p.events.filter && (A = p.events.filter(A, p));
4972
- for (const w of A) {
4971
+ p.events.filter && (P = p.events.filter(P, p));
4972
+ for (const w of P) {
4973
4973
  let S = w.object;
4974
4974
  for (; S; ) {
4975
4975
  var T;
@@ -4991,49 +4991,49 @@ function $h(o) {
4991
4991
  stopped: !1
4992
4992
  };
4993
4993
  for (const _ of f) {
4994
- const A = Pi(_.object) || v, {
4994
+ const P = Pi(_.object) || v, {
4995
4995
  raycaster: T,
4996
4996
  pointer: w,
4997
4997
  camera: S,
4998
4998
  internal: E
4999
- } = A, P = new V(w.x, w.y, 0).unproject(S), M = (z) => {
5000
- var b, j;
5001
- return (b = (j = E.capturedMap.get(z)) == null ? void 0 : j.has(_.eventObject)) != null ? b : !1;
5002
- }, L = (z) => {
5003
- const b = {
4999
+ } = P, A = new V(w.x, w.y, 0).unproject(S), M = (I) => {
5000
+ var k, j;
5001
+ return (k = (j = E.capturedMap.get(I)) == null ? void 0 : j.has(_.eventObject)) != null ? k : !1;
5002
+ }, L = (I) => {
5003
+ const k = {
5004
5004
  intersection: _,
5005
5005
  target: g.target
5006
5006
  };
5007
- E.capturedMap.has(z) ? E.capturedMap.get(z).set(_.eventObject, b) : E.capturedMap.set(z, /* @__PURE__ */ new Map([[_.eventObject, b]])), g.target.setPointerCapture(z);
5008
- }, R = (z) => {
5009
- const b = E.capturedMap.get(z);
5010
- b && od(E.capturedMap, _.eventObject, b, z);
5007
+ E.capturedMap.has(I) ? E.capturedMap.get(I).set(_.eventObject, k) : E.capturedMap.set(I, /* @__PURE__ */ new Map([[_.eventObject, k]])), g.target.setPointerCapture(I);
5008
+ }, R = (I) => {
5009
+ const k = E.capturedMap.get(I);
5010
+ k && od(E.capturedMap, _.eventObject, k, I);
5011
5011
  };
5012
- let I = {};
5013
- for (let z in g) {
5014
- let b = g[z];
5015
- typeof b != "function" && (I[z] = b);
5012
+ let z = {};
5013
+ for (let I in g) {
5014
+ let k = g[I];
5015
+ typeof k != "function" && (z[I] = k);
5016
5016
  }
5017
- let k = {
5017
+ let b = {
5018
5018
  ..._,
5019
- ...I,
5019
+ ...z,
5020
5020
  pointer: w,
5021
5021
  intersections: f,
5022
5022
  stopped: x.stopped,
5023
5023
  delta: p,
5024
- unprojectedPoint: P,
5024
+ unprojectedPoint: A,
5025
5025
  ray: T.ray,
5026
5026
  camera: S,
5027
5027
  // Hijack stopPropagation, which just sets a flag
5028
5028
  stopPropagation() {
5029
- const z = "pointerId" in g && E.capturedMap.get(g.pointerId);
5029
+ const I = "pointerId" in g && E.capturedMap.get(g.pointerId);
5030
5030
  if (
5031
5031
  // ...if this pointer hasn't been captured
5032
- (!z || // ... or if the hit object is capturing the pointer
5033
- z.has(_.eventObject)) && (k.stopped = x.stopped = !0, E.hovered.size && Array.from(E.hovered.values()).find((b) => b.eventObject === _.eventObject))
5032
+ (!I || // ... or if the hit object is capturing the pointer
5033
+ I.has(_.eventObject)) && (b.stopped = x.stopped = !0, E.hovered.size && Array.from(E.hovered.values()).find((k) => k.eventObject === _.eventObject))
5034
5034
  ) {
5035
- const b = f.slice(0, f.indexOf(_));
5036
- u([...b, _]);
5035
+ const k = f.slice(0, f.indexOf(_));
5036
+ u([...k, _]);
5037
5037
  }
5038
5038
  },
5039
5039
  // there should be a distinction between target and currentTarget
@@ -5049,7 +5049,7 @@ function $h(o) {
5049
5049
  },
5050
5050
  nativeEvent: g
5051
5051
  };
5052
- if (m(k), x.stopped === !0)
5052
+ if (m(b), x.stopped === !0)
5053
5053
  break;
5054
5054
  }
5055
5055
  }
@@ -5101,17 +5101,17 @@ function $h(o) {
5101
5101
  const x = f === "onPointerMove", _ = f === "onClick" || f === "onContextMenu" || f === "onDoubleClick", T = i(p, x ? r : void 0), w = _ ? n(p) : 0;
5102
5102
  f === "onPointerDown" && (v.initialClick = [p.offsetX, p.offsetY], v.initialHits = T.map((E) => E.eventObject)), _ && !T.length && w <= 2 && (a(p, v.interaction), m && m(p)), x && u(T);
5103
5103
  function S(E) {
5104
- const P = E.eventObject, M = P.__r3f, L = M?.handlers;
5104
+ const A = E.eventObject, M = A.__r3f, L = M?.handlers;
5105
5105
  if (M != null && M.eventCount)
5106
5106
  if (x) {
5107
5107
  if (L.onPointerOver || L.onPointerEnter || L.onPointerOut || L.onPointerLeave) {
5108
- const R = Ws(E), I = v.hovered.get(R);
5109
- I ? I.stopped && E.stopPropagation() : (v.hovered.set(R, E), L.onPointerOver == null || L.onPointerOver(E), L.onPointerEnter == null || L.onPointerEnter(E));
5108
+ const R = Ws(E), z = v.hovered.get(R);
5109
+ z ? z.stopped && E.stopPropagation() : (v.hovered.set(R, E), L.onPointerOver == null || L.onPointerOver(E), L.onPointerEnter == null || L.onPointerEnter(E));
5110
5110
  }
5111
5111
  L.onPointerMove == null || L.onPointerMove(E);
5112
5112
  } else {
5113
5113
  const R = L[f];
5114
- R ? (!_ || v.initialHits.includes(P)) && (a(p, v.interaction.filter((I) => !v.initialHits.includes(I))), R(E)) : _ && v.initialHits.includes(P) && a(p, v.interaction.filter((I) => !v.initialHits.includes(I)));
5114
+ R ? (!_ || v.initialHits.includes(A)) && (a(p, v.interaction.filter((z) => !v.initialHits.includes(z))), R(E)) : _ && v.initialHits.includes(A) && a(p, v.interaction.filter((z) => !v.initialHits.includes(z)));
5115
5115
  }
5116
5116
  }
5117
5117
  l(T, p, w, S);
@@ -5126,33 +5126,33 @@ const em = ["set", "get", "setSize", "setFrameloop", "setDpr", "events", "invali
5126
5126
  const g = new V(), p = new V(), m = new V();
5127
5127
  function v(w = f().camera, S = p, E = f().size) {
5128
5128
  const {
5129
- width: P,
5129
+ width: A,
5130
5130
  height: M,
5131
5131
  top: L,
5132
5132
  left: R
5133
- } = E, I = P / M;
5133
+ } = E, z = A / M;
5134
5134
  S instanceof V ? m.copy(S) : m.set(...S);
5135
- const k = w.getWorldPosition(g).distanceTo(m);
5135
+ const b = w.getWorldPosition(g).distanceTo(m);
5136
5136
  if ($f(w))
5137
5137
  return {
5138
- width: P / w.zoom,
5138
+ width: A / w.zoom,
5139
5139
  height: M / w.zoom,
5140
5140
  top: L,
5141
5141
  left: R,
5142
5142
  factor: 1,
5143
- distance: k,
5144
- aspect: I
5143
+ distance: b,
5144
+ aspect: z
5145
5145
  };
5146
5146
  {
5147
- const z = w.fov * Math.PI / 180, b = 2 * Math.tan(z / 2) * k, j = b * (P / M);
5147
+ const I = w.fov * Math.PI / 180, k = 2 * Math.tan(I / 2) * b, j = k * (A / M);
5148
5148
  return {
5149
5149
  width: j,
5150
- height: b,
5150
+ height: k,
5151
5151
  top: L,
5152
5152
  left: R,
5153
- factor: P / j,
5154
- distance: k,
5155
- aspect: I
5153
+ factor: A / j,
5154
+ distance: b,
5155
+ aspect: z
5156
5156
  };
5157
5157
  }
5158
5158
  }
@@ -5162,7 +5162,7 @@ const em = ["set", "get", "setSize", "setFrameloop", "setDpr", "events", "invali
5162
5162
  ...S.performance,
5163
5163
  current: w
5164
5164
  }
5165
- })), A = new ye();
5165
+ })), P = new ye();
5166
5166
  return {
5167
5167
  set: d,
5168
5168
  get: f,
@@ -5184,8 +5184,8 @@ const em = ["set", "get", "setSize", "setFrameloop", "setDpr", "events", "invali
5184
5184
  flat: !1,
5185
5185
  controls: null,
5186
5186
  clock: new Yp(),
5187
- pointer: A,
5188
- mouse: A,
5187
+ pointer: P,
5188
+ mouse: P,
5189
5189
  frameloop: "always",
5190
5190
  onPointerMissed: void 0,
5191
5191
  performance: {
@@ -5224,18 +5224,18 @@ const em = ["set", "get", "setSize", "setFrameloop", "setDpr", "events", "invali
5224
5224
  ...w
5225
5225
  }
5226
5226
  })),
5227
- setSize: (w, S, E, P, M) => {
5227
+ setSize: (w, S, E, A, M) => {
5228
5228
  const L = f().camera, R = {
5229
5229
  width: w,
5230
5230
  height: S,
5231
- top: P || 0,
5231
+ top: A || 0,
5232
5232
  left: M || 0,
5233
5233
  updateStyle: E
5234
5234
  };
5235
- d((I) => ({
5235
+ d((z) => ({
5236
5236
  size: R,
5237
5237
  viewport: {
5238
- ...I.viewport,
5238
+ ...z.viewport,
5239
5239
  ...v(L, p, R)
5240
5240
  }
5241
5241
  }));
@@ -5269,12 +5269,12 @@ const em = ["set", "get", "setSize", "setFrameloop", "setDpr", "events", "invali
5269
5269
  initialHits: [],
5270
5270
  capturedMap: /* @__PURE__ */ new Map(),
5271
5271
  subscribe: (w, S, E) => {
5272
- const P = f().internal;
5273
- return P.priority = P.priority + (S > 0 ? 1 : 0), P.subscribers.push({
5272
+ const A = f().internal;
5273
+ return A.priority = A.priority + (S > 0 ? 1 : 0), A.subscribers.push({
5274
5274
  ref: w,
5275
5275
  priority: S,
5276
5276
  store: E
5277
- }), P.subscribers = P.subscribers.sort((M, L) => M.priority - L.priority), () => {
5277
+ }), A.subscribers = A.subscribers.sort((M, L) => M.priority - L.priority), () => {
5278
5278
  const M = f().internal;
5279
5279
  M != null && M.subscribers && (M.priority = M.priority - (S > 0 ? 1 : 0), M.subscribers = M.subscribers.filter((L) => L.ref !== w));
5280
5280
  };
@@ -5462,30 +5462,30 @@ function am(o) {
5462
5462
  size: v,
5463
5463
  scene: x,
5464
5464
  events: _,
5465
- onCreated: A,
5465
+ onCreated: P,
5466
5466
  shadows: T = !1,
5467
5467
  linear: w = !1,
5468
5468
  flat: S = !1,
5469
5469
  legacy: E = !1,
5470
- orthographic: P = !1,
5470
+ orthographic: A = !1,
5471
5471
  frameloop: M = "always",
5472
5472
  dpr: L = [1, 2],
5473
5473
  performance: R,
5474
- raycaster: I,
5475
- camera: k,
5476
- onPointerMissed: z
5477
- } = p, b = u.getState(), j = b.gl;
5478
- b.gl || b.set({
5474
+ raycaster: z,
5475
+ camera: b,
5476
+ onPointerMissed: I
5477
+ } = p, k = u.getState(), j = k.gl;
5478
+ k.gl || k.set({
5479
5479
  gl: j = om(m, o)
5480
5480
  });
5481
- let G = b.raycaster;
5482
- G || b.set({
5481
+ let G = k.raycaster;
5482
+ G || k.set({
5483
5483
  raycaster: G = new Ff()
5484
5484
  });
5485
5485
  const {
5486
5486
  params: Y,
5487
5487
  ...ee
5488
- } = I || {};
5488
+ } = z || {};
5489
5489
  if (Oe.equ(ee, G, Nr) || Rr(G, {
5490
5490
  ...ee
5491
5491
  }), Oe.equ(Y, G.params, Nr) || Rr(G, {
@@ -5493,80 +5493,80 @@ function am(o) {
5493
5493
  ...G.params,
5494
5494
  ...Y
5495
5495
  }
5496
- }), !b.camera || b.camera === g && !Oe.equ(g, k, Nr)) {
5497
- g = k;
5498
- const Z = k instanceof Gp, re = Z ? k : P ? new Wr(0, 0, 0, 0, 0.1, 1e3) : new Xr(75, 0, 0.1, 1e3);
5499
- Z || (re.position.z = 5, k && Rr(re, k), !b.camera && !(k != null && k.rotation) && re.lookAt(0, 0, 0)), b.set({
5500
- camera: re
5501
- }), G.camera = re;
5496
+ }), !k.camera || k.camera === g && !Oe.equ(g, b, Nr)) {
5497
+ g = b;
5498
+ const Z = b instanceof Gp, te = Z ? b : A ? new Wr(0, 0, 0, 0, 0.1, 1e3) : new Xr(75, 0, 0.1, 1e3);
5499
+ Z || (te.position.z = 5, b && Rr(te, b), !k.camera && !(b != null && b.rotation) && te.lookAt(0, 0, 0)), k.set({
5500
+ camera: te
5501
+ }), G.camera = te;
5502
5502
  }
5503
- if (!b.scene) {
5503
+ if (!k.scene) {
5504
5504
  let Z;
5505
- x instanceof fa ? Z = x : (Z = new fa(), x && Rr(Z, x)), b.set({
5505
+ x instanceof fa ? Z = x : (Z = new fa(), x && Rr(Z, x)), k.set({
5506
5506
  scene: Vr(Z)
5507
5507
  });
5508
5508
  }
5509
- if (!b.xr) {
5510
- var le;
5509
+ if (!k.xr) {
5510
+ var ae;
5511
5511
  const Z = (xe, Fe) => {
5512
5512
  const it = u.getState();
5513
5513
  it.frameloop !== "never" && Gc(xe, !0, it, Fe);
5514
- }, re = () => {
5514
+ }, te = () => {
5515
5515
  const xe = u.getState();
5516
5516
  xe.gl.xr.enabled = xe.gl.xr.isPresenting, xe.gl.xr.setAnimationLoop(xe.gl.xr.isPresenting ? Z : null), xe.gl.xr.isPresenting || Vc(xe);
5517
5517
  }, ge = {
5518
5518
  connect() {
5519
5519
  const xe = u.getState().gl;
5520
- xe.xr.addEventListener("sessionstart", re), xe.xr.addEventListener("sessionend", re);
5520
+ xe.xr.addEventListener("sessionstart", te), xe.xr.addEventListener("sessionend", te);
5521
5521
  },
5522
5522
  disconnect() {
5523
5523
  const xe = u.getState().gl;
5524
- xe.xr.removeEventListener("sessionstart", re), xe.xr.removeEventListener("sessionend", re);
5524
+ xe.xr.removeEventListener("sessionstart", te), xe.xr.removeEventListener("sessionend", te);
5525
5525
  }
5526
5526
  };
5527
- typeof ((le = j.xr) == null ? void 0 : le.addEventListener) == "function" && ge.connect(), b.set({
5527
+ typeof ((ae = j.xr) == null ? void 0 : ae.addEventListener) == "function" && ge.connect(), k.set({
5528
5528
  xr: ge
5529
5529
  });
5530
5530
  }
5531
5531
  if (j.shadowMap) {
5532
- const Z = j.shadowMap.enabled, re = j.shadowMap.type;
5532
+ const Z = j.shadowMap.enabled, te = j.shadowMap.type;
5533
5533
  if (j.shadowMap.enabled = !!T, Oe.boo(T))
5534
- j.shadowMap.type = bl;
5534
+ j.shadowMap.type = kl;
5535
5535
  else if (Oe.str(T)) {
5536
5536
  var Se;
5537
5537
  const ge = {
5538
5538
  basic: Wp,
5539
5539
  percentage: Xp,
5540
- soft: bl,
5540
+ soft: kl,
5541
5541
  variance: Kp
5542
5542
  };
5543
- j.shadowMap.type = (Se = ge[T]) != null ? Se : bl;
5543
+ j.shadowMap.type = (Se = ge[T]) != null ? Se : kl;
5544
5544
  } else
5545
5545
  Oe.obj(T) && Object.assign(j.shadowMap, T);
5546
- (Z !== j.shadowMap.enabled || re !== j.shadowMap.type) && (j.shadowMap.needsUpdate = !0);
5546
+ (Z !== j.shadowMap.enabled || te !== j.shadowMap.type) && (j.shadowMap.needsUpdate = !0);
5547
5547
  }
5548
5548
  const W = Jf();
5549
5549
  W && ("enabled" in W ? W.enabled = !E : "legacyMode" in W && (W.legacyMode = E)), f || Rr(j, {
5550
5550
  outputEncoding: w ? 3e3 : 3001,
5551
5551
  toneMapping: S ? Bp : jp
5552
- }), b.legacy !== E && b.set(() => ({
5552
+ }), k.legacy !== E && k.set(() => ({
5553
5553
  legacy: E
5554
- })), b.linear !== w && b.set(() => ({
5554
+ })), k.linear !== w && k.set(() => ({
5555
5555
  linear: w
5556
- })), b.flat !== S && b.set(() => ({
5556
+ })), k.flat !== S && k.set(() => ({
5557
5557
  flat: S
5558
- })), m && !Oe.fun(m) && !ld(m) && !Oe.equ(m, j, Nr) && Rr(j, m), _ && !b.events.handlers && b.set({
5558
+ })), m && !Oe.fun(m) && !ld(m) && !Oe.equ(m, j, Nr) && Rr(j, m), _ && !k.events.handlers && k.set({
5559
5559
  events: _(u)
5560
5560
  });
5561
5561
  const J = lm(o, v);
5562
- return Oe.equ(J, b.size, Nr) || b.setSize(J.width, J.height, J.updateStyle, J.top, J.left), L && b.viewport.dpr !== rd(L) && b.setDpr(L), b.frameloop !== M && b.setFrameloop(M), b.onPointerMissed || b.set({
5563
- onPointerMissed: z
5564
- }), R && !Oe.equ(R, b.performance, Nr) && b.set((Z) => ({
5562
+ return Oe.equ(J, k.size, Nr) || k.setSize(J.width, J.height, J.updateStyle, J.top, J.left), L && k.viewport.dpr !== rd(L) && k.setDpr(L), k.frameloop !== M && k.setFrameloop(M), k.onPointerMissed || k.set({
5563
+ onPointerMissed: I
5564
+ }), R && !Oe.equ(R, k.performance, Nr) && k.set((Z) => ({
5565
5565
  performance: {
5566
5566
  ...Z.performance,
5567
5567
  ...R
5568
5568
  }
5569
- })), d = A, f = !0, this;
5569
+ })), d = P, f = !0, this;
5570
5570
  },
5571
5571
  render(p) {
5572
5572
  return f || this.configure(), ji.updateContainer(/* @__PURE__ */ B.createElement(um, {
@@ -5637,16 +5637,16 @@ function cm({
5637
5637
  const x = {
5638
5638
  ...m
5639
5639
  };
5640
- Object.keys(m).forEach((A) => {
5640
+ Object.keys(m).forEach((P) => {
5641
5641
  // Some props should be off-limits
5642
- (em.includes(A) || // Otherwise filter out the props that are different and let the inject layer take precedence
5642
+ (em.includes(P) || // Otherwise filter out the props that are different and let the inject layer take precedence
5643
5643
  // Unless the inject layer props is undefined, then we keep the root layer
5644
- m[A] !== v[A] && v[A]) && delete x[A];
5644
+ m[P] !== v[P] && v[P]) && delete x[P];
5645
5645
  });
5646
5646
  let _;
5647
5647
  if (v && l) {
5648
- const A = v.camera;
5649
- _ = m.viewport.getCurrentViewport(A, new V(), l), A !== m.camera && sd(A, l);
5648
+ const P = v.camera;
5649
+ _ = m.viewport.getCurrentViewport(P, new V(), l), P !== m.camera && sd(P, l);
5650
5650
  }
5651
5651
  return {
5652
5652
  // The intersect consists of the previous root state
@@ -5699,11 +5699,11 @@ function cm({
5699
5699
  set: x,
5700
5700
  get: _,
5701
5701
  // Layers are allowed to override events
5702
- setEvents: (A) => x((T) => ({
5702
+ setEvents: (P) => x((T) => ({
5703
5703
  ...T,
5704
5704
  events: {
5705
5705
  ...T.events,
5706
- ...A
5706
+ ...P
5707
5707
  }
5708
5708
  }))
5709
5709
  }));
@@ -5744,7 +5744,7 @@ function Sa(o, n, r) {
5744
5744
  }
5745
5745
  Sa.debounce = Sa;
5746
5746
  var fm = Sa;
5747
- const Wc = /* @__PURE__ */ bf(fm);
5747
+ const Wc = /* @__PURE__ */ kf(fm);
5748
5748
  function dm(o) {
5749
5749
  let {
5750
5750
  debounce: n,
@@ -5776,34 +5776,34 @@ function dm(o) {
5776
5776
  lastBounds: a
5777
5777
  }), g = n ? typeof n == "number" ? n : n.scroll : null, p = n ? typeof n == "number" ? n : n.resize : null, m = pn(!1);
5778
5778
  Sn(() => (m.current = !0, () => void (m.current = !1)));
5779
- const [v, x, _] = bh(() => {
5779
+ const [v, x, _] = kh(() => {
5780
5780
  const S = () => {
5781
5781
  if (!f.current.element)
5782
5782
  return;
5783
5783
  const {
5784
5784
  left: E,
5785
- top: P,
5785
+ top: A,
5786
5786
  width: M,
5787
5787
  height: L,
5788
5788
  bottom: R,
5789
- right: I,
5790
- x: k,
5791
- y: z
5792
- } = f.current.element.getBoundingClientRect(), b = {
5789
+ right: z,
5790
+ x: b,
5791
+ y: I
5792
+ } = f.current.element.getBoundingClientRect(), k = {
5793
5793
  left: E,
5794
- top: P,
5794
+ top: A,
5795
5795
  width: M,
5796
5796
  height: L,
5797
5797
  bottom: R,
5798
- right: I,
5799
- x: k,
5800
- y: z
5798
+ right: z,
5799
+ x: b,
5800
+ y: I
5801
5801
  };
5802
- f.current.element instanceof HTMLElement && l && (b.height = f.current.element.offsetHeight, b.width = f.current.element.offsetWidth), Object.freeze(b), m.current && !gm(f.current.lastBounds, b) && d(f.current.lastBounds = b);
5802
+ f.current.element instanceof HTMLElement && l && (k.height = f.current.element.offsetHeight, k.width = f.current.element.offsetWidth), Object.freeze(k), m.current && !gm(f.current.lastBounds, k) && d(f.current.lastBounds = k);
5803
5803
  };
5804
5804
  return [S, p ? Wc(S, p) : S, g ? Wc(S, g) : S];
5805
5805
  }, [d, l, g, p]);
5806
- function A() {
5806
+ function P() {
5807
5807
  f.current.scrollContainers && (f.current.scrollContainers.forEach((S) => S.removeEventListener("scroll", _, !0)), f.current.scrollContainers = null), f.current.resizeObserver && (f.current.resizeObserver.disconnect(), f.current.resizeObserver = null);
5808
5808
  }
5809
5809
  function T() {
@@ -5813,11 +5813,11 @@ function dm(o) {
5813
5813
  })));
5814
5814
  }
5815
5815
  const w = (S) => {
5816
- !S || S === f.current.element || (A(), f.current.element = S, f.current.scrollContainers = ud(S), T());
5816
+ !S || S === f.current.element || (P(), f.current.element = S, f.current.scrollContainers = ud(S), T());
5817
5817
  };
5818
5818
  return hm(_, !!r), pm(x), Sn(() => {
5819
- A(), T();
5820
- }, [r, _, x]), Sn(() => A, []), [w, a, v];
5819
+ P(), T();
5820
+ }, [r, _, x]), Sn(() => P, []), [w, a, v];
5821
5821
  }
5822
5822
  function pm(o) {
5823
5823
  Sn(() => {
@@ -6035,34 +6035,34 @@ const Cm = /* @__PURE__ */ B.forwardRef(function({
6035
6035
  legacy: v,
6036
6036
  orthographic: x,
6037
6037
  frameloop: _,
6038
- dpr: A,
6038
+ dpr: P,
6039
6039
  performance: T,
6040
6040
  raycaster: w,
6041
6041
  camera: S,
6042
6042
  scene: E,
6043
- onPointerMissed: P,
6043
+ onPointerMissed: A,
6044
6044
  onCreated: M,
6045
6045
  ...L
6046
6046
  }, R) {
6047
6047
  B.useMemo(() => ja(Qp), []);
6048
- const I = Am(), [k, z] = dm({
6048
+ const z = Am(), [b, I] = dm({
6049
6049
  scroll: !0,
6050
6050
  debounce: {
6051
6051
  scroll: 50,
6052
6052
  resize: 0
6053
6053
  },
6054
6054
  ...i
6055
- }), b = B.useRef(null), j = B.useRef(null);
6056
- B.useImperativeHandle(R, () => b.current);
6057
- const G = ed(P), [Y, ee] = B.useState(!1), [le, Se] = B.useState(!1);
6055
+ }), k = B.useRef(null), j = B.useRef(null);
6056
+ B.useImperativeHandle(R, () => k.current);
6057
+ const G = ed(A), [Y, ee] = B.useState(!1), [ae, Se] = B.useState(!1);
6058
6058
  if (Y)
6059
6059
  throw Y;
6060
- if (le)
6061
- throw le;
6060
+ if (ae)
6061
+ throw ae;
6062
6062
  const W = B.useRef(null);
6063
6063
  Hi(() => {
6064
- const Z = b.current;
6065
- z.width > 0 && z.height > 0 && Z && (W.current || (W.current = am(Z)), W.current.configure({
6064
+ const Z = k.current;
6065
+ I.width > 0 && I.height > 0 && Z && (W.current || (W.current = am(Z)), W.current.configure({
6066
6066
  gl: u,
6067
6067
  events: a,
6068
6068
  shadows: g,
@@ -6071,23 +6071,23 @@ const Cm = /* @__PURE__ */ B.forwardRef(function({
6071
6071
  legacy: v,
6072
6072
  orthographic: x,
6073
6073
  frameloop: _,
6074
- dpr: A,
6074
+ dpr: P,
6075
6075
  performance: T,
6076
6076
  raycaster: w,
6077
6077
  camera: S,
6078
6078
  scene: E,
6079
- size: z,
6079
+ size: I,
6080
6080
  // Pass mutable reference to onPointerMissed so it's free to update
6081
- onPointerMissed: (...re) => G.current == null ? void 0 : G.current(...re),
6082
- onCreated: (re) => {
6083
- re.events.connect == null || re.events.connect(d ? Xh(d) ? d.current : d : j.current), f && re.setEvents({
6081
+ onPointerMissed: (...te) => G.current == null ? void 0 : G.current(...te),
6082
+ onCreated: (te) => {
6083
+ te.events.connect == null || te.events.connect(d ? Xh(d) ? d.current : d : j.current), f && te.setEvents({
6084
6084
  compute: (ge, xe) => {
6085
6085
  const Fe = ge[f + "X"], it = ge[f + "Y"];
6086
6086
  xe.pointer.set(Fe / xe.size.width * 2 - 1, -(it / xe.size.height) * 2 + 1), xe.raycaster.setFromCamera(xe.pointer, xe.camera);
6087
6087
  }
6088
- }), M?.(re);
6088
+ }), M?.(te);
6089
6089
  }
6090
- }), W.current.render(/* @__PURE__ */ B.createElement(I, null, /* @__PURE__ */ B.createElement(td, {
6090
+ }), W.current.render(/* @__PURE__ */ B.createElement(z, null, /* @__PURE__ */ B.createElement(td, {
6091
6091
  set: Se
6092
6092
  }, /* @__PURE__ */ B.createElement(B.Suspense, {
6093
6093
  fallback: /* @__PURE__ */ B.createElement(Kh, {
@@ -6095,7 +6095,7 @@ const Cm = /* @__PURE__ */ B.forwardRef(function({
6095
6095
  })
6096
6096
  }, n)))));
6097
6097
  }), B.useEffect(() => {
6098
- const Z = b.current;
6098
+ const Z = k.current;
6099
6099
  if (Z)
6100
6100
  return () => ad(Z);
6101
6101
  }, []);
@@ -6111,13 +6111,13 @@ const Cm = /* @__PURE__ */ B.forwardRef(function({
6111
6111
  ...l
6112
6112
  }
6113
6113
  }, L), /* @__PURE__ */ B.createElement("div", {
6114
- ref: k,
6114
+ ref: b,
6115
6115
  style: {
6116
6116
  width: "100%",
6117
6117
  height: "100%"
6118
6118
  }
6119
6119
  }, /* @__PURE__ */ B.createElement("canvas", {
6120
- ref: b,
6120
+ ref: k,
6121
6121
  style: {
6122
6122
  display: "block"
6123
6123
  }
@@ -6175,23 +6175,23 @@ function Nm({ children: o }) {
6175
6175
  if (!((m = v.inputSource) != null && m.handedness))
6176
6176
  return;
6177
6177
  const x = a[v.inputSource.handedness], _ = /* @__PURE__ */ new Set();
6178
- let A = g(v.controller);
6178
+ let P = g(v.controller);
6179
6179
  if (n.filter)
6180
- A = n.filter(A, r());
6180
+ P = n.filter(P, r());
6181
6181
  else {
6182
- const T = A.find((w) => w?.object);
6183
- T && (A = [T]);
6182
+ const T = P.find((w) => w?.object);
6183
+ T && (P = [T]);
6184
6184
  }
6185
- for (const T of A) {
6185
+ for (const T of P) {
6186
6186
  let w = T.object;
6187
6187
  for (; w; ) {
6188
6188
  if (d(w, "onHover") && !x.has(w)) {
6189
6189
  const E = f(w, "onHover");
6190
- for (const P of E)
6191
- P({ target: v, intersection: T, intersections: A });
6190
+ for (const A of E)
6191
+ A({ target: v, intersection: T, intersections: P });
6192
6192
  }
6193
6193
  const S = f(w, "onMove");
6194
- S?.forEach((E) => E({ target: v, intersection: T, intersections: A })), x.set(w, T), _.add(w.id), w = w.parent;
6194
+ S?.forEach((E) => E({ target: v, intersection: T, intersections: P })), x.set(w, T), _.add(w.id), w = w.parent;
6195
6195
  }
6196
6196
  }
6197
6197
  for (const T of x.keys())
@@ -6201,7 +6201,7 @@ function Nm({ children: o }) {
6201
6201
  if (!w)
6202
6202
  continue;
6203
6203
  for (const S of w)
6204
- S({ target: v, intersections: A });
6204
+ S({ target: v, intersections: P });
6205
6205
  }
6206
6206
  }
6207
6207
  });
@@ -6210,20 +6210,20 @@ function Nm({ children: o }) {
6210
6210
  var x;
6211
6211
  if (!((x = v.target.inputSource) != null && x.handedness))
6212
6212
  return;
6213
- const _ = a[v.target.inputSource.handedness], A = Array.from(new Set(_.values()));
6213
+ const _ = a[v.target.inputSource.handedness], P = Array.from(new Set(_.values()));
6214
6214
  u.forEach((T, w) => {
6215
- var S, E, P;
6215
+ var S, E, A;
6216
6216
  if (_.has(w)) {
6217
6217
  if (!T[m])
6218
6218
  return;
6219
6219
  for (const M of T[m])
6220
- (S = M.current) == null || S.call(M, { target: v.target, intersection: _.get(w), intersections: A });
6220
+ (S = M.current) == null || S.call(M, { target: v.target, intersection: _.get(w), intersections: P });
6221
6221
  } else if (m === "onSelect" && T.onSelectMissed)
6222
6222
  for (const M of T.onSelectMissed)
6223
- (E = M.current) == null || E.call(M, { target: v.target, intersections: A });
6223
+ (E = M.current) == null || E.call(M, { target: v.target, intersections: P });
6224
6224
  else if (m === "onSqueeze" && T.onSqueezeMissed)
6225
6225
  for (const M of T.onSqueezeMissed)
6226
- (P = M.current) == null || P.call(M, { target: v.target, intersections: A });
6226
+ (A = M.current) == null || A.call(M, { target: v.target, intersections: P });
6227
6227
  });
6228
6228
  },
6229
6229
  [a, u]
@@ -6282,15 +6282,15 @@ function Om({
6282
6282
  onInputSourcesChange: a,
6283
6283
  children: d
6284
6284
  }) {
6285
- const f = rt((E) => E.gl), g = rt((E) => E.camera), p = Ue((E) => E.player), m = Ue((E) => E.get), v = Ue((E) => E.set), x = Ue((E) => E.session), _ = Ue((E) => E.controllers), A = fn(i), T = fn(l), w = fn(u), S = fn(a);
6285
+ const f = rt((E) => E.gl), g = rt((E) => E.camera), p = Ue((E) => E.player), m = Ue((E) => E.get), v = Ue((E) => E.set), x = Ue((E) => E.session), _ = Ue((E) => E.controllers), P = fn(i), T = fn(l), w = fn(u), S = fn(a);
6286
6286
  return jt(() => {
6287
- const E = [0, 1].map((P) => {
6288
- const M = new Lm(P, f), L = () => v((I) => ({ controllers: [...I.controllers, M] })), R = () => v((I) => ({ controllers: I.controllers.filter((k) => k !== M) }));
6287
+ const E = [0, 1].map((A) => {
6288
+ const M = new Lm(A, f), L = () => v((z) => ({ controllers: [...z.controllers, M] })), R = () => v((z) => ({ controllers: z.controllers.filter((b) => b !== M) }));
6289
6289
  return M.addEventListener("connected", L), M.addEventListener("disconnected", R), () => {
6290
6290
  M.removeEventListener("connected", L), M.removeEventListener("disconnected", R);
6291
6291
  };
6292
6292
  });
6293
- return () => E.forEach((P) => P());
6293
+ return () => E.forEach((A) => A());
6294
6294
  }, [f, v]), jt(() => ur.subscribe(({ session: E }) => v(() => ({ session: E }))), [f.xr, v]), jt(() => {
6295
6295
  f.xr.setFoveation(o), v(() => ({ foveation: o }));
6296
6296
  }, [f.xr, o, v]), jt(() => {
@@ -6307,23 +6307,23 @@ function Om({
6307
6307
  if (!x)
6308
6308
  return void f.xr.setSession(null);
6309
6309
  const E = (R) => {
6310
- var I;
6311
- v(() => ({ isPresenting: !0 })), (I = A.current) == null || I.call(A, { nativeEvent: { ...R, target: x }, target: x });
6312
- }, P = (R) => {
6313
- var I;
6314
- v(() => ({ isPresenting: !1, session: null })), ur.setState(() => ({ session: null })), (I = T.current) == null || I.call(T, { nativeEvent: { ...R, target: x }, target: x });
6310
+ var z;
6311
+ v(() => ({ isPresenting: !0 })), (z = P.current) == null || z.call(P, { nativeEvent: { ...R, target: x }, target: x });
6312
+ }, A = (R) => {
6313
+ var z;
6314
+ v(() => ({ isPresenting: !1, session: null })), ur.setState(() => ({ session: null })), (z = T.current) == null || z.call(T, { nativeEvent: { ...R, target: x }, target: x });
6315
6315
  }, M = (R) => {
6316
- var I;
6317
- (I = w.current) == null || I.call(w, { nativeEvent: R, target: x });
6316
+ var z;
6317
+ (z = w.current) == null || z.call(w, { nativeEvent: R, target: x });
6318
6318
  }, L = (R) => {
6319
- var I;
6320
- const k = Object.values(x.inputSources).some((z) => z.hand);
6321
- v(() => ({ isHandTracking: k })), (I = S.current) == null || I.call(S, { nativeEvent: R, target: x });
6319
+ var z;
6320
+ const b = Object.values(x.inputSources).some((I) => I.hand);
6321
+ v(() => ({ isHandTracking: b })), (z = S.current) == null || z.call(S, { nativeEvent: R, target: x });
6322
6322
  };
6323
- return f.xr.addEventListener("sessionstart", E), f.xr.addEventListener("sessionend", P), x.addEventListener("visibilitychange", M), x.addEventListener("inputsourceschange", L), f.xr.setSession(x).then(() => {
6323
+ return f.xr.addEventListener("sessionstart", E), f.xr.addEventListener("sessionend", A), x.addEventListener("visibilitychange", M), x.addEventListener("inputsourceschange", L), f.xr.setSession(x).then(() => {
6324
6324
  f.xr.setFoveation(m().foveation);
6325
6325
  }), () => {
6326
- f.xr.removeEventListener("sessionstart", E), f.xr.removeEventListener("sessionend", P), x.removeEventListener("visibilitychange", M), x.removeEventListener("inputsourceschange", L);
6326
+ f.xr.removeEventListener("sessionstart", E), f.xr.removeEventListener("sessionend", A), x.removeEventListener("visibilitychange", M), x.removeEventListener("inputsourceschange", L);
6327
6327
  };
6328
6328
  }, [x, f.xr, v, m]), /* @__PURE__ */ B.createElement(Nm, null, /* @__PURE__ */ B.createElement("primitive", {
6329
6329
  object: p
@@ -6392,17 +6392,17 @@ function Dm(o) {
6392
6392
  ...o
6393
6393
  }));
6394
6394
  }
6395
- const km = (o, n) => {
6395
+ const bm = (o, n) => {
6396
6396
  var r;
6397
6397
  if (!(!o && !n))
6398
6398
  return o && !n ? { optionalFeatures: [o] } : o && n ? { ...n, optionalFeatures: Rm([...(r = n.optionalFeatures) != null ? r : [], o]) } : n;
6399
- }, bm = async (o, n) => {
6399
+ }, km = async (o, n) => {
6400
6400
  const r = ur.getState();
6401
6401
  if (r.session) {
6402
6402
  console.warn("@react-three/xr: session already started, please stop it first");
6403
6403
  return;
6404
6404
  }
6405
- const i = km(r.referenceSpaceType, n), l = await navigator.xr.requestSession(o, i);
6405
+ const i = bm(r.referenceSpaceType, n), l = await navigator.xr.requestSession(o, i);
6406
6406
  return r.set(() => ({ session: l })), l;
6407
6407
  }, Fm = async () => {
6408
6408
  const o = ur.getState();
@@ -6414,7 +6414,7 @@ const km = (o, n) => {
6414
6414
  }, Bm = async (o, { sessionInit: n, enterOnly: r, exitOnly: i } = {}) => {
6415
6415
  const l = ur.getState();
6416
6416
  if (!(l.session && r) && !(!l.session && i))
6417
- return l.session ? await Fm() : await bm(o, n);
6417
+ return l.session ? await Fm() : await km(o, n);
6418
6418
  }, jm = (o, n, r) => {
6419
6419
  switch (o) {
6420
6420
  case "entered":
@@ -6435,7 +6435,7 @@ const km = (o, n) => {
6435
6435
  }
6436
6436
  }, Ga = B.forwardRef(function({ mode: n, sessionInit: r, enterOnly: i = !1, exitOnly: l = !1, onClick: u, onError: a, children: d, ...f }, g) {
6437
6437
  var p;
6438
- const [m, v] = B.useState("exited"), [x, _] = B.useState("unknown"), A = jm(m, n, x), T = n === "inline" ? n : `immersive-${n.toLowerCase()}`, w = fn(a);
6438
+ const [m, v] = B.useState("exited"), [x, _] = B.useState("unknown"), P = jm(m, n, x), T = n === "inline" ? n : `immersive-${n.toLowerCase()}`, w = fn(a);
6439
6439
  jt(() => {
6440
6440
  if (!navigator?.xr)
6441
6441
  return void v("unsupported");
@@ -6443,8 +6443,8 @@ const km = (o, n) => {
6443
6443
  if (E)
6444
6444
  v("exited");
6445
6445
  else {
6446
- const P = location.protocol === "https:";
6447
- v("unsupported"), _(P ? "unknown" : "https");
6446
+ const A = location.protocol === "https:";
6447
+ v("unsupported"), _(A ? "unknown" : "https");
6448
6448
  }
6449
6449
  }).catch((E) => {
6450
6450
  v("unsupported"), "name" in E && E.name === "SecurityError" ? _("security") : _("unknown");
@@ -6460,12 +6460,12 @@ const km = (o, n) => {
6460
6460
  u?.(E);
6461
6461
  try {
6462
6462
  Bm(T, { sessionInit: r, enterOnly: i, exitOnly: l });
6463
- } catch (P) {
6463
+ } catch (A) {
6464
6464
  const M = w.current;
6465
- if (M && P instanceof Error)
6466
- M(P);
6465
+ if (M && A instanceof Error)
6466
+ M(A);
6467
6467
  else
6468
- throw P;
6468
+ throw A;
6469
6469
  }
6470
6470
  },
6471
6471
  [u, T, r, i, l, w]
@@ -6474,7 +6474,7 @@ const km = (o, n) => {
6474
6474
  ...f,
6475
6475
  ref: g,
6476
6476
  onClick: m === "unsupported" ? u : S
6477
- }, (p = typeof d == "function" ? d(m) : d) != null ? p : A);
6477
+ }, (p = typeof d == "function" ? d(m) : d) != null ? p : P);
6478
6478
  }), hd = {
6479
6479
  position: "absolute",
6480
6480
  bottom: "24px",
@@ -7095,12 +7095,12 @@ class ig {
7095
7095
  return d.length < 1 ? null : (d.push(this.parser.createNodeMesh(n)), Promise.all(d).then((g) => {
7096
7096
  const p = g.pop(), m = p.isGroup ? p.children : [p], v = g[0].count, x = [];
7097
7097
  for (const _ of m) {
7098
- const A = new $e(), T = new V(), w = new vo(), S = new V(1, 1, 1), E = new th(_.geometry, _.material, v);
7099
- for (let P = 0; P < v; P++)
7100
- f.TRANSLATION && T.fromBufferAttribute(f.TRANSLATION, P), f.ROTATION && w.fromBufferAttribute(f.ROTATION, P), f.SCALE && S.fromBufferAttribute(f.SCALE, P), E.setMatrixAt(P, A.compose(T, w, S));
7101
- for (const P in f)
7102
- P !== "TRANSLATION" && P !== "ROTATION" && P !== "SCALE" && _.geometry.setAttribute(P, f[P]);
7103
- ka.prototype.copy.call(E, _), this.parser.assignFinalMaterial(E), x.push(E);
7098
+ const P = new $e(), T = new V(), w = new vo(), S = new V(1, 1, 1), E = new th(_.geometry, _.material, v);
7099
+ for (let A = 0; A < v; A++)
7100
+ f.TRANSLATION && T.fromBufferAttribute(f.TRANSLATION, A), f.ROTATION && w.fromBufferAttribute(f.ROTATION, A), f.SCALE && S.fromBufferAttribute(f.SCALE, A), E.setMatrixAt(A, P.compose(T, w, S));
7101
+ for (const A in f)
7102
+ A !== "TRANSLATION" && A !== "ROTATION" && A !== "SCALE" && _.geometry.setAttribute(A, f[A]);
7103
+ ba.prototype.copy.call(E, _), this.parser.assignFinalMaterial(E), x.push(E);
7104
7104
  }
7105
7105
  return p.isGroup ? (p.clear(), p.add(...x), p) : x[0];
7106
7106
  }));
@@ -7163,8 +7163,8 @@ class og {
7163
7163
  p,
7164
7164
  function(v) {
7165
7165
  for (const x in v.attributes) {
7166
- const _ = v.attributes[x], A = f[x];
7167
- A !== void 0 && (_.normalized = A);
7166
+ const _ = v.attributes[x], P = f[x];
7167
+ P !== void 0 && (_.normalized = P);
7168
7168
  }
7169
7169
  m(v);
7170
7170
  },
@@ -7199,10 +7199,10 @@ class vd extends Ah {
7199
7199
  return r;
7200
7200
  }
7201
7201
  interpolate_(n, r, i, l) {
7202
- const u = this.resultBuffer, a = this.sampleValues, d = this.valueSize, f = d * 2, g = d * 3, p = l - r, m = (i - r) / p, v = m * m, x = v * m, _ = n * g, A = _ - g, T = -2 * x + 3 * v, w = x - v, S = 1 - T, E = w - v + m;
7203
- for (let P = 0; P !== d; P++) {
7204
- const M = a[A + P + d], L = a[A + P + f] * p, R = a[_ + P + d], I = a[_ + P] * p;
7205
- u[P] = S * M + E * L + T * R + w * I;
7202
+ const u = this.resultBuffer, a = this.sampleValues, d = this.valueSize, f = d * 2, g = d * 3, p = l - r, m = (i - r) / p, v = m * m, x = v * m, _ = n * g, P = _ - g, T = -2 * x + 3 * v, w = x - v, S = 1 - T, E = w - v + m;
7203
+ for (let A = 0; A !== d; A++) {
7204
+ const M = a[P + A + d], L = a[P + A + f] * p, R = a[_ + A + d], z = a[_ + A] * p;
7205
+ u[A] = S * M + E * L + T * R + w * z;
7206
7206
  }
7207
7207
  return u;
7208
7208
  }
@@ -7296,7 +7296,7 @@ const Bt = {
7296
7296
  BLEND: "BLEND"
7297
7297
  };
7298
7298
  function dg(o) {
7299
- return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new ba({
7299
+ return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new ka({
7300
7300
  color: 16777215,
7301
7301
  emissive: 0,
7302
7302
  metalness: 1,
@@ -7621,37 +7621,37 @@ class yg {
7621
7621
  const r = this, i = this.json, l = this.json.accessors[n];
7622
7622
  if (l.bufferView === void 0 && l.sparse === void 0) {
7623
7623
  const a = Kl[l.type], d = Qr[l.componentType], f = l.normalized === !0, g = new d(l.count * a);
7624
- return Promise.resolve(new bi(g, a, f));
7624
+ return Promise.resolve(new ki(g, a, f));
7625
7625
  }
7626
7626
  const u = [];
7627
7627
  return l.bufferView !== void 0 ? u.push(this.getDependency("bufferView", l.bufferView)) : u.push(null), l.sparse !== void 0 && (u.push(this.getDependency("bufferView", l.sparse.indices.bufferView)), u.push(this.getDependency("bufferView", l.sparse.values.bufferView))), Promise.all(u).then(function(a) {
7628
7628
  const d = a[0], f = Kl[l.type], g = Qr[l.componentType], p = g.BYTES_PER_ELEMENT, m = p * f, v = l.byteOffset || 0, x = l.bufferView !== void 0 ? i.bufferViews[l.bufferView].byteStride : void 0, _ = l.normalized === !0;
7629
- let A, T;
7629
+ let P, T;
7630
7630
  if (x && x !== m) {
7631
7631
  const w = Math.floor(v / x), S = "InterleavedBuffer:" + l.bufferView + ":" + l.componentType + ":" + w + ":" + l.count;
7632
7632
  let E = r.cache.get(S);
7633
- E || (A = new g(d, w * x, l.count * x / p), E = new ih(A, x / p), r.cache.add(S, E)), T = new or(
7633
+ E || (P = new g(d, w * x, l.count * x / p), E = new ih(P, x / p), r.cache.add(S, E)), T = new or(
7634
7634
  E,
7635
7635
  f,
7636
7636
  v % x / p,
7637
7637
  _
7638
7638
  );
7639
7639
  } else
7640
- d === null ? A = new g(l.count * f) : A = new g(d, v, l.count * f), T = new bi(A, f, _);
7640
+ d === null ? P = new g(l.count * f) : P = new g(d, v, l.count * f), T = new ki(P, f, _);
7641
7641
  if (l.sparse !== void 0) {
7642
- const w = Kl.SCALAR, S = Qr[l.sparse.indices.componentType], E = l.sparse.indices.byteOffset || 0, P = l.sparse.values.byteOffset || 0, M = new S(
7642
+ const w = Kl.SCALAR, S = Qr[l.sparse.indices.componentType], E = l.sparse.indices.byteOffset || 0, A = l.sparse.values.byteOffset || 0, M = new S(
7643
7643
  a[1],
7644
7644
  E,
7645
7645
  l.sparse.count * w
7646
- ), L = new g(a[2], P, l.sparse.count * f);
7647
- d !== null && (T = new bi(
7646
+ ), L = new g(a[2], A, l.sparse.count * f);
7647
+ d !== null && (T = new ki(
7648
7648
  T.array.slice(),
7649
7649
  T.itemSize,
7650
7650
  T.normalized
7651
7651
  ));
7652
- for (let R = 0, I = M.length; R < I; R++) {
7653
- const k = M[R];
7654
- if (T.setX(k, L[R * f]), f >= 2 && T.setY(k, L[R * f + 1]), f >= 3 && T.setZ(k, L[R * f + 2]), f >= 4 && T.setW(k, L[R * f + 3]), f >= 5)
7652
+ for (let R = 0, z = M.length; R < z; R++) {
7653
+ const b = M[R];
7654
+ if (T.setX(b, L[R * f]), f >= 2 && T.setY(b, L[R * f + 1]), f >= 3 && T.setZ(b, L[R * f + 2]), f >= 4 && T.setW(b, L[R * f + 3]), f >= 5)
7655
7655
  throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
7656
7656
  }
7657
7657
  }
@@ -7702,8 +7702,8 @@ class yg {
7702
7702
  const p = Promise.resolve(f).then(function(m) {
7703
7703
  return new Promise(function(v, x) {
7704
7704
  let _ = v;
7705
- r.isImageBitmapLoader === !0 && (_ = function(A) {
7706
- const T = new da(A);
7705
+ r.isImageBitmapLoader === !0 && (_ = function(P) {
7706
+ const T = new da(P);
7707
7707
  T.needsUpdate = !0, v(T);
7708
7708
  }), r.load(ar.resolveURL(m, u.path), _, void 0, x);
7709
7709
  });
@@ -7766,7 +7766,7 @@ class yg {
7766
7766
  n.material = i;
7767
7767
  }
7768
7768
  getMaterialType() {
7769
- return ba;
7769
+ return ka;
7770
7770
  }
7771
7771
  /**
7772
7772
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -7853,19 +7853,19 @@ class yg {
7853
7853
  return d.push(r.loadGeometries(a)), Promise.all(d).then(function(f) {
7854
7854
  const g = f.slice(0, f.length - 1), p = f[f.length - 1], m = [];
7855
7855
  for (let x = 0, _ = p.length; x < _; x++) {
7856
- const A = p[x], T = a[x];
7856
+ const P = p[x], T = a[x];
7857
7857
  let w;
7858
7858
  const S = g[x];
7859
7859
  if (T.mode === Bt.TRIANGLES || T.mode === Bt.TRIANGLE_STRIP || T.mode === Bt.TRIANGLE_FAN || T.mode === void 0)
7860
- w = u.isSkinnedMesh === !0 ? new ah(A, S) : new Wn(A, S), w.isSkinnedMesh === !0 && w.normalizeSkinWeights(), T.mode === Bt.TRIANGLE_STRIP ? w.geometry = ef(w.geometry, Bf) : T.mode === Bt.TRIANGLE_FAN && (w.geometry = ef(w.geometry, pa));
7860
+ w = u.isSkinnedMesh === !0 ? new ah(P, S) : new Wn(P, S), w.isSkinnedMesh === !0 && w.normalizeSkinWeights(), T.mode === Bt.TRIANGLE_STRIP ? w.geometry = ef(w.geometry, Bf) : T.mode === Bt.TRIANGLE_FAN && (w.geometry = ef(w.geometry, pa));
7861
7861
  else if (T.mode === Bt.LINES)
7862
- w = new uh(A, S);
7862
+ w = new uh(P, S);
7863
7863
  else if (T.mode === Bt.LINE_STRIP)
7864
- w = new ch(A, S);
7864
+ w = new ch(P, S);
7865
7865
  else if (T.mode === Bt.LINE_LOOP)
7866
- w = new fh(A, S);
7866
+ w = new fh(P, S);
7867
7867
  else if (T.mode === Bt.POINTS)
7868
- w = new dh(A, S);
7868
+ w = new dh(P, S);
7869
7869
  else
7870
7870
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + T.mode);
7871
7871
  Object.keys(w.geometry.morphAttributes).length > 0 && hg(w, u), w.name = r.createUniqueName(u.name || "mesh_" + n), Un(w, u), T.extensions && ir(l, w, T), r.assignFinalMaterial(w), m.push(w);
@@ -7934,8 +7934,8 @@ class yg {
7934
7934
  loadAnimation(n) {
7935
7935
  const i = this.json.animations[n], l = i.name ? i.name : "animation_" + n, u = [], a = [], d = [], f = [], g = [];
7936
7936
  for (let p = 0, m = i.channels.length; p < m; p++) {
7937
- const v = i.channels[p], x = i.samplers[v.sampler], _ = v.target, A = _.node, T = i.parameters !== void 0 ? i.parameters[x.input] : x.input, w = i.parameters !== void 0 ? i.parameters[x.output] : x.output;
7938
- _.node !== void 0 && (u.push(this.getDependency("node", A)), a.push(this.getDependency("accessor", T)), d.push(this.getDependency("accessor", w)), f.push(x), g.push(_));
7937
+ const v = i.channels[p], x = i.samplers[v.sampler], _ = v.target, P = _.node, T = i.parameters !== void 0 ? i.parameters[x.input] : x.input, w = i.parameters !== void 0 ? i.parameters[x.output] : x.output;
7938
+ _.node !== void 0 && (u.push(this.getDependency("node", P)), a.push(this.getDependency("accessor", T)), d.push(this.getDependency("accessor", w)), f.push(x), g.push(_));
7939
7939
  }
7940
7940
  return Promise.all([
7941
7941
  Promise.all(u),
@@ -7944,43 +7944,43 @@ class yg {
7944
7944
  Promise.all(f),
7945
7945
  Promise.all(g)
7946
7946
  ]).then(function(p) {
7947
- const m = p[0], v = p[1], x = p[2], _ = p[3], A = p[4], T = [];
7947
+ const m = p[0], v = p[1], x = p[2], _ = p[3], P = p[4], T = [];
7948
7948
  for (let w = 0, S = m.length; w < S; w++) {
7949
- const E = m[w], P = v[w], M = x[w], L = _[w], R = A[w];
7949
+ const E = m[w], A = v[w], M = x[w], L = _[w], R = P[w];
7950
7950
  if (E === void 0)
7951
7951
  continue;
7952
7952
  E.updateMatrix();
7953
- let I;
7953
+ let z;
7954
7954
  switch (Bn[R.path]) {
7955
7955
  case Bn.weights:
7956
- I = Th;
7956
+ z = Th;
7957
7957
  break;
7958
7958
  case Bn.rotation:
7959
- I = zc;
7959
+ z = zc;
7960
7960
  break;
7961
7961
  case Bn.position:
7962
7962
  case Bn.scale:
7963
7963
  default:
7964
- I = Eh;
7964
+ z = Eh;
7965
7965
  break;
7966
7966
  }
7967
- const k = E.name ? E.name : E.uuid, z = L.interpolation !== void 0 ? fg[L.interpolation] : Wf, b = [];
7967
+ const b = E.name ? E.name : E.uuid, I = L.interpolation !== void 0 ? fg[L.interpolation] : Wf, k = [];
7968
7968
  Bn[R.path] === Bn.weights ? E.traverse(function(G) {
7969
- G.morphTargetInfluences && b.push(G.name ? G.name : G.uuid);
7970
- }) : b.push(k);
7969
+ G.morphTargetInfluences && k.push(G.name ? G.name : G.uuid);
7970
+ }) : k.push(b);
7971
7971
  let j = M.array;
7972
7972
  if (M.normalized) {
7973
7973
  const G = Ea(j.constructor), Y = new Float32Array(j.length);
7974
- for (let ee = 0, le = j.length; ee < le; ee++)
7974
+ for (let ee = 0, ae = j.length; ee < ae; ee++)
7975
7975
  Y[ee] = j[ee] * G;
7976
7976
  j = Y;
7977
7977
  }
7978
- for (let G = 0, Y = b.length; G < Y; G++) {
7979
- const ee = new I(
7980
- b[G] + "." + Bn[R.path],
7981
- P.array,
7978
+ for (let G = 0, Y = k.length; G < Y; G++) {
7979
+ const ee = new z(
7980
+ k[G] + "." + Bn[R.path],
7981
+ A.array,
7982
7982
  j,
7983
- z
7983
+ I
7984
7984
  );
7985
7985
  L.interpolation === "CUBICSPLINE" && (ee.createInterpolant = function(Se) {
7986
7986
  const W = this instanceof zc ? cg : vd;
@@ -8041,7 +8041,7 @@ class yg {
8041
8041
  d.push(g);
8042
8042
  }), this.nodeCache[n] = Promise.all(d).then(function(g) {
8043
8043
  let p;
8044
- if (u.isBone === !0 ? p = new mh() : g.length > 1 ? p = new lr() : g.length === 1 ? p = g[0] : p = new ka(), p !== g[0])
8044
+ if (u.isBone === !0 ? p = new mh() : g.length > 1 ? p = new lr() : g.length === 1 ? p = g[0] : p = new ba(), p !== g[0])
8045
8045
  for (let m = 0, v = g.length; m < v; m++)
8046
8046
  p.add(g[m]);
8047
8047
  if (u.name && (p.userData.name = u.name, p.name = a), Un(p, u), u.extensions && ir(i, p, u), u.matrix !== void 0) {
@@ -8103,8 +8103,8 @@ function xg(o, n, r) {
8103
8103
  const v = r.json.accessors[m.POSITION], x = v.min, _ = v.max;
8104
8104
  if (x !== void 0 && _ !== void 0) {
8105
8105
  if (f.setX(Math.max(Math.abs(x[0]), Math.abs(_[0]))), f.setY(Math.max(Math.abs(x[1]), Math.abs(_[1]))), f.setZ(Math.max(Math.abs(x[2]), Math.abs(_[2]))), v.normalized) {
8106
- const A = Ea(Qr[v.componentType]);
8107
- f.multiplyScalar(A);
8106
+ const P = Ea(Qr[v.componentType]);
8107
+ f.multiplyScalar(P);
8108
8108
  }
8109
8109
  d.max(f);
8110
8110
  } else
@@ -8138,7 +8138,7 @@ function sf(o, n, r) {
8138
8138
  return n.targets !== void 0 ? pg(o, n.targets, r) : o;
8139
8139
  });
8140
8140
  }
8141
- var wg = Object.defineProperty, Sg = (o, n, r) => n in o ? wg(o, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[n] = r, ke = (o, n, r) => (Sg(o, typeof n != "symbol" ? n + "" : n, r), r);
8141
+ var wg = Object.defineProperty, Sg = (o, n, r) => n in o ? wg(o, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[n] = r, be = (o, n, r) => (Sg(o, typeof n != "symbol" ? n + "" : n, r), r);
8142
8142
  const je = {
8143
8143
  Handedness: {
8144
8144
  NONE: "none",
@@ -8236,7 +8236,7 @@ function Ag(o = 0, n = 0) {
8236
8236
  }
8237
8237
  class Pg {
8238
8238
  constructor(n) {
8239
- ke(this, "value"), ke(this, "componentProperty"), ke(this, "states"), ke(this, "valueNodeName"), ke(this, "valueNodeProperty"), ke(this, "minNodeName"), ke(this, "maxNodeName"), ke(this, "valueNode"), ke(this, "minNode"), ke(this, "maxNode"), this.componentProperty = n.componentProperty, this.states = n.states, this.valueNodeName = n.valueNodeName, this.valueNodeProperty = n.valueNodeProperty, this.valueNodeProperty === je.VisualResponseProperty.TRANSFORM && (this.minNodeName = n.minNodeName, this.maxNodeName = n.maxNodeName), this.value = 0, this.updateFromComponent(Tg);
8239
+ be(this, "value"), be(this, "componentProperty"), be(this, "states"), be(this, "valueNodeName"), be(this, "valueNodeProperty"), be(this, "minNodeName"), be(this, "maxNodeName"), be(this, "valueNode"), be(this, "minNode"), be(this, "maxNode"), this.componentProperty = n.componentProperty, this.states = n.states, this.valueNodeName = n.valueNodeName, this.valueNodeProperty = n.valueNodeProperty, this.valueNodeProperty === je.VisualResponseProperty.TRANSFORM && (this.minNodeName = n.minNodeName, this.maxNodeName = n.maxNodeName), this.value = 0, this.updateFromComponent(Tg);
8240
8240
  }
8241
8241
  /**
8242
8242
  * Computes the visual response's interpolation weight based on component state
@@ -8277,7 +8277,7 @@ class Cg {
8277
8277
  * @param {InputProfileComponent} componentDescription - Description of the component to be created
8278
8278
  */
8279
8279
  constructor(n, r) {
8280
- if (ke(this, "id"), ke(this, "values"), ke(this, "type"), ke(this, "gamepadIndices"), ke(this, "rootNodeName"), ke(this, "visualResponses"), ke(this, "touchPointNodeName"), ke(this, "touchPointNode"), !n || !r || !r.visualResponses || !r.gamepadIndices || Object.keys(r.gamepadIndices).length === 0)
8280
+ if (be(this, "id"), be(this, "values"), be(this, "type"), be(this, "gamepadIndices"), be(this, "rootNodeName"), be(this, "visualResponses"), be(this, "touchPointNodeName"), be(this, "touchPointNode"), !n || !r || !r.visualResponses || !r.gamepadIndices || Object.keys(r.gamepadIndices).length === 0)
8281
8281
  throw new Error("Invalid arguments supplied");
8282
8282
  this.id = n, this.type = r.type, this.rootNodeName = r.rootNodeName, this.touchPointNodeName = r.touchPointNodeName, this.visualResponses = {}, Object.keys(r.visualResponses).forEach((i) => {
8283
8283
  const l = new Pg(r.visualResponses[i]);
@@ -8313,7 +8313,7 @@ class Mg {
8313
8313
  * @param {string} assetUrl
8314
8314
  */
8315
8315
  constructor(n, r, i) {
8316
- if (ke(this, "xrInputSource"), ke(this, "assetUrl"), ke(this, "layoutDescription"), ke(this, "id"), ke(this, "components"), !n)
8316
+ if (be(this, "xrInputSource"), be(this, "assetUrl"), be(this, "layoutDescription"), be(this, "id"), be(this, "components"), !n)
8317
8317
  throw new Error("No xrInputSource supplied");
8318
8318
  if (!r)
8319
8319
  throw new Error("No profile supplied");
@@ -8498,7 +8498,7 @@ const Dg = B.forwardRef(function({ target: n, hideOnBlur: r = !1, ...i }, l) {
8498
8498
  "material-transparent": !0,
8499
8499
  ...i
8500
8500
  });
8501
- }), kg = new Ng(), bg = ({
8501
+ }), bg = new Ng(), kg = ({
8502
8502
  target: o,
8503
8503
  envMap: n,
8504
8504
  envMapIntensity: r
@@ -8513,7 +8513,7 @@ const Dg = B.forwardRef(function({ target: n, hideOnBlur: r = !1, ...i }, l) {
8513
8513
  if (i.current = f, f) {
8514
8514
  if (o.xrControllerModel = f, (g = o.inputSource) != null && g.hand)
8515
8515
  return;
8516
- l.current(f), a.current(f), o.inputSource ? kg.initializeControllerModel(f, o.inputSource) : console.warn("no input source on XRController when handleControllerModel");
8516
+ l.current(f), a.current(f), o.inputSource ? bg.initializeControllerModel(f, o.inputSource) : console.warn("no input source on XRController when handleControllerModel");
8517
8517
  } else {
8518
8518
  if ((p = o.inputSource) != null && p.hand)
8519
8519
  return;
@@ -8543,7 +8543,7 @@ function Fg({ rayMaterial: o = {}, hideRaysOnBlur: n = !1, envMap: r, envMapInte
8543
8543
  );
8544
8544
  return B.useMemo(() => ja({ XRControllerModel: Og }), []), /* @__PURE__ */ B.createElement(B.Fragment, null, l.map((d, f) => /* @__PURE__ */ B.createElement(B.Fragment, {
8545
8545
  key: f
8546
- }, wa(/* @__PURE__ */ B.createElement(bg, {
8546
+ }, wa(/* @__PURE__ */ B.createElement(kg, {
8547
8547
  target: d,
8548
8548
  envMap: r,
8549
8549
  envMapIntensity: i
@@ -8618,7 +8618,7 @@ class jg {
8618
8618
  }
8619
8619
  }
8620
8620
  const Ug = 0.01, Hg = "index-finger-tip";
8621
- class Vg extends ka {
8621
+ class Vg extends ba {
8622
8622
  constructor(n, r, i) {
8623
8623
  super(), this._onConnected = (l) => {
8624
8624
  const u = l.data;
@@ -8669,24 +8669,24 @@ function Gg({ modelLeft: o, modelRight: n }) {
8669
8669
  args: [i, o, n]
8670
8670
  }), i)));
8671
8671
  }
8672
- var Wg = Object.defineProperty, Xg = (o, n, r) => n in o ? Wg(o, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[n] = r, fe = (o, n, r) => (Xg(o, typeof n != "symbol" ? n + "" : n, r), r);
8672
+ var Wg = Object.defineProperty, Xg = (o, n, r) => n in o ? Wg(o, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[n] = r, de = (o, n, r) => (Xg(o, typeof n != "symbol" ? n + "" : n, r), r);
8673
8673
  const Ks = new Xf(), cf = new Fa(), Kg = Math.cos(70 * (Math.PI / 180)), ff = (o, n) => (o % n + n) % n;
8674
8674
  let Yg = class extends Ch {
8675
8675
  constructor(n, r) {
8676
- super(), fe(this, "object"), fe(this, "domElement"), fe(this, "enabled", !0), fe(this, "target", new V()), fe(this, "minDistance", 0), fe(this, "maxDistance", 1 / 0), fe(this, "minZoom", 0), fe(this, "maxZoom", 1 / 0), fe(this, "minPolarAngle", 0), fe(this, "maxPolarAngle", Math.PI), fe(this, "minAzimuthAngle", -1 / 0), fe(this, "maxAzimuthAngle", 1 / 0), fe(this, "enableDamping", !1), fe(this, "dampingFactor", 0.05), fe(this, "enableZoom", !0), fe(this, "zoomSpeed", 1), fe(this, "enableRotate", !0), fe(this, "rotateSpeed", 1), fe(this, "enablePan", !0), fe(this, "panSpeed", 1), fe(this, "screenSpacePanning", !0), fe(this, "keyPanSpeed", 7), fe(this, "zoomToCursor", !1), fe(this, "autoRotate", !1), fe(this, "autoRotateSpeed", 2), fe(this, "reverseOrbit", !1), fe(this, "reverseHorizontalOrbit", !1), fe(this, "reverseVerticalOrbit", !1), fe(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }), fe(this, "mouseButtons", {
8676
+ super(), de(this, "object"), de(this, "domElement"), de(this, "enabled", !0), de(this, "target", new V()), de(this, "minDistance", 0), de(this, "maxDistance", 1 / 0), de(this, "minZoom", 0), de(this, "maxZoom", 1 / 0), de(this, "minPolarAngle", 0), de(this, "maxPolarAngle", Math.PI), de(this, "minAzimuthAngle", -1 / 0), de(this, "maxAzimuthAngle", 1 / 0), de(this, "enableDamping", !1), de(this, "dampingFactor", 0.05), de(this, "enableZoom", !0), de(this, "zoomSpeed", 1), de(this, "enableRotate", !0), de(this, "rotateSpeed", 1), de(this, "enablePan", !0), de(this, "panSpeed", 1), de(this, "screenSpacePanning", !0), de(this, "keyPanSpeed", 7), de(this, "zoomToCursor", !1), de(this, "autoRotate", !1), de(this, "autoRotateSpeed", 2), de(this, "reverseOrbit", !1), de(this, "reverseHorizontalOrbit", !1), de(this, "reverseVerticalOrbit", !1), de(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }), de(this, "mouseButtons", {
8677
8677
  LEFT: Mr.ROTATE,
8678
8678
  MIDDLE: Mr.DOLLY,
8679
8679
  RIGHT: Mr.PAN
8680
- }), fe(this, "touches", { ONE: Lr.ROTATE, TWO: Lr.DOLLY_PAN }), fe(this, "target0"), fe(this, "position0"), fe(this, "zoom0"), fe(this, "_domElementKeyEvents", null), fe(this, "getPolarAngle"), fe(this, "getAzimuthalAngle"), fe(this, "setPolarAngle"), fe(this, "setAzimuthalAngle"), fe(this, "getDistance"), fe(this, "listenToKeyEvents"), fe(this, "stopListenToKeyEvents"), fe(this, "saveState"), fe(this, "reset"), fe(this, "update"), fe(this, "connect"), fe(this, "dispose"), this.object = n, this.domElement = r, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = () => p.phi, this.getAzimuthalAngle = () => p.theta, this.setPolarAngle = (D) => {
8681
- let K = ff(D, 2 * Math.PI), ae = p.phi;
8682
- ae < 0 && (ae += 2 * Math.PI), K < 0 && (K += 2 * Math.PI);
8683
- let _e = Math.abs(K - ae);
8684
- 2 * Math.PI - _e < _e && (K < ae ? K += 2 * Math.PI : ae += 2 * Math.PI), m.phi = K - ae, i.update();
8680
+ }), de(this, "touches", { ONE: Lr.ROTATE, TWO: Lr.DOLLY_PAN }), de(this, "target0"), de(this, "position0"), de(this, "zoom0"), de(this, "_domElementKeyEvents", null), de(this, "getPolarAngle"), de(this, "getAzimuthalAngle"), de(this, "setPolarAngle"), de(this, "setAzimuthalAngle"), de(this, "getDistance"), de(this, "listenToKeyEvents"), de(this, "stopListenToKeyEvents"), de(this, "saveState"), de(this, "reset"), de(this, "update"), de(this, "connect"), de(this, "dispose"), this.object = n, this.domElement = r, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = () => p.phi, this.getAzimuthalAngle = () => p.theta, this.setPolarAngle = (D) => {
8681
+ let K = ff(D, 2 * Math.PI), ce = p.phi;
8682
+ ce < 0 && (ce += 2 * Math.PI), K < 0 && (K += 2 * Math.PI);
8683
+ let _e = Math.abs(K - ce);
8684
+ 2 * Math.PI - _e < _e && (K < ce ? K += 2 * Math.PI : ce += 2 * Math.PI), m.phi = K - ce, i.update();
8685
8685
  }, this.setAzimuthalAngle = (D) => {
8686
- let K = ff(D, 2 * Math.PI), ae = p.theta;
8687
- ae < 0 && (ae += 2 * Math.PI), K < 0 && (K += 2 * Math.PI);
8688
- let _e = Math.abs(K - ae);
8689
- 2 * Math.PI - _e < _e && (K < ae ? K += 2 * Math.PI : ae += 2 * Math.PI), m.theta = K - ae, i.update();
8686
+ let K = ff(D, 2 * Math.PI), ce = p.theta;
8687
+ ce < 0 && (ce += 2 * Math.PI), K < 0 && (K += 2 * Math.PI);
8688
+ let _e = Math.abs(K - ce);
8689
+ 2 * Math.PI - _e < _e && (K < ce ? K += 2 * Math.PI : ce += 2 * Math.PI), m.theta = K - ce, i.update();
8690
8690
  }, this.getDistance = () => i.object.position.distanceTo(i.target), this.listenToKeyEvents = (D) => {
8691
8691
  D.addEventListener("keydown", ni), this._domElementKeyEvents = D;
8692
8692
  }, this.stopListenToKeyEvents = () => {
@@ -8696,14 +8696,14 @@ let Yg = class extends Ch {
8696
8696
  }, this.reset = () => {
8697
8697
  i.target.copy(i.target0), i.object.position.copy(i.position0), i.object.zoom = i.zoom0, i.object.updateProjectionMatrix(), i.dispatchEvent(l), i.update(), f = d.NONE;
8698
8698
  }, this.update = (() => {
8699
- const D = new V(), K = new V(0, 1, 0), ae = new vo().setFromUnitVectors(n.up, K), _e = ae.clone().invert(), Ge = new V(), Wt = new vo(), $t = 2 * Math.PI;
8699
+ const D = new V(), K = new V(0, 1, 0), ce = new vo().setFromUnitVectors(n.up, K), _e = ce.clone().invert(), Ge = new V(), Wt = new vo(), $t = 2 * Math.PI;
8700
8700
  return function() {
8701
8701
  const ii = i.object.position;
8702
- ae.setFromUnitVectors(n.up, K), _e.copy(ae).invert(), D.copy(ii).sub(i.target), D.applyQuaternion(ae), p.setFromVector3(D), i.autoRotate && f === d.NONE && Y(j()), i.enableDamping ? (p.theta += m.theta * i.dampingFactor, p.phi += m.phi * i.dampingFactor) : (p.theta += m.theta, p.phi += m.phi);
8702
+ ce.setFromUnitVectors(n.up, K), _e.copy(ce).invert(), D.copy(ii).sub(i.target), D.applyQuaternion(ce), p.setFromVector3(D), i.autoRotate && f === d.NONE && Y(j()), i.enableDamping ? (p.theta += m.theta * i.dampingFactor, p.phi += m.phi * i.dampingFactor) : (p.theta += m.theta, p.phi += m.phi);
8703
8703
  let Lt = i.minAzimuthAngle, Xt = i.maxAzimuthAngle;
8704
- isFinite(Lt) && isFinite(Xt) && (Lt < -Math.PI ? Lt += $t : Lt > Math.PI && (Lt -= $t), Xt < -Math.PI ? Xt += $t : Xt > Math.PI && (Xt -= $t), Lt <= Xt ? p.theta = Math.max(Lt, Math.min(Xt, p.theta)) : p.theta = p.theta > (Lt + Xt) / 2 ? Math.max(Lt, p.theta) : Math.min(Xt, p.theta)), p.phi = Math.max(i.minPolarAngle, Math.min(i.maxPolarAngle, p.phi)), p.makeSafe(), i.enableDamping === !0 ? i.target.addScaledVector(x, i.dampingFactor) : i.target.add(x), i.zoomToCursor && k || i.object.isOrthographicCamera ? p.radius = ge(p.radius) : p.radius = ge(p.radius * v), D.setFromSpherical(p), D.applyQuaternion(_e), ii.copy(i.target).add(D), i.object.matrixAutoUpdate || i.object.updateMatrix(), i.object.lookAt(i.target), i.enableDamping === !0 ? (m.theta *= 1 - i.dampingFactor, m.phi *= 1 - i.dampingFactor, x.multiplyScalar(1 - i.dampingFactor)) : (m.set(0, 0, 0), x.set(0, 0, 0));
8704
+ isFinite(Lt) && isFinite(Xt) && (Lt < -Math.PI ? Lt += $t : Lt > Math.PI && (Lt -= $t), Xt < -Math.PI ? Xt += $t : Xt > Math.PI && (Xt -= $t), Lt <= Xt ? p.theta = Math.max(Lt, Math.min(Xt, p.theta)) : p.theta = p.theta > (Lt + Xt) / 2 ? Math.max(Lt, p.theta) : Math.min(Xt, p.theta)), p.phi = Math.max(i.minPolarAngle, Math.min(i.maxPolarAngle, p.phi)), p.makeSafe(), i.enableDamping === !0 ? i.target.addScaledVector(x, i.dampingFactor) : i.target.add(x), i.zoomToCursor && b || i.object.isOrthographicCamera ? p.radius = ge(p.radius) : p.radius = ge(p.radius * v), D.setFromSpherical(p), D.applyQuaternion(_e), ii.copy(i.target).add(D), i.object.matrixAutoUpdate || i.object.updateMatrix(), i.object.lookAt(i.target), i.enableDamping === !0 ? (m.theta *= 1 - i.dampingFactor, m.phi *= 1 - i.dampingFactor, x.multiplyScalar(1 - i.dampingFactor)) : (m.set(0, 0, 0), x.set(0, 0, 0));
8705
8705
  let Pn = !1;
8706
- if (i.zoomToCursor && k) {
8706
+ if (i.zoomToCursor && b) {
8707
8707
  let Cn = null;
8708
8708
  if (i.object instanceof Xr && i.object.isPerspectiveCamera) {
8709
8709
  const Mn = D.length();
@@ -8711,24 +8711,24 @@ let Yg = class extends Ch {
8711
8711
  const pr = Mn - Cn;
8712
8712
  i.object.position.addScaledVector(R, pr), i.object.updateMatrixWorld();
8713
8713
  } else if (i.object.isOrthographicCamera) {
8714
- const Mn = new V(I.x, I.y, 0);
8714
+ const Mn = new V(z.x, z.y, 0);
8715
8715
  Mn.unproject(i.object), i.object.zoom = Math.max(i.minZoom, Math.min(i.maxZoom, i.object.zoom / v)), i.object.updateProjectionMatrix(), Pn = !0;
8716
- const pr = new V(I.x, I.y, 0);
8716
+ const pr = new V(z.x, z.y, 0);
8717
8717
  pr.unproject(i.object), i.object.position.sub(pr).add(Mn), i.object.updateMatrixWorld(), Cn = D.length();
8718
8718
  } else
8719
8719
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), i.zoomToCursor = !1;
8720
8720
  Cn !== null && (i.screenSpacePanning ? i.target.set(0, 0, -1).transformDirection(i.object.matrix).multiplyScalar(Cn).add(i.object.position) : (Ks.origin.copy(i.object.position), Ks.direction.set(0, 0, -1).transformDirection(i.object.matrix), Math.abs(i.object.up.dot(Ks.direction)) < Kg ? n.lookAt(i.target) : (cf.setFromNormalAndCoplanarPoint(i.object.up, i.target), Ks.intersectPlane(cf, i.target))));
8721
8721
  } else
8722
8722
  i.object instanceof Wr && i.object.isOrthographicCamera && (Pn = v !== 1, Pn && (i.object.zoom = Math.max(i.minZoom, Math.min(i.maxZoom, i.object.zoom / v)), i.object.updateProjectionMatrix()));
8723
- return v = 1, k = !1, Pn || Ge.distanceToSquared(i.object.position) > g || 8 * (1 - Wt.dot(i.object.quaternion)) > g ? (i.dispatchEvent(l), Ge.copy(i.object.position), Wt.copy(i.object.quaternion), Pn = !1, !0) : !1;
8723
+ return v = 1, b = !1, Pn || Ge.distanceToSquared(i.object.position) > g || 8 * (1 - Wt.dot(i.object.quaternion)) > g ? (i.dispatchEvent(l), Ge.copy(i.object.position), Wt.copy(i.object.quaternion), Pn = !1, !0) : !1;
8724
8724
  };
8725
8725
  })(), this.connect = (D) => {
8726
8726
  D === document && console.error(
8727
8727
  'THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'
8728
8728
  ), i.domElement = D, i.domElement.style.touchAction = "none", i.domElement.addEventListener("contextmenu", Ki), i.domElement.addEventListener("pointerdown", Wi), i.domElement.addEventListener("pointercancel", An), i.domElement.addEventListener("wheel", Xi);
8729
8729
  }, this.dispose = () => {
8730
- var D, K, ae, _e, Ge, Wt;
8731
- (D = i.domElement) == null || D.removeEventListener("contextmenu", Ki), (K = i.domElement) == null || K.removeEventListener("pointerdown", Wi), (ae = i.domElement) == null || ae.removeEventListener("pointercancel", An), (_e = i.domElement) == null || _e.removeEventListener("wheel", Xi), (Ge = i.domElement) == null || Ge.ownerDocument.removeEventListener("pointermove", ei), (Wt = i.domElement) == null || Wt.ownerDocument.removeEventListener("pointerup", ti), i._domElementKeyEvents !== null && i._domElementKeyEvents.removeEventListener("keydown", ni);
8730
+ var D, K, ce, _e, Ge, Wt;
8731
+ (D = i.domElement) == null || D.removeEventListener("contextmenu", Ki), (K = i.domElement) == null || K.removeEventListener("pointerdown", Wi), (ce = i.domElement) == null || ce.removeEventListener("pointercancel", An), (_e = i.domElement) == null || _e.removeEventListener("wheel", Xi), (Ge = i.domElement) == null || Ge.ownerDocument.removeEventListener("pointermove", ei), (Wt = i.domElement) == null || Wt.ownerDocument.removeEventListener("pointerup", ti), i._domElementKeyEvents !== null && i._domElementKeyEvents.removeEventListener("keydown", ni);
8732
8732
  };
8733
8733
  const i = this, l = { type: "change" }, u = { type: "start" }, a = { type: "end" }, d = {
8734
8734
  NONE: -1,
@@ -8743,9 +8743,9 @@ let Yg = class extends Ch {
8743
8743
  let f = d.NONE;
8744
8744
  const g = 1e-6, p = new Oc(), m = new Oc();
8745
8745
  let v = 1;
8746
- const x = new V(), _ = new ye(), A = new ye(), T = new ye(), w = new ye(), S = new ye(), E = new ye(), P = new ye(), M = new ye(), L = new ye(), R = new V(), I = new ye();
8747
- let k = !1;
8748
- const z = [], b = {};
8746
+ const x = new V(), _ = new ye(), P = new ye(), T = new ye(), w = new ye(), S = new ye(), E = new ye(), A = new ye(), M = new ye(), L = new ye(), R = new V(), z = new ye();
8747
+ let b = !1;
8748
+ const I = [], k = {};
8749
8749
  function j() {
8750
8750
  return 2 * Math.PI / 60 / 60 * i.autoRotateSpeed;
8751
8751
  }
@@ -8758,28 +8758,28 @@ let Yg = class extends Ch {
8758
8758
  function ee(D) {
8759
8759
  i.reverseOrbit || i.reverseVerticalOrbit ? m.phi += D : m.phi -= D;
8760
8760
  }
8761
- const le = (() => {
8761
+ const ae = (() => {
8762
8762
  const D = new V();
8763
- return function(ae, _e) {
8764
- D.setFromMatrixColumn(_e, 0), D.multiplyScalar(-ae), x.add(D);
8763
+ return function(ce, _e) {
8764
+ D.setFromMatrixColumn(_e, 0), D.multiplyScalar(-ce), x.add(D);
8765
8765
  };
8766
8766
  })(), Se = (() => {
8767
8767
  const D = new V();
8768
- return function(ae, _e) {
8769
- i.screenSpacePanning === !0 ? D.setFromMatrixColumn(_e, 1) : (D.setFromMatrixColumn(_e, 0), D.crossVectors(i.object.up, D)), D.multiplyScalar(ae), x.add(D);
8768
+ return function(ce, _e) {
8769
+ i.screenSpacePanning === !0 ? D.setFromMatrixColumn(_e, 1) : (D.setFromMatrixColumn(_e, 0), D.crossVectors(i.object.up, D)), D.multiplyScalar(ce), x.add(D);
8770
8770
  };
8771
8771
  })(), W = (() => {
8772
8772
  const D = new V();
8773
- return function(ae, _e) {
8773
+ return function(ce, _e) {
8774
8774
  const Ge = i.domElement;
8775
8775
  if (Ge && i.object instanceof Xr && i.object.isPerspectiveCamera) {
8776
8776
  const Wt = i.object.position;
8777
8777
  D.copy(Wt).sub(i.target);
8778
8778
  let $t = D.length();
8779
- $t *= Math.tan(i.object.fov / 2 * Math.PI / 180), le(2 * ae * $t / Ge.clientHeight, i.object.matrix), Se(2 * _e * $t / Ge.clientHeight, i.object.matrix);
8779
+ $t *= Math.tan(i.object.fov / 2 * Math.PI / 180), ae(2 * ce * $t / Ge.clientHeight, i.object.matrix), Se(2 * _e * $t / Ge.clientHeight, i.object.matrix);
8780
8780
  } else
8781
- Ge && i.object instanceof Wr && i.object.isOrthographicCamera ? (le(
8782
- ae * (i.object.right - i.object.left) / i.object.zoom / Ge.clientWidth,
8781
+ Ge && i.object instanceof Wr && i.object.isOrthographicCamera ? (ae(
8782
+ ce * (i.object.right - i.object.left) / i.object.zoom / Ge.clientWidth,
8783
8783
  i.object.matrix
8784
8784
  ), Se(
8785
8785
  _e * (i.object.top - i.object.bottom) / i.object.zoom / Ge.clientHeight,
@@ -8793,12 +8793,12 @@ let Yg = class extends Ch {
8793
8793
  function Z(D) {
8794
8794
  i.object instanceof Xr && i.object.isPerspectiveCamera || i.object instanceof Wr && i.object.isOrthographicCamera ? v *= D : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), i.enableZoom = !1);
8795
8795
  }
8796
- function re(D) {
8796
+ function te(D) {
8797
8797
  if (!i.zoomToCursor || !i.domElement)
8798
8798
  return;
8799
- k = !0;
8800
- const K = i.domElement.getBoundingClientRect(), ae = D.clientX - K.left, _e = D.clientY - K.top, Ge = K.width, Wt = K.height;
8801
- I.x = ae / Ge * 2 - 1, I.y = -(_e / Wt) * 2 + 1, R.set(I.x, I.y, 1).unproject(i.object).sub(i.object.position).normalize();
8799
+ b = !0;
8800
+ const K = i.domElement.getBoundingClientRect(), ce = D.clientX - K.left, _e = D.clientY - K.top, Ge = K.width, Wt = K.height;
8801
+ z.x = ce / Ge * 2 - 1, z.y = -(_e / Wt) * 2 + 1, R.set(z.x, z.y, 1).unproject(i.object).sub(i.object.position).normalize();
8802
8802
  }
8803
8803
  function ge(D) {
8804
8804
  return Math.max(i.minDistance, Math.min(i.maxDistance, D));
@@ -8807,24 +8807,24 @@ let Yg = class extends Ch {
8807
8807
  _.set(D.clientX, D.clientY);
8808
8808
  }
8809
8809
  function Fe(D) {
8810
- re(D), P.set(D.clientX, D.clientY);
8810
+ te(D), A.set(D.clientX, D.clientY);
8811
8811
  }
8812
8812
  function it(D) {
8813
8813
  w.set(D.clientX, D.clientY);
8814
8814
  }
8815
8815
  function gt(D) {
8816
- A.set(D.clientX, D.clientY), T.subVectors(A, _).multiplyScalar(i.rotateSpeed);
8816
+ P.set(D.clientX, D.clientY), T.subVectors(P, _).multiplyScalar(i.rotateSpeed);
8817
8817
  const K = i.domElement;
8818
- K && (Y(2 * Math.PI * T.x / K.clientHeight), ee(2 * Math.PI * T.y / K.clientHeight)), _.copy(A), i.update();
8818
+ K && (Y(2 * Math.PI * T.x / K.clientHeight), ee(2 * Math.PI * T.y / K.clientHeight)), _.copy(P), i.update();
8819
8819
  }
8820
8820
  function se(D) {
8821
- M.set(D.clientX, D.clientY), L.subVectors(M, P), L.y > 0 ? J(G()) : L.y < 0 && Z(G()), P.copy(M), i.update();
8821
+ M.set(D.clientX, D.clientY), L.subVectors(M, A), L.y > 0 ? J(G()) : L.y < 0 && Z(G()), A.copy(M), i.update();
8822
8822
  }
8823
- function ue(D) {
8823
+ function fe(D) {
8824
8824
  S.set(D.clientX, D.clientY), E.subVectors(S, w).multiplyScalar(i.panSpeed), W(E.x, E.y), w.copy(S), i.update();
8825
8825
  }
8826
- function ce(D) {
8827
- re(D), D.deltaY < 0 ? Z(G()) : D.deltaY > 0 && J(G()), i.update();
8826
+ function le(D) {
8827
+ te(D), D.deltaY < 0 ? Z(G()) : D.deltaY > 0 && J(G()), i.update();
8828
8828
  }
8829
8829
  function Me(D) {
8830
8830
  let K = !1;
@@ -8845,54 +8845,54 @@ let Yg = class extends Ch {
8845
8845
  K && (D.preventDefault(), i.update());
8846
8846
  }
8847
8847
  function Pe() {
8848
- if (z.length == 1)
8849
- _.set(z[0].pageX, z[0].pageY);
8848
+ if (I.length == 1)
8849
+ _.set(I[0].pageX, I[0].pageY);
8850
8850
  else {
8851
- const D = 0.5 * (z[0].pageX + z[1].pageX), K = 0.5 * (z[0].pageY + z[1].pageY);
8851
+ const D = 0.5 * (I[0].pageX + I[1].pageX), K = 0.5 * (I[0].pageY + I[1].pageY);
8852
8852
  _.set(D, K);
8853
8853
  }
8854
8854
  }
8855
8855
  function Ve() {
8856
- if (z.length == 1)
8857
- w.set(z[0].pageX, z[0].pageY);
8856
+ if (I.length == 1)
8857
+ w.set(I[0].pageX, I[0].pageY);
8858
8858
  else {
8859
- const D = 0.5 * (z[0].pageX + z[1].pageX), K = 0.5 * (z[0].pageY + z[1].pageY);
8859
+ const D = 0.5 * (I[0].pageX + I[1].pageX), K = 0.5 * (I[0].pageY + I[1].pageY);
8860
8860
  w.set(D, K);
8861
8861
  }
8862
8862
  }
8863
- function de() {
8864
- const D = z[0].pageX - z[1].pageX, K = z[0].pageY - z[1].pageY, ae = Math.sqrt(D * D + K * K);
8865
- P.set(0, ae);
8863
+ function ue() {
8864
+ const D = I[0].pageX - I[1].pageX, K = I[0].pageY - I[1].pageY, ce = Math.sqrt(D * D + K * K);
8865
+ A.set(0, ce);
8866
8866
  }
8867
8867
  function Ie() {
8868
- i.enableZoom && de(), i.enablePan && Ve();
8868
+ i.enableZoom && ue(), i.enablePan && Ve();
8869
8869
  }
8870
8870
  function st() {
8871
- i.enableZoom && de(), i.enableRotate && Pe();
8871
+ i.enableZoom && ue(), i.enableRotate && Pe();
8872
8872
  }
8873
8873
  function vt(D) {
8874
- if (z.length == 1)
8875
- A.set(D.pageX, D.pageY);
8874
+ if (I.length == 1)
8875
+ P.set(D.pageX, D.pageY);
8876
8876
  else {
8877
- const ae = ri(D), _e = 0.5 * (D.pageX + ae.x), Ge = 0.5 * (D.pageY + ae.y);
8878
- A.set(_e, Ge);
8877
+ const ce = ri(D), _e = 0.5 * (D.pageX + ce.x), Ge = 0.5 * (D.pageY + ce.y);
8878
+ P.set(_e, Ge);
8879
8879
  }
8880
- T.subVectors(A, _).multiplyScalar(i.rotateSpeed);
8880
+ T.subVectors(P, _).multiplyScalar(i.rotateSpeed);
8881
8881
  const K = i.domElement;
8882
- K && (Y(2 * Math.PI * T.x / K.clientHeight), ee(2 * Math.PI * T.y / K.clientHeight)), _.copy(A);
8882
+ K && (Y(2 * Math.PI * T.x / K.clientHeight), ee(2 * Math.PI * T.y / K.clientHeight)), _.copy(P);
8883
8883
  }
8884
8884
  function Vi(D) {
8885
- if (z.length == 1)
8885
+ if (I.length == 1)
8886
8886
  S.set(D.pageX, D.pageY);
8887
8887
  else {
8888
- const K = ri(D), ae = 0.5 * (D.pageX + K.x), _e = 0.5 * (D.pageY + K.y);
8889
- S.set(ae, _e);
8888
+ const K = ri(D), ce = 0.5 * (D.pageX + K.x), _e = 0.5 * (D.pageY + K.y);
8889
+ S.set(ce, _e);
8890
8890
  }
8891
8891
  E.subVectors(S, w).multiplyScalar(i.panSpeed), W(E.x, E.y), w.copy(S);
8892
8892
  }
8893
8893
  function Gi(D) {
8894
- const K = ri(D), ae = D.pageX - K.x, _e = D.pageY - K.y, Ge = Math.sqrt(ae * ae + _e * _e);
8895
- M.set(0, Ge), L.set(0, Math.pow(M.y / P.y, i.zoomSpeed)), J(L.y), P.copy(M);
8894
+ const K = ri(D), ce = D.pageX - K.x, _e = D.pageY - K.y, Ge = Math.sqrt(ce * ce + _e * _e);
8895
+ M.set(0, Ge), L.set(0, Math.pow(M.y / A.y, i.zoomSpeed)), J(L.y), A.copy(M);
8896
8896
  }
8897
8897
  function _o(D) {
8898
8898
  i.enableZoom && Gi(D), i.enablePan && Vi(D);
@@ -8901,15 +8901,15 @@ let Yg = class extends Ch {
8901
8901
  i.enableZoom && Gi(D), i.enableRotate && vt(D);
8902
8902
  }
8903
8903
  function Wi(D) {
8904
- var K, ae;
8905
- i.enabled !== !1 && (z.length === 0 && ((K = i.domElement) == null || K.ownerDocument.addEventListener("pointermove", ei), (ae = i.domElement) == null || ae.ownerDocument.addEventListener("pointerup", ti)), Co(D), D.pointerType === "touch" ? Ao(D) : Eo(D));
8904
+ var K, ce;
8905
+ i.enabled !== !1 && (I.length === 0 && ((K = i.domElement) == null || K.ownerDocument.addEventListener("pointermove", ei), (ce = i.domElement) == null || ce.ownerDocument.addEventListener("pointerup", ti)), Co(D), D.pointerType === "touch" ? Ao(D) : Eo(D));
8906
8906
  }
8907
8907
  function ei(D) {
8908
8908
  i.enabled !== !1 && (D.pointerType === "touch" ? Po(D) : To(D));
8909
8909
  }
8910
8910
  function ti(D) {
8911
- var K, ae, _e;
8912
- Yi(D), z.length === 0 && ((K = i.domElement) == null || K.releasePointerCapture(D.pointerId), (ae = i.domElement) == null || ae.ownerDocument.removeEventListener("pointermove", ei), (_e = i.domElement) == null || _e.ownerDocument.removeEventListener("pointerup", ti)), i.dispatchEvent(a), f = d.NONE;
8911
+ var K, ce, _e;
8912
+ Yi(D), I.length === 0 && ((K = i.domElement) == null || K.releasePointerCapture(D.pointerId), (ce = i.domElement) == null || ce.ownerDocument.removeEventListener("pointermove", ei), (_e = i.domElement) == null || _e.ownerDocument.removeEventListener("pointerup", ti)), i.dispatchEvent(a), f = d.NONE;
8913
8913
  }
8914
8914
  function An(D) {
8915
8915
  Yi(D);
@@ -8978,18 +8978,18 @@ let Yg = class extends Ch {
8978
8978
  case d.PAN:
8979
8979
  if (i.enablePan === !1)
8980
8980
  return;
8981
- ue(D);
8981
+ fe(D);
8982
8982
  break;
8983
8983
  }
8984
8984
  }
8985
8985
  function Xi(D) {
8986
- i.enabled === !1 || i.enableZoom === !1 || f !== d.NONE && f !== d.ROTATE || (D.preventDefault(), i.dispatchEvent(u), ce(D), i.dispatchEvent(a));
8986
+ i.enabled === !1 || i.enableZoom === !1 || f !== d.NONE && f !== d.ROTATE || (D.preventDefault(), i.dispatchEvent(u), le(D), i.dispatchEvent(a));
8987
8987
  }
8988
8988
  function ni(D) {
8989
8989
  i.enabled === !1 || i.enablePan === !1 || Me(D);
8990
8990
  }
8991
8991
  function Ao(D) {
8992
- switch (Qi(D), z.length) {
8992
+ switch (Qi(D), I.length) {
8993
8993
  case 1:
8994
8994
  switch (i.touches.ONE) {
8995
8995
  case Lr.ROTATE:
@@ -9057,23 +9057,23 @@ let Yg = class extends Ch {
9057
9057
  i.enabled !== !1 && D.preventDefault();
9058
9058
  }
9059
9059
  function Co(D) {
9060
- z.push(D);
9060
+ I.push(D);
9061
9061
  }
9062
9062
  function Yi(D) {
9063
- delete b[D.pointerId];
9064
- for (let K = 0; K < z.length; K++)
9065
- if (z[K].pointerId == D.pointerId) {
9066
- z.splice(K, 1);
9063
+ delete k[D.pointerId];
9064
+ for (let K = 0; K < I.length; K++)
9065
+ if (I[K].pointerId == D.pointerId) {
9066
+ I.splice(K, 1);
9067
9067
  return;
9068
9068
  }
9069
9069
  }
9070
9070
  function Qi(D) {
9071
- let K = b[D.pointerId];
9072
- K === void 0 && (K = new ye(), b[D.pointerId] = K), K.set(D.pageX, D.pageY);
9071
+ let K = k[D.pointerId];
9072
+ K === void 0 && (K = new ye(), k[D.pointerId] = K), K.set(D.pageX, D.pageY);
9073
9073
  }
9074
9074
  function ri(D) {
9075
- const K = D.pointerId === z[0].pointerId ? z[1] : z[0];
9076
- return b[K.pointerId];
9075
+ const K = D.pointerId === I[0].pointerId ? I[1] : I[0];
9076
+ return k[K.pointerId];
9077
9077
  }
9078
9078
  r !== void 0 && this.connect(r), this.update();
9079
9079
  }
@@ -9171,8 +9171,8 @@ class Xa extends Rh {
9171
9171
  type: "LineMaterial",
9172
9172
  uniforms: ga.clone(
9173
9173
  ga.merge([
9174
- kc.common,
9175
- kc.fog,
9174
+ bc.common,
9175
+ bc.fog,
9176
9176
  {
9177
9177
  worldUnits: { value: 1 },
9178
9178
  linewidth: { value: 1 },
@@ -9745,7 +9745,7 @@ function qg(o, n, r) {
9745
9745
  tt.applyMatrix4(i), nt.applyMatrix4(i), tt.multiplyScalar(1 / tt.w), nt.multiplyScalar(1 / nt.w), tt.x *= u.x / 2, tt.y *= u.y / 2, nt.x *= u.x / 2, nt.y *= u.y / 2, ft.start.copy(tt), ft.start.z = 0, ft.end.copy(nt), ft.end.z = 0;
9746
9746
  const _ = ft.closestPointToPointParameter(ql, !0);
9747
9747
  ft.at(_, mf);
9748
- const A = Gf.lerp(tt.z, nt.z, _), T = A >= -1 && A <= 1, w = ql.distanceTo(mf) < cr * 0.5;
9748
+ const P = Gf.lerp(tt.z, nt.z, _), T = P >= -1 && P <= 1, w = ql.distanceTo(mf) < cr * 0.5;
9749
9749
  if (T && w) {
9750
9750
  ft.start.fromBufferAttribute(f, m), ft.end.fromBufferAttribute(g, m), ft.start.applyMatrix4(a), ft.end.applyMatrix4(a);
9751
9751
  const S = new V(), E = new V();
@@ -9819,7 +9819,7 @@ const Jg = /* @__PURE__ */ B.forwardRef(function({
9819
9819
  ...f
9820
9820
  }, g) {
9821
9821
  var p;
9822
- const m = rt((T) => T.size), v = B.useMemo(() => a ? new _d() : new Zg(), [a]), [x] = B.useState(() => new Xa()), _ = (i == null || (p = i[0]) == null ? void 0 : p.length) === 4 ? 4 : 3, A = B.useMemo(() => {
9822
+ const m = rt((T) => T.size), v = B.useMemo(() => a ? new _d() : new Zg(), [a]), [x] = B.useState(() => new Xa()), _ = (i == null || (p = i[0]) == null ? void 0 : p.length) === 4 ? 4 : 3, P = B.useMemo(() => {
9823
9823
  const T = a ? new Wa() : new wd(), w = n.map((S) => {
9824
9824
  const E = Array.isArray(S);
9825
9825
  return S instanceof V || S instanceof Ui ? [S.x, S.y, S.z] : S instanceof ye ? [S.x, S.y, 0] : E && S.length === 3 ? [S[0], S[1], S[2]] : E && S.length === 2 ? [S[0], S[1], 0] : S;
@@ -9835,11 +9835,11 @@ const Jg = /* @__PURE__ */ B.forwardRef(function({
9835
9835
  v.computeLineDistances();
9836
9836
  }, [n, v]), B.useLayoutEffect(() => {
9837
9837
  d ? x.defines.USE_DASH = "" : delete x.defines.USE_DASH, x.needsUpdate = !0;
9838
- }, [d, x]), B.useEffect(() => () => A.dispose(), [A]), /* @__PURE__ */ B.createElement("primitive", Gn({
9838
+ }, [d, x]), B.useEffect(() => () => P.dispose(), [P]), /* @__PURE__ */ B.createElement("primitive", Gn({
9839
9839
  object: v,
9840
9840
  ref: g
9841
9841
  }, f), /* @__PURE__ */ B.createElement("primitive", {
9842
- object: A,
9842
+ object: P,
9843
9843
  attach: "geometry"
9844
9844
  }), /* @__PURE__ */ B.createElement("primitive", Gn({
9845
9845
  object: x,
@@ -9865,16 +9865,16 @@ const Jg = /* @__PURE__ */ B.forwardRef(function({
9865
9865
  const {
9866
9866
  Text: p,
9867
9867
  preloadFont: m
9868
- } = bc(async () => import("./troika-three-text.esm-57b6d52f.js"), []), v = rt(({
9868
+ } = kc(async () => import("./troika-three-text.esm-102b3096.js"), []), v = rt(({
9869
9869
  invalidate: T
9870
- }) => T), [x] = B.useState(() => new p()), [_, A] = B.useMemo(() => {
9870
+ }) => T), [x] = B.useState(() => new p()), [_, P] = B.useMemo(() => {
9871
9871
  const T = [];
9872
9872
  let w = "";
9873
9873
  return B.Children.forEach(u, (S) => {
9874
9874
  typeof S == "string" || typeof S == "number" ? w += S : T.push(S);
9875
9875
  }), [T, w];
9876
9876
  }, [u]);
9877
- return bc(() => new Promise((T) => m({
9877
+ return kc(() => new Promise((T) => m({
9878
9878
  font: i,
9879
9879
  characters: a
9880
9880
  }, T)), ["troika-text", i, a]), B.useLayoutEffect(() => void x.sync(() => {
@@ -9883,7 +9883,7 @@ const Jg = /* @__PURE__ */ B.forwardRef(function({
9883
9883
  object: x,
9884
9884
  ref: g,
9885
9885
  font: i,
9886
- text: A,
9886
+ text: P,
9887
9887
  anchorX: n,
9888
9888
  anchorY: r,
9889
9889
  fontSize: l,
@@ -9901,21 +9901,21 @@ const Jg = /* @__PURE__ */ B.forwardRef(function({
9901
9901
  onEnd: f,
9902
9902
  ...g
9903
9903
  }, p) => {
9904
- const m = rt((L) => L.invalidate), v = rt((L) => L.camera), x = rt((L) => L.gl), _ = rt((L) => L.events), A = rt((L) => L.setEvents), T = rt((L) => L.set), w = rt((L) => L.get), S = rt((L) => L.performance), E = n || v, P = i || _.connected || x.domElement, M = B.useMemo(() => new Yg(E), [E]);
9904
+ const m = rt((L) => L.invalidate), v = rt((L) => L.camera), x = rt((L) => L.gl), _ = rt((L) => L.events), P = rt((L) => L.setEvents), T = rt((L) => L.set), w = rt((L) => L.get), S = rt((L) => L.performance), E = n || v, A = i || _.connected || x.domElement, M = B.useMemo(() => new Yg(E), [E]);
9905
9905
  return dr(() => {
9906
9906
  M.enabled && M.update();
9907
- }, -1), B.useEffect(() => (u && M.connect(u === !0 ? P : u), M.connect(P), () => void M.dispose()), [u, P, r, M, m]), B.useEffect(() => {
9908
- const L = (k) => {
9909
- m(), r && S.regress(), a && a(k);
9910
- }, R = (k) => {
9911
- d && d(k);
9912
- }, I = (k) => {
9913
- f && f(k);
9907
+ }, -1), B.useEffect(() => (u && M.connect(u === !0 ? A : u), M.connect(A), () => void M.dispose()), [u, A, r, M, m]), B.useEffect(() => {
9908
+ const L = (b) => {
9909
+ m(), r && S.regress(), a && a(b);
9910
+ }, R = (b) => {
9911
+ d && d(b);
9912
+ }, z = (b) => {
9913
+ f && f(b);
9914
9914
  };
9915
- return M.addEventListener("change", L), M.addEventListener("start", R), M.addEventListener("end", I), () => {
9916
- M.removeEventListener("start", R), M.removeEventListener("end", I), M.removeEventListener("change", L);
9915
+ return M.addEventListener("change", L), M.addEventListener("start", R), M.addEventListener("end", z), () => {
9916
+ M.removeEventListener("start", R), M.removeEventListener("end", z), M.removeEventListener("change", L);
9917
9917
  };
9918
- }, [a, d, f, M, m, A]), B.useEffect(() => {
9918
+ }, [a, d, f, M, m, P]), B.useEffect(() => {
9919
9919
  if (o) {
9920
9920
  const L = w().controls;
9921
9921
  return T({
@@ -9942,7 +9942,7 @@ function r0(o, n = ArrayBuffer) {
9942
9942
  function i0(o, n) {
9943
9943
  if (!o.index) {
9944
9944
  const r = o.attributes.position.count, i = n.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, l = r0(r, i);
9945
- o.setIndex(new bi(l, 1));
9945
+ o.setIndex(new ki(l, 1));
9946
9946
  for (let u = 0; u < r; u++)
9947
9947
  l[u] = u;
9948
9948
  }
@@ -9981,16 +9981,16 @@ function s0(o) {
9981
9981
  return r.forEach(({ count: u }) => l += u), n !== l;
9982
9982
  }
9983
9983
  function ea(o, n, r, i, l) {
9984
- let u = 1 / 0, a = 1 / 0, d = 1 / 0, f = -1 / 0, g = -1 / 0, p = -1 / 0, m = 1 / 0, v = 1 / 0, x = 1 / 0, _ = -1 / 0, A = -1 / 0, T = -1 / 0;
9984
+ let u = 1 / 0, a = 1 / 0, d = 1 / 0, f = -1 / 0, g = -1 / 0, p = -1 / 0, m = 1 / 0, v = 1 / 0, x = 1 / 0, _ = -1 / 0, P = -1 / 0, T = -1 / 0;
9985
9985
  for (let w = n * 6, S = (n + r) * 6; w < S; w += 6) {
9986
- const E = o[w + 0], P = o[w + 1], M = E - P, L = E + P;
9986
+ const E = o[w + 0], A = o[w + 1], M = E - A, L = E + A;
9987
9987
  M < u && (u = M), L > f && (f = L), E < m && (m = E), E > _ && (_ = E);
9988
- const R = o[w + 2], I = o[w + 3], k = R - I, z = R + I;
9989
- k < a && (a = k), z > g && (g = z), R < v && (v = R), R > A && (A = R);
9990
- const b = o[w + 4], j = o[w + 5], G = b - j, Y = b + j;
9991
- G < d && (d = G), Y > p && (p = Y), b < x && (x = b), b > T && (T = b);
9988
+ const R = o[w + 2], z = o[w + 3], b = R - z, I = R + z;
9989
+ b < a && (a = b), I > g && (g = I), R < v && (v = R), R > P && (P = R);
9990
+ const k = o[w + 4], j = o[w + 5], G = k - j, Y = k + j;
9991
+ G < d && (d = G), Y > p && (p = Y), k < x && (x = k), k > T && (T = k);
9992
9992
  }
9993
- i[0] = u, i[1] = a, i[2] = d, i[3] = f, i[4] = g, i[5] = p, l[0] = m, l[1] = v, l[2] = x, l[3] = _, l[4] = A, l[5] = T;
9993
+ i[0] = u, i[1] = a, i[2] = d, i[3] = f, i[4] = g, i[5] = p, l[0] = m, l[1] = v, l[2] = x, l[3] = _, l[4] = P, l[5] = T;
9994
9994
  }
9995
9995
  function o0(o, n = null, r = null, i = null) {
9996
9996
  const l = o.attributes.position, u = o.index ? o.index.array : null, a = $r(o), d = l.normalized;
@@ -10001,23 +10001,23 @@ function o0(o, n = null, r = null, i = null) {
10001
10001
  l.isInterleavedBufferAttribute && (m = l.data.stride);
10002
10002
  const v = ["getX", "getY", "getZ"];
10003
10003
  for (let x = r; x < r + i; x++) {
10004
- const _ = x * 3, A = x * 6;
10004
+ const _ = x * 3, P = x * 6;
10005
10005
  let T = _ + 0, w = _ + 1, S = _ + 2;
10006
10006
  u && (T = u[T], w = u[w], S = u[S]), d || (T = T * m + p, w = w * m + p, S = S * m + p);
10007
10007
  for (let E = 0; E < 3; E++) {
10008
- let P, M, L;
10009
- d ? (P = l[v[E]](T), M = l[v[E]](w), L = l[v[E]](S)) : (P = g[T + E], M = g[w + E], L = g[S + E]);
10010
- let R = P;
10008
+ let A, M, L;
10009
+ d ? (A = l[v[E]](T), M = l[v[E]](w), L = l[v[E]](S)) : (A = g[T + E], M = g[w + E], L = g[S + E]);
10010
+ let R = A;
10011
10011
  M < R && (R = M), L < R && (R = L);
10012
- let I = P;
10013
- M > I && (I = M), L > I && (I = L);
10014
- const k = (I - R) / 2, z = E * 2;
10015
- f[A + z + 0] = R + k, f[A + z + 1] = k + (Math.abs(R) + k) * t0;
10012
+ let z = A;
10013
+ M > z && (z = M), L > z && (z = L);
10014
+ const b = (z - R) / 2, I = E * 2;
10015
+ f[P + I + 0] = R + b, f[P + I + 1] = b + (Math.abs(R) + b) * t0;
10016
10016
  }
10017
10017
  }
10018
10018
  return f;
10019
10019
  }
10020
- function be(o, n, r) {
10020
+ function ke(o, n, r) {
10021
10021
  return r.min.x = n[o], r.min.y = n[o + 1], r.min.z = n[o + 2], r.max.x = n[o + 3], r.max.y = n[o + 4], r.max.z = n[o + 5], r;
10022
10022
  }
10023
10023
  function xf(o) {
@@ -10071,46 +10071,46 @@ function a0(o, n, r, i, l, u) {
10071
10071
  const w = [...jn];
10072
10072
  w.length = l;
10073
10073
  let S = 0;
10074
- for (let P = p; P < m; P += 6, S++) {
10074
+ for (let A = p; A < m; A += 6, S++) {
10075
10075
  const M = w[S];
10076
- M.candidate = r[P + 2 * v], M.count = 0;
10076
+ M.candidate = r[A + 2 * v], M.count = 0;
10077
10077
  const {
10078
10078
  bounds: L,
10079
10079
  leftCacheBounds: R,
10080
- rightCacheBounds: I
10080
+ rightCacheBounds: z
10081
10081
  } = M;
10082
- for (let k = 0; k < 3; k++)
10083
- I[k] = 1 / 0, I[k + 3] = -1 / 0, R[k] = 1 / 0, R[k + 3] = -1 / 0, L[k] = 1 / 0, L[k + 3] = -1 / 0;
10084
- Zs(P, r, L);
10082
+ for (let b = 0; b < 3; b++)
10083
+ z[b] = 1 / 0, z[b + 3] = -1 / 0, R[b] = 1 / 0, R[b + 3] = -1 / 0, L[b] = 1 / 0, L[b + 3] = -1 / 0;
10084
+ Zs(A, r, L);
10085
10085
  }
10086
10086
  w.sort(l0);
10087
10087
  let E = l;
10088
- for (let P = 0; P < E; P++) {
10089
- const M = w[P];
10090
- for (; P + 1 < E && w[P + 1].candidate === M.candidate; )
10091
- w.splice(P + 1, 1), E--;
10088
+ for (let A = 0; A < E; A++) {
10089
+ const M = w[A];
10090
+ for (; A + 1 < E && w[A + 1].candidate === M.candidate; )
10091
+ w.splice(A + 1, 1), E--;
10092
10092
  }
10093
- for (let P = p; P < m; P += 6) {
10094
- const M = r[P + 2 * v];
10093
+ for (let A = p; A < m; A += 6) {
10094
+ const M = r[A + 2 * v];
10095
10095
  for (let L = 0; L < E; L++) {
10096
10096
  const R = w[L];
10097
- M >= R.candidate ? Zs(P, r, R.rightCacheBounds) : (Zs(P, r, R.leftCacheBounds), R.count++);
10097
+ M >= R.candidate ? Zs(A, r, R.rightCacheBounds) : (Zs(A, r, R.leftCacheBounds), R.count++);
10098
10098
  }
10099
10099
  }
10100
- for (let P = 0; P < E; P++) {
10101
- const M = w[P], L = M.count, R = l - M.count, I = M.leftCacheBounds, k = M.rightCacheBounds;
10102
- let z = 0;
10103
- L !== 0 && (z = Li(I) / f);
10104
- let b = 0;
10105
- R !== 0 && (b = Li(k) / f);
10106
- const j = yf + Jl * (z * L + b * R);
10100
+ for (let A = 0; A < E; A++) {
10101
+ const M = w[A], L = M.count, R = l - M.count, z = M.leftCacheBounds, b = M.rightCacheBounds;
10102
+ let I = 0;
10103
+ L !== 0 && (I = Li(z) / f);
10104
+ let k = 0;
10105
+ R !== 0 && (k = Li(b) / f);
10106
+ const j = yf + Jl * (I * L + k * R);
10107
10107
  j < g && (a = v, g = j, d = M.candidate);
10108
10108
  }
10109
10109
  } else {
10110
10110
  for (let E = 0; E < wn; E++) {
10111
- const P = jn[E];
10112
- P.count = 0, P.candidate = x + T + E * T;
10113
- const M = P.bounds;
10111
+ const A = jn[E];
10112
+ A.count = 0, A.candidate = x + T + E * T;
10113
+ const M = A.bounds;
10114
10114
  for (let L = 0; L < 3; L++)
10115
10115
  M[L] = 1 / 0, M[L + 3] = -1 / 0;
10116
10116
  }
@@ -10123,19 +10123,19 @@ function a0(o, n, r, i, l, u) {
10123
10123
  const w = jn[wn - 1];
10124
10124
  wf(w.bounds, w.rightCacheBounds);
10125
10125
  for (let E = wn - 2; E >= 0; E--) {
10126
- const P = jn[E], M = jn[E + 1];
10127
- Sf(P.bounds, M.rightCacheBounds, P.rightCacheBounds);
10126
+ const A = jn[E], M = jn[E + 1];
10127
+ Sf(A.bounds, M.rightCacheBounds, A.rightCacheBounds);
10128
10128
  }
10129
10129
  let S = 0;
10130
10130
  for (let E = 0; E < wn - 1; E++) {
10131
- const P = jn[E], M = P.count, L = P.bounds, I = jn[E + 1].rightCacheBounds;
10131
+ const A = jn[E], M = A.count, L = A.bounds, z = jn[E + 1].rightCacheBounds;
10132
10132
  M !== 0 && (S === 0 ? wf(L, Js) : Sf(L, Js, Js)), S += M;
10133
- let k = 0, z = 0;
10134
- S !== 0 && (k = Li(Js) / f);
10135
- const b = l - S;
10136
- b !== 0 && (z = Li(I) / f);
10137
- const j = yf + Jl * (k * S + z * b);
10138
- j < g && (a = v, g = j, d = P.candidate);
10133
+ let b = 0, I = 0;
10134
+ S !== 0 && (b = Li(Js) / f);
10135
+ const k = l - S;
10136
+ k !== 0 && (I = Li(z) / f);
10137
+ const j = yf + Jl * (b * S + I * k);
10138
+ j < g && (a = v, g = j, d = A.candidate);
10139
10139
  }
10140
10140
  }
10141
10141
  }
@@ -10214,13 +10214,13 @@ function Vt(o, n) {
10214
10214
  function Md(o, n) {
10215
10215
  return n[o + 7];
10216
10216
  }
10217
- let Ld, ki, mo, Rd;
10217
+ let Ld, bi, mo, Rd;
10218
10218
  const d0 = Math.pow(2, 32);
10219
10219
  function Pa(o) {
10220
10220
  return "count" in o ? 1 : 1 + Pa(o.left) + Pa(o.right);
10221
10221
  }
10222
10222
  function p0(o, n, r) {
10223
- return Ld = new Float32Array(r), ki = new Uint32Array(r), mo = new Uint16Array(r), Rd = new Uint8Array(r), Ca(o, n);
10223
+ return Ld = new Float32Array(r), bi = new Uint32Array(r), mo = new Uint16Array(r), Rd = new Uint8Array(r), Ca(o, n);
10224
10224
  }
10225
10225
  function Ca(o, n) {
10226
10226
  const r = o / 4, i = o / 2, l = "count" in n, u = n.boundingData;
@@ -10232,19 +10232,19 @@ function Ca(o, n) {
10232
10232
  Rd.set(new Uint8Array(a), o);
10233
10233
  for (let d = o, f = o + a.byteLength; d < f; d += Fi) {
10234
10234
  const g = d / 2;
10235
- Et(g, mo) || (ki[d / 4 + 6] += r);
10235
+ Et(g, mo) || (bi[d / 4 + 6] += r);
10236
10236
  }
10237
10237
  return o + a.byteLength;
10238
10238
  } else {
10239
10239
  const a = n.offset, d = n.count;
10240
- return ki[r + 6] = a, mo[i + 14] = d, mo[i + 15] = wo, o + Fi;
10240
+ return bi[r + 6] = a, mo[i + 14] = d, mo[i + 15] = wo, o + Fi;
10241
10241
  }
10242
10242
  else {
10243
10243
  const a = n.left, d = n.right, f = n.splitAxis;
10244
10244
  let g;
10245
10245
  if (g = Ca(o + Fi, a), g / 4 > d0)
10246
10246
  throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
10247
- return ki[r + 6] = g / 4, g = Ca(g, d), ki[r + 7] = f, g;
10247
+ return bi[r + 6] = g / 4, g = Ca(g, d), bi[r + 7] = f, g;
10248
10248
  }
10249
10249
  }
10250
10250
  function h0(o, n) {
@@ -10261,28 +10261,28 @@ function m0(o, n, r, i, l) {
10261
10261
  strategy: f,
10262
10262
  onProgress: g,
10263
10263
  indirect: p
10264
- } = l, m = o._indirectBuffer, v = o.geometry, x = v.index ? v.index.array : null, _ = p ? f0 : c0, A = $r(v), T = new Float32Array(6);
10264
+ } = l, m = o._indirectBuffer, v = o.geometry, x = v.index ? v.index.array : null, _ = p ? f0 : c0, P = $r(v), T = new Float32Array(6);
10265
10265
  let w = !1;
10266
10266
  const S = new ta();
10267
- return ea(n, r, i, S.boundingData, T), P(S, r, i, T), S;
10267
+ return ea(n, r, i, S.boundingData, T), A(S, r, i, T), S;
10268
10268
  function E(M) {
10269
- g && g(M / A);
10269
+ g && g(M / P);
10270
10270
  }
10271
- function P(M, L, R, I = null, k = 0) {
10272
- if (!w && k >= u && (w = !0, a && (console.warn(`MeshBVH: Max depth of ${u} reached when generating BVH. Consider increasing maxDepth.`), console.warn(v))), R <= d || k >= u)
10271
+ function A(M, L, R, z = null, b = 0) {
10272
+ if (!w && b >= u && (w = !0, a && (console.warn(`MeshBVH: Max depth of ${u} reached when generating BVH. Consider increasing maxDepth.`), console.warn(v))), R <= d || b >= u)
10273
10273
  return E(L + R), M.offset = L, M.count = R, M;
10274
- const z = a0(M.boundingData, I, n, L, R, f);
10275
- if (z.axis === -1)
10274
+ const I = a0(M.boundingData, z, n, L, R, f);
10275
+ if (I.axis === -1)
10276
10276
  return E(L + R), M.offset = L, M.count = R, M;
10277
- const b = _(m, x, n, L, R, z);
10278
- if (b === L || b === L + R)
10277
+ const k = _(m, x, n, L, R, I);
10278
+ if (k === L || k === L + R)
10279
10279
  E(L + R), M.offset = L, M.count = R;
10280
10280
  else {
10281
- M.splitAxis = z.axis;
10282
- const j = new ta(), G = L, Y = b - L;
10283
- M.left = j, ea(n, G, Y, j.boundingData, T), P(j, G, Y, T, k + 1);
10284
- const ee = new ta(), le = b, Se = R - Y;
10285
- M.right = ee, ea(n, le, Se, ee.boundingData, T), P(ee, le, Se, T, k + 1);
10281
+ M.splitAxis = I.axis;
10282
+ const j = new ta(), G = L, Y = k - L;
10283
+ M.left = j, ea(n, G, Y, j.boundingData, T), A(j, G, Y, T, b + 1);
10284
+ const ee = new ta(), ae = k, Se = R - Y;
10285
+ M.right = ee, ea(n, ae, Se, ee.boundingData, T), A(ee, ae, Se, T, b + 1);
10286
10286
  }
10287
10287
  return M;
10288
10288
  }
@@ -10381,9 +10381,9 @@ const v0 = function() {
10381
10381
  const { radius: d, center: f } = u, { a: g, b: p, c: m } = a;
10382
10382
  if (i.start = g, i.end = p, i.closestPointToPoint(f, !0, o).distanceTo(f) <= d || (i.start = g, i.end = m, i.closestPointToPoint(f, !0, o).distanceTo(f) <= d) || (i.start = p, i.end = m, i.closestPointToPoint(f, !0, o).distanceTo(f) <= d))
10383
10383
  return !0;
10384
- const A = a.getPlane(r);
10385
- if (Math.abs(A.distanceToPoint(f)) <= d) {
10386
- const w = A.projectPoint(f, n);
10384
+ const P = a.getPlane(r);
10385
+ if (Math.abs(P.distanceToPoint(f)) <= d) {
10386
+ const w = P.projectPoint(f, n);
10387
10387
  if (a.containsPoint(w))
10388
10388
  return !0;
10389
10389
  }
@@ -10425,26 +10425,26 @@ Jt.prototype.closestPointToSegment = function() {
10425
10425
  }();
10426
10426
  Jt.prototype.intersectsTriangle = function() {
10427
10427
  const o = new Jt(), n = new Array(3), r = new Array(3), i = new En(), l = new En(), u = new V(), a = new V(), d = new V(), f = new V(), g = new V(), p = new dn(), m = new dn(), v = new dn(), x = new V();
10428
- function _(A, T, w) {
10429
- const S = A.points;
10430
- let E = 0, P = -1;
10428
+ function _(P, T, w) {
10429
+ const S = P.points;
10430
+ let E = 0, A = -1;
10431
10431
  for (let M = 0; M < 3; M++) {
10432
10432
  const { start: L, end: R } = p;
10433
10433
  L.copy(S[M]), R.copy(S[(M + 1) % 3]), p.delta(a);
10434
- const I = na(T.distanceToPoint(L));
10435
- if (na(T.normal.dot(a)) && I) {
10434
+ const z = na(T.distanceToPoint(L));
10435
+ if (na(T.normal.dot(a)) && z) {
10436
10436
  w.copy(p), E = 2;
10437
10437
  break;
10438
10438
  }
10439
- const k = T.intersectLine(p, x);
10440
- if (!k && I && x.copy(L), (k || I) && !na(x.distanceTo(R))) {
10439
+ const b = T.intersectLine(p, x);
10440
+ if (!b && z && x.copy(L), (b || z) && !na(x.distanceTo(R))) {
10441
10441
  if (E <= 1)
10442
- (E === 1 ? w.start : w.end).copy(x), I && (P = E);
10442
+ (E === 1 ? w.start : w.end).copy(x), z && (A = E);
10443
10443
  else if (E >= 2) {
10444
- (P === 1 ? w.start : w.end).copy(x), E = 2;
10444
+ (A === 1 ? w.start : w.end).copy(x), E = 2;
10445
10445
  break;
10446
10446
  }
10447
- if (E++, E === 2 && P === -1)
10447
+ if (E++, E === 2 && A === -1)
10448
10448
  break;
10449
10449
  }
10450
10450
  }
@@ -10452,33 +10452,33 @@ Jt.prototype.intersectsTriangle = function() {
10452
10452
  }
10453
10453
  return function(T, w = null, S = !1) {
10454
10454
  this.needsUpdate && this.update(), T.isExtendedTriangle ? T.needsUpdate && T.update() : (o.copy(T), o.update(), T = o);
10455
- const E = this.plane, P = T.plane;
10456
- if (Math.abs(E.normal.dot(P.normal)) > 1 - 1e-10) {
10455
+ const E = this.plane, A = T.plane;
10456
+ if (Math.abs(E.normal.dot(A.normal)) > 1 - 1e-10) {
10457
10457
  const M = this.satBounds, L = this.satAxes;
10458
10458
  r[0] = T.a, r[1] = T.b, r[2] = T.c;
10459
- for (let k = 0; k < 4; k++) {
10460
- const z = M[k], b = L[k];
10461
- if (i.setFromPoints(b, r), z.isSeparated(i))
10459
+ for (let b = 0; b < 4; b++) {
10460
+ const I = M[b], k = L[b];
10461
+ if (i.setFromPoints(k, r), I.isSeparated(i))
10462
10462
  return !1;
10463
10463
  }
10464
- const R = T.satBounds, I = T.satAxes;
10464
+ const R = T.satBounds, z = T.satAxes;
10465
10465
  n[0] = this.a, n[1] = this.b, n[2] = this.c;
10466
- for (let k = 0; k < 4; k++) {
10467
- const z = R[k], b = I[k];
10468
- if (i.setFromPoints(b, n), z.isSeparated(i))
10466
+ for (let b = 0; b < 4; b++) {
10467
+ const I = R[b], k = z[b];
10468
+ if (i.setFromPoints(k, n), I.isSeparated(i))
10469
10469
  return !1;
10470
10470
  }
10471
- for (let k = 0; k < 4; k++) {
10472
- const z = L[k];
10473
- for (let b = 0; b < 4; b++) {
10474
- const j = I[b];
10475
- if (u.crossVectors(z, j), i.setFromPoints(u, n), l.setFromPoints(u, r), i.isSeparated(l))
10471
+ for (let b = 0; b < 4; b++) {
10472
+ const I = L[b];
10473
+ for (let k = 0; k < 4; k++) {
10474
+ const j = z[k];
10475
+ if (u.crossVectors(I, j), i.setFromPoints(u, n), l.setFromPoints(u, r), i.isSeparated(l))
10476
10476
  return !1;
10477
10477
  }
10478
10478
  }
10479
10479
  return w && (S || console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."), w.start.set(0, 0, 0), w.end.set(0, 0, 0)), !0;
10480
10480
  } else {
10481
- const M = _(this, P, m);
10481
+ const M = _(this, A, m);
10482
10482
  if (M === 1 && T.containsPoint(m.end))
10483
10483
  return w && (w.start.copy(m.end), w.end.copy(m.end)), !0;
10484
10484
  if (M !== 2)
@@ -10492,8 +10492,8 @@ Jt.prototype.intersectsTriangle = function() {
10492
10492
  let G = v.start;
10493
10493
  v.start = v.end, v.end = G;
10494
10494
  }
10495
- const R = m.start.dot(d), I = m.end.dot(d), k = v.start.dot(d), z = v.end.dot(d), b = I < k, j = R < z;
10496
- return R !== z && k !== I && b === j ? !1 : (w && (g.subVectors(m.start, v.start), g.dot(d) > 0 ? w.start.copy(m.start) : w.start.copy(v.start), g.subVectors(m.end, v.end), g.dot(d) < 0 ? w.end.copy(m.end) : w.end.copy(v.end)), !0);
10495
+ const R = m.start.dot(d), z = m.end.dot(d), b = v.start.dot(d), I = v.end.dot(d), k = z < b, j = R < I;
10496
+ return R !== I && b !== z && k === j ? !1 : (w && (g.subVectors(m.start, v.start), g.dot(d) > 0 ? w.start.copy(m.start) : w.start.copy(v.start), g.subVectors(m.end, v.end), g.dot(d) < 0 ? w.end.copy(m.end) : w.end.copy(v.end)), !0);
10497
10497
  }
10498
10498
  };
10499
10499
  }();
@@ -10514,15 +10514,15 @@ Jt.prototype.distanceToTriangle = function() {
10514
10514
  let v;
10515
10515
  const x = r[m], _ = a[x];
10516
10516
  this.closestPointToPoint(_, o), v = _.distanceToSquared(o), v < p && (p = v, d && d.copy(o), f && f.copy(_));
10517
- const A = this[x];
10518
- a.closestPointToPoint(A, o), v = A.distanceToSquared(o), v < p && (p = v, d && d.copy(A), f && f.copy(o));
10517
+ const P = this[x];
10518
+ a.closestPointToPoint(P, o), v = P.distanceToSquared(o), v < p && (p = v, d && d.copy(P), f && f.copy(o));
10519
10519
  }
10520
10520
  for (let m = 0; m < 3; m++) {
10521
10521
  const v = r[m], x = r[(m + 1) % 3];
10522
10522
  i.set(this[v], this[x]);
10523
10523
  for (let _ = 0; _ < 3; _++) {
10524
- const A = r[_], T = r[(_ + 1) % 3];
10525
- l.set(a[A], a[T]), Ka(i, l, o, n);
10524
+ const P = r[_], T = r[(_ + 1) % 3];
10525
+ l.set(a[P], a[T]), Ka(i, l, o, n);
10526
10526
  const w = o.distanceToSquared(n);
10527
10527
  w < p && (p = w, d && d.copy(o), f && f.copy(n));
10528
10528
  }
@@ -10594,8 +10594,8 @@ mt.prototype.intersectsTriangle = function() {
10594
10594
  for (let v = 0; v < 3; v++) {
10595
10595
  const x = f[v];
10596
10596
  for (let _ = 0; _ < 4; _++) {
10597
- const A = p[_];
10598
- if (l.crossVectors(x, A), r.setFromPoints(l, n), i.setFromPoints(l, m), r.isSeparated(i))
10597
+ const P = p[_];
10598
+ if (l.crossVectors(x, P), r.setFromPoints(l, n), i.setFromPoints(l, m), r.isSeparated(i))
10599
10599
  return !1;
10600
10600
  }
10601
10601
  }
@@ -10627,14 +10627,14 @@ mt.prototype.distanceToBox = function() {
10627
10627
  if (S < _ && (_ = S, f && f.copy(w), g && g.copy(l), S < p))
10628
10628
  return Math.sqrt(S);
10629
10629
  }
10630
- let A = 0;
10630
+ let P = 0;
10631
10631
  for (let T = 0; T < 3; T++)
10632
10632
  for (let w = 0; w <= 1; w++)
10633
10633
  for (let S = 0; S <= 1; S++) {
10634
- const E = (T + 1) % 3, P = (T + 2) % 3, M = w << E | S << P, L = 1 << T | w << E | S << P, R = x[M], I = x[L];
10635
- n[A].set(R, I);
10636
- const z = o[T], b = o[E], j = o[P], G = r[A], Y = G.start, ee = G.end;
10637
- Y[z] = m[z], Y[b] = w ? m[b] : v[b], Y[j] = S ? m[j] : v[b], ee[z] = v[z], ee[b] = w ? m[b] : v[b], ee[j] = S ? m[j] : v[b], A++;
10634
+ const E = (T + 1) % 3, A = (T + 2) % 3, M = w << E | S << A, L = 1 << T | w << E | S << A, R = x[M], z = x[L];
10635
+ n[P].set(R, z);
10636
+ const I = o[T], k = o[E], j = o[A], G = r[P], Y = G.start, ee = G.end;
10637
+ Y[I] = m[I], Y[k] = w ? m[k] : v[k], Y[j] = S ? m[j] : v[k], ee[I] = v[I], ee[k] = w ? m[k] : v[k], ee[j] = S ? m[j] : v[k], P++;
10638
10638
  }
10639
10639
  for (let T = 0; T <= 1; T++)
10640
10640
  for (let w = 0; w <= 1; w++)
@@ -10649,9 +10649,9 @@ mt.prototype.distanceToBox = function() {
10649
10649
  for (let S = 0; S < 12; S++) {
10650
10650
  const E = r[S];
10651
10651
  Ka(w, E, i, l);
10652
- const P = i.distanceToSquared(l);
10653
- if (P < _ && (_ = P, f && f.copy(i), g && g.copy(l), P < p))
10654
- return Math.sqrt(P);
10652
+ const A = i.distanceToSquared(l);
10653
+ if (A < _ && (_ = A, f && f.copy(i), g && g.copy(l), A < p))
10654
+ return Math.sqrt(A);
10655
10655
  }
10656
10656
  }
10657
10657
  return Math.sqrt(_);
@@ -10702,15 +10702,15 @@ function Ma(o, n, r, i, l = null, u = 0, a = 0) {
10702
10702
  let p = o * 2;
10703
10703
  if (Et(p, f)) {
10704
10704
  const v = Mt(o, g), x = Ut(p, f);
10705
- return be(o, d, Vn), i(v, x, !1, a, u + o, Vn);
10705
+ return ke(o, d, Vn), i(v, x, !1, a, u + o, Vn);
10706
10706
  } else {
10707
- let z = function(j) {
10707
+ let I = function(j) {
10708
10708
  const { uint16Array: G, uint32Array: Y } = Ne;
10709
10709
  let ee = j * 2;
10710
10710
  for (; !Et(ee, G); )
10711
10711
  j = Ht(j), ee = j * 2;
10712
10712
  return Mt(j, Y);
10713
- }, b = function(j) {
10713
+ }, k = function(j) {
10714
10714
  const { uint16Array: G, uint32Array: Y } = Ne;
10715
10715
  let ee = j * 2;
10716
10716
  for (; !Et(ee, G); )
@@ -10718,17 +10718,17 @@ function Ma(o, n, r, i, l = null, u = 0, a = 0) {
10718
10718
  return Mt(j, Y) + Ut(ee, G);
10719
10719
  };
10720
10720
  const v = Ht(o), x = Vt(o, g);
10721
- let _ = v, A = x, T, w, S, E;
10722
- if (l && (S = Vn, E = Yr, be(_, d, S), be(A, d, E), T = l(S), w = l(E), w < T)) {
10723
- _ = x, A = v;
10721
+ let _ = v, P = x, T, w, S, E;
10722
+ if (l && (S = Vn, E = Yr, ke(_, d, S), ke(P, d, E), T = l(S), w = l(E), w < T)) {
10723
+ _ = x, P = v;
10724
10724
  const j = T;
10725
10725
  T = w, w = j, S = E;
10726
10726
  }
10727
- S || (S = Vn, be(_, d, S));
10728
- const P = Et(_ * 2, f), M = r(S, P, T, a + 1, u + _);
10727
+ S || (S = Vn, ke(_, d, S));
10728
+ const A = Et(_ * 2, f), M = r(S, A, T, a + 1, u + _);
10729
10729
  let L;
10730
10730
  if (M === vf) {
10731
- const j = z(_), Y = b(_) - j;
10731
+ const j = I(_), Y = k(_) - j;
10732
10732
  L = i(j, Y, !0, a + 1, u + _, S);
10733
10733
  } else
10734
10734
  L = M && Ma(
@@ -10742,15 +10742,15 @@ function Ma(o, n, r, i, l = null, u = 0, a = 0) {
10742
10742
  );
10743
10743
  if (L)
10744
10744
  return !0;
10745
- E = Yr, be(A, d, E);
10746
- const R = Et(A * 2, f), I = r(E, R, w, a + 1, u + A);
10747
- let k;
10748
- if (I === vf) {
10749
- const j = z(A), Y = b(A) - j;
10750
- k = i(j, Y, !0, a + 1, u + A, E);
10745
+ E = Yr, ke(P, d, E);
10746
+ const R = Et(P * 2, f), z = r(E, R, w, a + 1, u + P);
10747
+ let b;
10748
+ if (z === vf) {
10749
+ const j = I(P), Y = k(P) - j;
10750
+ b = i(j, Y, !0, a + 1, u + P, E);
10751
10751
  } else
10752
- k = I && Ma(
10753
- A,
10752
+ b = z && Ma(
10753
+ P,
10754
10754
  n,
10755
10755
  r,
10756
10756
  i,
@@ -10758,7 +10758,7 @@ function Ma(o, n, r, i, l = null, u = 0, a = 0) {
10758
10758
  u,
10759
10759
  a + 1
10760
10760
  );
10761
- return !!k;
10761
+ return !!b;
10762
10762
  }
10763
10763
  }
10764
10764
  const Ri = /* @__PURE__ */ new V(), ra = /* @__PURE__ */ new V();
@@ -10780,7 +10780,7 @@ function E0(o, n, r = {}, i = 0, l = 1 / 0) {
10780
10780
  const g = Math.sqrt(d);
10781
10781
  return r.point ? r.point.copy(ra) : r.point = ra.clone(), r.distance = g, r.faceIndex = f, r;
10782
10782
  }
10783
- const Or = /* @__PURE__ */ new V(), Dr = /* @__PURE__ */ new V(), kr = /* @__PURE__ */ new V(), eo = /* @__PURE__ */ new ye(), to = /* @__PURE__ */ new ye(), no = /* @__PURE__ */ new ye(), _f = /* @__PURE__ */ new V(), Ef = /* @__PURE__ */ new V(), Tf = /* @__PURE__ */ new V(), ro = /* @__PURE__ */ new V();
10783
+ const Or = /* @__PURE__ */ new V(), Dr = /* @__PURE__ */ new V(), br = /* @__PURE__ */ new V(), eo = /* @__PURE__ */ new ye(), to = /* @__PURE__ */ new ye(), no = /* @__PURE__ */ new ye(), _f = /* @__PURE__ */ new V(), Ef = /* @__PURE__ */ new V(), Tf = /* @__PURE__ */ new V(), ro = /* @__PURE__ */ new V();
10784
10784
  function T0(o, n, r, i, l, u) {
10785
10785
  let a;
10786
10786
  return u === Kf ? a = o.intersectTriangle(i, r, n, !0, l) : a = o.intersectTriangle(n, r, i, u !== Vf, l), a === null ? null : {
@@ -10789,10 +10789,10 @@ function T0(o, n, r, i, l, u) {
10789
10789
  };
10790
10790
  }
10791
10791
  function A0(o, n, r, i, l, u, a, d, f) {
10792
- Or.fromBufferAttribute(n, u), Dr.fromBufferAttribute(n, a), kr.fromBufferAttribute(n, d);
10793
- const g = T0(o, Or, Dr, kr, ro, f);
10792
+ Or.fromBufferAttribute(n, u), Dr.fromBufferAttribute(n, a), br.fromBufferAttribute(n, d);
10793
+ const g = T0(o, Or, Dr, br, ro, f);
10794
10794
  if (g) {
10795
- i && (eo.fromBufferAttribute(i, u), to.fromBufferAttribute(i, a), no.fromBufferAttribute(i, d), g.uv = Di.getInterpolation(ro, Or, Dr, kr, eo, to, no, new ye())), l && (eo.fromBufferAttribute(l, u), to.fromBufferAttribute(l, a), no.fromBufferAttribute(l, d), g.uv1 = Di.getInterpolation(ro, Or, Dr, kr, eo, to, no, new ye())), r && (_f.fromBufferAttribute(r, u), Ef.fromBufferAttribute(r, a), Tf.fromBufferAttribute(r, d), g.normal = Di.getInterpolation(ro, Or, Dr, kr, _f, Ef, Tf, new V()), g.normal.dot(o.direction) > 0 && g.normal.multiplyScalar(-1));
10795
+ i && (eo.fromBufferAttribute(i, u), to.fromBufferAttribute(i, a), no.fromBufferAttribute(i, d), g.uv = Di.getInterpolation(ro, Or, Dr, br, eo, to, no, new ye())), l && (eo.fromBufferAttribute(l, u), to.fromBufferAttribute(l, a), no.fromBufferAttribute(l, d), g.uv1 = Di.getInterpolation(ro, Or, Dr, br, eo, to, no, new ye())), r && (_f.fromBufferAttribute(r, u), Ef.fromBufferAttribute(r, a), Tf.fromBufferAttribute(r, d), g.normal = Di.getInterpolation(ro, Or, Dr, br, _f, Ef, Tf, new V()), g.normal.dot(o.direction) > 0 && g.normal.multiplyScalar(-1));
10796
10796
  const p = {
10797
10797
  a: u,
10798
10798
  b: a,
@@ -10800,7 +10800,7 @@ function A0(o, n, r, i, l, u, a, d, f) {
10800
10800
  normal: new V(),
10801
10801
  materialIndex: 0
10802
10802
  };
10803
- Di.getNormal(Or, Dr, kr, p.normal), g.face = p, g.faceIndex = u;
10803
+ Di.getNormal(Or, Dr, br, p.normal), g.face = p, g.faceIndex = u;
10804
10804
  }
10805
10805
  return g;
10806
10806
  }
@@ -10848,30 +10848,30 @@ function L0(o, n = null) {
10848
10848
  for (let v = 0, x = p.length; v < x; v++)
10849
10849
  u = p[v], a = new Uint32Array(u), d = new Uint16Array(u), f = new Float32Array(u), m(0, g), g += u.byteLength;
10850
10850
  function m(v, x, _ = !1) {
10851
- const A = v * 2;
10852
- if (d[A + 15] === wo) {
10853
- const w = a[v + 6], S = d[A + 14];
10854
- let E = 1 / 0, P = 1 / 0, M = 1 / 0, L = -1 / 0, R = -1 / 0, I = -1 / 0;
10855
- for (let k = 3 * w, z = 3 * (w + S); k < z; k++) {
10856
- let b = i[k];
10857
- const j = l.getX(b), G = l.getY(b), Y = l.getZ(b);
10858
- j < E && (E = j), j > L && (L = j), G < P && (P = G), G > R && (R = G), Y < M && (M = Y), Y > I && (I = Y);
10859
- }
10860
- return f[v + 0] !== E || f[v + 1] !== P || f[v + 2] !== M || f[v + 3] !== L || f[v + 4] !== R || f[v + 5] !== I ? (f[v + 0] = E, f[v + 1] = P, f[v + 2] = M, f[v + 3] = L, f[v + 4] = R, f[v + 5] = I, !0) : !1;
10851
+ const P = v * 2;
10852
+ if (d[P + 15] === wo) {
10853
+ const w = a[v + 6], S = d[P + 14];
10854
+ let E = 1 / 0, A = 1 / 0, M = 1 / 0, L = -1 / 0, R = -1 / 0, z = -1 / 0;
10855
+ for (let b = 3 * w, I = 3 * (w + S); b < I; b++) {
10856
+ let k = i[b];
10857
+ const j = l.getX(k), G = l.getY(k), Y = l.getZ(k);
10858
+ j < E && (E = j), j > L && (L = j), G < A && (A = G), G > R && (R = G), Y < M && (M = Y), Y > z && (z = Y);
10859
+ }
10860
+ return f[v + 0] !== E || f[v + 1] !== A || f[v + 2] !== M || f[v + 3] !== L || f[v + 4] !== R || f[v + 5] !== z ? (f[v + 0] = E, f[v + 1] = A, f[v + 2] = M, f[v + 3] = L, f[v + 4] = R, f[v + 5] = z, !0) : !1;
10861
10861
  } else {
10862
- const w = v + 8, S = a[v + 6], E = w + x, P = S + x;
10862
+ const w = v + 8, S = a[v + 6], E = w + x, A = S + x;
10863
10863
  let M = _, L = !1, R = !1;
10864
- n ? M || (L = n.has(E), R = n.has(P), M = !L && !R) : (L = !0, R = !0);
10865
- const I = M || L, k = M || R;
10866
- let z = !1;
10867
- I && (z = m(w, x, M));
10868
- let b = !1;
10869
- k && (b = m(S, x, M));
10870
- const j = z || b;
10864
+ n ? M || (L = n.has(E), R = n.has(A), M = !L && !R) : (L = !0, R = !0);
10865
+ const z = M || L, b = M || R;
10866
+ let I = !1;
10867
+ z && (I = m(w, x, M));
10868
+ let k = !1;
10869
+ b && (k = m(S, x, M));
10870
+ const j = I || k;
10871
10871
  if (j)
10872
10872
  for (let G = 0; G < 3; G++) {
10873
- const Y = w + G, ee = S + G, le = f[Y], Se = f[Y + 3], W = f[ee], J = f[ee + 3];
10874
- f[v + G] = le < W ? le : W, f[v + G + 3] = Se > J ? Se : J;
10873
+ const Y = w + G, ee = S + G, ae = f[Y], Se = f[Y + 3], W = f[ee], J = f[ee + 3];
10874
+ f[v + G] = ae < W ? ae : W, f[v + G + 3] = Se > J ? Se : J;
10875
10875
  }
10876
10876
  return j;
10877
10877
  }
@@ -10879,7 +10879,7 @@ function L0(o, n = null) {
10879
10879
  }
10880
10880
  const Af = /* @__PURE__ */ new Ye();
10881
10881
  function Xn(o, n, r, i) {
10882
- return be(o, n, Af), r.intersectBox(Af, i);
10882
+ return ke(o, n, Af), r.intersectBox(Af, i);
10883
10883
  }
10884
10884
  function R0(o, n, r, i, l, u) {
10885
10885
  const { geometry: a, _indirectBuffer: d } = o;
@@ -10951,8 +10951,8 @@ function Ra(o, n, r, i) {
10951
10951
  return T && S ? T.distance <= S.distance ? T : S : T || S || null;
10952
10952
  }
10953
10953
  }
10954
- const io = /* @__PURE__ */ new Ye(), br = /* @__PURE__ */ new Jt(), Fr = /* @__PURE__ */ new Jt(), Ni = /* @__PURE__ */ new $e(), Mf = /* @__PURE__ */ new mt(), so = /* @__PURE__ */ new mt();
10955
- function k0(o, n, r, i) {
10954
+ const io = /* @__PURE__ */ new Ye(), kr = /* @__PURE__ */ new Jt(), Fr = /* @__PURE__ */ new Jt(), Ni = /* @__PURE__ */ new $e(), Mf = /* @__PURE__ */ new mt(), so = /* @__PURE__ */ new mt();
10955
+ function b0(o, n, r, i) {
10956
10956
  Ne.setBuffer(o._roots[n]);
10957
10957
  const l = Na(0, o, r, i);
10958
10958
  return Ne.clearBuffer(), l;
@@ -10961,36 +10961,36 @@ function Na(o, n, r, i, l = null) {
10961
10961
  const { float32Array: u, uint16Array: a, uint32Array: d } = Ne;
10962
10962
  let f = o * 2;
10963
10963
  if (l === null && (r.boundingBox || r.computeBoundingBox(), Mf.set(r.boundingBox.min, r.boundingBox.max, i), l = Mf), Et(f, a)) {
10964
- const p = n.geometry, m = p.index, v = p.attributes.position, x = r.index, _ = r.attributes.position, A = Mt(o, d), T = Ut(f, a);
10964
+ const p = n.geometry, m = p.index, v = p.attributes.position, x = r.index, _ = r.attributes.position, P = Mt(o, d), T = Ut(f, a);
10965
10965
  if (Ni.copy(i).invert(), r.boundsTree)
10966
- return be(o, u, so), so.matrix.copy(Ni), so.needsUpdate = !0, r.boundsTree.shapecast({
10966
+ return ke(o, u, so), so.matrix.copy(Ni), so.needsUpdate = !0, r.boundsTree.shapecast({
10967
10967
  intersectsBounds: (S) => so.intersectsBox(S),
10968
10968
  intersectsTriangle: (S) => {
10969
10969
  S.a.applyMatrix4(i), S.b.applyMatrix4(i), S.c.applyMatrix4(i), S.needsUpdate = !0;
10970
- for (let E = A * 3, P = (T + A) * 3; E < P; E += 3)
10970
+ for (let E = P * 3, A = (T + P) * 3; E < A; E += 3)
10971
10971
  if (Ke(Fr, E, m, v), Fr.needsUpdate = !0, S.intersectsTriangle(Fr))
10972
10972
  return !0;
10973
10973
  return !1;
10974
10974
  }
10975
10975
  });
10976
- for (let w = A * 3, S = (T + A) * 3; w < S; w += 3) {
10977
- Ke(br, w, m, v), br.a.applyMatrix4(Ni), br.b.applyMatrix4(Ni), br.c.applyMatrix4(Ni), br.needsUpdate = !0;
10978
- for (let E = 0, P = x.count; E < P; E += 3)
10979
- if (Ke(Fr, E, x, _), Fr.needsUpdate = !0, br.intersectsTriangle(Fr))
10976
+ for (let w = P * 3, S = (T + P) * 3; w < S; w += 3) {
10977
+ Ke(kr, w, m, v), kr.a.applyMatrix4(Ni), kr.b.applyMatrix4(Ni), kr.c.applyMatrix4(Ni), kr.needsUpdate = !0;
10978
+ for (let E = 0, A = x.count; E < A; E += 3)
10979
+ if (Ke(Fr, E, x, _), Fr.needsUpdate = !0, kr.intersectsTriangle(Fr))
10980
10980
  return !0;
10981
10981
  }
10982
10982
  } else {
10983
10983
  const p = o + 8, m = d[o + 6];
10984
- return be(p, u, io), !!(l.intersectsBox(io) && Na(p, n, r, i, l) || (be(m, u, io), l.intersectsBox(io) && Na(m, n, r, i, l)));
10984
+ return ke(p, u, io), !!(l.intersectsBox(io) && Na(p, n, r, i, l) || (ke(m, u, io), l.intersectsBox(io) && Na(m, n, r, i, l)));
10985
10985
  }
10986
10986
  }
10987
- const oo = /* @__PURE__ */ new $e(), ia = /* @__PURE__ */ new mt(), Ii = /* @__PURE__ */ new mt(), b0 = /* @__PURE__ */ new V(), F0 = /* @__PURE__ */ new V(), B0 = /* @__PURE__ */ new V(), j0 = /* @__PURE__ */ new V();
10987
+ const oo = /* @__PURE__ */ new $e(), ia = /* @__PURE__ */ new mt(), Ii = /* @__PURE__ */ new mt(), k0 = /* @__PURE__ */ new V(), F0 = /* @__PURE__ */ new V(), B0 = /* @__PURE__ */ new V(), j0 = /* @__PURE__ */ new V();
10988
10988
  function U0(o, n, r, i = {}, l = {}, u = 0, a = 1 / 0) {
10989
10989
  n.boundingBox || n.computeBoundingBox(), ia.set(n.boundingBox.min, n.boundingBox.max, r), ia.needsUpdate = !0;
10990
10990
  const d = o.geometry, f = d.attributes.position, g = d.index, p = n.attributes.position, m = n.index, v = Gt.getPrimitive(), x = Gt.getPrimitive();
10991
- let _ = b0, A = F0, T = null, w = null;
10991
+ let _ = k0, P = F0, T = null, w = null;
10992
10992
  l && (T = B0, w = j0);
10993
- let S = 1 / 0, E = null, P = null;
10993
+ let S = 1 / 0, E = null, A = null;
10994
10994
  return oo.copy(r).invert(), Ii.matrix.copy(oo), o.shapecast(
10995
10995
  {
10996
10996
  boundsTraverseOrder: (M) => ia.distanceToBox(M),
@@ -10998,15 +10998,15 @@ function U0(o, n, r, i = {}, l = {}, u = 0, a = 1 / 0) {
10998
10998
  intersectsRange: (M, L) => {
10999
10999
  if (n.boundsTree)
11000
11000
  return n.boundsTree.shapecast({
11001
- boundsTraverseOrder: (I) => Ii.distanceToBox(I),
11002
- intersectsBounds: (I, k, z) => z < S && z < a,
11003
- intersectsRange: (I, k) => {
11004
- for (let z = I, b = I + k; z < b; z++) {
11005
- Ke(x, 3 * z, m, p), x.a.applyMatrix4(r), x.b.applyMatrix4(r), x.c.applyMatrix4(r), x.needsUpdate = !0;
11001
+ boundsTraverseOrder: (z) => Ii.distanceToBox(z),
11002
+ intersectsBounds: (z, b, I) => I < S && I < a,
11003
+ intersectsRange: (z, b) => {
11004
+ for (let I = z, k = z + b; I < k; I++) {
11005
+ Ke(x, 3 * I, m, p), x.a.applyMatrix4(r), x.b.applyMatrix4(r), x.c.applyMatrix4(r), x.needsUpdate = !0;
11006
11006
  for (let j = M, G = M + L; j < G; j++) {
11007
11007
  Ke(v, 3 * j, g, f), v.needsUpdate = !0;
11008
11008
  const Y = v.distanceToTriangle(x, _, T);
11009
- if (Y < S && (A.copy(_), w && w.copy(T), S = Y, E = j, P = z), Y < u)
11009
+ if (Y < S && (P.copy(_), w && w.copy(T), S = Y, E = j, A = I), Y < u)
11010
11010
  return !0;
11011
11011
  }
11012
11012
  }
@@ -11014,19 +11014,19 @@ function U0(o, n, r, i = {}, l = {}, u = 0, a = 1 / 0) {
11014
11014
  });
11015
11015
  {
11016
11016
  const R = $r(n);
11017
- for (let I = 0, k = R; I < k; I++) {
11018
- Ke(x, 3 * I, m, p), x.a.applyMatrix4(r), x.b.applyMatrix4(r), x.c.applyMatrix4(r), x.needsUpdate = !0;
11019
- for (let z = M, b = M + L; z < b; z++) {
11020
- Ke(v, 3 * z, g, f), v.needsUpdate = !0;
11017
+ for (let z = 0, b = R; z < b; z++) {
11018
+ Ke(x, 3 * z, m, p), x.a.applyMatrix4(r), x.b.applyMatrix4(r), x.c.applyMatrix4(r), x.needsUpdate = !0;
11019
+ for (let I = M, k = M + L; I < k; I++) {
11020
+ Ke(v, 3 * I, g, f), v.needsUpdate = !0;
11021
11021
  const j = v.distanceToTriangle(x, _, T);
11022
- if (j < S && (A.copy(_), w && w.copy(T), S = j, E = z, P = I), j < u)
11022
+ if (j < S && (P.copy(_), w && w.copy(T), S = j, E = I, A = z), j < u)
11023
11023
  return !0;
11024
11024
  }
11025
11025
  }
11026
11026
  }
11027
11027
  }
11028
11028
  }
11029
- ), Gt.releasePrimitive(v), Gt.releasePrimitive(x), S === 1 / 0 ? null : (i.point ? i.point.copy(A) : i.point = A.clone(), i.distance = S, i.faceIndex = E, l && (l.point ? l.point.copy(w) : l.point = w.clone(), l.point.applyMatrix4(oo), A.applyMatrix4(oo), l.distance = A.sub(l.point).length(), l.faceIndex = P), i);
11029
+ ), Gt.releasePrimitive(v), Gt.releasePrimitive(x), S === 1 / 0 ? null : (i.point ? i.point.copy(P) : i.point = P.clone(), i.distance = S, i.faceIndex = E, l && (l.point ? l.point.copy(w) : l.point = w.clone(), l.point.applyMatrix4(oo), P.applyMatrix4(oo), l.distance = P.sub(l.point).length(), l.faceIndex = A), i);
11030
11030
  }
11031
11031
  function H0(o, n = null) {
11032
11032
  n && Array.isArray(n) && (n = new Set(n));
@@ -11036,34 +11036,34 @@ function H0(o, n = null) {
11036
11036
  for (let v = 0, x = p.length; v < x; v++)
11037
11037
  u = p[v], a = new Uint32Array(u), d = new Uint16Array(u), f = new Float32Array(u), m(0, g), g += u.byteLength;
11038
11038
  function m(v, x, _ = !1) {
11039
- const A = v * 2;
11040
- if (d[A + 15] === wo) {
11041
- const w = a[v + 6], S = d[A + 14];
11042
- let E = 1 / 0, P = 1 / 0, M = 1 / 0, L = -1 / 0, R = -1 / 0, I = -1 / 0;
11043
- for (let k = w, z = w + S; k < z; k++) {
11044
- const b = 3 * o.resolveTriangleIndex(k);
11039
+ const P = v * 2;
11040
+ if (d[P + 15] === wo) {
11041
+ const w = a[v + 6], S = d[P + 14];
11042
+ let E = 1 / 0, A = 1 / 0, M = 1 / 0, L = -1 / 0, R = -1 / 0, z = -1 / 0;
11043
+ for (let b = w, I = w + S; b < I; b++) {
11044
+ const k = 3 * o.resolveTriangleIndex(b);
11045
11045
  for (let j = 0; j < 3; j++) {
11046
- let G = b + j;
11046
+ let G = k + j;
11047
11047
  G = i ? i[G] : G;
11048
- const Y = l.getX(G), ee = l.getY(G), le = l.getZ(G);
11049
- Y < E && (E = Y), Y > L && (L = Y), ee < P && (P = ee), ee > R && (R = ee), le < M && (M = le), le > I && (I = le);
11048
+ const Y = l.getX(G), ee = l.getY(G), ae = l.getZ(G);
11049
+ Y < E && (E = Y), Y > L && (L = Y), ee < A && (A = ee), ee > R && (R = ee), ae < M && (M = ae), ae > z && (z = ae);
11050
11050
  }
11051
11051
  }
11052
- return f[v + 0] !== E || f[v + 1] !== P || f[v + 2] !== M || f[v + 3] !== L || f[v + 4] !== R || f[v + 5] !== I ? (f[v + 0] = E, f[v + 1] = P, f[v + 2] = M, f[v + 3] = L, f[v + 4] = R, f[v + 5] = I, !0) : !1;
11052
+ return f[v + 0] !== E || f[v + 1] !== A || f[v + 2] !== M || f[v + 3] !== L || f[v + 4] !== R || f[v + 5] !== z ? (f[v + 0] = E, f[v + 1] = A, f[v + 2] = M, f[v + 3] = L, f[v + 4] = R, f[v + 5] = z, !0) : !1;
11053
11053
  } else {
11054
- const w = v + 8, S = a[v + 6], E = w + x, P = S + x;
11054
+ const w = v + 8, S = a[v + 6], E = w + x, A = S + x;
11055
11055
  let M = _, L = !1, R = !1;
11056
- n ? M || (L = n.has(E), R = n.has(P), M = !L && !R) : (L = !0, R = !0);
11057
- const I = M || L, k = M || R;
11058
- let z = !1;
11059
- I && (z = m(w, x, M));
11060
- let b = !1;
11061
- k && (b = m(S, x, M));
11062
- const j = z || b;
11056
+ n ? M || (L = n.has(E), R = n.has(A), M = !L && !R) : (L = !0, R = !0);
11057
+ const z = M || L, b = M || R;
11058
+ let I = !1;
11059
+ z && (I = m(w, x, M));
11060
+ let k = !1;
11061
+ b && (k = m(S, x, M));
11062
+ const j = I || k;
11063
11063
  if (j)
11064
11064
  for (let G = 0; G < 3; G++) {
11065
- const Y = w + G, ee = S + G, le = f[Y], Se = f[Y + 3], W = f[ee], J = f[ee + 3];
11066
- f[v + G] = le < W ? le : W, f[v + G + 3] = Se > J ? Se : J;
11065
+ const Y = w + G, ee = S + G, ae = f[Y], Se = f[Y + 3], W = f[ee], J = f[ee + 3];
11066
+ f[v + G] = ae < W ? ae : W, f[v + G + 3] = Se > J ? Se : J;
11067
11067
  }
11068
11068
  return j;
11069
11069
  }
@@ -11124,37 +11124,37 @@ function Oa(o, n, r, i, l = null) {
11124
11124
  const { float32Array: u, uint16Array: a, uint32Array: d } = Ne;
11125
11125
  let f = o * 2;
11126
11126
  if (l === null && (r.boundingBox || r.computeBoundingBox(), Nf.set(r.boundingBox.min, r.boundingBox.max, i), l = Nf), Et(f, a)) {
11127
- const p = n.geometry, m = p.index, v = p.attributes.position, x = r.index, _ = r.attributes.position, A = Mt(o, d), T = Ut(f, a);
11127
+ const p = n.geometry, m = p.index, v = p.attributes.position, x = r.index, _ = r.attributes.position, P = Mt(o, d), T = Ut(f, a);
11128
11128
  if (zi.copy(i).invert(), r.boundsTree)
11129
- return be(o, u, ao), ao.matrix.copy(zi), ao.needsUpdate = !0, r.boundsTree.shapecast({
11129
+ return ke(o, u, ao), ao.matrix.copy(zi), ao.needsUpdate = !0, r.boundsTree.shapecast({
11130
11130
  intersectsBounds: (S) => ao.intersectsBox(S),
11131
11131
  intersectsTriangle: (S) => {
11132
11132
  S.a.applyMatrix4(i), S.b.applyMatrix4(i), S.c.applyMatrix4(i), S.needsUpdate = !0;
11133
- for (let E = A, P = T + A; E < P; E++)
11133
+ for (let E = P, A = T + P; E < A; E++)
11134
11134
  if (Ke(jr, 3 * n.resolveTriangleIndex(E), m, v), jr.needsUpdate = !0, S.intersectsTriangle(jr))
11135
11135
  return !0;
11136
11136
  return !1;
11137
11137
  }
11138
11138
  });
11139
- for (let w = A, S = T + A; w < S; w++) {
11139
+ for (let w = P, S = T + P; w < S; w++) {
11140
11140
  const E = n.resolveTriangleIndex(w);
11141
11141
  Ke(Br, 3 * E, m, v), Br.a.applyMatrix4(zi), Br.b.applyMatrix4(zi), Br.c.applyMatrix4(zi), Br.needsUpdate = !0;
11142
- for (let P = 0, M = x.count; P < M; P += 3)
11143
- if (Ke(jr, P, x, _), jr.needsUpdate = !0, Br.intersectsTriangle(jr))
11142
+ for (let A = 0, M = x.count; A < M; A += 3)
11143
+ if (Ke(jr, A, x, _), jr.needsUpdate = !0, Br.intersectsTriangle(jr))
11144
11144
  return !0;
11145
11145
  }
11146
11146
  } else {
11147
11147
  const p = o + 8, m = d[o + 6];
11148
- return be(p, u, lo), !!(l.intersectsBox(lo) && Oa(p, n, r, i, l) || (be(m, u, lo), l.intersectsBox(lo) && Oa(m, n, r, i, l)));
11148
+ return ke(p, u, lo), !!(l.intersectsBox(lo) && Oa(p, n, r, i, l) || (ke(m, u, lo), l.intersectsBox(lo) && Oa(m, n, r, i, l)));
11149
11149
  }
11150
11150
  }
11151
11151
  const uo = /* @__PURE__ */ new $e(), sa = /* @__PURE__ */ new mt(), Oi = /* @__PURE__ */ new mt(), K0 = /* @__PURE__ */ new V(), Y0 = /* @__PURE__ */ new V(), Q0 = /* @__PURE__ */ new V(), q0 = /* @__PURE__ */ new V();
11152
11152
  function Z0(o, n, r, i = {}, l = {}, u = 0, a = 1 / 0) {
11153
11153
  n.boundingBox || n.computeBoundingBox(), sa.set(n.boundingBox.min, n.boundingBox.max, r), sa.needsUpdate = !0;
11154
11154
  const d = o.geometry, f = d.attributes.position, g = d.index, p = n.attributes.position, m = n.index, v = Gt.getPrimitive(), x = Gt.getPrimitive();
11155
- let _ = K0, A = Y0, T = null, w = null;
11155
+ let _ = K0, P = Y0, T = null, w = null;
11156
11156
  l && (T = Q0, w = q0);
11157
- let S = 1 / 0, E = null, P = null;
11157
+ let S = 1 / 0, E = null, A = null;
11158
11158
  return uo.copy(r).invert(), Oi.matrix.copy(uo), o.shapecast(
11159
11159
  {
11160
11160
  boundsTraverseOrder: (M) => sa.distanceToBox(M),
@@ -11163,17 +11163,17 @@ function Z0(o, n, r, i = {}, l = {}, u = 0, a = 1 / 0) {
11163
11163
  if (n.boundsTree) {
11164
11164
  const R = n.boundsTree;
11165
11165
  return R.shapecast({
11166
- boundsTraverseOrder: (I) => Oi.distanceToBox(I),
11167
- intersectsBounds: (I, k, z) => z < S && z < a,
11168
- intersectsRange: (I, k) => {
11169
- for (let z = I, b = I + k; z < b; z++) {
11170
- const j = R.resolveTriangleIndex(z);
11166
+ boundsTraverseOrder: (z) => Oi.distanceToBox(z),
11167
+ intersectsBounds: (z, b, I) => I < S && I < a,
11168
+ intersectsRange: (z, b) => {
11169
+ for (let I = z, k = z + b; I < k; I++) {
11170
+ const j = R.resolveTriangleIndex(I);
11171
11171
  Ke(x, 3 * j, m, p), x.a.applyMatrix4(r), x.b.applyMatrix4(r), x.c.applyMatrix4(r), x.needsUpdate = !0;
11172
11172
  for (let G = M, Y = M + L; G < Y; G++) {
11173
11173
  const ee = o.resolveTriangleIndex(G);
11174
11174
  Ke(v, 3 * ee, g, f), v.needsUpdate = !0;
11175
- const le = v.distanceToTriangle(x, _, T);
11176
- if (le < S && (A.copy(_), w && w.copy(T), S = le, E = G, P = z), le < u)
11175
+ const ae = v.distanceToTriangle(x, _, T);
11176
+ if (ae < S && (P.copy(_), w && w.copy(T), S = ae, E = G, A = I), ae < u)
11177
11177
  return !0;
11178
11178
  }
11179
11179
  }
@@ -11181,20 +11181,20 @@ function Z0(o, n, r, i = {}, l = {}, u = 0, a = 1 / 0) {
11181
11181
  });
11182
11182
  } else {
11183
11183
  const R = $r(n);
11184
- for (let I = 0, k = R; I < k; I++) {
11185
- Ke(x, 3 * I, m, p), x.a.applyMatrix4(r), x.b.applyMatrix4(r), x.c.applyMatrix4(r), x.needsUpdate = !0;
11186
- for (let z = M, b = M + L; z < b; z++) {
11187
- const j = o.resolveTriangleIndex(z);
11184
+ for (let z = 0, b = R; z < b; z++) {
11185
+ Ke(x, 3 * z, m, p), x.a.applyMatrix4(r), x.b.applyMatrix4(r), x.c.applyMatrix4(r), x.needsUpdate = !0;
11186
+ for (let I = M, k = M + L; I < k; I++) {
11187
+ const j = o.resolveTriangleIndex(I);
11188
11188
  Ke(v, 3 * j, g, f), v.needsUpdate = !0;
11189
11189
  const G = v.distanceToTriangle(x, _, T);
11190
- if (G < S && (A.copy(_), w && w.copy(T), S = G, E = z, P = I), G < u)
11190
+ if (G < S && (P.copy(_), w && w.copy(T), S = G, E = I, A = z), G < u)
11191
11191
  return !0;
11192
11192
  }
11193
11193
  }
11194
11194
  }
11195
11195
  }
11196
11196
  }
11197
- ), Gt.releasePrimitive(v), Gt.releasePrimitive(x), S === 1 / 0 ? null : (i.point ? i.point.copy(A) : i.point = A.clone(), i.distance = S, i.faceIndex = E, l && (l.point ? l.point.copy(w) : l.point = w.clone(), l.point.applyMatrix4(uo), A.applyMatrix4(uo), l.distance = A.sub(l.point).length(), l.faceIndex = P), i);
11197
+ ), Gt.releasePrimitive(v), Gt.releasePrimitive(x), S === 1 / 0 ? null : (i.point ? i.point.copy(P) : i.point = P.clone(), i.distance = S, i.faceIndex = E, l && (l.point ? l.point.copy(w) : l.point = w.clone(), l.point.applyMatrix4(uo), P.applyMatrix4(uo), l.distance = P.sub(l.point).length(), l.faceIndex = A), i);
11198
11198
  }
11199
11199
  function J0() {
11200
11200
  return typeof SharedArrayBuffer < "u";
@@ -11211,7 +11211,7 @@ function $0(o, n, r, i) {
11211
11211
  for (let p = 0, m = l.length; p < m; p++) {
11212
11212
  Bi.setBuffer(l[p]), f = 0;
11213
11213
  const v = Hn.getPrimitive();
11214
- be(0, Bi.float32Array, v), v.applyMatrix4(g);
11214
+ ke(0, Bi.float32Array, v), v.applyMatrix4(g);
11215
11215
  for (let x = 0, _ = u.length; x < _ && (yo.setBuffer(u[p]), a = Zt(
11216
11216
  0,
11217
11217
  0,
@@ -11233,21 +11233,21 @@ function $0(o, n, r, i) {
11233
11233
  function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11234
11234
  let m, v;
11235
11235
  p ? (m = yo, v = Bi) : (m = Bi, v = yo);
11236
- const x = m.float32Array, _ = m.uint32Array, A = m.uint16Array, T = v.float32Array, w = v.uint32Array, S = v.uint16Array, E = o * 2, P = n * 2, M = Et(E, A), L = Et(P, S);
11236
+ const x = m.float32Array, _ = m.uint32Array, P = m.uint16Array, T = v.float32Array, w = v.uint32Array, S = v.uint16Array, E = o * 2, A = n * 2, M = Et(E, P), L = Et(A, S);
11237
11237
  let R = !1;
11238
11238
  if (L && M)
11239
11239
  p ? R = l(
11240
11240
  Mt(n, w),
11241
11241
  Ut(n * 2, S),
11242
11242
  Mt(o, _),
11243
- Ut(o * 2, A),
11243
+ Ut(o * 2, P),
11244
11244
  f,
11245
11245
  a + n,
11246
11246
  d,
11247
11247
  u + o
11248
11248
  ) : R = l(
11249
11249
  Mt(o, _),
11250
- Ut(o * 2, A),
11250
+ Ut(o * 2, P),
11251
11251
  Mt(n, w),
11252
11252
  Ut(n * 2, S),
11253
11253
  d,
@@ -11256,14 +11256,14 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11256
11256
  a + n
11257
11257
  );
11258
11258
  else if (L) {
11259
- const I = Hn.getPrimitive();
11260
- be(n, T, I), I.applyMatrix4(r);
11261
- const k = Ht(o), z = Vt(o, _);
11262
- be(k, x, Ur), be(z, x, Hr);
11263
- const b = I.intersectsBox(Ur), j = I.intersectsBox(Hr);
11264
- R = b && Zt(
11259
+ const z = Hn.getPrimitive();
11260
+ ke(n, T, z), z.applyMatrix4(r);
11261
+ const b = Ht(o), I = Vt(o, _);
11262
+ ke(b, x, Ur), ke(I, x, Hr);
11263
+ const k = z.intersectsBox(Ur), j = z.intersectsBox(Hr);
11264
+ R = k && Zt(
11265
11265
  n,
11266
- k,
11266
+ b,
11267
11267
  i,
11268
11268
  r,
11269
11269
  l,
@@ -11271,11 +11271,11 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11271
11271
  u,
11272
11272
  f,
11273
11273
  d + 1,
11274
- I,
11274
+ z,
11275
11275
  !p
11276
11276
  ) || j && Zt(
11277
11277
  n,
11278
- z,
11278
+ I,
11279
11279
  i,
11280
11280
  r,
11281
11281
  l,
@@ -11283,17 +11283,17 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11283
11283
  u,
11284
11284
  f,
11285
11285
  d + 1,
11286
- I,
11286
+ z,
11287
11287
  !p
11288
- ), Hn.releasePrimitive(I);
11288
+ ), Hn.releasePrimitive(z);
11289
11289
  } else {
11290
- const I = Ht(n), k = Vt(n, w);
11291
- be(I, T, oa), be(k, T, la);
11292
- const z = g.intersectsBox(oa), b = g.intersectsBox(la);
11293
- if (z && b)
11290
+ const z = Ht(n), b = Vt(n, w);
11291
+ ke(z, T, oa), ke(b, T, la);
11292
+ const I = g.intersectsBox(oa), k = g.intersectsBox(la);
11293
+ if (I && k)
11294
11294
  R = Zt(
11295
11295
  o,
11296
- I,
11296
+ z,
11297
11297
  r,
11298
11298
  i,
11299
11299
  l,
@@ -11305,7 +11305,7 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11305
11305
  p
11306
11306
  ) || Zt(
11307
11307
  o,
11308
- k,
11308
+ b,
11309
11309
  r,
11310
11310
  i,
11311
11311
  l,
@@ -11316,11 +11316,11 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11316
11316
  g,
11317
11317
  p
11318
11318
  );
11319
- else if (z)
11319
+ else if (I)
11320
11320
  if (M)
11321
11321
  R = Zt(
11322
11322
  o,
11323
- I,
11323
+ z,
11324
11324
  r,
11325
11325
  i,
11326
11326
  l,
@@ -11335,10 +11335,10 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11335
11335
  const j = Hn.getPrimitive();
11336
11336
  j.copy(oa).applyMatrix4(r);
11337
11337
  const G = Ht(o), Y = Vt(o, _);
11338
- be(G, x, Ur), be(Y, x, Hr);
11339
- const ee = j.intersectsBox(Ur), le = j.intersectsBox(Hr);
11338
+ ke(G, x, Ur), ke(Y, x, Hr);
11339
+ const ee = j.intersectsBox(Ur), ae = j.intersectsBox(Hr);
11340
11340
  R = ee && Zt(
11341
- I,
11341
+ z,
11342
11342
  G,
11343
11343
  i,
11344
11344
  r,
@@ -11349,8 +11349,8 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11349
11349
  d + 1,
11350
11350
  j,
11351
11351
  !p
11352
- ) || le && Zt(
11353
- I,
11352
+ ) || ae && Zt(
11353
+ z,
11354
11354
  Y,
11355
11355
  i,
11356
11356
  r,
@@ -11363,11 +11363,11 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11363
11363
  !p
11364
11364
  ), Hn.releasePrimitive(j);
11365
11365
  }
11366
- else if (b)
11366
+ else if (k)
11367
11367
  if (M)
11368
11368
  R = Zt(
11369
11369
  o,
11370
- k,
11370
+ b,
11371
11371
  r,
11372
11372
  i,
11373
11373
  l,
@@ -11382,10 +11382,10 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11382
11382
  const j = Hn.getPrimitive();
11383
11383
  j.copy(la).applyMatrix4(r);
11384
11384
  const G = Ht(o), Y = Vt(o, _);
11385
- be(G, x, Ur), be(Y, x, Hr);
11386
- const ee = j.intersectsBox(Ur), le = j.intersectsBox(Hr);
11385
+ ke(G, x, Ur), ke(Y, x, Hr);
11386
+ const ee = j.intersectsBox(Ur), ae = j.intersectsBox(Hr);
11387
11387
  R = ee && Zt(
11388
- k,
11388
+ b,
11389
11389
  G,
11390
11390
  i,
11391
11391
  r,
@@ -11396,8 +11396,8 @@ function Zt(o, n, r, i, l, u = 0, a = 0, d = 0, f = 0, g = null, p = !1) {
11396
11396
  d + 1,
11397
11397
  j,
11398
11398
  !p
11399
- ) || le && Zt(
11400
- k,
11399
+ ) || ae && Zt(
11400
+ b,
11401
11401
  Y,
11402
11402
  i,
11403
11403
  r,
@@ -11451,7 +11451,7 @@ class Qa {
11451
11451
  if (d._roots = u, d._indirectBuffer = a || null, i.setIndex) {
11452
11452
  const f = r.getIndex();
11453
11453
  if (f === null) {
11454
- const g = new bi(n.index, 1, !1);
11454
+ const g = new ki(n.index, 1, !1);
11455
11455
  r.setIndex(g);
11456
11456
  } else
11457
11457
  f.array !== l && (f.array.set(l), f.needsUpdate = !0);
@@ -11501,9 +11501,9 @@ class Qa {
11501
11501
  for (let m = 0, v = i.length; m < v; m++) {
11502
11502
  const x = d ? r[f[m].materialIndex].side : g, _ = u.length;
11503
11503
  if (p(this, m, x, n, u), d) {
11504
- const A = f[m].materialIndex;
11504
+ const P = f[m].materialIndex;
11505
11505
  for (let T = _, w = u.length; T < w; T++)
11506
- u[T].face.materialIndex = A;
11506
+ u[T].face.materialIndex = P;
11507
11507
  }
11508
11508
  }
11509
11509
  return u;
@@ -11520,7 +11520,7 @@ class Qa {
11520
11520
  }
11521
11521
  intersectsGeometry(n, r) {
11522
11522
  let i = !1;
11523
- const l = this._roots, u = this.indirect ? X0 : k0;
11523
+ const l = this._roots, u = this.indirect ? X0 : b0;
11524
11524
  for (let a = 0, d = l.length; a < d && (i = u(this, a, n, r), !i); a++)
11525
11525
  ;
11526
11526
  return i;
@@ -11535,7 +11535,7 @@ class Qa {
11535
11535
  } = n;
11536
11536
  if (a && d) {
11537
11537
  const m = a;
11538
- a = (v, x, _, A, T) => m(v, x, _, A, T) ? !0 : i(v, x, this, d, _, A, r);
11538
+ a = (v, x, _, P, T) => m(v, x, _, P, T) ? !0 : i(v, x, this, d, _, P, r);
11539
11539
  } else
11540
11540
  a || (d ? a = (m, v, x, _) => i(m, v, this, d, x, _, r) : a = (m, v, x) => x);
11541
11541
  let f = !1, g = 0;
@@ -11554,30 +11554,30 @@ class Qa {
11554
11554
  intersectsTriangles: u
11555
11555
  } = i;
11556
11556
  const a = Gt.getPrimitive(), d = this.geometry.index, f = this.geometry.attributes.position, g = this.indirect ? (_) => {
11557
- const A = this.resolveTriangleIndex(_);
11558
- Ke(a, A * 3, d, f);
11557
+ const P = this.resolveTriangleIndex(_);
11558
+ Ke(a, P * 3, d, f);
11559
11559
  } : (_) => {
11560
11560
  Ke(a, _ * 3, d, f);
11561
11561
  }, p = Gt.getPrimitive(), m = n.geometry.index, v = n.geometry.attributes.position, x = n.indirect ? (_) => {
11562
- const A = n.resolveTriangleIndex(_);
11563
- Ke(p, A * 3, m, v);
11562
+ const P = n.resolveTriangleIndex(_);
11563
+ Ke(p, P * 3, m, v);
11564
11564
  } : (_) => {
11565
11565
  Ke(p, _ * 3, m, v);
11566
11566
  };
11567
11567
  if (u) {
11568
- const _ = (A, T, w, S, E, P, M, L) => {
11569
- for (let R = w, I = w + S; R < I; R++) {
11568
+ const _ = (P, T, w, S, E, A, M, L) => {
11569
+ for (let R = w, z = w + S; R < z; R++) {
11570
11570
  x(R), p.a.applyMatrix4(r), p.b.applyMatrix4(r), p.c.applyMatrix4(r), p.needsUpdate = !0;
11571
- for (let k = A, z = A + T; k < z; k++)
11572
- if (g(k), a.needsUpdate = !0, u(a, p, k, R, E, P, M, L))
11571
+ for (let b = P, I = P + T; b < I; b++)
11572
+ if (g(b), a.needsUpdate = !0, u(a, p, b, R, E, A, M, L))
11573
11573
  return !0;
11574
11574
  }
11575
11575
  return !1;
11576
11576
  };
11577
11577
  if (l) {
11578
- const A = l;
11579
- l = function(T, w, S, E, P, M, L, R) {
11580
- return A(T, w, S, E, P, M, L, R) ? !0 : _(T, w, S, E, P, M, L, R);
11578
+ const P = l;
11579
+ l = function(T, w, S, E, A, M, L, R) {
11580
+ return P(T, w, S, E, A, M, L, R) ? !0 : _(T, w, S, E, A, M, L, R);
11581
11581
  };
11582
11582
  } else
11583
11583
  l = _;
@@ -11623,7 +11623,7 @@ class Qa {
11623
11623
  }
11624
11624
  getBoundingBox(n) {
11625
11625
  return n.makeEmpty(), this._roots.forEach((i) => {
11626
- be(0, new Float32Array(i), If), n.union(If);
11626
+ ke(0, new Float32Array(i), If), n.union(If);
11627
11627
  }), n;
11628
11628
  }
11629
11629
  }
@@ -11679,11 +11679,11 @@ const Df = (o) => o.isMesh, sv = /* @__PURE__ */ B.forwardRef(({
11679
11679
  maxLeafTris: d,
11680
11680
  indirect: f
11681
11681
  }, _ = m.current;
11682
- return v.firstHitOnly = n, _.traverse((A) => {
11683
- Df(A) && !A.geometry.boundsTree && A.raycast === Wn.prototype.raycast && (A.raycast = nv, A.geometry.computeBoundsTree = rv, A.geometry.disposeBoundsTree = iv, A.geometry.computeBoundsTree(x));
11682
+ return v.firstHitOnly = n, _.traverse((P) => {
11683
+ Df(P) && !P.geometry.boundsTree && P.raycast === Wn.prototype.raycast && (P.raycast = nv, P.geometry.computeBoundsTree = rv, P.geometry.disposeBoundsTree = iv, P.geometry.computeBoundsTree(x));
11684
11684
  }), () => {
11685
- delete v.firstHitOnly, _.traverse((A) => {
11686
- Df(A) && A.geometry.boundsTree && (A.geometry.disposeBoundsTree(), A.raycast = Wn.prototype.raycast);
11685
+ delete v.firstHitOnly, _.traverse((P) => {
11686
+ Df(P) && P.geometry.boundsTree && (P.geometry.disposeBoundsTree(), P.raycast = Wn.prototype.raycast);
11687
11687
  });
11688
11688
  };
11689
11689
  }
@@ -11705,30 +11705,30 @@ const Df = (o) => o.isMesh, sv = /* @__PURE__ */ B.forwardRef(({
11705
11705
  onCentered: v,
11706
11706
  precise: x = !0,
11707
11707
  cacheKey: _ = 0,
11708
- ...A
11708
+ ...P
11709
11709
  }, T) {
11710
11710
  const w = B.useRef(null), S = B.useRef(null), E = B.useRef(null);
11711
11711
  return B.useLayoutEffect(() => {
11712
11712
  S.current.matrixWorld.identity();
11713
- const P = new Ye().setFromObject(E.current, x), M = new V(), L = new Jr(), R = P.max.x - P.min.x, I = P.max.y - P.min.y, k = P.max.z - P.min.z;
11714
- P.getCenter(M), P.getBoundingSphere(L);
11715
- const z = f ? I / 2 : g ? -I / 2 : 0, b = a ? -R / 2 : d ? R / 2 : 0, j = p ? k / 2 : m ? -k / 2 : 0;
11716
- S.current.position.set(r || i ? 0 : -M.x + b, r || l ? 0 : -M.y + z, r || u ? 0 : -M.z + j), typeof v < "u" && v({
11713
+ const A = new Ye().setFromObject(E.current, x), M = new V(), L = new Jr(), R = A.max.x - A.min.x, z = A.max.y - A.min.y, b = A.max.z - A.min.z;
11714
+ A.getCenter(M), A.getBoundingSphere(L);
11715
+ const I = f ? z / 2 : g ? -z / 2 : 0, k = a ? -R / 2 : d ? R / 2 : 0, j = p ? b / 2 : m ? -b / 2 : 0;
11716
+ S.current.position.set(r || i ? 0 : -M.x + k, r || l ? 0 : -M.y + I, r || u ? 0 : -M.z + j), typeof v < "u" && v({
11717
11717
  parent: w.current.parent,
11718
11718
  container: w.current,
11719
11719
  width: R,
11720
- height: I,
11721
- depth: k,
11722
- boundingBox: P,
11720
+ height: z,
11721
+ depth: b,
11722
+ boundingBox: A,
11723
11723
  boundingSphere: L,
11724
11724
  center: M,
11725
- verticalAlignment: z,
11726
- horizontalAlignment: b,
11725
+ verticalAlignment: I,
11726
+ horizontalAlignment: k,
11727
11727
  depthAlignment: j
11728
11728
  });
11729
11729
  }, [_, v, f, a, p, r, i, l, u, x, d, g, m]), B.useImperativeHandle(T, () => w.current, []), /* @__PURE__ */ B.createElement("group", Gn({
11730
11730
  ref: w
11731
- }, A), /* @__PURE__ */ B.createElement("group", {
11731
+ }, P), /* @__PURE__ */ B.createElement("group", {
11732
11732
  ref: S
11733
11733
  }, /* @__PURE__ */ B.createElement("group", {
11734
11734
  ref: E
@@ -11747,11 +11747,11 @@ function lv() {
11747
11747
  r.current.position.copy(i);
11748
11748
  }
11749
11749
  }
11750
- }), ne.jsxs(ne.Fragment, { children: [ne.jsxs("mesh", { name: "leftTipBbox", ref: r, children: [ne.jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), ne.jsx("meshStandardMaterial", { color: "blue", transparent: !0, opacity: 0 })] }), ne.jsxs("mesh", { name: "rightTipBbox", ref: n, children: [ne.jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), ne.jsx("meshStandardMaterial", { color: "orange", transparent: !0, opacity: 0 })] })] });
11750
+ }), re.jsxs(re.Fragment, { children: [re.jsxs("mesh", { name: "leftTipBbox", ref: r, children: [re.jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), re.jsx("meshStandardMaterial", { color: "blue", transparent: !0, opacity: 0 })] }), re.jsxs("mesh", { name: "rightTipBbox", ref: n, children: [re.jsx("boxGeometry", { args: [0.02, 0.02, 0.02] }), re.jsx("meshStandardMaterial", { color: "orange", transparent: !0, opacity: 0 })] })] });
11751
11751
  }
11752
11752
  function ca(o) {
11753
11753
  const { currentLine: n, scale: r } = o, i = pn();
11754
- return ne.jsxs("group", { children: [ne.jsx(ov, { bottom: !0, right: !0, position: [n.midPoint.x, n.midPoint.y, n.midPoint.z], rotation: [0, 0, 0], children: ne.jsx(Ed, { color: "gray", scale: 0.05, ref: i, children: `${(n.startPoint.distanceTo(n.endPoint) * r).toFixed(2)} µm` }) }), ne.jsx(Jg, {
11754
+ return re.jsxs("group", { children: [re.jsx(ov, { bottom: !0, right: !0, position: [n.midPoint.x, n.midPoint.y, n.midPoint.z], rotation: [0, 0, 0], children: re.jsx(Ed, { color: "gray", scale: 0.05, ref: i, children: `${(n.startPoint.distanceTo(n.endPoint) * r).toFixed(2)} µm` }) }), re.jsx(Jg, {
11755
11755
  points: [n.startPoint, n.endPoint],
11756
11756
  color: "white",
11757
11757
  lineWidth: 2,
@@ -11760,69 +11760,69 @@ function ca(o) {
11760
11760
  })] });
11761
11761
  }
11762
11762
  function av(o) {
11763
- const { segmentationGroup: n, segmentationSettings: r, segmentationSceneScale: i, renderingSettings: l, materialRef: u, highlightGlom: a, setObsHighlight: d } = o, f = pn(), g = pn(), p = pn(), { isPresenting: m } = Ue();
11763
+ const { segmentationGroup: n, segmentationSettings: r, segmentationSceneScale: i, renderingSettings: l, materialRef: u, highlightEntity: a, setObsHighlight: d } = o, f = pn(), g = pn(), p = pn(), { isPresenting: m } = Ue();
11764
11764
  Sn(() => {
11765
11765
  m && f?.current ? u !== null && (u.current.material.uniforms.u_physical_Pixel.value = 0.2) : m || u !== null && (u.current.material.uniforms.u_physical_Pixel.value = 2.5);
11766
11766
  }, [m]);
11767
- const { scene: v } = rt(), { controllers: x } = Ue(), [_, A] = ht(!1), [T, w] = ht(!1), [S, E] = ht(!1), [P, M] = ht({
11767
+ const { scene: v } = rt(), { controllers: x } = Ue(), [_, P] = ht(!1), [T, w] = ht(!1), [S, E] = ht(!1), [A, M] = ht({
11768
11768
  startPoint: new V(),
11769
11769
  midPoint: new V(),
11770
11770
  endPoint: new V(),
11771
11771
  setStartPoint: !1,
11772
11772
  setEndPoint: !1
11773
- }), [L, R] = ht([]), [I, k] = ht(0);
11773
+ }), [L, R] = ht([]), [z, b] = ht(0);
11774
11774
  return dr(() => {
11775
11775
  if (m) {
11776
- const z = v.getObjectByName("rightTipBbox"), b = v.getObjectByName("leftTipBbox"), j = new Ye().setFromObject(b), G = new Ye().setFromObject(z);
11776
+ const I = v.getObjectByName("rightTipBbox"), k = v.getObjectByName("leftTipBbox"), j = new Ye().setFromObject(k), G = new Ye().setFromObject(I);
11777
11777
  let Y = !1;
11778
- if (k(I - 1), j.intersectsBox(G) && j.max.x !== -G.min.x && (A(!0), E(!0), M({
11778
+ if (b(z - 1), j.intersectsBox(G) && j.max.x !== -G.min.x && (P(!0), E(!0), M({
11779
11779
  startPoint: new V(),
11780
11780
  midPoint: new V(),
11781
11781
  endPoint: new V(),
11782
11782
  setStartPoint: !1,
11783
11783
  setEndPoint: !1
11784
11784
  })), _) {
11785
- let ee = x[1].hand.joints["index-finger-tip"].position.clone(), le = x[0].hand.joints["index-finger-tip"].position.clone();
11786
- ee = ee.applyMatrix4(p.current.matrixWorld.clone().invert()), le = le.applyMatrix4(p.current.matrixWorld.clone().invert());
11787
- let Se = ee.clone(), W = le.clone();
11788
- P.setStartPoint && (Se = P.startPoint), P.setEndPoint && (W = P.endPoint), M({
11785
+ let ee = x[1].hand.joints["index-finger-tip"].position.clone(), ae = x[0].hand.joints["index-finger-tip"].position.clone();
11786
+ ee = ee.applyMatrix4(p.current.matrixWorld.clone().invert()), ae = ae.applyMatrix4(p.current.matrixWorld.clone().invert());
11787
+ let Se = ee.clone(), W = ae.clone();
11788
+ A.setStartPoint && (Se = A.startPoint), A.setEndPoint && (W = A.endPoint), M({
11789
11789
  startPoint: Se,
11790
11790
  midPoint: new V().addVectors(Se, W).multiplyScalar(0.5),
11791
11791
  endPoint: W,
11792
- setStartPoint: P.setStartPoint,
11793
- setEndPoint: P.setEndPoint
11792
+ setStartPoint: A.setStartPoint,
11793
+ setEndPoint: A.setEndPoint
11794
11794
  }), x[0].hand.inputState.pinching === !0 && M({
11795
- startPoint: P.startPoint,
11796
- midPoint: P.midPoint,
11797
- endPoint: P.endPoint,
11798
- setStartPoint: P.setStartPoint,
11795
+ startPoint: A.startPoint,
11796
+ midPoint: A.midPoint,
11797
+ endPoint: A.endPoint,
11798
+ setStartPoint: A.setStartPoint,
11799
11799
  setEndPoint: !0
11800
11800
  }), x[1].hand.inputState.pinching === !0 && M({
11801
- startPoint: P.startPoint,
11802
- midPoint: P.midPoint,
11803
- endPoint: P.endPoint,
11801
+ startPoint: A.startPoint,
11802
+ midPoint: A.midPoint,
11803
+ endPoint: A.endPoint,
11804
11804
  setStartPoint: !0,
11805
- setEndPoint: P.setEndPoint
11806
- }), P.setStartPoint && P.setEndPoint && (L.push(P), R(L), E(!1), A(!1), k(8));
11805
+ setEndPoint: A.setEndPoint
11806
+ }), A.setStartPoint && A.setEndPoint && (L.push(A), R(L), E(!1), P(!1), b(8));
11807
11807
  } else
11808
- I <= 0 && f?.current && m && (f.current.children[0].children.forEach((ee, le) => {
11809
- const Se = f.current.children[0].children[le], W = new Ye().setFromObject(Se), J = j.intersectsBox(W), Z = G.intersectsBox(W);
11810
- (J || Z) && (Y = !0, d(Se.name), w(!0), x[1] !== void 0 && J && x[1].hand.inputState.pinching === !0 && (k(10), Y = !1, x[1].hand.inputState.pinching = !1), x[0] !== void 0 && Z && x[0].hand.inputState.pinching === !0 && (k(10), Y = !1, x[0].hand.inputState.pinching = !1));
11808
+ z <= 0 && f?.current && m && (f.current.children[0].children.forEach((ee, ae) => {
11809
+ const Se = f.current.children[0].children[ae], W = new Ye().setFromObject(Se), J = j.intersectsBox(W), Z = G.intersectsBox(W);
11810
+ (J || Z) && (Y = !0, d(Se.name), w(!0), x[1] !== void 0 && J && x[1].hand.inputState.pinching === !0 && (b(10), Y = !1, x[1].hand.inputState.pinching = !1), x[0] !== void 0 && Z && x[0].hand.inputState.pinching === !0 && (b(10), Y = !1, x[0].hand.inputState.pinching = !1));
11811
11811
  }), !Y && T && (d(null), w(!1)));
11812
11812
  }
11813
- }, [_, T, P, L, S, I, m]), ne.jsx("group", { children: Ue().isPresenting ? ne.jsxs(zm, { children: [ne.jsxs("group", { ref: p, children: [n?.visible ? ne.jsxs("group", { children: [ne.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), ne.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), ne.jsx("primitive", { ref: f, object: n, position: [-0.18, 1.13, -1], scale: [
11813
+ }, [_, T, A, L, S, z, m]), re.jsx("group", { children: Ue().isPresenting ? re.jsxs(zm, { children: [re.jsxs("group", { ref: p, children: [n?.visible ? re.jsxs("group", { children: [re.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), re.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), re.jsx("primitive", { ref: f, object: n, position: [-0.18, 1.13, -1], scale: [
11814
11814
  2e-3 * i[0],
11815
11815
  2e-3 * i[1],
11816
11816
  2e-3 * i[2]
11817
- ] })] }) : null, l.uniforms && l.shader ? ne.jsx("group", { children: ne.jsxs("mesh", { name: "cube", position: [-0.18, 1.13, -1], rotation: [0, 0, 0], scale: [
11817
+ ] })] }) : null, l.uniforms && l.shader ? re.jsx("group", { children: re.jsxs("mesh", { name: "cube", position: [-0.18, 1.13, -1], rotation: [0, 0, 0], scale: [
11818
11818
  2e-3 * l.meshScale[0],
11819
11819
  2e-3 * l.meshScale[1],
11820
11820
  2e-3 * l.meshScale[2]
11821
- ], ref: u, children: [ne.jsx("boxGeometry", { args: l.geometrySize }), ne.jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: qr, uniforms: l.uniforms, needsUpdate: !0, transparent: !0, vertexShader: l.shader.vertexShader, fragmentShader: l.shader.fragmentShader })] }) }) : null] }), ne.jsx("group", { name: "currentLine", ref: g, children: S ? ne.jsx(ca, { currentLine: P, scale: 1 / 2e-3 * 0.4 }) : null }), ne.jsx("group", { name: "lines", children: L.map((z) => ne.jsx(ca, { currentLine: z, scale: 1 / 2e-3 * 0.4 })) })] }) : ne.jsxs("group", { children: [ne.jsxs("group", { children: [n?.visible ? ne.jsxs("group", { children: [ne.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), ne.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), ne.jsx("directionalLight", { color: 16777215, position: [0, 800, 0] }), ne.jsx(sv, { firstHitOnly: !0, children: ne.jsx("primitive", { ref: f, object: n, position: [0, 0, 0], onClick: (z) => {
11822
- z.object.parent.userData.name === "finalPass" && a(z.object.name);
11823
- }, onPointerOver: (z) => {
11824
- d(z.object.name);
11825
- }, onPointerOut: (z) => d(null) }) })] }) : null, l.uniforms && l.shader ? ne.jsx("group", { children: ne.jsxs("mesh", { scale: l.meshScale, ref: u, children: [ne.jsx("boxGeometry", { args: l.geometrySize }), ne.jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: qr, uniforms: l.uniforms, needsUpdate: !0, transparent: !0, vertexShader: l.shader.vertexShader, fragmentShader: l.shader.fragmentShader })] }) }) : null] }), ne.jsx("group", { name: "lines", children: L.map((z) => ne.jsx(ca, { currentLine: z, scale: 1 })) })] }) });
11821
+ ], ref: u, children: [re.jsx("boxGeometry", { args: l.geometrySize }), re.jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: qr, uniforms: l.uniforms, needsUpdate: !0, transparent: !0, vertexShader: l.shader.vertexShader, fragmentShader: l.shader.fragmentShader })] }) }) : null] }), re.jsx("group", { name: "currentLine", ref: g, children: S ? re.jsx(ca, { currentLine: A, scale: 1 / 2e-3 * 0.4 }) : null }), re.jsx("group", { name: "lines", children: L.map((I) => re.jsx(ca, { currentLine: I, scale: 1 / 2e-3 * 0.4 })) })] }) : re.jsxs("group", { children: [re.jsxs("group", { children: [n?.visible ? re.jsxs("group", { children: [re.jsx("hemisphereLight", { skyColor: 8421504, groundColor: 6316128 }), re.jsx("directionalLight", { color: 16777215, position: [0, -800, 0] }), re.jsx("directionalLight", { color: 16777215, position: [0, 800, 0] }), re.jsx(sv, { firstHitOnly: !0, children: re.jsx("primitive", { ref: f, object: n, position: [0, 0, 0], onClick: (I) => {
11822
+ I.object.parent.userData.name === "finalPass" && a(I.object.name, I.object.userData.layerScope, I.object.userData.channelScope);
11823
+ }, onPointerOver: (I) => {
11824
+ d(I.object.name);
11825
+ }, onPointerOut: (I) => d(null) }) })] }) : null, l.uniforms && l.shader ? re.jsx("group", { children: re.jsxs("mesh", { scale: l.meshScale, ref: u, children: [re.jsx("boxGeometry", { args: l.geometrySize }), re.jsx("shaderMaterial", { customProgramCacheKey: () => "1", side: qr, uniforms: l.uniforms, needsUpdate: !0, transparent: !0, vertexShader: l.shader.vertexShader, fragmentShader: l.shader.fragmentShader })] }) }) : null] }), re.jsx("group", { name: "lines", children: L.map((I) => re.jsx(ca, { currentLine: I, scale: 1 })) })] }) });
11826
11826
  }
11827
11827
  function uv() {
11828
11828
  const { controllers: o } = Ue();
@@ -12008,19 +12008,19 @@ class cv {
12008
12008
  break;
12009
12009
  }
12010
12010
  p.applyMatrix4(l.inverseMatrix).normalize(), p.argVar = "i", m.applyMatrix4(l.inverseMatrix).normalize(), m.argVar = "j", g.applyMatrix4(l.inverseMatrix).normalize();
12011
- const x = Math.floor(Math.abs(p.dot(v))), _ = Math.floor(Math.abs(m.dot(v))), A = Math.abs(x * u), T = Math.abs(_ * a);
12011
+ const x = Math.floor(Math.abs(p.dot(v))), _ = Math.floor(Math.abs(m.dot(v))), P = Math.abs(x * u), T = Math.abs(_ * a);
12012
12012
  f = Math.abs(Math.round(f.applyMatrix4(l.inverseMatrix).dot(g)));
12013
- const w = [new V(1, 0, 0), new V(0, 1, 0), new V(0, 0, 1)], S = [p, m, g].find((L) => Math.abs(L.dot(w[0])) > 0.9), E = [p, m, g].find((L) => Math.abs(L.dot(w[1])) > 0.9), P = [p, m, g].find((L) => Math.abs(L.dot(w[2])) > 0.9);
12013
+ const w = [new V(1, 0, 0), new V(0, 1, 0), new V(0, 0, 1)], S = [p, m, g].find((L) => Math.abs(L.dot(w[0])) > 0.9), E = [p, m, g].find((L) => Math.abs(L.dot(w[1])) > 0.9), A = [p, m, g].find((L) => Math.abs(L.dot(w[2])) > 0.9);
12014
12014
  function M(L, R) {
12015
- const I = S === g ? f : S.arglet === "i" ? L : R, k = E === g ? f : E.arglet === "i" ? L : R, z = P === g ? f : P.arglet === "i" ? L : R, b = S.dot(w[0]) > 0 ? I : l.xLength - 1 - I, j = E.dot(w[1]) > 0 ? k : l.yLength - 1 - k, G = P.dot(w[2]) > 0 ? z : l.zLength - 1 - z;
12016
- return l.access(b, j, G);
12015
+ const z = S === g ? f : S.arglet === "i" ? L : R, b = E === g ? f : E.arglet === "i" ? L : R, I = A === g ? f : A.arglet === "i" ? L : R, k = S.dot(w[0]) > 0 ? z : l.xLength - 1 - z, j = E.dot(w[1]) > 0 ? b : l.yLength - 1 - b, G = A.dot(w[2]) > 0 ? I : l.zLength - 1 - I;
12016
+ return l.access(k, j, G);
12017
12017
  }
12018
12018
  return {
12019
12019
  iLength: x,
12020
12020
  jLength: _,
12021
12021
  sliceAccess: M,
12022
12022
  matrix: i,
12023
- planeWidth: A,
12023
+ planeWidth: P,
12024
12024
  planeHeight: T
12025
12025
  };
12026
12026
  }
@@ -12338,64 +12338,64 @@ function pv(o, n, r, i, l, u) {
12338
12338
  };
12339
12339
  const f = l.image.instance, g = a === "3D", p = n[Ft.PHOTOMETRIC_INTERPRETATION] === "RGB", m = n[Ft.VOLUMETRIC_RENDERING_ALGORITHM], v = dv[m], x = n[Ft.SPATIAL_LAYER_VISIBLE], _ = n[Ft.SPATIAL_LAYER_OPACITY];
12340
12340
  f.isInterleaved();
12341
- const A = p ? [
12341
+ const P = p ? [
12342
12342
  [255, 0, 0],
12343
12343
  [0, 255, 0],
12344
12344
  [0, 0, 255]
12345
- ] : r.map((z) => i[z][Ft.SPATIAL_CHANNEL_COLOR]), T = p ? [
12345
+ ] : r.map((I) => i[I][Ft.SPATIAL_CHANNEL_COLOR]), T = p ? [
12346
12346
  [0, 255],
12347
12347
  [0, 255],
12348
12348
  [0, 255]
12349
- ] : r.map((z) => i[z][Ft.SPATIAL_CHANNEL_WINDOW] || [0, 255]), w = p ? [
12349
+ ] : r.map((I) => i[I][Ft.SPATIAL_CHANNEL_WINDOW] || [0, 255]), w = p ? [
12350
12350
  // Layer visible AND channel visible
12351
12351
  x && !0,
12352
12352
  x && !0,
12353
12353
  x && !0
12354
- ] : r.map((z) => (
12354
+ ] : r.map((I) => (
12355
12355
  // Layer visible AND channel visible
12356
- x && i[z][Ft.SPATIAL_CHANNEL_VISIBLE]
12356
+ x && i[I][Ft.SPATIAL_CHANNEL_VISIBLE]
12357
12357
  )), S = p ? [
12358
12358
  // Layer visible AND channel visible
12359
12359
  x && !0,
12360
12360
  x && !0,
12361
12361
  x && !0
12362
- ] : r.map((z) => (
12362
+ ] : r.map((I) => (
12363
12363
  // Layer visible AND channel visible
12364
- x && i[z][Ft.SPATIAL_TARGET_C]
12365
- )), E = f.getAutoTargetResolution(), P = n[Ft.SPATIAL_TARGET_RESOLUTION], M = P === null || Number.isNaN(P) ? E : P, L = l.image.loaders[0].channels;
12366
- let R = n[Ft.SPATIAL_SLICE_X], I = n[Ft.SPATIAL_SLICE_Y], k = n[Ft.SPATIAL_SLICE_Z];
12367
- return R = R !== null ? R : new ye(-1, 1e5), I = I !== null ? I : new ye(-1, 1e5), k = k !== null ? k : new ye(-1, 1e5), {
12364
+ x && i[I][Ft.SPATIAL_TARGET_C]
12365
+ )), E = f.getAutoTargetResolution(), A = n[Ft.SPATIAL_TARGET_RESOLUTION], M = A === null || Number.isNaN(A) ? E : A, L = l.image.loaders[0].channels;
12366
+ let R = n[Ft.SPATIAL_SLICE_X], z = n[Ft.SPATIAL_SLICE_Y], b = n[Ft.SPATIAL_SLICE_Z];
12367
+ return R = R !== null ? R : new ye(-1, 1e5), z = z !== null ? z : new ye(-1, 1e5), b = b !== null ? b : new ye(-1, 1e5), {
12368
12368
  channelsVisible: w,
12369
12369
  allChannels: L,
12370
12370
  channelTargetC: S,
12371
12371
  resolution: M,
12372
12372
  data: d,
12373
- colors: A,
12373
+ colors: P,
12374
12374
  contrastLimits: T,
12375
12375
  is3dMode: g,
12376
12376
  renderingMode: v,
12377
12377
  layerTransparency: _,
12378
12378
  xSlice: R,
12379
- ySlice: I,
12380
- zSlice: k
12379
+ ySlice: z,
12380
+ zSlice: b
12381
12381
  };
12382
12382
  }
12383
12383
  function hv(o, n, r, i, l) {
12384
- const { images: u = {}, imageLayerScopes: a, imageLayerCoordination: d, imageChannelScopesByLayer: f, imageChannelCoordination: g } = o, p = a[0], m = f[p], v = d[0][p], x = g[0][p], { channelsVisible: _, allChannels: A, channelTargetC: T, resolution: w, data: S, colors: E, contrastLimits: P, is3dMode: M, renderingMode: L, layerTransparency: R, xSlice: I, ySlice: k, zSlice: z } = pv(p, v, m, x, u[p], o);
12385
- return T !== null && (n.channelTargetC.length !== 0 && (n.channelTargetC.toString() !== T.toString() || n.resolution.toString() !== w.toString()) ? i || l(!0) : (n.channelsVisible.toString() !== _.toString() || n.colors.toString() !== E.toString() || n.is3dMode !== M || n.contrastLimits.toString() !== P.toString() || n.renderingMode.toString() !== L.toString() || n.layerTransparency.toString() !== R.toString() || n.xSlice.toString() !== I.toString() || n.ySlice.toString() !== k.toString() || n.zSlice.toString() !== z.toString()) && (r({
12384
+ const { images: u = {}, imageLayerScopes: a, imageLayerCoordination: d, imageChannelScopesByLayer: f, imageChannelCoordination: g } = o, p = a[0], m = f[p], v = d[0][p], x = g[0][p], { channelsVisible: _, allChannels: P, channelTargetC: T, resolution: w, data: S, colors: E, contrastLimits: A, is3dMode: M, renderingMode: L, layerTransparency: R, xSlice: z, ySlice: b, zSlice: I } = pv(p, v, m, x, u[p], o);
12385
+ return T !== null && (n.channelTargetC.length !== 0 && (n.channelTargetC.toString() !== T.toString() || n.resolution.toString() !== w.toString()) ? i || l(!0) : (n.channelsVisible.toString() !== _.toString() || n.colors.toString() !== E.toString() || n.is3dMode !== M || n.contrastLimits.toString() !== A.toString() || n.renderingMode.toString() !== L.toString() || n.layerTransparency.toString() !== R.toString() || n.xSlice.toString() !== z.toString() || n.ySlice.toString() !== b.toString() || n.zSlice.toString() !== I.toString()) && (r({
12386
12386
  channelsVisible: _,
12387
- allChannels: A,
12387
+ allChannels: P,
12388
12388
  channelTargetC: T,
12389
12389
  resolution: w,
12390
12390
  data: S,
12391
12391
  colors: E,
12392
- contrastLimits: P,
12392
+ contrastLimits: A,
12393
12393
  is3dMode: M,
12394
12394
  renderingMode: L,
12395
12395
  layerTransparency: R,
12396
- xSlice: I,
12397
- ySlice: k,
12398
- zSlice: z
12396
+ xSlice: z,
12397
+ ySlice: b,
12398
+ zSlice: I
12399
12399
  }), l(!1))), {
12400
12400
  images: u,
12401
12401
  layerScope: p,
@@ -12404,18 +12404,18 @@ function hv(o, n, r, i, l) {
12404
12404
  imageChannelScopesByLayer: f,
12405
12405
  imageChannelCoordination: g,
12406
12406
  channelsVisible: _,
12407
- allChannels: A,
12407
+ allChannels: P,
12408
12408
  channelTargetC: T,
12409
12409
  resolution: w,
12410
12410
  data: S,
12411
12411
  colors: E,
12412
- contrastLimits: P,
12412
+ contrastLimits: A,
12413
12413
  is3dMode: M,
12414
12414
  renderingMode: L,
12415
12415
  layerTransparency: R,
12416
- xSlice: I,
12417
- ySlice: k,
12418
- zSlice: z
12416
+ xSlice: z,
12417
+ ySlice: b,
12418
+ zSlice: I
12419
12419
  };
12420
12420
  }
12421
12421
  function fo(o, n) {
@@ -12425,11 +12425,11 @@ function fo(o, n) {
12425
12425
  function mv(o, n, r, i, l, u, a, d, f, g, p, m, v) {
12426
12426
  o.boxSize.value.set(r.xLength, r.yLength, r.zLength), o.volumeTex.value = n.length > 0 ? n[0] : null, o.volumeTex2.value = n.length > 1 ? n[1] : null, o.volumeTex3.value = n.length > 2 ? n[2] : null, o.volumeTex4.value = n.length > 3 ? n[3] : null, o.volumeTex5.value = n.length > 4 ? n[4] : null, o.volumeTex6.value = n.length > 5 ? n[5] : null, o.near.value = 0.1, o.far.value = 3e3, o.alphaScale.value = 1, o.dtScale.value = d, o.finalGamma.value = 4.5, o.volumeCount.value = n.length, o.u_size.value.set(r.xLength, r.yLength, r.zLength), o.u_stop_geom.value = null, o.u_window_size.value.set(0, 0), o.u_vol_scale.value.set(1 / r.xLength, 1 / r.yLength, 1 / r.zLength * 2), o.u_renderstyle.value = l, o.u_clim.value.set(u.length > 0 ? u[0][0] : null, u.length > 0 ? u[0][1] : null), o.u_clim2.value.set(u.length > 1 ? u[1][0] : null, u.length > 1 ? u[1][1] : null), o.u_clim3.value.set(u.length > 2 ? u[2][0] : null, u.length > 2 ? u[2][1] : null), o.u_clim4.value.set(u.length > 3 ? u[3][0] : null, u.length > 3 ? u[3][1] : null), o.u_clim5.value.set(u.length > 4 ? u[4][0] : null, u.length > 4 ? u[4][1] : null), o.u_clim6.value.set(u.length > 5 ? u[5][0] : null, u.length > 5 ? u[5][1] : null), o.u_xClip.value.set(f[0] * (1 / m[0]) / v[0] * r.xLength, f[1] * (1 / m[0]) / v[0] * r.xLength), o.u_yClip.value.set(g[0] * (1 / m[1]) / v[1] * r.yLength, g[1] * (1 / m[1]) / v[1] * r.yLength), o.u_zClip.value.set(p[0] * (1 / m[2]) / v[2] * r.zLength, p[1] * (1 / m[1]) / v[2] * r.zLength), o.u_color.value.set(a.length > 0 ? a[0][0] : null, a.length > 0 ? a[0][1] : null, a.length > 0 ? a[0][2] : null), o.u_color2.value.set(a.length > 1 ? a[1][0] : null, a.length > 1 ? a[1][1] : null, a.length > 1 ? a[1][2] : null), o.u_color3.value.set(a.length > 2 ? a[2][0] : null, a.length > 2 ? a[2][1] : null, a.length > 2 ? a[2][2] : null), o.u_color4.value.set(a.length > 3 ? a[3][0] : null, a.length > 3 ? a[3][1] : null, a.length > 3 ? a[3][2] : null), o.u_color5.value.set(a.length > 4 ? a[4][0] : null, a.length > 4 ? a[4][1] : null, a.length > 4 ? a[4][2] : null), o.u_color6.value.set(a.length > 5 ? a[5][0] : null, a.length > 5 ? a[5][1] : null, a.length > 5 ? a[5][2] : null);
12427
12427
  }
12428
- function kf(o, n, r, i, l, u, a, d, f, g, p, m, v, x) {
12429
- const _ = [], A = [], T = [];
12428
+ function bf(o, n, r, i, l, u, a, d, f, g, p, m, v, x) {
12429
+ const _ = [], P = [], T = [];
12430
12430
  let w = null;
12431
12431
  if (n.forEach((M, L) => {
12432
- r[L] && (w = o.get(M), _.push(l.get(M)), A.push([i[L][0] / 255, i[L][1] / 255, i[L][2] / 255]), u[L][0] === 0 && u[L][1] === 255 ? T.push([
12432
+ r[L] && (w = o.get(M), _.push(l.get(M)), P.push([i[L][0] / 255, i[L][1] / 255, i[L][2] / 255]), u[L][0] === 0 && u[L][1] === 255 ? T.push([
12433
12433
  fo(a.get(M)[0], a.get(M)),
12434
12434
  fo(a.get(M)[1], a.get(M))
12435
12435
  ]) : T.push([
@@ -12444,9 +12444,9 @@ function kf(o, n, r, i, l, u, a, d, f, g, p, m, v, x) {
12444
12444
  isothreshold: 0.15,
12445
12445
  opacity: 1,
12446
12446
  colormap: "gray"
12447
- }, E = fv, P = ga.clone(E.uniforms);
12448
- return mv(P, _, w, S, f, T, A, g, p, m, v, [d[0].size, d[1].size, d[2] ? d[2].size : 1], x), [
12449
- P,
12447
+ }, E = fv, A = ga.clone(E.uniforms);
12448
+ return mv(A, _, w, S, f, T, P, g, p, m, v, [d[0].size, d[1].size, d[2] ? d[2].size : 1], x), [
12449
+ A,
12450
12450
  E,
12451
12451
  [1, d[1].size / d[0].size, d[2] ? d[2].size / d[0].size : 1],
12452
12452
  [w.xLength, w.yLength, w.zLength],
@@ -12466,7 +12466,7 @@ const gv = {
12466
12466
  async function vv({ source: o, selection: n, onUpdate: r = () => {
12467
12467
  }, downsampleDepth: i = 1, signal: l }) {
12468
12468
  const { shape: u, labels: a, dtype: d } = o, { height: f, width: g } = Dh(o), p = u[a.indexOf("z")], m = Math.max(1, Math.floor(p / i)), v = f * g, x = gv[d], _ = new x(v * m);
12469
- return await Promise.all(new Array(m).fill(0).map(async (A, T) => {
12469
+ return await Promise.all(new Array(m).fill(0).map(async (P, T) => {
12470
12470
  const w = {
12471
12471
  ...n,
12472
12472
  z: T * i
@@ -12476,8 +12476,8 @@ async function vv({ source: o, selection: n, onUpdate: r = () => {
12476
12476
  });
12477
12477
  let E = 0;
12478
12478
  for (r({ z: T, total: m, progress: 0.5 }); E < v; ) {
12479
- const P = T * v + (v - E - 1), M = (g - E - 1) % g + g * Math.floor(E / g);
12480
- _[P] = S[M], E += 1;
12479
+ const A = T * v + (v - E - 1), M = (g - E - 1) % g + g * Math.floor(E / g);
12480
+ _[A] = S[M], E += 1;
12481
12481
  }
12482
12482
  r({ z: T, total: m, progress: 1 });
12483
12483
  })), {
@@ -12517,8 +12517,8 @@ async function Ev(o, n, r, i, l, u, a) {
12517
12517
  let d = null, f = null;
12518
12518
  const { shape: g, labels: p } = r[0], m = o.filter((x) => !i.has(x) || n !== a), v = await Promise.all(m.map((x) => yv(x, n, r)));
12519
12519
  return m.forEach((x, _) => {
12520
- const A = v[_];
12521
- d = xv(A);
12520
+ const P = v[_];
12521
+ d = xv(P);
12522
12522
  const T = d.computeMinMax();
12523
12523
  d.data = _v(d), i.set(x, d), l.set(x, wv(d)), u.set(x, T), f = Sv(r[n]);
12524
12524
  }), [
@@ -12543,7 +12543,7 @@ function Tv(o) {
12543
12543
  scale: null,
12544
12544
  resolution: null,
12545
12545
  originalScale: null
12546
- }), [A, T] = ht({
12546
+ }), [P, T] = ht({
12547
12547
  channelsVisible: [],
12548
12548
  allChannels: [],
12549
12549
  channelTargetC: [],
@@ -12563,66 +12563,66 @@ function Tv(o) {
12563
12563
  multiColor: "",
12564
12564
  data: null,
12565
12565
  obsSets: []
12566
- }), { images: E, layerScope: P, channelsVisible: M, allChannels: L, channelTargetC: R, resolution: I, data: k, colors: z, contrastLimits: b, is3dMode: j, renderingMode: G, layerTransparency: Y, xSlice: ee, ySlice: le, zSlice: Se } = hv(o, A, T, u, a), { obsSegmentations: W, onGlomSelected: J, segmentationLayerCoordination: Z, segmentationChannelCoordination: re, segmentationChannelScopesByLayer: ge } = o;
12566
+ }), { images: E, layerScope: A, channelsVisible: M, allChannels: L, channelTargetC: R, resolution: z, data: b, colors: I, contrastLimits: k, is3dMode: j, renderingMode: G, layerTransparency: Y, xSlice: ee, ySlice: ae, zSlice: Se } = hv(o, P, T, u, a), { obsSegmentations: W, onEntitySelected: J, segmentationLayerCoordination: Z, segmentationChannelCoordination: te, segmentationChannelScopesByLayer: ge } = o;
12567
12567
  let xe = () => {
12568
12568
  };
12569
12569
  const Fe = [];
12570
- if (re[0][P] !== void 0) {
12571
- const se = re[0][P][P], { setObsHighlight: ue } = re[1][P][P];
12572
- xe = ue;
12573
- const ce = re[0][P][P].additionalObsSets;
12574
- ce !== null && se.obsSetSelection.forEach((Me) => {
12570
+ if (te[0][A] !== void 0) {
12571
+ const se = te[0][A][A], { setObsHighlight: fe } = te[1][A][A];
12572
+ xe = fe;
12573
+ const le = te[0][A][A].additionalObsSets;
12574
+ le !== null && se.obsSetSelection.forEach((Me) => {
12575
12575
  const Pe = Me[1];
12576
- ce.tree[0].children.forEach((Ve) => {
12577
- Ve.name === Pe && Ve.set.forEach(([de]) => {
12578
- const Ie = { name: "", id: "", color: [] };
12579
- Ie.name = Pe, Ie.id = de, se.obsSetColor.forEach((st) => {
12576
+ le.tree[0].children.forEach((Ve) => {
12577
+ Ve.name === Pe && Ve.set.forEach(([ue]) => {
12578
+ const Ie = { name: "", id: "", color: [255, 255, 255] };
12579
+ Ie.name = Pe, Ie.id = ue, se.obsSetColor.forEach((st) => {
12580
12580
  st.path[1] === Pe && (Ie.color = st.color);
12581
12581
  }), Fe.push(Ie);
12582
12582
  });
12583
12583
  });
12584
12584
  }), se.obsHighlight !== null && Fe.push({ name: "", id: se.obsHighlight, color: [255, 34, 0] });
12585
12585
  }
12586
- if (W?.[P]?.obsSegmentations && d == null) {
12587
- const { scene: se, sceneOptions: ue } = W[P].obsSegmentations;
12586
+ if (W?.[A]?.obsSegmentations && d == null) {
12587
+ const { scene: se, sceneOptions: fe } = W[A].obsSegmentations;
12588
12588
  if (se?.children) {
12589
- const ce = new fa(), Me = new lr();
12589
+ const le = new fa(), Me = new lr();
12590
12590
  Me.userData.name = "finalPass", se.children.forEach((Ve) => {
12591
- let de = Ve;
12592
- de.material === void 0 && (de = Ve.children[0]), (de.material instanceof Tn || de.material instanceof sr) && (de.material = new ba());
12593
- let Ie = de.name.replace("mesh_", "").replace("mesh", "").replace("glb", "").replace("_dec", "").replace("_Decobj", "").replace("obj", "").replace("_DEc", "").replace(".", "").replace("_Dec", "");
12594
- Ie.includes("_") && (Ie = Ie.split("_")[0]), de.name = Ie, de.userData.name = Ie, de.material.transparent = !0, de.material.writeDepthTexture = !0, de.material.depthTest = !0, de.material.depthWrite = !0, de.material.needsUpdate = !0, de.material.side = ue?.materialSide === "back" ? Kf : qr;
12595
- const st = de.clone();
12596
- st.geometry = de.geometry.clone(), st.geometry.translate(ue?.targetX ?? 0, ue?.targetY ?? 0, ue?.targetZ ?? 0), st.geometry.scale(ue?.scaleX ?? 1, ue?.scaleY ?? 1, ue?.scaleZ ?? 1), st.geometry.rotateX(ue?.rotationX ?? 0), st.geometry.rotateY(ue?.rotationY ?? 0), st.geometry.rotateZ(ue?.rotationZ ?? 0);
12597
- const vt = de.clone();
12598
- vt.material = de.material.clone(), vt.geometry = st.geometry.clone(), Me.add(vt);
12599
- }), ce.add(Me), ce.scale.set(ue?.sceneScaleX ?? 1, ue?.sceneScaleY ?? 1, ue?.sceneScaleZ ?? 1);
12591
+ let ue = Ve;
12592
+ ue.material === void 0 && (ue = Ve.children[0]), (ue.material instanceof Tn || ue.material instanceof sr) && (ue.material = new ka());
12593
+ let Ie = ue.name.replace("mesh_", "").replace("mesh", "").replace("glb", "").replace("_dec", "").replace("_Decobj", "").replace("obj", "").replace("_DEc", "").replace(".", "").replace("_Dec", "");
12594
+ Ie.includes("_") && (Ie = Ie.split("_")[0]), ue.name = Ie, ue.userData.name = Ie, ue.userData.layerScope = A, ue.material.transparent = !0, ue.material.writeDepthTexture = !0, ue.material.depthTest = !0, ue.material.depthWrite = !0, ue.material.needsUpdate = !0, ue.material.side = fe?.materialSide === "back" ? Kf : qr;
12595
+ const st = ue.clone();
12596
+ st.geometry = ue.geometry.clone(), st.geometry.translate(fe?.targetX ?? 0, fe?.targetY ?? 0, fe?.targetZ ?? 0), st.geometry.scale(fe?.scaleX ?? 1, fe?.scaleY ?? 1, fe?.scaleZ ?? 1), st.geometry.rotateX(fe?.rotationX ?? 0), st.geometry.rotateY(fe?.rotationY ?? 0), st.geometry.rotateZ(fe?.rotationZ ?? 0);
12597
+ const vt = ue.clone();
12598
+ vt.material = ue.material.clone(), vt.geometry = st.geometry.clone(), Me.add(vt);
12599
+ }), le.add(Me), le.scale.set(fe?.sceneScaleX ?? 1, fe?.sceneScaleY ?? 1, fe?.sceneScaleZ ?? 1);
12600
12600
  const Pe = [
12601
- ue?.sceneScaleX ?? 1,
12602
- ue?.sceneScaleY ?? 1,
12603
- ue?.sceneScaleZ ?? 1
12601
+ fe?.sceneScaleX ?? 1,
12602
+ fe?.sceneScaleY ?? 1,
12603
+ fe?.sceneScaleZ ?? 1
12604
12604
  ];
12605
- p(Pe), ce.rotateX(ue?.sceneRotationX ?? 0), ce.rotateY(ue?.sceneRotationY ?? 0), ce.rotateZ(ue?.sceneRotationZ ?? 0), f(ce);
12605
+ p(Pe), le.rotateX(fe?.sceneRotationX ?? 0), le.rotateY(fe?.sceneRotationY ?? 0), le.rotateZ(fe?.sceneRotationZ ?? 0), f(le);
12606
12606
  }
12607
12607
  }
12608
- if (re[0] !== void 0 && re[0][P] !== void 0) {
12609
- const se = re[0][P][P];
12610
- let ue = "";
12608
+ if (te[0] !== void 0 && te[0][A] !== void 0) {
12609
+ const se = te[0][A][A];
12610
+ let fe = "";
12611
12611
  Fe.forEach((Me) => {
12612
- ue += `${Me.id};${Me.color.toString()};${Me.name}`;
12612
+ fe += `${Me.id};${Me.color.toString()};${Me.name}`;
12613
12613
  });
12614
- let ce = "";
12614
+ let le = "";
12615
12615
  if (w.obsSets.forEach((Me) => {
12616
- ce += `${Me.id};${Me.color.toString()};${Me.name}`;
12617
- }), ge[P].length > 1) {
12618
- let Me = "", Pe = "", Ve = "", de = !1, Ie = 0;
12619
- ge[P].forEach((st) => {
12620
- const vt = re[0][P][st];
12621
- Me += `${vt.spatialChannelColor.toString()};`, Pe += `${vt.spatialChannelOpacity};`, Ve += `${vt.spatialChannelVisible};`, de |= vt.spatialChannelVisible, Ie += vt.spatialChannelOpacity;
12616
+ le += `${Me.id};${Me.color.toString()};${Me.name}`;
12617
+ }), ge[A].length > 1) {
12618
+ let Me = "", Pe = "", Ve = "", ue = !1, Ie = 0;
12619
+ ge[A].forEach((st) => {
12620
+ const vt = te[0][A][st];
12621
+ Me += `${vt.spatialChannelColor.toString()};`, Pe += `${vt.spatialChannelOpacity};`, Ve += `${vt.spatialChannelVisible};`, ue |= vt.spatialChannelVisible, Ie += vt.spatialChannelOpacity;
12622
12622
  }), (Me !== w.multiColor || Pe !== w.multiOpacity || Ve !== w.multiVisible) && S({
12623
12623
  color: se.spatialChannelColor,
12624
12624
  opacity: Ie,
12625
- visible: de,
12625
+ visible: ue,
12626
12626
  multiColor: Me,
12627
12627
  multiVisible: Ve,
12628
12628
  multiOpacity: Pe,
@@ -12630,7 +12630,7 @@ function Tv(o) {
12630
12630
  obsSets: Fe
12631
12631
  });
12632
12632
  } else
12633
- (se.spatialChannelColor.toString() !== w.color.toString() || se.spatialChannelVisible !== w.visible || se.spatialChannelOpacity !== w.opacity || ue !== ce) && S({
12633
+ (se.spatialChannelColor.toString() !== w.color.toString() || se.spatialChannelVisible !== w.visible || se.spatialChannelOpacity !== w.opacity || fe !== le) && S({
12634
12634
  color: se.spatialChannelColor,
12635
12635
  opacity: se.spatialChannelOpacity,
12636
12636
  visible: se.spatialChannelVisible,
@@ -12643,88 +12643,94 @@ function Tv(o) {
12643
12643
  }
12644
12644
  if (Sn(() => {
12645
12645
  if (d !== null) {
12646
- let se = 0, ue = 0;
12647
- for (let ce = 0; ce < d.children.length; ce++)
12648
- d.children[ce].userData.name === "finalPass" ? ue = ce : se = ce;
12649
- d.children[ue].children.forEach((ce, Me) => {
12646
+ let se = 0, fe = 0;
12647
+ for (let le = 0; le < d.children.length; le++)
12648
+ d.children[le].userData.name === "finalPass" ? fe = le : se = le;
12649
+ d.children[fe].children.forEach((le, Me) => {
12650
12650
  let { color: Pe } = w;
12651
- const Ve = ce.userData.name;
12652
- w.obsSets.forEach((de) => {
12653
- de.id === Ve && (Pe = de.color);
12654
- }), ge[P].length > 1 ? ge[P].forEach((de) => {
12655
- const Ie = re[0][P][de];
12656
- Ie.obsType === Ve && (ce.material.color.r = Ie.spatialChannelColor[0] / 255, ce.material.color.g = Ie.spatialChannelColor[1] / 255, ce.material.color.b = Ie.spatialChannelColor[2] / 255, ce.material.opacity = Ie.spatialChannelOpacity, ce.visible = Ie.spatialChannelVisible, ce.material.needsUpdate = !0, d.children[se].children[Me].material.needsUpdate = !0);
12657
- }) : (ce.material.color.r = Pe[0] / 255, ce.material.color.g = Pe[1] / 255, ce.material.color.b = Pe[2] / 255, ce.material.opacity = w.opacity, ce.material.visible = w.visible, ce.material.needsUpdate = !0);
12651
+ const Ve = le.userData.name;
12652
+ if (w.obsSets.forEach((ue) => {
12653
+ ue.id === Ve && (Pe = ue.color);
12654
+ }), ge[A].length > 1)
12655
+ ge[A].forEach((ue) => {
12656
+ const Ie = te[0][A][ue];
12657
+ Ie.spatialTargetC === Ve && (le.material.color.r = Ie.spatialChannelColor[0] / 255, le.material.color.g = Ie.spatialChannelColor[1] / 255, le.material.color.b = Ie.spatialChannelColor[2] / 255, le.material.opacity = Ie.spatialChannelOpacity, le.visible = Ie.spatialChannelVisible, le.material.needsUpdate = !0, le.userData.layerScope = A, le.userData.channelScope = ue, d.children[se].children[Me].material.needsUpdate = !0);
12658
+ });
12659
+ else {
12660
+ le.material.color.r = Pe[0] / 255, le.material.color.g = Pe[1] / 255, le.material.color.b = Pe[2] / 255, le.material.opacity = w.opacity, le.material.visible = w.visible, le.material.needsUpdate = !0, le.userData.layerScope = A;
12661
+ const ue = Object.keys(te[0][A])?.[0];
12662
+ le.userData.channelScope = ue;
12663
+ }
12658
12664
  });
12659
12665
  }
12660
- }, [w, d]), E[P]?.image?.instance?.getData() !== void 0 && !u && !i && b !== null && b[0][1] !== 255 && j && (a(!0), l(!0)), Sn(() => {
12666
+ }, [w, d]), E[A]?.image?.instance?.getData() !== void 0 && !u && !i && k !== null && k[0][1] !== 255 && j && (a(!0), l(!0)), Sn(() => {
12661
12667
  const se = async () => {
12662
- const ue = await Ev(R, I, k, x.volumes, x.textures, x.volumeMinMax, x.resolution);
12663
- if (ue[0] !== null)
12668
+ const fe = await Ev(R, z, b, x.volumes, x.textures, x.volumeMinMax, x.resolution);
12669
+ if (fe[0] !== null)
12664
12670
  if (_({
12665
- resolution: I,
12666
- volumes: ue[0],
12667
- textures: ue[1],
12668
- volumeMinMax: ue[2],
12669
- scale: ue[3] !== null ? ue[3] : x.scale,
12670
- originalScale: ue[4]
12671
+ resolution: z,
12672
+ volumes: fe[0],
12673
+ textures: fe[1],
12674
+ volumeMinMax: fe[2],
12675
+ scale: fe[3] !== null ? fe[3] : x.scale,
12676
+ originalScale: fe[4]
12671
12677
  }), !m.uniforms || !m.shader) {
12672
- const ce = kf(ue[0], R, M, z, ue[1], b, ue[2], ue[3], G, Y, ee, le, Se, ue[4]);
12673
- ce !== null && v({
12674
- uniforms: ce[0],
12675
- shader: ce[1],
12676
- meshScale: ce[2],
12677
- geometrySize: ce[3],
12678
- boxSize: ce[4]
12678
+ const le = bf(fe[0], R, M, I, fe[1], k, fe[2], fe[3], G, Y, ee, ae, Se, fe[4]);
12679
+ le !== null && v({
12680
+ uniforms: le[0],
12681
+ shader: le[1],
12682
+ meshScale: le[2],
12683
+ geometrySize: le[3],
12684
+ boxSize: le[4]
12679
12685
  });
12680
12686
  } else
12681
12687
  T({
12682
12688
  channelsVisible: M,
12683
12689
  allChannels: L,
12684
12690
  channelTargetC: R,
12685
- resolution: I,
12686
- data: k,
12687
- colors: z,
12688
- contrastLimits: b,
12691
+ resolution: z,
12692
+ data: b,
12693
+ colors: I,
12694
+ contrastLimits: k,
12689
12695
  is3dMode: j,
12690
12696
  renderingMode: G,
12691
12697
  layerTransparency: Y,
12692
12698
  xSlice: ee,
12693
- ySlice: le,
12699
+ ySlice: ae,
12694
12700
  zSlice: Se
12695
12701
  });
12696
12702
  };
12697
- u && (I !== A.resolution && n.current && (n.current.material.uniforms.volumeCount.value = 0, n.current.material.uniforms.volumeTex.value = null), se(), a(!1));
12703
+ u && (z !== P.resolution && n.current && (n.current.material.uniforms.volumeCount.value = 0, n.current.material.uniforms.volumeTex.value = null), se(), a(!1));
12698
12704
  }, [u]), Sn(() => {
12699
12705
  if (m.uniforms && m.shader) {
12700
- const se = kf(x.volumes, A.channelTargetC, A.channelsVisible, A.colors, x.textures, A.contrastLimits, x.volumeMinMax, x.scale, A.renderingMode, A.layerTransparency, A.xSlice, A.ySlice, A.zSlice, x.originalScale);
12706
+ const se = bf(x.volumes, P.channelTargetC, P.channelsVisible, P.colors, x.textures, P.contrastLimits, x.volumeMinMax, x.scale, P.renderingMode, P.layerTransparency, P.xSlice, P.ySlice, P.zSlice, x.originalScale);
12701
12707
  if (se !== null) {
12702
- let ue = 0;
12703
- A.channelsVisible.forEach((ce) => {
12704
- ce && ue++;
12705
- }), a(!1), n?.current?.material?.uniforms && (n.current.material.uniforms.u_clim.value = se[0].u_clim.value, n.current.material.uniforms.u_clim2.value = se[0].u_clim2.value, n.current.material.uniforms.u_clim3.value = se[0].u_clim3.value, n.current.material.uniforms.u_clim4.value = se[0].u_clim4.value, n.current.material.uniforms.u_clim5.value = se[0].u_clim5.value, n.current.material.uniforms.u_clim6.value = se[0].u_clim6.value, n.current.material.uniforms.u_xClip.value = se[0].u_xClip.value, n.current.material.uniforms.u_yClip.value = se[0].u_yClip.value, n.current.material.uniforms.u_zClip.value = se[0].u_zClip.value, n.current.material.uniforms.u_color.value = se[0].u_color.value, n.current.material.uniforms.u_color2.value = se[0].u_color2.value, n.current.material.uniforms.u_color3.value = se[0].u_color3.value, n.current.material.uniforms.u_color4.value = se[0].u_color4.value, n.current.material.uniforms.u_color5.value = se[0].u_color5.value, n.current.material.uniforms.u_color6.value = se[0].u_color6.value, n.current.material.uniforms.volumeTex.value = se[0].volumeTex.value, n.current.material.uniforms.volumeTex2.value = se[0].volumeTex2.value, n.current.material.uniforms.volumeTex3.value = se[0].volumeTex3.value, n.current.material.uniforms.volumeTex4.value = se[0].volumeTex4.value, n.current.material.uniforms.volumeTex5.value = se[0].volumeTex5.value, n.current.material.uniforms.volumeTex6.value = se[0].volumeTex6.value, n.current.material.uniforms.volumeCount.value = ue, n.current.material.uniforms.u_renderstyle.value = A.renderingMode, n.current.material.uniforms.dtScale.value = A.layerTransparency);
12708
+ let fe = 0;
12709
+ P.channelsVisible.forEach((le) => {
12710
+ le && fe++;
12711
+ }), a(!1), n?.current?.material?.uniforms && (n.current.material.uniforms.u_clim.value = se[0].u_clim.value, n.current.material.uniforms.u_clim2.value = se[0].u_clim2.value, n.current.material.uniforms.u_clim3.value = se[0].u_clim3.value, n.current.material.uniforms.u_clim4.value = se[0].u_clim4.value, n.current.material.uniforms.u_clim5.value = se[0].u_clim5.value, n.current.material.uniforms.u_clim6.value = se[0].u_clim6.value, n.current.material.uniforms.u_xClip.value = se[0].u_xClip.value, n.current.material.uniforms.u_yClip.value = se[0].u_yClip.value, n.current.material.uniforms.u_zClip.value = se[0].u_zClip.value, n.current.material.uniforms.u_color.value = se[0].u_color.value, n.current.material.uniforms.u_color2.value = se[0].u_color2.value, n.current.material.uniforms.u_color3.value = se[0].u_color3.value, n.current.material.uniforms.u_color4.value = se[0].u_color4.value, n.current.material.uniforms.u_color5.value = se[0].u_color5.value, n.current.material.uniforms.u_color6.value = se[0].u_color6.value, n.current.material.uniforms.volumeTex.value = se[0].volumeTex.value, n.current.material.uniforms.volumeTex2.value = se[0].volumeTex2.value, n.current.material.uniforms.volumeTex3.value = se[0].volumeTex3.value, n.current.material.uniforms.volumeTex4.value = se[0].volumeTex4.value, n.current.material.uniforms.volumeTex5.value = se[0].volumeTex5.value, n.current.material.uniforms.volumeTex6.value = se[0].volumeTex6.value, n.current.material.uniforms.volumeCount.value = fe, n.current.material.uniforms.u_renderstyle.value = P.renderingMode, n.current.material.uniforms.dtScale.value = P.layerTransparency);
12706
12712
  } else
12707
12713
  n?.current?.material?.uniforms && (n.current.material.uniforms.volumeCount.value = 0, n.current.material.uniforms.volumeTex.value = null);
12708
12714
  }
12709
- }, [A]), !A.is3dMode)
12715
+ }, [P]), !P.is3dMode)
12710
12716
  return null;
12711
- if (A.is3dMode && (!m.uniforms || !m.shader))
12712
- return ne.jsxs("group", { children: [ne.jsx("ambientLight", {}), ne.jsx("pointLight", { position: [10, 10, 10] }), ne.jsx(Ed, { color: "white", scale: 20, fontWeight: 1e3, children: "Loading ..." })] });
12717
+ if (P.is3dMode && (!m.uniforms || !m.shader))
12718
+ return re.jsxs("group", { children: [re.jsx("ambientLight", {}), re.jsx("pointLight", { position: [10, 10, 10] }), re.jsx(Ed, { color: "white", scale: 20, fontWeight: 1e3, children: "Loading ..." })] });
12713
12719
  const gt = {
12714
12720
  segmentationGroup: d,
12715
12721
  segmentationSettings: w,
12716
12722
  segmentationSceneScale: g,
12717
12723
  renderingSettings: m,
12718
12724
  materialRef: n,
12719
- highlightGlom: J,
12725
+ highlightEntity: J,
12720
12726
  setObsHighlight: xe
12721
12727
  };
12722
- return ne.jsxs("group", { children: [ne.jsx(Fg, {}), ne.jsx(Gg, {}), ne.jsx(lv, {}), ne.jsx(uv, {}), ne.jsx(av, { ...gt }), ne.jsx($g, { ref: r, enableDamping: !1, dampingFactor: 0, zoomDampingFactor: 0, smoothZoom: !1 })] });
12728
+ return re.jsxs("group", { children: [re.jsx(Fg, {}), re.jsx(Gg, {}), re.jsx(lv, {}), re.jsx(uv, {}), re.jsx(av, { ...gt }), re.jsx($g, { ref: r, enableDamping: !1, dampingFactor: 0, zoomDampingFactor: 0, smoothZoom: !1 })] });
12723
12729
  }
12724
- const Rv = Fh((o, n) => ne.jsxs("div", { style: { width: "100%", height: "100%" }, children: [ne.jsx(Ga, { mode: "AR", sessionInit: { optionalFeatures: ["hand-tracking"] }, style: {
12730
+ const Rv = Fh((o, n) => re.jsxs("div", { style: { width: "100%", height: "100%" }, children: [re.jsx(Ga, { mode: "AR", sessionInit: { optionalFeatures: ["hand-tracking"] }, style: {
12725
12731
  border: "none",
12726
12732
  background: "rgba(0, 0, 0, 0.0)"
12727
- }, children: (r) => r === "unsupported" ? null : ne.jsx("div", { style: {
12733
+ }, children: (r) => r === "unsupported" ? null : re.jsx("div", { style: {
12728
12734
  border: "1px solid white",
12729
12735
  padding: "12px 24px",
12730
12736
  borderRadius: "4px",
@@ -12733,13 +12739,13 @@ const Rv = Fh((o, n) => ne.jsxs("div", { style: { width: "100%", height: "100%"
12733
12739
  font: "normal 0.8125rem sans-serif",
12734
12740
  outline: "none",
12735
12741
  cursor: "pointer"
12736
- }, children: r === "entered" ? "Exit AR" : "Enter AR" }) }), ne.jsx(Mm, { style: { position: "absolute", top: 0, left: 0 }, camera: {
12742
+ }, children: r === "entered" ? "Exit AR" : "Enter AR" }) }), re.jsx(Mm, { style: { position: "absolute", top: 0, left: 0 }, camera: {
12737
12743
  fov: 50,
12738
12744
  up: [0, 1, 0],
12739
12745
  position: [0, 0, 800],
12740
12746
  near: 0.1,
12741
12747
  far: 3e3
12742
- }, gl: { antialias: !0, logarithmicDepthBuffer: !1 }, ref: n, children: ne.jsx(Dm, { children: ne.jsx(Tv, { ...o }) }) })] }));
12748
+ }, gl: { antialias: !0, logarithmicDepthBuffer: !1 }, ref: n, children: re.jsx(Dm, { children: re.jsx(Tv, { ...o }) }) })] }));
12743
12749
  export {
12744
12750
  Rv as SpatialWrapper
12745
12751
  };