hanc-webrtc-widgets 2.6.13 → 2.6.14

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.
@@ -17139,7 +17139,7 @@ const ni = Ks.getInstance();
17139
17139
  typeof window < "u" && window.addEventListener("pagehide", () => {
17140
17140
  ni.forceClose();
17141
17141
  });
17142
- const pn = class pn extends EventTarget {
17142
+ const an = class an extends EventTarget {
17143
17143
  constructor() {
17144
17144
  super(...arguments), this.room = null, this.callStatus = "idle", this.isReady = !1, this.error = null, this.microphoneEnabled = !1, this.connectedParticipants = [], this.userIdentity = "", this.roomName = "", this.audioPlaybackPrompt = !1, this.isAppleDevice = /iPhone|iPad|iPod|Macintosh|Mac OS/i.test(navigator.userAgent), this.agentAudioElements = [], this.unmuteTimer = null, this.speakingHandler = null, this.fadeContext = null, this.fadeContextAcquired = !1, this.fadeGains = /* @__PURE__ */ new Map(), this.fadeSetupPromise = null;
17145
17145
  }
@@ -17238,10 +17238,10 @@ const pn = class pn extends EventTarget {
17238
17238
  const h = setTimeout(() => {
17239
17239
  s.off(ne.ParticipantConnected, f), u();
17240
17240
  }, 2e3), f = (g) => {
17241
- pn.isAgentIdentity(g.identity) && (clearTimeout(h), s.off(ne.ParticipantConnected, f), u());
17241
+ an.isAgentIdentity(g.identity) && (clearTimeout(h), s.off(ne.ParticipantConnected, f), u());
17242
17242
  };
17243
17243
  for (const g of s.remoteParticipants.values())
17244
- if (pn.isAgentIdentity(g.identity)) {
17244
+ if (an.isAgentIdentity(g.identity)) {
17245
17245
  clearTimeout(h), u();
17246
17246
  return;
17247
17247
  }
@@ -17275,7 +17275,7 @@ const pn = class pn extends EventTarget {
17275
17275
  ...this.connectedParticipants,
17276
17276
  t.identity
17277
17277
  ];
17278
- const n = pn.isAgentIdentity(t.identity);
17278
+ const n = an.isAgentIdentity(t.identity);
17279
17279
  n && (this.updateStatus("agent-connected"), this.audioPlaybackPrompt = !0, this.dispatchEvent(
17280
17280
  new CustomEvent("agent-connected", {
17281
17281
  detail: { participant: t.identity }
@@ -17292,7 +17292,7 @@ const pn = class pn extends EventTarget {
17292
17292
  this.connectedParticipants = this.connectedParticipants.filter(
17293
17293
  (s) => s !== t.identity
17294
17294
  );
17295
- const n = pn.isAgentIdentity(t.identity);
17295
+ const n = an.isAgentIdentity(t.identity);
17296
17296
  n && (this.audioPlaybackPrompt = !1, this.updateStatus("connected"), this.dispatchEvent(
17297
17297
  new CustomEvent("agent-disconnected", {
17298
17298
  detail: { participant: t.identity }
@@ -17308,7 +17308,7 @@ const pn = class pn extends EventTarget {
17308
17308
  (t, n, s) => {
17309
17309
  if (t.kind === "audio") {
17310
17310
  const r = t.attach();
17311
- document.body.appendChild(r), pn.isAgentIdentity(s.identity) && (this.agentAudioElements.push(r), this.setupAgentAudioFade(r)), this.dispatchEvent(
17311
+ document.body.appendChild(r), an.isAgentIdentity(s.identity) && (this.agentAudioElements.push(r), this.setupAgentAudioFade(r)), this.dispatchEvent(
17312
17312
  new CustomEvent("audio-track-added", {
17313
17313
  detail: {
17314
17314
  participant: s.identity,
@@ -17358,16 +17358,29 @@ const pn = class pn extends EventTarget {
17358
17358
  );
17359
17359
  }), e.on(ne.AudioPlaybackStatusChanged, async () => {
17360
17360
  e.canPlaybackAudio || this.connectedParticipants.some(
17361
- (n) => pn.isAgentIdentity(n)
17361
+ (n) => an.isAgentIdentity(n)
17362
17362
  ) && !this.audioPlaybackPrompt && (this.updateStatus("agent-connected"), this.audioPlaybackPrompt = !0), this.dispatchEvent(
17363
17363
  new CustomEvent("audio-playback-status-changed", {
17364
17364
  detail: { canPlayback: e.canPlaybackAudio }
17365
17365
  })
17366
17366
  );
17367
+ }), e.on(ne.DataReceived, (t, n) => {
17368
+ if (n)
17369
+ try {
17370
+ const s = JSON.parse(new TextDecoder().decode(t));
17371
+ s.type === "transcript" ? this.dispatchEvent(
17372
+ new CustomEvent("transcription", {
17373
+ detail: { speaker: s.speaker, text: s.text, timestamp: s.timestamp },
17374
+ bubbles: !0,
17375
+ composed: !0
17376
+ })
17377
+ ) : an.isAgentIdentity(n.identity) && this.dispatchEvent(new CustomEvent("agent-command", { detail: s }));
17378
+ } catch {
17379
+ }
17367
17380
  }), this.speakingHandler = (t) => {
17368
- t ? (this.unmuteTimer && (clearTimeout(this.unmuteTimer), this.unmuteTimer = null), this.rampAgentGain(0, pn.FADEOUT_TC)) : this.unmuteTimer = setTimeout(() => {
17369
- this.unmuteTimer = null, this.rampAgentGain(1, pn.FADEIN_TC);
17370
- }, pn.UNMUTE_HOLDOVER_MS);
17381
+ t ? (this.unmuteTimer && (clearTimeout(this.unmuteTimer), this.unmuteTimer = null), this.rampAgentGain(0, an.FADEOUT_TC)) : this.unmuteTimer = setTimeout(() => {
17382
+ this.unmuteTimer = null, this.rampAgentGain(1, an.FADEIN_TC);
17383
+ }, an.UNMUTE_HOLDOVER_MS);
17371
17384
  }, e.localParticipant.on("isSpeakingChanged", this.speakingHandler);
17372
17385
  }
17373
17386
  async toggleMicrophone() {
@@ -17459,6 +17472,17 @@ const pn = class pn extends EventTarget {
17459
17472
  );
17460
17473
  }
17461
17474
  }
17475
+ /**
17476
+ * Send a JSON message to the agent via data channel.
17477
+ */
17478
+ async sendDataToAgent(e) {
17479
+ if (!this.room) {
17480
+ console.warn("[LiveKitCallManager] Cannot send data: no room");
17481
+ return;
17482
+ }
17483
+ const n = new TextEncoder().encode(JSON.stringify(e));
17484
+ await this.room.localParticipant.publishData(n, { reliable: !0 });
17485
+ }
17462
17486
  async hangUp() {
17463
17487
  if (!this.room) {
17464
17488
  this.error = "No active connection to end.";
@@ -17477,14 +17501,14 @@ const pn = class pn extends EventTarget {
17477
17501
  });
17478
17502
  }
17479
17503
  };
17480
- pn.UNMUTE_HOLDOVER_MS = 350, pn.FADEOUT_TC = 0.045, pn.FADEIN_TC = 0.03;
17481
- let lr = pn;
17504
+ an.UNMUTE_HOLDOVER_MS = 350, an.FADEOUT_TC = 0.045, an.FADEIN_TC = 0.03;
17505
+ let lr = an;
17482
17506
  /**
17483
17507
  * @license
17484
17508
  * Copyright 2010-2025 Three.js Authors
17485
17509
  * SPDX-License-Identifier: MIT
17486
17510
  */
17487
- const qd = "182", Ey = 0, Eh = 1, My = 2, Ka = 1, wy = 2, Lr = 3, ki = 0, an = 1, Ei = 2, Ai = 0, ir = 1, Ml = 2, Mh = 3, wh = 4, Ay = 5, ms = 100, Ry = 101, Py = 102, ky = 103, Iy = 104, Dy = 200, Ly = 201, Uy = 202, Ny = 203, wl = 204, Al = 205, Oy = 206, Fy = 207, By = 208, zy = 209, Vy = 210, Gy = 211, Hy = 212, Wy = 213, qy = 214, Rl = 0, Pl = 1, kl = 2, dr = 3, Il = 4, Dl = 5, Ll = 6, Ul = 7, mm = 0, jy = 1, $y = 2, ai = 0, gm = 1, vm = 2, bm = 3, ym = 4, _m = 5, Sm = 6, xm = 7, Tm = 300, Ms = 301, ur = 302, Nl = 303, Ol = 304, Ao = 306, Fl = 1e3, Mi = 1001, Bl = 1002, Qt = 1003, Xy = 1004, ma = 1005, nn = 1006, pc = 1007, bs = 1008, In = 1009, Cm = 1010, Em = 1011, Kr = 1012, jd = 1013, ui = 1014, ii = 1015, Ii = 1016, $d = 1017, Xd = 1018, Jr = 1020, Mm = 35902, wm = 35899, Am = 1021, Rm = 1022, qn = 1023, Di = 1026, ys = 1027, Pm = 1028, Yd = 1029, hr = 1030, Kd = 1031, Jd = 1033, Ja = 33776, Za = 33777, Qa = 33778, eo = 33779, zl = 35840, Vl = 35841, Gl = 35842, Hl = 35843, Wl = 36196, ql = 37492, jl = 37496, $l = 37488, Xl = 37489, Yl = 37490, Kl = 37491, Jl = 37808, Zl = 37809, Ql = 37810, ed = 37811, td = 37812, nd = 37813, id = 37814, sd = 37815, rd = 37816, ad = 37817, od = 37818, cd = 37819, ld = 37820, dd = 37821, ud = 36492, hd = 36494, fd = 36495, pd = 36283, md = 36284, gd = 36285, vd = 36286, Yy = 3200, Ky = 0, Jy = 1, Xi = "", Pn = "srgb", fr = "srgb-linear", po = "linear", vt = "srgb", Ds = 7680, Ah = 519, Zy = 512, Qy = 513, e_ = 514, Zd = 515, t_ = 516, n_ = 517, Qd = 518, i_ = 519, Rh = 35044, Ph = "300 es", si = 2e3, mo = 2001;
17511
+ const qd = "182", Ey = 0, Eh = 1, My = 2, Ka = 1, wy = 2, Lr = 3, ki = 0, on = 1, Ei = 2, Ai = 0, ir = 1, Ml = 2, Mh = 3, wh = 4, Ay = 5, ms = 100, Ry = 101, Py = 102, ky = 103, Iy = 104, Dy = 200, Ly = 201, Uy = 202, Ny = 203, wl = 204, Al = 205, Oy = 206, Fy = 207, By = 208, zy = 209, Vy = 210, Gy = 211, Hy = 212, Wy = 213, qy = 214, Rl = 0, Pl = 1, kl = 2, dr = 3, Il = 4, Dl = 5, Ll = 6, Ul = 7, mm = 0, jy = 1, $y = 2, ai = 0, gm = 1, vm = 2, bm = 3, ym = 4, _m = 5, Sm = 6, xm = 7, Tm = 300, Ms = 301, ur = 302, Nl = 303, Ol = 304, Ao = 306, Fl = 1e3, Mi = 1001, Bl = 1002, Qt = 1003, Xy = 1004, ma = 1005, nn = 1006, pc = 1007, bs = 1008, In = 1009, Cm = 1010, Em = 1011, Kr = 1012, jd = 1013, ui = 1014, ii = 1015, Ii = 1016, $d = 1017, Xd = 1018, Jr = 1020, Mm = 35902, wm = 35899, Am = 1021, Rm = 1022, qn = 1023, Di = 1026, ys = 1027, Pm = 1028, Yd = 1029, hr = 1030, Kd = 1031, Jd = 1033, Ja = 33776, Za = 33777, Qa = 33778, eo = 33779, zl = 35840, Vl = 35841, Gl = 35842, Hl = 35843, Wl = 36196, ql = 37492, jl = 37496, $l = 37488, Xl = 37489, Yl = 37490, Kl = 37491, Jl = 37808, Zl = 37809, Ql = 37810, ed = 37811, td = 37812, nd = 37813, id = 37814, sd = 37815, rd = 37816, ad = 37817, od = 37818, cd = 37819, ld = 37820, dd = 37821, ud = 36492, hd = 36494, fd = 36495, pd = 36283, md = 36284, gd = 36285, vd = 36286, Yy = 3200, Ky = 0, Jy = 1, Xi = "", Pn = "srgb", fr = "srgb-linear", po = "linear", vt = "srgb", Ds = 7680, Ah = 519, Zy = 512, Qy = 513, e_ = 514, Zd = 515, t_ = 516, n_ = 517, Qd = 518, i_ = 519, Rh = 35044, Ph = "300 es", si = 2e3, mo = 2001;
17488
17512
  function km(i) {
17489
17513
  for (let e = i.length - 1; e >= 0; --e)
17490
17514
  if (i[e] >= 65535) return !0;
@@ -17621,7 +17645,7 @@ function Er(i, e) {
17621
17645
  throw new Error("Invalid component type.");
17622
17646
  }
17623
17647
  }
17624
- function un(i, e) {
17648
+ function hn(i, e) {
17625
17649
  switch (e.constructor) {
17626
17650
  case Float32Array:
17627
17651
  return i;
@@ -19992,7 +20016,7 @@ function yc(i) {
19992
20016
  }
19993
20017
  let d_ = 0;
19994
20018
  const _c = /* @__PURE__ */ new B();
19995
- class on extends mr {
20019
+ class cn extends mr {
19996
20020
  /**
19997
20021
  * Constructs a new texture.
19998
20022
  *
@@ -20007,7 +20031,7 @@ class on extends mr {
20007
20031
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
20008
20032
  * @param {string} [colorSpace=NoColorSpace] - The color space.
20009
20033
  */
20010
- constructor(e = on.DEFAULT_IMAGE, t = on.DEFAULT_MAPPING, n = Mi, s = Mi, r = nn, a = bs, o = qn, c = In, l = on.DEFAULT_ANISOTROPY, d = Xi) {
20034
+ constructor(e = cn.DEFAULT_IMAGE, t = cn.DEFAULT_MAPPING, n = Mi, s = Mi, r = nn, a = bs, o = qn, c = In, l = cn.DEFAULT_ANISOTROPY, d = Xi) {
20011
20035
  super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: d_++ }), this.uuid = sa(), this.name = "", this.source = new eu(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = n, this.wrapT = s, this.magFilter = r, this.minFilter = a, this.anisotropy = l, this.format = o, this.internalFormat = null, this.type = c, this.offset = new ht(0, 0), this.repeat = new ht(1, 1), this.center = new ht(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Ve(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = d, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
20012
20036
  }
20013
20037
  /**
@@ -20205,9 +20229,9 @@ class on extends mr {
20205
20229
  e === !0 && this.pmremVersion++;
20206
20230
  }
20207
20231
  }
20208
- on.DEFAULT_IMAGE = null;
20209
- on.DEFAULT_MAPPING = Tm;
20210
- on.DEFAULT_ANISOTROPY = 1;
20232
+ cn.DEFAULT_IMAGE = null;
20233
+ cn.DEFAULT_MAPPING = Tm;
20234
+ cn.DEFAULT_ANISOTROPY = 1;
20211
20235
  class Ft {
20212
20236
  /**
20213
20237
  * Constructs a new 4D vector.
@@ -20800,7 +20824,7 @@ class u_ extends mr {
20800
20824
  depth: 1,
20801
20825
  multiview: !1
20802
20826
  }, n), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = n.depth, this.scissor = new Ft(0, 0, e, t), this.scissorTest = !1, this.viewport = new Ft(0, 0, e, t);
20803
- const s = { width: e, height: t, depth: n.depth }, r = new on(s);
20827
+ const s = { width: e, height: t, depth: n.depth }, r = new cn(s);
20804
20828
  this.textures = [];
20805
20829
  const a = n.count;
20806
20830
  for (let o = 0; o < a; o++)
@@ -20906,7 +20930,7 @@ class oi extends u_ {
20906
20930
  super(e, t, n), this.isWebGLRenderTarget = !0;
20907
20931
  }
20908
20932
  }
20909
- class Im extends on {
20933
+ class Im extends cn {
20910
20934
  /**
20911
20935
  * Constructs a new data array texture.
20912
20936
  *
@@ -20937,7 +20961,7 @@ class Im extends on {
20937
20961
  this.layerUpdates.clear();
20938
20962
  }
20939
20963
  }
20940
- class h_ extends on {
20964
+ class h_ extends cn {
20941
20965
  /**
20942
20966
  * Constructs a new data array texture.
20943
20967
  *
@@ -24757,7 +24781,7 @@ class ci {
24757
24781
  * @return {BufferAttribute} A reference to this instance.
24758
24782
  */
24759
24783
  setComponent(e, t, n) {
24760
- return this.normalized && (n = un(n, this.array)), this.array[e * this.itemSize + t] = n, this;
24784
+ return this.normalized && (n = hn(n, this.array)), this.array[e * this.itemSize + t] = n, this;
24761
24785
  }
24762
24786
  /**
24763
24787
  * Returns the x component of the vector at the given index.
@@ -24777,7 +24801,7 @@ class ci {
24777
24801
  * @return {BufferAttribute} A reference to this instance.
24778
24802
  */
24779
24803
  setX(e, t) {
24780
- return this.normalized && (t = un(t, this.array)), this.array[e * this.itemSize] = t, this;
24804
+ return this.normalized && (t = hn(t, this.array)), this.array[e * this.itemSize] = t, this;
24781
24805
  }
24782
24806
  /**
24783
24807
  * Returns the y component of the vector at the given index.
@@ -24797,7 +24821,7 @@ class ci {
24797
24821
  * @return {BufferAttribute} A reference to this instance.
24798
24822
  */
24799
24823
  setY(e, t) {
24800
- return this.normalized && (t = un(t, this.array)), this.array[e * this.itemSize + 1] = t, this;
24824
+ return this.normalized && (t = hn(t, this.array)), this.array[e * this.itemSize + 1] = t, this;
24801
24825
  }
24802
24826
  /**
24803
24827
  * Returns the z component of the vector at the given index.
@@ -24817,7 +24841,7 @@ class ci {
24817
24841
  * @return {BufferAttribute} A reference to this instance.
24818
24842
  */
24819
24843
  setZ(e, t) {
24820
- return this.normalized && (t = un(t, this.array)), this.array[e * this.itemSize + 2] = t, this;
24844
+ return this.normalized && (t = hn(t, this.array)), this.array[e * this.itemSize + 2] = t, this;
24821
24845
  }
24822
24846
  /**
24823
24847
  * Returns the w component of the vector at the given index.
@@ -24837,7 +24861,7 @@ class ci {
24837
24861
  * @return {BufferAttribute} A reference to this instance.
24838
24862
  */
24839
24863
  setW(e, t) {
24840
- return this.normalized && (t = un(t, this.array)), this.array[e * this.itemSize + 3] = t, this;
24864
+ return this.normalized && (t = hn(t, this.array)), this.array[e * this.itemSize + 3] = t, this;
24841
24865
  }
24842
24866
  /**
24843
24867
  * Sets the x and y component of the vector at the given index.
@@ -24848,7 +24872,7 @@ class ci {
24848
24872
  * @return {BufferAttribute} A reference to this instance.
24849
24873
  */
24850
24874
  setXY(e, t, n) {
24851
- return e *= this.itemSize, this.normalized && (t = un(t, this.array), n = un(n, this.array)), this.array[e + 0] = t, this.array[e + 1] = n, this;
24875
+ return e *= this.itemSize, this.normalized && (t = hn(t, this.array), n = hn(n, this.array)), this.array[e + 0] = t, this.array[e + 1] = n, this;
24852
24876
  }
24853
24877
  /**
24854
24878
  * Sets the x, y and z component of the vector at the given index.
@@ -24860,7 +24884,7 @@ class ci {
24860
24884
  * @return {BufferAttribute} A reference to this instance.
24861
24885
  */
24862
24886
  setXYZ(e, t, n, s) {
24863
- return e *= this.itemSize, this.normalized && (t = un(t, this.array), n = un(n, this.array), s = un(s, this.array)), this.array[e + 0] = t, this.array[e + 1] = n, this.array[e + 2] = s, this;
24887
+ return e *= this.itemSize, this.normalized && (t = hn(t, this.array), n = hn(n, this.array), s = hn(s, this.array)), this.array[e + 0] = t, this.array[e + 1] = n, this.array[e + 2] = s, this;
24864
24888
  }
24865
24889
  /**
24866
24890
  * Sets the x, y, z and w component of the vector at the given index.
@@ -24873,7 +24897,7 @@ class ci {
24873
24897
  * @return {BufferAttribute} A reference to this instance.
24874
24898
  */
24875
24899
  setXYZW(e, t, n, s, r) {
24876
- return e *= this.itemSize, this.normalized && (t = un(t, this.array), n = un(n, this.array), s = un(s, this.array), r = un(r, this.array)), this.array[e + 0] = t, this.array[e + 1] = n, this.array[e + 2] = s, this.array[e + 3] = r, this;
24900
+ return e *= this.itemSize, this.normalized && (t = hn(t, this.array), n = hn(n, this.array), s = hn(s, this.array), r = hn(r, this.array)), this.array[e + 0] = t, this.array[e + 1] = n, this.array[e + 2] = s, this.array[e + 3] = r, this;
24877
24901
  }
24878
24902
  /**
24879
24903
  * Sets the given callback function that is executed after the Renderer has transferred
@@ -24933,7 +24957,7 @@ class Om extends ci {
24933
24957
  super(new Uint32Array(e), t, n);
24934
24958
  }
24935
24959
  }
24936
- class cn extends ci {
24960
+ class ln extends ci {
24937
24961
  /**
24938
24962
  * Constructs a new buffer attribute.
24939
24963
  *
@@ -25181,7 +25205,7 @@ class Xn extends mr {
25181
25205
  const a = e[s];
25182
25206
  n.push(a.x, a.y, a.z || 0);
25183
25207
  }
25184
- this.setAttribute("position", new cn(n, 3));
25208
+ this.setAttribute("position", new ln(n, 3));
25185
25209
  } else {
25186
25210
  const n = Math.min(e.length, t.count);
25187
25211
  for (let s = 0; s < n; s++) {
@@ -25579,7 +25603,7 @@ class $n extends wn {
25579
25603
  }
25580
25604
  function C_(i, e, t, n, s, r, a, o) {
25581
25605
  let c;
25582
- if (e.side === an ? c = n.intersectTriangle(a, r, s, !0, o) : c = n.intersectTriangle(s, r, a, e.side === ki, o), c === null) return null;
25606
+ if (e.side === on ? c = n.intersectTriangle(a, r, s, !0, o) : c = n.intersectTriangle(s, r, a, e.side === ki, o), c === null) return null;
25583
25607
  Pa.copy(o), Pa.applyMatrix4(i.matrixWorld);
25584
25608
  const l = t.ray.origin.distanceTo(Pa);
25585
25609
  return l < t.near || l > t.far ? null : {
@@ -25629,7 +25653,7 @@ class oa extends Xn {
25629
25653
  s = Math.floor(s), r = Math.floor(r), a = Math.floor(a);
25630
25654
  const c = [], l = [], d = [], u = [];
25631
25655
  let h = 0, f = 0;
25632
- g("z", "y", "x", -1, -1, n, t, e, a, r, 0), g("z", "y", "x", 1, -1, n, t, -e, a, r, 1), g("x", "z", "y", 1, 1, e, n, t, s, a, 2), g("x", "z", "y", 1, -1, e, n, -t, s, a, 3), g("x", "y", "z", 1, -1, e, t, n, s, r, 4), g("x", "y", "z", -1, -1, e, t, -n, s, r, 5), this.setIndex(c), this.setAttribute("position", new cn(l, 3)), this.setAttribute("normal", new cn(d, 3)), this.setAttribute("uv", new cn(u, 2));
25656
+ g("z", "y", "x", -1, -1, n, t, e, a, r, 0), g("z", "y", "x", 1, -1, n, t, -e, a, r, 1), g("x", "z", "y", 1, 1, e, n, t, s, a, 2), g("x", "z", "y", 1, -1, e, n, -t, s, a, 3), g("x", "y", "z", 1, -1, e, t, n, s, r, 4), g("x", "y", "z", -1, -1, e, t, -n, s, r, 5), this.setIndex(c), this.setAttribute("position", new ln(l, 3)), this.setAttribute("normal", new ln(d, 3)), this.setAttribute("uv", new ln(u, 2));
25633
25657
  function g(v, m, p, x, C, b, S, M, A, k, _) {
25634
25658
  const T = b / A, R = S / k, N = b / 2, F = S / 2, q = M / 2, K = A + 1, H = k + 1;
25635
25659
  let W = 0, te = 0;
@@ -26025,7 +26049,7 @@ class R_ extends wn {
26025
26049
  n.texture.generateMipmaps = !1, e.setRenderTarget(n, 0, s), e.render(t, r), e.setRenderTarget(n, 1, s), e.render(t, a), e.setRenderTarget(n, 2, s), e.render(t, o), e.setRenderTarget(n, 3, s), e.render(t, c), e.setRenderTarget(n, 4, s), e.render(t, l), n.texture.generateMipmaps = v, e.setRenderTarget(n, 5, s), e.render(t, d), e.setRenderTarget(u, h, f), e.xr.enabled = g, n.texture.needsPMREMUpdate = !0;
26026
26050
  }
26027
26051
  }
26028
- class zm extends on {
26052
+ class zm extends cn {
26029
26053
  /**
26030
26054
  * Constructs a new cube texture.
26031
26055
  *
@@ -26128,7 +26152,7 @@ class Vm extends oi {
26128
26152
  uniforms: pr(n.uniforms),
26129
26153
  vertexShader: n.vertexShader,
26130
26154
  fragmentShader: n.fragmentShader,
26131
- side: an,
26155
+ side: on,
26132
26156
  blending: Ai
26133
26157
  });
26134
26158
  r.uniforms.tEquirect.value = t;
@@ -26288,7 +26312,7 @@ class k_ extends wn {
26288
26312
  return this.fog !== null && (t.object.fog = this.fog.toJSON()), this.backgroundBlurriness > 0 && (t.object.backgroundBlurriness = this.backgroundBlurriness), this.backgroundIntensity !== 1 && (t.object.backgroundIntensity = this.backgroundIntensity), t.object.backgroundRotation = this.backgroundRotation.toArray(), this.environmentIntensity !== 1 && (t.object.environmentIntensity = this.environmentIntensity), t.object.environmentRotation = this.environmentRotation.toArray(), t;
26289
26313
  }
26290
26314
  }
26291
- class I_ extends on {
26315
+ class I_ extends cn {
26292
26316
  /**
26293
26317
  * Constructs a new data texture.
26294
26318
  *
@@ -26660,7 +26684,7 @@ class Gm {
26660
26684
  return new this.constructor().copy(this);
26661
26685
  }
26662
26686
  }
26663
- class Qr extends on {
26687
+ class Qr extends cn {
26664
26688
  /**
26665
26689
  * Constructs a new depth texture.
26666
26690
  *
@@ -26720,7 +26744,7 @@ class N_ extends Qr {
26720
26744
  this.image = e;
26721
26745
  }
26722
26746
  }
26723
- class Hm extends on {
26747
+ class Hm extends cn {
26724
26748
  /**
26725
26749
  * Creates a new raw texture.
26726
26750
  *
@@ -26750,7 +26774,7 @@ class nu extends Xn {
26750
26774
  detail: s
26751
26775
  };
26752
26776
  const r = [], a = [];
26753
- o(s), l(n), d(), this.setAttribute("position", new cn(r, 3)), this.setAttribute("normal", new cn(r.slice(), 3)), this.setAttribute("uv", new cn(a, 2)), s === 0 ? this.computeVertexNormals() : this.normalizeNormals();
26777
+ o(s), l(n), d(), this.setAttribute("position", new ln(r, 3)), this.setAttribute("normal", new ln(r.slice(), 3)), this.setAttribute("uv", new ln(a, 2)), s === 0 ? this.computeVertexNormals() : this.normalizeNormals();
26754
26778
  function o(x) {
26755
26779
  const C = new B(), b = new B(), S = new B();
26756
26780
  for (let M = 0; M < t.length; M += 3)
@@ -26981,7 +27005,7 @@ class Po extends Xn {
26981
27005
  const C = x + l * p, b = x + l * (p + 1), S = x + 1 + l * (p + 1), M = x + 1 + l * p;
26982
27006
  f.push(C, b, M), f.push(b, S, M);
26983
27007
  }
26984
- this.setIndex(f), this.setAttribute("position", new cn(g, 3)), this.setAttribute("normal", new cn(v, 3)), this.setAttribute("uv", new cn(m, 2));
27008
+ this.setIndex(f), this.setAttribute("position", new ln(g, 3)), this.setAttribute("normal", new ln(v, 3)), this.setAttribute("uv", new ln(m, 2));
26985
27009
  }
26986
27010
  copy(e) {
26987
27011
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
@@ -27037,7 +27061,7 @@ class su extends Xn {
27037
27061
  const C = d[p][x + 1], b = d[p][x], S = d[p + 1][x], M = d[p + 1][x + 1];
27038
27062
  (p !== 0 || a > 0) && f.push(C, b, M), (p !== n - 1 || c < Math.PI) && f.push(b, S, M);
27039
27063
  }
27040
- this.setIndex(f), this.setAttribute("position", new cn(g, 3)), this.setAttribute("normal", new cn(v, 3)), this.setAttribute("uv", new cn(m, 2));
27064
+ this.setIndex(f), this.setAttribute("position", new ln(g, 3)), this.setAttribute("normal", new ln(v, 3)), this.setAttribute("uv", new ln(m, 2));
27041
27065
  }
27042
27066
  copy(e) {
27043
27067
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
@@ -31632,7 +31656,7 @@ function CT(i, e, t, n, s, r, a) {
31632
31656
  uniforms: pr(Qn.backgroundCube.uniforms),
31633
31657
  vertexShader: Qn.backgroundCube.vertexShader,
31634
31658
  fragmentShader: Qn.backgroundCube.fragmentShader,
31635
- side: an,
31659
+ side: on,
31636
31660
  depthTest: !1,
31637
31661
  depthWrite: !1,
31638
31662
  fog: !1,
@@ -32197,7 +32221,7 @@ class Zh {
32197
32221
  new oa(),
32198
32222
  new Um({
32199
32223
  name: "PMREM.Background",
32200
- side: an,
32224
+ side: on,
32201
32225
  depthWrite: !1,
32202
32226
  depthTest: !1
32203
32227
  })
@@ -32997,7 +33021,7 @@ function HT(i, e, t, n, s) {
32997
33021
  depthBuffer: !1,
32998
33022
  stencilBuffer: !1
32999
33023
  }), o = new Xn();
33000
- o.setAttribute("position", new cn([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), o.setAttribute("uv", new cn([0, 2, 0, 0, 2, 0], 2));
33024
+ o.setAttribute("position", new ln([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), o.setAttribute("uv", new ln([0, 2, 0, 0, 2, 0], 2));
33001
33025
  const c = new O_({
33002
33026
  uniforms: {
33003
33027
  tDiffuse: { value: null }
@@ -33104,7 +33128,7 @@ function HT(i, e, t, n, s) {
33104
33128
  r.dispose(), a.dispose(), o.dispose(), c.dispose();
33105
33129
  };
33106
33130
  }
33107
- const jm = /* @__PURE__ */ new on(), yd = /* @__PURE__ */ new Qr(1, 1), $m = /* @__PURE__ */ new Im(), Xm = /* @__PURE__ */ new h_(), Ym = /* @__PURE__ */ new zm(), nf = [], sf = [], rf = new Float32Array(16), af = new Float32Array(9), of = new Float32Array(4);
33131
+ const jm = /* @__PURE__ */ new cn(), yd = /* @__PURE__ */ new Qr(1, 1), $m = /* @__PURE__ */ new Im(), Xm = /* @__PURE__ */ new h_(), Ym = /* @__PURE__ */ new zm(), nf = [], sf = [], rf = new Float32Array(16), af = new Float32Array(9), of = new Float32Array(4);
33108
33132
  function gr(i, e, t) {
33109
33133
  const n = i[0];
33110
33134
  if (n <= 0 || n > 0) return i;
@@ -34315,7 +34339,7 @@ function lE(i, e, t, n, s, r, a) {
34315
34339
  decodeVideoTextureEmissive: zt && _.emissiveMap.isVideoTexture === !0 && ot.getTransfer(_.emissiveMap.colorSpace) === vt,
34316
34340
  premultipliedAlpha: _.premultipliedAlpha,
34317
34341
  doubleSided: _.side === Ei,
34318
- flipSided: _.side === an,
34342
+ flipSided: _.side === on,
34319
34343
  useDepthPacking: _.depthPacking >= 0,
34320
34344
  depthPacking: _.depthPacking || 0,
34321
34345
  index0AttributeName: _.index0AttributeName,
@@ -34781,7 +34805,7 @@ void main() {
34781
34805
  ], yf = /* @__PURE__ */ new Wt(), kr = /* @__PURE__ */ new B(), Wc = /* @__PURE__ */ new B();
34782
34806
  function TE(i, e, t) {
34783
34807
  let n = new Gm();
34784
- const s = new ht(), r = new ht(), a = new Ft(), o = new F_(), c = new B_(), l = {}, d = t.maxTextureSize, u = { [ki]: an, [an]: ki, [Ei]: Ei }, h = new Dn({
34808
+ const s = new ht(), r = new ht(), a = new Ft(), o = new F_(), c = new B_(), l = {}, d = t.maxTextureSize, u = { [ki]: on, [on]: ki, [Ei]: Ei }, h = new Dn({
34785
34809
  defines: {
34786
34810
  VSM_SAMPLES: 8
34787
34811
  },
@@ -35162,7 +35186,7 @@ function EE(i, e) {
35162
35186
  }
35163
35187
  function xt(D, _e) {
35164
35188
  D.side === Ei ? Te(i.CULL_FACE) : ie(i.CULL_FACE);
35165
- let oe = D.side === an;
35189
+ let oe = D.side === on;
35166
35190
  _e && (oe = !oe), He(oe), D.blending === ir && D.transparent === !1 ? pt(Ai) : pt(D.blending, D.blendEquation, D.blendSrc, D.blendDst, D.blendEquationAlpha, D.blendSrcAlpha, D.blendDstAlpha, D.blendColor, D.blendAlpha, D.premultipliedAlpha), a.setFunc(D.depthFunc), a.setTest(D.depthTest), a.setMask(D.depthWrite), r.setMask(D.colorWrite);
35167
35191
  const Se = D.stencilWrite;
35168
35192
  o.setTest(Se), Se && (o.setMask(D.stencilWriteMask), o.setFunc(D.stencilFunc, D.stencilRef, D.stencilFuncMask), o.setOp(D.stencilFail, D.stencilZFail, D.stencilZPass)), zt(D.polygonOffset, D.polygonOffsetFactor, D.polygonOffsetUnits), D.alphaToCoverage === !0 ? ie(i.SAMPLE_ALPHA_TO_COVERAGE) : Te(i.SAMPLE_ALPHA_TO_COVERAGE);
@@ -36353,7 +36377,7 @@ function DE(i, e) {
36353
36377
  p.isMeshBasicMaterial || p.isMeshLambertMaterial ? r(m, p) : p.isMeshToonMaterial ? (r(m, p), u(m, p)) : p.isMeshPhongMaterial ? (r(m, p), d(m, p)) : p.isMeshStandardMaterial ? (r(m, p), h(m, p), p.isMeshPhysicalMaterial && f(m, p, b)) : p.isMeshMatcapMaterial ? (r(m, p), g(m, p)) : p.isMeshDepthMaterial ? r(m, p) : p.isMeshDistanceMaterial ? (r(m, p), v(m, p)) : p.isMeshNormalMaterial ? r(m, p) : p.isLineBasicMaterial ? (a(m, p), p.isLineDashedMaterial && o(m, p)) : p.isPointsMaterial ? c(m, p, x, C) : p.isSpriteMaterial ? l(m, p) : p.isShadowMaterial ? (m.color.value.copy(p.color), m.opacity.value = p.opacity) : p.isShaderMaterial && (p.uniformsNeedUpdate = !1);
36354
36378
  }
36355
36379
  function r(m, p) {
36356
- m.opacity.value = p.opacity, p.color && m.diffuse.value.copy(p.color), p.emissive && m.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity), p.map && (m.map.value = p.map, t(p.map, m.mapTransform)), p.alphaMap && (m.alphaMap.value = p.alphaMap, t(p.alphaMap, m.alphaMapTransform)), p.bumpMap && (m.bumpMap.value = p.bumpMap, t(p.bumpMap, m.bumpMapTransform), m.bumpScale.value = p.bumpScale, p.side === an && (m.bumpScale.value *= -1)), p.normalMap && (m.normalMap.value = p.normalMap, t(p.normalMap, m.normalMapTransform), m.normalScale.value.copy(p.normalScale), p.side === an && m.normalScale.value.negate()), p.displacementMap && (m.displacementMap.value = p.displacementMap, t(p.displacementMap, m.displacementMapTransform), m.displacementScale.value = p.displacementScale, m.displacementBias.value = p.displacementBias), p.emissiveMap && (m.emissiveMap.value = p.emissiveMap, t(p.emissiveMap, m.emissiveMapTransform)), p.specularMap && (m.specularMap.value = p.specularMap, t(p.specularMap, m.specularMapTransform)), p.alphaTest > 0 && (m.alphaTest.value = p.alphaTest);
36380
+ m.opacity.value = p.opacity, p.color && m.diffuse.value.copy(p.color), p.emissive && m.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity), p.map && (m.map.value = p.map, t(p.map, m.mapTransform)), p.alphaMap && (m.alphaMap.value = p.alphaMap, t(p.alphaMap, m.alphaMapTransform)), p.bumpMap && (m.bumpMap.value = p.bumpMap, t(p.bumpMap, m.bumpMapTransform), m.bumpScale.value = p.bumpScale, p.side === on && (m.bumpScale.value *= -1)), p.normalMap && (m.normalMap.value = p.normalMap, t(p.normalMap, m.normalMapTransform), m.normalScale.value.copy(p.normalScale), p.side === on && m.normalScale.value.negate()), p.displacementMap && (m.displacementMap.value = p.displacementMap, t(p.displacementMap, m.displacementMapTransform), m.displacementScale.value = p.displacementScale, m.displacementBias.value = p.displacementBias), p.emissiveMap && (m.emissiveMap.value = p.emissiveMap, t(p.emissiveMap, m.emissiveMapTransform)), p.specularMap && (m.specularMap.value = p.specularMap, t(p.specularMap, m.specularMapTransform)), p.alphaTest > 0 && (m.alphaTest.value = p.alphaTest);
36357
36381
  const x = e.get(p), C = x.envMap, b = x.envMapRotation;
36358
36382
  C && (m.envMap.value = C, us.copy(b), us.x *= -1, us.y *= -1, us.z *= -1, C.isCubeTexture && C.isRenderTargetTexture === !1 && (us.y *= -1, us.z *= -1), m.envMapRotation.value.setFromMatrix4(IE.makeRotationFromEuler(us)), m.flipEnvMap.value = C.isCubeTexture && C.isRenderTargetTexture === !1 ? -1 : 1, m.reflectivity.value = p.reflectivity, m.ior.value = p.ior, m.refractionRatio.value = p.refractionRatio), p.lightMap && (m.lightMap.value = p.lightMap, m.lightMapIntensity.value = p.lightMapIntensity, t(p.lightMap, m.lightMapTransform)), p.aoMap && (m.aoMap.value = p.aoMap, m.aoMapIntensity.value = p.aoMapIntensity, t(p.aoMap, m.aoMapTransform));
36359
36383
  }
@@ -36379,7 +36403,7 @@ function DE(i, e) {
36379
36403
  m.metalness.value = p.metalness, p.metalnessMap && (m.metalnessMap.value = p.metalnessMap, t(p.metalnessMap, m.metalnessMapTransform)), m.roughness.value = p.roughness, p.roughnessMap && (m.roughnessMap.value = p.roughnessMap, t(p.roughnessMap, m.roughnessMapTransform)), p.envMap && (m.envMapIntensity.value = p.envMapIntensity);
36380
36404
  }
36381
36405
  function f(m, p, x) {
36382
- m.ior.value = p.ior, p.sheen > 0 && (m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen), m.sheenRoughness.value = p.sheenRoughness, p.sheenColorMap && (m.sheenColorMap.value = p.sheenColorMap, t(p.sheenColorMap, m.sheenColorMapTransform)), p.sheenRoughnessMap && (m.sheenRoughnessMap.value = p.sheenRoughnessMap, t(p.sheenRoughnessMap, m.sheenRoughnessMapTransform))), p.clearcoat > 0 && (m.clearcoat.value = p.clearcoat, m.clearcoatRoughness.value = p.clearcoatRoughness, p.clearcoatMap && (m.clearcoatMap.value = p.clearcoatMap, t(p.clearcoatMap, m.clearcoatMapTransform)), p.clearcoatRoughnessMap && (m.clearcoatRoughnessMap.value = p.clearcoatRoughnessMap, t(p.clearcoatRoughnessMap, m.clearcoatRoughnessMapTransform)), p.clearcoatNormalMap && (m.clearcoatNormalMap.value = p.clearcoatNormalMap, t(p.clearcoatNormalMap, m.clearcoatNormalMapTransform), m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale), p.side === an && m.clearcoatNormalScale.value.negate())), p.dispersion > 0 && (m.dispersion.value = p.dispersion), p.iridescence > 0 && (m.iridescence.value = p.iridescence, m.iridescenceIOR.value = p.iridescenceIOR, m.iridescenceThicknessMinimum.value = p.iridescenceThicknessRange[0], m.iridescenceThicknessMaximum.value = p.iridescenceThicknessRange[1], p.iridescenceMap && (m.iridescenceMap.value = p.iridescenceMap, t(p.iridescenceMap, m.iridescenceMapTransform)), p.iridescenceThicknessMap && (m.iridescenceThicknessMap.value = p.iridescenceThicknessMap, t(p.iridescenceThicknessMap, m.iridescenceThicknessMapTransform))), p.transmission > 0 && (m.transmission.value = p.transmission, m.transmissionSamplerMap.value = x.texture, m.transmissionSamplerSize.value.set(x.width, x.height), p.transmissionMap && (m.transmissionMap.value = p.transmissionMap, t(p.transmissionMap, m.transmissionMapTransform)), m.thickness.value = p.thickness, p.thicknessMap && (m.thicknessMap.value = p.thicknessMap, t(p.thicknessMap, m.thicknessMapTransform)), m.attenuationDistance.value = p.attenuationDistance, m.attenuationColor.value.copy(p.attenuationColor)), p.anisotropy > 0 && (m.anisotropyVector.value.set(p.anisotropy * Math.cos(p.anisotropyRotation), p.anisotropy * Math.sin(p.anisotropyRotation)), p.anisotropyMap && (m.anisotropyMap.value = p.anisotropyMap, t(p.anisotropyMap, m.anisotropyMapTransform))), m.specularIntensity.value = p.specularIntensity, m.specularColor.value.copy(p.specularColor), p.specularColorMap && (m.specularColorMap.value = p.specularColorMap, t(p.specularColorMap, m.specularColorMapTransform)), p.specularIntensityMap && (m.specularIntensityMap.value = p.specularIntensityMap, t(p.specularIntensityMap, m.specularIntensityMapTransform));
36406
+ m.ior.value = p.ior, p.sheen > 0 && (m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen), m.sheenRoughness.value = p.sheenRoughness, p.sheenColorMap && (m.sheenColorMap.value = p.sheenColorMap, t(p.sheenColorMap, m.sheenColorMapTransform)), p.sheenRoughnessMap && (m.sheenRoughnessMap.value = p.sheenRoughnessMap, t(p.sheenRoughnessMap, m.sheenRoughnessMapTransform))), p.clearcoat > 0 && (m.clearcoat.value = p.clearcoat, m.clearcoatRoughness.value = p.clearcoatRoughness, p.clearcoatMap && (m.clearcoatMap.value = p.clearcoatMap, t(p.clearcoatMap, m.clearcoatMapTransform)), p.clearcoatRoughnessMap && (m.clearcoatRoughnessMap.value = p.clearcoatRoughnessMap, t(p.clearcoatRoughnessMap, m.clearcoatRoughnessMapTransform)), p.clearcoatNormalMap && (m.clearcoatNormalMap.value = p.clearcoatNormalMap, t(p.clearcoatNormalMap, m.clearcoatNormalMapTransform), m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale), p.side === on && m.clearcoatNormalScale.value.negate())), p.dispersion > 0 && (m.dispersion.value = p.dispersion), p.iridescence > 0 && (m.iridescence.value = p.iridescence, m.iridescenceIOR.value = p.iridescenceIOR, m.iridescenceThicknessMinimum.value = p.iridescenceThicknessRange[0], m.iridescenceThicknessMaximum.value = p.iridescenceThicknessRange[1], p.iridescenceMap && (m.iridescenceMap.value = p.iridescenceMap, t(p.iridescenceMap, m.iridescenceMapTransform)), p.iridescenceThicknessMap && (m.iridescenceThicknessMap.value = p.iridescenceThicknessMap, t(p.iridescenceThicknessMap, m.iridescenceThicknessMapTransform))), p.transmission > 0 && (m.transmission.value = p.transmission, m.transmissionSamplerMap.value = x.texture, m.transmissionSamplerSize.value.set(x.width, x.height), p.transmissionMap && (m.transmissionMap.value = p.transmissionMap, t(p.transmissionMap, m.transmissionMapTransform)), m.thickness.value = p.thickness, p.thicknessMap && (m.thicknessMap.value = p.thicknessMap, t(p.thicknessMap, m.thicknessMapTransform)), m.attenuationDistance.value = p.attenuationDistance, m.attenuationColor.value.copy(p.attenuationColor)), p.anisotropy > 0 && (m.anisotropyVector.value.set(p.anisotropy * Math.cos(p.anisotropyRotation), p.anisotropy * Math.sin(p.anisotropyRotation)), p.anisotropyMap && (m.anisotropyMap.value = p.anisotropyMap, t(p.anisotropyMap, m.anisotropyMapTransform))), m.specularIntensity.value = p.specularIntensity, m.specularColor.value.copy(p.specularColor), p.specularColorMap && (m.specularColorMap.value = p.specularColorMap, t(p.specularColorMap, m.specularColorMapTransform)), p.specularIntensityMap && (m.specularIntensityMap.value = p.specularIntensityMap, t(p.specularIntensityMap, m.specularIntensityMapTransform));
36383
36407
  }
36384
36408
  function g(m, p) {
36385
36409
  p.matcap && (m.matcap.value = p.matcap);
@@ -37271,7 +37295,7 @@ class OE {
37271
37295
  Tt.render($e, It);
37272
37296
  };
37273
37297
  function ru(E, U, G) {
37274
- E.transparent === !0 && E.side === Ei && E.forceSinglePass === !1 ? (E.side = an, E.needsUpdate = !0, ha(E, U, G), E.side = ki, E.needsUpdate = !0, ha(E, U, G), E.side = Ei) : ha(E, U, G);
37298
+ E.transparent === !0 && E.side === Ei && E.forceSinglePass === !1 ? (E.side = on, E.needsUpdate = !0, ha(E, U, G), E.side = ki, E.needsUpdate = !0, ha(E, U, G), E.side = Ei) : ha(E, U, G);
37275
37299
  }
37276
37300
  this.compile = function(E, U, G = null) {
37277
37301
  G === null && (G = E), S = pe.get(G), S.init(U), A.push(S), G.traverseVisible(function(O) {
@@ -37416,7 +37440,7 @@ class OE {
37416
37440
  const Dt = U[yt], { object: Tt, geometry: De, material: gt, group: lt } = Dt;
37417
37441
  if (gt.side === Ei && Tt.layers.test(z.layers)) {
37418
37442
  const _n = gt.side;
37419
- gt.side = an, gt.needsUpdate = !0, du(Tt, G, z, De, gt, lt), gt.side = _n, gt.needsUpdate = !0, $e = !0;
37443
+ gt.side = on, gt.needsUpdate = !0, du(Tt, G, z, De, gt, lt), gt.side = _n, gt.needsUpdate = !0, $e = !0;
37420
37444
  }
37421
37445
  }
37422
37446
  $e === !0 && (L.updateMultisampleRenderTarget(me), L.updateRenderTargetMipmap(me));
@@ -37432,7 +37456,7 @@ class OE {
37432
37456
  }
37433
37457
  }
37434
37458
  function du(E, U, G, z, O, me) {
37435
- E.onBeforeRender(_, U, G, z, O, me), E.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse, E.matrixWorld), E.normalMatrix.getNormalMatrix(E.modelViewMatrix), O.onBeforeRender(_, U, G, z, E, me), O.transparent === !0 && O.side === Ei && O.forceSinglePass === !1 ? (O.side = an, O.needsUpdate = !0, _.renderBufferDirect(G, U, z, O, E, me), O.side = ki, O.needsUpdate = !0, _.renderBufferDirect(G, U, z, O, E, me), O.side = Ei) : _.renderBufferDirect(G, U, z, O, E, me), E.onAfterRender(_, U, G, z, O, me);
37459
+ E.onBeforeRender(_, U, G, z, O, me), E.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse, E.matrixWorld), E.normalMatrix.getNormalMatrix(E.modelViewMatrix), O.onBeforeRender(_, U, G, z, E, me), O.transparent === !0 && O.side === Ei && O.forceSinglePass === !1 ? (O.side = on, O.needsUpdate = !0, _.renderBufferDirect(G, U, z, O, E, me), O.side = ki, O.needsUpdate = !0, _.renderBufferDirect(G, U, z, O, E, me), O.side = Ei) : _.renderBufferDirect(G, U, z, O, E, me), E.onAfterRender(_, U, G, z, O, me);
37436
37460
  }
37437
37461
  function ha(E, U, G) {
37438
37462
  U.isScene !== !0 && (U = xt);
@@ -37474,11 +37498,11 @@ class OE {
37474
37498
  let _n = De.currentProgram;
37475
37499
  lt === !0 && (_n = ha(z, U, O));
37476
37500
  let Rs = !1, Sn = !1, vr = !1;
37477
- const At = _n.getUniforms(), ln = De.uniforms;
37501
+ const At = _n.getUniforms(), dn = De.uniforms;
37478
37502
  if (Ae.useProgram(_n.program) && (Rs = !0, Sn = !0, vr = !0), z.id !== q && (q = z.id, Sn = !0), Rs || K !== E) {
37479
37503
  Ae.buffers.depth.getReversed() && E.reversedDepth !== !0 && (E._reversedDepth = !0, E.updateProjectionMatrix()), At.setValue(I, "projectionMatrix", E.projectionMatrix), At.setValue(I, "viewMatrix", E.matrixWorldInverse);
37480
- const dn = At.map.cameraPosition;
37481
- dn !== void 0 && dn.setValue(I, at.setFromMatrixPosition(E.matrixWorld)), Mt.logarithmicDepthBuffer && At.setValue(
37504
+ const un = At.map.cameraPosition;
37505
+ un !== void 0 && un.setValue(I, at.setFromMatrixPosition(E.matrixWorld)), Mt.logarithmicDepthBuffer && At.setValue(
37482
37506
  I,
37483
37507
  "logDepthBufFC",
37484
37508
  2 / (Math.log(E.far + 1) / Math.LN2)
@@ -37491,10 +37515,10 @@ class OE {
37491
37515
  }
37492
37516
  O.isBatchedMesh && (At.setOptional(I, O, "batchingTexture"), At.setValue(I, "batchingTexture", O._matricesTexture, L), At.setOptional(I, O, "batchingIdTexture"), At.setValue(I, "batchingIdTexture", O._indirectTexture, L), At.setOptional(I, O, "batchingColorTexture"), O._colorsTexture !== null && At.setValue(I, "batchingColorTexture", O._colorsTexture, L));
37493
37517
  const An = G.morphAttributes;
37494
- if ((An.position !== void 0 || An.normal !== void 0 || An.color !== void 0) && We.update(O, G, _n), (Sn || De.receiveShadow !== O.receiveShadow) && (De.receiveShadow = O.receiveShadow, At.setValue(I, "receiveShadow", O.receiveShadow)), z.isMeshGouraudMaterial && z.envMap !== null && (ln.envMap.value = Ce, ln.flipEnvMap.value = Ce.isCubeTexture && Ce.isRenderTargetTexture === !1 ? -1 : 1), z.isMeshStandardMaterial && z.envMap === null && U.environment !== null && (ln.envMapIntensity.value = U.environmentIntensity), ln.dfgLUT !== void 0 && (ln.dfgLUT.value = NE()), Sn && (At.setValue(I, "toneMappingExposure", _.toneMappingExposure), De.needsLights && eg(ln, vr), me && z.fog === !0 && Ue.refreshFogUniforms(ln, me), Ue.refreshMaterialUniforms(ln, z, Fe, Be, S.state.transmissionRenderTarget[E.id]), to.upload(I, uu(De), ln, L)), z.isShaderMaterial && z.uniformsNeedUpdate === !0 && (to.upload(I, uu(De), ln, L), z.uniformsNeedUpdate = !1), z.isSpriteMaterial && At.setValue(I, "center", O.center), At.setValue(I, "modelViewMatrix", O.modelViewMatrix), At.setValue(I, "normalMatrix", O.normalMatrix), At.setValue(I, "modelMatrix", O.matrixWorld), z.isShaderMaterial || z.isRawShaderMaterial) {
37518
+ if ((An.position !== void 0 || An.normal !== void 0 || An.color !== void 0) && We.update(O, G, _n), (Sn || De.receiveShadow !== O.receiveShadow) && (De.receiveShadow = O.receiveShadow, At.setValue(I, "receiveShadow", O.receiveShadow)), z.isMeshGouraudMaterial && z.envMap !== null && (dn.envMap.value = Ce, dn.flipEnvMap.value = Ce.isCubeTexture && Ce.isRenderTargetTexture === !1 ? -1 : 1), z.isMeshStandardMaterial && z.envMap === null && U.environment !== null && (dn.envMapIntensity.value = U.environmentIntensity), dn.dfgLUT !== void 0 && (dn.dfgLUT.value = NE()), Sn && (At.setValue(I, "toneMappingExposure", _.toneMappingExposure), De.needsLights && eg(dn, vr), me && z.fog === !0 && Ue.refreshFogUniforms(dn, me), Ue.refreshMaterialUniforms(dn, z, Fe, Be, S.state.transmissionRenderTarget[E.id]), to.upload(I, uu(De), dn, L)), z.isShaderMaterial && z.uniformsNeedUpdate === !0 && (to.upload(I, uu(De), dn, L), z.uniformsNeedUpdate = !1), z.isSpriteMaterial && At.setValue(I, "center", O.center), At.setValue(I, "modelViewMatrix", O.modelViewMatrix), At.setValue(I, "normalMatrix", O.normalMatrix), At.setValue(I, "modelMatrix", O.matrixWorld), z.isShaderMaterial || z.isRawShaderMaterial) {
37495
37519
  const sn = z.uniformsGroups;
37496
- for (let dn = 0, Wo = sn.length; dn < Wo; dn++) {
37497
- const ss = sn[dn];
37520
+ for (let un = 0, Wo = sn.length; un < Wo; un++) {
37521
+ const ss = sn[un];
37498
37522
  se.update(ss, _n), se.bind(ss, _n);
37499
37523
  }
37500
37524
  }
@@ -37625,21 +37649,21 @@ class OE {
37625
37649
  U.isData3DTexture ? (L.setTexture3D(U, 0), gt = I.TEXTURE_3D) : U.isDataArrayTexture || U.isCompressedArrayTexture ? (L.setTexture2DArray(U, 0), gt = I.TEXTURE_2D_ARRAY) : (L.setTexture2D(U, 0), gt = I.TEXTURE_2D), I.pixelStorei(I.UNPACK_FLIP_Y_WEBGL, U.flipY), I.pixelStorei(I.UNPACK_PREMULTIPLY_ALPHA_WEBGL, U.premultiplyAlpha), I.pixelStorei(I.UNPACK_ALIGNMENT, U.unpackAlignment);
37626
37650
  const lt = I.getParameter(I.UNPACK_ROW_LENGTH), _n = I.getParameter(I.UNPACK_IMAGE_HEIGHT), Rs = I.getParameter(I.UNPACK_SKIP_PIXELS), Sn = I.getParameter(I.UNPACK_SKIP_ROWS), vr = I.getParameter(I.UNPACK_SKIP_IMAGES);
37627
37651
  I.pixelStorei(I.UNPACK_ROW_LENGTH, Dt.width), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, Dt.height), I.pixelStorei(I.UNPACK_SKIP_PIXELS, ke), I.pixelStorei(I.UNPACK_SKIP_ROWS, Le), I.pixelStorei(I.UNPACK_SKIP_IMAGES, Ie);
37628
- const At = E.isDataArrayTexture || E.isData3DTexture, ln = U.isDataArrayTexture || U.isData3DTexture;
37652
+ const At = E.isDataArrayTexture || E.isData3DTexture, dn = U.isDataArrayTexture || U.isData3DTexture;
37629
37653
  if (E.isDepthTexture) {
37630
- const An = y.get(E), sn = y.get(U), dn = y.get(An.__renderTarget), Wo = y.get(sn.__renderTarget);
37631
- Ae.bindFramebuffer(I.READ_FRAMEBUFFER, dn.__webglFramebuffer), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, Wo.__webglFramebuffer);
37654
+ const An = y.get(E), sn = y.get(U), un = y.get(An.__renderTarget), Wo = y.get(sn.__renderTarget);
37655
+ Ae.bindFramebuffer(I.READ_FRAMEBUFFER, un.__webglFramebuffer), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, Wo.__webglFramebuffer);
37632
37656
  for (let ss = 0; ss < Ce; ss++)
37633
37657
  At && (I.framebufferTextureLayer(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, y.get(E).__webglTexture, O, Ie + ss), I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, y.get(U).__webglTexture, me, It + ss)), I.blitFramebuffer(ke, Le, xe, be, $e, yt, xe, be, I.DEPTH_BUFFER_BIT, I.NEAREST);
37634
37658
  Ae.bindFramebuffer(I.READ_FRAMEBUFFER, null), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, null);
37635
37659
  } else if (O !== 0 || E.isRenderTargetTexture || y.has(E)) {
37636
37660
  const An = y.get(E), sn = y.get(U);
37637
37661
  Ae.bindFramebuffer(I.READ_FRAMEBUFFER, ig), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, sg);
37638
- for (let dn = 0; dn < Ce; dn++)
37639
- At ? I.framebufferTextureLayer(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, An.__webglTexture, O, Ie + dn) : I.framebufferTexture2D(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, An.__webglTexture, O), ln ? I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, sn.__webglTexture, me, It + dn) : I.framebufferTexture2D(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, sn.__webglTexture, me), O !== 0 ? I.blitFramebuffer(ke, Le, xe, be, $e, yt, xe, be, I.COLOR_BUFFER_BIT, I.NEAREST) : ln ? I.copyTexSubImage3D(gt, me, $e, yt, It + dn, ke, Le, xe, be) : I.copyTexSubImage2D(gt, me, $e, yt, ke, Le, xe, be);
37662
+ for (let un = 0; un < Ce; un++)
37663
+ At ? I.framebufferTextureLayer(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, An.__webglTexture, O, Ie + un) : I.framebufferTexture2D(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, An.__webglTexture, O), dn ? I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, sn.__webglTexture, me, It + un) : I.framebufferTexture2D(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, sn.__webglTexture, me), O !== 0 ? I.blitFramebuffer(ke, Le, xe, be, $e, yt, xe, be, I.COLOR_BUFFER_BIT, I.NEAREST) : dn ? I.copyTexSubImage3D(gt, me, $e, yt, It + un, ke, Le, xe, be) : I.copyTexSubImage2D(gt, me, $e, yt, ke, Le, xe, be);
37640
37664
  Ae.bindFramebuffer(I.READ_FRAMEBUFFER, null), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, null);
37641
37665
  } else
37642
- ln ? E.isDataTexture || E.isData3DTexture ? I.texSubImage3D(gt, me, $e, yt, It, xe, be, Ce, Tt, De, Dt.data) : U.isCompressedArrayTexture ? I.compressedTexSubImage3D(gt, me, $e, yt, It, xe, be, Ce, Tt, Dt.data) : I.texSubImage3D(gt, me, $e, yt, It, xe, be, Ce, Tt, De, Dt) : E.isDataTexture ? I.texSubImage2D(I.TEXTURE_2D, me, $e, yt, xe, be, Tt, De, Dt.data) : E.isCompressedTexture ? I.compressedTexSubImage2D(I.TEXTURE_2D, me, $e, yt, Dt.width, Dt.height, Tt, Dt.data) : I.texSubImage2D(I.TEXTURE_2D, me, $e, yt, xe, be, Tt, De, Dt);
37666
+ dn ? E.isDataTexture || E.isData3DTexture ? I.texSubImage3D(gt, me, $e, yt, It, xe, be, Ce, Tt, De, Dt.data) : U.isCompressedArrayTexture ? I.compressedTexSubImage3D(gt, me, $e, yt, It, xe, be, Ce, Tt, Dt.data) : I.texSubImage3D(gt, me, $e, yt, It, xe, be, Ce, Tt, De, Dt) : E.isDataTexture ? I.texSubImage2D(I.TEXTURE_2D, me, $e, yt, xe, be, Tt, De, Dt.data) : E.isCompressedTexture ? I.compressedTexSubImage2D(I.TEXTURE_2D, me, $e, yt, Dt.width, Dt.height, Tt, Dt.data) : I.texSubImage2D(I.TEXTURE_2D, me, $e, yt, xe, be, Tt, De, Dt);
37643
37667
  I.pixelStorei(I.UNPACK_ROW_LENGTH, lt), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, _n), I.pixelStorei(I.UNPACK_SKIP_PIXELS, Rs), I.pixelStorei(I.UNPACK_SKIP_ROWS, Sn), I.pixelStorei(I.UNPACK_SKIP_IMAGES, vr), me === 0 && U.generateMipmaps && I.generateMipmap(gt), Ae.unbindTexture();
37644
37668
  }, this.initRenderTarget = function(E) {
37645
37669
  y.get(E).__webglFramebuffer === void 0 && L.setupRenderTarget(E);
@@ -38222,7 +38246,7 @@ class Do {
38222
38246
  uPulseSpeed: { value: 2 }
38223
38247
  },
38224
38248
  transparent: !0,
38225
- side: an,
38249
+ side: on,
38226
38250
  blending: Ml,
38227
38251
  depthWrite: !1
38228
38252
  }), this.glowMesh = new $n(n, this.glowMaterial), this.scene.add(this.glowMesh);
@@ -38604,7 +38628,7 @@ class Uo {
38604
38628
  this.hasAcquired && (ni.release(), this.hasAcquired = !1);
38605
38629
  }
38606
38630
  }
38607
- const hn = {
38631
+ const fn = {
38608
38632
  default: {
38609
38633
  primary: "#6366f1",
38610
38634
  secondary: "#8b5cf6",
@@ -38737,7 +38761,7 @@ const hn = {
38737
38761
  highlight: "#FDBA74"
38738
38762
  // Neon orange glow
38739
38763
  }
38740
- }, fn = {
38764
+ }, pn = {
38741
38765
  indigo: {
38742
38766
  primary: "#3730a3",
38743
38767
  secondary: "#4338ca",
@@ -38861,153 +38885,153 @@ const hn = {
38861
38885
  }
38862
38886
  };
38863
38887
  function oM(i, e = "dark") {
38864
- const t = e === "dark" ? hn : fn;
38888
+ const t = e === "dark" ? fn : pn;
38865
38889
  return t[i] || t[Object.keys(t)[0]];
38866
38890
  }
38867
38891
  function cM(i = "dark") {
38868
- return Object.keys(i === "dark" ? hn : fn);
38892
+ return Object.keys(i === "dark" ? fn : pn);
38869
38893
  }
38870
38894
  const ea = {
38871
38895
  default: {
38872
38896
  dark: {
38873
- colors: hn.default,
38897
+ colors: fn.default,
38874
38898
  glowIntensity: 1.2,
38875
38899
  idleGlowMultiplier: 0.6
38876
38900
  },
38877
38901
  light: {
38878
- colors: fn.indigo,
38902
+ colors: pn.indigo,
38879
38903
  glowIntensity: 1.8,
38880
38904
  idleGlowMultiplier: 1.2
38881
38905
  }
38882
38906
  },
38883
38907
  emerald: {
38884
38908
  dark: {
38885
- colors: hn.emerald,
38909
+ colors: fn.emerald,
38886
38910
  glowIntensity: 1.2,
38887
38911
  idleGlowMultiplier: 0.6
38888
38912
  },
38889
38913
  light: {
38890
- colors: fn.teal,
38914
+ colors: pn.teal,
38891
38915
  glowIntensity: 1.8,
38892
38916
  idleGlowMultiplier: 1.2
38893
38917
  }
38894
38918
  },
38895
38919
  rose: {
38896
38920
  dark: {
38897
- colors: hn.rose,
38921
+ colors: fn.rose,
38898
38922
  glowIntensity: 1.2,
38899
38923
  idleGlowMultiplier: 0.6
38900
38924
  },
38901
38925
  light: {
38902
- colors: fn.pink,
38926
+ colors: pn.pink,
38903
38927
  glowIntensity: 1.8,
38904
38928
  idleGlowMultiplier: 1.2
38905
38929
  }
38906
38930
  },
38907
38931
  amber: {
38908
38932
  dark: {
38909
- colors: hn.amber,
38933
+ colors: fn.amber,
38910
38934
  glowIntensity: 1.2,
38911
38935
  idleGlowMultiplier: 0.6
38912
38936
  },
38913
38937
  light: {
38914
- colors: fn.orange,
38938
+ colors: pn.orange,
38915
38939
  glowIntensity: 1.8,
38916
38940
  idleGlowMultiplier: 1.2
38917
38941
  }
38918
38942
  },
38919
38943
  cyan: {
38920
38944
  dark: {
38921
- colors: hn.cyan,
38945
+ colors: fn.cyan,
38922
38946
  glowIntensity: 1.2,
38923
38947
  idleGlowMultiplier: 0.6
38924
38948
  },
38925
38949
  light: {
38926
- colors: fn.blue,
38950
+ colors: pn.blue,
38927
38951
  glowIntensity: 1.8,
38928
38952
  idleGlowMultiplier: 1.2
38929
38953
  }
38930
38954
  },
38931
38955
  purple: {
38932
38956
  dark: {
38933
- colors: hn.purple,
38957
+ colors: fn.purple,
38934
38958
  glowIntensity: 1.2,
38935
38959
  idleGlowMultiplier: 0.6
38936
38960
  },
38937
38961
  light: {
38938
- colors: fn.violet,
38962
+ colors: pn.violet,
38939
38963
  glowIntensity: 1.8,
38940
38964
  idleGlowMultiplier: 1.2
38941
38965
  }
38942
38966
  },
38943
38967
  blue: {
38944
38968
  dark: {
38945
- colors: hn.blue,
38969
+ colors: fn.blue,
38946
38970
  glowIntensity: 1.2,
38947
38971
  idleGlowMultiplier: 0.6
38948
38972
  },
38949
38973
  light: {
38950
- colors: fn.blue,
38974
+ colors: pn.blue,
38951
38975
  glowIntensity: 1.8,
38952
38976
  idleGlowMultiplier: 1.2
38953
38977
  }
38954
38978
  },
38955
38979
  white: {
38956
38980
  dark: {
38957
- colors: hn.white,
38981
+ colors: fn.white,
38958
38982
  glowIntensity: 1.2,
38959
38983
  idleGlowMultiplier: 0.6
38960
38984
  },
38961
38985
  light: {
38962
- colors: fn.silver,
38986
+ colors: pn.silver,
38963
38987
  glowIntensity: 1.8,
38964
38988
  idleGlowMultiplier: 1.2
38965
38989
  }
38966
38990
  },
38967
38991
  black: {
38968
38992
  dark: {
38969
- colors: hn.black,
38993
+ colors: fn.black,
38970
38994
  glowIntensity: 1.2,
38971
38995
  idleGlowMultiplier: 0.6
38972
38996
  },
38973
38997
  light: {
38974
- colors: fn.charcoal,
38998
+ colors: pn.charcoal,
38975
38999
  glowIntensity: 1.8,
38976
39000
  idleGlowMultiplier: 1.2
38977
39001
  }
38978
39002
  },
38979
39003
  tangerine: {
38980
39004
  dark: {
38981
- colors: hn.tangerine,
39005
+ colors: fn.tangerine,
38982
39006
  glowIntensity: 1.2,
38983
39007
  idleGlowMultiplier: 0.6
38984
39008
  },
38985
39009
  light: {
38986
- colors: fn.tangerine,
39010
+ colors: pn.tangerine,
38987
39011
  glowIntensity: 1.8,
38988
39012
  idleGlowMultiplier: 1.2
38989
39013
  }
38990
39014
  },
38991
39015
  ember: {
38992
39016
  dark: {
38993
- colors: hn.ember,
39017
+ colors: fn.ember,
38994
39018
  glowIntensity: 1.2,
38995
39019
  idleGlowMultiplier: 0.6
38996
39020
  },
38997
39021
  light: {
38998
- colors: fn.ember,
39022
+ colors: pn.ember,
38999
39023
  glowIntensity: 1.8,
39000
39024
  idleGlowMultiplier: 1.2
39001
39025
  }
39002
39026
  },
39003
39027
  "tangerine-neon": {
39004
39028
  dark: {
39005
- colors: hn["tangerine-neon"],
39029
+ colors: fn["tangerine-neon"],
39006
39030
  glowIntensity: 1.4,
39007
39031
  idleGlowMultiplier: 0.7
39008
39032
  },
39009
39033
  light: {
39010
- colors: fn["tangerine-neon"],
39034
+ colors: pn["tangerine-neon"],
39011
39035
  glowIntensity: 2,
39012
39036
  idleGlowMultiplier: 1.3
39013
39037
  }
@@ -41725,7 +41749,7 @@ export {
41725
41749
  Uo as SoundManager,
41726
41750
  hM as applyTheme,
41727
41751
  fM as clearConfigCache,
41728
- hn as darkPresets,
41752
+ fn as darkPresets,
41729
41753
  lM as darkThemes,
41730
41754
  zo as fetchWidgetConfig,
41731
41755
  oM as getColorPreset,
@@ -41733,7 +41757,7 @@ export {
41733
41757
  ca as getTheme,
41734
41758
  uM as getThemeNames,
41735
41759
  Vo as isDomainAllowed,
41736
- fn as lightPresets,
41760
+ pn as lightPresets,
41737
41761
  dM as lightThemes,
41738
41762
  ea as themes
41739
41763
  };