@tomorrowevening/hermes 0.0.44 → 0.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hermes.es.js CHANGED
@@ -1,66 +1,65 @@
1
- import { PositionalAudio as jn, EventDispatcher as tn, Texture as nn, CubeTexture as Dn, RepeatWrapping as Ut, Color as St, FrontSide as In, BackSide as Ln, DoubleSide as an, NoBlending as Nn, NormalBlending as Fn, AdditiveBlending as Bn, SubtractiveBlending as Un, MultiplyBlending as $n, CustomBlending as zn, AddEquation as Yn, SubtractEquation as Gn, ReverseSubtractEquation as Vn, MinEquation as Hn, MaxEquation as Wn, ZeroFactor as rn, OneFactor as sn, SrcColorFactor as on, OneMinusSrcColorFactor as cn, SrcAlphaFactor as ln, OneMinusSrcAlphaFactor as un, DstAlphaFactor as dn, OneMinusDstAlphaFactor as fn, DstColorFactor as hn, OneMinusDstColorFactor as pn, SrcAlphaSaturateFactor as qn, ConstantColorFactor as mn, OneMinusConstantColorFactor as vn, ConstantAlphaFactor as gn, OneMinusConstantAlphaFactor as bn, Matrix4 as Kn, Vector3 as W, Euler as Xn, Ray as Zn, Plane as Jn, MathUtils as Qn, MOUSE as Xe, TOUCH as Ze, Quaternion as $t, Spherical as zt, Vector2 as he, ShaderMaterial as yn, GLSL3 as ea, Mesh as ta, PlaneGeometry as na, Scene as aa, Group as ia, AxesHelper as Yt, MeshDepthMaterial as ra, MeshNormalMaterial as sa, MeshBasicMaterial as oa, PerspectiveCamera as Rt, WebGLRenderer as ca, Raycaster as la, OrthographicCamera as Gt, CameraHelper as ua } from "three";
2
- import Vt from "@theatre/studio";
3
- import { Pane as da } from "tweakpane";
4
- import * as fa from "@tweakpane/plugin-essentials";
5
- import En, { useState as oe, useRef as _e, useEffect as Re, forwardRef as ha, useMemo as Ce } from "react";
6
- import { Reorder as Cn } from "framer-motion";
1
+ import { EventDispatcher as en, Texture as tn, CubeTexture as kn, RepeatWrapping as Ut, Color as St, FrontSide as jn, BackSide as Dn, DoubleSide as nn, NoBlending as In, NormalBlending as Nn, AdditiveBlending as Ln, SubtractiveBlending as Fn, MultiplyBlending as Bn, CustomBlending as Un, AddEquation as $n, SubtractEquation as zn, ReverseSubtractEquation as Yn, MinEquation as Gn, MaxEquation as Vn, ZeroFactor as an, OneFactor as rn, SrcColorFactor as sn, OneMinusSrcColorFactor as on, SrcAlphaFactor as cn, OneMinusSrcAlphaFactor as ln, DstAlphaFactor as dn, OneMinusDstAlphaFactor as un, DstColorFactor as hn, OneMinusDstColorFactor as fn, SrcAlphaSaturateFactor as Hn, ConstantColorFactor as pn, OneMinusConstantColorFactor as mn, ConstantAlphaFactor as vn, OneMinusConstantAlphaFactor as gn, Matrix4 as Wn, Vector3 as W, Euler as qn, Ray as Kn, Plane as Xn, MathUtils as Zn, MOUSE as Xe, TOUCH as Ze, Quaternion as $t, Spherical as zt, Vector2 as fe, ShaderMaterial as bn, GLSL3 as Jn, Mesh as Qn, PlaneGeometry as ea, Scene as ta, Group as na, AxesHelper as Yt, MeshDepthMaterial as aa, MeshNormalMaterial as ia, MeshBasicMaterial as ra, PerspectiveCamera as Rt, WebGLRenderer as sa, Raycaster as oa, OrthographicCamera as Gt, CameraHelper as ca } from "three";
2
+ import { Pane as la } from "tweakpane";
3
+ import * as da from "@tweakpane/plugin-essentials";
4
+ import yn, { useState as oe, useRef as Re, useEffect as _e, forwardRef as ua, useMemo as Se } from "react";
5
+ import { Reorder as En } from "framer-motion";
7
6
  const Sn = () => {
8
- }, ui = () => {
7
+ }, si = () => {
9
8
  };
10
- function ut(e) {
11
- return e.substring(0, 1).toUpperCase() + e.substring(1);
9
+ function lt(t) {
10
+ return t.substring(0, 1).toUpperCase() + t.substring(1);
12
11
  }
13
- function di(e, n, a) {
14
- return Math.min(n, Math.max(e, a));
12
+ function oi(t, n, a) {
13
+ return Math.min(n, Math.max(t, a));
15
14
  }
16
- function fi(e, n) {
17
- const a = e - n;
15
+ function ci(t, n) {
16
+ const a = t - n;
18
17
  return Math.sqrt(a * a);
19
18
  }
20
- function pa() {
19
+ function ha() {
21
20
  return Math.round(Math.random() * 1e6).toString();
22
21
  }
23
- function ma(e) {
24
- return e.r !== void 0 && e.g !== void 0 && e.b !== void 0;
22
+ function fa(t) {
23
+ return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
25
24
  }
26
- function va(e) {
27
- const n = Math.round(e.r * 255), a = Math.round(e.g * 255), t = Math.round(e.b * 255), r = (u) => {
28
- const d = u.toString(16);
29
- return d.length === 1 ? "0" + d : d;
30
- }, c = r(n), p = r(a), o = r(t);
31
- return "#" + c + p + o;
25
+ function pa(t) {
26
+ const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (d) => {
27
+ const u = d.toString(16);
28
+ return u.length === 1 ? "0" + u : u;
29
+ }, o = i(n), h = i(a), c = i(e);
30
+ return "#" + o + h + c;
32
31
  }
33
- function At(e, n = 1) {
34
- return Number(e.toFixed(n));
32
+ function _t(t, n = 1) {
33
+ return Number(t.toFixed(n));
35
34
  }
36
- let Dt = 0;
37
- const ga = () => {
38
- Dt = 0;
39
- }, xn = (e) => {
40
- if (!e)
35
+ let jt = 0;
36
+ const ma = () => {
37
+ jt = 0;
38
+ }, Cn = (t) => {
39
+ if (!t)
41
40
  return;
42
- let n = e.name.replace(" ", "");
43
- n.length === 0 && (n = `obj_${Dt}`, Dt++), e.parent !== null && (n = `${e.parent.uuid}.${n}`), e.uuid = n, e.children.forEach((a) => {
44
- xn(a);
41
+ let n = t.name.replace(" ", "");
42
+ n.length === 0 && (n = `obj_${jt}`, jt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
43
+ Cn(a);
45
44
  });
46
- }, hi = (e) => {
47
- e?.dispose();
48
- }, ba = (e) => {
49
- e && (Array.isArray(e) ? e.forEach((n) => n.dispose()) : e.dispose());
50
- }, wn = (e) => {
51
- if (e) {
52
- for (; e.children.length > 0; ) {
53
- const n = e.children[0];
54
- n instanceof jn ? (n.pause(), n.parent && n.parent.remove(n)) : wn(n);
55
- }
56
- if (e.parent && e.parent.remove(e), e.isMesh) {
57
- const n = e;
58
- n.geometry?.dispose(), ba(n.material);
59
- }
60
- e.dispose !== void 0 && e.dispose();
45
+ }, li = (t) => {
46
+ t?.dispose();
47
+ }, va = (t) => {
48
+ t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
49
+ }, xn = (t) => {
50
+ if (t) {
51
+ for (; t.children.length > 0; ) {
52
+ const n = t.children[0];
53
+ n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : xn(n);
54
+ }
55
+ if (t.parent && t.parent.remove(t), t.isMesh) {
56
+ const n = t;
57
+ n.geometry?.dispose(), va(n.material);
58
+ }
59
+ t.dispose !== void 0 && t.dispose();
61
60
  }
62
61
  };
63
- class pi {
62
+ class di {
64
63
  components = /* @__PURE__ */ new Map();
65
64
  listen;
66
65
  // Protected
@@ -70,8 +69,8 @@ class pi {
70
69
  _mode = "app";
71
70
  _connected = !1;
72
71
  _useBC = !1;
73
- constructor(n, a, t = !0) {
74
- this._debugEnabled = a, a && (this._useBC = t, t ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
72
+ constructor(n, a, e = !0) {
73
+ this._debugEnabled = a, a && (this._useBC = e, e ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
75
74
  }
76
75
  addComponent(n, a) {
77
76
  this.components.set(n, a);
@@ -114,7 +113,7 @@ class pi {
114
113
  n && (this._mode = "editor");
115
114
  }
116
115
  }
117
- const P = new tn(), k = {
116
+ const P = new en(), k = {
118
117
  CUSTOM: "ToolEvents::custom",
119
118
  // Components
120
119
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -130,15 +129,19 @@ const P = new tn(), k = {
130
129
  ADD_CAMERA: "ToolEvents::addCamera",
131
130
  REMOVE_CAMERA: "ToolEvents::removeCamera"
132
131
  };
133
- class xt {
132
+ class Ct {
134
133
  app;
135
134
  constructor(n) {
136
135
  this.app = n;
137
136
  }
138
137
  dispose() {
139
138
  }
139
+ handleApp(n, a, e) {
140
+ }
141
+ handleEditor(n, a, e) {
142
+ }
140
143
  }
141
- class mi extends xt {
144
+ class ui extends Ct {
142
145
  selectDropdown(n, a) {
143
146
  this.app.send({
144
147
  event: "selectComponent",
@@ -159,103 +162,25 @@ class mi extends xt {
159
162
  }
160
163
  });
161
164
  }
162
- }
163
- function vi(e, n, a) {
164
- switch (a.event) {
165
- case "selectComponent":
166
- P.dispatchEvent({ type: k.SELECT_DROPDOWN, value: a.data });
167
- break;
168
- case "draggableListUpdate":
169
- P.dispatchEvent({ type: k.DRAG_UPDATE, value: a.data });
170
- break;
171
- }
172
- }
173
- function gi(e, n, a) {
174
- let t;
175
- switch (a.event) {
176
- case "setSheet":
177
- t = n.sheets.get(a.data.sheet), t !== void 0 && (n.activeSheet = t, Vt.setSelection([t]));
178
- break;
179
- case "setSheetObject":
180
- t = n.sheetObjects.get(`${a.data.sheet}_${a.data.key}`), t !== void 0 && Vt.setSelection([t]);
181
- break;
182
- case "updateSheetObject":
183
- t = n.sheets.get(a.data.sheet), t !== void 0 && t.sequence.pause(), t = n.sheetObjectCBs.get(a.data.sheetObject), t !== void 0 && t(a.data.values);
184
- break;
185
- case "updateTimeline":
186
- t = n.sheets.get(a.data.sheet), n.activeSheet !== void 0 && (n.activeSheet.sequence.position = a.data.position);
187
- break;
188
- }
189
- }
190
- function bi(e, n, a) {
191
- if (e.editor)
192
- switch (a.event) {
193
- case "playSheet":
194
- n.sheet(a.data.sheet)?.sequence.play(a.data.value);
165
+ handleApp(n, a, e) {
166
+ switch (e.event) {
167
+ case "selectComponent":
168
+ P.dispatchEvent({ type: k.SELECT_DROPDOWN, value: e.data });
195
169
  break;
196
- case "pauseSheet":
197
- n.sheet(a.data.sheet)?.sequence.pause();
170
+ case "draggableListUpdate":
171
+ P.dispatchEvent({ type: k.DRAG_UPDATE, value: e.data });
198
172
  break;
199
173
  }
200
- }
201
- function yi(e, n, a) {
202
- switch (a.event) {
203
- case "getObject":
204
- P.dispatchEvent({ type: k.GET_OBJECT, value: a.data });
205
- break;
206
- case "updateObject":
207
- P.dispatchEvent({ type: k.UPDATE_OBJECT, value: a.data });
208
- break;
209
- case "createTexture":
210
- P.dispatchEvent({ type: k.CREATE_TEXTURE, value: a.data });
211
- break;
212
- case "requestMethod":
213
- P.dispatchEvent({ type: k.REQUEST_METHOD, value: a.data });
214
- break;
215
174
  }
216
175
  }
217
- function Ei(e, n, a) {
218
- switch (a.event) {
219
- case "setObject":
220
- P.dispatchEvent({ type: k.SET_OBJECT, value: a.data });
221
- break;
222
- case "setScene":
223
- P.dispatchEvent({ type: k.SET_SCENE, value: a.data });
224
- break;
225
- case "addCamera":
226
- P.dispatchEvent({ type: k.ADD_CAMERA, value: a.data });
227
- break;
228
- case "removeCamera":
229
- P.dispatchEvent({ type: k.REMOVE_CAMERA, value: a.data });
230
- break;
231
- }
232
- }
233
- function Ci(e, n, a) {
234
- switch (a.event) {
235
- case "addFolder":
236
- n.addFolder(a.data.name, a.data.params, a.data.parent);
237
- break;
238
- case "bindObject":
239
- n.bind(a.data.name, a.data.params, a.data.parent);
240
- break;
241
- case "updateBind":
242
- n.triggerBind(a.data.id, a.data.value);
243
- break;
244
- case "addButton":
245
- n.button(a.data.name, a.data.callback, a.data.parent);
246
- break;
247
- case "clickButton":
248
- n.triggerButton(a.data.id);
249
- break;
250
- }
251
- }
252
- class ya extends xt {
176
+ class Nt extends Ct {
253
177
  project;
254
178
  sheets = /* @__PURE__ */ new Map();
255
179
  sheetObjects = /* @__PURE__ */ new Map();
256
180
  sheetObjectCBs = /* @__PURE__ */ new Map();
257
181
  sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
258
182
  activeSheet;
183
+ studio;
259
184
  static rafDriver = void 0;
260
185
  dispose() {
261
186
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -288,26 +213,26 @@ class ya extends xt {
288
213
  });
289
214
  }
290
215
  clearSheetObjects(n) {
291
- this.sheetObjects.forEach((a, t) => {
292
- t.search(`${n}_`) > -1 && this.unsubscribe(a);
216
+ this.sheetObjects.forEach((a, e) => {
217
+ e.search(`${n}_`) > -1 && this.unsubscribe(a);
293
218
  });
294
219
  }
295
- sheetObject(n, a, t, r) {
220
+ sheetObject(n, a, e, i) {
296
221
  if (this.project === void 0) {
297
222
  console.error("Theatre Project hasn't been created yet.");
298
223
  return;
299
224
  }
300
- const c = this.sheet(n);
301
- if (c === void 0)
225
+ const o = this.sheet(n);
226
+ if (o === void 0)
302
227
  return;
303
- const p = `${n}_${a}`;
304
- let o = this.sheetObjects.get(p);
305
- o !== void 0 ? o = c.object(a, { ...t, ...o.value }, { reconfigure: !0 }) : o = c.object(a, t), this.sheetObjects.set(p, o), this.sheetObjectCBs.set(p, r !== void 0 ? r : Sn);
306
- const u = o.onValuesChange((d) => {
228
+ const h = `${n}_${a}`;
229
+ let c = this.sheetObjects.get(h);
230
+ c !== void 0 ? c = o.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = o.object(a, e), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, i !== void 0 ? i : Sn);
231
+ const d = c.onValuesChange((u) => {
307
232
  if (this.app.editor) {
308
- for (const b in d) {
309
- const E = d[b];
310
- typeof E == "object" && ma(E) && (d[b] = {
233
+ for (const b in u) {
234
+ const E = u[b];
235
+ typeof E == "object" && fa(E) && (u[b] = {
311
236
  r: E.r,
312
237
  g: E.g,
313
238
  b: E.b,
@@ -319,105 +244,179 @@ class ya extends xt {
319
244
  target: "app",
320
245
  data: {
321
246
  sheet: n,
322
- sheetObject: p,
323
- values: d
247
+ sheetObject: h,
248
+ values: u
324
249
  }
325
250
  });
326
251
  }
327
- const v = this.sheetObjectCBs.get(p);
328
- v !== void 0 && v(d);
252
+ const v = this.sheetObjectCBs.get(h);
253
+ v !== void 0 && v(u);
329
254
  });
330
- return this.sheetObjectUnsubscribe.set(p, u), o;
255
+ return this.sheetObjectUnsubscribe.set(h, d), c;
331
256
  }
332
257
  unsubscribe(n) {
333
258
  if (this.project === void 0) {
334
259
  console.error("Theatre Project hasn't been created yet.");
335
260
  return;
336
261
  }
337
- const a = n.address.sheetId, t = n.address.objectKey;
338
- this.sheets.get(a)?.detachObject(t);
339
- const c = `${a}_${t}`, p = this.sheetObjectUnsubscribe.get(c);
340
- p !== void 0 && (this.sheetObjects.delete(c), this.sheetObjectCBs.delete(c), this.sheetObjectUnsubscribe.delete(c), p());
262
+ const a = n.address.sheetId, e = n.address.objectKey;
263
+ this.sheets.get(a)?.detachObject(e);
264
+ const o = `${a}_${e}`, h = this.sheetObjectUnsubscribe.get(o);
265
+ h !== void 0 && (this.sheetObjects.delete(o), this.sheetObjectCBs.delete(o), this.sheetObjectUnsubscribe.delete(o), h());
266
+ }
267
+ handleApp(n, a, e) {
268
+ const i = a;
269
+ let o;
270
+ switch (e.event) {
271
+ case "setSheet":
272
+ o = i.sheets.get(e.data.sheet), o !== void 0 && (i.activeSheet = o, this.studio.setSelection([o]));
273
+ break;
274
+ case "setSheetObject":
275
+ o = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), o !== void 0 && this.studio.setSelection([o]);
276
+ break;
277
+ case "updateSheetObject":
278
+ o = i.sheets.get(e.data.sheet), o !== void 0 && o.sequence.pause(), o = i.sheetObjectCBs.get(e.data.sheetObject), o !== void 0 && o(e.data.values);
279
+ break;
280
+ case "updateTimeline":
281
+ o = i.sheets.get(e.data.sheet), i.activeSheet !== void 0 && (i.activeSheet.sequence.position = e.data.position);
282
+ break;
283
+ }
284
+ }
285
+ handleEditor(n, a, e) {
286
+ if (n.editor) {
287
+ const i = a;
288
+ switch (e.event) {
289
+ case "playSheet":
290
+ i.sheet(e.data.sheet)?.sequence.play(e.data.value);
291
+ break;
292
+ case "pauseSheet":
293
+ i.sheet(e.data.sheet)?.sequence.pause();
294
+ break;
295
+ }
296
+ }
297
+ }
298
+ handleEditorApp(n, a) {
299
+ if (n.editor) {
300
+ this.studio.ui.restore(), this.studio.onSelectionChange((h) => {
301
+ h.length < 1 || h.forEach((c) => {
302
+ let d = c.address.sheetId, u = "setSheet", v = {};
303
+ switch (c.type) {
304
+ case "Theatre_Sheet_PublicAPI":
305
+ u = "setSheet", v = {
306
+ sheet: c.address.sheetId
307
+ }, a.activeSheet = a.sheets.get(c.address.sheetId);
308
+ break;
309
+ case "Theatre_SheetObject_PublicAPI":
310
+ u = "setSheetObject", d += `_${c.address.objectKey}`, v = {
311
+ id: d,
312
+ sheet: c.address.sheetId,
313
+ key: c.address.objectKey
314
+ }, a.activeSheet = a.sheets.get(c.address.sheetId);
315
+ break;
316
+ }
317
+ n.send({ event: u, target: "app", data: v });
318
+ });
319
+ });
320
+ let e = -1;
321
+ const i = () => {
322
+ if (Nt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && e !== a.activeSheet.sequence.position) {
323
+ e = a.activeSheet.sequence.position;
324
+ const h = a.activeSheet;
325
+ n.send({
326
+ event: "updateTimeline",
327
+ target: "app",
328
+ data: {
329
+ position: e,
330
+ sheet: h.address.sheetId
331
+ }
332
+ });
333
+ }
334
+ }, o = () => {
335
+ i(), requestAnimationFrame(o);
336
+ };
337
+ i(), o();
338
+ } else
339
+ this.studio.ui.hide();
341
340
  }
342
341
  }
343
- function Si(e, n, a) {
344
- if (e.editor) {
345
- a.ui.restore(), a.onSelectionChange((p) => {
346
- p.length < 1 || p.forEach((o) => {
347
- let u = o.address.sheetId, d = "setSheet", v = {};
348
- switch (o.type) {
342
+ function hi(t, n, a) {
343
+ if (t.editor) {
344
+ a.ui.restore(), a.onSelectionChange((h) => {
345
+ h.length < 1 || h.forEach((c) => {
346
+ let d = c.address.sheetId, u = "setSheet", v = {};
347
+ switch (c.type) {
349
348
  case "Theatre_Sheet_PublicAPI":
350
- d = "setSheet", v = {
351
- sheet: o.address.sheetId
352
- }, n.activeSheet = n.sheets.get(o.address.sheetId);
349
+ u = "setSheet", v = {
350
+ sheet: c.address.sheetId
351
+ }, n.activeSheet = n.sheets.get(c.address.sheetId);
353
352
  break;
354
353
  case "Theatre_SheetObject_PublicAPI":
355
- d = "setSheetObject", u += `_${o.address.objectKey}`, v = {
356
- id: u,
357
- sheet: o.address.sheetId,
358
- key: o.address.objectKey
359
- }, n.activeSheet = n.sheets.get(o.address.sheetId);
354
+ u = "setSheetObject", d += `_${c.address.objectKey}`, v = {
355
+ id: d,
356
+ sheet: c.address.sheetId,
357
+ key: c.address.objectKey
358
+ }, n.activeSheet = n.sheets.get(c.address.sheetId);
360
359
  break;
361
360
  }
362
- e.send({ event: d, target: "app", data: v });
361
+ t.send({ event: u, target: "app", data: v });
363
362
  });
364
363
  });
365
- let t = -1;
366
- const r = () => {
367
- if (ya.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
368
- t = n.activeSheet.sequence.position;
369
- const p = n.activeSheet;
370
- e.send({
364
+ let e = -1;
365
+ const i = () => {
366
+ if (Nt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
367
+ e = n.activeSheet.sequence.position;
368
+ const h = n.activeSheet;
369
+ t.send({
371
370
  event: "updateTimeline",
372
371
  target: "app",
373
372
  data: {
374
- position: t,
375
- sheet: p.address.sheetId
373
+ position: e,
374
+ sheet: h.address.sheetId
376
375
  }
377
376
  });
378
377
  }
379
- }, c = () => {
380
- r(), requestAnimationFrame(c);
378
+ }, o = () => {
379
+ i(), requestAnimationFrame(o);
381
380
  };
382
- r(), c();
381
+ i(), o();
383
382
  } else
384
383
  a.ui.hide();
385
384
  }
386
- function Ea(e) {
387
- if (e.name === "cameras")
385
+ function ga(t) {
386
+ if (t.name === "cameras")
388
387
  return "camera";
389
- if (e.name === "interactive")
388
+ if (t.name === "interactive")
390
389
  return "interactive";
391
- if (e.name === "lights")
390
+ if (t.name === "lights")
392
391
  return "light";
393
- if (e.name === "ui")
392
+ if (t.name === "ui")
394
393
  return "ui";
395
- if (e.name === "utils")
394
+ if (t.name === "utils")
396
395
  return "utils";
397
- const n = e.type;
396
+ const n = t.type;
398
397
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
399
398
  }
400
- function On(e) {
399
+ function wn(t) {
401
400
  const n = {
402
- name: e.name,
403
- type: e.type,
404
- uuid: e.uuid,
401
+ name: t.name,
402
+ type: t.type,
403
+ uuid: t.uuid,
405
404
  children: []
406
405
  };
407
- return e.children.forEach((a) => {
408
- n.children.push(On(a));
406
+ return t.children.forEach((a) => {
407
+ n.children.push(wn(a));
409
408
  }), n;
410
409
  }
411
- function Ca(e) {
410
+ function ba(t) {
412
411
  const n = {};
413
- for (const a in e) {
414
- const t = e[a].value;
415
- n[a] = { value: t }, t === null ? n[a].value = { src: "" } : t.isTexture && (n[a].value = { src: t.image.src });
412
+ for (const a in t) {
413
+ const e = t[a].value;
414
+ n[a] = { value: e }, e === null ? n[a].value = { src: "" } : e.isTexture && (n[a].value = { src: e.image.src });
416
415
  }
417
416
  return n;
418
417
  }
419
- function Sa(e) {
420
- switch (e) {
418
+ function ya(t) {
419
+ switch (t) {
421
420
  case "blendSrcAlpha":
422
421
  case "blendDstAlpha":
423
422
  case "blendEquationAlpha":
@@ -428,28 +427,28 @@ function Sa(e) {
428
427
  }
429
428
  return !1;
430
429
  }
431
- function Je(e) {
430
+ function Je(t) {
432
431
  const n = {};
433
- for (const a in e) {
434
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Sa(a))
432
+ for (const a in t) {
433
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ya(a))
435
434
  continue;
436
- const t = typeof e[a], r = e[a];
437
- switch (t) {
435
+ const e = typeof t[a], i = t[a];
436
+ switch (e) {
438
437
  case "boolean":
439
438
  case "number":
440
439
  case "string":
441
- n[a] = r;
440
+ n[a] = i;
442
441
  break;
443
442
  case "object":
444
- if (r !== null)
445
- if (n[a] = r, r.isTexture)
446
- if (r instanceof nn) {
447
- const c = r.source.toJSON();
448
- n[a] = { src: c.url };
443
+ if (i !== null)
444
+ if (n[a] = i, i.isTexture)
445
+ if (i instanceof tn) {
446
+ const o = i.source.toJSON();
447
+ n[a] = { src: o.url };
449
448
  } else
450
- r instanceof Dn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
449
+ i instanceof kn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
451
450
  else
452
- a === "uniforms" && (n[a] = Ca(n[a]));
451
+ a === "uniforms" && (n[a] = ba(n[a]));
453
452
  else
454
453
  n[a] = { src: "" };
455
454
  break;
@@ -457,132 +456,133 @@ function Je(e) {
457
456
  }
458
457
  return n;
459
458
  }
460
- function Pt(e) {
461
- e.updateMatrix();
459
+ function At(t) {
460
+ t.updateMatrix();
462
461
  const n = {
463
- name: e.name,
464
- type: e.type,
465
- uuid: e.uuid,
466
- visible: e.visible,
467
- matrix: e.matrix.elements,
462
+ name: t.name,
463
+ type: t.type,
464
+ uuid: t.uuid,
465
+ visible: t.visible,
466
+ matrix: t.matrix.elements,
468
467
  animations: [],
469
468
  material: void 0,
470
469
  perspectiveCameraInfo: void 0,
471
470
  orthographicCameraInfo: void 0,
472
471
  lightInfo: void 0
473
472
  };
474
- e.animations.forEach((t) => {
473
+ t.animations.forEach((e) => {
475
474
  n.animations.push({
476
- name: t.name,
477
- duration: t.duration,
478
- blendMode: t.blendMode
475
+ name: e.name,
476
+ duration: e.duration,
477
+ blendMode: e.blendMode
479
478
  });
480
479
  });
481
- const a = e.type.toLowerCase();
480
+ const a = t.type.toLowerCase();
482
481
  if (a.search("mesh") > -1) {
483
- const t = e;
484
- if (Array.isArray(t.material)) {
485
- const r = [];
486
- t.material.forEach((c) => {
487
- r.push(Je(c));
488
- }), n.material = r;
482
+ const e = t;
483
+ if (Array.isArray(e.material)) {
484
+ const i = [];
485
+ e.material.forEach((o) => {
486
+ i.push(Je(o));
487
+ }), n.material = i;
489
488
  } else
490
- n.material = Je(t.material);
489
+ n.material = Je(e.material);
491
490
  } else if (a.search("points") > -1) {
492
- const t = e;
493
- if (Array.isArray(t.material)) {
494
- const r = [];
495
- t.material.forEach((c) => {
496
- r.push(Je(c));
497
- }), n.material = r;
491
+ const e = t;
492
+ if (Array.isArray(e.material)) {
493
+ const i = [];
494
+ e.material.forEach((o) => {
495
+ i.push(Je(o));
496
+ }), n.material = i;
498
497
  } else
499
- n.material = Je(t.material);
498
+ n.material = Je(e.material);
500
499
  } else if (a.search("line") > -1) {
501
- const t = e;
502
- if (Array.isArray(t.material)) {
503
- const r = [];
504
- t.material.forEach((c) => {
505
- r.push(Je(c));
506
- }), n.material = r;
500
+ const e = t;
501
+ if (Array.isArray(e.material)) {
502
+ const i = [];
503
+ e.material.forEach((o) => {
504
+ i.push(Je(o));
505
+ }), n.material = i;
507
506
  } else
508
- n.material = Je(t.material);
507
+ n.material = Je(e.material);
509
508
  } else
510
- a.search("camera") > -1 ? e.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
511
- fov: e.fov,
512
- zoom: e.zoom,
513
- near: e.near,
514
- far: e.far,
515
- focus: e.focus,
516
- aspect: e.aspect,
517
- filmGauge: e.filmGauge,
518
- filmOffset: e.filmOffset
519
- } : e.type === "OrthographicCamera" && (n.orthographicCameraInfo = {
520
- zoom: e.zoom,
521
- near: e.near,
522
- far: e.far,
523
- left: e.left,
524
- right: e.right,
525
- top: e.top,
526
- bottom: e.bottom
509
+ a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
510
+ fov: t.fov,
511
+ zoom: t.zoom,
512
+ near: t.near,
513
+ far: t.far,
514
+ focus: t.focus,
515
+ aspect: t.aspect,
516
+ filmGauge: t.filmGauge,
517
+ filmOffset: t.filmOffset
518
+ } : t.type === "OrthographicCamera" && (n.orthographicCameraInfo = {
519
+ zoom: t.zoom,
520
+ near: t.near,
521
+ far: t.far,
522
+ left: t.left,
523
+ right: t.right,
524
+ top: t.top,
525
+ bottom: t.bottom
527
526
  }) : a.search("light") > -1 && (n.lightInfo = {
528
- color: e.color,
529
- intensity: e.intensity,
530
- decay: e.decay,
531
- distance: e.distance,
532
- angle: e.angle,
533
- penumbra: e.penumbra,
534
- groundColor: e.groundColor
527
+ color: t.color,
528
+ intensity: t.intensity,
529
+ decay: t.decay,
530
+ distance: t.distance,
531
+ angle: t.angle,
532
+ penumbra: t.penumbra,
533
+ groundColor: t.groundColor
535
534
  });
536
535
  return n;
537
536
  }
538
- function xa(e, n) {
537
+ function Ea(t, n) {
539
538
  const a = n.split(".");
540
539
  switch (a.length) {
541
540
  case 1:
542
- return e[a[0]];
541
+ return t[a[0]];
543
542
  case 2:
544
- return e[a[0]][a[1]];
543
+ return t[a[0]][a[1]];
545
544
  case 3:
546
- return e[a[0]][a[1]][a[2]];
545
+ return t[a[0]][a[1]][a[2]];
547
546
  case 4:
548
- return e[a[0]][a[1]][a[2]][a[3]];
547
+ return t[a[0]][a[1]][a[2]][a[3]];
549
548
  case 5:
550
- return e[a[0]][a[1]][a[2]][a[3]][a[4]];
549
+ return t[a[0]][a[1]][a[2]][a[3]][a[4]];
551
550
  case 6:
552
- return e[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
551
+ return t[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
553
552
  }
554
553
  }
555
- function ee(e, n, a) {
556
- const t = n.split(".");
557
- switch (t.length) {
554
+ function ee(t, n, a) {
555
+ const e = n.split(".");
556
+ switch (e.length) {
558
557
  case 1:
559
- e[t[0]] = a;
558
+ t[e[0]] = a;
560
559
  break;
561
560
  case 2:
562
- e[t[0]][t[1]] = a;
561
+ t[e[0]][e[1]] = a;
563
562
  break;
564
563
  case 3:
565
- e[t[0]][t[1]][t[2]] = a;
564
+ t[e[0]][e[1]][e[2]] = a;
566
565
  break;
567
566
  case 4:
568
- e[t[0]][t[1]][t[2]][t[3]] = a;
567
+ t[e[0]][e[1]][e[2]][e[3]] = a;
569
568
  break;
570
569
  case 5:
571
- e[t[0]][t[1]][t[2]][t[3]][t[4]] = a;
570
+ t[e[0]][e[1]][e[2]][e[3]][e[4]] = a;
572
571
  break;
573
572
  }
574
573
  }
575
- function It(e) {
574
+ function Dt(t) {
576
575
  return new Promise((n, a) => {
577
- const t = new Image();
578
- t.onload = () => {
579
- const r = new nn(t);
580
- r.wrapS = Ut, r.wrapT = Ut, r.needsUpdate = !0, n(r);
581
- }, t.onerror = a, t.src = e;
576
+ const e = new Image();
577
+ e.onload = () => {
578
+ const i = new tn(e);
579
+ i.wrapS = Ut, i.wrapT = Ut, i.needsUpdate = !0, n(i);
580
+ }, e.onerror = a, e.src = t;
582
581
  });
583
582
  }
584
- class xi extends xt {
583
+ class fi extends Ct {
585
584
  scene = void 0;
585
+ renderer = void 0;
586
586
  getObject(n) {
587
587
  this.app.debugEnabled && this.app.send({
588
588
  event: "getObject",
@@ -591,52 +591,52 @@ class xi extends xt {
591
591
  });
592
592
  }
593
593
  setObject(n) {
594
- const a = Pt(n);
594
+ const a = At(n);
595
595
  this.app.send({
596
596
  event: "setObject",
597
597
  target: "editor",
598
598
  data: a
599
599
  });
600
600
  }
601
- requestMethod(n, a, t, r) {
601
+ requestMethod(n, a, e, i) {
602
602
  this.app.send({
603
603
  event: "requestMethod",
604
604
  target: "app",
605
605
  data: {
606
606
  uuid: n,
607
607
  key: a,
608
- value: t,
609
- subitem: r
608
+ value: e,
609
+ subitem: i
610
610
  }
611
611
  });
612
612
  }
613
- updateObject(n, a, t) {
613
+ updateObject(n, a, e) {
614
614
  this.app.send({
615
615
  event: "updateObject",
616
616
  target: "app",
617
617
  data: {
618
618
  uuid: n,
619
619
  key: a,
620
- value: t
620
+ value: e
621
621
  }
622
622
  });
623
623
  }
624
- createTexture(n, a, t) {
624
+ createTexture(n, a, e) {
625
625
  this.app.send({
626
626
  event: "createTexture",
627
627
  target: "app",
628
628
  data: {
629
629
  uuid: n,
630
630
  key: a,
631
- value: t
631
+ value: e
632
632
  }
633
633
  });
634
634
  }
635
635
  setScene(n) {
636
636
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
637
637
  return;
638
- ga(), xn(this.scene);
639
- const a = On(this.scene);
638
+ ma(), Cn(this.scene);
639
+ const a = wn(this.scene);
640
640
  this.app.send({
641
641
  event: "setScene",
642
642
  target: "editor",
@@ -646,7 +646,7 @@ class xi extends xt {
646
646
  addCamera(n) {
647
647
  if (!this.app.debugEnabled)
648
648
  return;
649
- const a = Pt(n);
649
+ const a = At(n);
650
650
  this.app.send({
651
651
  event: "addCamera",
652
652
  target: "editor",
@@ -656,15 +656,47 @@ class xi extends xt {
656
656
  removeCamera(n) {
657
657
  if (!this.app.debugEnabled)
658
658
  return;
659
- const a = Pt(n);
659
+ const a = At(n);
660
660
  this.app.send({
661
661
  event: "removeCamera",
662
662
  target: "editor",
663
663
  data: a
664
664
  });
665
665
  }
666
+ handleApp(n, a, e) {
667
+ switch (e.event) {
668
+ case "getObject":
669
+ P.dispatchEvent({ type: k.GET_OBJECT, value: e.data });
670
+ break;
671
+ case "updateObject":
672
+ P.dispatchEvent({ type: k.UPDATE_OBJECT, value: e.data });
673
+ break;
674
+ case "createTexture":
675
+ P.dispatchEvent({ type: k.CREATE_TEXTURE, value: e.data });
676
+ break;
677
+ case "requestMethod":
678
+ P.dispatchEvent({ type: k.REQUEST_METHOD, value: e.data });
679
+ break;
680
+ }
681
+ }
682
+ handleEditor(n, a, e) {
683
+ switch (e.event) {
684
+ case "setObject":
685
+ P.dispatchEvent({ type: k.SET_OBJECT, value: e.data });
686
+ break;
687
+ case "setScene":
688
+ P.dispatchEvent({ type: k.SET_SCENE, value: e.data });
689
+ break;
690
+ case "addCamera":
691
+ P.dispatchEvent({ type: k.ADD_CAMERA, value: e.data });
692
+ break;
693
+ case "removeCamera":
694
+ P.dispatchEvent({ type: k.REMOVE_CAMERA, value: e.data });
695
+ break;
696
+ }
697
+ }
666
698
  }
667
- class wi extends xt {
699
+ class pi extends Ct {
668
700
  bindCBs;
669
701
  buttonCBs;
670
702
  pane = void 0;
@@ -675,14 +707,14 @@ class wi extends xt {
675
707
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
676
708
  }
677
709
  createGUI() {
678
- this.pane = new da({ title: "GUI" }), this.pane.registerPlugin(fa);
710
+ this.pane = new la({ title: "GUI" }), this.pane.registerPlugin(da);
679
711
  }
680
712
  dispose() {
681
713
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
682
714
  }
683
- addFolder(n, a = void 0, t = void 0) {
715
+ addFolder(n, a = void 0, e = void 0) {
684
716
  if (this.app.editor)
685
- return this.pane === void 0 && this.createGUI(), (t !== void 0 ? t : this.pane).addFolder({
717
+ return this.pane === void 0 && this.createGUI(), (e !== void 0 ? e : this.pane).addFolder({
686
718
  title: n,
687
719
  ...a
688
720
  });
@@ -692,7 +724,7 @@ class wi extends xt {
692
724
  data: {
693
725
  name: n,
694
726
  params: a,
695
- parent: t
727
+ parent: e
696
728
  }
697
729
  });
698
730
  }
@@ -700,51 +732,51 @@ class wi extends xt {
700
732
  return `debug_${Math.max(this.appCallbacks, this.editorCallbacks)}`;
701
733
  }
702
734
  // Binding
703
- bind(n, a, t, r = void 0) {
704
- const c = this.bindID, p = t.onChange !== void 0 ? t.onChange : Sn;
705
- this.bindCBs.set(c, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (r !== void 0 ? r : this.pane).addBinding(n, a, t).on("change", (u) => {
735
+ bind(n, a, e, i = void 0) {
736
+ const o = this.bindID, h = e.onChange !== void 0 ? e.onChange : Sn;
737
+ this.bindCBs.set(o, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (d) => {
706
738
  this.app.send({
707
739
  event: "updateBind",
708
740
  target: "app",
709
741
  data: {
710
- id: c,
711
- value: u.value
742
+ id: o,
743
+ value: d.value
712
744
  }
713
745
  });
714
746
  }), this.editorCallbacks++) : (this.app.send({
715
747
  event: "bindObject",
716
748
  target: "app",
717
749
  data: {
718
- id: c,
750
+ id: o,
719
751
  name: a,
720
- params: t,
721
- parent: r
752
+ params: e,
753
+ parent: i
722
754
  }
723
755
  }), this.appCallbacks++);
724
756
  }
725
757
  triggerBind(n, a) {
726
- const t = this.bindCBs.get(n);
727
- t !== void 0 ? t(a) : console.warn(`No callback for: ${n}`, a);
758
+ const e = this.bindCBs.get(n);
759
+ e !== void 0 ? e(a) : console.warn(`No callback for: ${n}`, a);
728
760
  }
729
761
  // Buttons
730
- button(n, a, t = void 0) {
731
- const r = this.bindID;
732
- this.buttonCBs.set(r, a), this.app.editor ? (this.pane === void 0 && this.createGUI(), (t !== void 0 ? t : this.pane).addButton({ title: n }).on("click", () => {
762
+ button(n, a, e = void 0) {
763
+ const i = this.bindID;
764
+ this.buttonCBs.set(i, a), this.app.editor ? (this.pane === void 0 && this.createGUI(), (e !== void 0 ? e : this.pane).addButton({ title: n }).on("click", () => {
733
765
  this.app.send({
734
766
  event: "clickButton",
735
767
  target: "app",
736
768
  data: {
737
- id: r
769
+ id: i
738
770
  }
739
771
  });
740
772
  }), this.editorCallbacks++) : (this.app.send({
741
773
  event: "addButton",
742
774
  target: "app",
743
775
  data: {
744
- id: r,
776
+ id: i,
745
777
  name: n,
746
778
  callback: a,
747
- parent: t
779
+ parent: e
748
780
  }
749
781
  }), this.appCallbacks++);
750
782
  }
@@ -761,8 +793,28 @@ class wi extends xt {
761
793
  for (let a = n; a > -1; --a)
762
794
  this.inspectorFolder.remove(this.inspectorFolder.children[a]);
763
795
  }
796
+ handleApp(n, a, e) {
797
+ const i = a;
798
+ switch (e.event) {
799
+ case "addFolder":
800
+ i.addFolder(e.data.name, e.data.params, e.data.parent);
801
+ break;
802
+ case "bindObject":
803
+ i.bind(e.data.name, e.data.params, e.data.parent);
804
+ break;
805
+ case "updateBind":
806
+ i.triggerBind(e.data.id, e.data.value);
807
+ break;
808
+ case "addButton":
809
+ i.button(e.data.name, e.data.callback, e.data.parent);
810
+ break;
811
+ case "clickButton":
812
+ i.triggerButton(e.data.id);
813
+ break;
814
+ }
815
+ }
764
816
  }
765
- var Lt = { exports: {} }, rt = {};
817
+ var It = { exports: {} }, rt = {};
766
818
  /**
767
819
  * @license React
768
820
  * react-jsx-runtime.production.min.js
@@ -772,23 +824,23 @@ var Lt = { exports: {} }, rt = {};
772
824
  * This source code is licensed under the MIT license found in the
773
825
  * LICENSE file in the root directory of this source tree.
774
826
  */
775
- var Ht;
776
- function wa() {
777
- if (Ht)
827
+ var Vt;
828
+ function Sa() {
829
+ if (Vt)
778
830
  return rt;
779
- Ht = 1;
780
- var e = En, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
781
- function p(o, u, d) {
782
- var v, b = {}, E = null, C = null;
783
- d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (C = u.ref);
784
- for (v in u)
785
- t.call(u, v) && !c.hasOwnProperty(v) && (b[v] = u[v]);
786
- if (o && o.defaultProps)
787
- for (v in u = o.defaultProps, u)
788
- b[v] === void 0 && (b[v] = u[v]);
789
- return { $$typeof: n, type: o, key: E, ref: C, props: b, _owner: r.current };
790
- }
791
- return rt.Fragment = a, rt.jsx = p, rt.jsxs = p, rt;
831
+ Vt = 1;
832
+ var t = yn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
833
+ function h(c, d, u) {
834
+ var v, b = {}, E = null, S = null;
835
+ u !== void 0 && (E = "" + u), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (S = d.ref);
836
+ for (v in d)
837
+ e.call(d, v) && !o.hasOwnProperty(v) && (b[v] = d[v]);
838
+ if (c && c.defaultProps)
839
+ for (v in d = c.defaultProps, d)
840
+ b[v] === void 0 && (b[v] = d[v]);
841
+ return { $$typeof: n, type: c, key: E, ref: S, props: b, _owner: i.current };
842
+ }
843
+ return rt.Fragment = a, rt.jsx = h, rt.jsxs = h, rt;
792
844
  }
793
845
  var st = {};
794
846
  /**
@@ -800,91 +852,91 @@ var st = {};
800
852
  * This source code is licensed under the MIT license found in the
801
853
  * LICENSE file in the root directory of this source tree.
802
854
  */
803
- var Wt;
804
- function Oa() {
805
- return Wt || (Wt = 1, process.env.NODE_ENV !== "production" && function() {
806
- var e = En, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), o = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), D = Symbol.iterator, I = "@@iterator";
807
- function q(i) {
808
- if (i === null || typeof i != "object")
855
+ var Ht;
856
+ function Ca() {
857
+ return Ht || (Ht = 1, process.env.NODE_ENV !== "production" && function() {
858
+ var t = yn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), D = Symbol.iterator, I = "@@iterator";
859
+ function q(r) {
860
+ if (r === null || typeof r != "object")
809
861
  return null;
810
- var f = D && i[D] || i[I];
862
+ var f = D && r[D] || r[I];
811
863
  return typeof f == "function" ? f : null;
812
864
  }
813
- var B = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
814
- function M(i) {
865
+ var B = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
866
+ function M(r) {
815
867
  {
816
- for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), S = 1; S < f; S++)
817
- g[S - 1] = arguments[S];
818
- z("error", i, g);
868
+ for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
869
+ g[C - 1] = arguments[C];
870
+ z("error", r, g);
819
871
  }
820
872
  }
821
- function z(i, f, g) {
873
+ function z(r, f, g) {
822
874
  {
823
- var S = B.ReactDebugCurrentFrame, j = S.getStackAddendum();
875
+ var C = B.ReactDebugCurrentFrame, j = C.getStackAddendum();
824
876
  j !== "" && (f += "%s", g = g.concat([j]));
825
- var N = g.map(function(A) {
877
+ var L = g.map(function(A) {
826
878
  return String(A);
827
879
  });
828
- N.unshift("Warning: " + f), Function.prototype.apply.call(console[i], console, N);
880
+ L.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, L);
829
881
  }
830
882
  }
831
883
  var we = !1, ce = !1, Y = !1, Q = !1, x = !1, Ae;
832
884
  Ae = Symbol.for("react.module.reference");
833
- function Fe(i) {
834
- return !!(typeof i == "string" || typeof i == "function" || i === t || i === c || x || i === r || i === d || i === v || Q || i === C || we || ce || Y || typeof i == "object" && i !== null && (i.$$typeof === E || i.$$typeof === b || i.$$typeof === p || i.$$typeof === o || i.$$typeof === u || // This needs to include all possible module reference object
885
+ function Fe(r) {
886
+ return !!(typeof r == "string" || typeof r == "function" || r === e || r === o || x || r === i || r === u || r === v || Q || r === S || we || ce || Y || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === c || r.$$typeof === d || // This needs to include all possible module reference object
835
887
  // types supported by any Flight configuration anywhere since
836
888
  // we don't know which Flight build this will end up being used
837
889
  // with.
838
- i.$$typeof === Ae || i.getModuleId !== void 0));
890
+ r.$$typeof === Ae || r.getModuleId !== void 0));
839
891
  }
840
- function Oe(i, f, g) {
841
- var S = i.displayName;
842
- if (S)
843
- return S;
892
+ function Oe(r, f, g) {
893
+ var C = r.displayName;
894
+ if (C)
895
+ return C;
844
896
  var j = f.displayName || f.name || "";
845
897
  return j !== "" ? g + "(" + j + ")" : g;
846
898
  }
847
- function me(i) {
848
- return i.displayName || "Context";
899
+ function me(r) {
900
+ return r.displayName || "Context";
849
901
  }
850
- function te(i) {
851
- if (i == null)
902
+ function te(r) {
903
+ if (r == null)
852
904
  return null;
853
- if (typeof i.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
854
- return i.displayName || i.name || null;
855
- if (typeof i == "string")
856
- return i;
857
- switch (i) {
858
- case t:
905
+ if (typeof r.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
906
+ return r.displayName || r.name || null;
907
+ if (typeof r == "string")
908
+ return r;
909
+ switch (r) {
910
+ case e:
859
911
  return "Fragment";
860
912
  case a:
861
913
  return "Portal";
862
- case c:
914
+ case o:
863
915
  return "Profiler";
864
- case r:
916
+ case i:
865
917
  return "StrictMode";
866
- case d:
918
+ case u:
867
919
  return "Suspense";
868
920
  case v:
869
921
  return "SuspenseList";
870
922
  }
871
- if (typeof i == "object")
872
- switch (i.$$typeof) {
873
- case o:
874
- var f = i;
923
+ if (typeof r == "object")
924
+ switch (r.$$typeof) {
925
+ case c:
926
+ var f = r;
875
927
  return me(f) + ".Consumer";
876
- case p:
877
- var g = i;
928
+ case h:
929
+ var g = r;
878
930
  return me(g._context) + ".Provider";
879
- case u:
880
- return Oe(i, i.render, "ForwardRef");
931
+ case d:
932
+ return Oe(r, r.render, "ForwardRef");
881
933
  case b:
882
- var S = i.displayName || null;
883
- return S !== null ? S : te(i.type) || "Memo";
934
+ var C = r.displayName || null;
935
+ return C !== null ? C : te(r.type) || "Memo";
884
936
  case E: {
885
- var j = i, N = j._payload, A = j._init;
937
+ var j = r, L = j._payload, A = j._init;
886
938
  try {
887
- return te(A(N));
939
+ return te(A(L));
888
940
  } catch {
889
941
  return null;
890
942
  }
@@ -892,62 +944,62 @@ function Oa() {
892
944
  }
893
945
  return null;
894
946
  }
895
- var de = Object.assign, ve = 0, ge, K, pe, Pe, ke, fe, h;
947
+ var ue = Object.assign, ve = 0, ge, K, pe, Pe, ke, he, p;
896
948
  function m() {
897
949
  }
898
950
  m.__reactDisabledLog = !0;
899
951
  function w() {
900
952
  {
901
953
  if (ve === 0) {
902
- ge = console.log, K = console.info, pe = console.warn, Pe = console.error, ke = console.group, fe = console.groupCollapsed, h = console.groupEnd;
903
- var i = {
954
+ ge = console.log, K = console.info, pe = console.warn, Pe = console.error, ke = console.group, he = console.groupCollapsed, p = console.groupEnd;
955
+ var r = {
904
956
  configurable: !0,
905
957
  enumerable: !0,
906
958
  value: m,
907
959
  writable: !0
908
960
  };
909
961
  Object.defineProperties(console, {
910
- info: i,
911
- log: i,
912
- warn: i,
913
- error: i,
914
- group: i,
915
- groupCollapsed: i,
916
- groupEnd: i
962
+ info: r,
963
+ log: r,
964
+ warn: r,
965
+ error: r,
966
+ group: r,
967
+ groupCollapsed: r,
968
+ groupEnd: r
917
969
  });
918
970
  }
919
971
  ve++;
920
972
  }
921
973
  }
922
- function _() {
974
+ function R() {
923
975
  {
924
976
  if (ve--, ve === 0) {
925
- var i = {
977
+ var r = {
926
978
  configurable: !0,
927
979
  enumerable: !0,
928
980
  writable: !0
929
981
  };
930
982
  Object.defineProperties(console, {
931
- log: de({}, i, {
983
+ log: ue({}, r, {
932
984
  value: ge
933
985
  }),
934
- info: de({}, i, {
986
+ info: ue({}, r, {
935
987
  value: K
936
988
  }),
937
- warn: de({}, i, {
989
+ warn: ue({}, r, {
938
990
  value: pe
939
991
  }),
940
- error: de({}, i, {
992
+ error: ue({}, r, {
941
993
  value: Pe
942
994
  }),
943
- group: de({}, i, {
995
+ group: ue({}, r, {
944
996
  value: ke
945
997
  }),
946
- groupCollapsed: de({}, i, {
947
- value: fe
998
+ groupCollapsed: ue({}, r, {
999
+ value: he
948
1000
  }),
949
- groupEnd: de({}, i, {
950
- value: h
1001
+ groupEnd: ue({}, r, {
1002
+ value: p
951
1003
  })
952
1004
  });
953
1005
  }
@@ -955,17 +1007,17 @@ function Oa() {
955
1007
  }
956
1008
  }
957
1009
  var G = B.ReactCurrentDispatcher, V;
958
- function ae(i, f, g) {
1010
+ function ae(r, f, g) {
959
1011
  {
960
1012
  if (V === void 0)
961
1013
  try {
962
1014
  throw Error();
963
1015
  } catch (j) {
964
- var S = j.stack.trim().match(/\n( *(at )?)/);
965
- V = S && S[1] || "";
1016
+ var C = j.stack.trim().match(/\n( *(at )?)/);
1017
+ V = C && C[1] || "";
966
1018
  }
967
1019
  return `
968
- ` + V + i;
1020
+ ` + V + r;
969
1021
  }
970
1022
  }
971
1023
  var U = !1, X;
@@ -973,20 +1025,20 @@ function Oa() {
973
1025
  var ie = typeof WeakMap == "function" ? WeakMap : Map;
974
1026
  X = new ie();
975
1027
  }
976
- function R(i, f) {
977
- if (!i || U)
1028
+ function _(r, f) {
1029
+ if (!r || U)
978
1030
  return "";
979
1031
  {
980
- var g = X.get(i);
1032
+ var g = X.get(r);
981
1033
  if (g !== void 0)
982
1034
  return g;
983
1035
  }
984
- var S;
1036
+ var C;
985
1037
  U = !0;
986
1038
  var j = Error.prepareStackTrace;
987
1039
  Error.prepareStackTrace = void 0;
988
- var N;
989
- N = G.current, G.current = null, w();
1040
+ var L;
1041
+ L = G.current, G.current = null, w();
990
1042
  try {
991
1043
  if (f) {
992
1044
  var A = function() {
@@ -1000,199 +1052,199 @@ function Oa() {
1000
1052
  try {
1001
1053
  Reflect.construct(A, []);
1002
1054
  } catch (Te) {
1003
- S = Te;
1055
+ C = Te;
1004
1056
  }
1005
- Reflect.construct(i, [], A);
1057
+ Reflect.construct(r, [], A);
1006
1058
  } else {
1007
1059
  try {
1008
1060
  A.call();
1009
1061
  } catch (Te) {
1010
- S = Te;
1062
+ C = Te;
1011
1063
  }
1012
- i.call(A.prototype);
1064
+ r.call(A.prototype);
1013
1065
  }
1014
1066
  } else {
1015
1067
  try {
1016
1068
  throw Error();
1017
1069
  } catch (Te) {
1018
- S = Te;
1070
+ C = Te;
1019
1071
  }
1020
- i();
1072
+ r();
1021
1073
  }
1022
1074
  } catch (Te) {
1023
- if (Te && S && typeof Te.stack == "string") {
1075
+ if (Te && C && typeof Te.stack == "string") {
1024
1076
  for (var T = Te.stack.split(`
1025
- `), ue = S.stack.split(`
1026
- `), Z = T.length - 1, J = ue.length - 1; Z >= 1 && J >= 0 && T[Z] !== ue[J]; )
1077
+ `), de = C.stack.split(`
1078
+ `), Z = T.length - 1, J = de.length - 1; Z >= 1 && J >= 0 && T[Z] !== de[J]; )
1027
1079
  J--;
1028
1080
  for (; Z >= 1 && J >= 0; Z--, J--)
1029
- if (T[Z] !== ue[J]) {
1081
+ if (T[Z] !== de[J]) {
1030
1082
  if (Z !== 1 || J !== 1)
1031
1083
  do
1032
- if (Z--, J--, J < 0 || T[Z] !== ue[J]) {
1084
+ if (Z--, J--, J < 0 || T[Z] !== de[J]) {
1033
1085
  var Ee = `
1034
1086
  ` + T[Z].replace(" at new ", " at ");
1035
- return i.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", i.displayName)), typeof i == "function" && X.set(i, Ee), Ee;
1087
+ return r.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", r.displayName)), typeof r == "function" && X.set(r, Ee), Ee;
1036
1088
  }
1037
1089
  while (Z >= 1 && J >= 0);
1038
1090
  break;
1039
1091
  }
1040
1092
  }
1041
1093
  } finally {
1042
- U = !1, G.current = N, _(), Error.prepareStackTrace = j;
1094
+ U = !1, G.current = L, R(), Error.prepareStackTrace = j;
1043
1095
  }
1044
- var Ke = i ? i.displayName || i.name : "", Bt = Ke ? ae(Ke) : "";
1045
- return typeof i == "function" && X.set(i, Bt), Bt;
1096
+ var Ke = r ? r.displayName || r.name : "", Bt = Ke ? ae(Ke) : "";
1097
+ return typeof r == "function" && X.set(r, Bt), Bt;
1046
1098
  }
1047
- function F(i, f, g) {
1048
- return R(i, !1);
1099
+ function F(r, f, g) {
1100
+ return _(r, !1);
1049
1101
  }
1050
- function ne(i) {
1051
- var f = i.prototype;
1102
+ function ne(r) {
1103
+ var f = r.prototype;
1052
1104
  return !!(f && f.isReactComponent);
1053
1105
  }
1054
- function Se(i, f, g) {
1055
- if (i == null)
1106
+ function Ce(r, f, g) {
1107
+ if (r == null)
1056
1108
  return "";
1057
- if (typeof i == "function")
1058
- return R(i, ne(i));
1059
- if (typeof i == "string")
1060
- return ae(i);
1061
- switch (i) {
1062
- case d:
1109
+ if (typeof r == "function")
1110
+ return _(r, ne(r));
1111
+ if (typeof r == "string")
1112
+ return ae(r);
1113
+ switch (r) {
1114
+ case u:
1063
1115
  return ae("Suspense");
1064
1116
  case v:
1065
1117
  return ae("SuspenseList");
1066
1118
  }
1067
- if (typeof i == "object")
1068
- switch (i.$$typeof) {
1069
- case u:
1070
- return F(i.render);
1119
+ if (typeof r == "object")
1120
+ switch (r.$$typeof) {
1121
+ case d:
1122
+ return F(r.render);
1071
1123
  case b:
1072
- return Se(i.type, f, g);
1124
+ return Ce(r.type, f, g);
1073
1125
  case E: {
1074
- var S = i, j = S._payload, N = S._init;
1126
+ var C = r, j = C._payload, L = C._init;
1075
1127
  try {
1076
- return Se(N(j), f, g);
1128
+ return Ce(L(j), f, g);
1077
1129
  } catch {
1078
1130
  }
1079
1131
  }
1080
1132
  }
1081
1133
  return "";
1082
1134
  }
1083
- var Me = Object.prototype.hasOwnProperty, dt = {}, ft = B.ReactDebugCurrentFrame;
1084
- function Be(i) {
1085
- if (i) {
1086
- var f = i._owner, g = Se(i.type, i._source, f ? f.type : null);
1087
- ft.setExtraStackFrame(g);
1135
+ var Me = Object.prototype.hasOwnProperty, dt = {}, ut = B.ReactDebugCurrentFrame;
1136
+ function Be(r) {
1137
+ if (r) {
1138
+ var f = r._owner, g = Ce(r.type, r._source, f ? f.type : null);
1139
+ ut.setExtraStackFrame(g);
1088
1140
  } else
1089
- ft.setExtraStackFrame(null);
1141
+ ut.setExtraStackFrame(null);
1090
1142
  }
1091
- function et(i, f, g, S, j) {
1143
+ function et(r, f, g, C, j) {
1092
1144
  {
1093
- var N = Function.call.bind(Me);
1094
- for (var A in i)
1095
- if (N(i, A)) {
1145
+ var L = Function.call.bind(Me);
1146
+ for (var A in r)
1147
+ if (L(r, A)) {
1096
1148
  var T = void 0;
1097
1149
  try {
1098
- if (typeof i[A] != "function") {
1099
- var ue = Error((S || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1100
- throw ue.name = "Invariant Violation", ue;
1150
+ if (typeof r[A] != "function") {
1151
+ var de = Error((C || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1152
+ throw de.name = "Invariant Violation", de;
1101
1153
  }
1102
- T = i[A](f, A, S, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1154
+ T = r[A](f, A, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1103
1155
  } catch (Z) {
1104
1156
  T = Z;
1105
1157
  }
1106
- T && !(T instanceof Error) && (Be(j), M("%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).", S || "React class", g, A, typeof T), Be(null)), T instanceof Error && !(T.message in dt) && (dt[T.message] = !0, Be(j), M("Failed %s type: %s", g, T.message), Be(null));
1158
+ T && !(T instanceof Error) && (Be(j), M("%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", g, A, typeof T), Be(null)), T instanceof Error && !(T.message in dt) && (dt[T.message] = !0, Be(j), M("Failed %s type: %s", g, T.message), Be(null));
1107
1159
  }
1108
1160
  }
1109
1161
  }
1110
1162
  var Ue = Array.isArray;
1111
- function tt(i) {
1112
- return Ue(i);
1163
+ function tt(r) {
1164
+ return Ue(r);
1113
1165
  }
1114
- function wt(i) {
1166
+ function xt(r) {
1115
1167
  {
1116
- var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && i[Symbol.toStringTag] || i.constructor.name || "Object";
1168
+ var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
1117
1169
  return g;
1118
1170
  }
1119
1171
  }
1120
- function ht(i) {
1172
+ function ht(r) {
1121
1173
  try {
1122
- return pt(i), !1;
1174
+ return ft(r), !1;
1123
1175
  } catch {
1124
1176
  return !0;
1125
1177
  }
1126
1178
  }
1127
- function pt(i) {
1128
- return "" + i;
1179
+ function ft(r) {
1180
+ return "" + r;
1129
1181
  }
1130
- function mt(i) {
1131
- if (ht(i))
1132
- return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", wt(i)), pt(i);
1182
+ function pt(r) {
1183
+ if (ht(r))
1184
+ return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xt(r)), ft(r);
1133
1185
  }
1134
1186
  var je = B.ReactCurrentOwner, nt = {
1135
1187
  key: !0,
1136
1188
  ref: !0,
1137
1189
  __self: !0,
1138
1190
  __source: !0
1139
- }, at, vt, qe;
1191
+ }, at, mt, qe;
1140
1192
  qe = {};
1141
- function Ot(i) {
1142
- if (Me.call(i, "ref")) {
1143
- var f = Object.getOwnPropertyDescriptor(i, "ref").get;
1193
+ function wt(r) {
1194
+ if (Me.call(r, "ref")) {
1195
+ var f = Object.getOwnPropertyDescriptor(r, "ref").get;
1144
1196
  if (f && f.isReactWarning)
1145
1197
  return !1;
1146
1198
  }
1147
- return i.ref !== void 0;
1199
+ return r.ref !== void 0;
1148
1200
  }
1149
- function Mt(i) {
1150
- if (Me.call(i, "key")) {
1151
- var f = Object.getOwnPropertyDescriptor(i, "key").get;
1201
+ function Ot(r) {
1202
+ if (Me.call(r, "key")) {
1203
+ var f = Object.getOwnPropertyDescriptor(r, "key").get;
1152
1204
  if (f && f.isReactWarning)
1153
1205
  return !1;
1154
1206
  }
1155
- return i.key !== void 0;
1207
+ return r.key !== void 0;
1156
1208
  }
1157
- function gt(i, f) {
1158
- if (typeof i.ref == "string" && je.current && f && je.current.stateNode !== f) {
1209
+ function vt(r, f) {
1210
+ if (typeof r.ref == "string" && je.current && f && je.current.stateNode !== f) {
1159
1211
  var g = te(je.current.type);
1160
- qe[g] || (M('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', te(je.current.type), i.ref), qe[g] = !0);
1212
+ qe[g] || (M('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', te(je.current.type), r.ref), qe[g] = !0);
1161
1213
  }
1162
1214
  }
1163
- function De(i, f) {
1215
+ function De(r, f) {
1164
1216
  {
1165
1217
  var g = function() {
1166
1218
  at || (at = !0, M("%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)", f));
1167
1219
  };
1168
- g.isReactWarning = !0, Object.defineProperty(i, "key", {
1220
+ g.isReactWarning = !0, Object.defineProperty(r, "key", {
1169
1221
  get: g,
1170
1222
  configurable: !0
1171
1223
  });
1172
1224
  }
1173
1225
  }
1174
- function Ft(i, f) {
1226
+ function Ft(r, f) {
1175
1227
  {
1176
1228
  var g = function() {
1177
- vt || (vt = !0, M("%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)", f));
1229
+ mt || (mt = !0, M("%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)", f));
1178
1230
  };
1179
- g.isReactWarning = !0, Object.defineProperty(i, "ref", {
1231
+ g.isReactWarning = !0, Object.defineProperty(r, "ref", {
1180
1232
  get: g,
1181
1233
  configurable: !0
1182
1234
  });
1183
1235
  }
1184
1236
  }
1185
- var s = function(i, f, g, S, j, N, A) {
1237
+ var s = function(r, f, g, C, j, L, A) {
1186
1238
  var T = {
1187
1239
  // This tag allows us to uniquely identify this as a React Element
1188
1240
  $$typeof: n,
1189
1241
  // Built-in properties that belong on the element
1190
- type: i,
1242
+ type: r,
1191
1243
  key: f,
1192
1244
  ref: g,
1193
1245
  props: A,
1194
1246
  // Record the component responsible for creating this element.
1195
- _owner: N
1247
+ _owner: L
1196
1248
  };
1197
1249
  return T._store = {}, Object.defineProperty(T._store, "validated", {
1198
1250
  configurable: !1,
@@ -1203,7 +1255,7 @@ function Oa() {
1203
1255
  configurable: !1,
1204
1256
  enumerable: !1,
1205
1257
  writable: !1,
1206
- value: S
1258
+ value: C
1207
1259
  }), Object.defineProperty(T, "_source", {
1208
1260
  configurable: !1,
1209
1261
  enumerable: !1,
@@ -1211,53 +1263,53 @@ function Oa() {
1211
1263
  value: j
1212
1264
  }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
1213
1265
  };
1214
- function y(i, f, g, S, j) {
1266
+ function y(r, f, g, C, j) {
1215
1267
  {
1216
- var N, A = {}, T = null, ue = null;
1217
- g !== void 0 && (mt(g), T = "" + g), Mt(f) && (mt(f.key), T = "" + f.key), Ot(f) && (ue = f.ref, gt(f, j));
1218
- for (N in f)
1219
- Me.call(f, N) && !nt.hasOwnProperty(N) && (A[N] = f[N]);
1220
- if (i && i.defaultProps) {
1221
- var Z = i.defaultProps;
1222
- for (N in Z)
1223
- A[N] === void 0 && (A[N] = Z[N]);
1268
+ var L, A = {}, T = null, de = null;
1269
+ g !== void 0 && (pt(g), T = "" + g), Ot(f) && (pt(f.key), T = "" + f.key), wt(f) && (de = f.ref, vt(f, j));
1270
+ for (L in f)
1271
+ Me.call(f, L) && !nt.hasOwnProperty(L) && (A[L] = f[L]);
1272
+ if (r && r.defaultProps) {
1273
+ var Z = r.defaultProps;
1274
+ for (L in Z)
1275
+ A[L] === void 0 && (A[L] = Z[L]);
1224
1276
  }
1225
- if (T || ue) {
1226
- var J = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1227
- T && De(A, J), ue && Ft(A, J);
1277
+ if (T || de) {
1278
+ var J = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1279
+ T && De(A, J), de && Ft(A, J);
1228
1280
  }
1229
- return s(i, T, ue, j, S, je.current, A);
1281
+ return s(r, T, de, j, C, je.current, A);
1230
1282
  }
1231
1283
  }
1232
- var O = B.ReactCurrentOwner, L = B.ReactDebugCurrentFrame;
1233
- function H(i) {
1234
- if (i) {
1235
- var f = i._owner, g = Se(i.type, i._source, f ? f.type : null);
1236
- L.setExtraStackFrame(g);
1284
+ var O = B.ReactCurrentOwner, N = B.ReactDebugCurrentFrame;
1285
+ function H(r) {
1286
+ if (r) {
1287
+ var f = r._owner, g = Ce(r.type, r._source, f ? f.type : null);
1288
+ N.setExtraStackFrame(g);
1237
1289
  } else
1238
- L.setExtraStackFrame(null);
1290
+ N.setExtraStackFrame(null);
1239
1291
  }
1240
1292
  var be;
1241
1293
  be = !1;
1242
- function le(i) {
1243
- return typeof i == "object" && i !== null && i.$$typeof === n;
1294
+ function le(r) {
1295
+ return typeof r == "object" && r !== null && r.$$typeof === n;
1244
1296
  }
1245
- function Tt() {
1297
+ function Mt() {
1246
1298
  {
1247
1299
  if (O.current) {
1248
- var i = te(O.current.type);
1249
- if (i)
1300
+ var r = te(O.current.type);
1301
+ if (r)
1250
1302
  return `
1251
1303
 
1252
- Check the render method of \`` + i + "`.";
1304
+ Check the render method of \`` + r + "`.";
1253
1305
  }
1254
1306
  return "";
1255
1307
  }
1256
1308
  }
1257
- function _t(i) {
1309
+ function Tt(r) {
1258
1310
  {
1259
- if (i !== void 0) {
1260
- var f = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
1311
+ if (r !== void 0) {
1312
+ var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
1261
1313
  return `
1262
1314
 
1263
1315
  Check your code at ` + f + ":" + g + ".";
@@ -1266,11 +1318,11 @@ Check your code at ` + f + ":" + g + ".";
1266
1318
  }
1267
1319
  }
1268
1320
  var it = {};
1269
- function xe(i) {
1321
+ function xe(r) {
1270
1322
  {
1271
- var f = Tt();
1323
+ var f = Mt();
1272
1324
  if (!f) {
1273
- var g = typeof i == "string" ? i : i.displayName || i.name;
1325
+ var g = typeof r == "string" ? r : r.displayName || r.name;
1274
1326
  g && (f = `
1275
1327
 
1276
1328
  Check the top-level render call using <` + g + ">.");
@@ -1278,55 +1330,55 @@ Check the top-level render call using <` + g + ">.");
1278
1330
  return f;
1279
1331
  }
1280
1332
  }
1281
- function ye(i, f) {
1333
+ function ye(r, f) {
1282
1334
  {
1283
- if (!i._store || i._store.validated || i.key != null)
1335
+ if (!r._store || r._store.validated || r.key != null)
1284
1336
  return;
1285
- i._store.validated = !0;
1337
+ r._store.validated = !0;
1286
1338
  var g = xe(f);
1287
1339
  if (it[g])
1288
1340
  return;
1289
1341
  it[g] = !0;
1290
- var S = "";
1291
- i && i._owner && i._owner !== O.current && (S = " It was passed a child from " + te(i._owner.type) + "."), H(i), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, S), H(null);
1342
+ var C = "";
1343
+ r && r._owner && r._owner !== O.current && (C = " It was passed a child from " + te(r._owner.type) + "."), H(r), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, C), H(null);
1292
1344
  }
1293
1345
  }
1294
- function $e(i, f) {
1346
+ function $e(r, f) {
1295
1347
  {
1296
- if (typeof i != "object")
1348
+ if (typeof r != "object")
1297
1349
  return;
1298
- if (tt(i))
1299
- for (var g = 0; g < i.length; g++) {
1300
- var S = i[g];
1301
- le(S) && ye(S, f);
1350
+ if (tt(r))
1351
+ for (var g = 0; g < r.length; g++) {
1352
+ var C = r[g];
1353
+ le(C) && ye(C, f);
1302
1354
  }
1303
- else if (le(i))
1304
- i._store && (i._store.validated = !0);
1305
- else if (i) {
1306
- var j = q(i);
1307
- if (typeof j == "function" && j !== i.entries)
1308
- for (var N = j.call(i), A; !(A = N.next()).done; )
1355
+ else if (le(r))
1356
+ r._store && (r._store.validated = !0);
1357
+ else if (r) {
1358
+ var j = q(r);
1359
+ if (typeof j == "function" && j !== r.entries)
1360
+ for (var L = j.call(r), A; !(A = L.next()).done; )
1309
1361
  le(A.value) && ye(A.value, f);
1310
1362
  }
1311
1363
  }
1312
1364
  }
1313
- function ze(i) {
1365
+ function ze(r) {
1314
1366
  {
1315
- var f = i.type;
1367
+ var f = r.type;
1316
1368
  if (f == null || typeof f == "string")
1317
1369
  return;
1318
1370
  var g;
1319
1371
  if (typeof f == "function")
1320
1372
  g = f.propTypes;
1321
- else if (typeof f == "object" && (f.$$typeof === u || // Note: Memo only checks outer props here.
1373
+ else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
1322
1374
  // Inner props are checked in the reconciler.
1323
1375
  f.$$typeof === b))
1324
1376
  g = f.propTypes;
1325
1377
  else
1326
1378
  return;
1327
1379
  if (g) {
1328
- var S = te(f);
1329
- et(g, i.props, "prop", S, i);
1380
+ var C = te(f);
1381
+ et(g, r.props, "prop", C, r);
1330
1382
  } else if (f.PropTypes !== void 0 && !be) {
1331
1383
  be = !0;
1332
1384
  var j = te(f);
@@ -1335,68 +1387,68 @@ Check the top-level render call using <` + g + ">.");
1335
1387
  typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1336
1388
  }
1337
1389
  }
1338
- function Ye(i) {
1390
+ function Ye(r) {
1339
1391
  {
1340
- for (var f = Object.keys(i.props), g = 0; g < f.length; g++) {
1341
- var S = f[g];
1342
- if (S !== "children" && S !== "key") {
1343
- H(i), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), H(null);
1392
+ for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
1393
+ var C = f[g];
1394
+ if (C !== "children" && C !== "key") {
1395
+ H(r), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), H(null);
1344
1396
  break;
1345
1397
  }
1346
1398
  }
1347
- i.ref !== null && (H(i), M("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
1399
+ r.ref !== null && (H(r), M("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
1348
1400
  }
1349
1401
  }
1350
- function Ge(i, f, g, S, j, N) {
1402
+ function Ge(r, f, g, C, j, L) {
1351
1403
  {
1352
- var A = Fe(i);
1404
+ var A = Fe(r);
1353
1405
  if (!A) {
1354
1406
  var T = "";
1355
- (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1356
- var ue = _t(j);
1357
- ue ? T += ue : T += Tt();
1407
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1408
+ var de = Tt(j);
1409
+ de ? T += de : T += Mt();
1358
1410
  var Z;
1359
- i === null ? Z = "null" : tt(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + (te(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof i, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, T);
1411
+ r === null ? Z = "null" : tt(r) ? Z = "array" : r !== void 0 && r.$$typeof === n ? (Z = "<" + (te(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof r, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, T);
1360
1412
  }
1361
- var J = y(i, f, g, j, N);
1413
+ var J = y(r, f, g, j, L);
1362
1414
  if (J == null)
1363
1415
  return J;
1364
1416
  if (A) {
1365
1417
  var Ee = f.children;
1366
1418
  if (Ee !== void 0)
1367
- if (S)
1419
+ if (C)
1368
1420
  if (tt(Ee)) {
1369
1421
  for (var Ke = 0; Ke < Ee.length; Ke++)
1370
- $e(Ee[Ke], i);
1422
+ $e(Ee[Ke], r);
1371
1423
  Object.freeze && Object.freeze(Ee);
1372
1424
  } else
1373
1425
  M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1374
1426
  else
1375
- $e(Ee, i);
1427
+ $e(Ee, r);
1376
1428
  }
1377
- return i === t ? Ye(J) : ze(J), J;
1429
+ return r === e ? Ye(J) : ze(J), J;
1378
1430
  }
1379
1431
  }
1380
- function Rn(i, f, g) {
1381
- return Ge(i, f, g, !0);
1432
+ function Rn(r, f, g) {
1433
+ return Ge(r, f, g, !0);
1382
1434
  }
1383
- function An(i, f, g) {
1384
- return Ge(i, f, g, !1);
1435
+ function _n(r, f, g) {
1436
+ return Ge(r, f, g, !1);
1385
1437
  }
1386
- var Pn = An, kn = Rn;
1387
- st.Fragment = t, st.jsx = Pn, st.jsxs = kn;
1438
+ var An = _n, Pn = Rn;
1439
+ st.Fragment = e, st.jsx = An, st.jsxs = Pn;
1388
1440
  }()), st;
1389
1441
  }
1390
- process.env.NODE_ENV === "production" ? Lt.exports = wa() : Lt.exports = Oa();
1391
- var l = Lt.exports;
1392
- function Mn(e) {
1393
- return e.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: e.title } }) : /* @__PURE__ */ l.jsx("button", { children: e.title });
1442
+ process.env.NODE_ENV === "production" ? It.exports = Sa() : It.exports = Ca();
1443
+ var l = It.exports;
1444
+ function On(t) {
1445
+ return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1394
1446
  }
1395
- const Ma = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1447
+ const xa = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1396
1448
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1397
1449
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1398
1450
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1399
- ] }), Ta = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1451
+ ] }), wa = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1400
1452
  "path",
1401
1453
  {
1402
1454
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
@@ -1404,76 +1456,76 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1404
1456
  C11,8.22,10.74,8,10.43,8z`
1405
1457
  }
1406
1458
  ) });
1407
- function _a(e) {
1408
- return /* @__PURE__ */ l.jsx(Cn.Item, { value: e.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1409
- Ta,
1410
- /* @__PURE__ */ l.jsx("span", { children: e.title }),
1459
+ function Oa(t) {
1460
+ return /* @__PURE__ */ l.jsx(En.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1461
+ wa,
1462
+ /* @__PURE__ */ l.jsx("span", { children: t.title }),
1411
1463
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1412
- e.onDelete(e.index);
1413
- }, children: Ma })
1414
- ] }) }, e.title);
1415
- }
1416
- function Ra(e) {
1417
- const [n, a] = oe(!1), [t, r] = oe(e.options), c = (d) => {
1418
- e.onDragComplete(d), r(d);
1419
- }, p = (d) => {
1420
- const v = [...t];
1421
- v.splice(d, 1), c(v);
1422
- }, o = [];
1423
- t.forEach((d, v) => {
1424
- o.push(/* @__PURE__ */ l.jsx(_a, { index: v, title: d, onDelete: p }, d));
1464
+ t.onDelete(t.index);
1465
+ }, children: xa })
1466
+ ] }) }, t.title);
1467
+ }
1468
+ function Ma(t) {
1469
+ const [n, a] = oe(!1), [e, i] = oe(t.options), o = (u) => {
1470
+ t.onDragComplete(u), i(u);
1471
+ }, h = (u) => {
1472
+ const v = [...e];
1473
+ v.splice(u, 1), o(v);
1474
+ }, c = [];
1475
+ e.forEach((u, v) => {
1476
+ c.push(/* @__PURE__ */ l.jsx(Oa, { index: v, title: u, onDelete: h }, u));
1425
1477
  });
1426
- let u = "dropdown draggable";
1427
- return e.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1428
- /* @__PURE__ */ l.jsx(Mn, { title: e.title }),
1429
- /* @__PURE__ */ l.jsx(Cn.Group, { axis: "y", values: t, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: o })
1478
+ let d = "dropdown draggable";
1479
+ return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1480
+ /* @__PURE__ */ l.jsx(On, { title: t.title }),
1481
+ /* @__PURE__ */ l.jsx(En.Group, { axis: "y", values: e, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: c })
1430
1482
  ] });
1431
1483
  }
1432
- function Aa(e) {
1433
- const [n, a] = oe(!1), t = [];
1434
- e.options.map((c, p) => {
1435
- e.onSelect !== void 0 && (c.onSelect = e.onSelect), t.push(/* @__PURE__ */ l.jsx(Pa, { option: c }, p));
1484
+ function Ta(t) {
1485
+ const [n, a] = oe(!1), e = [];
1486
+ t.options.map((o, h) => {
1487
+ t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ra, { option: o }, h));
1436
1488
  });
1437
- let r = "dropdown";
1438
- return e.subdropdown && (r += " subdropdown"), /* @__PURE__ */ l.jsxs(
1489
+ let i = "dropdown";
1490
+ return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
1439
1491
  "div",
1440
1492
  {
1441
- className: r,
1493
+ className: i,
1442
1494
  onMouseEnter: () => a(!0),
1443
1495
  onMouseLeave: () => a(!1),
1444
1496
  children: [
1445
- /* @__PURE__ */ l.jsx(Mn, { title: e.title }),
1497
+ /* @__PURE__ */ l.jsx(On, { title: t.title }),
1446
1498
  /* @__PURE__ */ l.jsx(
1447
1499
  "ul",
1448
1500
  {
1449
1501
  style: { visibility: n ? "visible" : "hidden" },
1450
- children: t
1502
+ children: e
1451
1503
  }
1452
1504
  )
1453
1505
  ]
1454
1506
  }
1455
1507
  );
1456
1508
  }
1457
- function Pa(e) {
1458
- const { option: n } = e, [a, t] = oe("");
1459
- let r;
1509
+ function Ra(t) {
1510
+ const { option: n } = t, [a, e] = oe("");
1511
+ let i;
1460
1512
  switch (n.type) {
1461
1513
  case "draggable":
1462
- r = /* @__PURE__ */ l.jsx(
1463
- Ra,
1514
+ i = /* @__PURE__ */ l.jsx(
1515
+ Ma,
1464
1516
  {
1465
1517
  title: n.title,
1466
1518
  options: n.value,
1467
- onDragComplete: (c) => {
1468
- n.onDragComplete !== void 0 && n.onDragComplete(c);
1519
+ onDragComplete: (o) => {
1520
+ n.onDragComplete !== void 0 && n.onDragComplete(o);
1469
1521
  },
1470
1522
  subdropdown: !0
1471
1523
  }
1472
1524
  );
1473
1525
  break;
1474
1526
  case "dropdown":
1475
- r = /* @__PURE__ */ l.jsx(
1476
- Aa,
1527
+ i = /* @__PURE__ */ l.jsx(
1528
+ Ta,
1477
1529
  {
1478
1530
  title: n.title,
1479
1531
  options: n.value,
@@ -1483,62 +1535,52 @@ function Pa(e) {
1483
1535
  );
1484
1536
  break;
1485
1537
  case "option":
1486
- r = /* @__PURE__ */ l.jsx(
1538
+ i = /* @__PURE__ */ l.jsx(
1487
1539
  "button",
1488
1540
  {
1489
1541
  onClick: () => {
1490
- n.onSelect !== void 0 && n.onSelect(n.value), n.selectable && (a !== n.title ? t(n.title) : t(""));
1542
+ n.onSelect !== void 0 && n.onSelect(n.value), n.selectable && (a !== n.title ? e(n.title) : e(""));
1491
1543
  },
1492
1544
  children: n.title
1493
1545
  }
1494
1546
  );
1495
1547
  break;
1496
1548
  }
1497
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: r }, pa());
1549
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ha());
1498
1550
  }
1499
- class ct {
1500
- appHandlers = [];
1501
- editorHandlers = [];
1502
- _app;
1503
- static _instance;
1504
- handleAppBroadcast = (n) => {
1505
- switch (this.appHandlers.forEach((a) => {
1506
- a.callback(this._app, a.remote, n);
1507
- }), n.event) {
1551
+ function mi(t, n, a) {
1552
+ function e(o) {
1553
+ switch (n.forEach((h) => {
1554
+ h.callback(t, h.remote, o);
1555
+ }), o.event) {
1508
1556
  case "custom":
1509
- P.dispatchEvent({ type: k.CUSTOM, value: n.data });
1557
+ P.dispatchEvent({ type: k.CUSTOM, value: o.data });
1510
1558
  break;
1511
1559
  }
1512
- };
1513
- handleEditorBroadcast = (n) => {
1514
- switch (this.editorHandlers.forEach((a) => {
1515
- a.callback(this._app, a.remote, n);
1516
- }), n.event) {
1560
+ }
1561
+ function i(o) {
1562
+ switch (a.forEach((h) => {
1563
+ h.callback(t, h.remote, o);
1564
+ }), o.event) {
1517
1565
  case "custom":
1518
- P.dispatchEvent({ type: k.CUSTOM, value: n.data });
1566
+ P.dispatchEvent({ type: k.CUSTOM, value: o.data });
1519
1567
  break;
1520
1568
  }
1521
- };
1522
- set app(n) {
1523
- this._app = n, n.listen = (a) => {
1524
- a.target === "editor" ? this.handleEditorBroadcast(a) : this.handleAppBroadcast(a);
1525
- };
1526
- }
1527
- // Singleton
1528
- static get instance() {
1529
- return ct._instance === void 0 && (ct._instance = new ct()), ct._instance;
1530
1569
  }
1570
+ t.listen = (o) => {
1571
+ o.target === "editor" ? i(o) : e(o);
1572
+ };
1531
1573
  }
1532
- function Nt(e) {
1533
- const [n, a] = oe(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
1534
- return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${t ? "hide" : ""}`, children: [
1574
+ function Lt(t) {
1575
+ const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1576
+ return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1535
1577
  /* @__PURE__ */ l.jsxs(
1536
1578
  "button",
1537
1579
  {
1538
1580
  className: "toggle",
1539
1581
  onClick: () => {
1540
- const r = !n;
1541
- e.onToggle !== void 0 && e.onToggle(r), a(r);
1582
+ const i = !n;
1583
+ t.onToggle !== void 0 && t.onToggle(i), a(i);
1542
1584
  },
1543
1585
  children: [
1544
1586
  /* @__PURE__ */ l.jsx(
@@ -1548,21 +1590,21 @@ function Nt(e) {
1548
1590
  children: "Toggle"
1549
1591
  }
1550
1592
  ),
1551
- /* @__PURE__ */ l.jsx("p", { className: "label", children: ut(e.label) })
1593
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: lt(t.label) })
1552
1594
  ]
1553
1595
  }
1554
1596
  ),
1555
- e.button,
1556
- /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: e.children }) })
1597
+ t.button,
1598
+ /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1557
1599
  ] });
1558
1600
  }
1559
- function Tn(e) {
1560
- const [n, a] = oe(!1), t = e.child !== void 0 && e.child.children.length > 0, r = [];
1561
- return e.child !== void 0 && e.child.children.length > 0 && e.child.children.map((c) => {
1562
- r.push(/* @__PURE__ */ l.jsx(Tn, { child: c, three: e.three }, Math.random()));
1563
- }), /* @__PURE__ */ l.jsx(l.Fragment, { children: e.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1601
+ function Mn(t) {
1602
+ const [n, a] = oe(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1603
+ return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((o) => {
1604
+ i.push(/* @__PURE__ */ l.jsx(Mn, { child: o, three: t.three }, Math.random()));
1605
+ }), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1564
1606
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1565
- t ? /* @__PURE__ */ l.jsx(
1607
+ e ? /* @__PURE__ */ l.jsx(
1566
1608
  "button",
1567
1609
  {
1568
1610
  className: "status",
@@ -1579,37 +1621,37 @@ function Tn(e) {
1579
1621
  {
1580
1622
  className: "name",
1581
1623
  style: {
1582
- left: t ? "20px" : "5px"
1624
+ left: e ? "20px" : "5px"
1583
1625
  },
1584
1626
  onClick: () => {
1585
- e.child !== void 0 && (e.three.getObject(e.child.uuid), n || a(!0));
1627
+ t.child !== void 0 && (t.three.getObject(t.child.uuid), n || a(!0));
1586
1628
  },
1587
- children: e.child.name.length > 0 ? `${e.child.name} (${e.child.type})` : `${e.child.type}::${e.child.uuid}`
1629
+ children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1588
1630
  }
1589
1631
  ),
1590
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Ea(e.child)}` })
1632
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${ga(t.child)}` })
1591
1633
  ] }),
1592
- /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: r }) })
1634
+ /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: i }) })
1593
1635
  ] }, Math.random()) });
1594
1636
  }
1595
- function ka(e) {
1637
+ function _a(t) {
1596
1638
  const n = [];
1597
- return e.child?.children.map((a) => {
1598
- n.push(/* @__PURE__ */ l.jsx(Tn, { child: a, three: e.three }, Math.random()));
1599
- }), /* @__PURE__ */ l.jsx("div", { className: `scene ${e.class !== void 0 ? e.class : ""}`, children: n });
1639
+ return t.child?.children.map((a) => {
1640
+ n.push(/* @__PURE__ */ l.jsx(Mn, { child: a, three: t.three }, Math.random()));
1641
+ }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1600
1642
  }
1601
- const ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1602
- function Da(e) {
1603
- return "items" in e;
1643
+ const Aa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1644
+ function Pa(t) {
1645
+ return "items" in t;
1604
1646
  }
1605
- function We(e) {
1647
+ function We(t) {
1606
1648
  const n = [];
1607
- return e.items.forEach((a) => {
1608
- Da(a) ? n.push(
1609
- /* @__PURE__ */ l.jsx(We, { title: ut(a.title), items: a.items }, Math.random())
1649
+ return t.items.forEach((a) => {
1650
+ Pa(a) ? n.push(
1651
+ /* @__PURE__ */ l.jsx(We, { title: lt(a.title), items: a.items }, Math.random())
1610
1652
  ) : n.push(
1611
1653
  /* @__PURE__ */ l.jsx(
1612
- lt,
1654
+ ct,
1613
1655
  {
1614
1656
  title: a.title,
1615
1657
  prop: a.prop,
@@ -1620,20 +1662,20 @@ function We(e) {
1620
1662
  step: a.step,
1621
1663
  disabled: a.disabled,
1622
1664
  options: a.options,
1623
- onChange: (t, r) => {
1624
- a.onChange !== void 0 && a.onChange(t, r);
1665
+ onChange: (e, i) => {
1666
+ a.onChange !== void 0 && a.onChange(e, i);
1625
1667
  }
1626
1668
  },
1627
1669
  Math.random()
1628
1670
  )
1629
1671
  );
1630
- }), /* @__PURE__ */ l.jsx(Nt, { label: e.title, open: e.expanded === !0, children: n });
1672
+ }), /* @__PURE__ */ l.jsx(Lt, { label: t.title, open: t.expanded === !0, children: n });
1631
1673
  }
1632
- function Ia(e) {
1633
- return !(e === "alphaHash" || e === "alphaToCoverage" || e === "attenuationDistance" || e === "blendDstAlpha" || e === "colorWrite" || e === "combine" || e === "defaultAttributeValues" || e === "depthFunc" || e === "forceSinglePass" || e === "glslVersion" || e === "linecap" || e === "linejoin" || e === "linewidth" || e === "normalMapType" || e === "precision" || e === "premultipliedAlpha" || e === "shadowSide" || e === "toneMapped" || e === "uniformsGroups" || e === "uniformsNeedUpdate" || e === "userData" || e === "vertexColors" || e === "version" || e === "wireframeLinecap" || e === "wireframeLinejoin" || e === "wireframeLinewidth" || e.slice(0, 4) === "clip" || e.slice(0, 7) === "polygon" || e.slice(0, 7) === "stencil" || e.slice(0, 2) === "is");
1674
+ function ka(t) {
1675
+ return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1634
1676
  }
1635
- function Ve(e) {
1636
- switch (e) {
1677
+ function Ve(t) {
1678
+ switch (t) {
1637
1679
  case "alphaMap":
1638
1680
  return "Alpha Map";
1639
1681
  case "anisotropyMap":
@@ -1803,109 +1845,109 @@ function Ve(e) {
1803
1845
  case "wireframe":
1804
1846
  return "Wireframe";
1805
1847
  }
1806
- return e;
1848
+ return t;
1807
1849
  }
1808
- function La(e) {
1809
- return e.toLowerCase().search("intensity") > -1 || e === "anisotropyRotation" || e === "blendAlpha" || e === "bumpScale" || e === "clearcoatRoughness" || e === "displacementBias" || e === "displacementScale" || e === "metalness" || e === "opacity" || e === "reflectivity" || e === "refractionRatio" || e === "roughness" || e === "sheenRoughness" || e === "thickness";
1850
+ function ja(t) {
1851
+ return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1810
1852
  }
1811
- function Na() {
1812
- const e = document.createElement("input");
1813
- return e.type = "file", new Promise((n, a) => {
1814
- e.addEventListener("change", function() {
1815
- if (e.files === null)
1853
+ function Da() {
1854
+ const t = document.createElement("input");
1855
+ return t.type = "file", new Promise((n, a) => {
1856
+ t.addEventListener("change", function() {
1857
+ if (t.files === null)
1816
1858
  a();
1817
1859
  else {
1818
- const t = e.files[0], r = new FileReader();
1819
- r.onload = function(c) {
1820
- n(c.target.result);
1821
- }, r.readAsDataURL(t);
1860
+ const e = t.files[0], i = new FileReader();
1861
+ i.onload = function(o) {
1862
+ n(o.target.result);
1863
+ }, i.readAsDataURL(e);
1822
1864
  }
1823
- }), e.click();
1865
+ }), t.click();
1824
1866
  });
1825
1867
  }
1826
- const Fa = [
1868
+ const Ia = [
1827
1869
  {
1828
1870
  title: "Front",
1829
- value: In
1871
+ value: jn
1830
1872
  },
1831
1873
  {
1832
1874
  title: "Back",
1833
- value: Ln
1875
+ value: Dn
1834
1876
  },
1835
1877
  {
1836
1878
  title: "Double",
1837
- value: an
1879
+ value: nn
1838
1880
  }
1839
- ], Ba = [
1881
+ ], Na = [
1840
1882
  {
1841
1883
  title: "No Blending",
1842
- value: Nn
1884
+ value: In
1843
1885
  },
1844
1886
  {
1845
1887
  title: "Normal",
1846
- value: Fn
1888
+ value: Nn
1847
1889
  },
1848
1890
  {
1849
1891
  title: "Additive",
1850
- value: Bn
1892
+ value: Ln
1851
1893
  },
1852
1894
  {
1853
1895
  title: "Subtractive",
1854
- value: Un
1896
+ value: Fn
1855
1897
  },
1856
1898
  {
1857
1899
  title: "Multiply",
1858
- value: $n
1900
+ value: Bn
1859
1901
  },
1860
1902
  {
1861
1903
  title: "Custom",
1862
- value: zn
1904
+ value: Un
1863
1905
  }
1864
- ], Ua = [
1906
+ ], La = [
1865
1907
  {
1866
1908
  title: "Add",
1867
- value: Yn
1909
+ value: $n
1868
1910
  },
1869
1911
  {
1870
1912
  title: "Subtract",
1871
- value: Gn
1913
+ value: zn
1872
1914
  },
1873
1915
  {
1874
1916
  title: "Reverse Subtract",
1875
- value: Vn
1917
+ value: Yn
1876
1918
  },
1877
1919
  {
1878
1920
  title: "Min",
1879
- value: Hn
1921
+ value: Gn
1880
1922
  },
1881
1923
  {
1882
1924
  title: "Max",
1883
- value: Wn
1925
+ value: Vn
1884
1926
  }
1885
- ], $a = [
1927
+ ], Fa = [
1886
1928
  {
1887
1929
  title: "Zero",
1888
- valye: rn
1930
+ valye: an
1889
1931
  },
1890
1932
  {
1891
1933
  title: "One",
1892
- valye: sn
1934
+ valye: rn
1893
1935
  },
1894
1936
  {
1895
1937
  title: "Src Color",
1896
- valye: on
1938
+ valye: sn
1897
1939
  },
1898
1940
  {
1899
1941
  title: "One Minus Src Color",
1900
- valye: cn
1942
+ valye: on
1901
1943
  },
1902
1944
  {
1903
1945
  title: "Src Alpha",
1904
- valye: ln
1946
+ valye: cn
1905
1947
  },
1906
1948
  {
1907
1949
  title: "One Minus Src Alpha",
1908
- valye: un
1950
+ valye: ln
1909
1951
  },
1910
1952
  {
1911
1953
  title: "Dst Alpha",
@@ -1913,7 +1955,7 @@ const Fa = [
1913
1955
  },
1914
1956
  {
1915
1957
  title: "One Minus Dst Alpha",
1916
- valye: fn
1958
+ valye: un
1917
1959
  },
1918
1960
  {
1919
1961
  title: "Dst Color",
@@ -1921,52 +1963,52 @@ const Fa = [
1921
1963
  },
1922
1964
  {
1923
1965
  title: "One Minus Dst Color",
1924
- valye: pn
1966
+ valye: fn
1925
1967
  },
1926
1968
  {
1927
1969
  title: "Src Alpha Saturate",
1928
- valye: qn
1970
+ valye: Hn
1929
1971
  },
1930
1972
  {
1931
1973
  title: "Constant Color",
1932
- valye: mn
1974
+ valye: pn
1933
1975
  },
1934
1976
  {
1935
1977
  title: "One Minus Constant Color",
1936
- valye: vn
1978
+ valye: mn
1937
1979
  },
1938
1980
  {
1939
1981
  title: "Constant Alpha",
1940
- valye: gn
1982
+ valye: vn
1941
1983
  },
1942
1984
  {
1943
1985
  title: "One Minus Constant Alpha",
1944
- valye: bn
1986
+ valye: gn
1945
1987
  }
1946
- ], za = [
1988
+ ], Ba = [
1947
1989
  {
1948
1990
  title: "Zero",
1949
- valye: rn
1991
+ valye: an
1950
1992
  },
1951
1993
  {
1952
1994
  title: "One",
1953
- valye: sn
1995
+ valye: rn
1954
1996
  },
1955
1997
  {
1956
1998
  title: "Src Color",
1957
- valye: on
1999
+ valye: sn
1958
2000
  },
1959
2001
  {
1960
2002
  title: "One Minus Src Color",
1961
- valye: cn
2003
+ valye: on
1962
2004
  },
1963
2005
  {
1964
2006
  title: "Src Alpha",
1965
- valye: ln
2007
+ valye: cn
1966
2008
  },
1967
2009
  {
1968
2010
  title: "One Minus Src Alpha",
1969
- valye: un
2011
+ valye: ln
1970
2012
  },
1971
2013
  {
1972
2014
  title: "Dst Alpha",
@@ -1974,7 +2016,7 @@ const Fa = [
1974
2016
  },
1975
2017
  {
1976
2018
  title: "One Minus Dst Alpha",
1977
- valye: fn
2019
+ valye: un
1978
2020
  },
1979
2021
  {
1980
2022
  title: "Dst Color",
@@ -1982,401 +2024,401 @@ const Fa = [
1982
2024
  },
1983
2025
  {
1984
2026
  title: "One Minus Dst Color",
1985
- valye: pn
2027
+ valye: fn
1986
2028
  },
1987
2029
  {
1988
2030
  title: "Constant Color",
1989
- valye: mn
2031
+ valye: pn
1990
2032
  },
1991
2033
  {
1992
2034
  title: "One Minus Constant Color",
1993
- valye: vn
2035
+ valye: mn
1994
2036
  },
1995
2037
  {
1996
2038
  title: "Constant Alpha",
1997
- valye: gn
2039
+ valye: vn
1998
2040
  },
1999
2041
  {
2000
2042
  title: "One Minus Constant Alpha",
2001
- valye: bn
2043
+ valye: gn
2002
2044
  }
2003
2045
  ];
2004
- function ot(e, n) {
2005
- e.needsUpdate = !0, e.type = "option", e.options = n;
2046
+ function ot(t, n) {
2047
+ t.needsUpdate = !0, t.type = "option", t.options = n;
2006
2048
  }
2007
- function qt(e, n, a) {
2008
- const t = [];
2009
- for (const r in e) {
2010
- if (!Ia(r))
2049
+ function Wt(t, n, a) {
2050
+ const e = [];
2051
+ for (const i in t) {
2052
+ if (!ka(i))
2011
2053
  continue;
2012
- const c = typeof e[r], p = e[r];
2013
- if (c === "boolean" || c === "number" || c === "string") {
2014
- const o = {
2015
- title: Ve(r),
2016
- prop: r,
2017
- type: c,
2018
- value: p,
2054
+ const o = typeof t[i], h = t[i];
2055
+ if (o === "boolean" || o === "number" || o === "string") {
2056
+ const c = {
2057
+ title: Ve(i),
2058
+ prop: i,
2059
+ type: o,
2060
+ value: h,
2019
2061
  min: void 0,
2020
2062
  max: void 0,
2021
- needsUpdate: c === "boolean",
2022
- onChange: (d, v) => {
2023
- a.updateObject(n.uuid, `material.${d}`, v), o.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2063
+ needsUpdate: o === "boolean",
2064
+ onChange: (u, v) => {
2065
+ a.updateObject(n.uuid, `material.${u}`, v), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2024
2066
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2025
- b !== void 0 && ee(b, `material.${d}`, v);
2067
+ b !== void 0 && ee(b, `material.${u}`, v);
2026
2068
  }
2027
2069
  };
2028
- switch (r) {
2070
+ switch (i) {
2029
2071
  case "blending":
2030
- ot(o, Ba);
2072
+ ot(c, Na);
2031
2073
  break;
2032
2074
  case "blendDst":
2033
- ot(o, za);
2075
+ ot(c, Ba);
2034
2076
  break;
2035
2077
  case "blendEquation":
2036
- ot(o, Ua);
2078
+ ot(c, La);
2037
2079
  break;
2038
2080
  case "blendSrc":
2039
- ot(o, $a);
2081
+ ot(c, Fa);
2040
2082
  break;
2041
2083
  case "side":
2042
- ot(o, Fa);
2084
+ ot(c, Ia);
2043
2085
  break;
2044
2086
  }
2045
- La(r) && (o.value = Number(p), o.type = "range", o.min = 0, o.max = 1, o.step = 0.01);
2046
- const u = c === "string" && (r === "vertexShader" || r === "fragmentShader");
2047
- u && (o.disabled = !1, o.latest = o.value, o.onChange = (d, v) => {
2048
- o.latest = v;
2049
- }), t.push(o), u && t.push({
2050
- title: `${ut(r)} - Update`,
2087
+ ja(i) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2088
+ const d = o === "string" && (i === "vertexShader" || i === "fragmentShader");
2089
+ d && (c.disabled = !1, c.latest = c.value, c.onChange = (u, v) => {
2090
+ c.latest = v;
2091
+ }), e.push(c), d && e.push({
2092
+ title: `${lt(i)} - Update`,
2051
2093
  type: "button",
2052
2094
  onChange: () => {
2053
- a.updateObject(n.uuid, `material.${r}`, o.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2054
- const d = a.scene?.getObjectByProperty("uuid", n.uuid);
2055
- d !== void 0 && (ee(d, `material.${r}`, o.latest), d.material.needsUpdate = !0);
2095
+ a.updateObject(n.uuid, `material.${i}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2096
+ const u = a.scene?.getObjectByProperty("uuid", n.uuid);
2097
+ u !== void 0 && (ee(u, `material.${i}`, c.latest), u.material.needsUpdate = !0);
2056
2098
  }
2057
2099
  });
2058
- } else if (c === "object")
2059
- if (p.isColor)
2060
- t.push({
2061
- title: Ve(r),
2062
- prop: r,
2100
+ } else if (o === "object")
2101
+ if (h.isColor)
2102
+ e.push({
2103
+ title: Ve(i),
2104
+ prop: i,
2063
2105
  type: "color",
2064
- value: p,
2065
- onChange: (o, u) => {
2066
- const d = new St(u);
2067
- a.updateObject(n.uuid, `material.${o}`, d);
2106
+ value: h,
2107
+ onChange: (c, d) => {
2108
+ const u = new St(d);
2109
+ a.updateObject(n.uuid, `material.${c}`, u);
2068
2110
  const v = a.scene?.getObjectByProperty("uuid", n.uuid);
2069
- v !== void 0 && ee(v, `material.${o}`, d);
2111
+ v !== void 0 && ee(v, `material.${c}`, u);
2070
2112
  }
2071
2113
  });
2072
- else if (Array.isArray(p)) {
2073
- const o = [];
2074
- for (const u in p)
2075
- o.push({
2076
- title: `${u}`,
2077
- type: `${typeof p[u]}`,
2078
- value: p[u],
2079
- onChange: (d, v) => {
2080
- a.updateObject(n.uuid, `material.${r}`, v);
2114
+ else if (Array.isArray(h)) {
2115
+ const c = [];
2116
+ for (const d in h)
2117
+ c.push({
2118
+ title: `${d}`,
2119
+ type: `${typeof h[d]}`,
2120
+ value: h[d],
2121
+ onChange: (u, v) => {
2122
+ a.updateObject(n.uuid, `material.${i}`, v);
2081
2123
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2082
- b !== void 0 && ee(b, `material.${r}`, v);
2124
+ b !== void 0 && ee(b, `material.${i}`, v);
2083
2125
  }
2084
2126
  });
2085
- t.push({
2086
- title: Ve(r),
2087
- items: o
2127
+ e.push({
2128
+ title: Ve(i),
2129
+ items: c
2088
2130
  });
2089
2131
  } else {
2090
- const o = [];
2091
- for (const u in p) {
2092
- const d = p[u];
2093
- switch (typeof d) {
2132
+ const c = [];
2133
+ for (const d in h) {
2134
+ const u = h[d];
2135
+ switch (typeof u) {
2094
2136
  case "boolean":
2095
2137
  case "number":
2096
2138
  case "string":
2097
- u === "src" ? t.push({
2098
- title: Ve(r),
2139
+ d === "src" ? e.push({
2140
+ title: Ve(i),
2099
2141
  type: "image",
2100
- value: d,
2142
+ value: u,
2101
2143
  onChange: (b, E) => {
2102
- a.createTexture(n.uuid, `material.${r}`, E);
2103
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2104
- C !== void 0 && It(E).then((D) => {
2105
- ee(C, `material.${r}`, D), ee(C, "material.needsUpdate", !0);
2144
+ a.createTexture(n.uuid, `material.${i}`, E);
2145
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2146
+ S !== void 0 && Dt(E).then((D) => {
2147
+ ee(S, `material.${i}`, D), ee(S, "material.needsUpdate", !0);
2106
2148
  });
2107
2149
  }
2108
- }) : o.push({
2109
- title: `${Ve(u)}`,
2110
- prop: `material.${r}.${u}`,
2111
- type: `${typeof e[r][u]}`,
2112
- value: p[u],
2150
+ }) : c.push({
2151
+ title: `${Ve(d)}`,
2152
+ prop: `material.${i}.${d}`,
2153
+ type: `${typeof t[i][d]}`,
2154
+ value: h[d],
2113
2155
  onChange: (b, E) => {
2114
- a.updateObject(n.uuid, `material.${r}.${u}`, E);
2115
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2116
- C !== void 0 && ee(C, `material.${r}.${u}`, E);
2156
+ a.updateObject(n.uuid, `material.${i}.${d}`, E);
2157
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2158
+ S !== void 0 && ee(S, `material.${i}.${d}`, E);
2117
2159
  }
2118
2160
  });
2119
2161
  break;
2120
2162
  case "object":
2121
- if (d.value !== void 0 && d.value.src !== void 0)
2122
- o.push({
2123
- title: Ve(u),
2163
+ if (u.value !== void 0 && u.value.src !== void 0)
2164
+ c.push({
2165
+ title: Ve(d),
2124
2166
  type: "image",
2125
- value: d.value.src,
2167
+ value: u.value.src,
2126
2168
  onChange: (b, E) => {
2127
- a.createTexture(n.uuid, `material.${r}.${u}.value`, p);
2128
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2129
- C !== void 0 && It(E).then((D) => {
2130
- ee(C, `material.${r}.${u}.value`, D);
2169
+ a.createTexture(n.uuid, `material.${i}.${d}.value`, h);
2170
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2171
+ S !== void 0 && Dt(E).then((D) => {
2172
+ ee(S, `material.${i}.${d}.value`, D);
2131
2173
  });
2132
2174
  }
2133
2175
  });
2134
- else if (r === "uniforms") {
2135
- const b = d.value, E = (C, D, I) => ({
2136
- title: C,
2176
+ else if (i === "uniforms") {
2177
+ const b = u.value, E = (S, D, I) => ({
2178
+ title: S,
2137
2179
  type: "number",
2138
2180
  value: I,
2139
2181
  step: 0.01,
2140
2182
  onChange: (q, B) => {
2141
- const M = `material.uniforms.${u}.value.${D}`;
2183
+ const M = `material.uniforms.${d}.value.${D}`;
2142
2184
  a.updateObject(n.uuid, M, B);
2143
2185
  const z = a.scene?.getObjectByProperty("uuid", n.uuid);
2144
2186
  z !== void 0 && ee(z, M, B);
2145
2187
  }
2146
2188
  });
2147
- if (typeof d.value == "number")
2148
- o.push({
2149
- title: u,
2189
+ if (typeof u.value == "number")
2190
+ c.push({
2191
+ title: d,
2150
2192
  type: "number",
2151
- value: d.value,
2152
- onChange: (C, D) => {
2153
- const I = `material.${r}.${C}.value`;
2193
+ value: u.value,
2194
+ onChange: (S, D) => {
2195
+ const I = `material.${i}.${S}.value`;
2154
2196
  a.updateObject(n.uuid, I, D);
2155
2197
  const q = a.scene?.getObjectByProperty("uuid", n.uuid);
2156
2198
  q !== void 0 && ee(q, I, D);
2157
2199
  }
2158
2200
  });
2159
2201
  else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
2160
- o.push({
2161
- title: u,
2202
+ c.push({
2203
+ title: d,
2162
2204
  type: "color",
2163
- value: d.value,
2164
- onChange: (C, D) => {
2165
- const I = new St(D), q = `material.${r}.${C}.value`;
2205
+ value: u.value,
2206
+ onChange: (S, D) => {
2207
+ const I = new St(D), q = `material.${i}.${S}.value`;
2166
2208
  a.updateObject(n.uuid, q, I);
2167
2209
  const B = a.scene?.getObjectByProperty("uuid", n.uuid);
2168
2210
  B !== void 0 && ee(B, q, I);
2169
2211
  }
2170
2212
  });
2171
2213
  else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
2172
- o.push(
2214
+ c.push(
2173
2215
  {
2174
- title: u,
2216
+ title: d,
2175
2217
  items: [
2176
- E("X", "x", d.value.x),
2177
- E("Y", "y", d.value.y)
2218
+ E("X", "x", u.value.x),
2219
+ E("Y", "y", u.value.y)
2178
2220
  ]
2179
2221
  }
2180
2222
  );
2181
2223
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
2182
- o.push(
2224
+ c.push(
2183
2225
  {
2184
- title: u,
2226
+ title: d,
2185
2227
  items: [
2186
- E("X", "x", d.value.x),
2187
- E("Y", "y", d.value.y),
2188
- E("Z", "z", d.value.z)
2228
+ E("X", "x", u.value.x),
2229
+ E("Y", "y", u.value.y),
2230
+ E("Z", "z", u.value.z)
2189
2231
  ]
2190
2232
  }
2191
2233
  );
2192
2234
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w !== void 0)
2193
- o.push(
2235
+ c.push(
2194
2236
  {
2195
- title: u,
2237
+ title: d,
2196
2238
  items: [
2197
- E("X", "x", d.value.x),
2198
- E("Y", "y", d.value.y),
2199
- E("Z", "z", d.value.z),
2200
- E("W", "w", d.value.w)
2239
+ E("X", "x", u.value.x),
2240
+ E("Y", "y", u.value.y),
2241
+ E("Z", "z", u.value.z),
2242
+ E("W", "w", u.value.w)
2201
2243
  ]
2202
2244
  }
2203
2245
  );
2204
2246
  else if (b.elements !== void 0) {
2205
- const C = b.elements, D = [];
2206
- for (let I = 0; I < C.length; I++)
2207
- D.push(E(I.toString(), I.toString(), C[I]));
2208
- o.push(
2247
+ const S = b.elements, D = [];
2248
+ for (let I = 0; I < S.length; I++)
2249
+ D.push(E(I.toString(), I.toString(), S[I]));
2250
+ c.push(
2209
2251
  {
2210
- title: u,
2252
+ title: d,
2211
2253
  items: D
2212
2254
  }
2213
2255
  );
2214
2256
  } else
2215
- console.log(">>> need to add this format:", u, b);
2257
+ console.log(">>> need to add this format:", d, b);
2216
2258
  } else
2217
- o.push({
2218
- title: u,
2219
- type: `${typeof d.value}`,
2220
- value: d.value,
2259
+ c.push({
2260
+ title: d,
2261
+ type: `${typeof u.value}`,
2262
+ value: u.value,
2221
2263
  onChange: (b, E) => {
2222
- a.updateObject(n.uuid, `material.${r}.${u}.value`, E);
2223
- const C = a.scene?.getObjectByProperty("uuid", n.uuid);
2224
- C !== void 0 && ee(C, `material.${r}.${u}.value`, E);
2264
+ a.updateObject(n.uuid, `material.${i}.${d}.value`, E);
2265
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2266
+ S !== void 0 && ee(S, `material.${i}.${d}.value`, E);
2225
2267
  }
2226
2268
  });
2227
2269
  break;
2228
2270
  }
2229
2271
  }
2230
- o.length > 0 && t.push({
2231
- title: Ve(r),
2232
- items: o
2272
+ c.length > 0 && e.push({
2273
+ title: Ve(i),
2274
+ items: c
2233
2275
  });
2234
2276
  }
2235
2277
  else
2236
- p !== void 0 && console.log("other:", r, c, p);
2278
+ h !== void 0 && console.log("other:", i, o, h);
2237
2279
  }
2238
- return t.sort((r, c) => r.title < c.title ? -1 : r.title > c.title ? 1 : 0), t.push({
2280
+ return e.sort((i, o) => i.title < o.title ? -1 : i.title > o.title ? 1 : 0), e.push({
2239
2281
  title: "Update Material",
2240
2282
  type: "button",
2241
2283
  onChange: () => {
2242
2284
  a.updateObject(n.uuid, "material.needsUpdate", !0);
2243
2285
  }
2244
- }), t;
2286
+ }), e;
2245
2287
  }
2246
- function Ya(e, n) {
2247
- const a = e.material;
2288
+ function Ua(t, n) {
2289
+ const a = t.material;
2248
2290
  if (Array.isArray(a)) {
2249
- const t = [], r = a.length;
2250
- for (let c = 0; c < r; c++)
2251
- t.push(
2291
+ const e = [], i = a.length;
2292
+ for (let o = 0; o < i; o++)
2293
+ e.push(
2252
2294
  /* @__PURE__ */ l.jsx(
2253
2295
  We,
2254
2296
  {
2255
- title: `Material ${c}`,
2256
- items: qt(a[c], e, n)
2297
+ title: `Material ${o}`,
2298
+ items: Wt(a[o], t, n)
2257
2299
  },
2258
- `Material ${c}`
2300
+ `Material ${o}`
2259
2301
  )
2260
2302
  );
2261
- return /* @__PURE__ */ l.jsx(l.Fragment, { children: t });
2303
+ return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2262
2304
  } else
2263
2305
  return /* @__PURE__ */ l.jsx(
2264
2306
  We,
2265
2307
  {
2266
2308
  title: "Material",
2267
- items: qt(a, e, n)
2309
+ items: Wt(a, t, n)
2268
2310
  }
2269
2311
  );
2270
2312
  }
2271
- function lt(e) {
2272
- let n = e.value;
2273
- n !== void 0 && n.isColor !== void 0 && (n = va(e.value));
2274
- const [a, t] = oe(n), r = _e(null), c = _e(null), p = _e(null);
2275
- Re(() => {
2276
- let v = !1, b = -1, E = 0, C = Number(a);
2313
+ function ct(t) {
2314
+ let n = t.value;
2315
+ n !== void 0 && n.isColor !== void 0 && (n = pa(t.value));
2316
+ const [a, e] = oe(n), i = Re(null), o = Re(null), h = Re(null);
2317
+ _e(() => {
2318
+ let v = !1, b = -1, E = 0, S = Number(a);
2277
2319
  const D = (z) => {
2278
- v = !0, E = C, b = z.clientX;
2320
+ v = !0, E = S, b = z.clientX;
2279
2321
  }, I = (z) => {
2280
2322
  if (!v)
2281
2323
  return;
2282
- const we = e.step !== void 0 ? e.step : 1, ce = (z.clientX - b) * we;
2283
- C = Number((E + ce).toFixed(4)), c.current !== null && (c.current.value = C.toString()), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, C);
2324
+ const we = t.step !== void 0 ? t.step : 1, ce = (z.clientX - b) * we;
2325
+ S = Number((E + ce).toFixed(4)), o.current !== null && (o.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
2284
2326
  }, q = () => {
2285
2327
  v = !1;
2286
2328
  }, B = () => {
2287
2329
  v = !1;
2288
- }, M = e.type === "number";
2289
- return M && (r.current?.addEventListener("mousedown", D, !1), document.addEventListener("mouseup", q, !1), document.addEventListener("mousemove", I, !1), document.addEventListener("contextmenu", B, !1)), () => {
2290
- M && (r.current?.removeEventListener("mousedown", D), document.removeEventListener("mouseup", q), document.removeEventListener("mousemove", I), document.removeEventListener("contextmenu", B));
2330
+ }, M = t.type === "number";
2331
+ return M && (i.current?.addEventListener("mousedown", D, !1), document.addEventListener("mouseup", q, !1), document.addEventListener("mousemove", I, !1), document.addEventListener("contextmenu", B, !1)), () => {
2332
+ M && (i.current?.removeEventListener("mousedown", D), document.removeEventListener("mouseup", q), document.removeEventListener("mousemove", I), document.removeEventListener("contextmenu", B));
2291
2333
  };
2292
2334
  }, [a]);
2293
- const o = e.type === "string" && (a.length > 100 || a.search(`
2294
- `) > -1), u = o || e.type === "image", d = (v) => {
2335
+ const c = t.type === "string" && (a.length > 100 || a.search(`
2336
+ `) > -1), d = c || t.type === "image", u = (v) => {
2295
2337
  let b = v.target.value;
2296
- e.type === "boolean" ? b = v.target.checked : e.type === "option" && (b = e.options[b].value), t(b), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, b);
2338
+ t.type === "boolean" ? b = v.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2297
2339
  };
2298
- return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2299
- e.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: r, children: ut(e.title) }, "fieldLabel"),
2300
- e.type === "string" && !o && /* @__PURE__ */ l.jsx(
2340
+ return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2341
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: lt(t.title) }, "fieldLabel"),
2342
+ t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2301
2343
  "input",
2302
2344
  {
2303
2345
  type: "text",
2304
- disabled: e.disabled,
2305
- onChange: d,
2346
+ disabled: t.disabled,
2347
+ onChange: u,
2306
2348
  value: a
2307
2349
  }
2308
2350
  ),
2309
- e.type === "string" && o && /* @__PURE__ */ l.jsx(
2351
+ t.type === "string" && c && /* @__PURE__ */ l.jsx(
2310
2352
  "textarea",
2311
2353
  {
2312
2354
  cols: 50,
2313
2355
  rows: 10,
2314
- disabled: e.disabled !== void 0 ? e.disabled : !0,
2315
- onChange: d,
2356
+ disabled: t.disabled !== void 0 ? t.disabled : !0,
2357
+ onChange: u,
2316
2358
  value: a
2317
2359
  }
2318
2360
  ),
2319
- e.type === "boolean" && /* @__PURE__ */ l.jsx(
2361
+ t.type === "boolean" && /* @__PURE__ */ l.jsx(
2320
2362
  "input",
2321
2363
  {
2322
2364
  type: "checkbox",
2323
- disabled: e.disabled,
2324
- onChange: d,
2365
+ disabled: t.disabled,
2366
+ onChange: u,
2325
2367
  checked: a
2326
2368
  }
2327
2369
  ),
2328
- e.type === "number" && /* @__PURE__ */ l.jsx(
2370
+ t.type === "number" && /* @__PURE__ */ l.jsx(
2329
2371
  "input",
2330
2372
  {
2331
- ref: c,
2373
+ ref: o,
2332
2374
  type: "number",
2333
2375
  value: a,
2334
- min: e.min,
2335
- max: e.max,
2336
- step: e.step,
2337
- disabled: e.disabled,
2338
- onChange: d
2376
+ min: t.min,
2377
+ max: t.max,
2378
+ step: t.step,
2379
+ disabled: t.disabled,
2380
+ onChange: u
2339
2381
  }
2340
2382
  ),
2341
- e.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2342
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: e.disabled, className: "min" }),
2383
+ t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2384
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "min" }),
2343
2385
  /* @__PURE__ */ l.jsx(
2344
2386
  "input",
2345
2387
  {
2346
- disabled: e.disabled,
2388
+ disabled: t.disabled,
2347
2389
  type: "range",
2348
2390
  value: a,
2349
- min: e.min,
2350
- max: e.max,
2351
- step: e.step,
2352
- onChange: d
2391
+ min: t.min,
2392
+ max: t.max,
2393
+ step: t.step,
2394
+ onChange: u
2353
2395
  }
2354
2396
  )
2355
2397
  ] }),
2356
- e.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2357
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: e.disabled, className: "color" }),
2358
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: e.disabled })
2398
+ t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2399
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "color" }),
2400
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: u, disabled: t.disabled })
2359
2401
  ] }),
2360
- e.type === "button" && /* @__PURE__ */ l.jsx(
2402
+ t.type === "button" && /* @__PURE__ */ l.jsx(
2361
2403
  "button",
2362
2404
  {
2363
- disabled: e.disabled,
2405
+ disabled: t.disabled,
2364
2406
  onClick: () => {
2365
- e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, !0);
2407
+ t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, !0);
2366
2408
  },
2367
- children: e.title
2409
+ children: t.title
2368
2410
  }
2369
2411
  ),
2370
- e.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: p, onClick: () => {
2371
- Na().then((v) => {
2372
- p.current.src = v, e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, v);
2412
+ t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: h, onClick: () => {
2413
+ Da().then((v) => {
2414
+ h.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2373
2415
  });
2374
- }, src: a.length > 0 ? a : ja }),
2375
- e.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: e.disabled, defaultValue: e.value, children: e.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: ut(v.title) }, b)) }) })
2416
+ }, src: a.length > 0 ? a : Aa }),
2417
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: lt(v.title) }, b)) }) })
2376
2418
  ] });
2377
2419
  }
2378
- function Kt(e) {
2379
- switch (e) {
2420
+ function qt(t) {
2421
+ switch (t) {
2380
2422
  case "fov":
2381
2423
  return "FOV";
2382
2424
  case "zoom":
@@ -2402,36 +2444,36 @@ function Kt(e) {
2402
2444
  case "bottom":
2403
2445
  return "Bottom";
2404
2446
  }
2405
- return e;
2447
+ return t;
2406
2448
  }
2407
- function Ga(e, n) {
2449
+ function $a(t, n) {
2408
2450
  const a = [];
2409
- if (e.perspectiveCameraInfo !== void 0)
2410
- for (const t in e.perspectiveCameraInfo)
2451
+ if (t.perspectiveCameraInfo !== void 0)
2452
+ for (const e in t.perspectiveCameraInfo)
2411
2453
  a.push({
2412
- title: Kt(t),
2413
- prop: t,
2454
+ title: qt(e),
2455
+ prop: e,
2414
2456
  type: "number",
2415
2457
  step: 0.01,
2416
- value: e.perspectiveCameraInfo[t],
2417
- onChange: (r, c) => {
2418
- n.updateObject(e.uuid, r, c), n.requestMethod(e.uuid, "updateProjectionMatrix");
2419
- const p = n.scene?.getObjectByProperty("uuid", e.uuid);
2420
- p !== void 0 && (ee(p, r, c), p.updateProjectionMatrix());
2458
+ value: t.perspectiveCameraInfo[e],
2459
+ onChange: (i, o) => {
2460
+ n.updateObject(t.uuid, i, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2461
+ const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2462
+ h !== void 0 && (ee(h, i, o), h.updateProjectionMatrix());
2421
2463
  }
2422
2464
  });
2423
- else if (e.orthographicCameraInfo !== void 0)
2424
- for (const t in e.orthographicCameraInfo)
2465
+ else if (t.orthographicCameraInfo !== void 0)
2466
+ for (const e in t.orthographicCameraInfo)
2425
2467
  a.push({
2426
- title: Kt(t),
2427
- prop: t,
2468
+ title: qt(e),
2469
+ prop: e,
2428
2470
  type: "number",
2429
2471
  step: 0.01,
2430
- value: e.perspectiveCameraInfo[t],
2431
- onChange: (r, c) => {
2432
- n.updateObject(e.uuid, r, c), n.requestMethod(e.uuid, "updateProjectionMatrix");
2433
- const p = n.scene?.getObjectByProperty("uuid", e.uuid);
2434
- p !== void 0 && (ee(p, r, c), p.updateProjectionMatrix());
2472
+ value: t.perspectiveCameraInfo[e],
2473
+ onChange: (i, o) => {
2474
+ n.updateObject(t.uuid, i, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2475
+ const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2476
+ h !== void 0 && (ee(h, i, o), h.updateProjectionMatrix());
2435
2477
  }
2436
2478
  });
2437
2479
  return /* @__PURE__ */ l.jsx(
@@ -2442,27 +2484,27 @@ function Ga(e, n) {
2442
2484
  }
2443
2485
  );
2444
2486
  }
2445
- const Va = Math.PI / 180, Ha = 180 / Math.PI;
2446
- function Qe(e, n, a, t, r) {
2447
- return t + (e - n) * (r - t) / (a - n);
2448
- }
2449
- function Wa(e) {
2450
- return e * Va;
2451
- }
2452
- function kt(e) {
2453
- return e * Ha;
2454
- }
2455
- function qa(e, n) {
2456
- const a = new Kn();
2457
- a.elements = e.matrix;
2458
- const t = new W(), r = new Xn(), c = new W();
2459
- e.uuid.length > 0 && (t.setFromMatrixPosition(a), r.setFromRotationMatrix(a), c.setFromMatrixScale(a));
2460
- const p = (u, d) => {
2461
- n.updateObject(e.uuid, u, d);
2462
- const v = n.scene?.getObjectByProperty("uuid", e.uuid);
2463
- v !== void 0 && ee(v, u, d);
2464
- }, o = (u, d) => {
2465
- p(u, Wa(d));
2487
+ const za = Math.PI / 180, Ya = 180 / Math.PI;
2488
+ function Qe(t, n, a, e, i) {
2489
+ return e + (t - n) * (i - e) / (a - n);
2490
+ }
2491
+ function Ga(t) {
2492
+ return t * za;
2493
+ }
2494
+ function Pt(t) {
2495
+ return t * Ya;
2496
+ }
2497
+ function Va(t, n) {
2498
+ const a = new Wn();
2499
+ a.elements = t.matrix;
2500
+ const e = new W(), i = new qn(), o = new W();
2501
+ t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), o.setFromMatrixScale(a));
2502
+ const h = (d, u) => {
2503
+ n.updateObject(t.uuid, d, u);
2504
+ const v = n.scene?.getObjectByProperty("uuid", t.uuid);
2505
+ v !== void 0 && ee(v, d, u);
2506
+ }, c = (d, u) => {
2507
+ h(d, Ga(u));
2466
2508
  };
2467
2509
  return /* @__PURE__ */ l.jsx(
2468
2510
  We,
@@ -2473,83 +2515,83 @@ function qa(e, n) {
2473
2515
  title: "Position X",
2474
2516
  prop: "position.x",
2475
2517
  type: "number",
2476
- value: t.x,
2477
- onChange: p
2518
+ value: e.x,
2519
+ onChange: h
2478
2520
  },
2479
2521
  {
2480
2522
  title: "Position Y",
2481
2523
  prop: "position.y",
2482
2524
  type: "number",
2483
- value: t.y,
2484
- onChange: p
2525
+ value: e.y,
2526
+ onChange: h
2485
2527
  },
2486
2528
  {
2487
2529
  title: "Position Z",
2488
2530
  prop: "position.z",
2489
2531
  type: "number",
2490
- value: t.z,
2491
- onChange: p
2532
+ value: e.z,
2533
+ onChange: h
2492
2534
  },
2493
2535
  {
2494
2536
  title: "Rotation X",
2495
2537
  prop: "rotation.x",
2496
2538
  type: "number",
2497
- value: At(kt(r.x)),
2539
+ value: _t(Pt(i.x)),
2498
2540
  min: -360,
2499
2541
  max: 360,
2500
2542
  step: 0.1,
2501
- onChange: o
2543
+ onChange: c
2502
2544
  },
2503
2545
  {
2504
2546
  title: "Rotation Y",
2505
2547
  prop: "rotation.y",
2506
2548
  type: "number",
2507
- value: At(kt(r.y)),
2549
+ value: _t(Pt(i.y)),
2508
2550
  min: -360,
2509
2551
  max: 360,
2510
2552
  step: 0.1,
2511
- onChange: o
2553
+ onChange: c
2512
2554
  },
2513
2555
  {
2514
2556
  title: "Rotation Z",
2515
2557
  prop: "rotation.z",
2516
2558
  type: "number",
2517
- value: At(kt(r.z)),
2559
+ value: _t(Pt(i.z)),
2518
2560
  min: -360,
2519
2561
  max: 360,
2520
2562
  step: 0.1,
2521
- onChange: o
2563
+ onChange: c
2522
2564
  },
2523
2565
  {
2524
2566
  title: "Scale X",
2525
2567
  prop: "scale.x",
2526
2568
  type: "number",
2527
- value: c.x,
2569
+ value: o.x,
2528
2570
  step: 0.01,
2529
- onChange: p
2571
+ onChange: h
2530
2572
  },
2531
2573
  {
2532
2574
  title: "Scale Y",
2533
2575
  prop: "scale.y",
2534
2576
  type: "number",
2535
- value: c.y,
2577
+ value: o.y,
2536
2578
  step: 0.01,
2537
- onChange: p
2579
+ onChange: h
2538
2580
  },
2539
2581
  {
2540
2582
  title: "Scale Z",
2541
2583
  prop: "scale.z",
2542
2584
  type: "number",
2543
- value: c.z,
2585
+ value: o.z,
2544
2586
  step: 0.01,
2545
- onChange: p
2587
+ onChange: h
2546
2588
  }
2547
2589
  ]
2548
2590
  }
2549
2591
  );
2550
2592
  }
2551
- function Xt(e) {
2552
- switch (e) {
2593
+ function Kt(t) {
2594
+ switch (t) {
2553
2595
  case "color":
2554
2596
  return "Color";
2555
2597
  case "intensity":
@@ -2565,34 +2607,34 @@ function Xt(e) {
2565
2607
  case "groundColor":
2566
2608
  return "Ground Color";
2567
2609
  }
2568
- return e;
2610
+ return t;
2569
2611
  }
2570
- function Ka(e, n) {
2612
+ function Ha(t, n) {
2571
2613
  const a = [];
2572
- if (e.lightInfo !== void 0)
2573
- for (const t in e.lightInfo) {
2574
- const r = e.lightInfo[t];
2575
- r !== void 0 && (r.isColor !== void 0 ? a.push({
2576
- title: Xt(t),
2577
- prop: t,
2614
+ if (t.lightInfo !== void 0)
2615
+ for (const e in t.lightInfo) {
2616
+ const i = t.lightInfo[e];
2617
+ i !== void 0 && (i.isColor !== void 0 ? a.push({
2618
+ title: Kt(e),
2619
+ prop: e,
2578
2620
  type: "color",
2579
- value: r,
2580
- onChange: (c, p) => {
2581
- const o = new St(p);
2582
- n.updateObject(e.uuid, c, o);
2583
- const u = n.scene?.getObjectByProperty("uuid", e.uuid);
2584
- u !== void 0 && ee(u, c, o);
2621
+ value: i,
2622
+ onChange: (o, h) => {
2623
+ const c = new St(h);
2624
+ n.updateObject(t.uuid, o, c);
2625
+ const d = n.scene?.getObjectByProperty("uuid", t.uuid);
2626
+ d !== void 0 && ee(d, o, c);
2585
2627
  }
2586
2628
  }) : a.push({
2587
- title: Xt(t),
2588
- prop: t,
2589
- type: typeof r,
2590
- value: r,
2591
- step: typeof r == "number" ? 0.01 : void 0,
2592
- onChange: (c, p) => {
2593
- n.updateObject(e.uuid, c, p);
2594
- const o = n.scene?.getObjectByProperty("uuid", e.uuid);
2595
- o !== void 0 && ee(o, c, p);
2629
+ title: Kt(e),
2630
+ prop: e,
2631
+ type: typeof i,
2632
+ value: i,
2633
+ step: typeof i == "number" ? 0.01 : void 0,
2634
+ onChange: (o, h) => {
2635
+ n.updateObject(t.uuid, o, h);
2636
+ const c = n.scene?.getObjectByProperty("uuid", t.uuid);
2637
+ c !== void 0 && ee(c, o, h);
2596
2638
  }
2597
2639
  }));
2598
2640
  }
@@ -2604,17 +2646,17 @@ function Ka(e, n) {
2604
2646
  }
2605
2647
  );
2606
2648
  }
2607
- function Xa(e, n) {
2608
- const a = [], t = [];
2609
- let r = 0;
2610
- e.animations.forEach((o) => {
2611
- r = Math.max(r, o.duration), o.duration > 0 && t.push({
2612
- title: o.name,
2649
+ function Wa(t, n) {
2650
+ const a = [], e = [];
2651
+ let i = 0;
2652
+ t.animations.forEach((c) => {
2653
+ i = Math.max(i, c.duration), c.duration > 0 && e.push({
2654
+ title: c.name,
2613
2655
  items: [
2614
2656
  {
2615
2657
  title: "Duration",
2616
2658
  type: "number",
2617
- value: o.duration,
2659
+ value: c.duration,
2618
2660
  disabled: !0
2619
2661
  },
2620
2662
  {
@@ -2636,41 +2678,41 @@ function Xa(e, n) {
2636
2678
  });
2637
2679
  }), a.push({
2638
2680
  title: "Animations",
2639
- items: t
2681
+ items: e
2640
2682
  });
2641
- const c = n.scene?.getObjectByProperty("uuid", e.uuid);
2642
- let p = !1;
2643
- if (c !== void 0) {
2644
- const o = c.mixer;
2645
- if (p = o !== void 0, p) {
2646
- const u = [
2683
+ const o = n.scene?.getObjectByProperty("uuid", t.uuid);
2684
+ let h = !1;
2685
+ if (o !== void 0) {
2686
+ const c = o.mixer;
2687
+ if (h = c !== void 0, h) {
2688
+ const d = [
2647
2689
  {
2648
2690
  title: "Time Scale",
2649
2691
  type: "range",
2650
- value: o.timeScale,
2692
+ value: c.timeScale,
2651
2693
  step: 0.01,
2652
2694
  min: -1,
2653
2695
  max: 2,
2654
- onChange: (d, v) => {
2655
- o.timeScale = v, n.updateObject(e.uuid, "mixer.timeScale", v);
2696
+ onChange: (u, v) => {
2697
+ c.timeScale = v, n.updateObject(t.uuid, "mixer.timeScale", v);
2656
2698
  }
2657
2699
  }
2658
2700
  ];
2659
- u.push({
2701
+ d.push({
2660
2702
  title: "Stop All",
2661
2703
  type: "button",
2662
2704
  onChange: () => {
2663
- o.stopAllAction(), n.requestMethod(e.uuid, "stopAllAction", void 0, "mixer");
2705
+ c.stopAllAction(), n.requestMethod(t.uuid, "stopAllAction", void 0, "mixer");
2664
2706
  }
2665
2707
  }), a.push({
2666
2708
  title: "Mixer",
2667
- items: u
2709
+ items: d
2668
2710
  });
2669
2711
  }
2670
2712
  }
2671
2713
  return /* @__PURE__ */ l.jsx(We, { title: "Animation", items: a });
2672
2714
  }
2673
- const _n = {
2715
+ const Tn = {
2674
2716
  name: "",
2675
2717
  uuid: "",
2676
2718
  type: "",
@@ -2682,25 +2724,25 @@ const _n = {
2682
2724
  orthographicCameraInfo: void 0,
2683
2725
  lightInfo: void 0
2684
2726
  };
2685
- let re = { ..._n };
2686
- function Za(e) {
2727
+ let re = { ...Tn };
2728
+ function qa(t) {
2687
2729
  const [n, a] = oe(-1);
2688
- Re(() => {
2689
- function p(u) {
2690
- re = { ...u.value }, a(Date.now());
2730
+ _e(() => {
2731
+ function h(d) {
2732
+ re = { ...d.value }, a(Date.now());
2691
2733
  }
2692
- function o() {
2693
- re = { ..._n }, a(Date.now());
2734
+ function c() {
2735
+ re = { ...Tn }, a(Date.now());
2694
2736
  }
2695
- return P.addEventListener(k.SET_SCENE, o), P.addEventListener(k.SET_OBJECT, p), () => {
2696
- P.removeEventListener(k.SET_SCENE, o), P.removeEventListener(k.SET_OBJECT, p);
2737
+ return P.addEventListener(k.SET_SCENE, c), P.addEventListener(k.SET_OBJECT, h), () => {
2738
+ P.removeEventListener(k.SET_SCENE, c), P.removeEventListener(k.SET_OBJECT, h);
2697
2739
  };
2698
2740
  }, []);
2699
- const t = re.type.toLowerCase(), r = re.animations.length > 0 || re.mixer !== void 0, c = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
2700
- return /* @__PURE__ */ l.jsx(Nt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: e.class, children: re.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2741
+ const e = re.type.toLowerCase(), i = re.animations.length > 0 || re.mixer !== void 0, o = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2742
+ return /* @__PURE__ */ l.jsx(Lt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: re.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2701
2743
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2702
2744
  /* @__PURE__ */ l.jsx(
2703
- lt,
2745
+ ct,
2704
2746
  {
2705
2747
  type: "string",
2706
2748
  title: "Name",
@@ -2710,7 +2752,7 @@ function Za(e) {
2710
2752
  }
2711
2753
  ),
2712
2754
  /* @__PURE__ */ l.jsx(
2713
- lt,
2755
+ ct,
2714
2756
  {
2715
2757
  type: "string",
2716
2758
  title: "Type",
@@ -2720,7 +2762,7 @@ function Za(e) {
2720
2762
  }
2721
2763
  ),
2722
2764
  /* @__PURE__ */ l.jsx(
2723
- lt,
2765
+ ct,
2724
2766
  {
2725
2767
  type: "string",
2726
2768
  title: "UUID",
@@ -2730,93 +2772,93 @@ function Za(e) {
2730
2772
  }
2731
2773
  ),
2732
2774
  /* @__PURE__ */ l.jsx(
2733
- lt,
2775
+ ct,
2734
2776
  {
2735
2777
  type: "boolean",
2736
2778
  title: "Visible",
2737
2779
  prop: "visible",
2738
2780
  value: re.visible,
2739
- onChange: (p, o) => {
2740
- e.three.updateObject(re.uuid, p, o);
2741
- const u = e.three.scene?.getObjectByProperty("uuid", re.uuid);
2742
- u !== void 0 && ee(u, p, o);
2781
+ onChange: (h, c) => {
2782
+ t.three.updateObject(re.uuid, h, c);
2783
+ const d = t.three.scene?.getObjectByProperty("uuid", re.uuid);
2784
+ d !== void 0 && ee(d, h, c);
2743
2785
  }
2744
2786
  }
2745
2787
  )
2746
2788
  ] }),
2747
2789
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2748
- qa(re, e.three),
2749
- r ? Xa(re, e.three) : null,
2750
- t.search("camera") > -1 ? Ga(re, e.three) : null,
2751
- t.search("light") > -1 ? Ka(re, e.three) : null,
2752
- c ? Ya(re, e.three) : null
2790
+ Va(re, t.three),
2791
+ i ? Wa(re, t.three) : null,
2792
+ e.search("camera") > -1 ? $a(re, t.three) : null,
2793
+ e.search("light") > -1 ? Ha(re, t.three) : null,
2794
+ o ? Ua(re, t.three) : null
2753
2795
  ] })
2754
2796
  ] }) }, n) }, "Inspector");
2755
2797
  }
2756
- function Oi(e) {
2757
- const [n, a] = oe(e.scene);
2758
- Re(() => {
2759
- const c = (p) => {
2760
- a(p.value);
2798
+ function vi(t) {
2799
+ const [n, a] = oe(t.scene);
2800
+ _e(() => {
2801
+ const o = (h) => {
2802
+ a(h.value);
2761
2803
  };
2762
- return P.addEventListener(k.SET_SCENE, c), () => {
2763
- P.removeEventListener(k.SET_SCENE, c);
2804
+ return P.addEventListener(k.SET_SCENE, o), () => {
2805
+ P.removeEventListener(k.SET_SCENE, o);
2764
2806
  };
2765
2807
  }, []);
2766
- const t = n !== null, r = "Hierarchy - " + (t ? `${n?.name}` : "No Scene");
2808
+ const e = n !== null, i = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
2767
2809
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
2768
- /* @__PURE__ */ l.jsx(Nt, { label: r, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: t && /* @__PURE__ */ l.jsx(ka, { child: n, three: e.three }) }) }),
2769
- /* @__PURE__ */ l.jsx(Za, { three: e.three })
2810
+ /* @__PURE__ */ l.jsx(Lt, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(_a, { child: n, three: t.three }) }) }),
2811
+ /* @__PURE__ */ l.jsx(qa, { three: t.three })
2770
2812
  ] }, "SidePanel");
2771
2813
  }
2772
- function Mi(e) {
2814
+ function gi(t) {
2773
2815
  function n() {
2774
- return e.three.scene === void 0 ? (console.log("No scene:", e.three), !1) : !0;
2816
+ return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2775
2817
  }
2776
- const a = (o) => {
2818
+ const a = (c) => {
2777
2819
  if (!n())
2778
2820
  return;
2779
- const u = e.three.scene?.getObjectByProperty("uuid", o.value);
2780
- u !== void 0 && e.three.setObject(u);
2781
- }, t = (o, u, d) => {
2821
+ const d = t.three.scene?.getObjectByProperty("uuid", c.value);
2822
+ d !== void 0 && t.three.setObject(d);
2823
+ }, e = (c, d, u) => {
2782
2824
  if (!n())
2783
2825
  return;
2784
- const v = e.three.scene?.getObjectByProperty("uuid", o);
2785
- v !== void 0 && ee(v, u, d);
2786
- }, r = (o) => {
2826
+ const v = t.three.scene?.getObjectByProperty("uuid", c);
2827
+ v !== void 0 && ee(v, d, u);
2828
+ }, i = (c) => {
2787
2829
  if (!n())
2788
2830
  return;
2789
- const u = o.value, { key: d, value: v, uuid: b } = u;
2790
- t(b, d, v);
2791
- }, c = (o) => {
2831
+ const d = c.value, { key: u, value: v, uuid: b } = d;
2832
+ e(b, u, v);
2833
+ }, o = (c) => {
2792
2834
  if (!n())
2793
2835
  return;
2794
- const u = o.value;
2795
- It(u.value).then((d) => {
2796
- t(u.uuid, u.key, d), t(u.uuid, "material.needsUpdate", !0);
2836
+ const d = c.value;
2837
+ Dt(d.value).then((u) => {
2838
+ e(d.uuid, d.key, u), e(d.uuid, "material.needsUpdate", !0);
2797
2839
  });
2798
- }, p = (o) => {
2840
+ }, h = (c) => {
2799
2841
  if (!n())
2800
2842
  return;
2801
- const { key: u, uuid: d, value: v, subitem: b } = o.value, E = e.three.scene?.getObjectByProperty("uuid", d);
2843
+ const { key: d, uuid: u, value: v, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", u);
2802
2844
  if (E !== void 0)
2803
2845
  try {
2804
- b !== void 0 ? xa(E, b)[u](v) : E[u](v);
2805
- } catch (C) {
2806
- console.log("Error requesting method:"), console.log(C), console.log(u), console.log(v);
2846
+ b !== void 0 ? Ea(E, b)[d](v) : E[d](v);
2847
+ } catch (S) {
2848
+ console.log("Error requesting method:"), console.log(S), console.log(d), console.log(v);
2807
2849
  }
2808
2850
  };
2809
- return Re(() => (P.addEventListener(k.GET_OBJECT, a), P.addEventListener(k.UPDATE_OBJECT, r), P.addEventListener(k.CREATE_TEXTURE, c), P.addEventListener(k.REQUEST_METHOD, p), () => {
2810
- P.removeEventListener(k.GET_OBJECT, a), P.removeEventListener(k.UPDATE_OBJECT, r), P.removeEventListener(k.CREATE_TEXTURE, c), P.removeEventListener(k.REQUEST_METHOD, p);
2851
+ return _e(() => (P.addEventListener(k.GET_OBJECT, a), P.addEventListener(k.UPDATE_OBJECT, i), P.addEventListener(k.CREATE_TEXTURE, o), P.addEventListener(k.REQUEST_METHOD, h), () => {
2852
+ P.removeEventListener(k.GET_OBJECT, a), P.removeEventListener(k.UPDATE_OBJECT, i), P.removeEventListener(k.CREATE_TEXTURE, o), P.removeEventListener(k.REQUEST_METHOD, h);
2811
2853
  }), []), null;
2812
2854
  }
2813
- const Zt = { type: "change" }, jt = { type: "start" }, Jt = { type: "end" }, bt = new Zn(), Qt = new Jn(), Ja = Math.cos(70 * Qn.DEG2RAD);
2814
- class Qa extends tn {
2855
+ const Xt = { type: "change" }, kt = { type: "start" }, Zt = { type: "end" }, gt = new Kn(), Jt = new Xn(), Ka = Math.cos(70 * Zn.DEG2RAD);
2856
+ class Xa extends en {
2815
2857
  constructor(n, a) {
2816
2858
  super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new W(), this.cursor = new W(), 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: Xe.ROTATE, MIDDLE: Xe.DOLLY, RIGHT: Xe.PAN }, this.touches = { ONE: Ze.ROTATE, TWO: Ze.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2817
- return o.phi;
2859
+ return c.phi;
2818
2860
  }, this.getAzimuthalAngle = function() {
2819
- return o.theta;
2861
+ return c.theta;
2820
2862
  }, this.getDistance = function() {
2821
2863
  return this.object.position.distanceTo(this.target);
2822
2864
  }, this.listenToKeyEvents = function(s) {
@@ -2824,40 +2866,40 @@ class Qa extends tn {
2824
2866
  }, this.stopListenToKeyEvents = function() {
2825
2867
  this._domElementKeyEvents.removeEventListener("keydown", nt), this._domElementKeyEvents = null;
2826
2868
  }, this.saveState = function() {
2827
- t.target0.copy(t.target), t.position0.copy(t.object.position), t.zoom0 = t.object.zoom;
2869
+ e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2828
2870
  }, this.reset = function() {
2829
- t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(Zt), t.update(), c = r.NONE;
2871
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Xt), e.update(), o = i.NONE;
2830
2872
  }, this.update = function() {
2831
- const s = new W(), y = new $t().setFromUnitVectors(n.up, new W(0, 1, 0)), O = y.clone().invert(), L = new W(), H = new $t(), be = new W(), le = 2 * Math.PI;
2832
- return function(_t = null) {
2833
- const it = t.object.position;
2834
- s.copy(it).sub(t.target), s.applyQuaternion(y), o.setFromVector3(s), t.autoRotate && c === r.NONE && me(Fe(_t)), t.enableDamping ? (o.theta += u.theta * t.dampingFactor, o.phi += u.phi * t.dampingFactor) : (o.theta += u.theta, o.phi += u.phi);
2835
- let xe = t.minAzimuthAngle, ye = t.maxAzimuthAngle;
2836
- isFinite(xe) && isFinite(ye) && (xe < -Math.PI ? xe += le : xe > Math.PI && (xe -= le), ye < -Math.PI ? ye += le : ye > Math.PI && (ye -= le), xe <= ye ? o.theta = Math.max(xe, Math.min(ye, o.theta)) : o.theta = o.theta > (xe + ye) / 2 ? Math.max(xe, o.theta) : Math.min(ye, o.theta)), o.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, o.phi)), o.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(v, t.dampingFactor) : t.target.add(v), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor), t.zoomToCursor && Y || t.object.isOrthographicCamera ? o.radius = ke(o.radius) : o.radius = ke(o.radius * d), s.setFromSpherical(o), s.applyQuaternion(O), it.copy(t.target).add(s), t.object.lookAt(t.target), t.enableDamping === !0 ? (u.theta *= 1 - t.dampingFactor, u.phi *= 1 - t.dampingFactor, v.multiplyScalar(1 - t.dampingFactor)) : (u.set(0, 0, 0), v.set(0, 0, 0));
2873
+ const s = new W(), y = new $t().setFromUnitVectors(n.up, new W(0, 1, 0)), O = y.clone().invert(), N = new W(), H = new $t(), be = new W(), le = 2 * Math.PI;
2874
+ return function(Tt = null) {
2875
+ const it = e.object.position;
2876
+ s.copy(it).sub(e.target), s.applyQuaternion(y), c.setFromVector3(s), e.autoRotate && o === i.NONE && me(Fe(Tt)), e.enableDamping ? (c.theta += d.theta * e.dampingFactor, c.phi += d.phi * e.dampingFactor) : (c.theta += d.theta, c.phi += d.phi);
2877
+ let xe = e.minAzimuthAngle, ye = e.maxAzimuthAngle;
2878
+ isFinite(xe) && isFinite(ye) && (xe < -Math.PI ? xe += le : xe > Math.PI && (xe -= le), ye < -Math.PI ? ye += le : ye > Math.PI && (ye -= le), xe <= ye ? c.theta = Math.max(xe, Math.min(ye, c.theta)) : c.theta = c.theta > (xe + ye) / 2 ? Math.max(xe, c.theta) : Math.min(ye, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && Y || e.object.isOrthographicCamera ? c.radius = ke(c.radius) : c.radius = ke(c.radius * u), s.setFromSpherical(c), s.applyQuaternion(O), it.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
2837
2879
  let $e = !1;
2838
- if (t.zoomToCursor && Y) {
2880
+ if (e.zoomToCursor && Y) {
2839
2881
  let ze = null;
2840
- if (t.object.isPerspectiveCamera) {
2882
+ if (e.object.isPerspectiveCamera) {
2841
2883
  const Ye = s.length();
2842
- ze = ke(Ye * d);
2884
+ ze = ke(Ye * u);
2843
2885
  const Ge = Ye - ze;
2844
- t.object.position.addScaledVector(we, Ge), t.object.updateMatrixWorld();
2845
- } else if (t.object.isOrthographicCamera) {
2886
+ e.object.position.addScaledVector(we, Ge), e.object.updateMatrixWorld();
2887
+ } else if (e.object.isOrthographicCamera) {
2846
2888
  const Ye = new W(ce.x, ce.y, 0);
2847
- Ye.unproject(t.object), t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / d)), t.object.updateProjectionMatrix(), $e = !0;
2889
+ Ye.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), $e = !0;
2848
2890
  const Ge = new W(ce.x, ce.y, 0);
2849
- Ge.unproject(t.object), t.object.position.sub(Ge).add(Ye), t.object.updateMatrixWorld(), ze = s.length();
2891
+ Ge.unproject(e.object), e.object.position.sub(Ge).add(Ye), e.object.updateMatrixWorld(), ze = s.length();
2850
2892
  } else
2851
- console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
2852
- ze !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(ze).add(t.object.position) : (bt.origin.copy(t.object.position), bt.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(bt.direction)) < Ja ? n.lookAt(t.target) : (Qt.setFromNormalAndCoplanarPoint(t.object.up, t.target), bt.intersectPlane(Qt, t.target))));
2893
+ console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2894
+ ze !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(ze).add(e.object.position) : (gt.origin.copy(e.object.position), gt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(gt.direction)) < Ka ? n.lookAt(e.target) : (Jt.setFromNormalAndCoplanarPoint(e.object.up, e.target), gt.intersectPlane(Jt, e.target))));
2853
2895
  } else
2854
- t.object.isOrthographicCamera && ($e = d !== 1, $e && (t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / d)), t.object.updateProjectionMatrix()));
2855
- return d = 1, Y = !1, $e || L.distanceToSquared(t.object.position) > p || 8 * (1 - H.dot(t.object.quaternion)) > p || be.distanceToSquared(t.target) > 0 ? (t.dispatchEvent(Zt), L.copy(t.object.position), H.copy(t.object.quaternion), be.copy(t.target), !0) : !1;
2896
+ e.object.isOrthographicCamera && ($e = u !== 1, $e && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix()));
2897
+ return u = 1, Y = !1, $e || N.distanceToSquared(e.object.position) > h || 8 * (1 - H.dot(e.object.quaternion)) > h || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Xt), N.copy(e.object.position), H.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
2856
2898
  };
2857
2899
  }(), this.dispose = function() {
2858
- t.domElement.removeEventListener("contextmenu", qe), t.domElement.removeEventListener("pointerdown", Be), t.domElement.removeEventListener("pointercancel", Ue), t.domElement.removeEventListener("wheel", ht), t.domElement.removeEventListener("pointermove", et), t.domElement.removeEventListener("pointerup", Ue), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", nt), t._domElementKeyEvents = null);
2900
+ e.domElement.removeEventListener("contextmenu", qe), e.domElement.removeEventListener("pointerdown", Be), e.domElement.removeEventListener("pointercancel", Ue), e.domElement.removeEventListener("wheel", ht), e.domElement.removeEventListener("pointermove", et), e.domElement.removeEventListener("pointerup", Ue), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", nt), e._domElementKeyEvents = null);
2859
2901
  };
2860
- const t = this, r = {
2902
+ const e = this, i = {
2861
2903
  NONE: -1,
2862
2904
  ROTATE: 0,
2863
2905
  DOLLY: 1,
@@ -2867,174 +2909,174 @@ class Qa extends tn {
2867
2909
  TOUCH_DOLLY_PAN: 5,
2868
2910
  TOUCH_DOLLY_ROTATE: 6
2869
2911
  };
2870
- let c = r.NONE;
2871
- const p = 1e-6, o = new zt(), u = new zt();
2872
- let d = 1;
2873
- const v = new W(), b = new he(), E = new he(), C = new he(), D = new he(), I = new he(), q = new he(), B = new he(), M = new he(), z = new he(), we = new W(), ce = new he();
2912
+ let o = i.NONE;
2913
+ const h = 1e-6, c = new zt(), d = new zt();
2914
+ let u = 1;
2915
+ const v = new W(), b = new fe(), E = new fe(), S = new fe(), D = new fe(), I = new fe(), q = new fe(), B = new fe(), M = new fe(), z = new fe(), we = new W(), ce = new fe();
2874
2916
  let Y = !1;
2875
2917
  const Q = [], x = {};
2876
2918
  let Ae = !1;
2877
2919
  function Fe(s) {
2878
- return s !== null ? 2 * Math.PI / 60 * t.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * t.autoRotateSpeed;
2920
+ return s !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2879
2921
  }
2880
2922
  function Oe(s) {
2881
2923
  const y = Math.abs(s * 0.01);
2882
- return Math.pow(0.95, t.zoomSpeed * y);
2924
+ return Math.pow(0.95, e.zoomSpeed * y);
2883
2925
  }
2884
2926
  function me(s) {
2885
- u.theta -= s;
2927
+ d.theta -= s;
2886
2928
  }
2887
2929
  function te(s) {
2888
- u.phi -= s;
2930
+ d.phi -= s;
2889
2931
  }
2890
- const de = function() {
2932
+ const ue = function() {
2891
2933
  const s = new W();
2892
- return function(O, L) {
2893
- s.setFromMatrixColumn(L, 0), s.multiplyScalar(-O), v.add(s);
2934
+ return function(O, N) {
2935
+ s.setFromMatrixColumn(N, 0), s.multiplyScalar(-O), v.add(s);
2894
2936
  };
2895
2937
  }(), ve = function() {
2896
2938
  const s = new W();
2897
- return function(O, L) {
2898
- t.screenSpacePanning === !0 ? s.setFromMatrixColumn(L, 1) : (s.setFromMatrixColumn(L, 0), s.crossVectors(t.object.up, s)), s.multiplyScalar(O), v.add(s);
2939
+ return function(O, N) {
2940
+ e.screenSpacePanning === !0 ? s.setFromMatrixColumn(N, 1) : (s.setFromMatrixColumn(N, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(O), v.add(s);
2899
2941
  };
2900
2942
  }(), ge = function() {
2901
2943
  const s = new W();
2902
- return function(O, L) {
2903
- const H = t.domElement;
2904
- if (t.object.isPerspectiveCamera) {
2905
- const be = t.object.position;
2906
- s.copy(be).sub(t.target);
2944
+ return function(O, N) {
2945
+ const H = e.domElement;
2946
+ if (e.object.isPerspectiveCamera) {
2947
+ const be = e.object.position;
2948
+ s.copy(be).sub(e.target);
2907
2949
  let le = s.length();
2908
- le *= Math.tan(t.object.fov / 2 * Math.PI / 180), de(2 * O * le / H.clientHeight, t.object.matrix), ve(2 * L * le / H.clientHeight, t.object.matrix);
2950
+ le *= Math.tan(e.object.fov / 2 * Math.PI / 180), ue(2 * O * le / H.clientHeight, e.object.matrix), ve(2 * N * le / H.clientHeight, e.object.matrix);
2909
2951
  } else
2910
- t.object.isOrthographicCamera ? (de(O * (t.object.right - t.object.left) / t.object.zoom / H.clientWidth, t.object.matrix), ve(L * (t.object.top - t.object.bottom) / t.object.zoom / H.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
2952
+ e.object.isOrthographicCamera ? (ue(O * (e.object.right - e.object.left) / e.object.zoom / H.clientWidth, e.object.matrix), ve(N * (e.object.top - e.object.bottom) / e.object.zoom / H.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2911
2953
  };
2912
2954
  }();
2913
2955
  function K(s) {
2914
- t.object.isPerspectiveCamera || t.object.isOrthographicCamera ? d /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), t.enableZoom = !1);
2956
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2915
2957
  }
2916
2958
  function pe(s) {
2917
- t.object.isPerspectiveCamera || t.object.isOrthographicCamera ? d *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), t.enableZoom = !1);
2959
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2918
2960
  }
2919
2961
  function Pe(s, y) {
2920
- if (!t.zoomToCursor)
2962
+ if (!e.zoomToCursor)
2921
2963
  return;
2922
2964
  Y = !0;
2923
- const O = t.domElement.getBoundingClientRect(), L = s - O.left, H = y - O.top, be = O.width, le = O.height;
2924
- ce.x = L / be * 2 - 1, ce.y = -(H / le) * 2 + 1, we.set(ce.x, ce.y, 1).unproject(t.object).sub(t.object.position).normalize();
2965
+ const O = e.domElement.getBoundingClientRect(), N = s - O.left, H = y - O.top, be = O.width, le = O.height;
2966
+ ce.x = N / be * 2 - 1, ce.y = -(H / le) * 2 + 1, we.set(ce.x, ce.y, 1).unproject(e.object).sub(e.object.position).normalize();
2925
2967
  }
2926
2968
  function ke(s) {
2927
- return Math.max(t.minDistance, Math.min(t.maxDistance, s));
2969
+ return Math.max(e.minDistance, Math.min(e.maxDistance, s));
2928
2970
  }
2929
- function fe(s) {
2971
+ function he(s) {
2930
2972
  b.set(s.clientX, s.clientY);
2931
2973
  }
2932
- function h(s) {
2974
+ function p(s) {
2933
2975
  Pe(s.clientX, s.clientX), B.set(s.clientX, s.clientY);
2934
2976
  }
2935
2977
  function m(s) {
2936
2978
  D.set(s.clientX, s.clientY);
2937
2979
  }
2938
2980
  function w(s) {
2939
- E.set(s.clientX, s.clientY), C.subVectors(E, b).multiplyScalar(t.rotateSpeed);
2940
- const y = t.domElement;
2941
- me(2 * Math.PI * C.x / y.clientHeight), te(2 * Math.PI * C.y / y.clientHeight), b.copy(E), t.update();
2981
+ E.set(s.clientX, s.clientY), S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
2982
+ const y = e.domElement;
2983
+ me(2 * Math.PI * S.x / y.clientHeight), te(2 * Math.PI * S.y / y.clientHeight), b.copy(E), e.update();
2942
2984
  }
2943
- function _(s) {
2944
- M.set(s.clientX, s.clientY), z.subVectors(M, B), z.y > 0 ? K(Oe(z.y)) : z.y < 0 && pe(Oe(z.y)), B.copy(M), t.update();
2985
+ function R(s) {
2986
+ M.set(s.clientX, s.clientY), z.subVectors(M, B), z.y > 0 ? K(Oe(z.y)) : z.y < 0 && pe(Oe(z.y)), B.copy(M), e.update();
2945
2987
  }
2946
2988
  function G(s) {
2947
- I.set(s.clientX, s.clientY), q.subVectors(I, D).multiplyScalar(t.panSpeed), ge(q.x, q.y), D.copy(I), t.update();
2989
+ I.set(s.clientX, s.clientY), q.subVectors(I, D).multiplyScalar(e.panSpeed), ge(q.x, q.y), D.copy(I), e.update();
2948
2990
  }
2949
2991
  function V(s) {
2950
- Pe(s.clientX, s.clientY), s.deltaY < 0 ? pe(Oe(s.deltaY)) : s.deltaY > 0 && K(Oe(s.deltaY)), t.update();
2992
+ Pe(s.clientX, s.clientY), s.deltaY < 0 ? pe(Oe(s.deltaY)) : s.deltaY > 0 && K(Oe(s.deltaY)), e.update();
2951
2993
  }
2952
2994
  function ae(s) {
2953
2995
  let y = !1;
2954
2996
  switch (s.code) {
2955
- case t.keys.UP:
2956
- s.ctrlKey || s.metaKey || s.shiftKey ? te(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(0, t.keyPanSpeed), y = !0;
2997
+ case e.keys.UP:
2998
+ s.ctrlKey || s.metaKey || s.shiftKey ? te(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, e.keyPanSpeed), y = !0;
2957
2999
  break;
2958
- case t.keys.BOTTOM:
2959
- s.ctrlKey || s.metaKey || s.shiftKey ? te(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(0, -t.keyPanSpeed), y = !0;
3000
+ case e.keys.BOTTOM:
3001
+ s.ctrlKey || s.metaKey || s.shiftKey ? te(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, -e.keyPanSpeed), y = !0;
2960
3002
  break;
2961
- case t.keys.LEFT:
2962
- s.ctrlKey || s.metaKey || s.shiftKey ? me(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(t.keyPanSpeed, 0), y = !0;
3003
+ case e.keys.LEFT:
3004
+ s.ctrlKey || s.metaKey || s.shiftKey ? me(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(e.keyPanSpeed, 0), y = !0;
2963
3005
  break;
2964
- case t.keys.RIGHT:
2965
- s.ctrlKey || s.metaKey || s.shiftKey ? me(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : ge(-t.keyPanSpeed, 0), y = !0;
3006
+ case e.keys.RIGHT:
3007
+ s.ctrlKey || s.metaKey || s.shiftKey ? me(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(-e.keyPanSpeed, 0), y = !0;
2966
3008
  break;
2967
3009
  }
2968
- y && (s.preventDefault(), t.update());
3010
+ y && (s.preventDefault(), e.update());
2969
3011
  }
2970
3012
  function U(s) {
2971
3013
  if (Q.length === 1)
2972
3014
  b.set(s.pageX, s.pageY);
2973
3015
  else {
2974
- const y = De(s), O = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
2975
- b.set(O, L);
3016
+ const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3017
+ b.set(O, N);
2976
3018
  }
2977
3019
  }
2978
3020
  function X(s) {
2979
3021
  if (Q.length === 1)
2980
3022
  D.set(s.pageX, s.pageY);
2981
3023
  else {
2982
- const y = De(s), O = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
2983
- D.set(O, L);
3024
+ const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3025
+ D.set(O, N);
2984
3026
  }
2985
3027
  }
2986
3028
  function ie(s) {
2987
- const y = De(s), O = s.pageX - y.x, L = s.pageY - y.y, H = Math.sqrt(O * O + L * L);
3029
+ const y = De(s), O = s.pageX - y.x, N = s.pageY - y.y, H = Math.sqrt(O * O + N * N);
2988
3030
  B.set(0, H);
2989
3031
  }
2990
- function R(s) {
2991
- t.enableZoom && ie(s), t.enablePan && X(s);
3032
+ function _(s) {
3033
+ e.enableZoom && ie(s), e.enablePan && X(s);
2992
3034
  }
2993
3035
  function F(s) {
2994
- t.enableZoom && ie(s), t.enableRotate && U(s);
3036
+ e.enableZoom && ie(s), e.enableRotate && U(s);
2995
3037
  }
2996
3038
  function ne(s) {
2997
3039
  if (Q.length == 1)
2998
3040
  E.set(s.pageX, s.pageY);
2999
3041
  else {
3000
- const O = De(s), L = 0.5 * (s.pageX + O.x), H = 0.5 * (s.pageY + O.y);
3001
- E.set(L, H);
3042
+ const O = De(s), N = 0.5 * (s.pageX + O.x), H = 0.5 * (s.pageY + O.y);
3043
+ E.set(N, H);
3002
3044
  }
3003
- C.subVectors(E, b).multiplyScalar(t.rotateSpeed);
3004
- const y = t.domElement;
3005
- me(2 * Math.PI * C.x / y.clientHeight), te(2 * Math.PI * C.y / y.clientHeight), b.copy(E);
3045
+ S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3046
+ const y = e.domElement;
3047
+ me(2 * Math.PI * S.x / y.clientHeight), te(2 * Math.PI * S.y / y.clientHeight), b.copy(E);
3006
3048
  }
3007
- function Se(s) {
3049
+ function Ce(s) {
3008
3050
  if (Q.length === 1)
3009
3051
  I.set(s.pageX, s.pageY);
3010
3052
  else {
3011
- const y = De(s), O = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3012
- I.set(O, L);
3053
+ const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3054
+ I.set(O, N);
3013
3055
  }
3014
- q.subVectors(I, D).multiplyScalar(t.panSpeed), ge(q.x, q.y), D.copy(I);
3056
+ q.subVectors(I, D).multiplyScalar(e.panSpeed), ge(q.x, q.y), D.copy(I);
3015
3057
  }
3016
3058
  function Me(s) {
3017
- const y = De(s), O = s.pageX - y.x, L = s.pageY - y.y, H = Math.sqrt(O * O + L * L);
3018
- M.set(0, H), z.set(0, Math.pow(M.y / B.y, t.zoomSpeed)), K(z.y), B.copy(M);
3059
+ const y = De(s), O = s.pageX - y.x, N = s.pageY - y.y, H = Math.sqrt(O * O + N * N);
3060
+ M.set(0, H), z.set(0, Math.pow(M.y / B.y, e.zoomSpeed)), K(z.y), B.copy(M);
3019
3061
  const be = (s.pageX + y.x) * 0.5, le = (s.pageY + y.y) * 0.5;
3020
3062
  Pe(be, le);
3021
3063
  }
3022
3064
  function dt(s) {
3023
- t.enableZoom && Me(s), t.enablePan && Se(s);
3065
+ e.enableZoom && Me(s), e.enablePan && Ce(s);
3024
3066
  }
3025
- function ft(s) {
3026
- t.enableZoom && Me(s), t.enableRotate && ne(s);
3067
+ function ut(s) {
3068
+ e.enableZoom && Me(s), e.enableRotate && ne(s);
3027
3069
  }
3028
3070
  function Be(s) {
3029
- t.enabled !== !1 && (Q.length === 0 && (t.domElement.setPointerCapture(s.pointerId), t.domElement.addEventListener("pointermove", et), t.domElement.addEventListener("pointerup", Ue)), Ot(s), s.pointerType === "touch" ? at(s) : tt(s));
3071
+ e.enabled !== !1 && (Q.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", et), e.domElement.addEventListener("pointerup", Ue)), wt(s), s.pointerType === "touch" ? at(s) : tt(s));
3030
3072
  }
3031
3073
  function et(s) {
3032
- t.enabled !== !1 && (s.pointerType === "touch" ? vt(s) : wt(s));
3074
+ e.enabled !== !1 && (s.pointerType === "touch" ? mt(s) : xt(s));
3033
3075
  }
3034
3076
  function Ue(s) {
3035
- switch (Mt(s), Q.length) {
3077
+ switch (Ot(s), Q.length) {
3036
3078
  case 0:
3037
- t.domElement.releasePointerCapture(s.pointerId), t.domElement.removeEventListener("pointermove", et), t.domElement.removeEventListener("pointerup", Ue), t.dispatchEvent(Jt), c = r.NONE;
3079
+ e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", et), e.domElement.removeEventListener("pointerup", Ue), e.dispatchEvent(Zt), o = i.NONE;
3038
3080
  break;
3039
3081
  case 1:
3040
3082
  const y = Q[0], O = x[y];
@@ -3046,73 +3088,73 @@ class Qa extends tn {
3046
3088
  let y;
3047
3089
  switch (s.button) {
3048
3090
  case 0:
3049
- y = t.mouseButtons.LEFT;
3091
+ y = e.mouseButtons.LEFT;
3050
3092
  break;
3051
3093
  case 1:
3052
- y = t.mouseButtons.MIDDLE;
3094
+ y = e.mouseButtons.MIDDLE;
3053
3095
  break;
3054
3096
  case 2:
3055
- y = t.mouseButtons.RIGHT;
3097
+ y = e.mouseButtons.RIGHT;
3056
3098
  break;
3057
3099
  default:
3058
3100
  y = -1;
3059
3101
  }
3060
3102
  switch (y) {
3061
3103
  case Xe.DOLLY:
3062
- if (t.enableZoom === !1)
3104
+ if (e.enableZoom === !1)
3063
3105
  return;
3064
- h(s), c = r.DOLLY;
3106
+ p(s), o = i.DOLLY;
3065
3107
  break;
3066
3108
  case Xe.ROTATE:
3067
3109
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3068
- if (t.enablePan === !1)
3110
+ if (e.enablePan === !1)
3069
3111
  return;
3070
- m(s), c = r.PAN;
3112
+ m(s), o = i.PAN;
3071
3113
  } else {
3072
- if (t.enableRotate === !1)
3114
+ if (e.enableRotate === !1)
3073
3115
  return;
3074
- fe(s), c = r.ROTATE;
3116
+ he(s), o = i.ROTATE;
3075
3117
  }
3076
3118
  break;
3077
3119
  case Xe.PAN:
3078
3120
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3079
- if (t.enableRotate === !1)
3121
+ if (e.enableRotate === !1)
3080
3122
  return;
3081
- fe(s), c = r.ROTATE;
3123
+ he(s), o = i.ROTATE;
3082
3124
  } else {
3083
- if (t.enablePan === !1)
3125
+ if (e.enablePan === !1)
3084
3126
  return;
3085
- m(s), c = r.PAN;
3127
+ m(s), o = i.PAN;
3086
3128
  }
3087
3129
  break;
3088
3130
  default:
3089
- c = r.NONE;
3131
+ o = i.NONE;
3090
3132
  }
3091
- c !== r.NONE && t.dispatchEvent(jt);
3133
+ o !== i.NONE && e.dispatchEvent(kt);
3092
3134
  }
3093
- function wt(s) {
3094
- switch (c) {
3095
- case r.ROTATE:
3096
- if (t.enableRotate === !1)
3135
+ function xt(s) {
3136
+ switch (o) {
3137
+ case i.ROTATE:
3138
+ if (e.enableRotate === !1)
3097
3139
  return;
3098
3140
  w(s);
3099
3141
  break;
3100
- case r.DOLLY:
3101
- if (t.enableZoom === !1)
3142
+ case i.DOLLY:
3143
+ if (e.enableZoom === !1)
3102
3144
  return;
3103
- _(s);
3145
+ R(s);
3104
3146
  break;
3105
- case r.PAN:
3106
- if (t.enablePan === !1)
3147
+ case i.PAN:
3148
+ if (e.enablePan === !1)
3107
3149
  return;
3108
3150
  G(s);
3109
3151
  break;
3110
3152
  }
3111
3153
  }
3112
3154
  function ht(s) {
3113
- t.enabled === !1 || t.enableZoom === !1 || c !== r.NONE || (s.preventDefault(), t.dispatchEvent(jt), V(pt(s)), t.dispatchEvent(Jt));
3155
+ e.enabled === !1 || e.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), e.dispatchEvent(kt), V(ft(s)), e.dispatchEvent(Zt));
3114
3156
  }
3115
- function pt(s) {
3157
+ function ft(s) {
3116
3158
  const y = s.deltaMode, O = {
3117
3159
  clientX: s.clientX,
3118
3160
  clientY: s.clientY,
@@ -3128,87 +3170,87 @@ class Qa extends tn {
3128
3170
  }
3129
3171
  return s.ctrlKey && !Ae && (O.deltaY *= 10), O;
3130
3172
  }
3131
- function mt(s) {
3132
- s.key === "Control" && (Ae = !0, t.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
3173
+ function pt(s) {
3174
+ s.key === "Control" && (Ae = !0, e.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
3133
3175
  }
3134
3176
  function je(s) {
3135
- s.key === "Control" && (Ae = !1, t.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
3177
+ s.key === "Control" && (Ae = !1, e.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
3136
3178
  }
3137
3179
  function nt(s) {
3138
- t.enabled === !1 || t.enablePan === !1 || ae(s);
3180
+ e.enabled === !1 || e.enablePan === !1 || ae(s);
3139
3181
  }
3140
3182
  function at(s) {
3141
- switch (gt(s), Q.length) {
3183
+ switch (vt(s), Q.length) {
3142
3184
  case 1:
3143
- switch (t.touches.ONE) {
3185
+ switch (e.touches.ONE) {
3144
3186
  case Ze.ROTATE:
3145
- if (t.enableRotate === !1)
3187
+ if (e.enableRotate === !1)
3146
3188
  return;
3147
- U(s), c = r.TOUCH_ROTATE;
3189
+ U(s), o = i.TOUCH_ROTATE;
3148
3190
  break;
3149
3191
  case Ze.PAN:
3150
- if (t.enablePan === !1)
3192
+ if (e.enablePan === !1)
3151
3193
  return;
3152
- X(s), c = r.TOUCH_PAN;
3194
+ X(s), o = i.TOUCH_PAN;
3153
3195
  break;
3154
3196
  default:
3155
- c = r.NONE;
3197
+ o = i.NONE;
3156
3198
  }
3157
3199
  break;
3158
3200
  case 2:
3159
- switch (t.touches.TWO) {
3201
+ switch (e.touches.TWO) {
3160
3202
  case Ze.DOLLY_PAN:
3161
- if (t.enableZoom === !1 && t.enablePan === !1)
3203
+ if (e.enableZoom === !1 && e.enablePan === !1)
3162
3204
  return;
3163
- R(s), c = r.TOUCH_DOLLY_PAN;
3205
+ _(s), o = i.TOUCH_DOLLY_PAN;
3164
3206
  break;
3165
3207
  case Ze.DOLLY_ROTATE:
3166
- if (t.enableZoom === !1 && t.enableRotate === !1)
3208
+ if (e.enableZoom === !1 && e.enableRotate === !1)
3167
3209
  return;
3168
- F(s), c = r.TOUCH_DOLLY_ROTATE;
3210
+ F(s), o = i.TOUCH_DOLLY_ROTATE;
3169
3211
  break;
3170
3212
  default:
3171
- c = r.NONE;
3213
+ o = i.NONE;
3172
3214
  }
3173
3215
  break;
3174
3216
  default:
3175
- c = r.NONE;
3217
+ o = i.NONE;
3176
3218
  }
3177
- c !== r.NONE && t.dispatchEvent(jt);
3219
+ o !== i.NONE && e.dispatchEvent(kt);
3178
3220
  }
3179
- function vt(s) {
3180
- switch (gt(s), c) {
3181
- case r.TOUCH_ROTATE:
3182
- if (t.enableRotate === !1)
3221
+ function mt(s) {
3222
+ switch (vt(s), o) {
3223
+ case i.TOUCH_ROTATE:
3224
+ if (e.enableRotate === !1)
3183
3225
  return;
3184
- ne(s), t.update();
3226
+ ne(s), e.update();
3185
3227
  break;
3186
- case r.TOUCH_PAN:
3187
- if (t.enablePan === !1)
3228
+ case i.TOUCH_PAN:
3229
+ if (e.enablePan === !1)
3188
3230
  return;
3189
- Se(s), t.update();
3231
+ Ce(s), e.update();
3190
3232
  break;
3191
- case r.TOUCH_DOLLY_PAN:
3192
- if (t.enableZoom === !1 && t.enablePan === !1)
3233
+ case i.TOUCH_DOLLY_PAN:
3234
+ if (e.enableZoom === !1 && e.enablePan === !1)
3193
3235
  return;
3194
- dt(s), t.update();
3236
+ dt(s), e.update();
3195
3237
  break;
3196
- case r.TOUCH_DOLLY_ROTATE:
3197
- if (t.enableZoom === !1 && t.enableRotate === !1)
3238
+ case i.TOUCH_DOLLY_ROTATE:
3239
+ if (e.enableZoom === !1 && e.enableRotate === !1)
3198
3240
  return;
3199
- ft(s), t.update();
3241
+ ut(s), e.update();
3200
3242
  break;
3201
3243
  default:
3202
- c = r.NONE;
3244
+ o = i.NONE;
3203
3245
  }
3204
3246
  }
3205
3247
  function qe(s) {
3206
- t.enabled !== !1 && s.preventDefault();
3248
+ e.enabled !== !1 && s.preventDefault();
3207
3249
  }
3208
- function Ot(s) {
3250
+ function wt(s) {
3209
3251
  Q.push(s.pointerId);
3210
3252
  }
3211
- function Mt(s) {
3253
+ function Ot(s) {
3212
3254
  delete x[s.pointerId];
3213
3255
  for (let y = 0; y < Q.length; y++)
3214
3256
  if (Q[y] == s.pointerId) {
@@ -3216,56 +3258,56 @@ class Qa extends tn {
3216
3258
  return;
3217
3259
  }
3218
3260
  }
3219
- function gt(s) {
3261
+ function vt(s) {
3220
3262
  let y = x[s.pointerId];
3221
- y === void 0 && (y = new he(), x[s.pointerId] = y), y.set(s.pageX, s.pageY);
3263
+ y === void 0 && (y = new fe(), x[s.pointerId] = y), y.set(s.pageX, s.pageY);
3222
3264
  }
3223
3265
  function De(s) {
3224
3266
  const y = s.pointerId === Q[0] ? Q[1] : Q[0];
3225
3267
  return x[y];
3226
3268
  }
3227
- t.domElement.addEventListener("contextmenu", qe), t.domElement.addEventListener("pointerdown", Be), t.domElement.addEventListener("pointercancel", Ue), t.domElement.addEventListener("wheel", ht, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", mt, { passive: !0, capture: !0 }), this.update();
3269
+ e.domElement.addEventListener("contextmenu", qe), e.domElement.addEventListener("pointerdown", Be), e.domElement.addEventListener("pointercancel", Ue), e.domElement.addEventListener("wheel", ht, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", pt, { passive: !0, capture: !0 }), this.update();
3228
3270
  }
3229
3271
  }
3230
- const Ct = (e) => {
3231
- const [n, a] = oe(e.options[e.index]), t = () => {
3232
- e.onToggle(!e.open);
3233
- }, r = (c) => {
3234
- c !== n && (e.onSelect(c), a(c)), e.onToggle(!1);
3272
+ const Et = (t) => {
3273
+ const [n, a] = oe(t.options[t.index]), e = () => {
3274
+ t.onToggle(!t.open);
3275
+ }, i = (o) => {
3276
+ o !== n && (t.onSelect(o), a(o)), t.onToggle(!1);
3235
3277
  };
3236
- return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${e.up === !0 ? "up" : ""}`, children: [
3237
- /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: t, children: n }),
3238
- e.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: e.options.map((c) => /* @__PURE__ */ l.jsx("li", { onClick: () => r(c), children: c }, c)) })
3278
+ return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
3279
+ /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3280
+ t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((o) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(o), children: o }, o)) })
3239
3281
  ] });
3240
- }, He = ha(function(n, a) {
3241
- const [t, r] = oe(!1), c = n.options.indexOf(n.camera.name);
3282
+ }, He = ua(function(n, a) {
3283
+ const [e, i] = oe(!1), o = n.options.indexOf(n.camera.name);
3242
3284
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3243
3285
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3244
- t && r(!1);
3286
+ e && i(!1);
3245
3287
  } }),
3246
3288
  /* @__PURE__ */ l.jsx(
3247
- Ct,
3289
+ Et,
3248
3290
  {
3249
- index: c,
3250
- open: t,
3291
+ index: o,
3292
+ open: e,
3251
3293
  options: n.options,
3252
3294
  onSelect: n.onSelect,
3253
- onToggle: (p) => {
3254
- r(p);
3295
+ onToggle: (h) => {
3296
+ i(h);
3255
3297
  },
3256
3298
  up: !0
3257
3299
  }
3258
3300
  )
3259
3301
  ] });
3260
3302
  });
3261
- class ei extends yn {
3303
+ class Za extends bn {
3262
3304
  constructor(n) {
3263
3305
  super({
3264
3306
  extensions: {
3265
3307
  derivatives: !0
3266
3308
  },
3267
- glslVersion: ea,
3268
- side: an,
3309
+ glslVersion: Jn,
3310
+ side: nn,
3269
3311
  transparent: !0,
3270
3312
  uniforms: {
3271
3313
  uScale: {
@@ -3370,17 +3412,17 @@ class ei extends yn {
3370
3412
  });
3371
3413
  }
3372
3414
  }
3373
- class ti extends ta {
3415
+ class Ja extends Qn {
3374
3416
  gridMaterial;
3375
3417
  constructor() {
3376
- const n = new ei();
3377
- super(new na(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3418
+ const n = new Za();
3419
+ super(new ea(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3378
3420
  }
3379
3421
  update() {
3380
3422
  this.gridMaterial.needsUpdate = !0;
3381
3423
  }
3382
3424
  }
3383
- const ni = `#include <common>
3425
+ const Qa = `#include <common>
3384
3426
  #include <batching_pars_vertex>
3385
3427
  #include <uv_pars_vertex>
3386
3428
  #include <color_pars_vertex>
@@ -3410,7 +3452,7 @@ void main() {
3410
3452
  #include <logdepthbuf_vertex>
3411
3453
  #include <clipping_planes_vertex>
3412
3454
  #include <worldpos_vertex>
3413
- }`, ai = `
3455
+ }`, ei = `
3414
3456
  #include <common>
3415
3457
  #include <uv_pars_fragment>
3416
3458
  #include <clipping_planes_pars_fragment>
@@ -3419,27 +3461,27 @@ void main() {
3419
3461
  #include <clipping_planes_fragment>
3420
3462
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
3421
3463
  }`;
3422
- class ii extends yn {
3464
+ class ti extends bn {
3423
3465
  constructor() {
3424
3466
  super({
3425
3467
  defines: {
3426
3468
  USE_UV: ""
3427
3469
  },
3428
- vertexShader: ni,
3429
- fragmentShader: ai
3470
+ vertexShader: Qa,
3471
+ fragmentShader: ei
3430
3472
  });
3431
3473
  }
3432
3474
  }
3433
- let yt = "Renderer", Ie, Et = !1, en = !1, $, se, Le, Ne;
3434
- function Ti(e) {
3435
- const n = Ce(() => /* @__PURE__ */ new Map(), []), a = Ce(() => /* @__PURE__ */ new Map(), []), t = Ce(() => /* @__PURE__ */ new Map(), []), r = Ce(() => new aa(), []), c = Ce(() => new ia(), []), p = Ce(() => new ti(), []), o = Ce(() => new Yt(500), []), u = Ce(() => new Yt(100), []), d = Ce(() => new ra(), []), v = Ce(() => new sa(), []), b = Ce(() => new ii(), []), E = Ce(() => new oa({
3475
+ let bt = "Renderer", Ie, yt = !1, Qt = !1, $, se, Ne, Le;
3476
+ function bi(t) {
3477
+ const n = Se(() => /* @__PURE__ */ new Map(), []), a = Se(() => /* @__PURE__ */ new Map(), []), e = Se(() => /* @__PURE__ */ new Map(), []), i = Se(() => new ta(), []), o = Se(() => new na(), []), h = Se(() => new Ja(), []), c = Se(() => new Yt(500), []), d = Se(() => new Yt(100), []), u = Se(() => new aa(), []), v = Se(() => new ia(), []), b = Se(() => new ti(), []), E = Se(() => new ra({
3436
3478
  opacity: 0.33,
3437
3479
  transparent: !0,
3438
3480
  wireframe: !0
3439
3481
  }), []);
3440
- function C(h, m) {
3482
+ function S(p, m) {
3441
3483
  const w = new Gt(-100, 100, 100, -100, 50, 3e3);
3442
- return w.name = h, w.position.copy(m), w.lookAt(0, 0, 0), n.set(h, w), w;
3484
+ return w.name = p, w.position.copy(m), w.lookAt(0, 0, 0), n.set(p, w), w;
3443
3485
  }
3444
3486
  const D = [
3445
3487
  "Renderer",
@@ -3453,18 +3495,18 @@ function Ti(e) {
3453
3495
  "Stacked",
3454
3496
  "Quad"
3455
3497
  ];
3456
- Re(() => {
3457
- r.name = "Debug Scene", c.name = "helpers", r.add(c), c.add(p), o.name = "axisHelper", c.add(o), u.name = "interactionHelper", c.add(u), u.visible = !1, C("Top", new W(0, 1e3, 0)), C("Bottom", new W(0, -1e3, 0)), C("Left", new W(-1e3, 0, 0)), C("Right", new W(1e3, 0, 0)), C("Front", new W(0, 0, 1e3)), C("Back", new W(0, 0, -1e3)), C("Orthographic", new W(1e3, 1e3, 1e3));
3458
- const h = new Rt(60, 1, 50, 3e3);
3459
- h.name = "Debug", h.position.set(500, 500, 500), h.lookAt(0, 0, 0), n.set("Debug", h), $ = n.get("Debug"), se = n.get("Orthographic"), Le = n.get("Front"), Ne = n.get("Top");
3498
+ _e(() => {
3499
+ i.name = "Debug Scene", o.name = "helpers", i.add(o), o.add(h), c.name = "axisHelper", o.add(c), d.name = "interactionHelper", o.add(d), d.visible = !1, S("Top", new W(0, 1e3, 0)), S("Bottom", new W(0, -1e3, 0)), S("Left", new W(-1e3, 0, 0)), S("Right", new W(1e3, 0, 0)), S("Front", new W(0, 0, 1e3)), S("Back", new W(0, 0, -1e3)), S("Orthographic", new W(1e3, 1e3, 1e3));
3500
+ const p = new Rt(60, 1, 50, 3e3);
3501
+ p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), n.set("Debug", p), $ = n.get("Debug"), se = n.get("Orthographic"), Ne = n.get("Front"), Le = n.get("Top");
3460
3502
  }, []);
3461
- const q = _e(null), B = _e(null), M = _e(null), z = _e(null), we = _e(null), ce = _e(null), [Y, Q] = oe(e.mode !== void 0 ? e.mode : "Single"), [x, Ae] = oe(null), [Fe, Oe] = oe(!1), [me, te] = oe(!1), [de, ve] = oe(!1), [, ge] = oe(Date.now()), K = (h, m) => {
3462
- const w = a.get(h.name);
3463
- w !== void 0 && w.dispose(), a.delete(h.name);
3464
- const _ = t.get(h.name);
3465
- _ !== void 0 && (r.remove(_), _.dispose()), t.delete(h.name);
3466
- const G = new Qa(h, m);
3467
- switch (G.enableDamping = !0, G.dampingFactor = 0.05, h.name) {
3503
+ const q = Re(null), B = Re(null), M = Re(null), z = Re(null), we = Re(null), ce = Re(null), [Y, Q] = oe(t.mode !== void 0 ? t.mode : "Single"), [x, Ae] = oe(null), [Fe, Oe] = oe(!1), [me, te] = oe(!1), [ue, ve] = oe(!1), [, ge] = oe(Date.now()), K = (p, m) => {
3504
+ const w = a.get(p.name);
3505
+ w !== void 0 && w.dispose(), a.delete(p.name);
3506
+ const R = e.get(p.name);
3507
+ R !== void 0 && (i.remove(R), R.dispose()), e.delete(p.name);
3508
+ const G = new Xa(p, m);
3509
+ switch (G.enableDamping = !0, G.dampingFactor = 0.05, p.name) {
3468
3510
  case "Top":
3469
3511
  case "Bottom":
3470
3512
  case "Left":
@@ -3474,21 +3516,21 @@ function Ti(e) {
3474
3516
  G.enableRotate = !1;
3475
3517
  break;
3476
3518
  }
3477
- if (a.set(h.name, G), h instanceof Rt) {
3478
- const V = new ua(h);
3479
- t.set(h.name, V), r.add(V);
3519
+ if (a.set(p.name, G), p instanceof Rt) {
3520
+ const V = new ca(p);
3521
+ e.set(p.name, V), i.add(V);
3480
3522
  }
3481
- }, pe = (h) => {
3482
- const m = t.get(h.name);
3483
- m !== void 0 && (r.remove(m), m.dispose(), t.delete(h.name));
3484
- const w = a.get(h.name);
3485
- w !== void 0 && (w.dispose(), a.delete(h.name));
3523
+ }, pe = (p) => {
3524
+ const m = e.get(p.name);
3525
+ m !== void 0 && (i.remove(m), m.dispose(), e.delete(p.name));
3526
+ const w = a.get(p.name);
3527
+ w !== void 0 && (w.dispose(), a.delete(p.name));
3486
3528
  }, Pe = () => {
3487
- a.forEach((h, m) => {
3488
- h.dispose();
3489
- const w = t.get(m);
3490
- w !== void 0 && (r.remove(w), w.dispose()), t.delete(m), a.delete(m);
3491
- }), a.clear(), t.clear();
3529
+ a.forEach((p, m) => {
3530
+ p.dispose();
3531
+ const w = e.get(m);
3532
+ w !== void 0 && (i.remove(w), w.dispose()), e.delete(m), a.delete(m);
3533
+ }), a.clear(), e.clear();
3492
3534
  }, ke = () => {
3493
3535
  switch (Y) {
3494
3536
  case "Single":
@@ -3499,70 +3541,70 @@ function Ti(e) {
3499
3541
  K($, M.current), K(se, z.current);
3500
3542
  break;
3501
3543
  case "Quad":
3502
- K($, M.current), K(se, z.current), K(Le, we.current), K(Ne, ce.current);
3544
+ K($, M.current), K(se, z.current), K(Ne, we.current), K(Le, ce.current);
3503
3545
  break;
3504
3546
  }
3505
3547
  };
3506
- Re(() => {
3507
- const h = new ca({
3548
+ _e(() => {
3549
+ const p = new sa({
3508
3550
  canvas: q.current,
3509
3551
  stencil: !1
3510
3552
  });
3511
- h.autoClear = !1, h.shadowMap.enabled = !0, h.setPixelRatio(devicePixelRatio), h.setClearColor(0), Ae(h);
3512
- }, []), Re(() => {
3513
- const h = (_) => {
3514
- wn(Ie), r.remove(Ie);
3515
- const G = e.scenes.get(_.value.name);
3553
+ p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Ae(p);
3554
+ }, []), _e(() => {
3555
+ const p = (R) => {
3556
+ xn(Ie), i.remove(Ie);
3557
+ const G = t.scenes.get(R.value.name);
3516
3558
  if (G !== void 0) {
3517
3559
  const V = new G();
3518
- e.onSceneSet !== void 0 && e.onSceneSet(V), Ie = V, e.three.scene = Ie, r.add(Ie), en = !0;
3560
+ t.onSceneSet !== void 0 && t.onSceneSet(V), Ie = V, t.three.scene = Ie, i.add(Ie), Qt = !0;
3519
3561
  }
3520
- }, m = (_) => {
3521
- const G = _.value, V = e.three.scene?.getObjectByProperty("uuid", G.uuid);
3562
+ }, m = (R) => {
3563
+ const G = R.value, V = t.three.scene?.getObjectByProperty("uuid", G.uuid);
3522
3564
  V !== void 0 && n.set(G.name, V), ge(Date.now());
3523
- }, w = (_) => {
3524
- n.delete(_.value.name), ge(Date.now());
3565
+ }, w = (R) => {
3566
+ n.delete(R.value.name), ge(Date.now());
3525
3567
  };
3526
- return P.addEventListener(k.SET_SCENE, h), P.addEventListener(k.ADD_CAMERA, m), P.addEventListener(k.REMOVE_CAMERA, w), () => {
3527
- P.removeEventListener(k.SET_SCENE, h), P.removeEventListener(k.ADD_CAMERA, m), P.removeEventListener(k.REMOVE_CAMERA, w);
3568
+ return P.addEventListener(k.SET_SCENE, p), P.addEventListener(k.ADD_CAMERA, m), P.addEventListener(k.REMOVE_CAMERA, w), () => {
3569
+ P.removeEventListener(k.SET_SCENE, p), P.removeEventListener(k.ADD_CAMERA, m), P.removeEventListener(k.REMOVE_CAMERA, w);
3528
3570
  };
3529
- }, []), Re(() => {
3571
+ }, []), _e(() => {
3530
3572
  if (x === null)
3531
3573
  return;
3532
- let h = window.innerWidth, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), G = -1;
3574
+ let p = window.innerWidth, m = window.innerHeight, w = Math.floor(p / 2), R = Math.floor(m / 2), G = -1;
3533
3575
  const V = () => {
3534
- h = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), x.setSize(h, m);
3535
- let R = h, F = m;
3576
+ p = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(p / 2), R = Math.floor(m / 2), x.setSize(p, m);
3577
+ let _ = p, F = m;
3536
3578
  switch (Y) {
3537
3579
  case "Side by Side":
3538
- R = w, F = m;
3580
+ _ = w, F = m;
3539
3581
  break;
3540
3582
  case "Stacked":
3541
- R = h, F = _;
3583
+ _ = p, F = R;
3542
3584
  break;
3543
3585
  case "Quad":
3544
- R = w, F = _;
3586
+ _ = w, F = R;
3545
3587
  break;
3546
3588
  }
3547
3589
  n.forEach((ne) => {
3548
- ne instanceof Gt ? (ne.left = R / -2, ne.right = R / 2, ne.top = F / 2, ne.bottom = F / -2, ne.updateProjectionMatrix()) : ne instanceof Rt && (ne.aspect = R / F, ne.updateProjectionMatrix(), t.get(ne.name)?.update());
3590
+ ne instanceof Gt ? (ne.left = _ / -2, ne.right = _ / 2, ne.top = F / 2, ne.bottom = F / -2, ne.updateProjectionMatrix()) : ne instanceof Rt && (ne.aspect = _ / F, ne.updateProjectionMatrix(), e.get(ne.name)?.update());
3549
3591
  });
3550
3592
  }, ae = () => {
3551
- x.setViewport(0, 0, h, m), x.setScissor(0, 0, h, m), x.render(r, $);
3593
+ x.setViewport(0, 0, p, m), x.setScissor(0, 0, p, m), x.render(i, $);
3552
3594
  }, U = () => {
3553
3595
  if (Y === "Side by Side")
3554
- x.setViewport(0, 0, w, m), x.setScissor(0, 0, w, m), x.render(r, $), x.setViewport(w, 0, w, m), x.setScissor(w, 0, w, m), x.render(r, se);
3596
+ x.setViewport(0, 0, w, m), x.setScissor(0, 0, w, m), x.render(i, $), x.setViewport(w, 0, w, m), x.setScissor(w, 0, w, m), x.render(i, se);
3555
3597
  else {
3556
- const R = m - _;
3557
- x.setViewport(0, R, h, _), x.setScissor(0, R, h, _), x.render(r, $), x.setViewport(0, 0, h, _), x.setScissor(0, 0, h, _), x.render(r, se);
3598
+ const _ = m - R;
3599
+ x.setViewport(0, _, p, R), x.setScissor(0, _, p, R), x.render(i, $), x.setViewport(0, 0, p, R), x.setScissor(0, 0, p, R), x.render(i, se);
3558
3600
  }
3559
3601
  }, X = () => {
3560
- let R = 0, F = 0;
3561
- F = m - _, R = 0, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, $), R = w, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, se), F = 0, R = 0, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, Le), R = w, x.setViewport(R, F, w, _), x.setScissor(R, F, w, _), x.render(r, Ne);
3602
+ let _ = 0, F = 0;
3603
+ F = m - R, _ = 0, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, $), _ = w, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, se), F = 0, _ = 0, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, Ne), _ = w, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, Le);
3562
3604
  }, ie = () => {
3563
- switch (a.forEach((R) => {
3564
- R.update();
3565
- }), e.onSceneUpdate !== void 0 && en && e.onSceneUpdate(Ie), x.clear(), Y) {
3605
+ switch (a.forEach((_) => {
3606
+ _.update();
3607
+ }), t.onSceneUpdate !== void 0 && Qt && t.onSceneUpdate(Ie), x.clear(), Y) {
3566
3608
  case "Single":
3567
3609
  ae();
3568
3610
  break;
@@ -3579,172 +3621,172 @@ function Ti(e) {
3579
3621
  return ke(), window.addEventListener("resize", V), V(), ie(), () => {
3580
3622
  window.removeEventListener("resize", V), cancelAnimationFrame(G), G = -1;
3581
3623
  };
3582
- }, [Y, x]), Re(() => {
3624
+ }, [Y, x]), _e(() => {
3583
3625
  if (x !== null) {
3584
- const h = new la(), m = new he(), w = (ae, U, X, ie) => {
3626
+ const p = new oa(), m = new fe(), w = (ae, U, X, ie) => {
3585
3627
  switch (Y) {
3586
3628
  case "Quad":
3587
- ae < X ? U < ie ? h.setFromCamera(m, $) : h.setFromCamera(m, Le) : U < ie ? h.setFromCamera(m, se) : h.setFromCamera(m, Ne);
3629
+ ae < X ? U < ie ? p.setFromCamera(m, $) : p.setFromCamera(m, Ne) : U < ie ? p.setFromCamera(m, se) : p.setFromCamera(m, Le);
3588
3630
  break;
3589
3631
  case "Side by Side":
3590
- ae < X ? h.setFromCamera(m, $) : h.setFromCamera(m, se);
3632
+ ae < X ? p.setFromCamera(m, $) : p.setFromCamera(m, se);
3591
3633
  break;
3592
3634
  case "Single":
3593
- h.setFromCamera(m, $);
3635
+ p.setFromCamera(m, $);
3594
3636
  break;
3595
3637
  case "Stacked":
3596
- U < ie ? h.setFromCamera(m, $) : h.setFromCamera(m, se);
3638
+ U < ie ? p.setFromCamera(m, $) : p.setFromCamera(m, se);
3597
3639
  break;
3598
3640
  }
3599
- }, _ = (ae) => {
3600
- if (!Et)
3641
+ }, R = (ae) => {
3642
+ if (!yt)
3601
3643
  return;
3602
- const U = new he();
3644
+ const U = new fe();
3603
3645
  x.getSize(U);
3604
3646
  const X = Math.min(ae.clientX, U.x), ie = Math.min(ae.clientY, U.y);
3605
3647
  m.x = Qe(X, 0, U.x, -1, 1), m.y = Qe(ie, 0, U.y, 1, -1);
3606
- const R = U.x / 2, F = U.y / 2, ne = () => {
3607
- X < R ? m.x = Qe(X, 0, R, -1, 1) : m.x = Qe(X, R, U.x, -1, 1);
3608
- }, Se = () => {
3648
+ const _ = U.x / 2, F = U.y / 2, ne = () => {
3649
+ X < _ ? m.x = Qe(X, 0, _, -1, 1) : m.x = Qe(X, _, U.x, -1, 1);
3650
+ }, Ce = () => {
3609
3651
  ie < F ? m.y = Qe(ie, 0, F, 1, -1) : m.y = Qe(ie, F, U.y, 1, -1);
3610
3652
  };
3611
3653
  switch (Y) {
3612
3654
  case "Quad":
3613
- ne(), Se();
3655
+ ne(), Ce();
3614
3656
  break;
3615
3657
  case "Side by Side":
3616
3658
  ne();
3617
3659
  break;
3618
3660
  case "Stacked":
3619
- Se(), Se();
3661
+ Ce(), Ce();
3620
3662
  break;
3621
3663
  }
3622
- w(X, ie, R, F);
3623
- const Me = h.intersectObjects(Ie.children);
3624
- Me.length > 0 && u.position.copy(Me[0].point);
3664
+ w(X, ie, _, F);
3665
+ const Me = p.intersectObjects(Ie.children);
3666
+ Me.length > 0 && d.position.copy(Me[0].point);
3625
3667
  }, G = (ae) => {
3626
- if (!Et)
3668
+ if (!yt)
3627
3669
  return;
3628
- const U = new he();
3670
+ const U = new fe();
3629
3671
  if (x.getSize(U), ae.clientX >= U.x)
3630
3672
  return;
3631
- _(ae);
3632
- const X = h.intersectObjects(Ie.children);
3633
- X.length > 0 && e.three.getObject(X[0].object.uuid);
3673
+ R(ae);
3674
+ const X = p.intersectObjects(Ie.children);
3675
+ X.length > 0 && t.three.getObject(X[0].object.uuid);
3634
3676
  }, V = B.current;
3635
- return V.addEventListener("mousemove", _, !1), V.addEventListener("click", G, !1), () => {
3636
- V.removeEventListener("mousemove", _), V.removeEventListener("click", G);
3677
+ return V.addEventListener("mousemove", R, !1), V.addEventListener("click", G, !1), () => {
3678
+ V.removeEventListener("mousemove", R), V.removeEventListener("click", G);
3637
3679
  };
3638
3680
  }
3639
3681
  }, [Y, x]);
3640
- const fe = [];
3641
- return n.forEach((h, m) => {
3642
- fe.push(m);
3682
+ const he = [];
3683
+ return n.forEach((p, m) => {
3684
+ he.push(m);
3643
3685
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3644
3686
  /* @__PURE__ */ l.jsx("canvas", { ref: q }),
3645
3687
  x !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3646
3688
  /* @__PURE__ */ l.jsxs("div", { className: `cameras ${Y === "Single" || Y === "Stacked" ? "single" : ""}`, ref: B, children: [
3647
- Y === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(He, { camera: $, options: fe, ref: M, onSelect: (h) => {
3689
+ Y === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3648
3690
  a.get($.name)?.dispose();
3649
- const m = n.get(h);
3691
+ const m = n.get(p);
3650
3692
  m !== void 0 && (pe($), $ = m, K(m, M.current));
3651
3693
  } }) }),
3652
3694
  (Y === "Side by Side" || Y === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3653
- /* @__PURE__ */ l.jsx(He, { camera: $, options: fe, ref: M, onSelect: (h) => {
3695
+ /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3654
3696
  a.get($.name)?.dispose();
3655
- const m = n.get(h);
3697
+ const m = n.get(p);
3656
3698
  m !== void 0 && (pe($), $ = m, K(m, M.current));
3657
3699
  } }),
3658
- /* @__PURE__ */ l.jsx(He, { camera: se, options: fe, ref: z, onSelect: (h) => {
3700
+ /* @__PURE__ */ l.jsx(He, { camera: se, options: he, ref: z, onSelect: (p) => {
3659
3701
  a.get(se.name)?.dispose();
3660
- const m = n.get(h);
3702
+ const m = n.get(p);
3661
3703
  m !== void 0 && (pe(se), se = m, K(m, z.current));
3662
3704
  } })
3663
3705
  ] }),
3664
3706
  Y === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3665
- /* @__PURE__ */ l.jsx(He, { camera: $, options: fe, ref: M, onSelect: (h) => {
3707
+ /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3666
3708
  a.get($.name)?.dispose();
3667
- const m = n.get(h);
3709
+ const m = n.get(p);
3668
3710
  m !== void 0 && (pe($), $ = m, K(m, M.current));
3669
3711
  } }),
3670
- /* @__PURE__ */ l.jsx(He, { camera: se, options: fe, ref: z, onSelect: (h) => {
3712
+ /* @__PURE__ */ l.jsx(He, { camera: se, options: he, ref: z, onSelect: (p) => {
3671
3713
  a.get(se.name)?.dispose();
3672
- const m = n.get(h);
3714
+ const m = n.get(p);
3673
3715
  m !== void 0 && (pe(se), se = m, K(m, z.current));
3674
3716
  } }),
3675
- /* @__PURE__ */ l.jsx(He, { camera: Le, options: fe, ref: we, onSelect: (h) => {
3676
- a.get(Le.name)?.dispose();
3677
- const m = n.get(h);
3678
- m !== void 0 && (pe(Le), Le = m, K(m, we.current));
3679
- } }),
3680
- /* @__PURE__ */ l.jsx(He, { camera: Ne, options: fe, ref: ce, onSelect: (h) => {
3717
+ /* @__PURE__ */ l.jsx(He, { camera: Ne, options: he, ref: we, onSelect: (p) => {
3681
3718
  a.get(Ne.name)?.dispose();
3682
- const m = n.get(h);
3683
- m !== void 0 && (pe(Ne), Ne = m, K(m, ce.current));
3719
+ const m = n.get(p);
3720
+ m !== void 0 && (pe(Ne), Ne = m, K(m, we.current));
3721
+ } }),
3722
+ /* @__PURE__ */ l.jsx(He, { camera: Le, options: he, ref: ce, onSelect: (p) => {
3723
+ a.get(Le.name)?.dispose();
3724
+ const m = n.get(p);
3725
+ m !== void 0 && (pe(Le), Le = m, K(m, ce.current));
3684
3726
  } })
3685
3727
  ] })
3686
3728
  ] }),
3687
3729
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3688
3730
  /* @__PURE__ */ l.jsx(
3689
- Ct,
3731
+ Et,
3690
3732
  {
3691
3733
  index: I.indexOf(Y),
3692
3734
  options: I,
3693
- onSelect: (h) => {
3694
- h !== Y && (Pe(), Q(h));
3735
+ onSelect: (p) => {
3736
+ p !== Y && (Pe(), Q(p));
3695
3737
  },
3696
3738
  open: Fe,
3697
- onToggle: (h) => {
3698
- Oe(h), me && te(!1), de && ve(!1);
3739
+ onToggle: (p) => {
3740
+ Oe(p), me && te(!1), ue && ve(!1);
3699
3741
  }
3700
3742
  }
3701
3743
  ),
3702
3744
  /* @__PURE__ */ l.jsx(
3703
- Ct,
3745
+ Et,
3704
3746
  {
3705
- index: D.indexOf(yt),
3747
+ index: D.indexOf(bt),
3706
3748
  options: D,
3707
- onSelect: (h) => {
3708
- if (h !== yt)
3709
- switch (yt = h, yt) {
3749
+ onSelect: (p) => {
3750
+ if (p !== bt)
3751
+ switch (bt = p, bt) {
3710
3752
  case "Depth":
3711
- r.overrideMaterial = d;
3753
+ i.overrideMaterial = u;
3712
3754
  break;
3713
3755
  case "Normals":
3714
- r.overrideMaterial = v;
3756
+ i.overrideMaterial = v;
3715
3757
  break;
3716
3758
  default:
3717
3759
  case "Renderer":
3718
- r.overrideMaterial = null;
3760
+ i.overrideMaterial = null;
3719
3761
  break;
3720
3762
  case "Wireframe":
3721
- r.overrideMaterial = E;
3763
+ i.overrideMaterial = E;
3722
3764
  break;
3723
3765
  case "UVs":
3724
- r.overrideMaterial = b;
3766
+ i.overrideMaterial = b;
3725
3767
  break;
3726
3768
  }
3727
3769
  },
3728
3770
  open: me,
3729
- onToggle: (h) => {
3730
- Fe && Oe(!1), te(h), de && ve(!1);
3771
+ onToggle: (p) => {
3772
+ Fe && Oe(!1), te(p), ue && ve(!1);
3731
3773
  }
3732
3774
  }
3733
3775
  ),
3734
3776
  /* @__PURE__ */ l.jsx(
3735
- Ct,
3777
+ Et,
3736
3778
  {
3737
3779
  index: 0,
3738
3780
  options: [
3739
3781
  "Orbit Mode",
3740
3782
  "Selection Mode"
3741
3783
  ],
3742
- onSelect: (h) => {
3743
- Et = h === "Selection Mode", u.visible = Et;
3784
+ onSelect: (p) => {
3785
+ yt = p === "Selection Mode", d.visible = yt;
3744
3786
  },
3745
- open: de,
3746
- onToggle: (h) => {
3747
- Fe && Oe(!1), me && te(!1), ve(h);
3787
+ open: ue,
3788
+ onToggle: (p) => {
3789
+ Fe && Oe(!1), me && te(!1), ve(p);
3748
3790
  }
3749
3791
  }
3750
3792
  )
@@ -3752,56 +3794,50 @@ function Ti(e) {
3752
3794
  ] })
3753
3795
  ] });
3754
3796
  }
3755
- function _i(e) {
3756
- return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: e.ref, style: e.style, children: [
3757
- /* @__PURE__ */ l.jsx("header", { children: e.header }),
3758
- e.children,
3759
- /* @__PURE__ */ l.jsx("footer", { children: e.footer })
3797
+ function yi(t) {
3798
+ return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3799
+ /* @__PURE__ */ l.jsx("div", { className: "header", children: t.header }),
3800
+ t.children,
3801
+ /* @__PURE__ */ l.jsx("div", { className: "footer", children: t.footer })
3760
3802
  ] });
3761
3803
  }
3762
3804
  export {
3763
- Nt as Accordion,
3764
- pi as Application,
3765
- xt as BaseRemote,
3766
- Tn as ChildObject,
3767
- ka as ContainerObject,
3768
- Ra as Draggable,
3769
- _a as DraggableItem,
3770
- Aa as Dropdown,
3771
- Pa as DropdownItem,
3772
- _i as Editor,
3773
- Za as Inspector,
3774
- Ti as MultiView,
3775
- Mn as NavButton,
3776
- mi as RemoteComponents,
3777
- ct as RemoteController,
3778
- ya as RemoteTheatre,
3779
- xi as RemoteThree,
3780
- wi as RemoteTweakpane,
3781
- Mi as SceneInspector,
3782
- Oi as SidePanel,
3805
+ Lt as Accordion,
3806
+ di as Application,
3807
+ Ct as BaseRemote,
3808
+ Mn as ChildObject,
3809
+ _a as ContainerObject,
3810
+ Ma as Draggable,
3811
+ Oa as DraggableItem,
3812
+ Ta as Dropdown,
3813
+ Ra as DropdownItem,
3814
+ yi as Editor,
3815
+ qa as Inspector,
3816
+ bi as MultiView,
3817
+ On as NavButton,
3818
+ ui as RemoteComponents,
3819
+ mi as RemoteController,
3820
+ Nt as RemoteTheatre,
3821
+ fi as RemoteThree,
3822
+ pi as RemoteTweakpane,
3823
+ gi as SceneInspector,
3824
+ vi as SidePanel,
3783
3825
  k as ToolEvents,
3784
- ut as capitalize,
3785
- di as clamp,
3786
- va as colorToHex,
3787
- vi as componentsApp,
3826
+ lt as capitalize,
3827
+ oi as clamp,
3828
+ pa as colorToHex,
3788
3829
  P as debugDispatcher,
3789
- ui as defaultTheatreCallback,
3790
- wn as dispose,
3791
- ba as disposeMaterial,
3792
- hi as disposeTexture,
3793
- fi as distance,
3794
- xn as hierarchyUUID,
3795
- ma as isColor,
3830
+ si as defaultTheatreCallback,
3831
+ xn as dispose,
3832
+ va as disposeMaterial,
3833
+ li as disposeTexture,
3834
+ ci as distance,
3835
+ Cn as hierarchyUUID,
3836
+ fa as isColor,
3796
3837
  Sn as noop,
3797
- pa as randomID,
3798
- ga as resetThreeObjects,
3799
- At as round,
3800
- gi as theatreApp,
3801
- bi as theatreEditor,
3802
- Si as theatreEditorApp,
3803
- yi as threeApp,
3804
- Ei as threeEditor,
3805
- Dt as totalThreeObjects,
3806
- Ci as tweakpaneApp
3838
+ ha as randomID,
3839
+ ma as resetThreeObjects,
3840
+ _t as round,
3841
+ hi as theatreEditorApp,
3842
+ jt as totalThreeObjects
3807
3843
  };