threedviewer 0.5.0 → 0.6.0

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,7 +1,7 @@
1
- import Zt, { useRef as $, useCallback as Ze, useEffect as Ht, useMemo as Xe, useState as oi } from "react";
2
- import * as y from "three";
3
- import { Ray as Ve, Plane as Ge, MathUtils as $e, Vector3 as j, Controls as Be, MOUSE as F, TOUCH as H, Quaternion as Wt, Spherical as Kt, Vector2 as O } from "three";
4
- var Ce = { exports: {} }, At = {};
1
+ import ie, { useRef as X, useState as Ke, useCallback as at, useEffect as Jt, useMemo as si } from "react";
2
+ import * as h from "three";
3
+ import { Ray as Xe, Plane as $e, MathUtils as qe, Vector3 as z, Controls as Qe, MOUSE as H, TOUCH as $, Quaternion as te, Spherical as ee, Vector2 as A } from "three";
4
+ var je = { exports: {} }, Ht = {};
5
5
  /**
6
6
  * @license React
7
7
  * react-jsx-runtime.production.min.js
@@ -11,21 +11,21 @@ var Ce = { exports: {} }, At = {};
11
11
  * This source code is licensed under the MIT license found in the
12
12
  * LICENSE file in the root directory of this source tree.
13
13
  */
14
- var ke;
15
- function ni() {
16
- if (ke) return At;
17
- ke = 1;
18
- var o = Zt, t = Symbol.for("react.element"), i = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
19
- function p(d, m, E) {
20
- var b, S = {}, M = null, z = null;
21
- E !== void 0 && (M = "" + E), m.key !== void 0 && (M = "" + m.key), m.ref !== void 0 && (z = m.ref);
22
- for (b in m) r.call(m, b) && !u.hasOwnProperty(b) && (S[b] = m[b]);
23
- if (d && d.defaultProps) for (b in m = d.defaultProps, m) S[b] === void 0 && (S[b] = m[b]);
24
- return { $$typeof: t, type: d, key: M, ref: z, props: S, _owner: a.current };
25
- }
26
- return At.Fragment = i, At.jsx = p, At.jsxs = p, At;
14
+ var Ne;
15
+ function ai() {
16
+ if (Ne) return Ht;
17
+ Ne = 1;
18
+ var n = ie, t = Symbol.for("react.element"), i = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function d(u, p, v) {
20
+ var g, C = {}, P = null, I = null;
21
+ v !== void 0 && (P = "" + v), p.key !== void 0 && (P = "" + p.key), p.ref !== void 0 && (I = p.ref);
22
+ for (g in p) o.call(p, g) && !l.hasOwnProperty(g) && (C[g] = p[g]);
23
+ if (u && u.defaultProps) for (g in p = u.defaultProps, p) C[g] === void 0 && (C[g] = p[g]);
24
+ return { $$typeof: t, type: u, key: P, ref: I, props: C, _owner: s.current };
25
+ }
26
+ return Ht.Fragment = i, Ht.jsx = d, Ht.jsxs = d, Ht;
27
27
  }
28
- var zt = {};
28
+ var Gt = {};
29
29
  /**
30
30
  * @license React
31
31
  * react-jsx-runtime.development.js
@@ -35,54 +35,54 @@ var zt = {};
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
37
  */
38
- var Ae;
39
- function ri() {
40
- return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
41
- var o = Zt, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), d = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), z = Symbol.for("react.offscreen"), Z = Symbol.iterator, et = "@@iterator";
42
- function B(e) {
38
+ var ze;
39
+ function hi() {
40
+ return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
41
+ var n = ie, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), u = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), Z = Symbol.iterator, U = "@@iterator";
42
+ function J(e) {
43
43
  if (e === null || typeof e != "object")
44
44
  return null;
45
- var n = Z && e[Z] || e[et];
46
- return typeof n == "function" ? n : null;
45
+ var r = Z && e[Z] || e[U];
46
+ return typeof r == "function" ? r : null;
47
47
  }
48
- var L = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
+ var k = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
49
49
  function w(e) {
50
50
  {
51
- for (var n = arguments.length, s = new Array(n > 1 ? n - 1 : 0), h = 1; h < n; h++)
52
- s[h - 1] = arguments[h];
53
- Xt("error", e, s);
51
+ for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
52
+ a[c - 1] = arguments[c];
53
+ ht("error", e, a);
54
54
  }
55
55
  }
56
- function Xt(e, n, s) {
56
+ function ht(e, r, a) {
57
57
  {
58
- var h = L.ReactDebugCurrentFrame, f = h.getStackAddendum();
59
- f !== "" && (n += "%s", s = s.concat([f]));
60
- var _ = s.map(function(c) {
61
- return String(c);
58
+ var c = k.ReactDebugCurrentFrame, _ = c.getStackAddendum();
59
+ _ !== "" && (r += "%s", a = a.concat([_]));
60
+ var y = a.map(function(m) {
61
+ return String(m);
62
62
  });
63
- _.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, _);
63
+ y.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, y);
64
64
  }
65
65
  }
66
- var Vt = !1, Gt = !1, $t = !1, Bt = !1, qt = !1, ut;
67
- ut = Symbol.for("react.module.reference");
68
- function Jt(e) {
69
- return !!(typeof e == "string" || typeof e == "function" || e === r || e === u || qt || e === a || e === E || e === b || Bt || e === z || Vt || Gt || $t || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === S || e.$$typeof === p || e.$$typeof === d || e.$$typeof === m || // This needs to include all possible module reference object
66
+ var wt = !1, lt = !1, ct = !1, ut = !1, T = !1, O;
67
+ O = Symbol.for("react.module.reference");
68
+ function N(e) {
69
+ return !!(typeof e == "string" || typeof e == "function" || e === o || e === l || T || e === s || e === v || e === g || ut || e === I || wt || lt || ct || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === C || e.$$typeof === d || e.$$typeof === u || e.$$typeof === p || // This needs to include all possible module reference object
70
70
  // types supported by any Flight configuration anywhere since
71
71
  // we don't know which Flight build this will end up being used
72
72
  // with.
73
- e.$$typeof === ut || e.getModuleId !== void 0));
73
+ e.$$typeof === O || e.getModuleId !== void 0));
74
74
  }
75
- function Qt(e, n, s) {
76
- var h = e.displayName;
77
- if (h)
78
- return h;
79
- var f = n.displayName || n.name || "";
80
- return f !== "" ? s + "(" + f + ")" : s;
75
+ function it(e, r, a) {
76
+ var c = e.displayName;
77
+ if (c)
78
+ return c;
79
+ var _ = r.displayName || r.name || "";
80
+ return _ !== "" ? a + "(" + _ + ")" : a;
81
81
  }
82
82
  function dt(e) {
83
83
  return e.displayName || "Context";
84
84
  }
85
- function x(e) {
85
+ function L(e) {
86
86
  if (e == null)
87
87
  return null;
88
88
  if (typeof e.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -90,36 +90,36 @@ function ri() {
90
90
  if (typeof e == "string")
91
91
  return e;
92
92
  switch (e) {
93
- case r:
93
+ case o:
94
94
  return "Fragment";
95
95
  case i:
96
96
  return "Portal";
97
- case u:
97
+ case l:
98
98
  return "Profiler";
99
- case a:
99
+ case s:
100
100
  return "StrictMode";
101
- case E:
101
+ case v:
102
102
  return "Suspense";
103
- case b:
103
+ case g:
104
104
  return "SuspenseList";
105
105
  }
106
106
  if (typeof e == "object")
107
107
  switch (e.$$typeof) {
108
+ case u:
109
+ var r = e;
110
+ return dt(r) + ".Consumer";
108
111
  case d:
109
- var n = e;
110
- return dt(n) + ".Consumer";
112
+ var a = e;
113
+ return dt(a._context) + ".Provider";
111
114
  case p:
112
- var s = e;
113
- return dt(s._context) + ".Provider";
114
- case m:
115
- return Qt(e, e.render, "ForwardRef");
116
- case S:
117
- var h = e.displayName || null;
118
- return h !== null ? h : x(e.type) || "Memo";
119
- case M: {
120
- var f = e, _ = f._payload, c = f._init;
115
+ return it(e, e.render, "ForwardRef");
116
+ case C:
117
+ var c = e.displayName || null;
118
+ return c !== null ? c : L(e.type) || "Memo";
119
+ case P: {
120
+ var _ = e, y = _._payload, m = _._init;
121
121
  try {
122
- return x(c(_));
122
+ return L(m(y));
123
123
  } catch {
124
124
  return null;
125
125
  }
@@ -127,18 +127,18 @@ function ri() {
127
127
  }
128
128
  return null;
129
129
  }
130
- var N = Object.assign, X = 0, pt, ft, mt, _t, yt, gt, bt;
131
- function vt() {
130
+ var V = Object.assign, G = 0, St, Tt, Ct, Pt, Rt, Ot, Dt;
131
+ function Mt() {
132
132
  }
133
- vt.__reactDisabledLog = !0;
134
- function te() {
133
+ Mt.__reactDisabledLog = !0;
134
+ function oe() {
135
135
  {
136
- if (X === 0) {
137
- pt = console.log, ft = console.info, mt = console.warn, _t = console.error, yt = console.group, gt = console.groupCollapsed, bt = console.groupEnd;
136
+ if (G === 0) {
137
+ St = console.log, Tt = console.info, Ct = console.warn, Pt = console.error, Rt = console.group, Ot = console.groupCollapsed, Dt = console.groupEnd;
138
138
  var e = {
139
139
  configurable: !0,
140
140
  enumerable: !0,
141
- value: vt,
141
+ value: Mt,
142
142
  writable: !0
143
143
  };
144
144
  Object.defineProperties(console, {
@@ -151,336 +151,336 @@ function ri() {
151
151
  groupEnd: e
152
152
  });
153
153
  }
154
- X++;
154
+ G++;
155
155
  }
156
156
  }
157
- function ee() {
157
+ function ne() {
158
158
  {
159
- if (X--, X === 0) {
159
+ if (G--, G === 0) {
160
160
  var e = {
161
161
  configurable: !0,
162
162
  enumerable: !0,
163
163
  writable: !0
164
164
  };
165
165
  Object.defineProperties(console, {
166
- log: N({}, e, {
167
- value: pt
166
+ log: V({}, e, {
167
+ value: St
168
168
  }),
169
- info: N({}, e, {
170
- value: ft
169
+ info: V({}, e, {
170
+ value: Tt
171
171
  }),
172
- warn: N({}, e, {
173
- value: mt
172
+ warn: V({}, e, {
173
+ value: Ct
174
174
  }),
175
- error: N({}, e, {
176
- value: _t
175
+ error: V({}, e, {
176
+ value: Pt
177
177
  }),
178
- group: N({}, e, {
179
- value: yt
178
+ group: V({}, e, {
179
+ value: Rt
180
180
  }),
181
- groupCollapsed: N({}, e, {
182
- value: gt
181
+ groupCollapsed: V({}, e, {
182
+ value: Ot
183
183
  }),
184
- groupEnd: N({}, e, {
185
- value: bt
184
+ groupEnd: V({}, e, {
185
+ value: Dt
186
186
  })
187
187
  });
188
188
  }
189
- X < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
+ G < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
190
190
  }
191
191
  }
192
- var it = L.ReactCurrentDispatcher, ot;
193
- function q(e, n, s) {
192
+ var pt = k.ReactCurrentDispatcher, ft;
193
+ function ot(e, r, a) {
194
194
  {
195
- if (ot === void 0)
195
+ if (ft === void 0)
196
196
  try {
197
197
  throw Error();
198
- } catch (f) {
199
- var h = f.stack.trim().match(/\n( *(at )?)/);
200
- ot = h && h[1] || "";
198
+ } catch (_) {
199
+ var c = _.stack.trim().match(/\n( *(at )?)/);
200
+ ft = c && c[1] || "";
201
201
  }
202
202
  return `
203
- ` + ot + e;
203
+ ` + ft + e;
204
204
  }
205
205
  }
206
- var nt = !1, J;
206
+ var mt = !1, nt;
207
207
  {
208
- var ie = typeof WeakMap == "function" ? WeakMap : Map;
209
- J = new ie();
208
+ var re = typeof WeakMap == "function" ? WeakMap : Map;
209
+ nt = new re();
210
210
  }
211
- function Et(e, n) {
212
- if (!e || nt)
211
+ function xt(e, r) {
212
+ if (!e || mt)
213
213
  return "";
214
214
  {
215
- var s = J.get(e);
216
- if (s !== void 0)
217
- return s;
215
+ var a = nt.get(e);
216
+ if (a !== void 0)
217
+ return a;
218
218
  }
219
- var h;
220
- nt = !0;
221
- var f = Error.prepareStackTrace;
219
+ var c;
220
+ mt = !0;
221
+ var _ = Error.prepareStackTrace;
222
222
  Error.prepareStackTrace = void 0;
223
- var _;
224
- _ = it.current, it.current = null, te();
223
+ var y;
224
+ y = pt.current, pt.current = null, oe();
225
225
  try {
226
- if (n) {
227
- var c = function() {
226
+ if (r) {
227
+ var m = function() {
228
228
  throw Error();
229
229
  };
230
- if (Object.defineProperty(c.prototype, "props", {
230
+ if (Object.defineProperty(m.prototype, "props", {
231
231
  set: function() {
232
232
  throw Error();
233
233
  }
234
234
  }), typeof Reflect == "object" && Reflect.construct) {
235
235
  try {
236
- Reflect.construct(c, []);
237
- } catch (P) {
238
- h = P;
236
+ Reflect.construct(m, []);
237
+ } catch (D) {
238
+ c = D;
239
239
  }
240
- Reflect.construct(e, [], c);
240
+ Reflect.construct(e, [], m);
241
241
  } else {
242
242
  try {
243
- c.call();
244
- } catch (P) {
245
- h = P;
243
+ m.call();
244
+ } catch (D) {
245
+ c = D;
246
246
  }
247
- e.call(c.prototype);
247
+ e.call(m.prototype);
248
248
  }
249
249
  } else {
250
250
  try {
251
251
  throw Error();
252
- } catch (P) {
253
- h = P;
252
+ } catch (D) {
253
+ c = D;
254
254
  }
255
255
  e();
256
256
  }
257
- } catch (P) {
258
- if (P && h && typeof P.stack == "string") {
259
- for (var l = P.stack.split(`
260
- `), T = h.stack.split(`
261
- `), g = l.length - 1, v = T.length - 1; g >= 1 && v >= 0 && l[g] !== T[v]; )
262
- v--;
263
- for (; g >= 1 && v >= 0; g--, v--)
264
- if (l[g] !== T[v]) {
265
- if (g !== 1 || v !== 1)
257
+ } catch (D) {
258
+ if (D && c && typeof D.stack == "string") {
259
+ for (var f = D.stack.split(`
260
+ `), R = c.stack.split(`
261
+ `), b = f.length - 1, E = R.length - 1; b >= 1 && E >= 0 && f[b] !== R[E]; )
262
+ E--;
263
+ for (; b >= 1 && E >= 0; b--, E--)
264
+ if (f[b] !== R[E]) {
265
+ if (b !== 1 || E !== 1)
266
266
  do
267
- if (g--, v--, v < 0 || l[g] !== T[v]) {
268
- var C = `
269
- ` + l[g].replace(" at new ", " at ");
270
- return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, C), C;
267
+ if (b--, E--, E < 0 || f[b] !== R[E]) {
268
+ var j = `
269
+ ` + f[b].replace(" at new ", " at ");
270
+ return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && nt.set(e, j), j;
271
271
  }
272
- while (g >= 1 && v >= 0);
272
+ while (b >= 1 && E >= 0);
273
273
  break;
274
274
  }
275
275
  }
276
276
  } finally {
277
- nt = !1, it.current = _, ee(), Error.prepareStackTrace = f;
277
+ mt = !1, pt.current = y, ne(), Error.prepareStackTrace = _;
278
278
  }
279
- var K = e ? e.displayName || e.name : "", I = K ? q(K) : "";
280
- return typeof e == "function" && J.set(e, I), I;
279
+ var Q = e ? e.displayName || e.name : "", W = Q ? ot(Q) : "";
280
+ return typeof e == "function" && nt.set(e, W), W;
281
281
  }
282
- function oe(e, n, s) {
283
- return Et(e, !1);
282
+ function se(e, r, a) {
283
+ return xt(e, !1);
284
284
  }
285
- function ne(e) {
286
- var n = e.prototype;
287
- return !!(n && n.isReactComponent);
285
+ function ae(e) {
286
+ var r = e.prototype;
287
+ return !!(r && r.isReactComponent);
288
288
  }
289
- function Q(e, n, s) {
289
+ function rt(e, r, a) {
290
290
  if (e == null)
291
291
  return "";
292
292
  if (typeof e == "function")
293
- return Et(e, ne(e));
293
+ return xt(e, ae(e));
294
294
  if (typeof e == "string")
295
- return q(e);
295
+ return ot(e);
296
296
  switch (e) {
297
- case E:
298
- return q("Suspense");
299
- case b:
300
- return q("SuspenseList");
297
+ case v:
298
+ return ot("Suspense");
299
+ case g:
300
+ return ot("SuspenseList");
301
301
  }
302
302
  if (typeof e == "object")
303
303
  switch (e.$$typeof) {
304
- case m:
305
- return oe(e.render);
306
- case S:
307
- return Q(e.type, n, s);
308
- case M: {
309
- var h = e, f = h._payload, _ = h._init;
304
+ case p:
305
+ return se(e.render);
306
+ case C:
307
+ return rt(e.type, r, a);
308
+ case P: {
309
+ var c = e, _ = c._payload, y = c._init;
310
310
  try {
311
- return Q(_(f), n, s);
311
+ return rt(y(_), r, a);
312
312
  } catch {
313
313
  }
314
314
  }
315
315
  }
316
316
  return "";
317
317
  }
318
- var V = Object.prototype.hasOwnProperty, wt = {}, Tt = L.ReactDebugCurrentFrame;
319
- function tt(e) {
318
+ var tt = Object.prototype.hasOwnProperty, jt = {}, Lt = k.ReactDebugCurrentFrame;
319
+ function st(e) {
320
320
  if (e) {
321
- var n = e._owner, s = Q(e.type, e._source, n ? n.type : null);
322
- Tt.setExtraStackFrame(s);
321
+ var r = e._owner, a = rt(e.type, e._source, r ? r.type : null);
322
+ Lt.setExtraStackFrame(a);
323
323
  } else
324
- Tt.setExtraStackFrame(null);
324
+ Lt.setExtraStackFrame(null);
325
325
  }
326
- function re(e, n, s, h, f) {
326
+ function he(e, r, a, c, _) {
327
327
  {
328
- var _ = Function.call.bind(V);
329
- for (var c in e)
330
- if (_(e, c)) {
331
- var l = void 0;
328
+ var y = Function.call.bind(tt);
329
+ for (var m in e)
330
+ if (y(e, m)) {
331
+ var f = void 0;
332
332
  try {
333
- if (typeof e[c] != "function") {
334
- var T = Error((h || "React class") + ": " + s + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
335
- throw T.name = "Invariant Violation", T;
333
+ if (typeof e[m] != "function") {
334
+ var R = Error((c || "React class") + ": " + a + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
335
+ throw R.name = "Invariant Violation", R;
336
336
  }
337
- l = e[c](n, c, h, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
338
- } catch (g) {
339
- l = g;
337
+ f = e[m](r, m, c, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
338
+ } catch (b) {
339
+ f = b;
340
340
  }
341
- l && !(l instanceof Error) && (tt(f), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", s, c, typeof l), tt(null)), l instanceof Error && !(l.message in wt) && (wt[l.message] = !0, tt(f), w("Failed %s type: %s", s, l.message), tt(null));
341
+ f && !(f instanceof Error) && (st(_), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", a, m, typeof f), st(null)), f instanceof Error && !(f.message in jt) && (jt[f.message] = !0, st(_), w("Failed %s type: %s", a, f.message), st(null));
342
342
  }
343
343
  }
344
344
  }
345
- var se = Array.isArray;
346
- function rt(e) {
347
- return se(e);
345
+ var le = Array.isArray;
346
+ function _t(e) {
347
+ return le(e);
348
348
  }
349
- function ae(e) {
349
+ function ce(e) {
350
350
  {
351
- var n = typeof Symbol == "function" && Symbol.toStringTag, s = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
352
- return s;
351
+ var r = typeof Symbol == "function" && Symbol.toStringTag, a = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
352
+ return a;
353
353
  }
354
354
  }
355
- function he(e) {
355
+ function ue(e) {
356
356
  try {
357
- return Pt(e), !1;
357
+ return kt(e), !1;
358
358
  } catch {
359
359
  return !0;
360
360
  }
361
361
  }
362
- function Pt(e) {
362
+ function kt(e) {
363
363
  return "" + e;
364
364
  }
365
- function St(e) {
366
- if (he(e))
367
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ae(e)), Pt(e);
365
+ function At(e) {
366
+ if (ue(e))
367
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ce(e)), kt(e);
368
368
  }
369
- var G = L.ReactCurrentOwner, le = {
369
+ var et = k.ReactCurrentOwner, de = {
370
370
  key: !0,
371
371
  ref: !0,
372
372
  __self: !0,
373
373
  __source: !0
374
- }, Rt, Dt, st;
375
- st = {};
376
- function ce(e) {
377
- if (V.call(e, "ref")) {
378
- var n = Object.getOwnPropertyDescriptor(e, "ref").get;
379
- if (n && n.isReactWarning)
374
+ }, It, Nt, yt;
375
+ yt = {};
376
+ function pe(e) {
377
+ if (tt.call(e, "ref")) {
378
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
379
+ if (r && r.isReactWarning)
380
380
  return !1;
381
381
  }
382
382
  return e.ref !== void 0;
383
383
  }
384
- function ue(e) {
385
- if (V.call(e, "key")) {
386
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
387
- if (n && n.isReactWarning)
384
+ function fe(e) {
385
+ if (tt.call(e, "key")) {
386
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
387
+ if (r && r.isReactWarning)
388
388
  return !1;
389
389
  }
390
390
  return e.key !== void 0;
391
391
  }
392
- function de(e, n) {
393
- if (typeof e.ref == "string" && G.current && n && G.current.stateNode !== n) {
394
- var s = x(G.current.type);
395
- st[s] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(G.current.type), e.ref), st[s] = !0);
392
+ function me(e, r) {
393
+ if (typeof e.ref == "string" && et.current && r && et.current.stateNode !== r) {
394
+ var a = L(et.current.type);
395
+ yt[a] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(et.current.type), e.ref), yt[a] = !0);
396
396
  }
397
397
  }
398
- function pe(e, n) {
398
+ function _e(e, r) {
399
399
  {
400
- var s = function() {
401
- Rt || (Rt = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
400
+ var a = function() {
401
+ It || (It = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
402
402
  };
403
- s.isReactWarning = !0, Object.defineProperty(e, "key", {
404
- get: s,
403
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
404
+ get: a,
405
405
  configurable: !0
406
406
  });
407
407
  }
408
408
  }
409
- function fe(e, n) {
409
+ function ye(e, r) {
410
410
  {
411
- var s = function() {
412
- Dt || (Dt = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
411
+ var a = function() {
412
+ Nt || (Nt = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
413
413
  };
414
- s.isReactWarning = !0, Object.defineProperty(e, "ref", {
415
- get: s,
414
+ a.isReactWarning = !0, Object.defineProperty(e, "ref", {
415
+ get: a,
416
416
  configurable: !0
417
417
  });
418
418
  }
419
419
  }
420
- var me = function(e, n, s, h, f, _, c) {
421
- var l = {
420
+ var ge = function(e, r, a, c, _, y, m) {
421
+ var f = {
422
422
  // This tag allows us to uniquely identify this as a React Element
423
423
  $$typeof: t,
424
424
  // Built-in properties that belong on the element
425
425
  type: e,
426
- key: n,
427
- ref: s,
428
- props: c,
426
+ key: r,
427
+ ref: a,
428
+ props: m,
429
429
  // Record the component responsible for creating this element.
430
- _owner: _
430
+ _owner: y
431
431
  };
432
- return l._store = {}, Object.defineProperty(l._store, "validated", {
432
+ return f._store = {}, Object.defineProperty(f._store, "validated", {
433
433
  configurable: !1,
434
434
  enumerable: !1,
435
435
  writable: !0,
436
436
  value: !1
437
- }), Object.defineProperty(l, "_self", {
437
+ }), Object.defineProperty(f, "_self", {
438
438
  configurable: !1,
439
439
  enumerable: !1,
440
440
  writable: !1,
441
- value: h
442
- }), Object.defineProperty(l, "_source", {
441
+ value: c
442
+ }), Object.defineProperty(f, "_source", {
443
443
  configurable: !1,
444
444
  enumerable: !1,
445
445
  writable: !1,
446
- value: f
447
- }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
446
+ value: _
447
+ }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
448
448
  };
449
- function _e(e, n, s, h, f) {
449
+ function be(e, r, a, c, _) {
450
450
  {
451
- var _, c = {}, l = null, T = null;
452
- s !== void 0 && (St(s), l = "" + s), ue(n) && (St(n.key), l = "" + n.key), ce(n) && (T = n.ref, de(n, f));
453
- for (_ in n)
454
- V.call(n, _) && !le.hasOwnProperty(_) && (c[_] = n[_]);
451
+ var y, m = {}, f = null, R = null;
452
+ a !== void 0 && (At(a), f = "" + a), fe(r) && (At(r.key), f = "" + r.key), pe(r) && (R = r.ref, me(r, _));
453
+ for (y in r)
454
+ tt.call(r, y) && !de.hasOwnProperty(y) && (m[y] = r[y]);
455
455
  if (e && e.defaultProps) {
456
- var g = e.defaultProps;
457
- for (_ in g)
458
- c[_] === void 0 && (c[_] = g[_]);
456
+ var b = e.defaultProps;
457
+ for (y in b)
458
+ m[y] === void 0 && (m[y] = b[y]);
459
459
  }
460
- if (l || T) {
461
- var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
462
- l && pe(c, v), T && fe(c, v);
460
+ if (f || R) {
461
+ var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
462
+ f && _e(m, E), R && ye(m, E);
463
463
  }
464
- return me(e, l, T, f, h, G.current, c);
464
+ return ge(e, f, R, _, c, et.current, m);
465
465
  }
466
466
  }
467
- var at = L.ReactCurrentOwner, Mt = L.ReactDebugCurrentFrame;
468
- function W(e) {
467
+ var gt = k.ReactCurrentOwner, zt = k.ReactDebugCurrentFrame;
468
+ function q(e) {
469
469
  if (e) {
470
- var n = e._owner, s = Q(e.type, e._source, n ? n.type : null);
471
- Mt.setExtraStackFrame(s);
470
+ var r = e._owner, a = rt(e.type, e._source, r ? r.type : null);
471
+ zt.setExtraStackFrame(a);
472
472
  } else
473
- Mt.setExtraStackFrame(null);
473
+ zt.setExtraStackFrame(null);
474
474
  }
475
- var ht;
476
- ht = !1;
477
- function lt(e) {
475
+ var bt;
476
+ bt = !1;
477
+ function Et(e) {
478
478
  return typeof e == "object" && e !== null && e.$$typeof === t;
479
479
  }
480
- function Ct() {
480
+ function Ft() {
481
481
  {
482
- if (at.current) {
483
- var e = x(at.current.type);
482
+ if (gt.current) {
483
+ var e = L(gt.current.type);
484
484
  if (e)
485
485
  return `
486
486
 
@@ -489,159 +489,159 @@ Check the render method of \`` + e + "`.";
489
489
  return "";
490
490
  }
491
491
  }
492
- function ye(e) {
492
+ function Ee(e) {
493
493
  return "";
494
494
  }
495
- var Ot = {};
496
- function ge(e) {
495
+ var Yt = {};
496
+ function ve(e) {
497
497
  {
498
- var n = Ct();
499
- if (!n) {
500
- var s = typeof e == "string" ? e : e.displayName || e.name;
501
- s && (n = `
498
+ var r = Ft();
499
+ if (!r) {
500
+ var a = typeof e == "string" ? e : e.displayName || e.name;
501
+ a && (r = `
502
502
 
503
- Check the top-level render call using <` + s + ">.");
503
+ Check the top-level render call using <` + a + ">.");
504
504
  }
505
- return n;
505
+ return r;
506
506
  }
507
507
  }
508
- function xt(e, n) {
508
+ function Ut(e, r) {
509
509
  {
510
510
  if (!e._store || e._store.validated || e.key != null)
511
511
  return;
512
512
  e._store.validated = !0;
513
- var s = ge(n);
514
- if (Ot[s])
513
+ var a = ve(r);
514
+ if (Yt[a])
515
515
  return;
516
- Ot[s] = !0;
517
- var h = "";
518
- e && e._owner && e._owner !== at.current && (h = " It was passed a child from " + x(e._owner.type) + "."), W(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, h), W(null);
516
+ Yt[a] = !0;
517
+ var c = "";
518
+ e && e._owner && e._owner !== gt.current && (c = " It was passed a child from " + L(e._owner.type) + "."), q(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, c), q(null);
519
519
  }
520
520
  }
521
- function jt(e, n) {
521
+ function Zt(e, r) {
522
522
  {
523
523
  if (typeof e != "object")
524
524
  return;
525
- if (rt(e))
526
- for (var s = 0; s < e.length; s++) {
527
- var h = e[s];
528
- lt(h) && xt(h, n);
525
+ if (_t(e))
526
+ for (var a = 0; a < e.length; a++) {
527
+ var c = e[a];
528
+ Et(c) && Ut(c, r);
529
529
  }
530
- else if (lt(e))
530
+ else if (Et(e))
531
531
  e._store && (e._store.validated = !0);
532
532
  else if (e) {
533
- var f = B(e);
534
- if (typeof f == "function" && f !== e.entries)
535
- for (var _ = f.call(e), c; !(c = _.next()).done; )
536
- lt(c.value) && xt(c.value, n);
533
+ var _ = J(e);
534
+ if (typeof _ == "function" && _ !== e.entries)
535
+ for (var y = _.call(e), m; !(m = y.next()).done; )
536
+ Et(m.value) && Ut(m.value, r);
537
537
  }
538
538
  }
539
539
  }
540
- function be(e) {
540
+ function we(e) {
541
541
  {
542
- var n = e.type;
543
- if (n == null || typeof n == "string")
542
+ var r = e.type;
543
+ if (r == null || typeof r == "string")
544
544
  return;
545
- var s;
546
- if (typeof n == "function")
547
- s = n.propTypes;
548
- else if (typeof n == "object" && (n.$$typeof === m || // Note: Memo only checks outer props here.
545
+ var a;
546
+ if (typeof r == "function")
547
+ a = r.propTypes;
548
+ else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
549
549
  // Inner props are checked in the reconciler.
550
- n.$$typeof === S))
551
- s = n.propTypes;
550
+ r.$$typeof === C))
551
+ a = r.propTypes;
552
552
  else
553
553
  return;
554
- if (s) {
555
- var h = x(n);
556
- re(s, e.props, "prop", h, e);
557
- } else if (n.PropTypes !== void 0 && !ht) {
558
- ht = !0;
559
- var f = x(n);
560
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
554
+ if (a) {
555
+ var c = L(r);
556
+ he(a, e.props, "prop", c, e);
557
+ } else if (r.PropTypes !== void 0 && !bt) {
558
+ bt = !0;
559
+ var _ = L(r);
560
+ w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
561
561
  }
562
- typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
562
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
563
563
  }
564
564
  }
565
- function ve(e) {
565
+ function Se(e) {
566
566
  {
567
- for (var n = Object.keys(e.props), s = 0; s < n.length; s++) {
568
- var h = n[s];
569
- if (h !== "children" && h !== "key") {
570
- W(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), W(null);
567
+ for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
568
+ var c = r[a];
569
+ if (c !== "children" && c !== "key") {
570
+ q(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), q(null);
571
571
  break;
572
572
  }
573
573
  }
574
- e.ref !== null && (W(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
574
+ e.ref !== null && (q(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
575
575
  }
576
576
  }
577
- var Lt = {};
578
- function kt(e, n, s, h, f, _) {
577
+ var Vt = {};
578
+ function Wt(e, r, a, c, _, y) {
579
579
  {
580
- var c = Jt(e);
581
- if (!c) {
582
- var l = "";
583
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
584
- var T = ye();
585
- T ? l += T : l += Ct();
586
- var g;
587
- e === null ? g = "null" : rt(e) ? g = "array" : e !== void 0 && e.$$typeof === t ? (g = "<" + (x(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : g = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", g, l);
580
+ var m = N(e);
581
+ if (!m) {
582
+ var f = "";
583
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
584
+ var R = Ee();
585
+ R ? f += R : f += Ft();
586
+ var b;
587
+ e === null ? b = "null" : _t(e) ? b = "array" : e !== void 0 && e.$$typeof === t ? (b = "<" + (L(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, f);
588
588
  }
589
- var v = _e(e, n, s, f, _);
590
- if (v == null)
591
- return v;
592
- if (c) {
593
- var C = n.children;
594
- if (C !== void 0)
595
- if (h)
596
- if (rt(C)) {
597
- for (var K = 0; K < C.length; K++)
598
- jt(C[K], e);
599
- Object.freeze && Object.freeze(C);
589
+ var E = be(e, r, a, _, y);
590
+ if (E == null)
591
+ return E;
592
+ if (m) {
593
+ var j = r.children;
594
+ if (j !== void 0)
595
+ if (c)
596
+ if (_t(j)) {
597
+ for (var Q = 0; Q < j.length; Q++)
598
+ Zt(j[Q], e);
599
+ Object.freeze && Object.freeze(j);
600
600
  } else
601
601
  w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
602
602
  else
603
- jt(C, e);
603
+ Zt(j, e);
604
604
  }
605
- if (V.call(n, "key")) {
606
- var I = x(e), P = Object.keys(n).filter(function(Re) {
607
- return Re !== "key";
608
- }), ct = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
609
- if (!Lt[I + ct]) {
610
- var Se = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
605
+ if (tt.call(r, "key")) {
606
+ var W = L(e), D = Object.keys(r).filter(function(De) {
607
+ return De !== "key";
608
+ }), vt = D.length > 0 ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}";
609
+ if (!Vt[W + vt]) {
610
+ var Oe = D.length > 0 ? "{" + D.join(": ..., ") + ": ...}" : "{}";
611
611
  w(`A props object containing a "key" prop is being spread into JSX:
612
612
  let props = %s;
613
613
  <%s {...props} />
614
614
  React keys must be passed directly to JSX without using spread:
615
615
  let props = %s;
616
- <%s key={someKey} {...props} />`, ct, I, Se, I), Lt[I + ct] = !0;
616
+ <%s key={someKey} {...props} />`, vt, W, Oe, W), Vt[W + vt] = !0;
617
617
  }
618
618
  }
619
- return e === r ? ve(v) : be(v), v;
619
+ return e === o ? Se(E) : we(E), E;
620
620
  }
621
621
  }
622
- function Ee(e, n, s) {
623
- return kt(e, n, s, !0);
622
+ function Te(e, r, a) {
623
+ return Wt(e, r, a, !0);
624
624
  }
625
- function we(e, n, s) {
626
- return kt(e, n, s, !1);
625
+ function Ce(e, r, a) {
626
+ return Wt(e, r, a, !1);
627
627
  }
628
- var Te = we, Pe = Ee;
629
- zt.Fragment = r, zt.jsx = Te, zt.jsxs = Pe;
630
- }()), zt;
628
+ var Pe = Ce, Re = Te;
629
+ Gt.Fragment = o, Gt.jsx = Pe, Gt.jsxs = Re;
630
+ }()), Gt;
631
631
  }
632
- process.env.NODE_ENV === "production" ? Ce.exports = ni() : Ce.exports = ri();
633
- var It = Ce.exports;
632
+ process.env.NODE_ENV === "production" ? je.exports = ai() : je.exports = hi();
633
+ var Kt = je.exports;
634
634
  (function() {
635
635
  try {
636
636
  if (typeof document < "u") {
637
- var o = document.createElement("style");
638
- o.appendChild(document.createTextNode(".gizmo-default{width:100px;height:100px;position:absolute;top:0;right:0;z-index:2;cursor:pointer}")), document.head.appendChild(o);
637
+ var n = document.createElement("style");
638
+ n.appendChild(document.createTextNode(".gizmo-default{width:100px;height:100px;position:absolute;top:0;right:0;z-index:2;cursor:pointer}")), document.head.appendChild(n);
639
639
  }
640
640
  } catch (t) {
641
641
  console.error("vite-plugin-css-injected-by-js", t);
642
642
  }
643
643
  })();
644
- var Oe = { exports: {} }, Nt = {};
644
+ var Le = { exports: {} }, Bt = {};
645
645
  /**
646
646
  * @license React
647
647
  * react-jsx-runtime.production.min.js
@@ -651,21 +651,21 @@ var Oe = { exports: {} }, Nt = {};
651
651
  * This source code is licensed under the MIT license found in the
652
652
  * LICENSE file in the root directory of this source tree.
653
653
  */
654
- var ze;
655
- function si() {
656
- if (ze) return Nt;
657
- ze = 1;
658
- var o = Zt, t = Symbol.for("react.element"), i = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
659
- function p(d, m, E) {
660
- var b, S = {}, M = null, z = null;
661
- E !== void 0 && (M = "" + E), m.key !== void 0 && (M = "" + m.key), m.ref !== void 0 && (z = m.ref);
662
- for (b in m) r.call(m, b) && !u.hasOwnProperty(b) && (S[b] = m[b]);
663
- if (d && d.defaultProps) for (b in m = d.defaultProps, m) S[b] === void 0 && (S[b] = m[b]);
664
- return { $$typeof: t, type: d, key: M, ref: z, props: S, _owner: a.current };
665
- }
666
- return Nt.Fragment = i, Nt.jsx = p, Nt.jsxs = p, Nt;
654
+ var Fe;
655
+ function li() {
656
+ if (Fe) return Bt;
657
+ Fe = 1;
658
+ var n = ie, t = Symbol.for("react.element"), i = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
659
+ function d(u, p, v) {
660
+ var g, C = {}, P = null, I = null;
661
+ v !== void 0 && (P = "" + v), p.key !== void 0 && (P = "" + p.key), p.ref !== void 0 && (I = p.ref);
662
+ for (g in p) o.call(p, g) && !l.hasOwnProperty(g) && (C[g] = p[g]);
663
+ if (u && u.defaultProps) for (g in p = u.defaultProps, p) C[g] === void 0 && (C[g] = p[g]);
664
+ return { $$typeof: t, type: u, key: P, ref: I, props: C, _owner: s.current };
665
+ }
666
+ return Bt.Fragment = i, Bt.jsx = d, Bt.jsxs = d, Bt;
667
667
  }
668
- var Ft = {};
668
+ var Xt = {};
669
669
  /**
670
670
  * @license React
671
671
  * react-jsx-runtime.development.js
@@ -675,54 +675,54 @@ var Ft = {};
675
675
  * This source code is licensed under the MIT license found in the
676
676
  * LICENSE file in the root directory of this source tree.
677
677
  */
678
- var Ne;
679
- function ai() {
680
- return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
681
- var o = Zt, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), d = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), z = Symbol.for("react.offscreen"), Z = Symbol.iterator, et = "@@iterator";
682
- function B(e) {
678
+ var Ye;
679
+ function ci() {
680
+ return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
681
+ var n = ie, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), u = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), Z = Symbol.iterator, U = "@@iterator";
682
+ function J(e) {
683
683
  if (e === null || typeof e != "object")
684
684
  return null;
685
- var n = Z && e[Z] || e[et];
686
- return typeof n == "function" ? n : null;
685
+ var r = Z && e[Z] || e[U];
686
+ return typeof r == "function" ? r : null;
687
687
  }
688
- var L = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
688
+ var k = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
689
689
  function w(e) {
690
690
  {
691
- for (var n = arguments.length, s = new Array(n > 1 ? n - 1 : 0), h = 1; h < n; h++)
692
- s[h - 1] = arguments[h];
693
- Xt("error", e, s);
691
+ for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
692
+ a[c - 1] = arguments[c];
693
+ ht("error", e, a);
694
694
  }
695
695
  }
696
- function Xt(e, n, s) {
696
+ function ht(e, r, a) {
697
697
  {
698
- var h = L.ReactDebugCurrentFrame, f = h.getStackAddendum();
699
- f !== "" && (n += "%s", s = s.concat([f]));
700
- var _ = s.map(function(c) {
701
- return String(c);
698
+ var c = k.ReactDebugCurrentFrame, _ = c.getStackAddendum();
699
+ _ !== "" && (r += "%s", a = a.concat([_]));
700
+ var y = a.map(function(m) {
701
+ return String(m);
702
702
  });
703
- _.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, _);
703
+ y.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, y);
704
704
  }
705
705
  }
706
- var Vt = !1, Gt = !1, $t = !1, Bt = !1, qt = !1, ut;
707
- ut = Symbol.for("react.module.reference");
708
- function Jt(e) {
709
- return !!(typeof e == "string" || typeof e == "function" || e === r || e === u || qt || e === a || e === E || e === b || Bt || e === z || Vt || Gt || $t || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === S || e.$$typeof === p || e.$$typeof === d || e.$$typeof === m || // This needs to include all possible module reference object
706
+ var wt = !1, lt = !1, ct = !1, ut = !1, T = !1, O;
707
+ O = Symbol.for("react.module.reference");
708
+ function N(e) {
709
+ return !!(typeof e == "string" || typeof e == "function" || e === o || e === l || T || e === s || e === v || e === g || ut || e === I || wt || lt || ct || typeof e == "object" && e !== null && (e.$$typeof === P || e.$$typeof === C || e.$$typeof === d || e.$$typeof === u || e.$$typeof === p || // This needs to include all possible module reference object
710
710
  // types supported by any Flight configuration anywhere since
711
711
  // we don't know which Flight build this will end up being used
712
712
  // with.
713
- e.$$typeof === ut || e.getModuleId !== void 0));
713
+ e.$$typeof === O || e.getModuleId !== void 0));
714
714
  }
715
- function Qt(e, n, s) {
716
- var h = e.displayName;
717
- if (h)
718
- return h;
719
- var f = n.displayName || n.name || "";
720
- return f !== "" ? s + "(" + f + ")" : s;
715
+ function it(e, r, a) {
716
+ var c = e.displayName;
717
+ if (c)
718
+ return c;
719
+ var _ = r.displayName || r.name || "";
720
+ return _ !== "" ? a + "(" + _ + ")" : a;
721
721
  }
722
722
  function dt(e) {
723
723
  return e.displayName || "Context";
724
724
  }
725
- function x(e) {
725
+ function L(e) {
726
726
  if (e == null)
727
727
  return null;
728
728
  if (typeof e.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -730,36 +730,36 @@ function ai() {
730
730
  if (typeof e == "string")
731
731
  return e;
732
732
  switch (e) {
733
- case r:
733
+ case o:
734
734
  return "Fragment";
735
735
  case i:
736
736
  return "Portal";
737
- case u:
737
+ case l:
738
738
  return "Profiler";
739
- case a:
739
+ case s:
740
740
  return "StrictMode";
741
- case E:
741
+ case v:
742
742
  return "Suspense";
743
- case b:
743
+ case g:
744
744
  return "SuspenseList";
745
745
  }
746
746
  if (typeof e == "object")
747
747
  switch (e.$$typeof) {
748
+ case u:
749
+ var r = e;
750
+ return dt(r) + ".Consumer";
748
751
  case d:
749
- var n = e;
750
- return dt(n) + ".Consumer";
752
+ var a = e;
753
+ return dt(a._context) + ".Provider";
751
754
  case p:
752
- var s = e;
753
- return dt(s._context) + ".Provider";
754
- case m:
755
- return Qt(e, e.render, "ForwardRef");
756
- case S:
757
- var h = e.displayName || null;
758
- return h !== null ? h : x(e.type) || "Memo";
759
- case M: {
760
- var f = e, _ = f._payload, c = f._init;
755
+ return it(e, e.render, "ForwardRef");
756
+ case C:
757
+ var c = e.displayName || null;
758
+ return c !== null ? c : L(e.type) || "Memo";
759
+ case P: {
760
+ var _ = e, y = _._payload, m = _._init;
761
761
  try {
762
- return x(c(_));
762
+ return L(m(y));
763
763
  } catch {
764
764
  return null;
765
765
  }
@@ -767,18 +767,18 @@ function ai() {
767
767
  }
768
768
  return null;
769
769
  }
770
- var N = Object.assign, X = 0, pt, ft, mt, _t, yt, gt, bt;
771
- function vt() {
770
+ var V = Object.assign, G = 0, St, Tt, Ct, Pt, Rt, Ot, Dt;
771
+ function Mt() {
772
772
  }
773
- vt.__reactDisabledLog = !0;
774
- function te() {
773
+ Mt.__reactDisabledLog = !0;
774
+ function oe() {
775
775
  {
776
- if (X === 0) {
777
- pt = console.log, ft = console.info, mt = console.warn, _t = console.error, yt = console.group, gt = console.groupCollapsed, bt = console.groupEnd;
776
+ if (G === 0) {
777
+ St = console.log, Tt = console.info, Ct = console.warn, Pt = console.error, Rt = console.group, Ot = console.groupCollapsed, Dt = console.groupEnd;
778
778
  var e = {
779
779
  configurable: !0,
780
780
  enumerable: !0,
781
- value: vt,
781
+ value: Mt,
782
782
  writable: !0
783
783
  };
784
784
  Object.defineProperties(console, {
@@ -791,336 +791,336 @@ function ai() {
791
791
  groupEnd: e
792
792
  });
793
793
  }
794
- X++;
794
+ G++;
795
795
  }
796
796
  }
797
- function ee() {
797
+ function ne() {
798
798
  {
799
- if (X--, X === 0) {
799
+ if (G--, G === 0) {
800
800
  var e = {
801
801
  configurable: !0,
802
802
  enumerable: !0,
803
803
  writable: !0
804
804
  };
805
805
  Object.defineProperties(console, {
806
- log: N({}, e, {
807
- value: pt
806
+ log: V({}, e, {
807
+ value: St
808
808
  }),
809
- info: N({}, e, {
810
- value: ft
809
+ info: V({}, e, {
810
+ value: Tt
811
811
  }),
812
- warn: N({}, e, {
813
- value: mt
812
+ warn: V({}, e, {
813
+ value: Ct
814
814
  }),
815
- error: N({}, e, {
816
- value: _t
815
+ error: V({}, e, {
816
+ value: Pt
817
817
  }),
818
- group: N({}, e, {
819
- value: yt
818
+ group: V({}, e, {
819
+ value: Rt
820
820
  }),
821
- groupCollapsed: N({}, e, {
822
- value: gt
821
+ groupCollapsed: V({}, e, {
822
+ value: Ot
823
823
  }),
824
- groupEnd: N({}, e, {
825
- value: bt
824
+ groupEnd: V({}, e, {
825
+ value: Dt
826
826
  })
827
827
  });
828
828
  }
829
- X < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
829
+ G < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
830
830
  }
831
831
  }
832
- var it = L.ReactCurrentDispatcher, ot;
833
- function q(e, n, s) {
832
+ var pt = k.ReactCurrentDispatcher, ft;
833
+ function ot(e, r, a) {
834
834
  {
835
- if (ot === void 0)
835
+ if (ft === void 0)
836
836
  try {
837
837
  throw Error();
838
- } catch (f) {
839
- var h = f.stack.trim().match(/\n( *(at )?)/);
840
- ot = h && h[1] || "";
838
+ } catch (_) {
839
+ var c = _.stack.trim().match(/\n( *(at )?)/);
840
+ ft = c && c[1] || "";
841
841
  }
842
842
  return `
843
- ` + ot + e;
843
+ ` + ft + e;
844
844
  }
845
845
  }
846
- var nt = !1, J;
846
+ var mt = !1, nt;
847
847
  {
848
- var ie = typeof WeakMap == "function" ? WeakMap : Map;
849
- J = new ie();
848
+ var re = typeof WeakMap == "function" ? WeakMap : Map;
849
+ nt = new re();
850
850
  }
851
- function Et(e, n) {
852
- if (!e || nt)
851
+ function xt(e, r) {
852
+ if (!e || mt)
853
853
  return "";
854
854
  {
855
- var s = J.get(e);
856
- if (s !== void 0)
857
- return s;
855
+ var a = nt.get(e);
856
+ if (a !== void 0)
857
+ return a;
858
858
  }
859
- var h;
860
- nt = !0;
861
- var f = Error.prepareStackTrace;
859
+ var c;
860
+ mt = !0;
861
+ var _ = Error.prepareStackTrace;
862
862
  Error.prepareStackTrace = void 0;
863
- var _;
864
- _ = it.current, it.current = null, te();
863
+ var y;
864
+ y = pt.current, pt.current = null, oe();
865
865
  try {
866
- if (n) {
867
- var c = function() {
866
+ if (r) {
867
+ var m = function() {
868
868
  throw Error();
869
869
  };
870
- if (Object.defineProperty(c.prototype, "props", {
870
+ if (Object.defineProperty(m.prototype, "props", {
871
871
  set: function() {
872
872
  throw Error();
873
873
  }
874
874
  }), typeof Reflect == "object" && Reflect.construct) {
875
875
  try {
876
- Reflect.construct(c, []);
877
- } catch (P) {
878
- h = P;
876
+ Reflect.construct(m, []);
877
+ } catch (D) {
878
+ c = D;
879
879
  }
880
- Reflect.construct(e, [], c);
880
+ Reflect.construct(e, [], m);
881
881
  } else {
882
882
  try {
883
- c.call();
884
- } catch (P) {
885
- h = P;
883
+ m.call();
884
+ } catch (D) {
885
+ c = D;
886
886
  }
887
- e.call(c.prototype);
887
+ e.call(m.prototype);
888
888
  }
889
889
  } else {
890
890
  try {
891
891
  throw Error();
892
- } catch (P) {
893
- h = P;
892
+ } catch (D) {
893
+ c = D;
894
894
  }
895
895
  e();
896
896
  }
897
- } catch (P) {
898
- if (P && h && typeof P.stack == "string") {
899
- for (var l = P.stack.split(`
900
- `), T = h.stack.split(`
901
- `), g = l.length - 1, v = T.length - 1; g >= 1 && v >= 0 && l[g] !== T[v]; )
902
- v--;
903
- for (; g >= 1 && v >= 0; g--, v--)
904
- if (l[g] !== T[v]) {
905
- if (g !== 1 || v !== 1)
897
+ } catch (D) {
898
+ if (D && c && typeof D.stack == "string") {
899
+ for (var f = D.stack.split(`
900
+ `), R = c.stack.split(`
901
+ `), b = f.length - 1, E = R.length - 1; b >= 1 && E >= 0 && f[b] !== R[E]; )
902
+ E--;
903
+ for (; b >= 1 && E >= 0; b--, E--)
904
+ if (f[b] !== R[E]) {
905
+ if (b !== 1 || E !== 1)
906
906
  do
907
- if (g--, v--, v < 0 || l[g] !== T[v]) {
908
- var C = `
909
- ` + l[g].replace(" at new ", " at ");
910
- return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, C), C;
907
+ if (b--, E--, E < 0 || f[b] !== R[E]) {
908
+ var j = `
909
+ ` + f[b].replace(" at new ", " at ");
910
+ return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && nt.set(e, j), j;
911
911
  }
912
- while (g >= 1 && v >= 0);
912
+ while (b >= 1 && E >= 0);
913
913
  break;
914
914
  }
915
915
  }
916
916
  } finally {
917
- nt = !1, it.current = _, ee(), Error.prepareStackTrace = f;
917
+ mt = !1, pt.current = y, ne(), Error.prepareStackTrace = _;
918
918
  }
919
- var K = e ? e.displayName || e.name : "", I = K ? q(K) : "";
920
- return typeof e == "function" && J.set(e, I), I;
919
+ var Q = e ? e.displayName || e.name : "", W = Q ? ot(Q) : "";
920
+ return typeof e == "function" && nt.set(e, W), W;
921
921
  }
922
- function oe(e, n, s) {
923
- return Et(e, !1);
922
+ function se(e, r, a) {
923
+ return xt(e, !1);
924
924
  }
925
- function ne(e) {
926
- var n = e.prototype;
927
- return !!(n && n.isReactComponent);
925
+ function ae(e) {
926
+ var r = e.prototype;
927
+ return !!(r && r.isReactComponent);
928
928
  }
929
- function Q(e, n, s) {
929
+ function rt(e, r, a) {
930
930
  if (e == null)
931
931
  return "";
932
932
  if (typeof e == "function")
933
- return Et(e, ne(e));
933
+ return xt(e, ae(e));
934
934
  if (typeof e == "string")
935
- return q(e);
935
+ return ot(e);
936
936
  switch (e) {
937
- case E:
938
- return q("Suspense");
939
- case b:
940
- return q("SuspenseList");
937
+ case v:
938
+ return ot("Suspense");
939
+ case g:
940
+ return ot("SuspenseList");
941
941
  }
942
942
  if (typeof e == "object")
943
943
  switch (e.$$typeof) {
944
- case m:
945
- return oe(e.render);
946
- case S:
947
- return Q(e.type, n, s);
948
- case M: {
949
- var h = e, f = h._payload, _ = h._init;
944
+ case p:
945
+ return se(e.render);
946
+ case C:
947
+ return rt(e.type, r, a);
948
+ case P: {
949
+ var c = e, _ = c._payload, y = c._init;
950
950
  try {
951
- return Q(_(f), n, s);
951
+ return rt(y(_), r, a);
952
952
  } catch {
953
953
  }
954
954
  }
955
955
  }
956
956
  return "";
957
957
  }
958
- var V = Object.prototype.hasOwnProperty, wt = {}, Tt = L.ReactDebugCurrentFrame;
959
- function tt(e) {
958
+ var tt = Object.prototype.hasOwnProperty, jt = {}, Lt = k.ReactDebugCurrentFrame;
959
+ function st(e) {
960
960
  if (e) {
961
- var n = e._owner, s = Q(e.type, e._source, n ? n.type : null);
962
- Tt.setExtraStackFrame(s);
961
+ var r = e._owner, a = rt(e.type, e._source, r ? r.type : null);
962
+ Lt.setExtraStackFrame(a);
963
963
  } else
964
- Tt.setExtraStackFrame(null);
964
+ Lt.setExtraStackFrame(null);
965
965
  }
966
- function re(e, n, s, h, f) {
966
+ function he(e, r, a, c, _) {
967
967
  {
968
- var _ = Function.call.bind(V);
969
- for (var c in e)
970
- if (_(e, c)) {
971
- var l = void 0;
968
+ var y = Function.call.bind(tt);
969
+ for (var m in e)
970
+ if (y(e, m)) {
971
+ var f = void 0;
972
972
  try {
973
- if (typeof e[c] != "function") {
974
- var T = Error((h || "React class") + ": " + s + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
975
- throw T.name = "Invariant Violation", T;
973
+ if (typeof e[m] != "function") {
974
+ var R = Error((c || "React class") + ": " + a + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
975
+ throw R.name = "Invariant Violation", R;
976
976
  }
977
- l = e[c](n, c, h, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
978
- } catch (g) {
979
- l = g;
977
+ f = e[m](r, m, c, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
978
+ } catch (b) {
979
+ f = b;
980
980
  }
981
- l && !(l instanceof Error) && (tt(f), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", s, c, typeof l), tt(null)), l instanceof Error && !(l.message in wt) && (wt[l.message] = !0, tt(f), w("Failed %s type: %s", s, l.message), tt(null));
981
+ f && !(f instanceof Error) && (st(_), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", a, m, typeof f), st(null)), f instanceof Error && !(f.message in jt) && (jt[f.message] = !0, st(_), w("Failed %s type: %s", a, f.message), st(null));
982
982
  }
983
983
  }
984
984
  }
985
- var se = Array.isArray;
986
- function rt(e) {
987
- return se(e);
985
+ var le = Array.isArray;
986
+ function _t(e) {
987
+ return le(e);
988
988
  }
989
- function ae(e) {
989
+ function ce(e) {
990
990
  {
991
- var n = typeof Symbol == "function" && Symbol.toStringTag, s = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
992
- return s;
991
+ var r = typeof Symbol == "function" && Symbol.toStringTag, a = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
992
+ return a;
993
993
  }
994
994
  }
995
- function he(e) {
995
+ function ue(e) {
996
996
  try {
997
- return Pt(e), !1;
997
+ return kt(e), !1;
998
998
  } catch {
999
999
  return !0;
1000
1000
  }
1001
1001
  }
1002
- function Pt(e) {
1002
+ function kt(e) {
1003
1003
  return "" + e;
1004
1004
  }
1005
- function St(e) {
1006
- if (he(e))
1007
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ae(e)), Pt(e);
1005
+ function At(e) {
1006
+ if (ue(e))
1007
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ce(e)), kt(e);
1008
1008
  }
1009
- var G = L.ReactCurrentOwner, le = {
1009
+ var et = k.ReactCurrentOwner, de = {
1010
1010
  key: !0,
1011
1011
  ref: !0,
1012
1012
  __self: !0,
1013
1013
  __source: !0
1014
- }, Rt, Dt, st;
1015
- st = {};
1016
- function ce(e) {
1017
- if (V.call(e, "ref")) {
1018
- var n = Object.getOwnPropertyDescriptor(e, "ref").get;
1019
- if (n && n.isReactWarning)
1014
+ }, It, Nt, yt;
1015
+ yt = {};
1016
+ function pe(e) {
1017
+ if (tt.call(e, "ref")) {
1018
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
1019
+ if (r && r.isReactWarning)
1020
1020
  return !1;
1021
1021
  }
1022
1022
  return e.ref !== void 0;
1023
1023
  }
1024
- function ue(e) {
1025
- if (V.call(e, "key")) {
1026
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
1027
- if (n && n.isReactWarning)
1024
+ function fe(e) {
1025
+ if (tt.call(e, "key")) {
1026
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
1027
+ if (r && r.isReactWarning)
1028
1028
  return !1;
1029
1029
  }
1030
1030
  return e.key !== void 0;
1031
1031
  }
1032
- function de(e, n) {
1033
- if (typeof e.ref == "string" && G.current && n && G.current.stateNode !== n) {
1034
- var s = x(G.current.type);
1035
- st[s] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(G.current.type), e.ref), st[s] = !0);
1032
+ function me(e, r) {
1033
+ if (typeof e.ref == "string" && et.current && r && et.current.stateNode !== r) {
1034
+ var a = L(et.current.type);
1035
+ yt[a] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(et.current.type), e.ref), yt[a] = !0);
1036
1036
  }
1037
1037
  }
1038
- function pe(e, n) {
1038
+ function _e(e, r) {
1039
1039
  {
1040
- var s = function() {
1041
- Rt || (Rt = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
1040
+ var a = function() {
1041
+ It || (It = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
1042
1042
  };
1043
- s.isReactWarning = !0, Object.defineProperty(e, "key", {
1044
- get: s,
1043
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
1044
+ get: a,
1045
1045
  configurable: !0
1046
1046
  });
1047
1047
  }
1048
1048
  }
1049
- function fe(e, n) {
1049
+ function ye(e, r) {
1050
1050
  {
1051
- var s = function() {
1052
- Dt || (Dt = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
1051
+ var a = function() {
1052
+ Nt || (Nt = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
1053
1053
  };
1054
- s.isReactWarning = !0, Object.defineProperty(e, "ref", {
1055
- get: s,
1054
+ a.isReactWarning = !0, Object.defineProperty(e, "ref", {
1055
+ get: a,
1056
1056
  configurable: !0
1057
1057
  });
1058
1058
  }
1059
1059
  }
1060
- var me = function(e, n, s, h, f, _, c) {
1061
- var l = {
1060
+ var ge = function(e, r, a, c, _, y, m) {
1061
+ var f = {
1062
1062
  // This tag allows us to uniquely identify this as a React Element
1063
1063
  $$typeof: t,
1064
1064
  // Built-in properties that belong on the element
1065
1065
  type: e,
1066
- key: n,
1067
- ref: s,
1068
- props: c,
1066
+ key: r,
1067
+ ref: a,
1068
+ props: m,
1069
1069
  // Record the component responsible for creating this element.
1070
- _owner: _
1070
+ _owner: y
1071
1071
  };
1072
- return l._store = {}, Object.defineProperty(l._store, "validated", {
1072
+ return f._store = {}, Object.defineProperty(f._store, "validated", {
1073
1073
  configurable: !1,
1074
1074
  enumerable: !1,
1075
1075
  writable: !0,
1076
1076
  value: !1
1077
- }), Object.defineProperty(l, "_self", {
1077
+ }), Object.defineProperty(f, "_self", {
1078
1078
  configurable: !1,
1079
1079
  enumerable: !1,
1080
1080
  writable: !1,
1081
- value: h
1082
- }), Object.defineProperty(l, "_source", {
1081
+ value: c
1082
+ }), Object.defineProperty(f, "_source", {
1083
1083
  configurable: !1,
1084
1084
  enumerable: !1,
1085
1085
  writable: !1,
1086
- value: f
1087
- }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
1086
+ value: _
1087
+ }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
1088
1088
  };
1089
- function _e(e, n, s, h, f) {
1089
+ function be(e, r, a, c, _) {
1090
1090
  {
1091
- var _, c = {}, l = null, T = null;
1092
- s !== void 0 && (St(s), l = "" + s), ue(n) && (St(n.key), l = "" + n.key), ce(n) && (T = n.ref, de(n, f));
1093
- for (_ in n)
1094
- V.call(n, _) && !le.hasOwnProperty(_) && (c[_] = n[_]);
1091
+ var y, m = {}, f = null, R = null;
1092
+ a !== void 0 && (At(a), f = "" + a), fe(r) && (At(r.key), f = "" + r.key), pe(r) && (R = r.ref, me(r, _));
1093
+ for (y in r)
1094
+ tt.call(r, y) && !de.hasOwnProperty(y) && (m[y] = r[y]);
1095
1095
  if (e && e.defaultProps) {
1096
- var g = e.defaultProps;
1097
- for (_ in g)
1098
- c[_] === void 0 && (c[_] = g[_]);
1096
+ var b = e.defaultProps;
1097
+ for (y in b)
1098
+ m[y] === void 0 && (m[y] = b[y]);
1099
1099
  }
1100
- if (l || T) {
1101
- var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
1102
- l && pe(c, v), T && fe(c, v);
1100
+ if (f || R) {
1101
+ var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
1102
+ f && _e(m, E), R && ye(m, E);
1103
1103
  }
1104
- return me(e, l, T, f, h, G.current, c);
1104
+ return ge(e, f, R, _, c, et.current, m);
1105
1105
  }
1106
1106
  }
1107
- var at = L.ReactCurrentOwner, Mt = L.ReactDebugCurrentFrame;
1108
- function W(e) {
1107
+ var gt = k.ReactCurrentOwner, zt = k.ReactDebugCurrentFrame;
1108
+ function q(e) {
1109
1109
  if (e) {
1110
- var n = e._owner, s = Q(e.type, e._source, n ? n.type : null);
1111
- Mt.setExtraStackFrame(s);
1110
+ var r = e._owner, a = rt(e.type, e._source, r ? r.type : null);
1111
+ zt.setExtraStackFrame(a);
1112
1112
  } else
1113
- Mt.setExtraStackFrame(null);
1113
+ zt.setExtraStackFrame(null);
1114
1114
  }
1115
- var ht;
1116
- ht = !1;
1117
- function lt(e) {
1115
+ var bt;
1116
+ bt = !1;
1117
+ function Et(e) {
1118
1118
  return typeof e == "object" && e !== null && e.$$typeof === t;
1119
1119
  }
1120
- function Ct() {
1120
+ function Ft() {
1121
1121
  {
1122
- if (at.current) {
1123
- var e = x(at.current.type);
1122
+ if (gt.current) {
1123
+ var e = L(gt.current.type);
1124
1124
  if (e)
1125
1125
  return `
1126
1126
 
@@ -1129,168 +1129,171 @@ Check the render method of \`` + e + "`.";
1129
1129
  return "";
1130
1130
  }
1131
1131
  }
1132
- function ye(e) {
1132
+ function Ee(e) {
1133
1133
  return "";
1134
1134
  }
1135
- var Ot = {};
1136
- function ge(e) {
1135
+ var Yt = {};
1136
+ function ve(e) {
1137
1137
  {
1138
- var n = Ct();
1139
- if (!n) {
1140
- var s = typeof e == "string" ? e : e.displayName || e.name;
1141
- s && (n = `
1138
+ var r = Ft();
1139
+ if (!r) {
1140
+ var a = typeof e == "string" ? e : e.displayName || e.name;
1141
+ a && (r = `
1142
1142
 
1143
- Check the top-level render call using <` + s + ">.");
1143
+ Check the top-level render call using <` + a + ">.");
1144
1144
  }
1145
- return n;
1145
+ return r;
1146
1146
  }
1147
1147
  }
1148
- function xt(e, n) {
1148
+ function Ut(e, r) {
1149
1149
  {
1150
1150
  if (!e._store || e._store.validated || e.key != null)
1151
1151
  return;
1152
1152
  e._store.validated = !0;
1153
- var s = ge(n);
1154
- if (Ot[s])
1153
+ var a = ve(r);
1154
+ if (Yt[a])
1155
1155
  return;
1156
- Ot[s] = !0;
1157
- var h = "";
1158
- e && e._owner && e._owner !== at.current && (h = " It was passed a child from " + x(e._owner.type) + "."), W(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, h), W(null);
1156
+ Yt[a] = !0;
1157
+ var c = "";
1158
+ e && e._owner && e._owner !== gt.current && (c = " It was passed a child from " + L(e._owner.type) + "."), q(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, c), q(null);
1159
1159
  }
1160
1160
  }
1161
- function jt(e, n) {
1161
+ function Zt(e, r) {
1162
1162
  {
1163
1163
  if (typeof e != "object")
1164
1164
  return;
1165
- if (rt(e))
1166
- for (var s = 0; s < e.length; s++) {
1167
- var h = e[s];
1168
- lt(h) && xt(h, n);
1165
+ if (_t(e))
1166
+ for (var a = 0; a < e.length; a++) {
1167
+ var c = e[a];
1168
+ Et(c) && Ut(c, r);
1169
1169
  }
1170
- else if (lt(e))
1170
+ else if (Et(e))
1171
1171
  e._store && (e._store.validated = !0);
1172
1172
  else if (e) {
1173
- var f = B(e);
1174
- if (typeof f == "function" && f !== e.entries)
1175
- for (var _ = f.call(e), c; !(c = _.next()).done; )
1176
- lt(c.value) && xt(c.value, n);
1173
+ var _ = J(e);
1174
+ if (typeof _ == "function" && _ !== e.entries)
1175
+ for (var y = _.call(e), m; !(m = y.next()).done; )
1176
+ Et(m.value) && Ut(m.value, r);
1177
1177
  }
1178
1178
  }
1179
1179
  }
1180
- function be(e) {
1180
+ function we(e) {
1181
1181
  {
1182
- var n = e.type;
1183
- if (n == null || typeof n == "string")
1182
+ var r = e.type;
1183
+ if (r == null || typeof r == "string")
1184
1184
  return;
1185
- var s;
1186
- if (typeof n == "function")
1187
- s = n.propTypes;
1188
- else if (typeof n == "object" && (n.$$typeof === m || // Note: Memo only checks outer props here.
1185
+ var a;
1186
+ if (typeof r == "function")
1187
+ a = r.propTypes;
1188
+ else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
1189
1189
  // Inner props are checked in the reconciler.
1190
- n.$$typeof === S))
1191
- s = n.propTypes;
1190
+ r.$$typeof === C))
1191
+ a = r.propTypes;
1192
1192
  else
1193
1193
  return;
1194
- if (s) {
1195
- var h = x(n);
1196
- re(s, e.props, "prop", h, e);
1197
- } else if (n.PropTypes !== void 0 && !ht) {
1198
- ht = !0;
1199
- var f = x(n);
1200
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
1194
+ if (a) {
1195
+ var c = L(r);
1196
+ he(a, e.props, "prop", c, e);
1197
+ } else if (r.PropTypes !== void 0 && !bt) {
1198
+ bt = !0;
1199
+ var _ = L(r);
1200
+ w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
1201
1201
  }
1202
- typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1202
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1203
1203
  }
1204
1204
  }
1205
- function ve(e) {
1205
+ function Se(e) {
1206
1206
  {
1207
- for (var n = Object.keys(e.props), s = 0; s < n.length; s++) {
1208
- var h = n[s];
1209
- if (h !== "children" && h !== "key") {
1210
- W(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), W(null);
1207
+ for (var r = Object.keys(e.props), a = 0; a < r.length; a++) {
1208
+ var c = r[a];
1209
+ if (c !== "children" && c !== "key") {
1210
+ q(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), q(null);
1211
1211
  break;
1212
1212
  }
1213
1213
  }
1214
- e.ref !== null && (W(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
1214
+ e.ref !== null && (q(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
1215
1215
  }
1216
1216
  }
1217
- var Lt = {};
1218
- function kt(e, n, s, h, f, _) {
1217
+ var Vt = {};
1218
+ function Wt(e, r, a, c, _, y) {
1219
1219
  {
1220
- var c = Jt(e);
1221
- if (!c) {
1222
- var l = "";
1223
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1224
- var T = ye();
1225
- T ? l += T : l += Ct();
1226
- var g;
1227
- e === null ? g = "null" : rt(e) ? g = "array" : e !== void 0 && e.$$typeof === t ? (g = "<" + (x(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : g = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", g, l);
1220
+ var m = N(e);
1221
+ if (!m) {
1222
+ var f = "";
1223
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1224
+ var R = Ee();
1225
+ R ? f += R : f += Ft();
1226
+ var b;
1227
+ e === null ? b = "null" : _t(e) ? b = "array" : e !== void 0 && e.$$typeof === t ? (b = "<" + (L(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, f);
1228
1228
  }
1229
- var v = _e(e, n, s, f, _);
1230
- if (v == null)
1231
- return v;
1232
- if (c) {
1233
- var C = n.children;
1234
- if (C !== void 0)
1235
- if (h)
1236
- if (rt(C)) {
1237
- for (var K = 0; K < C.length; K++)
1238
- jt(C[K], e);
1239
- Object.freeze && Object.freeze(C);
1229
+ var E = be(e, r, a, _, y);
1230
+ if (E == null)
1231
+ return E;
1232
+ if (m) {
1233
+ var j = r.children;
1234
+ if (j !== void 0)
1235
+ if (c)
1236
+ if (_t(j)) {
1237
+ for (var Q = 0; Q < j.length; Q++)
1238
+ Zt(j[Q], e);
1239
+ Object.freeze && Object.freeze(j);
1240
1240
  } else
1241
1241
  w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1242
1242
  else
1243
- jt(C, e);
1243
+ Zt(j, e);
1244
1244
  }
1245
- if (V.call(n, "key")) {
1246
- var I = x(e), P = Object.keys(n).filter(function(Re) {
1247
- return Re !== "key";
1248
- }), ct = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
1249
- if (!Lt[I + ct]) {
1250
- var Se = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
1245
+ if (tt.call(r, "key")) {
1246
+ var W = L(e), D = Object.keys(r).filter(function(De) {
1247
+ return De !== "key";
1248
+ }), vt = D.length > 0 ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}";
1249
+ if (!Vt[W + vt]) {
1250
+ var Oe = D.length > 0 ? "{" + D.join(": ..., ") + ": ...}" : "{}";
1251
1251
  w(`A props object containing a "key" prop is being spread into JSX:
1252
1252
  let props = %s;
1253
1253
  <%s {...props} />
1254
1254
  React keys must be passed directly to JSX without using spread:
1255
1255
  let props = %s;
1256
- <%s key={someKey} {...props} />`, ct, I, Se, I), Lt[I + ct] = !0;
1256
+ <%s key={someKey} {...props} />`, vt, W, Oe, W), Vt[W + vt] = !0;
1257
1257
  }
1258
1258
  }
1259
- return e === r ? ve(v) : be(v), v;
1259
+ return e === o ? Se(E) : we(E), E;
1260
1260
  }
1261
1261
  }
1262
- function Ee(e, n, s) {
1263
- return kt(e, n, s, !0);
1262
+ function Te(e, r, a) {
1263
+ return Wt(e, r, a, !0);
1264
1264
  }
1265
- function we(e, n, s) {
1266
- return kt(e, n, s, !1);
1265
+ function Ce(e, r, a) {
1266
+ return Wt(e, r, a, !1);
1267
1267
  }
1268
- var Te = we, Pe = Ee;
1269
- Ft.Fragment = r, Ft.jsx = Te, Ft.jsxs = Pe;
1270
- }()), Ft;
1268
+ var Pe = Ce, Re = Te;
1269
+ Xt.Fragment = o, Xt.jsx = Pe, Xt.jsxs = Re;
1270
+ }()), Xt;
1271
1271
  }
1272
- process.env.NODE_ENV === "production" ? Oe.exports = si() : Oe.exports = ai();
1273
- var hi = Oe.exports;
1274
- const qe = ({ sourceCamera: o, targetCamera: t, distance: i }) => {
1275
- t.quaternion.copy(o.quaternion);
1276
- const r = new y.Vector3(0, 0, -1).applyQuaternion(t.quaternion).normalize(), a = i ?? o.position.length();
1277
- t.position.copy(r.multiplyScalar(-a)), t.lookAt(0, 0, 0), t.updateMatrixWorld(!0);
1278
- }, Ie = (o, t) => {
1279
- qe({ sourceCamera: t, targetCamera: o, distance: 5 });
1280
- }, li = (o, t) => {
1281
- qe({
1272
+ process.env.NODE_ENV === "production" ? Le.exports = li() : Le.exports = ci();
1273
+ var ui = Le.exports;
1274
+ const Je = ({ sourceCamera: n, targetCamera: t, distance: i, controls: o }) => {
1275
+ t.quaternion.copy(n.quaternion);
1276
+ const s = new h.Vector3(0, 0, -1).applyQuaternion(t.quaternion).normalize(), l = i ?? n.position.length();
1277
+ t.position.copy(s.multiplyScalar(-l));
1278
+ const d = o && !o.target.equals(new h.Vector3(0, 0, 0)) ? o.target : new h.Vector3(0, 0, 0);
1279
+ t.lookAt(d), t.updateMatrixWorld(!0), o && o.update();
1280
+ }, Ue = (n, t) => {
1281
+ Je({ sourceCamera: t, targetCamera: n, distance: 5 });
1282
+ }, di = (n, t, i) => {
1283
+ Je({
1282
1284
  sourceCamera: t,
1283
- targetCamera: o,
1284
- distance: o.position.length()
1285
+ targetCamera: n,
1286
+ distance: n.position.length(),
1287
+ controls: i
1285
1288
  });
1286
- }, ci = () => {
1289
+ }, pi = () => {
1287
1290
  try {
1288
- const o = document.createElement("canvas");
1289
- return !!(window.WebGLRenderingContext && (o.getContext("webgl") || o.getContext("experimental-webgl")));
1291
+ const n = document.createElement("canvas");
1292
+ return !!(window.WebGLRenderingContext && (n.getContext("webgl") || n.getContext("experimental-webgl")));
1290
1293
  } catch {
1291
1294
  return !1;
1292
1295
  }
1293
- }, ui = () => ci() ? new y.WebGLRenderer({ alpha: !0, antialias: !0 }) : (console.error("WebGL is not supported in this environment."), null), Fe = { type: "change" }, xe = { type: "start" }, Je = { type: "end" }, Yt = new Ve(), Ye = new Ge(), di = Math.cos(70 * $e.DEG2RAD), k = new j(), Y = 2 * Math.PI, R = {
1296
+ }, fi = () => pi() ? new h.WebGLRenderer({ alpha: !0, antialias: !0 }) : (console.error("WebGL is not supported in this environment."), null), Ze = { type: "change" }, ke = { type: "start" }, ti = { type: "end" }, $t = new Xe(), Ve = new $e(), mi = Math.cos(70 * qe.DEG2RAD), F = new z(), B = 2 * Math.PI, M = {
1294
1297
  NONE: -1,
1295
1298
  ROTATE: 0,
1296
1299
  DOLLY: 1,
@@ -1299,10 +1302,10 @@ const qe = ({ sourceCamera: o, targetCamera: t, distance: i }) => {
1299
1302
  TOUCH_PAN: 4,
1300
1303
  TOUCH_DOLLY_PAN: 5,
1301
1304
  TOUCH_DOLLY_ROTATE: 6
1302
- }, De = 1e-6;
1303
- class pi extends Be {
1305
+ }, Me = 1e-6;
1306
+ class _i extends Qe {
1304
1307
  constructor(t, i = null) {
1305
- super(t, i), this.state = R.NONE, this.enabled = !0, this.target = new j(), this.cursor = new j(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: F.ROTATE, MIDDLE: F.DOLLY, RIGHT: F.PAN }, this.touches = { ONE: H.ROTATE, TWO: H.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new j(), this._lastQuaternion = new Wt(), this._lastTargetPosition = new j(), this._quat = new Wt().setFromUnitVectors(t.up, new j(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Kt(), this._sphericalDelta = new Kt(), this._scale = 1, this._panOffset = new j(), this._rotateStart = new O(), this._rotateEnd = new O(), this._rotateDelta = new O(), this._panStart = new O(), this._panEnd = new O(), this._panDelta = new O(), this._dollyStart = new O(), this._dollyEnd = new O(), this._dollyDelta = new O(), this._dollyDirection = new j(), this._mouse = new O(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = mi.bind(this), this._onPointerDown = fi.bind(this), this._onPointerUp = _i.bind(this), this._onContextMenu = Ti.bind(this), this._onMouseWheel = bi.bind(this), this._onKeyDown = vi.bind(this), this._onTouchStart = Ei.bind(this), this._onTouchMove = wi.bind(this), this._onMouseDown = yi.bind(this), this._onMouseMove = gi.bind(this), this._interceptControlDown = Pi.bind(this), this._interceptControlUp = Si.bind(this), this.domElement !== null && this.connect(), this.update();
1308
+ super(t, i), this.state = M.NONE, this.enabled = !0, this.target = new z(), this.cursor = new z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: H.ROTATE, MIDDLE: H.DOLLY, RIGHT: H.PAN }, this.touches = { ONE: $.ROTATE, TWO: $.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new z(), this._lastQuaternion = new te(), this._lastTargetPosition = new z(), this._quat = new te().setFromUnitVectors(t.up, new z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new ee(), this._sphericalDelta = new ee(), this._scale = 1, this._panOffset = new z(), this._rotateStart = new A(), this._rotateEnd = new A(), this._rotateDelta = new A(), this._panStart = new A(), this._panEnd = new A(), this._panDelta = new A(), this._dollyStart = new A(), this._dollyEnd = new A(), this._dollyDelta = new A(), this._dollyDirection = new z(), this._mouse = new A(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = gi.bind(this), this._onPointerDown = yi.bind(this), this._onPointerUp = bi.bind(this), this._onContextMenu = Pi.bind(this), this._onMouseWheel = wi.bind(this), this._onKeyDown = Si.bind(this), this._onTouchStart = Ti.bind(this), this._onTouchMove = Ci.bind(this), this._onMouseDown = Ei.bind(this), this._onMouseMove = vi.bind(this), this._interceptControlDown = Ri.bind(this), this._interceptControlUp = Oi.bind(this), this.domElement !== null && this.connect(), this.update();
1306
1309
  }
1307
1310
  connect() {
1308
1311
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -1332,45 +1335,45 @@ class pi extends Be {
1332
1335
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
1333
1336
  }
1334
1337
  reset() {
1335
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Fe), this.update(), this.state = R.NONE;
1338
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ze), this.update(), this.state = M.NONE;
1336
1339
  }
1337
1340
  update(t = null) {
1338
1341
  const i = this.object.position;
1339
- k.copy(i).sub(this.target), k.applyQuaternion(this._quat), this._spherical.setFromVector3(k), this.autoRotate && this.state === R.NONE && this._rotateLeft(this._getAutoRotationAngle(t)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
1340
- let r = this.minAzimuthAngle, a = this.maxAzimuthAngle;
1341
- isFinite(r) && isFinite(a) && (r < -Math.PI ? r += Y : r > Math.PI && (r -= Y), a < -Math.PI ? a += Y : a > Math.PI && (a -= Y), r <= a ? this._spherical.theta = Math.max(r, Math.min(a, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (r + a) / 2 ? Math.max(r, this._spherical.theta) : Math.min(a, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
1342
- let u = !1;
1342
+ F.copy(i).sub(this.target), F.applyQuaternion(this._quat), this._spherical.setFromVector3(F), this.autoRotate && this.state === M.NONE && this._rotateLeft(this._getAutoRotationAngle(t)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
1343
+ let o = this.minAzimuthAngle, s = this.maxAzimuthAngle;
1344
+ isFinite(o) && isFinite(s) && (o < -Math.PI ? o += B : o > Math.PI && (o -= B), s < -Math.PI ? s += B : s > Math.PI && (s -= B), o <= s ? this._spherical.theta = Math.max(o, Math.min(s, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (o + s) / 2 ? Math.max(o, this._spherical.theta) : Math.min(s, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
1345
+ let l = !1;
1343
1346
  if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
1344
1347
  this._spherical.radius = this._clampDistance(this._spherical.radius);
1345
1348
  else {
1346
- const p = this._spherical.radius;
1347
- this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), u = p != this._spherical.radius;
1349
+ const d = this._spherical.radius;
1350
+ this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), l = d != this._spherical.radius;
1348
1351
  }
1349
- if (k.setFromSpherical(this._spherical), k.applyQuaternion(this._quatInverse), i.copy(this.target).add(k), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
1350
- let p = null;
1352
+ if (F.setFromSpherical(this._spherical), F.applyQuaternion(this._quatInverse), i.copy(this.target).add(F), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
1353
+ let d = null;
1351
1354
  if (this.object.isPerspectiveCamera) {
1352
- const d = k.length();
1353
- p = this._clampDistance(d * this._scale);
1354
- const m = d - p;
1355
- this.object.position.addScaledVector(this._dollyDirection, m), this.object.updateMatrixWorld(), u = !!m;
1355
+ const u = F.length();
1356
+ d = this._clampDistance(u * this._scale);
1357
+ const p = u - d;
1358
+ this.object.position.addScaledVector(this._dollyDirection, p), this.object.updateMatrixWorld(), l = !!p;
1356
1359
  } else if (this.object.isOrthographicCamera) {
1357
- const d = new j(this._mouse.x, this._mouse.y, 0);
1358
- d.unproject(this.object);
1359
- const m = this.object.zoom;
1360
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), u = m !== this.object.zoom;
1361
- const E = new j(this._mouse.x, this._mouse.y, 0);
1362
- E.unproject(this.object), this.object.position.sub(E).add(d), this.object.updateMatrixWorld(), p = k.length();
1360
+ const u = new z(this._mouse.x, this._mouse.y, 0);
1361
+ u.unproject(this.object);
1362
+ const p = this.object.zoom;
1363
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), l = p !== this.object.zoom;
1364
+ const v = new z(this._mouse.x, this._mouse.y, 0);
1365
+ v.unproject(this.object), this.object.position.sub(v).add(u), this.object.updateMatrixWorld(), d = F.length();
1363
1366
  } else
1364
1367
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
1365
- p !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(p).add(this.object.position) : (Yt.origin.copy(this.object.position), Yt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Yt.direction)) < di ? this.object.lookAt(this.target) : (Ye.setFromNormalAndCoplanarPoint(this.object.up, this.target), Yt.intersectPlane(Ye, this.target))));
1368
+ d !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(d).add(this.object.position) : ($t.origin.copy(this.object.position), $t.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot($t.direction)) < mi ? this.object.lookAt(this.target) : (Ve.setFromNormalAndCoplanarPoint(this.object.up, this.target), $t.intersectPlane(Ve, this.target))));
1366
1369
  } else if (this.object.isOrthographicCamera) {
1367
- const p = this.object.zoom;
1368
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), p !== this.object.zoom && (this.object.updateProjectionMatrix(), u = !0);
1370
+ const d = this.object.zoom;
1371
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), d !== this.object.zoom && (this.object.updateProjectionMatrix(), l = !0);
1369
1372
  }
1370
- return this._scale = 1, this._performCursorZoom = !1, u || this._lastPosition.distanceToSquared(this.object.position) > De || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > De || this._lastTargetPosition.distanceToSquared(this.target) > De ? (this.dispatchEvent(Fe), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
1373
+ return this._scale = 1, this._performCursorZoom = !1, l || this._lastPosition.distanceToSquared(this.object.position) > Me || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Me || this._lastTargetPosition.distanceToSquared(this.target) > Me ? (this.dispatchEvent(Ze), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
1371
1374
  }
1372
1375
  _getAutoRotationAngle(t) {
1373
- return t !== null ? Y / 60 * this.autoRotateSpeed * t : Y / 60 / 60 * this.autoRotateSpeed;
1376
+ return t !== null ? B / 60 * this.autoRotateSpeed * t : B / 60 / 60 * this.autoRotateSpeed;
1374
1377
  }
1375
1378
  _getZoomScale(t) {
1376
1379
  const i = Math.abs(t * 0.01);
@@ -1383,20 +1386,20 @@ class pi extends Be {
1383
1386
  this._sphericalDelta.phi -= t;
1384
1387
  }
1385
1388
  _panLeft(t, i) {
1386
- k.setFromMatrixColumn(i, 0), k.multiplyScalar(-t), this._panOffset.add(k);
1389
+ F.setFromMatrixColumn(i, 0), F.multiplyScalar(-t), this._panOffset.add(F);
1387
1390
  }
1388
1391
  _panUp(t, i) {
1389
- this.screenSpacePanning === !0 ? k.setFromMatrixColumn(i, 1) : (k.setFromMatrixColumn(i, 0), k.crossVectors(this.object.up, k)), k.multiplyScalar(t), this._panOffset.add(k);
1392
+ this.screenSpacePanning === !0 ? F.setFromMatrixColumn(i, 1) : (F.setFromMatrixColumn(i, 0), F.crossVectors(this.object.up, F)), F.multiplyScalar(t), this._panOffset.add(F);
1390
1393
  }
1391
1394
  // deltaX and deltaY are in pixels; right and down are positive
1392
1395
  _pan(t, i) {
1393
- const r = this.domElement;
1396
+ const o = this.domElement;
1394
1397
  if (this.object.isPerspectiveCamera) {
1395
- const a = this.object.position;
1396
- k.copy(a).sub(this.target);
1397
- let u = k.length();
1398
- u *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * t * u / r.clientHeight, this.object.matrix), this._panUp(2 * i * u / r.clientHeight, this.object.matrix);
1399
- } else this.object.isOrthographicCamera ? (this._panLeft(t * (this.object.right - this.object.left) / this.object.zoom / r.clientWidth, this.object.matrix), this._panUp(i * (this.object.top - this.object.bottom) / this.object.zoom / r.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
1398
+ const s = this.object.position;
1399
+ F.copy(s).sub(this.target);
1400
+ let l = F.length();
1401
+ l *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * t * l / o.clientHeight, this.object.matrix), this._panUp(2 * i * l / o.clientHeight, this.object.matrix);
1402
+ } else this.object.isOrthographicCamera ? (this._panLeft(t * (this.object.right - this.object.left) / this.object.zoom / o.clientWidth, this.object.matrix), this._panUp(i * (this.object.top - this.object.bottom) / this.object.zoom / o.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
1400
1403
  }
1401
1404
  _dollyOut(t) {
1402
1405
  this.object.isPerspectiveCamera || this.object.isOrthographicCamera ? this._scale /= t : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), this.enableZoom = !1);
@@ -1408,8 +1411,8 @@ class pi extends Be {
1408
1411
  if (!this.zoomToCursor)
1409
1412
  return;
1410
1413
  this._performCursorZoom = !0;
1411
- const r = this.domElement.getBoundingClientRect(), a = t - r.left, u = i - r.top, p = r.width, d = r.height;
1412
- this._mouse.x = a / p * 2 - 1, this._mouse.y = -(u / d) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
1414
+ const o = this.domElement.getBoundingClientRect(), s = t - o.left, l = i - o.top, d = o.width, u = o.height;
1415
+ this._mouse.x = s / d * 2 - 1, this._mouse.y = -(l / u) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
1413
1416
  }
1414
1417
  _clampDistance(t) {
1415
1418
  return Math.max(this.minDistance, Math.min(this.maxDistance, t));
@@ -1429,7 +1432,7 @@ class pi extends Be {
1429
1432
  _handleMouseMoveRotate(t) {
1430
1433
  this._rotateEnd.set(t.clientX, t.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
1431
1434
  const i = this.domElement;
1432
- this._rotateLeft(Y * this._rotateDelta.x / i.clientHeight), this._rotateUp(Y * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
1435
+ this._rotateLeft(B * this._rotateDelta.x / i.clientHeight), this._rotateUp(B * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
1433
1436
  }
1434
1437
  _handleMouseMoveDolly(t) {
1435
1438
  this._dollyEnd.set(t.clientX, t.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
@@ -1444,16 +1447,16 @@ class pi extends Be {
1444
1447
  let i = !1;
1445
1448
  switch (t.code) {
1446
1449
  case this.keys.UP:
1447
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(Y * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, this.keyPanSpeed), i = !0;
1450
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(B * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, this.keyPanSpeed), i = !0;
1448
1451
  break;
1449
1452
  case this.keys.BOTTOM:
1450
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(-Y * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, -this.keyPanSpeed), i = !0;
1453
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(-B * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, -this.keyPanSpeed), i = !0;
1451
1454
  break;
1452
1455
  case this.keys.LEFT:
1453
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(Y * this.rotateSpeed / this.domElement.clientHeight) : this._pan(this.keyPanSpeed, 0), i = !0;
1456
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(B * this.rotateSpeed / this.domElement.clientHeight) : this._pan(this.keyPanSpeed, 0), i = !0;
1454
1457
  break;
1455
1458
  case this.keys.RIGHT:
1456
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(-Y * this.rotateSpeed / this.domElement.clientHeight) : this._pan(-this.keyPanSpeed, 0), i = !0;
1459
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(-B * this.rotateSpeed / this.domElement.clientHeight) : this._pan(-this.keyPanSpeed, 0), i = !0;
1457
1460
  break;
1458
1461
  }
1459
1462
  i && (t.preventDefault(), this.update());
@@ -1462,21 +1465,21 @@ class pi extends Be {
1462
1465
  if (this._pointers.length === 1)
1463
1466
  this._rotateStart.set(t.pageX, t.pageY);
1464
1467
  else {
1465
- const i = this._getSecondPointerPosition(t), r = 0.5 * (t.pageX + i.x), a = 0.5 * (t.pageY + i.y);
1466
- this._rotateStart.set(r, a);
1468
+ const i = this._getSecondPointerPosition(t), o = 0.5 * (t.pageX + i.x), s = 0.5 * (t.pageY + i.y);
1469
+ this._rotateStart.set(o, s);
1467
1470
  }
1468
1471
  }
1469
1472
  _handleTouchStartPan(t) {
1470
1473
  if (this._pointers.length === 1)
1471
1474
  this._panStart.set(t.pageX, t.pageY);
1472
1475
  else {
1473
- const i = this._getSecondPointerPosition(t), r = 0.5 * (t.pageX + i.x), a = 0.5 * (t.pageY + i.y);
1474
- this._panStart.set(r, a);
1476
+ const i = this._getSecondPointerPosition(t), o = 0.5 * (t.pageX + i.x), s = 0.5 * (t.pageY + i.y);
1477
+ this._panStart.set(o, s);
1475
1478
  }
1476
1479
  }
1477
1480
  _handleTouchStartDolly(t) {
1478
- const i = this._getSecondPointerPosition(t), r = t.pageX - i.x, a = t.pageY - i.y, u = Math.sqrt(r * r + a * a);
1479
- this._dollyStart.set(0, u);
1481
+ const i = this._getSecondPointerPosition(t), o = t.pageX - i.x, s = t.pageY - i.y, l = Math.sqrt(o * o + s * s);
1482
+ this._dollyStart.set(0, l);
1480
1483
  }
1481
1484
  _handleTouchStartDollyPan(t) {
1482
1485
  this.enableZoom && this._handleTouchStartDolly(t), this.enablePan && this._handleTouchStartPan(t);
@@ -1488,27 +1491,27 @@ class pi extends Be {
1488
1491
  if (this._pointers.length == 1)
1489
1492
  this._rotateEnd.set(t.pageX, t.pageY);
1490
1493
  else {
1491
- const r = this._getSecondPointerPosition(t), a = 0.5 * (t.pageX + r.x), u = 0.5 * (t.pageY + r.y);
1492
- this._rotateEnd.set(a, u);
1494
+ const o = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + o.x), l = 0.5 * (t.pageY + o.y);
1495
+ this._rotateEnd.set(s, l);
1493
1496
  }
1494
1497
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
1495
1498
  const i = this.domElement;
1496
- this._rotateLeft(Y * this._rotateDelta.x / i.clientHeight), this._rotateUp(Y * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd);
1499
+ this._rotateLeft(B * this._rotateDelta.x / i.clientHeight), this._rotateUp(B * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd);
1497
1500
  }
1498
1501
  _handleTouchMovePan(t) {
1499
1502
  if (this._pointers.length === 1)
1500
1503
  this._panEnd.set(t.pageX, t.pageY);
1501
1504
  else {
1502
- const i = this._getSecondPointerPosition(t), r = 0.5 * (t.pageX + i.x), a = 0.5 * (t.pageY + i.y);
1503
- this._panEnd.set(r, a);
1505
+ const i = this._getSecondPointerPosition(t), o = 0.5 * (t.pageX + i.x), s = 0.5 * (t.pageY + i.y);
1506
+ this._panEnd.set(o, s);
1504
1507
  }
1505
1508
  this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
1506
1509
  }
1507
1510
  _handleTouchMoveDolly(t) {
1508
- const i = this._getSecondPointerPosition(t), r = t.pageX - i.x, a = t.pageY - i.y, u = Math.sqrt(r * r + a * a);
1509
- this._dollyEnd.set(0, u), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
1510
- const p = (t.pageX + i.x) * 0.5, d = (t.pageY + i.y) * 0.5;
1511
- this._updateZoomParameters(p, d);
1511
+ const i = this._getSecondPointerPosition(t), o = t.pageX - i.x, s = t.pageY - i.y, l = Math.sqrt(o * o + s * s);
1512
+ this._dollyEnd.set(0, l), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
1513
+ const d = (t.pageX + i.x) * 0.5, u = (t.pageY + i.y) * 0.5;
1514
+ this._updateZoomParameters(d, u);
1512
1515
  }
1513
1516
  _handleTouchMoveDollyPan(t) {
1514
1517
  this.enableZoom && this._handleTouchMoveDolly(t), this.enablePan && this._handleTouchMovePan(t);
@@ -1535,7 +1538,7 @@ class pi extends Be {
1535
1538
  }
1536
1539
  _trackPointer(t) {
1537
1540
  let i = this._pointerPositions[t.pointerId];
1538
- i === void 0 && (i = new O(), this._pointerPositions[t.pointerId] = i), i.set(t.pageX, t.pageY);
1541
+ i === void 0 && (i = new A(), this._pointerPositions[t.pointerId] = i), i.set(t.pageX, t.pageY);
1539
1542
  }
1540
1543
  _getSecondPointerPosition(t) {
1541
1544
  const i = t.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
@@ -1543,32 +1546,32 @@ class pi extends Be {
1543
1546
  }
1544
1547
  //
1545
1548
  _customWheelEvent(t) {
1546
- const i = t.deltaMode, r = {
1549
+ const i = t.deltaMode, o = {
1547
1550
  clientX: t.clientX,
1548
1551
  clientY: t.clientY,
1549
1552
  deltaY: t.deltaY
1550
1553
  };
1551
1554
  switch (i) {
1552
1555
  case 1:
1553
- r.deltaY *= 16;
1556
+ o.deltaY *= 16;
1554
1557
  break;
1555
1558
  case 2:
1556
- r.deltaY *= 100;
1559
+ o.deltaY *= 100;
1557
1560
  break;
1558
1561
  }
1559
- return t.ctrlKey && !this._controlActive && (r.deltaY *= 10), r;
1562
+ return t.ctrlKey && !this._controlActive && (o.deltaY *= 10), o;
1560
1563
  }
1561
1564
  }
1562
- function fi(o) {
1563
- this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(o.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(o) && (this._addPointer(o), o.pointerType === "touch" ? this._onTouchStart(o) : this._onMouseDown(o)));
1565
+ function yi(n) {
1566
+ this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(n.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(n) && (this._addPointer(n), n.pointerType === "touch" ? this._onTouchStart(n) : this._onMouseDown(n)));
1564
1567
  }
1565
- function mi(o) {
1566
- this.enabled !== !1 && (o.pointerType === "touch" ? this._onTouchMove(o) : this._onMouseMove(o));
1568
+ function gi(n) {
1569
+ this.enabled !== !1 && (n.pointerType === "touch" ? this._onTouchMove(n) : this._onMouseMove(n));
1567
1570
  }
1568
- function _i(o) {
1569
- switch (this._removePointer(o), this._pointers.length) {
1571
+ function bi(n) {
1572
+ switch (this._removePointer(n), this._pointers.length) {
1570
1573
  case 0:
1571
- this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Je), this.state = R.NONE;
1574
+ this.domElement.releasePointerCapture(n.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(ti), this.state = M.NONE;
1572
1575
  break;
1573
1576
  case 1:
1574
1577
  const t = this._pointers[0], i = this._pointerPositions[t];
@@ -1576,9 +1579,9 @@ function _i(o) {
1576
1579
  break;
1577
1580
  }
1578
1581
  }
1579
- function yi(o) {
1582
+ function Ei(n) {
1580
1583
  let t;
1581
- switch (o.button) {
1584
+ switch (n.button) {
1582
1585
  case 0:
1583
1586
  t = this.mouseButtons.LEFT;
1584
1587
  break;
@@ -1592,212 +1595,368 @@ function yi(o) {
1592
1595
  t = -1;
1593
1596
  }
1594
1597
  switch (t) {
1595
- case F.DOLLY:
1598
+ case H.DOLLY:
1596
1599
  if (this.enableZoom === !1) return;
1597
- this._handleMouseDownDolly(o), this.state = R.DOLLY;
1600
+ this._handleMouseDownDolly(n), this.state = M.DOLLY;
1598
1601
  break;
1599
- case F.ROTATE:
1600
- if (o.ctrlKey || o.metaKey || o.shiftKey) {
1602
+ case H.ROTATE:
1603
+ if (n.ctrlKey || n.metaKey || n.shiftKey) {
1601
1604
  if (this.enablePan === !1) return;
1602
- this._handleMouseDownPan(o), this.state = R.PAN;
1605
+ this._handleMouseDownPan(n), this.state = M.PAN;
1603
1606
  } else {
1604
1607
  if (this.enableRotate === !1) return;
1605
- this._handleMouseDownRotate(o), this.state = R.ROTATE;
1608
+ this._handleMouseDownRotate(n), this.state = M.ROTATE;
1606
1609
  }
1607
1610
  break;
1608
- case F.PAN:
1609
- if (o.ctrlKey || o.metaKey || o.shiftKey) {
1611
+ case H.PAN:
1612
+ if (n.ctrlKey || n.metaKey || n.shiftKey) {
1610
1613
  if (this.enableRotate === !1) return;
1611
- this._handleMouseDownRotate(o), this.state = R.ROTATE;
1614
+ this._handleMouseDownRotate(n), this.state = M.ROTATE;
1612
1615
  } else {
1613
1616
  if (this.enablePan === !1) return;
1614
- this._handleMouseDownPan(o), this.state = R.PAN;
1617
+ this._handleMouseDownPan(n), this.state = M.PAN;
1615
1618
  }
1616
1619
  break;
1617
1620
  default:
1618
- this.state = R.NONE;
1621
+ this.state = M.NONE;
1619
1622
  }
1620
- this.state !== R.NONE && this.dispatchEvent(xe);
1623
+ this.state !== M.NONE && this.dispatchEvent(ke);
1621
1624
  }
1622
- function gi(o) {
1625
+ function vi(n) {
1623
1626
  switch (this.state) {
1624
- case R.ROTATE:
1627
+ case M.ROTATE:
1625
1628
  if (this.enableRotate === !1) return;
1626
- this._handleMouseMoveRotate(o);
1629
+ this._handleMouseMoveRotate(n);
1627
1630
  break;
1628
- case R.DOLLY:
1631
+ case M.DOLLY:
1629
1632
  if (this.enableZoom === !1) return;
1630
- this._handleMouseMoveDolly(o);
1633
+ this._handleMouseMoveDolly(n);
1631
1634
  break;
1632
- case R.PAN:
1635
+ case M.PAN:
1633
1636
  if (this.enablePan === !1) return;
1634
- this._handleMouseMovePan(o);
1637
+ this._handleMouseMovePan(n);
1635
1638
  break;
1636
1639
  }
1637
1640
  }
1638
- function bi(o) {
1639
- this.enabled === !1 || this.enableZoom === !1 || this.state !== R.NONE || (o.preventDefault(), this.dispatchEvent(xe), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Je));
1641
+ function wi(n) {
1642
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== M.NONE || (n.preventDefault(), this.dispatchEvent(ke), this._handleMouseWheel(this._customWheelEvent(n)), this.dispatchEvent(ti));
1640
1643
  }
1641
- function vi(o) {
1642
- this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(o);
1644
+ function Si(n) {
1645
+ this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(n);
1643
1646
  }
1644
- function Ei(o) {
1645
- switch (this._trackPointer(o), this._pointers.length) {
1647
+ function Ti(n) {
1648
+ switch (this._trackPointer(n), this._pointers.length) {
1646
1649
  case 1:
1647
1650
  switch (this.touches.ONE) {
1648
- case H.ROTATE:
1651
+ case $.ROTATE:
1649
1652
  if (this.enableRotate === !1) return;
1650
- this._handleTouchStartRotate(o), this.state = R.TOUCH_ROTATE;
1653
+ this._handleTouchStartRotate(n), this.state = M.TOUCH_ROTATE;
1651
1654
  break;
1652
- case H.PAN:
1655
+ case $.PAN:
1653
1656
  if (this.enablePan === !1) return;
1654
- this._handleTouchStartPan(o), this.state = R.TOUCH_PAN;
1657
+ this._handleTouchStartPan(n), this.state = M.TOUCH_PAN;
1655
1658
  break;
1656
1659
  default:
1657
- this.state = R.NONE;
1660
+ this.state = M.NONE;
1658
1661
  }
1659
1662
  break;
1660
1663
  case 2:
1661
1664
  switch (this.touches.TWO) {
1662
- case H.DOLLY_PAN:
1665
+ case $.DOLLY_PAN:
1663
1666
  if (this.enableZoom === !1 && this.enablePan === !1) return;
1664
- this._handleTouchStartDollyPan(o), this.state = R.TOUCH_DOLLY_PAN;
1667
+ this._handleTouchStartDollyPan(n), this.state = M.TOUCH_DOLLY_PAN;
1665
1668
  break;
1666
- case H.DOLLY_ROTATE:
1669
+ case $.DOLLY_ROTATE:
1667
1670
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
1668
- this._handleTouchStartDollyRotate(o), this.state = R.TOUCH_DOLLY_ROTATE;
1671
+ this._handleTouchStartDollyRotate(n), this.state = M.TOUCH_DOLLY_ROTATE;
1669
1672
  break;
1670
1673
  default:
1671
- this.state = R.NONE;
1674
+ this.state = M.NONE;
1672
1675
  }
1673
1676
  break;
1674
1677
  default:
1675
- this.state = R.NONE;
1678
+ this.state = M.NONE;
1676
1679
  }
1677
- this.state !== R.NONE && this.dispatchEvent(xe);
1680
+ this.state !== M.NONE && this.dispatchEvent(ke);
1678
1681
  }
1679
- function wi(o) {
1680
- switch (this._trackPointer(o), this.state) {
1681
- case R.TOUCH_ROTATE:
1682
+ function Ci(n) {
1683
+ switch (this._trackPointer(n), this.state) {
1684
+ case M.TOUCH_ROTATE:
1682
1685
  if (this.enableRotate === !1) return;
1683
- this._handleTouchMoveRotate(o), this.update();
1686
+ this._handleTouchMoveRotate(n), this.update();
1684
1687
  break;
1685
- case R.TOUCH_PAN:
1688
+ case M.TOUCH_PAN:
1686
1689
  if (this.enablePan === !1) return;
1687
- this._handleTouchMovePan(o), this.update();
1690
+ this._handleTouchMovePan(n), this.update();
1688
1691
  break;
1689
- case R.TOUCH_DOLLY_PAN:
1692
+ case M.TOUCH_DOLLY_PAN:
1690
1693
  if (this.enableZoom === !1 && this.enablePan === !1) return;
1691
- this._handleTouchMoveDollyPan(o), this.update();
1694
+ this._handleTouchMoveDollyPan(n), this.update();
1692
1695
  break;
1693
- case R.TOUCH_DOLLY_ROTATE:
1696
+ case M.TOUCH_DOLLY_ROTATE:
1694
1697
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
1695
- this._handleTouchMoveDollyRotate(o), this.update();
1698
+ this._handleTouchMoveDollyRotate(n), this.update();
1696
1699
  break;
1697
1700
  default:
1698
- this.state = R.NONE;
1701
+ this.state = M.NONE;
1699
1702
  }
1700
1703
  }
1701
- function Ti(o) {
1702
- this.enabled !== !1 && o.preventDefault();
1704
+ function Pi(n) {
1705
+ this.enabled !== !1 && n.preventDefault();
1703
1706
  }
1704
- function Pi(o) {
1705
- o.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
1707
+ function Ri(n) {
1708
+ n.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
1706
1709
  }
1707
- function Si(o) {
1708
- o.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
1710
+ function Oi(n) {
1711
+ n.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
1709
1712
  }
1710
- const Ri = (o, t = Di) => {
1711
- const i = new y.AmbientLight(
1712
- t.ambientLight.color,
1713
- t.ambientLight.intensity
1714
- );
1715
- o.add(i);
1716
- const r = new y.HemisphereLight(
1717
- t.hemisphereLight.skyColor,
1718
- t.hemisphereLight.groundColor,
1719
- t.hemisphereLight.intensity
1720
- );
1721
- o.add(r);
1722
- const a = new y.DirectionalLight(
1723
- t.directionalLight.color,
1724
- t.directionalLight.intensity
1725
- );
1726
- a.position.copy(t.directionalLight.position), a.castShadow = t.directionalLight.castShadow, a.castShadow && (a.shadow.mapSize.width = t.directionalLight.shadow.mapSize.width, a.shadow.mapSize.height = t.directionalLight.shadow.mapSize.height, a.shadow.camera.near = t.directionalLight.shadow.camera.near, a.shadow.camera.far = t.directionalLight.shadow.camera.far, a.shadow.camera.left = t.directionalLight.shadow.camera.left, a.shadow.camera.right = t.directionalLight.shadow.camera.right, a.shadow.camera.top = t.directionalLight.shadow.camera.top, a.shadow.camera.bottom = t.directionalLight.shadow.camera.bottom, a.shadow.bias = t.directionalLight.shadow.bias, a.shadow.radius = t.directionalLight.shadow.radius), o.add(a);
1727
- }, Di = {
1728
- ambientLight: {
1729
- color: "#404040",
1730
- intensity: Math.PI
1731
- },
1732
- hemisphereLight: {
1733
- skyColor: "#ffffbb",
1734
- groundColor: "#080820",
1735
- intensity: 1
1736
- },
1737
- directionalLight: {
1738
- color: "#ffffff",
1739
- intensity: Math.PI,
1740
- position: new y.Vector3(6, 6, 6),
1741
- castShadow: !0,
1742
- shadow: {
1743
- mapSize: {
1744
- width: 512,
1745
- height: 512
1746
- },
1747
- camera: {
1748
- near: 0.5,
1749
- far: 50,
1750
- left: -10,
1751
- right: 10,
1752
- top: 10,
1753
- bottom: -10
1754
- },
1755
- bias: -1e-3,
1756
- radius: 1
1757
- }
1758
- }
1713
+ const Di = (n) => {
1714
+ const t = new h.AmbientLight(16777215, 1);
1715
+ n.add(t);
1716
+ const i = new h.DirectionalLight(16777215, 1);
1717
+ i.position.set(5, 10, 5), n.add(i);
1718
+ const o = new h.DirectionalLight(16777215, 1);
1719
+ o.position.set(-5, -10, 5), n.add(o);
1720
+ const s = new h.PointLight(16777215, 1, 100);
1721
+ s.position.set(0, 0, 5), n.add(s), i.castShadow = !1, o.castShadow = !1, s.castShadow = !1;
1722
+ }, S = {
1723
+ CUBE_SIZE: 1.8,
1724
+ EDGE_SECTION_SIZE: 0.35,
1725
+ FACE_THICKNESS: 0.35,
1726
+ CANVAS_SIZE: 256,
1727
+ FONT_SIZE: "62px",
1728
+ TEXT_COLOR: "#000000",
1729
+ TEXT_ALIGN: "center",
1730
+ TEXT_BASELINE: "middle",
1731
+ FACE_COLOR: "#EFF3F2",
1732
+ FACE_OPACITY: 1,
1733
+ EDGE_COLOR: "#EFF3F2",
1734
+ CORNER_COLOR: "#EFF3F2",
1735
+ LINE_COLOR: 0
1759
1736
  };
1737
+ class ei {
1738
+ static createTextTexture(t) {
1739
+ const i = document.createElement("canvas"), o = i.getContext("2d");
1740
+ i.width = S.CANVAS_SIZE, i.height = S.CANVAS_SIZE, o && (o.clearRect(0, 0, i.width, i.height), o.font = `${S.FONT_SIZE} Arial`, o.fillStyle = S.TEXT_COLOR, o.textAlign = S.TEXT_ALIGN, o.textBaseline = S.TEXT_BASELINE, o.fillText(t, i.width / 2, i.height / 2));
1741
+ const s = new h.CanvasTexture(i);
1742
+ return s.needsUpdate = !0, s;
1743
+ }
1744
+ }
1745
+ class qt {
1746
+ static createWireframe([t, i, o]) {
1747
+ const s = new h.BoxGeometry(t, i, o), l = new h.EdgesGeometry(s), d = new h.LineBasicMaterial({ color: S.LINE_COLOR }), u = new h.LineSegments(l, d);
1748
+ return u.name = "Wireframe", u;
1749
+ }
1750
+ static createEdgeBox(t, i, o) {
1751
+ const s = S.CUBE_SIZE - S.EDGE_SECTION_SIZE, l = {
1752
+ x: S.EDGE_SECTION_SIZE,
1753
+ y: S.EDGE_SECTION_SIZE,
1754
+ z: S.EDGE_SECTION_SIZE
1755
+ };
1756
+ l[i] = s;
1757
+ const d = new h.BoxGeometry(l.x, l.y, l.z), u = new h.MeshStandardMaterial({ color: S.EDGE_COLOR }), p = new h.Mesh(d, u);
1758
+ return p.position.copy(t), p.name = `Edge Box ${o}`, p;
1759
+ }
1760
+ static createCornerCube(t, i) {
1761
+ const o = new h.BoxGeometry(
1762
+ S.EDGE_SECTION_SIZE,
1763
+ S.EDGE_SECTION_SIZE,
1764
+ S.EDGE_SECTION_SIZE
1765
+ ), s = new h.MeshStandardMaterial({ color: S.CORNER_COLOR }), l = new h.Mesh(o, s);
1766
+ return l.position.copy(t), l.name = `Corner Cube ${i}`, l;
1767
+ }
1768
+ static createFace(t, i, o) {
1769
+ const s = new h.Group(), l = new h.BoxGeometry(
1770
+ S.CUBE_SIZE - S.EDGE_SECTION_SIZE,
1771
+ S.CUBE_SIZE - S.EDGE_SECTION_SIZE,
1772
+ S.FACE_THICKNESS
1773
+ ), d = new h.MeshStandardMaterial({ color: S.FACE_COLOR }), u = new h.Mesh(l, d);
1774
+ u.name = `Face Box ${o}`, s.add(u);
1775
+ const p = new h.PlaneGeometry(
1776
+ S.CUBE_SIZE - S.EDGE_SECTION_SIZE,
1777
+ S.CUBE_SIZE - S.EDGE_SECTION_SIZE
1778
+ ), v = new h.MeshStandardMaterial({
1779
+ map: ei.createTextTexture(o),
1780
+ transparent: !0,
1781
+ depthWrite: !1
1782
+ }), g = new h.Mesh(p, v);
1783
+ return g.position.set(0, 0, S.FACE_THICKNESS / 2 + 0.01), s.add(g), s.position.copy(t), s.rotation.copy(i), s;
1784
+ }
1785
+ }
1760
1786
  class Mi {
1761
- // Function to create texture with text on a canvas
1787
+ constructor() {
1788
+ this.hoveredObject = null, this.originalColor = null;
1789
+ }
1790
+ get vectorToCube() {
1791
+ var t;
1792
+ return (t = this.hoveredObject) == null ? void 0 : t.userData.vectorToCube;
1793
+ }
1794
+ createTextSprite(t, i) {
1795
+ const o = document.createElement("canvas");
1796
+ o.width = 64, o.height = 64;
1797
+ const s = o.getContext("2d");
1798
+ s.fillStyle = "rgba(0, 0, 0, 0)", s.fillRect(0, 0, o.width, o.height), s.font = "Bold 48px Arial", s.fillStyle = `#${i.toString(16).padStart(6, "0")}`, s.textAlign = "center", s.textBaseline = "middle", s.fillText(t, o.width / 2, o.height / 2);
1799
+ const l = new h.CanvasTexture(o), d = new h.SpriteMaterial({ map: l }), u = new h.Sprite(d);
1800
+ return u.scale.set(0.5, 0.5, 0.5), u;
1801
+ }
1762
1802
  createTextTexture(t) {
1763
- const i = document.createElement("canvas"), r = i.getContext("2d");
1764
- return i.width = 256, i.height = 256, r.fillStyle = "#93a5aa", r.fillRect(0, 0, i.width, i.height), r.font = "48px Arial", r.fillStyle = "#000000", r.textAlign = "center", r.textBaseline = "middle", r.fillText(t, i.width / 2, i.height / 2), new y.CanvasTexture(i);
1765
- }
1766
- _create() {
1767
- const t = [
1768
- new y.MeshStandardMaterial({ map: this.createTextTexture("RIGHT") }),
1769
- new y.MeshStandardMaterial({ map: this.createTextTexture("LEFT") }),
1770
- new y.MeshStandardMaterial({ map: this.createTextTexture("TOP") }),
1771
- new y.MeshStandardMaterial({ map: this.createTextTexture("BOTTOM") }),
1772
- new y.MeshStandardMaterial({ map: this.createTextTexture("FRONT") }),
1773
- new y.MeshStandardMaterial({ map: this.createTextTexture("BACK") })
1774
- ], i = new y.BoxGeometry(2, 2, 2), r = new y.Mesh(i, t), a = new y.Group();
1775
- a.add(r);
1776
- const u = new y.EdgesGeometry(i), p = new y.LineBasicMaterial({ color: 0 }), d = new y.LineSegments(u, p);
1777
- return a.add(d), a;
1803
+ return ei.createTextTexture(t);
1804
+ }
1805
+ createWireframe() {
1806
+ const t = S.CUBE_SIZE + S.EDGE_SECTION_SIZE, i = qt.createWireframe([t, t, t]);
1807
+ return i.userData.gizmoCube = this, i;
1808
+ }
1809
+ createEdgeBox(t, i, o) {
1810
+ const s = qt.createEdgeBox(t, i, o);
1811
+ return s.userData.gizmoCube = this, s;
1812
+ }
1813
+ createCornerCube(t, i) {
1814
+ const o = qt.createCornerCube(t, i);
1815
+ return o.userData.gizmoCube = this, o;
1816
+ }
1817
+ createFace(t, i, o) {
1818
+ const s = qt.createFace(t, i, o), l = s.getObjectByName(`Face Box ${o}`);
1819
+ return l.userData.gizmoCube = this, s;
1820
+ }
1821
+ createEdges(t) {
1822
+ const i = S.CUBE_SIZE / 2;
1823
+ [
1824
+ { axis: "x", pos: new h.Vector3(0, i, -i) },
1825
+ { axis: "x", pos: new h.Vector3(0, i, i) },
1826
+ { axis: "x", pos: new h.Vector3(0, -i, -i) },
1827
+ { axis: "x", pos: new h.Vector3(0, -i, i) },
1828
+ { axis: "y", pos: new h.Vector3(i, 0, -i) },
1829
+ { axis: "y", pos: new h.Vector3(i, 0, i) },
1830
+ { axis: "y", pos: new h.Vector3(-i, 0, -i) },
1831
+ { axis: "y", pos: new h.Vector3(-i, 0, i) },
1832
+ { axis: "z", pos: new h.Vector3(i, i, 0) },
1833
+ { axis: "z", pos: new h.Vector3(i, -i, 0) },
1834
+ { axis: "z", pos: new h.Vector3(-i, i, 0) },
1835
+ { axis: "z", pos: new h.Vector3(-i, -i, 0) }
1836
+ ].forEach(({ axis: o, pos: s }, l) => {
1837
+ const d = this.createEdgeBox(s, o, l + 1);
1838
+ t.add(d);
1839
+ });
1840
+ }
1841
+ createCorners(t) {
1842
+ const i = S.CUBE_SIZE / 2;
1843
+ [
1844
+ new h.Vector3(-i, -i, -i),
1845
+ new h.Vector3(-i, -i, i),
1846
+ new h.Vector3(-i, i, -i),
1847
+ new h.Vector3(-i, i, i),
1848
+ new h.Vector3(i, -i, -i),
1849
+ new h.Vector3(i, -i, i),
1850
+ new h.Vector3(i, i, -i),
1851
+ new h.Vector3(i, i, i)
1852
+ ].forEach((o, s) => {
1853
+ const l = this.createCornerCube(o, s + 1);
1854
+ t.add(l);
1855
+ });
1856
+ }
1857
+ createFaces(t) {
1858
+ const i = S.CUBE_SIZE / 2;
1859
+ [
1860
+ { pos: new h.Vector3(0, 0, i), rotation: new h.Euler(0, 0, 0), label: "FRONT" },
1861
+ { pos: new h.Vector3(0, 0, -i), rotation: new h.Euler(0, Math.PI, 0), label: "BACK" },
1862
+ { pos: new h.Vector3(i, 0, 0), rotation: new h.Euler(0, Math.PI / 2, 0), label: "RIGHT" },
1863
+ { pos: new h.Vector3(-i, 0, 0), rotation: new h.Euler(0, -Math.PI / 2, 0), label: "LEFT" },
1864
+ { pos: new h.Vector3(0, i, 0), rotation: new h.Euler(-Math.PI / 2, 0, 0), label: "TOP" },
1865
+ { pos: new h.Vector3(0, -i, 0), rotation: new h.Euler(Math.PI / 2, 0, 0), label: "BOTTOM" }
1866
+ ].forEach(({ pos: o, rotation: s, label: l }) => {
1867
+ const d = this.createFace(o, s, l);
1868
+ t.add(d);
1869
+ });
1870
+ }
1871
+ createAxis(t) {
1872
+ const { color: i, direction: o, length: s, origin: l, lineWidth: d, label: u } = t, p = new h.Group(), v = d / 2, g = new h.CylinderGeometry(v, v, s, 32), C = new h.MeshBasicMaterial({ color: i }), P = new h.Mesh(g, C);
1873
+ if (P.position.copy(l).add(o.clone().multiplyScalar(s / 2)), !o.equals(new h.Vector3(0, 1, 0))) {
1874
+ const Z = new h.Vector3(0, 1, 0).cross(o).normalize(), U = Math.acos(new h.Vector3(0, 1, 0).dot(o));
1875
+ P.setRotationFromAxisAngle(Z, U);
1876
+ }
1877
+ p.add(P);
1878
+ const I = this.createTextSprite(u, i);
1879
+ return I.position.copy(l).add(o.clone().multiplyScalar(s + 0.1)), p.add(I), p;
1880
+ }
1881
+ createCoordinateAxes() {
1882
+ const t = new h.Group(), i = S.CUBE_SIZE, o = S.EDGE_SECTION_SIZE, s = -(i / 2 + o / 2), l = (u) => {
1883
+ const p = new h.Vector3(1, 1, 1);
1884
+ return new h.Vector3(u, u, u).add(p.clone().normalize().negate().multiplyScalar(0.04));
1885
+ }, d = i + 1.25 * o;
1886
+ return [
1887
+ {
1888
+ color: 16711680,
1889
+ direction: new h.Vector3(1, 0, 0),
1890
+ length: d,
1891
+ origin: l(s),
1892
+ lineWidth: 0.04,
1893
+ // Increased line thickness
1894
+ label: "X"
1895
+ },
1896
+ {
1897
+ color: 65280,
1898
+ direction: new h.Vector3(0, 1, 0),
1899
+ length: d,
1900
+ origin: l(s),
1901
+ lineWidth: 0.04,
1902
+ label: "Y"
1903
+ },
1904
+ {
1905
+ color: 255,
1906
+ direction: new h.Vector3(0, 0, 1),
1907
+ length: d,
1908
+ origin: l(s),
1909
+ lineWidth: 0.04,
1910
+ label: "Z"
1911
+ }
1912
+ ].forEach((u) => {
1913
+ const p = this.createAxis(u);
1914
+ t.add(p);
1915
+ }), t;
1778
1916
  }
1779
1917
  create() {
1780
- return this._create();
1918
+ const t = new h.Group();
1919
+ t.name = "Gizmo Group";
1920
+ const i = this.createWireframe();
1921
+ t.add(i), this.createEdges(t), this.createCorners(t), this.createFaces(t);
1922
+ const o = this.createCoordinateAxes();
1923
+ return t.add(o), t;
1924
+ }
1925
+ highlightObject(t) {
1926
+ if (this.hoveredObject !== t)
1927
+ if (this.hoveredObject && this.originalColor && this.hoveredObject.material.color.set(this.originalColor), t && t instanceof h.Mesh) {
1928
+ const i = t.material;
1929
+ this.hoveredObject = t, this.originalColor = i.color.clone(), i.color.set(11519973);
1930
+ } else
1931
+ this.hoveredObject = null, this.originalColor = null;
1932
+ }
1933
+ handleClick() {
1934
+ if (this.hoveredObject) {
1935
+ let t = new h.Vector3();
1936
+ t = this.hoveredObject.getWorldPosition(t).clone();
1937
+ const i = new h.Vector3(0, 0, 0), o = t.sub(i).normalize();
1938
+ this.hoveredObject.userData.vectorToCube = o;
1939
+ }
1781
1940
  }
1782
1941
  }
1783
- class Ci {
1942
+ class xi {
1784
1943
  constructor(t) {
1785
1944
  this.onChangeMainControlsListener = () => {
1786
1945
  }, this.onChangeGizmoControlsListener = () => {
1787
1946
  }, this.animationId = 0;
1788
- const { gizmoParams: i, mainParams: r, syncFunctions: a } = t;
1789
- this.gizmoDiv = i.gizmoDiv, this.gizmoScene = i.gizmoScene, this.gizmoRenderer = i.gizmoRenderer, this.gizmoCamera = i.gizmoCamera, this.mainCamera = r.mainCamera, this.mainControls = r.mainControls, this.renderGizmo = r.renderGizmo, this.syncFunctions = a, this.gizmoControls = new pi(this.gizmoCamera, this.gizmoRenderer.domElement), this.initializeRenderer(), this.initializeScene(), this.initializeControls(), this.startAnimationLoop();
1947
+ const { gizmoParams: i, mainParams: o, syncFunctions: s } = t;
1948
+ this.gizmoDiv = i.gizmoDiv, this.gizmoScene = i.gizmoScene, this.gizmoRenderer = i.gizmoRenderer, this.gizmoCamera = i.gizmoCamera, this.mainCamera = o.mainCamera, this.mainControls = o.mainControls, this.renderGizmo = o.renderGizmo, this.syncFunctions = s, this.gizmoControls = new _i(this.gizmoCamera, this.gizmoRenderer.domElement), this.initializeRenderer(), this.initializeScene(), this.initializeControls(), this.startAnimationLoop();
1790
1949
  }
1791
1950
  initializeRenderer() {
1792
- this.gizmoRenderer.setPixelRatio(window.devicePixelRatio), this.gizmoRenderer.setSize(100, 100), this.gizmoDiv.appendChild(this.gizmoRenderer.domElement);
1951
+ this.gizmoRenderer.setPixelRatio(window.devicePixelRatio), this.gizmoRenderer.setSize(this.gizmoDiv.clientWidth, this.gizmoDiv.clientHeight), this.gizmoDiv.appendChild(this.gizmoRenderer.domElement);
1793
1952
  }
1794
1953
  initializeScene() {
1795
1954
  const t = new Mi().create();
1796
- this.gizmoScene.add(t), Ri(this.gizmoScene);
1955
+ t && this.gizmoScene.add(t), Di(this.gizmoScene);
1797
1956
  }
1798
1957
  initializeControls() {
1799
- this.onChangeMainControlsListener = () => this.syncFunctions.syncGizmoCameraWithMain(this.gizmoCamera, this.mainCamera), this.mainControls.addEventListener("change", this.onChangeMainControlsListener), this.gizmoControls.enableZoom = !1, this.gizmoControls.update(), this.onChangeGizmoControlsListener = () => {
1800
- this.syncFunctions.syncMainCameraWithGizmo(this.mainCamera, this.gizmoCamera), this.renderGizmo();
1958
+ this.onChangeMainControlsListener = () => this.syncFunctions.syncGizmoCameraWithMain(this.gizmoCamera, this.mainCamera), this.mainControls.addEventListener("change", this.onChangeMainControlsListener), this.gizmoControls.enableZoom = !1, this.gizmoControls.enablePan = !1, this.gizmoControls.rotateSpeed = 0.5, this.gizmoControls.update(), this.onChangeGizmoControlsListener = () => {
1959
+ this.syncFunctions.syncMainCameraWithGizmo(this.mainCamera, this.gizmoCamera, this.mainControls), this.renderGizmo();
1801
1960
  }, this.gizmoControls.addEventListener("change", this.onChangeGizmoControlsListener);
1802
1961
  }
1803
1962
  startAnimationLoop() {
@@ -1812,48 +1971,94 @@ class Ci {
1812
1971
  this.mainControls.removeEventListener("change", this.onChangeMainControlsListener), this.gizmoControls.removeEventListener("change", this.onChangeGizmoControlsListener), this.gizmoScene.clear(), cancelAnimationFrame(this.animationId);
1813
1972
  }
1814
1973
  }
1815
- const Oi = ({ camera: o, className: t, controls: i, render: r }) => {
1816
- const a = $(null), u = $(new y.Scene()).current, p = $(ui()).current, d = $(new y.PerspectiveCamera(50, 1, 0.1, 100)).current, m = $(null), E = Ze(() => {
1817
- p && (r(), p.render(u, d));
1818
- }, [r, p, u, d]);
1819
- Ht(() => {
1820
- const S = a.current;
1821
- if (!S || !o || !i || !p) return;
1822
- m.current && m.current.dispose();
1823
- const M = {
1824
- gizmoDiv: S,
1825
- gizmoScene: u,
1826
- gizmoRenderer: p,
1827
- gizmoCamera: d
1828
- }, z = {
1829
- mainCamera: o,
1830
- mainControls: i,
1831
- renderGizmo: E
1832
- }, Z = {
1833
- syncGizmoCameraWithMain: Ie,
1834
- syncMainCameraWithGizmo: li
1974
+ const ji = ({ camera: n, controls: t, className: i, render: o }) => {
1975
+ const s = X(null), l = X(new h.Scene()).current, d = X(fi()).current, u = X(new h.PerspectiveCamera(50, 1, 0.1, 100)).current, p = X(null), [v, g] = Ke(!1), C = X(null), P = X(null), I = X(new h.Raycaster()).current, Z = X(new h.Vector2()).current, U = at(() => {
1976
+ d && (o(), d.render(l, u));
1977
+ }, [o, d, l, u]), J = (T, O, N, it) => {
1978
+ const dt = performance.now(), L = () => {
1979
+ const V = performance.now() - dt, G = Math.min(V / N, 1);
1980
+ n.position.lerpVectors(T, O, G), t == null || t.update(), it(), G < 1 && requestAnimationFrame(L);
1981
+ };
1982
+ requestAnimationFrame(L);
1983
+ }, k = at((T) => {
1984
+ if (!n || !t) return;
1985
+ const O = n.position.length(), N = T.clone().multiplyScalar(O);
1986
+ J(n.position.clone(), N, 400, U), n.lookAt(new h.Vector3(0, 0, 0)), n.up.set(0, 1, 0), t.target.set(0, 0, 0);
1987
+ }, [n, t, U]), w = at((T) => {
1988
+ if (!d) return;
1989
+ const O = d.domElement.getBoundingClientRect();
1990
+ Z.x = (T.clientX - O.left) / O.width * 2 - 1, Z.y = -((T.clientY - O.top) / O.height) * 2 + 1;
1991
+ }, [d, Z]), ht = at(() => {
1992
+ var T;
1993
+ if (!u || !l) return null;
1994
+ I.setFromCamera(Z, u);
1995
+ const O = I.intersectObjects(l.children, !0), N = ["Wireframe", ""];
1996
+ return ((T = O.find((it) => !N.includes(it.object.name))) == null ? void 0 : T.object) || null;
1997
+ }, [u, l, I, Z]), wt = at((T) => {
1998
+ const O = T == null ? void 0 : T.userData.gizmoCube;
1999
+ if (T && O) {
2000
+ O.handleClick();
2001
+ const N = O.vectorToCube;
2002
+ N && k(N);
2003
+ }
2004
+ }, [k]), lt = at((T) => {
2005
+ C.current = Date.now(), P.current = { x: T.clientX, y: T.clientY }, g(!1);
2006
+ }, []), ct = at((T) => {
2007
+ if (!p.current) return;
2008
+ w(T);
2009
+ const O = ht();
2010
+ if (O && O.userData.gizmoCube)
2011
+ O.userData.gizmoCube.highlightObject(O);
2012
+ else {
2013
+ const N = l.children[0];
2014
+ N && N.userData.gizmoCube && N.userData.gizmoCube.highlightObject(null);
2015
+ }
2016
+ U();
2017
+ }, [w, ht, l, U]), ut = at((T) => {
2018
+ const O = C.current ? Date.now() - C.current : 0;
2019
+ if (!v && O < 200) {
2020
+ w(T);
2021
+ const N = ht();
2022
+ wt(N);
2023
+ }
2024
+ C.current = null, P.current = null, g(!1);
2025
+ }, [v, w, ht, wt]);
2026
+ return Jt(() => {
2027
+ const T = s.current;
2028
+ if (!T || !n || !t || !d) return;
2029
+ p.current && p.current.dispose();
2030
+ const O = {
2031
+ gizmoDiv: T,
2032
+ gizmoScene: l,
2033
+ gizmoRenderer: d,
2034
+ gizmoCamera: u
2035
+ }, N = {
2036
+ mainCamera: n,
2037
+ mainControls: t,
2038
+ renderGizmo: U
2039
+ }, it = {
2040
+ syncGizmoCameraWithMain: Ue,
2041
+ syncMainCameraWithGizmo: di
1835
2042
  };
1836
- return m.current = new Ci({
1837
- gizmoParams: M,
1838
- mainParams: z,
1839
- syncFunctions: Z
1840
- }), () => {
1841
- m.current && (m.current.dispose(), m.current = null);
2043
+ return p.current = new xi({
2044
+ gizmoParams: O,
2045
+ mainParams: N,
2046
+ syncFunctions: it
2047
+ }), T.addEventListener("mousedown", lt), T.addEventListener("mousemove", ct), T.addEventListener("mouseup", ut), () => {
2048
+ p.current && (p.current.dispose(), p.current = null), T.removeEventListener("mousedown", lt), T.removeEventListener("mousemove", ct), T.removeEventListener("mouseup", ut);
1842
2049
  };
1843
- }, [o, i, E]), Ht(() => {
1844
- o && (Ie(d, o), E());
1845
- }, [o, E]);
1846
- const b = Xe(() => "gizmo-default" + (t ? ` ${t}` : ""), [t]);
1847
- return /* @__PURE__ */ hi.jsx(
2050
+ }, [n, t, U, ct, lt, ut]), Jt(() => {
2051
+ n && (Ue(u, n), U());
2052
+ }, [n, U]), /* @__PURE__ */ ui.jsx(
1848
2053
  "div",
1849
2054
  {
1850
- className: b,
1851
- ref: a
2055
+ className: i ? `${i}` : "gizmo-default",
2056
+ ref: s
1852
2057
  }
1853
2058
  );
1854
- }, xi = (o, t, i) => {
1855
- window.removeEventListener("resize", i), o.current && o.current.removeChild(t.domElement);
1856
- }, ji = 1, Ue = 12 * ji, Qe = 1e3 / 50, He = { type: "change" }, je = { type: "start" }, ti = { type: "end" }, Ut = new Ve(), We = new Ge(), Li = Math.cos(70 * $e.DEG2RAD), A = new j(), U = 2 * Math.PI, D = {
2059
+ }, Li = (n, t, i) => {
2060
+ window.removeEventListener("resize", i), n.current && n.current.removeChild(t.domElement);
2061
+ }, ki = 1, We = 12 * ki, ii = 1e3 / 50, He = { type: "change" }, Ae = { type: "start" }, oi = { type: "end" }, Qt = new Xe(), Ge = new $e(), Ai = Math.cos(70 * qe.DEG2RAD), Y = new z(), K = 2 * Math.PI, x = {
1857
2062
  NONE: -1,
1858
2063
  ROTATE: 0,
1859
2064
  DOLLY: 1,
@@ -1862,10 +2067,10 @@ const Oi = ({ camera: o, className: t, controls: i, render: r }) => {
1862
2067
  TOUCH_PAN: 4,
1863
2068
  TOUCH_DOLLY_PAN: 5,
1864
2069
  TOUCH_DOLLY_ROTATE: 6
1865
- }, Me = 1e-6;
1866
- class ei extends Be {
2070
+ }, xe = 1e-6;
2071
+ class ni extends Qe {
1867
2072
  constructor(t, i = null) {
1868
- super(t, i), this.state = D.NONE, this.enabled = !0, this.target = new j(), this.cursor = new j(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: F.ROTATE, MIDDLE: F.DOLLY, RIGHT: F.PAN }, this.touches = { ONE: H.ROTATE, TWO: H.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new j(), this._lastQuaternion = new Wt(), this._lastTargetPosition = new j(), this._quat = new Wt().setFromUnitVectors(t.up, new j(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Kt(), this._sphericalDelta = new Kt(), this._scale = 1, this._panOffset = new j(), this._rotateStart = new O(), this._rotateEnd = new O(), this._rotateDelta = new O(), this._panStart = new O(), this._panEnd = new O(), this._panDelta = new O(), this._dollyStart = new O(), this._dollyEnd = new O(), this._dollyDelta = new O(), this._dollyDirection = new j(), this._mouse = new O(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Ai.bind(this), this._onPointerDown = ki.bind(this), this._onPointerUp = zi.bind(this), this._onContextMenu = Wi.bind(this), this._onMouseWheel = Fi.bind(this), this._onKeyDown = Yi.bind(this), this._onTouchStart = Ui.bind(this), this._onTouchMove = Hi.bind(this), this._onMouseDown = Ni.bind(this), this._onMouseMove = Ii.bind(this), this._interceptControlDown = Ki.bind(this), this._interceptControlUp = Zi.bind(this), this.domElement !== null && this.connect(), this.update();
2073
+ super(t, i), this.state = x.NONE, this.enabled = !0, this.target = new z(), this.cursor = new z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: H.ROTATE, MIDDLE: H.DOLLY, RIGHT: H.PAN }, this.touches = { ONE: $.ROTATE, TWO: $.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new z(), this._lastQuaternion = new te(), this._lastTargetPosition = new z(), this._quat = new te().setFromUnitVectors(t.up, new z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new ee(), this._sphericalDelta = new ee(), this._scale = 1, this._panOffset = new z(), this._rotateStart = new A(), this._rotateEnd = new A(), this._rotateDelta = new A(), this._panStart = new A(), this._panEnd = new A(), this._panDelta = new A(), this._dollyStart = new A(), this._dollyEnd = new A(), this._dollyDelta = new A(), this._dollyDirection = new z(), this._mouse = new A(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Ni.bind(this), this._onPointerDown = Ii.bind(this), this._onPointerUp = zi.bind(this), this._onContextMenu = Hi.bind(this), this._onMouseWheel = Ui.bind(this), this._onKeyDown = Zi.bind(this), this._onTouchStart = Vi.bind(this), this._onTouchMove = Wi.bind(this), this._onMouseDown = Fi.bind(this), this._onMouseMove = Yi.bind(this), this._interceptControlDown = Gi.bind(this), this._interceptControlUp = Bi.bind(this), this.domElement !== null && this.connect(), this.update();
1869
2074
  }
1870
2075
  connect() {
1871
2076
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -1895,45 +2100,45 @@ class ei extends Be {
1895
2100
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
1896
2101
  }
1897
2102
  reset() {
1898
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(He), this.update(), this.state = D.NONE;
2103
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(He), this.update(), this.state = x.NONE;
1899
2104
  }
1900
2105
  update(t = null) {
1901
2106
  const i = this.object.position;
1902
- A.copy(i).sub(this.target), A.applyQuaternion(this._quat), this._spherical.setFromVector3(A), this.autoRotate && this.state === D.NONE && this._rotateLeft(this._getAutoRotationAngle(t)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
1903
- let r = this.minAzimuthAngle, a = this.maxAzimuthAngle;
1904
- isFinite(r) && isFinite(a) && (r < -Math.PI ? r += U : r > Math.PI && (r -= U), a < -Math.PI ? a += U : a > Math.PI && (a -= U), r <= a ? this._spherical.theta = Math.max(r, Math.min(a, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (r + a) / 2 ? Math.max(r, this._spherical.theta) : Math.min(a, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
1905
- let u = !1;
2107
+ Y.copy(i).sub(this.target), Y.applyQuaternion(this._quat), this._spherical.setFromVector3(Y), this.autoRotate && this.state === x.NONE && this._rotateLeft(this._getAutoRotationAngle(t)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
2108
+ let o = this.minAzimuthAngle, s = this.maxAzimuthAngle;
2109
+ isFinite(o) && isFinite(s) && (o < -Math.PI ? o += K : o > Math.PI && (o -= K), s < -Math.PI ? s += K : s > Math.PI && (s -= K), o <= s ? this._spherical.theta = Math.max(o, Math.min(s, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (o + s) / 2 ? Math.max(o, this._spherical.theta) : Math.min(s, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
2110
+ let l = !1;
1906
2111
  if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
1907
2112
  this._spherical.radius = this._clampDistance(this._spherical.radius);
1908
2113
  else {
1909
- const p = this._spherical.radius;
1910
- this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), u = p != this._spherical.radius;
2114
+ const d = this._spherical.radius;
2115
+ this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), l = d != this._spherical.radius;
1911
2116
  }
1912
- if (A.setFromSpherical(this._spherical), A.applyQuaternion(this._quatInverse), i.copy(this.target).add(A), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
1913
- let p = null;
2117
+ if (Y.setFromSpherical(this._spherical), Y.applyQuaternion(this._quatInverse), i.copy(this.target).add(Y), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
2118
+ let d = null;
1914
2119
  if (this.object.isPerspectiveCamera) {
1915
- const d = A.length();
1916
- p = this._clampDistance(d * this._scale);
1917
- const m = d - p;
1918
- this.object.position.addScaledVector(this._dollyDirection, m), this.object.updateMatrixWorld(), u = !!m;
2120
+ const u = Y.length();
2121
+ d = this._clampDistance(u * this._scale);
2122
+ const p = u - d;
2123
+ this.object.position.addScaledVector(this._dollyDirection, p), this.object.updateMatrixWorld(), l = !!p;
1919
2124
  } else if (this.object.isOrthographicCamera) {
1920
- const d = new j(this._mouse.x, this._mouse.y, 0);
1921
- d.unproject(this.object);
1922
- const m = this.object.zoom;
1923
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), u = m !== this.object.zoom;
1924
- const E = new j(this._mouse.x, this._mouse.y, 0);
1925
- E.unproject(this.object), this.object.position.sub(E).add(d), this.object.updateMatrixWorld(), p = A.length();
2125
+ const u = new z(this._mouse.x, this._mouse.y, 0);
2126
+ u.unproject(this.object);
2127
+ const p = this.object.zoom;
2128
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), l = p !== this.object.zoom;
2129
+ const v = new z(this._mouse.x, this._mouse.y, 0);
2130
+ v.unproject(this.object), this.object.position.sub(v).add(u), this.object.updateMatrixWorld(), d = Y.length();
1926
2131
  } else
1927
2132
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
1928
- p !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(p).add(this.object.position) : (Ut.origin.copy(this.object.position), Ut.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ut.direction)) < Li ? this.object.lookAt(this.target) : (We.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ut.intersectPlane(We, this.target))));
2133
+ d !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(d).add(this.object.position) : (Qt.origin.copy(this.object.position), Qt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Qt.direction)) < Ai ? this.object.lookAt(this.target) : (Ge.setFromNormalAndCoplanarPoint(this.object.up, this.target), Qt.intersectPlane(Ge, this.target))));
1929
2134
  } else if (this.object.isOrthographicCamera) {
1930
- const p = this.object.zoom;
1931
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), p !== this.object.zoom && (this.object.updateProjectionMatrix(), u = !0);
2135
+ const d = this.object.zoom;
2136
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), d !== this.object.zoom && (this.object.updateProjectionMatrix(), l = !0);
1932
2137
  }
1933
- return this._scale = 1, this._performCursorZoom = !1, u || this._lastPosition.distanceToSquared(this.object.position) > Me || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Me || this._lastTargetPosition.distanceToSquared(this.target) > Me ? (this.dispatchEvent(He), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
2138
+ return this._scale = 1, this._performCursorZoom = !1, l || this._lastPosition.distanceToSquared(this.object.position) > xe || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > xe || this._lastTargetPosition.distanceToSquared(this.target) > xe ? (this.dispatchEvent(He), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
1934
2139
  }
1935
2140
  _getAutoRotationAngle(t) {
1936
- return t !== null ? U / 60 * this.autoRotateSpeed * t : U / 60 / 60 * this.autoRotateSpeed;
2141
+ return t !== null ? K / 60 * this.autoRotateSpeed * t : K / 60 / 60 * this.autoRotateSpeed;
1937
2142
  }
1938
2143
  _getZoomScale(t) {
1939
2144
  const i = Math.abs(t * 0.01);
@@ -1946,20 +2151,20 @@ class ei extends Be {
1946
2151
  this._sphericalDelta.phi -= t;
1947
2152
  }
1948
2153
  _panLeft(t, i) {
1949
- A.setFromMatrixColumn(i, 0), A.multiplyScalar(-t), this._panOffset.add(A);
2154
+ Y.setFromMatrixColumn(i, 0), Y.multiplyScalar(-t), this._panOffset.add(Y);
1950
2155
  }
1951
2156
  _panUp(t, i) {
1952
- this.screenSpacePanning === !0 ? A.setFromMatrixColumn(i, 1) : (A.setFromMatrixColumn(i, 0), A.crossVectors(this.object.up, A)), A.multiplyScalar(t), this._panOffset.add(A);
2157
+ this.screenSpacePanning === !0 ? Y.setFromMatrixColumn(i, 1) : (Y.setFromMatrixColumn(i, 0), Y.crossVectors(this.object.up, Y)), Y.multiplyScalar(t), this._panOffset.add(Y);
1953
2158
  }
1954
2159
  // deltaX and deltaY are in pixels; right and down are positive
1955
2160
  _pan(t, i) {
1956
- const r = this.domElement;
2161
+ const o = this.domElement;
1957
2162
  if (this.object.isPerspectiveCamera) {
1958
- const a = this.object.position;
1959
- A.copy(a).sub(this.target);
1960
- let u = A.length();
1961
- u *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * t * u / r.clientHeight, this.object.matrix), this._panUp(2 * i * u / r.clientHeight, this.object.matrix);
1962
- } else this.object.isOrthographicCamera ? (this._panLeft(t * (this.object.right - this.object.left) / this.object.zoom / r.clientWidth, this.object.matrix), this._panUp(i * (this.object.top - this.object.bottom) / this.object.zoom / r.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
2163
+ const s = this.object.position;
2164
+ Y.copy(s).sub(this.target);
2165
+ let l = Y.length();
2166
+ l *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * t * l / o.clientHeight, this.object.matrix), this._panUp(2 * i * l / o.clientHeight, this.object.matrix);
2167
+ } else this.object.isOrthographicCamera ? (this._panLeft(t * (this.object.right - this.object.left) / this.object.zoom / o.clientWidth, this.object.matrix), this._panUp(i * (this.object.top - this.object.bottom) / this.object.zoom / o.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
1963
2168
  }
1964
2169
  _dollyOut(t) {
1965
2170
  this.object.isPerspectiveCamera || this.object.isOrthographicCamera ? this._scale /= t : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), this.enableZoom = !1);
@@ -1971,8 +2176,8 @@ class ei extends Be {
1971
2176
  if (!this.zoomToCursor)
1972
2177
  return;
1973
2178
  this._performCursorZoom = !0;
1974
- const r = this.domElement.getBoundingClientRect(), a = t - r.left, u = i - r.top, p = r.width, d = r.height;
1975
- this._mouse.x = a / p * 2 - 1, this._mouse.y = -(u / d) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
2179
+ const o = this.domElement.getBoundingClientRect(), s = t - o.left, l = i - o.top, d = o.width, u = o.height;
2180
+ this._mouse.x = s / d * 2 - 1, this._mouse.y = -(l / u) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
1976
2181
  }
1977
2182
  _clampDistance(t) {
1978
2183
  return Math.max(this.minDistance, Math.min(this.maxDistance, t));
@@ -1992,7 +2197,7 @@ class ei extends Be {
1992
2197
  _handleMouseMoveRotate(t) {
1993
2198
  this._rotateEnd.set(t.clientX, t.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
1994
2199
  const i = this.domElement;
1995
- this._rotateLeft(U * this._rotateDelta.x / i.clientHeight), this._rotateUp(U * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
2200
+ this._rotateLeft(K * this._rotateDelta.x / i.clientHeight), this._rotateUp(K * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
1996
2201
  }
1997
2202
  _handleMouseMoveDolly(t) {
1998
2203
  this._dollyEnd.set(t.clientX, t.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
@@ -2007,16 +2212,16 @@ class ei extends Be {
2007
2212
  let i = !1;
2008
2213
  switch (t.code) {
2009
2214
  case this.keys.UP:
2010
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(U * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, this.keyPanSpeed), i = !0;
2215
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(K * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, this.keyPanSpeed), i = !0;
2011
2216
  break;
2012
2217
  case this.keys.BOTTOM:
2013
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(-U * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, -this.keyPanSpeed), i = !0;
2218
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateUp(-K * this.rotateSpeed / this.domElement.clientHeight) : this._pan(0, -this.keyPanSpeed), i = !0;
2014
2219
  break;
2015
2220
  case this.keys.LEFT:
2016
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(U * this.rotateSpeed / this.domElement.clientHeight) : this._pan(this.keyPanSpeed, 0), i = !0;
2221
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(K * this.rotateSpeed / this.domElement.clientHeight) : this._pan(this.keyPanSpeed, 0), i = !0;
2017
2222
  break;
2018
2223
  case this.keys.RIGHT:
2019
- t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(-U * this.rotateSpeed / this.domElement.clientHeight) : this._pan(-this.keyPanSpeed, 0), i = !0;
2224
+ t.ctrlKey || t.metaKey || t.shiftKey ? this._rotateLeft(-K * this.rotateSpeed / this.domElement.clientHeight) : this._pan(-this.keyPanSpeed, 0), i = !0;
2020
2225
  break;
2021
2226
  }
2022
2227
  i && (t.preventDefault(), this.update());
@@ -2025,21 +2230,21 @@ class ei extends Be {
2025
2230
  if (this._pointers.length === 1)
2026
2231
  this._rotateStart.set(t.pageX, t.pageY);
2027
2232
  else {
2028
- const i = this._getSecondPointerPosition(t), r = 0.5 * (t.pageX + i.x), a = 0.5 * (t.pageY + i.y);
2029
- this._rotateStart.set(r, a);
2233
+ const i = this._getSecondPointerPosition(t), o = 0.5 * (t.pageX + i.x), s = 0.5 * (t.pageY + i.y);
2234
+ this._rotateStart.set(o, s);
2030
2235
  }
2031
2236
  }
2032
2237
  _handleTouchStartPan(t) {
2033
2238
  if (this._pointers.length === 1)
2034
2239
  this._panStart.set(t.pageX, t.pageY);
2035
2240
  else {
2036
- const i = this._getSecondPointerPosition(t), r = 0.5 * (t.pageX + i.x), a = 0.5 * (t.pageY + i.y);
2037
- this._panStart.set(r, a);
2241
+ const i = this._getSecondPointerPosition(t), o = 0.5 * (t.pageX + i.x), s = 0.5 * (t.pageY + i.y);
2242
+ this._panStart.set(o, s);
2038
2243
  }
2039
2244
  }
2040
2245
  _handleTouchStartDolly(t) {
2041
- const i = this._getSecondPointerPosition(t), r = t.pageX - i.x, a = t.pageY - i.y, u = Math.sqrt(r * r + a * a);
2042
- this._dollyStart.set(0, u);
2246
+ const i = this._getSecondPointerPosition(t), o = t.pageX - i.x, s = t.pageY - i.y, l = Math.sqrt(o * o + s * s);
2247
+ this._dollyStart.set(0, l);
2043
2248
  }
2044
2249
  _handleTouchStartDollyPan(t) {
2045
2250
  this.enableZoom && this._handleTouchStartDolly(t), this.enablePan && this._handleTouchStartPan(t);
@@ -2051,27 +2256,27 @@ class ei extends Be {
2051
2256
  if (this._pointers.length == 1)
2052
2257
  this._rotateEnd.set(t.pageX, t.pageY);
2053
2258
  else {
2054
- const r = this._getSecondPointerPosition(t), a = 0.5 * (t.pageX + r.x), u = 0.5 * (t.pageY + r.y);
2055
- this._rotateEnd.set(a, u);
2259
+ const o = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + o.x), l = 0.5 * (t.pageY + o.y);
2260
+ this._rotateEnd.set(s, l);
2056
2261
  }
2057
2262
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
2058
2263
  const i = this.domElement;
2059
- this._rotateLeft(U * this._rotateDelta.x / i.clientHeight), this._rotateUp(U * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd);
2264
+ this._rotateLeft(K * this._rotateDelta.x / i.clientHeight), this._rotateUp(K * this._rotateDelta.y / i.clientHeight), this._rotateStart.copy(this._rotateEnd);
2060
2265
  }
2061
2266
  _handleTouchMovePan(t) {
2062
2267
  if (this._pointers.length === 1)
2063
2268
  this._panEnd.set(t.pageX, t.pageY);
2064
2269
  else {
2065
- const i = this._getSecondPointerPosition(t), r = 0.5 * (t.pageX + i.x), a = 0.5 * (t.pageY + i.y);
2066
- this._panEnd.set(r, a);
2270
+ const i = this._getSecondPointerPosition(t), o = 0.5 * (t.pageX + i.x), s = 0.5 * (t.pageY + i.y);
2271
+ this._panEnd.set(o, s);
2067
2272
  }
2068
2273
  this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
2069
2274
  }
2070
2275
  _handleTouchMoveDolly(t) {
2071
- const i = this._getSecondPointerPosition(t), r = t.pageX - i.x, a = t.pageY - i.y, u = Math.sqrt(r * r + a * a);
2072
- this._dollyEnd.set(0, u), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
2073
- const p = (t.pageX + i.x) * 0.5, d = (t.pageY + i.y) * 0.5;
2074
- this._updateZoomParameters(p, d);
2276
+ const i = this._getSecondPointerPosition(t), o = t.pageX - i.x, s = t.pageY - i.y, l = Math.sqrt(o * o + s * s);
2277
+ this._dollyEnd.set(0, l), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
2278
+ const d = (t.pageX + i.x) * 0.5, u = (t.pageY + i.y) * 0.5;
2279
+ this._updateZoomParameters(d, u);
2075
2280
  }
2076
2281
  _handleTouchMoveDollyPan(t) {
2077
2282
  this.enableZoom && this._handleTouchMoveDolly(t), this.enablePan && this._handleTouchMovePan(t);
@@ -2098,7 +2303,7 @@ class ei extends Be {
2098
2303
  }
2099
2304
  _trackPointer(t) {
2100
2305
  let i = this._pointerPositions[t.pointerId];
2101
- i === void 0 && (i = new O(), this._pointerPositions[t.pointerId] = i), i.set(t.pageX, t.pageY);
2306
+ i === void 0 && (i = new A(), this._pointerPositions[t.pointerId] = i), i.set(t.pageX, t.pageY);
2102
2307
  }
2103
2308
  _getSecondPointerPosition(t) {
2104
2309
  const i = t.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
@@ -2106,32 +2311,32 @@ class ei extends Be {
2106
2311
  }
2107
2312
  //
2108
2313
  _customWheelEvent(t) {
2109
- const i = t.deltaMode, r = {
2314
+ const i = t.deltaMode, o = {
2110
2315
  clientX: t.clientX,
2111
2316
  clientY: t.clientY,
2112
2317
  deltaY: t.deltaY
2113
2318
  };
2114
2319
  switch (i) {
2115
2320
  case 1:
2116
- r.deltaY *= 16;
2321
+ o.deltaY *= 16;
2117
2322
  break;
2118
2323
  case 2:
2119
- r.deltaY *= 100;
2324
+ o.deltaY *= 100;
2120
2325
  break;
2121
2326
  }
2122
- return t.ctrlKey && !this._controlActive && (r.deltaY *= 10), r;
2327
+ return t.ctrlKey && !this._controlActive && (o.deltaY *= 10), o;
2123
2328
  }
2124
2329
  }
2125
- function ki(o) {
2126
- this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(o.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(o) && (this._addPointer(o), o.pointerType === "touch" ? this._onTouchStart(o) : this._onMouseDown(o)));
2330
+ function Ii(n) {
2331
+ this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(n.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(n) && (this._addPointer(n), n.pointerType === "touch" ? this._onTouchStart(n) : this._onMouseDown(n)));
2127
2332
  }
2128
- function Ai(o) {
2129
- this.enabled !== !1 && (o.pointerType === "touch" ? this._onTouchMove(o) : this._onMouseMove(o));
2333
+ function Ni(n) {
2334
+ this.enabled !== !1 && (n.pointerType === "touch" ? this._onTouchMove(n) : this._onMouseMove(n));
2130
2335
  }
2131
- function zi(o) {
2132
- switch (this._removePointer(o), this._pointers.length) {
2336
+ function zi(n) {
2337
+ switch (this._removePointer(n), this._pointers.length) {
2133
2338
  case 0:
2134
- this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(ti), this.state = D.NONE;
2339
+ this.domElement.releasePointerCapture(n.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(oi), this.state = x.NONE;
2135
2340
  break;
2136
2341
  case 1:
2137
2342
  const t = this._pointers[0], i = this._pointerPositions[t];
@@ -2139,9 +2344,9 @@ function zi(o) {
2139
2344
  break;
2140
2345
  }
2141
2346
  }
2142
- function Ni(o) {
2347
+ function Fi(n) {
2143
2348
  let t;
2144
- switch (o.button) {
2349
+ switch (n.button) {
2145
2350
  case 0:
2146
2351
  t = this.mouseButtons.LEFT;
2147
2352
  break;
@@ -2155,269 +2360,269 @@ function Ni(o) {
2155
2360
  t = -1;
2156
2361
  }
2157
2362
  switch (t) {
2158
- case F.DOLLY:
2363
+ case H.DOLLY:
2159
2364
  if (this.enableZoom === !1) return;
2160
- this._handleMouseDownDolly(o), this.state = D.DOLLY;
2365
+ this._handleMouseDownDolly(n), this.state = x.DOLLY;
2161
2366
  break;
2162
- case F.ROTATE:
2163
- if (o.ctrlKey || o.metaKey || o.shiftKey) {
2367
+ case H.ROTATE:
2368
+ if (n.ctrlKey || n.metaKey || n.shiftKey) {
2164
2369
  if (this.enablePan === !1) return;
2165
- this._handleMouseDownPan(o), this.state = D.PAN;
2370
+ this._handleMouseDownPan(n), this.state = x.PAN;
2166
2371
  } else {
2167
2372
  if (this.enableRotate === !1) return;
2168
- this._handleMouseDownRotate(o), this.state = D.ROTATE;
2373
+ this._handleMouseDownRotate(n), this.state = x.ROTATE;
2169
2374
  }
2170
2375
  break;
2171
- case F.PAN:
2172
- if (o.ctrlKey || o.metaKey || o.shiftKey) {
2376
+ case H.PAN:
2377
+ if (n.ctrlKey || n.metaKey || n.shiftKey) {
2173
2378
  if (this.enableRotate === !1) return;
2174
- this._handleMouseDownRotate(o), this.state = D.ROTATE;
2379
+ this._handleMouseDownRotate(n), this.state = x.ROTATE;
2175
2380
  } else {
2176
2381
  if (this.enablePan === !1) return;
2177
- this._handleMouseDownPan(o), this.state = D.PAN;
2382
+ this._handleMouseDownPan(n), this.state = x.PAN;
2178
2383
  }
2179
2384
  break;
2180
2385
  default:
2181
- this.state = D.NONE;
2386
+ this.state = x.NONE;
2182
2387
  }
2183
- this.state !== D.NONE && this.dispatchEvent(je);
2388
+ this.state !== x.NONE && this.dispatchEvent(Ae);
2184
2389
  }
2185
- function Ii(o) {
2390
+ function Yi(n) {
2186
2391
  switch (this.state) {
2187
- case D.ROTATE:
2392
+ case x.ROTATE:
2188
2393
  if (this.enableRotate === !1) return;
2189
- this._handleMouseMoveRotate(o);
2394
+ this._handleMouseMoveRotate(n);
2190
2395
  break;
2191
- case D.DOLLY:
2396
+ case x.DOLLY:
2192
2397
  if (this.enableZoom === !1) return;
2193
- this._handleMouseMoveDolly(o);
2398
+ this._handleMouseMoveDolly(n);
2194
2399
  break;
2195
- case D.PAN:
2400
+ case x.PAN:
2196
2401
  if (this.enablePan === !1) return;
2197
- this._handleMouseMovePan(o);
2402
+ this._handleMouseMovePan(n);
2198
2403
  break;
2199
2404
  }
2200
2405
  }
2201
- function Fi(o) {
2202
- this.enabled === !1 || this.enableZoom === !1 || this.state !== D.NONE || (o.preventDefault(), this.dispatchEvent(je), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(ti));
2406
+ function Ui(n) {
2407
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== x.NONE || (n.preventDefault(), this.dispatchEvent(Ae), this._handleMouseWheel(this._customWheelEvent(n)), this.dispatchEvent(oi));
2203
2408
  }
2204
- function Yi(o) {
2205
- this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(o);
2409
+ function Zi(n) {
2410
+ this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(n);
2206
2411
  }
2207
- function Ui(o) {
2208
- switch (this._trackPointer(o), this._pointers.length) {
2412
+ function Vi(n) {
2413
+ switch (this._trackPointer(n), this._pointers.length) {
2209
2414
  case 1:
2210
2415
  switch (this.touches.ONE) {
2211
- case H.ROTATE:
2416
+ case $.ROTATE:
2212
2417
  if (this.enableRotate === !1) return;
2213
- this._handleTouchStartRotate(o), this.state = D.TOUCH_ROTATE;
2418
+ this._handleTouchStartRotate(n), this.state = x.TOUCH_ROTATE;
2214
2419
  break;
2215
- case H.PAN:
2420
+ case $.PAN:
2216
2421
  if (this.enablePan === !1) return;
2217
- this._handleTouchStartPan(o), this.state = D.TOUCH_PAN;
2422
+ this._handleTouchStartPan(n), this.state = x.TOUCH_PAN;
2218
2423
  break;
2219
2424
  default:
2220
- this.state = D.NONE;
2425
+ this.state = x.NONE;
2221
2426
  }
2222
2427
  break;
2223
2428
  case 2:
2224
2429
  switch (this.touches.TWO) {
2225
- case H.DOLLY_PAN:
2430
+ case $.DOLLY_PAN:
2226
2431
  if (this.enableZoom === !1 && this.enablePan === !1) return;
2227
- this._handleTouchStartDollyPan(o), this.state = D.TOUCH_DOLLY_PAN;
2432
+ this._handleTouchStartDollyPan(n), this.state = x.TOUCH_DOLLY_PAN;
2228
2433
  break;
2229
- case H.DOLLY_ROTATE:
2434
+ case $.DOLLY_ROTATE:
2230
2435
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
2231
- this._handleTouchStartDollyRotate(o), this.state = D.TOUCH_DOLLY_ROTATE;
2436
+ this._handleTouchStartDollyRotate(n), this.state = x.TOUCH_DOLLY_ROTATE;
2232
2437
  break;
2233
2438
  default:
2234
- this.state = D.NONE;
2439
+ this.state = x.NONE;
2235
2440
  }
2236
2441
  break;
2237
2442
  default:
2238
- this.state = D.NONE;
2443
+ this.state = x.NONE;
2239
2444
  }
2240
- this.state !== D.NONE && this.dispatchEvent(je);
2445
+ this.state !== x.NONE && this.dispatchEvent(Ae);
2241
2446
  }
2242
- function Hi(o) {
2243
- switch (this._trackPointer(o), this.state) {
2244
- case D.TOUCH_ROTATE:
2447
+ function Wi(n) {
2448
+ switch (this._trackPointer(n), this.state) {
2449
+ case x.TOUCH_ROTATE:
2245
2450
  if (this.enableRotate === !1) return;
2246
- this._handleTouchMoveRotate(o), this.update();
2451
+ this._handleTouchMoveRotate(n), this.update();
2247
2452
  break;
2248
- case D.TOUCH_PAN:
2453
+ case x.TOUCH_PAN:
2249
2454
  if (this.enablePan === !1) return;
2250
- this._handleTouchMovePan(o), this.update();
2455
+ this._handleTouchMovePan(n), this.update();
2251
2456
  break;
2252
- case D.TOUCH_DOLLY_PAN:
2457
+ case x.TOUCH_DOLLY_PAN:
2253
2458
  if (this.enableZoom === !1 && this.enablePan === !1) return;
2254
- this._handleTouchMoveDollyPan(o), this.update();
2459
+ this._handleTouchMoveDollyPan(n), this.update();
2255
2460
  break;
2256
- case D.TOUCH_DOLLY_ROTATE:
2461
+ case x.TOUCH_DOLLY_ROTATE:
2257
2462
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
2258
- this._handleTouchMoveDollyRotate(o), this.update();
2463
+ this._handleTouchMoveDollyRotate(n), this.update();
2259
2464
  break;
2260
2465
  default:
2261
- this.state = D.NONE;
2466
+ this.state = x.NONE;
2262
2467
  }
2263
2468
  }
2264
- function Wi(o) {
2265
- this.enabled !== !1 && o.preventDefault();
2469
+ function Hi(n) {
2470
+ this.enabled !== !1 && n.preventDefault();
2266
2471
  }
2267
- function Ki(o) {
2268
- o.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
2472
+ function Gi(n) {
2473
+ n.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
2269
2474
  }
2270
- function Zi(o) {
2271
- o.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
2475
+ function Bi(n) {
2476
+ n.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
2272
2477
  }
2273
- class Xi extends ei {
2478
+ class Ki extends ni {
2274
2479
  constructor(t, i) {
2275
- super(t, i), this.screenSpacePanning = !1, this.mouseButtons = { LEFT: F.PAN, MIDDLE: F.DOLLY, RIGHT: F.ROTATE }, this.touches = { ONE: H.PAN, TWO: H.DOLLY_ROTATE };
2480
+ super(t, i), this.screenSpacePanning = !1, this.mouseButtons = { LEFT: H.PAN, MIDDLE: H.DOLLY, RIGHT: H.ROTATE }, this.touches = { ONE: $.PAN, TWO: $.DOLLY_ROTATE };
2276
2481
  }
2277
2482
  }
2278
- class Vi {
2483
+ class Xi {
2279
2484
  constructor(t) {
2280
- this.object = t, this.boundingBox = new y.Box3().setFromObject(this.object);
2485
+ this.object = t, this.boundingBox = new h.Box3().setFromObject(this.object);
2281
2486
  }
2282
2487
  alignToFloor() {
2283
2488
  const t = this.calculateFloorOffset();
2284
2489
  this.applyOffset(t);
2285
2490
  }
2286
2491
  calculateFloorOffset() {
2287
- const t = this.boundingBox.min.y, i = this.boundingBox.max.y - t, r = new y.Vector3();
2288
- return i > 0 ? r.y = -t : r.y = 0, r;
2492
+ const t = this.boundingBox.min.y, i = this.boundingBox.max.y - t, o = new h.Vector3();
2493
+ return i > 0 ? o.y = -t : o.y = 0, o;
2289
2494
  }
2290
2495
  applyOffset(t) {
2291
2496
  this.object.position.add(t);
2292
2497
  }
2293
2498
  }
2294
- var Le = /* @__PURE__ */ ((o) => (o.MapsControls = "MapControls", o.OrbitControls = "OrbitControls", o))(Le || {});
2295
- const ii = (o, t) => {
2499
+ var Ie = /* @__PURE__ */ ((n) => (n.MapsControls = "MapControls", n.OrbitControls = "OrbitControls", n))(Ie || {});
2500
+ const ri = (n, t) => {
2296
2501
  let i;
2297
- return (...r) => {
2298
- i || (o(...r), i = !0, setTimeout(() => {
2502
+ return (...o) => {
2503
+ i || (n(...o), i = !0, setTimeout(() => {
2299
2504
  i = !1;
2300
2505
  }, t));
2301
2506
  };
2302
2507
  };
2303
- class Gi {
2304
- constructor(t, i, r) {
2305
- this.position = t, this.size = i, this.color = r;
2508
+ class $i {
2509
+ constructor(t, i, o) {
2510
+ this.position = t, this.size = i, this.color = o;
2306
2511
  }
2307
2512
  createMesh() {
2308
- const t = new y.CircleGeometry(this.size, 6), i = new y.EdgesGeometry(t), r = new y.LineBasicMaterial({ color: this.color }), a = new y.LineSegments(i, r);
2309
- return a.position.set(this.position.x, this.position.y, this.position.z), a.rotation.x = Math.PI / 2, a.rotation.z = Math.PI / 6, a;
2513
+ const t = new h.CircleGeometry(this.size, 6), i = new h.EdgesGeometry(t), o = new h.LineBasicMaterial({ color: this.color }), s = new h.LineSegments(i, o);
2514
+ return s.position.set(this.position.x, this.position.y, this.position.z), s.rotation.x = Math.PI / 2, s.rotation.z = Math.PI / 6, s;
2310
2515
  }
2311
2516
  }
2312
- class $i {
2313
- constructor(t, i, r) {
2314
- this.radius = t, this.tileSize = i, this.color = r;
2517
+ class qi {
2518
+ constructor(t, i, o) {
2519
+ this.radius = t, this.tileSize = i, this.color = o;
2315
2520
  }
2316
2521
  generateGrid() {
2317
- const t = [], i = Math.sqrt(3) * this.tileSize, r = 2 * this.tileSize;
2318
- for (let a = -this.radius; a <= this.radius; a++) {
2319
- const u = Math.max(-this.radius, -a - this.radius), p = Math.min(this.radius, -a + this.radius);
2320
- for (let d = u; d <= p; d++) {
2321
- const m = i * (a + d / 2), E = r * 0.75 * d, b = new Gi(new y.Vector3(m, -0.1, E), this.tileSize, this.color);
2322
- t.push(b);
2522
+ const t = [], i = Math.sqrt(3) * this.tileSize, o = 2 * this.tileSize;
2523
+ for (let s = -this.radius; s <= this.radius; s++) {
2524
+ const l = Math.max(-this.radius, -s - this.radius), d = Math.min(this.radius, -s + this.radius);
2525
+ for (let u = l; u <= d; u++) {
2526
+ const p = i * (s + u / 2), v = o * 0.75 * u, g = new $i(new h.Vector3(p, -0.1, v), this.tileSize, this.color);
2527
+ t.push(g);
2323
2528
  }
2324
2529
  }
2325
2530
  return t;
2326
2531
  }
2327
2532
  addToScene(t) {
2328
- this.generateGrid().forEach((r) => {
2329
- const a = r.createMesh();
2330
- t.add(a);
2533
+ this.generateGrid().forEach((o) => {
2534
+ const s = o.createMesh();
2535
+ t.add(s);
2331
2536
  });
2332
2537
  }
2333
2538
  }
2334
- const Bi = (o, t, i) => {
2335
- if (o.children = o.children.filter((r) => !(r instanceof y.GridHelper || r instanceof y.AxesHelper || r instanceof y.BoxHelper)), i.gridHelper) {
2336
- new $i(3, 12, i.color).addToScene(o);
2337
- const a = new y.PlaneGeometry(6 * Ue, 6 * Ue), u = new y.ShadowMaterial({
2539
+ const Qi = (n, t, i) => {
2540
+ if (n.children = n.children.filter((o) => !(o instanceof h.GridHelper || o instanceof h.AxesHelper || o instanceof h.BoxHelper)), i.gridHelper) {
2541
+ new qi(3, 12, i.color).addToScene(n);
2542
+ const s = new h.PlaneGeometry(6 * We, 6 * We), l = new h.ShadowMaterial({
2338
2543
  opacity: 0.5
2339
- }), p = new y.Mesh(a, u);
2340
- p.rotation.x = -Math.PI / 2, p.position.y = 0, p.receiveShadow = !0, o.add(p);
2544
+ }), d = new h.Mesh(s, l);
2545
+ d.rotation.x = -Math.PI / 2, d.position.y = 0, d.receiveShadow = !0, n.add(d);
2341
2546
  }
2342
2547
  if (i.axesHelper) {
2343
- const r = new y.AxesHelper(5);
2344
- o.add(r);
2548
+ const o = new h.AxesHelper(5);
2549
+ n.add(o);
2345
2550
  }
2346
2551
  if (i.object3DHelper && t) {
2347
- const r = new y.BoxHelper(t, new y.Color(i.color));
2348
- o.add(r);
2552
+ const o = new h.BoxHelper(t, new h.Color(i.color));
2553
+ n.add(o);
2349
2554
  }
2350
- }, qi = (o, t) => {
2351
- const i = new y.AmbientLight(
2555
+ }, Ji = (n, t) => {
2556
+ const i = new h.AmbientLight(
2352
2557
  t.ambientLight.color,
2353
2558
  t.ambientLight.intensity
2354
2559
  );
2355
- o.add(i);
2356
- const r = new y.HemisphereLight(
2560
+ n.add(i);
2561
+ const o = new h.HemisphereLight(
2357
2562
  t.hemisphereLight.skyColor,
2358
2563
  t.hemisphereLight.groundColor,
2359
2564
  t.hemisphereLight.intensity
2360
2565
  );
2361
- o.add(r);
2362
- const a = new y.DirectionalLight(
2566
+ n.add(o);
2567
+ const s = new h.DirectionalLight(
2363
2568
  t.directionalLight.color,
2364
2569
  t.directionalLight.intensity
2365
2570
  );
2366
- a.position.copy(t.directionalLight.position), a.castShadow = t.directionalLight.castShadow, a.castShadow && (a.shadow.mapSize.width = t.directionalLight.shadow.mapSize.width, a.shadow.mapSize.height = t.directionalLight.shadow.mapSize.height, a.shadow.camera.near = t.directionalLight.shadow.camera.near, a.shadow.camera.far = t.directionalLight.shadow.camera.far, a.shadow.camera.left = t.directionalLight.shadow.camera.left, a.shadow.camera.right = t.directionalLight.shadow.camera.right, a.shadow.camera.top = t.directionalLight.shadow.camera.top, a.shadow.camera.bottom = t.directionalLight.shadow.camera.bottom, a.shadow.bias = t.directionalLight.shadow.bias, a.shadow.radius = t.directionalLight.shadow.radius), o.add(a);
2367
- }, Ji = (o, t) => {
2368
- const i = new y.Box3().setFromObject(o), r = i.getSize(new y.Vector3()), a = i.getCenter(new y.Vector3()), u = Math.max(r.x, r.y, r.z), p = t.fov * (Math.PI / 180);
2369
- let d = Math.abs(u / 2 / Math.tan(p / 2));
2370
- d *= 1.4, t.position.set(a.x + d, a.y + d / 3, a.z + d / 5), t.lookAt(a), t.updateProjectionMatrix();
2371
- }, Qi = (o, t) => {
2372
- const i = new y.PerspectiveCamera(
2571
+ s.position.copy(t.directionalLight.position), s.castShadow = t.directionalLight.castShadow, s.castShadow && (s.shadow.mapSize.width = t.directionalLight.shadow.mapSize.width, s.shadow.mapSize.height = t.directionalLight.shadow.mapSize.height, s.shadow.camera.near = t.directionalLight.shadow.camera.near, s.shadow.camera.far = t.directionalLight.shadow.camera.far, s.shadow.camera.left = t.directionalLight.shadow.camera.left, s.shadow.camera.right = t.directionalLight.shadow.camera.right, s.shadow.camera.top = t.directionalLight.shadow.camera.top, s.shadow.camera.bottom = t.directionalLight.shadow.camera.bottom, s.shadow.bias = t.directionalLight.shadow.bias, s.shadow.radius = t.directionalLight.shadow.radius), n.add(s);
2572
+ }, to = (n, t) => {
2573
+ const i = new h.Box3().setFromObject(n), o = i.getSize(new h.Vector3()), s = i.getCenter(new h.Vector3()), l = Math.max(o.x, o.y, o.z), d = t.fov * (Math.PI / 180);
2574
+ let u = Math.abs(l / 2 / Math.tan(d / 2));
2575
+ u *= 1.4, t.position.set(s.x + u, s.y + u / 3, s.z + u / 5), t.lookAt(s), t.updateProjectionMatrix();
2576
+ }, eo = (n, t) => {
2577
+ const i = new h.PerspectiveCamera(
2373
2578
  t.cameraFov || 75,
2374
- o,
2579
+ n,
2375
2580
  t.cameraNear || 0.1,
2376
2581
  t.cameraFar || 1e5
2377
2582
  );
2378
- return t.cameraPosition && i.position.copy(new y.Vector3().fromArray(t.cameraPosition)), t.cameraTarget && i.lookAt(new y.Vector3().fromArray(t.cameraTarget)), i;
2379
- }, to = (o) => {
2380
- const t = new y.WebGLRenderer({
2381
- antialias: o.antialias,
2382
- alpha: o.alpha
2583
+ return t.cameraPosition && i.position.copy(new h.Vector3().fromArray(t.cameraPosition)), t.cameraTarget && i.lookAt(new h.Vector3().fromArray(t.cameraTarget)), i;
2584
+ }, io = (n) => {
2585
+ const t = new h.WebGLRenderer({
2586
+ antialias: n.antialias,
2587
+ alpha: n.alpha
2383
2588
  });
2384
- return t.setPixelRatio(o.pixelRatio), t.shadowMap.enabled = o.shadowMapEnabled, t.shadowMap.type = o.shadowMapType, o.toneMapping && (t.toneMapping = o.toneMapping), o.toneMappingExposure !== void 0 && (t.toneMappingExposure = o.toneMappingExposure), t;
2385
- }, eo = (o) => {
2386
- const t = new y.Scene(), i = o.backgroundColor;
2387
- return t.background = new y.Color(i), t;
2388
- }, io = (o, t, i) => {
2389
- const { mountRef: r, sceneRef: a, rendererRef: u, cameraRef: p } = o;
2390
- if (!r.current) throw new Error("Mount div is not ready");
2391
- const d = eo(i), m = Qi(
2392
- r.current.clientWidth / r.current.clientHeight,
2589
+ return t.setPixelRatio(n.pixelRatio), t.shadowMap.enabled = n.shadowMapEnabled, t.shadowMap.type = n.shadowMapType, n.toneMapping && (t.toneMapping = n.toneMapping), n.toneMappingExposure !== void 0 && (t.toneMappingExposure = n.toneMappingExposure), t;
2590
+ }, oo = (n) => {
2591
+ const t = new h.Scene(), i = n.backgroundColor;
2592
+ return t.background = new h.Color(i), t;
2593
+ }, no = (n, t, i) => {
2594
+ const { mountRef: o, sceneRef: s, rendererRef: l, cameraRef: d } = n;
2595
+ if (!o.current) throw new Error("Mount div is not ready");
2596
+ const u = oo(i), p = eo(
2597
+ o.current.clientWidth / o.current.clientHeight,
2393
2598
  i.camera
2394
- ), E = to(i.renderer);
2395
- u.current = E, p.current = m, a.current = d, r.current.appendChild(E.domElement), t && (t.castShadow = !0, t.traverse((L) => {
2396
- L instanceof y.Mesh && (L.castShadow = !0, L.receiveShadow = !0);
2397
- }), new Vi(t).alignToFloor(), d.add(t)), qi(d, i.lightning), Bi(d, t, i.helpers);
2398
- const b = i.controls.type === Le.MapsControls ? new Xi(m, E.domElement) : new ei(m, E.domElement);
2399
- Object.assign(b, i.controls), b.update(), i.camera.autoFitToObject && Ji(d, m);
2400
- const S = new y.Vector3();
2401
- d.position.copy(S), b.target.copy(S), b.update();
2402
- let M = !1;
2403
- const z = () => {
2404
- M || (M = !0, B(performance.now()));
2599
+ ), v = io(i.renderer);
2600
+ l.current = v, d.current = p, s.current = u, o.current.appendChild(v.domElement), t && (t.castShadow = !0, t.traverse((k) => {
2601
+ k instanceof h.Mesh && (k.castShadow = !0, k.receiveShadow = !0);
2602
+ }), new Xi(t).alignToFloor(), u.add(t)), Ji(u, i.lightning), Qi(u, t, i.helpers);
2603
+ const g = i.controls.type === Ie.MapsControls ? new Ki(p, v.domElement) : new ni(p, v.domElement);
2604
+ Object.assign(g, i.controls), g.update(), i.camera.autoFitToObject && to(u, p);
2605
+ const C = new h.Vector3();
2606
+ u.position.copy(C), g.target.copy(C), g.update();
2607
+ let P = !1;
2608
+ const I = () => {
2609
+ P || (P = !0, J(performance.now()));
2405
2610
  }, Z = () => {
2406
- M = !1;
2611
+ P = !1;
2407
2612
  };
2408
- b.addEventListener("start", z), b.addEventListener("end", Z);
2409
- const et = ii(() => {
2410
- (M || !i.staticScene) && E.render(d, m);
2411
- }, Qe), B = (L) => {
2412
- !M && i.staticScene || (requestAnimationFrame(B), i.animationLoop && i.animationLoop(L), b.update(), t && (E.shadowMap.needsUpdate = !0), et());
2613
+ g.addEventListener("start", I), g.addEventListener("end", Z);
2614
+ const U = ri(() => {
2615
+ (P || !i.staticScene) && v.render(u, p);
2616
+ }, ii), J = (k) => {
2617
+ !P && i.staticScene || (requestAnimationFrame(J), i.animationLoop && i.animationLoop(k), g.update(), t && (v.shadowMap.needsUpdate = !0), U());
2413
2618
  };
2414
- return B(performance.now()), { scene: d, camera: m, renderer: E, controls: b };
2415
- }, oo = (o, t, i, r) => {
2619
+ return J(performance.now()), { scene: u, camera: p, renderer: v, controls: g };
2620
+ }, ro = (n, t, i, o) => {
2416
2621
  if (i.current) {
2417
- const a = i.current.clientWidth, u = i.current.clientHeight;
2418
- o.setSize(a, u), t.aspect = a / u, t.updateProjectionMatrix(), o.render(r, t);
2622
+ const s = i.current.clientWidth, l = i.current.clientHeight;
2623
+ n.setSize(s, l), t.aspect = s / l, t.updateProjectionMatrix(), n.render(o, t);
2419
2624
  }
2420
- }, Ke = {
2625
+ }, Be = {
2421
2626
  staticScene: !0,
2422
2627
  // It stops animation loop if there is no interactions
2423
2628
  backgroundColor: "#f0f0f7",
@@ -2447,7 +2652,7 @@ const Bi = (o, t, i) => {
2447
2652
  directionalLight: {
2448
2653
  color: "#ffffff",
2449
2654
  intensity: Math.PI,
2450
- position: new y.Vector3(6, 6, 6),
2655
+ position: new h.Vector3(6, 6, 6),
2451
2656
  castShadow: !0,
2452
2657
  shadow: {
2453
2658
  mapSize: {
@@ -2472,12 +2677,12 @@ const Bi = (o, t, i) => {
2472
2677
  alpha: !1,
2473
2678
  shadowMapEnabled: !0,
2474
2679
  pixelRatio: window.devicePixelRatio,
2475
- shadowMapType: y.VSMShadowMap,
2476
- toneMapping: y.ACESFilmicToneMapping,
2680
+ shadowMapType: h.VSMShadowMap,
2681
+ toneMapping: h.ACESFilmicToneMapping,
2477
2682
  toneMappingExposure: 1
2478
2683
  },
2479
2684
  controls: {
2480
- type: Le.OrbitControls,
2685
+ type: Ie.OrbitControls,
2481
2686
  enabled: !0,
2482
2687
  // Controls are used in setupScene
2483
2688
  enableDamping: !0,
@@ -2506,50 +2711,50 @@ const Bi = (o, t, i) => {
2506
2711
  controls: { current: null }
2507
2712
  },
2508
2713
  animationLoop: null
2509
- }, so = ({ object: o, options: t = Ke }) => {
2510
- const i = t.threeBaseRefs.mountPoint || $(null), r = t.threeBaseRefs.renderer || $(null), a = t.threeBaseRefs.camera || $(null), u = t.threeBaseRefs.scene || $(null), p = t.threeBaseRefs.controls || $(null), [d, m] = oi(0);
2511
- Ht(() => {
2512
- m(d + 1);
2714
+ }, ho = ({ object: n, options: t = Be }) => {
2715
+ const i = t.threeBaseRefs.mountPoint || X(null), o = t.threeBaseRefs.renderer || X(null), s = t.threeBaseRefs.camera || X(null), l = t.threeBaseRefs.scene || X(null), d = t.threeBaseRefs.controls || X(null), [u, p] = Ke(0);
2716
+ Jt(() => {
2717
+ p(u + 1);
2513
2718
  }, []);
2514
- const E = Xe(() => ({
2515
- ...Ke,
2719
+ const v = si(() => ({
2720
+ ...Be,
2516
2721
  ...t
2517
2722
  }), [t]);
2518
- Ht(() => {
2723
+ Jt(() => {
2519
2724
  if (!i.current) return;
2520
- const S = () => oo(
2521
- r.current,
2522
- a.current,
2725
+ const C = () => ro(
2726
+ o.current,
2727
+ s.current,
2523
2728
  i,
2524
- u.current
2525
- ), M = ii(S, Qe), {
2526
- renderer: z,
2729
+ l.current
2730
+ ), P = ri(C, ii), {
2731
+ renderer: I,
2527
2732
  scene: Z,
2528
- camera: et,
2529
- controls: B
2530
- } = io(
2531
- { mountRef: i, rendererRef: r, cameraRef: a, sceneRef: u },
2532
- o,
2533
- E
2733
+ camera: U,
2734
+ controls: J
2735
+ } = no(
2736
+ { mountRef: i, rendererRef: o, cameraRef: s, sceneRef: l },
2737
+ n,
2738
+ v
2534
2739
  );
2535
- return r.current = z, u.current = Z, a.current = et, p.current = B, S(), window.addEventListener("resize", M), () => xi(i, z, M);
2536
- }, [o, E]);
2537
- const b = Ze(() => {
2538
- r.current && r.current.render(u.current, a.current);
2740
+ return o.current = I, l.current = Z, s.current = U, d.current = J, C(), window.addEventListener("resize", P), () => Li(i, I, P);
2741
+ }, [n, v]);
2742
+ const g = at(() => {
2743
+ o.current && o.current.render(l.current, s.current);
2539
2744
  }, []);
2540
- return /* @__PURE__ */ It.jsxs(It.Fragment, { children: [
2541
- t.helpers.addGizmo ? /* @__PURE__ */ It.jsx(
2542
- Oi,
2745
+ return /* @__PURE__ */ Kt.jsxs(Kt.Fragment, { children: [
2746
+ t.helpers.addGizmo ? /* @__PURE__ */ Kt.jsx(
2747
+ ji,
2543
2748
  {
2544
- camera: a.current,
2545
- controls: p.current,
2546
- render: b
2749
+ camera: s.current,
2750
+ controls: d.current,
2751
+ render: g
2547
2752
  }
2548
2753
  ) : null,
2549
- /* @__PURE__ */ It.jsx("div", { style: { width: "100%", height: "100%" }, ref: i })
2754
+ /* @__PURE__ */ Kt.jsx("div", { style: { width: "100%", height: "100%" }, ref: i })
2550
2755
  ] });
2551
2756
  };
2552
2757
  export {
2553
- so as SimpleViewer,
2554
- Ke as defaultOptions
2758
+ ho as SimpleViewer,
2759
+ Be as defaultOptions
2555
2760
  };