@cloudflare/realtimekit 1.2.4-staging.2 → 1.2.4-staging.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.
package/dist/index.es.js CHANGED
@@ -44,11 +44,11 @@ var u = (s, t, e) => new Promise((r, i) => {
44
44
  }, c = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(a, o);
45
45
  c((e = e.apply(s, t)).next());
46
46
  });
47
- import { v4 as on, validate as zg } from "uuid";
47
+ import { v4 as an, validate as zg } from "uuid";
48
48
  import Yg from "bowser";
49
49
  import { MessageType as T, PbLong as no, typeofJsonValue as aS } from "@protobuf-ts/runtime";
50
50
  import * as nd from "worker-timers";
51
- import * as hs from "sdp-transform";
51
+ import * as ps from "sdp-transform";
52
52
  function oS(s) {
53
53
  const { length: t } = this, e = s >= 0 ? s : t + s;
54
54
  return e < 0 || e >= t ? void 0 : this[e];
@@ -571,10 +571,10 @@ var lt = {}, vS = {
571
571
  set exports(s) {
572
572
  lt = s;
573
573
  }
574
- }, An = typeof Reflect == "object" ? Reflect : null, sp = An && typeof An.apply == "function" ? An.apply : function(t, e, r) {
574
+ }, In = typeof Reflect == "object" ? Reflect : null, sp = In && typeof In.apply == "function" ? In.apply : function(t, e, r) {
575
575
  return Function.prototype.apply.call(t, e, r);
576
576
  }, ad;
577
- An && typeof An.ownKeys == "function" ? ad = An.ownKeys : Object.getOwnPropertySymbols ? ad = function(t) {
577
+ In && typeof In.ownKeys == "function" ? ad = In.ownKeys : Object.getOwnPropertySymbols ? ad = function(t) {
578
578
  return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
579
579
  } : ad = function(t) {
580
580
  return Object.getOwnPropertyNames(t);
@@ -1519,7 +1519,7 @@ class wm extends lt {
1519
1519
  }) || e[e.length - 1];
1520
1520
  }
1521
1521
  parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
1522
- var _, C, w, L, F, N, B, G, re, tt, ds, ri, ls;
1522
+ var _, C, w, L, F, N, B, G, re, tt, ls, ri, us;
1523
1523
  const c = e, d = new Cm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
1524
1524
  for (const A of c.values()) {
1525
1525
  if (l) {
@@ -1623,8 +1623,8 @@ class wm extends lt {
1623
1623
  d.staleProducerStreamMap = !0;
1624
1624
  break;
1625
1625
  }
1626
- const xe = this.callStatsInstance.producers.get(R);
1627
- if (((_ = xe == null ? void 0 : xe.track) == null ? void 0 : _.readyState) === "ended")
1626
+ const Ue = this.callStatsInstance.producers.get(R);
1627
+ if (((_ = Ue == null ? void 0 : Ue.track) == null ? void 0 : _.readyState) === "ended")
1628
1628
  break;
1629
1629
  d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
1630
1630
  outboundVideoRtpId: [],
@@ -1642,7 +1642,7 @@ class wm extends lt {
1642
1642
  totalPacketSendDelay: y.totalPacketSendDelay || 0
1643
1643
  };
1644
1644
  if (y.mediaType === "video" || y.kind === "video") {
1645
- const I = y, Ue = D({
1645
+ const I = y, $e = D({
1646
1646
  frameHeight: I.frameHeight,
1647
1647
  frameWidth: I.frameWidth,
1648
1648
  framesEncoded: I.framesEncoded,
@@ -1667,13 +1667,13 @@ class wm extends lt {
1667
1667
  scalabilityMode: I.scalabilityMode,
1668
1668
  powerEfficientEncoder: I.powerEfficientEncoder
1669
1669
  }, V);
1670
- d.outboundVideoRtp.set(A.id, Ue), d.producerStreamMap.get(R).outboundVideoRtpId.push(A.id), this.processOutboundProducerVideoStats(R, fe, Ue);
1670
+ d.outboundVideoRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundVideoRtpId.push(A.id), this.processOutboundProducerVideoStats(R, fe, $e);
1671
1671
  } else if (y.mediaType === "audio" || y.kind === "audio") {
1672
- const I = y, Ue = D({
1672
+ const I = y, $e = D({
1673
1673
  retransmittedBytesSent: I.retransmittedBytesSent,
1674
1674
  retransmittedPacketsSent: I.retransmittedPacketsSent
1675
1675
  }, V);
1676
- d.outboundAudioRtp.set(A.id, Ue), d.producerStreamMap.get(R).outboundAudioRtpId.push(A.id), this.processOutboundProducerAudioStats(R, fe, Ue);
1676
+ d.outboundAudioRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundAudioRtpId.push(A.id), this.processOutboundProducerAudioStats(R, fe, $e);
1677
1677
  }
1678
1678
  } else
1679
1679
  this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
@@ -1706,7 +1706,7 @@ class wm extends lt {
1706
1706
  inboundVideoRtpId: [],
1707
1707
  inboundAudioRtpId: []
1708
1708
  });
1709
- const xe = {
1709
+ const Ue = {
1710
1710
  bytesReceived: y.bytesReceived,
1711
1711
  packetsReceived: y.packetsReceived,
1712
1712
  packetsLost: y.packetsLost >= 0 ? y.packetsLost : 0,
@@ -1746,7 +1746,7 @@ class wm extends lt {
1746
1746
  freezeCount: V.freezeCount || 0,
1747
1747
  pauseCount: V.pauseCount || 0,
1748
1748
  powerEfficientDecoder: V.powerEfficientDecoder
1749
- }, xe);
1749
+ }, Ue);
1750
1750
  I.score = Pm({
1751
1751
  frameWidth: I.frameWidth || 0,
1752
1752
  framesDecoded: (I.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
@@ -1783,7 +1783,7 @@ class wm extends lt {
1783
1783
  removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
1784
1784
  silentConcealedSamples: V.silentConcealedSamples || 0,
1785
1785
  playoutId: V.playoutId
1786
- }, xe);
1786
+ }, Ue);
1787
1787
  I.score = Em({
1788
1788
  concealmentEvents: (I.concealmentEvents || 0) - (((G = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : G.concealmentEvents) || 0),
1789
1789
  packetsLost: (I.packetsLost || 0) - (((re = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : re.packetsLost) || 0),
@@ -1792,12 +1792,12 @@ class wm extends lt {
1792
1792
  }), P.set(R, {
1793
1793
  score: +(I.score * 10).toFixed(),
1794
1794
  packetsLostPercentage: Pd({
1795
- packetsLost: (I.packetsLost || 0) - (((ds = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ds.packetsLost) || 0),
1795
+ packetsLost: (I.packetsLost || 0) - (((ls = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ls.packetsLost) || 0),
1796
1796
  packetsReceived: (I.packetsReceived || 0) - (((ri = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ri.packetsReceived) || 0)
1797
1797
  }),
1798
1798
  jitter: I.jitter || 0,
1799
1799
  isScreenShare: this.screenShareConsumers.has(R),
1800
- bitrate: ((I.bytesReceived || 0) - (((ls = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ls.bytesReceived) || 0)) * 8 / 7
1800
+ bitrate: ((I.bytesReceived || 0) - (((us = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : us.bytesReceived) || 0)) * 8 / 7
1801
1801
  // Bytes received in last 7 seconds
1802
1802
  }), this.audioConsumerToStatsMap.set(R, I), d.inboundAudioRtp.set(A.id, I), d.consumerStreamMap.get(R).inboundAudioRtpId.push(A.id), this.processInboundConsumerAudioStats(R, fe, I);
1803
1803
  }
@@ -1808,7 +1808,7 @@ class wm extends lt {
1808
1808
  }
1809
1809
  }
1810
1810
  if (d.producerStreamMap.forEach((A, y) => {
1811
- var R, x, fe, xe, V, I, Ue, Cr, qs, ja, Ga, Wa, Ja, Ka, za, Ya, Qa, Xa, Za, eo, to, so, ro;
1811
+ var R, x, fe, Ue, V, I, $e, Cr, qs, ja, Ga, Wa, Ja, Ka, za, Ya, Qa, Xa, Za, eo, to, so, ro;
1812
1812
  if (A.outboundVideoRtpId.length > 0) {
1813
1813
  const le = [];
1814
1814
  A.outboundVideoRtpId.forEach((Zl) => {
@@ -1821,14 +1821,14 @@ class wm extends lt {
1821
1821
  jitter: ((R = se.remoteData) == null ? void 0 : R.jitter) || 0,
1822
1822
  isScreenShare: this.screenShareProducers.has(y),
1823
1823
  packetsSent: (se.packetsSent || 0) - (((x = this.videoProducerToStatsMap.get(y)) == null ? void 0 : x.packetsSent) || 0),
1824
- packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (xe = this.videoProducerToStatsMap.get(y)) == null ? void 0 : xe.remoteData) == null ? void 0 : V.packetsLost) || 0),
1824
+ packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (Ue = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Ue.remoteData) == null ? void 0 : V.packetsLost) || 0),
1825
1825
  framesEncoded: (se.framesEncoded || 0) - (((I = this.videoProducerToStatsMap.get(y)) == null ? void 0 : I.framesEncoded) || 0)
1826
1826
  }), S.set(y, {
1827
1827
  score: +(se.score * 10).toFixed(),
1828
1828
  frameWidth: se.frameWidth || 0,
1829
1829
  frameHeight: se.frameHeight || 0,
1830
1830
  framesPerSecond: se.framesPerSecond || 0,
1831
- jitter: ((Ue = se.remoteData) == null ? void 0 : Ue.jitter) || 0,
1831
+ jitter: (($e = se.remoteData) == null ? void 0 : $e.jitter) || 0,
1832
1832
  isScreenShare: this.screenShareProducers.has(y),
1833
1833
  packetsLostPercentage: Ed({
1834
1834
  packetsSent: (se.packetsSent || 0) - (((Cr = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Cr.packetsSent) || 0),
@@ -2170,7 +2170,7 @@ class Rm extends wm {
2170
2170
  };
2171
2171
  }
2172
2172
  parseRTCReport(e, r = [], i = !1, a = void 0, o = void 0) {
2173
- var _, C, w, L, F, N, B, G, re, tt, ds, ri, ls;
2173
+ var _, C, w, L, F, N, B, G, re, tt, ls, ri, us;
2174
2174
  const c = e, d = new Cm(), l = r.length ? new Set(r) : void 0, p = [], g = [], v = [], S = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map();
2175
2175
  for (const A of c.values()) {
2176
2176
  if (l) {
@@ -2272,8 +2272,8 @@ class Rm extends wm {
2272
2272
  d.staleProducerStreamMap = !0;
2273
2273
  break;
2274
2274
  }
2275
- const xe = this.callStatsInstance.producers.get(R);
2276
- if (((_ = xe == null ? void 0 : xe.track) == null ? void 0 : _.readyState) === "ended")
2275
+ const Ue = this.callStatsInstance.producers.get(R);
2276
+ if (((_ = Ue == null ? void 0 : Ue.track) == null ? void 0 : _.readyState) === "ended")
2277
2277
  break;
2278
2278
  d.producerStreamMap.has(R) || d.producerStreamMap.set(R, {
2279
2279
  outboundVideoRtpId: [],
@@ -2291,7 +2291,7 @@ class Rm extends wm {
2291
2291
  totalPacketSendDelay: y.totalPacketSendDelay || 0
2292
2292
  };
2293
2293
  if (y.mediaType === "video" || y.kind === "video") {
2294
- const I = y, Ue = D({
2294
+ const I = y, $e = D({
2295
2295
  frameHeight: I.frameHeight,
2296
2296
  frameWidth: I.frameWidth,
2297
2297
  framesEncoded: I.framesEncoded,
@@ -2314,13 +2314,13 @@ class Rm extends wm {
2314
2314
  scalabilityMode: I.scalabilityMode,
2315
2315
  powerEfficientEncoder: I.powerEfficientEncoder
2316
2316
  }, V);
2317
- d.outboundVideoRtp.set(A.id, Ue), d.producerStreamMap.get(R).outboundVideoRtpId.push(A.id), this.processOutboundProducerVideoStats(R, fe, Ue);
2317
+ d.outboundVideoRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundVideoRtpId.push(A.id), this.processOutboundProducerVideoStats(R, fe, $e);
2318
2318
  } else if (y.mediaType === "audio" || y.kind === "audio") {
2319
- const I = y, Ue = D({
2319
+ const I = y, $e = D({
2320
2320
  retransmittedBytesSent: I.retransmittedBytesSent,
2321
2321
  retransmittedPacketsSent: I.retransmittedPacketsSent
2322
2322
  }, V);
2323
- d.outboundAudioRtp.set(A.id, Ue), d.producerStreamMap.get(R).outboundAudioRtpId.push(A.id), this.processOutboundProducerAudioStats(R, fe, Ue);
2323
+ d.outboundAudioRtp.set(A.id, $e), d.producerStreamMap.get(R).outboundAudioRtpId.push(A.id), this.processOutboundProducerAudioStats(R, fe, $e);
2324
2324
  }
2325
2325
  } else
2326
2326
  this.callStatsInstance.logger.error(`Callstats: Unknown Outbound-rtp. mediatype: ${y.mediaType} kind: ${y.kind}`);
@@ -2353,7 +2353,7 @@ class Rm extends wm {
2353
2353
  inboundVideoRtpId: [],
2354
2354
  inboundAudioRtpId: []
2355
2355
  });
2356
- const xe = {
2356
+ const Ue = {
2357
2357
  bytesReceived: y.bytesReceived,
2358
2358
  packetsReceived: y.packetsReceived,
2359
2359
  packetsLost: y.packetsLost >= 0 ? y.packetsLost : 0,
@@ -2393,7 +2393,7 @@ class Rm extends wm {
2393
2393
  freezeCount: V.freezeCount || 0,
2394
2394
  pauseCount: V.pauseCount || 0,
2395
2395
  powerEfficientDecoder: V.powerEfficientDecoder
2396
- }, xe);
2396
+ }, Ue);
2397
2397
  I.score = Pm({
2398
2398
  frameWidth: I.frameWidth || 0,
2399
2399
  framesDecoded: (I.framesDecoded || 0) - (((C = this.videoConsumerToStatsMap.get(R)) == null ? void 0 : C.framesDecoded) || 0),
@@ -2430,7 +2430,7 @@ class Rm extends wm {
2430
2430
  removedSamplesForAcceleration: V.removedSamplesForAcceleration || 0,
2431
2431
  silentConcealedSamples: V.silentConcealedSamples || 0,
2432
2432
  playoutId: V.playoutId
2433
- }, xe);
2433
+ }, Ue);
2434
2434
  I.score = Em({
2435
2435
  concealmentEvents: (I.concealmentEvents || 0) - (((G = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : G.concealmentEvents) || 0),
2436
2436
  packetsLost: (I.packetsLost || 0) - (((re = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : re.packetsLost) || 0),
@@ -2439,12 +2439,12 @@ class Rm extends wm {
2439
2439
  }), P.set(R, {
2440
2440
  score: +(I.score * 10).toFixed(),
2441
2441
  packetsLostPercentage: Pd({
2442
- packetsLost: (I.packetsLost || 0) - (((ds = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ds.packetsLost) || 0),
2442
+ packetsLost: (I.packetsLost || 0) - (((ls = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ls.packetsLost) || 0),
2443
2443
  packetsReceived: (I.packetsReceived || 0) - (((ri = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ri.packetsReceived) || 0)
2444
2444
  }),
2445
2445
  jitter: I.jitter || 0,
2446
2446
  isScreenShare: this.screenShareConsumers.has(R),
2447
- bitrate: ((I.bytesReceived || 0) - (((ls = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : ls.bytesReceived) || 0)) * 8 / 7
2447
+ bitrate: ((I.bytesReceived || 0) - (((us = this.audioConsumerToStatsMap.get(R)) == null ? void 0 : us.bytesReceived) || 0)) * 8 / 7
2448
2448
  // Bytes received in last 7 seconds
2449
2449
  }), this.audioConsumerToStatsMap.set(R, I), d.inboundAudioRtp.set(A.id, I), d.consumerStreamMap.get(R).inboundAudioRtpId.push(A.id), this.processInboundConsumerAudioStats(R, fe, I);
2450
2450
  }
@@ -2455,7 +2455,7 @@ class Rm extends wm {
2455
2455
  }
2456
2456
  }
2457
2457
  if (d.producerStreamMap.forEach((A, y) => {
2458
- var R, x, fe, xe, V, I, Ue, Cr, qs, ja, Ga, Wa, Ja, Ka, za, Ya, Qa, Xa, Za, eo, to, so, ro;
2458
+ var R, x, fe, Ue, V, I, $e, Cr, qs, ja, Ga, Wa, Ja, Ka, za, Ya, Qa, Xa, Za, eo, to, so, ro;
2459
2459
  if (A.outboundVideoRtpId.length > 0) {
2460
2460
  const le = [];
2461
2461
  A.outboundVideoRtpId.forEach((Zl) => {
@@ -2468,14 +2468,14 @@ class Rm extends wm {
2468
2468
  jitter: ((R = se.remoteData) == null ? void 0 : R.jitter) || 0,
2469
2469
  isScreenShare: this.screenShareProducers.has(y),
2470
2470
  packetsSent: (se.packetsSent || 0) - (((x = this.videoProducerToStatsMap.get(y)) == null ? void 0 : x.packetsSent) || 0),
2471
- packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (xe = this.videoProducerToStatsMap.get(y)) == null ? void 0 : xe.remoteData) == null ? void 0 : V.packetsLost) || 0),
2471
+ packetsLost: (((fe = se.remoteData) == null ? void 0 : fe.packetsLost) || 0) - (((V = (Ue = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Ue.remoteData) == null ? void 0 : V.packetsLost) || 0),
2472
2472
  framesEncoded: (se.framesEncoded || 0) - (((I = this.videoProducerToStatsMap.get(y)) == null ? void 0 : I.framesEncoded) || 0)
2473
2473
  }), S.set(y, {
2474
2474
  score: +(se.score * 10).toFixed(),
2475
2475
  frameWidth: se.frameWidth || 0,
2476
2476
  frameHeight: se.frameHeight || 0,
2477
2477
  framesPerSecond: se.framesPerSecond || 0,
2478
- jitter: ((Ue = se.remoteData) == null ? void 0 : Ue.jitter) || 0,
2478
+ jitter: (($e = se.remoteData) == null ? void 0 : $e.jitter) || 0,
2479
2479
  isScreenShare: this.screenShareProducers.has(y),
2480
2480
  packetsLostPercentage: Ed({
2481
2481
  packetsSent: (se.packetsSent || 0) - (((Cr = this.videoProducerToStatsMap.get(y)) == null ? void 0 : Cr.packetsSent) || 0),
@@ -3641,18 +3641,18 @@ function uT(s) {
3641
3641
  return lT.call(s);
3642
3642
  }
3643
3643
  var hT = "[object Null]", pT = "[object Undefined]", dp = Bs ? Bs.toStringTag : void 0;
3644
- function un(s) {
3644
+ function ln(s) {
3645
3645
  return s == null ? s === void 0 ? pT : hT : dp && dp in Object(s) ? cT(s) : uT(s);
3646
3646
  }
3647
- function as(s) {
3647
+ function os(s) {
3648
3648
  var t = typeof s;
3649
3649
  return s != null && (t == "object" || t == "function");
3650
3650
  }
3651
3651
  var gT = "[object AsyncFunction]", mT = "[object Function]", fT = "[object GeneratorFunction]", vT = "[object Proxy]";
3652
3652
  function mh(s) {
3653
- if (!as(s))
3653
+ if (!os(s))
3654
3654
  return !1;
3655
- var t = un(s);
3655
+ var t = ln(s);
3656
3656
  return t == mT || t == fT || t == gT || t == vT;
3657
3657
  }
3658
3658
  var ST = ks["__core-js_shared__"];
@@ -3665,7 +3665,7 @@ function TT(s) {
3665
3665
  return !!lp && lp in s;
3666
3666
  }
3667
3667
  var yT = Function.prototype, ET = yT.toString;
3668
- function hn(s) {
3668
+ function un(s) {
3669
3669
  if (s != null) {
3670
3670
  try {
3671
3671
  return ET.call(s);
@@ -3682,21 +3682,21 @@ var PT = /[\\^$.*+?()[\]{}|]/g, _T = /^\[object .+?Constructor\]$/, CT = Functio
3682
3682
  "^" + RT.call(bT).replace(PT, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
3683
3683
  );
3684
3684
  function IT(s) {
3685
- if (!as(s) || TT(s))
3685
+ if (!os(s) || TT(s))
3686
3686
  return !1;
3687
3687
  var t = mh(s) ? kT : _T;
3688
- return t.test(hn(s));
3688
+ return t.test(un(s));
3689
3689
  }
3690
3690
  function AT(s, t) {
3691
3691
  return s == null ? void 0 : s[t];
3692
3692
  }
3693
- function pn(s, t) {
3693
+ function hn(s, t) {
3694
3694
  var e = AT(s, t);
3695
3695
  return IT(e) ? e : void 0;
3696
3696
  }
3697
- var MT = pn(ks, "Map");
3697
+ var MT = hn(ks, "Map");
3698
3698
  const ko = MT;
3699
- var DT = pn(Object, "create");
3699
+ var DT = hn(Object, "create");
3700
3700
  const Io = DT;
3701
3701
  function OT() {
3702
3702
  this.__data__ = Io ? Io(null) : {}, this.size = 0;
@@ -3724,23 +3724,23 @@ function qT(s, t) {
3724
3724
  var e = this.__data__;
3725
3725
  return this.size += this.has(s) ? 0 : 1, e[s] = Io && t === void 0 ? HT : t, this;
3726
3726
  }
3727
- function cn(s) {
3727
+ function on(s) {
3728
3728
  var t = -1, e = s == null ? 0 : s.length;
3729
3729
  for (this.clear(); ++t < e; ) {
3730
3730
  var r = s[t];
3731
3731
  this.set(r[0], r[1]);
3732
3732
  }
3733
3733
  }
3734
- cn.prototype.clear = OT;
3735
- cn.prototype.delete = NT;
3736
- cn.prototype.get = UT;
3737
- cn.prototype.has = BT;
3738
- cn.prototype.set = qT;
3734
+ on.prototype.clear = OT;
3735
+ on.prototype.delete = NT;
3736
+ on.prototype.get = UT;
3737
+ on.prototype.has = BT;
3738
+ on.prototype.set = qT;
3739
3739
  function jT() {
3740
3740
  this.size = 0, this.__data__ = {
3741
- hash: new cn(),
3741
+ hash: new on(),
3742
3742
  map: new (ko || yr)(),
3743
- string: new cn()
3743
+ string: new on()
3744
3744
  };
3745
3745
  }
3746
3746
  function GT(s) {
@@ -3804,7 +3804,7 @@ function XT(s, t) {
3804
3804
  }
3805
3805
  var ZT = function() {
3806
3806
  try {
3807
- var s = pn(Object, "defineProperty");
3807
+ var s = hn(Object, "defineProperty");
3808
3808
  return s({}, "", {}), s;
3809
3809
  } catch (t) {
3810
3810
  }
@@ -3842,7 +3842,7 @@ function Hs(s) {
3842
3842
  }
3843
3843
  var ry = "[object Arguments]";
3844
3844
  function up(s) {
3845
- return Hs(s) && un(s) == ry;
3845
+ return Hs(s) && ln(s) == ry;
3846
3846
  }
3847
3847
  var Mm = Object.prototype, iy = Mm.hasOwnProperty, ny = Mm.propertyIsEnumerable, ay = up(function() {
3848
3848
  return arguments;
@@ -3870,7 +3870,7 @@ var my = "[object Arguments]", fy = "[object Array]", vy = "[object Boolean]", S
3870
3870
  Te[Ay] = Te[My] = Te[Dy] = Te[Oy] = Te[Ny] = Te[Vy] = Te[Ly] = Te[xy] = Te[Uy] = !0;
3871
3871
  Te[my] = Te[fy] = Te[ky] = Te[vy] = Te[Iy] = Te[Sy] = Te[Ty] = Te[yy] = Te[Ey] = Te[Py] = Te[_y] = Te[Cy] = Te[wy] = Te[Ry] = Te[by] = !1;
3872
3872
  function $y(s) {
3873
- return Hs(s) && Sh(s.length) && !!Te[un(s)];
3873
+ return Hs(s) && Sh(s.length) && !!Te[ln(s)];
3874
3874
  }
3875
3875
  function Th(s) {
3876
3876
  return function(t) {
@@ -3937,7 +3937,7 @@ function Qy(s) {
3937
3937
  }
3938
3938
  var Xy = Object.prototype, Zy = Xy.hasOwnProperty;
3939
3939
  function eE(s) {
3940
- if (!as(s))
3940
+ if (!os(s))
3941
3941
  return Qy(s);
3942
3942
  var t = Ll(s), e = [];
3943
3943
  for (var r in s)
@@ -4008,17 +4008,17 @@ function vu(s) {
4008
4008
  function hE(s) {
4009
4009
  return qm(s, Fc, Hm);
4010
4010
  }
4011
- var pE = pn(ks, "DataView");
4011
+ var pE = hn(ks, "DataView");
4012
4012
  const Su = pE;
4013
- var gE = pn(ks, "Promise");
4013
+ var gE = hn(ks, "Promise");
4014
4014
  const Tu = gE;
4015
- var mE = pn(ks, "Set");
4016
- const Mn = mE;
4017
- var fE = pn(ks, "WeakMap");
4015
+ var mE = hn(ks, "Set");
4016
+ const An = mE;
4017
+ var fE = hn(ks, "WeakMap");
4018
4018
  const yu = fE;
4019
- var Tp = "[object Map]", vE = "[object Object]", yp = "[object Promise]", Ep = "[object Set]", Pp = "[object WeakMap]", _p = "[object DataView]", SE = hn(Su), TE = hn(ko), yE = hn(Tu), EE = hn(Mn), PE = hn(yu), ii = un;
4020
- (Su && ii(new Su(new ArrayBuffer(1))) != _p || ko && ii(new ko()) != Tp || Tu && ii(Tu.resolve()) != yp || Mn && ii(new Mn()) != Ep || yu && ii(new yu()) != Pp) && (ii = function(s) {
4021
- var t = un(s), e = t == vE ? s.constructor : void 0, r = e ? hn(e) : "";
4019
+ var Tp = "[object Map]", vE = "[object Object]", yp = "[object Promise]", Ep = "[object Set]", Pp = "[object WeakMap]", _p = "[object DataView]", SE = un(Su), TE = un(ko), yE = un(Tu), EE = un(An), PE = un(yu), ii = ln;
4020
+ (Su && ii(new Su(new ArrayBuffer(1))) != _p || ko && ii(new ko()) != Tp || Tu && ii(Tu.resolve()) != yp || An && ii(new An()) != Ep || yu && ii(new yu()) != Pp) && (ii = function(s) {
4021
+ var t = ln(s), e = t == vE ? s.constructor : void 0, r = e ? un(e) : "";
4022
4022
  if (r)
4023
4023
  switch (r) {
4024
4024
  case SE:
@@ -4101,7 +4101,7 @@ var Rp = Object.create, QE = function() {
4101
4101
  function s() {
4102
4102
  }
4103
4103
  return function(t) {
4104
- if (!as(t))
4104
+ if (!os(t))
4105
4105
  return {};
4106
4106
  if (Rp)
4107
4107
  return Rp(t);
@@ -4133,7 +4133,7 @@ function od(s, t, e, r, i, a) {
4133
4133
  var o, c = t & oP, d = t & cP, l = t & dP;
4134
4134
  if (e && (o = i ? e(s, r, i, a) : e(s)), o !== void 0)
4135
4135
  return o;
4136
- if (!as(s))
4136
+ if (!os(s))
4137
4137
  return s;
4138
4138
  var p = Ht(s);
4139
4139
  if (p) {
@@ -4172,7 +4172,7 @@ function _h(s) {
4172
4172
  }
4173
4173
  var VP = "[object Symbol]";
4174
4174
  function Ul(s) {
4175
- return typeof s == "symbol" || Hs(s) && un(s) == VP;
4175
+ return typeof s == "symbol" || Hs(s) && ln(s) == VP;
4176
4176
  }
4177
4177
  var LP = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, xP = /^\w*$/;
4178
4178
  function Ch(s, t) {
@@ -4986,9 +4986,9 @@ function Op(s) {
4986
4986
  return s;
4987
4987
  if (Ul(s))
4988
4988
  return Dp;
4989
- if (as(s)) {
4989
+ if (os(s)) {
4990
4990
  var t = typeof s.valueOf == "function" ? s.valueOf() : s;
4991
- s = as(t) ? t + "" : t;
4991
+ s = os(t) ? t + "" : t;
4992
4992
  }
4993
4993
  if (typeof s != "string")
4994
4994
  return s === 0 ? s : +s;
@@ -5080,7 +5080,7 @@ function B_(s, t) {
5080
5080
  return N_(F_(s, t, bh), s + "");
5081
5081
  }
5082
5082
  function H_(s, t, e) {
5083
- if (!as(e))
5083
+ if (!os(e))
5084
5084
  return !1;
5085
5085
  var r = typeof t;
5086
5086
  return (r == "number" ? $c(e) && vh(t, e.length) : r == "string" && t in e) ? xc(e[t], s) : !1;
@@ -5097,7 +5097,7 @@ function q_(s) {
5097
5097
  }
5098
5098
  var j_ = "[object Object]", G_ = Function.prototype, W_ = Object.prototype, nf = G_.toString, J_ = W_.hasOwnProperty, K_ = nf.call(Object);
5099
5099
  function z_(s) {
5100
- if (!Hs(s) || un(s) != j_)
5100
+ if (!Hs(s) || ln(s) != j_)
5101
5101
  return !1;
5102
5102
  var t = Eh(s);
5103
5103
  if (t === null)
@@ -5293,7 +5293,7 @@ function RC(s, t, e, r) {
5293
5293
  return !0;
5294
5294
  }
5295
5295
  function cf(s) {
5296
- return s === s && !as(s);
5296
+ return s === s && !os(s);
5297
5297
  }
5298
5298
  function bC(s) {
5299
5299
  for (var t = xl(s), e = t.length; e--; ) {
@@ -5363,7 +5363,7 @@ function Ih(s, t, e) {
5363
5363
  var r, i, a, o, c, d, l = 0, p = !1, g = !1, v = !0;
5364
5364
  if (typeof s != "function")
5365
5365
  throw new TypeError(HC);
5366
- t = Op(t) || 0, as(e) && (p = !!e.leading, g = "maxWait" in e, a = g ? qC(Op(e.maxWait) || 0, t) : a, v = "trailing" in e ? !!e.trailing : v);
5366
+ t = Op(t) || 0, os(e) && (p = !!e.leading, g = "maxWait" in e, a = g ? qC(Op(e.maxWait) || 0, t) : a, v = "trailing" in e ? !!e.trailing : v);
5367
5367
  function S(G) {
5368
5368
  var re = r, tt = i;
5369
5369
  return r = i = void 0, l = G, o = s.apply(tt, re), o;
@@ -5372,8 +5372,8 @@ function Ih(s, t, e) {
5372
5372
  return l = G, c = setTimeout(w, t), p ? S(G) : o;
5373
5373
  }
5374
5374
  function _(G) {
5375
- var re = G - d, tt = G - l, ds = t - re;
5376
- return g ? jC(ds, a - tt) : ds;
5375
+ var re = G - d, tt = G - l, ls = t - re;
5376
+ return g ? jC(ls, a - tt) : ls;
5377
5377
  }
5378
5378
  function C(G) {
5379
5379
  var re = G - d, tt = G - l;
@@ -5428,13 +5428,13 @@ function JC(s, t, e, r, i, a, o) {
5428
5428
  var p = a ? a(c, d, e + "", s, t, o) : void 0, g = p === void 0;
5429
5429
  if (g) {
5430
5430
  var v = Ht(d), S = !v && Na(d), P = !v && !S && Vl(d);
5431
- p = d, v || S || P ? Ht(c) ? p = c : GC(c) ? p = $m(c) : S ? (g = !1, p = Um(d, !0)) : P ? (g = !1, p = jm(d, !0)) : p = [] : z_(d) || Ao(d) ? (p = c, Ao(c) ? p = WC(c) : (!as(c) || mh(c)) && (p = Gm(d))) : g = !1;
5431
+ p = d, v || S || P ? Ht(c) ? p = c : GC(c) ? p = $m(c) : S ? (g = !1, p = Um(d, !0)) : P ? (g = !1, p = jm(d, !0)) : p = [] : z_(d) || Ao(d) ? (p = c, Ao(c) ? p = WC(c) : (!os(c) || mh(c)) && (p = Gm(d))) : g = !1;
5432
5432
  }
5433
5433
  g && (o.set(d, p), i(p, d, r, a, o), o.delete(d)), Pu(s, e, p);
5434
5434
  }
5435
5435
  function lf(s, t, e, r, i) {
5436
5436
  s !== t && FC(t, function(a, o) {
5437
- if (i || (i = new bs()), as(a))
5437
+ if (i || (i = new bs()), os(a))
5438
5438
  JC(s, t, o, e, lf, r, i);
5439
5439
  else {
5440
5440
  var c = r ? r(_u(s, o), a, o + "", s, t, i) : void 0;
@@ -5471,8 +5471,8 @@ var tw = q_(function(s, t, e) {
5471
5471
  lf(s, t, e);
5472
5472
  });
5473
5473
  const Rr = tw;
5474
- var sw = 1 / 0, rw = Mn && 1 / kh(new Mn([, -0]))[1] == sw ? function(s) {
5475
- return new Mn(s);
5474
+ var sw = 1 / 0, rw = An && 1 / kh(new An([, -0]))[1] == sw ? function(s) {
5475
+ return new An(s);
5476
5476
  } : w_;
5477
5477
  const iw = rw;
5478
5478
  var nw = 200;
@@ -5511,7 +5511,6 @@ const ee = {
5511
5511
  PROPAGATE_KICK_ALL: "propagate_kick_across_rooms",
5512
5512
  REFRESH_ID_ON_DISCONNECTION: "refresh_id_on_disconnection",
5513
5513
  SKIP_OTEL_TRACES: "skip_otel_traces",
5514
- USE_USERIDS_IN_CHAT: "use_userids_in_chat",
5515
5514
  ENABLE_CF_SIMULCAST: "enable_cf_simulcast",
5516
5515
  CF_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED: "cf_transport_force_relay_on_ice_failed",
5517
5516
  LOG_LEVEL: "log_level",
@@ -5523,7 +5522,6 @@ const ee = {
5523
5522
  VIDEO_CONSTRAINTS: "video_constraints",
5524
5523
  SCREENSHARE_CONSTRAINTS: "screenshare_constraints",
5525
5524
  FEAT_CHAT_SDK: "feat_chat_sdk",
5526
- FEAT_CHAT_SDK_SEARCH: "chat_search",
5527
5525
  OBS_QUALITY: "obs_quality",
5528
5526
  ALLOW_SAFARI_MEDIA_MIDDLEWARES: "allow_safari_media_middlewares",
5529
5527
  EXP_RESHARE: "exp_reshare",
@@ -5586,21 +5584,21 @@ function xa(s, t) {
5586
5584
  function lw({ baseURI: s }) {
5587
5585
  return s.includes("preprod.dyte") || s.includes("preprod.realtime") ? yo.PREPROD : s.includes("devel.dyte") || s.includes("devel.realtime") ? yo.DEVEL : yo.PROD;
5588
5586
  }
5589
- function rn({ servicePrefix: s, baseURI: t }) {
5587
+ function sn({ servicePrefix: s, baseURI: t }) {
5590
5588
  return `${s}.${t}`;
5591
5589
  }
5592
5590
  function hf(s) {
5593
5591
  const t = s.getValue("baseURI");
5594
5592
  return {
5595
- location: rn({
5593
+ location: sn({
5596
5594
  servicePrefix: "location",
5597
5595
  baseURI: t
5598
5596
  }),
5599
- locationLegacy: rn({
5597
+ locationLegacy: sn({
5600
5598
  servicePrefix: "location-legacy",
5601
5599
  baseURI: t
5602
5600
  }),
5603
- daCollector: rn({
5601
+ daCollector: sn({
5604
5602
  servicePrefix: "da-collector",
5605
5603
  /**
5606
5604
  * FIXME(ravindra-cloudflare): Need to port da-collector to CF.
@@ -5721,7 +5719,7 @@ const Yh = class {
5721
5719
  }
5722
5720
  get logsEndpoint() {
5723
5721
  const t = mr.getContext(this.meetingMetadata.peerId);
5724
- return `https://${rn({
5722
+ return `https://${sn({
5725
5723
  servicePrefix: "api-silos",
5726
5724
  baseURI: t.getValue("baseURI")
5727
5725
  })}/otel/logs`;
@@ -5766,7 +5764,7 @@ const Yh = class {
5766
5764
  }
5767
5765
  injectContext(t) {
5768
5766
  var i;
5769
- const e = on().replace(/-/g, "").substring(0, 16), r = (i = this.meetingMetadata.peerId) == null ? void 0 : i.replace(/-/g, "");
5767
+ const e = an().replace(/-/g, "").substring(0, 16), r = (i = this.meetingMetadata.peerId) == null ? void 0 : i.replace(/-/g, "");
5770
5768
  t.TRACEPARENT = `00-${r}-${e}-01`;
5771
5769
  }
5772
5770
  /**
@@ -6293,7 +6291,7 @@ const Bp = 1080, Hp = 1920, Pw = (s, t, e, r, i, a) => {
6293
6291
  let g = d * p, v = l * p, S, P, _, C, w = 1;
6294
6292
  return g < e && (w = e / g), Math.abs(w - 1) < 1e-14 && v < r && (w = r / v), g *= w, v *= w, _ = d / (g / e), C = l / (v / r), S = (d - _) * o, P = (l - C) * c, S < 0 && (S = 0), P < 0 && (P = 0), _ > d && (_ = d), C > l && (C = l), [S, P, _, C, s, t, e, r];
6295
6293
  };
6296
- var zt, gi, st, Yt, be, ps, zs, gt, De, Vn, Ln, Ys, xn;
6294
+ var zt, gi, st, Yt, be, gs, zs, gt, De, Nn, Vn, Ys, Ln;
6297
6295
  const Qh = class extends jt {
6298
6296
  /**
6299
6297
  * @param {Context} context
@@ -6312,7 +6310,7 @@ const Qh = class extends jt {
6312
6310
  height: Bp,
6313
6311
  width: Hp
6314
6312
  });
6315
- m(this, ps, {
6313
+ m(this, gs, {
6316
6314
  brand: "#2160FD",
6317
6315
  background: "#141414",
6318
6316
  text: "#000000",
@@ -6322,10 +6320,10 @@ const Qh = class extends jt {
6322
6320
  m(this, zs, void 0);
6323
6321
  m(this, gt, {});
6324
6322
  m(this, De, void 0);
6323
+ m(this, Nn, void 0);
6325
6324
  m(this, Vn, void 0);
6326
- m(this, Ln, void 0);
6327
6325
  m(this, Ys, void 0);
6328
- m(this, xn, !1);
6326
+ m(this, Ln, !1);
6329
6327
  h(this, "cleanupEventListeners", () => {
6330
6328
  n(this, gi).unsubscribe("stageStatus", this.handlePipMediaControls), n(this, De).removeListener("videoUpdate", this.onSelfVideoUpdateListener), n(this, De).removeListener("audioUpdate", this.onSelfAudioUpdateListener), n(this, De).removeListener("roomLeft", () => this.disable());
6331
6329
  });
@@ -6360,7 +6358,7 @@ const Qh = class extends jt {
6360
6358
  h(this, "disable", (e = !1) => {
6361
6359
  f(this, Ys, "idle"), this.cleanupEventListeners(), cancelAnimationFrame(n(this, zs)), e !== !0 && document.body.removeChild(n(this, st)), f(this, zs, void 0), document.pictureInPictureElement && document.exitPictureInPicture();
6362
6360
  });
6363
- f(this, gi, e), f(this, Ys, "idle"), f(this, De, r), f(this, ps, {
6361
+ f(this, gi, e), f(this, Ys, "idle"), f(this, De, r), f(this, gs, {
6364
6362
  brand: r.config.designTokens.colors.brand[500],
6365
6363
  background: r.config.designTokens.colors.background[1e3],
6366
6364
  text: r.config.designTokens.colors.text,
@@ -6386,10 +6384,10 @@ const Qh = class extends jt {
6386
6384
  return u(this, null, function* () {
6387
6385
  switch (e) {
6388
6386
  case "handRaise":
6389
- f(this, Ln, r);
6387
+ f(this, Vn, r);
6390
6388
  break;
6391
6389
  case "pin":
6392
- f(this, Vn, r);
6390
+ f(this, Nn, r);
6393
6391
  break;
6394
6392
  }
6395
6393
  });
@@ -6398,10 +6396,10 @@ const Qh = class extends jt {
6398
6396
  return u(this, null, function* () {
6399
6397
  switch (e) {
6400
6398
  case "handRaise":
6401
- f(this, Ln, yield Yc(r));
6399
+ f(this, Vn, yield Yc(r));
6402
6400
  break;
6403
6401
  case "pin":
6404
- f(this, Vn, yield Yc(r));
6402
+ f(this, Nn, yield Yc(r));
6405
6403
  break;
6406
6404
  }
6407
6405
  });
@@ -6450,7 +6448,7 @@ const Qh = class extends jt {
6450
6448
  if (n(this, zt) === void 0)
6451
6449
  return;
6452
6450
  const o = n(this, zt).getContext("2d"), c = n(this, zt).width, d = 0, l = 0, p = r - d * 2, g = i - d * 2, v = Math.floor(c / p), S = Math.floor(e / v), _ = e % v * (p + d) + d, C = S * (g + d) + d, { displayText: w, image: L } = a != null ? a : {};
6453
- o.fillStyle = w || L ? n(this, ps).videoBackground : n(this, ps).background, o.strokeStyle = n(this, ps).brand, o.beginPath(), o.moveTo(_ + l, C), o.arcTo(_ + p, C, _ + p, C + l, l), o.arcTo(
6451
+ o.fillStyle = w || L ? n(this, gs).videoBackground : n(this, gs).background, o.strokeStyle = n(this, gs).brand, o.beginPath(), o.moveTo(_ + l, C), o.arcTo(_ + p, C, _ + p, C + l, l), o.arcTo(
6454
6452
  _ + p,
6455
6453
  C + g,
6456
6454
  _ + p - l,
@@ -6458,26 +6456,26 @@ const Qh = class extends jt {
6458
6456
  l
6459
6457
  ), o.arcTo(_, C + g, _, C + g - l, l), o.arcTo(_, C, _ + l, C, l), o.closePath(), o.fill(), o.stroke();
6460
6458
  const F = p / 6, N = p / 2 + _, B = g / 2 + C;
6461
- o.save(), (w || L) && (o.beginPath(), o.arc(N, B, F, 0, Math.PI * 2), o.fillStyle = n(this, ps).brand, o.fill(), L ? (o.clip(), o.drawImage(
6459
+ o.save(), (w || L) && (o.beginPath(), o.arc(N, B, F, 0, Math.PI * 2), o.fillStyle = n(this, gs).brand, o.fill(), L ? (o.clip(), o.drawImage(
6462
6460
  L,
6463
6461
  N - F,
6464
6462
  B - F,
6465
6463
  F * 2,
6466
6464
  F * 2
6467
- ), o.restore()) : w && (o.fillStyle = n(this, ps).textOnBrand, o.font = `${F / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(w, N, B)), this.drawIcons(a, _, C, Math.max(p, g)));
6465
+ ), o.restore()) : w && (o.fillStyle = n(this, gs).textOnBrand, o.font = `${F / 2}px sans-serif`, o.textAlign = "center", o.textBaseline = "middle", o.fillText(w, N, B)), this.drawIcons(a, _, C, Math.max(p, g)));
6468
6466
  }
6469
6467
  drawIcons(e, r, i, a) {
6470
6468
  const o = Math.min(Math.max(a * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
6471
6469
  let l = r + c;
6472
6470
  const p = i + c, g = (v) => {
6473
6471
  const S = n(this, zt).getContext("2d");
6474
- S.save(), S.fillStyle = n(this, ps).background, S.beginPath(), S.moveTo(l + d, p), S.arcTo(l + o, p, l + o, p + d, d), S.arcTo(
6472
+ S.save(), S.fillStyle = n(this, gs).background, S.beginPath(), S.moveTo(l + d, p), S.arcTo(l + o, p, l + o, p + d, d), S.arcTo(
6475
6473
  l + o,
6476
6474
  p + o,
6477
6475
  l + o - d,
6478
6476
  p + o,
6479
6477
  d
6480
- ), S.arcTo(l, p + o, l, p + o - d, d), S.arcTo(l, p, l + d, p, d), S.closePath(), S.fill(), typeof v == "string" ? (S.font = `${o / 1.5}px sans-serif`, S.fillStyle = n(this, ps).text, S.textAlign = "center", S.textBaseline = "top", S.fillText(v, o / 2 + l, p + c)) : S.drawImage(
6478
+ ), S.arcTo(l, p + o, l, p + o - d, d), S.arcTo(l, p, l + d, p, d), S.closePath(), S.fill(), typeof v == "string" ? (S.font = `${o / 1.5}px sans-serif`, S.fillStyle = n(this, gs).text, S.textAlign = "center", S.textBaseline = "top", S.fillText(v, o / 2 + l, p + c)) : S.drawImage(
6481
6479
  v,
6482
6480
  l + c,
6483
6481
  p + c,
@@ -6485,7 +6483,7 @@ const Qh = class extends jt {
6485
6483
  o - c * 2
6486
6484
  ), l += o + c, S.restore();
6487
6485
  };
6488
- e.pinned && g(n(this, Vn)), e.handRaised && g(n(this, Ln)), e.reaction && g(e.reaction);
6486
+ e.pinned && g(n(this, Nn)), e.handRaised && g(n(this, Vn)), e.reaction && g(e.reaction);
6489
6487
  }
6490
6488
  drawTile(e, r, i) {
6491
6489
  var l, p;
@@ -6548,7 +6546,7 @@ const Qh = class extends jt {
6548
6546
  return document.pictureInPictureElement !== null;
6549
6547
  }
6550
6548
  cleanup() {
6551
- if (f(this, xn, !1), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), n(this, st))
6549
+ if (f(this, Ln, !1), this.isSupported() && document.exitPictureInPicture !== void 0 && document.pictureInPictureElement !== null && document.exitPictureInPicture(), n(this, st))
6552
6550
  try {
6553
6551
  document.body.removeChild(n(this, st));
6554
6552
  } catch (e) {
@@ -6564,9 +6562,9 @@ const Qh = class extends jt {
6564
6562
  init({ height: e, width: r } = {}) {
6565
6563
  if (!this.isSupported())
6566
6564
  throw this.logger.error("Pip.unsupported"), new Error("Picture-in-picture is not available in this environment");
6567
- if (n(this, xn))
6565
+ if (n(this, Ln))
6568
6566
  return;
6569
- f(this, xn, !0), this.createCanvas(), this.setupMediaSessionEvents();
6567
+ f(this, Ln, !0), this.createCanvas(), this.setupMediaSessionEvents();
6570
6568
  const i = document.createElement("video");
6571
6569
  f(this, be, {
6572
6570
  height: e != null ? e : Bp,
@@ -6685,7 +6683,7 @@ const Qh = class extends jt {
6685
6683
  }
6686
6684
  };
6687
6685
  let wu = Qh;
6688
- zt = new WeakMap(), gi = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), be = new WeakMap(), ps = new WeakMap(), zs = new WeakMap(), gt = new WeakMap(), De = new WeakMap(), Vn = new WeakMap(), Ln = new WeakMap(), Ys = new WeakMap(), xn = new WeakMap();
6686
+ zt = new WeakMap(), gi = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), be = new WeakMap(), gs = new WeakMap(), zs = new WeakMap(), gt = new WeakMap(), De = new WeakMap(), Nn = new WeakMap(), Vn = new WeakMap(), Ys = new WeakMap(), Ln = new WeakMap();
6689
6687
  var Sr;
6690
6688
  (function(s) {
6691
6689
  s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
@@ -8526,10 +8524,10 @@ class $b extends T {
8526
8524
  }
8527
8525
  }
8528
8526
  const Fb = new $b();
8529
- var nn;
8527
+ var rn;
8530
8528
  (function(s) {
8531
8529
  s[s.BROWSER = 0] = "BROWSER", s[s.TRACK = 1] = "TRACK", s[s.COMPOSITE = 2] = "COMPOSITE";
8532
- })(nn || (nn = {}));
8530
+ })(rn || (rn = {}));
8533
8531
  var pr;
8534
8532
  (function(s) {
8535
8533
  s[s.UNSPECIFIED = 0] = "UNSPECIFIED", s[s.ON_STAGE = 1] = "ON_STAGE", s[s.APPROVED_STAGE = 2] = "APPROVED_STAGE", s[s.REQUESTED_STAGE = 3] = "REQUESTED_STAGE", s[s.OFF_STAGE = 4] = "OFF_STAGE";
@@ -8642,7 +8640,7 @@ class jb extends T {
8642
8640
  ]);
8643
8641
  }
8644
8642
  }
8645
- const Tn = new jb();
8643
+ const Sn = new jb();
8646
8644
  class Gb extends T {
8647
8645
  constructor() {
8648
8646
  super("socket.room.PeerStatusUpdate", [
@@ -8764,7 +8762,7 @@ class Qb extends T {
8764
8762
  T: 9
8765
8763
  /*ScalarType.STRING*/
8766
8764
  },
8767
- { no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", nn] },
8765
+ { no: 2, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", rn] },
8768
8766
  {
8769
8767
  no: 3,
8770
8768
  name: "recording_status",
@@ -10029,7 +10027,7 @@ class AI extends T {
10029
10027
  ]);
10030
10028
  }
10031
10029
  }
10032
- const gn = new AI();
10030
+ const pn = new AI();
10033
10031
  class MI extends T {
10034
10032
  constructor() {
10035
10033
  super("socket.chat.GetPaginatedChatMessageRoomRequest", [
@@ -10077,7 +10075,7 @@ const DI = new MI();
10077
10075
  class OI extends T {
10078
10076
  constructor() {
10079
10077
  super("socket.chat.GetPaginatedChatMessageRoomResponse", [
10080
- { no: 1, name: "messages", kind: "message", repeat: 1, T: () => gn },
10078
+ { no: 1, name: "messages", kind: "message", repeat: 1, T: () => pn },
10081
10079
  {
10082
10080
  no: 2,
10083
10081
  name: "next",
@@ -10092,7 +10090,7 @@ const NI = new OI();
10092
10090
  class VI extends T {
10093
10091
  constructor() {
10094
10092
  super("socket.chat.GetChatMessagesResponse", [
10095
- { no: 1, name: "messages", kind: "message", repeat: 1, T: () => gn }
10093
+ { no: 1, name: "messages", kind: "message", repeat: 1, T: () => pn }
10096
10094
  ]);
10097
10095
  }
10098
10096
  }
@@ -10121,7 +10119,7 @@ const xI = new LI();
10121
10119
  class UI extends T {
10122
10120
  constructor() {
10123
10121
  super("socket.chat.SendChatMessageToRoomResponse", [
10124
- { no: 1, name: "message", kind: "message", T: () => gn }
10122
+ { no: 1, name: "message", kind: "message", T: () => pn }
10125
10123
  ]);
10126
10124
  }
10127
10125
  }
@@ -10158,7 +10156,7 @@ const FI = new $I();
10158
10156
  class BI extends T {
10159
10157
  constructor() {
10160
10158
  super("socket.chat.SendChatMessageToPeersResponse", [
10161
- { no: 1, name: "message", kind: "message", T: () => gn }
10159
+ { no: 1, name: "message", kind: "message", T: () => pn }
10162
10160
  ]);
10163
10161
  }
10164
10162
  }
@@ -10194,7 +10192,7 @@ const qI = new HI();
10194
10192
  class jI extends T {
10195
10193
  constructor() {
10196
10194
  super("socket.chat.SendChatMessageToChannelResponse", [
10197
- { no: 1, name: "message", kind: "message", T: () => gn }
10195
+ { no: 1, name: "message", kind: "message", T: () => pn }
10198
10196
  ]);
10199
10197
  }
10200
10198
  }
@@ -10306,7 +10304,7 @@ const Zc = new zI();
10306
10304
  class YI extends T {
10307
10305
  constructor() {
10308
10306
  super("socket.chat.EditChatMessageResponse", [
10309
- { no: 1, name: "message", kind: "message", T: () => gn }
10307
+ { no: 1, name: "message", kind: "message", T: () => pn }
10310
10308
  ]);
10311
10309
  }
10312
10310
  }
@@ -10577,7 +10575,7 @@ const hA = new uA();
10577
10575
  class pA extends T {
10578
10576
  constructor() {
10579
10577
  super("socket.chat.LatestMessageAndUnreadCount", [
10580
- { no: 1, name: "message", kind: "message", T: () => gn },
10578
+ { no: 1, name: "message", kind: "message", T: () => pn },
10581
10579
  {
10582
10580
  no: 2,
10583
10581
  name: "unread_count",
@@ -11480,7 +11478,7 @@ class PM extends T {
11480
11478
  T: 9
11481
11479
  /*ScalarType.STRING*/
11482
11480
  },
11483
- { no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", nn] }
11481
+ { no: 3, name: "recording_type", kind: "enum", T: () => ["common.RecordingType", rn] }
11484
11482
  ]);
11485
11483
  }
11486
11484
  }
@@ -11815,7 +11813,7 @@ const $ = Fa(bM, OM), Re = Fa(kM, NM), J = Fa(
11815
11813
  ), Ws = Fa(AM, LM), li = Fa(
11816
11814
  MM,
11817
11815
  xM
11818
- ), Ar = If(kf, 16777216), Cs = If(kf, 50331648), ld = Fa(
11816
+ ), Ar = If(kf, 16777216), ws = If(kf, 50331648), ld = Fa(
11819
11817
  DM,
11820
11818
  UM
11821
11819
  );
@@ -11823,26 +11821,26 @@ var $M = Object.defineProperty, FM = Object.getOwnPropertyDescriptor, Oh = (s, t
11823
11821
  for (var i = r > 1 ? void 0 : r ? FM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
11824
11822
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
11825
11823
  return r && i && $M(t, e, i), i;
11826
- }, Mr, Un, Ig;
11824
+ }, Mr, xn, Ig;
11827
11825
  const Nu = (Ig = class {
11828
11826
  constructor(s, t) {
11829
11827
  m(this, Mr, void 0);
11830
- m(this, Un, void 0);
11831
- f(this, Mr, t), f(this, Un, s);
11828
+ m(this, xn, void 0);
11829
+ f(this, Mr, t), f(this, xn, s);
11832
11830
  }
11833
11831
  /**
11834
11832
  * @access private
11835
11833
  * Not for external use
11836
11834
  */
11837
11835
  get telemetry() {
11838
- return n(this, Un).getValue("telemetry");
11836
+ return n(this, xn).getValue("telemetry");
11839
11837
  }
11840
11838
  /**
11841
11839
  * @private access
11842
11840
  * Not for external use
11843
11841
  */
11844
11842
  get logger() {
11845
- return n(this, Un).getValue("logger");
11843
+ return n(this, xn).getValue("logger");
11846
11844
  }
11847
11845
  createChannel(s, t, e, r = "public", i = !1) {
11848
11846
  return u(this, null, function* () {
@@ -11887,7 +11885,7 @@ const Nu = (Ig = class {
11887
11885
  memberIds: s.targetUserIds,
11888
11886
  unreadCount: (r = t == null ? void 0 : t.unreadCount) != null ? r : 0
11889
11887
  });
11890
- return t != null && t.message && (e.latestMessage = ws.formatSocketPeerMessage(
11888
+ return t != null && t.message && (e.latestMessage = as.formatSocketPeerMessage(
11891
11889
  t.message
11892
11890
  )), delete e.chatChannelId, delete e.targetUserIds, delete e.latestMessageAndUnreadCount, e;
11893
11891
  }
@@ -11941,41 +11939,41 @@ const Nu = (Ig = class {
11941
11939
  return t(a);
11942
11940
  });
11943
11941
  }
11944
- }, Mr = new WeakMap(), Un = new WeakMap(), Ig);
11945
- let dn = Nu;
11942
+ }, Mr = new WeakMap(), xn = new WeakMap(), Ig);
11943
+ let cn = Nu;
11946
11944
  Oh([
11947
11945
  E.trace("ChatChannelHandler.createChannel")
11948
- ], dn.prototype, "createChannel", 1);
11946
+ ], cn.prototype, "createChannel", 1);
11949
11947
  Oh([
11950
11948
  E.trace("ChatChannelHandler.updateChannel")
11951
- ], dn.prototype, "updateChannel", 1);
11949
+ ], cn.prototype, "updateChannel", 1);
11952
11950
  Oh([
11953
11951
  E.trace("ChatChannelHandler.getChannelMembers")
11954
- ], dn.prototype, "getChannelMembers", 1);
11952
+ ], cn.prototype, "getChannelMembers", 1);
11955
11953
  var BM = Object.defineProperty, HM = Object.getOwnPropertyDescriptor, As = (s, t, e, r) => {
11956
11954
  for (var i = r > 1 ? void 0 : r ? HM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
11957
11955
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
11958
11956
  return r && i && BM(t, e, i), i;
11959
- }, Et = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(Et || {}), rt, $n;
11960
- class os {
11957
+ }, Et = /* @__PURE__ */ ((s) => (s[s.TEXT = 0] = "TEXT", s[s.IMAGE = 1] = "IMAGE", s[s.FILE = 2] = "FILE", s[s.CUSTOM = 3] = "CUSTOM", s))(Et || {}), rt, Un;
11958
+ class cs {
11961
11959
  constructor(t, e) {
11962
11960
  m(this, rt, void 0);
11963
- m(this, $n, void 0);
11964
- f(this, rt, e), f(this, $n, t);
11961
+ m(this, Un, void 0);
11962
+ f(this, rt, e), f(this, Un, t);
11965
11963
  }
11966
11964
  /**
11967
11965
  * @access private
11968
11966
  * Not for external use
11969
11967
  */
11970
11968
  get telemetry() {
11971
- return n(this, $n).getValue("telemetry");
11969
+ return n(this, Un).getValue("telemetry");
11972
11970
  }
11973
11971
  /**
11974
11972
  * @private access
11975
11973
  * Not available for external use
11976
11974
  */
11977
11975
  get logger() {
11978
- return n(this, $n).getValue("logger");
11976
+ return n(this, Un).getValue("logger");
11979
11977
  }
11980
11978
  getChatMessages() {
11981
11979
  return n(this, rt).sendMessagePromise(Re.getMessages);
@@ -12071,22 +12069,22 @@ class os {
12071
12069
  }
12072
12070
  searchMessages(t, e) {
12073
12071
  return u(this, null, function* () {
12074
- var i, a, o;
12072
+ var i, a, o, c;
12075
12073
  const r = {
12076
12074
  searchTerm: t,
12077
12075
  timeStamp: (i = e.timestamp) != null ? i : Date.now(),
12078
- size: (a = e.size) != null ? a : 75,
12079
- from: 0,
12080
- reversed: (o = e.reversed) != null ? o : !0
12076
+ size: (a = e.limit) != null ? a : 75,
12077
+ from: (o = e.offset) != null ? o : 0,
12078
+ reversed: (c = e.reversed) != null ? c : !0
12081
12079
  };
12082
12080
  e.channelId && (r.channelId = e.channelId);
12083
12081
  try {
12084
- const c = yield n(this, rt).sendMessagePromise(
12082
+ const d = yield n(this, rt).sendMessagePromise(
12085
12083
  Re.searchChannelMessages,
12086
12084
  tA.toBinary(r)
12087
12085
  );
12088
- return Rf.fromBinary(c.payload).messages;
12089
- } catch (c) {
12086
+ return Rf.fromBinary(d.payload).messages;
12087
+ } catch (d) {
12090
12088
  return [];
12091
12089
  }
12092
12090
  });
@@ -12097,7 +12095,7 @@ class os {
12097
12095
  const t = yield n(this, rt).sendMessagePromise(
12098
12096
  Re.getAllChatChannels
12099
12097
  );
12100
- return js.fromBinary(t.payload).chatChannels.map(dn.formatChannel);
12098
+ return js.fromBinary(t.payload).chatChannels.map(cn.formatChannel);
12101
12099
  } catch (t) {
12102
12100
  return [];
12103
12101
  }
@@ -12180,40 +12178,40 @@ class os {
12180
12178
  });
12181
12179
  }
12182
12180
  }
12183
- rt = new WeakMap(), $n = new WeakMap();
12181
+ rt = new WeakMap(), Un = new WeakMap();
12184
12182
  As([
12185
12183
  E.trace("SocketService.getChatMessages")
12186
- ], os.prototype, "getChatMessages", 1);
12184
+ ], cs.prototype, "getChatMessages", 1);
12187
12185
  As([
12188
12186
  E.trace("SocketService.getChatMessagesPaginated")
12189
- ], os.prototype, "getChatMessagesPaginated", 1);
12187
+ ], cs.prototype, "getChatMessagesPaginated", 1);
12190
12188
  As([
12191
12189
  E.trace("SocketService.sendMessageToRoom")
12192
- ], os.prototype, "sendMessageToRoom", 1);
12190
+ ], cs.prototype, "sendMessageToRoom", 1);
12193
12191
  As([
12194
12192
  E.trace("SocketService.sendMessageToPeers")
12195
- ], os.prototype, "sendMessageToPeers", 1);
12193
+ ], cs.prototype, "sendMessageToPeers", 1);
12196
12194
  As([
12197
12195
  E.trace("SocketService.sendMessageToChannel")
12198
- ], os.prototype, "sendMessageToChannel", 1);
12196
+ ], cs.prototype, "sendMessageToChannel", 1);
12199
12197
  As([
12200
12198
  E.trace("SocketService.sendMessage")
12201
- ], os.prototype, "sendMessage", 1);
12199
+ ], cs.prototype, "sendMessage", 1);
12202
12200
  As([
12203
12201
  E.trace("SocketService.editMessage")
12204
- ], os.prototype, "editMessage", 1);
12202
+ ], cs.prototype, "editMessage", 1);
12205
12203
  As([
12206
12204
  E.trace("SocketService.deleteMessage")
12207
- ], os.prototype, "deleteMessage", 1);
12205
+ ], cs.prototype, "deleteMessage", 1);
12208
12206
  As([
12209
12207
  E.trace("SocketService.searchMessages")
12210
- ], os.prototype, "searchMessages", 1);
12208
+ ], cs.prototype, "searchMessages", 1);
12211
12209
  As([
12212
12210
  E.trace("SocketService.getAllChannels")
12213
- ], os.prototype, "getAllChannels", 1);
12211
+ ], cs.prototype, "getAllChannels", 1);
12214
12212
  As([
12215
12213
  E.trace("SocketService.markLastReadMessage")
12216
- ], os.prototype, "markLastReadMessage", 1);
12214
+ ], cs.prototype, "markLastReadMessage", 1);
12217
12215
  function qM(s) {
12218
12216
  return s.replace(
12219
12217
  /([-_]\w)/g,
@@ -12445,7 +12443,7 @@ class KM {
12445
12443
  this.organizationId = t;
12446
12444
  }
12447
12445
  }
12448
- var zM = Object.defineProperty, YM = Object.getOwnPropertyDescriptor, cs = (s, t, e, r) => {
12446
+ var zM = Object.defineProperty, YM = Object.getOwnPropertyDescriptor, ds = (s, t, e, r) => {
12449
12447
  for (var i = r > 1 ? void 0 : r ? YM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
12450
12448
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
12451
12449
  return r && i && zM(t, e, i), i;
@@ -12686,40 +12684,40 @@ class Gt extends KM {
12686
12684
  });
12687
12685
  }
12688
12686
  }
12689
- cs([
12687
+ ds([
12690
12688
  E.trace("APIClient.getIPDetails")
12691
12689
  ], Gt.prototype, "getIPDetails", 1);
12692
- cs([
12690
+ ds([
12693
12691
  E.trace("APIClient.getICEServers")
12694
12692
  ], Gt.prototype, "getICEServers", 1);
12695
- cs([
12693
+ ds([
12696
12694
  E.trace("APIClient.getPlugins")
12697
12695
  ], Gt.prototype, "getPlugins", 1);
12698
- cs([
12696
+ ds([
12699
12697
  E.trace("APIClient.startLivestreaming")
12700
12698
  ], Gt.prototype, "startLivestreaming", 1);
12701
- cs([
12699
+ ds([
12702
12700
  E.trace("APIClient.stopLivestreaming")
12703
12701
  ], Gt.prototype, "stopLivestreaming", 1);
12704
- cs([
12702
+ ds([
12705
12703
  E.trace("APIClient.getActiveLivestream")
12706
12704
  ], Gt.prototype, "getActiveLivestream", 1);
12707
- cs([
12705
+ ds([
12708
12706
  E.trace("APIClient.getUserDetails")
12709
12707
  ], Gt.prototype, "getUserDetails", 1);
12710
- cs([
12708
+ ds([
12711
12709
  E.trace("APIClient.startRecording")
12712
12710
  ], Gt.prototype, "startRecording", 1);
12713
- cs([
12711
+ ds([
12714
12712
  E.trace("APIClient.stopRecording")
12715
12713
  ], Gt.prototype, "updateRecording", 1);
12716
- cs([
12714
+ ds([
12717
12715
  E.trace("APIClient.getActiveRecording")
12718
12716
  ], Gt.prototype, "getActiveRecording", 1);
12719
- cs([
12717
+ ds([
12720
12718
  E.trace("APIClient.getActiveTranscript")
12721
12719
  ], Gt.prototype, "getActiveTranscript", 1);
12722
- cs([
12720
+ ds([
12723
12721
  E.trace("APIClient.getRoomNodeData")
12724
12722
  ], Gt.prototype, "getRoomNodeData", 1);
12725
12723
  let Vu;
@@ -12756,7 +12754,7 @@ var ZM = Object.defineProperty, e0 = Object.getOwnPropertyDescriptor, ht = (s, t
12756
12754
  return r && i && ZM(t, e, i), i;
12757
12755
  };
12758
12756
  const t0 = ["text", "image", "file", "custom", "poll"], ud = { maxInvocations: 180, period: 60 };
12759
- var Z, mi, $e, fi, vi, xd, Mf, No, Lu, Ag;
12757
+ var Z, mi, Oe, fi, $n, xd, Mf, No, Lu, Ag;
12760
12758
  let ze = (Ag = class extends jt {
12761
12759
  /**
12762
12760
  * @param {Context} context
@@ -12775,6 +12773,12 @@ let ze = (Ag = class extends jt {
12775
12773
  */
12776
12774
  m(this, No);
12777
12775
  /**
12776
+ * @deprecated Use `fetchMessages` method instead.
12777
+ *
12778
+ * **Note:** Limited to the most recent 1000 messages from before joining,
12779
+ * plus any messages received after joining.
12780
+ * This limit prevents memory and meeting join issues when meetings have extensive chat history.
12781
+ *
12778
12782
  * An array of chat messages.
12779
12783
  */
12780
12784
  h(this, "messages");
@@ -12784,18 +12788,18 @@ let ze = (Ag = class extends jt {
12784
12788
  h(this, "channels", []);
12785
12789
  m(this, Z, void 0);
12786
12790
  m(this, mi, void 0);
12787
- m(this, $e, void 0);
12791
+ m(this, Oe, void 0);
12788
12792
  m(this, fi, void 0);
12789
- m(this, vi, void 0);
12793
+ m(this, $n, void 0);
12790
12794
  h(this, "maxTextLimit", 2e3);
12791
- f(this, vi, t), f(this, $e, e), f(this, fi, r), f(this, Z, i), f(this, mi, a), this.messages = [];
12795
+ f(this, $n, t), f(this, Oe, e), f(this, fi, r), f(this, Z, i), f(this, mi, a), this.messages = [];
12792
12796
  }
12793
12797
  /**
12794
12798
  * @access private
12795
12799
  * Not for external use
12796
12800
  */
12797
12801
  get telemetry() {
12798
- return n(this, vi).getValue("telemetry");
12802
+ return n(this, $n).getValue("telemetry");
12799
12803
  }
12800
12804
  /**
12801
12805
  * Set the max character limit of a text message
@@ -12851,11 +12855,11 @@ let ze = (Ag = class extends jt {
12851
12855
  if (!t)
12852
12856
  throw this.logger.error("sendTextMessage::message_can_not_be_empty"), new b("Message can not be empty.", "0502");
12853
12857
  if (r) {
12854
- n(this, $e).sendMessageToChannel(t, Et.TEXT, r);
12858
+ n(this, Oe).sendMessageToChannel(t, Et.TEXT, r);
12855
12859
  return;
12856
12860
  }
12857
12861
  let i = [];
12858
- e && e.length > 0 && (e.push(n(this, Z).id), i = n(this, mi).joined.toArray().filter((g) => e.includes(g.id)).map((g) => g.userId), i.push(n(this, Z).userId)), n(this, $e).sendMessage(
12862
+ e && e.length > 0 && (e.push(n(this, Z).id), i = n(this, mi).joined.toArray().filter((g) => e.includes(g.id)).map((g) => g.userId), i.push(n(this, Z).userId)), n(this, Oe).sendMessage(
12859
12863
  t,
12860
12864
  Et.TEXT,
12861
12865
  e
@@ -12893,7 +12897,7 @@ let ze = (Ag = class extends jt {
12893
12897
  n(this, Z).config.viewType
12894
12898
  );
12895
12899
  if (yield g.uploadFile(t, S), r) {
12896
- n(this, $e).sendMessageToChannel(
12900
+ n(this, Oe).sendMessageToChannel(
12897
12901
  v,
12898
12902
  Et.IMAGE,
12899
12903
  r
@@ -12901,7 +12905,7 @@ let ze = (Ag = class extends jt {
12901
12905
  return;
12902
12906
  }
12903
12907
  let P = [];
12904
- e && e.length > 0 && (e.push(n(this, Z).id), P = n(this, mi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), P.push(n(this, Z).userId)), n(this, $e).sendMessage(
12908
+ e && e.length > 0 && (e.push(n(this, Z).id), P = n(this, mi).joined.toArray().filter((_) => e.includes(_.id)).map((_) => _.userId), P.push(n(this, Z).userId)), n(this, Oe).sendMessage(
12905
12909
  v,
12906
12910
  Et.IMAGE,
12907
12911
  e
@@ -12938,7 +12942,7 @@ let ze = (Ag = class extends jt {
12938
12942
  n(this, Z).config.viewType
12939
12943
  );
12940
12944
  if (yield p.uploadFile(t, v), r) {
12941
- n(this, $e).sendMessageToChannel(
12945
+ n(this, Oe).sendMessageToChannel(
12942
12946
  JSON.stringify({
12943
12947
  link: g,
12944
12948
  name: t.name,
@@ -12956,7 +12960,7 @@ let ze = (Ag = class extends jt {
12956
12960
  name: t.name,
12957
12961
  size: "size" in t ? t.size : 0
12958
12962
  });
12959
- n(this, $e).sendMessage(
12963
+ n(this, Oe).sendMessage(
12960
12964
  P,
12961
12965
  Et.FILE,
12962
12966
  e
@@ -13027,7 +13031,7 @@ let ze = (Ag = class extends jt {
13027
13031
  return r(N);
13028
13032
  })))
13029
13033
  });
13030
- n(this, $e).sendMessage(
13034
+ n(this, Oe).sendMessage(
13031
13035
  JSON.stringify(i),
13032
13036
  Et.CUSTOM,
13033
13037
  e
@@ -13062,7 +13066,7 @@ let ze = (Ag = class extends jt {
13062
13066
  this.logger.error("editTextMessage::message_can_not_be_empty");
13063
13067
  return;
13064
13068
  }
13065
- n(this, $e).editMessage(
13069
+ n(this, Oe).editMessage(
13066
13070
  t,
13067
13071
  e,
13068
13072
  Et.TEXT,
@@ -13089,7 +13093,7 @@ let ze = (Ag = class extends jt {
13089
13093
  }
13090
13094
  try {
13091
13095
  const l = dt(), { getLocation: p, putLocation: g } = yield l.getPresignedUrls(e.name, n(this, Z).config.viewType);
13092
- yield l.uploadFile(e, g), n(this, $e).editMessage(
13096
+ yield l.uploadFile(e, g), n(this, Oe).editMessage(
13093
13097
  t,
13094
13098
  p,
13095
13099
  Et.IMAGE,
@@ -13116,7 +13120,7 @@ let ze = (Ag = class extends jt {
13116
13120
  e.name,
13117
13121
  n(this, Z).config.viewType
13118
13122
  );
13119
- yield d.uploadFile(e, p), n(this, $e).editMessage(
13123
+ yield d.uploadFile(e, p), n(this, Oe).editMessage(
13120
13124
  t,
13121
13125
  JSON.stringify({
13122
13126
  link: l,
@@ -13160,10 +13164,13 @@ let ze = (Ag = class extends jt {
13160
13164
  var r, i;
13161
13165
  if (((i = (r = n(this, Z).permissions) == null ? void 0 : r.chatMessage) == null ? void 0 : i.canDelete) === "NONE")
13162
13166
  throw new b("Not permitted to delete messages", "0501");
13163
- n(this, $e).deleteMessage(t, e);
13167
+ n(this, Oe).deleteMessage(t, e);
13164
13168
  });
13165
13169
  }
13166
13170
  /**
13171
+ * @deprecated this method is deprecated and will be removed in a future release.
13172
+ * Use `fetchMessages` with appropriate filters instead.
13173
+ *
13167
13174
  * Returns an array of messages sent by a specific userId.
13168
13175
  * @param {string} userId The user id of the user that sent the message.
13169
13176
  */
@@ -13171,6 +13178,9 @@ let ze = (Ag = class extends jt {
13171
13178
  return this.messages.filter((e) => e.userId === t);
13172
13179
  }
13173
13180
  /**
13181
+ * @deprecated this method is deprecated and will be removed in a future release.
13182
+ * Use `fetchMessages` with appropriate filters instead.
13183
+ *
13174
13184
  * Returns an array of 'text', 'image' or 'file' messages.
13175
13185
  * @param {(
13176
13186
  * 'text'|'image'|'file'|'custom'|'poll'
@@ -13191,7 +13201,7 @@ let ze = (Ag = class extends jt {
13191
13201
  throw new b("You do not have permission to pin messages.", "0501");
13192
13202
  const e = this.messages.find((r) => r.id === t);
13193
13203
  if (e) {
13194
- n(this, $e).setPinState(e, !0);
13204
+ n(this, Oe).setPinState(e, !0);
13195
13205
  return;
13196
13206
  }
13197
13207
  throw new b(`No message found with id: ${t}`, "0504");
@@ -13209,12 +13219,33 @@ let ze = (Ag = class extends jt {
13209
13219
  throw new b("You do not have permission to unpin messages.", "0501");
13210
13220
  const e = this.messages.find((r) => r.id === t);
13211
13221
  if (e) {
13212
- n(this, $e).setPinState(e, !1);
13222
+ n(this, Oe).setPinState(e, !1);
13213
13223
  return;
13214
13224
  }
13215
13225
  throw new b(`No message found with id: ${t}`, "0504");
13216
13226
  });
13217
13227
  }
13228
+ fetchMessages(d) {
13229
+ return u(this, arguments, function* ({
13230
+ timestamp: t = 0,
13231
+ offset: e,
13232
+ limit: r,
13233
+ direction: i = "after",
13234
+ searchQuery: a = "",
13235
+ type: o,
13236
+ userId: c
13237
+ }) {
13238
+ let l = [];
13239
+ return a ? l = (yield n(this, Oe).searchMessages(a, {
13240
+ offset: e,
13241
+ limit: r,
13242
+ timestamp: t,
13243
+ reversed: i === "before"
13244
+ })).map(as.formatSocketPeerMessage) : l = (yield n(this, Oe).getChatMessagesPaginated(t, r, i === "before", e)).messages.map(
13245
+ (g) => as.formatSocketPeerMessage(g)
13246
+ ), o && (l = l.filter((p) => p.type === o)), c && (l = l.filter((p) => p.userId === c)), l;
13247
+ });
13248
+ }
13218
13249
  /**
13219
13250
  * Gets chat messages in a paginated manner
13220
13251
  * @param {number} timeStamp
@@ -13225,10 +13256,10 @@ let ze = (Ag = class extends jt {
13225
13256
  */
13226
13257
  getMessages(t, e, r, i = 0, a = void 0) {
13227
13258
  return u(this, null, function* () {
13228
- const o = yield n(this, $e).getChatMessagesPaginated(t, e, r, i, a);
13259
+ const o = yield n(this, Oe).getChatMessagesPaginated(t, e, r, i, a);
13229
13260
  return {
13230
13261
  messages: o.messages.map(
13231
- (c) => ws.formatSocketPeerMessage(c)
13262
+ (c) => as.formatSocketPeerMessage(c)
13232
13263
  ),
13233
13264
  next: o.next
13234
13265
  };
@@ -13287,16 +13318,15 @@ let ze = (Ag = class extends jt {
13287
13318
  return n(this, fi).getChannelMembers(t);
13288
13319
  });
13289
13320
  }
13290
- searchMessages(r) {
13291
- return u(this, arguments, function* (t, e = {}) {
13292
- if (!n(this, vi).getValue("flagsmith").hasFeature(ee.FEAT_CHAT_SDK_SEARCH))
13293
- throw new b("searchMessages is temporarily disabled!", "0506");
13294
- return (yield n(this, $e).searchMessages(t, e)).map(ws.formatSocketPeerMessage);
13321
+ // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars
13322
+ searchMessages(t, e) {
13323
+ return u(this, null, function* () {
13324
+ throw new b("searchMessages is disabled! Please use `fetchMessages` method instead.", "0506");
13295
13325
  });
13296
13326
  }
13297
13327
  markLastReadMessage(t, e) {
13298
13328
  return u(this, null, function* () {
13299
- yield n(this, $e).markLastReadMessage(t, e);
13329
+ yield n(this, Oe).markLastReadMessage(t, e);
13300
13330
  const r = this.channels.find((i) => i.id === t);
13301
13331
  if (r) {
13302
13332
  const i = H(D({}, r), { unreadCount: 0 });
@@ -13310,8 +13340,8 @@ let ze = (Ag = class extends jt {
13310
13340
  get pinned() {
13311
13341
  return this.messages.filter((t) => t.pinned);
13312
13342
  }
13313
- }, Z = new WeakMap(), mi = new WeakMap(), $e = new WeakMap(), fi = new WeakMap(), vi = new WeakMap(), xd = new WeakSet(), Mf = function() {
13314
- return n(this, vi).getValue("connectionHandler");
13343
+ }, Z = new WeakMap(), mi = new WeakMap(), Oe = new WeakMap(), fi = new WeakMap(), $n = new WeakMap(), xd = new WeakSet(), Mf = function() {
13344
+ return n(this, $n).getValue("connectionHandler");
13315
13345
  }, No = new WeakSet(), Lu = function() {
13316
13346
  return n(this, xd, Mf).socketJoined === !0;
13317
13347
  }, Ag);
@@ -13371,15 +13401,15 @@ var s0 = Object.defineProperty, r0 = Object.getOwnPropertyDescriptor, i0 = (s, t
13371
13401
  for (var i = r > 1 ? void 0 : r ? r0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
13372
13402
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
13373
13403
  return r && i && s0(t, e, i), i;
13374
- }, Si, Mg;
13404
+ }, vi, Mg;
13375
13405
  const ni = (Mg = class {
13376
13406
  constructor(s, t, e, r, i) {
13377
13407
  h(this, "chat");
13378
13408
  h(this, "chatSocketHandler");
13379
13409
  h(this, "chatChannelSocketHandler");
13380
13410
  h(this, "self");
13381
- m(this, Si, void 0);
13382
- f(this, Si, s), this.chatSocketHandler = t, this.chatChannelSocketHandler = e, this.chat = new ze(
13411
+ m(this, vi, void 0);
13412
+ f(this, vi, s), this.chatSocketHandler = t, this.chatChannelSocketHandler = e, this.chat = new ze(
13383
13413
  s,
13384
13414
  t,
13385
13415
  e,
@@ -13392,14 +13422,14 @@ const ni = (Mg = class {
13392
13422
  * Not for external use
13393
13423
  */
13394
13424
  get telemetry() {
13395
- return n(this, Si).getValue("telemetry");
13425
+ return n(this, vi).getValue("telemetry");
13396
13426
  }
13397
13427
  /**
13398
13428
  * @access private
13399
13429
  * Not for external use
13400
13430
  */
13401
13431
  get logger() {
13402
- return n(this, Si).getValue("logger");
13432
+ return n(this, vi).getValue("logger");
13403
13433
  }
13404
13434
  static init(s, t, e, r, i) {
13405
13435
  return u(this, null, function* () {
@@ -13489,7 +13519,7 @@ const ni = (Mg = class {
13489
13519
  });
13490
13520
  }
13491
13521
  setupEvents() {
13492
- n(this, Si).getValue("peerSessionStore").on(
13522
+ n(this, vi).getValue("peerSessionStore").on(
13493
13523
  k.SOCKET_SERVICE_ROOM_JOINED,
13494
13524
  () => u(this, null, function* () {
13495
13525
  this.getChatMessages();
@@ -13569,7 +13599,7 @@ const ni = (Mg = class {
13569
13599
  ), this.chatChannelSocketHandler.on(
13570
13600
  li.createChatChannel,
13571
13601
  (s) => {
13572
- const [t] = s.chatChannels, e = dn.formatChannel(t);
13602
+ const [t] = s.chatChannels, e = cn.formatChannel(t);
13573
13603
  this.chat.channels.push(e), this.chat.emit("channelCreate", e);
13574
13604
  }
13575
13605
  ), this.chatSocketHandler.on(
@@ -13588,16 +13618,16 @@ const ni = (Mg = class {
13588
13618
  ), this.chatChannelSocketHandler.on(
13589
13619
  li.updateChatChannel,
13590
13620
  (s) => {
13591
- const [t] = s.chatChannels, e = dn.formatChannel(t);
13621
+ const [t] = s.chatChannels, e = cn.formatChannel(t);
13592
13622
  this.chat.channels = this.chat.channels.map((r) => r.id === e.id ? e : r), this.chat.emit("channelUpdate", e);
13593
13623
  }
13594
13624
  );
13595
13625
  }
13596
- }, Si = new WeakMap(), Mg);
13597
- let ws = ni;
13626
+ }, vi = new WeakMap(), Mg);
13627
+ let as = ni;
13598
13628
  i0([
13599
13629
  E.trace("ChatController.setupEvents")
13600
- ], ws.prototype, "setupEvents", 1);
13630
+ ], as.prototype, "setupEvents", 1);
13601
13631
  var n0 = Object.defineProperty, a0 = Object.getOwnPropertyDescriptor, o0 = (s, t, e, r) => {
13602
13632
  for (var i = r > 1 ? void 0 : r ? a0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
13603
13633
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
@@ -13687,14 +13717,14 @@ var c0 = Object.defineProperty, d0 = Object.getOwnPropertyDescriptor, l0 = (s, t
13687
13717
  for (var i = r > 1 ? void 0 : r ? d0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
13688
13718
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
13689
13719
  return r && i && c0(t, e, i), i;
13690
- }, Dr, Hn, Ti, Og;
13691
- const yn = (Og = class {
13720
+ }, Dr, Hn, Si, Og;
13721
+ const Tn = (Og = class {
13692
13722
  constructor(s, t, e) {
13693
13723
  h(this, "polls");
13694
13724
  m(this, Dr, void 0);
13695
13725
  m(this, Hn, void 0);
13696
- m(this, Ti, void 0);
13697
- this.polls = new xu(s, t, e), f(this, Hn, t), f(this, Dr, s), f(this, Ti, e), this.setupEvents();
13726
+ m(this, Si, void 0);
13727
+ this.polls = new xu(s, t, e), f(this, Hn, t), f(this, Dr, s), f(this, Si, e), this.setupEvents();
13698
13728
  }
13699
13729
  /**
13700
13730
  * @access private
@@ -13712,7 +13742,7 @@ const yn = (Og = class {
13712
13742
  }
13713
13743
  static init(s, t, e) {
13714
13744
  return u(this, null, function* () {
13715
- return new yn(s, t, e);
13745
+ return new Tn(s, t, e);
13716
13746
  });
13717
13747
  }
13718
13748
  canViewPolls() {
@@ -13721,25 +13751,25 @@ const yn = (Og = class {
13721
13751
  setupEvents() {
13722
13752
  const s = {
13723
13753
  [Ws.createPoll]: (r) => {
13724
- r.poll && this.updatePoll(yn.formatSocketServicePoll(r.poll));
13754
+ r.poll && this.updatePoll(Tn.formatSocketServicePoll(r.poll));
13725
13755
  },
13726
13756
  [Ws.updatePoll]: (r) => {
13727
- r.poll && this.updatePoll(yn.formatSocketServicePoll(r.poll));
13757
+ r.poll && this.updatePoll(Tn.formatSocketServicePoll(r.poll));
13728
13758
  },
13729
13759
  [Ws.votePoll]: (r) => {
13730
- r.poll && this.updatePoll(yn.formatSocketServicePoll(r.poll));
13760
+ r.poll && this.updatePoll(Tn.formatSocketServicePoll(r.poll));
13731
13761
  }
13732
13762
  }, t = () => {
13733
13763
  n(this, Dr).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
13734
13764
  this.getPolls();
13735
13765
  }), Object.keys(s).map(Number).forEach((r) => {
13736
- n(this, Ti).on(r, s[r]);
13766
+ n(this, Si).on(r, s[r]);
13737
13767
  });
13738
13768
  }, e = () => {
13739
13769
  n(this, Dr).getValue("peerSessionStore").on(k.SOCKET_SERVICE_ROOM_JOINED, () => {
13740
13770
  this.getPolls();
13741
13771
  }), Object.keys(s).map(Number).forEach((r) => {
13742
- n(this, Ti).removeListeners(r);
13772
+ n(this, Si).removeListeners(r);
13743
13773
  });
13744
13774
  };
13745
13775
  n(this, Hn).permissions.on("permissionsUpdate", (r) => u(this, null, function* () {
@@ -13763,12 +13793,12 @@ const yn = (Og = class {
13763
13793
  }
13764
13794
  getPolls() {
13765
13795
  return u(this, null, function* () {
13766
- const s = yield n(this, Ti).getPolls();
13796
+ const s = yield n(this, Si).getPolls();
13767
13797
  if (!(s != null && s.payload))
13768
13798
  return;
13769
13799
  const { polls: t } = EM.fromBinary(s.payload);
13770
13800
  this.polls.items = t.map(
13771
- (e) => yn.formatSocketServicePoll(e)
13801
+ (e) => Tn.formatSocketServicePoll(e)
13772
13802
  );
13773
13803
  });
13774
13804
  }
@@ -13792,8 +13822,8 @@ const yn = (Og = class {
13792
13822
  voted: s.votes
13793
13823
  };
13794
13824
  }
13795
- }, Dr = new WeakMap(), Hn = new WeakMap(), Ti = new WeakMap(), Og);
13796
- let Nf = yn;
13825
+ }, Dr = new WeakMap(), Hn = new WeakMap(), Si = new WeakMap(), Og);
13826
+ let Nf = Tn;
13797
13827
  l0([
13798
13828
  E.trace("PollController.setupEvents")
13799
13829
  ], Nf.prototype, "setupEvents", 1);
@@ -13801,7 +13831,7 @@ var u0 = Object.defineProperty, h0 = Object.getOwnPropertyDescriptor, p0 = (s, t
13801
13831
  for (var i = r > 1 ? void 0 : r ? h0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
13802
13832
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
13803
13833
  return r && i && u0(t, e, i), i;
13804
- }, Vf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Vf || {}), qn, Lo, $u, yi, xo, Ng;
13834
+ }, Vf = /* @__PURE__ */ ((s) => (s[s.User = 0] = "User", s[s.Meeting = 1] = "Meeting", s))(Vf || {}), qn, Lo, $u, Ti, xo, Ng;
13805
13835
  let Uu = (Ng = class extends jt {
13806
13836
  /**
13807
13837
  * @param {Context} context
@@ -13823,7 +13853,7 @@ let Uu = (Ng = class extends jt {
13823
13853
  */
13824
13854
  h(this, "broadcastTabChanges");
13825
13855
  m(this, qn, void 0);
13826
- m(this, yi, void 0);
13856
+ m(this, Ti, void 0);
13827
13857
  m(this, xo, void 0);
13828
13858
  /**
13829
13859
  * The `viewType` tells the type of the meeting
@@ -13842,7 +13872,7 @@ let Uu = (Ng = class extends jt {
13842
13872
  * (Experimental) The sessionId this meeting object is part of.
13843
13873
  */
13844
13874
  h(this, "sessionId");
13845
- f(this, qn, t), f(this, yi, e), this.viewType = r, f(this, xo, i), this.meetingTitle = a, this.broadcastTabChanges = e.permissions.canSpotlight;
13875
+ f(this, qn, t), f(this, Ti, e), this.viewType = r, f(this, xo, i), this.meetingTitle = a, this.broadcastTabChanges = e.permissions.canSpotlight;
13846
13876
  }
13847
13877
  get socketState() {
13848
13878
  return n(this, Lo, $u).socketState;
@@ -13861,7 +13891,7 @@ let Uu = (Ng = class extends jt {
13861
13891
  * @param {boolean} broadcastTabChanges
13862
13892
  */
13863
13893
  setBroadcastTabChanges(t) {
13864
- if (!n(this, yi).permissions.canSpotlight)
13894
+ if (!n(this, Ti).permissions.canSpotlight)
13865
13895
  throw this.logger.error("Spotlight::setSpotlighted::permission_denied"), new b("User does not have permission to toggle spotlight", "0801");
13866
13896
  this.broadcastTabChanges = t, this.emit("broadcastTabChangesUpdate", this.broadcastTabChanges), this.broadcastTabChanges && this.assertActiveTabToRoom();
13867
13897
  }
@@ -13879,17 +13909,17 @@ let Uu = (Ng = class extends jt {
13879
13909
  type: t.type
13880
13910
  }
13881
13911
  }
13882
- }), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this, yi).permissions) != null && r.canSpotlight && this.broadcastTabChanges && e === 0 && this.assertActiveTabToRoom();
13912
+ }), this.selfActiveTab = t, e === 0 && this.emit("selfTabUpdate", t), (r = n(this, Ti).permissions) != null && r.canSpotlight && this.broadcastTabChanges && e === 0 && this.assertActiveTabToRoom();
13883
13913
  }
13884
13914
  assertActiveTabToRoom() {
13885
13915
  n(this, xo).broadcastMessage("spotlight", {
13886
- userId: n(this, yi).userId,
13916
+ userId: n(this, Ti).userId,
13887
13917
  currentTab: this.selfActiveTab
13888
13918
  });
13889
13919
  }
13890
13920
  }, qn = new WeakMap(), Lo = new WeakSet(), $u = function() {
13891
13921
  return n(this, qn).getValue("connectionHandler");
13892
- }, yi = new WeakMap(), xo = new WeakMap(), Ng);
13922
+ }, Ti = new WeakMap(), xo = new WeakMap(), Ng);
13893
13923
  Uu = p0([
13894
13924
  ut("0800")
13895
13925
  ], Uu);
@@ -13950,7 +13980,7 @@ let Zr = (Vg = class extends jt {
13950
13980
  d
13951
13981
  ]] = g0(t);
13952
13982
  return {
13953
- id: on(),
13983
+ id: an(),
13954
13984
  name: c,
13955
13985
  peerId: i,
13956
13986
  userId: a,
@@ -14229,7 +14259,7 @@ const lo = {}, Pr = {
14229
14259
  };
14230
14260
  }
14231
14261
  };
14232
- var y0 = Object.defineProperty, E0 = Object.getOwnPropertyDescriptor, mn = (s, t, e, r) => {
14262
+ var y0 = Object.defineProperty, E0 = Object.getOwnPropertyDescriptor, gn = (s, t, e, r) => {
14233
14263
  for (var i = r > 1 ? void 0 : r ? E0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
14234
14264
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
14235
14265
  return r && i && y0(t, e, i), i;
@@ -14434,22 +14464,22 @@ Qt = new WeakMap(), Fd = new WeakMap(), ie = new WeakMap(), $o = new WeakMap(),
14434
14464
  this.status !== e && n(this, We).setValue("stageStatus", e);
14435
14465
  });
14436
14466
  };
14437
- mn([
14467
+ gn([
14438
14468
  E.trace("Stage.getStageRequests")
14439
14469
  ], ti.prototype, "getAccessRequests", 1);
14440
- mn([
14470
+ gn([
14441
14471
  E.trace("Stage.requestAccess")
14442
14472
  ], ti.prototype, "requestAccess", 1);
14443
- mn([
14473
+ gn([
14444
14474
  E.trace("Stage.cancelRequestAccess")
14445
14475
  ], ti.prototype, "cancelRequestAccess", 1);
14446
- mn([
14476
+ gn([
14447
14477
  E.trace("Stage.grantAccess")
14448
14478
  ], ti.prototype, "grantAccess", 1);
14449
- mn([
14479
+ gn([
14450
14480
  E.trace("Stage.denyAccess")
14451
14481
  ], ti.prototype, "denyAccess", 1);
14452
- mn([
14482
+ gn([
14453
14483
  Pr.executeWithLock({
14454
14484
  methodName: "joinStage",
14455
14485
  lockName: "Stage.join",
@@ -14457,7 +14487,7 @@ mn([
14457
14487
  }),
14458
14488
  E.trace("Stage.joinStage")
14459
14489
  ], ti.prototype, "join", 1);
14460
- mn([
14490
+ gn([
14461
14491
  E.trace("Stage.leaveStage")
14462
14492
  ], ti.prototype, "leave", 1);
14463
14493
  function P0(s) {
@@ -14483,12 +14513,12 @@ var _0 = Object.defineProperty, C0 = Object.getOwnPropertyDescriptor, w0 = (s, t
14483
14513
  for (var i = r > 1 ? void 0 : r ? C0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
14484
14514
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
14485
14515
  return r && i && _0(t, e, i), i;
14486
- }, Nr, gs, Vr, Bo, mt;
14516
+ }, Nr, ms, Vr, Bo, mt;
14487
14517
  class $f {
14488
14518
  constructor(t, e, r, i, a) {
14489
14519
  h(this, "stage");
14490
14520
  m(this, Nr, void 0);
14491
- m(this, gs, void 0);
14521
+ m(this, ms, void 0);
14492
14522
  m(this, Vr, void 0);
14493
14523
  m(this, Bo, 0);
14494
14524
  m(this, mt, void 0);
@@ -14498,7 +14528,7 @@ class $f {
14498
14528
  a,
14499
14529
  e,
14500
14530
  r
14501
- ), f(this, Vr, e), f(this, Nr, i), f(this, gs, a), this.setupEvents();
14531
+ ), f(this, Vr, e), f(this, Nr, i), f(this, ms, a), this.setupEvents();
14502
14532
  }
14503
14533
  /**
14504
14534
  * @access private
@@ -14535,7 +14565,7 @@ class $f {
14535
14565
  );
14536
14566
  }
14537
14567
  getCurrentStageRequests() {
14538
- return n(this, gs).joined.toArray().filter(
14568
+ return n(this, ms).joined.toArray().filter(
14539
14569
  (e) => e.stageStatus === "REQUESTED_TO_JOIN_STAGE"
14540
14570
  ).map((e) => ({
14541
14571
  displayName: e.name,
@@ -14576,14 +14606,14 @@ class $f {
14576
14606
  */
14577
14607
  peerStageStatusHandler(t) {
14578
14608
  return u(this, null, function* () {
14579
- const e = n(this, gs).joined.get(t.peerId), r = n(this, gs).viewMode === "ACTIVE_GRID";
14609
+ const e = n(this, ms).joined.get(t.peerId), r = n(this, ms).viewMode === "ACTIVE_GRID";
14580
14610
  if (!e) {
14581
14611
  this.logger.warn("err::peerStageStatusUpdate: participant not found");
14582
14612
  return;
14583
14613
  }
14584
14614
  switch (t.stageType) {
14585
14615
  case 1:
14586
- e.setStageStatus("ON_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this, gs).viewMode, page: n(this, gs).currentPage });
14616
+ e.setStageStatus("ON_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this, ms).viewMode, page: n(this, ms).currentPage });
14587
14617
  break;
14588
14618
  case 2:
14589
14619
  e.setStageStatus("ACCEPTED_TO_JOIN_STAGE");
@@ -14594,7 +14624,7 @@ class $f {
14594
14624
  case 0:
14595
14625
  case 4:
14596
14626
  default:
14597
- e.setStageStatus("OFF_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this, gs).viewMode, page: n(this, gs).currentPage });
14627
+ e.setStageStatus("OFF_STAGE"), r && n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: n(this, ms).viewMode, page: n(this, ms).currentPage });
14598
14628
  break;
14599
14629
  }
14600
14630
  n(this, mt).getValue("peerSessionStore").emit(k.UPDATE_PEER_STAGE_STATUS, {
@@ -14604,7 +14634,7 @@ class $f {
14604
14634
  });
14605
14635
  }
14606
14636
  }
14607
- Nr = new WeakMap(), gs = new WeakMap(), Vr = new WeakMap(), Bo = new WeakMap(), mt = new WeakMap();
14637
+ Nr = new WeakMap(), ms = new WeakMap(), Vr = new WeakMap(), Bo = new WeakMap(), mt = new WeakMap();
14608
14638
  w0([
14609
14639
  E.trace("Stage.setupEvents")
14610
14640
  ], $f.prototype, "setupEvents", 1);
@@ -15027,7 +15057,7 @@ Hl([
15027
15057
  Ua = Hl([
15028
15058
  ut("0600")
15029
15059
  ], Ua);
15030
- var Oe, Ei;
15060
+ var Ne, yi;
15031
15061
  class Ff extends Map {
15032
15062
  constructor(e, r = void 0) {
15033
15063
  const {
@@ -15036,54 +15066,54 @@ class Ff extends Map {
15036
15066
  onClearEvent: o
15037
15067
  } = e;
15038
15068
  super();
15039
- m(this, Oe, void 0);
15040
- m(this, Ei, void 0);
15069
+ m(this, Ne, void 0);
15070
+ m(this, yi, void 0);
15041
15071
  h(this, "onAddEvent");
15042
15072
  h(this, "onDeleteEvent");
15043
15073
  h(this, "onClearEvent");
15044
- f(this, Oe, new $a(r)), this.onAddEvent = i, this.onDeleteEvent = a, this.onClearEvent = o, f(this, Ei, /* @__PURE__ */ new Map());
15074
+ f(this, Ne, new $a(r)), this.onAddEvent = i, this.onDeleteEvent = a, this.onClearEvent = o, f(this, yi, /* @__PURE__ */ new Map());
15045
15075
  }
15046
15076
  emit(e, ...r) {
15047
- return n(this, Oe).emit(e, ...r);
15077
+ return n(this, Ne).emit(e, ...r);
15048
15078
  }
15049
15079
  on(e, r) {
15050
- return n(this, Oe).on(e, r);
15080
+ return n(this, Ne).on(e, r);
15051
15081
  }
15052
15082
  addListener(e, r) {
15053
- return n(this, Oe).addListener(e, r);
15083
+ return n(this, Ne).addListener(e, r);
15054
15084
  }
15055
15085
  off(e, r) {
15056
- return n(this, Oe).off(e, r);
15086
+ return n(this, Ne).off(e, r);
15057
15087
  }
15058
15088
  once(e, r) {
15059
- return n(this, Oe).once(e, r);
15089
+ return n(this, Ne).once(e, r);
15060
15090
  }
15061
15091
  prependListener(e, r) {
15062
- return n(this, Oe).prependListener(e, r);
15092
+ return n(this, Ne).prependListener(e, r);
15063
15093
  }
15064
15094
  prependOnceListener(e, r) {
15065
- return n(this, Oe).prependOnceListener(e, r);
15095
+ return n(this, Ne).prependOnceListener(e, r);
15066
15096
  }
15067
15097
  removeListener(e, r) {
15068
- return n(this, Oe).removeListener(e, r);
15098
+ return n(this, Ne).removeListener(e, r);
15069
15099
  }
15070
15100
  removeAllListeners(e) {
15071
- return n(this, Oe).removeAllListeners(e);
15101
+ return n(this, Ne).removeAllListeners(e);
15072
15102
  }
15073
15103
  listeners(e) {
15074
- return n(this, Oe).listeners(e);
15104
+ return n(this, Ne).listeners(e);
15075
15105
  }
15076
15106
  listenerCount(e) {
15077
- return n(this, Oe).listenerCount(e);
15107
+ return n(this, Ne).listenerCount(e);
15078
15108
  }
15079
15109
  getMaxListeners() {
15080
- return n(this, Oe).getMaxListeners();
15110
+ return n(this, Ne).getMaxListeners();
15081
15111
  }
15082
15112
  setMaxListeners(e) {
15083
- return n(this, Oe).setMaxListeners(e);
15113
+ return n(this, Ne).setMaxListeners(e);
15084
15114
  }
15085
15115
  eventNames() {
15086
- return n(this, Oe).eventNames();
15116
+ return n(this, Ne).eventNames();
15087
15117
  }
15088
15118
  add(e, r = !0) {
15089
15119
  return this.set(e.id, e, r);
@@ -15092,28 +15122,28 @@ class Ff extends Map {
15092
15122
  const a = super.set(e, r), o = (c, ...d) => {
15093
15123
  this.emit(c, r, ...d);
15094
15124
  };
15095
- return n(this, Ei).set(e, o), r.on("*", o), i && n(this, Oe).emit(this.onAddEvent, r), a;
15125
+ return n(this, yi).set(e, o), r.on("*", o), i && n(this, Ne).emit(this.onAddEvent, r), a;
15096
15126
  }
15097
15127
  delete(e, r = !0, i = !1) {
15098
15128
  const a = this.get(e);
15099
15129
  if (!a)
15100
15130
  return !1;
15101
- a.removeListener("*", n(this, Ei).get(e));
15131
+ a.removeListener("*", n(this, yi).get(e));
15102
15132
  const o = super.delete(e);
15103
- return i && a.removeAllListeners(), r && n(this, Oe).emit(this.onDeleteEvent, a), o;
15133
+ return i && a.removeAllListeners(), r && n(this, Ne).emit(this.onDeleteEvent, a), o;
15104
15134
  }
15105
15135
  clear(e = !0, r = !1) {
15106
15136
  this.forEach((a) => {
15107
- a.removeListener("*", n(this, Ei).get(a.id)), r && a.removeAllListeners();
15137
+ a.removeListener("*", n(this, yi).get(a.id)), r && a.removeAllListeners();
15108
15138
  });
15109
15139
  const i = super.clear();
15110
- return e && n(this, Oe).emit(this.onClearEvent), i;
15140
+ return e && n(this, Ne).emit(this.onClearEvent), i;
15111
15141
  }
15112
15142
  toArray() {
15113
15143
  return Array.from(this.values());
15114
15144
  }
15115
15145
  }
15116
- Oe = new WeakMap(), Ei = new WeakMap();
15146
+ Ne = new WeakMap(), yi = new WeakMap();
15117
15147
  class pg extends Ff {
15118
15148
  constructor(t) {
15119
15149
  super({
@@ -15156,28 +15186,28 @@ var M0 = Object.defineProperty, D0 = Object.getOwnPropertyDescriptor, ql = (s, t
15156
15186
  for (var i = r > 1 ? void 0 : r ? D0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
15157
15187
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
15158
15188
  return r && i && M0(t, e, i), i;
15159
- }, Xt, Yn, ms, Ug;
15189
+ }, Xt, Yn, fs, Ug;
15160
15190
  const Bf = (Ug = class {
15161
15191
  constructor(s, t, e, r) {
15162
15192
  h(this, "plugins");
15163
15193
  m(this, Xt, void 0);
15164
15194
  m(this, Yn, void 0);
15165
- m(this, ms, void 0);
15166
- f(this, Xt, t), f(this, Yn, e), f(this, ms, s), this.plugins = r, this.setupEvents();
15195
+ m(this, fs, void 0);
15196
+ f(this, Xt, t), f(this, Yn, e), f(this, fs, s), this.plugins = r, this.setupEvents();
15167
15197
  }
15168
15198
  /**
15169
15199
  * @access private
15170
15200
  * Not for external use
15171
15201
  */
15172
15202
  get telemetry() {
15173
- return n(this, ms).getValue("telemetry");
15203
+ return n(this, fs).getValue("telemetry");
15174
15204
  }
15175
15205
  /**
15176
15206
  * @access private
15177
15207
  * Not for external use
15178
15208
  */
15179
15209
  get logger() {
15180
- return n(this, ms).getValue("logger");
15210
+ return n(this, fs).getValue("logger");
15181
15211
  }
15182
15212
  static init(s, t, e, r, i, a, o, c) {
15183
15213
  return u(this, null, function* () {
@@ -15251,7 +15281,7 @@ const Bf = (Ug = class {
15251
15281
  }
15252
15282
  this.plugins.active.delete(t);
15253
15283
  }
15254
- ), n(this, ms).getValue("peerSessionStore").onAsync(k.SOCKET_SERVICE_ROOM_JOINED, () => u(this, null, function* () {
15284
+ ), n(this, fs).getValue("peerSessionStore").onAsync(k.SOCKET_SERVICE_ROOM_JOINED, () => u(this, null, function* () {
15255
15285
  yield this.getRoomPlugins(), this.logger.debug("[SOCKET_SERVICE_ROOM_JOINED] resolved request to fetch plugins.");
15256
15286
  })), n(this, Xt).on(
15257
15287
  J.addPlugin,
@@ -15341,7 +15371,7 @@ const Bf = (Ug = class {
15341
15371
  ), n(this, Yn).on(
15342
15372
  Re.sendMessageToPeers,
15343
15373
  (s) => {
15344
- const t = ws == null ? void 0 : ws.formatSocketPeerMessage(
15374
+ const t = as == null ? void 0 : as.formatSocketPeerMessage(
15345
15375
  s.message
15346
15376
  );
15347
15377
  this.broadcastIframeEvent(Ie.chatMessage, { message: t });
@@ -15349,23 +15379,23 @@ const Bf = (Ug = class {
15349
15379
  ), n(this, Yn).on(
15350
15380
  Re.sendMessageToRoom,
15351
15381
  (s) => {
15352
- const t = ws == null ? void 0 : ws.formatSocketPeerMessage(
15382
+ const t = as == null ? void 0 : as.formatSocketPeerMessage(
15353
15383
  s.message
15354
15384
  );
15355
15385
  this.broadcastIframeEvent(Ie.chatMessage, { message: t });
15356
15386
  }
15357
- ), n(this, ms).getValue("peerSessionStore").on(k.PEER_JOINED_INTERNAL, (s) => {
15387
+ ), n(this, fs).getValue("peerSessionStore").on(k.PEER_JOINED_INTERNAL, (s) => {
15358
15388
  const t = bd(s);
15359
15389
  this.broadcastIframeEvent(Ie.peerJoined, t);
15360
- }), n(this, ms).getValue("peerSessionStore").on(k.PEER_CLOSED, (s) => {
15390
+ }), n(this, fs).getValue("peerSessionStore").on(k.PEER_CLOSED, (s) => {
15361
15391
  this.broadcastIframeEvent(Ie.peerLeft, s);
15362
- }), n(this, ms).getValue("peerSessionStore").on(k.UPDATE_PEER_STAGE_STATUS, (s) => {
15392
+ }), n(this, fs).getValue("peerSessionStore").on(k.UPDATE_PEER_STAGE_STATUS, (s) => {
15363
15393
  this.broadcastIframeEvent(Ie.peerStageStatusUpdate, s);
15364
- }), n(this, ms).subscribe("stageStatus", (s) => {
15394
+ }), n(this, fs).subscribe("stageStatus", (s) => {
15365
15395
  this.broadcastIframeEvent(Ie.stageStatusUpdate, s);
15366
15396
  });
15367
15397
  }
15368
- }, Xt = new WeakMap(), Yn = new WeakMap(), ms = new WeakMap(), Ug);
15398
+ }, Xt = new WeakMap(), Yn = new WeakMap(), fs = new WeakMap(), Ug);
15369
15399
  let Hc = Bf;
15370
15400
  ql([
15371
15401
  E.trace("PluginController.getRoomPlugins")
@@ -15460,7 +15490,7 @@ var N0 = Object.defineProperty, V0 = Object.getOwnPropertyDescriptor, qc = (s, t
15460
15490
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
15461
15491
  return r && i && N0(t, e, i), i;
15462
15492
  }, Qn, Xn, Zn, pd, $g;
15463
- let ln = ($g = class extends jt {
15493
+ let dn = ($g = class extends jt {
15464
15494
  constructor(t, e) {
15465
15495
  const r = t.getValue("logger");
15466
15496
  super(r);
@@ -15561,56 +15591,56 @@ let ln = ($g = class extends jt {
15561
15591
  }, $g);
15562
15592
  qc([
15563
15593
  E.trace("Recording.start")
15564
- ], ln.prototype, "start", 1);
15594
+ ], dn.prototype, "start", 1);
15565
15595
  qc([
15566
15596
  E.trace("Recording.stop")
15567
- ], ln.prototype, "stop", 1);
15597
+ ], dn.prototype, "stop", 1);
15568
15598
  qc([
15569
15599
  E.trace("Recording.stop")
15570
- ], ln.prototype, "pause", 1);
15600
+ ], dn.prototype, "pause", 1);
15571
15601
  qc([
15572
15602
  E.trace("Recording.stop")
15573
- ], ln.prototype, "resume", 1);
15574
- ln = qc([
15603
+ ], dn.prototype, "resume", 1);
15604
+ dn = qc([
15575
15605
  ut("1000")
15576
- ], ln);
15606
+ ], dn);
15577
15607
  var L0 = Object.defineProperty, x0 = Object.getOwnPropertyDescriptor, U0 = (s, t, e, r) => {
15578
15608
  for (var i = r > 1 ? void 0 : r ? x0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
15579
15609
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
15580
15610
  return r && i && L0(t, e, i), i;
15581
- }, Pi;
15611
+ }, Ei;
15582
15612
  class Hf {
15583
15613
  constructor(t, e, r) {
15584
15614
  h(this, "recording");
15585
15615
  h(this, "room");
15586
- m(this, Pi, void 0);
15587
- f(this, Pi, t), this.recording = new ln(t, e), this.room = r, this.setupEvents();
15616
+ m(this, Ei, void 0);
15617
+ f(this, Ei, t), this.recording = new dn(t, e), this.room = r, this.setupEvents();
15588
15618
  }
15589
15619
  /**
15590
15620
  * @access private
15591
15621
  * Not for external use
15592
15622
  */
15593
15623
  get telemetry() {
15594
- return n(this, Pi).getValue("telemetry");
15624
+ return n(this, Ei).getValue("telemetry");
15595
15625
  }
15596
15626
  /**
15597
15627
  * @access private
15598
15628
  * Not for external use
15599
15629
  */
15600
15630
  get logger() {
15601
- return n(this, Pi).getValue("logger");
15631
+ return n(this, Ei).getValue("logger");
15602
15632
  }
15603
15633
  // eslint-disable-next-line class-methods-use-this
15604
15634
  getRecordingTypeFromProtoType(t) {
15605
15635
  let e;
15606
15636
  switch (t) {
15607
- case nn.BROWSER:
15637
+ case rn.BROWSER:
15608
15638
  e = "BROWSER";
15609
15639
  break;
15610
- case nn.COMPOSITE:
15640
+ case rn.COMPOSITE:
15611
15641
  e = "COMPOSITE";
15612
15642
  break;
15613
- case nn.TRACK:
15643
+ case rn.TRACK:
15614
15644
  e = "TRACK";
15615
15645
  break;
15616
15646
  default:
@@ -15619,7 +15649,7 @@ class Hf {
15619
15649
  return e;
15620
15650
  }
15621
15651
  setupEvents() {
15622
- n(this, Pi).getValue("peerSessionStore").on(k.ROOM_STATE, (t) => {
15652
+ n(this, Ei).getValue("peerSessionStore").on(k.ROOM_STATE, (t) => {
15623
15653
  t.activeRecordings.length !== 0 ? this.recording.updateRecordings(
15624
15654
  t.activeRecordings.map((e) => {
15625
15655
  const r = this.getRecordingTypeFromProtoType(e.recordingType);
@@ -15651,28 +15681,28 @@ class Hf {
15651
15681
  });
15652
15682
  }
15653
15683
  }
15654
- Pi = new WeakMap();
15684
+ Ei = new WeakMap();
15655
15685
  U0([
15656
15686
  E.trace("RecordingController.setupEvents")
15657
15687
  ], Hf.prototype, "setupEvents", 1);
15658
- var _i;
15688
+ var Pi;
15659
15689
  class $0 {
15660
15690
  constructor(t) {
15661
- m(this, _i, void 0);
15662
- f(this, _i, t);
15691
+ m(this, Pi, void 0);
15692
+ f(this, Pi, t);
15663
15693
  }
15664
15694
  hasFeature(t) {
15665
15695
  var e;
15666
- return (e = n(this, _i).getValue("flagsmith").hasFeature(t)) != null ? e : !1;
15696
+ return (e = n(this, Pi).getValue("flagsmith").hasFeature(t)) != null ? e : !1;
15667
15697
  }
15668
15698
  getFeatureValue(t) {
15669
- return n(this, _i).getValue("flagsmith").getValue(t);
15699
+ return n(this, Pi).getValue("flagsmith").getValue(t);
15670
15700
  }
15671
15701
  getAllFeatures() {
15672
- return n(this, _i).getValue("flagsmith").getAllFlags();
15702
+ return n(this, Pi).getValue("flagsmith").getAllFlags();
15673
15703
  }
15674
15704
  }
15675
- _i = new WeakMap();
15705
+ Pi = new WeakMap();
15676
15706
  class Vh {
15677
15707
  constructor(t, e, r) {
15678
15708
  h(this, "logger");
@@ -16190,10 +16220,10 @@ function q0(s, t, e) {
16190
16220
  return c.stream.getAudioTracks()[0];
16191
16221
  });
16192
16222
  }
16193
- var Ci, jo;
16223
+ var _i, jo;
16194
16224
  class j0 {
16195
16225
  constructor(t) {
16196
- m(this, Ci, void 0);
16226
+ m(this, _i, void 0);
16197
16227
  m(this, jo, void 0);
16198
16228
  f(this, jo, t);
16199
16229
  }
@@ -16205,9 +16235,9 @@ class j0 {
16205
16235
  return n(this, jo).getValue("logger");
16206
16236
  }
16207
16237
  terminateMiddlewareWebWorker() {
16208
- if (n(this, Ci))
16238
+ if (n(this, _i))
16209
16239
  try {
16210
- nd.clearInterval(n(this, Ci)), f(this, Ci, void 0);
16240
+ nd.clearInterval(n(this, _i)), f(this, _i, void 0);
16211
16241
  } catch (t) {
16212
16242
  this.logger.debug("WorkerTimers::terminateMiddlewareWebWorker::failed");
16213
16243
  }
@@ -16258,7 +16288,7 @@ class j0 {
16258
16288
  o.addEventListener(
16259
16289
  "play",
16260
16290
  () => {
16261
- i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this, Ci, nd.setInterval(
16291
+ i.width = o.width || e.getSettings().width, i.height = o.width || e.getSettings().height, f(this, _i, nd.setInterval(
16262
16292
  l,
16263
16293
  50
16264
16294
  ));
@@ -16272,7 +16302,7 @@ class j0 {
16272
16302
  });
16273
16303
  }
16274
16304
  }
16275
- Ci = new WeakMap(), jo = new WeakMap();
16305
+ _i = new WeakMap(), jo = new WeakMap();
16276
16306
  const gg = {
16277
16307
  gross: { width: { ideal: 192 }, height: { ideal: 144 } },
16278
16308
  qvga: { width: { ideal: 384 }, height: { ideal: 288 } },
@@ -16352,7 +16382,7 @@ const gg = {
16352
16382
  }), i[c][1];
16353
16383
  };
16354
16384
  var he = /* @__PURE__ */ ((s) => (s.WEBCAM = "webcam", s.WEBCAM_BACKUP = "webcam_backup", s.MIC = "mic", s.SCREENSHARE_VIDEO = "screenshare_video", s.SCREENSHARE_AUDIO = "screenshare_audio", s))(he || {});
16355
- const J0 = g_(), Sn = Rs(
16385
+ const J0 = g_(), vn = Rs(
16356
16386
  J0.config.media
16357
16387
  );
16358
16388
  function K0(s) {
@@ -16363,15 +16393,15 @@ function K0(s) {
16363
16393
  enableHighBitrate: (r = s.audio.enableHighBitrate) != null ? r : !1
16364
16394
  }), t.video = s.video.quality, t;
16365
16395
  }
16366
- var wi, Os;
16396
+ var Ci, Os;
16367
16397
  class z0 {
16368
16398
  constructor(t, e) {
16369
- m(this, wi, void 0);
16399
+ m(this, Ci, void 0);
16370
16400
  m(this, Os, void 0);
16371
16401
  // eslint-disable-next-line class-methods-use-this
16372
16402
  h(this, "getScreenShareConstraints", () => {
16373
16403
  var l, p, g, v, S, P, _, C, w, L, F;
16374
- const t = (l = n(this, wi)) == null ? void 0 : l.screenshare, e = (g = (p = t == null ? void 0 : t.width) == null ? void 0 : p.max) != null ? g : 1920, r = (S = (v = t == null ? void 0 : t.height) == null ? void 0 : v.max) != null ? S : 1080, i = (_ = (P = t == null ? void 0 : t.frameRate) == null ? void 0 : P.max) != null ? _ : 5;
16404
+ const t = (l = n(this, Ci)) == null ? void 0 : l.screenshare, e = (g = (p = t == null ? void 0 : t.width) == null ? void 0 : p.max) != null ? g : 1920, r = (S = (v = t == null ? void 0 : t.height) == null ? void 0 : v.max) != null ? S : 1080, i = (_ = (P = t == null ? void 0 : t.frameRate) == null ? void 0 : P.max) != null ? _ : 5;
16375
16405
  let a = (w = (C = t == null ? void 0 : t.frameRate) == null ? void 0 : C.ideal) != null ? w : 5;
16376
16406
  const o = t == null ? void 0 : t.displaySurface, c = t == null ? void 0 : t.selfBrowserSurface;
16377
16407
  n(this, Os).getValue("flagsmith").getValue(ee.VAL_MIN_FRAMERATE) && (a = parseInt(
@@ -16400,7 +16430,7 @@ class z0 {
16400
16430
  // eslint-disable-next-line class-methods-use-this
16401
16431
  h(this, "getAudioConstraints", (t) => {
16402
16432
  var a, o, c, d, l, p, g;
16403
- const e = {}, r = (a = n(this, wi)) == null ? void 0 : a.audio, i = r != null && r.enableStereo ? 2 : 1;
16433
+ const e = {}, r = (a = n(this, Ci)) == null ? void 0 : a.audio, i = r != null && r.enableStereo ? 2 : 1;
16404
16434
  return ye.isFirefox() || ye.isWebKitBased() ? (e.audio = {
16405
16435
  deviceId: t,
16406
16436
  autoGainControl: (o = r == null ? void 0 : r.autoGainControl) != null ? o : !0,
@@ -16416,7 +16446,7 @@ class z0 {
16416
16446
  });
16417
16447
  h(this, "getVideoConstraints", (t) => {
16418
16448
  var a, o, c, d;
16419
- const e = {}, r = (a = n(this, wi)) == null ? void 0 : a.video;
16449
+ const e = {}, r = (a = n(this, Ci)) == null ? void 0 : a.video;
16420
16450
  let i = gg.vga;
16421
16451
  if (typeof r == "string" ? i = gg[r] : r !== void 0 && (i.height.ideal = r.height.ideal, i.width.ideal = r.width.ideal), i.frameRate = {
16422
16452
  ideal: (c = (o = i.frameRate) == null ? void 0 : o.ideal) != null ? c : 24
@@ -16428,14 +16458,14 @@ class z0 {
16428
16458
  }
16429
16459
  return e.video = i, typeof e.video == "boolean" || (t ? e.video.deviceId = { exact: t } : e.video.facingMode = "user"), e;
16430
16460
  });
16431
- f(this, Os, t), f(this, wi, e);
16461
+ f(this, Os, t), f(this, Ci, e);
16432
16462
  }
16433
16463
  // eslint-disable-next-line class-methods-use-this
16434
16464
  getUpdatedVideoConstraints(t) {
16435
16465
  return t;
16436
16466
  }
16437
16467
  }
16438
- wi = new WeakMap(), Os = new WeakMap();
16468
+ Ci = new WeakMap(), Os = new WeakMap();
16439
16469
  class pu extends Error {
16440
16470
  constructor(e, r, i) {
16441
16471
  super(r);
@@ -16476,28 +16506,28 @@ var Q0 = Object.defineProperty, X0 = Object.getOwnPropertyDescriptor, Ms = (s, t
16476
16506
  for (var i = r > 1 ? void 0 : r ? X0(t, e) : t, a = s.length - 1, o; a >= 0; a--)
16477
16507
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
16478
16508
  return r && i && Q0(t, e, i), i;
16479
- }, ea, es, Ne, Fg;
16509
+ }, ea, es, Ve, Fg;
16480
16510
  let qt = (Fg = class extends Y0 {
16481
16511
  constructor(t, e) {
16482
16512
  super();
16483
16513
  m(this, ea, void 0);
16484
16514
  m(this, es, void 0);
16485
- m(this, Ne, void 0);
16486
- f(this, Ne, t), f(this, es, new z0(t, e)), f(this, ea, new AbortController());
16515
+ m(this, Ve, void 0);
16516
+ f(this, Ve, t), f(this, es, new z0(t, e)), f(this, ea, new AbortController());
16487
16517
  }
16488
16518
  /**
16489
16519
  * @access private
16490
16520
  * Not for external use
16491
16521
  */
16492
16522
  get telemetry() {
16493
- return n(this, Ne).getValue("telemetry");
16523
+ return n(this, Ve).getValue("telemetry");
16494
16524
  }
16495
16525
  /**
16496
16526
  * @access private
16497
16527
  * Not for external use
16498
16528
  */
16499
16529
  get logger() {
16500
- return n(this, Ne).getValue("logger");
16530
+ return n(this, Ve).getValue("logger");
16501
16531
  }
16502
16532
  get constraintsBuilder() {
16503
16533
  return n(this, es);
@@ -16510,7 +16540,7 @@ let qt = (Fg = class extends Y0 {
16510
16540
  }
16511
16541
  handlePermissionErrors(t, e) {
16512
16542
  const r = sd(t, e.name, e.message);
16513
- return this.permissions[t] = r, n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_ERROR, {
16543
+ return this.permissions[t] = r, n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_ERROR, {
16514
16544
  message: r,
16515
16545
  constraints: e.constraints,
16516
16546
  kind: t
@@ -16545,14 +16575,14 @@ let qt = (Fg = class extends Y0 {
16545
16575
  });
16546
16576
  const _ = P.getAudioTracks()[0];
16547
16577
  let C = P.getVideoTracks()[0];
16548
- if (this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", n(this, Ne).getValue("flagsmith").hasFeature(ee.OBS_QUALITY) && C.label.includes("OBS Virtual")) {
16578
+ if (this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", n(this, Ve).getValue("flagsmith").hasFeature(ee.OBS_QUALITY) && C.label.includes("OBS Virtual")) {
16549
16579
  const F = (yield this.getVideoInputDevices()).find((N) => N.label.includes("OBS Virtual"));
16550
16580
  C = yield this.getVideoTrack(F.deviceId);
16551
16581
  }
16552
- return n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16582
+ return n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16553
16583
  message: this.permissions.audio,
16554
16584
  kind: "audio"
16555
- }), n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16585
+ }), n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16556
16586
  message: this.permissions.video,
16557
16587
  kind: "video"
16558
16588
  }), { audioTrack: _, videoTrack: C };
@@ -16566,7 +16596,7 @@ let qt = (Fg = class extends Y0 {
16566
16596
  var c, d;
16567
16597
  let r = yield this.getAudioInputDevices();
16568
16598
  if (!(r != null && r.length))
16569
- throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16599
+ throw this.permissions.audio = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16570
16600
  message: this.permissions.audio,
16571
16601
  kind: "audio"
16572
16602
  }), new b("No audio devices available", "1606");
@@ -16611,7 +16641,7 @@ let qt = (Fg = class extends Y0 {
16611
16641
  });
16612
16642
  try {
16613
16643
  const l = yield o(a);
16614
- return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16644
+ return l.enabled = !t, this.permissions.audio !== "ACCEPTED" && (this.permissions.audio = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16615
16645
  message: this.permissions.audio,
16616
16646
  kind: "audio"
16617
16647
  })), l;
@@ -16623,9 +16653,9 @@ let qt = (Fg = class extends Y0 {
16623
16653
  getVideoTrack(t) {
16624
16654
  return u(this, null, function* () {
16625
16655
  var l, p, g;
16626
- const e = n(this, Ne).getValue("flagsmith").hasFeature(ee.OBS_QUALITY), r = (l = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : l.includes("OBS Virtual"), i = e && r, a = yield this.getVideoInputDevices();
16656
+ const e = n(this, Ve).getValue("flagsmith").hasFeature(ee.OBS_QUALITY), r = (l = yield this.getCurrentDeviceLabel(t)) == null ? void 0 : l.includes("OBS Virtual"), i = e && r, a = yield this.getVideoInputDevices();
16627
16657
  if (!(a != null && a.length))
16628
- throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16658
+ throw this.permissions.video = "NO_DEVICES_AVAILABLE", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16629
16659
  message: this.permissions.video,
16630
16660
  kind: "video"
16631
16661
  }), new b("No video devices available", "1607");
@@ -16681,7 +16711,7 @@ let qt = (Fg = class extends Y0 {
16681
16711
  });
16682
16712
  try {
16683
16713
  const v = n(this, es).getVideoConstraints(c), S = yield d(v);
16684
- return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16714
+ return this.permissions.video !== "ACCEPTED" && (this.permissions.video = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16685
16715
  message: this.permissions.video,
16686
16716
  kind: "video"
16687
16717
  })), S;
@@ -16696,7 +16726,7 @@ let qt = (Fg = class extends Y0 {
16696
16726
  try {
16697
16727
  this.logger.info("getDisplayMediaWithoutTimeout::requesting_display_media", {
16698
16728
  constraints: JSON.stringify(e)
16699
- }), n(this, Ne).getValue("callstats").screenShareRequested();
16729
+ }), n(this, Ve).getValue("callstats").screenShareRequested();
16700
16730
  const r = yield navigator.mediaDevices.getDisplayMedia(
16701
16731
  e
16702
16732
  );
@@ -16709,7 +16739,7 @@ let qt = (Fg = class extends Y0 {
16709
16739
  r.name,
16710
16740
  r.message
16711
16741
  ), a = new pu(r.name, r.message, e), o = { video: !0 };
16712
- if (ew(e, o) || !n(this, Ne).getValue("flagsmith").hasFeature(ee.SCREEENSHARE_CONSTRAINTS_RETRY))
16742
+ if (ew(e, o) || !n(this, Ve).getValue("flagsmith").hasFeature(ee.SCREEENSHARE_CONSTRAINTS_RETRY))
16713
16743
  throw a;
16714
16744
  if (i === "COULD_NOT_START")
16715
16745
  return t(o);
@@ -16718,7 +16748,7 @@ let qt = (Fg = class extends Y0 {
16718
16748
  });
16719
16749
  try {
16720
16750
  const e = n(this, es).getScreenShareConstraints(), r = yield t(e);
16721
- return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this, Ne).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16751
+ return this.permissions.screenshare !== "ACCEPTED" && (this.permissions.screenshare = "ACCEPTED", n(this, Ve).getValue("peerSessionStore").emit(k.MEDIA_PERMISSION_UPDATE, {
16722
16752
  message: this.permissions.screenshare,
16723
16753
  kind: "screenshare"
16724
16754
  })), {
@@ -16832,7 +16862,7 @@ let qt = (Fg = class extends Y0 {
16832
16862
  devices: JSON.stringify(o)
16833
16863
  });
16834
16864
  const g = [...d.added, ...d.removed];
16835
- g.some((v) => v.kind === "audioinput") && n(this, Ne).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((v) => v.kind === "audioinput")), g.some((v) => v.kind === "videoinput") && n(this, Ne).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((v) => v.kind === "videoinput")), g.some((v) => v.kind === "audiooutput") && n(this, Ne).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((v) => v.kind === "audiooutput")), t(r, d, !1);
16865
+ g.some((v) => v.kind === "audioinput") && n(this, Ve).getValue("callstats").devices("AUDIO", o == null ? void 0 : o.filter((v) => v.kind === "audioinput")), g.some((v) => v.kind === "videoinput") && n(this, Ve).getValue("callstats").devices("VIDEO", o == null ? void 0 : o.filter((v) => v.kind === "videoinput")), g.some((v) => v.kind === "audiooutput") && n(this, Ve).getValue("callstats").devices("SPEAKER", o == null ? void 0 : o.filter((v) => v.kind === "audiooutput")), t(r, d, !1);
16836
16866
  }
16837
16867
  }),
16838
16868
  { signal: n(this, ea).signal }
@@ -16840,7 +16870,7 @@ let qt = (Fg = class extends Y0 {
16840
16870
  }
16841
16871
  });
16842
16872
  }
16843
- }, ea = new WeakMap(), es = new WeakMap(), Ne = new WeakMap(), Fg);
16873
+ }, ea = new WeakMap(), es = new WeakMap(), Ve = new WeakMap(), Fg);
16844
16874
  Ms([
16845
16875
  E.trace("WebMediaInterface.destruct")
16846
16876
  ], qt.prototype, "destruct", 1);
@@ -16874,7 +16904,7 @@ Ms([
16874
16904
  qt = Ms([
16875
16905
  ut("1600")
16876
16906
  ], qt);
16877
- const qf = qt, an = {
16907
+ const qf = qt, nn = {
16878
16908
  setItem: (s, t, e) => {
16879
16909
  try {
16880
16910
  localStorage.setItem(s, t);
@@ -17009,12 +17039,12 @@ let Id = class extends $a {
17009
17039
  h(this, "middlewares", []);
17010
17040
  h(this, "currentDevice");
17011
17041
  h(this, "userPreferredDeviceKey", `Realtimekit::${this.constructorName}::UserDeviceID`);
17012
- h(this, "setUserPreferredDevice", (t) => an.setItem(
17042
+ h(this, "setUserPreferredDevice", (t) => nn.setItem(
17013
17043
  this.userPreferredDeviceKey,
17014
17044
  t,
17015
17045
  this.logger
17016
17046
  ));
17017
- h(this, "getUserPreferredDevice", () => an.getItem(
17047
+ h(this, "getUserPreferredDevice", () => nn.getItem(
17018
17048
  this.userPreferredDeviceKey,
17019
17049
  this.logger
17020
17050
  ));
@@ -17304,7 +17334,7 @@ class jl extends Gf {
17304
17334
  a[0].deviceId
17305
17335
  ));
17306
17336
  const o = JSON.parse(
17307
- an.getItem(gu, this.logger)
17337
+ nn.getItem(gu, this.logger)
17308
17338
  );
17309
17339
  if (o != null && o.devices.some(
17310
17340
  (l) => l.label === r.label
@@ -17314,7 +17344,7 @@ class jl extends Gf {
17314
17344
  const l = (d = o == null ? void 0 : o.devices.concat({
17315
17345
  label: r.label
17316
17346
  })) != null ? d : [{ label: r.label }];
17317
- return an.setItem(gu, JSON.stringify({
17347
+ return nn.setItem(gu, JSON.stringify({
17318
17348
  devices: l
17319
17349
  }), this.logger), r;
17320
17350
  }
@@ -17329,7 +17359,7 @@ class jl extends Gf {
17329
17359
  const g = (p = o == null ? void 0 : o.devices.concat({
17330
17360
  label: r.label
17331
17361
  })) != null ? p : [{ label: r.label }];
17332
- return an.setItem(gu, JSON.stringify({
17362
+ return nn.setItem(gu, JSON.stringify({
17333
17363
  devices: g
17334
17364
  }), this.logger), this.logger.info("AudioMediaHandler.conditionallyChangeTrack.SuccesfullyChangedTrack"), !0;
17335
17365
  }
@@ -17348,37 +17378,37 @@ Uh([
17348
17378
  E.trace("AudioMediaHandler.conditionallyChangeTrack")
17349
17379
  ], jl.prototype, "conditionallyChangeTrack", 1);
17350
17380
  const dD = jl;
17351
- var Ri;
17381
+ var wi;
17352
17382
  class lD {
17353
17383
  constructor(t, e) {
17354
- m(this, Ri, void 0);
17384
+ m(this, wi, void 0);
17355
17385
  h(this, "currentDevice");
17356
17386
  h(this, "userPreferredDeviceKey", "Realtimekit::speaker::UserDeviceID");
17357
17387
  h(this, "logger");
17358
- h(this, "setUserPreferredDevice", (t) => an.setItem(
17388
+ h(this, "setUserPreferredDevice", (t) => nn.setItem(
17359
17389
  this.userPreferredDeviceKey,
17360
17390
  t,
17361
17391
  this.logger
17362
17392
  ));
17363
- h(this, "getUserPreferredDevice", () => an.getItem(
17393
+ h(this, "getUserPreferredDevice", () => nn.getItem(
17364
17394
  this.userPreferredDeviceKey,
17365
17395
  this.logger
17366
17396
  ));
17367
- f(this, Ri, e), this.logger = t.getValue("logger");
17397
+ f(this, wi, e), this.logger = t.getValue("logger");
17368
17398
  }
17369
17399
  setPreferredSpeaker() {
17370
17400
  return u(this, null, function* () {
17371
- const t = this.getUserPreferredDevice(), e = yield n(this, Ri).getAudioOutputDevices(), r = e == null ? void 0 : e.find((i) => i.deviceId === t);
17401
+ const t = this.getUserPreferredDevice(), e = yield n(this, wi).getAudioOutputDevices(), r = e == null ? void 0 : e.find((i) => i.deviceId === t);
17372
17402
  yield this.setupSpeaker(r, { saveDevicePreference: !1 });
17373
17403
  });
17374
17404
  }
17375
17405
  setupSpeaker(r, i) {
17376
17406
  return u(this, arguments, function* (t, { saveDevicePreference: e }) {
17377
17407
  var c, d;
17378
- if (!(n(this, Ri) instanceof qf))
17408
+ if (!(n(this, wi) instanceof qf))
17379
17409
  return;
17380
17410
  let a = t;
17381
- if (t || ([a] = (yield n(this, Ri).getAvailableDevicesByKind(
17411
+ if (t || ([a] = (yield n(this, wi).getAvailableDevicesByKind(
17382
17412
  "audiooutput"
17383
17413
  )).filter((p) => !kd(p))), !a)
17384
17414
  throw new b("No speaker found", "1608");
@@ -17396,7 +17426,7 @@ class lD {
17396
17426
  });
17397
17427
  }
17398
17428
  }
17399
- Ri = new WeakMap();
17429
+ wi = new WeakMap();
17400
17430
  const uD = lD;
17401
17431
  var Go;
17402
17432
  class hD extends $a {
@@ -17617,37 +17647,37 @@ Gl([
17617
17647
  const fD = jc, vg = Rs(
17618
17648
  Rh()
17619
17649
  );
17620
- var Ct, bi, Jo, sa;
17621
- const Rn = class {
17650
+ var Ct, Ri, Jo, sa;
17651
+ const wn = class {
17622
17652
  /**
17623
17653
  * @param {PresetV2CamelCased} preset
17624
17654
  */
17625
17655
  constructor(t) {
17626
17656
  m(this, Ct, void 0);
17627
- m(this, bi, void 0);
17657
+ m(this, Ri, void 0);
17628
17658
  m(this, Jo, void 0);
17629
17659
  m(this, sa, void 0);
17630
17660
  if (!t)
17631
17661
  throw new b("Could not load preset.", "0904");
17632
- f(this, Ct, t.config), f(this, Jo, t.name), f(this, bi, t.ui || Rs(Rh().ui)), f(this, sa, t.permissions.plugins.config);
17662
+ f(this, Ct, t.config), f(this, Jo, t.name), f(this, Ri, t.ui || Rs(Rh().ui)), f(this, sa, t.permissions.plugins.config);
17633
17663
  }
17634
17664
  /**
17635
17665
  * @deprecated. Use init()
17636
17666
  * @param {PresetV2CamelCased} preset
17637
17667
  */
17638
17668
  static fromResponse(t) {
17639
- return new Rn(t);
17669
+ return new wn(t);
17640
17670
  }
17641
17671
  /** @deprecated. Use init() */
17642
17672
  static default() {
17643
- return new Rn(vg);
17673
+ return new wn(vg);
17644
17674
  }
17645
17675
  /**
17646
17676
  * @param {PresetV2CamelCased} [preset]
17647
17677
  * @param {boolean} [useDefault=true]
17648
17678
  */
17649
17679
  static init(t, e = !0) {
17650
- return !t || e ? new Rn(vg) : new Rn(t);
17680
+ return !t || e ? new wn(vg) : new wn(t);
17651
17681
  }
17652
17682
  /**
17653
17683
  * @deprecated
@@ -17704,7 +17734,7 @@ const Rn = class {
17704
17734
  return {
17705
17735
  isEnabled: !0,
17706
17736
  elements: {
17707
- logo: n(this, bi).designTokens.logo,
17737
+ logo: n(this, Ri).designTokens.logo,
17708
17738
  timer: !0,
17709
17739
  title: !0,
17710
17740
  participantCount: !0,
@@ -17761,25 +17791,25 @@ const Rn = class {
17761
17791
  return Object.keys(n(this, sa)).filter((t) => n(this, sa)[t].disabled);
17762
17792
  }
17763
17793
  get designTokens() {
17764
- return n(this, bi).designTokens;
17794
+ return n(this, Ri).designTokens;
17765
17795
  }
17766
17796
  get configDiff() {
17767
- return n(this, bi).configDiff;
17797
+ return n(this, Ri).configDiff;
17768
17798
  }
17769
17799
  get mediaConstraints() {
17770
17800
  var t, e, r, i, a, o, c, d, l, p, g, v, S, P, _, C, w, L, F, N, B, G, re, tt;
17771
17801
  return {
17772
17802
  audio: {
17773
- enableStereo: (i = (r = (e = (t = n(this, Ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : Sn.audio.enableStereo,
17774
- enableHighBitrate: (d = (c = (o = (a = n(this, Ct)) == null ? void 0 : a.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : Sn.audio.enableHighBitrate
17803
+ enableStereo: (i = (r = (e = (t = n(this, Ct)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : vn.audio.enableStereo,
17804
+ enableHighBitrate: (d = (c = (o = (a = n(this, Ct)) == null ? void 0 : a.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : vn.audio.enableHighBitrate
17775
17805
  },
17776
17806
  video: {
17777
- quality: (v = (g = (p = (l = n(this, Ct)) == null ? void 0 : l.media) == null ? void 0 : p.video) == null ? void 0 : g.quality) != null ? v : Sn.video.quality,
17778
- frameRate: (C = (_ = (P = (S = n(this, Ct)) == null ? void 0 : S.media) == null ? void 0 : P.video) == null ? void 0 : _.frameRate) != null ? C : Sn.video.frameRate
17807
+ quality: (v = (g = (p = (l = n(this, Ct)) == null ? void 0 : l.media) == null ? void 0 : p.video) == null ? void 0 : g.quality) != null ? v : vn.video.quality,
17808
+ frameRate: (C = (_ = (P = (S = n(this, Ct)) == null ? void 0 : S.media) == null ? void 0 : P.video) == null ? void 0 : _.frameRate) != null ? C : vn.video.frameRate
17779
17809
  },
17780
17810
  screenshare: {
17781
- quality: (N = (F = (L = (w = n(this, Ct)) == null ? void 0 : w.media) == null ? void 0 : L.screenshare) == null ? void 0 : F.quality) != null ? N : Sn.screenshare.quality,
17782
- frameRate: (tt = (re = (G = (B = n(this, Ct)) == null ? void 0 : B.media) == null ? void 0 : G.screenshare) == null ? void 0 : re.frameRate) != null ? tt : Sn.screenshare.frameRate
17811
+ quality: (N = (F = (L = (w = n(this, Ct)) == null ? void 0 : w.media) == null ? void 0 : L.screenshare) == null ? void 0 : F.quality) != null ? N : vn.screenshare.quality,
17812
+ frameRate: (tt = (re = (G = (B = n(this, Ct)) == null ? void 0 : B.media) == null ? void 0 : G.screenshare) == null ? void 0 : re.frameRate) != null ? tt : vn.screenshare.frameRate
17783
17813
  }
17784
17814
  };
17785
17815
  }
@@ -17787,8 +17817,8 @@ const Rn = class {
17787
17817
  return n(this, Jo);
17788
17818
  }
17789
17819
  };
17790
- let Hu = Rn;
17791
- Ct = new WeakMap(), bi = new WeakMap(), Jo = new WeakMap(), sa = new WeakMap();
17820
+ let Hu = wn;
17821
+ Ct = new WeakMap(), Ri = new WeakMap(), Jo = new WeakMap(), sa = new WeakMap();
17792
17822
  var vD = Object.defineProperty, SD = Object.getOwnPropertyDescriptor, Wf = (s, t, e, r) => {
17793
17823
  for (var i = r > 1 ? void 0 : r ? SD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
17794
17824
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
@@ -18174,29 +18204,29 @@ Gc([
18174
18204
  Gc([
18175
18205
  Mt(Ba, "bulkRateLimitConfig")
18176
18206
  ], Ha.prototype, "bulkDelete", 1);
18177
- var ki, Ii, zo, qu, Yo, $r, Hd, zf;
18207
+ var bi, ki, zo, qu, Yo, $r, Hd, zf;
18178
18208
  class CD {
18179
18209
  constructor(t, e) {
18180
18210
  m(this, zo);
18181
18211
  m(this, Hd);
18182
18212
  h(this, "stores", /* @__PURE__ */ new Map());
18183
- m(this, ki, void 0);
18184
- m(this, Ii, "");
18213
+ m(this, bi, void 0);
18214
+ m(this, ki, "");
18185
18215
  m(this, Yo, void 0);
18186
18216
  m(this, $r, /* @__PURE__ */ new Map());
18187
- f(this, ki, e), f(this, Ii, t.getValue("meetingId")), f(this, Yo, t), U(this, Hd, zf).call(this);
18217
+ f(this, bi, e), f(this, ki, t.getValue("meetingId")), f(this, Yo, t), U(this, Hd, zf).call(this);
18188
18218
  }
18189
18219
  create(t) {
18190
18220
  const e = new Ha(
18191
- { name: t, socketHandler: n(this, ki), meetingId: n(this, Ii) }
18221
+ { name: t, socketHandler: n(this, bi), meetingId: n(this, ki) }
18192
18222
  );
18193
- return n(this, ki).storeGetKeys(n(this, Ii), t, []), new Promise((i, a) => {
18223
+ return n(this, bi).storeGetKeys(n(this, ki), t, []), new Promise((i, a) => {
18194
18224
  const o = setTimeout(() => a(Error("Failed")), 3e3);
18195
18225
  n(this, $r).set(t, { rejectTimeout: o, resolve: i, store: e });
18196
18226
  });
18197
18227
  }
18198
18228
  }
18199
- ki = new WeakMap(), Ii = new WeakMap(), zo = new WeakSet(), qu = function() {
18229
+ bi = new WeakMap(), ki = new WeakMap(), zo = new WeakSet(), qu = function() {
18200
18230
  return n(this, Yo).getValue("peerId");
18201
18231
  }, Yo = new WeakMap(), $r = new WeakMap(), Hd = new WeakSet(), zf = function() {
18202
18232
  [
@@ -18204,11 +18234,11 @@ ki = new WeakMap(), Ii = new WeakMap(), zo = new WeakSet(), qu = function() {
18204
18234
  J.storeGetKeys,
18205
18235
  J.storeDeleteKeys
18206
18236
  ].forEach((t) => {
18207
- n(this, ki).on(
18237
+ n(this, bi).on(
18208
18238
  t,
18209
18239
  (e) => u(this, null, function* () {
18210
18240
  var a, o;
18211
- if (e.pluginId !== n(this, Ii))
18241
+ if (e.pluginId !== n(this, ki))
18212
18242
  return;
18213
18243
  const r = (a = e.storeItems) == null ? void 0 : a.map((c) => {
18214
18244
  var d;
@@ -18273,7 +18303,7 @@ var wD = Object.defineProperty, RD = Object.getOwnPropertyDescriptor, qa = (s, t
18273
18303
  return r && i && wD(t, e, i), i;
18274
18304
  };
18275
18305
  const bD = 0.8, kD = 1.2;
18276
- var aa, oa, Ut, Ai, ho, Fr, En, Mi, po, qd, Yf, er, Qo, Br, Di, go, tr, jd, Xo, ju, Gd, Qf, Wd, Xf, Bg;
18306
+ var aa, oa, Ut, Ii, ho, Fr, yn, Ai, po, qd, Yf, er, Qo, Br, Mi, go, tr, jd, Xo, ju, Gd, Qf, Wd, Xf, Bg;
18277
18307
  let Tr = (Bg = class extends jt {
18278
18308
  /**
18279
18309
  * @param {Context} context
@@ -18285,17 +18315,17 @@ let Tr = (Bg = class extends jt {
18285
18315
  const a = t.getValue("logger");
18286
18316
  super(a);
18287
18317
  // eslint-disable-next-line class-methods-use-this
18288
- m(this, Ai);
18318
+ m(this, Ii);
18289
18319
  m(this, Fr);
18290
18320
  /**
18291
18321
  * Returns true if the local participant has joined the meeting.
18292
18322
  */
18293
- m(this, Mi);
18323
+ m(this, Ai);
18294
18324
  /**
18295
18325
  * Returns true if the local participant has joined the meeting.
18296
18326
  */
18297
18327
  m(this, qd);
18298
- m(this, Di);
18328
+ m(this, Mi);
18299
18329
  m(this, Xo);
18300
18330
  m(this, Gd);
18301
18331
  m(this, Wd);
@@ -18472,7 +18502,7 @@ let Tr = (Bg = class extends jt {
18472
18502
  });
18473
18503
  }
18474
18504
  setupEvents() {
18475
- this.on("videoUpdate", U(this, Xo, ju)), n(this, Fr, En) && (this.on("audioUpdate", U(this, Gd, Qf)), this.on("screenShareUpdate", U(this, Wd, Xf)));
18505
+ this.on("videoUpdate", U(this, Xo, ju)), n(this, Fr, yn) && (this.on("audioUpdate", U(this, Gd, Qf)), this.on("screenShareUpdate", U(this, Wd, Xf)));
18476
18506
  }
18477
18507
  /**
18478
18508
  * Returns `participant.id` if user has permission
@@ -18480,11 +18510,11 @@ let Tr = (Bg = class extends jt {
18480
18510
  */
18481
18511
  pin() {
18482
18512
  return u(this, null, function* () {
18483
- if (!n(this, Mi, po))
18513
+ if (!n(this, Ai, po))
18484
18514
  throw new b("Can`t pin participant without joining room", "1205");
18485
18515
  if (!n(this, er).permissions.pinParticipant)
18486
18516
  throw new b("You do not have permission to pin participants.", "1201");
18487
- return n(this, Ai, ho).pinPeer(this.id);
18517
+ return n(this, Ii, ho).pinPeer(this.id);
18488
18518
  });
18489
18519
  }
18490
18520
  /**
@@ -18493,11 +18523,11 @@ let Tr = (Bg = class extends jt {
18493
18523
  */
18494
18524
  unpin() {
18495
18525
  return u(this, null, function* () {
18496
- if (!n(this, Mi, po))
18526
+ if (!n(this, Ai, po))
18497
18527
  throw new b("Can`t unpin participant without joining room", "1205");
18498
18528
  if (!n(this, er).permissions.pinParticipant)
18499
18529
  throw new b("You do not have permission to unpin participants.", "1201");
18500
- return n(this, Ai, ho).pinPeer(null);
18530
+ return n(this, Ii, ho).pinPeer(null);
18501
18531
  });
18502
18532
  }
18503
18533
  /**
@@ -18510,20 +18540,20 @@ let Tr = (Bg = class extends jt {
18510
18540
  var i;
18511
18541
  f(this, aa, t);
18512
18542
  const r = t ? "pinned" : "unpinned";
18513
- (i = n(this, Di, go)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
18543
+ (i = n(this, Mi, go)) == null || i.updateSource(this.id, { pinned: t }), e && this.emit(r, this);
18514
18544
  }
18515
18545
  disableAudio() {
18516
18546
  return u(this, null, function* () {
18517
18547
  const t = this.id;
18518
18548
  if (this.logger.info("Participant::disable_audio", {
18519
18549
  participant: { id: t }
18520
- }), !n(this, Mi, po))
18550
+ }), !n(this, Ai, po))
18521
18551
  throw new b(
18522
18552
  "Can`t disable participant audio without joining room",
18523
18553
  "1205"
18524
18554
  );
18525
18555
  if (n(this, er).permissions.canDisableParticipantAudio)
18526
- return n(this, Ai, ho).disableAudio(t);
18556
+ return n(this, Ii, ho).disableAudio(t);
18527
18557
  throw this.logger.error("Participant::unauthorized_disable_audio", {
18528
18558
  participant: { id: t }
18529
18559
  }), new b(
@@ -18558,13 +18588,13 @@ let Tr = (Bg = class extends jt {
18558
18588
  const t = this.id;
18559
18589
  if (this.logger.info("Participant::disable_video", {
18560
18590
  participant: { id: t }
18561
- }), !n(this, Mi, po))
18591
+ }), !n(this, Ai, po))
18562
18592
  throw new b(
18563
18593
  "Can`t disable participant video without joining room",
18564
18594
  "1205"
18565
18595
  );
18566
18596
  if (n(this, er).permissions.canDisableParticipantVideo)
18567
- return n(this, Ai, ho).disableVideo(t);
18597
+ return n(this, Ii, ho).disableVideo(t);
18568
18598
  throw this.logger.error("Participant::unauthorized_disable_video", {
18569
18599
  participant: { id: t }
18570
18600
  }), new b(
@@ -18598,7 +18628,7 @@ let Tr = (Bg = class extends jt {
18598
18628
  if (!t)
18599
18629
  return;
18600
18630
  let e;
18601
- (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, jd).call(this, t)), e.observe(t)), n(this, Br).set(t, { observer: e }), this.updateVideo(t), (o = n(this, Di, go)) == null || o.addSource(
18631
+ (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), "ResizeObserver" in window && (e = new ResizeObserver(() => n(this, jd).call(this, t)), e.observe(t)), n(this, Br).set(t, { observer: e }), this.updateVideo(t), (o = n(this, Mi, go)) == null || o.addSource(
18602
18632
  this.id,
18603
18633
  t,
18604
18634
  this.videoEnabled,
@@ -18614,10 +18644,10 @@ let Tr = (Bg = class extends jt {
18614
18644
  deregisterVideoElement(t) {
18615
18645
  var e, r, i, a;
18616
18646
  if (!t) {
18617
- (e = n(this, Di, go)) == null || e.removeSource(this.id);
18647
+ (e = n(this, Mi, go)) == null || e.removeSource(this.id);
18618
18648
  return;
18619
18649
  }
18620
- t.srcObject = void 0, (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Br).delete(t), (a = n(this, Di, go)) == null || a.removeSource(this.id);
18650
+ t.srcObject = void 0, (i = (r = n(this, Br).get(t)) == null ? void 0 : r.observer) == null || i.disconnect(), n(this, Br).delete(t), (a = n(this, Mi, go)) == null || a.removeSource(this.id);
18621
18651
  }
18622
18652
  /**
18623
18653
  * Internal method, do not use
@@ -18637,24 +18667,24 @@ let Tr = (Bg = class extends jt {
18637
18667
  t.srcObject = void 0;
18638
18668
  t.style.display = this.videoEnabled ? "block" : "none";
18639
18669
  }
18640
- }, aa = new WeakMap(), oa = new WeakMap(), Ut = new WeakMap(), Ai = new WeakSet(), ho = function() {
18670
+ }, aa = new WeakMap(), oa = new WeakMap(), Ut = new WeakMap(), Ii = new WeakSet(), ho = function() {
18641
18671
  return n(this, Ut).getValue("roomNodeClient");
18642
- }, Fr = new WeakSet(), En = function() {
18672
+ }, Fr = new WeakSet(), yn = function() {
18643
18673
  return n(this, Ut).getValue("audioPlayback");
18644
- }, Mi = new WeakSet(), po = function() {
18674
+ }, Ai = new WeakSet(), po = function() {
18645
18675
  return n(this, Ut).getValue("connectionHandler").mediaJoined;
18646
18676
  }, qd = new WeakSet(), Yf = function() {
18647
18677
  return n(this, Ut).getValue("connectionHandler").socketJoined;
18648
- }, er = new WeakMap(), Qo = new WeakMap(), Br = new WeakMap(), Di = new WeakSet(), go = function() {
18678
+ }, er = new WeakMap(), Qo = new WeakMap(), Br = new WeakMap(), Mi = new WeakSet(), go = function() {
18649
18679
  return n(this, Ut).getValue("pip");
18650
18680
  }, tr = new WeakMap(), jd = new WeakMap(), Xo = new WeakSet(), ju = function() {
18651
18681
  Array.from(n(this, Br).keys()).forEach(this.updateVideo);
18652
18682
  }, Gd = new WeakSet(), Qf = function() {
18653
18683
  var t, e;
18654
- this.audioEnabled && this.audioTrack ? (t = n(this, Fr, En)) == null || t.addParticipantTrack(this.id, this.audioTrack) : (e = n(this, Fr, En)) == null || e.removeParticipantTrack(this.id);
18684
+ this.audioEnabled && this.audioTrack ? (t = n(this, Fr, yn)) == null || t.addParticipantTrack(this.id, this.audioTrack) : (e = n(this, Fr, yn)) == null || e.removeParticipantTrack(this.id);
18655
18685
  }, Wd = new WeakSet(), Xf = function() {
18656
18686
  var t, e;
18657
- this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this, Fr, En)) == null || t.addParticipantTrack(`screenshare-${this.id}`, this.screenShareTracks.audio) : (e = n(this, Fr, En)) == null || e.removeParticipantTrack(`screenshare-${this.id}`);
18687
+ this.screenShareEnabled && this.screenShareTracks.audio ? (t = n(this, Fr, yn)) == null || t.addParticipantTrack(`screenshare-${this.id}`, this.screenShareTracks.audio) : (e = n(this, Fr, yn)) == null || e.removeParticipantTrack(`screenshare-${this.id}`);
18658
18688
  }, Bg);
18659
18689
  qa([
18660
18690
  E.trace("Participant.disableAudio")
@@ -18822,7 +18852,7 @@ var DD = Object.defineProperty, OD = Object.getOwnPropertyDescriptor, Jt = (s, t
18822
18852
  return r && i && DD(t, e, i), i;
18823
18853
  };
18824
18854
  const ND = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
18825
- var Ee, Zo, Gu, Oi, mo, ca, gd, Ni, wt, Hg;
18855
+ var Ee, Zo, Gu, Di, mo, ca, gd, Oi, wt, Hg;
18826
18856
  let Pt = (Hg = class extends jt {
18827
18857
  /**
18828
18858
  * This constructs a new Participant object and maintains
@@ -18844,7 +18874,7 @@ let Pt = (Hg = class extends jt {
18844
18874
  /**
18845
18875
  * Returns true if the local participant has joined the meeting.
18846
18876
  */
18847
- m(this, Oi);
18877
+ m(this, Di);
18848
18878
  /**
18849
18879
  * Returns true if the local participant has joined the meeting.
18850
18880
  */
@@ -18880,7 +18910,7 @@ let Pt = (Hg = class extends jt {
18880
18910
  */
18881
18911
  h(this, "all");
18882
18912
  m(this, Ee, void 0);
18883
- m(this, Ni, void 0);
18913
+ m(this, Oi, void 0);
18884
18914
  m(this, wt, void 0);
18885
18915
  h(this, "rateLimitConfig", {
18886
18916
  maxInvocations: 5,
@@ -18911,7 +18941,7 @@ let Pt = (Hg = class extends jt {
18911
18941
  * Keeps a list of all participants who have been present in the selected peers list.
18912
18942
  */
18913
18943
  h(this, "selectedPeers", Zf);
18914
- f(this, Ee, t), f(this, Ni, e), f(this, wt, r), this.waitlisted = new uo(i), this.joined = new uo(i), this.videoSubscribed = new uo(i), this.audioSubscribed = new uo(i), this.active = this.videoSubscribed, this.pinned = new uo(i), this.all = new ID(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
18944
+ f(this, Ee, t), f(this, Oi, e), f(this, wt, r), this.waitlisted = new uo(i), this.joined = new uo(i), this.videoSubscribed = new uo(i), this.audioSubscribed = new uo(i), this.active = this.videoSubscribed, this.pinned = new uo(i), this.all = new ID(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
18915
18945
  }
18916
18946
  /**
18917
18947
  * Return the controls for Picture-in-Picture
@@ -18990,7 +19020,7 @@ let Pt = (Hg = class extends jt {
18990
19020
  */
18991
19021
  acceptWaitingRoomRequest(t) {
18992
19022
  var r, i;
18993
- if (!n(this, Oi, mo))
19023
+ if (!n(this, Di, mo))
18994
19024
  throw new b(
18995
19025
  "Can`t accept waiting room request without joining room",
18996
19026
  "1205"
@@ -19021,7 +19051,7 @@ let Pt = (Hg = class extends jt {
19021
19051
  rejectWaitingRoomRequest(t) {
19022
19052
  return u(this, null, function* () {
19023
19053
  var r, i;
19024
- if (!n(this, Oi, mo))
19054
+ if (!n(this, Di, mo))
19025
19055
  throw new b(
19026
19056
  "Can`t reject waiting room request without joining room",
19027
19057
  "1205"
@@ -19153,7 +19183,7 @@ let Pt = (Hg = class extends jt {
19153
19183
  actions: { disableAllAudio: { allowUnmute: t } }
19154
19184
  }), !n(this, ca, gd))
19155
19185
  throw new b("Can`t disable all audio without joining room", "1205");
19156
- if (n(this, Ni).permissions.canAllowParticipantAudio)
19186
+ if (n(this, Oi).permissions.canAllowParticipantAudio)
19157
19187
  return n(this, Zo, Gu).muteAll(t);
19158
19188
  throw this.logger.error("Participants::unauthorized_disable_all_audio", {
19159
19189
  actions: { disableAllAudio: { allowUnmute: t } }
@@ -19167,7 +19197,7 @@ let Pt = (Hg = class extends jt {
19167
19197
  return u(this, null, function* () {
19168
19198
  if (this.logger.info("Participants::disable_all_video"), !n(this, ca, gd))
19169
19199
  throw new b("Can`t disable all video without joining room", "1205");
19170
- if (n(this, Ni).permissions.canAllowParticipantVideo)
19200
+ if (n(this, Oi).permissions.canAllowParticipantVideo)
19171
19201
  return n(this, Zo, Gu).muteAllVideo();
19172
19202
  throw this.logger.error("Participants::unauthorized_disable_all_video"), new b(
19173
19203
  "Unauthorized: User does not have permission to disable peer video.",
@@ -19194,9 +19224,9 @@ let Pt = (Hg = class extends jt {
19194
19224
  }
19195
19225
  kickAll() {
19196
19226
  return u(this, null, function* () {
19197
- if (this.logger.info("Participants::kick_all"), n(this, Ee).getValue("viewType") !== "LIVESTREAM" && !n(this, Oi, mo))
19227
+ if (this.logger.info("Participants::kick_all"), n(this, Ee).getValue("viewType") !== "LIVESTREAM" && !n(this, Di, mo))
19198
19228
  throw new b("Can`t kick all without joining room", "1205");
19199
- if (!n(this, Ni).permissions.kickParticipant)
19229
+ if (!n(this, Oi).permissions.kickParticipant)
19200
19230
  throw this.logger.error("Participants::unauthorized_kick_all"), new b(
19201
19231
  "Unauthorized: User does not have permission to kick peers.",
19202
19232
  "1201"
@@ -19207,7 +19237,7 @@ let Pt = (Hg = class extends jt {
19207
19237
  }
19208
19238
  broadcastMessage(t, e, r) {
19209
19239
  return u(this, null, function* () {
19210
- if (this.logger.info("Participants::broadcastMessage"), !n(this, Oi, mo))
19240
+ if (this.logger.info("Participants::broadcastMessage"), !n(this, Di, mo))
19211
19241
  throw new b("Can`t broadcast message without joining room", "1205");
19212
19242
  if (!(t != null && t.trim()))
19213
19243
  throw new b("`type` must be a non-empty string.", "1209");
@@ -19251,13 +19281,13 @@ let Pt = (Hg = class extends jt {
19251
19281
  }
19252
19282
  }, Ee = new WeakMap(), Zo = new WeakSet(), Gu = function() {
19253
19283
  return n(this, Ee).getValue("roomNodeClient");
19254
- }, Oi = new WeakSet(), mo = function() {
19284
+ }, Di = new WeakSet(), mo = function() {
19255
19285
  var t;
19256
19286
  return ((t = n(this, Ee).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0;
19257
19287
  }, ca = new WeakSet(), gd = function() {
19258
19288
  var t;
19259
19289
  return ((t = n(this, Ee).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
19260
- }, Ni = new WeakMap(), wt = new WeakMap(), Hg);
19290
+ }, Oi = new WeakMap(), wt = new WeakMap(), Hg);
19261
19291
  Jt([
19262
19292
  E.trace("Participants.setViewMode")
19263
19293
  ], Pt.prototype, "setViewMode", 1);
@@ -19300,11 +19330,11 @@ Jt([
19300
19330
  Pt = Jt([
19301
19331
  ut("1200")
19302
19332
  ], Pt);
19303
- var VD = Object.defineProperty, LD = Object.getOwnPropertyDescriptor, fn = (s, t, e, r) => {
19333
+ var VD = Object.defineProperty, LD = Object.getOwnPropertyDescriptor, mn = (s, t, e, r) => {
19304
19334
  for (var i = r > 1 ? void 0 : r ? LD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
19305
19335
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
19306
19336
  return r && i && VD(t, e, i), i;
19307
- }, ts, fs, da, qg;
19337
+ }, ts, vs, da, qg;
19308
19338
  const ev = (qg = class {
19309
19339
  constructor(s, t, e) {
19310
19340
  h(this, "participants");
@@ -19317,7 +19347,7 @@ const ev = (qg = class {
19317
19347
  h(this, "context");
19318
19348
  h(this, "videoPeerConsumerMap", /* @__PURE__ */ new Map());
19319
19349
  m(this, ts, { mode: "ACTIVE_GRID", page: 0 });
19320
- m(this, fs, !1);
19350
+ m(this, vs, !1);
19321
19351
  m(this, da, !1);
19322
19352
  h(this, "updateConsumerSpatialLayers", Ih(() => {
19323
19353
  const s = {}, t = new Map(this.maxSpatialLayerUpdates);
@@ -19332,7 +19362,7 @@ const ev = (qg = class {
19332
19362
  });
19333
19363
  }, 2e3));
19334
19364
  h(this, "updateConsumers", (s, t) => u(this, null, function* () {
19335
- this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${n(this, fs)}`);
19365
+ this.logger.info(`updateConsumers: Starting consumer updates - AddProducers: ${s.length}, RemoveProducers: ${t.length}, ConsumersSyncing: ${n(this, vs)}`);
19336
19366
  try {
19337
19367
  s.length !== 0 && (this.logger.info(`updateConsumers: Creating consumers for ${s.length} producers: [${s.map((e) => e.producerId).join(", ")}]`), yield this.roomNodeClient.createConsumers(s), this.logger.info("updateConsumers: Successfully created consumers."));
19338
19368
  } catch (e) {
@@ -19345,7 +19375,7 @@ const ev = (qg = class {
19345
19375
  }
19346
19376
  this.logger.info("updateConsumers: Completed consumer updates.");
19347
19377
  }));
19348
- this.context = s, this.roomSocketHandler = e, this.participants = new Pt(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events = Cs, t.config.viewType !== "CHAT" && this.setupEventsGlobal(), this.setupEvents();
19378
+ this.context = s, this.roomSocketHandler = e, this.participants = new Pt(s, t, this.roomSocketHandler), this.self = t, this.consumerPeerMap = /* @__PURE__ */ new Map(), this.events = ws, t.config.viewType !== "CHAT" && this.setupEventsGlobal(), this.setupEvents();
19349
19379
  }
19350
19380
  get roomNodeClient() {
19351
19381
  return this.context.getValue("roomNodeClient");
@@ -19455,7 +19485,7 @@ const ev = (qg = class {
19455
19485
  appData: { screenShare: t == null ? void 0 : t.screenShare }
19456
19486
  }
19457
19487
  }
19458
- ), (t == null ? void 0 : t.kind) === "audio" && this.participants.audioSubscribed.get(s) || (t == null ? void 0 : t.kind) === "video" && this.participants.videoSubscribed.get(s) || t != null && t.screenShare ? (this.logger.info(`NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ${t.producerId}, Peer: ${s}, Kind: ${t.kind}, ScreenShare: ${t.screenShare}, ConsumersSyncing: ${n(this, fs)}, VideoSub: ${t.kind === "video" ? this.participants.videoSubscribed.has(s) : "N/A"}, AudioSub: ${t.kind === "audio" ? this.participants.audioSubscribed.has(s) : "N/A"}`), this.scheduleSyncConsumers({
19488
+ ), (t == null ? void 0 : t.kind) === "audio" && this.participants.audioSubscribed.get(s) || (t == null ? void 0 : t.kind) === "video" && this.participants.videoSubscribed.get(s) || t != null && t.screenShare ? (this.logger.info(`NEW_PRODUCER: scheduling syncConsumer (AUTO mode) - Producer: ${t.producerId}, Peer: ${s}, Kind: ${t.kind}, ScreenShare: ${t.screenShare}, ConsumersSyncing: ${n(this, vs)}, VideoSub: ${t.kind === "video" ? this.participants.videoSubscribed.has(s) : "N/A"}, AudioSub: ${t.kind === "audio" ? this.participants.audioSubscribed.has(s) : "N/A"}`), this.scheduleSyncConsumers({
19459
19489
  source: "NEW_PRODUCER_AUTO"
19460
19490
  })) : this.logger.info(
19461
19491
  "ParticipantController::NEW_PRODUCER::not_consuming_producer_auto",
@@ -19516,7 +19546,7 @@ const ev = (qg = class {
19516
19546
  const e = t;
19517
19547
  this.onParticipantPinned(e);
19518
19548
  const r = this.participants.joined.get(e);
19519
- r && (this.logger.info(`globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ${e} - ProducerCount: ${r.producers.length}, ConsumersSyncing: ${n(this, fs)}, ProducerIds: [${r.producers.map((i) => i.producerId).join(", ")}]`), this.scheduleSyncConsumers({
19549
+ r && (this.logger.info(`globalPeerPinBroadcast: Scheduling audio/video consumer sync for pinned participant ${e} - ProducerCount: ${r.producers.length}, ConsumersSyncing: ${n(this, vs)}, ProducerIds: [${r.producers.map((i) => i.producerId).join(", ")}]`), this.scheduleSyncConsumers({
19520
19550
  source: "GLOBAL_PEER_PIN"
19521
19551
  }));
19522
19552
  }
@@ -19644,8 +19674,8 @@ const ev = (qg = class {
19644
19674
  source: s
19645
19675
  }) {
19646
19676
  var r, i, a;
19647
- const e = ((r = n(this, ts)) == null ? void 0 : r.mode) === "PAGINATED" && !n(this, fs) ? 200 : 0;
19648
- this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = n(this, ts)) == null ? void 0 : i.mode}, ConsumersSyncing: ${n(this, fs)}, Delay: ${e}, Page: ${(a = n(this, ts)) == null ? void 0 : a.page}`), setTimeout(() => this.syncConsumers(), e);
19677
+ const e = ((r = n(this, ts)) == null ? void 0 : r.mode) === "PAGINATED" && !n(this, vs) ? 200 : 0;
19678
+ this.logger.info(`scheduleSyncConsumers():: Source: ${s}, ViewMode: ${(i = n(this, ts)) == null ? void 0 : i.mode}, ConsumersSyncing: ${n(this, vs)}, Delay: ${e}, Page: ${(a = n(this, ts)) == null ? void 0 : a.page}`), setTimeout(() => this.syncConsumers(), e);
19649
19679
  });
19650
19680
  }
19651
19681
  /**
@@ -19675,11 +19705,11 @@ const ev = (qg = class {
19675
19705
  this.logger.info("syncConsumers: Connection not ready, exiting.");
19676
19706
  return;
19677
19707
  }
19678
- if (n(this, fs)) {
19708
+ if (n(this, vs)) {
19679
19709
  f(this, da, !0), this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting.");
19680
19710
  return;
19681
19711
  }
19682
- this.logger.info("syncConsumers: Starting sync operation."), f(this, fs, !0), f(this, da, !1);
19712
+ this.logger.info("syncConsumers: Starting sync operation."), f(this, vs, !0), f(this, da, !1);
19683
19713
  let s = [];
19684
19714
  this.participants.videoSubscribed.forEach((g) => {
19685
19715
  var P, _;
@@ -19725,7 +19755,7 @@ const ev = (qg = class {
19725
19755
  } catch (g) {
19726
19756
  this.logger.error("syncConsumers: updateConsumers failed with error.", { error: g });
19727
19757
  } finally {
19728
- this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this, fs, !1);
19758
+ this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), f(this, vs, !1);
19729
19759
  }
19730
19760
  n(this, da) && (this.logger.info("syncConsumers: Resync required, calling syncConsumers again."), this.syncConsumers());
19731
19761
  });
@@ -20300,34 +20330,34 @@ const ev = (qg = class {
20300
20330
  // priority
20301
20331
  })), t && this.context.getValue("peerSessionStore").emit(k.UPDATE_ACTIVE, { viewMode: this.participants.viewMode, page: this.participants.currentPage });
20302
20332
  }
20303
- }, ts = new WeakMap(), fs = new WeakMap(), da = new WeakMap(), qg);
20333
+ }, ts = new WeakMap(), vs = new WeakMap(), da = new WeakMap(), qg);
20304
20334
  let _r = ev;
20305
- fn([
20335
+ mn([
20306
20336
  E.trace("ParticipantController.setupEvents")
20307
20337
  ], _r.prototype, "setupEvents", 1);
20308
- fn([
20338
+ mn([
20309
20339
  E.trace("ParticipantController.setupEvents")
20310
20340
  ], _r.prototype, "setupEventsGlobal", 1);
20311
- fn([
20341
+ mn([
20312
20342
  E.trace("ParticipantController.processMedia")
20313
20343
  ], _r.prototype, "processMedia", 1);
20314
- fn([
20344
+ mn([
20315
20345
  E.trace("ParticipantController.processConsumerClosed")
20316
20346
  ], _r.prototype, "processConsumerClosed", 1);
20317
- fn([
20347
+ mn([
20318
20348
  E.trace("ParticipantController.processConsumerResumed")
20319
20349
  ], _r.prototype, "processConsumerResumed", 1);
20320
- fn([
20350
+ mn([
20321
20351
  E.trace("ParticipantController.processConsumerPaused")
20322
20352
  ], _r.prototype, "processConsumerPaused", 1);
20323
- fn([
20353
+ mn([
20324
20354
  E.trace("ParticipantController.processNewConsumer")
20325
20355
  ], _r.prototype, "processNewConsumer", 1);
20326
20356
  const ue = Rs(
20327
20357
  Rh().permissions
20328
20358
  );
20329
20359
  var q, la, ua, Jd, ft, Nt;
20330
- const bn = class extends jt {
20360
+ const Rn = class extends jt {
20331
20361
  constructor(e, r, i, a = !1) {
20332
20362
  const o = e.getValue("logger");
20333
20363
  super(o);
@@ -20388,15 +20418,15 @@ const bn = class extends jt {
20388
20418
  }
20389
20419
  /** @deprecated. Use init() */
20390
20420
  static fromResponse(e, r, i) {
20391
- return new bn(i, e, r, !0);
20421
+ return new Rn(i, e, r, !0);
20392
20422
  }
20393
20423
  /** @deprecated. Use init() */
20394
20424
  static default(e, r) {
20395
- return new bn(e, ue, r);
20425
+ return new Rn(e, ue, r);
20396
20426
  }
20397
20427
  static init(e, r, i) {
20398
20428
  let a;
20399
- return i ? a = new bn(e, i, r, !0) : a = new bn(e, ue, r), a;
20429
+ return i ? a = new Rn(e, i, r, !0) : a = new Rn(e, ue, r), a;
20400
20430
  }
20401
20431
  // eslint-disable-next-line class-methods-use-this
20402
20432
  get mediaRoomType() {
@@ -20729,7 +20759,7 @@ const bn = class extends jt {
20729
20759
  return n(this, q).transcriptionEnabled;
20730
20760
  }
20731
20761
  };
20732
- let Wu = bn;
20762
+ let Wu = Rn;
20733
20763
  q = new WeakMap(), la = new WeakMap(), ua = new WeakMap(), Jd = new WeakMap(), ft = new WeakSet(), Nt = function() {
20734
20764
  return n(this, ua).getValue("stageStatus");
20735
20765
  };
@@ -21146,7 +21176,7 @@ var xD = Object.defineProperty, UD = Object.getOwnPropertyDescriptor, _t = (s, t
21146
21176
  for (var i = r > 1 ? void 0 : r ? UD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
21147
21177
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
21148
21178
  return r && i && xD(t, e, i), i;
21149
- }, ha, vt, pa, Fe, sr, ai, qe, Qe, ga, md, Ve, Be, ma, fa, ec, Ju, jg;
21179
+ }, ha, vt, pa, Fe, sr, ai, qe, Qe, ga, md, Le, Be, ma, fa, ec, Ju, jg;
21150
21180
  let Ye = (jg = class extends tv {
21151
21181
  constructor(t, e, r, i, a) {
21152
21182
  var c;
@@ -21159,7 +21189,7 @@ let Ye = (jg = class extends tv {
21159
21189
  /**
21160
21190
  * Returns true if the local participant has joined the meeting.
21161
21191
  */
21162
- m(this, Ve);
21192
+ m(this, Le);
21163
21193
  m(this, ec);
21164
21194
  h(this, "name");
21165
21195
  h(this, "picture");
@@ -21242,7 +21272,7 @@ let Ye = (jg = class extends tv {
21242
21272
  t && t.onError((e) => {
21243
21273
  this.emit("autoplayError", e);
21244
21274
  }), this.localMediaHandler.on("AUDIO_TRACK_CHANGE", () => u(this, null, function* () {
21245
- if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, ui(this))), n(this, Ve, Be) && this.audioEnabled)
21275
+ if (this.logger.info("Self::setupEvents::AUDIO_TRACK_CHANGE", D({}, ui(this))), n(this, Le, Be) && this.audioEnabled)
21246
21276
  try {
21247
21277
  yield n(this, qe, Qe).shareMic(this.audioTrack);
21248
21278
  } catch (e) {
@@ -21255,9 +21285,9 @@ let Ye = (jg = class extends tv {
21255
21285
  audioTrack: this.audioTrack
21256
21286
  });
21257
21287
  })), this.localMediaHandler.on("VIDEO_TRACK_CHANGE", () => u(this, null, function* () {
21258
- if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, ui(this))), n(this, Ve, Be) && this.rawVideoTrack === void 0)
21288
+ if (this.logger.info("Self::setupEvents::VIDEO_TRACK_CHANGE", D({}, ui(this))), n(this, Le, Be) && this.rawVideoTrack === void 0)
21259
21289
  this.logger.info("Self::VIDEO_TRACK_CHANGE::Forcing_disable_video"), this.disableVideo();
21260
- else if (this.videoEnabled && n(this, Ve, Be))
21290
+ else if (this.videoEnabled && n(this, Le, Be))
21261
21291
  try {
21262
21292
  const e = yield n(this, qe, Qe).shareWebcam(this.videoTrack);
21263
21293
  e && e.id !== this.videoTrack.id && n(this, Fe).getValue("flagsmith").hasFeature(ee.EXP_RESHARE) && (yield n(this, qe, Qe).shareWebcam(this.videoTrack));
@@ -21281,7 +21311,7 @@ let Ye = (jg = class extends tv {
21281
21311
  ), this.localMediaHandler.on("DEVICE_LIST_UPDATED", (e) => {
21282
21312
  this.emit("deviceListUpdate", e);
21283
21313
  }), this.localMediaHandler.on("SCREENSHARE_TRACK_CHANGE", () => u(this, null, function* () {
21284
- if (!n(this, Ve, Be)) {
21314
+ if (!n(this, Le, Be)) {
21285
21315
  this.logger.error(
21286
21316
  "Self.SCREENSHARE_TRACK_CHANGE.LocalMediaInitialized_WithoutRoomNode"
21287
21317
  );
@@ -21311,7 +21341,7 @@ let Ye = (jg = class extends tv {
21311
21341
  this.disableAudio();
21312
21342
  }), this.localMediaHandler.on("FORCE_MUTE_VIDEO", () => u(this, null, function* () {
21313
21343
  var e;
21314
- n(this, Ve, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
21344
+ n(this, Le, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
21315
21345
  videoEnabled: this.videoEnabled,
21316
21346
  videoTrack: this.videoTrack
21317
21347
  }), (e = n(this, Fe)) == null || e.getValue("callstats").videoOff();
@@ -21337,7 +21367,7 @@ let Ye = (jg = class extends tv {
21337
21367
  */
21338
21368
  get roomJoined() {
21339
21369
  var t;
21340
- return n(this, ha).viewType === At.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = n(this, Fe).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0 : n(this, Ve, Be);
21370
+ return n(this, ha).viewType === At.Livestream && this.stageStatus !== "ON_STAGE" ? ((t = n(this, Fe).getValue("connectionHandler")) == null ? void 0 : t.socketJoined) === !0 : n(this, Le, Be);
21341
21371
  }
21342
21372
  /**
21343
21373
  * The name of the user can be set by calling this method.
@@ -21369,7 +21399,7 @@ let Ye = (jg = class extends tv {
21369
21399
  return u(this, null, function* () {
21370
21400
  var e;
21371
21401
  if (this.permissions.canProduceAudio !== j.NotAllowed && !(n(this, vt).canProduceAudio === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
21372
- if ((e = n(this, Fe)) == null || e.getValue("callstats").audioOn(), yield this.localMediaHandler.enableAudio(t), n(this, Ve, Be) && this.stageStatus === "ON_STAGE") {
21402
+ if ((e = n(this, Fe)) == null || e.getValue("callstats").audioOn(), yield this.localMediaHandler.enableAudio(t), n(this, Le, Be) && this.stageStatus === "ON_STAGE") {
21373
21403
  if (this.audioTrack)
21374
21404
  try {
21375
21405
  yield n(this, qe, Qe).shareMic(this.audioTrack);
@@ -21392,7 +21422,7 @@ let Ye = (jg = class extends tv {
21392
21422
  return u(this, null, function* () {
21393
21423
  var e;
21394
21424
  if (n(this, vt).canProduceVideo !== j.NotAllowed && !(n(this, vt).canProduceVideo === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
21395
- if ((e = n(this, Fe)) == null || e.getValue("callstats").videoOn(), yield this.localMediaHandler.enableVideo(t), n(this, Ve, Be) && this.stageStatus === "ON_STAGE")
21425
+ if ((e = n(this, Fe)) == null || e.getValue("callstats").videoOn(), yield this.localMediaHandler.enableVideo(t), n(this, Le, Be) && this.stageStatus === "ON_STAGE")
21396
21426
  try {
21397
21427
  yield n(this, qe, Qe).shareWebcam(this.videoTrack);
21398
21428
  } catch (r) {
@@ -21416,7 +21446,7 @@ let Ye = (jg = class extends tv {
21416
21446
  }
21417
21447
  enableScreenShare() {
21418
21448
  return u(this, null, function* () {
21419
- if (!n(this, Ve, Be))
21449
+ if (!n(this, Le, Be))
21420
21450
  throw new b("Can`t enable screenshare without joining room", "1105");
21421
21451
  if (n(this, vt).canProduceScreenshare !== j.NotAllowed && !(n(this, vt).canProduceScreenshare === j.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.screenShareEnabled && (yield this.localMediaHandler.enableScreenShare(), this.screenShareTracks.audio || this.screenShareTracks.video)) {
21422
21452
  try {
@@ -21446,7 +21476,7 @@ let Ye = (jg = class extends tv {
21446
21476
  disableAudio() {
21447
21477
  return u(this, null, function* () {
21448
21478
  var t;
21449
- this.audioEnabled && (this.localMediaHandler.disableAudio(), n(this, Ve, Be) && n(this, qe, Qe).muteSelf(), this.emit("audioUpdate", {
21479
+ this.audioEnabled && (this.localMediaHandler.disableAudio(), n(this, Le, Be) && n(this, qe, Qe).muteSelf(), this.emit("audioUpdate", {
21450
21480
  audioEnabled: this.audioEnabled,
21451
21481
  audioTrack: this.audioTrack
21452
21482
  }), (t = n(this, Fe)) == null || t.getValue("callstats").audioOff());
@@ -21455,7 +21485,7 @@ let Ye = (jg = class extends tv {
21455
21485
  disableVideo() {
21456
21486
  return u(this, null, function* () {
21457
21487
  var t;
21458
- this.videoEnabled && (yield this.localMediaHandler.disableVideo(), n(this, Ve, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
21488
+ this.videoEnabled && (yield this.localMediaHandler.disableVideo(), n(this, Le, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
21459
21489
  videoEnabled: this.videoEnabled,
21460
21490
  videoTrack: this.videoTrack
21461
21491
  }), (t = n(this, Fe)) == null || t.getValue("callstats").videoOff());
@@ -21463,7 +21493,7 @@ let Ye = (jg = class extends tv {
21463
21493
  }
21464
21494
  disableScreenShare() {
21465
21495
  return u(this, null, function* () {
21466
- this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), n(this, Ve, Be) && (yield n(this, qe, Qe).disableScreenShare()), this.emit("screenShareUpdate", {
21496
+ this.screenShareEnabled && (yield this.localMediaHandler.disableScreenShare(), n(this, Le, Be) && (yield n(this, qe, Qe).disableScreenShare()), this.emit("screenShareUpdate", {
21467
21497
  screenShareEnabled: this.screenShareEnabled,
21468
21498
  screenShareTracks: this.screenShareTracks
21469
21499
  }));
@@ -21497,7 +21527,7 @@ let Ye = (jg = class extends tv {
21497
21527
  */
21498
21528
  pin() {
21499
21529
  return u(this, null, function* () {
21500
- if (!n(this, Ve, Be))
21530
+ if (!n(this, Le, Be))
21501
21531
  throw new b("Can`t pin participants without joining room", "1105");
21502
21532
  return this.show(), n(this, qe, Qe).pinPeer(this.id);
21503
21533
  });
@@ -21508,7 +21538,7 @@ let Ye = (jg = class extends tv {
21508
21538
  */
21509
21539
  unpin() {
21510
21540
  return u(this, null, function* () {
21511
- if (!n(this, Ve, Be))
21541
+ if (!n(this, Le, Be))
21512
21542
  throw new b("Can`t unpin participants without joining room", "1105");
21513
21543
  return n(this, qe, Qe).pinPeer(null);
21514
21544
  });
@@ -21518,7 +21548,7 @@ let Ye = (jg = class extends tv {
21518
21548
  */
21519
21549
  hide() {
21520
21550
  return u(this, null, function* () {
21521
- if (!n(this, Ve, Be))
21551
+ if (!n(this, Le, Be))
21522
21552
  throw new b("Can`t toggle participant tile without joining room", "1105");
21523
21553
  this.hidden = !0, this.emit("toggleTile", { hidden: this.hidden });
21524
21554
  });
@@ -21527,7 +21557,7 @@ let Ye = (jg = class extends tv {
21527
21557
  * Show's user's tile in the UI if hidden (locally)
21528
21558
  */
21529
21559
  show() {
21530
- if (!n(this, Ve, Be))
21560
+ if (!n(this, Le, Be))
21531
21561
  throw new b("Can`t toggle participant tile without joining room", "1105");
21532
21562
  this.hidden = !1, this.emit("toggleTile", { hidden: this.hidden });
21533
21563
  }
@@ -21544,7 +21574,7 @@ let Ye = (jg = class extends tv {
21544
21574
  try {
21545
21575
  yield this.localMediaHandler.setAudioDevice(t, { saveDevicePreference: !0 });
21546
21576
  } catch (o) {
21547
- n(this, Ve, Be) && (yield n(this, qe, Qe).muteSelf()), this.emit("audioUpdate", {
21577
+ n(this, Le, Be) && (yield n(this, qe, Qe).muteSelf()), this.emit("audioUpdate", {
21548
21578
  audioEnabled: this.audioEnabled,
21549
21579
  audioTrack: this.audioTrack
21550
21580
  });
@@ -21557,7 +21587,7 @@ let Ye = (jg = class extends tv {
21557
21587
  try {
21558
21588
  yield this.localMediaHandler.setVideoDevice(t, { saveDevicePreference: !0 });
21559
21589
  } catch (o) {
21560
- n(this, Ve, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
21590
+ n(this, Le, Be) && (yield n(this, qe, Qe).pauseWebcam()), this.emit("videoUpdate", {
21561
21591
  videoEnabled: this.videoEnabled,
21562
21592
  videoTrack: this.videoTrack
21563
21593
  });
@@ -21616,7 +21646,7 @@ let Ye = (jg = class extends tv {
21616
21646
  return n(this, Fe).getValue("roomNodeClient");
21617
21647
  }, ga = new WeakSet(), md = function() {
21618
21648
  return n(this, Fe).getValue("audioPlayback");
21619
- }, Ve = new WeakSet(), Be = function() {
21649
+ }, Le = new WeakSet(), Be = function() {
21620
21650
  var t;
21621
21651
  return ((t = n(this, Fe).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
21622
21652
  }, ma = new WeakMap(), fa = new WeakMap(), ec = new WeakSet(), Ju = function() {
@@ -21898,7 +21928,7 @@ class qD {
21898
21928
  constructor(t) {
21899
21929
  m(this, Je, void 0);
21900
21930
  h(this, "events");
21901
- f(this, Je, t), this.events = Cs;
21931
+ f(this, Je, t), this.events = ws;
21902
21932
  }
21903
21933
  joinRoom(t, e, r, i = !1, a = null) {
21904
21934
  return u(this, null, function* () {
@@ -22080,7 +22110,7 @@ class qD {
22080
22110
  }
22081
22111
  }
22082
22112
  Je = new WeakMap();
22083
- var Dn = /* @__PURE__ */ ((s) => (s.NEW = "new", s.CONNECTING = "connecting", s.RECONNECTING = "reconnecting", s.DISCONNECTED = "disconnected", s.CONNECTED = "connected", s.FAILED = "failed", s.CLOSED = "closed", s))(Dn || {}), sc;
22113
+ var Mn = /* @__PURE__ */ ((s) => (s.NEW = "new", s.CONNECTING = "connecting", s.RECONNECTING = "reconnecting", s.DISCONNECTED = "disconnected", s.CONNECTED = "connected", s.FAILED = "failed", s.CLOSED = "closed", s))(Mn || {}), sc;
22084
22114
  class Wl extends lt.EventEmitter {
22085
22115
  constructor(e) {
22086
22116
  super();
@@ -22514,8 +22544,8 @@ class Ad extends Hh {
22514
22544
  }
22515
22545
  const l = (v, S) => {
22516
22546
  var N;
22517
- const P = hs.parse(v), _ = P.media[P.media.length - 1], C = _.rtp.filter((B) => S.some((G) => G.name === B.codec)), w = _.fmtp.filter((B) => C.some((G) => G.payload === B.payload)), L = (N = _.rtcpFb) == null ? void 0 : N.filter((B) => C.some((G) => G.payload === B.payload)), F = C.map((B) => B.payload);
22518
- return P.media[P.media.length - 1].rtp = C, P.media[P.media.length - 1].fmtp = w, P.media[P.media.length - 1].rtcpFb = L, P.media[P.media.length - 1].payloads = F.join(" "), hs.write(P);
22547
+ const P = ps.parse(v), _ = P.media[P.media.length - 1], C = _.rtp.filter((B) => S.some((G) => G.name === B.codec)), w = _.fmtp.filter((B) => C.some((G) => G.payload === B.payload)), L = (N = _.rtcpFb) == null ? void 0 : N.filter((B) => C.some((G) => G.payload === B.payload)), F = C.map((B) => B.payload);
22548
+ return P.media[P.media.length - 1].rtp = C, P.media[P.media.length - 1].fmtp = w, P.media[P.media.length - 1].rtcpFb = L, P.media[P.media.length - 1].payloads = F.join(" "), ps.write(P);
22519
22549
  }, p = yield this.pc.createOffer();
22520
22550
  if (p.sdp = l(p.sdp, i), this.logger.debug(`send() | calling pc.setLocalDescription() [offer:${JSON.stringify(p)}]`), yield this.pc.setLocalDescription(p), e === "audio" || e.kind === "audio") {
22521
22551
  const { enableDtx: v, enableStereo: S } = this, P = this.enableHighBitrate ? S ? 128e3 : 64e3 : S ? 64e3 : 32e3;
@@ -22639,7 +22669,7 @@ class jh extends Hh {
22639
22669
  function jD(s, t) {
22640
22670
  return typeof s == "undefined" ? t : typeof window != "undefined" && Object.getOwnPropertyDescriptor(window, "structuredClone") ? structuredClone(s) : JSON.parse(JSON.stringify(s));
22641
22671
  }
22642
- var rc, Vi, Vs, Kd, Ls, br, ic, zu, zd, rv, Yd, iv;
22672
+ var rc, Ni, Vs, Kd, Ls, br, ic, zu, zd, rv, Yd, iv;
22643
22673
  class GD extends Wl {
22644
22674
  constructor(e, r) {
22645
22675
  var i;
@@ -22689,10 +22719,10 @@ class GD extends Wl {
22689
22719
  * RTCRtpReceiver associated with the consumer
22690
22720
  */
22691
22721
  m(this, rc, void 0);
22692
- m(this, Vi, void 0);
22722
+ m(this, Ni, void 0);
22693
22723
  m(this, Vs, void 0);
22694
22724
  m(this, Kd, void 0);
22695
- this.id = r.id, this.localId = r.localId, f(this, rc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Vs, !1), this.producerId = r.producerId, this.track = r.track, f(this, Vi, (i = r.paused) != null ? i : !1), this.mimeType = r.mimeType, this.transceiver = r.transceiver, this.rtpReceiver = r.rtpReceiver, U(this, zd, rv).call(this), f(this, Kd, e);
22725
+ this.id = r.id, this.localId = r.localId, f(this, rc, r.handler), this.appData = r.appData, this.peerId = r.producingPeerId, this.producingTransportId = r.producingTransportId, f(this, Vs, !1), this.producerId = r.producerId, this.track = r.track, f(this, Ni, (i = r.paused) != null ? i : !1), this.mimeType = r.mimeType, this.transceiver = r.transceiver, this.rtpReceiver = r.rtpReceiver, U(this, zd, rv).call(this), f(this, Kd, e);
22696
22726
  }
22697
22727
  /**
22698
22728
  * Indicates whether this consumer is closed
@@ -22710,7 +22740,7 @@ class GD extends Wl {
22710
22740
  * Indicates whether the consumer is paused
22711
22741
  */
22712
22742
  get paused() {
22713
- return n(this, Vi);
22743
+ return n(this, Ni);
22714
22744
  }
22715
22745
  /**
22716
22746
  * Closes the Consumer.
@@ -22736,7 +22766,7 @@ class GD extends Wl {
22736
22766
  this.logger.error("consumer::pause() | Consumer closed", n(this, Ls, br));
22737
22767
  return;
22738
22768
  }
22739
- f(this, Vi, !0), this.track.enabled = !1, this.safeEmit("pause");
22769
+ f(this, Ni, !0), this.track.enabled = !1, this.safeEmit("pause");
22740
22770
  }
22741
22771
  /**
22742
22772
  * Resumes receiving media.
@@ -22746,10 +22776,10 @@ class GD extends Wl {
22746
22776
  this.logger.error("Consumer::resume() | Consumer closed", n(this, Ls, br));
22747
22777
  return;
22748
22778
  }
22749
- f(this, Vi, !1), this.track.enabled = !0, this.safeEmit("resume");
22779
+ f(this, Ni, !1), this.track.enabled = !0, this.safeEmit("resume");
22750
22780
  }
22751
22781
  }
22752
- rc = new WeakMap(), Vi = new WeakMap(), Vs = new WeakMap(), Kd = new WeakMap(), Ls = new WeakSet(), br = function() {
22782
+ rc = new WeakMap(), Ni = new WeakMap(), Vs = new WeakMap(), Kd = new WeakMap(), Ls = new WeakSet(), br = function() {
22753
22783
  return {
22754
22784
  consumer: {
22755
22785
  id: this.id,
@@ -22771,7 +22801,7 @@ rc = new WeakMap(), Vi = new WeakMap(), Vs = new WeakMap(), Kd = new WeakMap(),
22771
22801
  }));
22772
22802
  }
22773
22803
  };
22774
- var vs, va, Sa, Li, ss, Xe, qr, Ta, Qd, Ft, us;
22804
+ var Ss, va, Sa, Vi, ss, Xe, qr, Ta, Qd, Ft, hs;
22775
22805
  class WD extends Wl {
22776
22806
  /**
22777
22807
  * @emits transportclose
@@ -22796,7 +22826,7 @@ class WD extends Wl {
22796
22826
  /**
22797
22827
  * Associated RTCRtpSender.
22798
22828
  */
22799
- m(this, vs, void 0);
22829
+ m(this, Ss, void 0);
22800
22830
  /**
22801
22831
  * Kind of media on to this producer
22802
22832
  */
@@ -22820,13 +22850,13 @@ class WD extends Wl {
22820
22850
  /**
22821
22851
  * Specify if we should replace the RTCRtpSender.track with null when paused.
22822
22852
  */
22823
- m(this, Li, void 0);
22853
+ m(this, Vi, void 0);
22824
22854
  m(this, ss, !1);
22825
22855
  m(this, Xe, void 0);
22826
22856
  m(this, qr, void 0);
22827
22857
  m(this, Ta, void 0);
22828
22858
  m(this, Qd, void 0);
22829
- this.id = r.id, this.localId = r.localId, f(this, Xe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, qr, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, Ta, void 0), f(this, va, r.stopTracks), f(this, Sa, r.disableTrackOnPause), f(this, Li, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, vs, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, Qd, e);
22859
+ this.id = r.id, this.localId = r.localId, f(this, Xe, r.track), this.kind = (i = r.track) == null ? void 0 : i.kind, f(this, qr, r.disableTrackOnPause ? !((a = r.track) != null && a.enabled) : !1), f(this, Ta, void 0), f(this, va, r.stopTracks), f(this, Sa, r.disableTrackOnPause), f(this, Vi, r.zeroRtpOnPause), this.appData = r.appData || {}, this._onTrackEnded = this._onTrackEnded.bind(this), f(this, Ss, r.handler), this.rtpSender = r.rtpSender, this._handleTrack(), f(this, Qd, e);
22830
22860
  }
22831
22861
  /**
22832
22862
  * Whether the Producer is closed.
@@ -22861,11 +22891,11 @@ class WD extends Wl {
22861
22891
  return u(this, null, function* () {
22862
22892
  if (n(this, ss))
22863
22893
  return;
22864
- if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, n(this, Ft, us)), f(this, ss, !0), this._destroyTrack(), e === Md) {
22894
+ if (this.logger.debug(`Producer::close() ${e ? `with reason ${e}` : ""}`, n(this, Ft, hs)), f(this, ss, !0), this._destroyTrack(), e === Md) {
22865
22895
  this.safeEmit("close", { reason: e });
22866
22896
  return;
22867
22897
  }
22868
- const { offerSdp: r, callback: i } = yield n(this, vs).stopSending(this.localId), { answer: a } = yield this.safeEmitAsPromise("close", { offer: r, reason: e });
22898
+ const { offerSdp: r, callback: i } = yield n(this, Ss).stopSending(this.localId), { answer: a } = yield this.safeEmitAsPromise("close", { offer: r, reason: e });
22869
22899
  i(a);
22870
22900
  });
22871
22901
  }
@@ -22876,24 +22906,24 @@ class WD extends Wl {
22876
22906
  return u(this, null, function* () {
22877
22907
  if (n(this, ss))
22878
22908
  throw new It("closed");
22879
- return n(this, vs).getSenderStats(this.localId);
22909
+ return n(this, Ss).getSenderStats(this.localId);
22880
22910
  });
22881
22911
  }
22882
22912
  /**
22883
22913
  * Pauses sending media.
22884
22914
  */
22885
22915
  pause() {
22886
- this.logger.debug("Producer::pause()", n(this, Ft, us)), n(this, ss) && this.logger.error("Producer::pause() | Producer closed", n(this, Ft, us)), f(this, qr, !0), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !1), n(this, Li) && n(this, vs).replaceTrack(this.localId, null), this.emit("pause");
22916
+ this.logger.debug("Producer::pause()", n(this, Ft, hs)), n(this, ss) && this.logger.error("Producer::pause() | Producer closed", n(this, Ft, hs)), f(this, qr, !0), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !1), n(this, Vi) && n(this, Ss).replaceTrack(this.localId, null), this.emit("pause");
22887
22917
  }
22888
22918
  /**
22889
22919
  * Resumes sending media.
22890
22920
  */
22891
22921
  resume() {
22892
- if (this.logger.debug("Producer::resume()", n(this, Ft, us)), n(this, ss)) {
22893
- this.logger.error("Producer::resume() | Producer closed", n(this, Ft, us));
22922
+ if (this.logger.debug("Producer::resume()", n(this, Ft, hs)), n(this, ss)) {
22923
+ this.logger.error("Producer::resume() | Producer closed", n(this, Ft, hs));
22894
22924
  return;
22895
22925
  }
22896
- f(this, qr, !1), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !0), n(this, Li) && n(this, vs).replaceTrack(this.localId, n(this, Xe)), this.emit("resume");
22926
+ f(this, qr, !1), n(this, Xe) && n(this, Sa) && (n(this, Xe).enabled = !0), n(this, Vi) && n(this, Ss).replaceTrack(this.localId, n(this, Xe)), this.emit("resume");
22897
22927
  }
22898
22928
  /**
22899
22929
  * Replaces the current track with a new one or null.
@@ -22902,12 +22932,12 @@ class WD extends Wl {
22902
22932
  return u(this, arguments, function* ({
22903
22933
  track: e
22904
22934
  }) {
22905
- if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, n(this, Ft, us)), n(this, ss)) {
22935
+ if (this.logger.debug(`Producer::replaceTrack() trackId: ${e == null ? void 0 : e.id}`, n(this, Ft, hs)), n(this, ss)) {
22906
22936
  if (e && n(this, va))
22907
22937
  try {
22908
22938
  e.stop();
22909
22939
  } catch (i) {
22910
- this.logger.error("Producer::replaceTrack", H(D({}, n(this, Ft, us)), {
22940
+ this.logger.error("Producer::replaceTrack", H(D({}, n(this, Ft, hs)), {
22911
22941
  error: i
22912
22942
  }));
22913
22943
  }
@@ -22915,10 +22945,10 @@ class WD extends Wl {
22915
22945
  } else if (e && e.readyState === "ended")
22916
22946
  throw new It("track ended");
22917
22947
  if (e === n(this, Xe)) {
22918
- this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Ft, us));
22948
+ this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Ft, hs));
22919
22949
  return;
22920
22950
  }
22921
- (!n(this, Li) || !n(this, qr)) && (yield n(this, vs).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Xe, e), this._handleTrack();
22951
+ (!n(this, Vi) || !n(this, qr)) && (yield n(this, Ss).replaceTrack(this.localId, e)), this._destroyTrack(), f(this, Xe, e), this._handleTrack();
22922
22952
  });
22923
22953
  }
22924
22954
  /**
@@ -22932,7 +22962,7 @@ class WD extends Wl {
22932
22962
  throw new Do("not a video Producer");
22933
22963
  if (typeof e != "number")
22934
22964
  throw new TypeError("invalid spatialLayer");
22935
- yield n(this, vs).setMaxSpatialLayer(this.localId, e), f(this, Ta, e);
22965
+ yield n(this, Ss).setMaxSpatialLayer(this.localId, e), f(this, Ta, e);
22936
22966
  });
22937
22967
  }
22938
22968
  /**
@@ -22944,11 +22974,11 @@ class WD extends Wl {
22944
22974
  throw new It("closed");
22945
22975
  if (typeof e != "object")
22946
22976
  throw new TypeError("invalid params");
22947
- yield n(this, vs).setRtpEncodingParameters(this.localId, e);
22977
+ yield n(this, Ss).setRtpEncodingParameters(this.localId, e);
22948
22978
  });
22949
22979
  }
22950
22980
  _onTrackEnded() {
22951
- this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, n(this, Ft, us)), this.safeEmit("trackended", this.track.id);
22981
+ this.logger.debug(`Producer::track "ended" event trackId: ${this.track.id}`, n(this, Ft, hs)), this.safeEmit("trackended", this.track.id);
22952
22982
  }
22953
22983
  _handleTrack() {
22954
22984
  n(this, Xe) && n(this, Xe).addEventListener("ended", this._onTrackEnded);
@@ -22959,13 +22989,13 @@ class WD extends Wl {
22959
22989
  try {
22960
22990
  n(this, Xe).removeEventListener("ended", this._onTrackEnded), n(this, va) && n(this, Xe).stop();
22961
22991
  } catch (r) {
22962
- this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, H(D({}, n(this, Ft, us)), {
22992
+ this.logger.error(`Producer::_destroyTrack trackId: ${(e = this.track) == null ? void 0 : e.id}`, H(D({}, n(this, Ft, hs)), {
22963
22993
  error: r
22964
22994
  }));
22965
22995
  }
22966
22996
  }
22967
22997
  }
22968
- vs = new WeakMap(), va = new WeakMap(), Sa = new WeakMap(), Li = new WeakMap(), ss = new WeakMap(), Xe = new WeakMap(), qr = new WeakMap(), Ta = new WeakMap(), Qd = new WeakMap(), Ft = new WeakSet(), us = function() {
22998
+ Ss = new WeakMap(), va = new WeakMap(), Sa = new WeakMap(), Vi = new WeakMap(), ss = new WeakMap(), Xe = new WeakMap(), qr = new WeakMap(), Ta = new WeakMap(), Qd = new WeakMap(), Ft = new WeakSet(), hs = function() {
22969
22999
  return {
22970
23000
  producer: {
22971
23001
  id: this.id,
@@ -22992,8 +23022,8 @@ function KD(s) {
22992
23022
  var t, e;
22993
23023
  return JD(s) && (e = (t = s.payload._bolt) == null ? void 0 : t.id) != null ? e : "";
22994
23024
  }
22995
- var jr, Xd, xi;
22996
- const kn = class extends lt.EventEmitter {
23025
+ var jr, Xd, Li;
23026
+ const bn = class extends lt.EventEmitter {
22997
23027
  constructor(e, r, i, a) {
22998
23028
  super();
22999
23029
  h(this, "channel");
@@ -23001,17 +23031,17 @@ const kn = class extends lt.EventEmitter {
23001
23031
  h(this, "serverProtocolVersion");
23002
23032
  m(this, jr, /* @__PURE__ */ new Map());
23003
23033
  m(this, Xd, void 0);
23004
- m(this, xi, void 0);
23034
+ m(this, Li, void 0);
23005
23035
  h(this, "respond", (e, r, i = !1) => {
23006
23036
  let a;
23007
- i ? a = kn.createErrorResponse(e, r) : a = kn.createResponse(e, r), this.channel.send(JSON.stringify(a));
23037
+ i ? a = bn.createErrorResponse(e, r) : a = bn.createResponse(e, r), this.channel.send(JSON.stringify(a));
23008
23038
  });
23009
23039
  h(this, "notify", (e) => {
23010
- const r = kn.createNotification(e);
23040
+ const r = bn.createNotification(e);
23011
23041
  this.channel.send(JSON.stringify(r));
23012
23042
  });
23013
23043
  h(this, "request", (e) => u(this, null, function* () {
23014
- const r = kn.createRequest(e), i = new Promise((a, o) => {
23044
+ const r = bn.createRequest(e), i = new Promise((a, o) => {
23015
23045
  const { id: d } = r.payload._bolt, l = {
23016
23046
  id: d,
23017
23047
  method: r.type,
@@ -23037,7 +23067,7 @@ const kn = class extends lt.EventEmitter {
23037
23067
  const p = l * a, g = (l + 1) * a;
23038
23068
  c.push(r.slice(p, g));
23039
23069
  }
23040
- const d = on();
23070
+ const d = an();
23041
23071
  for (let l = 0; l < o; l += 1) {
23042
23072
  const p = c[l], v = JSON.stringify({
23043
23073
  id: d,
@@ -23045,10 +23075,10 @@ const kn = class extends lt.EventEmitter {
23045
23075
  chunkIndex: l,
23046
23076
  chunk: p
23047
23077
  });
23048
- n(this, xi).debug(`Sending message chunk over dc: ${v}`), this.channel.send(v);
23078
+ n(this, Li).debug(`Sending message chunk over dc: ${v}`), this.channel.send(v);
23049
23079
  }
23050
23080
  } else
23051
- n(this, xi).debug(`Sending message over dc: ${r}`), this.channel.send(r);
23081
+ n(this, Li).debug(`Sending message over dc: ${r}`), this.channel.send(r);
23052
23082
  });
23053
23083
  h(this, "processMessage", (e) => {
23054
23084
  var i;
@@ -23070,17 +23100,17 @@ const kn = class extends lt.EventEmitter {
23070
23100
  });
23071
23101
  h(this, "processResponseMsg", (e) => {
23072
23102
  const { id: r } = e.payload._bolt, i = this.queue.get(r);
23073
- return i ? (n(this, xi).debug(`resolving pending request with id: ${r}, complete response: ${JSON.stringify(e)}`), e.type === "error" ? i.cancel(Tg(e)) : i.resolve(Tg(e)), !0) : !1;
23103
+ return i ? (n(this, Li).debug(`resolving pending request with id: ${r}, complete response: ${JSON.stringify(e)}`), e.type === "error" ? i.cancel(Tg(e)) : i.resolve(Tg(e)), !0) : !1;
23074
23104
  });
23075
23105
  h(this, "processBoltHandshake", (e) => {
23076
23106
  var r, i;
23077
23107
  return e.type === "_bolt" || e.type === "handshake" ? (this.respond((i = (r = e.payload._bolt) == null ? void 0 : r.id) != null ? i : mu(8), { type: "_bolt", payload: { message: "pong" } }), !0) : !1;
23078
23108
  });
23079
- this.label = i, this.transportId = a, f(this, Xd, e), f(this, xi, e.getValue("logger")), this.channel = r, this.queue = /* @__PURE__ */ new Map();
23109
+ this.label = i, this.transportId = a, f(this, Xd, e), f(this, Li, e.getValue("logger")), this.channel = r, this.queue = /* @__PURE__ */ new Map();
23080
23110
  }
23081
23111
  };
23082
- let oi = kn;
23083
- jr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(oi, "createRequest", (e) => {
23112
+ let oi = bn;
23113
+ jr = new WeakMap(), Xd = new WeakMap(), Li = new WeakMap(), h(oi, "createRequest", (e) => {
23084
23114
  var r;
23085
23115
  if ((r = e.payload) != null && r._bolt)
23086
23116
  throw new Error("rpc fields are internal values");
@@ -23134,8 +23164,8 @@ jr = new WeakMap(), Xd = new WeakMap(), xi = new WeakMap(), h(oi, "createRequest
23134
23164
  }
23135
23165
  }));
23136
23166
  const Md = "transport closed";
23137
- var Ui;
23138
- const In = class extends Wl {
23167
+ var xi;
23168
+ const kn = class extends Wl {
23139
23169
  constructor(e, {
23140
23170
  id: r,
23141
23171
  direction: i,
@@ -23177,8 +23207,8 @@ const In = class extends Wl {
23177
23207
  h(this, "unknownTracksMap");
23178
23208
  // App custom data.
23179
23209
  h(this, "appData");
23180
- m(this, Ui, void 0);
23181
- f(this, Ui, e);
23210
+ m(this, xi, void 0);
23211
+ f(this, xi, e);
23182
23212
  const v = e.getValue("logger");
23183
23213
  v.debug(`constructor() [id: ${r}, direction: ${i}]`), this.id = r, this.direction = i;
23184
23214
  const S = jD(l, {});
@@ -23211,7 +23241,7 @@ const In = class extends Wl {
23211
23241
  }
23212
23242
  ), this.handler.on("dc_open", (w) => {
23213
23243
  let L = this.datachannels.get(w.label);
23214
- L || (L || (L = new oi(n(this, Ui), w, w.label, this.serverId), this.datachannels.set(w.label, L)), this.eventsDCFailureTimer = setTimeout(() => {
23244
+ L || (L || (L = new oi(n(this, xi), w, w.label, this.serverId), this.datachannels.set(w.label, L)), this.eventsDCFailureTimer = setTimeout(() => {
23215
23245
  w.label === "events" && (this.eventsDCReadyPromiseResolver(!1), this.safeEmit("dc_error", w.label));
23216
23246
  }, 5e3));
23217
23247
  }), this.handler.on("datachannel", (w, L) => {
@@ -23382,7 +23412,7 @@ const In = class extends Wl {
23382
23412
  }
23383
23413
  createProducerObject(e) {
23384
23414
  return u(this, null, function* () {
23385
- const r = new WD(n(this, Ui), e);
23415
+ const r = new WD(n(this, xi), e);
23386
23416
  return this.producers.set(r.id, r), r.once("close", () => {
23387
23417
  this.producers.delete(r.id);
23388
23418
  }), this.emit("newproducer", r), r;
@@ -23430,7 +23460,7 @@ const In = class extends Wl {
23430
23460
  });
23431
23461
  }
23432
23462
  static parseCodecAndFmtpMappings(e, r) {
23433
- const i = hs.parse(e.sdp), a = {};
23463
+ const i = ps.parse(e.sdp), a = {};
23434
23464
  return i.media.forEach((o) => {
23435
23465
  r.includes(o.mid.toString()) && (a[o.mid.toString()] = {
23436
23466
  rtp: o.rtp,
@@ -23441,7 +23471,7 @@ const In = class extends Wl {
23441
23471
  }), a;
23442
23472
  }
23443
23473
  static setCodecAndFmtpMappings(e, r, i) {
23444
- const a = hs.parse(e.sdp);
23474
+ const a = ps.parse(e.sdp);
23445
23475
  return a.media = a.media.map((c) => {
23446
23476
  if (r.includes(c.mid.toString())) {
23447
23477
  const d = D({}, c);
@@ -23449,40 +23479,40 @@ const In = class extends Wl {
23449
23479
  }
23450
23480
  return c;
23451
23481
  }), H(D({}, e), {
23452
- sdp: hs.write(a)
23482
+ sdp: ps.write(a)
23453
23483
  });
23454
23484
  }
23455
23485
  static parseHeaderExtensionMappings(e) {
23456
- const r = hs.parse(e.sdp), i = {};
23486
+ const r = ps.parse(e.sdp), i = {};
23457
23487
  return r.media.forEach((a) => {
23458
23488
  i[a.mid] = a.ext;
23459
23489
  }), i;
23460
23490
  }
23461
23491
  static setHeaderExtensionMappings(e, r) {
23462
- const i = hs.parse(e.sdp);
23492
+ const i = ps.parse(e.sdp);
23463
23493
  return i.media = i.media.map((o) => {
23464
23494
  const c = D({}, o);
23465
23495
  return c.ext = r[o.mid], c;
23466
23496
  }), H(D({}, e), {
23467
- sdp: hs.write(i)
23497
+ sdp: ps.write(i)
23468
23498
  });
23469
23499
  }
23470
23500
  closeConsumers(e, r) {
23471
23501
  return u(this, null, function* () {
23472
23502
  try {
23473
- const i = e.map((l) => l.transceiver.mid), a = In.parseCodecAndFmtpMappings(
23503
+ const i = e.map((l) => l.transceiver.mid), a = kn.parseCodecAndFmtpMappings(
23474
23504
  this.handler.pc.remoteDescription,
23475
23505
  i
23476
- ), o = In.parseHeaderExtensionMappings(
23506
+ ), o = kn.parseHeaderExtensionMappings(
23477
23507
  this.handler.pc.remoteDescription
23478
23508
  );
23479
23509
  this.logger.info("Stopping transceivers", { consumerIds: e.map(({ id: l }) => l) }), e.forEach((l) => l.close(void 0, !0));
23480
23510
  let c = yield this.handler.pc.createOffer();
23481
- this.logger.info("Created offer for closing consumers", { sdp: c.sdp }), c = In.setCodecAndFmtpMappings(
23511
+ this.logger.info("Created offer for closing consumers", { sdp: c.sdp }), c = kn.setCodecAndFmtpMappings(
23482
23512
  c,
23483
23513
  i,
23484
23514
  a
23485
- ), c = In.setHeaderExtensionMappings(
23515
+ ), c = kn.setHeaderExtensionMappings(
23486
23516
  c,
23487
23517
  o
23488
23518
  ), this.logger.info("Updated codec and fmtp mappings in close consumer offer", { sdp: c.sdp }), yield this.setLocalDescription(c), this.logger.info("Successfully set local description in close consumers");
@@ -23499,7 +23529,7 @@ const In = class extends Wl {
23499
23529
  this.logger.info("Received offer from SFU", { sdp: e.sdp }), yield this.setRemoteDescription(e);
23500
23530
  const r = yield this.handler.pc.createAnswer();
23501
23531
  this.logger.info("Created answer corresponding to received offer", { sdp: r.sdp });
23502
- const i = hs.parse(r.sdp);
23532
+ const i = ps.parse(r.sdp);
23503
23533
  return i.media = i.media.map((a) => {
23504
23534
  if (a.type === "audio") {
23505
23535
  const o = D({}, a), c = o.fmtp.find(
@@ -23513,7 +23543,7 @@ const In = class extends Wl {
23513
23543
  }), o;
23514
23544
  }
23515
23545
  return a;
23516
- }), r.sdp = hs.write(i), this.logger.info("Setting munged SDP", { sdp: r.sdp }), yield this.setLocalDescription(r), this.logger.info("Successfully set local description", { sdp: r.sdp }), r;
23546
+ }), r.sdp = ps.write(i), this.logger.info("Setting munged SDP", { sdp: r.sdp }), yield this.setLocalDescription(r), this.logger.info("Successfully set local description", { sdp: r.sdp }), r;
23517
23547
  } catch (r) {
23518
23548
  throw this.logger.error("Set remote offer failed", { error: r }), r;
23519
23549
  }
@@ -23572,7 +23602,7 @@ const In = class extends Wl {
23572
23602
  else {
23573
23603
  const G = N;
23574
23604
  G.enabled = !0, this.handler.midTransceiverMap.set(B.mid, B);
23575
- const re = new GD(n(this, Ui), {
23605
+ const re = new GD(n(this, xi), {
23576
23606
  id: r,
23577
23607
  localId: B.mid,
23578
23608
  transceiver: B,
@@ -23628,8 +23658,8 @@ const In = class extends Wl {
23628
23658
  });
23629
23659
  }
23630
23660
  };
23631
- let Yu = In;
23632
- Ui = new WeakMap();
23661
+ let Yu = kn;
23662
+ xi = new WeakMap();
23633
23663
  function zD(s) {
23634
23664
  if (typeof navigator == "object" && navigator.product === "ReactNative") {
23635
23665
  if (typeof RTCPeerConnection == "undefined") {
@@ -23669,15 +23699,15 @@ function zD(s) {
23669
23699
  }
23670
23700
  s.warn("Device::this._detectDevice() | unknown device");
23671
23701
  }
23672
- var rr, $i;
23702
+ var rr, Ui;
23673
23703
  class YD {
23674
23704
  constructor(t, { handlerName: e, handlerFactory: r } = {}) {
23675
23705
  // RTC handler factory.
23676
23706
  h(this, "handlerFactory");
23677
23707
  m(this, rr, void 0);
23678
- m(this, $i, void 0);
23708
+ m(this, Ui, void 0);
23679
23709
  const i = t.getValue("logger");
23680
- if (i.debug("constructor()"), f(this, rr, t), f(this, $i, i), e && r)
23710
+ if (i.debug("constructor()"), f(this, rr, t), f(this, Ui, i), e && r)
23681
23711
  throw new TypeError(
23682
23712
  "just one of handlerName or handlerInterface can be given"
23683
23713
  );
@@ -23685,9 +23715,9 @@ class YD {
23685
23715
  this.handlerFactory = r;
23686
23716
  else {
23687
23717
  if (e)
23688
- n(this, $i).debug(`Device::constructor() | handler given: ${e}`);
23689
- else if (e = zD(n(this, $i)), e)
23690
- n(this, $i).debug(`Device::constructor() | detected handler: ${e}`);
23718
+ n(this, Ui).debug(`Device::constructor() | handler given: ${e}`);
23719
+ else if (e = zD(n(this, Ui)), e)
23720
+ n(this, Ui).debug(`Device::constructor() | detected handler: ${e}`);
23691
23721
  else
23692
23722
  throw new Error("device not supported");
23693
23723
  switch (e) {
@@ -23721,7 +23751,7 @@ class YD {
23721
23751
  * @throws {TypeError} if wrong arguments.
23722
23752
  */
23723
23753
  createTransport(t) {
23724
- const e = on();
23754
+ const e = an();
23725
23755
  return new Yu(n(this, rr), H(D({
23726
23756
  id: e
23727
23757
  }, t), {
@@ -23729,9 +23759,9 @@ class YD {
23729
23759
  }));
23730
23760
  }
23731
23761
  }
23732
- rr = new WeakMap(), $i = new WeakMap();
23762
+ rr = new WeakMap(), Ui = new WeakMap();
23733
23763
  const QD = 2e3;
23734
- var ya, at, ot, nc, ac, Fi, Ea, oc, Pa, Bi, xs, _a, fd, cc, Qu, Zd, av, dc, Xu, el, ov, tl, cv, sl, dv, rl, lv, il, uv, lc, Zu, uc, eh;
23764
+ var ya, at, ot, nc, ac, $i, Ea, oc, Pa, Fi, xs, _a, fd, cc, Qu, Zd, av, dc, Xu, el, ov, tl, cv, sl, dv, rl, lv, il, uv, lc, Zu, uc, eh;
23735
23765
  class XD extends lt.EventEmitter {
23736
23766
  constructor(e, r) {
23737
23767
  super();
@@ -23752,7 +23782,7 @@ class XD extends lt.EventEmitter {
23752
23782
  m(this, ot, void 0);
23753
23783
  m(this, nc, void 0);
23754
23784
  m(this, ac, void 0);
23755
- m(this, Fi, void 0);
23785
+ m(this, $i, void 0);
23756
23786
  m(this, Ea, void 0);
23757
23787
  m(this, oc, void 0);
23758
23788
  m(this, Pa, {
@@ -23762,11 +23792,11 @@ class XD extends lt.EventEmitter {
23762
23792
  },
23763
23793
  lastConnectionTime: 0
23764
23794
  });
23765
- m(this, Bi, void 0);
23795
+ m(this, Fi, void 0);
23766
23796
  m(this, xs, "all");
23767
- this.context = e, f(this, Fi, r), f(this, ya, new YD(e)), f(this, Ea, new qD(r)), f(this, oc, Cs), n(this, _a, fd).mediaState = {
23768
- send: { state: Dn.NEW },
23769
- recv: { state: Dn.NEW }
23797
+ this.context = e, f(this, $i, r), f(this, ya, new YD(e)), f(this, Ea, new qD(r)), f(this, oc, ws), n(this, _a, fd).mediaState = {
23798
+ send: { state: Mn.NEW },
23799
+ recv: { state: Mn.NEW }
23770
23800
  }, (xa(this.context, "forceRelay") || this.context.getValue("flagsmith").hasFeature(ee.FORCE_RELAY)) && f(this, xs, "relay"), this.logger.info(`ICE Transport Policy initially set to ${n(this, xs)}`), U(this, cc, Qu).call(this);
23771
23801
  }
23772
23802
  /**
@@ -23784,7 +23814,7 @@ class XD extends lt.EventEmitter {
23784
23814
  return this.context.getValue("logger");
23785
23815
  }
23786
23816
  get socket() {
23787
- return n(this, Fi);
23817
+ return n(this, $i);
23788
23818
  }
23789
23819
  get socketHandler() {
23790
23820
  return n(this, Ea);
@@ -23843,10 +23873,10 @@ class XD extends lt.EventEmitter {
23843
23873
  throw new Error("Method not implemented.");
23844
23874
  }
23845
23875
  }
23846
- ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(), ac = new WeakMap(), Fi = new WeakMap(), Ea = new WeakMap(), oc = new WeakMap(), Pa = new WeakMap(), Bi = new WeakMap(), xs = new WeakMap(), _a = new WeakSet(), fd = function() {
23876
+ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(), ac = new WeakMap(), $i = new WeakMap(), Ea = new WeakMap(), oc = new WeakMap(), Pa = new WeakMap(), Fi = new WeakMap(), xs = new WeakMap(), _a = new WeakSet(), fd = function() {
23847
23877
  return this.context.getValue("connectionHandler");
23848
23878
  }, cc = new WeakSet(), Qu = function() {
23849
- f(this, Bi, {
23879
+ f(this, Fi, {
23850
23880
  send: void 0,
23851
23881
  recv: void 0
23852
23882
  });
@@ -23920,7 +23950,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
23920
23950
  const { id: r, direction: i } = e;
23921
23951
  if (this.logger.info(`Connecting ${i} transport`, {
23922
23952
  transport: { id: r, type: i }
23923
- }), !n(this, Fi).isConnected)
23953
+ }), !n(this, $i).isConnected)
23924
23954
  throw new hi("Socket is not connected");
23925
23955
  if (e.connectionState === "closed")
23926
23956
  throw new hi("Transport is closed");
@@ -23979,15 +24009,15 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
23979
24009
  }
23980
24010
  );
23981
24011
  const o = () => {
23982
- const c = n(this, Bi)[r];
23983
- c !== void 0 && (clearTimeout(c), n(this, Bi)[r] = void 0);
24012
+ const c = n(this, Fi)[r];
24013
+ c !== void 0 && (clearTimeout(c), n(this, Fi)[r] = void 0);
23984
24014
  };
23985
24015
  switch (a) {
23986
24016
  case "connected":
23987
24017
  o(), n(this, Pa).lastConnectionTime = performance.now();
23988
24018
  break;
23989
24019
  case "disconnected":
23990
- n(this, Bi)[r] = setTimeout(() => u(this, null, function* () {
24020
+ n(this, Fi)[r] = setTimeout(() => u(this, null, function* () {
23991
24021
  this.logger.warn(`${r} transport is in disconnected state, reconnecting transport`, { transport: { id: i, serverId: e.serverId, type: r } }), yield U(this, lc, Zu).call(this, e.direction);
23992
24022
  }), QD);
23993
24023
  break;
@@ -24058,7 +24088,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
24058
24088
  return u(this, null, function* () {
24059
24089
  switch (this.logger.info("Called reconnect transport", { transport: { type: e } }), this.stopTransports({ [e]: !0 }), this.context.getValue("flagsmith").hasFeature(
24060
24090
  ee.CF_TRANSPORT_FORCE_RELAY_ON_ICE_FAILED
24061
- ) && n(this, Fi).isConnected && n(this, Pa).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), f(this, xs, "relay")), yield this.setupTransports({ [e]: !0 }), e) {
24091
+ ) && n(this, $i).isConnected && n(this, Pa).transportFailureCount[e] > 2 && (this.logger.warn(`Multiple disconnections in ${e} transport, forcing relay`), f(this, xs, "relay")), yield this.setupTransports({ [e]: !0 }), e) {
24062
24092
  case "send": {
24063
24093
  this.logger.info("Transport reconnected", { transport: n(this, at) }), this.context.getValue("peerSessionStore").emit(k.RESET_PRODUCER_STATE);
24064
24094
  break;
@@ -24071,7 +24101,7 @@ ya = new WeakMap(), at = new WeakMap(), ot = new WeakMap(), nc = new WeakMap(),
24071
24101
  this.logger.warn("Unknown transport direction", { transport: { type: e } });
24072
24102
  }
24073
24103
  U(this, uc, eh).call(this, {
24074
- state: Dn.CONNECTED,
24104
+ state: Mn.CONNECTED,
24075
24105
  direction: e
24076
24106
  });
24077
24107
  });
@@ -24227,7 +24257,7 @@ class Gh {
24227
24257
  this.socketHandler = t;
24228
24258
  }
24229
24259
  static getMSIDFromSDP(t, e) {
24230
- return hs.parse(t).media.filter(
24260
+ return ps.parse(t).media.filter(
24231
24261
  (a) => e === "video" ? a.type === "video" : a.type === "audio"
24232
24262
  ).at(-1).msid;
24233
24263
  }
@@ -24259,7 +24289,7 @@ class Gh {
24259
24289
  });
24260
24290
  }
24261
24291
  }
24262
- var Hi, Gr, Ca, pc, Us, nl, ir, wa, gc, th, al, hv, ol, pv, cl, gv, dl, mv;
24292
+ var Bi, Gr, Ca, pc, Us, nl, ir, wa, gc, th, al, hv, ol, pv, cl, gv, dl, mv;
24263
24293
  class eO extends XD {
24264
24294
  constructor(e, r) {
24265
24295
  super(e, r);
@@ -24268,7 +24298,7 @@ class eO extends XD {
24268
24298
  m(this, ol);
24269
24299
  m(this, cl);
24270
24300
  m(this, dl);
24271
- m(this, Hi, void 0);
24301
+ m(this, Bi, void 0);
24272
24302
  m(this, Gr, void 0);
24273
24303
  m(this, Ca, void 0);
24274
24304
  m(this, pc, void 0);
@@ -24296,7 +24326,7 @@ class eO extends XD {
24296
24326
  return super.socketHandler;
24297
24327
  }
24298
24328
  get producers() {
24299
- return n(this, Hi);
24329
+ return n(this, Bi);
24300
24330
  }
24301
24331
  get consumers() {
24302
24332
  return n(this, Gr);
@@ -24312,7 +24342,7 @@ class eO extends XD {
24312
24342
  return this.context.getValue("logger");
24313
24343
  }
24314
24344
  reset() {
24315
- f(this, Hi, /* @__PURE__ */ new Map()), f(this, Gr, /* @__PURE__ */ new Map()), f(this, Ca, /* @__PURE__ */ new Map());
24345
+ f(this, Bi, /* @__PURE__ */ new Map()), f(this, Gr, /* @__PURE__ */ new Map()), f(this, Ca, /* @__PURE__ */ new Map());
24316
24346
  }
24317
24347
  createProducer(e, r) {
24318
24348
  return u(this, null, function* () {
@@ -24347,7 +24377,7 @@ class eO extends XD {
24347
24377
  });
24348
24378
  }
24349
24379
  closeAllProducers() {
24350
- return Promise.all(Array.from(n(this, Hi).entries()).map(([, e]) => e.close()));
24380
+ return Promise.all(Array.from(n(this, Bi).entries()).map(([, e]) => e.close()));
24351
24381
  }
24352
24382
  createConsumer(e) {
24353
24383
  return this.createConsumers([e]);
@@ -24380,7 +24410,7 @@ class eO extends XD {
24380
24410
  });
24381
24411
  }
24382
24412
  }
24383
- Hi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(), Us = new WeakMap(), nl = new WeakMap(), ir = new WeakMap(), wa = new WeakMap(), gc = new WeakSet(), th = function() {
24413
+ Bi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(), Us = new WeakMap(), nl = new WeakMap(), ir = new WeakMap(), wa = new WeakMap(), gc = new WeakSet(), th = function() {
24384
24414
  return u(this, null, function* () {
24385
24415
  if (!this.recvTransport || this.recvTransport.closed)
24386
24416
  throw new Error("Recv transport is closed");
@@ -24449,7 +24479,7 @@ Hi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(),
24449
24479
  this.producers.delete(e.id), r();
24450
24480
  })), e.on("trackended", () => {
24451
24481
  this.logger.info("producer::trackended", { producer: H(D({}, e), { status: "UNKNOWN" }) });
24452
- }), n(this, Hi).set(e.id, e);
24482
+ }), n(this, Bi).set(e.id, e);
24453
24483
  }, cl = new WeakSet(), gv = function(e) {
24454
24484
  return u(this, null, function* () {
24455
24485
  try {
@@ -24474,7 +24504,7 @@ Hi = new WeakMap(), Gr = new WeakMap(), Ca = new WeakMap(), pc = new WeakMap(),
24474
24504
  peerId: e.peerId
24475
24505
  });
24476
24506
  };
24477
- var mc, fc, vc, Ra, ba, ka, Sc, Tc, Ia, Rt, Ss, Ts, qi, ji, nr, yc, ll, fv, ul, vv, hl, Sv, pl, Tv;
24507
+ var mc, fc, vc, Ra, ba, ka, Sc, Tc, Ia, Rt, Ts, ys, Hi, qi, nr, yc, ll, fv, ul, vv, hl, Sv, pl, Tv;
24478
24508
  const gl = class {
24479
24509
  constructor({
24480
24510
  initialEnergyThreshold: t = 0.015,
@@ -24510,16 +24540,16 @@ const gl = class {
24510
24540
  m(this, Ia, void 0);
24511
24541
  // State variables
24512
24542
  m(this, Rt, void 0);
24513
- m(this, Ss, void 0);
24514
- m(this, Ts, !1);
24543
+ m(this, Ts, void 0);
24544
+ m(this, ys, !1);
24545
+ m(this, Hi, 0);
24515
24546
  m(this, qi, 0);
24516
- m(this, ji, 0);
24517
24547
  m(this, nr, []);
24518
24548
  m(this, yc, void 0);
24519
- f(this, Ra, t), f(this, Rt, t), f(this, mc, e), f(this, fc, r), f(this, vc, i), f(this, ba, a), f(this, ka, o), f(this, Sc, c), f(this, Tc, d), f(this, Ia, l), f(this, yc, p), f(this, Ss, t / 2);
24549
+ f(this, Ra, t), f(this, Rt, t), f(this, mc, e), f(this, fc, r), f(this, vc, i), f(this, ba, a), f(this, ka, o), f(this, Sc, c), f(this, Tc, d), f(this, Ia, l), f(this, yc, p), f(this, Ts, t / 2);
24520
24550
  }
24521
24551
  get voiceDetected() {
24522
- return n(this, Ts);
24552
+ return n(this, ys);
24523
24553
  }
24524
24554
  /**
24525
24555
  * Process an audio chunk and determine if it contains voice activity
@@ -24529,13 +24559,13 @@ const gl = class {
24529
24559
  processAudioChunk(t) {
24530
24560
  var o, c;
24531
24561
  const e = U(o = gl, hl, Sv).call(o, t), r = U(c = gl, pl, Tv).call(c, t);
24532
- return U(this, ll, fv).call(this, e), e / n(this, Ss) > n(this, Ia) && e > n(this, Rt) && r > n(this, mc) ? (f(this, qi, n(this, qi) + 1), f(this, ji, n(this, vc)), n(this, qi) >= n(this, fc) && f(this, Ts, !0)) : (f(this, qi, 0), n(this, ji) > 0 ? f(this, ji, n(this, ji) - 1) : n(this, Ts) && f(this, Ts, !1), n(this, Ts) || U(this, ul, vv).call(this, e)), { energy: e, isVoice: n(this, Ts) };
24562
+ return U(this, ll, fv).call(this, e), e / n(this, Ts) > n(this, Ia) && e > n(this, Rt) && r > n(this, mc) ? (f(this, Hi, n(this, Hi) + 1), f(this, qi, n(this, vc)), n(this, Hi) >= n(this, fc) && f(this, ys, !0)) : (f(this, Hi, 0), n(this, qi) > 0 ? f(this, qi, n(this, qi) - 1) : n(this, ys) && f(this, ys, !1), n(this, ys) || U(this, ul, vv).call(this, e)), { energy: e, isVoice: n(this, ys) };
24533
24563
  }
24534
24564
  /**
24535
24565
  * Reset the detector state
24536
24566
  */
24537
24567
  reset() {
24538
- f(this, Ts, !1), f(this, qi, 0), f(this, ji, 0), f(this, Rt, n(this, Ra)), f(this, Ss, n(this, Ra) / 2), f(this, nr, []);
24568
+ f(this, ys, !1), f(this, Hi, 0), f(this, qi, 0), f(this, Rt, n(this, Ra)), f(this, Ts, n(this, Ra) / 2), f(this, nr, []);
24539
24569
  }
24540
24570
  /**
24541
24571
  * Get current adaptive threshold values for debugging/visualization
@@ -24543,14 +24573,14 @@ const gl = class {
24543
24573
  getThresholdInfo() {
24544
24574
  return {
24545
24575
  currentEnergyThreshold: n(this, Rt),
24546
- backgroundNoiseEnergy: n(this, Ss),
24576
+ backgroundNoiseEnergy: n(this, Ts),
24547
24577
  energyRatioThreshold: n(this, Ia)
24548
24578
  };
24549
24579
  }
24550
24580
  };
24551
24581
  let fo = gl;
24552
- mc = new WeakMap(), fc = new WeakMap(), vc = new WeakMap(), Ra = new WeakMap(), ba = new WeakMap(), ka = new WeakMap(), Sc = new WeakMap(), Tc = new WeakMap(), Ia = new WeakMap(), Rt = new WeakMap(), Ss = new WeakMap(), Ts = new WeakMap(), qi = new WeakMap(), ji = new WeakMap(), nr = new WeakMap(), yc = new WeakMap(), ll = new WeakSet(), fv = function(t) {
24553
- n(this, Ts) ? f(this, Rt, n(this, ka) * n(this, Rt) + (1 - n(this, ka)) * t) : f(this, Rt, n(this, ba) * n(this, Rt) + (1 - n(this, ba)) * n(this, Ss)), f(this, Rt, Math.max(
24582
+ mc = new WeakMap(), fc = new WeakMap(), vc = new WeakMap(), Ra = new WeakMap(), ba = new WeakMap(), ka = new WeakMap(), Sc = new WeakMap(), Tc = new WeakMap(), Ia = new WeakMap(), Rt = new WeakMap(), Ts = new WeakMap(), ys = new WeakMap(), Hi = new WeakMap(), qi = new WeakMap(), nr = new WeakMap(), yc = new WeakMap(), ll = new WeakSet(), fv = function(t) {
24583
+ n(this, ys) ? f(this, Rt, n(this, ka) * n(this, Rt) + (1 - n(this, ka)) * t) : f(this, Rt, n(this, ba) * n(this, Rt) + (1 - n(this, ba)) * n(this, Ts)), f(this, Rt, Math.max(
24554
24584
  n(this, Sc),
24555
24585
  Math.min(n(this, Tc), n(this, Rt))
24556
24586
  ));
@@ -24558,9 +24588,9 @@ mc = new WeakMap(), fc = new WeakMap(), vc = new WeakMap(), Ra = new WeakMap(),
24558
24588
  if (t < n(this, Rt) * 1.2)
24559
24589
  if (n(this, nr).push(t), n(this, nr).length > n(this, yc) && n(this, nr).shift(), n(this, nr).length >= 10) {
24560
24590
  const e = [...n(this, nr)].sort((i, a) => i - a), r = Math.floor(e.length / 2);
24561
- f(this, Ss, e[r]);
24591
+ f(this, Ts, e[r]);
24562
24592
  } else
24563
- f(this, Ss, 0.95 * n(this, Ss) + 0.05 * t);
24593
+ f(this, Ts, 0.95 * n(this, Ts) + 0.05 * t);
24564
24594
  }, hl = new WeakSet(), Sv = function(t) {
24565
24595
  return Math.sqrt(
24566
24596
  t.map((e) => e * e).reduce((e, r) => e + r) / t.length
@@ -24648,16 +24678,16 @@ class tO {
24648
24678
  }
24649
24679
  }
24650
24680
  const sO = 60, rO = 400;
24651
- var ar, or, ys, _c, Gi, Aa, cr, Wr, Ma, dr, lr, $s, ml, yv, Cc, sh, fl, Ev, vl, Pv;
24681
+ var ar, or, Es, _c, ji, Aa, cr, Wr, Ma, dr, lr, $s, ml, yv, Cc, sh, fl, Ev, vl, Pv;
24652
24682
  const Ro = class {
24653
24683
  constructor(t, e) {
24654
24684
  m(this, ml);
24655
24685
  m(this, fl);
24656
24686
  m(this, ar, void 0);
24657
24687
  m(this, or, void 0);
24658
- m(this, ys, void 0);
24688
+ m(this, Es, void 0);
24659
24689
  m(this, _c, void 0);
24660
- m(this, Gi, void 0);
24690
+ m(this, ji, void 0);
24661
24691
  m(this, Aa, void 0);
24662
24692
  m(this, cr, void 0);
24663
24693
  m(this, Wr, void 0);
@@ -24677,19 +24707,19 @@ const Ro = class {
24677
24707
  return n(this, dr).getValue("logger");
24678
24708
  }
24679
24709
  set producerId(t) {
24680
- f(this, ys, t);
24710
+ f(this, Es, t);
24681
24711
  }
24682
24712
  set audioTrack(t) {
24683
24713
  f(this, _c, t), n(this, lr) instanceof Eg && (n(this, lr).audioTrack = t);
24684
24714
  }
24685
24715
  start() {
24686
- this.logger.debug(`AudioActivityReporter: Starting audio activity reporter: ${n(this, ys)}`), n(this, ar) && n(this, $s).clearInterval(n(this, ar)), f(this, ar, n(this, $s).setInterval(() => u(this, null, function* () {
24716
+ this.logger.debug(`AudioActivityReporter: Starting audio activity reporter: ${n(this, Es)}`), n(this, ar) && n(this, $s).clearInterval(n(this, ar)), f(this, ar, n(this, $s).setInterval(() => u(this, null, function* () {
24687
24717
  var i;
24688
- if (!n(this, _c) || !n(this, ys))
24718
+ if (!n(this, _c) || !n(this, Es))
24689
24719
  return;
24690
24720
  const { energy: t } = U(this, ml, yv).call(this), e = U(i = Ro, Cc, sh).call(i, t);
24691
24721
  let r = 0.9;
24692
- n(this, Ma) !== e && n(this, Ma) ? r = 0.9 : e ? r = 0.3 : r = 0.5, f(this, Gi, (n(this, Gi) || 0) * (1 - r) + t * r);
24722
+ n(this, Ma) !== e && n(this, Ma) ? r = 0.9 : e ? r = 0.3 : r = 0.5, f(this, ji, (n(this, ji) || 0) * (1 - r) + t * r);
24693
24723
  }), sO)), n(this, or) && n(this, $s).clearInterval(n(this, or)), f(this, or, n(this, $s).setInterval(
24694
24724
  U(this, fl, Ev).bind(this),
24695
24725
  rO
@@ -24697,31 +24727,31 @@ const Ro = class {
24697
24727
  }
24698
24728
  stop() {
24699
24729
  try {
24700
- this.logger.debug(`AudioActivityReporter: Stopping audio activity reporter: ${n(this, ys)}`), n(this, ar) && (n(this, $s).clearInterval(n(this, ar)), f(this, ar, void 0)), n(this, or) && (n(this, $s).clearInterval(n(this, or)), f(this, or, void 0));
24730
+ this.logger.debug(`AudioActivityReporter: Stopping audio activity reporter: ${n(this, Es)}`), n(this, ar) && (n(this, $s).clearInterval(n(this, ar)), f(this, ar, void 0)), n(this, or) && (n(this, $s).clearInterval(n(this, or)), f(this, or, void 0));
24701
24731
  } catch (t) {
24702
24732
  }
24703
24733
  n(this, Aa).reset(), n(this, lr) instanceof yg && n(this, lr).stop();
24704
24734
  }
24705
24735
  };
24706
24736
  let vo = Ro;
24707
- ar = new WeakMap(), or = new WeakMap(), ys = new WeakMap(), _c = new WeakMap(), Gi = new WeakMap(), Aa = new WeakMap(), cr = new WeakMap(), Wr = new WeakMap(), Ma = new WeakMap(), dr = new WeakMap(), lr = new WeakMap(), $s = new WeakMap(), ml = new WeakSet(), yv = function() {
24737
+ ar = new WeakMap(), or = new WeakMap(), Es = new WeakMap(), _c = new WeakMap(), ji = new WeakMap(), Aa = new WeakMap(), cr = new WeakMap(), Wr = new WeakMap(), Ma = new WeakMap(), dr = new WeakMap(), lr = new WeakMap(), $s = new WeakMap(), ml = new WeakSet(), yv = function() {
24708
24738
  var o;
24709
24739
  const { samples: t } = n(this, lr), { energy: e, isVoice: r } = n(this, Aa).processAudioChunk(t), i = U(o = Ro, vl, Pv).call(o, e);
24710
24740
  return n(this, dr).getValue("flagsmith").hasFeature(ee.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(
24711
- `AudioActivityReporter: producer: ${n(this, ys)}, energy: ${n(this, Gi)},
24741
+ `AudioActivityReporter: producer: ${n(this, Es)}, energy: ${n(this, ji)},
24712
24742
  slogScale: ${i}, isVoice: ${r}, minEnergy: ${n(this, cr)},
24713
24743
  maxEnergy: ${n(this, Wr)}`
24714
24744
  ), i === -1 / 0 || e < 1e-6 ? { energy: 0, isVoice: !1 } : ((!n(this, cr) || i < n(this, cr)) && f(this, cr, i), (!n(this, Wr) || i > n(this, Wr)) && f(this, Wr, i), { energy: (i - n(this, cr)) / (n(this, Wr) - n(this, cr)) * 10 || 0, isVoice: r });
24715
24745
  }, Cc = new WeakSet(), sh = function(t) {
24716
24746
  return t < 5;
24717
- }, fl = new WeakSet(), Ev = function(t = n(this, Gi)) {
24747
+ }, fl = new WeakSet(), Ev = function(t = n(this, ji)) {
24718
24748
  var r;
24719
- if (!n(this, ys) || !t) {
24720
- n(this, dr).getValue("flagsmith").hasFeature(ee.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(`AudioActivityReporter: No producerId or energy to report: ${n(this, ys)}`);
24749
+ if (!n(this, Es) || !t) {
24750
+ n(this, dr).getValue("flagsmith").hasFeature(ee.ENABLE_AUDIO_ACTIVITY_DEBUG_LOGS) && this.logger.debug(`AudioActivityReporter: No producerId or energy to report: ${n(this, Es)}`);
24721
24751
  return;
24722
24752
  }
24723
24753
  const e = {
24724
- producerId: n(this, ys),
24754
+ producerId: n(this, Es),
24725
24755
  energy: Math.round(t),
24726
24756
  silent: U(r = Ro, Cc, sh).call(r, t)
24727
24757
  };
@@ -24791,7 +24821,7 @@ var aO = Object.defineProperty, oO = Object.getOwnPropertyDescriptor, de = (s, t
24791
24821
  return r && i && aO(t, e, i), i;
24792
24822
  };
24793
24823
  const Ot = ["video/VP9", "video/VP8"];
24794
- var wc, Rc, ct, W, Da, St, Wi, Ji, Ki, bc, is, ur, kc, zi, Yi, Tt, bt, Jr, Pn, Sl, Cv, Tl, wv, yl, Rv, Ic, rh, El, fu, bv, Pl, kv, _l, Iv, Cl, Av, Ze, pt, Qi, So, wl, Mv, Rl, Dv, bl, Ov;
24824
+ var wc, Rc, ct, W, Da, St, Gi, Wi, Ji, bc, is, ur, kc, Ki, zi, Tt, bt, Jr, En, Sl, Cv, Tl, wv, yl, Rv, Ic, rh, El, fu, bv, Pl, kv, _l, Iv, Cl, Av, Ze, pt, Yi, So, wl, Mv, Rl, Dv, bl, Ov;
24795
24825
  const _v = (fu = class {
24796
24826
  constructor(s, t) {
24797
24827
  m(this, Jr);
@@ -24814,7 +24844,7 @@ const _v = (fu = class {
24814
24844
  m(this, _l);
24815
24845
  m(this, Cl);
24816
24846
  m(this, Ze);
24817
- m(this, Qi);
24847
+ m(this, Yi);
24818
24848
  m(this, wl);
24819
24849
  m(this, Rl);
24820
24850
  m(this, bl);
@@ -24827,9 +24857,9 @@ const _v = (fu = class {
24827
24857
  m(this, W, void 0);
24828
24858
  m(this, Da, void 0);
24829
24859
  m(this, St, void 0);
24860
+ m(this, Gi, void 0);
24830
24861
  m(this, Wi, void 0);
24831
24862
  m(this, Ji, void 0);
24832
- m(this, Ki, void 0);
24833
24863
  m(this, bc, void 0);
24834
24864
  m(this, is, null);
24835
24865
  m(this, ur, void 0);
@@ -24837,8 +24867,8 @@ const _v = (fu = class {
24837
24867
  // NOTE(roerohan): If a peer ID is present in a set corresponding
24838
24868
  // to a video codec, it implies that the video codec is the best
24839
24869
  // codec that the peer can send
24870
+ m(this, Ki, void 0);
24840
24871
  m(this, zi, void 0);
24841
- m(this, Yi, void 0);
24842
24872
  m(this, Tt, void 0);
24843
24873
  m(this, bt, void 0);
24844
24874
  var r, i;
@@ -24846,18 +24876,18 @@ const _v = (fu = class {
24846
24876
  const {
24847
24877
  socket: e
24848
24878
  } = t;
24849
- this.mediaJoined = !1, f(this, zi, /* @__PURE__ */ new Map([
24879
+ this.mediaJoined = !1, f(this, Ki, /* @__PURE__ */ new Map([
24850
24880
  ["video/VP9", /* @__PURE__ */ new Set()],
24851
24881
  ["video/VP8", /* @__PURE__ */ new Set()]
24852
- ])), f(this, Yi, /* @__PURE__ */ new Map([
24882
+ ])), f(this, zi, /* @__PURE__ */ new Map([
24853
24883
  ["video/VP9", /* @__PURE__ */ new Set()],
24854
24884
  ["video/VP8", /* @__PURE__ */ new Set()]
24855
- ])), f(this, ct, e), f(this, Wi, !1), f(this, W, new eO(s, e)), f(this, St, n(this, W).events), f(this, ur, /* @__PURE__ */ new Set()), f(this, Tt, /* @__PURE__ */ new Map()), f(this, Ji, !1), f(this, Ki, new Ku(s.getValue("logger"))), f(this, bt, new vo(
24885
+ ])), f(this, ct, e), f(this, Gi, !1), f(this, W, new eO(s, e)), f(this, St, n(this, W).events), f(this, ur, /* @__PURE__ */ new Set()), f(this, Tt, /* @__PURE__ */ new Map()), f(this, Wi, !1), f(this, Ji, new Ku(s.getValue("logger"))), f(this, bt, new vo(
24856
24886
  this.context,
24857
24887
  n(this, W).socketHandler.audioActivity.bind(n(this, W).socketHandler)
24858
24888
  )), this.e2ee = (i = (r = s.getValue("modules").e2ee) == null ? void 0 : r.enabled) != null ? i : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, bc, Ih(
24859
24889
  () => u(this, null, function* () {
24860
- if (!n(this, Jr, Pn).mediaJoinAttempted)
24890
+ if (!n(this, Jr, En).mediaJoinAttempted)
24861
24891
  return;
24862
24892
  const { roomJoined: a } = yield this.joinRoom(
24863
24893
  n(this, Rc),
@@ -24889,19 +24919,19 @@ const _v = (fu = class {
24889
24919
  return this.context.getValue("logger");
24890
24920
  }
24891
24921
  get mediaJoined() {
24892
- return n(this, Jr, Pn).mediaJoined;
24922
+ return n(this, Jr, En).mediaJoined;
24893
24923
  }
24894
24924
  set mediaJoined(s) {
24895
- n(this, Jr, Pn).mediaJoined = s;
24925
+ n(this, Jr, En).mediaJoined = s;
24896
24926
  }
24897
24927
  reset() {
24898
- n(this, W).closeAllProducers(), n(this, W).closeAllConsumers(), n(this, Tt).clear(), n(this, ur).clear(), f(this, is, null), n(this, Ki).stop(), n(this, W).stopAllTransports(), n(this, W).reset(), f(this, Ki, new Ku());
24928
+ n(this, W).closeAllProducers(), n(this, W).closeAllConsumers(), n(this, Tt).clear(), n(this, ur).clear(), f(this, is, null), n(this, Ji).stop(), n(this, W).stopAllTransports(), n(this, W).reset(), f(this, Ji, new Ku());
24899
24929
  }
24900
24930
  joinRoom(a, o) {
24901
24931
  return u(this, arguments, function* (s, t, e = !1, r = !1, i = {}) {
24902
- n(this, Jr, Pn).mediaJoinAttempted = !0, f(this, Wi, !0), e && this.reset();
24932
+ n(this, Jr, En).mediaJoinAttempted = !0, f(this, Gi, !0), e && this.reset();
24903
24933
  try {
24904
- return yield n(this, Ki).push(
24934
+ return yield n(this, Ji).push(
24905
24935
  () => U(this, Sl, Cv).call(this, s, t, r, i),
24906
24936
  "joinRoom"
24907
24937
  );
@@ -24934,7 +24964,7 @@ const _v = (fu = class {
24934
24964
  }
24935
24965
  leaveRoom() {
24936
24966
  return u(this, null, function* () {
24937
- n(this, W).stopAllTransports(), f(this, Ji, !1), n(this, Jr, Pn).mediaJoinAttempted = !1;
24967
+ n(this, W).stopAllTransports(), f(this, Wi, !1), n(this, Jr, En).mediaJoinAttempted = !1;
24938
24968
  const s = {
24939
24969
  closeRoom: !1
24940
24970
  };
@@ -24998,7 +25028,7 @@ const _v = (fu = class {
24998
25028
  a,
24999
25029
  l
25000
25030
  );
25001
- return U(this, Qi, So).call(this, e, p.then((S) => S.id)), p.then((S) => S.track);
25031
+ return U(this, Yi, So).call(this, e, p.then((S) => S.id)), p.then((S) => S.track);
25002
25032
  });
25003
25033
  }
25004
25034
  shareWebcam(s) {
@@ -25015,7 +25045,7 @@ const _v = (fu = class {
25015
25045
  // NOTE(roerohan): If the codec is supported
25016
25046
  ((o = (a = n(this, Da).sender) == null ? void 0 : a.video) == null ? void 0 : o.codecs.findIndex(
25017
25047
  (c) => c.mimeType === i
25018
- )) >= 0 && n(this, Yi).get(i).size > 0
25048
+ )) >= 0 && n(this, zi).get(i).size > 0
25019
25049
  );
25020
25050
  });
25021
25051
  return e.length === 0 && e.push(Ot[0]), yield Promise.all(e.map((i) => (this.logger.debug(`Calling _shareWebcam with video codec: ${i}`), this._shareWebcam(s, i)))), s;
@@ -25045,7 +25075,7 @@ const _v = (fu = class {
25045
25075
  r,
25046
25076
  i
25047
25077
  );
25048
- U(this, Qi, So).call(this, he.SCREENSHARE_VIDEO, a.then((c) => c.id));
25078
+ U(this, Yi, So).call(this, he.SCREENSHARE_VIDEO, a.then((c) => c.id));
25049
25079
  let o;
25050
25080
  if (e) {
25051
25081
  const c = {
@@ -25063,7 +25093,7 @@ const _v = (fu = class {
25063
25093
  o = n(this, W).createProducer(
25064
25094
  c,
25065
25095
  d
25066
- ), U(this, Qi, So).call(this, he.SCREENSHARE_AUDIO, o.then((l) => l.id));
25096
+ ), U(this, Yi, So).call(this, he.SCREENSHARE_AUDIO, o.then((l) => l.id));
25067
25097
  }
25068
25098
  yield Promise.all([a, o || Promise.resolve()]), this.context.getValue("callstats").screenShareStart();
25069
25099
  });
@@ -25093,7 +25123,7 @@ const _v = (fu = class {
25093
25123
  e,
25094
25124
  r
25095
25125
  );
25096
- U(this, Qi, So).call(this, he.MIC, i.then((a) => a.id)), yield i.then((a) => {
25126
+ U(this, Yi, So).call(this, he.MIC, i.then((a) => a.id)), yield i.then((a) => {
25097
25127
  n(this, bt) && (n(this, bt).audioTrack = a.track, n(this, bt).producerId = a.id, n(this, bt).start());
25098
25128
  });
25099
25129
  } catch (t) {
@@ -25316,7 +25346,7 @@ const _v = (fu = class {
25316
25346
  if (i != null && i.mimeType || (i.mimeType = i.kind === Fs.AUDIO ? "audio/opus" : "video/VP8"), i.kind === Fs.VIDEO && !i.screenShare && // Can receive vp9
25317
25347
  ((e = (t = n(this, Da).receiver) == null ? void 0 : t.video) == null ? void 0 : e.codecs.findIndex(
25318
25348
  (a) => a.mimeType === Ot[0]
25319
- )) >= 0 && n(this, zi).get(Ot[0]).has(r) && i.mimeType !== Ot[0]) {
25349
+ )) >= 0 && n(this, Ki).get(Ot[0]).has(r) && i.mimeType !== Ot[0]) {
25320
25350
  this.logger.warn(`Ignoring producer: ${i.producerId}`);
25321
25351
  return;
25322
25352
  }
@@ -25431,7 +25461,7 @@ const _v = (fu = class {
25431
25461
  ), n(this, ct).on(
25432
25462
  n(this, St).mediaRoomTerminationBroadcastResponse,
25433
25463
  () => {
25434
- !this.mediaJoined && !n(this, Wi) && !n(this, Ji) || (this.logger.warn(
25464
+ !this.mediaJoined && !n(this, Gi) && !n(this, Wi) || (this.logger.warn(
25435
25465
  "media hub termination broadcast received, rejoining room"
25436
25466
  ), this.context.getValue("peerSessionStore").emit(k.ROOM_NODE_DISCONNECTED), n(this, bc).call(this));
25437
25467
  }
@@ -25475,7 +25505,7 @@ const _v = (fu = class {
25475
25505
  (d) => d.mimeType === c
25476
25506
  )) >= 0 || o === Ot.length - 1
25477
25507
  ) {
25478
- n(this, Yi).get(c).add(s);
25508
+ n(this, zi).get(c).add(s);
25479
25509
  break;
25480
25510
  }
25481
25511
  }
@@ -25487,17 +25517,17 @@ const _v = (fu = class {
25487
25517
  (d) => d.mimeType === c
25488
25518
  )) >= 0 || o === Ot.length - 1
25489
25519
  ) {
25490
- n(this, zi).get(c).add(s);
25520
+ n(this, Ki).get(c).add(s);
25491
25521
  break;
25492
25522
  }
25493
25523
  }
25494
25524
  }
25495
25525
  handlePeerLeaving(s) {
25496
- this.context.getValue("flagsmith").hasFeature(ee.FORCE_VIDEO_CODEC) || (n(this, zi).forEach((t) => t.delete(s)), n(this, Yi).forEach((t, e) => {
25526
+ this.context.getValue("flagsmith").hasFeature(ee.FORCE_VIDEO_CODEC) || (n(this, Ki).forEach((t) => t.delete(s)), n(this, zi).forEach((t, e) => {
25497
25527
  t.delete(s), !(t.size !== 0 || e === Ot[0]) && this.disableWebcam(e);
25498
25528
  }));
25499
25529
  }
25500
- }, wc = new WeakMap(), Rc = new WeakMap(), ct = new WeakMap(), W = new WeakMap(), Da = new WeakMap(), St = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), Ki = new WeakMap(), bc = new WeakMap(), is = new WeakMap(), ur = new WeakMap(), kc = new WeakMap(), zi = new WeakMap(), Yi = new WeakMap(), Tt = new WeakMap(), bt = new WeakMap(), Jr = new WeakSet(), Pn = function() {
25530
+ }, wc = new WeakMap(), Rc = new WeakMap(), ct = new WeakMap(), W = new WeakMap(), Da = new WeakMap(), St = new WeakMap(), Gi = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), bc = new WeakMap(), is = new WeakMap(), ur = new WeakMap(), kc = new WeakMap(), Ki = new WeakMap(), zi = new WeakMap(), Tt = new WeakMap(), bt = new WeakMap(), Jr = new WeakSet(), En = function() {
25501
25531
  return this.context.getValue("connectionHandler");
25502
25532
  }, Sl = new WeakSet(), Cv = function(s, t, e, r) {
25503
25533
  return u(this, null, function* () {
@@ -25515,7 +25545,7 @@ const _v = (fu = class {
25515
25545
  try {
25516
25546
  this.mediaJoined = !0;
25517
25547
  const { roomState: s } = yield n(this, W).socketHandler.notifySelfJoinComplete();
25518
- return f(this, wc, s.roomUuid), f(this, Ji, !0), f(this, Wi, !1), !0;
25548
+ return f(this, wc, s.roomUuid), f(this, Wi, !0), f(this, Gi, !1), !0;
25519
25549
  } catch (s) {
25520
25550
  return this.logger.error("Error completing room join", { error: s }), this.mediaJoined = !1, !1;
25521
25551
  }
@@ -25612,7 +25642,7 @@ const _v = (fu = class {
25612
25642
  });
25613
25643
  }, Ze = new WeakSet(), pt = function(s) {
25614
25644
  return n(this, Tt).get(s);
25615
- }, Qi = new WeakSet(), So = function(s, t) {
25645
+ }, Yi = new WeakSet(), So = function(s, t) {
25616
25646
  return n(this, Tt).set(s, t);
25617
25647
  }, wl = new WeakSet(), Mv = function(s) {
25618
25648
  return n(this, Tt).delete(s);
@@ -25752,11 +25782,11 @@ function Vv(s) {
25752
25782
  }
25753
25783
  s.setValue("roomNodeClient", void 0);
25754
25784
  }
25755
- var cO = Object.defineProperty, dO = Object.getOwnPropertyDescriptor, vn = (s, t, e, r) => {
25785
+ var cO = Object.defineProperty, dO = Object.getOwnPropertyDescriptor, fn = (s, t, e, r) => {
25756
25786
  for (var i = r > 1 ? void 0 : r ? dO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
25757
25787
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
25758
25788
  return r && i && cO(t, e, i), i;
25759
- }, Xi, Es, te, yt, Vt, Gg;
25789
+ }, Qi, Ps, te, yt, Vt, Gg;
25760
25790
  const Lv = (Gg = class {
25761
25791
  /**
25762
25792
  * Use await SelfController.init(roomNodeClient) instead
@@ -25766,12 +25796,12 @@ const Lv = (Gg = class {
25766
25796
  m(this, yt);
25767
25797
  h(this, "self");
25768
25798
  h(this, "authToken");
25769
- m(this, Xi, void 0);
25799
+ m(this, Qi, void 0);
25770
25800
  h(this, "viewType");
25771
- m(this, Es, void 0);
25801
+ m(this, Ps, void 0);
25772
25802
  m(this, te, void 0);
25773
25803
  const { socket: i } = e, a = s.getValue("authToken");
25774
- this.self = t, f(this, te, s), this.viewType = r, this.authToken = a, f(this, Xi, i), f(this, Es, e), t.config.viewType !== At.Chat && this.setupEvents();
25804
+ this.self = t, f(this, te, s), this.viewType = r, this.authToken = a, f(this, Qi, i), f(this, Ps, e), t.config.viewType !== At.Chat && this.setupEvents();
25775
25805
  }
25776
25806
  get peerId() {
25777
25807
  return n(this, te).getValue("peerId");
@@ -25915,20 +25945,20 @@ const Lv = (Gg = class {
25915
25945
  if (this.self.roomState === "disconnected")
25916
25946
  return;
25917
25947
  let { peerId: t } = this;
25918
- s && n(this, te).getValue("flagsmith").hasFeature(ee.REFRESH_ID_ON_DISCONNECTION) && (t = on()), n(this, Xi).updateURL(t), n(this, te).getValue("telemetry").resetPeerId(t), dt().setHeader("tracing-id", t), mr.remapContext(t, n(this, te)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
25948
+ s && n(this, te).getValue("flagsmith").hasFeature(ee.REFRESH_ID_ON_DISCONNECTION) && (t = an()), n(this, Qi).updateURL(t), n(this, te).getValue("telemetry").resetPeerId(t), dt().setHeader("tracing-id", t), mr.remapContext(t, n(this, te)), this.self.roomState = "disconnected", this.self.emit("roomLeft", { state: "disconnected" });
25919
25949
  }), n(this, te).getValue("peerSessionStore").on(k.SOCKET_SERVICE_FAILED, () => {
25920
25950
  this.self.roomState = "failed", this.self.emit("roomLeft", { state: "failed" });
25921
- }), n(this, Es).on($.waitingRoomRequestAccepted, () => {
25951
+ }), n(this, Ps).on($.waitingRoomRequestAccepted, () => {
25922
25952
  this.waitlistAcceptHandler();
25923
- }), n(this, Es).on(ld.updateUserPreset, (s) => {
25953
+ }), n(this, Ps).on(ld.updateUserPreset, (s) => {
25924
25954
  s.updatePeersPresets.forEach((t) => {
25925
25955
  t.userIds === this.self.userId && n(this, te).getValue("peerSessionStore").emit(k.UPDATE_PERMISSIONS, t.patch);
25926
25956
  });
25927
- }), n(this, Es).on($.waitingRoomRequestDenied, () => {
25957
+ }), n(this, Ps).on($.waitingRoomRequestDenied, () => {
25928
25958
  this.waitlistRejectedHandler();
25929
- }), n(this, Es).on($.kick, () => {
25959
+ }), n(this, Ps).on($.kick, () => {
25930
25960
  this.kickHandler({ kickType: "kick" });
25931
- }), n(this, Es).on($.kickAll, () => {
25961
+ }), n(this, Ps).on($.kickAll, () => {
25932
25962
  this.kickHandler({ kickType: "kickAll" });
25933
25963
  }), n(this, te).getValue("peerSessionStore").onAsync(k.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), n(this, te).getValue("peerSessionStore").on(
25934
25964
  k.PRODUCER_SCORE_UPDATE,
@@ -25963,10 +25993,10 @@ const Lv = (Gg = class {
25963
25993
  joinRoom(s = !1) {
25964
25994
  return u(this, null, function* () {
25965
25995
  try {
25966
- const { peer: t } = yield n(this, Es).joinRoom(
25996
+ const { peer: t } = yield n(this, Ps).joinRoom(
25967
25997
  this.self
25968
25998
  );
25969
- n(this, Es).socket.flush();
25999
+ n(this, Ps).socket.flush();
25970
26000
  const e = Nh(t.stageType);
25971
26001
  if (n(this, te).setValue("stageStatus", e, !1), t.waitlisted) {
25972
26002
  this.waitlistedHandler();
@@ -25987,7 +26017,7 @@ const Lv = (Gg = class {
25987
26017
  }
25988
26018
  this.self.setIsPinned(!1), n(this, te).setValue("stageStatus", "OFF_STAGE", !1), yield this.leaveMediaRoom(s), n(this, te).notify("stageStatus");
25989
26019
  try {
25990
- (e = n(this, Xi)) == null || e.disconnect();
26020
+ (e = n(this, Qi)) == null || e.disconnect();
25991
26021
  } catch (r) {
25992
26022
  this.logger.error("SelfController::leaveRoom::socketDisconnect");
25993
26023
  }
@@ -26010,7 +26040,7 @@ const Lv = (Gg = class {
26010
26040
  return;
26011
26041
  }
26012
26042
  Nv(n(this, te), {
26013
- socket: n(this, Xi),
26043
+ socket: n(this, Qi),
26014
26044
  peerId: t
26015
26045
  });
26016
26046
  }
@@ -26044,29 +26074,29 @@ const Lv = (Gg = class {
26044
26074
  yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
26045
26075
  });
26046
26076
  }
26047
- }, Xi = new WeakMap(), Es = new WeakMap(), te = new WeakMap(), yt = new WeakSet(), Vt = function() {
26077
+ }, Qi = new WeakMap(), Ps = new WeakMap(), te = new WeakMap(), yt = new WeakSet(), Vt = function() {
26048
26078
  return n(this, te).getValue("roomNodeClient");
26049
26079
  }, Gg);
26050
26080
  let si = Lv;
26051
- vn([
26081
+ fn([
26052
26082
  E.trace("SelfController.resetSelf")
26053
26083
  ], si.prototype, "resetSelf", 1);
26054
- vn([
26084
+ fn([
26055
26085
  E.trace("SelfController.setupEvents")
26056
26086
  ], si.prototype, "setupEvents", 1);
26057
- vn([
26087
+ fn([
26058
26088
  E.trace("SelfController.joinRoom")
26059
26089
  ], si.prototype, "joinRoom", 1);
26060
- vn([
26090
+ fn([
26061
26091
  E.trace("SelfController.leaveRoom")
26062
26092
  ], si.prototype, "leaveRoom", 1);
26063
- vn([
26093
+ fn([
26064
26094
  E.trace("SelfController.joinMediaRoom")
26065
26095
  ], si.prototype, "joinMediaRoom", 1);
26066
- vn([
26096
+ fn([
26067
26097
  E.trace("SelfController.leaveMediaRoom")
26068
26098
  ], si.prototype, "leaveMediaRoom", 1);
26069
- vn([
26099
+ fn([
26070
26100
  E.trace("SelfController.init")
26071
26101
  ], si, "init", 1);
26072
26102
  var Ac;
@@ -26267,7 +26297,7 @@ class xv {
26267
26297
  rk.toBinary(e)
26268
26298
  );
26269
26299
  try {
26270
- const { peer: a } = Tn.fromBinary((yield r).payload);
26300
+ const { peer: a } = Sn.fromBinary((yield r).payload);
26271
26301
  n(this, Bt).getValue("connectionHandler").socketJoined = !0, n(this, Bt).getValue("peerSessionStore").emit(k.SOCKET_SERVICE_ROOM_JOINED, { peer: a });
26272
26302
  const o = this.getRoomState(), c = this.getRoomPeersNonPaginated(), [{ room: d }, { peers: l }] = yield Promise.all([o, c]);
26273
26303
  return n(this, Bt).getValue("peerSessionStore").emit(k.ROOM_STATE, d), n(this, Bt).getValue("peerSessionStore").emit(k.SOCKET_PEERS, l), { peer: a };
@@ -26359,7 +26389,7 @@ class xv {
26359
26389
  $.getPeerInfo,
26360
26390
  Pf.toBinary({ peerId: t })
26361
26391
  );
26362
- e = Tn.fromBinary(r.payload);
26392
+ e = Sn.fromBinary(r.payload);
26363
26393
  } catch (r) {
26364
26394
  this.logger.error("getPeerInfo::binary_decode_error", { error: r });
26365
26395
  }
@@ -26538,7 +26568,7 @@ class xv {
26538
26568
  case $.leaveRoom:
26539
26569
  case $.kick:
26540
26570
  case $.kickAll: {
26541
- r = Tn.fromBinary.bind(Tn), i = Tn.create();
26571
+ r = Sn.fromBinary.bind(Sn), i = Sn.create();
26542
26572
  break;
26543
26573
  }
26544
26574
  case $.getWaitingRoomRequests: {
@@ -26555,32 +26585,32 @@ class xv {
26555
26585
  r = rg.fromBinary.bind(rg);
26556
26586
  break;
26557
26587
  }
26558
- case Cs.peerJoinedBroadcast:
26588
+ case ws.peerJoinedBroadcast:
26559
26589
  case Ar.peerJoinedBroadcast: {
26560
26590
  r = Wp.fromBinary.bind(Wp);
26561
26591
  break;
26562
26592
  }
26563
- case Cs.selfJoinComplete:
26593
+ case ws.selfJoinComplete:
26564
26594
  case Ar.selfJoinComplete: {
26565
26595
  r = bu.fromBinary.bind(bu);
26566
26596
  break;
26567
26597
  }
26568
- case Cs.globalPeerPinBroadcast:
26598
+ case ws.globalPeerPinBroadcast:
26569
26599
  case Ar.globalPeerPinBroadcast: {
26570
26600
  r = zp.fromBinary.bind(zp);
26571
26601
  break;
26572
26602
  }
26573
- case Cs.selectedPeer:
26603
+ case ws.selectedPeer:
26574
26604
  case Ar.selectedPeer: {
26575
26605
  r = Ru.fromBinary.bind(Ru);
26576
26606
  break;
26577
26607
  }
26578
- case Cs.selectedPeerDiff:
26608
+ case ws.selectedPeerDiff:
26579
26609
  case Ar.selectedPeerDiff: {
26580
26610
  r = Gp.fromBinary.bind(Gp);
26581
26611
  break;
26582
26612
  }
26583
- case Cs.leaveRoom:
26613
+ case ws.leaveRoom:
26584
26614
  case Ar.leaveRoom: {
26585
26615
  r = ku.fromBinary.bind(ku);
26586
26616
  break;
@@ -26731,7 +26761,7 @@ class vO {
26731
26761
  $.getPeerInfo,
26732
26762
  Pf.toBinary({ peerId: t })
26733
26763
  );
26734
- return Tn.fromBinary(e.payload);
26764
+ return Sn.fromBinary(e.payload);
26735
26765
  });
26736
26766
  }
26737
26767
  }
@@ -26946,10 +26976,10 @@ var TO = Object.defineProperty, yO = (s, t, e) => t in s ? TO(s, t, { enumerable
26946
26976
  set exports(s) {
26947
26977
  Dd = s;
26948
26978
  }
26949
- }, On = typeof Reflect == "object" ? Reflect : null, Pg = On && typeof On.apply == "function" ? On.apply : function(s, t, e) {
26979
+ }, Dn = typeof Reflect == "object" ? Reflect : null, Pg = Dn && typeof Dn.apply == "function" ? Dn.apply : function(s, t, e) {
26950
26980
  return Function.prototype.apply.call(s, t, e);
26951
26981
  }, vd;
26952
- On && typeof On.ownKeys == "function" ? vd = On.ownKeys : Object.getOwnPropertySymbols ? vd = function(s) {
26982
+ Dn && typeof Dn.ownKeys == "function" ? vd = Dn.ownKeys : Object.getOwnPropertySymbols ? vd = function(s) {
26953
26983
  return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s));
26954
26984
  } : vd = function(s) {
26955
26985
  return Object.getOwnPropertyNames(s);
@@ -27272,16 +27302,16 @@ class DO {
27272
27302
  ci = /* @__PURE__ */ new WeakMap(), di = /* @__PURE__ */ new WeakMap();
27273
27303
  var Jv = /* @__PURE__ */ ((s) => (s[s.CONNECTING = 0] = "CONNECTING", s[s.OPEN = 1] = "OPEN", s[s.CLOSING = 2] = "CLOSING", s[s.CLOSED = 3] = "CLOSED", s))(Jv || {});
27274
27304
  const OO = "2", NO = "3";
27275
- var Ae, _n, Pe, Le, Ir, Ke, gr, Qr, _s, Cn, Gs, ih, Kv, To, Sd, nh, zv, ah, wg, Od, oh, ch, Yv, Po, Td, _o, Nd, Vd, dh, Nn, Co, wo, Ld;
27305
+ var Ae, Pn, Pe, xe, Ir, Ke, gr, Qr, Cs, _n, Gs, ih, Kv, To, Sd, nh, zv, ah, wg, Od, oh, ch, Yv, Po, Td, _o, Nd, Vd, dh, On, Co, wo, Ld;
27276
27306
  class VO {
27277
27307
  constructor(t, e) {
27278
27308
  var v, S, P, _, C, w, L, F, N, B;
27279
- ve(this, ih), ve(this, To), ve(this, nh), ve(this, ah), ve(this, Od), ve(this, ch), ve(this, Po), ve(this, _o), ve(this, Vd), ve(this, Nn), ve(this, wo), ve(this, Ae, void 0), ve(this, _n, void 0), ve(this, Pe, void 0), ve(this, Le, void 0), ve(this, Ir, void 0), ve(this, Ke, void 0), ve(this, gr, void 0), ve(this, Qr, void 0), ve(this, _s, void 0), ve(this, Cn, void 0), ve(this, Gs, void 0);
27309
+ ve(this, ih), ve(this, To), ve(this, nh), ve(this, ah), ve(this, Od), ve(this, ch), ve(this, Po), ve(this, _o), ve(this, Vd), ve(this, On), ve(this, wo), ve(this, Ae, void 0), ve(this, Pn, void 0), ve(this, Pe, void 0), ve(this, xe, void 0), ve(this, Ir, void 0), ve(this, Ke, void 0), ve(this, gr, void 0), ve(this, Qr, void 0), ve(this, Cs, void 0), ve(this, _n, void 0), ve(this, Gs, void 0);
27280
27310
  var r, i, a, o, c, d, l, p, g;
27281
- ne(this, _n, t), ne(this, Ir, []), ne(this, Ke, new Dd()), ne(this, gr, !0), ne(this, _s, !1), ne(this, Pe, e != null ? e : {}), (v = (r = M(this, Pe)).autoReconnect) != null || (r.autoReconnect = !0), (S = (i = M(this, Pe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (P = (a = M(this, Pe)).pingTimeout) != null || (a.pingTimeout = 3e4), (_ = (o = M(this, Pe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (C = (c = M(this, Pe)).debug) != null || (c.debug = !0), (w = (d = M(this, Pe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (L = (l = M(this, Pe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (p = M(this, Pe)).queueOnDisconnect) != null || (p.queueOnDisconnect = !1), (N = (g = M(this, Pe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), ne(this, Qr, {
27311
+ ne(this, Pn, t), ne(this, Ir, []), ne(this, Ke, new Dd()), ne(this, gr, !0), ne(this, Cs, !1), ne(this, Pe, e != null ? e : {}), (v = (r = M(this, Pe)).autoReconnect) != null || (r.autoReconnect = !0), (S = (i = M(this, Pe)).retryConnectionInterval) != null || (i.retryConnectionInterval = 1e3), (P = (a = M(this, Pe)).pingTimeout) != null || (a.pingTimeout = 3e4), (_ = (o = M(this, Pe)).connectionTimeout) != null || (o.connectionTimeout = 5e3), (C = (c = M(this, Pe)).debug) != null || (c.debug = !0), (w = (d = M(this, Pe)).maxReconnectionAttempts) != null || (d.maxReconnectionAttempts = 10), (L = (l = M(this, Pe)).disconnectOnPingTimeout) != null || (l.disconnectOnPingTimeout = !0), (F = (p = M(this, Pe)).queueOnDisconnect) != null || (p.queueOnDisconnect = !1), (N = (g = M(this, Pe)).flushOnReconnect) != null || (g.flushOnReconnect = !1), ne(this, Qr, {
27282
27312
  code: void 0,
27283
27313
  reason: void 0
27284
- }), ne(this, Le, (B = M(this, Pe).logger) != null ? B : new DO(M(this, Pe).debug ? "debug" : "info")), ne(this, Gs, new MO());
27314
+ }), ne(this, xe, (B = M(this, Pe).logger) != null ? B : new DO(M(this, Pe).debug ? "debug" : "info")), ne(this, Gs, new MO());
27285
27315
  }
27286
27316
  /**
27287
27317
  * Ready state of the current WebSocket.
@@ -27294,13 +27324,13 @@ class VO {
27294
27324
  * Sockrates connection URL.
27295
27325
  */
27296
27326
  get url() {
27297
- return M(this, _n);
27327
+ return M(this, Pn);
27298
27328
  }
27299
27329
  /**
27300
27330
  * Update connection URL.
27301
27331
  */
27302
27332
  updateURL(t) {
27303
- ne(this, _n, t), _e(this, ch, Yv).call(this);
27333
+ ne(this, Pn, t), _e(this, ch, Yv).call(this);
27304
27334
  }
27305
27335
  /**
27306
27336
  * Configuration options passed to Sockrates.
@@ -27334,22 +27364,22 @@ class VO {
27334
27364
  1
27335
27365
  /* OPEN */
27336
27366
  ].includes(this.readyState)) {
27337
- M(this, Le).debug("Websocket was already connecting or connected.");
27367
+ M(this, xe).debug("Websocket was already connecting or connected.");
27338
27368
  return;
27339
27369
  }
27340
27370
  if (M(this, gr) !== !1)
27341
27371
  return new Promise((e, r) => {
27342
- _e(this, Nn, Co).call(this), _e(this, wo, Ld).call(this);
27372
+ _e(this, On, Co).call(this), _e(this, wo, Ld).call(this);
27343
27373
  try {
27344
- ne(this, Ae, new WebSocket(_e(this, ih, Kv).call(this, M(this, _n)))), M(this, Ae).binaryType = "arraybuffer", M(this, Le).debug("Connecting");
27374
+ ne(this, Ae, new WebSocket(_e(this, ih, Kv).call(this, M(this, Pn)))), M(this, Ae).binaryType = "arraybuffer", M(this, xe).debug("Connecting");
27345
27375
  const i = setTimeout(() => {
27346
- M(this, Le).debug("Connection timeout. Closing socket"), ne(this, gr, !0), _e(this, wo, Ld).call(this), M(this, Ae).close(3001, "Connection Timeout"), M(this, Pe).autoReconnect && !M(this, _s) && (M(this, Ke).emit(
27376
+ M(this, xe).debug("Connection timeout. Closing socket"), ne(this, gr, !0), _e(this, wo, Ld).call(this), M(this, Ae).close(3001, "Connection Timeout"), M(this, Pe).autoReconnect && !M(this, Cs) && (M(this, Ke).emit(
27347
27377
  "reconnecting"
27348
27378
  /* reconnecting */
27349
27379
  ), _e(this, Po, Td).call(this)), r(new Error("Connection timed out!"));
27350
27380
  }, M(this, Pe).connectionTimeout);
27351
27381
  M(this, Ae).onopen = () => {
27352
- M(this, Le).debug(`Ready State: ${Jv[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Vd, dh).call(this), ne(this, Qr, {
27382
+ M(this, xe).debug(`Ready State: ${Jv[M(this, Ae).readyState]}`), i && clearTimeout(i), _e(this, Vd, dh).call(this), ne(this, Qr, {
27353
27383
  code: void 0,
27354
27384
  reason: void 0
27355
27385
  }), M(this, Ke).emit(
@@ -27360,7 +27390,7 @@ class VO {
27360
27390
  try {
27361
27391
  i && clearTimeout(i);
27362
27392
  const { code: o, reason: c } = a;
27363
- r(c), M(this, Le).debug("Socket closed. Close event:", { event: a }), M(this, Le).debug(`Connection closed code: ${o}`), M(this, Le).debug(`Connection closed reason: ${c}`), M(this, _s) || _e(this, Od, oh).call(this, o, c);
27393
+ r(c), M(this, xe).debug("Socket closed. Close event:", { event: a }), M(this, xe).debug(`Connection closed code: ${o}`), M(this, xe).debug(`Connection closed reason: ${c}`), M(this, Cs) || _e(this, Od, oh).call(this, o, c);
27364
27394
  } catch (o) {
27365
27395
  _e(this, To, Sd).call(this, o);
27366
27396
  }
@@ -27380,7 +27410,7 @@ class VO {
27380
27410
  send(t, e, r, i) {
27381
27411
  const a = { event: t, id: e, payload: r, metadata: i };
27382
27412
  if (M(this, Pe).queueOnDisconnect && (!M(this, Ae) || M(this, Ae).readyState !== 1))
27383
- return M(this, Le).debug("Queuing message since socket is not connected!", a), M(this, Ir).push(a), !1;
27413
+ return M(this, xe).debug("Queuing message since socket is not connected!", a), M(this, Ir).push(a), !1;
27384
27414
  const o = Wv.encode(a);
27385
27415
  return _e(this, _o, Nd).call(this, o);
27386
27416
  }
@@ -27448,13 +27478,13 @@ class VO {
27448
27478
  * Disconnect the socket.
27449
27479
  */
27450
27480
  disconnect() {
27451
- ne(this, gr, !1), _e(this, Nn, Co).call(this), this.removeAllListeners(), ne(this, Qr, {
27481
+ ne(this, gr, !1), _e(this, On, Co).call(this), this.removeAllListeners(), ne(this, Qr, {
27452
27482
  code: 1e3,
27453
27483
  reason: "Sockrates disconnect method called"
27454
27484
  }), M(this, Ae).close(1e3, "Sockrates disconnect method called.");
27455
27485
  }
27456
27486
  }
27457
- Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), _s = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), ih = /* @__PURE__ */ new WeakSet(), Kv = function(s) {
27487
+ Ae = /* @__PURE__ */ new WeakMap(), Pn = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), gr = /* @__PURE__ */ new WeakMap(), Qr = /* @__PURE__ */ new WeakMap(), Cs = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Gs = /* @__PURE__ */ new WeakMap(), ih = /* @__PURE__ */ new WeakSet(), Kv = function(s) {
27458
27488
  if (s.startsWith("ws://") || s.startsWith("wss://"))
27459
27489
  return s;
27460
27490
  if (s.startsWith("https://"))
@@ -27463,44 +27493,44 @@ Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /*
27463
27493
  return `ws://${s.substring(7)}`;
27464
27494
  throw new Error("Invalid URL. URL must start with http(s):// or ws(s)://.");
27465
27495
  }, To = /* @__PURE__ */ new WeakSet(), Sd = function(s, t) {
27466
- M(this, Le).error("Error:", { error: s }), M(this, Ke).emit("errored", { error: s }), t == null || t(s);
27496
+ M(this, xe).error("Error:", { error: s }), M(this, Ke).emit("errored", { error: s }), t == null || t(s);
27467
27497
  }, nh = /* @__PURE__ */ new WeakSet(), zv = function(s) {
27468
27498
  if (_e(this, Vd, dh).call(this), s.data === OO) {
27469
- M(this, Le).debug("Received ping from server"), _e(this, _o, Nd).call(this, NO);
27499
+ M(this, xe).debug("Received ping from server"), _e(this, _o, Nd).call(this, NO);
27470
27500
  return;
27471
27501
  }
27472
27502
  const t = Wv.decode(s.data), { id: e, payload: r } = t;
27473
- M(this, Le).debug("Received message", { event: t.event, messageID: e }), M(this, Ke).emit(t.event.toString(), { id: e, payload: r });
27503
+ M(this, xe).debug("Received message", { event: t.event, messageID: e }), M(this, Ke).emit(t.event.toString(), { id: e, payload: r });
27474
27504
  }, ah = /* @__PURE__ */ new WeakSet(), wg = function() {
27475
27505
  return M(this, Ae).readyState === 1;
27476
27506
  }, Od = /* @__PURE__ */ new WeakSet(), oh = function(s, t) {
27477
27507
  ne(this, Qr, { reason: t, code: s }), M(this, Ke).emit("disconnected", { code: s, reason: t });
27478
27508
  }, ch = /* @__PURE__ */ new WeakSet(), Yv = function() {
27479
27509
  const { reason: s, code: t } = M(this, Qr);
27480
- t && t !== 1e3 && M(this, gr) && M(this, Pe).autoReconnect && !M(this, _s) && (M(this, Le).debug(`Triggering reconnection due to ${s}.`), M(this, Ke).emit(
27510
+ t && t !== 1e3 && M(this, gr) && M(this, Pe).autoReconnect && !M(this, Cs) && (M(this, xe).debug(`Triggering reconnection due to ${s}.`), M(this, Ke).emit(
27481
27511
  "reconnecting"
27482
27512
  /* reconnecting */
27483
27513
  ), _e(this, Po, Td).call(this));
27484
27514
  }, Po = /* @__PURE__ */ new WeakSet(), Td = function(s = !0) {
27485
27515
  return u(this, null, function* () {
27486
- if (s && M(this, _s)) {
27487
- M(this, Le).debug("Reconnect called when already in a reconnect loop. Ignoring.");
27516
+ if (s && M(this, Cs)) {
27517
+ M(this, xe).debug("Reconnect called when already in a reconnect loop. Ignoring.");
27488
27518
  return;
27489
27519
  }
27490
- if (M(this, _s) || M(this, Gs).reset(), M(this, Pe).maxReconnectionAttempts !== null && M(this, Gs).getAttempts() >= M(this, Pe).maxReconnectionAttempts) {
27520
+ if (M(this, Cs) || M(this, Gs).reset(), M(this, Pe).maxReconnectionAttempts !== null && M(this, Gs).getAttempts() >= M(this, Pe).maxReconnectionAttempts) {
27491
27521
  M(this, Ke).emit(
27492
27522
  "failed"
27493
27523
  /* failed */
27494
- ), ne(this, _s, !1);
27524
+ ), ne(this, Cs, !1);
27495
27525
  return;
27496
27526
  }
27497
- ne(this, _s, !0), _e(this, wo, Ld).call(this), _e(this, Nn, Co).call(this);
27527
+ ne(this, Cs, !0), _e(this, wo, Ld).call(this), _e(this, On, Co).call(this);
27498
27528
  try {
27499
27529
  if (yield M(this, Gs).wait(), M(this, gr) === !1)
27500
27530
  return;
27501
- if (M(this, Le).debug(`Reconnection attempt ${M(this, Gs).getAttempts()}`), M(this, Ke).emit("reconnectAttempt", { attempt: M(this, Gs).getAttempts() }), yield this.connect(), !_e(this, ah, wg).call(this))
27531
+ if (M(this, xe).debug(`Reconnection attempt ${M(this, Gs).getAttempts()}`), M(this, Ke).emit("reconnectAttempt", { attempt: M(this, Gs).getAttempts() }), yield this.connect(), !_e(this, ah, wg).call(this))
27502
27532
  throw Error("Reconnect Failed");
27503
- ne(this, _s, !1), ne(this, Qr, {
27533
+ ne(this, Cs, !1), ne(this, Qr, {
27504
27534
  code: void 0,
27505
27535
  reason: void 0
27506
27536
  }), M(this, Ke).emit(
@@ -27508,24 +27538,24 @@ Ae = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), Pe = /*
27508
27538
  /* reconnected */
27509
27539
  );
27510
27540
  } catch (t) {
27511
- M(this, Le).debug("Failed to reconnect."), M(this, Ke).emit("reconnectFailure", { attempt: M(this, Gs).getAttempts() }), _e(this, Po, Td).call(this, !1);
27541
+ M(this, xe).debug("Failed to reconnect."), M(this, Ke).emit("reconnectFailure", { attempt: M(this, Gs).getAttempts() }), _e(this, Po, Td).call(this, !1);
27512
27542
  }
27513
27543
  });
27514
27544
  }, _o = /* @__PURE__ */ new WeakSet(), Nd = function(s) {
27515
27545
  try {
27516
27546
  return M(this, Ae).send(s), !0;
27517
27547
  } catch (t) {
27518
- return M(this, Le).error(t.message), !1;
27548
+ return M(this, xe).error(t.message), !1;
27519
27549
  }
27520
27550
  }, Vd = /* @__PURE__ */ new WeakSet(), dh = function() {
27521
- this.config.disconnectOnPingTimeout && (M(this, Le).debug("Resetting ping timeout"), _e(this, Nn, Co).call(this), ne(this, Cn, setTimeout(() => {
27551
+ this.config.disconnectOnPingTimeout && (M(this, xe).debug("Resetting ping timeout"), _e(this, On, Co).call(this), ne(this, _n, setTimeout(() => {
27522
27552
  var s;
27523
- M(this, Le).debug("Disconnecting the socket due to ping timeout"), ne(this, gr, !0);
27553
+ M(this, xe).debug("Disconnecting the socket due to ping timeout"), ne(this, gr, !0);
27524
27554
  const t = 3002, e = "Ping timeout";
27525
27555
  (s = M(this, Ae)) == null || s.close(t, e), _e(this, Od, oh).call(this, t, e);
27526
27556
  }, M(this, Pe).pingTimeout)));
27527
- }, Nn = /* @__PURE__ */ new WeakSet(), Co = function() {
27528
- M(this, Cn) && (clearTimeout(M(this, Cn)), ne(this, Cn, void 0));
27557
+ }, On = /* @__PURE__ */ new WeakSet(), Co = function() {
27558
+ M(this, _n) && (clearTimeout(M(this, _n)), ne(this, _n, void 0));
27529
27559
  }, wo = /* @__PURE__ */ new WeakSet(), Ld = function() {
27530
27560
  M(this, Ae) && (M(this, Ae).onopen = void 0, M(this, Ae).onerror = void 0, M(this, Ae).onmessage = void 0, M(this, Ae).onclose = void 0);
27531
27561
  };
@@ -27591,7 +27621,7 @@ const Qv = (Wg = class {
27591
27621
  s !== this.peerId && (f(this, Kr, U(this, Nc, lh).call(this, s)), this.logger.debug("SocketService:: Connection URL updated.")), n(this, Ce).updateURL(n(this, Kr));
27592
27622
  }
27593
27623
  static getSocketEdgeDomain(s) {
27594
- return rn({ servicePrefix: "socket-edge", baseURI: s });
27624
+ return sn({ servicePrefix: "socket-edge", baseURI: s });
27595
27625
  }
27596
27626
  get url() {
27597
27627
  return n(this, Kr);
@@ -27653,7 +27683,7 @@ const Qv = (Wg = class {
27653
27683
  Ar.errorResponse,
27654
27684
  _
27655
27685
  ), n(this, Ce).removeListener(
27656
- Cs.errorResponse,
27686
+ ws.errorResponse,
27657
27687
  _
27658
27688
  );
27659
27689
  }, l = r != null ? r : U(this, Vc, uh).call(this), p = {};
@@ -27684,7 +27714,7 @@ const Qv = (Wg = class {
27684
27714
  }) => {
27685
27715
  l === P && (o({ id: P, payload: _ }), d(S, v));
27686
27716
  };
27687
- n(this, Ce).on(a, S), n(this, Ce).on(Rg, v), n(this, Ce).on(Ar.errorResponse, v), n(this, Ce).on(Cs.errorResponse, v), setTimeout(() => {
27717
+ n(this, Ce).on(a, S), n(this, Ce).on(Rg, v), n(this, Ce).on(Ar.errorResponse, v), n(this, Ce).on(ws.errorResponse, v), setTimeout(() => {
27688
27718
  d(S, v), c(new Error(`request timeout for callback eventId:${s}`));
27689
27719
  }, t), n(this, Ce).send(
27690
27720
  s,
@@ -27717,7 +27747,7 @@ const Qv = (Wg = class {
27717
27747
  var i;
27718
27748
  this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t }, country: E.location.country });
27719
27749
  const { recv: e, send: r } = (i = n(this, we, Me).mediaState) != null ? i : {};
27720
- e != null && e.state && (e == null ? void 0 : e.state) !== Dn.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== Dn.CONNECTED ? n(this, et).getValue("peerSessionStore").emit(
27750
+ e != null && e.state && (e == null ? void 0 : e.state) !== Mn.CONNECTED || r != null && r.state && (r == null ? void 0 : r.state) !== Mn.CONNECTED ? n(this, et).getValue("peerSessionStore").emit(
27721
27751
  k.SOCKET_SERVICE_DISCONNECTED,
27722
27752
  {
27723
27753
  joinAttempted: n(this, we, Me).joinAttempted
@@ -27893,7 +27923,7 @@ var FO = Object.defineProperty, BO = Object.getOwnPropertyDescriptor, HO = (s, t
27893
27923
  for (var i = r > 1 ? void 0 : r ? BO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
27894
27924
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
27895
27925
  return r && i && FO(t, e, i), i;
27896
- }, Ps;
27926
+ }, _s;
27897
27927
  class Xv extends jt {
27898
27928
  /**
27899
27929
  * @param {Context} context
@@ -27903,11 +27933,11 @@ class Xv extends jt {
27903
27933
  super(r);
27904
27934
  h(this, "meetings", []);
27905
27935
  h(this, "parentMeeting", null);
27906
- m(this, Ps, void 0);
27907
- f(this, Ps, e);
27936
+ m(this, _s, void 0);
27937
+ f(this, _s, e);
27908
27938
  }
27909
27939
  get supportsConnectedMeetings() {
27910
- return n(this, Ps).getValue("self").id !== "";
27940
+ return n(this, _s).getValue("self").id !== "";
27911
27941
  }
27912
27942
  get isActive() {
27913
27943
  return this.meetings.length !== 0;
@@ -27920,7 +27950,7 @@ class Xv extends jt {
27920
27950
  getConnectedMeetings() {
27921
27951
  return u(this, null, function* () {
27922
27952
  this.validateConnectedMeetingsAction(), this.logger.info("Getting connected meetings dump");
27923
- const e = yield n(this, Ps).getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
27953
+ const e = yield n(this, _s).getValue("connectedMeetingsSocketHandler").getConnectedRoomsDump();
27924
27954
  return this.logger.info("Got connected meetings dump"), e;
27925
27955
  });
27926
27956
  }
@@ -27931,7 +27961,7 @@ class Xv extends jt {
27931
27961
  createMeetings(e) {
27932
27962
  return u(this, null, function* () {
27933
27963
  this.validateConnectedMeetingsAction(), this.logger.info(`Creating connected meetings ${JSON.stringify(e)}`);
27934
- const r = yield n(this, Ps).getValue("connectedMeetingsSocketHandler").createConnectedRooms(
27964
+ const r = yield n(this, _s).getValue("connectedMeetingsSocketHandler").createConnectedRooms(
27935
27965
  e
27936
27966
  );
27937
27967
  return this.logger.info(`Created connected meetings ${JSON.stringify(r)}`), r.map((i) => ({
@@ -27946,7 +27976,7 @@ class Xv extends jt {
27946
27976
  */
27947
27977
  updateMeetings(e) {
27948
27978
  return u(this, null, function* () {
27949
- this.validateConnectedMeetingsAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield n(this, Ps).getValue("connectedMeetingsSocketHandler").updateConnectedRooms(
27979
+ this.validateConnectedMeetingsAction(), this.logger.info(`Updating connected meetings ${JSON.stringify(e)}`), yield n(this, _s).getValue("connectedMeetingsSocketHandler").updateConnectedRooms(
27950
27980
  e.map((r) => ({ meetingId: r.id, title: r.title }))
27951
27981
  ), this.logger.info(`Updated connected meetings ${JSON.stringify(e)}`);
27952
27982
  });
@@ -27964,7 +27994,7 @@ class Xv extends jt {
27964
27994
  a.participants.map((o) => o.id)
27965
27995
  ) : Promise.resolve());
27966
27996
  this.logger.info(`Moved participants before deleting connected meetings ${JSON.stringify(e)}. Deleting now.`), yield Promise.all(r);
27967
- const i = yield n(this, Ps).getValue("connectedMeetingsSocketHandler").disableConnectedRooms(
27997
+ const i = yield n(this, _s).getValue("connectedMeetingsSocketHandler").disableConnectedRooms(
27968
27998
  e
27969
27999
  );
27970
28000
  return this.logger.info(`Deleted connected meetings ${JSON.stringify(e)}`), i;
@@ -27980,7 +28010,7 @@ class Xv extends jt {
27980
28010
  moveParticipants(e, r, i) {
27981
28011
  return u(this, null, function* () {
27982
28012
  this.validateConnectedMeetingsAction(), this.logger.info(`Moving connected meetings participants ${JSON.stringify(i)} from ${e} to ${r}`);
27983
- const a = yield n(this, Ps).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
28013
+ const a = yield n(this, _s).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
27984
28014
  {
27985
28015
  sourceMeetingId: e,
27986
28016
  destinationMeetingId: r,
@@ -28001,7 +28031,7 @@ class Xv extends jt {
28001
28031
  moveParticipantsWithCustomPreset(e, r, i) {
28002
28032
  return u(this, null, function* () {
28003
28033
  this.validateConnectedMeetingsAction(), this.logger.info(`Moving connected meetings participants (custom preset) ${JSON.stringify(i)} from ${e} to ${r}`);
28004
- const a = yield n(this, Ps).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
28034
+ const a = yield n(this, _s).getValue("connectedMeetingsSocketHandler").movePeersBetweenRooms(
28005
28035
  {
28006
28036
  sourceMeetingId: e,
28007
28037
  destinationMeetingId: r,
@@ -28041,7 +28071,7 @@ class Xv extends jt {
28041
28071
  });
28042
28072
  }
28043
28073
  }
28044
- Ps = new WeakMap();
28074
+ _s = new WeakMap();
28045
28075
  HO([
28046
28076
  Mt({ maxInvocations: 60, period: 60 })
28047
28077
  ], Xv.prototype, "getConnectedMeetings", 1);
@@ -28205,7 +28235,7 @@ var GO = Object.defineProperty, WO = Object.getOwnPropertyDescriptor, Ql = (s, t
28205
28235
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
28206
28236
  return r && i && GO(t, e, i), i;
28207
28237
  };
28208
- const wn = class {
28238
+ const Cn = class {
28209
28239
  constructor(s, t, e) {
28210
28240
  h(this, "apiBase");
28211
28241
  h(this, "selfController");
@@ -28257,10 +28287,10 @@ const wn = class {
28257
28287
  d.setRoomName(i), d.setRoomUUID(i), d.setOrganizationId(a), d.setHeader("tracing-id", t), s.setValue("apiClient", d);
28258
28288
  const l = new O0(s);
28259
28289
  s.setValue("connectionHandler", l);
28260
- const p = wn.createSocketService(s), g = p.connect(), v = d.getUserDetails(), S = d.getPlugins();
28290
+ const p = Cn.createSocketService(s), g = p.connect(), v = d.getUserDetails(), S = d.getPlugins();
28261
28291
  let P, _ = "";
28262
28292
  try {
28263
- yield wn.setupFlagsmith(s);
28293
+ yield Cn.setupFlagsmith(s);
28264
28294
  } catch (G) {
28265
28295
  c.error("Failed to setup flagsmith", { error: G });
28266
28296
  }
@@ -28281,7 +28311,7 @@ const wn = class {
28281
28311
  s,
28282
28312
  C.viewType,
28283
28313
  P.preset.permissions
28284
- ), L = wn.setupControllers(
28314
+ ), L = Cn.setupControllers(
28285
28315
  p,
28286
28316
  s,
28287
28317
  P,
@@ -28290,7 +28320,7 @@ const wn = class {
28290
28320
  C,
28291
28321
  w
28292
28322
  );
28293
- P0(C) && ((N = wn.createRoomNodeClient(s, p).initializeConnection(
28323
+ P0(C) && ((N = Cn.createRoomNodeClient(s, p).initializeConnection(
28294
28324
  P.participant.name,
28295
28325
  i,
28296
28326
  !1,
@@ -28302,7 +28332,7 @@ const wn = class {
28302
28332
  );
28303
28333
  })), E.location.country = (B = d.ipInfo) == null ? void 0 : B.country;
28304
28334
  const { controllers: F } = yield L;
28305
- return yw(), new wn(e, F, s);
28335
+ return yw(), new Cn(e, F, s);
28306
28336
  });
28307
28337
  }
28308
28338
  static setupFlagsmith(s) {
@@ -28327,7 +28357,7 @@ const wn = class {
28327
28357
  isReactNative: navigator.isReactNative
28328
28358
  });
28329
28359
  try {
28330
- const p = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ? rn({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
28360
+ const p = (l = r == null ? void 0 : r.whitelabelled_flags_endpoint) == null || l ? sn({ servicePrefix: "flags", baseURI: e }) : "edge.api.flagsmith.com";
28331
28361
  yield s.getValue("flagsmith").identify(
28332
28362
  `${Cu.PEER}_${t}`,
28333
28363
  JSON.parse(JSON.stringify(d)),
@@ -28349,13 +28379,13 @@ const wn = class {
28349
28379
  }
28350
28380
  static setupControllers(s, t, e, r, i, a, o) {
28351
28381
  return u(this, null, function* () {
28352
- var I, Ue, Cr;
28382
+ var I, $e, Cr;
28353
28383
  const c = t.getValue("modules"), { participant: d } = e, l = t.getValue("defaults"), p = t.getValue("logger"), { viewType: g, mediaConstraints: { audio: v } } = a;
28354
28384
  t.setValue("viewType", g), t.setValue("defaults", D({
28355
28385
  mediaConfiguration: {
28356
28386
  audio: {
28357
28387
  enableHighBitrate: (I = v.enableHighBitrate) != null ? I : !1,
28358
- enableStereo: (Ue = v.enableStereo) != null ? Ue : !1
28388
+ enableStereo: ($e = v.enableStereo) != null ? $e : !1
28359
28389
  }
28360
28390
  }
28361
28391
  }, l)), t.setValue("maxPreferredStreams", ye.isMobile() ? a.maxVideoStreams.mobile : a.maxVideoStreams.desktop);
@@ -28364,9 +28394,9 @@ const wn = class {
28364
28394
  s
28365
28395
  );
28366
28396
  t.setValue("connectedMeetingsSocketHandler", re);
28367
- const tt = new Jl(t, s), ds = new os(t, s), ri = new vO(s), ls = new xv(t, s), A = new SO(t, s), y = new lO(s), R = new dn(t, s), x = yield si.init(
28397
+ const tt = new Jl(t, s), ls = new cs(t, s), ri = new vO(s), us = new xv(t, s), A = new SO(t, s), y = new lO(s), R = new cn(t, s), x = yield si.init(
28368
28398
  t,
28369
- ls,
28399
+ us,
28370
28400
  d,
28371
28401
  o,
28372
28402
  a
@@ -28375,17 +28405,17 @@ const wn = class {
28375
28405
  const fe = yield Uf.init(
28376
28406
  t,
28377
28407
  x.self,
28378
- ls,
28408
+ us,
28379
28409
  G,
28380
28410
  i
28381
28411
  );
28382
28412
  if (c.participant && (N = new _r(
28383
28413
  t,
28384
28414
  x.self,
28385
- ls
28386
- )), (Cr = c.e2ee) != null && Cr.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield ws.init(
28415
+ us
28416
+ )), (Cr = c.e2ee) != null && Cr.enabled && c.e2ee.manager.init(p, t.getValue("peerSessionStore")), c.chat && (P = yield as.init(
28387
28417
  t,
28388
- ds,
28418
+ ls,
28389
28419
  R,
28390
28420
  x.self,
28391
28421
  N.participants
@@ -28401,11 +28431,11 @@ const wn = class {
28401
28431
  )), c.recording && (L = new Hf(
28402
28432
  t,
28403
28433
  x.self,
28404
- ls
28434
+ us
28405
28435
  )), c.stage && (_ = new $f(
28406
28436
  t,
28407
28437
  ri,
28408
- ls,
28438
+ us,
28409
28439
  x.self,
28410
28440
  N.participants
28411
28441
  )), c.plugin) {
@@ -28419,7 +28449,7 @@ const wn = class {
28419
28449
  t,
28420
28450
  qs,
28421
28451
  A,
28422
- ds,
28452
+ ls,
28423
28453
  P == null ? void 0 : P.chat,
28424
28454
  x.self,
28425
28455
  N.participants,
@@ -28477,7 +28507,7 @@ const wn = class {
28477
28507
  });
28478
28508
  }
28479
28509
  };
28480
- let Jc = wn;
28510
+ let Jc = Cn;
28481
28511
  Ql([
28482
28512
  E.trace("Controller.init")
28483
28513
  ], Jc, "init", 1);
@@ -28533,7 +28563,7 @@ function KO(s, t) {
28533
28563
  throw Error(`Received V1 auth token ${s}`);
28534
28564
  let a = pi.baseURI.prod;
28535
28565
  t && (a = t);
28536
- const o = `https://${rn({ servicePrefix: "api", baseURI: a })}`;
28566
+ const o = `https://${sn({ servicePrefix: "api", baseURI: a })}`;
28537
28567
  return {
28538
28568
  meetingId: e,
28539
28569
  orgId: r,
@@ -28545,20 +28575,20 @@ function KO(s, t) {
28545
28575
  throw new b("Invalid auth token", "0004");
28546
28576
  }
28547
28577
  }
28548
- var zr, Zi, en, Lc, kl, eS;
28578
+ var zr, Xi, Zi, Lc, kl, eS;
28549
28579
  class zO {
28550
28580
  constructor() {
28551
28581
  m(this, kl);
28552
28582
  m(this, zr, new Audio());
28553
- m(this, Zi, new MediaStream());
28554
- m(this, en, /* @__PURE__ */ new Map());
28583
+ m(this, Xi, new MediaStream());
28584
+ m(this, Zi, /* @__PURE__ */ new Map());
28555
28585
  m(this, Lc, void 0);
28556
- n(this, zr).srcObject = n(this, Zi), n(this, zr).autoplay = !0;
28586
+ n(this, zr).srcObject = n(this, Xi), n(this, zr).autoplay = !0;
28557
28587
  }
28558
28588
  playTracks(t) {
28559
28589
  return u(this, null, function* () {
28560
28590
  return t.forEach((e) => {
28561
- n(this, en).has(e.id) || (n(this, Zi).addTrack(e), n(this, en).set(e.id, e));
28591
+ n(this, Zi).has(e.id) || (n(this, Xi).addTrack(e), n(this, Zi).set(e.id, e));
28562
28592
  }), this.play();
28563
28593
  });
28564
28594
  }
@@ -28566,12 +28596,12 @@ class zO {
28566
28596
  typeof HTMLAudioElement.prototype.setSinkId == "function" && n(this, zr).setSinkId(t);
28567
28597
  }
28568
28598
  removeTrack(t) {
28569
- const e = n(this, en).get(t);
28570
- e && (n(this, Zi).removeTrack(e), n(this, en).delete(t));
28599
+ const e = n(this, Zi).get(t);
28600
+ e && (n(this, Xi).removeTrack(e), n(this, Zi).delete(t));
28571
28601
  }
28572
28602
  play() {
28573
28603
  return u(this, null, function* () {
28574
- return n(this, zr).srcObject = n(this, Zi), n(this, zr).play().catch((t) => {
28604
+ return n(this, zr).srcObject = n(this, Xi), n(this, zr).play().catch((t) => {
28575
28605
  U(this, kl, eS).call(this, t);
28576
28606
  });
28577
28607
  });
@@ -28580,32 +28610,32 @@ class zO {
28580
28610
  f(this, Lc, t);
28581
28611
  }
28582
28612
  }
28583
- zr = new WeakMap(), Zi = new WeakMap(), en = new WeakMap(), Lc = new WeakMap(), kl = new WeakSet(), eS = function(t) {
28613
+ zr = new WeakMap(), Xi = new WeakMap(), Zi = new WeakMap(), Lc = new WeakMap(), kl = new WeakSet(), eS = function(t) {
28584
28614
  var e;
28585
28615
  (e = n(this, Lc)) == null || e.call(this, t);
28586
28616
  };
28587
- var tn;
28617
+ var en;
28588
28618
  class YO extends zO {
28589
28619
  constructor() {
28590
28620
  super();
28591
28621
  /** Maps participantId to trackId */
28592
- m(this, tn, void 0);
28593
- f(this, tn, /* @__PURE__ */ new Map());
28622
+ m(this, en, void 0);
28623
+ f(this, en, /* @__PURE__ */ new Map());
28594
28624
  }
28595
28625
  addParticipantTrack(e, r) {
28596
- n(this, tn).set(e, r.id), this.playTracks([r]);
28626
+ n(this, en).set(e, r.id), this.playTracks([r]);
28597
28627
  }
28598
28628
  removeParticipantTrack(e) {
28599
- const r = n(this, tn).get(e);
28600
- r && this.removeTrack(r), n(this, tn).delete(e);
28629
+ const r = n(this, en).get(e);
28630
+ r && this.removeTrack(r), n(this, en).delete(e);
28601
28631
  }
28602
28632
  }
28603
- tn = new WeakMap();
28633
+ en = new WeakMap();
28604
28634
  var QO = Object.defineProperty, XO = Object.getOwnPropertyDescriptor, Xl = (s, t, e, r) => {
28605
28635
  for (var i = r > 1 ? void 0 : r ? XO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
28606
28636
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
28607
28637
  return r && i && QO(t, e, i), i;
28608
- }, Ge, sn, Kg;
28638
+ }, Ge, tn, Kg;
28609
28639
  let ei = (Kg = class {
28610
28640
  /**
28611
28641
  * @param {IContext} context
@@ -28613,11 +28643,11 @@ let ei = (Kg = class {
28613
28643
  */
28614
28644
  constructor(t, e) {
28615
28645
  m(this, Ge, void 0);
28616
- m(this, sn, void 0);
28617
- f(this, sn, t), f(this, Ge, e);
28646
+ m(this, tn, void 0);
28647
+ f(this, tn, t), f(this, Ge, e);
28618
28648
  }
28619
28649
  get peerId() {
28620
- return n(this, sn).getValue("peerId");
28650
+ return n(this, tn).getValue("peerId");
28621
28651
  }
28622
28652
  /**
28623
28653
  * @param {Object} [options]
@@ -28630,7 +28660,7 @@ let ei = (Kg = class {
28630
28660
  static initMedia() {
28631
28661
  return u(this, arguments, function* (t = {}, e = !1, r = void 0) {
28632
28662
  var d;
28633
- const i = (d = r == null ? void 0 : r.peerId) != null ? d : on(), a = mr.createContext(i, {
28663
+ const i = (d = r == null ? void 0 : r.peerId) != null ? d : an(), a = mr.createContext(i, {
28634
28664
  peerId: i
28635
28665
  }), o = a.getValue("logger");
28636
28666
  o.init(a);
@@ -28642,7 +28672,7 @@ let ei = (Kg = class {
28642
28672
  return u(this, null, function* () {
28643
28673
  var S, P, _, w, L, F, N;
28644
28674
  ye.init();
28645
- const { mediaHandler: e } = (S = t.defaults) != null ? S : {}, r = (e == null ? void 0 : e.peerId) || ((_ = (P = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : P.peerId) != null ? _ : on()), { authToken: i, baseURI: a } = t, C = KO(i, a), { meetingId: o } = C, c = io(C, ["meetingId"]);
28675
+ const { mediaHandler: e } = (S = t.defaults) != null ? S : {}, r = (e == null ? void 0 : e.peerId) || ((_ = (P = t == null ? void 0 : t.cachedUserDetails) == null ? void 0 : P.peerId) != null ? _ : an()), { authToken: i, baseURI: a } = t, C = KO(i, a), { meetingId: o } = C, c = io(C, ["meetingId"]);
28646
28676
  window.__zone_symbol__DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION = !0;
28647
28677
  const d = ei.setupContext(
28648
28678
  r,
@@ -28678,7 +28708,7 @@ let ei = (Kg = class {
28678
28708
  video: !0
28679
28709
  };
28680
28710
  return a.setValue("options", e), a.setValue("peerId", t), a.setValue("modules", o), a.setValue("sdkName", "web-core"), a.setValue("meetingId", r), a.setValue("apiBase", i.apiBase), a.setValue("baseURI", i.baseURI), a.setValue("userId", i.participantId), a.setValue("organizationId", i.orgId), a.setValue("authToken", e.authToken), a.setValue("overrides", (d = e.overrides) != null ? d : {}), a.setValue("env", lw({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
28681
- })), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.2"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
28711
+ })), a.setValue("cachedUserDetails", Rs(e.cachedUserDetails)), a.setValue("sdkVersion", "1.2.4-staging.4"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new YO()), a;
28682
28712
  }
28683
28713
  join() {
28684
28714
  return u(this, null, function* () {
@@ -28691,7 +28721,7 @@ let ei = (Kg = class {
28691
28721
  */
28692
28722
  leave(t) {
28693
28723
  return u(this, null, function* () {
28694
- bg.cleanup(), n(this, sn).getValue("peerSessionStore").reset();
28724
+ bg.cleanup(), n(this, tn).getValue("peerSessionStore").reset();
28695
28725
  const { selfController: e } = n(this, Ge);
28696
28726
  return e.leaveRoom(t);
28697
28727
  });
@@ -28783,7 +28813,7 @@ let ei = (Kg = class {
28783
28813
  return n(this, Ge).storesManager;
28784
28814
  }
28785
28815
  get audio() {
28786
- return n(this, sn).getValue("audioPlayback");
28816
+ return n(this, tn).getValue("audioPlayback");
28787
28817
  }
28788
28818
  /**
28789
28819
  * The __internals__ object exposes the internal tools & utilities such as features and logger
@@ -28810,7 +28840,7 @@ let ei = (Kg = class {
28810
28840
  return this.leave(t);
28811
28841
  });
28812
28842
  }
28813
- }, Ge = new WeakMap(), sn = new WeakMap(), Kg);
28843
+ }, Ge = new WeakMap(), tn = new WeakMap(), Kg);
28814
28844
  Xl([
28815
28845
  ut("0002"),
28816
28846
  Pr.executeWithLock({