hanc-webrtc-widgets 2.5.2 → 2.5.4

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.
@@ -1710,7 +1710,7 @@ function $D() {
1710
1710
  makeWriteOptions: zD,
1711
1711
  readMessage(i, A, e, t) {
1712
1712
  if (A == null || Array.isArray(A) || typeof A != "object")
1713
- throw new Error("cannot decode message ".concat(i.typeName, " from JSON: ").concat(Ki(A)));
1713
+ throw new Error("cannot decode message ".concat(i.typeName, " from JSON: ").concat(Yi(A)));
1714
1714
  t = t ?? new i();
1715
1715
  const g = /* @__PURE__ */ new Map(), o = e.typeRegistry;
1716
1716
  for (const [n, I] of Object.entries(A)) {
@@ -1777,10 +1777,10 @@ function $D() {
1777
1777
  if (A !== void 0 && (e || ph(i, A)))
1778
1778
  return qa(i, A);
1779
1779
  },
1780
- debug: Ki
1780
+ debug: Yi
1781
1781
  };
1782
1782
  }
1783
- function Ki(i) {
1783
+ function Yi(i) {
1784
1784
  if (i === null)
1785
1785
  return "null";
1786
1786
  switch (typeof i) {
@@ -1798,11 +1798,11 @@ function d0(i, A, e, t, g) {
1798
1798
  if (tt(e.kind != "map"), A === null)
1799
1799
  return;
1800
1800
  if (!Array.isArray(A))
1801
- throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ki(A)));
1801
+ throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Yi(A)));
1802
1802
  const n = i[o];
1803
1803
  for (const I of A) {
1804
1804
  if (I === null)
1805
- throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ki(I)));
1805
+ throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Yi(I)));
1806
1806
  switch (e.kind) {
1807
1807
  case "message":
1808
1808
  n.push(e.T.fromJson(I, t));
@@ -1815,7 +1815,7 @@ function d0(i, A, e, t, g) {
1815
1815
  try {
1816
1816
  n.push(yI(e.T, I, e.L, !0));
1817
1817
  } catch (s) {
1818
- let C = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ki(I));
1818
+ let C = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Yi(I));
1819
1819
  throw s instanceof Error && s.message.length > 0 && (C += ": ".concat(s.message)), new Error(C);
1820
1820
  }
1821
1821
  break;
@@ -1825,7 +1825,7 @@ function d0(i, A, e, t, g) {
1825
1825
  if (A === null)
1826
1826
  return;
1827
1827
  if (typeof A != "object" || Array.isArray(A))
1828
- throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ki(A)));
1828
+ throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Yi(A)));
1829
1829
  const n = i[o];
1830
1830
  for (const [I, a] of Object.entries(A)) {
1831
1831
  if (a === null)
@@ -1834,7 +1834,7 @@ function d0(i, A, e, t, g) {
1834
1834
  try {
1835
1835
  s = Ap(e.K, I);
1836
1836
  } catch (C) {
1837
- let r = "cannot decode map key for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ki(A));
1837
+ let r = "cannot decode map key for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Yi(A));
1838
1838
  throw C instanceof Error && C.message.length > 0 && (r += ": ".concat(C.message)), new Error(r);
1839
1839
  }
1840
1840
  switch (e.V.kind) {
@@ -1849,7 +1849,7 @@ function d0(i, A, e, t, g) {
1849
1849
  try {
1850
1850
  n[s] = yI(e.V.T, a, no.BIGINT, !0);
1851
1851
  } catch (r) {
1852
- let Q = "cannot decode map value for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ki(A));
1852
+ let Q = "cannot decode map value for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Yi(A));
1853
1853
  throw r instanceof Error && r.message.length > 0 && (Q += ": ".concat(r.message)), new Error(Q);
1854
1854
  }
1855
1855
  break;
@@ -1891,7 +1891,7 @@ function d0(i, A, e, t, g) {
1891
1891
  break;
1892
1892
  }
1893
1893
  } catch (s) {
1894
- let C = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ki(A));
1894
+ let C = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Yi(A));
1895
1895
  throw s instanceof Error && s.message.length > 0 && (C += ": ".concat(s.message)), new Error(C);
1896
1896
  }
1897
1897
  break;
@@ -1986,7 +1986,7 @@ function RC(i, A, e, t) {
1986
1986
  return Ya;
1987
1987
  break;
1988
1988
  }
1989
- throw new Error("cannot decode enum ".concat(i.typeName, " from JSON: ").concat(Ki(A)));
1989
+ throw new Error("cannot decode enum ".concat(i.typeName, " from JSON: ").concat(Yi(A)));
1990
1990
  }
1991
1991
  function ep(i) {
1992
1992
  return i.repeated || i.kind == "map" ? !0 : !(i.oneof || i.kind == "message" || i.opt || i.req);
@@ -2912,7 +2912,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
2912
2912
  }, {
2913
2913
  no: 2,
2914
2914
  name: "REGRESSION"
2915
- }]), pi = /* @__PURE__ */ q.makeEnum("livekit.TrackType", [{
2915
+ }]), mi = /* @__PURE__ */ q.makeEnum("livekit.TrackType", [{
2916
2916
  no: 0,
2917
2917
  name: "AUDIO"
2918
2918
  }, {
@@ -2969,7 +2969,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
2969
2969
  }, {
2970
2970
  no: 2,
2971
2971
  name: "ENABLED"
2972
- }]), Si = /* @__PURE__ */ q.makeEnum("livekit.DisconnectReason", [{
2972
+ }]), bi = /* @__PURE__ */ q.makeEnum("livekit.DisconnectReason", [{
2973
2973
  no: 0,
2974
2974
  name: "UNKNOWN_REASON"
2975
2975
  }, {
@@ -3300,7 +3300,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
3300
3300
  no: 16,
3301
3301
  name: "disconnect_reason",
3302
3302
  kind: "enum",
3303
- T: q.getEnumType(Si)
3303
+ T: q.getEnumType(bi)
3304
3304
  }, {
3305
3305
  no: 18,
3306
3306
  name: "kind_details",
@@ -3383,7 +3383,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
3383
3383
  no: 2,
3384
3384
  name: "type",
3385
3385
  kind: "enum",
3386
- T: q.getEnumType(pi)
3386
+ T: q.getEnumType(mi)
3387
3387
  }, {
3388
3388
  no: 3,
3389
3389
  name: "name",
@@ -4283,7 +4283,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
4283
4283
  }
4284
4284
  }], {
4285
4285
  localName: "DataStream_Trailer"
4286
- }), wi = /* @__PURE__ */ q.makeEnum("livekit.SignalTarget", [{
4286
+ }), _i = /* @__PURE__ */ q.makeEnum("livekit.SignalTarget", [{
4287
4287
  no: 0,
4288
4288
  name: "PUBLISHER"
4289
4289
  }, {
@@ -4374,7 +4374,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
4374
4374
  no: 13,
4375
4375
  name: "simulate",
4376
4376
  kind: "message",
4377
- T: Ti,
4377
+ T: Ji,
4378
4378
  oneof: "message"
4379
4379
  }, {
4380
4380
  no: 14,
@@ -4572,7 +4572,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
4572
4572
  no: 3,
4573
4573
  name: "type",
4574
4574
  kind: "enum",
4575
- T: q.getEnumType(pi)
4575
+ T: q.getEnumType(mi)
4576
4576
  }, {
4577
4577
  no: 4,
4578
4578
  name: "width",
@@ -4664,7 +4664,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
4664
4664
  no: 2,
4665
4665
  name: "target",
4666
4666
  kind: "enum",
4667
- T: q.getEnumType(wi)
4667
+ T: q.getEnumType(_i)
4668
4668
  }, {
4669
4669
  no: 3,
4670
4670
  name: "final",
@@ -4931,7 +4931,7 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
4931
4931
  no: 2,
4932
4932
  name: "reason",
4933
4933
  kind: "enum",
4934
- T: q.getEnumType(Si)
4934
+ T: q.getEnumType(bi)
4935
4935
  }, {
4936
4936
  no: 3,
4937
4937
  name: "action",
@@ -5250,8 +5250,8 @@ const up = /* @__PURE__ */ q.makeMessageType("livekit.MetricsBatch", () => [{
5250
5250
  no: 3,
5251
5251
  name: "target",
5252
5252
  kind: "enum",
5253
- T: q.getEnumType(wi)
5254
- }]), Ti = /* @__PURE__ */ q.makeMessageType("livekit.SimulateScenario", () => [{
5253
+ T: q.getEnumType(_i)
5254
+ }]), Ji = /* @__PURE__ */ q.makeMessageType("livekit.SimulateScenario", () => [{
5255
5255
  no: 1,
5256
5256
  name: "speaker_update",
5257
5257
  kind: "scalar",
@@ -5542,12 +5542,12 @@ var Vs = gw(), jr;
5542
5542
  (function(i) {
5543
5543
  i[i.trace = 0] = "trace", i[i.debug = 1] = "debug", i[i.info = 2] = "info", i[i.warn = 3] = "warn", i[i.error = 4] = "error", i[i.silent = 5] = "silent";
5544
5544
  })(jr || (jr = {}));
5545
- var bi;
5545
+ var Mi;
5546
5546
  (function(i) {
5547
5547
  i.Default = "livekit", i.Room = "livekit-room", i.Participant = "livekit-participant", i.Track = "livekit-track", i.Publication = "livekit-track-publication", i.Engine = "livekit-engine", i.Signal = "livekit-signal", i.PCManager = "livekit-pc-manager", i.PCTransport = "livekit-pc-transport", i.E2EE = "lk-e2ee";
5548
- })(bi || (bi = {}));
5548
+ })(Mi || (Mi = {}));
5549
5549
  let re = Vs.getLogger("livekit");
5550
- Object.values(bi).map((i) => Vs.getLogger(i));
5550
+ Object.values(Mi).map((i) => Vs.getLogger(i));
5551
5551
  re.setDefaultLevel(jr.info);
5552
5552
  function yg(i) {
5553
5553
  const A = Vs.getLogger(i);
@@ -5835,7 +5835,7 @@ function sw() {
5835
5835
  }
5836
5836
  return ca.exports;
5837
5837
  }
5838
- var eg = sw();
5838
+ var ig = sw();
5839
5839
  let Il = !0, al = !0;
5840
5840
  function hI(i, A, e) {
5841
5841
  const t = i.match(A);
@@ -7387,7 +7387,7 @@ function Dw() {
7387
7387
  return typeof window.RTCRtpSender < "u" && // @ts-ignore
7388
7388
  typeof window.RTCRtpSender.prototype.createEncodedStreams < "u";
7389
7389
  }
7390
- class gv extends eg.EventEmitter {
7390
+ class gv extends ig.EventEmitter {
7391
7391
  constructor() {
7392
7392
  let A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
7393
7393
  super(), this.onKeyRatcheted = (e, t, g) => {
@@ -7473,13 +7473,13 @@ class U0 extends Gg {
7473
7473
  super(15, A), this.reason = e, this.reasonName = typeof e == "string" ? e : AE[e];
7474
7474
  }
7475
7475
  }
7476
- var mi;
7476
+ var ki;
7477
7477
  (function(i) {
7478
7478
  i[i.AlreadyOpened = 0] = "AlreadyOpened", i[i.AbnormalEnd = 1] = "AbnormalEnd", i[i.DecodeFailed = 2] = "DecodeFailed", i[i.LengthExceeded = 3] = "LengthExceeded", i[i.Incomplete = 4] = "Incomplete", i[i.HandlerAlreadyRegistered = 7] = "HandlerAlreadyRegistered";
7479
- })(mi || (mi = {}));
7479
+ })(ki || (ki = {}));
7480
7480
  class Vg extends Gg {
7481
7481
  constructor(A, e) {
7482
- super(16, A), this.name = "DataStreamError", this.reason = e, this.reasonName = mi[e];
7482
+ super(16, A), this.name = "DataStreamError", this.reason = e, this.reasonName = ki[e];
7483
7483
  }
7484
7484
  }
7485
7485
  var Ds;
@@ -7600,7 +7600,7 @@ var Ai;
7600
7600
  (function(i) {
7601
7601
  i[i.LOW = 0] = "LOW", i[i.MEDIUM = 1] = "MEDIUM", i[i.HIGH = 2] = "HIGH";
7602
7602
  })(Ai || (Ai = {}));
7603
- class tA extends eg.EventEmitter {
7603
+ class tA extends ig.EventEmitter {
7604
7604
  /**
7605
7605
  * indicates current state of stream, it'll indicate `paused` if the track
7606
7606
  * has been paused by congestion controller
@@ -7617,7 +7617,7 @@ class tA extends eg.EventEmitter {
7617
7617
  var g;
7618
7618
  super(), this.attachedElements = [], this.isMuted = !1, this._streamState = tA.StreamState.Active, this.isInBackground = !1, this._currentBitrate = 0, this.log = re, this.appVisibilityChangedListener = () => {
7619
7619
  this.backgroundTimeout && clearTimeout(this.backgroundTimeout), document.visibilityState === "hidden" ? this.backgroundTimeout = setTimeout(() => this.handleAppVisibilityChanged(), Rw) : this.handleAppVisibilityChanged();
7620
- }, this.log = yg((g = t.loggerName) !== null && g !== void 0 ? g : bi.Track), this.loggerContextCb = t.loggerContextCb, this.setMaxListeners(100), this.kind = e, this._mediaStreamTrack = A, this._mediaStreamID = A.id, this.source = tA.Source.Unknown;
7620
+ }, this.log = yg((g = t.loggerName) !== null && g !== void 0 ? g : Mi.Track), this.loggerContextCb = t.loggerContextCb, this.setMaxListeners(100), this.kind = e, this._mediaStreamTrack = A, this._mediaStreamID = A.id, this.source = tA.Source.Unknown;
7621
7621
  }
7622
7622
  get logContext() {
7623
7623
  var A;
@@ -7737,19 +7737,19 @@ function wn(i, A) {
7737
7737
  function g(s) {
7738
7738
  switch (s) {
7739
7739
  case A.Audio:
7740
- return pi.AUDIO;
7740
+ return mi.AUDIO;
7741
7741
  case A.Video:
7742
- return pi.VIDEO;
7742
+ return mi.VIDEO;
7743
7743
  default:
7744
- return pi.DATA;
7744
+ return mi.DATA;
7745
7745
  }
7746
7746
  }
7747
7747
  i.kindToProto = g;
7748
7748
  function o(s) {
7749
7749
  switch (s) {
7750
- case pi.AUDIO:
7750
+ case mi.AUDIO:
7751
7751
  return A.Audio;
7752
- case pi.VIDEO:
7752
+ case mi.VIDEO:
7753
7753
  return A.Video;
7754
7754
  default:
7755
7755
  return A.Unknown;
@@ -7913,7 +7913,7 @@ function Lw() {
7913
7913
  return !1;
7914
7914
  if (Uo()) {
7915
7915
  const e = ei();
7916
- if (e != null && e.version && $i(e.version, "16") < 0 || (e == null ? void 0 : e.os) === "iOS" && (e != null && e.osVersion) && $i(e.osVersion, "16") < 0)
7916
+ if (e != null && e.version && eg(e.version, "16") < 0 || (e == null ? void 0 : e.os) === "iOS" && (e != null && e.osVersion) && eg(e.osVersion, "16") < 0)
7917
7917
  return !1;
7918
7918
  }
7919
7919
  const i = RTCRtpSender.getCapabilities("video");
@@ -7927,7 +7927,7 @@ function Lw() {
7927
7927
  }
7928
7928
  return A;
7929
7929
  }
7930
- function Hi(i) {
7930
+ function Oi(i) {
7931
7931
  return i === "av1" || i === "vp9";
7932
7932
  }
7933
7933
  function IQ(i) {
@@ -7950,10 +7950,10 @@ function YI() {
7950
7950
  }
7951
7951
  function Tw() {
7952
7952
  const i = ei();
7953
- return (i == null ? void 0 : i.name) === "Safari" && i.version.startsWith("17.") || (i == null ? void 0 : i.os) === "iOS" && !!(i != null && i.osVersion) && $i(i.osVersion, "17") >= 0;
7953
+ return (i == null ? void 0 : i.name) === "Safari" && i.version.startsWith("17.") || (i == null ? void 0 : i.os) === "iOS" && !!(i != null && i.osVersion) && eg(i.osVersion, "17") >= 0;
7954
7954
  }
7955
7955
  function Kw(i) {
7956
- return i || (i = ei()), (i == null ? void 0 : i.name) === "Safari" && $i(i.version, "18.3") > 0 || (i == null ? void 0 : i.os) === "iOS" && !!(i != null && i.osVersion) && $i(i.osVersion, "18.3") > 0;
7956
+ return i || (i = ei()), (i == null ? void 0 : i.name) === "Safari" && eg(i.version, "18.3") > 0 || (i == null ? void 0 : i.os) === "iOS" && !!(i != null && i.osVersion) && eg(i.osVersion, "18.3") > 0;
7957
7957
  }
7958
7958
  function Tl() {
7959
7959
  var i, A;
@@ -7965,12 +7965,12 @@ function Tl() {
7965
7965
  function Jw() {
7966
7966
  const i = ei(), A = "17.2";
7967
7967
  if (i)
7968
- return i.name !== "Safari" && i.os !== "iOS" || i.os === "iOS" && i.osVersion && $i(i.osVersion, A) >= 0 ? !0 : i.name === "Safari" && $i(i.version, A) >= 0;
7968
+ return i.name !== "Safari" && i.os !== "iOS" || i.os === "iOS" && i.osVersion && eg(i.osVersion, A) >= 0 ? !0 : i.name === "Safari" && eg(i.version, A) >= 0;
7969
7969
  }
7970
7970
  function Ht() {
7971
7971
  return typeof document < "u";
7972
7972
  }
7973
- function zi() {
7973
+ function Ag() {
7974
7974
  return navigator.product == "ReactNative";
7975
7975
  }
7976
7976
  function aQ(i) {
@@ -7981,7 +7981,7 @@ function Kl() {
7981
7981
  return global.LiveKitReactNativeGlobal;
7982
7982
  }
7983
7983
  function Jl() {
7984
- if (!zi())
7984
+ if (!Ag())
7985
7985
  return;
7986
7986
  let i = Kl();
7987
7987
  if (i)
@@ -7990,14 +7990,14 @@ function Jl() {
7990
7990
  function Y0() {
7991
7991
  if (Ht())
7992
7992
  return window.devicePixelRatio;
7993
- if (zi()) {
7993
+ if (Ag()) {
7994
7994
  let i = Kl();
7995
7995
  if (i)
7996
7996
  return i.devicePixelRatio;
7997
7997
  }
7998
7998
  return 1;
7999
7999
  }
8000
- function $i(i, A) {
8000
+ function eg(i, A) {
8001
8001
  const e = i.split("."), t = A.split("."), g = Math.min(e.length, t.length);
8002
8002
  for (let o = 0; o < g; ++o) {
8003
8003
  const n = parseInt(e[o], 10), I = parseInt(t[o], 10);
@@ -8029,7 +8029,7 @@ function Hw() {
8029
8029
  protocol: Sw,
8030
8030
  version: yw
8031
8031
  });
8032
- return zi() && (A.os = (i = Jl()) !== null && i !== void 0 ? i : ""), A;
8032
+ return Ag() && (A.os = (i = Jl()) !== null && i !== void 0 ? i : ""), A;
8033
8033
  }
8034
8034
  function P0() {
8035
8035
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 16, A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 16, e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, t = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
@@ -8054,7 +8054,7 @@ function LC() {
8054
8054
  }
8055
8055
  return tI.clone();
8056
8056
  }
8057
- class Pi {
8057
+ class Vi {
8058
8058
  get isResolved() {
8059
8059
  return this._isResolved;
8060
8060
  }
@@ -8130,13 +8130,13 @@ function O0(i) {
8130
8130
  case Be.LeaveRequest:
8131
8131
  return i.context;
8132
8132
  case Be.Cancelled:
8133
- return Si.CLIENT_INITIATED;
8133
+ return bi.CLIENT_INITIATED;
8134
8134
  case Be.NotAllowed:
8135
- return Si.USER_REJECTED;
8135
+ return bi.USER_REJECTED;
8136
8136
  case Be.ServerUnreachable:
8137
- return Si.JOIN_FAILURE;
8137
+ return bi.JOIN_FAILURE;
8138
8138
  default:
8139
- return Si.UNKNOWN_REASON;
8139
+ return bi.UNKNOWN_REASON;
8140
8140
  }
8141
8141
  }
8142
8142
  function za(i) {
@@ -8148,7 +8148,7 @@ function wo(i) {
8148
8148
  function mn(i) {
8149
8149
  return !!i && !(i instanceof MediaStreamTrack) && i.isLocal;
8150
8150
  }
8151
- function ji(i) {
8151
+ function Zi(i) {
8152
8152
  return !!i && i.kind == tA.Kind.Audio;
8153
8153
  }
8154
8154
  function Qo(i) {
@@ -8157,8 +8157,8 @@ function Qo(i) {
8157
8157
  function vg(i) {
8158
8158
  return mn(i) && Qo(i);
8159
8159
  }
8160
- function sg(i) {
8161
- return mn(i) && ji(i);
8160
+ function rg(i) {
8161
+ return mn(i) && Zi(i);
8162
8162
  }
8163
8163
  function CQ(i) {
8164
8164
  return !!i && !i.isLocal;
@@ -8395,7 +8395,7 @@ function gm(i, A) {
8395
8395
  var e;
8396
8396
  return (e = i.layers) === null || e === void 0 ? void 0 : e.find((t) => t.quality === A);
8397
8397
  }
8398
- class om extends eg.EventEmitter {
8398
+ class om extends ig.EventEmitter {
8399
8399
  constructor(A) {
8400
8400
  super(), this.onWorkerMessage = (e) => {
8401
8401
  var t, g;
@@ -8836,7 +8836,7 @@ class oE {
8836
8836
  var t;
8837
8837
  this.rtt = 0, this.state = Ve.DISCONNECTED, this.log = re, this._requestId = 0, this.resetCallbacks = () => {
8838
8838
  this.onAnswer = void 0, this.onLeave = void 0, this.onLocalTrackPublished = void 0, this.onLocalTrackUnpublished = void 0, this.onNegotiateRequested = void 0, this.onOffer = void 0, this.onRemoteMuteChanged = void 0, this.onSubscribedQualityUpdate = void 0, this.onTokenRefresh = void 0, this.onTrickle = void 0, this.onClose = void 0;
8839
- }, this.log = yg((t = e.loggerName) !== null && t !== void 0 ? t : bi.Signal), this.loggerContextCb = e.loggerContextCb, this.useJSON = A, this.requestQueue = new nm(), this.queuedRequests = [], this.closingLock = new Pt(), this.connectionLock = new Pt(), this.state = Ve.DISCONNECTED;
8839
+ }, this.log = yg((t = e.loggerName) !== null && t !== void 0 ? t : Mi.Signal), this.loggerContextCb = e.loggerContextCb, this.useJSON = A, this.requestQueue = new nm(), this.queuedRequests = [], this.closingLock = new Pt(), this.connectionLock = new Pt(), this.state = Ve.DISCONNECTED;
8840
8840
  }
8841
8841
  get logContext() {
8842
8842
  var A, e;
@@ -9081,7 +9081,7 @@ class oE {
9081
9081
  return this.sendRequest({
9082
9082
  case: "leave",
9083
9083
  value: new Os({
9084
- reason: Si.CLIENT_INITIATED,
9084
+ reason: bi.CLIENT_INITIATED,
9085
9085
  // server doesn't process this field, keeping it here to indicate the intent of a full disconnect
9086
9086
  action: Dn.DISCONNECT
9087
9087
  })
@@ -9218,7 +9218,7 @@ function ps(i, A) {
9218
9218
  function Qm(i, A, e) {
9219
9219
  var t;
9220
9220
  const g = new URLSearchParams();
9221
- return g.set("access_token", i), e.reconnect && (g.set("reconnect", "1"), e.sid && g.set("sid", e.sid)), g.set("auto_subscribe", e.autoSubscribe ? "1" : "0"), g.set("sdk", zi() ? "reactnative" : "js"), g.set("version", A.version), g.set("protocol", A.protocol.toString()), A.deviceModel && g.set("device_model", A.deviceModel), A.os && g.set("os", A.os), A.osVersion && g.set("os_version", A.osVersion), A.browser && g.set("browser", A.browser), A.browserVersion && g.set("browser_version", A.browserVersion), e.adaptiveStream && g.set("adaptive_stream", "1"), e.reconnectReason && g.set("reconnect_reason", e.reconnectReason.toString()), !((t = navigator.connection) === null || t === void 0) && t.type && g.set("network", navigator.connection.type), g;
9221
+ return g.set("access_token", i), e.reconnect && (g.set("reconnect", "1"), e.sid && g.set("sid", e.sid)), g.set("auto_subscribe", e.autoSubscribe ? "1" : "0"), g.set("sdk", Ag() ? "reactnative" : "js"), g.set("version", A.version), g.set("protocol", A.protocol.toString()), A.deviceModel && g.set("device_model", A.deviceModel), A.os && g.set("os", A.os), A.osVersion && g.set("os_version", A.osVersion), A.browser && g.set("browser", A.browser), A.browserVersion && g.set("browser_version", A.browserVersion), e.adaptiveStream && g.set("adaptive_stream", "1"), e.reconnectReason && g.set("reconnect_reason", e.reconnectReason.toString()), !((t = navigator.connection) === null || t === void 0) && t.type && g.set("network", navigator.connection.type), g;
9222
9222
  }
9223
9223
  class W0 {
9224
9224
  constructor() {
@@ -9314,7 +9314,7 @@ class Bm {
9314
9314
  return A;
9315
9315
  }
9316
9316
  }
9317
- var Bi = {}, KC = {}, JC = { exports: {} }, Z0;
9317
+ var ci = {}, KC = {}, JC = { exports: {} }, Z0;
9318
9318
  function nE() {
9319
9319
  if (Z0) return JC.exports;
9320
9320
  Z0 = 1;
@@ -9899,10 +9899,10 @@ function cm() {
9899
9899
  }
9900
9900
  var $0;
9901
9901
  function dm() {
9902
- if ($0) return Bi;
9902
+ if ($0) return ci;
9903
9903
  $0 = 1;
9904
9904
  var i = Em(), A = cm(), e = nE();
9905
- return Bi.grammar = e, Bi.write = A, Bi.parse = i.parse, Bi.parseParams = i.parseParams, Bi.parseFmtpConfig = i.parseFmtpConfig, Bi.parsePayloads = i.parsePayloads, Bi.parseRemoteCandidates = i.parseRemoteCandidates, Bi.parseImageAttributes = i.parseImageAttributes, Bi.parseSimulcastStreamList = i.parseSimulcastStreamList, Bi;
9905
+ return ci.grammar = e, ci.write = A, ci.parse = i.parse, ci.parseParams = i.parseParams, ci.parseFmtpConfig = i.parseFmtpConfig, ci.parsePayloads = i.parsePayloads, ci.parseRemoteCandidates = i.parseRemoteCandidates, ci.parseImageAttributes = i.parseImageAttributes, ci.parseSimulcastStreamList = i.parseSimulcastStreamList, ci;
9906
9906
  }
9907
9907
  var Hg = dm();
9908
9908
  function IE(i, A, e) {
@@ -9948,7 +9948,7 @@ const hm = 0.7, lm = 20, _n = {
9948
9948
  NegotiationComplete: "negotiationComplete",
9949
9949
  RTPVideoPayloadTypes: "rtpVideoPayloadTypes"
9950
9950
  };
9951
- class Ac extends eg.EventEmitter {
9951
+ class Ac extends ig.EventEmitter {
9952
9952
  get pc() {
9953
9953
  return this._pc || (this._pc = this.createPC()), this._pc;
9954
9954
  }
@@ -9967,7 +9967,7 @@ class Ac extends eg.EventEmitter {
9967
9967
  }
9968
9968
  }), lm), this.close = () => {
9969
9969
  this._pc && (this._pc.close(), this._pc.onconnectionstatechange = null, this._pc.oniceconnectionstatechange = null, this._pc.onicegatheringstatechange = null, this._pc.ondatachannel = null, this._pc.onnegotiationneeded = null, this._pc.onsignalingstatechange = null, this._pc.onicecandidate = null, this._pc.ondatachannel = null, this._pc.ontrack = null, this._pc.onconnectionstatechange = null, this._pc.oniceconnectionstatechange = null, this._pc = null);
9970
- }, this.log = yg((t = e.loggerName) !== null && t !== void 0 ? t : bi.PCTransport), this.loggerOptions = e, this.config = A, this._pc = this.createPC(), this.offerLock = new Pt();
9970
+ }, this.log = yg((t = e.loggerName) !== null && t !== void 0 ? t : Mi.PCTransport), this.loggerOptions = e, this.config = A, this._pc = this.createPC(), this.offerLock = new Pt();
9971
9971
  }
9972
9972
  createPC() {
9973
9973
  const A = new RTCPeerConnection(this.config);
@@ -10084,7 +10084,7 @@ class Ac extends eg.EventEmitter {
10084
10084
  if (!I.msid || !a.cid || !I.msid.includes(a.cid))
10085
10085
  return !1;
10086
10086
  let s = 0;
10087
- if (I.rtp.some((r) => r.codec.toUpperCase() === a.codec.toUpperCase() ? (s = r.payload, !0) : !1), s === 0 || (Hi(a.codec) && !Uo() && this.ensureVideoDDExtensionForSVC(I, n), a.codec !== "av1"))
10087
+ if (I.rtp.some((r) => r.codec.toUpperCase() === a.codec.toUpperCase() ? (s = r.payload, !0) : !1), s === 0 || (Oi(a.codec) && !Uo() && this.ensureVideoDDExtensionForSVC(I, n), a.codec !== "av1"))
10088
10088
  return !0;
10089
10089
  const C = Math.round(a.maxbr * hm);
10090
10090
  for (const r of I.fmtp)
@@ -10332,12 +10332,12 @@ class Dm {
10332
10332
  var o;
10333
10333
  const n = this.state, I = this.requiredTransports.map((a) => a.getConnectionState());
10334
10334
  I.every((a) => a === "connected") ? this.state = At.CONNECTED : I.some((a) => a === "failed") ? this.state = At.FAILED : I.some((a) => a === "connecting") ? this.state = At.CONNECTING : I.every((a) => a === "closed") ? this.state = At.CLOSED : I.some((a) => a === "closed") ? this.state = At.CLOSING : I.every((a) => a === "new") && (this.state = At.NEW), n !== this.state && (this.log.debug("pc state change: from ".concat(At[n], " to ").concat(At[this.state]), this.logContext), (o = this.onStateChange) === null || o === void 0 || o.call(this, this.state, this.publisher.getConnectionState(), this.subscriber.getConnectionState()));
10335
- }, this.log = yg((g = t.loggerName) !== null && g !== void 0 ? g : bi.PCManager), this.loggerOptions = t, this.isPublisherConnectionRequired = !e, this.isSubscriberConnectionRequired = e, this.publisher = new Ac(A, t), this.subscriber = new Ac(A, t), this.publisher.onConnectionStateChange = this.updateState, this.subscriber.onConnectionStateChange = this.updateState, this.publisher.onIceConnectionStateChange = this.updateState, this.subscriber.onIceConnectionStateChange = this.updateState, this.publisher.onSignalingStatechange = this.updateState, this.subscriber.onSignalingStatechange = this.updateState, this.publisher.onIceCandidate = (o) => {
10335
+ }, this.log = yg((g = t.loggerName) !== null && g !== void 0 ? g : Mi.PCManager), this.loggerOptions = t, this.isPublisherConnectionRequired = !e, this.isSubscriberConnectionRequired = e, this.publisher = new Ac(A, t), this.subscriber = new Ac(A, t), this.publisher.onConnectionStateChange = this.updateState, this.subscriber.onConnectionStateChange = this.updateState, this.publisher.onIceConnectionStateChange = this.updateState, this.subscriber.onIceConnectionStateChange = this.updateState, this.publisher.onSignalingStatechange = this.updateState, this.subscriber.onSignalingStatechange = this.updateState, this.publisher.onIceCandidate = (o) => {
10336
10336
  var n;
10337
- (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, wi.PUBLISHER);
10337
+ (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, _i.PUBLISHER);
10338
10338
  }, this.subscriber.onIceCandidate = (o) => {
10339
10339
  var n;
10340
- (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, wi.SUBSCRIBER);
10340
+ (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, _i.SUBSCRIBER);
10341
10341
  }, this.subscriber.onDataChannel = (o) => {
10342
10342
  var n;
10343
10343
  (n = this.onDataChannel) === null || n === void 0 || n.call(this, o);
@@ -10395,7 +10395,7 @@ class Dm {
10395
10395
  }
10396
10396
  addIceCandidate(A, e) {
10397
10397
  return N(this, void 0, void 0, function* () {
10398
- e === wi.PUBLISHER ? yield this.publisher.addIceCandidate(A) : yield this.subscriber.addIceCandidate(A);
10398
+ e === _i.PUBLISHER ? yield this.publisher.addIceCandidate(A) : yield this.subscriber.addIceCandidate(A);
10399
10399
  });
10400
10400
  }
10401
10401
  createSubscriberAnswerFromOffer(A, e) {
@@ -10458,7 +10458,7 @@ class Dm {
10458
10458
  * Returns the first required transport's address if no explicit target is specified
10459
10459
  */
10460
10460
  getConnectedAddress(A) {
10461
- return A === wi.PUBLISHER ? this.publisher.getConnectedAddress() : A === wi.SUBSCRIBER ? this.publisher.getConnectedAddress() : this.requiredTransports[0].getConnectedAddress();
10461
+ return A === _i.PUBLISHER ? this.publisher.getConnectedAddress() : A === _i.SUBSCRIBER ? this.publisher.getConnectedAddress() : this.requiredTransports[0].getConnectedAddress();
10462
10462
  }
10463
10463
  get requiredTransports() {
10464
10464
  const A = [];
@@ -10851,7 +10851,7 @@ class Zl extends tA {
10851
10851
  }
10852
10852
  this._isUpstreamPaused = !0, this.emit(CA.UpstreamPaused, this);
10853
10853
  const t = ei();
10854
- if ((t == null ? void 0 : t.name) === "Safari" && $i(t.version, "12.0") < 0)
10854
+ if ((t == null ? void 0 : t.name) === "Safari" && eg(t.version, "12.0") < 0)
10855
10855
  throw new tE("pauseUpstream is not supported on Safari < 12.");
10856
10856
  ((A = this.sender.transport) === null || A === void 0 ? void 0 : A.state) !== "closed" && (yield this.sender.replaceTrack(null));
10857
10857
  } finally {
@@ -11115,7 +11115,7 @@ class ws extends Zl {
11115
11115
  var e;
11116
11116
  const t = yield this.trackChangeLock.lock();
11117
11117
  try {
11118
- if (!zi() && !this.audioContext)
11118
+ if (!Ag() && !this.audioContext)
11119
11119
  throw Error("Audio context needs to be set on LocalAudioTrack in order to enable processors");
11120
11120
  this.processor && (yield this.internalStopProcessor());
11121
11121
  const g = {
@@ -11191,7 +11191,7 @@ function cQ(i, A, e, t) {
11191
11191
  return [{}];
11192
11192
  n || (n = Lm(i, A, e, s), re.debug("using video encoding", n));
11193
11193
  const C = n.maxFramerate, r = new be(A, e, n.maxBitrate, n.maxFramerate, n.priority);
11194
- if (a && Hi(s)) {
11194
+ if (a && Oi(s)) {
11195
11195
  const d = new Xl(a), c = [];
11196
11196
  if (d.spatial > 3)
11197
11197
  throw new Error("unsupported scalabilityMode: ".concat(a));
@@ -11199,7 +11199,7 @@ function cQ(i, A, e, t) {
11199
11199
  if (YI() || // Even tho RN runs M114, it does not produce SVC layers when a single encoding
11200
11200
  // is provided. So we'll use the legacy SVC specification for now.
11201
11201
  // TODO: when we upstream libwebrtc, this will need additional verification
11202
- zi() || (h == null ? void 0 : h.name) === "Chrome" && $i(h == null ? void 0 : h.version, "113") < 0) {
11202
+ Ag() || (h == null ? void 0 : h.name) === "Chrome" && eg(h == null ? void 0 : h.version, "113") < 0) {
11203
11203
  const E = d.suffix == "h" ? 2 : 3, x = Kw(h);
11204
11204
  for (let p = 0; p < d.spatial; p += 1)
11205
11205
  c.push({
@@ -11298,7 +11298,7 @@ function qC(i, A, e, t) {
11298
11298
  C && (s.maxFramerate = C);
11299
11299
  const r = Lo() || n === 0;
11300
11300
  o.encoding.priority && r && (s.priority = o.encoding.priority, s.networkPriority = o.encoding.priority), g.push(s);
11301
- }), zi() && Jl() === "ios") {
11301
+ }), Ag() && Jl() === "ios") {
11302
11302
  let o;
11303
11303
  g.forEach((I) => {
11304
11304
  o ? I.maxFramerate && I.maxFramerate > o && (o = I.maxFramerate) : o = I.maxFramerate;
@@ -11535,7 +11535,7 @@ class ms extends Zl {
11535
11535
  quality: t,
11536
11536
  enabled: t <= A
11537
11537
  }));
11538
- this.log.debug("setting publishing quality. max quality ".concat(A), this.logContext), this.setPublishingLayers(Hi(this.codec), e);
11538
+ this.log.debug("setting publishing quality. max quality ".concat(A), this.logContext), this.setPublishingLayers(Oi(this.codec), e);
11539
11539
  }
11540
11540
  restartTrack(A) {
11541
11541
  return N(this, void 0, void 0, function* () {
@@ -11641,7 +11641,7 @@ class ms extends Zl {
11641
11641
  codecs: A,
11642
11642
  currentCodec: this.codec
11643
11643
  })), !this.codec && A.length > 0)
11644
- return yield this.setPublishingLayers(Hi(A[0].codec), A[0].qualities), [];
11644
+ return yield this.setPublishingLayers(Oi(A[0].codec), A[0].qualities), [];
11645
11645
  this.subscribedCodecs = A;
11646
11646
  const s = [];
11647
11647
  try {
@@ -11649,7 +11649,7 @@ class ms extends Zl {
11649
11649
  a = g.value, e = !1;
11650
11650
  const C = a;
11651
11651
  if (!this.codec || this.codec === C.codec)
11652
- yield this.setPublishingLayers(Hi(C.codec), C.qualities);
11652
+ yield this.setPublishingLayers(Oi(C.codec), C.qualities);
11653
11653
  else {
11654
11654
  const r = this.simulcastCodecs.get(C.codec);
11655
11655
  if (this.log.debug("try setPublishingCodec for ".concat(C.codec), Object.assign(Object.assign({}, this.logContext), {
@@ -11660,7 +11660,7 @@ class ms extends Zl {
11660
11660
  s.push(C.codec);
11661
11661
  break;
11662
11662
  }
11663
- } else r.encodings && (this.log.debug("try setPublishingLayersForSender ".concat(C.codec), this.logContext), yield nc(r.sender, r.encodings, C.qualities, this.senderLock, Hi(C.codec), this.log, this.logContext));
11663
+ } else r.encodings && (this.log.debug("try setPublishingLayersForSender ".concat(C.codec), this.logContext), yield nc(r.sender, r.encodings, C.qualities, this.senderLock, Oi(C.codec), this.log, this.logContext));
11664
11664
  }
11665
11665
  }
11666
11666
  } catch (C) {
@@ -11711,7 +11711,7 @@ class ms extends Zl {
11711
11711
  return Object.assign(Object.assign({}, t), {
11712
11712
  active: g === 0,
11713
11713
  scaleResolutionDownBy: Math.max(1, Math.ceil(((o = this.mediaStreamTrack.getSettings().height) !== null && o !== void 0 ? o : 360) / 360)),
11714
- scalabilityMode: g === 0 && Hi(this.codec) ? "L1T3" : void 0,
11714
+ scalabilityMode: g === 0 && Oi(this.codec) ? "L1T3" : void 0,
11715
11715
  maxFramerate: g === 0 ? 15 : 0,
11716
11716
  maxBitrate: g === 0 ? t.maxBitrate : 0
11717
11717
  });
@@ -11821,11 +11821,11 @@ function Ic(i, A, e, t) {
11821
11821
  });
11822
11822
  }
11823
11823
  const ac = "_lossy", sc = "_reliable", Jm = 2 * 1e3, HC = "leave-reconnect", Ym = 3e4;
11824
- var li;
11824
+ var ui;
11825
11825
  (function(i) {
11826
11826
  i[i.New = 0] = "New", i[i.Connected = 1] = "Connected", i[i.Disconnected = 2] = "Disconnected", i[i.Reconnecting = 3] = "Reconnecting", i[i.Closed = 4] = "Closed";
11827
- })(li || (li = {}));
11828
- class qm extends eg.EventEmitter {
11827
+ })(ui || (ui = {}));
11828
+ class qm extends ig.EventEmitter {
11829
11829
  get isClosed() {
11830
11830
  return this._isClosed;
11831
11831
  }
@@ -11834,7 +11834,7 @@ class qm extends eg.EventEmitter {
11834
11834
  }
11835
11835
  constructor(A) {
11836
11836
  var e;
11837
- super(), this.options = A, this.rtcConfig = {}, this.peerConnectionTimeout = aE.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.latestRemoteOfferId = 0, this.subscriberPrimary = !1, this.pcState = li.New, this._isClosed = !0, this.pendingTrackResolvers = {}, this.reconnectAttempts = 0, this.reconnectStart = 0, this.attemptingReconnect = !1, this.joinAttempts = 0, this.maxJoinAttempts = 1, this.shouldFailNext = !1, this.log = re, this.reliableDataSequence = 1, this.reliableMessageBuffer = new W0(), this.reliableReceivedState = new Bm(Ym), this.handleDataChannel = (t) => N(this, [t], void 0, function(g) {
11837
+ super(), this.options = A, this.rtcConfig = {}, this.peerConnectionTimeout = aE.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.latestRemoteOfferId = 0, this.subscriberPrimary = !1, this.pcState = ui.New, this._isClosed = !0, this.pendingTrackResolvers = {}, this.reconnectAttempts = 0, this.reconnectStart = 0, this.attemptingReconnect = !1, this.joinAttempts = 0, this.maxJoinAttempts = 1, this.shouldFailNext = !1, this.log = re, this.reliableDataSequence = 1, this.reliableMessageBuffer = new W0(), this.reliableReceivedState = new Bm(Ym), this.handleDataChannel = (t) => N(this, [t], void 0, function(g) {
11838
11838
  var o = this;
11839
11839
  let {
11840
11840
  channel: n
@@ -11909,7 +11909,7 @@ class qm extends eg.EventEmitter {
11909
11909
  }
11910
11910
  t === HC && (I = 0), this.log.debug("reconnecting in ".concat(I, "ms"), this.logContext), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = Dt.setTimeout(() => this.attemptReconnect(g).finally(() => this.reconnectTimeout = void 0), I);
11911
11911
  }, this.waitForRestarted = () => new Promise((t, g) => {
11912
- this.pcState === li.Connected && t();
11912
+ this.pcState === ui.Connected && t();
11913
11913
  const o = () => {
11914
11914
  this.off(BA.Disconnected, n), t();
11915
11915
  }, n = () => {
@@ -11925,7 +11925,7 @@ class qm extends eg.EventEmitter {
11925
11925
  return t === ee.RELIABLE && this.reliableMessageBuffer.alignBufferedAmount(g.bufferedAmount), g.bufferedAmount <= g.bufferedAmountLowThreshold;
11926
11926
  }, this.handleBrowserOnLine = () => {
11927
11927
  this.client.currentState === Ve.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(jo.RR_SIGNAL_DISCONNECTED));
11928
- }, this.log = yg((e = A.loggerName) !== null && e !== void 0 ? e : bi.Engine), this.loggerOptions = {
11928
+ }, this.log = yg((e = A.loggerName) !== null && e !== void 0 ? e : Mi.Engine), this.loggerOptions = {
11929
11929
  loggerName: A.loggerName,
11930
11930
  loggerContextCb: () => this.logContext
11931
11931
  }, this.client = new oE(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new Pt(), this.dataProcessLock = new Pt(), this.dcBufferStatus = /* @__PURE__ */ new Map([[ee.LOSSY, !0], [ee.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(BA.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(BA.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(BA.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(BA.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(BA.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(BA.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(BA.StreamStateChanged, t), this.client.onRequestResponse = (t) => this.emit(BA.SignalRequestResponse, t);
@@ -12052,9 +12052,9 @@ class qm extends eg.EventEmitter {
12052
12052
  this.client.sendOffer(o, n);
12053
12053
  }, this.pcManager.onDataChannel = this.handleDataChannel, this.pcManager.onStateChange = (o, n, I) => N(this, void 0, void 0, function* () {
12054
12054
  if (this.log.debug("primary PC state changed ".concat(o), this.logContext), ["closed", "disconnected", "failed"].includes(n) && (this.publisherConnectionPromise = void 0), o === At.CONNECTED) {
12055
- const C = this.pcState === li.New;
12056
- this.pcState = li.Connected, C && this.emit(BA.Connected, A);
12057
- } else o === At.FAILED && this.pcState === li.Connected && (this.pcState = li.Disconnected, this.handleDisconnect("peerconnection failed", I === "failed" ? jo.RR_SUBSCRIBER_FAILED : jo.RR_PUBLISHER_FAILED));
12055
+ const C = this.pcState === ui.New;
12056
+ this.pcState = ui.Connected, C && this.emit(BA.Connected, A);
12057
+ } else o === At.FAILED && this.pcState === ui.Connected && (this.pcState = ui.Disconnected, this.handleDisconnect("peerconnection failed", I === "failed" ? jo.RR_SUBSCRIBER_FAILED : jo.RR_PUBLISHER_FAILED));
12058
12058
  const a = this.client.isDisconnected || this.client.currentState === Ve.RECONNECTING, s = [At.FAILED, At.CLOSING, At.CLOSED].includes(o);
12059
12059
  a && s && !this._isClosed && this.emit(BA.Offline);
12060
12060
  }), this.pcManager.onTrack = (o) => {
@@ -12298,13 +12298,13 @@ class qm extends eg.EventEmitter {
12298
12298
  }
12299
12299
  waitForPCReconnected() {
12300
12300
  return N(this, void 0, void 0, function* () {
12301
- this.pcState = li.Reconnecting, this.log.debug("waiting for peer connection to reconnect", this.logContext);
12301
+ this.pcState = ui.Reconnecting, this.log.debug("waiting for peer connection to reconnect", this.logContext);
12302
12302
  try {
12303
12303
  if (yield Ot(Jm), !this.pcManager)
12304
12304
  throw new Qt("PC manager is closed");
12305
- yield this.pcManager.ensurePCTransportConnection(void 0, this.peerConnectionTimeout), this.pcState = li.Connected;
12305
+ yield this.pcManager.ensurePCTransportConnection(void 0, this.peerConnectionTimeout), this.pcState = ui.Connected;
12306
12306
  } catch (A) {
12307
- throw this.pcState = li.Disconnected, new Le("could not establish PC connection, ".concat(A.message), Be.InternalError);
12307
+ throw this.pcState = ui.Disconnected, new Le("could not establish PC connection, ".concat(A.message), Be.InternalError);
12308
12308
  }
12309
12309
  });
12310
12310
  }
@@ -12509,7 +12509,7 @@ class qm extends eg.EventEmitter {
12509
12509
  target: g
12510
12510
  }));
12511
12511
  };
12512
- return e(this.dataChannelForKind(ee.LOSSY), wi.PUBLISHER), e(this.dataChannelForKind(ee.RELIABLE), wi.PUBLISHER), e(this.dataChannelForKind(ee.LOSSY, !0), wi.SUBSCRIBER), e(this.dataChannelForKind(ee.RELIABLE, !0), wi.SUBSCRIBER), A;
12512
+ return e(this.dataChannelForKind(ee.LOSSY), _i.PUBLISHER), e(this.dataChannelForKind(ee.RELIABLE), _i.PUBLISHER), e(this.dataChannelForKind(ee.LOSSY, !0), _i.SUBSCRIBER), e(this.dataChannelForKind(ee.RELIABLE, !0), _i.SUBSCRIBER), A;
12513
12513
  }
12514
12514
  clearReconnectTimeout() {
12515
12515
  this.reconnectTimeout && Dt.clearTimeout(this.reconnectTimeout);
@@ -12596,9 +12596,9 @@ class $l {
12596
12596
  let A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
12597
12597
  if (!(typeof this.totalByteSize != "number" || this.totalByteSize === 0)) {
12598
12598
  if (A && this.bytesReceived < this.totalByteSize)
12599
- throw new Vg("Not enough chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, only received ").concat(this.bytesReceived, " bytes"), mi.Incomplete);
12599
+ throw new Vg("Not enough chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, only received ").concat(this.bytesReceived, " bytes"), ki.Incomplete);
12600
12600
  if (this.bytesReceived > this.totalByteSize)
12601
- throw new Vg("Extra chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, received ").concat(this.bytesReceived, " bytes"), mi.LengthExceeded);
12601
+ throw new Vg("Extra chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, received ").concat(this.bytesReceived, " bytes"), ki.LengthExceeded);
12602
12602
  }
12603
12603
  }
12604
12604
  constructor(A, e, t, g) {
@@ -12614,7 +12614,7 @@ class Vm extends $l {
12614
12614
  }
12615
12615
  [Symbol.asyncIterator]() {
12616
12616
  const A = this.reader.getReader();
12617
- let e = new Pi(), t = null, g = null;
12617
+ let e = new Vi(), t = null, g = null;
12618
12618
  if (this.signal) {
12619
12619
  const n = this.signal;
12620
12620
  g = () => {
@@ -12729,7 +12729,7 @@ class jm extends $l {
12729
12729
  const A = this.reader.getReader(), e = new TextDecoder("utf-8", {
12730
12730
  fatal: !0
12731
12731
  });
12732
- let t = new Pi(), g = null, o = null;
12732
+ let t = new Vi(), g = null, o = null;
12733
12733
  if (this.signal) {
12734
12734
  const I = this.signal;
12735
12735
  o = () => {
@@ -12766,7 +12766,7 @@ class jm extends $l {
12766
12766
  try {
12767
12767
  r = e.decode(C.content);
12768
12768
  } catch (Q) {
12769
- throw new Vg("Cannot decode datastream chunk ".concat(C.chunkIndex, " as text: ").concat(Q), mi.DecodeFailed);
12769
+ throw new Vg("Cannot decode datastream chunk ".concat(C.chunkIndex, " as text: ").concat(Q), ki.DecodeFailed);
12770
12770
  }
12771
12771
  return {
12772
12772
  done: !1,
@@ -12832,7 +12832,7 @@ class Wm {
12832
12832
  }
12833
12833
  registerTextStreamHandler(A, e) {
12834
12834
  if (this.textStreamHandlers.has(A))
12835
- throw new Vg('A text stream handler for topic "'.concat(A, '" has already been set.'), mi.HandlerAlreadyRegistered);
12835
+ throw new Vg('A text stream handler for topic "'.concat(A, '" has already been set.'), ki.HandlerAlreadyRegistered);
12836
12836
  this.textStreamHandlers.set(A, e);
12837
12837
  }
12838
12838
  unregisterTextStreamHandler(A) {
@@ -12840,7 +12840,7 @@ class Wm {
12840
12840
  }
12841
12841
  registerByteStreamHandler(A, e) {
12842
12842
  if (this.byteStreamHandlers.has(A))
12843
- throw new Vg('A byte stream handler for topic "'.concat(A, '" has already been set.'), mi.HandlerAlreadyRegistered);
12843
+ throw new Vg('A byte stream handler for topic "'.concat(A, '" has already been set.'), ki.HandlerAlreadyRegistered);
12844
12844
  this.byteStreamHandlers.set(A, e);
12845
12845
  }
12846
12846
  unregisterByteStreamHandler(A) {
@@ -12853,7 +12853,7 @@ class Wm {
12853
12853
  var e, t, g, o;
12854
12854
  const n = Array.from(this.textStreamControllers.entries()).filter((a) => a[1].sendingParticipantIdentity === A), I = Array.from(this.byteStreamControllers.entries()).filter((a) => a[1].sendingParticipantIdentity === A);
12855
12855
  if (n.length > 0 || I.length > 0) {
12856
- const a = new Vg("Participant ".concat(A, " unexpectedly disconnected in the middle of sending data"), mi.AbnormalEnd);
12856
+ const a = new Vg("Participant ".concat(A, " unexpectedly disconnected in the middle of sending data"), ki.AbnormalEnd);
12857
12857
  for (const [s, C] of I)
12858
12858
  (t = (e = C.outOfBandFailureRejectingFuture).reject) === null || t === void 0 || t.call(e, a), this.byteStreamControllers.delete(s);
12859
12859
  for (const [s, C] of n)
@@ -12884,7 +12884,7 @@ class Wm {
12884
12884
  return;
12885
12885
  }
12886
12886
  let o;
12887
- const n = new Pi(), I = {
12887
+ const n = new Vi(), I = {
12888
12888
  id: A.streamId,
12889
12889
  name: (t = A.contentHeader.value.name) !== null && t !== void 0 ? t : "unknown",
12890
12890
  mimeType: A.mimeType,
@@ -12895,7 +12895,7 @@ class Wm {
12895
12895
  }, a = new ReadableStream({
12896
12896
  start: (s) => {
12897
12897
  if (o = s, this.textStreamControllers.has(A.streamId))
12898
- throw new Vg("A data stream read is already in progress for a stream with id ".concat(A.streamId, "."), mi.AlreadyOpened);
12898
+ throw new Vg("A data stream read is already in progress for a stream with id ".concat(A.streamId, "."), ki.AlreadyOpened);
12899
12899
  this.byteStreamControllers.set(A.streamId, {
12900
12900
  info: I,
12901
12901
  controller: o,
@@ -12915,7 +12915,7 @@ class Wm {
12915
12915
  return;
12916
12916
  }
12917
12917
  let o;
12918
- const n = new Pi(), I = {
12918
+ const n = new Vi(), I = {
12919
12919
  id: A.streamId,
12920
12920
  mimeType: A.mimeType,
12921
12921
  size: A.totalLength ? Number(A.totalLength) : void 0,
@@ -12925,7 +12925,7 @@ class Wm {
12925
12925
  }, a = new ReadableStream({
12926
12926
  start: (s) => {
12927
12927
  if (o = s, this.textStreamControllers.has(A.streamId))
12928
- throw new Vg("A data stream read is already in progress for a stream with id ".concat(A.streamId, "."), mi.AlreadyOpened);
12928
+ throw new Vg("A data stream read is already in progress for a stream with id ".concat(A.streamId, "."), ki.AlreadyOpened);
12929
12929
  this.textStreamControllers.set(A.streamId, {
12930
12930
  info: I,
12931
12931
  controller: o,
@@ -13305,7 +13305,7 @@ class $m extends ex {
13305
13305
  var e;
13306
13306
  for (const t of this.attachedElements)
13307
13307
  this.audioContext ? (e = this.gainNode) === null || e === void 0 || e.gain.setTargetAtTime(A, 0, 0.1) : t.volume = A;
13308
- zi() && this._mediaStreamTrack._setVolume(A), this.elementVolume = A;
13308
+ Ag() && this._mediaStreamTrack._setVolume(A), this.elementVolume = A;
13309
13309
  }
13310
13310
  /**
13311
13311
  * gets the volume of attached audio elements (loudest)
@@ -13313,7 +13313,7 @@ class $m extends ex {
13313
13313
  getVolume() {
13314
13314
  if (this.elementVolume)
13315
13315
  return this.elementVolume;
13316
- if (zi())
13316
+ if (Ag())
13317
13317
  return 1;
13318
13318
  let A = 0;
13319
13319
  return this.attachedElements.forEach((e) => {
@@ -13608,14 +13608,14 @@ function hQ(i, A) {
13608
13608
  i = i.offsetParent, t += i.offsetTop, g += i.offsetLeft;
13609
13609
  return t < e.pageYOffset + e.innerHeight && g < e.pageXOffset + e.innerWidth && t + n > e.pageYOffset && g + o > e.pageXOffset && !I && a !== "none";
13610
13610
  }
13611
- class Eg extends eg.EventEmitter {
13611
+ class Eg extends ig.EventEmitter {
13612
13612
  constructor(A, e, t, g) {
13613
13613
  var o;
13614
13614
  super(), this.metadataMuted = !1, this.encryption = $t.NONE, this.log = re, this.handleMuted = () => {
13615
13615
  this.emit(CA.Muted);
13616
13616
  }, this.handleUnmuted = () => {
13617
13617
  this.emit(CA.Unmuted);
13618
- }, this.log = yg((o = g == null ? void 0 : g.loggerName) !== null && o !== void 0 ? o : bi.Publication), this.loggerContextCb = this.loggerContextCb, this.setMaxListeners(100), this.kind = A, this.trackSid = e, this.trackName = t, this.source = tA.Source.Unknown;
13618
+ }, this.log = yg((o = g == null ? void 0 : g.loggerName) !== null && o !== void 0 ? o : Mi.Publication), this.loggerContextCb = this.loggerContextCb, this.setMaxListeners(100), this.kind = A, this.trackSid = e, this.trackName = t, this.source = tA.Source.Unknown;
13619
13619
  }
13620
13620
  /** @internal */
13621
13621
  setTrack(A) {
@@ -13641,7 +13641,7 @@ class Eg extends eg.EventEmitter {
13641
13641
  * an [AudioTrack] if this publication holds an audio track
13642
13642
  */
13643
13643
  get audioTrack() {
13644
- if (ji(this.track))
13644
+ if (Zi(this.track))
13645
13645
  return this.track;
13646
13646
  }
13647
13647
  /**
@@ -13736,7 +13736,7 @@ class lQ extends Eg {
13736
13736
  }
13737
13737
  getTrackFeatures() {
13738
13738
  var A;
13739
- if (ji(this.track)) {
13739
+ if (Zi(this.track)) {
13740
13740
  const e = this.track.getSourceTrackSettings(), t = /* @__PURE__ */ new Set();
13741
13741
  return e.autoGainControl && t.add(xt.TF_AUTO_GAIN_CONTROL), e.echoCancellation && t.add(xt.TF_ECHO_CANCELLATION), e.noiseSuppression && t.add(xt.TF_NOISE_SUPPRESSION), e.channelCount && e.channelCount > 1 && t.add(xt.TF_STEREO), !((A = this.options) === null || A === void 0) && A.dtx || t.add(xt.TF_NO_DTX), this.track.enhancedNoiseCancellation && t.add(xt.TF_ENHANCED_NOISE_CANCELLATION), Array.from(t.values());
13742
13742
  } else return [];
@@ -13793,7 +13793,7 @@ function Ws(i, A) {
13793
13793
  deviceId: E
13794
13794
  });
13795
13795
  const x = Sm(Q, c, A);
13796
- return x.kind === tA.Kind.Video ? x.source = tA.Source.Camera : x.kind === tA.Kind.Audio && (x.source = tA.Source.Microphone), x.mediaStream = r, ji(x) && t ? yield x.setProcessor(t) : Qo(x) && g && (yield x.setProcessor(g)), x;
13796
+ return x.kind === tA.Kind.Video ? x.source = tA.Source.Camera : x.kind === tA.Kind.Audio && (x.source = tA.Source.Microphone), x.mediaStream = r, Zi(x) && t ? yield x.setProcessor(t) : Qo(x) && g && (yield x.setProcessor(g)), x;
13797
13797
  })));
13798
13798
  } catch (r) {
13799
13799
  if (!e)
@@ -13839,7 +13839,7 @@ function g_(i) {
13839
13839
  return jg.Unknown;
13840
13840
  }
13841
13841
  }
13842
- class tx extends eg.EventEmitter {
13842
+ class tx extends ig.EventEmitter {
13843
13843
  get logContext() {
13844
13844
  var A, e;
13845
13845
  return Object.assign({}, (e = (A = this.loggerOptions) === null || A === void 0 ? void 0 : A.loggerContextCb) === null || e === void 0 ? void 0 : e.call(A));
@@ -13866,7 +13866,7 @@ class tx extends eg.EventEmitter {
13866
13866
  constructor(A, e, t, g, o, n) {
13867
13867
  let I = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : KI.STANDARD;
13868
13868
  var a;
13869
- super(), this.audioLevel = 0, this.isSpeaking = !1, this._connectionQuality = jg.Unknown, this.log = re, this.log = yg((a = n == null ? void 0 : n.loggerName) !== null && a !== void 0 ? a : bi.Participant), this.loggerOptions = n, this.setMaxListeners(100), this.sid = A, this.identity = e, this.name = t, this.metadata = g, this.audioTrackPublications = /* @__PURE__ */ new Map(), this.videoTrackPublications = /* @__PURE__ */ new Map(), this.trackPublications = /* @__PURE__ */ new Map(), this._kind = I, this._attributes = o ?? {};
13869
+ super(), this.audioLevel = 0, this.isSpeaking = !1, this._connectionQuality = jg.Unknown, this.log = re, this.log = yg((a = n == null ? void 0 : n.loggerName) !== null && a !== void 0 ? a : Mi.Participant), this.loggerOptions = n, this.setMaxListeners(100), this.sid = A, this.identity = e, this.name = t, this.metadata = g, this.audioTrackPublications = /* @__PURE__ */ new Map(), this.videoTrackPublications = /* @__PURE__ */ new Map(), this.trackPublications = /* @__PURE__ */ new Map(), this._kind = I, this._attributes = o ?? {};
13870
13870
  }
13871
13871
  getTrackPublications() {
13872
13872
  return Array.from(this.trackPublications.values());
@@ -13893,7 +13893,7 @@ class tx extends eg.EventEmitter {
13893
13893
  * @returns a promise that resolves when the participant is active
13894
13894
  */
13895
13895
  waitUntilActive() {
13896
- return this.isActive ? Promise.resolve() : this.activeFuture ? this.activeFuture.promise : (this.activeFuture = new Pi(), this.once(QA.Active, () => {
13896
+ return this.isActive ? Promise.resolve() : this.activeFuture ? this.activeFuture.promise : (this.activeFuture = new Vi(), this.once(QA.Active, () => {
13897
13897
  var A, e;
13898
13898
  (e = (A = this.activeFuture) === null || A === void 0 ? void 0 : A.resolve) === null || e === void 0 || e.call(A), this.activeFuture = void 0;
13899
13899
  }), this.activeFuture.promise);
@@ -13973,7 +13973,7 @@ class tx extends eg.EventEmitter {
13973
13973
  * @internal
13974
13974
  */
13975
13975
  setAudioContext(A) {
13976
- this.audioContext = A, this.audioTrackPublications.forEach((e) => ji(e.track) && e.track.setAudioContext(A));
13976
+ this.audioContext = A, this.audioTrackPublications.forEach((e) => Zi(e.track) && e.track.setAudioContext(A));
13977
13977
  }
13978
13978
  addTrackPublication(A) {
13979
13979
  A.on(CA.Muted, () => {
@@ -14010,7 +14010,7 @@ class n_ extends tx {
14010
14010
  loggerName: g.loggerName,
14011
14011
  loggerContextCb: () => this.engine.logContext
14012
14012
  }), this.pendingPublishing = /* @__PURE__ */ new Set(), this.pendingPublishPromises = /* @__PURE__ */ new Map(), this.participantTrackPermissions = [], this.allParticipantsAllowedToSubscribe = !0, this.encryptionType = $t.NONE, this.enabledPublishVideoCodecs = [], this.pendingAcks = /* @__PURE__ */ new Map(), this.pendingResponses = /* @__PURE__ */ new Map(), this.handleReconnecting = () => {
14013
- this.reconnectFuture || (this.reconnectFuture = new Pi());
14013
+ this.reconnectFuture || (this.reconnectFuture = new Vi());
14014
14014
  }, this.handleReconnected = () => {
14015
14015
  var I, a;
14016
14016
  (a = (I = this.reconnectFuture) === null || I === void 0 ? void 0 : I.resolve) === null || a === void 0 || a.call(I), this.reconnectFuture = void 0, this.updateTrackSubscriptionPermissions();
@@ -14019,7 +14019,7 @@ class n_ extends tx {
14019
14019
  this.reconnectFuture && (this.reconnectFuture.promise.catch((B) => this.log.warn(B.message, this.logContext)), (a = (I = this.reconnectFuture) === null || I === void 0 ? void 0 : I.reject) === null || a === void 0 || a.call(I, "Got disconnected during reconnection attempt"), this.reconnectFuture = void 0), this.signalConnectedFuture && ((C = (s = this.signalConnectedFuture).reject) === null || C === void 0 || C.call(s, "Got disconnected without signal connected"), this.signalConnectedFuture = void 0), (Q = (r = this.activeAgentFuture) === null || r === void 0 ? void 0 : r.reject) === null || Q === void 0 || Q.call(r, "Got disconnected without active agent present"), this.activeAgentFuture = void 0, this.firstActiveAgent = void 0;
14020
14020
  }, this.handleSignalConnected = (I) => {
14021
14021
  var a, s;
14022
- I.participant && this.updateInfo(I.participant), this.signalConnectedFuture || (this.signalConnectedFuture = new Pi()), (s = (a = this.signalConnectedFuture).resolve) === null || s === void 0 || s.call(a);
14022
+ I.participant && this.updateInfo(I.participant), this.signalConnectedFuture || (this.signalConnectedFuture = new Vi()), (s = (a = this.signalConnectedFuture).resolve) === null || s === void 0 || s.call(a);
14023
14023
  }, this.handleSignalRequestResponse = (I) => {
14024
14024
  const {
14025
14025
  requestId: a,
@@ -14109,7 +14109,7 @@ class n_ extends tx {
14109
14109
  this.log.debug("unpublishing local track due to TrackEnded", Object.assign(Object.assign({}, this.logContext), Ie(I))), this.unpublishTrack(I);
14110
14110
  else if (I.isUserProvided)
14111
14111
  yield I.mute();
14112
- else if (sg(I) || vg(I))
14112
+ else if (rg(I) || vg(I))
14113
14113
  try {
14114
14114
  if (Ht())
14115
14115
  try {
@@ -14124,7 +14124,7 @@ class n_ extends tx {
14124
14124
  }, new Error("GetUserMedia Permission denied");
14125
14125
  } catch {
14126
14126
  }
14127
- I.isMuted || (this.log.debug("track ended, attempting to use a different device", Object.assign(Object.assign({}, this.logContext), Ie(I))), sg(I) ? yield I.restartTrack({
14127
+ I.isMuted || (this.log.debug("track ended, attempting to use a different device", Object.assign(Object.assign({}, this.logContext), Ie(I))), rg(I) ? yield I.restartTrack({
14128
14128
  deviceId: "default"
14129
14129
  }) : yield I.restartTrack());
14130
14130
  } catch {
@@ -14323,7 +14323,7 @@ class n_ extends tx {
14323
14323
  }
14324
14324
  for (const s of a) {
14325
14325
  const C = Object.assign(Object.assign({}, this.roomOptions.publishDefaults), t);
14326
- A === tA.Source.Microphone && ji(s) && C.preConnectBuffer && (this.log.info("starting preconnect buffer for microphone", Object.assign({}, this.logContext)), s.startPreConnectBuffer());
14326
+ A === tA.Source.Microphone && Zi(s) && C.preConnectBuffer && (this.log.info("starting preconnect buffer for microphone", Object.assign({}, this.logContext)), s.startPreConnectBuffer());
14327
14327
  }
14328
14328
  try {
14329
14329
  const s = [];
@@ -14384,7 +14384,7 @@ class n_ extends tx {
14384
14384
  return (yield Ws(g, {
14385
14385
  loggerName: this.roomOptions.loggerName,
14386
14386
  loggerContextCb: () => this.logContext
14387
- })).map((I) => (ji(I) && (this.microphoneError = void 0, I.setAudioContext(this.audioContext), I.source = tA.Source.Microphone, this.emit(QA.AudioStreamAcquired)), Qo(I) && (this.cameraError = void 0, I.source = tA.Source.Camera), I));
14387
+ })).map((I) => (Zi(I) && (this.microphoneError = void 0, I.setAudioContext(this.audioContext), I.source = tA.Source.Microphone, this.emit(QA.AudioStreamAcquired)), Qo(I) && (this.cameraError = void 0, I.source = tA.Source.Camera), I));
14388
14388
  } catch (o) {
14389
14389
  throw o instanceof Error && (A.audio && (this.microphoneError = o), A.video && (this.cameraError = o)), o;
14390
14390
  }
@@ -14436,7 +14436,7 @@ class n_ extends tx {
14436
14436
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
14437
14437
  return function* () {
14438
14438
  var I, a, s, C;
14439
- sg(t) && t.setAudioContext(o.audioContext), yield (I = o.reconnectFuture) === null || I === void 0 ? void 0 : I.promise, o.republishPromise && !n && (yield o.republishPromise), mn(t) && o.pendingPublishPromises.has(t) && (yield o.pendingPublishPromises.get(t));
14439
+ rg(t) && t.setAudioContext(o.audioContext), yield (I = o.reconnectFuture) === null || I === void 0 ? void 0 : I.promise, o.republishPromise && !n && (yield o.republishPromise), mn(t) && o.pendingPublishPromises.has(t) && (yield o.pendingPublishPromises.get(t));
14440
14440
  let r;
14441
14441
  if (t instanceof MediaStreamTrack)
14442
14442
  r = t.getConstraints();
@@ -14521,7 +14521,7 @@ class n_ extends tx {
14521
14521
  });
14522
14522
  }
14523
14523
  waitUntilEngineConnected() {
14524
- return this.signalConnectedFuture || (this.signalConnectedFuture = new Pi()), this.signalConnectedFuture.promise;
14524
+ return this.signalConnectedFuture || (this.signalConnectedFuture = new Vi()), this.signalConnectedFuture.promise;
14525
14525
  }
14526
14526
  hasPermissionsToPublish(A) {
14527
14527
  if (!this.permissions)
@@ -14537,11 +14537,11 @@ class n_ extends tx {
14537
14537
  var g, o, n, I, a, s, C, r, Q, B;
14538
14538
  if (!this.hasPermissionsToPublish(A))
14539
14539
  throw new L0("failed to publish track, insufficient permissions", 403);
14540
- Array.from(this.trackPublications.values()).find((l) => mn(A) && l.source === A.source) && A.source !== tA.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(A.source), Object.assign(Object.assign({}, this.logContext), Ie(A))), e.stopMicTrackOnMute && ji(A) && (A.stopOnMute = !0), A.source === tA.Source.ScreenShare && Lo() && (e.simulcast = !1), e.videoCodec === "av1" && !vw() && (e.videoCodec = void 0), e.videoCodec === "vp9" && !Lw() && (e.videoCodec = void 0), e.videoCodec === void 0 && (e.videoCodec = BQ), this.enabledPublishVideoCodecs.length > 0 && (this.enabledPublishVideoCodecs.some((l) => e.videoCodec === RI(l.mime)) || (e.videoCodec = RI(this.enabledPublishVideoCodecs[0].mime)));
14540
+ Array.from(this.trackPublications.values()).find((l) => mn(A) && l.source === A.source) && A.source !== tA.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(A.source), Object.assign(Object.assign({}, this.logContext), Ie(A))), e.stopMicTrackOnMute && Zi(A) && (A.stopOnMute = !0), A.source === tA.Source.ScreenShare && Lo() && (e.simulcast = !1), e.videoCodec === "av1" && !vw() && (e.videoCodec = void 0), e.videoCodec === "vp9" && !Lw() && (e.videoCodec = void 0), e.videoCodec === void 0 && (e.videoCodec = BQ), this.enabledPublishVideoCodecs.length > 0 && (this.enabledPublishVideoCodecs.some((l) => e.videoCodec === RI(l.mime)) || (e.videoCodec = RI(this.enabledPublishVideoCodecs[0].mime)));
14541
14541
  const c = e.videoCodec;
14542
14542
  A.on(CA.Muted, this.onTrackMuted), A.on(CA.Unmuted, this.onTrackUnmuted), A.on(CA.Ended, this.handleTrackEnded), A.on(CA.UpstreamPaused, this.onTrackUpstreamPaused), A.on(CA.UpstreamResumed, this.onTrackUpstreamResumed), A.on(CA.AudioTrackFeatureUpdate, this.onTrackFeatureUpdate);
14543
14543
  const h = [], E = !(!((g = e.dtx) !== null && g !== void 0) || g), x = A.getSourceTrackSettings();
14544
- x.autoGainControl && h.push(xt.TF_AUTO_GAIN_CONTROL), x.echoCancellation && h.push(xt.TF_ECHO_CANCELLATION), x.noiseSuppression && h.push(xt.TF_NOISE_SUPPRESSION), x.channelCount && x.channelCount > 1 && h.push(xt.TF_STEREO), E && h.push(xt.TF_NO_DTX), sg(A) && A.hasPreConnectBuffer && h.push(xt.TF_PRECONNECT_BUFFER);
14544
+ x.autoGainControl && h.push(xt.TF_AUTO_GAIN_CONTROL), x.echoCancellation && h.push(xt.TF_ECHO_CANCELLATION), x.noiseSuppression && h.push(xt.TF_NOISE_SUPPRESSION), x.channelCount && x.channelCount > 1 && h.push(xt.TF_STEREO), E && h.push(xt.TF_NO_DTX), rg(A) && A.hasPreConnectBuffer && h.push(xt.TF_PRECONNECT_BUFFER);
14545
14545
  const p = new Vr({
14546
14546
  // get local track id for use during publishing
14547
14547
  cid: A.mediaStreamTrack.id,
@@ -14574,7 +14574,7 @@ class n_ extends tx {
14574
14574
  dims: l
14575
14575
  }));
14576
14576
  }
14577
- p.width = l.width, p.height = l.height, vg(A) && (Hi(c) && (A.source === tA.Source.ScreenShare && (e.scalabilityMode = "L1T3", "contentHint" in A.mediaStreamTrack && (A.mediaStreamTrack.contentHint = "motion", this.log.info("forcing contentHint to motion for screenshare with SVC codecs", Object.assign(Object.assign({}, this.logContext), Ie(A))))), e.scalabilityMode = (a = e.scalabilityMode) !== null && a !== void 0 ? a : "L3T3_KEY"), p.simulcastCodecs = [new Or({
14577
+ p.width = l.width, p.height = l.height, vg(A) && (Oi(c) && (A.source === tA.Source.ScreenShare && (e.scalabilityMode = "L1T3", "contentHint" in A.mediaStreamTrack && (A.mediaStreamTrack.contentHint = "motion", this.log.info("forcing contentHint to motion for screenshare with SVC codecs", Object.assign(Object.assign({}, this.logContext), Ie(A))))), e.scalabilityMode = (a = e.scalabilityMode) !== null && a !== void 0 ? a : "L3T3_KEY"), p.simulcastCodecs = [new Or({
14578
14578
  codec: c,
14579
14579
  cid: A.mediaStreamTrack.id
14580
14580
  })], e.backupCodec === !0 && (e.backupCodec = {
@@ -14583,7 +14583,7 @@ class n_ extends tx {
14583
14583
  p.encryption === $t.NONE && (this.roomOptions.dynacast || (this.roomOptions.dynacast = !0), p.simulcastCodecs.push(new Or({
14584
14584
  codec: e.backupCodec.codec,
14585
14585
  cid: ""
14586
- })))), u = cQ(A.source === tA.Source.ScreenShare, p.width, p.height, e), p.layers = Ic(p.width, p.height, u, Hi(e.videoCodec));
14586
+ })))), u = cQ(A.source === tA.Source.ScreenShare, p.width, p.height, e), p.layers = Ic(p.width, p.height, u, Oi(e.videoCodec));
14587
14587
  } else A.kind === tA.Kind.Audio && (u = [{
14588
14588
  maxBitrate: (s = e.audioPreset) === null || s === void 0 ? void 0 : s.maxBitrate,
14589
14589
  priority: (r = (C = e.audioPreset) === null || C === void 0 ? void 0 : C.priority) !== null && r !== void 0 ? r : "high",
@@ -14608,7 +14608,7 @@ class n_ extends tx {
14608
14608
  codec: "opus",
14609
14609
  maxbr: !((m = u[0]) === null || m === void 0) && m.maxBitrate ? u[0].maxBitrate / 1e3 : 0
14610
14610
  });
14611
- } else A.codec && Hi(A.codec) && (!((S = u[0]) === null || S === void 0) && S.maxBitrate) && this.engine.pcManager.publisher.setTrackCodecBitrate({
14611
+ } else A.codec && Oi(A.codec) && (!((S = u[0]) === null || S === void 0) && S.maxBitrate) && this.engine.pcManager.publisher.setTrackCodecBitrate({
14612
14612
  cid: p.cid,
14613
14613
  codec: A.codec,
14614
14614
  maxbr: u[0].maxBitrate / 1e3
@@ -14650,7 +14650,7 @@ class n_ extends tx {
14650
14650
  if (b.on(CA.CpuConstrained, (l) => this.onTrackCpuConstrained(l, b)), b.options = e, A.sid = w.sid, this.log.debug("publishing ".concat(A.kind, " with encodings"), Object.assign(Object.assign({}, this.logContext), {
14651
14651
  encodings: u,
14652
14652
  trackInfo: w
14653
- })), vg(A) ? A.startMonitor(this.engine.client) : sg(A) && A.startMonitor(), this.addTrackPublication(b), this.emit(QA.LocalTrackPublished, b), sg(A) && w.audioFeatures.includes(xt.TF_PRECONNECT_BUFFER)) {
14653
+ })), vg(A) ? A.startMonitor(this.engine.client) : rg(A) && A.startMonitor(), this.addTrackPublication(b), this.emit(QA.LocalTrackPublished, b), rg(A) && w.audioFeatures.includes(xt.TF_PRECONNECT_BUFFER)) {
14654
14654
  const l = A.getPreConnectBuffer(), m = A.getPreConnectBufferMimeType();
14655
14655
  this.on(QA.LocalTrackSubscribed, (S) => {
14656
14656
  if (S.trackSid === w.sid) {
@@ -14816,7 +14816,7 @@ class n_ extends tx {
14816
14816
  a.track && (e && (a.options = Object.assign(Object.assign({}, a.options), e)), I.push(a));
14817
14817
  }), yield Promise.all(I.map((a) => N(this, void 0, void 0, function* () {
14818
14818
  const s = a.track;
14819
- yield this.unpublishTrack(s, !1), g && !s.isMuted && s.source !== tA.Source.ScreenShare && s.source !== tA.Source.ScreenShareAudio && (sg(s) || vg(s)) && !s.isUserProvided && (this.log.debug("restarting existing track", Object.assign(Object.assign({}, this.logContext), {
14819
+ yield this.unpublishTrack(s, !1), g && !s.isMuted && s.source !== tA.Source.ScreenShare && s.source !== tA.Source.ScreenShareAudio && (rg(s) || vg(s)) && !s.isUserProvided && (this.log.debug("restarting existing track", Object.assign(Object.assign({}, this.logContext), {
14820
14820
  track: a.trackSid
14821
14821
  })), yield s.restartTrack()), yield this.publishOrRepublishTrack(s, a.options, !0);
14822
14822
  }))), o();
@@ -14984,7 +14984,7 @@ class n_ extends tx {
14984
14984
  C(it.builtIn("REQUEST_PAYLOAD_TOO_LARGE"));
14985
14985
  return;
14986
14986
  }
14987
- if (!((Q = (r = this.engine.latestJoinResponse) === null || r === void 0 ? void 0 : r.serverInfo) === null || Q === void 0) && Q.version && $i((d = (B = this.engine.latestJoinResponse) === null || B === void 0 ? void 0 : B.serverInfo) === null || d === void 0 ? void 0 : d.version, "1.8.0") < 0) {
14987
+ if (!((Q = (r = this.engine.latestJoinResponse) === null || r === void 0 ? void 0 : r.serverInfo) === null || Q === void 0) && Q.version && eg((d = (B = this.engine.latestJoinResponse) === null || B === void 0 ? void 0 : B.serverInfo) === null || d === void 0 ? void 0 : d.version, "1.8.0") < 0) {
14988
14988
  C(it.builtIn("UNSUPPORTED_SERVER"));
14989
14989
  return;
14990
14990
  }
@@ -15108,13 +15108,13 @@ class n_ extends tx {
15108
15108
  this.firstActiveAgent = A, A && !this.firstActiveAgent && (this.firstActiveAgent = A), A ? (t = (e = this.activeAgentFuture) === null || e === void 0 ? void 0 : e.resolve) === null || t === void 0 || t.call(e, A) : (o = (g = this.activeAgentFuture) === null || g === void 0 ? void 0 : g.reject) === null || o === void 0 || o.call(g, "Agent disconnected"), this.activeAgentFuture = void 0;
15109
15109
  }
15110
15110
  waitUntilActiveAgentPresent() {
15111
- return this.firstActiveAgent ? Promise.resolve(this.firstActiveAgent) : (this.activeAgentFuture || (this.activeAgentFuture = new Pi()), this.activeAgentFuture.promise);
15111
+ return this.firstActiveAgent ? Promise.resolve(this.firstActiveAgent) : (this.activeAgentFuture || (this.activeAgentFuture = new Vi()), this.activeAgentFuture.promise);
15112
15112
  }
15113
15113
  getPublicationForTrack(A) {
15114
15114
  let e;
15115
15115
  return this.trackPublications.forEach((t) => {
15116
15116
  const g = t.track;
15117
- g && (A instanceof MediaStreamTrack ? (sg(g) || vg(g)) && g.mediaStreamTrack === A && (e = t) : A === g && (e = t));
15117
+ g && (A instanceof MediaStreamTrack ? (rg(g) || vg(g)) && g.mediaStreamTrack === A && (e = t) : A === g && (e = t));
15118
15118
  }), e;
15119
15119
  }
15120
15120
  waitForPendingPublicationOfSource(A) {
@@ -15369,7 +15369,7 @@ class _s extends tx {
15369
15369
  }
15370
15370
  const a = A.kind === "video";
15371
15371
  let s;
15372
- return a ? s = new A_(A, e, g, o) : s = new $m(A, e, g, this.audioContext, this.audioOutput), s.source = I.source, s.isMuted = I.isMuted, s.setMediaStream(t), s.start(), I.setTrack(s), this.volumeMap.has(I.source) && CQ(s) && ji(s) && s.setVolume(this.volumeMap.get(I.source)), I;
15372
+ return a ? s = new A_(A, e, g, o) : s = new $m(A, e, g, this.audioContext, this.audioOutput), s.source = I.source, s.isMuted = I.isMuted, s.setMediaStream(t), s.start(), I.setTrack(s), this.volumeMap.has(I.source) && CQ(s) && Zi(s) && s.setVolume(this.volumeMap.get(I.source)), I;
15373
15373
  }
15374
15374
  /** @internal */
15375
15375
  get hasMetadata() {
@@ -15439,7 +15439,7 @@ class _s extends tx {
15439
15439
  const e = [];
15440
15440
  this.audioTrackPublications.forEach((t) => {
15441
15441
  var g;
15442
- ji(t.track) && CQ(t.track) && e.push(t.track.setSinkId((g = A.deviceId) !== null && g !== void 0 ? g : "default"));
15442
+ Zi(t.track) && CQ(t.track) && e.push(t.track.setSinkId((g = A.deviceId) !== null && g !== void 0 ? g : "default"));
15443
15443
  }), yield Promise.all(e);
15444
15444
  });
15445
15445
  }
@@ -15458,7 +15458,7 @@ var fe;
15458
15458
  i.Disconnected = "disconnected", i.Connecting = "connecting", i.Connected = "connected", i.Reconnecting = "reconnecting", i.SignalReconnecting = "signalReconnecting";
15459
15459
  })(fe || (fe = {}));
15460
15460
  const a_ = 4 * 1e3;
15461
- class Ln extends eg.EventEmitter {
15461
+ class Ln extends ig.EventEmitter {
15462
15462
  /**
15463
15463
  * Creates a new Room, the primary construct for a LiveKit session.
15464
15464
  * @param options
@@ -15468,7 +15468,7 @@ class Ln extends eg.EventEmitter {
15468
15468
  if (super(), e = this, this.state = fe.Disconnected, this.activeSpeakers = [], this.isE2EEEnabled = !1, this.audioEnabled = !0, this.isVideoPlaybackBlocked = !1, this.log = re, this.bufferedEvents = [], this.isResuming = !1, this.rpcHandlers = /* @__PURE__ */ new Map(), this.connect = (n, I, a) => N(this, void 0, void 0, function* () {
15469
15469
  var s;
15470
15470
  if (!Uw())
15471
- throw zi() ? Error("WebRTC isn't detected, have you called registerGlobals?") : Error("LiveKit doesn't seem to be supported on this browser. Try to update your browser and make sure no browser extensions are disabling webRTC.");
15471
+ throw Ag() ? Error("WebRTC isn't detected, have you called registerGlobals?") : Error("LiveKit doesn't seem to be supported on this browser. Try to update your browser and make sure no browser extensions are disabling webRTC.");
15472
15472
  const C = yield this.disconnectLock.lock();
15473
15473
  if (this.state === fe.Connected)
15474
15474
  return this.log.info("already connected to room ".concat(this.name), this.logContext), C(), Promise.resolve();
@@ -15502,12 +15502,12 @@ class Ln extends eg.EventEmitter {
15502
15502
  }
15503
15503
  u && !(!((E = this.abortController) === null || E === void 0) && E.signal.aborted) ? (this.log.info("Initial connection failed with ConnectionError: ".concat(p.message, ". Retrying with another region: ").concat(u), this.logContext), this.recreateEngine(), yield r(B, d, u)) : (this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, O0(p)), d(p));
15504
15504
  } else {
15505
- let u = Si.UNKNOWN_REASON;
15505
+ let u = bi.UNKNOWN_REASON;
15506
15506
  p instanceof Le && (u = O0(p)), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, u), d(p);
15507
15507
  }
15508
15508
  }
15509
15509
  }), Q = this.regionUrl;
15510
- return this.regionUrl = void 0, this.connectFuture = new Pi((B, d) => {
15510
+ return this.regionUrl = void 0, this.connectFuture = new Vi((B, d) => {
15511
15511
  r(B, d, Q);
15512
15512
  }, () => {
15513
15513
  this.clearConnectionFutures();
@@ -15581,7 +15581,7 @@ class Ln extends eg.EventEmitter {
15581
15581
  s.log.debug("already disconnected", s.logContext);
15582
15582
  return;
15583
15583
  }
15584
- s.log.info("disconnect from room", Object.assign({}, s.logContext)), (s.state === fe.Connecting || s.state === fe.Reconnecting || s.isResuming) && (s.log.warn("abort connection attempt", s.logContext), (r = s.abortController) === null || r === void 0 || r.abort(), (B = (Q = s.connectFuture) === null || Q === void 0 ? void 0 : Q.reject) === null || B === void 0 || B.call(Q, new Le("Client initiated disconnect", Be.Cancelled)), s.connectFuture = void 0), !((d = s.engine) === null || d === void 0) && d.client.isDisconnected || (yield s.engine.client.sendLeave()), s.engine && (yield s.engine.close()), s.handleDisconnect(C, Si.CLIENT_INITIATED), s.engine = void 0;
15584
+ s.log.info("disconnect from room", Object.assign({}, s.logContext)), (s.state === fe.Connecting || s.state === fe.Reconnecting || s.isResuming) && (s.log.warn("abort connection attempt", s.logContext), (r = s.abortController) === null || r === void 0 || r.abort(), (B = (Q = s.connectFuture) === null || Q === void 0 ? void 0 : Q.reject) === null || B === void 0 || B.call(Q, new Le("Client initiated disconnect", Be.Cancelled)), s.connectFuture = void 0), !((d = s.engine) === null || d === void 0) && d.client.isDisconnected || (yield s.engine.client.sendLeave()), s.engine && (yield s.engine.close()), s.handleDisconnect(C, bi.CLIENT_INITIATED), s.engine = void 0;
15585
15585
  } finally {
15586
15586
  c();
15587
15587
  }
@@ -15786,7 +15786,7 @@ class Ln extends eg.EventEmitter {
15786
15786
  (I = n == null ? void 0 : n.onPublish) === null || I === void 0 || I.call(n, this);
15787
15787
  }, this.onLocalTrackPublished = (n) => N(this, void 0, void 0, function* () {
15788
15788
  var I, a, s, C, r, Q;
15789
- (I = n.track) === null || I === void 0 || I.on(CA.TrackProcessorUpdate, this.onTrackProcessorUpdate), (a = n.track) === null || a === void 0 || a.on(CA.Restarted, this.onLocalTrackRestarted), (r = (C = (s = n.track) === null || s === void 0 ? void 0 : s.getProcessor()) === null || C === void 0 ? void 0 : C.onPublish) === null || r === void 0 || r.call(C, this), this.emit(IA.LocalTrackPublished, n, this.localParticipant), sg(n.track) && (yield n.track.checkForSilence()) && this.emit(IA.LocalAudioSilenceDetected, n);
15789
+ (I = n.track) === null || I === void 0 || I.on(CA.TrackProcessorUpdate, this.onTrackProcessorUpdate), (a = n.track) === null || a === void 0 || a.on(CA.Restarted, this.onLocalTrackRestarted), (r = (C = (s = n.track) === null || s === void 0 ? void 0 : s.getProcessor()) === null || C === void 0 ? void 0 : C.onPublish) === null || r === void 0 || r.call(C, this), this.emit(IA.LocalTrackPublished, n, this.localParticipant), rg(n.track) && (yield n.track.checkForSilence()) && this.emit(IA.LocalAudioSilenceDetected, n);
15790
15790
  const B = yield (Q = n.track) === null || Q === void 0 ? void 0 : Q.getDeviceId(!1), d = QQ(n.source);
15791
15791
  d && B && B !== this.localParticipant.activeDeviceMap.get(d) && (this.localParticipant.activeDeviceMap.set(d, B), this.emit(IA.ActiveDeviceChanged, d, B));
15792
15792
  }), this.onLocalTrackUnpublished = (n) => {
@@ -15803,7 +15803,7 @@ class Ln extends eg.EventEmitter {
15803
15803
  this.emit(IA.ParticipantPermissionsChanged, n, this.localParticipant);
15804
15804
  }, this.onLocalChatMessageSent = (n) => {
15805
15805
  this.emit(IA.ChatMessage, n, this.localParticipant);
15806
- }, this.setMaxListeners(100), this.remoteParticipants = /* @__PURE__ */ new Map(), this.sidToIdentity = /* @__PURE__ */ new Map(), this.options = Object.assign(Object.assign({}, fm), A), this.log = yg((t = this.options.loggerName) !== null && t !== void 0 ? t : bi.Room), this.transcriptionReceivedTimes = /* @__PURE__ */ new Map(), this.options.audioCaptureDefaults = Object.assign(Object.assign({}, Vl), A == null ? void 0 : A.audioCaptureDefaults), this.options.videoCaptureDefaults = Object.assign(Object.assign({}, jl), A == null ? void 0 : A.videoCaptureDefaults), this.options.publishDefaults = Object.assign(Object.assign({}, um), A == null ? void 0 : A.publishDefaults), this.maybeCreateEngine(), this.incomingDataStreamManager = new Wm(), this.outgoingDataStreamManager = new zm(this.engine, this.log), this.disconnectLock = new Pt(), this.localParticipant = new n_("", "", this.engine, this.options, this.rpcHandlers, this.outgoingDataStreamManager), this.options.videoCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("videoinput", to(this.options.videoCaptureDefaults.deviceId)), this.options.audioCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("audioinput", to(this.options.audioCaptureDefaults.deviceId)), !((g = this.options.audioOutput) === null || g === void 0) && g.deviceId && this.switchActiveDevice("audiooutput", to(this.options.audioOutput.deviceId)).catch((n) => this.log.warn("Could not set audio output: ".concat(n.message), this.logContext)), this.options.e2ee && this.setupE2EE(), Ht()) {
15806
+ }, this.setMaxListeners(100), this.remoteParticipants = /* @__PURE__ */ new Map(), this.sidToIdentity = /* @__PURE__ */ new Map(), this.options = Object.assign(Object.assign({}, fm), A), this.log = yg((t = this.options.loggerName) !== null && t !== void 0 ? t : Mi.Room), this.transcriptionReceivedTimes = /* @__PURE__ */ new Map(), this.options.audioCaptureDefaults = Object.assign(Object.assign({}, Vl), A == null ? void 0 : A.audioCaptureDefaults), this.options.videoCaptureDefaults = Object.assign(Object.assign({}, jl), A == null ? void 0 : A.videoCaptureDefaults), this.options.publishDefaults = Object.assign(Object.assign({}, um), A == null ? void 0 : A.publishDefaults), this.maybeCreateEngine(), this.incomingDataStreamManager = new Wm(), this.outgoingDataStreamManager = new zm(this.engine, this.log), this.disconnectLock = new Pt(), this.localParticipant = new n_("", "", this.engine, this.options, this.rpcHandlers, this.outgoingDataStreamManager), this.options.videoCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("videoinput", to(this.options.videoCaptureDefaults.deviceId)), this.options.audioCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("audioinput", to(this.options.audioCaptureDefaults.deviceId)), !((g = this.options.audioOutput) === null || g === void 0) && g.deviceId && this.switchActiveDevice("audiooutput", to(this.options.audioOutput.deviceId)).catch((n) => this.log.warn("Could not set audio output: ".concat(n.message), this.logContext)), this.options.e2ee && this.setupE2EE(), Ht()) {
15807
15807
  const n = new AbortController();
15808
15808
  (o = navigator.mediaDevices) === null || o === void 0 || o.addEventListener("devicechange", this.handleDeviceChange, {
15809
15809
  signal: n.signal
@@ -16029,7 +16029,7 @@ class Ln extends eg.EventEmitter {
16029
16029
  yield this.engine.client.handleOnClose("simulate disconnect");
16030
16030
  break;
16031
16031
  case "speaker":
16032
- g = new Ti({
16032
+ g = new Ji({
16033
16033
  scenario: {
16034
16034
  case: "speakerUpdate",
16035
16035
  value: 3
@@ -16037,7 +16037,7 @@ class Ln extends eg.EventEmitter {
16037
16037
  });
16038
16038
  break;
16039
16039
  case "node-failure":
16040
- g = new Ti({
16040
+ g = new Ji({
16041
16041
  scenario: {
16042
16042
  case: "nodeFailure",
16043
16043
  value: !0
@@ -16045,7 +16045,7 @@ class Ln extends eg.EventEmitter {
16045
16045
  });
16046
16046
  break;
16047
16047
  case "server-leave":
16048
- g = new Ti({
16048
+ g = new Ji({
16049
16049
  scenario: {
16050
16050
  case: "serverLeave",
16051
16051
  value: !0
@@ -16053,7 +16053,7 @@ class Ln extends eg.EventEmitter {
16053
16053
  });
16054
16054
  break;
16055
16055
  case "migration":
16056
- g = new Ti({
16056
+ g = new Ji({
16057
16057
  scenario: {
16058
16058
  case: "migration",
16059
16059
  value: !0
@@ -16066,7 +16066,7 @@ class Ln extends eg.EventEmitter {
16066
16066
  case "disconnect-signal-on-resume":
16067
16067
  t = () => N(this, void 0, void 0, function* () {
16068
16068
  yield this.engine.client.handleOnClose("simulate resume-disconnect");
16069
- }), g = new Ti({
16069
+ }), g = new Ji({
16070
16070
  scenario: {
16071
16071
  case: "disconnectSignalOnResume",
16072
16072
  value: !0
@@ -16076,7 +16076,7 @@ class Ln extends eg.EventEmitter {
16076
16076
  case "disconnect-signal-on-resume-no-messages":
16077
16077
  t = () => N(this, void 0, void 0, function* () {
16078
16078
  yield this.engine.client.handleOnClose("simulate resume-disconnect");
16079
- }), g = new Ti({
16079
+ }), g = new Ji({
16080
16080
  scenario: {
16081
16081
  case: "disconnectSignalOnResumeNoMessages",
16082
16082
  value: !0
@@ -16088,7 +16088,7 @@ class Ln extends eg.EventEmitter {
16088
16088
  break;
16089
16089
  case "force-tcp":
16090
16090
  case "force-tls":
16091
- g = new Ti({
16091
+ g = new Ji({
16092
16092
  scenario: {
16093
16093
  case: "switchCandidateProtocol",
16094
16094
  value: A === "force-tls" ? 2 : 1
@@ -16096,7 +16096,7 @@ class Ln extends eg.EventEmitter {
16096
16096
  }), t = () => N(this, void 0, void 0, function* () {
16097
16097
  const o = this.engine.client.onLeave;
16098
16098
  o && o(new Os({
16099
- reason: Si.CLIENT_INITIATED,
16099
+ reason: bi.CLIENT_INITIATED,
16100
16100
  action: Dn.RECONNECT
16101
16101
  }));
16102
16102
  });
@@ -16104,7 +16104,7 @@ class Ln extends eg.EventEmitter {
16104
16104
  case "subscriber-bandwidth":
16105
16105
  if (e === void 0 || typeof e != "number")
16106
16106
  throw new Error("subscriber-bandwidth requires a number as argument");
16107
- g = new Ti({
16107
+ g = new Ji({
16108
16108
  scenario: {
16109
16109
  case: "subscriberBandwidth",
16110
16110
  value: wo(e)
@@ -16112,7 +16112,7 @@ class Ln extends eg.EventEmitter {
16112
16112
  });
16113
16113
  break;
16114
16114
  case "leave-full-reconnect":
16115
- g = new Ti({
16115
+ g = new Ji({
16116
16116
  scenario: {
16117
16117
  case: "leaveRequestFullReconnect",
16118
16118
  value: !0
@@ -16425,7 +16425,7 @@ class Ln extends eg.EventEmitter {
16425
16425
  closed: this.engine.isClosed,
16426
16426
  transportsConnected: this.engine.verifyTransport()
16427
16427
  } : void 0
16428
- })), A >= 3 && (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, Si.STATE_MISMATCH))) : A = 0;
16428
+ })), A >= 3 && (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, bi.STATE_MISMATCH))) : A = 0;
16429
16429
  }, a_);
16430
16430
  }
16431
16431
  clearConnectionReconcile() {
@@ -16486,7 +16486,7 @@ class Ln extends eg.EventEmitter {
16486
16486
  const n = new lQ(tA.Kind.Video, new hn({
16487
16487
  source: st.CAMERA,
16488
16488
  sid: Math.floor(Math.random() * 1e4).toString(),
16489
- type: pi.AUDIO,
16489
+ type: mi.AUDIO,
16490
16490
  name: "video-dummy"
16491
16491
  }), new ms(g.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
16492
16492
  video: !0
@@ -16503,7 +16503,7 @@ class Ln extends eg.EventEmitter {
16503
16503
  const n = new lQ(tA.Kind.Audio, new hn({
16504
16504
  source: st.MICROPHONE,
16505
16505
  sid: Math.floor(Math.random() * 1e4).toString(),
16506
- type: pi.AUDIO
16506
+ type: mi.AUDIO
16507
16507
  }), new ws(g.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
16508
16508
  audio: !0
16509
16509
  })).getAudioTracks()[0] : LC(), void 0, !1, this.audioContext, {
@@ -16528,7 +16528,7 @@ class Ln extends eg.EventEmitter {
16528
16528
  const s = P0(160 * ((t = o.aspectRatios[n % o.aspectRatios.length]) !== null && t !== void 0 ? t : 1), 160, !1, !0), C = new hn({
16529
16529
  source: st.CAMERA,
16530
16530
  sid: Math.floor(Math.random() * 1e4).toString(),
16531
- type: pi.AUDIO
16531
+ type: mi.AUDIO
16532
16532
  });
16533
16533
  a.addSubscribedMediaTrack(s, C.sid, new MediaStream([s]), new RTCRtpReceiver()), I.tracks = [...I.tracks, C];
16534
16534
  }
@@ -16536,7 +16536,7 @@ class Ln extends eg.EventEmitter {
16536
16536
  const s = LC(), C = new hn({
16537
16537
  source: st.MICROPHONE,
16538
16538
  sid: Math.floor(Math.random() * 1e4).toString(),
16539
- type: pi.AUDIO
16539
+ type: mi.AUDIO
16540
16540
  });
16541
16541
  a.addSubscribedMediaTrack(s, C.sid, new MediaStream([s]), new RTCRtpReceiver()), I.tracks = [...I.tracks, C];
16542
16542
  }
@@ -16567,26 +16567,26 @@ function ix(i) {
16567
16567
  return Array.isArray(A) ? ix(A) : typeof A == "object" ? "logContext" in A ? A.logContext : void 0 : A;
16568
16568
  });
16569
16569
  }
16570
- var ui;
16570
+ var Di;
16571
16571
  (function(i) {
16572
16572
  i[i.IDLE = 0] = "IDLE", i[i.RUNNING = 1] = "RUNNING", i[i.SKIPPED = 2] = "SKIPPED", i[i.SUCCESS = 3] = "SUCCESS", i[i.FAILED = 4] = "FAILED";
16573
- })(ui || (ui = {}));
16574
- class Bo extends eg.EventEmitter {
16573
+ })(Di || (Di = {}));
16574
+ class Bo extends ig.EventEmitter {
16575
16575
  constructor(A, e) {
16576
16576
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
16577
- super(), this.status = ui.IDLE, this.logs = [], this.options = {}, this.url = A, this.token = e, this.name = this.constructor.name, this.room = new Ln(t.roomOptions), this.connectOptions = t.connectOptions, this.options = t;
16577
+ super(), this.status = Di.IDLE, this.logs = [], this.options = {}, this.url = A, this.token = e, this.name = this.constructor.name, this.room = new Ln(t.roomOptions), this.connectOptions = t.connectOptions, this.options = t;
16578
16578
  }
16579
16579
  run(A) {
16580
16580
  return N(this, void 0, void 0, function* () {
16581
- if (this.status !== ui.IDLE)
16581
+ if (this.status !== Di.IDLE)
16582
16582
  throw Error("check is running already");
16583
- this.setStatus(ui.RUNNING);
16583
+ this.setStatus(Di.RUNNING);
16584
16584
  try {
16585
16585
  yield this.perform();
16586
16586
  } catch (e) {
16587
16587
  e instanceof Error && (this.options.errorsAsWarnings ? this.appendWarning(e.message) : this.appendError(e.message));
16588
16588
  }
16589
- return yield this.disconnect(), yield new Promise((e) => setTimeout(e, 500)), this.status !== ui.SKIPPED && this.setStatus(this.isSuccess() ? ui.SUCCESS : ui.FAILED), A && A(), this.getInfo();
16589
+ return yield this.disconnect(), yield new Promise((e) => setTimeout(e, 500)), this.status !== Di.SKIPPED && this.setStatus(this.isSuccess() ? Di.SUCCESS : Di.FAILED), A && A(), this.getInfo();
16590
16590
  });
16591
16591
  }
16592
16592
  isSuccess() {
@@ -16603,7 +16603,7 @@ class Bo extends eg.EventEmitter {
16603
16603
  });
16604
16604
  }
16605
16605
  skip() {
16606
- this.setStatus(ui.SKIPPED);
16606
+ this.setStatus(Di.SKIPPED);
16607
16607
  }
16608
16608
  switchProtocol(A) {
16609
16609
  return N(this, void 0, void 0, function* () {
@@ -16950,7 +16950,7 @@ class h_ extends Bo {
16950
16950
  });
16951
16951
  }
16952
16952
  }
16953
- class ov extends eg.EventEmitter {
16953
+ class ov extends ig.EventEmitter {
16954
16954
  constructor(A, e) {
16955
16955
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
16956
16956
  super(), this.options = {}, this.checkResults = /* @__PURE__ */ new Map(), this.url = A, this.token = e, this.options = t;
@@ -16959,7 +16959,7 @@ class ov extends eg.EventEmitter {
16959
16959
  const A = this.checkResults.size;
16960
16960
  return this.checkResults.set(A, {
16961
16961
  logs: [],
16962
- status: ui.IDLE,
16962
+ status: Di.IDLE,
16963
16963
  name: "",
16964
16964
  description: ""
16965
16965
  }), A;
@@ -16968,7 +16968,7 @@ class ov extends eg.EventEmitter {
16968
16968
  this.checkResults.set(A, e), this.emit("checkUpdate", A, e);
16969
16969
  }
16970
16970
  isSuccess() {
16971
- return Array.from(this.checkResults.values()).every((A) => A.status !== ui.FAILED);
16971
+ return Array.from(this.checkResults.values()).every((A) => A.status !== Di.FAILED);
16972
16972
  }
16973
16973
  getResults() {
16974
16974
  return Array.from(this.checkResults.values());
@@ -17029,10 +17029,10 @@ class ov extends eg.EventEmitter {
17029
17029
  });
17030
17030
  }
17031
17031
  }
17032
- var l_ = Object.defineProperty, x_ = (i, A, e) => A in i ? l_(i, A, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[A] = e, fi = (i, A, e) => (x_(i, typeof A != "symbol" ? A + "" : A, e), e), QE = (i, A, e) => {
17032
+ var l_ = Object.defineProperty, x_ = (i, A, e) => A in i ? l_(i, A, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[A] = e, pi = (i, A, e) => (x_(i, typeof A != "symbol" ? A + "" : A, e), e), QE = (i, A, e) => {
17033
17033
  if (!A.has(i))
17034
17034
  throw TypeError("Cannot " + e);
17035
- }, WA = (i, A, e) => (QE(i, A, "read from private field"), e ? e.call(i) : A.get(i)), hi = (i, A, e) => {
17035
+ }, WA = (i, A, e) => (QE(i, A, "read from private field"), e ? e.call(i) : A.get(i)), xi = (i, A, e) => {
17036
17036
  if (A.has(i))
17037
17037
  throw TypeError("Cannot add the same private member more than once");
17038
17038
  A instanceof WeakSet ? A.add(i) : A.set(i, e);
@@ -18281,7 +18281,7 @@ function z_(i, A) {
18281
18281
  makeWriteOptions: X_,
18282
18282
  readMessage(t, g, o, n) {
18283
18283
  if (g == null || Array.isArray(g) || typeof g != "object")
18284
- throw new Error("cannot decode message ".concat(t.typeName, " from JSON: ").concat(Ji(g)));
18284
+ throw new Error("cannot decode message ".concat(t.typeName, " from JSON: ").concat(qi(g)));
18285
18285
  n = n ?? new t();
18286
18286
  const I = /* @__PURE__ */ new Map(), a = o.typeRegistry;
18287
18287
  for (const [s, C] of Object.entries(g)) {
@@ -18347,10 +18347,10 @@ function z_(i, A) {
18347
18347
  readScalar: (t, g, o) => lI(t, g, o, i),
18348
18348
  // eslint-disable-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return
18349
18349
  writeScalar: pc,
18350
- debug: Ji
18350
+ debug: qi
18351
18351
  };
18352
18352
  }
18353
- function Ji(i) {
18353
+ function qi(i) {
18354
18354
  if (i === null)
18355
18355
  return "null";
18356
18356
  switch (typeof i) {
@@ -18375,11 +18375,11 @@ function Dc(i, A, e, t, g, o) {
18375
18375
  if (A === null)
18376
18376
  return;
18377
18377
  if (!Array.isArray(A))
18378
- throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ji(A)));
18378
+ throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(qi(A)));
18379
18379
  const I = i[n];
18380
18380
  for (const a of A) {
18381
18381
  if (a === null)
18382
- throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ji(a)));
18382
+ throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(qi(a)));
18383
18383
  let s;
18384
18384
  switch (e.kind) {
18385
18385
  case "message":
@@ -18393,7 +18393,7 @@ function Dc(i, A, e, t, g, o) {
18393
18393
  try {
18394
18394
  s = lI(e.T, a, e.L, !0);
18395
18395
  } catch (C) {
18396
- let r = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ji(a));
18396
+ let r = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(qi(a));
18397
18397
  throw C instanceof Error && C.message.length > 0 && (r += ": ".concat(C.message)), new Error(r);
18398
18398
  }
18399
18399
  break;
@@ -18404,7 +18404,7 @@ function Dc(i, A, e, t, g, o) {
18404
18404
  if (A === null)
18405
18405
  return;
18406
18406
  if (typeof A != "object" || Array.isArray(A))
18407
- throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ji(A)));
18407
+ throw new Error("cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(qi(A)));
18408
18408
  const I = i[n];
18409
18409
  for (const [a, s] of Object.entries(A)) {
18410
18410
  if (s === null)
@@ -18422,7 +18422,7 @@ function Dc(i, A, e, t, g, o) {
18422
18422
  try {
18423
18423
  C = lI(e.V.T, s, To.BIGINT, !0);
18424
18424
  } catch (r) {
18425
- let Q = "cannot decode map value for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ji(A));
18425
+ let Q = "cannot decode map value for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(qi(A));
18426
18426
  throw r instanceof Error && r.message.length > 0 && (Q += ": ".concat(r.message)), new Error(Q);
18427
18427
  }
18428
18428
  break;
@@ -18430,7 +18430,7 @@ function Dc(i, A, e, t, g, o) {
18430
18430
  try {
18431
18431
  I[lI(e.K, e.K == AA.BOOL ? a == "true" ? !0 : a == "false" ? !1 : a : a, To.BIGINT, !0).toString()] = C;
18432
18432
  } catch (r) {
18433
- let Q = "cannot decode map key for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ji(A));
18433
+ let Q = "cannot decode map key for field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(qi(A));
18434
18434
  throw r instanceof Error && r.message.length > 0 && (Q += ": ".concat(r.message)), new Error(Q);
18435
18435
  }
18436
18436
  }
@@ -18453,7 +18453,7 @@ function Dc(i, A, e, t, g, o) {
18453
18453
  try {
18454
18454
  i[n] = lI(e.T, A, e.L, o);
18455
18455
  } catch (s) {
18456
- let C = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(Ji(A));
18456
+ let C = "cannot decode field ".concat(g.typeName, ".").concat(e.name, " from JSON: ").concat(qi(A));
18457
18457
  throw s instanceof Error && s.message.length > 0 && (C += ": ".concat(s.message)), new Error(C);
18458
18458
  }
18459
18459
  break;
@@ -18547,7 +18547,7 @@ function jC(i, A, e, t) {
18547
18547
  return g == null ? void 0 : g.no;
18548
18548
  break;
18549
18549
  }
18550
- throw new Error("cannot decode enum ".concat(i.typeName, " from JSON: ").concat(Ji(A)));
18550
+ throw new Error("cannot decode enum ".concat(i.typeName, " from JSON: ").concat(qi(A)));
18551
18551
  }
18552
18552
  function $_(i, A, e, t) {
18553
18553
  var g;
@@ -19055,7 +19055,7 @@ const ux = R.makeEnum("livekit.AudioCodec", [{
19055
19055
  }, {
19056
19056
  no: 1,
19057
19057
  name: "IC_JPEG"
19058
- }]), _i = R.makeEnum("livekit.TrackType", [{
19058
+ }]), yi = R.makeEnum("livekit.TrackType", [{
19059
19059
  no: 0,
19060
19060
  name: "AUDIO"
19061
19061
  }, {
@@ -19421,7 +19421,7 @@ const Dx = R.makeMessageType("livekit.ParticipantPermission", () => [{
19421
19421
  name: "AGENT"
19422
19422
  }]);
19423
19423
  R.makeMessageType("livekit.Encryption", []);
19424
- const Ii = R.makeEnum("livekit.Encryption.Type", [{
19424
+ const si = R.makeEnum("livekit.Encryption.Type", [{
19425
19425
  no: 0,
19426
19426
  name: "NONE"
19427
19427
  }, {
@@ -19464,7 +19464,7 @@ const Ii = R.makeEnum("livekit.Encryption.Type", [{
19464
19464
  no: 2,
19465
19465
  name: "type",
19466
19466
  kind: "enum",
19467
- T: R.getEnumType(_i)
19467
+ T: R.getEnumType(yi)
19468
19468
  }, {
19469
19469
  no: 3,
19470
19470
  name: "name",
@@ -19546,7 +19546,7 @@ const Ii = R.makeEnum("livekit.Encryption.Type", [{
19546
19546
  no: 16,
19547
19547
  name: "encryption",
19548
19548
  kind: "enum",
19549
- T: R.getEnumType(Ii)
19549
+ T: R.getEnumType(si)
19550
19550
  }, {
19551
19551
  no: 17,
19552
19552
  name: "stream",
@@ -21873,7 +21873,7 @@ const T2 = R.makeMessageType("livekit.RegisterWorkerRequest", () => [{
21873
21873
  name: "status",
21874
21874
  kind: "enum",
21875
21875
  T: R.getEnumType(L2)
21876
- }]), ki = R.makeEnum("livekit.SignalTarget", [{
21876
+ }]), Si = R.makeEnum("livekit.SignalTarget", [{
21877
21877
  no: 0,
21878
21878
  name: "PUBLISHER"
21879
21879
  }, {
@@ -21964,7 +21964,7 @@ const T2 = R.makeMessageType("livekit.RegisterWorkerRequest", () => [{
21964
21964
  no: 13,
21965
21965
  name: "simulate",
21966
21966
  kind: "message",
21967
- T: Cg,
21967
+ T: Qg,
21968
21968
  oneof: "message"
21969
21969
  }, {
21970
21970
  no: 14,
@@ -22132,7 +22132,7 @@ const T2 = R.makeMessageType("livekit.RegisterWorkerRequest", () => [{
22132
22132
  no: 3,
22133
22133
  name: "type",
22134
22134
  kind: "enum",
22135
- T: R.getEnumType(_i)
22135
+ T: R.getEnumType(yi)
22136
22136
  }, {
22137
22137
  no: 4,
22138
22138
  name: "width",
@@ -22196,7 +22196,7 @@ const T2 = R.makeMessageType("livekit.RegisterWorkerRequest", () => [{
22196
22196
  no: 14,
22197
22197
  name: "encryption",
22198
22198
  kind: "enum",
22199
- T: R.getEnumType(Ii)
22199
+ T: R.getEnumType(si)
22200
22200
  }, {
22201
22201
  no: 15,
22202
22202
  name: "stream",
@@ -22213,7 +22213,7 @@ const T2 = R.makeMessageType("livekit.RegisterWorkerRequest", () => [{
22213
22213
  no: 2,
22214
22214
  name: "target",
22215
22215
  kind: "enum",
22216
- T: R.getEnumType(ki)
22216
+ T: R.getEnumType(Si)
22217
22217
  }]), hE = R.makeMessageType("livekit.MuteTrackRequest", () => [{
22218
22218
  no: 1,
22219
22219
  name: "sid",
@@ -22678,8 +22678,8 @@ const T2 = R.makeMessageType("livekit.RegisterWorkerRequest", () => [{
22678
22678
  no: 3,
22679
22679
  name: "target",
22680
22680
  kind: "enum",
22681
- T: R.getEnumType(ki)
22682
- }]), Cg = R.makeMessageType("livekit.SimulateScenario", () => [{
22681
+ T: R.getEnumType(Si)
22682
+ }]), Qg = R.makeMessageType("livekit.SimulateScenario", () => [{
22683
22683
  no: 1,
22684
22684
  name: "speaker_update",
22685
22685
  kind: "scalar",
@@ -23714,14 +23714,14 @@ var eC = Vx.exports, mQ;
23714
23714
  (function(i) {
23715
23715
  i[i.trace = 0] = "trace", i[i.debug = 1] = "debug", i[i.info = 2] = "info", i[i.warn = 3] = "warn", i[i.error = 4] = "error", i[i.silent = 5] = "silent";
23716
23716
  })(mQ || (mQ = {}));
23717
- var Ni;
23717
+ var Gi;
23718
23718
  (function(i) {
23719
23719
  i.Default = "livekit", i.Room = "livekit-room", i.Participant = "livekit-participant", i.Track = "livekit-track", i.Publication = "livekit-track-publication", i.Engine = "livekit-engine", i.Signal = "livekit-signal", i.PCManager = "livekit-pc-manager", i.PCTransport = "livekit-pc-transport", i.E2EE = "lk-e2ee";
23720
- })(Ni || (Ni = {}));
23720
+ })(Gi || (Gi = {}));
23721
23721
  let he = eC.getLogger("livekit");
23722
- Object.values(Ni).map((i) => eC.getLogger(i));
23722
+ Object.values(Gi).map((i) => eC.getLogger(i));
23723
23723
  he.setDefaultLevel(mQ.info);
23724
- function Mi(i) {
23724
+ function Fi(i) {
23725
23725
  const A = eC.getLogger(i);
23726
23726
  return A.setDefaultLevel(he.getLevel()), A;
23727
23727
  }
@@ -24026,7 +24026,7 @@ function eu(i, A, e, t) {
24026
24026
  else
24027
24027
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof i);
24028
24028
  }
24029
- var tg = DE.exports;
24029
+ var gg = DE.exports;
24030
24030
  let tu = !0, iu = !0;
24031
24031
  function is(i, A, e) {
24032
24032
  const t = i.match(A);
@@ -25630,7 +25630,7 @@ function Vk() {
25630
25630
  return typeof window.RTCRtpSender < "u" && // @ts-ignore
25631
25631
  typeof window.RTCRtpSender.prototype.createEncodedStreams < "u";
25632
25632
  }
25633
- class nv extends tg.EventEmitter {
25633
+ class nv extends gg.EventEmitter {
25634
25634
  constructor() {
25635
25635
  let A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
25636
25636
  super(), this.onKeyRatcheted = (e, t) => {
@@ -25681,7 +25681,7 @@ class wE extends On {
25681
25681
  super(21, A ?? "device is unsupported");
25682
25682
  }
25683
25683
  }
25684
- class Yi extends On {
25684
+ class Hi extends On {
25685
25685
  constructor(A) {
25686
25686
  super(20, A ?? "track is invalid");
25687
25687
  }
@@ -25921,17 +25921,17 @@ function ty(i) {
25921
25921
  return typeof structuredClone == "function" ? structuredClone(i) : JSON.parse(JSON.stringify(i));
25922
25922
  }
25923
25923
  const iy = 5e3, nI = [];
25924
- var Ci;
25924
+ var Qi;
25925
25925
  (function(i) {
25926
25926
  i[i.LOW = 0] = "LOW", i[i.MEDIUM = 1] = "MEDIUM", i[i.HIGH = 2] = "HIGH";
25927
- })(Ci || (Ci = {}));
25928
- class nA extends tg.EventEmitter {
25927
+ })(Qi || (Qi = {}));
25928
+ class nA extends gg.EventEmitter {
25929
25929
  constructor(A, e) {
25930
25930
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
25931
25931
  var g;
25932
25932
  super(), this.attachedElements = [], this.isMuted = !1, this.streamState = nA.StreamState.Active, this.isInBackground = !1, this._currentBitrate = 0, this.log = he, this.appVisibilityChangedListener = () => {
25933
25933
  this.backgroundTimeout && clearTimeout(this.backgroundTimeout), document.visibilityState === "hidden" ? this.backgroundTimeout = setTimeout(() => this.handleAppVisibilityChanged(), iy) : this.handleAppVisibilityChanged();
25934
- }, this.log = Mi((g = t.loggerName) !== null && g !== void 0 ? g : Ni.Track), this.loggerContextCb = t.loggerContextCb, this.setMaxListeners(100), this.kind = e, this._mediaStreamTrack = A, this._mediaStreamID = A.id, this.source = nA.Source.Unknown;
25934
+ }, this.log = Fi((g = t.loggerName) !== null && g !== void 0 ? g : Gi.Track), this.loggerContextCb = t.loggerContextCb, this.setMaxListeners(100), this.kind = e, this._mediaStreamTrack = A, this._mediaStreamID = A.id, this.source = nA.Source.Unknown;
25935
25935
  }
25936
25936
  get logContext() {
25937
25937
  var A;
@@ -25995,7 +25995,7 @@ class nA extends tg.EventEmitter {
25995
25995
  }
25996
25996
  /** @internal */
25997
25997
  updateLoggerOptions(A) {
25998
- A.loggerName && (this.log = Mi(A.loggerName)), A.loggerContextCb && (this.loggerContextCb = A.loggerContextCb);
25998
+ A.loggerName && (this.log = Fi(A.loggerName)), A.loggerContextCb && (this.loggerContextCb = A.loggerContextCb);
25999
25999
  }
26000
26000
  recycleElement(A) {
26001
26001
  if (A instanceof HTMLAudioElement) {
@@ -26050,19 +26050,19 @@ function Sn(i, A) {
26050
26050
  function g(s) {
26051
26051
  switch (s) {
26052
26052
  case A.Audio:
26053
- return _i.AUDIO;
26053
+ return yi.AUDIO;
26054
26054
  case A.Video:
26055
- return _i.VIDEO;
26055
+ return yi.VIDEO;
26056
26056
  default:
26057
- return _i.DATA;
26057
+ return yi.DATA;
26058
26058
  }
26059
26059
  }
26060
26060
  i.kindToProto = g;
26061
26061
  function o(s) {
26062
26062
  switch (s) {
26063
- case _i.AUDIO:
26063
+ case yi.AUDIO:
26064
26064
  return A.Audio;
26065
- case _i.VIDEO:
26065
+ case yi.VIDEO:
26066
26066
  return A.Video;
26067
26067
  default:
26068
26068
  return A.Unknown;
@@ -26423,7 +26423,7 @@ class qu {
26423
26423
  });
26424
26424
  }
26425
26425
  }
26426
- class ri {
26426
+ class Bi {
26427
26427
  constructor() {
26428
26428
  this._locking = Promise.resolve(), this._locks = 0;
26429
26429
  }
@@ -26535,7 +26535,7 @@ class PI extends nA {
26535
26535
  this.debouncedTrackMuteHandler.cancel("unmute"), yield this.resumeUpstream();
26536
26536
  }), this.handleEnded = () => {
26537
26537
  this.isInBackground && (this.reacquireTrack = !0), this._mediaStreamTrack.removeEventListener("mute", this.handleTrackMuteEvent), this._mediaStreamTrack.removeEventListener("unmute", this.handleTrackUnmuteEvent), this.emit(uA.Ended, this);
26538
- }, this.reacquireTrack = !1, this.providedByUser = g, this.muteLock = new ri(), this.pauseUpstreamLock = new ri(), this.processorLock = new ri(), this.restartLock = new ri(), this.setMediaStreamTrack(A, !0), this._constraints = A.getConstraints(), t && (this._constraints = t);
26538
+ }, this.reacquireTrack = !1, this.providedByUser = g, this.muteLock = new Bi(), this.pauseUpstreamLock = new Bi(), this.processorLock = new Bi(), this.restartLock = new Bi(), this.setMediaStreamTrack(A, !0), this._constraints = A.getConstraints(), t && (this._constraints = t);
26539
26539
  }
26540
26540
  get id() {
26541
26541
  return this._mediaStreamTrack.id;
@@ -26604,7 +26604,7 @@ class PI extends nA {
26604
26604
  return g;
26605
26605
  yield mg(50);
26606
26606
  }
26607
- throw new Yi("unable to get track dimensions after timeout");
26607
+ throw new Hi("unable to get track dimensions after timeout");
26608
26608
  });
26609
26609
  }
26610
26610
  /**
@@ -26634,7 +26634,7 @@ class PI extends nA {
26634
26634
  replaceTrack(A, e) {
26635
26635
  return U(this, void 0, void 0, function* () {
26636
26636
  if (!this.sender)
26637
- throw new Yi("unable to replace an unpublished track");
26637
+ throw new Hi("unable to replace an unpublished track");
26638
26638
  let t, g;
26639
26639
  return typeof e == "boolean" ? t = e : e !== void 0 && (t = e.userProvidedTrack, g = e.stopProcessor), this.providedByUser = t ?? !0, this.log.debug("replace MediaStreamTrack", this.logContext), yield this.setMediaStreamTrack(A), g && this.processor && (yield this.stopProcessor()), this;
26640
26640
  });
@@ -26789,7 +26789,7 @@ class PI extends nA {
26789
26789
  });
26790
26790
  }
26791
26791
  }
26792
- class Dy extends tg.EventEmitter {
26792
+ class Dy extends gg.EventEmitter {
26793
26793
  constructor(A) {
26794
26794
  super(), this.onWorkerMessage = (e) => {
26795
26795
  var t, g;
@@ -26867,10 +26867,10 @@ class Dy extends tg.EventEmitter {
26867
26867
  });
26868
26868
  }
26869
26869
  setupEventListeners(A, e) {
26870
- A.on(_A.TrackPublished, (t, g) => this.setParticipantCryptorEnabled(t.trackInfo.encryption !== Ii.NONE, g.identity)), A.on(_A.ConnectionStateChanged, (t) => {
26870
+ A.on(_A.TrackPublished, (t, g) => this.setParticipantCryptorEnabled(t.trackInfo.encryption !== si.NONE, g.identity)), A.on(_A.ConnectionStateChanged, (t) => {
26871
26871
  t === ke.Connected && A.remoteParticipants.forEach((g) => {
26872
26872
  g.trackPublications.forEach((o) => {
26873
- this.setParticipantCryptorEnabled(o.trackInfo.encryption !== Ii.NONE, g.identity);
26873
+ this.setParticipantCryptorEnabled(o.trackInfo.encryption !== si.NONE, g.identity);
26874
26874
  });
26875
26875
  });
26876
26876
  }).on(_A.TrackUnsubscribed, (t, g, o) => {
@@ -27073,7 +27073,7 @@ var GI;
27073
27073
  })(GI || (GI = {}));
27074
27074
  class py {
27075
27075
  constructor() {
27076
- this.pendingTasks = /* @__PURE__ */ new Map(), this.taskMutex = new ri(), this.nextTaskIndex = 0;
27076
+ this.pendingTasks = /* @__PURE__ */ new Map(), this.taskMutex = new Bi(), this.nextTaskIndex = 0;
27077
27077
  }
27078
27078
  run(A) {
27079
27079
  return U(this, void 0, void 0, function* () {
@@ -27128,7 +27128,7 @@ class kE {
27128
27128
  var t;
27129
27129
  this.rtt = 0, this.state = je.DISCONNECTED, this.log = he, this.resetCallbacks = () => {
27130
27130
  this.onAnswer = void 0, this.onLeave = void 0, this.onLocalTrackPublished = void 0, this.onLocalTrackUnpublished = void 0, this.onNegotiateRequested = void 0, this.onOffer = void 0, this.onRemoteMuteChanged = void 0, this.onSubscribedQualityUpdate = void 0, this.onTokenRefresh = void 0, this.onTrickle = void 0, this.onClose = void 0;
27131
- }, this.log = Mi((t = e.loggerName) !== null && t !== void 0 ? t : Ni.Signal), this.loggerContextCb = e.loggerContextCb, this.useJSON = A, this.requestQueue = new py(), this.queuedRequests = [], this.closingLock = new ri(), this.connectionLock = new ri(), this.state = je.DISCONNECTED;
27131
+ }, this.log = Fi((t = e.loggerName) !== null && t !== void 0 ? t : Gi.Signal), this.loggerContextCb = e.loggerContextCb, this.useJSON = A, this.requestQueue = new py(), this.queuedRequests = [], this.closingLock = new Bi(), this.connectionLock = new Bi(), this.state = je.DISCONNECTED;
27132
27132
  }
27133
27133
  get logContext() {
27134
27134
  var A, e;
@@ -28062,7 +28062,7 @@ const Gy = 0.7, Rn = {
28062
28062
  NegotiationComplete: "negotiationComplete",
28063
28063
  RTPVideoPayloadTypes: "rtpVideoPayloadTypes"
28064
28064
  };
28065
- class Wc extends tg.EventEmitter {
28065
+ class Wc extends gg.EventEmitter {
28066
28066
  get pc() {
28067
28067
  return this._pc || (this._pc = this.createPC()), this._pc;
28068
28068
  }
@@ -28081,7 +28081,7 @@ class Wc extends tg.EventEmitter {
28081
28081
  }
28082
28082
  }), 100), this.close = () => {
28083
28083
  this._pc && (this._pc.close(), this._pc.onconnectionstatechange = null, this._pc.oniceconnectionstatechange = null, this._pc.onicegatheringstatechange = null, this._pc.ondatachannel = null, this._pc.onnegotiationneeded = null, this._pc.onsignalingstatechange = null, this._pc.onicecandidate = null, this._pc.ondatachannel = null, this._pc.ontrack = null, this._pc.onconnectionstatechange = null, this._pc.oniceconnectionstatechange = null, this._pc = null);
28084
- }, this.log = Mi((t = e.loggerName) !== null && t !== void 0 ? t : Ni.PCTransport), this.loggerOptions = e, this.config = A, this._pc = this.createPC();
28084
+ }, this.log = Fi((t = e.loggerName) !== null && t !== void 0 ? t : Gi.PCTransport), this.loggerOptions = e, this.config = A, this._pc = this.createPC();
28085
28085
  }
28086
28086
  createPC() {
28087
28087
  const A = new RTCPeerConnection(this.config);
@@ -28402,12 +28402,12 @@ class Ty {
28402
28402
  var o;
28403
28403
  const n = this.state, I = this.requiredTransports.map((a) => a.getConnectionState());
28404
28404
  I.every((a) => a === "connected") ? this.state = et.CONNECTED : I.some((a) => a === "failed") ? this.state = et.FAILED : I.some((a) => a === "connecting") ? this.state = et.CONNECTING : I.every((a) => a === "closed") ? this.state = et.CLOSED : I.some((a) => a === "closed") ? this.state = et.CLOSING : I.every((a) => a === "new") && (this.state = et.NEW), n !== this.state && (this.log.debug("pc state change: from ".concat(et[n], " to ").concat(et[this.state]), this.logContext), (o = this.onStateChange) === null || o === void 0 || o.call(this, this.state, this.publisher.getConnectionState(), this.subscriber.getConnectionState()));
28405
- }, this.log = Mi((g = t.loggerName) !== null && g !== void 0 ? g : Ni.PCManager), this.loggerOptions = t, this.isPublisherConnectionRequired = !e, this.isSubscriberConnectionRequired = e, this.publisher = new Wc(A, t), this.subscriber = new Wc(A, t), this.publisher.onConnectionStateChange = this.updateState, this.subscriber.onConnectionStateChange = this.updateState, this.publisher.onIceConnectionStateChange = this.updateState, this.subscriber.onIceConnectionStateChange = this.updateState, this.publisher.onSignalingStatechange = this.updateState, this.subscriber.onSignalingStatechange = this.updateState, this.publisher.onIceCandidate = (o) => {
28405
+ }, this.log = Fi((g = t.loggerName) !== null && g !== void 0 ? g : Gi.PCManager), this.loggerOptions = t, this.isPublisherConnectionRequired = !e, this.isSubscriberConnectionRequired = e, this.publisher = new Wc(A, t), this.subscriber = new Wc(A, t), this.publisher.onConnectionStateChange = this.updateState, this.subscriber.onConnectionStateChange = this.updateState, this.publisher.onIceConnectionStateChange = this.updateState, this.subscriber.onIceConnectionStateChange = this.updateState, this.publisher.onSignalingStatechange = this.updateState, this.subscriber.onSignalingStatechange = this.updateState, this.publisher.onIceCandidate = (o) => {
28406
28406
  var n;
28407
- (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, ki.PUBLISHER);
28407
+ (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, Si.PUBLISHER);
28408
28408
  }, this.subscriber.onIceCandidate = (o) => {
28409
28409
  var n;
28410
- (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, ki.SUBSCRIBER);
28410
+ (n = this.onIceCandidate) === null || n === void 0 || n.call(this, o, Si.SUBSCRIBER);
28411
28411
  }, this.subscriber.onDataChannel = (o) => {
28412
28412
  var n;
28413
28413
  (n = this.onDataChannel) === null || n === void 0 || n.call(this, o);
@@ -28417,7 +28417,7 @@ class Ty {
28417
28417
  }, this.publisher.onOffer = (o) => {
28418
28418
  var n;
28419
28419
  (n = this.onPublisherOffer) === null || n === void 0 || n.call(this, o);
28420
- }, this.state = et.NEW, this.connectionLock = new ri();
28420
+ }, this.state = et.NEW, this.connectionLock = new Bi();
28421
28421
  }
28422
28422
  get logContext() {
28423
28423
  var A, e;
@@ -28465,7 +28465,7 @@ class Ty {
28465
28465
  }
28466
28466
  addIceCandidate(A, e) {
28467
28467
  return U(this, void 0, void 0, function* () {
28468
- e === ki.PUBLISHER ? yield this.publisher.addIceCandidate(A) : yield this.subscriber.addIceCandidate(A);
28468
+ e === Si.PUBLISHER ? yield this.publisher.addIceCandidate(A) : yield this.subscriber.addIceCandidate(A);
28469
28469
  });
28470
28470
  }
28471
28471
  createSubscriberAnswerFromOffer(A) {
@@ -28522,7 +28522,7 @@ class Ty {
28522
28522
  * Returns the first required transport's address if no explicit target is specified
28523
28523
  */
28524
28524
  getConnectedAddress(A) {
28525
- return A === ki.PUBLISHER ? this.publisher.getConnectedAddress() : A === ki.SUBSCRIBER ? this.publisher.getConnectedAddress() : this.requiredTransports[0].getConnectedAddress();
28525
+ return A === Si.PUBLISHER ? this.publisher.getConnectedAddress() : A === Si.SUBSCRIBER ? this.publisher.getConnectedAddress() : this.requiredTransports[0].getConnectedAddress();
28526
28526
  }
28527
28527
  get requiredTransports() {
28528
28528
  const A = [];
@@ -28559,11 +28559,11 @@ class Ty {
28559
28559
  }
28560
28560
  }
28561
28561
  const Xc = "_lossy", zc = "_reliable", Ky = 2 * 1e3, $c = "leave-reconnect";
28562
- var xi;
28562
+ var fi;
28563
28563
  (function(i) {
28564
28564
  i[i.New = 0] = "New", i[i.Connected = 1] = "Connected", i[i.Disconnected = 2] = "Disconnected", i[i.Reconnecting = 3] = "Reconnecting", i[i.Closed = 4] = "Closed";
28565
- })(xi || (xi = {}));
28566
- class Jy extends tg.EventEmitter {
28565
+ })(fi || (fi = {}));
28566
+ class Jy extends gg.EventEmitter {
28567
28567
  get isClosed() {
28568
28568
  return this._isClosed;
28569
28569
  }
@@ -28572,7 +28572,7 @@ class Jy extends tg.EventEmitter {
28572
28572
  }
28573
28573
  constructor(A) {
28574
28574
  var e;
28575
- super(), this.options = A, this.rtcConfig = {}, this.peerConnectionTimeout = yE.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.subscriberPrimary = !1, this.pcState = xi.New, this._isClosed = !0, this.pendingTrackResolvers = {}, this.reconnectAttempts = 0, this.reconnectStart = 0, this.attemptingReconnect = !1, this.joinAttempts = 0, this.maxJoinAttempts = 1, this.shouldFailNext = !1, this.log = he, this.handleDataChannel = (t) => {
28575
+ super(), this.options = A, this.rtcConfig = {}, this.peerConnectionTimeout = yE.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.subscriberPrimary = !1, this.pcState = fi.New, this._isClosed = !0, this.pendingTrackResolvers = {}, this.reconnectAttempts = 0, this.reconnectStart = 0, this.attemptingReconnect = !1, this.joinAttempts = 0, this.maxJoinAttempts = 1, this.shouldFailNext = !1, this.log = he, this.handleDataChannel = (t) => {
28576
28576
  let {
28577
28577
  channel: g
28578
28578
  } = t;
@@ -28640,7 +28640,7 @@ class Jy extends tg.EventEmitter {
28640
28640
  }
28641
28641
  t === $c && (I = 0), this.log.debug("reconnecting in ".concat(I, "ms"), this.logContext), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = pt.setTimeout(() => this.attemptReconnect(g).finally(() => this.reconnectTimeout = void 0), I);
28642
28642
  }, this.waitForRestarted = () => new Promise((t, g) => {
28643
- this.pcState === xi.Connected && t();
28643
+ this.pcState === fi.Connected && t();
28644
28644
  const o = () => {
28645
28645
  this.off(yA.Disconnected, n), t();
28646
28646
  }, n = () => {
@@ -28656,10 +28656,10 @@ class Jy extends tg.EventEmitter {
28656
28656
  return g.bufferedAmount <= g.bufferedAmountLowThreshold;
28657
28657
  }, this.handleBrowserOnLine = () => {
28658
28658
  this.client.currentState === je.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(Xo.RR_SIGNAL_DISCONNECTED));
28659
- }, this.log = Mi((e = A.loggerName) !== null && e !== void 0 ? e : Ni.Engine), this.loggerOptions = {
28659
+ }, this.log = Fi((e = A.loggerName) !== null && e !== void 0 ? e : Gi.Engine), this.loggerOptions = {
28660
28660
  loggerName: A.loggerName,
28661
28661
  loggerContextCb: () => this.logContext
28662
- }, this.client = new kE(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new ri(), this.dataProcessLock = new ri(), this.dcBufferStatus = /* @__PURE__ */ new Map([[kt.LOSSY, !0], [kt.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(yA.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(yA.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(yA.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(yA.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(yA.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(yA.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(yA.StreamStateChanged, t);
28662
+ }, this.client = new kE(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new Bi(), this.dataProcessLock = new Bi(), this.dcBufferStatus = /* @__PURE__ */ new Map([[kt.LOSSY, !0], [kt.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(yA.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(yA.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(yA.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(yA.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(yA.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(yA.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(yA.StreamStateChanged, t);
28663
28663
  }
28664
28664
  /** @internal */
28665
28665
  get logContext() {
@@ -28716,7 +28716,7 @@ class Jy extends tg.EventEmitter {
28716
28716
  }
28717
28717
  addTrack(A) {
28718
28718
  if (this.pendingTrackResolvers[A.cid])
28719
- throw new Yi("a track with the same ID has already been published");
28719
+ throw new Hi("a track with the same ID has already been published");
28720
28720
  return new Promise((e, t) => {
28721
28721
  const g = setTimeout(() => {
28722
28722
  delete this.pendingTrackResolvers[A.cid], t(new He("publication of local track timed out, no response from server"));
@@ -28783,10 +28783,10 @@ class Jy extends tg.EventEmitter {
28783
28783
  this.client.sendOffer(g);
28784
28784
  }, this.pcManager.onDataChannel = this.handleDataChannel, this.pcManager.onStateChange = (g, o, n) => U(this, void 0, void 0, function* () {
28785
28785
  if (this.log.debug("primary PC state changed ".concat(g), this.logContext), g === et.CONNECTED) {
28786
- const s = this.pcState === xi.New;
28787
- this.pcState = xi.Connected, s && this.emit(yA.Connected, A);
28786
+ const s = this.pcState === fi.New;
28787
+ this.pcState = fi.Connected, s && this.emit(yA.Connected, A);
28788
28788
  } else
28789
- g === et.FAILED && this.pcState === xi.Connected && (this.pcState = xi.Disconnected, this.handleDisconnect("peerconnection failed", n === "failed" ? Xo.RR_SUBSCRIBER_FAILED : Xo.RR_PUBLISHER_FAILED));
28789
+ g === et.FAILED && this.pcState === fi.Connected && (this.pcState = fi.Disconnected, this.handleDisconnect("peerconnection failed", n === "failed" ? Xo.RR_SUBSCRIBER_FAILED : Xo.RR_PUBLISHER_FAILED));
28790
28790
  const I = this.client.isDisconnected || this.client.currentState === je.RECONNECTING, a = [et.FAILED, et.CLOSING, et.CLOSED].includes(g);
28791
28791
  I && a && !this._isClosed && this.emit(yA.Offline);
28792
28792
  }), this.pcManager.onTrack = (g) => {
@@ -29046,13 +29046,13 @@ class Jy extends tg.EventEmitter {
29046
29046
  }
29047
29047
  waitForPCReconnected() {
29048
29048
  return U(this, void 0, void 0, function* () {
29049
- this.pcState = xi.Reconnecting, this.log.debug("waiting for peer connection to reconnect", this.logContext);
29049
+ this.pcState = fi.Reconnecting, this.log.debug("waiting for peer connection to reconnect", this.logContext);
29050
29050
  try {
29051
29051
  if (yield mg(Ky), !this.pcManager)
29052
29052
  throw new Bt("PC manager is closed");
29053
- yield this.pcManager.ensurePCTransportConnection(void 0, this.peerConnectionTimeout), this.pcState = xi.Connected;
29053
+ yield this.pcManager.ensurePCTransportConnection(void 0, this.peerConnectionTimeout), this.pcState = fi.Connected;
29054
29054
  } catch (A) {
29055
- throw this.pcState = xi.Disconnected, new He("could not establish PC connection, ".concat(A.message));
29055
+ throw this.pcState = fi.Disconnected, new He("could not establish PC connection, ".concat(A.message));
29056
29056
  }
29057
29057
  });
29058
29058
  }
@@ -29182,7 +29182,7 @@ class Jy extends tg.EventEmitter {
29182
29182
  target: g
29183
29183
  }));
29184
29184
  };
29185
- return e(this.dataChannelForKind(kt.LOSSY), ki.PUBLISHER), e(this.dataChannelForKind(kt.RELIABLE), ki.PUBLISHER), e(this.dataChannelForKind(kt.LOSSY, !0), ki.SUBSCRIBER), e(this.dataChannelForKind(kt.RELIABLE, !0), ki.SUBSCRIBER), A;
29185
+ return e(this.dataChannelForKind(kt.LOSSY), Si.PUBLISHER), e(this.dataChannelForKind(kt.RELIABLE), Si.PUBLISHER), e(this.dataChannelForKind(kt.LOSSY, !0), Si.SUBSCRIBER), e(this.dataChannelForKind(kt.RELIABLE, !0), Si.SUBSCRIBER), A;
29186
29186
  }
29187
29187
  clearReconnectTimeout() {
29188
29188
  this.reconnectTimeout && pt.clearTimeout(this.reconnectTimeout);
@@ -29407,9 +29407,9 @@ function Wu(i, A, e) {
29407
29407
  case "audio":
29408
29408
  return new zt(i, A, !1, void 0, e);
29409
29409
  case "video":
29410
- return new oi(i, A, !1, e);
29410
+ return new Ii(i, A, !1, e);
29411
29411
  default:
29412
- throw new Yi("unsupported track type: ".concat(i.kind));
29412
+ throw new Hi("unsupported track type: ".concat(i.kind));
29413
29413
  }
29414
29414
  }
29415
29415
  const qy = Object.values(HI), Hy = Object.values(FQ), Py = Object.values(_E), Oy = [HI.h180, HI.h360], Vy = [FQ.h180, FQ.h360], jy = (i) => [{
@@ -29572,7 +29572,7 @@ class Zu {
29572
29572
  }
29573
29573
  }
29574
29574
  const zy = 5e3;
29575
- class oi extends PI {
29575
+ class Ii extends PI {
29576
29576
  /**
29577
29577
  *
29578
29578
  * @param mediaTrack
@@ -29605,7 +29605,7 @@ class oi extends PI {
29605
29605
  }), this._currentBitrate = I;
29606
29606
  }
29607
29607
  this.prevStats = n;
29608
- }), this.senderLock = new ri();
29608
+ }), this.senderLock = new Bi();
29609
29609
  }
29610
29610
  get isSimulcast() {
29611
29611
  return !!(this.sender && this.sender.getParameters().encodings.length > 1);
@@ -29748,7 +29748,7 @@ class oi extends PI {
29748
29748
  }
29749
29749
  setPublishingQuality(A) {
29750
29750
  const e = [];
29751
- for (let t = Ci.LOW; t <= Ci.HIGH; t += 1)
29751
+ for (let t = Qi.LOW; t <= Qi.HIGH; t += 1)
29752
29752
  e.push(new xE({
29753
29753
  quality: t,
29754
29754
  enabled: t <= A
@@ -29948,19 +29948,19 @@ function id(i, A, e, t, g, o) {
29948
29948
  function Xu(i) {
29949
29949
  switch (i) {
29950
29950
  case "f":
29951
- return Ci.HIGH;
29951
+ return Qi.HIGH;
29952
29952
  case "h":
29953
- return Ci.MEDIUM;
29953
+ return Qi.MEDIUM;
29954
29954
  case "q":
29955
- return Ci.LOW;
29955
+ return Qi.LOW;
29956
29956
  default:
29957
- return Ci.HIGH;
29957
+ return Qi.HIGH;
29958
29958
  }
29959
29959
  }
29960
29960
  function gd(i, A, e, t) {
29961
29961
  if (!e)
29962
29962
  return [new io({
29963
- quality: Ci.HIGH,
29963
+ quality: Qi.HIGH,
29964
29964
  width: i,
29965
29965
  height: A,
29966
29966
  bitrate: 0,
@@ -29970,7 +29970,7 @@ function gd(i, A, e, t) {
29970
29970
  const g = e[0].scalabilityMode, o = new Zu(g), n = [];
29971
29971
  for (let I = 0; I < o.spatial; I += 1)
29972
29972
  n.push(new io({
29973
- quality: Ci.HIGH - I,
29973
+ quality: Qi.HIGH - I,
29974
29974
  width: Math.ceil(i / Math.pow(2, I)),
29975
29975
  height: Math.ceil(A / Math.pow(2, I)),
29976
29976
  bitrate: e[0].maxBitrate ? Math.ceil(e[0].maxBitrate / Math.pow(3, I)) : 0,
@@ -30339,14 +30339,14 @@ function od(i) {
30339
30339
  i = i.offsetParent, A += i.offsetTop, e += i.offsetLeft;
30340
30340
  return A < window.pageYOffset + window.innerHeight && e < window.pageXOffset + window.innerWidth && A + g > window.pageYOffset && e + t > window.pageXOffset && !o && (n !== "" ? parseFloat(n) > 0 : !0) && I !== "none";
30341
30341
  }
30342
- class cg extends tg.EventEmitter {
30342
+ class cg extends gg.EventEmitter {
30343
30343
  constructor(A, e, t, g) {
30344
30344
  var o;
30345
- super(), this.metadataMuted = !1, this.encryption = Ii.NONE, this.log = he, this.handleMuted = () => {
30345
+ super(), this.metadataMuted = !1, this.encryption = si.NONE, this.log = he, this.handleMuted = () => {
30346
30346
  this.emit(uA.Muted);
30347
30347
  }, this.handleUnmuted = () => {
30348
30348
  this.emit(uA.Unmuted);
30349
- }, this.log = Mi((o = g == null ? void 0 : g.loggerName) !== null && o !== void 0 ? o : Ni.Publication), this.loggerContextCb = this.loggerContextCb, this.setMaxListeners(100), this.kind = A, this.trackSid = e, this.trackName = t, this.source = nA.Source.Unknown;
30349
+ }, this.log = Fi((o = g == null ? void 0 : g.loggerName) !== null && o !== void 0 ? o : Gi.Publication), this.loggerContextCb = this.loggerContextCb, this.setMaxListeners(100), this.kind = A, this.trackSid = e, this.trackName = t, this.source = nA.Source.Unknown;
30350
30350
  }
30351
30351
  /** @internal */
30352
30352
  setTrack(A) {
@@ -30366,7 +30366,7 @@ class cg extends tg.EventEmitter {
30366
30366
  return this.track !== void 0;
30367
30367
  }
30368
30368
  get isEncrypted() {
30369
- return this.encryption !== Ii.NONE;
30369
+ return this.encryption !== si.NONE;
30370
30370
  }
30371
30371
  /**
30372
30372
  * an [AudioTrack] if this publication holds an audio track
@@ -30379,7 +30379,7 @@ class cg extends tg.EventEmitter {
30379
30379
  * an [VideoTrack] if this publication holds a video track
30380
30380
  */
30381
30381
  get videoTrack() {
30382
- if (this.track instanceof oi || this.track instanceof vI)
30382
+ if (this.track instanceof Ii || this.track instanceof vI)
30383
30383
  return this.track;
30384
30384
  }
30385
30385
  /** @internal */
@@ -30479,7 +30479,7 @@ function AS(i) {
30479
30479
  return Wg.Unknown;
30480
30480
  }
30481
30481
  }
30482
- class $u extends tg.EventEmitter {
30482
+ class $u extends gg.EventEmitter {
30483
30483
  get logContext() {
30484
30484
  var A, e;
30485
30485
  return Object.assign({}, (e = (A = this.loggerOptions) === null || A === void 0 ? void 0 : A.loggerContextCb) === null || e === void 0 ? void 0 : e.call(A));
@@ -30494,7 +30494,7 @@ class $u extends tg.EventEmitter {
30494
30494
  /** @internal */
30495
30495
  constructor(A, e, t, g, o) {
30496
30496
  var n;
30497
- super(), this.audioLevel = 0, this.isSpeaking = !1, this._connectionQuality = Wg.Unknown, this.log = he, this.log = Mi((n = o == null ? void 0 : o.loggerName) !== null && n !== void 0 ? n : Ni.Participant), this.loggerOptions = o, this.setMaxListeners(100), this.sid = A, this.identity = e, this.name = t, this.metadata = g, this.audioTrackPublications = /* @__PURE__ */ new Map(), this.videoTrackPublications = /* @__PURE__ */ new Map(), this.trackPublications = /* @__PURE__ */ new Map();
30497
+ super(), this.audioLevel = 0, this.isSpeaking = !1, this._connectionQuality = Wg.Unknown, this.log = he, this.log = Fi((n = o == null ? void 0 : o.loggerName) !== null && n !== void 0 ? n : Gi.Participant), this.loggerOptions = o, this.setMaxListeners(100), this.sid = A, this.identity = e, this.name = t, this.metadata = g, this.audioTrackPublications = /* @__PURE__ */ new Map(), this.videoTrackPublications = /* @__PURE__ */ new Map(), this.trackPublications = /* @__PURE__ */ new Map();
30498
30498
  }
30499
30499
  getTrackPublications() {
30500
30500
  return Array.from(this.trackPublications.values());
@@ -30614,7 +30614,7 @@ class nd extends $u {
30614
30614
  super(A, e, void 0, void 0, {
30615
30615
  loggerName: g.loggerName,
30616
30616
  loggerContextCb: () => this.engine.logContext
30617
- }), this.pendingPublishing = /* @__PURE__ */ new Set(), this.pendingPublishPromises = /* @__PURE__ */ new Map(), this.participantTrackPermissions = [], this.allParticipantsAllowedToSubscribe = !0, this.encryptionType = Ii.NONE, this.handleReconnecting = () => {
30617
+ }), this.pendingPublishing = /* @__PURE__ */ new Set(), this.pendingPublishPromises = /* @__PURE__ */ new Map(), this.participantTrackPermissions = [], this.allParticipantsAllowedToSubscribe = !0, this.encryptionType = si.NONE, this.handleReconnecting = () => {
30618
30618
  this.reconnectFuture || (this.reconnectFuture = new qu());
30619
30619
  }, this.handleReconnected = () => {
30620
30620
  var o, n;
@@ -30688,7 +30688,7 @@ class nd extends $u {
30688
30688
  this.log.debug("unpublishing local track due to TrackEnded", Object.assign(Object.assign({}, this.logContext), Ye(o))), this.unpublishTrack(o);
30689
30689
  else if (o.isUserProvided)
30690
30690
  yield o.mute();
30691
- else if (o instanceof zt || o instanceof oi)
30691
+ else if (o instanceof zt || o instanceof Ii)
30692
30692
  try {
30693
30693
  if (Vt())
30694
30694
  try {
@@ -30716,7 +30716,7 @@ class nd extends $u {
30716
30716
  return this.microphoneError;
30717
30717
  }
30718
30718
  get isE2EEEnabled() {
30719
- return this.encryptionType !== Ii.NONE;
30719
+ return this.encryptionType !== si.NONE;
30720
30720
  }
30721
30721
  getTrackPublication(A) {
30722
30722
  const e = super.getTrackPublication(A);
@@ -30792,7 +30792,7 @@ class nd extends $u {
30792
30792
  /** @internal */
30793
30793
  setE2EEEnabled(A) {
30794
30794
  return U(this, void 0, void 0, function* () {
30795
- this.encryptionType = A ? Ii.GCM : Ii.NONE, yield this.republishAllTracks(void 0, !1);
30795
+ this.encryptionType = A ? si.GCM : si.NONE, yield this.republishAllTracks(void 0, !1);
30796
30796
  });
30797
30797
  }
30798
30798
  setTrackEnabled(A, e, t, g) {
@@ -30831,7 +30831,7 @@ class nd extends $u {
30831
30831
  a = yield this.createScreenTracks(Object.assign({}, t));
30832
30832
  break;
30833
30833
  default:
30834
- throw new Yi(A);
30834
+ throw new Hi(A);
30835
30835
  }
30836
30836
  const s = [];
30837
30837
  for (const C of a)
@@ -30840,7 +30840,7 @@ class nd extends $u {
30840
30840
  } catch (s) {
30841
30841
  throw a == null || a.forEach((C) => {
30842
30842
  C.stop();
30843
- }), s instanceof Error && !(s instanceof Yi) && this.emit(NA.MediaDevicesError, s), s;
30843
+ }), s instanceof Error && !(s instanceof Hi) && this.emit(NA.MediaDevicesError, s), s;
30844
30844
  } finally {
30845
30845
  this.pendingPublishing.delete(A);
30846
30846
  }
@@ -30916,8 +30916,8 @@ class nd extends $u {
30916
30916
  A.resolution === void 0 && !cy() && (A.resolution = _E.h1080fps30.resolution);
30917
30917
  const e = ny(A), t = yield navigator.mediaDevices.getDisplayMedia(e), g = t.getVideoTracks();
30918
30918
  if (g.length === 0)
30919
- throw new Yi("no video track found");
30920
- const o = new oi(g[0], void 0, !1, {
30919
+ throw new Hi("no video track found");
30920
+ const o = new Ii(g[0], void 0, !1, {
30921
30921
  loggerName: this.roomOptions.loggerName,
30922
30922
  loggerContextCb: () => this.logContext
30923
30923
  });
@@ -30969,13 +30969,13 @@ class nd extends $u {
30969
30969
  });
30970
30970
  break;
30971
30971
  case "video":
30972
- A = new oi(A, I, !0, {
30972
+ A = new Ii(A, I, !0, {
30973
30973
  loggerName: this.roomOptions.loggerName,
30974
30974
  loggerContextCb: () => this.logContext
30975
30975
  });
30976
30976
  break;
30977
30977
  default:
30978
- throw new Yi("unsupported MediaStreamTrack kind ".concat(A.kind));
30978
+ throw new Hi("unsupported MediaStreamTrack kind ".concat(A.kind));
30979
30979
  }
30980
30980
  else
30981
30981
  A.updateLoggerOptions({
@@ -31039,13 +31039,13 @@ class nd extends $u {
31039
31039
  dims: w
31040
31040
  }));
31041
31041
  }
31042
- E.width = w.width, E.height = w.height, A instanceof oi && (Rs(h) && (A.source === nA.Source.ScreenShare && (e.scalabilityMode = "L1T3", "contentHint" in A.mediaStreamTrack && (A.mediaStreamTrack.contentHint = "motion", this.log.info("forcing contentHint to motion for screenshare with SVC codecs", Object.assign(Object.assign({}, this.logContext), Ye(A))))), e.scalabilityMode = (a = e.scalabilityMode) !== null && a !== void 0 ? a : "L3T3_KEY"), E.simulcastCodecs = [new pQ({
31042
+ E.width = w.width, E.height = w.height, A instanceof Ii && (Rs(h) && (A.source === nA.Source.ScreenShare && (e.scalabilityMode = "L1T3", "contentHint" in A.mediaStreamTrack && (A.mediaStreamTrack.contentHint = "motion", this.log.info("forcing contentHint to motion for screenshare with SVC codecs", Object.assign(Object.assign({}, this.logContext), Ye(A))))), e.scalabilityMode = (a = e.scalabilityMode) !== null && a !== void 0 ? a : "L3T3_KEY"), E.simulcastCodecs = [new pQ({
31043
31043
  codec: h,
31044
31044
  cid: A.mediaStreamTrack.id
31045
31045
  })], e.backupCodec === !0 && (e.backupCodec = {
31046
31046
  codec: JQ
31047
31047
  }), e.backupCodec && h !== e.backupCodec.codec && // TODO remove this once e2ee is supported for backup codecs
31048
- E.encryption === Ii.NONE && (this.roomOptions.dynacast || (this.roomOptions.dynacast = !0), E.simulcastCodecs.push(new pQ({
31048
+ E.encryption === si.NONE && (this.roomOptions.dynacast || (this.roomOptions.dynacast = !0), E.simulcastCodecs.push(new pQ({
31049
31049
  codec: e.backupCodec.codec,
31050
31050
  cid: ""
31051
31051
  })))), x = qQ(A.source === nA.Source.ScreenShare, E.width, E.height, e), E.layers = gd(E.width, E.height, x, Rs(e.videoCodec));
@@ -31103,7 +31103,7 @@ class nd extends $u {
31103
31103
  } catch (w) {
31104
31104
  this.log.warn("failed to set degradationPreference: ".concat(w));
31105
31105
  }
31106
- return yield this.engine.negotiate(), A instanceof oi ? A.startMonitor(this.engine.client) : A instanceof zt && A.startMonitor(), this.addTrackPublication(D), this.emit(NA.LocalTrackPublished, D), D;
31106
+ return yield this.engine.negotiate(), A instanceof Ii ? A.startMonitor(this.engine.client) : A instanceof zt && A.startMonitor(), this.addTrackPublication(D), this.emit(NA.LocalTrackPublished, D), D;
31107
31107
  });
31108
31108
  }
31109
31109
  get isLocal() {
@@ -31115,15 +31115,15 @@ class nd extends $u {
31115
31115
  publishAdditionalCodecForTrack(A, e, t) {
31116
31116
  var g;
31117
31117
  return U(this, void 0, void 0, function* () {
31118
- if (this.encryptionType !== Ii.NONE)
31118
+ if (this.encryptionType !== si.NONE)
31119
31119
  return;
31120
31120
  let o;
31121
31121
  if (this.trackPublications.forEach((r) => {
31122
31122
  r.track && r.track === A && (o = r);
31123
31123
  }), !o)
31124
- throw new Yi("track is not published");
31125
- if (!(A instanceof oi))
31126
- throw new Yi("track is not a video track");
31124
+ throw new Hi("track is not published");
31125
+ if (!(A instanceof Ii))
31126
+ throw new Hi("track is not a video track");
31127
31127
  const n = Object.assign(Object.assign({}, (g = this.roomOptions) === null || g === void 0 ? void 0 : g.publishDefaults), t), I = Wy(A, e, n);
31128
31128
  if (!I) {
31129
31129
  this.log.info("backup codec has been disabled, ignoring request to add additional codec for track", Object.assign(Object.assign({}, this.logContext), Ye(A)));
@@ -31167,7 +31167,7 @@ class nd extends $u {
31167
31167
  try {
31168
31168
  for (const s of this.engine.pcManager.publisher.getTransceivers())
31169
31169
  s.sender === a && (s.direction = "inactive", I = !0);
31170
- if (this.engine.removeTrack(a) && (I = !0), A instanceof oi) {
31170
+ if (this.engine.removeTrack(a) && (I = !0), A instanceof Ii) {
31171
31171
  for (const [, s] of A.simulcastCodecs)
31172
31172
  s.sender && (this.engine.removeTrack(s.sender) && (I = !0), s.sender = void 0);
31173
31173
  A.simulcastCodecs.clear();
@@ -31201,7 +31201,7 @@ class nd extends $u {
31201
31201
  g.track && (A && (g.options = Object.assign(Object.assign({}, g.options), A)), t.push(g));
31202
31202
  }), yield Promise.all(t.map((g) => U(this, void 0, void 0, function* () {
31203
31203
  const o = g.track;
31204
- yield this.unpublishTrack(o, !1), e && !o.isMuted && o.source !== nA.Source.ScreenShare && o.source !== nA.Source.ScreenShareAudio && (o instanceof zt || o instanceof oi) && !o.isUserProvided && (this.log.debug("restarting existing track", Object.assign(Object.assign({}, this.logContext), {
31204
+ yield this.unpublishTrack(o, !1), e && !o.isMuted && o.source !== nA.Source.ScreenShare && o.source !== nA.Source.ScreenShareAudio && (o instanceof zt || o instanceof Ii) && !o.isUserProvided && (this.log.debug("restarting existing track", Object.assign(Object.assign({}, this.logContext), {
31205
31205
  track: g.trackSid
31206
31206
  })), yield o.restartTrack()), yield this.publishTrack(o, g.options);
31207
31207
  })));
@@ -31270,13 +31270,13 @@ class nd extends $u {
31270
31270
  let e;
31271
31271
  return this.trackPublications.forEach((t) => {
31272
31272
  const g = t.track;
31273
- g && (A instanceof MediaStreamTrack ? (g instanceof zt || g instanceof oi) && g.mediaStreamTrack === A && (e = t) : A === g && (e = t));
31273
+ g && (A instanceof MediaStreamTrack ? (g instanceof zt || g instanceof Ii) && g.mediaStreamTrack === A && (e = t) : A === g && (e = t));
31274
31274
  }), e;
31275
31275
  }
31276
31276
  }
31277
31277
  class Af extends cg {
31278
31278
  constructor(A, e, t, g) {
31279
- super(A, e.sid, e.name, g), this.track = void 0, this.allowed = !0, this.disabled = !1, this.currentVideoQuality = Ci.HIGH, this.handleEnded = (o) => {
31279
+ super(A, e.sid, e.name, g), this.track = void 0, this.allowed = !0, this.disabled = !1, this.currentVideoQuality = Qi.HIGH, this.handleEnded = (o) => {
31280
31280
  this.setTrack(void 0), this.emit(uA.Ended, o);
31281
31281
  }, this.handleVisibilityChange = (o) => {
31282
31282
  this.log.debug("adaptivestream video visibility ".concat(this.trackSid, ", visible=").concat(o), this.logContext), this.disabled = !o, this.emitTrackUpdate();
@@ -31391,7 +31391,7 @@ class Af extends cg {
31391
31391
  disabled: this.disabled,
31392
31392
  fps: this.fps
31393
31393
  });
31394
- this.videoDimensions ? (A.width = Math.ceil(this.videoDimensions.width), A.height = Math.ceil(this.videoDimensions.height)) : this.currentVideoQuality !== void 0 ? A.quality = this.currentVideoQuality : A.quality = Ci.HIGH, this.emit(uA.UpdateSettings, A);
31394
+ this.videoDimensions ? (A.width = Math.ceil(this.videoDimensions.width), A.height = Math.ceil(this.videoDimensions.height)) : this.currentVideoQuality !== void 0 ? A.quality = this.currentVideoQuality : A.quality = Qi.HIGH, this.emit(uA.UpdateSettings, A);
31395
31395
  }
31396
31396
  }
31397
31397
  class Ms extends $u {
@@ -31570,7 +31570,7 @@ var ke;
31570
31570
  i.Disconnected = "disconnected", i.Connecting = "connecting", i.Connected = "connected", i.Reconnecting = "reconnecting";
31571
31571
  })(ke || (ke = {}));
31572
31572
  const tS = 2 * 1e3;
31573
- class iS extends tg.EventEmitter {
31573
+ class iS extends gg.EventEmitter {
31574
31574
  /**
31575
31575
  * Creates a new Room, the primary construct for a LiveKit session.
31576
31576
  * @param options
@@ -31864,7 +31864,7 @@ class iS extends tg.EventEmitter {
31864
31864
  this.emit(_A.MediaDevicesError, o);
31865
31865
  }, this.onLocalParticipantPermissionsChanged = (o) => {
31866
31866
  this.emit(_A.ParticipantPermissionsChanged, o, this.localParticipant);
31867
- }, this.setMaxListeners(100), this.remoteParticipants = /* @__PURE__ */ new Map(), this.sidToIdentity = /* @__PURE__ */ new Map(), this.options = Object.assign(Object.assign({}, Uy), A), this.log = Mi((t = this.options.loggerName) !== null && t !== void 0 ? t : Ni.Room), this.options.audioCaptureDefaults = Object.assign(Object.assign({}, Vu), A == null ? void 0 : A.audioCaptureDefaults), this.options.videoCaptureDefaults = Object.assign(Object.assign({}, ju), A == null ? void 0 : A.videoCaptureDefaults), this.options.publishDefaults = Object.assign(Object.assign({}, Ly), A == null ? void 0 : A.publishDefaults), this.maybeCreateEngine(), this.disconnectLock = new ri(), this.localParticipant = new nd("", "", this.engine, this.options), this.options.videoCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("videoinput", oo(this.options.videoCaptureDefaults.deviceId)), this.options.audioCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("audioinput", oo(this.options.audioCaptureDefaults.deviceId)), !((g = this.options.audioOutput) === null || g === void 0) && g.deviceId && this.switchActiveDevice("audiooutput", oo(this.options.audioOutput.deviceId)).catch((o) => this.log.warn("Could not set audio output: ".concat(o.message), this.logContext)), this.options.e2ee && this.setupE2EE();
31867
+ }, this.setMaxListeners(100), this.remoteParticipants = /* @__PURE__ */ new Map(), this.sidToIdentity = /* @__PURE__ */ new Map(), this.options = Object.assign(Object.assign({}, Uy), A), this.log = Fi((t = this.options.loggerName) !== null && t !== void 0 ? t : Gi.Room), this.options.audioCaptureDefaults = Object.assign(Object.assign({}, Vu), A == null ? void 0 : A.audioCaptureDefaults), this.options.videoCaptureDefaults = Object.assign(Object.assign({}, ju), A == null ? void 0 : A.videoCaptureDefaults), this.options.publishDefaults = Object.assign(Object.assign({}, Ly), A == null ? void 0 : A.publishDefaults), this.maybeCreateEngine(), this.disconnectLock = new Bi(), this.localParticipant = new nd("", "", this.engine, this.options), this.options.videoCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("videoinput", oo(this.options.videoCaptureDefaults.deviceId)), this.options.audioCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("audioinput", oo(this.options.audioCaptureDefaults.deviceId)), !((g = this.options.audioOutput) === null || g === void 0) && g.deviceId && this.switchActiveDevice("audiooutput", oo(this.options.audioOutput.deviceId)).catch((o) => this.log.warn("Could not set audio output: ".concat(o.message), this.logContext)), this.options.e2ee && this.setupE2EE();
31868
31868
  }
31869
31869
  /**
31870
31870
  * @experimental
@@ -32017,7 +32017,7 @@ class iS extends tg.EventEmitter {
32017
32017
  yield this.engine.client.handleOnClose("simulate disconnect");
32018
32018
  break;
32019
32019
  case "speaker":
32020
- g = new Cg({
32020
+ g = new Qg({
32021
32021
  scenario: {
32022
32022
  case: "speakerUpdate",
32023
32023
  value: 3
@@ -32025,7 +32025,7 @@ class iS extends tg.EventEmitter {
32025
32025
  });
32026
32026
  break;
32027
32027
  case "node-failure":
32028
- g = new Cg({
32028
+ g = new Qg({
32029
32029
  scenario: {
32030
32030
  case: "nodeFailure",
32031
32031
  value: !0
@@ -32033,7 +32033,7 @@ class iS extends tg.EventEmitter {
32033
32033
  });
32034
32034
  break;
32035
32035
  case "server-leave":
32036
- g = new Cg({
32036
+ g = new Qg({
32037
32037
  scenario: {
32038
32038
  case: "serverLeave",
32039
32039
  value: !0
@@ -32041,7 +32041,7 @@ class iS extends tg.EventEmitter {
32041
32041
  });
32042
32042
  break;
32043
32043
  case "migration":
32044
- g = new Cg({
32044
+ g = new Qg({
32045
32045
  scenario: {
32046
32046
  case: "migration",
32047
32047
  value: !0
@@ -32054,7 +32054,7 @@ class iS extends tg.EventEmitter {
32054
32054
  case "disconnect-signal-on-resume":
32055
32055
  t = () => U(this, void 0, void 0, function* () {
32056
32056
  yield this.engine.client.handleOnClose("simulate resume-disconnect");
32057
- }), g = new Cg({
32057
+ }), g = new Qg({
32058
32058
  scenario: {
32059
32059
  case: "disconnectSignalOnResume",
32060
32060
  value: !0
@@ -32064,7 +32064,7 @@ class iS extends tg.EventEmitter {
32064
32064
  case "disconnect-signal-on-resume-no-messages":
32065
32065
  t = () => U(this, void 0, void 0, function* () {
32066
32066
  yield this.engine.client.handleOnClose("simulate resume-disconnect");
32067
- }), g = new Cg({
32067
+ }), g = new Qg({
32068
32068
  scenario: {
32069
32069
  case: "disconnectSignalOnResumeNoMessages",
32070
32070
  value: !0
@@ -32076,7 +32076,7 @@ class iS extends tg.EventEmitter {
32076
32076
  break;
32077
32077
  case "force-tcp":
32078
32078
  case "force-tls":
32079
- g = new Cg({
32079
+ g = new Qg({
32080
32080
  scenario: {
32081
32081
  case: "switchCandidateProtocol",
32082
32082
  value: A === "force-tls" ? 2 : 1
@@ -32092,7 +32092,7 @@ class iS extends tg.EventEmitter {
32092
32092
  case "subscriber-bandwidth":
32093
32093
  if (e === void 0 || typeof e != "number")
32094
32094
  throw new Error("subscriber-bandwidth requires a number as argument");
32095
- g = new Cg({
32095
+ g = new Qg({
32096
32096
  scenario: {
32097
32097
  case: "subscriberBandwidth",
32098
32098
  value: BigInt(e)
@@ -32387,9 +32387,9 @@ class iS extends tg.EventEmitter {
32387
32387
  const n = new Ns(nA.Kind.Video, new Dg({
32388
32388
  source: lt.CAMERA,
32389
32389
  sid: Math.floor(Math.random() * 1e4).toString(),
32390
- type: _i.AUDIO,
32390
+ type: yi.AUDIO,
32391
32391
  name: "video-dummy"
32392
- }), new oi(g.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
32392
+ }), new Ii(g.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
32393
32393
  video: !0
32394
32394
  })).getVideoTracks()[0] : Hc(160 * ((e = o.aspectRatios[0]) !== null && e !== void 0 ? e : 1), 160, !0, !0), void 0, !1, {
32395
32395
  loggerName: this.options.loggerName,
@@ -32404,7 +32404,7 @@ class iS extends tg.EventEmitter {
32404
32404
  const n = new Ns(nA.Kind.Audio, new Dg({
32405
32405
  source: lt.MICROPHONE,
32406
32406
  sid: Math.floor(Math.random() * 1e4).toString(),
32407
- type: _i.AUDIO
32407
+ type: yi.AUDIO
32408
32408
  }), new zt(g.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
32409
32409
  audio: !0
32410
32410
  })).getAudioTracks()[0] : $C(), void 0, !1, this.audioContext, {
@@ -32429,7 +32429,7 @@ class iS extends tg.EventEmitter {
32429
32429
  const s = Hc(160 * ((t = o.aspectRatios[n % o.aspectRatios.length]) !== null && t !== void 0 ? t : 1), 160, !1, !0), C = new Dg({
32430
32430
  source: lt.CAMERA,
32431
32431
  sid: Math.floor(Math.random() * 1e4).toString(),
32432
- type: _i.AUDIO
32432
+ type: yi.AUDIO
32433
32433
  });
32434
32434
  a.addSubscribedMediaTrack(s, C.sid, new MediaStream([s])), I.tracks = [...I.tracks, C];
32435
32435
  }
@@ -32437,7 +32437,7 @@ class iS extends tg.EventEmitter {
32437
32437
  const s = $C(), C = new Dg({
32438
32438
  source: lt.MICROPHONE,
32439
32439
  sid: Math.floor(Math.random() * 1e4).toString(),
32440
- type: _i.AUDIO
32440
+ type: yi.AUDIO
32441
32441
  });
32442
32442
  a.addSubscribedMediaTrack(s, C.sid, new MediaStream([s])), I.tracks = [...I.tracks, C];
32443
32443
  }
@@ -32465,26 +32465,26 @@ function ef(i) {
32465
32465
  return Array.isArray(A) ? ef(A) : typeof A == "object" ? "logContext" in A && A.logContext : A;
32466
32466
  });
32467
32467
  }
32468
- var Di;
32468
+ var wi;
32469
32469
  (function(i) {
32470
32470
  i[i.IDLE = 0] = "IDLE", i[i.RUNNING = 1] = "RUNNING", i[i.SKIPPED = 2] = "SKIPPED", i[i.SUCCESS = 3] = "SUCCESS", i[i.FAILED = 4] = "FAILED";
32471
- })(Di || (Di = {}));
32472
- class Vn extends tg.EventEmitter {
32471
+ })(wi || (wi = {}));
32472
+ class Vn extends gg.EventEmitter {
32473
32473
  constructor(A, e) {
32474
32474
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
32475
- super(), this.status = Di.IDLE, this.logs = [], this.errorsAsWarnings = !1, this.url = A, this.token = e, this.name = this.constructor.name, this.room = new iS(t.roomOptions), this.connectOptions = t.connectOptions, t.errorsAsWarnings && (this.errorsAsWarnings = t.errorsAsWarnings);
32475
+ super(), this.status = wi.IDLE, this.logs = [], this.errorsAsWarnings = !1, this.url = A, this.token = e, this.name = this.constructor.name, this.room = new iS(t.roomOptions), this.connectOptions = t.connectOptions, t.errorsAsWarnings && (this.errorsAsWarnings = t.errorsAsWarnings);
32476
32476
  }
32477
32477
  run(A) {
32478
32478
  return U(this, void 0, void 0, function* () {
32479
- if (this.status !== Di.IDLE)
32479
+ if (this.status !== wi.IDLE)
32480
32480
  throw Error("check is running already");
32481
- this.setStatus(Di.RUNNING);
32481
+ this.setStatus(wi.RUNNING);
32482
32482
  try {
32483
32483
  yield this.perform();
32484
32484
  } catch (e) {
32485
32485
  e instanceof Error && (this.errorsAsWarnings ? this.appendWarning(e.message) : this.appendError(e.message));
32486
32486
  }
32487
- return yield this.disconnect(), yield new Promise((e) => setTimeout(e, 500)), this.status !== Di.SKIPPED && this.setStatus(this.isSuccess() ? Di.SUCCESS : Di.FAILED), A && A(), this.getInfo();
32487
+ return yield this.disconnect(), yield new Promise((e) => setTimeout(e, 500)), this.status !== wi.SKIPPED && this.setStatus(this.isSuccess() ? wi.SUCCESS : wi.FAILED), A && A(), this.getInfo();
32488
32488
  });
32489
32489
  }
32490
32490
  isSuccess() {
@@ -32501,7 +32501,7 @@ class Vn extends tg.EventEmitter {
32501
32501
  });
32502
32502
  }
32503
32503
  skip() {
32504
- this.setStatus(Di.SKIPPED);
32504
+ this.setStatus(wi.SKIPPED);
32505
32505
  }
32506
32506
  appendMessage(A) {
32507
32507
  this.logs.push({
@@ -32727,7 +32727,7 @@ class QS extends Vn {
32727
32727
  });
32728
32728
  }
32729
32729
  }
32730
- class Iv extends tg.EventEmitter {
32730
+ class Iv extends gg.EventEmitter {
32731
32731
  constructor(A, e) {
32732
32732
  super(), this.checkResults = /* @__PURE__ */ new Map(), this.url = A, this.token = e;
32733
32733
  }
@@ -32735,7 +32735,7 @@ class Iv extends tg.EventEmitter {
32735
32735
  const A = this.checkResults.size;
32736
32736
  return this.checkResults.set(A, {
32737
32737
  logs: [],
32738
- status: Di.IDLE,
32738
+ status: wi.IDLE,
32739
32739
  name: "",
32740
32740
  description: ""
32741
32741
  }), A;
@@ -32744,7 +32744,7 @@ class Iv extends tg.EventEmitter {
32744
32744
  this.checkResults.set(A, e), this.emit("checkUpdate", A, e);
32745
32745
  }
32746
32746
  isSuccess() {
32747
- return Array.from(this.checkResults.values()).every((A) => A.status !== Di.FAILED);
32747
+ return Array.from(this.checkResults.values()).every((A) => A.status !== wi.FAILED);
32748
32748
  }
32749
32749
  getResults() {
32750
32750
  return Array.from(this.checkResults.values());
@@ -33605,11 +33605,11 @@ function Fs() {
33605
33605
  return i;
33606
33606
  }, Fs();
33607
33607
  }
33608
- const Li = Mi(Oe(533));
33609
- var rg, bt, fI, mo, Pg, dn, DI, ss, sd, Cd, rd, Qd, HQ, of, PQ, nf;
33608
+ const Ti = Fi(Oe(533));
33609
+ var Bg, bt, fI, mo, Pg, dn, DI, ss, sd, Cd, rd, Qd, HQ, of, PQ, nf;
33610
33610
  class gr {
33611
33611
  constructor(A) {
33612
- hi(this, HQ), hi(this, PQ), hi(this, rg, void 0), hi(this, bt, void 0), hi(this, fI, !1), hi(this, mo, void 0), hi(this, Pg, void 0), hi(this, dn, void 0), hi(this, DI, void 0), hi(this, ss, void 0), fi(this, sd, !1), fi(this, Cd, !0), fi(this, rd), fi(this, Qd), Jt(this, DI, A);
33612
+ xi(this, HQ), xi(this, PQ), xi(this, Bg, void 0), xi(this, bt, void 0), xi(this, fI, !1), xi(this, mo, void 0), xi(this, Pg, void 0), xi(this, dn, void 0), xi(this, DI, void 0), xi(this, ss, void 0), pi(this, sd, !1), pi(this, Cd, !0), pi(this, rd), pi(this, Qd), Jt(this, DI, A);
33613
33613
  }
33614
33614
  static [Oe(419) + "d"]() {
33615
33615
  return ad[Oe(419) + "d"]();
@@ -33620,12 +33620,12 @@ class gr {
33620
33620
  async [(Qd = Oe(535), Oe(464))]() {
33621
33621
  var A, e;
33622
33622
  const t = Oe, { model8: g, model16: o, model32: n } = await rc(this, PQ, nf).call(this);
33623
- if (!WA(this, rg)) {
33623
+ if (!WA(this, Bg)) {
33624
33624
  if (!g || !o || !o)
33625
33625
  throw new Error(t(441) + t(428));
33626
- Jt(this, rg, new ad({ params: { debugLogs: (A = WA(this, DI)) == null ? void 0 : A[t(453)], logProcessStats: !1, useSharedArrayBuffer: !1, bufferOverflowMS: ((e = WA(this, DI)) == null ? void 0 : e[t(534) + t(485)]) ?? 50, models: { model8: g, model16: o, model32: n } } }));
33626
+ Jt(this, Bg, new ad({ params: { debugLogs: (A = WA(this, DI)) == null ? void 0 : A[t(453)], logProcessStats: !1, useSharedArrayBuffer: !1, bufferOverflowMS: ((e = WA(this, DI)) == null ? void 0 : e[t(534) + t(485)]) ?? 50, models: { model8: g, model16: o, model32: n } } }));
33627
33627
  }
33628
- await WA(this, rg)[t(464)](), Jt(this, fI, !0);
33628
+ await WA(this, Bg)[t(464)](), Jt(this, fI, !0);
33629
33629
  }
33630
33630
  [Oe(480)]() {
33631
33631
  var A, e, t, g, o;
@@ -33635,25 +33635,25 @@ class gr {
33635
33635
  try {
33636
33636
  (t = WA(this, bt)) == null || t[n(450)]();
33637
33637
  } catch (a) {
33638
- I ? Li[n(527)](n(467) + n(468) + n(482) + n(463), a) : Li[n(420)](n(467) + n(468) + n(482) + n(457) + n(430) + n(439) + n(477), a);
33638
+ I ? Ti[n(527)](n(467) + n(468) + n(482) + n(463), a) : Ti[n(420)](n(467) + n(468) + n(482) + n(457) + n(430) + n(439) + n(477), a);
33639
33639
  }
33640
33640
  try {
33641
33641
  (g = WA(this, bt)) == null || g[n(480)]();
33642
33642
  } catch (a) {
33643
- Li[n(527)](n(467) + n(476) + n(482) + n(463), a);
33643
+ Ti[n(527)](n(467) + n(476) + n(482) + n(463), a);
33644
33644
  }
33645
33645
  try {
33646
- (o = WA(this, rg)) == null || o[n(480)]();
33646
+ (o = WA(this, Bg)) == null || o[n(480)]();
33647
33647
  } catch (a) {
33648
- Li[n(527)](n(467) + n(476) + n(474), a);
33648
+ Ti[n(527)](n(467) + n(476) + n(474), a);
33649
33649
  }
33650
- Jt(this, rg, void 0), Jt(this, fI, !1), this[n(486)] = !1, clearInterval(WA(this, ss));
33650
+ Jt(this, Bg, void 0), Jt(this, fI, !1), this[n(486)] = !1, clearInterval(WA(this, ss));
33651
33651
  }
33652
33652
  async [Oe(479)](A, e) {
33653
33653
  const t = Oe;
33654
- if (!WA(this, rg))
33654
+ if (!WA(this, Bg))
33655
33655
  throw new TypeError(t(447) + t(469));
33656
- return Jt(this, bt, await WA(this, rg)[t(539) + t(429)]({ audioContext: A, stream: e }, async () => {
33656
+ return Jt(this, bt, await WA(this, Bg)[t(539) + t(429)]({ audioContext: A, stream: e }, async () => {
33657
33657
  const g = t;
33658
33658
  this[g(486)] = !0;
33659
33659
  }, () => {
@@ -33667,15 +33667,15 @@ class gr {
33667
33667
  async [Oe(515)](A) {
33668
33668
  var e, t, g, o, n, I, a;
33669
33669
  const s = Oe;
33670
- if (this[s(440) + s(524)] = A, !this[s(486)] && (Li[s(420)](s(435) + s(452) + s(498) + s(470) + s(490)), await new Promise((C) => {
33670
+ if (this[s(440) + s(524)] = A, !this[s(486)] && (Ti[s(420)](s(435) + s(452) + s(498) + s(470) + s(490)), await new Promise((C) => {
33671
33671
  Jt(this, ss, setInterval(() => {
33672
33672
  this[OI(486)] && C(void 0);
33673
33673
  }, 20));
33674
33674
  })), A !== this[s(440) + s(524)]) {
33675
- Li[s(420)](s(459) + s(494) + s(502) + s(475) + s(473) + s(512) + s(507) + "y");
33675
+ Ti[s(420)](s(459) + s(494) + s(502) + s(475) + s(473) + s(512) + s(507) + "y");
33676
33676
  return;
33677
33677
  }
33678
- return A ? WA(this, dn) ? await rc(this, HQ, of).call(this, WA(this, dn)) ? (Li[s(420)](s(537) + s(489) + s(432)), (g = WA(this, bt)) == null || g[s(540)](), (o = this[s(535)]) == null || o.call(this, !0), !0) : (Li[s(527)](s(519) + s(444) + s(436) + s(438) + s(513) + s(506) + s(437) + "d."), (n = WA(this, bt)) == null || n[s(450)](), (I = this[s(535)]) == null || I.call(this, !1), !1) : (Li[s(527)](s(525) + s(520) + s(446) + s(471) + s(433) + s(518)), (a = this[s(535)]) == null || a.call(this, !1), !1) : (Li[s(420)](s(462) + s(529) + s(522)), (e = WA(this, bt)) == null || e[s(450)](), (t = this[s(535)]) == null || t.call(this, !1), !1);
33678
+ return A ? WA(this, dn) ? await rc(this, HQ, of).call(this, WA(this, dn)) ? (Ti[s(420)](s(537) + s(489) + s(432)), (g = WA(this, bt)) == null || g[s(540)](), (o = this[s(535)]) == null || o.call(this, !0), !0) : (Ti[s(527)](s(519) + s(444) + s(436) + s(438) + s(513) + s(506) + s(437) + "d."), (n = WA(this, bt)) == null || n[s(450)](), (I = this[s(535)]) == null || I.call(this, !1), !1) : (Ti[s(527)](s(525) + s(520) + s(446) + s(471) + s(433) + s(518)), (a = this[s(535)]) == null || a.call(this, !1), !1) : (Ti[s(420)](s(462) + s(529) + s(522)), (e = WA(this, bt)) == null || e[s(450)](), (t = this[s(535)]) == null || t.call(this, !1), !1);
33679
33679
  }
33680
33680
  [Oe(526)]() {
33681
33681
  const A = Oe;
@@ -33689,7 +33689,7 @@ class gr {
33689
33689
  return WA(this, mo)[g(497)](), (e = WA(this, bt)) == null || e[g(497)](WA(this, Pg)), (t = WA(this, bt)) == null || t[g(480)](), Jt(this, mo, void 0), this[g(479)](this[g(528) + "xt"], A);
33690
33690
  }
33691
33691
  }
33692
- rg = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), fI = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Pg = /* @__PURE__ */ new WeakMap(), dn = /* @__PURE__ */ new WeakMap(), DI = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), HQ = /* @__PURE__ */ new WeakSet(), of = async function(i) {
33692
+ Bg = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), fI = /* @__PURE__ */ new WeakMap(), mo = /* @__PURE__ */ new WeakMap(), Pg = /* @__PURE__ */ new WeakMap(), dn = /* @__PURE__ */ new WeakMap(), DI = /* @__PURE__ */ new WeakMap(), ss = /* @__PURE__ */ new WeakMap(), HQ = /* @__PURE__ */ new WeakSet(), of = async function(i) {
33693
33693
  const A = Oe;
33694
33694
  let e = i[A(501)][A(500)];
33695
33695
  e[A(458)]("ws") && (e = e[A(541)](/^(ws)/, A(491)));
@@ -33705,11 +33705,11 @@ rg = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), fI = /*
33705
33705
  } else
33706
33706
  throw new Error(i(508) + i(496) + i(451) + A[i(532)] + ": " + A[i(516)]);
33707
33707
  };
33708
- const or = Mi("livekit");
33708
+ const or = Fi("livekit");
33709
33709
  var Kt;
33710
33710
  class If {
33711
33711
  constructor(A) {
33712
- fi(this, "name", "livekit-noise-filter"), fi(this, "processedTrack"), fi(this, "trackSettings"), fi(this, "originalTrack"), hi(this, Kt, void 0), fi(this, "init", async (e) => {
33712
+ pi(this, "name", "livekit-noise-filter"), pi(this, "processedTrack"), pi(this, "trackSettings"), pi(this, "originalTrack"), xi(this, Kt, void 0), pi(this, "init", async (e) => {
33713
33713
  or.debug("Krisp: Initializing track processor"), this.originalTrack = e.track, this.trackSettings = e.track.getSettings(), e.audioContext.sampleRate !== this.trackSettings.sampleRate && or.debug("Krisp: Sample rate mismatch, reapplying"), await e.track.applyConstraints({
33714
33714
  ...this.trackSettings,
33715
33715
  noiseSuppression: !1,
@@ -33726,11 +33726,11 @@ class If {
33726
33726
  e.audioContext,
33727
33727
  new MediaStream([e.track])
33728
33728
  )).getAudioTracks()[0];
33729
- }), fi(this, "restart", async (e) => {
33729
+ }), pi(this, "restart", async (e) => {
33730
33730
  if (!WA(this, Kt))
33731
33731
  throw Error("LiveKit-Krisp: Cannot restart without having initialized first");
33732
33732
  or.debug("Krisp: Restarting plugin"), this.processedTrack = (await WA(this, Kt).restart(new MediaStream([e.track]))).getAudioTracks()[0];
33733
- }), fi(this, "destroy", async () => {
33733
+ }), pi(this, "destroy", async () => {
33734
33734
  var e, t;
33735
33735
  (e = WA(this, Kt)) == null || e.dispose(), await ((t = this.originalTrack) == null ? void 0 : t.applyConstraints(this.trackSettings));
33736
33736
  }), Jt(this, Kt, new gr(A));
@@ -34024,7 +34024,7 @@ class nC extends EventTarget {
34024
34024
  * Copyright 2010-2025 Three.js Authors
34025
34025
  * SPDX-License-Identifier: MIT
34026
34026
  */
34027
- const bE = "182", dS = 0, Bd = 1, hS = 2, Cs = 1, lS = 2, pI = 3, Rg = 0, Gt = 1, fg = 2, _g = 0, bn = 1, OQ = 2, Ed = 3, cd = 4, xS = 5, yo = 100, uS = 101, fS = 102, DS = 103, pS = 104, wS = 200, mS = 201, _S = 202, kS = 203, VQ = 204, jQ = 205, yS = 206, SS = 207, RS = 208, bS = 209, NS = 210, MS = 211, GS = 212, FS = 213, vS = 214, WQ = 0, ZQ = 1, XQ = 2, Tn = 3, zQ = 4, $Q = 5, AB = 6, eB = 7, af = 0, LS = 1, US = 2, Wi = 0, sf = 1, Cf = 2, rf = 3, Qf = 4, Bf = 5, Ef = 6, cf = 7, df = 300, Yo = 301, Kn = 302, tB = 303, iB = 304, IC = 306, gB = 1e3, pg = 1001, oB = 1002, wt = 1003, TS = 1004, la = 1005, St = 1006, nr = 1007, bo = 1008, si = 1009, hf = 1010, lf = 1011, VI = 1012, NE = 1013, Ag = 1014, Oi = 1015, bg = 1016, ME = 1017, GE = 1018, jI = 1020, xf = 35902, uf = 35899, ff = 1021, Df = 1022, Ri = 1023, Ng = 1026, No = 1027, pf = 1028, FE = 1029, Jn = 1030, vE = 1031, LE = 1033, rs = 33776, Qs = 33777, Bs = 33778, Es = 33779, nB = 35840, IB = 35841, aB = 35842, sB = 35843, CB = 36196, rB = 37492, QB = 37496, BB = 37488, EB = 37489, cB = 37490, dB = 37491, hB = 37808, lB = 37809, xB = 37810, uB = 37811, fB = 37812, DB = 37813, pB = 37814, wB = 37815, mB = 37816, _B = 37817, kB = 37818, yB = 37819, SB = 37820, RB = 37821, bB = 36492, NB = 36494, MB = 36495, GB = 36283, FB = 36284, vB = 36285, LB = 36286, KS = 3200, JS = 0, YS = 1, Zg = "", ni = "srgb", Yn = "srgb-linear", vs = "linear", ye = "srgb", $o = 7680, dd = 519, qS = 512, HS = 513, PS = 514, UE = 515, OS = 516, VS = 517, TE = 518, jS = 519, hd = 35044, ld = "300 es", Vi = 2e3, Ls = 2001;
34027
+ const bE = "182", dS = 0, Bd = 1, hS = 2, Cs = 1, lS = 2, pI = 3, Rg = 0, Gt = 1, fg = 2, _g = 0, bn = 1, OQ = 2, Ed = 3, cd = 4, xS = 5, yo = 100, uS = 101, fS = 102, DS = 103, pS = 104, wS = 200, mS = 201, _S = 202, kS = 203, VQ = 204, jQ = 205, yS = 206, SS = 207, RS = 208, bS = 209, NS = 210, MS = 211, GS = 212, FS = 213, vS = 214, WQ = 0, ZQ = 1, XQ = 2, Tn = 3, zQ = 4, $Q = 5, AB = 6, eB = 7, af = 0, LS = 1, US = 2, Xi = 0, sf = 1, Cf = 2, rf = 3, Qf = 4, Bf = 5, Ef = 6, cf = 7, df = 300, Yo = 301, Kn = 302, tB = 303, iB = 304, IC = 306, gB = 1e3, pg = 1001, oB = 1002, wt = 1003, TS = 1004, la = 1005, St = 1006, nr = 1007, bo = 1008, ri = 1009, hf = 1010, lf = 1011, VI = 1012, NE = 1013, tg = 1014, ji = 1015, bg = 1016, ME = 1017, GE = 1018, jI = 1020, xf = 35902, uf = 35899, ff = 1021, Df = 1022, Ni = 1023, Ng = 1026, No = 1027, pf = 1028, FE = 1029, Jn = 1030, vE = 1031, LE = 1033, rs = 33776, Qs = 33777, Bs = 33778, Es = 33779, nB = 35840, IB = 35841, aB = 35842, sB = 35843, CB = 36196, rB = 37492, QB = 37496, BB = 37488, EB = 37489, cB = 37490, dB = 37491, hB = 37808, lB = 37809, xB = 37810, uB = 37811, fB = 37812, DB = 37813, pB = 37814, wB = 37815, mB = 37816, _B = 37817, kB = 37818, yB = 37819, SB = 37820, RB = 37821, bB = 36492, NB = 36494, MB = 36495, GB = 36283, FB = 36284, vB = 36285, LB = 36286, KS = 3200, JS = 0, YS = 1, Zg = "", ai = "srgb", Yn = "srgb-linear", vs = "linear", ye = "srgb", $o = 7680, dd = 519, qS = 512, HS = 513, PS = 514, UE = 515, OS = 516, VS = 517, TE = 518, jS = 519, hd = 35044, ld = "300 es", Wi = 2e3, Ls = 2001;
34028
34028
  function wf(i) {
34029
34029
  for (let A = i.length - 1; A >= 0; --A)
34030
34030
  if (i[A] >= 65535) return !0;
@@ -36390,17 +36390,17 @@ function zS() {
36390
36390
  toXYZ: Dd,
36391
36391
  fromXYZ: pd,
36392
36392
  luminanceCoefficients: e,
36393
- workingColorSpaceConfig: { unpackColorSpace: ni },
36394
- outputColorSpaceConfig: { drawingBufferColorSpace: ni }
36393
+ workingColorSpaceConfig: { unpackColorSpace: ai },
36394
+ outputColorSpaceConfig: { drawingBufferColorSpace: ai }
36395
36395
  },
36396
- [ni]: {
36396
+ [ai]: {
36397
36397
  primaries: A,
36398
36398
  whitePoint: t,
36399
36399
  transfer: ye,
36400
36400
  toXYZ: Dd,
36401
36401
  fromXYZ: pd,
36402
36402
  luminanceCoefficients: e,
36403
- outputColorSpaceConfig: { drawingBufferColorSpace: ni }
36403
+ outputColorSpaceConfig: { drawingBufferColorSpace: ai }
36404
36404
  }
36405
36405
  }), i;
36406
36406
  }
@@ -36547,7 +36547,7 @@ class Ft extends jn {
36547
36547
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
36548
36548
  * @param {string} [colorSpace=NoColorSpace] - The color space.
36549
36549
  */
36550
- constructor(A = Ft.DEFAULT_IMAGE, e = Ft.DEFAULT_MAPPING, t = pg, g = pg, o = St, n = bo, I = Ri, a = si, s = Ft.DEFAULT_ANISOTROPY, C = Zg) {
36550
+ constructor(A = Ft.DEFAULT_IMAGE, e = Ft.DEFAULT_MAPPING, t = pg, g = pg, o = St, n = bo, I = Ni, a = ri, s = Ft.DEFAULT_ANISOTROPY, C = Zg) {
36551
36551
  super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: eR++ }), this.uuid = oa(), this.name = "", this.source = new KE(A), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = t, this.wrapT = g, this.magFilter = o, this.minFilter = n, this.anisotropy = s, this.format = I, this.internalFormat = null, this.type = a, this.offset = new De(0, 0), this.repeat = new De(1, 1), this.center = new De(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ZA(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = C, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(A && A.depth && A.depth > 1), this.pmremVersion = 0;
36552
36552
  }
36553
36553
  /**
@@ -37434,7 +37434,7 @@ class tR extends jn {
37434
37434
  this.dispatchEvent({ type: "dispose" });
37435
37435
  }
37436
37436
  }
37437
- class Zi extends tR {
37437
+ class zi extends tR {
37438
37438
  /**
37439
37439
  * Constructs a new 3D render target.
37440
37440
  *
@@ -37521,7 +37521,7 @@ class Ia {
37521
37521
  setFromArray(A) {
37522
37522
  this.makeEmpty();
37523
37523
  for (let e = 0, t = A.length; e < t; e += 3)
37524
- this.expandByPoint(Ei.fromArray(A, e));
37524
+ this.expandByPoint(di.fromArray(A, e));
37525
37525
  return this;
37526
37526
  }
37527
37527
  /**
@@ -37534,7 +37534,7 @@ class Ia {
37534
37534
  setFromBufferAttribute(A) {
37535
37535
  this.makeEmpty();
37536
37536
  for (let e = 0, t = A.count; e < t; e++)
37537
- this.expandByPoint(Ei.fromBufferAttribute(A, e));
37537
+ this.expandByPoint(di.fromBufferAttribute(A, e));
37538
37538
  return this;
37539
37539
  }
37540
37540
  /**
@@ -37559,7 +37559,7 @@ class Ia {
37559
37559
  * @return {Box3} A reference to this bounding box.
37560
37560
  */
37561
37561
  setFromCenterAndSize(A, e) {
37562
- const t = Ei.copy(e).multiplyScalar(0.5);
37562
+ const t = di.copy(e).multiplyScalar(0.5);
37563
37563
  return this.min.copy(A).sub(t), this.max.copy(A).add(t), this;
37564
37564
  }
37565
37565
  /**
@@ -37678,7 +37678,7 @@ class Ia {
37678
37678
  const o = t.getAttribute("position");
37679
37679
  if (e === !0 && o !== void 0 && A.isInstancedMesh !== !0)
37680
37680
  for (let n = 0, I = o.count; n < I; n++)
37681
- A.isMesh === !0 ? A.getVertexPosition(n, Ei) : Ei.fromBufferAttribute(o, n), Ei.applyMatrix4(A.matrixWorld), this.expandByPoint(Ei);
37681
+ A.isMesh === !0 ? A.getVertexPosition(n, di) : di.fromBufferAttribute(o, n), di.applyMatrix4(A.matrixWorld), this.expandByPoint(di);
37682
37682
  else
37683
37683
  A.boundingBox !== void 0 ? (A.boundingBox === null && A.computeBoundingBox(), xa.copy(A.boundingBox)) : (t.boundingBox === null && t.computeBoundingBox(), xa.copy(t.boundingBox)), xa.applyMatrix4(A.matrixWorld), this.union(xa);
37684
37684
  }
@@ -37736,7 +37736,7 @@ class Ia {
37736
37736
  * @return {boolean} Whether the given bounding sphere intersects with this bounding box.
37737
37737
  */
37738
37738
  intersectsSphere(A) {
37739
- return this.clampPoint(A.center, Ei), Ei.distanceToSquared(A.center) <= A.radius * A.radius;
37739
+ return this.clampPoint(A.center, di), di.distanceToSquared(A.center) <= A.radius * A.radius;
37740
37740
  }
37741
37741
  /**
37742
37742
  * Returns `true` if the given plane intersects with this bounding box.
@@ -37807,7 +37807,7 @@ class Ia {
37807
37807
  * @return {number} The euclidean distance.
37808
37808
  */
37809
37809
  distanceToPoint(A) {
37810
- return this.clampPoint(A, Ei).distanceTo(A);
37810
+ return this.clampPoint(A, di).distanceTo(A);
37811
37811
  }
37812
37812
  /**
37813
37813
  * Returns a bounding sphere that encloses this bounding box.
@@ -37816,7 +37816,7 @@ class Ia {
37816
37816
  * @return {Sphere} The bounding sphere that encloses this bounding box.
37817
37817
  */
37818
37818
  getBoundingSphere(A) {
37819
- return this.isEmpty() ? A.makeEmpty() : (this.getCenter(A.center), A.radius = this.getSize(Ei).length() * 0.5), A;
37819
+ return this.isEmpty() ? A.makeEmpty() : (this.getCenter(A.center), A.radius = this.getSize(di).length() * 0.5), A;
37820
37820
  }
37821
37821
  /**
37822
37822
  * Computes the intersection of this bounding box and the given one, setting the upper
@@ -37848,7 +37848,7 @@ class Ia {
37848
37848
  * @return {Box3} A reference to this bounding box.
37849
37849
  */
37850
37850
  applyMatrix4(A) {
37851
- return this.isEmpty() ? this : (gg[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(A), gg[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(A), gg[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(A), gg[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(A), gg[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(A), gg[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(A), gg[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(A), gg[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(A), this.setFromPoints(gg), this);
37851
+ return this.isEmpty() ? this : (ng[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(A), ng[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(A), ng[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(A), ng[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(A), ng[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(A), ng[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(A), ng[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(A), ng[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(A), this.setFromPoints(ng), this);
37852
37852
  }
37853
37853
  /**
37854
37854
  * Adds the given offset to both the upper and lower bounds of this bounding box,
@@ -37890,7 +37890,7 @@ class Ia {
37890
37890
  return this.min.fromArray(A.min), this.max.fromArray(A.max), this;
37891
37891
  }
37892
37892
  }
37893
- const gg = [
37893
+ const ng = [
37894
37894
  /* @__PURE__ */ new J(),
37895
37895
  /* @__PURE__ */ new J(),
37896
37896
  /* @__PURE__ */ new J(),
@@ -37899,7 +37899,7 @@ const gg = [
37899
37899
  /* @__PURE__ */ new J(),
37900
37900
  /* @__PURE__ */ new J(),
37901
37901
  /* @__PURE__ */ new J()
37902
- ], Ei = /* @__PURE__ */ new J(), xa = /* @__PURE__ */ new Ia(), en = /* @__PURE__ */ new J(), tn = /* @__PURE__ */ new J(), gn = /* @__PURE__ */ new J(), Ug = /* @__PURE__ */ new J(), Tg = /* @__PURE__ */ new J(), lo = /* @__PURE__ */ new J(), CI = /* @__PURE__ */ new J(), ua = /* @__PURE__ */ new J(), fa = /* @__PURE__ */ new J(), xo = /* @__PURE__ */ new J();
37902
+ ], di = /* @__PURE__ */ new J(), xa = /* @__PURE__ */ new Ia(), en = /* @__PURE__ */ new J(), tn = /* @__PURE__ */ new J(), gn = /* @__PURE__ */ new J(), Ug = /* @__PURE__ */ new J(), Tg = /* @__PURE__ */ new J(), lo = /* @__PURE__ */ new J(), CI = /* @__PURE__ */ new J(), ua = /* @__PURE__ */ new J(), fa = /* @__PURE__ */ new J(), xo = /* @__PURE__ */ new J();
37903
37903
  function Br(i, A, e, t, g) {
37904
37904
  for (let o = 0, n = i.length - 3; o <= n; o += 3) {
37905
37905
  xo.fromArray(i, o);
@@ -38129,7 +38129,7 @@ class JE {
38129
38129
  return this.radius = A.radius, this.center.fromArray(A.center), this;
38130
38130
  }
38131
38131
  }
38132
- const og = /* @__PURE__ */ new J(), cr = /* @__PURE__ */ new J(), Da = /* @__PURE__ */ new J(), Kg = /* @__PURE__ */ new J(), dr = /* @__PURE__ */ new J(), pa = /* @__PURE__ */ new J(), hr = /* @__PURE__ */ new J();
38132
+ const Ig = /* @__PURE__ */ new J(), cr = /* @__PURE__ */ new J(), Da = /* @__PURE__ */ new J(), Kg = /* @__PURE__ */ new J(), dr = /* @__PURE__ */ new J(), pa = /* @__PURE__ */ new J(), hr = /* @__PURE__ */ new J();
38133
38133
  class oR {
38134
38134
  /**
38135
38135
  * Constructs a new ray.
@@ -38185,7 +38185,7 @@ class oR {
38185
38185
  * @return {Ray} A reference to this ray.
38186
38186
  */
38187
38187
  recast(A) {
38188
- return this.origin.copy(this.at(A, og)), this;
38188
+ return this.origin.copy(this.at(A, Ig)), this;
38189
38189
  }
38190
38190
  /**
38191
38191
  * Returns the point along this ray that is closest to the given point.
@@ -38215,8 +38215,8 @@ class oR {
38215
38215
  * @return {number} The squared distance.
38216
38216
  */
38217
38217
  distanceSqToPoint(A) {
38218
- const e = og.subVectors(A, this.origin).dot(this.direction);
38219
- return e < 0 ? this.origin.distanceToSquared(A) : (og.copy(this.origin).addScaledVector(this.direction, e), og.distanceToSquared(A));
38218
+ const e = Ig.subVectors(A, this.origin).dot(this.direction);
38219
+ return e < 0 ? this.origin.distanceToSquared(A) : (Ig.copy(this.origin).addScaledVector(this.direction, e), Ig.distanceToSquared(A));
38220
38220
  }
38221
38221
  /**
38222
38222
  * Returns the squared distance between this ray and the given line segment.
@@ -38256,8 +38256,8 @@ class oR {
38256
38256
  * @return {?Vector3} The intersection point.
38257
38257
  */
38258
38258
  intersectSphere(A, e) {
38259
- og.subVectors(A.center, this.origin);
38260
- const t = og.dot(this.direction), g = og.dot(og) - t * t, o = A.radius * A.radius;
38259
+ Ig.subVectors(A.center, this.origin);
38260
+ const t = Ig.dot(this.direction), g = Ig.dot(Ig) - t * t, o = A.radius * A.radius;
38261
38261
  if (g > o) return null;
38262
38262
  const n = Math.sqrt(o - g), I = t - n, a = t + n;
38263
38263
  return a < 0 ? null : I < 0 ? this.at(a, e) : this.at(I, e);
@@ -38327,7 +38327,7 @@ class oR {
38327
38327
  * @return {boolean} Whether this ray intersects with the given box or not.
38328
38328
  */
38329
38329
  intersectsBox(A) {
38330
- return this.intersectBox(A, og) !== null;
38330
+ return this.intersectBox(A, Ig) !== null;
38331
38331
  }
38332
38332
  /**
38333
38333
  * Intersects this ray with the given triangle, returning the intersection
@@ -39006,9 +39006,9 @@ class rt {
39006
39006
  return t.set(1, 1, 1), e.identity(), this;
39007
39007
  let o = on.set(g[0], g[1], g[2]).length();
39008
39008
  const n = on.set(g[4], g[5], g[6]).length(), I = on.set(g[8], g[9], g[10]).length();
39009
- this.determinant() < 0 && (o = -o), ci.copy(this);
39009
+ this.determinant() < 0 && (o = -o), hi.copy(this);
39010
39010
  const s = 1 / o, C = 1 / n, r = 1 / I;
39011
- return ci.elements[0] *= s, ci.elements[1] *= s, ci.elements[2] *= s, ci.elements[4] *= C, ci.elements[5] *= C, ci.elements[6] *= C, ci.elements[8] *= r, ci.elements[9] *= r, ci.elements[10] *= r, e.setFromRotationMatrix(ci), t.x = o, t.y = n, t.z = I, this;
39011
+ return hi.elements[0] *= s, hi.elements[1] *= s, hi.elements[2] *= s, hi.elements[4] *= C, hi.elements[5] *= C, hi.elements[6] *= C, hi.elements[8] *= r, hi.elements[9] *= r, hi.elements[10] *= r, e.setFromRotationMatrix(hi), t.x = o, t.y = n, t.z = I, this;
39012
39012
  }
39013
39013
  /**
39014
39014
  * Creates a perspective projection matrix. This is used internally by
@@ -39024,12 +39024,12 @@ class rt {
39024
39024
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
39025
39025
  * @return {Matrix4} A reference to this matrix.
39026
39026
  */
39027
- makePerspective(A, e, t, g, o, n, I = Vi, a = !1) {
39027
+ makePerspective(A, e, t, g, o, n, I = Wi, a = !1) {
39028
39028
  const s = this.elements, C = 2 * o / (e - A), r = 2 * o / (t - g), Q = (e + A) / (e - A), B = (t + g) / (t - g);
39029
39029
  let d, c;
39030
39030
  if (a)
39031
39031
  d = o / (n - o), c = n * o / (n - o);
39032
- else if (I === Vi)
39032
+ else if (I === Wi)
39033
39033
  d = -(n + o) / (n - o), c = -2 * n * o / (n - o);
39034
39034
  else if (I === Ls)
39035
39035
  d = -n / (n - o), c = -n * o / (n - o);
@@ -39051,12 +39051,12 @@ class rt {
39051
39051
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
39052
39052
  * @return {Matrix4} A reference to this matrix.
39053
39053
  */
39054
- makeOrthographic(A, e, t, g, o, n, I = Vi, a = !1) {
39054
+ makeOrthographic(A, e, t, g, o, n, I = Wi, a = !1) {
39055
39055
  const s = this.elements, C = 2 / (e - A), r = 2 / (t - g), Q = -(e + A) / (e - A), B = -(t + g) / (t - g);
39056
39056
  let d, c;
39057
39057
  if (a)
39058
39058
  d = 1 / (n - o), c = n / (n - o);
39059
- else if (I === Vi)
39059
+ else if (I === Wi)
39060
39060
  d = -2 / (n - o), c = -(n + o) / (n - o);
39061
39061
  else if (I === Ls)
39062
39062
  d = -1 / (n - o), c = -o / (n - o);
@@ -39101,7 +39101,7 @@ class rt {
39101
39101
  return A[e] = t[0], A[e + 1] = t[1], A[e + 2] = t[2], A[e + 3] = t[3], A[e + 4] = t[4], A[e + 5] = t[5], A[e + 6] = t[6], A[e + 7] = t[7], A[e + 8] = t[8], A[e + 9] = t[9], A[e + 10] = t[10], A[e + 11] = t[11], A[e + 12] = t[12], A[e + 13] = t[13], A[e + 14] = t[14], A[e + 15] = t[15], A;
39102
39102
  }
39103
39103
  }
39104
- const on = /* @__PURE__ */ new J(), ci = /* @__PURE__ */ new rt(), nR = /* @__PURE__ */ new J(0, 0, 0), IR = /* @__PURE__ */ new J(1, 1, 1), Jg = /* @__PURE__ */ new J(), wa = /* @__PURE__ */ new J(), Zt = /* @__PURE__ */ new J(), wd = /* @__PURE__ */ new rt(), md = /* @__PURE__ */ new na();
39104
+ const on = /* @__PURE__ */ new J(), hi = /* @__PURE__ */ new rt(), nR = /* @__PURE__ */ new J(0, 0, 0), IR = /* @__PURE__ */ new J(1, 1, 1), Jg = /* @__PURE__ */ new J(), wa = /* @__PURE__ */ new J(), Zt = /* @__PURE__ */ new J(), wd = /* @__PURE__ */ new rt(), md = /* @__PURE__ */ new na();
39105
39105
  class Mg {
39106
39106
  /**
39107
39107
  * Constructs a new euler instance.
@@ -39373,7 +39373,7 @@ class _f {
39373
39373
  }
39374
39374
  }
39375
39375
  let aR = 0;
39376
- const _d = /* @__PURE__ */ new J(), nn = /* @__PURE__ */ new na(), ng = /* @__PURE__ */ new rt(), ma = /* @__PURE__ */ new J(), QI = /* @__PURE__ */ new J(), sR = /* @__PURE__ */ new J(), CR = /* @__PURE__ */ new na(), kd = /* @__PURE__ */ new J(1, 0, 0), yd = /* @__PURE__ */ new J(0, 1, 0), Sd = /* @__PURE__ */ new J(0, 0, 1), Rd = { type: "added" }, rR = { type: "removed" }, In = { type: "childadded", child: null }, lr = { type: "childremoved", child: null };
39376
+ const _d = /* @__PURE__ */ new J(), nn = /* @__PURE__ */ new na(), ag = /* @__PURE__ */ new rt(), ma = /* @__PURE__ */ new J(), QI = /* @__PURE__ */ new J(), sR = /* @__PURE__ */ new J(), CR = /* @__PURE__ */ new na(), kd = /* @__PURE__ */ new J(1, 0, 0), yd = /* @__PURE__ */ new J(0, 1, 0), Sd = /* @__PURE__ */ new J(0, 0, 1), Rd = { type: "added" }, rR = { type: "removed" }, In = { type: "childadded", child: null }, lr = { type: "childremoved", child: null };
39377
39377
  class ti extends jn {
39378
39378
  /**
39379
39379
  * Constructs a new 3D object.
@@ -39657,7 +39657,7 @@ class ti extends jn {
39657
39657
  * @return {Vector3} The converted vector.
39658
39658
  */
39659
39659
  worldToLocal(A) {
39660
- return this.updateWorldMatrix(!0, !1), A.applyMatrix4(ng.copy(this.matrixWorld).invert());
39660
+ return this.updateWorldMatrix(!0, !1), A.applyMatrix4(ag.copy(this.matrixWorld).invert());
39661
39661
  }
39662
39662
  /**
39663
39663
  * Rotates the object to face a point in world space.
@@ -39671,7 +39671,7 @@ class ti extends jn {
39671
39671
  lookAt(A, e, t) {
39672
39672
  A.isVector3 ? ma.copy(A) : ma.set(A, e, t);
39673
39673
  const g = this.parent;
39674
- this.updateWorldMatrix(!0, !1), QI.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? ng.lookAt(QI, ma, this.up) : ng.lookAt(ma, QI, this.up), this.quaternion.setFromRotationMatrix(ng), g && (ng.extractRotation(g.matrixWorld), nn.setFromRotationMatrix(ng), this.quaternion.premultiply(nn.invert()));
39674
+ this.updateWorldMatrix(!0, !1), QI.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? ag.lookAt(QI, ma, this.up) : ag.lookAt(ma, QI, this.up), this.quaternion.setFromRotationMatrix(ag), g && (ag.extractRotation(g.matrixWorld), nn.setFromRotationMatrix(ag), this.quaternion.premultiply(nn.invert()));
39675
39675
  }
39676
39676
  /**
39677
39677
  * Adds the given 3D object as a child to this 3D object. An arbitrary number of
@@ -39740,7 +39740,7 @@ class ti extends jn {
39740
39740
  * @return {Object3D} A reference to this instance.
39741
39741
  */
39742
39742
  attach(A) {
39743
- return this.updateWorldMatrix(!0, !1), ng.copy(this.matrixWorld).invert(), A.parent !== null && (A.parent.updateWorldMatrix(!0, !1), ng.multiply(A.parent.matrixWorld)), A.applyMatrix4(ng), A.removeFromParent(), A.parent = this, this.children.push(A), A.updateWorldMatrix(!1, !0), A.dispatchEvent(Rd), In.child = A, this.dispatchEvent(In), In.child = null, this;
39743
+ return this.updateWorldMatrix(!0, !1), ag.copy(this.matrixWorld).invert(), A.parent !== null && (A.parent.updateWorldMatrix(!0, !1), ag.multiply(A.parent.matrixWorld)), A.applyMatrix4(ag), A.removeFromParent(), A.parent = this, this.children.push(A), A.updateWorldMatrix(!1, !0), A.dispatchEvent(Rd), In.child = A, this.dispatchEvent(In), In.child = null, this;
39744
39744
  }
39745
39745
  /**
39746
39746
  * Searches through the 3D object and its children, starting with the 3D object
@@ -40031,8 +40031,8 @@ class ti extends jn {
40031
40031
  ti.DEFAULT_UP = /* @__PURE__ */ new J(0, 1, 0);
40032
40032
  ti.DEFAULT_MATRIX_AUTO_UPDATE = !0;
40033
40033
  ti.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
40034
- const di = /* @__PURE__ */ new J(), Ig = /* @__PURE__ */ new J(), xr = /* @__PURE__ */ new J(), ag = /* @__PURE__ */ new J(), an = /* @__PURE__ */ new J(), sn = /* @__PURE__ */ new J(), bd = /* @__PURE__ */ new J(), ur = /* @__PURE__ */ new J(), fr = /* @__PURE__ */ new J(), Dr = /* @__PURE__ */ new J(), pr = /* @__PURE__ */ new ot(), wr = /* @__PURE__ */ new ot(), mr = /* @__PURE__ */ new ot();
40035
- class yi {
40034
+ const li = /* @__PURE__ */ new J(), sg = /* @__PURE__ */ new J(), xr = /* @__PURE__ */ new J(), Cg = /* @__PURE__ */ new J(), an = /* @__PURE__ */ new J(), sn = /* @__PURE__ */ new J(), bd = /* @__PURE__ */ new J(), ur = /* @__PURE__ */ new J(), fr = /* @__PURE__ */ new J(), Dr = /* @__PURE__ */ new J(), pr = /* @__PURE__ */ new ot(), wr = /* @__PURE__ */ new ot(), mr = /* @__PURE__ */ new ot();
40035
+ class Ri {
40036
40036
  /**
40037
40037
  * Constructs a new triangle.
40038
40038
  *
@@ -40053,7 +40053,7 @@ class yi {
40053
40053
  * @return {Vector3} The triangle's normal.
40054
40054
  */
40055
40055
  static getNormal(A, e, t, g) {
40056
- g.subVectors(t, e), di.subVectors(A, e), g.cross(di);
40056
+ g.subVectors(t, e), li.subVectors(A, e), g.cross(li);
40057
40057
  const o = g.lengthSq();
40058
40058
  return o > 0 ? g.multiplyScalar(1 / Math.sqrt(o)) : g.set(0, 0, 0);
40059
40059
  }
@@ -40069,8 +40069,8 @@ class yi {
40069
40069
  * @return {?Vector3} The barycentric coordinates for the given point
40070
40070
  */
40071
40071
  static getBarycoord(A, e, t, g, o) {
40072
- di.subVectors(g, e), Ig.subVectors(t, e), xr.subVectors(A, e);
40073
- const n = di.dot(di), I = di.dot(Ig), a = di.dot(xr), s = Ig.dot(Ig), C = Ig.dot(xr), r = n * s - I * I;
40072
+ li.subVectors(g, e), sg.subVectors(t, e), xr.subVectors(A, e);
40073
+ const n = li.dot(li), I = li.dot(sg), a = li.dot(xr), s = sg.dot(sg), C = sg.dot(xr), r = n * s - I * I;
40074
40074
  if (r === 0)
40075
40075
  return o.set(0, 0, 0), null;
40076
40076
  const Q = 1 / r, B = (s * a - I * C) * Q, d = (n * C - I * a) * Q;
@@ -40088,7 +40088,7 @@ class yi {
40088
40088
  * triangle, lies within the triangle or not.
40089
40089
  */
40090
40090
  static containsPoint(A, e, t, g) {
40091
- return this.getBarycoord(A, e, t, g, ag) === null ? !1 : ag.x >= 0 && ag.y >= 0 && ag.x + ag.y <= 1;
40091
+ return this.getBarycoord(A, e, t, g, Cg) === null ? !1 : Cg.x >= 0 && Cg.y >= 0 && Cg.x + Cg.y <= 1;
40092
40092
  }
40093
40093
  /**
40094
40094
  * Computes the value barycentrically interpolated for the given point on the
@@ -40105,7 +40105,7 @@ class yi {
40105
40105
  * @return {?Vector3} The interpolated value.
40106
40106
  */
40107
40107
  static getInterpolation(A, e, t, g, o, n, I, a) {
40108
- return this.getBarycoord(A, e, t, g, ag) === null ? (a.x = 0, a.y = 0, "z" in a && (a.z = 0), "w" in a && (a.w = 0), null) : (a.setScalar(0), a.addScaledVector(o, ag.x), a.addScaledVector(n, ag.y), a.addScaledVector(I, ag.z), a);
40108
+ return this.getBarycoord(A, e, t, g, Cg) === null ? (a.x = 0, a.y = 0, "z" in a && (a.z = 0), "w" in a && (a.w = 0), null) : (a.setScalar(0), a.addScaledVector(o, Cg.x), a.addScaledVector(n, Cg.y), a.addScaledVector(I, Cg.z), a);
40109
40109
  }
40110
40110
  /**
40111
40111
  * Computes the value barycentrically interpolated for the given attribute and indices.
@@ -40131,7 +40131,7 @@ class yi {
40131
40131
  * @return {boolean} Whether the triangle is oriented towards the given direction or not.
40132
40132
  */
40133
40133
  static isFrontFacing(A, e, t, g) {
40134
- return di.subVectors(t, e), Ig.subVectors(A, e), di.cross(Ig).dot(g) < 0;
40134
+ return li.subVectors(t, e), sg.subVectors(A, e), li.cross(sg).dot(g) < 0;
40135
40135
  }
40136
40136
  /**
40137
40137
  * Sets the triangle's vertices by copying the given values.
@@ -40191,7 +40191,7 @@ class yi {
40191
40191
  * @return {number} The triangle's area.
40192
40192
  */
40193
40193
  getArea() {
40194
- return di.subVectors(this.c, this.b), Ig.subVectors(this.a, this.b), di.cross(Ig).length() * 0.5;
40194
+ return li.subVectors(this.c, this.b), sg.subVectors(this.a, this.b), li.cross(sg).length() * 0.5;
40195
40195
  }
40196
40196
  /**
40197
40197
  * Computes the midpoint of the triangle.
@@ -40209,7 +40209,7 @@ class yi {
40209
40209
  * @return {Vector3} The triangle's normal.
40210
40210
  */
40211
40211
  getNormal(A) {
40212
- return yi.getNormal(this.a, this.b, this.c, A);
40212
+ return Ri.getNormal(this.a, this.b, this.c, A);
40213
40213
  }
40214
40214
  /**
40215
40215
  * Computes a plane the triangle lies within.
@@ -40229,7 +40229,7 @@ class yi {
40229
40229
  * @return {?Vector3} The barycentric coordinates for the given point
40230
40230
  */
40231
40231
  getBarycoord(A, e) {
40232
- return yi.getBarycoord(A, this.a, this.b, this.c, e);
40232
+ return Ri.getBarycoord(A, this.a, this.b, this.c, e);
40233
40233
  }
40234
40234
  /**
40235
40235
  * Computes the value barycentrically interpolated for the given point on the
@@ -40243,7 +40243,7 @@ class yi {
40243
40243
  * @return {?Vector3} The interpolated value.
40244
40244
  */
40245
40245
  getInterpolation(A, e, t, g, o) {
40246
- return yi.getInterpolation(A, this.a, this.b, this.c, e, t, g, o);
40246
+ return Ri.getInterpolation(A, this.a, this.b, this.c, e, t, g, o);
40247
40247
  }
40248
40248
  /**
40249
40249
  * Returns `true` if the given point, when projected onto the plane of the
@@ -40254,7 +40254,7 @@ class yi {
40254
40254
  * triangle, lies within the triangle or not.
40255
40255
  */
40256
40256
  containsPoint(A) {
40257
- return yi.containsPoint(A, this.a, this.b, this.c);
40257
+ return Ri.containsPoint(A, this.a, this.b, this.c);
40258
40258
  }
40259
40259
  /**
40260
40260
  * Returns `true` if the triangle is oriented towards the given direction.
@@ -40263,7 +40263,7 @@ class yi {
40263
40263
  * @return {boolean} Whether the triangle is oriented towards the given direction or not.
40264
40264
  */
40265
40265
  isFrontFacing(A) {
40266
- return yi.isFrontFacing(this.a, this.b, this.c, A);
40266
+ return Ri.isFrontFacing(this.a, this.b, this.c, A);
40267
40267
  }
40268
40268
  /**
40269
40269
  * Returns `true` if this triangle intersects with the given box.
@@ -40519,7 +40519,7 @@ class Ee {
40519
40519
  * @param {string} [colorSpace=SRGBColorSpace] - The color space.
40520
40520
  * @return {Color} A reference to this color.
40521
40521
  */
40522
- setHex(A, e = ni) {
40522
+ setHex(A, e = ai) {
40523
40523
  return A = Math.floor(A), this.r = (A >> 16 & 255) / 255, this.g = (A >> 8 & 255) / 255, this.b = (A & 255) / 255, de.colorSpaceToWorking(this, e), this;
40524
40524
  }
40525
40525
  /**
@@ -40562,7 +40562,7 @@ class Ee {
40562
40562
  * @param {string} [colorSpace=SRGBColorSpace] - The color space.
40563
40563
  * @return {Color} A reference to this color.
40564
40564
  */
40565
- setStyle(A, e = ni) {
40565
+ setStyle(A, e = ai) {
40566
40566
  function t(o) {
40567
40567
  o !== void 0 && parseFloat(o) < 1 && PA("Color: Alpha component of " + A + " will be ignored.");
40568
40568
  }
@@ -40630,7 +40630,7 @@ class Ee {
40630
40630
  * @param {string} [colorSpace=SRGBColorSpace] - The color space.
40631
40631
  * @return {Color} A reference to this color.
40632
40632
  */
40633
- setColorName(A, e = ni) {
40633
+ setColorName(A, e = ai) {
40634
40634
  const t = kf[A.toLowerCase()];
40635
40635
  return t !== void 0 ? this.setHex(t, e) : PA("Color: Unknown color " + A), this;
40636
40636
  }
@@ -40693,7 +40693,7 @@ class Ee {
40693
40693
  * @param {string} [colorSpace=SRGBColorSpace] - The color space.
40694
40694
  * @return {number} The hexadecimal value.
40695
40695
  */
40696
- getHex(A = ni) {
40696
+ getHex(A = ai) {
40697
40697
  return de.workingToColorSpace(_t.copy(this), A), Math.round(Qe(_t.r * 255, 0, 255)) * 65536 + Math.round(Qe(_t.g * 255, 0, 255)) * 256 + Math.round(Qe(_t.b * 255, 0, 255));
40698
40698
  }
40699
40699
  /**
@@ -40702,7 +40702,7 @@ class Ee {
40702
40702
  * @param {string} [colorSpace=SRGBColorSpace] - The color space.
40703
40703
  * @return {string} The hexadecimal value as a string.
40704
40704
  */
40705
- getHexString(A = ni) {
40705
+ getHexString(A = ai) {
40706
40706
  return ("000000" + this.getHex(A).toString(16)).slice(-6);
40707
40707
  }
40708
40708
  /**
@@ -40753,10 +40753,10 @@ class Ee {
40753
40753
  * @param {string} [colorSpace=SRGBColorSpace] - The color space.
40754
40754
  * @return {string} The CSS representation of this color.
40755
40755
  */
40756
- getStyle(A = ni) {
40756
+ getStyle(A = ai) {
40757
40757
  de.workingToColorSpace(_t.copy(this), A);
40758
40758
  const e = _t.r, t = _t.g, g = _t.b;
40759
- return A !== ni ? `color(${A} ${e.toFixed(3)} ${t.toFixed(3)} ${g.toFixed(3)})` : `rgb(${Math.round(e * 255)},${Math.round(t * 255)},${Math.round(g * 255)})`;
40759
+ return A !== ai ? `color(${A} ${e.toFixed(3)} ${t.toFixed(3)} ${g.toFixed(3)})` : `rgb(${Math.round(e * 255)},${Math.round(t * 255)},${Math.round(g * 255)})`;
40760
40760
  }
40761
40761
  /**
40762
40762
  * Adds the given HSL values to this color's values.
@@ -41127,7 +41127,7 @@ class yf extends aC {
41127
41127
  }
41128
41128
  const at = /* @__PURE__ */ new J(), ka = /* @__PURE__ */ new De();
41129
41129
  let BR = 0;
41130
- class Xi {
41130
+ class $i {
41131
41131
  /**
41132
41132
  * Constructs a new buffer attribute.
41133
41133
  *
@@ -41138,7 +41138,7 @@ class Xi {
41138
41138
  constructor(A, e, t = !1) {
41139
41139
  if (Array.isArray(A))
41140
41140
  throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
41141
- this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: BR++ }), this.name = "", this.array = A, this.itemSize = e, this.count = A !== void 0 ? A.length / e : 0, this.normalized = t, this.usage = hd, this.updateRanges = [], this.gpuType = Oi, this.version = 0;
41141
+ this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: BR++ }), this.name = "", this.array = A, this.itemSize = e, this.count = A !== void 0 ? A.length / e : 0, this.normalized = t, this.usage = hd, this.updateRanges = [], this.gpuType = ji, this.version = 0;
41142
41142
  }
41143
41143
  /**
41144
41144
  * A callback function that is executed after the renderer has transferred the attribute
@@ -41449,7 +41449,7 @@ class Xi {
41449
41449
  return this.name !== "" && (A.name = this.name), this.usage !== hd && (A.usage = this.usage), A;
41450
41450
  }
41451
41451
  }
41452
- class Sf extends Xi {
41452
+ class Sf extends $i {
41453
41453
  /**
41454
41454
  * Constructs a new buffer attribute.
41455
41455
  *
@@ -41461,7 +41461,7 @@ class Sf extends Xi {
41461
41461
  super(new Uint16Array(A), e, t);
41462
41462
  }
41463
41463
  }
41464
- class Rf extends Xi {
41464
+ class Rf extends $i {
41465
41465
  /**
41466
41466
  * Constructs a new buffer attribute.
41467
41467
  *
@@ -41473,7 +41473,7 @@ class Rf extends Xi {
41473
41473
  super(new Uint32Array(A), e, t);
41474
41474
  }
41475
41475
  }
41476
- class vt extends Xi {
41476
+ class vt extends $i {
41477
41477
  /**
41478
41478
  * Constructs a new buffer attribute.
41479
41479
  *
@@ -41487,7 +41487,7 @@ class vt extends Xi {
41487
41487
  }
41488
41488
  let ER = 0;
41489
41489
  const gi = /* @__PURE__ */ new rt(), kr = /* @__PURE__ */ new ti(), Cn = /* @__PURE__ */ new J(), Xt = /* @__PURE__ */ new Ia(), BI = /* @__PURE__ */ new Ia(), ht = /* @__PURE__ */ new J();
41490
- class Fi extends jn {
41490
+ class Li extends jn {
41491
41491
  /**
41492
41492
  * Constructs a new geometry.
41493
41493
  */
@@ -41803,7 +41803,7 @@ class Fi extends jn {
41803
41803
  return;
41804
41804
  }
41805
41805
  const t = e.position, g = e.normal, o = e.uv;
41806
- this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new Xi(new Float32Array(4 * t.count), 4));
41806
+ this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new $i(new Float32Array(4 * t.count), 4));
41807
41807
  const n = this.getAttribute("tangent"), I = [], a = [];
41808
41808
  for (let b = 0; b < t.count; b++)
41809
41809
  I[b] = new J(), a[b] = new J();
@@ -41852,7 +41852,7 @@ class Fi extends jn {
41852
41852
  if (e !== void 0) {
41853
41853
  let t = this.getAttribute("normal");
41854
41854
  if (t === void 0)
41855
- t = new Xi(new Float32Array(e.count * 3), 3), this.setAttribute("normal", t);
41855
+ t = new $i(new Float32Array(e.count * 3), 3), this.setAttribute("normal", t);
41856
41856
  else
41857
41857
  for (let Q = 0, B = t.count; Q < B; Q++)
41858
41858
  t.setXYZ(Q, 0, 0, 0);
@@ -41892,11 +41892,11 @@ class Fi extends jn {
41892
41892
  for (let E = 0; E < C; E++)
41893
41893
  Q[d++] = s[B++];
41894
41894
  }
41895
- return new Xi(Q, C, r);
41895
+ return new $i(Q, C, r);
41896
41896
  }
41897
41897
  if (this.index === null)
41898
41898
  return PA("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
41899
- const e = new Fi(), t = this.index.array, g = this.attributes;
41899
+ const e = new Li(), t = this.index.array, g = this.attributes;
41900
41900
  for (const I in g) {
41901
41901
  const a = g[I], s = A(a, t);
41902
41902
  e.setAttribute(I, s);
@@ -42018,14 +42018,14 @@ class Fi extends jn {
42018
42018
  }
42019
42019
  }
42020
42020
  const Nd = /* @__PURE__ */ new rt(), uo = /* @__PURE__ */ new oR(), ya = /* @__PURE__ */ new JE(), Md = /* @__PURE__ */ new J(), Sa = /* @__PURE__ */ new J(), Ra = /* @__PURE__ */ new J(), ba = /* @__PURE__ */ new J(), yr = /* @__PURE__ */ new J(), Na = /* @__PURE__ */ new J(), Gd = /* @__PURE__ */ new J(), Ma = /* @__PURE__ */ new J();
42021
- class Gi extends ti {
42021
+ class vi extends ti {
42022
42022
  /**
42023
42023
  * Constructs a new mesh.
42024
42024
  *
42025
42025
  * @param {BufferGeometry} [geometry] - The mesh geometry.
42026
42026
  * @param {Material|Array<Material>} [material] - The mesh material.
42027
42027
  */
42028
- constructor(A = new Fi(), e = new yf()) {
42028
+ constructor(A = new Li(), e = new yf()) {
42029
42029
  super(), this.isMesh = !0, this.type = "Mesh", this.geometry = A, this.material = e, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.count = 1, this.updateMorphTargets();
42030
42030
  }
42031
42031
  copy(A, e) {
@@ -42133,7 +42133,7 @@ function Ga(i, A, e, t, g, o, n, I, a, s) {
42133
42133
  const C = cR(i, A, e, t, Sa, Ra, ba, Gd);
42134
42134
  if (C) {
42135
42135
  const r = new J();
42136
- yi.getBarycoord(Gd, Sa, Ra, ba, r), g && (C.uv = yi.getInterpolatedAttribute(g, I, a, s, r, new De())), o && (C.uv1 = yi.getInterpolatedAttribute(o, I, a, s, r, new De())), n && (C.normal = yi.getInterpolatedAttribute(n, I, a, s, r, new J()), C.normal.dot(t.direction) > 0 && C.normal.multiplyScalar(-1));
42136
+ Ri.getBarycoord(Gd, Sa, Ra, ba, r), g && (C.uv = Ri.getInterpolatedAttribute(g, I, a, s, r, new De())), o && (C.uv1 = Ri.getInterpolatedAttribute(o, I, a, s, r, new De())), n && (C.normal = Ri.getInterpolatedAttribute(n, I, a, s, r, new J()), C.normal.dot(t.direction) > 0 && C.normal.multiplyScalar(-1));
42137
42137
  const Q = {
42138
42138
  a: I,
42139
42139
  b: a,
@@ -42141,11 +42141,11 @@ function Ga(i, A, e, t, g, o, n, I, a, s) {
42141
42141
  normal: new J(),
42142
42142
  materialIndex: 0
42143
42143
  };
42144
- yi.getNormal(Sa, Ra, ba, Q.normal), C.face = Q, C.barycoord = r;
42144
+ Ri.getNormal(Sa, Ra, ba, Q.normal), C.face = Q, C.barycoord = r;
42145
42145
  }
42146
42146
  return C;
42147
42147
  }
42148
- class aa extends Fi {
42148
+ class aa extends Li {
42149
42149
  /**
42150
42150
  * Constructs a new box geometry.
42151
42151
  *
@@ -42239,7 +42239,7 @@ var lR = `void main() {
42239
42239
  }`, xR = `void main() {
42240
42240
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
42241
42241
  }`;
42242
- class Qi extends aC {
42242
+ class Ei extends aC {
42243
42243
  /**
42244
42244
  * Constructs a new shader material.
42245
42245
  *
@@ -42306,7 +42306,7 @@ class Nf extends ti {
42306
42306
  * Constructs a new camera.
42307
42307
  */
42308
42308
  constructor() {
42309
- super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new rt(), this.projectionMatrix = new rt(), this.projectionMatrixInverse = new rt(), this.coordinateSystem = Vi, this._reversedDepth = !1;
42309
+ super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new rt(), this.projectionMatrix = new rt(), this.projectionMatrixInverse = new rt(), this.coordinateSystem = Wi, this._reversedDepth = !1;
42310
42310
  }
42311
42311
  /**
42312
42312
  * The flag that indicates whether the camera uses a reversed depth buffer.
@@ -42343,7 +42343,7 @@ class Nf extends ti {
42343
42343
  }
42344
42344
  }
42345
42345
  const qg = /* @__PURE__ */ new J(), Fd = /* @__PURE__ */ new De(), vd = /* @__PURE__ */ new De();
42346
- class ai extends Nf {
42346
+ class Ci extends Nf {
42347
42347
  /**
42348
42348
  * Constructs a new perspective camera.
42349
42349
  *
@@ -42520,17 +42520,17 @@ class uR extends ti {
42520
42520
  */
42521
42521
  constructor(A, e, t) {
42522
42522
  super(), this.type = "CubeCamera", this.renderTarget = t, this.coordinateSystem = null, this.activeMipmapLevel = 0;
42523
- const g = new ai(rn, Qn, A, e);
42523
+ const g = new Ci(rn, Qn, A, e);
42524
42524
  g.layers = this.layers, this.add(g);
42525
- const o = new ai(rn, Qn, A, e);
42525
+ const o = new Ci(rn, Qn, A, e);
42526
42526
  o.layers = this.layers, this.add(o);
42527
- const n = new ai(rn, Qn, A, e);
42527
+ const n = new Ci(rn, Qn, A, e);
42528
42528
  n.layers = this.layers, this.add(n);
42529
- const I = new ai(rn, Qn, A, e);
42529
+ const I = new Ci(rn, Qn, A, e);
42530
42530
  I.layers = this.layers, this.add(I);
42531
- const a = new ai(rn, Qn, A, e);
42531
+ const a = new Ci(rn, Qn, A, e);
42532
42532
  a.layers = this.layers, this.add(a);
42533
- const s = new ai(rn, Qn, A, e);
42533
+ const s = new Ci(rn, Qn, A, e);
42534
42534
  s.layers = this.layers, this.add(s);
42535
42535
  }
42536
42536
  /**
@@ -42539,7 +42539,7 @@ class uR extends ti {
42539
42539
  updateCoordinateSystem() {
42540
42540
  const A = this.coordinateSystem, e = this.children.concat(), [t, g, o, n, I, a] = e;
42541
42541
  for (const s of e) this.remove(s);
42542
- if (A === Vi)
42542
+ if (A === Wi)
42543
42543
  t.up.set(0, 1, 0), t.lookAt(1, 0, 0), g.up.set(0, 1, 0), g.lookAt(-1, 0, 0), o.up.set(0, 0, -1), o.lookAt(0, 1, 0), n.up.set(0, 0, 1), n.lookAt(0, -1, 0), I.up.set(0, 1, 0), I.lookAt(0, 0, 1), a.up.set(0, 1, 0), a.lookAt(0, 0, -1);
42544
42544
  else if (A === Ls)
42545
42545
  t.up.set(0, -1, 0), t.lookAt(-1, 0, 0), g.up.set(0, -1, 0), g.lookAt(1, 0, 0), o.up.set(0, 0, 1), o.lookAt(0, 1, 0), n.up.set(0, 0, -1), n.lookAt(0, -1, 0), I.up.set(0, -1, 0), I.lookAt(0, 0, 1), a.up.set(0, -1, 0), a.lookAt(0, 0, -1);
@@ -42595,7 +42595,7 @@ class Mf extends Ft {
42595
42595
  this.image = A;
42596
42596
  }
42597
42597
  }
42598
- class Gf extends Zi {
42598
+ class Gf extends zi {
42599
42599
  /**
42600
42600
  * Constructs a new cube render target.
42601
42601
  *
@@ -42663,7 +42663,7 @@ class Gf extends Zi {
42663
42663
  }
42664
42664
  `
42665
42665
  )
42666
- }, g = new aa(5, 5, 5), o = new Qi({
42666
+ }, g = new aa(5, 5, 5), o = new Ei({
42667
42667
  name: "CubemapFromEquirect",
42668
42668
  uniforms: qn(t.uniforms),
42669
42669
  vertexShader: t.vertexShader,
@@ -42672,7 +42672,7 @@ class Gf extends Zi {
42672
42672
  blending: _g
42673
42673
  });
42674
42674
  o.uniforms.tEquirect.value = e;
42675
- const n = new Gi(g, o), I = e.minFilter;
42675
+ const n = new vi(g, o), I = e.minFilter;
42676
42676
  return e.minFilter === bo && (e.minFilter = St), new uR(1, 10, this).update(A, n), e.minFilter = I, n.geometry.dispose(), n.material.dispose(), this;
42677
42677
  }
42678
42678
  /**
@@ -43110,11 +43110,11 @@ class Ff {
43110
43110
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
43111
43111
  * @return {Frustum} A reference to this frustum.
43112
43112
  */
43113
- setFromProjectionMatrix(A, e = Vi, t = !1) {
43113
+ setFromProjectionMatrix(A, e = Wi, t = !1) {
43114
43114
  const g = this.planes, o = A.elements, n = o[0], I = o[1], a = o[2], s = o[3], C = o[4], r = o[5], Q = o[6], B = o[7], d = o[8], c = o[9], h = o[10], E = o[11], x = o[12], p = o[13], u = o[14], D = o[15];
43115
43115
  if (g[0].setComponents(s - n, B - C, E - d, D - x).normalize(), g[1].setComponents(s + n, B + C, E + d, D + x).normalize(), g[2].setComponents(s + I, B + r, E + c, D + p).normalize(), g[3].setComponents(s - I, B - r, E - c, D - p).normalize(), t)
43116
43116
  g[4].setComponents(a, Q, h, u).normalize(), g[5].setComponents(s - a, B - Q, E - h, D - u).normalize();
43117
- else if (g[4].setComponents(s - a, B - Q, E - h, D - u).normalize(), e === Vi)
43117
+ else if (g[4].setComponents(s - a, B - Q, E - h, D - u).normalize(), e === Wi)
43118
43118
  g[5].setComponents(s + a, B + Q, E + h, D + u).normalize();
43119
43119
  else if (e === Ls)
43120
43120
  g[5].setComponents(a, Q, h, u).normalize();
@@ -43216,7 +43216,7 @@ class ZI extends Ft {
43216
43216
  * @param {number} [format=DepthFormat] - The texture format.
43217
43217
  * @param {number} [depth=1] - The depth of the texture.
43218
43218
  */
43219
- constructor(A, e, t = Ag, g, o, n, I = wt, a = wt, s, C = Ng, r = 1) {
43219
+ constructor(A, e, t = tg, g, o, n, I = wt, a = wt, s, C = Ng, r = 1) {
43220
43220
  if (C !== Ng && C !== No)
43221
43221
  throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
43222
43222
  const Q = { width: A, height: e, depth: r };
@@ -43244,7 +43244,7 @@ class kR extends ZI {
43244
43244
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
43245
43245
  * @param {number} [format=DepthFormat] - The texture format.
43246
43246
  */
43247
- constructor(A, e = Ag, t = Yo, g, o, n = wt, I = wt, a, s = Ng) {
43247
+ constructor(A, e = tg, t = Yo, g, o, n = wt, I = wt, a, s = Ng) {
43248
43248
  const C = { width: A, height: A, depth: 1 }, r = [C, C, C, C, C, C];
43249
43249
  super(A, A, e, t, g, o, n, I, a, s), this.image = r, this.isCubeDepthTexture = !0, this.isCubeTexture = !0;
43250
43250
  }
@@ -43273,7 +43273,7 @@ class vf extends Ft {
43273
43273
  return super.copy(A), this.sourceTexture = A.sourceTexture, this;
43274
43274
  }
43275
43275
  }
43276
- class YE extends Fi {
43276
+ class YE extends Li {
43277
43277
  /**
43278
43278
  * Constructs a new polyhedron geometry.
43279
43279
  *
@@ -43492,7 +43492,7 @@ class qE extends YE {
43492
43492
  return new qE(A.radius, A.detail);
43493
43493
  }
43494
43494
  }
43495
- class sC extends Fi {
43495
+ class sC extends Li {
43496
43496
  /**
43497
43497
  * Constructs a new plane geometry.
43498
43498
  *
@@ -43537,7 +43537,7 @@ class sC extends Fi {
43537
43537
  return new sC(A.width, A.height, A.widthSegments, A.heightSegments);
43538
43538
  }
43539
43539
  }
43540
- class HE extends Fi {
43540
+ class HE extends Li {
43541
43541
  /**
43542
43542
  * Constructs a new sphere geometry.
43543
43543
  *
@@ -43593,7 +43593,7 @@ class HE extends Fi {
43593
43593
  return new HE(A.radius, A.widthSegments, A.heightSegments, A.phiStart, A.phiLength, A.thetaStart, A.thetaLength);
43594
43594
  }
43595
43595
  }
43596
- class yR extends Qi {
43596
+ class yR extends Ei {
43597
43597
  /**
43598
43598
  * Constructs a new raw shader material.
43599
43599
  *
@@ -43705,7 +43705,7 @@ class Lf extends Nf {
43705
43705
  return e.object.zoom = this.zoom, e.object.left = this.left, e.object.right = this.right, e.object.top = this.top, e.object.bottom = this.bottom, e.object.near = this.near, e.object.far = this.far, this.view !== null && (e.object.view = Object.assign({}, this.view)), e;
43706
43706
  }
43707
43707
  }
43708
- class bR extends ai {
43708
+ class bR extends Ci {
43709
43709
  /**
43710
43710
  * Constructs a new array camera.
43711
43711
  *
@@ -43778,7 +43778,7 @@ function Ld(i, A, e, t) {
43778
43778
  return i * A * 2 / g.components * g.byteLength;
43779
43779
  case Df:
43780
43780
  return i * A * 3 / g.components * g.byteLength;
43781
- case Ri:
43781
+ case Ni:
43782
43782
  return i * A * 4 / g.components * g.byteLength;
43783
43783
  case LE:
43784
43784
  return i * A * 4 / g.components * g.byteLength;
@@ -43854,7 +43854,7 @@ function Ld(i, A, e, t) {
43854
43854
  }
43855
43855
  function MR(i) {
43856
43856
  switch (i) {
43857
- case si:
43857
+ case ri:
43858
43858
  case hf:
43859
43859
  return { byteLength: 1, components: 1 };
43860
43860
  case VI:
@@ -43864,9 +43864,9 @@ function MR(i) {
43864
43864
  case ME:
43865
43865
  case GE:
43866
43866
  return { byteLength: 2, components: 4 };
43867
- case Ag:
43867
+ case tg:
43868
43868
  case NE:
43869
- case Oi:
43869
+ case ji:
43870
43870
  return { byteLength: 4, components: 1 };
43871
43871
  case xf:
43872
43872
  case uf:
@@ -47871,7 +47871,7 @@ void main() {
47871
47871
  alphaMapTransform: { value: /* @__PURE__ */ new ZA() },
47872
47872
  alphaTest: { value: 0 }
47873
47873
  }
47874
- }, qi = {
47874
+ }, Pi = {
47875
47875
  basic: {
47876
47876
  uniforms: /* @__PURE__ */ Nt([
47877
47877
  fA.common,
@@ -48095,9 +48095,9 @@ void main() {
48095
48095
  fragmentShader: XA.shadow_frag
48096
48096
  }
48097
48097
  };
48098
- qi.physical = {
48098
+ Pi.physical = {
48099
48099
  uniforms: /* @__PURE__ */ Nt([
48100
- qi.standard.uniforms,
48100
+ Pi.standard.uniforms,
48101
48101
  {
48102
48102
  clearcoat: { value: 0 },
48103
48103
  clearcoatMap: { value: null },
@@ -48165,13 +48165,13 @@ function cM(i, A, e, t, g, o, n) {
48165
48165
  }
48166
48166
  function h(p, u) {
48167
48167
  const D = d(u);
48168
- D && (D.isCubeTexture || D.mapping === IC) ? (C === void 0 && (C = new Gi(
48168
+ D && (D.isCubeTexture || D.mapping === IC) ? (C === void 0 && (C = new vi(
48169
48169
  new aa(1, 1, 1),
48170
- new Qi({
48170
+ new Ei({
48171
48171
  name: "BackgroundCubeMaterial",
48172
- uniforms: qn(qi.backgroundCube.uniforms),
48173
- vertexShader: qi.backgroundCube.vertexShader,
48174
- fragmentShader: qi.backgroundCube.fragmentShader,
48172
+ uniforms: qn(Pi.backgroundCube.uniforms),
48173
+ vertexShader: Pi.backgroundCube.vertexShader,
48174
+ fragmentShader: Pi.backgroundCube.fragmentShader,
48175
48175
  side: Gt,
48176
48176
  depthTest: !1,
48177
48177
  depthWrite: !1,
@@ -48184,13 +48184,13 @@ function cM(i, A, e, t, g, o, n) {
48184
48184
  get: function() {
48185
48185
  return this.uniforms.envMap.value;
48186
48186
  }
48187
- }), g.update(C)), Do.copy(u.backgroundRotation), Do.x *= -1, Do.y *= -1, Do.z *= -1, D.isCubeTexture && D.isRenderTargetTexture === !1 && (Do.y *= -1, Do.z *= -1), C.material.uniforms.envMap.value = D, C.material.uniforms.flipEnvMap.value = D.isCubeTexture && D.isRenderTargetTexture === !1 ? -1 : 1, C.material.uniforms.backgroundBlurriness.value = u.backgroundBlurriness, C.material.uniforms.backgroundIntensity.value = u.backgroundIntensity, C.material.uniforms.backgroundRotation.value.setFromMatrix4(EM.makeRotationFromEuler(Do)), C.material.toneMapped = de.getTransfer(D.colorSpace) !== ye, (r !== D || Q !== D.version || B !== i.toneMapping) && (C.material.needsUpdate = !0, r = D, Q = D.version, B = i.toneMapping), C.layers.enableAll(), p.unshift(C, C.geometry, C.material, 0, 0, null)) : D && D.isTexture && (s === void 0 && (s = new Gi(
48187
+ }), g.update(C)), Do.copy(u.backgroundRotation), Do.x *= -1, Do.y *= -1, Do.z *= -1, D.isCubeTexture && D.isRenderTargetTexture === !1 && (Do.y *= -1, Do.z *= -1), C.material.uniforms.envMap.value = D, C.material.uniforms.flipEnvMap.value = D.isCubeTexture && D.isRenderTargetTexture === !1 ? -1 : 1, C.material.uniforms.backgroundBlurriness.value = u.backgroundBlurriness, C.material.uniforms.backgroundIntensity.value = u.backgroundIntensity, C.material.uniforms.backgroundRotation.value.setFromMatrix4(EM.makeRotationFromEuler(Do)), C.material.toneMapped = de.getTransfer(D.colorSpace) !== ye, (r !== D || Q !== D.version || B !== i.toneMapping) && (C.material.needsUpdate = !0, r = D, Q = D.version, B = i.toneMapping), C.layers.enableAll(), p.unshift(C, C.geometry, C.material, 0, 0, null)) : D && D.isTexture && (s === void 0 && (s = new vi(
48188
48188
  new sC(2, 2),
48189
- new Qi({
48189
+ new Ei({
48190
48190
  name: "BackgroundMaterial",
48191
- uniforms: qn(qi.background.uniforms),
48192
- vertexShader: qi.background.vertexShader,
48193
- fragmentShader: qi.background.fragmentShader,
48191
+ uniforms: qn(Pi.background.uniforms),
48192
+ vertexShader: Pi.background.vertexShader,
48193
+ fragmentShader: Pi.background.fragmentShader,
48194
48194
  side: Rg,
48195
48195
  depthTest: !1,
48196
48196
  depthWrite: !1,
@@ -48487,12 +48487,12 @@ function lM(i, A, e, t) {
48487
48487
  return g;
48488
48488
  }
48489
48489
  function n(k) {
48490
- return !(k !== Ri && t.convert(k) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT));
48490
+ return !(k !== Ni && t.convert(k) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT));
48491
48491
  }
48492
48492
  function I(k) {
48493
48493
  const b = k === bg && (A.has("EXT_color_buffer_half_float") || A.has("EXT_color_buffer_float"));
48494
- return !(k !== si && t.convert(k) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
48495
- k !== Oi && !b);
48494
+ return !(k !== ri && t.convert(k) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
48495
+ k !== ji && !b);
48496
48496
  }
48497
48497
  function a(k) {
48498
48498
  if (k === "highp") {
@@ -48716,7 +48716,7 @@ class Kd {
48716
48716
  minFilter: St,
48717
48717
  generateMipmaps: !1,
48718
48718
  type: bg,
48719
- format: Ri,
48719
+ format: Ni,
48720
48720
  colorSpace: Yn,
48721
48721
  depthBuffer: !1
48722
48722
  }, g = Jd(A, e, t);
@@ -48728,12 +48728,12 @@ class Kd {
48728
48728
  return g;
48729
48729
  }
48730
48730
  _compileMaterial(A) {
48731
- const e = new Gi(new Fi(), A);
48731
+ const e = new vi(new Li(), A);
48732
48732
  this._renderer.compile(e, EI);
48733
48733
  }
48734
48734
  _sceneToCubeUV(A, e, t, g, o) {
48735
- const a = new ai(90, 1, e, t), s = [1, -1, 1, 1, 1, 1], C = [1, 1, 1, -1, -1, -1], r = this._renderer, Q = r.autoClear, B = r.toneMapping;
48736
- r.getClearColor(Td), r.toneMapping = Wi, r.autoClear = !1, r.state.buffers.depth.getReversed() && (r.setRenderTarget(g), r.clearDepth(), r.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new Gi(
48735
+ const a = new Ci(90, 1, e, t), s = [1, -1, 1, 1, 1, 1], C = [1, 1, 1, -1, -1, -1], r = this._renderer, Q = r.autoClear, B = r.toneMapping;
48736
+ r.getClearColor(Td), r.toneMapping = Xi, r.autoClear = !1, r.state.buffers.depth.getReversed() && (r.setRenderTarget(g), r.clearDepth(), r.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new vi(
48737
48737
  new aa(),
48738
48738
  new yf({
48739
48739
  name: "PMREM.Background",
@@ -48884,20 +48884,20 @@ function pM(i) {
48884
48884
  const m = [w, w, w, w, w, w];
48885
48885
  u.set(m, E * d * w);
48886
48886
  }
48887
- const D = new Fi();
48888
- D.setAttribute("position", new Xi(x, c)), D.setAttribute("uv", new Xi(p, h)), D.setAttribute("faceIndex", new Xi(u, E)), t.push(new Gi(D, null)), g > $g && g--;
48887
+ const D = new Li();
48888
+ D.setAttribute("position", new $i(x, c)), D.setAttribute("uv", new $i(p, h)), D.setAttribute("faceIndex", new $i(u, E)), t.push(new vi(D, null)), g > $g && g--;
48889
48889
  }
48890
48890
  return { lodMeshes: t, sizeLods: A, sigmas: e };
48891
48891
  }
48892
48892
  function Jd(i, A, e) {
48893
- const t = new Zi(i, A, e);
48893
+ const t = new zi(i, A, e);
48894
48894
  return t.texture.mapping = IC, t.texture.name = "PMREM.cubeUv", t.scissorTest = !0, t;
48895
48895
  }
48896
48896
  function Bn(i, A, e, t, g) {
48897
48897
  i.viewport.set(A, e, t, g), i.scissor.set(A, e, t, g);
48898
48898
  }
48899
48899
  function wM(i, A, e) {
48900
- return new Qi({
48900
+ return new Ei({
48901
48901
  name: "PMREMGGXConvolution",
48902
48902
  defines: {
48903
48903
  GGX_SAMPLES: fM,
@@ -49030,7 +49030,7 @@ function wM(i, A, e) {
49030
49030
  }
49031
49031
  function mM(i, A, e) {
49032
49032
  const t = new Float32Array(So), g = new J(0, 1, 0);
49033
- return new Qi({
49033
+ return new Ei({
49034
49034
  name: "SphericalGaussianBlur",
49035
49035
  defines: {
49036
49036
  n: So,
@@ -49118,7 +49118,7 @@ function mM(i, A, e) {
49118
49118
  });
49119
49119
  }
49120
49120
  function Yd() {
49121
- return new Qi({
49121
+ return new Ei({
49122
49122
  name: "EquirectangularToCubeUV",
49123
49123
  uniforms: {
49124
49124
  envMap: { value: null }
@@ -49153,7 +49153,7 @@ function Yd() {
49153
49153
  });
49154
49154
  }
49155
49155
  function qd() {
49156
- return new Qi({
49156
+ return new Ei({
49157
49157
  name: "CubemapToCubeUV",
49158
49158
  uniforms: {
49159
49159
  envMap: { value: null },
@@ -49466,7 +49466,7 @@ function bM(i, A, e) {
49466
49466
  let u = I.attributes.position.count * p, D = 1;
49467
49467
  u > A.maxTextureSize && (D = Math.ceil(u / A.maxTextureSize), u = A.maxTextureSize);
49468
49468
  const w = new Float32Array(u * D * 4 * r), k = new mf(w, u, D, r);
49469
- k.type = Oi, k.needsUpdate = !0;
49469
+ k.type = ji, k.needsUpdate = !0;
49470
49470
  const b = p * 4;
49471
49471
  for (let m = 0; m < r; m++) {
49472
49472
  const S = h[m], v = E[m], T = x[m], O = u * D * 4 * m;
@@ -49528,15 +49528,15 @@ const MM = {
49528
49528
  [Bf]: "CUSTOM_TONE_MAPPING"
49529
49529
  };
49530
49530
  function GM(i, A, e, t, g) {
49531
- const o = new Zi(A, e, {
49531
+ const o = new zi(A, e, {
49532
49532
  type: i,
49533
49533
  depthBuffer: t,
49534
49534
  stencilBuffer: g
49535
- }), n = new Zi(A, e, {
49535
+ }), n = new zi(A, e, {
49536
49536
  type: bg,
49537
49537
  depthBuffer: !1,
49538
49538
  stencilBuffer: !1
49539
- }), I = new Fi();
49539
+ }), I = new Li();
49540
49540
  I.setAttribute("position", new vt([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), I.setAttribute("uv", new vt([0, 2, 0, 0, 2, 0], 2));
49541
49541
  const a = new yR({
49542
49542
  uniforms: {
@@ -49598,7 +49598,7 @@ function GM(i, A, e, t, g) {
49598
49598
  ),
49599
49599
  depthTest: !1,
49600
49600
  depthWrite: !1
49601
- }), s = new Gi(I, a), C = new Lf(-1, 1, 1, -1, 0, 1);
49601
+ }), s = new vi(I, a), C = new Lf(-1, 1, 1, -1, 0, 1);
49602
49602
  let r = null, Q = null, B = !1, d, c = null, h = [], E = !1;
49603
49603
  this.setSize = function(x, p) {
49604
49604
  o.setSize(x, p), n.setSize(x, p);
@@ -49614,12 +49614,12 @@ function GM(i, A, e, t, g) {
49614
49614
  w.setSize && w.setSize(p, u);
49615
49615
  }
49616
49616
  }, this.begin = function(x, p) {
49617
- if (B || x.toneMapping === Wi && h.length === 0) return !1;
49617
+ if (B || x.toneMapping === Xi && h.length === 0) return !1;
49618
49618
  if (c = p, p !== null) {
49619
49619
  const u = p.width, D = p.height;
49620
49620
  (o.width !== u || o.height !== D) && this.setSize(u, D);
49621
49621
  }
49622
- return E === !1 && x.setRenderTarget(o), d = x.toneMapping, x.toneMapping = Wi, !0;
49622
+ return E === !1 && x.setRenderTarget(o), d = x.toneMapping, x.toneMapping = Xi, !0;
49623
49623
  }, this.hasRenderPass = function() {
49624
49624
  return E;
49625
49625
  }, this.end = function(x, p) {
@@ -50563,10 +50563,10 @@ function ZG(i, A, e, t) {
50563
50563
  "uniform mat4 viewMatrix;",
50564
50564
  "uniform vec3 cameraPosition;",
50565
50565
  "uniform bool isOrthographic;",
50566
- e.toneMapping !== Wi ? "#define TONE_MAPPING" : "",
50567
- e.toneMapping !== Wi ? XA.tonemapping_pars_fragment : "",
50566
+ e.toneMapping !== Xi ? "#define TONE_MAPPING" : "",
50567
+ e.toneMapping !== Xi ? XA.tonemapping_pars_fragment : "",
50568
50568
  // this code is required here because it is used by the toneMapping() function defined below
50569
- e.toneMapping !== Wi ? bG("toneMapping", e.toneMapping) : "",
50569
+ e.toneMapping !== Xi ? bG("toneMapping", e.toneMapping) : "",
50570
50570
  e.dithering ? "#define DITHERING" : "",
50571
50571
  e.opaque ? "#define OPAQUE" : "",
50572
50572
  XA.colorspace_pars_fragment,
@@ -50726,12 +50726,12 @@ function AF(i, A, e, t, g, o, n) {
50726
50726
  W.morphAttributes.position !== void 0 && (VA = 1), W.morphAttributes.normal !== void 0 && (VA = 2), W.morphAttributes.color !== void 0 && (VA = 3);
50727
50727
  let OA, Pe, Se, z;
50728
50728
  if (DA) {
50729
- const me = qi[DA];
50729
+ const me = Pi[DA];
50730
50730
  OA = me.vertexShader, Pe = me.fragmentShader;
50731
50731
  } else
50732
50732
  OA = l.vertexShader, Pe = l.fragmentShader, a.update(l), Se = a.getVertexShaderID(l), z = a.getFragmentShaderID(l);
50733
50733
  const oA = i.getRenderTarget(), RA = i.state.buffers.depth.getReversed(), jA = T.isInstancedMesh === !0, GA = T.isBatchedMesh === !0, le = !!l.map, dt = !!l.matcap, ce = !!V, we = !!l.aoMap, Fe = !!l.lightMap, $A = !!l.bumpMap, nt = !!l.normalMap, M = !!l.displacementMap, It = !!l.emissiveMap, pe = !!l.metalnessMap, Te = !!l.roughnessMap, vA = l.anisotropy > 0, y = l.clearcoat > 0, f = l.dispersion > 0, F = l.iridescence > 0, X = l.sheen > 0, gA = l.transmission > 0, j = vA && !!l.anisotropyMap, UA = y && !!l.clearcoatMap, dA = y && !!l.clearcoatNormalMap, FA = y && !!l.clearcoatRoughnessMap, qA = F && !!l.iridescenceMap, sA = F && !!l.iridescenceThicknessMap, lA = X && !!l.sheenColorMap, MA = X && !!l.sheenRoughnessMap, LA = !!l.specularMap, hA = !!l.specularColorMap, Ae = !!l.specularIntensityMap, G = gA && !!l.transmissionMap, mA = gA && !!l.thicknessMap, rA = !!l.gradientMap, kA = !!l.alphaMap, aA = l.alphaTest > 0, eA = !!l.alphaHash, cA = !!l.extensions;
50734
- let HA = Wi;
50734
+ let HA = Xi;
50735
50735
  l.toneMapped && (oA === null || oA.isXRRenderTarget === !0) && (HA = i.toneMapping);
50736
50736
  const Ke = {
50737
50737
  shaderID: DA,
@@ -50883,7 +50883,7 @@ function AF(i, A, e, t, g, o, n) {
50883
50883
  const m = d[l.type];
50884
50884
  let S;
50885
50885
  if (m) {
50886
- const v = qi[m];
50886
+ const v = Pi[m];
50887
50887
  S = hR.clone(v.uniforms);
50888
50888
  } else
50889
50889
  S = l.uniforms;
@@ -51321,7 +51321,7 @@ void main() {
51321
51321
  ], nh = /* @__PURE__ */ new rt(), cI = /* @__PURE__ */ new J(), vr = /* @__PURE__ */ new J();
51322
51322
  function EF(i, A, e) {
51323
51323
  let t = new Ff();
51324
- const g = new De(), o = new De(), n = new ot(), I = new SR(), a = new RR(), s = {}, C = e.maxTextureSize, r = { [Rg]: Gt, [Gt]: Rg, [fg]: fg }, Q = new Qi({
51324
+ const g = new De(), o = new De(), n = new ot(), I = new SR(), a = new RR(), s = {}, C = e.maxTextureSize, r = { [Rg]: Gt, [Gt]: Rg, [fg]: fg }, Q = new Ei({
51325
51325
  defines: {
51326
51326
  VSM_SAMPLES: 8
51327
51327
  },
@@ -51334,15 +51334,15 @@ function EF(i, A, e) {
51334
51334
  fragmentShader: rF
51335
51335
  }), B = Q.clone();
51336
51336
  B.defines.HORIZONTAL_PASS = 1;
51337
- const d = new Fi();
51337
+ const d = new Li();
51338
51338
  d.setAttribute(
51339
51339
  "position",
51340
- new Xi(
51340
+ new $i(
51341
51341
  new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]),
51342
51342
  3
51343
51343
  )
51344
51344
  );
51345
- const c = new Gi(d, Q), h = this;
51345
+ const c = new vi(d, Q), h = this;
51346
51346
  this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = Cs;
51347
51347
  let E = this.type;
51348
51348
  this.render = function(w, k, b) {
@@ -51369,15 +51369,15 @@ function EF(i, A, e) {
51369
51369
  PA("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");
51370
51370
  continue;
51371
51371
  }
51372
- V.map = new Zi(g.x, g.y, {
51372
+ V.map = new zi(g.x, g.y, {
51373
51373
  format: Jn,
51374
51374
  type: bg,
51375
51375
  minFilter: St,
51376
51376
  magFilter: St,
51377
51377
  generateMipmaps: !1
51378
- }), V.map.texture.name = P.name + ".shadowMap", V.map.depthTexture = new ZI(g.x, g.y, Oi), V.map.depthTexture.name = P.name + ".shadowMapDepth", V.map.depthTexture.format = Ng, V.map.depthTexture.compareFunction = null, V.map.depthTexture.minFilter = wt, V.map.depthTexture.magFilter = wt;
51378
+ }), V.map.texture.name = P.name + ".shadowMap", V.map.depthTexture = new ZI(g.x, g.y, ji), V.map.depthTexture.name = P.name + ".shadowMapDepth", V.map.depthTexture.format = Ng, V.map.depthTexture.compareFunction = null, V.map.depthTexture.minFilter = wt, V.map.depthTexture.magFilter = wt;
51379
51379
  } else {
51380
- P.isPointLight ? (V.map = new Gf(g.x), V.map.depthTexture = new kR(g.x, Ag)) : (V.map = new Zi(g.x, g.y), V.map.depthTexture = new ZI(g.x, g.y, Ag)), V.map.depthTexture.name = P.name + ".shadowMap", V.map.depthTexture.format = Ng;
51380
+ P.isPointLight ? (V.map = new Gf(g.x), V.map.depthTexture = new kR(g.x, tg)) : (V.map = new zi(g.x, g.y), V.map.depthTexture = new ZI(g.x, g.y, tg)), V.map.depthTexture.name = P.name + ".shadowMap", V.map.depthTexture.format = Ng;
51381
51381
  const EA = i.state.buffers.depth.getReversed();
51382
51382
  this.type === Cs ? (V.map.depthTexture.compareFunction = EA ? TE : UE, V.map.depthTexture.minFilter = St, V.map.depthTexture.magFilter = St) : (V.map.depthTexture.compareFunction = null, V.map.depthTexture.minFilter = wt, V.map.depthTexture.magFilter = wt);
51383
51383
  }
@@ -51410,7 +51410,7 @@ function EF(i, A, e) {
51410
51410
  };
51411
51411
  function x(w, k) {
51412
51412
  const b = A.update(c);
51413
- Q.defines.VSM_SAMPLES !== w.blurSamples && (Q.defines.VSM_SAMPLES = w.blurSamples, B.defines.VSM_SAMPLES = w.blurSamples, Q.needsUpdate = !0, B.needsUpdate = !0), w.mapPass === null && (w.mapPass = new Zi(g.x, g.y, {
51413
+ Q.defines.VSM_SAMPLES !== w.blurSamples && (Q.defines.VSM_SAMPLES = w.blurSamples, B.defines.VSM_SAMPLES = w.blurSamples, Q.needsUpdate = !0, B.needsUpdate = !0), w.mapPass === null && (w.mapPass = new zi(g.x, g.y, {
51414
51414
  format: Jn,
51415
51415
  type: bg
51416
51416
  })), Q.uniforms.shadow_pass.value = w.map.depthTexture, Q.uniforms.resolution.value = w.mapSize, Q.uniforms.radius.value = w.radius, i.setRenderTarget(w.mapPass), i.clear(), i.renderBufferDirect(k, null, b, Q, c, null), B.uniforms.shadow_pass.value = w.mapPass.texture, B.uniforms.resolution.value = w.mapSize, B.uniforms.radius.value = w.radius, i.setRenderTarget(w.map), i.clear(), i.renderBufferDirect(k, null, b, B, c, null);
@@ -51568,11 +51568,11 @@ function dF(i, A) {
51568
51568
  setMask: function(me) {
51569
51569
  mA !== me && !G && (i.stencilMask(me), mA = me);
51570
51570
  },
51571
- setFunc: function(me, vi, ig) {
51572
- (rA !== me || kA !== vi || aA !== ig) && (i.stencilFunc(me, vi, ig), rA = me, kA = vi, aA = ig);
51571
+ setFunc: function(me, Ui, og) {
51572
+ (rA !== me || kA !== Ui || aA !== og) && (i.stencilFunc(me, Ui, og), rA = me, kA = Ui, aA = og);
51573
51573
  },
51574
- setOp: function(me, vi, ig) {
51575
- (eA !== me || cA !== vi || HA !== ig) && (i.stencilOp(me, vi, ig), eA = me, cA = vi, HA = ig);
51574
+ setOp: function(me, Ui, og) {
51575
+ (eA !== me || cA !== Ui || HA !== og) && (i.stencilOp(me, Ui, og), eA = me, cA = Ui, HA = og);
51576
51576
  },
51577
51577
  setLocked: function(me) {
51578
51578
  G = me;
@@ -51909,7 +51909,7 @@ function hF(i, A, e, t, g, o, n) {
51909
51909
  }
51910
51910
  function u(y, f) {
51911
51911
  let F;
51912
- return y ? f === null || f === Ag || f === jI ? F = i.DEPTH24_STENCIL8 : f === Oi ? F = i.DEPTH32F_STENCIL8 : f === VI && (F = i.DEPTH24_STENCIL8, PA("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : f === null || f === Ag || f === jI ? F = i.DEPTH_COMPONENT24 : f === Oi ? F = i.DEPTH_COMPONENT32F : f === VI && (F = i.DEPTH_COMPONENT16), F;
51912
+ return y ? f === null || f === tg || f === jI ? F = i.DEPTH24_STENCIL8 : f === ji ? F = i.DEPTH32F_STENCIL8 : f === VI && (F = i.DEPTH24_STENCIL8, PA("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : f === null || f === tg || f === jI ? F = i.DEPTH_COMPONENT24 : f === ji ? F = i.DEPTH_COMPONENT32F : f === VI && (F = i.DEPTH_COMPONENT16), F;
51913
51913
  }
51914
51914
  function D(y, f) {
51915
51915
  return h(y) === !0 || y.isFramebufferTexture && y.minFilter !== wt && y.minFilter !== St ? Math.log2(Math.max(f.width, f.height)) + 1 : y.mipmaps !== void 0 && y.mipmaps.length > 0 ? y.mipmaps.length : y.isCompressedTexture && Array.isArray(y.image) ? f.mipmaps.length : 1;
@@ -52038,8 +52038,8 @@ function hF(i, A, e, t, g, o, n) {
52038
52038
  [VS]: i.NOTEQUAL
52039
52039
  };
52040
52040
  function VA(y, f) {
52041
- if (f.type === Oi && A.has("OES_texture_float_linear") === !1 && (f.magFilter === St || f.magFilter === nr || f.magFilter === la || f.magFilter === bo || f.minFilter === St || f.minFilter === nr || f.minFilter === la || f.minFilter === bo) && PA("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), i.texParameteri(y, i.TEXTURE_WRAP_S, DA[f.wrapS]), i.texParameteri(y, i.TEXTURE_WRAP_T, DA[f.wrapT]), (y === i.TEXTURE_3D || y === i.TEXTURE_2D_ARRAY) && i.texParameteri(y, i.TEXTURE_WRAP_R, DA[f.wrapR]), i.texParameteri(y, i.TEXTURE_MAG_FILTER, EA[f.magFilter]), i.texParameteri(y, i.TEXTURE_MIN_FILTER, EA[f.minFilter]), f.compareFunction && (i.texParameteri(y, i.TEXTURE_COMPARE_MODE, i.COMPARE_REF_TO_TEXTURE), i.texParameteri(y, i.TEXTURE_COMPARE_FUNC, wA[f.compareFunction])), A.has("EXT_texture_filter_anisotropic") === !0) {
52042
- if (f.magFilter === wt || f.minFilter !== la && f.minFilter !== bo || f.type === Oi && A.has("OES_texture_float_linear") === !1) return;
52041
+ if (f.type === ji && A.has("OES_texture_float_linear") === !1 && (f.magFilter === St || f.magFilter === nr || f.magFilter === la || f.magFilter === bo || f.minFilter === St || f.minFilter === nr || f.minFilter === la || f.minFilter === bo) && PA("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), i.texParameteri(y, i.TEXTURE_WRAP_S, DA[f.wrapS]), i.texParameteri(y, i.TEXTURE_WRAP_T, DA[f.wrapT]), (y === i.TEXTURE_3D || y === i.TEXTURE_2D_ARRAY) && i.texParameteri(y, i.TEXTURE_WRAP_R, DA[f.wrapR]), i.texParameteri(y, i.TEXTURE_MAG_FILTER, EA[f.magFilter]), i.texParameteri(y, i.TEXTURE_MIN_FILTER, EA[f.minFilter]), f.compareFunction && (i.texParameteri(y, i.TEXTURE_COMPARE_MODE, i.COMPARE_REF_TO_TEXTURE), i.texParameteri(y, i.TEXTURE_COMPARE_FUNC, wA[f.compareFunction])), A.has("EXT_texture_filter_anisotropic") === !0) {
52042
+ if (f.magFilter === wt || f.minFilter !== la && f.minFilter !== bo || f.type === ji && A.has("OES_texture_float_linear") === !1) return;
52043
52043
  if (f.anisotropy > 1 || t.get(f).__currentAnisotropy) {
52044
52044
  const F = A.get("EXT_texture_filter_anisotropic");
52045
52045
  i.texParameterf(y, F.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(f.anisotropy, g.getMaxAnisotropy())), t.get(f).__currentAnisotropy = f.anisotropy;
@@ -52121,7 +52121,7 @@ function hF(i, A, e, t, g, o, n) {
52121
52121
  if (f.isCompressedArrayTexture) {
52122
52122
  G && mA && e.texStorage3D(i.TEXTURE_2D_ARRAY, kA, LA, Ae[0].width, Ae[0].height, sA.depth);
52123
52123
  for (let aA = 0, eA = Ae.length; aA < eA; aA++)
52124
- if (hA = Ae[aA], f.format !== Ri)
52124
+ if (hA = Ae[aA], f.format !== Ni)
52125
52125
  if (lA !== null)
52126
52126
  if (G) {
52127
52127
  if (rA)
@@ -52146,7 +52146,7 @@ function hF(i, A, e, t, g, o, n) {
52146
52146
  } else {
52147
52147
  G && mA && e.texStorage2D(i.TEXTURE_2D, kA, LA, Ae[0].width, Ae[0].height);
52148
52148
  for (let aA = 0, eA = Ae.length; aA < eA; aA++)
52149
- hA = Ae[aA], f.format !== Ri ? lA !== null ? G ? rA && e.compressedTexSubImage2D(i.TEXTURE_2D, aA, 0, 0, hA.width, hA.height, lA, hA.data) : e.compressedTexImage2D(i.TEXTURE_2D, aA, LA, hA.width, hA.height, 0, hA.data) : PA("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : G ? rA && e.texSubImage2D(i.TEXTURE_2D, aA, 0, 0, hA.width, hA.height, lA, MA, hA.data) : e.texImage2D(i.TEXTURE_2D, aA, LA, hA.width, hA.height, 0, lA, MA, hA.data);
52149
+ hA = Ae[aA], f.format !== Ni ? lA !== null ? G ? rA && e.compressedTexSubImage2D(i.TEXTURE_2D, aA, 0, 0, hA.width, hA.height, lA, hA.data) : e.compressedTexImage2D(i.TEXTURE_2D, aA, LA, hA.width, hA.height, 0, hA.data) : PA("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : G ? rA && e.texSubImage2D(i.TEXTURE_2D, aA, 0, 0, hA.width, hA.height, lA, MA, hA.data) : e.texImage2D(i.TEXTURE_2D, aA, LA, hA.width, hA.height, 0, lA, MA, hA.data);
52150
52150
  }
52151
52151
  else if (f.isDataArrayTexture)
52152
52152
  if (G) {
@@ -52218,7 +52218,7 @@ function hF(i, A, e, t, g, o, n) {
52218
52218
  aA = lA[eA].mipmaps;
52219
52219
  for (let cA = 0; cA < aA.length; cA++) {
52220
52220
  const HA = aA[cA];
52221
- f.format !== Ri ? LA !== null ? G ? rA && e.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, 0, 0, HA.width, HA.height, LA, HA.data) : e.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, Ae, HA.width, HA.height, 0, HA.data) : PA("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : G ? rA && e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, 0, 0, HA.width, HA.height, LA, hA, HA.data) : e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, Ae, HA.width, HA.height, 0, LA, hA, HA.data);
52221
+ f.format !== Ni ? LA !== null ? G ? rA && e.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, 0, 0, HA.width, HA.height, LA, HA.data) : e.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, Ae, HA.width, HA.height, 0, HA.data) : PA("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : G ? rA && e.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, 0, 0, HA.width, HA.height, LA, hA, HA.data) : e.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + eA, cA, Ae, HA.width, HA.height, 0, LA, hA, HA.data);
52222
52222
  }
52223
52223
  }
52224
52224
  } else {
@@ -52455,7 +52455,7 @@ function hF(i, A, e, t, g, o, n) {
52455
52455
  }
52456
52456
  function Te(y, f) {
52457
52457
  const F = y.colorSpace, X = y.format, gA = y.type;
52458
- return y.isCompressedTexture === !0 || y.isVideoTexture === !0 || F !== Yn && F !== Zg && (de.getTransfer(F) === ye ? (X !== Ri || gA !== si) && PA("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : ue("WebGLTextures: Unsupported texture color space:", F)), f;
52458
+ return y.isCompressedTexture === !0 || y.isVideoTexture === !0 || F !== Yn && F !== Zg && (de.getTransfer(F) === ye ? (X !== Ni || gA !== ri) && PA("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : ue("WebGLTextures: Unsupported texture color space:", F)), f;
52459
52459
  }
52460
52460
  function vA(y) {
52461
52461
  return typeof HTMLImageElement < "u" && y instanceof HTMLImageElement ? (s.width = y.naturalWidth || y.width, s.height = y.naturalHeight || y.height) : typeof VideoFrame < "u" && y instanceof VideoFrame ? (s.width = y.displayWidth, s.height = y.displayHeight) : (s.width = y.width, s.height = y.height), s;
@@ -52468,7 +52468,7 @@ function lF(i, A) {
52468
52468
  function e(t, g = Zg) {
52469
52469
  let o;
52470
52470
  const n = de.getTransfer(g);
52471
- if (t === si) return i.UNSIGNED_BYTE;
52471
+ if (t === ri) return i.UNSIGNED_BYTE;
52472
52472
  if (t === ME) return i.UNSIGNED_SHORT_4_4_4_4;
52473
52473
  if (t === GE) return i.UNSIGNED_SHORT_5_5_5_1;
52474
52474
  if (t === xf) return i.UNSIGNED_INT_5_9_9_9_REV;
@@ -52477,12 +52477,12 @@ function lF(i, A) {
52477
52477
  if (t === lf) return i.SHORT;
52478
52478
  if (t === VI) return i.UNSIGNED_SHORT;
52479
52479
  if (t === NE) return i.INT;
52480
- if (t === Ag) return i.UNSIGNED_INT;
52481
- if (t === Oi) return i.FLOAT;
52480
+ if (t === tg) return i.UNSIGNED_INT;
52481
+ if (t === ji) return i.FLOAT;
52482
52482
  if (t === bg) return i.HALF_FLOAT;
52483
52483
  if (t === ff) return i.ALPHA;
52484
52484
  if (t === Df) return i.RGB;
52485
- if (t === Ri) return i.RGBA;
52485
+ if (t === Ni) return i.RGBA;
52486
52486
  if (t === Ng) return i.DEPTH_COMPONENT;
52487
52487
  if (t === No) return i.DEPTH_STENCIL;
52488
52488
  if (t === pf) return i.RED;
@@ -52613,7 +52613,7 @@ class fF {
52613
52613
  */
52614
52614
  getMesh(A) {
52615
52615
  if (this.texture !== null && this.mesh === null) {
52616
- const e = A.cameras[0].viewport, t = new Qi({
52616
+ const e = A.cameras[0].viewport, t = new Ei({
52617
52617
  vertexShader: xF,
52618
52618
  fragmentShader: uF,
52619
52619
  uniforms: {
@@ -52622,7 +52622,7 @@ class fF {
52622
52622
  depthHeight: { value: e.w }
52623
52623
  }
52624
52624
  });
52625
- this.mesh = new Gi(new sC(20, 20), t);
52625
+ this.mesh = new vi(new sC(20, 20), t);
52626
52626
  }
52627
52627
  return this.mesh;
52628
52628
  }
@@ -52656,9 +52656,9 @@ class DF extends jn {
52656
52656
  let p = null, u = null;
52657
52657
  const D = [], w = [], k = new De();
52658
52658
  let b = null;
52659
- const l = new ai();
52659
+ const l = new Ci();
52660
52660
  l.viewport = new ot();
52661
- const m = new ai();
52661
+ const m = new Ci();
52662
52662
  m.viewport = new ot();
52663
52663
  const S = [l, m], v = new bR();
52664
52664
  let T = null, O = null;
@@ -52710,18 +52710,18 @@ class DF extends jn {
52710
52710
  if (g = z, g !== null) {
52711
52711
  if (p = A.getRenderTarget(), g.addEventListener("select", W), g.addEventListener("selectstart", W), g.addEventListener("selectend", W), g.addEventListener("squeeze", W), g.addEventListener("squeezestart", W), g.addEventListener("squeezeend", W), g.addEventListener("end", P), g.addEventListener("inputsourceschange", V), x.xrCompatible !== !0 && await e.makeXRCompatible(), b = A.getPixelRatio(), A.getSize(k), c && "createProjectionLayer" in XRWebGLBinding.prototype) {
52712
52712
  let RA = null, jA = null, GA = null;
52713
- x.depth && (GA = x.stencil ? e.DEPTH24_STENCIL8 : e.DEPTH_COMPONENT24, RA = x.stencil ? No : Ng, jA = x.stencil ? jI : Ag);
52713
+ x.depth && (GA = x.stencil ? e.DEPTH24_STENCIL8 : e.DEPTH_COMPONENT24, RA = x.stencil ? No : Ng, jA = x.stencil ? jI : tg);
52714
52714
  const le = {
52715
52715
  colorFormat: e.RGBA8,
52716
52716
  depthFormat: GA,
52717
52717
  scaleFactor: o
52718
52718
  };
52719
- r = this.getBinding(), Q = r.createProjectionLayer(le), g.updateRenderState({ layers: [Q] }), A.setPixelRatio(1), A.setSize(Q.textureWidth, Q.textureHeight, !1), u = new Zi(
52719
+ r = this.getBinding(), Q = r.createProjectionLayer(le), g.updateRenderState({ layers: [Q] }), A.setPixelRatio(1), A.setSize(Q.textureWidth, Q.textureHeight, !1), u = new zi(
52720
52720
  Q.textureWidth,
52721
52721
  Q.textureHeight,
52722
52722
  {
52723
- format: Ri,
52724
- type: si,
52723
+ format: Ni,
52724
+ type: ri,
52725
52725
  depthTexture: new ZI(Q.textureWidth, Q.textureHeight, jA, void 0, void 0, void 0, void 0, void 0, void 0, RA),
52726
52726
  stencilBuffer: x.stencil,
52727
52727
  colorSpace: A.outputColorSpace,
@@ -52738,12 +52738,12 @@ class DF extends jn {
52738
52738
  stencil: x.stencil,
52739
52739
  framebufferScaleFactor: o
52740
52740
  };
52741
- B = new XRWebGLLayer(g, e, RA), g.updateRenderState({ baseLayer: B }), A.setPixelRatio(1), A.setSize(B.framebufferWidth, B.framebufferHeight, !1), u = new Zi(
52741
+ B = new XRWebGLLayer(g, e, RA), g.updateRenderState({ baseLayer: B }), A.setPixelRatio(1), A.setSize(B.framebufferWidth, B.framebufferHeight, !1), u = new zi(
52742
52742
  B.framebufferWidth,
52743
52743
  B.framebufferHeight,
52744
52744
  {
52745
- format: Ri,
52746
- type: si,
52745
+ format: Ni,
52746
+ type: ri,
52747
52747
  colorSpace: A.outputColorSpace,
52748
52748
  stencilBuffer: x.stencil,
52749
52749
  resolveDepthBuffer: B.ignoreDepthValues === !1,
@@ -52847,7 +52847,7 @@ class DF extends jn {
52847
52847
  ), A.setRenderTarget(u));
52848
52848
  }
52849
52849
  let $A = S[ce];
52850
- $A === void 0 && ($A = new ai(), $A.layers.enable(ce), $A.viewport = new ot(), S[ce] = $A), $A.matrix.fromArray(we.transform.matrix), $A.matrix.decompose($A.position, $A.quaternion, $A.scale), $A.projectionMatrix.fromArray(we.projectionMatrix), $A.projectionMatrixInverse.copy($A.projectionMatrix).invert(), $A.viewport.set(Fe.x, Fe.y, Fe.width, Fe.height), ce === 0 && (v.matrix.copy($A.matrix), v.matrix.decompose(v.position, v.quaternion, v.scale)), jA === !0 && v.cameras.push($A);
52850
+ $A === void 0 && ($A = new Ci(), $A.layers.enable(ce), $A.viewport = new ot(), S[ce] = $A), $A.matrix.fromArray(we.transform.matrix), $A.matrix.decompose($A.position, $A.quaternion, $A.scale), $A.projectionMatrix.fromArray(we.projectionMatrix), $A.projectionMatrixInverse.copy($A.projectionMatrix).invert(), $A.viewport.set(Fe.x, Fe.y, Fe.width, Fe.height), ce === 0 && (v.matrix.copy($A.matrix), v.matrix.decompose(v.position, v.quaternion, v.scale)), jA === !0 && v.cameras.push($A);
52851
52851
  }
52852
52852
  const GA = g.enabledFeatures;
52853
52853
  if (GA && GA.includes("depth-sensing") && g.depthUsage == "gpu-optimized" && c) {
@@ -53551,9 +53551,9 @@ const _F = new Uint16Array([
53551
53551
  13702,
53552
53552
  1183
53553
53553
  ]);
53554
- let Ui = null;
53554
+ let Ki = null;
53555
53555
  function kF() {
53556
- return Ui === null && (Ui = new pR(_F, 16, 16, Jn, bg), Ui.name = "DFG_LUT", Ui.minFilter = St, Ui.magFilter = St, Ui.wrapS = pg, Ui.wrapT = pg, Ui.generateMipmaps = !1, Ui.needsUpdate = !0), Ui;
53556
+ return Ki === null && (Ki = new pR(_F, 16, 16, Jn, bg), Ki.name = "DFG_LUT", Ki.minFilter = St, Ki.magFilter = St, Ki.wrapS = pg, Ki.wrapT = pg, Ki.generateMipmaps = !1, Ki.needsUpdate = !0), Ki;
53557
53557
  }
53558
53558
  class yF {
53559
53559
  /**
@@ -53574,7 +53574,7 @@ class yF {
53574
53574
  powerPreference: C = "default",
53575
53575
  failIfMajorPerformanceCaveat: r = !1,
53576
53576
  reversedDepthBuffer: Q = !1,
53577
- outputBufferType: B = si
53577
+ outputBufferType: B = ri
53578
53578
  } = A;
53579
53579
  this.isWebGLRenderer = !0;
53580
53580
  let d;
@@ -53589,8 +53589,8 @@ class yF {
53589
53589
  vE,
53590
53590
  FE
53591
53591
  ]), E = /* @__PURE__ */ new Set([
53592
- si,
53593
- Ag,
53592
+ ri,
53593
+ tg,
53594
53594
  VI,
53595
53595
  jI,
53596
53596
  ME,
@@ -53610,10 +53610,10 @@ class yF {
53610
53610
  * @type {?Function}
53611
53611
  */
53612
53612
  onShaderError: null
53613
- }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping = Wi, this.toneMappingExposure = 1, this.transmissionResolutionScale = 1;
53613
+ }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping = Xi, this.toneMappingExposure = 1, this.transmissionResolutionScale = 1;
53614
53614
  const l = this;
53615
53615
  let m = !1;
53616
- this._outputColorSpace = ni;
53616
+ this._outputColorSpace = ai;
53617
53617
  let S = 0, v = 0, T = null, O = -1, W = null;
53618
53618
  const P = new ot(), V = new ot();
53619
53619
  let $ = null;
@@ -53655,7 +53655,7 @@ class yF {
53655
53655
  function eA() {
53656
53656
  pe = new kM(M), pe.init(), rA = new lF(M, pe), Te = new lM(M, pe, A, rA), vA = new dF(M, pe), Te.reversedDepthBuffer && Q && vA.buffers.depth.setReversed(!0), y = new RM(M), f = new eF(), F = new hF(M, pe, vA, f, Te, rA, y), X = new uM(l), gA = new _M(l), j = new GR(M), kA = new dM(M, j), UA = new yM(M, j, y, kA), dA = new NM(M, UA, j, y), Ae = new bM(M, Te, F), MA = new xM(f), FA = new AF(l, X, gA, pe, Te, kA, MA), qA = new wF(l, f), sA = new iF(), lA = new sF(pe), hA = new cM(l, X, gA, vA, dA, d, a), LA = new EF(l, dA, Te), aA = new mF(M, y, Te, vA), G = new hM(M, pe, y), mA = new SM(M, pe, y), y.programs = FA.programs, l.capabilities = Te, l.extensions = pe, l.properties = f, l.renderLists = sA, l.shadowMap = LA, l.state = vA, l.info = y;
53657
53657
  }
53658
- eA(), c !== si && (b = new GM(c, e.width, e.height, g, o));
53658
+ eA(), c !== ri && (b = new GM(c, e.width, e.height, g, o));
53659
53659
  const cA = new DF(l, M);
53660
53660
  this.xr = cA, this.getContext = function() {
53661
53661
  return M;
@@ -53684,7 +53684,7 @@ class yF {
53684
53684
  }, this.setDrawingBufferSize = function(_, L, H) {
53685
53685
  wA = _, VA = L, OA = H, e.width = Math.floor(_ * H), e.height = Math.floor(L * H), this.setViewport(0, 0, _, L);
53686
53686
  }, this.setEffects = function(_) {
53687
- if (c === si) {
53687
+ if (c === ri) {
53688
53688
  console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");
53689
53689
  return;
53690
53690
  }
@@ -53757,11 +53757,11 @@ class yF {
53757
53757
  function me(_) {
53758
53758
  ue("WebGLRenderer: A WebGL context could not be created. Reason: ", _.statusMessage);
53759
53759
  }
53760
- function vi(_) {
53760
+ function Ui(_) {
53761
53761
  const L = _.target;
53762
- L.removeEventListener("dispose", vi), ig(L);
53762
+ L.removeEventListener("dispose", Ui), og(L);
53763
53763
  }
53764
- function ig(_) {
53764
+ function og(_) {
53765
53765
  Hf(_), f.remove(_);
53766
53766
  }
53767
53767
  function Hf(_) {
@@ -53868,7 +53868,7 @@ class yF {
53868
53868
  }
53869
53869
  if (m === !0) return;
53870
53870
  const H = cA.enabled === !0 && cA.isPresenting === !0, Y = b !== null && (T === null || H) && b.begin(l, T);
53871
- if (_.matrixWorldAutoUpdate === !0 && _.updateMatrixWorld(), L.parent === null && L.matrixWorldAutoUpdate === !0 && L.updateMatrixWorld(), cA.enabled === !0 && cA.isPresenting === !0 && (b === null || b.isCompositing() === !1) && (cA.cameraAutoUpdate === !0 && cA.updateCamera(L), L = cA.getCamera()), _.isScene === !0 && _.onBeforeRender(l, _, L, T), D = lA.get(_, k.length), D.init(L), k.push(D), dt.multiplyMatrices(L.projectionMatrix, L.matrixWorldInverse), jA.setFromProjectionMatrix(dt, Vi, L.reversedDepth), le = this.localClippingEnabled, GA = MA.init(this.clippingPlanes, le), u = sA.get(_, w.length), u.init(), w.push(u), cA.enabled === !0 && cA.isPresenting === !0) {
53871
+ if (_.matrixWorldAutoUpdate === !0 && _.updateMatrixWorld(), L.parent === null && L.matrixWorldAutoUpdate === !0 && L.updateMatrixWorld(), cA.enabled === !0 && cA.isPresenting === !0 && (b === null || b.isCompositing() === !1) && (cA.cameraAutoUpdate === !0 && cA.updateCamera(L), L = cA.getCamera()), _.isScene === !0 && _.onBeforeRender(l, _, L, T), D = lA.get(_, k.length), D.init(L), k.push(D), dt.multiplyMatrices(L.projectionMatrix, L.matrixWorldInverse), jA.setFromProjectionMatrix(dt, Wi, L.reversedDepth), le = this.localClippingEnabled, GA = MA.init(this.clippingPlanes, le), u = sA.get(_, w.length), u.init(), w.push(u), cA.enabled === !0 && cA.isPresenting === !0) {
53872
53872
  const SA = l.xr.getDepthSensingMesh();
53873
53873
  SA !== null && DC(SA, L, -1 / 0, l.sortObjects);
53874
53874
  }
@@ -53932,9 +53932,9 @@ class yF {
53932
53932
  return;
53933
53933
  if (D.state.transmissionRenderTarget[Y.id] === void 0) {
53934
53934
  const oe = pe.has("EXT_color_buffer_half_float") || pe.has("EXT_color_buffer_float");
53935
- D.state.transmissionRenderTarget[Y.id] = new Zi(1, 1, {
53935
+ D.state.transmissionRenderTarget[Y.id] = new zi(1, 1, {
53936
53936
  generateMipmaps: !0,
53937
- type: oe ? bg : si,
53937
+ type: oe ? bg : ri,
53938
53938
  minFilter: bo,
53939
53939
  samples: Te.samples,
53940
53940
  stencilBuffer: o,
@@ -53948,7 +53948,7 @@ class yF {
53948
53948
  const pA = l.getRenderTarget(), bA = l.getActiveCubeFace(), TA = l.getActiveMipmapLevel();
53949
53949
  l.setRenderTarget(xA), l.getClearColor(DA), EA = l.getClearAlpha(), EA < 1 && l.setClearColor(16777215, 0.5), l.clear(), $A && hA.render(H);
53950
53950
  const YA = l.toneMapping;
53951
- l.toneMapping = Wi;
53951
+ l.toneMapping = Xi;
53952
53952
  const KA = Y.viewport;
53953
53953
  if (Y.viewport !== void 0 && (Y.viewport = void 0), D.setupLightsView(Y), GA === !0 && MA.setGlobalState(l.clippingPlanes, Y), Qa(_, H, Y), F.updateMultisampleRenderTarget(xA), F.updateRenderTargetMipmap(xA), pe.has("WEBGL_multisampled_render_to_texture") === !1) {
53954
53954
  let oe = !1;
@@ -53978,7 +53978,7 @@ class yF {
53978
53978
  L.isScene !== !0 && (L = Fe);
53979
53979
  const Y = f.get(_), K = D.state.lights, xA = D.state.shadowsArray, SA = K.state.version, pA = FA.getParameters(_, K.state, xA, L, H), bA = FA.getProgramCacheKey(pA);
53980
53980
  let TA = Y.programs;
53981
- Y.environment = _.isMeshStandardMaterial ? L.environment : null, Y.fog = L.fog, Y.envMap = (_.isMeshStandardMaterial ? gA : X).get(_.envMap || Y.environment), Y.envMapRotation = Y.environment !== null && _.envMap === null ? L.environmentRotation : _.envMapRotation, TA === void 0 && (_.addEventListener("dispose", vi), TA = /* @__PURE__ */ new Map(), Y.programs = TA);
53981
+ Y.environment = _.isMeshStandardMaterial ? L.environment : null, Y.fog = L.fog, Y.envMap = (_.isMeshStandardMaterial ? gA : X).get(_.envMap || Y.environment), Y.envMapRotation = Y.environment !== null && _.envMap === null ? L.environmentRotation : _.envMapRotation, TA === void 0 && (_.addEventListener("dispose", Ui), TA = /* @__PURE__ */ new Map(), Y.programs = TA);
53982
53982
  let YA = TA.get(bA);
53983
53983
  if (YA !== void 0) {
53984
53984
  if (Y.currentProgram === YA && Y.lightsStateVersion === SA)
@@ -54002,7 +54002,7 @@ class yF {
54002
54002
  function Of(_, L, H, Y, K) {
54003
54003
  L.isScene !== !0 && (L = Fe), F.resetTextureUnits();
54004
54004
  const xA = L.fog, SA = Y.isMeshStandardMaterial ? L.environment : null, pA = T === null ? l.outputColorSpace : T.isXRRenderTarget === !0 ? T.texture.colorSpace : Yn, bA = (Y.isMeshStandardMaterial ? gA : X).get(Y.envMap || SA), TA = Y.vertexColors === !0 && !!H.attributes.color && H.attributes.color.itemSize === 4, YA = !!H.attributes.tangent && (!!Y.normalMap || Y.anisotropy > 0), KA = !!H.morphAttributes.position, oe = !!H.morphAttributes.normal, Re = !!H.morphAttributes.color;
54005
- let ze = Wi;
54005
+ let ze = Xi;
54006
54006
  Y.toneMapped && (T === null || T.isXRRenderTarget === !0) && (ze = l.toneMapping);
54007
54007
  const $e = H.morphAttributes.position || H.morphAttributes.normal || H.morphAttributes.color, ve = $e !== void 0 ? $e.length : 0, JA = f.get(Y), _e = D.state.lights;
54008
54008
  if (GA === !0 && (le === !0 || _ !== W)) {
@@ -54199,7 +54199,7 @@ class yF {
54199
54199
  * @readonly
54200
54200
  */
54201
54201
  get coordinateSystem() {
54202
- return Vi;
54202
+ return Wi;
54203
54203
  }
54204
54204
  /**
54205
54205
  * Defines the output color space of the renderer.
@@ -54460,27 +54460,40 @@ float snoise(vec3 v) {
54460
54460
  return 42.0 * dot(m * m, vec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));
54461
54461
  }
54462
54462
 
54463
+ // 3-octave fBM for organic plasma
54464
+ float fbm(vec3 p) {
54465
+ float v = 0.0, a = 0.5;
54466
+ v += a * snoise(p); a *= 0.5; p *= 2.0;
54467
+ v += a * snoise(p); a *= 0.5; p *= 2.0;
54468
+ v += a * snoise(p);
54469
+ return v;
54470
+ }
54471
+
54463
54472
  void main() {
54464
- // View direction for fresnel
54465
54473
  vec3 viewDirection = normalize(cameraPosition - vPosition);
54466
-
54467
- // Fresnel effect - edge glow
54468
54474
  float fresnel = pow(1.0 - max(dot(viewDirection, vNormal), 0.0), uFresnelPower);
54475
+ float audioInfluence = uAudioBass * 0.4 + uAudioMid * 0.35 + uAudioTreble * 0.25;
54476
+
54477
+ // === DEEP PLASMA — domain-warped fBM ===
54478
+ vec3 warpedPos = vPosition + vec3(
54479
+ snoise(vPosition * 1.5 + uTime * 0.15),
54480
+ snoise(vPosition * 1.5 + vec3(5.2, 1.3, 2.8) + uTime * 0.12),
54481
+ snoise(vPosition * 1.5 + vec3(1.7, 9.2, 4.1) + uTime * 0.1)
54482
+ ) * 0.75;
54469
54483
 
54470
- // Dynamic color mixing based on audio - using multiple noise layers for smoke effect
54471
- float colorMix = snoise(vPosition * 2.0 + uTime * 0.5) * 0.5 + 0.5;
54484
+ // Original spot size frequencies with fBM depth
54485
+ float colorMix = fbm(warpedPos * 2.0 + uTime * 0.5) * 0.5 + 0.5;
54472
54486
  colorMix += vDisplacement * 2.0;
54473
54487
 
54474
- // Secondary noise layer for more complex smoke patterns
54475
- float smokeLayer = snoise(vPosition * 1.2 - uTime * 0.3) * 0.5 + 0.5;
54488
+ float smokeLayer = snoise(warpedPos * 1.2 - uTime * 0.3) * 0.5 + 0.5;
54476
54489
  colorMix = colorMix * 0.6 + smokeLayer * 0.4;
54477
54490
 
54478
- // Apply contrast to make smoke patterns more visible
54479
- colorMix = (colorMix - 0.5) * uColorContrast + 0.5;
54480
- colorMix = clamp(colorMix, 0.0, 1.0);
54491
+ // Deep slow layer for volumetric depth
54492
+ float deepLayer = snoise(vPosition * 0.7 + uTime * 0.08) * 0.5 + 0.5;
54493
+ colorMix = colorMix * 0.8 + deepLayer * 0.2;
54481
54494
 
54482
- // Audio-reactive color shifts
54483
- float audioInfluence = uAudioBass * 0.4 + uAudioMid * 0.35 + uAudioTreble * 0.25;
54495
+ colorMix = (colorMix - 0.5) * (uColorContrast * 1.5) + 0.5;
54496
+ colorMix = clamp(colorMix, 0.0, 1.0);
54484
54497
 
54485
54498
  // 4-color gradient for volumetric smoke effect:
54486
54499
  // depth (0.0) -> primary (0.33) -> secondary (0.66) -> highlight (1.0)
@@ -54502,18 +54515,19 @@ void main() {
54502
54515
  // Add accent color based on audio peaks
54503
54516
  gradientColor = mix(gradientColor, uColorAccent, audioInfluence * 0.5);
54504
54517
 
54505
- // Iridescent effect
54518
+ // Iridescent effect (scaled by brightness to avoid color artifacts on dark themes)
54506
54519
  float iridescence = snoise(vPosition * 3.0 + uTime * 0.3) * 0.15;
54507
54520
  vec3 iridescentShift = vec3(
54508
54521
  sin(iridescence * 6.28 + 0.0) * 0.1,
54509
54522
  sin(iridescence * 6.28 + 2.09) * 0.1,
54510
54523
  sin(iridescence * 6.28 + 4.18) * 0.1
54511
54524
  );
54512
- gradientColor += iridescentShift * (0.5 + audioInfluence);
54525
+ float baseBrightness = dot(gradientColor, vec3(0.299, 0.587, 0.114));
54526
+ gradientColor += iridescentShift * (0.5 + audioInfluence) * clamp(baseBrightness * 3.0, 0.0, 1.0);
54513
54527
 
54514
- // Inner glow effect
54515
- float innerGlow = pow(1.0 - fresnel, 3.0) * 0.3;
54516
- vec3 glowColor = uColorAccent * innerGlow * (1.0 + uAudioLevel * 2.0);
54528
+ // Inner glow — core radiates like a sun
54529
+ float innerGlow = pow(1.0 - fresnel, 2.5) * 0.5;
54530
+ vec3 glowColor = mix(uColorAccent, uColorHighlight, 0.3) * innerGlow * (1.0 + uAudioLevel * 2.5);
54517
54531
 
54518
54532
  // Edge glow (fresnel)
54519
54533
  vec3 edgeGlow = mix(uColorSecondary, uColorAccent, audioInfluence) * fresnel * uGlowIntensity;
@@ -54523,9 +54537,9 @@ void main() {
54523
54537
  pulse *= uAudioMid;
54524
54538
  vec3 pulseHighlight = uColorAccent * pulse * 0.2;
54525
54539
 
54526
- // Subsurface scattering simulation
54527
- float sss = pow(max(dot(viewDirection, -vNormal), 0.0), 2.0) * 0.15;
54528
- vec3 sssColor = uColorPrimary * sss * (1.0 + uAudioBass);
54540
+ // Subsurface scattering — light bleeding through from inside
54541
+ float sss = pow(max(dot(viewDirection, -vNormal), 0.0), 1.5) * 0.25;
54542
+ vec3 sssColor = mix(uColorPrimary, uColorHighlight, 0.4) * sss * (1.0 + uAudioBass * 1.5);
54529
54543
 
54530
54544
  // Combine all effects
54531
54545
  vec3 finalColor = gradientColor + edgeGlow + glowColor + pulseHighlight + sssColor;
@@ -54672,7 +54686,7 @@ class QC {
54672
54686
  const t = /iPhone|iPad|iPod/i.test(navigator.userAgent), g = /Android/i.test(navigator.userAgent);
54673
54687
  this.canvasPadding = t ? 1.5 : g ? 2 : 3, this.boundHandleContextLost = this.handleContextLost.bind(this), this.boundHandleContextRestored = this.handleContextRestored.bind(this), this.scene = new DR();
54674
54688
  const o = A.clientWidth * this.canvasPadding, n = A.clientHeight * this.canvasPadding, I = o / n;
54675
- this.camera = new ai(45, I, 0.1, 100);
54689
+ this.camera = new Ci(45, I, 0.1, 100);
54676
54690
  const a = 3, s = 9;
54677
54691
  this.camera.position.z = s * (this.canvasPadding / a), this.renderer = new yF({
54678
54692
  antialias: !0,
@@ -54705,7 +54719,7 @@ class QC {
54705
54719
  this.config.size,
54706
54720
  this.config.segments / 4
54707
54721
  );
54708
- this.orbMaterial = new Qi({
54722
+ this.orbMaterial = new Ei({
54709
54723
  vertexShader: SF,
54710
54724
  fragmentShader: RF,
54711
54725
  uniforms: {
@@ -54729,7 +54743,7 @@ class QC {
54729
54743
  },
54730
54744
  transparent: !0,
54731
54745
  side: Rg
54732
- }), this.orb = new Gi(e, this.orbMaterial), this.scene.add(this.orb);
54746
+ }), this.orb = new vi(e, this.orbMaterial), this.scene.add(this.orb);
54733
54747
  const t = new HE(
54734
54748
  this.config.size,
54735
54749
  64,
@@ -54737,7 +54751,7 @@ class QC {
54737
54751
  64
54738
54752
  // height segments
54739
54753
  );
54740
- this.glowMaterial = new Qi({
54754
+ this.glowMaterial = new Ei({
54741
54755
  vertexShader: bF,
54742
54756
  fragmentShader: NF,
54743
54757
  uniforms: {
@@ -54751,7 +54765,7 @@ class QC {
54751
54765
  side: Gt,
54752
54766
  blending: OQ,
54753
54767
  depthWrite: !1
54754
- }), this.glowMesh = new Gi(t, this.glowMaterial), this.scene.add(this.glowMesh);
54768
+ }), this.glowMesh = new vi(t, this.glowMaterial), this.scene.add(this.glowMesh);
54755
54769
  }
54756
54770
  /**
54757
54771
  * Update audio data with smoothing
@@ -55237,7 +55251,7 @@ class EC {
55237
55251
  this.hasAcquired && (Mn.release(), this.hasAcquired = !1);
55238
55252
  }
55239
55253
  }
55240
- const Qg = {
55254
+ const oi = {
55241
55255
  default: {
55242
55256
  primary: "#6366f1",
55243
55257
  secondary: "#8b5cf6",
@@ -55314,8 +55328,41 @@ const Qg = {
55314
55328
  // Very dark blue
55315
55329
  highlight: "#dbeafe"
55316
55330
  // Light blue
55331
+ },
55332
+ white: {
55333
+ primary: "#d1d5db",
55334
+ secondary: "#e5e7eb",
55335
+ accent: "#f3f4f6",
55336
+ glow: "#e5e7eb",
55337
+ atmosphere: "#f9fafb",
55338
+ depth: "#4b5563",
55339
+ // Gray shadow
55340
+ highlight: "#ffffff"
55341
+ // Pure white
55342
+ },
55343
+ black: {
55344
+ primary: "#18182b",
55345
+ secondary: "#242440",
55346
+ accent: "#35355a",
55347
+ glow: "#242440",
55348
+ atmosphere: "#4a4a70",
55349
+ depth: "#08080f",
55350
+ // Almost black
55351
+ highlight: "#7070a0"
55352
+ // Muted cool gray
55353
+ },
55354
+ orange: {
55355
+ primary: "#f97316",
55356
+ secondary: "#fb923c",
55357
+ accent: "#fdba74",
55358
+ glow: "#fb923c",
55359
+ atmosphere: "#fed7aa",
55360
+ depth: "#7c2d12",
55361
+ // Very dark orange
55362
+ highlight: "#ffedd5"
55363
+ // Light orange
55317
55364
  }
55318
- }, Bg = {
55365
+ }, ni = {
55319
55366
  indigo: {
55320
55367
  primary: "#3730a3",
55321
55368
  secondary: "#4338ca",
@@ -55381,96 +55428,165 @@ const Qg = {
55381
55428
  // Very dark pink
55382
55429
  highlight: "#f9a8d4"
55383
55430
  // Light pink
55431
+ },
55432
+ silver: {
55433
+ primary: "#6b7280",
55434
+ secondary: "#9ca3af",
55435
+ accent: "#d1d5db",
55436
+ glow: "#e5e7eb",
55437
+ atmosphere: "#f3f4f6",
55438
+ depth: "#374151",
55439
+ // Dark gray
55440
+ highlight: "#f9fafb"
55441
+ // Near white
55442
+ },
55443
+ charcoal: {
55444
+ primary: "#0f0f1a",
55445
+ secondary: "#1a1a2e",
55446
+ accent: "#2a2a45",
55447
+ glow: "#0f0f1a",
55448
+ atmosphere: "#1a1a2e",
55449
+ depth: "#050509",
55450
+ // Almost pure black
55451
+ highlight: "#50507a"
55452
+ // Dark cool gray
55453
+ },
55454
+ deepOrange: {
55455
+ primary: "#9a3412",
55456
+ secondary: "#c2410c",
55457
+ accent: "#ea580c",
55458
+ glow: "#9a3412",
55459
+ atmosphere: "#c2410c",
55460
+ depth: "#431407",
55461
+ // Very dark brown-orange
55462
+ highlight: "#fdba74"
55463
+ // Light orange
55384
55464
  }
55385
55465
  };
55386
55466
  function av(i, A = "dark") {
55387
- const e = A === "dark" ? Qg : Bg;
55467
+ const e = A === "dark" ? oi : ni;
55388
55468
  return e[i] || e[Object.keys(e)[0]];
55389
55469
  }
55390
55470
  function sv(i = "dark") {
55391
- return Object.keys(i === "dark" ? Qg : Bg);
55471
+ return Object.keys(i === "dark" ? oi : ni);
55392
55472
  }
55393
55473
  const XI = {
55394
55474
  default: {
55395
55475
  dark: {
55396
- colors: Qg.default,
55476
+ colors: oi.default,
55397
55477
  glowIntensity: 1.2,
55398
55478
  idleGlowMultiplier: 0.6
55399
55479
  },
55400
55480
  light: {
55401
- colors: Bg.indigo,
55481
+ colors: ni.indigo,
55402
55482
  glowIntensity: 1.8,
55403
55483
  idleGlowMultiplier: 1.2
55404
55484
  }
55405
55485
  },
55406
55486
  emerald: {
55407
55487
  dark: {
55408
- colors: Qg.emerald,
55488
+ colors: oi.emerald,
55409
55489
  glowIntensity: 1.2,
55410
55490
  idleGlowMultiplier: 0.6
55411
55491
  },
55412
55492
  light: {
55413
- colors: Bg.teal,
55493
+ colors: ni.teal,
55414
55494
  glowIntensity: 1.8,
55415
55495
  idleGlowMultiplier: 1.2
55416
55496
  }
55417
55497
  },
55418
55498
  rose: {
55419
55499
  dark: {
55420
- colors: Qg.rose,
55500
+ colors: oi.rose,
55421
55501
  glowIntensity: 1.2,
55422
55502
  idleGlowMultiplier: 0.6
55423
55503
  },
55424
55504
  light: {
55425
- colors: Bg.pink,
55505
+ colors: ni.pink,
55426
55506
  glowIntensity: 1.8,
55427
55507
  idleGlowMultiplier: 1.2
55428
55508
  }
55429
55509
  },
55430
55510
  amber: {
55431
55511
  dark: {
55432
- colors: Qg.amber,
55512
+ colors: oi.amber,
55433
55513
  glowIntensity: 1.2,
55434
55514
  idleGlowMultiplier: 0.6
55435
55515
  },
55436
55516
  light: {
55437
- colors: Bg.orange,
55517
+ colors: ni.orange,
55438
55518
  glowIntensity: 1.8,
55439
55519
  idleGlowMultiplier: 1.2
55440
55520
  }
55441
55521
  },
55442
55522
  cyan: {
55443
55523
  dark: {
55444
- colors: Qg.cyan,
55524
+ colors: oi.cyan,
55445
55525
  glowIntensity: 1.2,
55446
55526
  idleGlowMultiplier: 0.6
55447
55527
  },
55448
55528
  light: {
55449
- colors: Bg.blue,
55529
+ colors: ni.blue,
55450
55530
  glowIntensity: 1.8,
55451
55531
  idleGlowMultiplier: 1.2
55452
55532
  }
55453
55533
  },
55454
55534
  purple: {
55455
55535
  dark: {
55456
- colors: Qg.purple,
55536
+ colors: oi.purple,
55457
55537
  glowIntensity: 1.2,
55458
55538
  idleGlowMultiplier: 0.6
55459
55539
  },
55460
55540
  light: {
55461
- colors: Bg.violet,
55541
+ colors: ni.violet,
55462
55542
  glowIntensity: 1.8,
55463
55543
  idleGlowMultiplier: 1.2
55464
55544
  }
55465
55545
  },
55466
55546
  blue: {
55467
55547
  dark: {
55468
- colors: Qg.blue,
55548
+ colors: oi.blue,
55549
+ glowIntensity: 1.2,
55550
+ idleGlowMultiplier: 0.6
55551
+ },
55552
+ light: {
55553
+ colors: ni.blue,
55554
+ glowIntensity: 1.8,
55555
+ idleGlowMultiplier: 1.2
55556
+ }
55557
+ },
55558
+ white: {
55559
+ dark: {
55560
+ colors: oi.white,
55561
+ glowIntensity: 1.2,
55562
+ idleGlowMultiplier: 0.6
55563
+ },
55564
+ light: {
55565
+ colors: ni.silver,
55566
+ glowIntensity: 1.8,
55567
+ idleGlowMultiplier: 1.2
55568
+ }
55569
+ },
55570
+ black: {
55571
+ dark: {
55572
+ colors: oi.black,
55573
+ glowIntensity: 1.2,
55574
+ idleGlowMultiplier: 0.6
55575
+ },
55576
+ light: {
55577
+ colors: ni.charcoal,
55578
+ glowIntensity: 1.8,
55579
+ idleGlowMultiplier: 1.2
55580
+ }
55581
+ },
55582
+ orange: {
55583
+ dark: {
55584
+ colors: oi.orange,
55469
55585
  glowIntensity: 1.2,
55470
55586
  idleGlowMultiplier: 0.6
55471
55587
  },
55472
55588
  light: {
55473
- colors: Bg.blue,
55589
+ colors: ni.deepOrange,
55474
55590
  glowIntensity: 1.8,
55475
55591
  idleGlowMultiplier: 1.2
55476
55592
  }
@@ -56307,7 +56423,7 @@ let te = class extends wg {
56307
56423
 
56308
56424
  <div class="container" part="container">
56309
56425
  <div class="brand">
56310
- Powered by <a class="brand_link" href="https://hanc.ai" target="_blank">Hanc.ai</a>
56426
+ Powered by <a class="brand_link" href="https://hanc.ai" target="_blank">HANC.ai</a>
56311
56427
  </div>
56312
56428
  <div
56313
56429
  class="orb-container"
@@ -56919,7 +57035,7 @@ let ie = class extends wg {
56919
57035
 
56920
57036
  <div class="container" part="container">
56921
57037
  <div class="brand">
56922
- Powered by <a class="brand_link" href="https://hanc.ai" target="_blank">Hanc.ai</a>
57038
+ Powered by <a class="brand_link" href="https://hanc.ai" target="_blank">HANC.ai</a>
56923
57039
  </div>
56924
57040
  <div
56925
57041
  class="orb-container"
@@ -57483,7 +57599,7 @@ let ge = class extends wg {
57483
57599
  ?disabled=${this.callStatus === "connecting"}
57484
57600
  >
57485
57601
  <div class="brand" @click=${(t) => t.stopPropagation()}>
57486
- Powered by <a target="_blank" href="https://hanc.ai" class="brand_link">Hanc.ai</a>
57602
+ Powered by <a target="_blank" href="https://hanc.ai" class="brand_link">HANC.ai</a>
57487
57603
  </div>
57488
57604
  <div
57489
57605
  class="orb-container"
@@ -58023,7 +58139,7 @@ let zA = class extends wg {
58023
58139
 
58024
58140
  <div class="floating-container" part="floating-container">
58025
58141
  <div class="brand" @click=${(g) => g.stopPropagation()}>
58026
- Powered by <a target="_blank" href="https://hanc.ai" class="brand_link">Hanc.ai</a>
58142
+ Powered by <a target="_blank" href="https://hanc.ai" class="brand_link">HANC.ai</a>
58027
58143
  </div>
58028
58144
  <button
58029
58145
  part="pill-button"
@@ -58207,7 +58323,7 @@ export {
58207
58323
  EC as SoundManager,
58208
58324
  FF as applyTheme,
58209
58325
  Ev as clearConfigCache,
58210
- Qg as darkPresets,
58326
+ oi as darkPresets,
58211
58327
  Cv as darkThemes,
58212
58328
  GF as detectSystemTheme,
58213
58329
  xC as fetchWidgetConfig,
@@ -58216,7 +58332,7 @@ export {
58216
58332
  sa as getTheme,
58217
58333
  Qv as getThemeNames,
58218
58334
  uC as isDomainAllowed,
58219
- Bg as lightPresets,
58335
+ ni as lightPresets,
58220
58336
  rv as lightThemes,
58221
58337
  XI as themes,
58222
58338
  Bv as watchSystemTheme