@cloudflare/realtimekit 2.0.4-staging.2 → 2.0.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
@@ -5730,7 +5730,7 @@ function HC(s, t) {
5730
5730
  }
5731
5731
  };
5732
5732
  }
5733
- const at = (s) => HC(Error, s);
5733
+ const ot = (s) => HC(Error, s);
5734
5734
  var ms = /* @__PURE__ */ ((s) => (s.GroupCall = "GROUP_CALL", s.Webinar = "WEBINAR", s.AudioRoom = "AUDIO_ROOM", s.Livestream = "LIVESTREAM", s.Chat = "CHAT", s))(ms || {}), W = /* @__PURE__ */ ((s) => (s.Allowed = "ALLOWED", s.NotAllowed = "NOT_ALLOWED", s.CanRequest = "CAN_REQUEST", s))(W || {}), cm;
5735
5735
  typeof process != "undefined" && (cm = process == null ? void 0 : process.env) != null && cm.FLAGSMITH_ENVIRONMENT_KEY && process.env.FLAGSMITH_ENVIRONMENT_KEY;
5736
5736
  var Bf = [-2, -1, 0, 1, 2], BC = [0, 1, 2, 3, 4];
@@ -6182,12 +6182,12 @@ const _g = 1080, Cg = 1920, eR = (s, t, e, r, i, a) => {
6182
6182
  let g = d * h, S = l * h, y, E, k, b, O = 1;
6183
6183
  return g < e && (O = e / g), Math.abs(O - 1) < 1e-14 && S < r && (O = r / S), g *= O, S *= O, k = d / (g / e), b = l / (S / r), y = (d - k) * o, E = (l - b) * c, y < 0 && (y = 0), E < 0 && (E = 0), k > d && (k = d), b > l && (b = l), [y, E, k, b, s, t, e, r];
6184
6184
  };
6185
- var Pt, Nr, nt, Wt, be, Jt, Js, $e, De, On, Nn, Ln, Ks, Vn, Qd, $o;
6185
+ var wt, Nr, nt, Wt, be, Jt, Js, $e, De, On, Nn, Ln, Ks, Vn, Qd, $o;
6186
6186
  const Op = class extends Bt {
6187
6187
  constructor(e, r, i, a) {
6188
6188
  const o = e.getValue("logger");
6189
6189
  super(o);
6190
- m(this, Pt, void 0);
6190
+ m(this, wt, void 0);
6191
6191
  m(this, Nr, void 0);
6192
6192
  m(this, nt, void 0);
6193
6193
  m(this, Wt, void 0);
@@ -6331,7 +6331,7 @@ const Op = class extends Bt {
6331
6331
  /** @access private */
6332
6332
  createCanvas() {
6333
6333
  const e = document.createElement("canvas");
6334
- e.height = n(this, be).height, e.width = n(this, be).width, f(this, Pt, e);
6334
+ e.height = n(this, be).height, e.width = n(this, be).width, f(this, wt, e);
6335
6335
  }
6336
6336
  /** @access private */
6337
6337
  setupMediaSessionEvents() {
@@ -6361,9 +6361,9 @@ const Op = class extends Bt {
6361
6361
  }
6362
6362
  /** @access private */
6363
6363
  drawEmptyTile(e, r, i, a) {
6364
- if (n(this, Pt) === void 0)
6364
+ if (n(this, wt) === void 0)
6365
6365
  return;
6366
- const o = n(this, Pt).getContext("2d"), c = n(this, Pt).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, S = Math.floor(c / h), y = Math.floor(e / S), k = e % S * (h + d) + d, b = y * (g + d) + d, { displayText: O, image: D } = a != null ? a : {};
6366
+ const o = n(this, wt).getContext("2d"), c = n(this, wt).width, d = 0, l = 0, h = r - d * 2, g = i - d * 2, S = Math.floor(c / h), y = Math.floor(e / S), k = e % S * (h + d) + d, b = y * (g + d) + d, { displayText: O, image: D } = a != null ? a : {};
6367
6367
  o.fillStyle = O || D ? n(this, Jt).videoBackground : n(this, Jt).background, o.strokeStyle = n(this, Jt).brand, o.beginPath(), o.moveTo(k + l, b), o.arcTo(k + h, b, k + h, b + l, l), o.arcTo(
6368
6368
  k + h,
6369
6369
  b + g,
@@ -6385,7 +6385,7 @@ const Op = class extends Bt {
6385
6385
  const o = Math.min(Math.max(a * 0.15, 100), 200), c = o * 0.2, d = o * 0.2;
6386
6386
  let l = r + c;
6387
6387
  const h = i + c, g = (S) => {
6388
- const y = n(this, Pt).getContext("2d");
6388
+ const y = n(this, wt).getContext("2d");
6389
6389
  y.save(), y.fillStyle = n(this, Jt).background, y.beginPath(), y.moveTo(l + d, h), y.arcTo(l + o, h, l + o, h + d, d), y.arcTo(
6390
6390
  l + o,
6391
6391
  h + o,
@@ -6405,10 +6405,10 @@ const Op = class extends Bt {
6405
6405
  /** @access private */
6406
6406
  drawTile(e, r, i) {
6407
6407
  var l, h;
6408
- if (n(this, Pt) === void 0)
6408
+ if (n(this, wt) === void 0)
6409
6409
  return;
6410
- const a = n(this, Pt).getContext("2d");
6411
- a.fillStyle = n(this, Jt).background, a.fillRect(0, 0, n(this, Pt).width, n(this, Pt).height);
6410
+ const a = n(this, wt).getContext("2d");
6411
+ a.fillStyle = n(this, Jt).background, a.fillRect(0, 0, n(this, wt).width, n(this, wt).height);
6412
6412
  const o = this.getSources();
6413
6413
  let c = 0, d = 0;
6414
6414
  for (; c < n(this, be).height - 5; ) {
@@ -6474,7 +6474,7 @@ const Op = class extends Bt {
6474
6474
  document.body.removeChild(n(this, nt));
6475
6475
  } catch (e) {
6476
6476
  }
6477
- this.removeAllSources(), f(this, Pt, void 0), f(this, Wt, void 0), f(this, Js, void 0);
6477
+ this.removeAllSources(), f(this, wt, void 0), f(this, Wt, void 0), f(this, Js, void 0);
6478
6478
  }
6479
6479
  /**
6480
6480
  * Initialize PiP and prepare sources
@@ -6492,7 +6492,7 @@ const Op = class extends Bt {
6492
6492
  f(this, be, {
6493
6493
  height: e != null ? e : _g,
6494
6494
  width: r != null ? r : Cg
6495
- }), i.height = n(this, be).height, i.width = n(this, be).width, i.autoplay = !0, i.muted = !0, i.srcObject = n(this, Pt).captureStream(24), f(this, Wt, i), n(this, Wt).onloadedmetadata = () => {
6495
+ }), i.height = n(this, be).height, i.width = n(this, be).width, i.autoplay = !0, i.muted = !0, i.srcObject = n(this, wt).captureStream(24), f(this, Wt, i), n(this, Wt).onloadedmetadata = () => {
6496
6496
  try {
6497
6497
  this.emit("pipStarted"), n(this, Wt).onleavepictureinpicture = () => {
6498
6498
  this.emit("pipEnded");
@@ -6608,7 +6608,7 @@ const Op = class extends Bt {
6608
6608
  }
6609
6609
  };
6610
6610
  let Qu = Op;
6611
- Pt = new WeakMap(), Nr = new WeakMap(), nt = new WeakMap(), Wt = new WeakMap(), be = new WeakMap(), Jt = new WeakMap(), Js = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), On = new WeakMap(), Nn = new WeakMap(), Ln = new WeakMap(), Ks = new WeakMap(), Vn = new WeakMap(), Qd = new WeakMap(), $o = new WeakMap();
6611
+ wt = new WeakMap(), Nr = new WeakMap(), nt = new WeakMap(), Wt = new WeakMap(), be = new WeakMap(), Jt = new WeakMap(), Js = new WeakMap(), $e = new WeakMap(), De = new WeakMap(), On = new WeakMap(), Nn = new WeakMap(), Ln = new WeakMap(), Ks = new WeakMap(), Vn = new WeakMap(), Qd = new WeakMap(), $o = new WeakMap();
6612
6612
  var fr;
6613
6613
  (function(s) {
6614
6614
  s[s.PUBLISHER = 0] = "PUBLISHER", s[s.SUBSCRIBER = 1] = "SUBSCRIBER";
@@ -12984,7 +12984,7 @@ Hs([
12984
12984
  P.trace("Chat.deleteMessage")
12985
12985
  ], rs.prototype, "deleteMessage", 1);
12986
12986
  rs = Hs([
12987
- at("0500")
12987
+ ot("0500")
12988
12988
  ], rs);
12989
12989
  var SM = Object.defineProperty, vM = Object.getOwnPropertyDescriptor, TM = (s, t, e, r) => {
12990
12990
  for (var i = r > 1 ? void 0 : r ? vM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
@@ -13267,7 +13267,7 @@ let oh = (um = class extends Bt {
13267
13267
  return ((t = n(this, Zd, cS)) == null ? void 0 : t.socketJoined) === !0;
13268
13268
  }, Un = new WeakMap(), Hn = new WeakMap(), Uo = new WeakMap(), um);
13269
13269
  oh = PM([
13270
- at("0700")
13270
+ ot("0700")
13271
13271
  ], oh);
13272
13272
  var wM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, CM = (s, t, e, r) => {
13273
13273
  for (var i = r > 1 ? void 0 : r ? _M(t, e) : t, a = s.length - 1, o; a >= 0; a--)
@@ -13471,7 +13471,7 @@ let ch = (pm = class extends Bt {
13471
13471
  return n(this, Fn).getValue("connectionHandler");
13472
13472
  }, Pi = new WeakMap(), Bo = new WeakMap(), pm);
13473
13473
  ch = kM([
13474
- at("0800")
13474
+ ot("0800")
13475
13475
  ], ch);
13476
13476
  function IM(s) {
13477
13477
  let t = "", e = [""];
@@ -13577,7 +13577,7 @@ hS([
13577
13577
  P.trace("Ai.getActiveTranscript")
13578
13578
  ], cn.prototype, "getActiveTranscript", 1);
13579
13579
  cn = hS([
13580
- at("0000")
13580
+ ot("0000")
13581
13581
  ], cn);
13582
13582
  var DM = Object.defineProperty, OM = Object.getOwnPropertyDescriptor, NM = (s, t, e, r) => {
13583
13583
  for (var i = r > 1 ? void 0 : r ? OM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
@@ -14063,7 +14063,7 @@ var xM = Object.defineProperty, UM = Object.getOwnPropertyDescriptor, HM = (s, t
14063
14063
  for (var i = r > 1 ? void 0 : r ? UM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
14064
14064
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
14065
14065
  return r && i && xM(t, e, i), i;
14066
- }, $r, os, xr, Go, dt;
14066
+ }, $r, os, xr, Go, lt;
14067
14067
  class gS {
14068
14068
  constructor(t, e, r, i, a) {
14069
14069
  p(this, "stage");
@@ -14071,8 +14071,8 @@ class gS {
14071
14071
  m(this, os, void 0);
14072
14072
  m(this, xr, void 0);
14073
14073
  m(this, Go, 0);
14074
- m(this, dt, void 0);
14075
- f(this, dt, t), this.stage = new li(
14074
+ m(this, lt, void 0);
14075
+ f(this, lt, t), this.stage = new li(
14076
14076
  t,
14077
14077
  i,
14078
14078
  a,
@@ -14085,17 +14085,17 @@ class gS {
14085
14085
  * Not for external use
14086
14086
  */
14087
14087
  get telemetry() {
14088
- return n(this, dt).getValue("telemetry");
14088
+ return n(this, lt).getValue("telemetry");
14089
14089
  }
14090
14090
  /**
14091
14091
  * @access private
14092
14092
  * Not for external use
14093
14093
  */
14094
14094
  get logger() {
14095
- return n(this, dt).getValue("logger");
14095
+ return n(this, lt).getValue("logger");
14096
14096
  }
14097
14097
  setupEvents() {
14098
- n(this, dt).subscribe("stageStatus", (t) => {
14098
+ n(this, lt).subscribe("stageStatus", (t) => {
14099
14099
  this.stage.emit("stageStatusUpdate", t);
14100
14100
  }), n(this, xr).on(x.grantStageAccess, () => {
14101
14101
  n(this, $r).permissions.stageAccess !== W.Allowed && (this.stage.emit("stageRequestApproved"), this.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
@@ -14110,7 +14110,7 @@ class gS {
14110
14110
  if (n(this, $r).permissions.stageAccess !== W.Allowed)
14111
14111
  return;
14112
14112
  const e = (r = t == null ? void 0 : t.stageRequests) != null ? r : [];
14113
- yield n(this, dt).getValue("peerSessionStore").emitAsync(_.GET_STAGE_REQUESTS, e), n(this, Go) < e.length && e.length > 0 && this.stage.emit("newStageRequest", { count: e.length }), f(this, Go, e.length), this.stage.emit("stageAccessRequestUpdate", e);
14113
+ yield n(this, lt).getValue("peerSessionStore").emitAsync(_.GET_STAGE_REQUESTS, e), n(this, Go) < e.length && e.length > 0 && this.stage.emit("newStageRequest", { count: e.length }), f(this, Go, e.length), this.stage.emit("stageAccessRequestUpdate", e);
14114
14114
  })
14115
14115
  );
14116
14116
  }
@@ -14125,7 +14125,7 @@ class gS {
14125
14125
  }
14126
14126
  setStageStatus(t) {
14127
14127
  return u(this, null, function* () {
14128
- this.stage.status !== t && n(this, dt).setValue("stageStatus", t);
14128
+ this.stage.status !== t && n(this, lt).setValue("stageStatus", t);
14129
14129
  });
14130
14130
  }
14131
14131
  /**
@@ -14134,11 +14134,11 @@ class gS {
14134
14134
  * - Socket-Client inconsistency
14135
14135
  */
14136
14136
  selfStageStatusHandler(t) {
14137
- const e = fp(t.stageType), r = n(this, dt).getValue("stageStatus");
14137
+ const e = fp(t.stageType), r = n(this, lt).getValue("stageStatus");
14138
14138
  if (r !== e)
14139
14139
  switch (t.stageType) {
14140
14140
  case 1:
14141
- n(this, dt).setValue("stageStatus", "ACCEPTED_TO_JOIN_STAGE", !1), this.stage.join();
14141
+ n(this, lt).setValue("stageStatus", "ACCEPTED_TO_JOIN_STAGE", !1), this.stage.join();
14142
14142
  break;
14143
14143
  case 2:
14144
14144
  case 3:
@@ -14147,7 +14147,7 @@ class gS {
14147
14147
  case 0:
14148
14148
  case 4:
14149
14149
  default:
14150
- n(this, dt).setValue("stageStatus", "ACCEPTED_TO_JOIN_STAGE", !1), this.stage.leave();
14150
+ n(this, lt).setValue("stageStatus", "ACCEPTED_TO_JOIN_STAGE", !1), this.stage.leave();
14151
14151
  break;
14152
14152
  }
14153
14153
  }
@@ -14163,7 +14163,7 @@ class gS {
14163
14163
  }
14164
14164
  switch (t.stageType) {
14165
14165
  case 1:
14166
- e.setStageStatus("ON_STAGE"), r && n(this, dt).getValue("peerSessionStore").emit(_.UPDATE_ACTIVE, { viewMode: n(this, os).viewMode, page: n(this, os).currentPage });
14166
+ e.setStageStatus("ON_STAGE"), r && n(this, lt).getValue("peerSessionStore").emit(_.UPDATE_ACTIVE, { viewMode: n(this, os).viewMode, page: n(this, os).currentPage });
14167
14167
  break;
14168
14168
  case 2:
14169
14169
  e.setStageStatus("ACCEPTED_TO_JOIN_STAGE");
@@ -14174,17 +14174,17 @@ class gS {
14174
14174
  case 0:
14175
14175
  case 4:
14176
14176
  default:
14177
- e.setStageStatus("OFF_STAGE"), r && n(this, dt).getValue("peerSessionStore").emit(_.UPDATE_ACTIVE, { viewMode: n(this, os).viewMode, page: n(this, os).currentPage });
14177
+ e.setStageStatus("OFF_STAGE"), r && n(this, lt).getValue("peerSessionStore").emit(_.UPDATE_ACTIVE, { viewMode: n(this, os).viewMode, page: n(this, os).currentPage });
14178
14178
  break;
14179
14179
  }
14180
- n(this, dt).getValue("peerSessionStore").emit(_.UPDATE_PEER_STAGE_STATUS, {
14180
+ n(this, lt).getValue("peerSessionStore").emit(_.UPDATE_PEER_STAGE_STATUS, {
14181
14181
  id: e.id,
14182
14182
  status: e.stageStatus
14183
14183
  });
14184
14184
  });
14185
14185
  }
14186
14186
  }
14187
- $r = new WeakMap(), os = new WeakMap(), xr = new WeakMap(), Go = new WeakMap(), dt = new WeakMap();
14187
+ $r = new WeakMap(), os = new WeakMap(), xr = new WeakMap(), Go = new WeakMap(), lt = new WeakMap();
14188
14188
  HM([
14189
14189
  P.trace("Stage.setupEvents")
14190
14190
  ], gS.prototype, "setupEvents", 1);
@@ -14296,7 +14296,7 @@ Sp([
14296
14296
  P.trace("Plugin.deactivatePlugin")
14297
14297
  ], No.prototype, "deactivate", 1);
14298
14298
  No = Sp([
14299
- at("0600")
14299
+ ot("0600")
14300
14300
  ], No);
14301
14301
  var Oe, Ci;
14302
14302
  class mS extends Map {
@@ -14418,7 +14418,7 @@ let hh = class {
14418
14418
  }
14419
14419
  };
14420
14420
  hh = GM([
14421
- at("0600")
14421
+ ot("0600")
14422
14422
  ], hh);
14423
14423
  var WM = Object.defineProperty, JM = Object.getOwnPropertyDescriptor, KM = (s, t, e, r) => {
14424
14424
  for (var i = r > 1 ? void 0 : r ? JM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
@@ -14742,7 +14742,7 @@ id([
14742
14742
  P.trace("Recording.stop")
14743
14743
  ], hn.prototype, "resume", 1);
14744
14744
  hn = id([
14745
- at("1000")
14745
+ ot("1000")
14746
14746
  ], hn);
14747
14747
  var XM = Object.defineProperty, ZM = Object.getOwnPropertyDescriptor, eD = (s, t, e, r) => {
14748
14748
  for (var i = r > 1 ? void 0 : r ? ZM(t, e) : t, a = s.length - 1, o; a >= 0; a--)
@@ -14884,7 +14884,7 @@ var sD = Object.defineProperty, rD = Object.getOwnPropertyDescriptor, jt = (s, t
14884
14884
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
14885
14885
  return r && i && sD(t, e, i), i;
14886
14886
  }, xe, ye, Se, Ys, zt, Xo, ke;
14887
- class bt extends Oa {
14887
+ class kt extends Oa {
14888
14888
  constructor(e, r, i = Fd, a = !0) {
14889
14889
  const o = e.getValue("logger");
14890
14890
  super(o);
@@ -15246,43 +15246,43 @@ class bt extends Oa {
15246
15246
  xe = new WeakMap(), ye = new WeakMap(), Se = new WeakMap(), Ys = new WeakMap(), zt = new WeakMap(), Xo = new WeakMap(), ke = new WeakMap();
15247
15247
  jt([
15248
15248
  P.trace("MediaHandler.setupStreams")
15249
- ], bt.prototype, "setupStreams", 1);
15249
+ ], kt.prototype, "setupStreams", 1);
15250
15250
  jt([
15251
15251
  P.trace("MediaHandler.enableAudio")
15252
- ], bt.prototype, "enableAudio", 1);
15252
+ ], kt.prototype, "enableAudio", 1);
15253
15253
  jt([
15254
15254
  P.trace("MediaHandler.disableAudio")
15255
- ], bt.prototype, "disableAudio", 1);
15255
+ ], kt.prototype, "disableAudio", 1);
15256
15256
  jt([
15257
15257
  P.trace("MediaHandler.setAudioDevice")
15258
- ], bt.prototype, "setAudioDevice", 1);
15258
+ ], kt.prototype, "setAudioDevice", 1);
15259
15259
  jt([
15260
15260
  P.trace("MediaHandler.enableVideo")
15261
- ], bt.prototype, "enableVideo", 1);
15261
+ ], kt.prototype, "enableVideo", 1);
15262
15262
  jt([
15263
15263
  P.trace("MediaHandler.disableVideo")
15264
- ], bt.prototype, "disableVideo", 1);
15264
+ ], kt.prototype, "disableVideo", 1);
15265
15265
  jt([
15266
15266
  P.trace("MediaHandler.setVideoDevice")
15267
- ], bt.prototype, "setVideoDevice", 1);
15267
+ ], kt.prototype, "setVideoDevice", 1);
15268
15268
  jt([
15269
15269
  P.trace("MediaHandler.updateVideoConstraints")
15270
- ], bt.prototype, "updateVideoConstraints", 1);
15270
+ ], kt.prototype, "updateVideoConstraints", 1);
15271
15271
  jt([
15272
15272
  P.trace("MediaHandler.enableScreenShare")
15273
- ], bt.prototype, "enableScreenShare", 1);
15273
+ ], kt.prototype, "enableScreenShare", 1);
15274
15274
  jt([
15275
15275
  P.trace("MediaHandler.disableScreenShare")
15276
- ], bt.prototype, "disableScreenShare", 1);
15276
+ ], kt.prototype, "disableScreenShare", 1);
15277
15277
  jt([
15278
15278
  P.trace("MediaHandler.updateScreenshareConstraints")
15279
- ], bt.prototype, "updateScreenshareConstraints", 1);
15279
+ ], kt.prototype, "updateScreenshareConstraints", 1);
15280
15280
  jt([
15281
15281
  P.trace("MediaHandler.destruct")
15282
- ], bt.prototype, "destruct", 1);
15282
+ ], kt.prototype, "destruct", 1);
15283
15283
  jt([
15284
15284
  P.trace("MediaHandler.onDeviceChange")
15285
- ], bt.prototype, "onDeviceChange", 1);
15285
+ ], kt.prototype, "onDeviceChange", 1);
15286
15286
  function Sd(s, t, e) {
15287
15287
  switch (!0) {
15288
15288
  case Pe.isChromiumBased():
@@ -15911,7 +15911,7 @@ let Ht = (Tm = class extends pD {
15911
15911
  const t = yield navigator.mediaDevices.enumerateDevices(), e = (i) => {
15912
15912
  var o;
15913
15913
  const a = ((o = i.label) == null ? void 0 : o.toLowerCase()) || "";
15914
- return Fd(i) ? 4 : a.includes("airpods") || a.includes("airdopes") || a.includes("bluetooth") || a.includes("wireless") || a.includes("headphones") || a.includes("headset") || a.includes("earbuds") || a.includes("usb") || a.includes("external") ? 0 : i.deviceId === "default" || a.includes("default") ? 1 : a.includes("built-in") || a.includes("internal") ? 2 : 3;
15914
+ return Fd(i) ? 4 : a.includes("airpods") || a.includes("airdopes") || a.includes("bluetooth") || a.includes("wireless") || a.includes("headphones") || a.includes("headset") && !a.includes("earpiece") || a.includes("earbuds") || a.includes("usb") || a.includes("external") ? 0 : i.deviceId === "default" || a.includes("default") ? 1 : a.includes("built-in") || a.includes("internal") ? 2 : 3;
15915
15915
  }, r = (i) => {
15916
15916
  var o;
15917
15917
  if (i.kind !== "videoinput")
@@ -16041,7 +16041,7 @@ Ts([
16041
16041
  P.trace("WebMediaInterface.onDeviceChange")
16042
16042
  ], Ht.prototype, "onDeviceChange", 1);
16043
16043
  Ht = Ts([
16044
- at("1600")
16044
+ ot("1600")
16045
16045
  ], Ht);
16046
16046
  const yS = Ht, dn = {
16047
16047
  setItem: (s, t, e) => {
@@ -16377,7 +16377,7 @@ ES([
16377
16377
  P.trace("BaseMediaHandler.unmuteTrack")
16378
16378
  ], jd.prototype, "unmuteTrack", 1);
16379
16379
  jd = ES([
16380
- at("1600")
16380
+ ot("1600")
16381
16381
  ], jd);
16382
16382
  const PS = jd;
16383
16383
  var _D = Object.defineProperty, CD = Object.getOwnPropertyDescriptor, Ep = (s, t, e, r) => {
@@ -16788,16 +16788,16 @@ Su([
16788
16788
  const OD = nd, Qg = Vs(
16789
16789
  hp()
16790
16790
  );
16791
- var lt, Di, sc, Qn;
16791
+ var ut, Di, sc, Qn;
16792
16792
  const Rn = class {
16793
16793
  constructor(t) {
16794
- m(this, lt, void 0);
16794
+ m(this, ut, void 0);
16795
16795
  m(this, Di, void 0);
16796
16796
  m(this, sc, void 0);
16797
16797
  m(this, Qn, void 0);
16798
16798
  if (!t)
16799
16799
  throw new R("Could not load preset.", "0904");
16800
- f(this, lt, t.config), f(this, sc, t.name), f(this, Di, t.ui || Vs(hp().ui)), f(this, Qn, t.permissions.plugins.config);
16800
+ f(this, ut, t.config), f(this, sc, t.name), f(this, Di, t.ui || Vs(hp().ui)), f(this, Qn, t.permissions.plugins.config);
16801
16801
  }
16802
16802
  /**
16803
16803
  * @deprecated. Use init()
@@ -16895,28 +16895,28 @@ const Rn = class {
16895
16895
  * possible values are: GROUP_CALL| LIVESTREAM | CHAT | AUDIO_ROOM
16896
16896
  */
16897
16897
  get viewType() {
16898
- return n(this, lt).viewType;
16898
+ return n(this, ut).viewType;
16899
16899
  }
16900
16900
  /**
16901
16901
  * The `livestreamViewerQualities` specifies the allowed qualities of a stream,
16902
16902
  * that can be viewed by a livestream viewer
16903
16903
  * */
16904
16904
  get livestreamViewerQualities() {
16905
- return n(this, lt).livestreamViewerQualities || [];
16905
+ return n(this, ut).livestreamViewerQualities || [];
16906
16906
  }
16907
16907
  /**
16908
16908
  * The `maxVideoStreams` contains the maximum video
16909
16909
  * streams for mobile and desktop
16910
16910
  */
16911
16911
  get maxVideoStreams() {
16912
- return n(this, lt).maxVideoStreams;
16912
+ return n(this, ut).maxVideoStreams;
16913
16913
  }
16914
16914
  /**
16915
16915
  * The `maxScreenShareCount` contains the maximum
16916
16916
  * possible concurrent screen shares
16917
16917
  */
16918
16918
  get maxScreenShareCount() {
16919
- return n(this, lt).maxScreenshareCount;
16919
+ return n(this, ut).maxScreenshareCount;
16920
16920
  }
16921
16921
  /**
16922
16922
  * @deprecated in favour of permissions.plugins.config
@@ -16938,22 +16938,22 @@ const Rn = class {
16938
16938
  }
16939
16939
  get isSimulcastEnabled() {
16940
16940
  var t, e, r, i;
16941
- return (i = (r = (e = (t = n(this, lt)) == null ? void 0 : t.media) == null ? void 0 : e.video) == null ? void 0 : r.simulcast) != null ? i : !1;
16941
+ return (i = (r = (e = (t = n(this, ut)) == null ? void 0 : t.media) == null ? void 0 : e.video) == null ? void 0 : r.simulcast) != null ? i : !1;
16942
16942
  }
16943
16943
  get mediaConstraints() {
16944
16944
  var t, e, r, i, a, o, c, d, l, h, g, S, y, E, k, b, O, D, U, H, B, J, re, F;
16945
16945
  return {
16946
16946
  audio: {
16947
- enableStereo: (i = (r = (e = (t = n(this, lt)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : Tn.audio.enableStereo,
16948
- enableHighBitrate: (d = (c = (o = (a = n(this, lt)) == null ? void 0 : a.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : Tn.audio.enableHighBitrate
16947
+ enableStereo: (i = (r = (e = (t = n(this, ut)) == null ? void 0 : t.media) == null ? void 0 : e.audio) == null ? void 0 : r.enableStereo) != null ? i : Tn.audio.enableStereo,
16948
+ enableHighBitrate: (d = (c = (o = (a = n(this, ut)) == null ? void 0 : a.media) == null ? void 0 : o.audio) == null ? void 0 : c.enableHighBitrate) != null ? d : Tn.audio.enableHighBitrate
16949
16949
  },
16950
16950
  video: {
16951
- quality: (S = (g = (h = (l = n(this, lt)) == null ? void 0 : l.media) == null ? void 0 : h.video) == null ? void 0 : g.quality) != null ? S : Tn.video.quality,
16952
- frameRate: (b = (k = (E = (y = n(this, lt)) == null ? void 0 : y.media) == null ? void 0 : E.video) == null ? void 0 : k.frameRate) != null ? b : Tn.video.frameRate
16951
+ quality: (S = (g = (h = (l = n(this, ut)) == null ? void 0 : l.media) == null ? void 0 : h.video) == null ? void 0 : g.quality) != null ? S : Tn.video.quality,
16952
+ frameRate: (b = (k = (E = (y = n(this, ut)) == null ? void 0 : y.media) == null ? void 0 : E.video) == null ? void 0 : k.frameRate) != null ? b : Tn.video.frameRate
16953
16953
  },
16954
16954
  screenshare: {
16955
- quality: (H = (U = (D = (O = n(this, lt)) == null ? void 0 : O.media) == null ? void 0 : D.screenshare) == null ? void 0 : U.quality) != null ? H : Tn.screenshare.quality,
16956
- frameRate: (F = (re = (J = (B = n(this, lt)) == null ? void 0 : B.media) == null ? void 0 : J.screenshare) == null ? void 0 : re.frameRate) != null ? F : Tn.screenshare.frameRate
16955
+ quality: (H = (U = (D = (O = n(this, ut)) == null ? void 0 : O.media) == null ? void 0 : D.screenshare) == null ? void 0 : U.quality) != null ? H : Tn.screenshare.quality,
16956
+ frameRate: (F = (re = (J = (B = n(this, ut)) == null ? void 0 : B.media) == null ? void 0 : J.screenshare) == null ? void 0 : re.frameRate) != null ? F : Tn.screenshare.frameRate
16957
16957
  }
16958
16958
  };
16959
16959
  }
@@ -16962,7 +16962,7 @@ const Rn = class {
16962
16962
  }
16963
16963
  };
16964
16964
  let fh = Rn;
16965
- lt = new WeakMap(), Di = new WeakMap(), sc = new WeakMap(), Qn = new WeakMap();
16965
+ ut = new WeakMap(), Di = new WeakMap(), sc = new WeakMap(), Qn = new WeakMap();
16966
16966
  var ND = Object.defineProperty, LD = Object.getOwnPropertyDescriptor, wS = (s, t, e, r) => {
16967
16967
  for (var i = r > 1 ? void 0 : r ? LD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
16968
16968
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
@@ -17461,7 +17461,7 @@ var FD = Object.defineProperty, jD = Object.getOwnPropertyDescriptor, Va = (s, t
17461
17461
  return r && i && FD(t, e, i), i;
17462
17462
  };
17463
17463
  const qD = 0.8, GD = 1.2;
17464
- var ta, sa, Dt, Oi, io, qr, Pn, Ni, no, al, bS, ut, ac, Gr, Li, ao, Xs, ol, oc, vh, cl, kS, dl, IS, ym;
17464
+ var ta, sa, Dt, Oi, io, qr, Pn, Ni, no, al, bS, ht, ac, Gr, Li, ao, Xs, ol, oc, vh, cl, kS, dl, IS, ym;
17465
17465
  let Sr = (ym = class extends Bt {
17466
17466
  constructor(t, e, r, i) {
17467
17467
  const a = t.getValue("logger");
@@ -17557,7 +17557,7 @@ let Sr = (ym = class extends Bt {
17557
17557
  */
17558
17558
  p(this, "presetName");
17559
17559
  m(this, Dt, void 0);
17560
- m(this, ut, void 0);
17560
+ m(this, ht, void 0);
17561
17561
  m(this, ac, void 0);
17562
17562
  m(this, Gr, /* @__PURE__ */ new Map());
17563
17563
  /*
@@ -17602,7 +17602,7 @@ let Sr = (ym = class extends Bt {
17602
17602
  this.id = o, this.userId = c, this.name = d, this.device = l, this.picture = h, this.isHost = g, this.flags = S, this.manualProducerConfig = kC, f(this, sa, y != null ? y : "ON_STAGE"), this.customParticipantId = E, this.audioEnabled = !k, this.audioTrack = b, this.videoEnabled = O, this.videoTrack = D, this.screenShareTracks = {
17603
17603
  audio: void 0,
17604
17604
  video: void 0
17605
- }, this.producers = U != null ? U : [], this.presetName = H == null ? void 0 : H.preset_name, f(this, ta, !1), f(this, ut, r), f(this, ac, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), I(this, oc, vh).call(this);
17605
+ }, this.producers = U != null ? U : [], this.presetName = H == null ? void 0 : H.preset_name, f(this, ta, !1), f(this, ht, r), f(this, ac, i), this.setupEvents(), this.updateVideo = this.updateVideo.bind(this), I(this, oc, vh).call(this);
17606
17606
  }
17607
17607
  /** Denotes the participants's current stage status. */
17608
17608
  get stageStatus() {
@@ -17660,7 +17660,7 @@ let Sr = (ym = class extends Bt {
17660
17660
  return u(this, null, function* () {
17661
17661
  if (!n(this, Ni, no))
17662
17662
  throw new R("Can`t pin participant without joining room", "1205");
17663
- if (!n(this, ut).permissions.pinParticipant)
17663
+ if (!n(this, ht).permissions.pinParticipant)
17664
17664
  throw new R("You do not have permission to pin participants.", "1201");
17665
17665
  return n(this, Oi, io).pinPeer(this.id);
17666
17666
  });
@@ -17673,7 +17673,7 @@ let Sr = (ym = class extends Bt {
17673
17673
  return u(this, null, function* () {
17674
17674
  if (!n(this, Ni, no))
17675
17675
  throw new R("Can`t unpin participant without joining room", "1205");
17676
- if (!n(this, ut).permissions.pinParticipant)
17676
+ if (!n(this, ht).permissions.pinParticipant)
17677
17677
  throw new R("You do not have permission to unpin participants.", "1201");
17678
17678
  return n(this, Oi, io).pinPeer(null);
17679
17679
  });
@@ -17693,14 +17693,14 @@ let Sr = (ym = class extends Bt {
17693
17693
  disableAudio() {
17694
17694
  return u(this, null, function* () {
17695
17695
  const t = this.id;
17696
- if (this.logger.info(`Local peer ${n(this, ut).id} is disabling mic of a remote peer ${t}`), !n(this, Ni, no))
17696
+ if (this.logger.info(`Local peer ${n(this, ht).id} is disabling mic of a remote peer ${t}`), !n(this, Ni, no))
17697
17697
  throw new R(
17698
17698
  "Can`t disable participant audio without joining room",
17699
17699
  "1205"
17700
17700
  );
17701
- if (n(this, ut).permissions.canDisableParticipantAudio)
17701
+ if (n(this, ht).permissions.canDisableParticipantAudio)
17702
17702
  return n(this, Oi, io).disableAudio(t);
17703
- throw this.logger.error(`Local peer ${n(this, ut).id} is not authorized to disable mic of a remote peer ${t}`), new R(
17703
+ throw this.logger.error(`Local peer ${n(this, ht).id} is not authorized to disable mic of a remote peer ${t}`), new R(
17704
17704
  "Unauthorized: User does not have permission to disable participant audio.",
17705
17705
  "1201"
17706
17706
  );
@@ -17709,15 +17709,15 @@ let Sr = (ym = class extends Bt {
17709
17709
  kick() {
17710
17710
  return u(this, null, function* () {
17711
17711
  const t = this.id;
17712
- if (this.logger.info(`Local peer ${n(this, ut).id} is kicking a remote peer ${t} out of the meeting.`), !n(this, al, bS))
17712
+ if (this.logger.info(`Local peer ${n(this, ht).id} is kicking a remote peer ${t} out of the meeting.`), !n(this, al, bS))
17713
17713
  throw new R("Can`t kick participant without joining room", "1205");
17714
- if (n(this, ut).permissions.kickParticipant) {
17714
+ if (n(this, ht).permissions.kickParticipant) {
17715
17715
  yield n(this, Dt).getValue("peerSessionStore").emitAsync(_.KICK_PEER, {
17716
17716
  peerId: t
17717
17717
  });
17718
17718
  return;
17719
17719
  }
17720
- throw this.logger.error(`Local peer ${n(this, ut).id} is not authorized to kick a remote peer ${t} out of the meeting.`), new R(
17720
+ throw this.logger.error(`Local peer ${n(this, ht).id} is not authorized to kick a remote peer ${t} out of the meeting.`), new R(
17721
17721
  "Unauthorized: User does not have permission to kick participants.",
17722
17722
  "1201"
17723
17723
  );
@@ -17726,14 +17726,14 @@ let Sr = (ym = class extends Bt {
17726
17726
  disableVideo() {
17727
17727
  return u(this, null, function* () {
17728
17728
  const t = this.id;
17729
- if (this.logger.info(`Local peer ${n(this, ut).id} is disabling webcam of a remote peer ${t}.`), !n(this, Ni, no))
17729
+ if (this.logger.info(`Local peer ${n(this, ht).id} is disabling webcam of a remote peer ${t}.`), !n(this, Ni, no))
17730
17730
  throw new R(
17731
17731
  "Can`t disable participant video without joining room",
17732
17732
  "1205"
17733
17733
  );
17734
- if (n(this, ut).permissions.canDisableParticipantVideo)
17734
+ if (n(this, ht).permissions.canDisableParticipantVideo)
17735
17735
  return n(this, Oi, io).disableVideo(t);
17736
- throw this.logger.error(`Local peer ${n(this, ut).id} is not authorized to disable webcam of a remote peer ${t}.`), new R(
17736
+ throw this.logger.error(`Local peer ${n(this, ht).id} is not authorized to disable webcam of a remote peer ${t}.`), new R(
17737
17737
  "Unauthorized: User does not have permission to disable participant video.",
17738
17738
  "1201"
17739
17739
  );
@@ -17812,7 +17812,7 @@ let Sr = (ym = class extends Bt {
17812
17812
  return n(this, Dt).getValue("connectionHandler").mediaJoined;
17813
17813
  }, al = new WeakSet(), bS = function() {
17814
17814
  return n(this, Dt).getValue("connectionHandler").socketJoined;
17815
- }, ut = new WeakMap(), ac = new WeakMap(), Gr = new WeakMap(), Li = new WeakSet(), ao = function() {
17815
+ }, ht = new WeakMap(), ac = new WeakMap(), Gr = new WeakMap(), Li = new WeakSet(), ao = function() {
17816
17816
  return n(this, Dt).getValue("pip");
17817
17817
  }, Xs = new WeakMap(), ol = new WeakMap(), oc = new WeakSet(), vh = function() {
17818
17818
  Array.from(n(this, Gr).keys()).forEach(this.updateVideo);
@@ -17839,7 +17839,7 @@ Va([
17839
17839
  P.trace("Participant.setStageStatus")
17840
17840
  ], Sr.prototype, "setStageStatus", 1);
17841
17841
  Sr = Va([
17842
- at("1200")
17842
+ ot("1200")
17843
17843
  ], Sr);
17844
17844
  class ro extends mS {
17845
17845
  constructor(t, e) {
@@ -17990,7 +17990,7 @@ var zD = Object.defineProperty, YD = Object.getOwnPropertyDescriptor, Bs = (s, t
17990
17990
  return r && i && zD(t, e, i), i;
17991
17991
  };
17992
17992
  const QD = ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
17993
- var Ie, cc, Th, Vi, oo, ra, Rd, $i, wt, Em;
17993
+ var Ie, cc, Th, Vi, oo, ra, Rd, $i, _t, Em;
17994
17994
  let is = (Em = class extends Bt {
17995
17995
  constructor(t, e, r) {
17996
17996
  const i = t.getValue("logger");
@@ -18040,7 +18040,7 @@ let is = (Em = class extends Bt {
18040
18040
  p(this, "all");
18041
18041
  m(this, Ie, void 0);
18042
18042
  m(this, $i, void 0);
18043
- m(this, wt, void 0);
18043
+ m(this, _t, void 0);
18044
18044
  p(this, "rateLimitConfig", {
18045
18045
  maxInvocations: 5,
18046
18046
  period: 1
@@ -18070,7 +18070,7 @@ let is = (Em = class extends Bt {
18070
18070
  * Keeps a list of all participants who have been present in the selected peers list.
18071
18071
  */
18072
18072
  p(this, "selectedPeers", AS);
18073
- f(this, Ie, t), f(this, $i, e), f(this, wt, r), this.waitlisted = new ro(i), this.joined = new ro(i), this.videoSubscribed = new ro(i), this.audioSubscribed = new ro(i), this.active = this.videoSubscribed, this.pinned = new ro(i), this.all = new WD(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
18073
+ f(this, Ie, t), f(this, $i, e), f(this, _t, r), this.waitlisted = new ro(i), this.joined = new ro(i), this.videoSubscribed = new ro(i), this.audioSubscribed = new ro(i), this.active = this.videoSubscribed, this.pinned = new ro(i), this.all = new WD(i), this.viewMode = "ACTIVE_GRID", this.currentPage = 0, this.setupEvents();
18074
18074
  }
18075
18075
  /**
18076
18076
  * Return the controls for Picture-in-Picture
@@ -18155,7 +18155,7 @@ let is = (Em = class extends Bt {
18155
18155
  "1205"
18156
18156
  );
18157
18157
  const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
18158
- return n(this, wt).acceptWaitingRoomRequest([e]);
18158
+ return n(this, _t).acceptWaitingRoomRequest([e]);
18159
18159
  }
18160
18160
  /**
18161
18161
  * We need a new event for socket service events
@@ -18169,7 +18169,7 @@ let is = (Em = class extends Bt {
18169
18169
  var i, a;
18170
18170
  return (a = (i = this.waitlisted.get(r)) == null ? void 0 : i.userId) != null ? a : r;
18171
18171
  });
18172
- return n(this, wt).acceptWaitingRoomRequest(e);
18172
+ return n(this, _t).acceptWaitingRoomRequest(e);
18173
18173
  });
18174
18174
  }
18175
18175
  /**
@@ -18186,7 +18186,7 @@ let is = (Em = class extends Bt {
18186
18186
  "1205"
18187
18187
  );
18188
18188
  const e = (i = (r = this.waitlisted.get(t)) == null ? void 0 : r.userId) != null ? i : t;
18189
- n(this, wt).rejectWaitingRoomRequest([e]);
18189
+ n(this, _t).rejectWaitingRoomRequest([e]);
18190
18190
  });
18191
18191
  }
18192
18192
  setViewMode(t) {
@@ -18344,7 +18344,7 @@ let is = (Em = class extends Bt {
18344
18344
  "1201"
18345
18345
  );
18346
18346
  const e = !0;
18347
- n(this, wt).kickAll(e);
18347
+ n(this, _t).kickAll(e);
18348
18348
  });
18349
18349
  }
18350
18350
  broadcastMessage(t, e, r) {
@@ -18355,7 +18355,7 @@ let is = (Em = class extends Bt {
18355
18355
  throw new R("`type` must be a non-empty string.", "1209");
18356
18356
  if (r)
18357
18357
  if ("meetingIds" in r)
18358
- yield n(this, wt).broadcastToMeetings(t, r.meetingIds, e);
18358
+ yield n(this, _t).broadcastToMeetings(t, r.meetingIds, e);
18359
18359
  else {
18360
18360
  let i = [];
18361
18361
  "participantIds" in r ? i = r.participantIds : i = this.joined.toArray().filter(
@@ -18363,15 +18363,15 @@ let is = (Em = class extends Bt {
18363
18363
  var o;
18364
18364
  return (o = r.presetNames) == null ? void 0 : o.includes(a.presetName);
18365
18365
  }
18366
- ).map((a) => a.id), yield n(this, wt).broadcastToPeers(t, i, e);
18366
+ ).map((a) => a.id), yield n(this, _t).broadcastToPeers(t, i, e);
18367
18367
  }
18368
18368
  else
18369
- yield n(this, wt).broadcastMessage(t, e);
18369
+ yield n(this, _t).broadcastMessage(t, e);
18370
18370
  });
18371
18371
  }
18372
18372
  getAllJoinedPeers(t, e, r) {
18373
18373
  return u(this, null, function* () {
18374
- return (yield n(this, wt).getRoomPeers(t, e, r)).peers.map(wr.formatSocketPeerMessage);
18374
+ return (yield n(this, _t).getRoomPeers(t, e, r)).peers.map(wr.formatSocketPeerMessage);
18375
18375
  });
18376
18376
  }
18377
18377
  /**
@@ -18383,12 +18383,12 @@ let is = (Em = class extends Bt {
18383
18383
  const r = this.joined.toArray().filter((a) => t.includes(a.id)).map((a) => a.userId), i = [...new Set(r)];
18384
18384
  if (!i.length)
18385
18385
  throw new R("Cannot update permissions, no valid userIDs found", "1204");
18386
- n(this, wt).updatePermissions(i, e);
18386
+ n(this, _t).updatePermissions(i, e);
18387
18387
  });
18388
18388
  }
18389
18389
  getParticipantsInMeetingPreJoin() {
18390
18390
  return u(this, null, function* () {
18391
- return n(this, wt).getRoomPeersNonPaginated();
18391
+ return n(this, _t).getRoomPeersNonPaginated();
18392
18392
  });
18393
18393
  }
18394
18394
  }, Ie = new WeakMap(), cc = new WeakSet(), Th = function() {
@@ -18399,7 +18399,7 @@ let is = (Em = class extends Bt {
18399
18399
  }, ra = new WeakSet(), Rd = function() {
18400
18400
  var t;
18401
18401
  return ((t = n(this, Ie).getValue("connectionHandler")) == null ? void 0 : t.mediaJoined) === !0;
18402
- }, $i = new WeakMap(), wt = new WeakMap(), Em);
18402
+ }, $i = new WeakMap(), _t = new WeakMap(), Em);
18403
18403
  Bs([
18404
18404
  P.trace("Participants.setViewMode")
18405
18405
  ], is.prototype, "setViewMode", 1);
@@ -18431,7 +18431,7 @@ Bs([
18431
18431
  P.trace("Participants.getParticipantsInMeetingPreJoin")
18432
18432
  ], is.prototype, "getParticipantsInMeetingPreJoin", 1);
18433
18433
  is = Bs([
18434
- at("1200")
18434
+ ot("1200")
18435
18435
  ], is);
18436
18436
  var XD = Object.defineProperty, ZD = Object.getOwnPropertyDescriptor, Sn = (s, t, e, r) => {
18437
18437
  for (var i = r > 1 ? void 0 : r ? ZD(t, e) : t, a = s.length - 1, o; a >= 0; a--)
@@ -19699,12 +19699,12 @@ Sn([
19699
19699
  const Re = Vs(
19700
19700
  hp().permissions
19701
19701
  );
19702
- var Q, ia, na, ml, ht, kt;
19702
+ var Q, ia, na, ml, pt, It;
19703
19703
  const fl = class extends Bt {
19704
19704
  constructor(e, r, i, a = !1) {
19705
19705
  const o = e.getValue("logger");
19706
19706
  super(o);
19707
- m(this, ht);
19707
+ m(this, pt);
19708
19708
  m(this, Q, void 0);
19709
19709
  m(this, ia, void 0);
19710
19710
  m(this, na, void 0);
@@ -19915,7 +19915,7 @@ const fl = class extends Bt {
19915
19915
  get canProduceVideo() {
19916
19916
  var r;
19917
19917
  const e = (r = n(this, Q).media.video.canProduce) != null ? r : Re.media.video.canProduce;
19918
- return this.stageEnabled && (n(this, ht, kt) === "ACCEPTED_TO_JOIN_STAGE" || n(this, ht, kt) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, ht, kt) === "OFF_STAGE" || n(this, ht, kt) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
19918
+ return this.stageEnabled && (n(this, pt, It) === "ACCEPTED_TO_JOIN_STAGE" || n(this, pt, It) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, pt, It) === "OFF_STAGE" || n(this, pt, It) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
19919
19919
  }
19920
19920
  /**
19921
19921
  * The `canProduceScreenshare` shows permissions for sharing screen.
@@ -19924,7 +19924,7 @@ const fl = class extends Bt {
19924
19924
  get canProduceScreenshare() {
19925
19925
  var r;
19926
19926
  const e = (r = n(this, Q).media.screenshare.canProduce) != null ? r : Re.media.screenshare.canProduce;
19927
- return this.stageEnabled && (n(this, ht, kt) === "ACCEPTED_TO_JOIN_STAGE" || n(this, ht, kt) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, ht, kt) === "OFF_STAGE" || n(this, ht, kt) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
19927
+ return this.stageEnabled && (n(this, pt, It) === "ACCEPTED_TO_JOIN_STAGE" || n(this, pt, It) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, pt, It) === "OFF_STAGE" || n(this, pt, It) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
19928
19928
  }
19929
19929
  /**
19930
19930
  * The `canProduceAudio` shows permissions for enabling audio.
@@ -19933,7 +19933,7 @@ const fl = class extends Bt {
19933
19933
  get canProduceAudio() {
19934
19934
  var r;
19935
19935
  const e = (r = n(this, Q).media.audio.canProduce) != null ? r : Re.media.audio.canProduce;
19936
- return this.stageEnabled && (n(this, ht, kt) === "ACCEPTED_TO_JOIN_STAGE" || n(this, ht, kt) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, ht, kt) === "OFF_STAGE" || n(this, ht, kt) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
19936
+ return this.stageEnabled && (n(this, pt, It) === "ACCEPTED_TO_JOIN_STAGE" || n(this, pt, It) === "ON_STAGE") && e === W.CanRequest ? W.Allowed : this.stageEnabled && (n(this, pt, It) === "OFF_STAGE" || n(this, pt, It) === "REQUESTED_TO_JOIN_STAGE") && e === W.Allowed ? W.NotAllowed : e;
19937
19937
  }
19938
19938
  /**
19939
19939
  * The `chatPublic` shows permissions for public chat
@@ -20006,7 +20006,7 @@ const fl = class extends Bt {
20006
20006
  }
20007
20007
  };
20008
20008
  let Eh = fl;
20009
- Q = new WeakMap(), ia = new WeakMap(), na = new WeakMap(), ml = new WeakMap(), ht = new WeakSet(), kt = function() {
20009
+ Q = new WeakMap(), ia = new WeakMap(), na = new WeakMap(), ml = new WeakMap(), pt = new WeakSet(), It = function() {
20010
20010
  return n(this, na).getValue("stageStatus");
20011
20011
  };
20012
20012
  var Ot;
@@ -20086,7 +20086,7 @@ class LS extends Bt {
20086
20086
  const { RNLocalMediaHandlerImpl: y } = navigator;
20087
20087
  this.localMediaHandler = yield y.init(e);
20088
20088
  } else
20089
- this.localMediaHandler = new bt(
20089
+ this.localMediaHandler = new kt(
20090
20090
  i,
20091
20091
  e.constraints,
20092
20092
  (o = i == null ? void 0 : i.getValue("defaults")) == null ? void 0 : o.isNonPreferredDevice,
@@ -20411,7 +20411,7 @@ var sO = Object.defineProperty, rO = Object.getOwnPropertyDescriptor, Et = (s, t
20411
20411
  for (var i = r > 1 ? void 0 : r ? rO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
20412
20412
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
20413
20413
  return r && i && sO(t, e, i), i;
20414
- }, aa, pt, oa, je, er, pi, qe, it, ca, bd, Ne, Ve, da, la, lc, Ph, wm;
20414
+ }, aa, gt, oa, je, er, pi, qe, it, ca, bd, Ne, Ve, da, la, lc, Ph, wm;
20415
20415
  let Qe = (wm = class extends LS {
20416
20416
  constructor(t, e, r, i, a) {
20417
20417
  const o = t.getValue("logger");
@@ -20430,7 +20430,7 @@ let Qe = (wm = class extends LS {
20430
20430
  p(this, "customParticipantId");
20431
20431
  p(this, "waitlistStatus");
20432
20432
  m(this, aa, void 0);
20433
- m(this, pt, void 0);
20433
+ m(this, gt, void 0);
20434
20434
  m(this, oa, void 0);
20435
20435
  p(this, "role");
20436
20436
  p(this, "userId");
@@ -20454,7 +20454,7 @@ let Qe = (wm = class extends LS {
20454
20454
  p(this, "roomState", "init");
20455
20455
  m(this, da, /* @__PURE__ */ new Set());
20456
20456
  m(this, la, /* @__PURE__ */ new Set());
20457
- f(this, je, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = e.customParticipantId, this.waitlistStatus = "none", f(this, pt, r), f(this, aa, i), this.hidden = !1, f(this, oa, !1), this.organizationId = e.organizationId, this.supportsRemoteControl = Pe.isElectron(), this.device = Pe.getDeviceInfo(), this.presetName = a, this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), I(this, lc, Ph).call(this);
20457
+ f(this, je, t), this.userId = e.id, this.name = e.name, this.picture = e.picture, this.customParticipantId = e.customParticipantId, this.waitlistStatus = "none", f(this, gt, r), f(this, aa, i), this.hidden = !1, f(this, oa, !1), this.organizationId = e.organizationId, this.supportsRemoteControl = Pe.isElectron(), this.device = Pe.getDeviceInfo(), this.presetName = a, this.updatePermission(), this.updateVideo = this.updateVideo.bind(this), I(this, lc, Ph).call(this);
20458
20458
  }
20459
20459
  /**
20460
20460
  * @private
@@ -20495,7 +20495,7 @@ let Qe = (wm = class extends LS {
20495
20495
  });
20496
20496
  }
20497
20497
  cleanupEvents() {
20498
- this.removeAllListeners("videoUpdate"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("VIDEO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_LIST_UPDATED"), this.localMediaHandler.removeAllListeners("SCREENSHARE_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("SCREENSHARE_ENDED"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_SILENT"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_AUDIO"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_VIDEO"), n(this, pt).removeAllListeners("permissionsUpdate");
20498
+ this.removeAllListeners("videoUpdate"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("VIDEO_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_CHANGE"), this.localMediaHandler.removeAllListeners("DEVICE_LIST_UPDATED"), this.localMediaHandler.removeAllListeners("SCREENSHARE_TRACK_CHANGE"), this.localMediaHandler.removeAllListeners("SCREENSHARE_ENDED"), this.localMediaHandler.removeAllListeners("AUDIO_TRACK_SILENT"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_AUDIO"), this.localMediaHandler.removeAllListeners("FORCE_MUTE_VIDEO"), n(this, gt).removeAllListeners("permissionsUpdate");
20499
20499
  }
20500
20500
  /** @access private */
20501
20501
  setupEvents() {
@@ -20576,16 +20576,16 @@ let Qe = (wm = class extends LS {
20576
20576
  videoEnabled: this.videoEnabled,
20577
20577
  videoTrack: this.videoTrack
20578
20578
  }), (e = n(this, je)) == null || e.getValue("callstats").videoOff();
20579
- })), n(this, pt).on("permissionsUpdate", (e) => {
20579
+ })), n(this, gt).on("permissionsUpdate", (e) => {
20580
20580
  var r, i, a;
20581
- (r = e == null ? void 0 : e.media) != null && r.audio && n(this, pt).canProduceAudio !== W.Allowed && (this.disableAudio(), this.logger.info(`Disabled audio due to dynamic preset change: canProduceAudio: ${this.permissions.canProduceAudio}`)), (i = e == null ? void 0 : e.media) != null && i.video && n(this, pt).canProduceVideo !== W.Allowed && (this.disableVideo(), this.logger.info(`Disabled video due to dynamic preset change: canProduceVideo: ${this.permissions.canProduceVideo}`)), (a = e == null ? void 0 : e.media) != null && a.screenshare && n(this, pt).canProduceScreenshare !== W.Allowed && (this.disableScreenShare(), this.logger.info(`Disabled screenshare due to dynamic preset change: canProduceScreenshare: ${this.permissions.canProduceScreenshare}`));
20581
+ (r = e == null ? void 0 : e.media) != null && r.audio && n(this, gt).canProduceAudio !== W.Allowed && (this.disableAudio(), this.logger.info(`Disabled audio due to dynamic preset change: canProduceAudio: ${this.permissions.canProduceAudio}`)), (i = e == null ? void 0 : e.media) != null && i.video && n(this, gt).canProduceVideo !== W.Allowed && (this.disableVideo(), this.logger.info(`Disabled video due to dynamic preset change: canProduceVideo: ${this.permissions.canProduceVideo}`)), (a = e == null ? void 0 : e.media) != null && a.screenshare && n(this, gt).canProduceScreenshare !== W.Allowed && (this.disableScreenShare(), this.logger.info(`Disabled screenshare due to dynamic preset change: canProduceScreenshare: ${this.permissions.canProduceScreenshare}`));
20582
20582
  });
20583
20583
  }
20584
20584
  /**
20585
20585
  * Returns the current permission given to the user for the meeting.
20586
20586
  */
20587
20587
  get permissions() {
20588
- return n(this, pt);
20588
+ return n(this, gt);
20589
20589
  }
20590
20590
  /**
20591
20591
  * Returns configuration for the meeting.
@@ -20629,7 +20629,7 @@ let Qe = (wm = class extends LS {
20629
20629
  enableAudio(t) {
20630
20630
  return u(this, null, function* () {
20631
20631
  var e;
20632
- if (this.permissions.canProduceAudio !== W.NotAllowed && !(n(this, pt).canProduceAudio === W.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
20632
+ if (this.permissions.canProduceAudio !== W.NotAllowed && !(n(this, gt).canProduceAudio === W.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.audioEnabled) {
20633
20633
  if ((e = n(this, je)) == null || e.getValue("callstats").audioOn(), yield this.localMediaHandler.enableAudio(t), n(this, Ne, Ve) && this.stageStatus === "ON_STAGE") {
20634
20634
  if (this.audioTrack)
20635
20635
  try {
@@ -20652,7 +20652,7 @@ let Qe = (wm = class extends LS {
20652
20652
  enableVideo(t) {
20653
20653
  return u(this, null, function* () {
20654
20654
  var e;
20655
- if (n(this, pt).canProduceVideo !== W.NotAllowed && !(n(this, pt).canProduceVideo === W.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
20655
+ if (n(this, gt).canProduceVideo !== W.NotAllowed && !(n(this, gt).canProduceVideo === W.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.videoEnabled) {
20656
20656
  if ((e = n(this, je)) == null || e.getValue("callstats").videoOn(), yield this.localMediaHandler.enableVideo(t), n(this, Ne, Ve) && this.stageStatus === "ON_STAGE")
20657
20657
  try {
20658
20658
  yield n(this, qe, it).shareWebcam(this.videoTrack);
@@ -20679,7 +20679,7 @@ let Qe = (wm = class extends LS {
20679
20679
  return u(this, null, function* () {
20680
20680
  if (!n(this, Ne, Ve))
20681
20681
  throw new R("Can`t enable screenshare without joining room", "1105");
20682
- if (n(this, pt).canProduceScreenshare !== W.NotAllowed && !(n(this, pt).canProduceScreenshare === W.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.screenShareEnabled && (yield this.localMediaHandler.enableScreenShare(), this.screenShareTracks.audio || this.screenShareTracks.video)) {
20682
+ if (n(this, gt).canProduceScreenshare !== W.NotAllowed && !(n(this, gt).canProduceScreenshare === W.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE")) && !this.screenShareEnabled && (yield this.localMediaHandler.enableScreenShare(), this.screenShareTracks.audio || this.screenShareTracks.video)) {
20683
20683
  try {
20684
20684
  yield n(this, qe, it).shareScreen(this.screenShareTracks);
20685
20685
  } catch (t) {
@@ -20872,7 +20872,7 @@ let Qe = (wm = class extends LS {
20872
20872
  t.srcObject = void 0, e || (a = n(this, er, pi)) == null || a.disableSource(this.id);
20873
20873
  t.style.display = this.videoEnabled ? "block" : "none";
20874
20874
  }
20875
- }, aa = new WeakMap(), pt = new WeakMap(), oa = new WeakMap(), je = new WeakMap(), er = new WeakSet(), pi = function() {
20875
+ }, aa = new WeakMap(), gt = new WeakMap(), oa = new WeakMap(), je = new WeakMap(), er = new WeakSet(), pi = function() {
20876
20876
  return n(this, je).getValue("pip");
20877
20877
  }, qe = new WeakSet(), it = function() {
20878
20878
  return n(this, je).getValue("roomNodeClient");
@@ -20957,7 +20957,7 @@ Et([
20957
20957
  P.trace("Self.setDevice")
20958
20958
  ], Qe.prototype, "setDevice", 1);
20959
20959
  Qe = Et([
20960
- at("1100")
20960
+ ot("1100")
20961
20961
  ], Qe);
20962
20962
  class wp extends Error {
20963
20963
  constructor(t) {
@@ -21076,14 +21076,14 @@ class Lo extends Error {
21076
21076
  super(t), this.name = "UnsupportedError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Lo) : this.stack = new Error(t).stack;
21077
21077
  }
21078
21078
  }
21079
- class Rt extends Error {
21079
+ class bt extends Error {
21080
21080
  constructor(t) {
21081
- super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Rt) : this.stack = new Error(t).stack;
21081
+ super(t), this.name = "InvalidStateError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, bt) : this.stack = new Error(t).stack;
21082
21082
  }
21083
21083
  }
21084
21084
  class Or extends Error {
21085
21085
  constructor(t) {
21086
- super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, Rt) : this.stack = new Error(t).stack;
21086
+ super(t), this.name = "TransportConnectionError", Error.hasOwnProperty("captureStackTrace") ? Error.captureStackTrace(this, bt) : this.stack = new Error(t).stack;
21087
21087
  }
21088
21088
  }
21089
21089
  const Xg = (s) => new Promise((t) => setTimeout(t, s));
@@ -21290,7 +21290,7 @@ class cO extends vu {
21290
21290
  getStats() {
21291
21291
  return u(this, null, function* () {
21292
21292
  if (n(this, ws))
21293
- throw new Rt("closed");
21293
+ throw new bt("closed");
21294
21294
  return n(this, pc).getReceiverStats(this.localId);
21295
21295
  });
21296
21296
  }
@@ -21441,7 +21441,7 @@ class dO extends vu {
21441
21441
  getStats() {
21442
21442
  return u(this, null, function* () {
21443
21443
  if (n(this, Xt))
21444
- throw new Rt("closed");
21444
+ throw new bt("closed");
21445
21445
  return n(this, ls).getSenderStats(this.localId);
21446
21446
  });
21447
21447
  }
@@ -21477,9 +21477,9 @@ class dO extends vu {
21477
21477
  error: i
21478
21478
  }));
21479
21479
  }
21480
- throw new Rt("closed");
21480
+ throw new bt("closed");
21481
21481
  } else if (e && e.readyState === "ended")
21482
- throw new Rt("track ended");
21482
+ throw new bt("track ended");
21483
21483
  if (e === n(this, et)) {
21484
21484
  this.logger.debug(`replaceTrack() | same track, ignored trackId: ${e.id}`, n(this, Nt, ns));
21485
21485
  return;
@@ -21493,7 +21493,7 @@ class dO extends vu {
21493
21493
  setMaxSpatialLayer(e) {
21494
21494
  return u(this, null, function* () {
21495
21495
  if (n(this, Xt))
21496
- throw new Rt("closed");
21496
+ throw new bt("closed");
21497
21497
  if (this.kind !== "video")
21498
21498
  throw new Lo("not a video Producer");
21499
21499
  if (typeof e != "number")
@@ -21507,7 +21507,7 @@ class dO extends vu {
21507
21507
  setRtpEncodingParameters(e) {
21508
21508
  return u(this, null, function* () {
21509
21509
  if (n(this, Xt))
21510
- throw new Rt("closed");
21510
+ throw new bt("closed");
21511
21511
  if (typeof e != "object")
21512
21512
  throw new TypeError("invalid params");
21513
21513
  yield n(this, ls).setRtpEncodingParameters(this.localId, e);
@@ -21645,7 +21645,7 @@ const bn = class extends vu {
21645
21645
  getStats() {
21646
21646
  return u(this, null, function* () {
21647
21647
  if (this.closed)
21648
- throw new Rt("closed");
21648
+ throw new bt("closed");
21649
21649
  return this.handler.getTransportStats();
21650
21650
  });
21651
21651
  }
@@ -21671,7 +21671,7 @@ const bn = class extends vu {
21671
21671
  restartIce() {
21672
21672
  return u(this, null, function* () {
21673
21673
  if (this.logger.debug("restartIce()"), this.closed)
21674
- throw new Rt("closed");
21674
+ throw new bt("closed");
21675
21675
  return this.handler.restartIce();
21676
21676
  });
21677
21677
  }
@@ -21682,7 +21682,7 @@ const bn = class extends vu {
21682
21682
  if (this.direction !== "send")
21683
21683
  throw new Lo("not a sending Transport");
21684
21684
  if (r.readyState === "ended")
21685
- throw new Rt("track ended");
21685
+ throw new bt("track ended");
21686
21686
  if (i && typeof i != "object")
21687
21687
  throw new TypeError("if given, appData must be an object");
21688
21688
  } else
@@ -21758,7 +21758,7 @@ const bn = class extends vu {
21758
21758
  canConsume() {
21759
21759
  return u(this, null, function* () {
21760
21760
  if (this.closed)
21761
- throw new Rt("closed");
21761
+ throw new bt("closed");
21762
21762
  if (this.direction !== "recv")
21763
21763
  throw new Lo("not a receiving transport");
21764
21764
  if (!(yield this.transportConnectionPromise))
@@ -23430,7 +23430,7 @@ Gi = new WeakMap(), ks = new WeakMap(), Ec = new WeakMap(), Is = new WeakMap(),
23430
23430
  peerId: e.peerId
23431
23431
  });
23432
23432
  };
23433
- var wc, _c, Cc, Ta, ya, Ea, Rc, bc, Pa, _t, us, hs, Wi, Ji, rr, kc, Ol, KS, Nl, zS, Ll, YS, Vl, QS;
23433
+ var wc, _c, Cc, Ta, ya, Ea, Rc, bc, Pa, Ct, us, hs, Wi, Ji, rr, kc, Ol, KS, Nl, zS, Ll, YS, Vl, QS;
23434
23434
  const $l = class {
23435
23435
  constructor({
23436
23436
  initialEnergyThreshold: t = 0.015,
@@ -23465,14 +23465,14 @@ const $l = class {
23465
23465
  m(this, bc, void 0);
23466
23466
  m(this, Pa, void 0);
23467
23467
  // State variables
23468
- m(this, _t, void 0);
23468
+ m(this, Ct, void 0);
23469
23469
  m(this, us, void 0);
23470
23470
  m(this, hs, !1);
23471
23471
  m(this, Wi, 0);
23472
23472
  m(this, Ji, 0);
23473
23473
  m(this, rr, []);
23474
23474
  m(this, kc, void 0);
23475
- f(this, Ta, t), f(this, _t, t), f(this, wc, e), f(this, _c, r), f(this, Cc, i), f(this, ya, a), f(this, Ea, o), f(this, Rc, c), f(this, bc, d), f(this, Pa, l), f(this, kc, h), f(this, us, t / 2);
23475
+ f(this, Ta, t), f(this, Ct, t), f(this, wc, e), f(this, _c, r), f(this, Cc, i), f(this, ya, a), f(this, Ea, o), f(this, Rc, c), f(this, bc, d), f(this, Pa, l), f(this, kc, h), f(this, us, t / 2);
23476
23476
  }
23477
23477
  get voiceDetected() {
23478
23478
  return n(this, hs);
@@ -23485,33 +23485,33 @@ const $l = class {
23485
23485
  processAudioChunk(t) {
23486
23486
  var o, c;
23487
23487
  const e = I(o = $l, Ll, YS).call(o, t), r = I(c = $l, Vl, QS).call(c, t);
23488
- return I(this, Ol, KS).call(this, e), e / n(this, us) > n(this, Pa) && e > n(this, _t) && r > n(this, wc) ? (f(this, Wi, n(this, Wi) + 1), f(this, Ji, n(this, Cc)), n(this, Wi) >= n(this, _c) && f(this, hs, !0)) : (f(this, Wi, 0), n(this, Ji) > 0 ? f(this, Ji, n(this, Ji) - 1) : n(this, hs) && f(this, hs, !1), n(this, hs) || I(this, Nl, zS).call(this, e)), { energy: e, isVoice: n(this, hs) };
23488
+ return I(this, Ol, KS).call(this, e), e / n(this, us) > n(this, Pa) && e > n(this, Ct) && r > n(this, wc) ? (f(this, Wi, n(this, Wi) + 1), f(this, Ji, n(this, Cc)), n(this, Wi) >= n(this, _c) && f(this, hs, !0)) : (f(this, Wi, 0), n(this, Ji) > 0 ? f(this, Ji, n(this, Ji) - 1) : n(this, hs) && f(this, hs, !1), n(this, hs) || I(this, Nl, zS).call(this, e)), { energy: e, isVoice: n(this, hs) };
23489
23489
  }
23490
23490
  /**
23491
23491
  * Reset the detector state
23492
23492
  */
23493
23493
  reset() {
23494
- f(this, hs, !1), f(this, Wi, 0), f(this, Ji, 0), f(this, _t, n(this, Ta)), f(this, us, n(this, Ta) / 2), f(this, rr, []);
23494
+ f(this, hs, !1), f(this, Wi, 0), f(this, Ji, 0), f(this, Ct, n(this, Ta)), f(this, us, n(this, Ta) / 2), f(this, rr, []);
23495
23495
  }
23496
23496
  /**
23497
23497
  * Get current adaptive threshold values for debugging/visualization
23498
23498
  */
23499
23499
  getThresholdInfo() {
23500
23500
  return {
23501
- currentEnergyThreshold: n(this, _t),
23501
+ currentEnergyThreshold: n(this, Ct),
23502
23502
  backgroundNoiseEnergy: n(this, us),
23503
23503
  energyRatioThreshold: n(this, Pa)
23504
23504
  };
23505
23505
  }
23506
23506
  };
23507
23507
  let uo = $l;
23508
- wc = new WeakMap(), _c = new WeakMap(), Cc = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Ea = new WeakMap(), Rc = new WeakMap(), bc = new WeakMap(), Pa = new WeakMap(), _t = new WeakMap(), us = new WeakMap(), hs = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), rr = new WeakMap(), kc = new WeakMap(), Ol = new WeakSet(), KS = function(t) {
23509
- n(this, hs) ? f(this, _t, n(this, Ea) * n(this, _t) + (1 - n(this, Ea)) * t) : f(this, _t, n(this, ya) * n(this, _t) + (1 - n(this, ya)) * n(this, us)), f(this, _t, Math.max(
23508
+ wc = new WeakMap(), _c = new WeakMap(), Cc = new WeakMap(), Ta = new WeakMap(), ya = new WeakMap(), Ea = new WeakMap(), Rc = new WeakMap(), bc = new WeakMap(), Pa = new WeakMap(), Ct = new WeakMap(), us = new WeakMap(), hs = new WeakMap(), Wi = new WeakMap(), Ji = new WeakMap(), rr = new WeakMap(), kc = new WeakMap(), Ol = new WeakSet(), KS = function(t) {
23509
+ n(this, hs) ? f(this, Ct, n(this, Ea) * n(this, Ct) + (1 - n(this, Ea)) * t) : f(this, Ct, n(this, ya) * n(this, Ct) + (1 - n(this, ya)) * n(this, us)), f(this, Ct, Math.max(
23510
23510
  n(this, Rc),
23511
- Math.min(n(this, bc), n(this, _t))
23511
+ Math.min(n(this, bc), n(this, Ct))
23512
23512
  ));
23513
23513
  }, Nl = new WeakSet(), zS = function(t) {
23514
- if (t < n(this, _t) * 1.2)
23514
+ if (t < n(this, Ct) * 1.2)
23515
23515
  if (n(this, rr).push(t), n(this, rr).length > n(this, kc) && n(this, rr).shift(), n(this, rr).length >= 10) {
23516
23516
  const e = [...n(this, rr)].sort((i, a) => i - a), r = Math.floor(e.length / 2);
23517
23517
  f(this, us, e[r]);
@@ -23688,7 +23688,7 @@ var EO = Object.defineProperty, PO = Object.getOwnPropertyDescriptor, ge = (s, t
23688
23688
  for (var i = r > 1 ? void 0 : r ? PO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
23689
23689
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
23690
23690
  return r && i && EO(t, e, i), i;
23691
- }, Lc, Vc, Ke, j, Hl, gt, cr, Yi, Qi, $c, Lt, dr, mt, ft, lr, gi, xc, Oh, Bl, tv, Fl, sv, jl, rv, Uc, Nh, ql, iv, Gl, nv, tt, ot, Xi, po, Wl, av, Jl, ov, Kl, cv, zl, dv;
23691
+ }, Lc, Vc, Ke, j, Hl, mt, cr, Yi, Qi, $c, Lt, dr, ft, St, lr, gi, xc, Oh, Bl, tv, Fl, sv, jl, rv, Uc, Nh, ql, iv, Gl, nv, tt, ct, Xi, po, Wl, av, Jl, ov, Kl, cv, zl, dv;
23692
23692
  class ce {
23693
23693
  constructor(t, e) {
23694
23694
  m(this, lr);
@@ -23734,21 +23734,21 @@ class ce {
23734
23734
  m(this, Ke, void 0);
23735
23735
  m(this, j, void 0);
23736
23736
  m(this, Hl, void 0);
23737
- m(this, gt, void 0);
23737
+ m(this, mt, void 0);
23738
23738
  m(this, cr, void 0);
23739
23739
  m(this, Yi, void 0);
23740
23740
  m(this, Qi, void 0);
23741
23741
  m(this, $c, void 0);
23742
23742
  m(this, Lt, null);
23743
23743
  m(this, dr, void 0);
23744
- m(this, mt, void 0);
23745
23744
  m(this, ft, void 0);
23745
+ m(this, St, void 0);
23746
23746
  var i, a;
23747
23747
  this.context = t;
23748
23748
  const {
23749
23749
  socket: r
23750
23750
  } = e;
23751
- this.mediaJoined = !1, f(this, Ke, r), f(this, cr, !1), f(this, j, new vO(t, r)), f(this, gt, n(this, j).events), f(this, dr, /* @__PURE__ */ new Set()), f(this, mt, /* @__PURE__ */ new Map()), f(this, Yi, !1), f(this, Qi, new wh(t.getValue("logger"))), f(this, ft, new ho(
23751
+ this.mediaJoined = !1, f(this, Ke, r), f(this, cr, !1), f(this, j, new vO(t, r)), f(this, mt, n(this, j).events), f(this, dr, /* @__PURE__ */ new Set()), f(this, ft, /* @__PURE__ */ new Map()), f(this, Yi, !1), f(this, Qi, new wh(t.getValue("logger"))), f(this, St, new ho(
23752
23752
  this.context,
23753
23753
  n(this, j).socketHandler.audioActivity.bind(n(this, j).socketHandler)
23754
23754
  )), this.e2ee = (a = (i = t.getValue("modules").e2ee) == null ? void 0 : i.enabled) != null ? a : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), f(this, $c, lp(
@@ -23790,7 +23790,7 @@ class ce {
23790
23790
  n(this, lr, gi).mediaJoined = t;
23791
23791
  }
23792
23792
  reset({ resetTransportQueue: t }) {
23793
- this.logger.info(`Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ${t}).`), n(this, j).closeAllProducers(), n(this, j).closeAllConsumers(), n(this, mt).clear(), n(this, dr).clear(), f(this, Lt, null), t && n(this, Qi).stop(), n(this, j).stopAllTransports(), n(this, j).reset(), t && f(this, Qi, new wh());
23793
+ this.logger.info(`Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ${t}).`), n(this, j).closeAllProducers(), n(this, j).closeAllConsumers(), n(this, ft).clear(), n(this, dr).clear(), f(this, Lt, null), t && n(this, Qi).stop(), n(this, j).stopAllTransports(), n(this, j).reset(), t && f(this, Qi, new wh());
23794
23794
  }
23795
23795
  joinRoom(a, o) {
23796
23796
  return u(this, arguments, function* (t, e, r = !1, i = {}) {
@@ -23836,13 +23836,13 @@ class ce {
23836
23836
  leaveRoom() {
23837
23837
  return u(this, null, function* () {
23838
23838
  var r;
23839
- (r = n(this, ft)) == null || r.stop(), n(this, j).stopAllTransports(), f(this, Yi, !1), n(this, lr, gi).mediaJoinAttempted = !1;
23839
+ (r = n(this, St)) == null || r.stop(), n(this, j).stopAllTransports(), f(this, Yi, !1), n(this, lr, gi).mediaJoinAttempted = !1;
23840
23840
  const t = {
23841
23841
  closeRoom: !1
23842
23842
  };
23843
23843
  try {
23844
23844
  n(this, Ke).sendMessage(
23845
- n(this, gt).leaveRoom,
23845
+ n(this, mt).leaveRoom,
23846
23846
  UR.toBinary(t)
23847
23847
  ) || this.logger.warn("MediaNodeClient.leaveRoom: media leave was not sent");
23848
23848
  } catch (i) {
@@ -23874,7 +23874,7 @@ class ce {
23874
23874
  _shareWebcam(t) {
23875
23875
  return u(this, null, function* () {
23876
23876
  var h, g, S, y;
23877
- const e = we.WEBCAM, r = I(this, tt, ot).call(this, e);
23877
+ const e = we.WEBCAM, r = I(this, tt, ct).call(this, e);
23878
23878
  if (r) {
23879
23879
  const E = yield r;
23880
23880
  if (n(this, j).producers.has(E)) {
@@ -23888,7 +23888,7 @@ class ce {
23888
23888
  const i = I(this, zl, dv).call(this, t), a = Oo(this.context, "disableSimulcast"), o = (g = (h = this.context) == null ? void 0 : h.getValue("overrides")) == null ? void 0 : g.simulcastConfig;
23889
23889
  a || o && o.disable || !((y = (S = this.context) == null ? void 0 : S.getValue("theme")) != null && y.isSimulcastEnabled) ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), i.encodings = dD(this.context, t), this.logger.info(`Simulcast encodings: ${JSON.stringify(i.encodings)}`));
23890
23890
  const d = () => {
23891
- this.logger.info("Disabling video due to the producer closure"), n(this, mt).delete(e);
23891
+ this.logger.info("Disabling video due to the producer closure"), n(this, ft).delete(e);
23892
23892
  }, l = n(this, j).createProducer(
23893
23893
  i,
23894
23894
  d
@@ -23906,7 +23906,7 @@ class ce {
23906
23906
  const { video: e, audio: r } = t;
23907
23907
  if (e === void 0)
23908
23908
  return;
23909
- const i = yield I(this, tt, ot).call(this, we.SCREENSHARE_VIDEO), a = yield I(this, tt, ot).call(this, we.SCREENSHARE_AUDIO), o = n(this, j).producers.get(i), c = n(this, j).producers.get(a), d = [];
23909
+ const i = yield I(this, tt, ct).call(this, we.SCREENSHARE_VIDEO), a = yield I(this, tt, ct).call(this, we.SCREENSHARE_AUDIO), o = n(this, j).producers.get(i), c = n(this, j).producers.get(a), d = [];
23910
23910
  if (o && !o.closed)
23911
23911
  d.push(o.replaceTrack({ track: e }));
23912
23912
  else {
@@ -23920,7 +23920,7 @@ class ce {
23920
23920
  },
23921
23921
  stopTracks: !1
23922
23922
  }, h = () => {
23923
- this.logger.info("Disabling screenShare due to the producer closure"), n(this, mt).delete(we.SCREENSHARE_VIDEO), n(this, mt).delete(we.SCREENSHARE_AUDIO);
23923
+ this.logger.info("Disabling screenShare due to the producer closure"), n(this, ft).delete(we.SCREENSHARE_VIDEO), n(this, ft).delete(we.SCREENSHARE_AUDIO);
23924
23924
  }, g = n(this, j).createProducer(
23925
23925
  l,
23926
23926
  h
@@ -23955,14 +23955,14 @@ class ce {
23955
23955
  return u(this, null, function* () {
23956
23956
  try {
23957
23957
  if (t === void 0)
23958
- throw new Rt("track undefined");
23959
- const e = I(this, tt, ot).call(this, we.MIC);
23958
+ throw new bt("track undefined");
23959
+ const e = I(this, tt, ct).call(this, we.MIC);
23960
23960
  if (e) {
23961
23961
  const o = yield e;
23962
23962
  if (n(this, j).producers.has(o)) {
23963
23963
  const c = n(this, j).producers.get(o);
23964
23964
  if (!c.closed) {
23965
- yield c.replaceTrack({ track: t }), yield this.resumeMic(), n(this, ft) && (n(this, ft).audioTrack = t, n(this, ft).producerId = o, n(this, ft).start(!0));
23965
+ yield c.replaceTrack({ track: t }), yield this.resumeMic(), n(this, St) && (n(this, St).audioTrack = t, n(this, St).producerId = o, n(this, St).start(!0));
23966
23966
  return;
23967
23967
  }
23968
23968
  yield n(this, j).closeProducer(o, { stopTrack: !1 });
@@ -23971,13 +23971,13 @@ class ce {
23971
23971
  return;
23972
23972
  }
23973
23973
  const r = I(this, Kl, cv).call(this, t), i = () => {
23974
- n(this, mt).delete(we.MIC);
23974
+ n(this, ft).delete(we.MIC);
23975
23975
  }, a = n(this, j).createProducer(
23976
23976
  r,
23977
23977
  i
23978
23978
  );
23979
23979
  I(this, Xi, po).call(this, we.MIC, a.then((o) => o.id)), yield a.then((o) => {
23980
- n(this, ft) && (n(this, ft).audioTrack = o.track, n(this, ft).producerId = o.id, n(this, ft).start());
23980
+ n(this, St) && (n(this, St).audioTrack = o.track, n(this, St).producerId = o.id, n(this, St).start());
23981
23981
  });
23982
23982
  } catch (e) {
23983
23983
  throw new R(e);
@@ -23987,7 +23987,7 @@ class ce {
23987
23987
  pauseMic() {
23988
23988
  return u(this, null, function* () {
23989
23989
  var i;
23990
- const t = yield I(this, tt, ot).call(this, we.MIC), e = n(this, j).producers.get(t);
23990
+ const t = yield I(this, tt, ct).call(this, we.MIC), e = n(this, j).producers.get(t);
23991
23991
  if (!e) {
23992
23992
  this.logger.error("pauseMic::could_not_find_mic_producer");
23993
23993
  return;
@@ -23996,20 +23996,20 @@ class ce {
23996
23996
  this.logger.info("pauseMic::mic_producer_already_paused");
23997
23997
  return;
23998
23998
  }
23999
- e.pause(), (i = n(this, ft)) == null || i.stop();
23999
+ e.pause(), (i = n(this, St)) == null || i.stop();
24000
24000
  const r = {
24001
24001
  producerId: e.id,
24002
24002
  pause: !0
24003
24003
  };
24004
24004
  n(this, Ke).sendMessage(
24005
- n(this, gt).toggleProducer,
24005
+ n(this, mt).toggleProducer,
24006
24006
  pd.toBinary(r)
24007
24007
  ), this.logger.info(`Paused mic producer ${e.id} of local peer ${this.peerId}. Remote peers will stop hearing this peer.`);
24008
24008
  });
24009
24009
  }
24010
24010
  pauseWebcam() {
24011
24011
  return u(this, null, function* () {
24012
- const t = yield I(this, tt, ot).call(this, we.WEBCAM), e = n(this, j).producers.get(t);
24012
+ const t = yield I(this, tt, ct).call(this, we.WEBCAM), e = n(this, j).producers.get(t);
24013
24013
  if (!e) {
24014
24014
  this.logger.error("pauseWebcam::could_not_find_webcam_producer");
24015
24015
  return;
@@ -24020,14 +24020,14 @@ class ce {
24020
24020
  pause: !0
24021
24021
  };
24022
24022
  n(this, Ke).sendMessage(
24023
- n(this, gt).toggleProducer,
24023
+ n(this, mt).toggleProducer,
24024
24024
  pd.toBinary(r)
24025
24025
  ), this.logger.info(`Paused webcam producer ${e.id} of local peer ${this.peerId}. Remote peers will stop seeing this peer.`);
24026
24026
  });
24027
24027
  }
24028
24028
  resumeMic() {
24029
24029
  return u(this, null, function* () {
24030
- const t = yield I(this, tt, ot).call(this, we.MIC), e = n(this, j).producers.get(t);
24030
+ const t = yield I(this, tt, ct).call(this, we.MIC), e = n(this, j).producers.get(t);
24031
24031
  if (!e) {
24032
24032
  this.logger.error("resumeMic::could_not_find_mic_producer");
24033
24033
  return;
@@ -24042,14 +24042,14 @@ class ce {
24042
24042
  pause: !1
24043
24043
  };
24044
24044
  n(this, Ke).sendMessage(
24045
- n(this, gt).toggleProducer,
24045
+ n(this, mt).toggleProducer,
24046
24046
  pd.toBinary(r)
24047
24047
  ), this.logger.info(`Resumed mic producer ${e.id} of local peer ${this.peerId}. Remote peers will start hearing this peer.`);
24048
24048
  });
24049
24049
  }
24050
24050
  resumeWebcam() {
24051
24051
  return u(this, arguments, function* (t = we.WEBCAM) {
24052
- const e = yield I(this, tt, ot).call(this, t), r = n(this, j).producers.get(e);
24052
+ const e = yield I(this, tt, ct).call(this, t), r = n(this, j).producers.get(e);
24053
24053
  if (!r) {
24054
24054
  this.logger.error("resumeWebcam::could_not_find_webcam_producer");
24055
24055
  return;
@@ -24064,29 +24064,29 @@ class ce {
24064
24064
  pause: !1
24065
24065
  };
24066
24066
  n(this, Ke).sendMessage(
24067
- n(this, gt).toggleProducer,
24067
+ n(this, mt).toggleProducer,
24068
24068
  pd.toBinary(i)
24069
24069
  ), this.logger.info(`Resumed webcam producer ${r.id} of local peer ${this.peerId}. Remote peers will start seeing this peer.`);
24070
24070
  });
24071
24071
  }
24072
24072
  disableWebcam() {
24073
24073
  return u(this, null, function* () {
24074
- const t = we.WEBCAM, e = yield I(this, tt, ot).call(this, t);
24074
+ const t = we.WEBCAM, e = yield I(this, tt, ct).call(this, t);
24075
24075
  I(this, Wl, av).call(this, t), e && (yield n(this, j).closeProducer(e));
24076
24076
  });
24077
24077
  }
24078
24078
  disableMic() {
24079
24079
  return u(this, null, function* () {
24080
24080
  var e;
24081
- const t = yield I(this, tt, ot).call(this, we.MIC);
24082
- t && (yield n(this, j).closeProducer(t)), (e = n(this, ft)) == null || e.stop(), n(this, mt).delete(we.MIC);
24081
+ const t = yield I(this, tt, ct).call(this, we.MIC);
24082
+ t && (yield n(this, j).closeProducer(t)), (e = n(this, St)) == null || e.stop(), n(this, ft).delete(we.MIC);
24083
24083
  });
24084
24084
  }
24085
24085
  disableScreenShare() {
24086
24086
  return u(this, null, function* () {
24087
24087
  this.logger.info("screen_sharing_stopped"), this.context.getValue("callstats").screenShareStop();
24088
- const t = yield I(this, tt, ot).call(this, we.SCREENSHARE_VIDEO), e = yield I(this, tt, ot).call(this, we.SCREENSHARE_AUDIO);
24089
- t && (yield n(this, j).closeProducer(t)), e && (yield n(this, j).closeProducer(e)), n(this, dr).clear(), n(this, mt).delete(we.SCREENSHARE_VIDEO), n(this, mt).delete(we.SCREENSHARE_AUDIO);
24088
+ const t = yield I(this, tt, ct).call(this, we.SCREENSHARE_VIDEO), e = yield I(this, tt, ct).call(this, we.SCREENSHARE_AUDIO);
24089
+ t && (yield n(this, j).closeProducer(t)), e && (yield n(this, j).closeProducer(e)), n(this, dr).clear(), n(this, ft).delete(we.SCREENSHARE_VIDEO), n(this, ft).delete(we.SCREENSHARE_AUDIO);
24090
24090
  });
24091
24091
  }
24092
24092
  muteSelf() {
@@ -24097,11 +24097,11 @@ class ce {
24097
24097
  resetVideoProducers(t, e) {
24098
24098
  return u(this, null, function* () {
24099
24099
  if (t) {
24100
- const r = yield I(this, tt, ot).call(this, we.WEBCAM);
24100
+ const r = yield I(this, tt, ct).call(this, we.WEBCAM);
24101
24101
  yield n(this, j).closeProducer(r, { stopTrack: !1 }), this.shareWebcam(t);
24102
24102
  }
24103
24103
  if (e) {
24104
- const r = yield I(this, tt, ot).call(this, we.SCREENSHARE_VIDEO);
24104
+ const r = yield I(this, tt, ct).call(this, we.SCREENSHARE_VIDEO);
24105
24105
  yield n(this, j).closeProducer(
24106
24106
  r,
24107
24107
  { stopTrack: !1 }
@@ -24166,7 +24166,7 @@ class ce {
24166
24166
  };
24167
24167
  try {
24168
24168
  yield n(this, Ke).sendMessagePromise(
24169
- n(this, gt).globalPinPeer,
24169
+ n(this, mt).globalPinPeer,
24170
24170
  ZR.toBinary(e)
24171
24171
  );
24172
24172
  } catch (r) {
@@ -24186,7 +24186,7 @@ class ce {
24186
24186
  handleSocketEvents() {
24187
24187
  return u(this, null, function* () {
24188
24188
  n(this, Ke).on(
24189
- n(this, gt).peerProducerCreateBroadcast,
24189
+ n(this, mt).peerProducerCreateBroadcast,
24190
24190
  ({ payload: t }) => {
24191
24191
  if (this.mediaJoined)
24192
24192
  try {
@@ -24198,7 +24198,7 @@ class ce {
24198
24198
  }
24199
24199
  }
24200
24200
  ), n(this, Ke).on(
24201
- n(this, gt).peerProducerToggleBroadcast,
24201
+ n(this, mt).peerProducerToggleBroadcast,
24202
24202
  ({ payload: t }) => {
24203
24203
  if (this.mediaJoined)
24204
24204
  try {
@@ -24241,7 +24241,7 @@ class ce {
24241
24241
  });
24242
24242
  }
24243
24243
  }
24244
- ), n(this, Ke).on(n(this, gt).peerLeaveBroadcast, (e) => u(this, [e], function* ({ payload: t }) {
24244
+ ), n(this, Ke).on(n(this, mt).peerLeaveBroadcast, (e) => u(this, [e], function* ({ payload: t }) {
24245
24245
  if (this.mediaJoined)
24246
24246
  try {
24247
24247
  const { participantId: r } = eh.fromBinary(t);
@@ -24252,7 +24252,7 @@ class ce {
24252
24252
  this.logger.error("error in peer left broadcast of remote peer", { error: r });
24253
24253
  }
24254
24254
  })), n(this, Ke).on(
24255
- n(this, gt).peerProducerCloseBroadcast,
24255
+ n(this, mt).peerProducerCloseBroadcast,
24256
24256
  ({ payload: t }) => {
24257
24257
  if (this.mediaJoined)
24258
24258
  try {
@@ -24271,7 +24271,7 @@ class ce {
24271
24271
  }
24272
24272
  }
24273
24273
  ), n(this, Ke).on(
24274
- n(this, gt).mediaRoomTerminationBroadcastResponse,
24274
+ n(this, mt).mediaRoomTerminationBroadcastResponse,
24275
24275
  () => {
24276
24276
  !this.mediaJoined && !n(this, cr) && !n(this, Yi) || (this.logger.warn(
24277
24277
  "media hub termination broadcast received, rejoining room"
@@ -24308,7 +24308,7 @@ class ce {
24308
24308
  });
24309
24309
  }
24310
24310
  }
24311
- Lc = new WeakMap(), Vc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), Hl = new WeakMap(), gt = new WeakMap(), cr = new WeakMap(), Yi = new WeakMap(), Qi = new WeakMap(), $c = new WeakMap(), Lt = new WeakMap(), dr = new WeakMap(), mt = new WeakMap(), ft = new WeakMap(), lr = new WeakSet(), gi = function() {
24311
+ Lc = new WeakMap(), Vc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), Hl = new WeakMap(), mt = new WeakMap(), cr = new WeakMap(), Yi = new WeakMap(), Qi = new WeakMap(), $c = new WeakMap(), Lt = new WeakMap(), dr = new WeakMap(), ft = new WeakMap(), St = new WeakMap(), lr = new WeakSet(), gi = function() {
24312
24312
  return this.context.getValue("connectionHandler");
24313
24313
  }, xc = new WeakSet(), Oh = function(t) {
24314
24314
  this.mediaJoined = !1, f(this, cr, !1), n(this, Ke).isConnected && this.peerId === t && this.context.getValue("peerSessionStore").emit(_.MEDIA_ROOM_JOIN_FAILED);
@@ -24419,12 +24419,12 @@ Lc = new WeakMap(), Vc = new WeakMap(), Ke = new WeakMap(), j = new WeakMap(), H
24419
24419
  }
24420
24420
  );
24421
24421
  });
24422
- }, tt = new WeakSet(), ot = function(t) {
24423
- return n(this, mt).get(t);
24422
+ }, tt = new WeakSet(), ct = function(t) {
24423
+ return n(this, ft).get(t);
24424
24424
  }, Xi = new WeakSet(), po = function(t, e) {
24425
- return n(this, mt).set(t, e);
24425
+ return n(this, ft).set(t, e);
24426
24426
  }, Wl = new WeakSet(), av = function(t) {
24427
- return n(this, mt).delete(t);
24427
+ return n(this, ft).delete(t);
24428
24428
  }, Jl = new WeakSet(), ov = function({
24429
24429
  participantId: t,
24430
24430
  producerState: e
@@ -24581,14 +24581,14 @@ var _O = Object.defineProperty, CO = Object.getOwnPropertyDescriptor, vn = (s, t
24581
24581
  for (var i = r > 1 ? void 0 : r ? CO(t, e) : t, a = s.length - 1, o; a >= 0; a--)
24582
24582
  (o = s[a]) && (i = (r ? o(t, e, i) : o(i)) || i);
24583
24583
  return r && i && _O(t, e, i), i;
24584
- }, Ra, es, Z, St, It, _m;
24584
+ }, Ra, es, Z, at, Pt, _m;
24585
24585
  const uv = (_m = class {
24586
24586
  /**
24587
24587
  * Use await SelfController.init(roomNodeClient) instead
24588
24588
  */
24589
24589
  constructor(s, t, e, r) {
24590
24590
  // eslint-disable-next-line class-methods-use-this
24591
- m(this, St);
24591
+ m(this, at);
24592
24592
  p(this, "self");
24593
24593
  p(this, "authToken");
24594
24594
  m(this, Ra, void 0);
@@ -24678,7 +24678,7 @@ const uv = (_m = class {
24678
24678
  if (e.canProduceAudio === W.Allowed && r)
24679
24679
  if ((s == null ? void 0 : s.readyState) === "live")
24680
24680
  try {
24681
- yield n(this, St, It).shareMic(s), this.self.audioEnabled || n(this, St, It).pauseMic();
24681
+ yield n(this, at, Pt).shareMic(s), this.self.audioEnabled || n(this, at, Pt).pauseMic();
24682
24682
  } catch (d) {
24683
24683
  this.self.disableAudio();
24684
24684
  }
@@ -24687,7 +24687,7 @@ const uv = (_m = class {
24687
24687
  if (e.canProduceVideo === W.Allowed && i)
24688
24688
  if ((t == null ? void 0 : t.readyState) === "live")
24689
24689
  try {
24690
- yield n(this, St, It).shareWebcam(t), this.self.videoEnabled || n(this, St, It).pauseWebcam();
24690
+ yield n(this, at, Pt).shareWebcam(t), this.self.videoEnabled || n(this, at, Pt).pauseWebcam();
24691
24691
  } catch (d) {
24692
24692
  this.self.disableVideo();
24693
24693
  }
@@ -24697,7 +24697,7 @@ const uv = (_m = class {
24697
24697
  const d = o.video, l = o.audio;
24698
24698
  if ((d == null ? void 0 : d.readyState) === "live")
24699
24699
  try {
24700
- yield (c = n(this, St, It)) == null ? void 0 : c.shareScreen({
24700
+ yield (c = n(this, at, Pt)) == null ? void 0 : c.shareScreen({
24701
24701
  video: d,
24702
24702
  audio: (l == null ? void 0 : l.readyState) === "live" ? l : void 0
24703
24703
  });
@@ -24739,7 +24739,7 @@ const uv = (_m = class {
24739
24739
  return u(this, null, function* () {
24740
24740
  var r;
24741
24741
  const { wasSocketJoinAttempted: t, wasMediaJoinAttempted: e } = s;
24742
- n(this, Z).getValue("callstats").callEnded(), t || e ? (this.logger.info(`Resetting Self post reconnect. Peer has earlier tried joining the ${e ? "media room" : "socket room only"}. Not closing transports.`), yield this.joinRoom({ reconnected: !0, joinAttempts: s })) : (this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), (r = n(this, St, It)) == null || r.reset({ resetTransportQueue: !0 }));
24742
+ n(this, Z).getValue("callstats").callEnded(), t || e ? (this.logger.info(`Resetting Self post reconnect. Peer has earlier tried joining the ${e ? "media room" : "socket room only"}. Not closing transports.`), yield this.joinRoom({ reconnected: !0, joinAttempts: s })) : (this.logger.info("Resetting Self post reconnect. User never joined the room so doing full reset."), (r = n(this, at, Pt)) == null || r.reset({ resetTransportQueue: !0 }));
24743
24743
  });
24744
24744
  }
24745
24745
  setupEvents() {
@@ -24831,27 +24831,27 @@ const uv = (_m = class {
24831
24831
  reconnected: s = !1,
24832
24832
  joinAttempts: t
24833
24833
  } = {}) {
24834
- var e;
24834
+ var e, r;
24835
24835
  try {
24836
24836
  this.logger.info("Local peer is joining socket room.");
24837
- const { peer: r } = yield this.joinSocketRoomWithRetry();
24837
+ const { peer: i } = yield this.joinSocketRoomWithRetry();
24838
24838
  this.logger.info("Local peer has joined socket room."), n(this, es).socket.flush();
24839
- const i = fp(r.stageType);
24840
- if (n(this, Z).setValue("stageStatus", i, !1), r.waitlisted) {
24841
- this.logger.info("Peer was waitlisted. Skipped joining media room."), this.waitlistedHandler();
24839
+ const a = fp(i.stageType);
24840
+ if (n(this, Z).setValue("stageStatus", a, !1), i.waitlisted) {
24841
+ this.logger.info("Peer was waitlisted. Skipped joining media room."), s && (this.logger.info("Peer reconnected while waitlisted. Resetting media node client."), (e = n(this, at, Pt)) == null || e.reset({ resetTransportQueue: !0 })), this.waitlistedHandler();
24842
24842
  return;
24843
24843
  }
24844
- } catch (r) {
24845
- throw this.logger.error("SelfController.joinRoom: socket join failed", { error: r }), new R("Check the network and try again.", "0002");
24844
+ } catch (i) {
24845
+ throw this.logger.error("SelfController.joinRoom: socket join failed", { error: i }), new R("Check the network and try again.", "0002");
24846
24846
  }
24847
24847
  if (this.viewType === ms.Livestream && (t != null && t.wasSocketJoinAttempted) && !t.wasMediaJoinAttempted && n(this, Z).getValue("stageStatus") !== "ON_STAGE") {
24848
- this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (e = n(this, St, It)) == null || e.reset({ resetTransportQueue: !0 }), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s }), n(this, Z).notify("stageStatus");
24848
+ this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (r = n(this, at, Pt)) == null || r.reset({ resetTransportQueue: !0 }), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: s }), n(this, Z).notify("stageStatus");
24849
24849
  return;
24850
24850
  }
24851
24851
  try {
24852
24852
  this.logger.info("Local peer is joining media room."), yield this.joinMediaRoom(s), this.logger.info("Local peer has joined media room."), n(this, Z).notify("stageStatus");
24853
- } catch (r) {
24854
- throw this.logger.error("SelfController.joinRoom: media room join failed", { error: r }), r instanceof Or && r.message === "ice connection failed" ? new R(
24853
+ } catch (i) {
24854
+ throw this.logger.error("SelfController.joinRoom: media room join failed", { error: i }), i instanceof Or && i.message === "ice connection failed" ? new R(
24855
24855
  "A firewall or network restriction may be blocking the connection.",
24856
24856
  "0014"
24857
24857
  ) : new R("Check the network and try again.", "0014");
@@ -24894,7 +24894,7 @@ const uv = (_m = class {
24894
24894
  peerId: t
24895
24895
  });
24896
24896
  }
24897
- const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (a = n(this, St, It)) == null ? void 0 : a.joinRoom(
24897
+ const { canProduceAudio: c, canProduceVideo: d, canProduceScreenshare: l } = this.self.permissions, { roomJoined: h, error: g } = (o = yield (a = n(this, at, Pt)) == null ? void 0 : a.joinRoom(
24898
24898
  this.self.name,
24899
24899
  r,
24900
24900
  s,
@@ -24915,7 +24915,7 @@ const uv = (_m = class {
24915
24915
  leaveMediaRoom(s) {
24916
24916
  return u(this, null, function* () {
24917
24917
  const t = n(this, Z).getValue("viewType");
24918
- s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === ms.Webinar) && n(this, St, It) && (n(this, St, It).mediaJoined && s !== "disconnected" && (yield n(this, St, It).leaveRoom()), !(s === "stageLeft" && t === ms.Livestream) && (n(this, St, It).mediaJoined = !1));
24918
+ s !== "connected-meeting" && (yield this.cleanupSelf()), !(s === "stageLeft" && t === ms.Webinar) && n(this, at, Pt) && (n(this, at, Pt).mediaJoined && s !== "disconnected" && (yield n(this, at, Pt).leaveRoom()), !(s === "stageLeft" && t === ms.Livestream) && (n(this, at, Pt).mediaJoined = !1));
24919
24919
  });
24920
24920
  }
24921
24921
  cleanupSelf() {
@@ -24923,7 +24923,7 @@ const uv = (_m = class {
24923
24923
  yield this.self.disableAudio(), yield this.self.disableVideo(), yield this.self.disableScreenShare(), this.self.cleanUpTracks(), this.self.destructMediaHandler(), navigator.isReactNative || this.self.removeDocumentEventListeners();
24924
24924
  });
24925
24925
  }
24926
- }, Ra = new WeakMap(), es = new WeakMap(), Z = new WeakMap(), St = new WeakSet(), It = function() {
24926
+ }, Ra = new WeakMap(), es = new WeakMap(), Z = new WeakMap(), at = new WeakSet(), Pt = function() {
24927
24927
  return n(this, Z).getValue("roomNodeClient");
24928
24928
  }, _m);
24929
24929
  let ui = uv;
@@ -25502,32 +25502,32 @@ Vt = new WeakMap();
25502
25502
  DO([
25503
25503
  P.trace("RoomSocketHandler.joinRoom")
25504
25504
  ], hv.prototype, "joinRoom", 1);
25505
- var Ct;
25505
+ var Rt;
25506
25506
  class OO {
25507
25507
  constructor(t) {
25508
- m(this, Ct, void 0);
25509
- f(this, Ct, t);
25508
+ m(this, Rt, void 0);
25509
+ f(this, Rt, t);
25510
25510
  }
25511
25511
  getStageRequests() {
25512
25512
  return u(this, null, function* () {
25513
- const { payload: t } = yield n(this, Ct).sendMessagePromise(
25513
+ const { payload: t } = yield n(this, Rt).sendMessagePromise(
25514
25514
  x.getStageRequests
25515
25515
  );
25516
25516
  return t ? xu.fromBinary(t) : { stageRequests: [] };
25517
25517
  });
25518
25518
  }
25519
25519
  requestAccess() {
25520
- n(this, Ct).sendMessage(x.requestStageAccess);
25520
+ n(this, Rt).sendMessage(x.requestStageAccess);
25521
25521
  }
25522
25522
  cancelRequestAccess() {
25523
- n(this, Ct).sendMessage(x.cancelStageRequest);
25523
+ n(this, Rt).sendMessage(x.cancelStageRequest);
25524
25524
  }
25525
25525
  grantAccess(t) {
25526
25526
  return u(this, null, function* () {
25527
25527
  const e = {
25528
25528
  userIds: t
25529
25529
  };
25530
- n(this, Ct).sendMessage(
25530
+ n(this, Rt).sendMessage(
25531
25531
  x.grantStageAccess,
25532
25532
  R0.toBinary(e)
25533
25533
  );
@@ -25538,14 +25538,14 @@ class OO {
25538
25538
  const e = {
25539
25539
  userIds: t
25540
25540
  };
25541
- n(this, Ct).sendMessage(
25541
+ n(this, Rt).sendMessage(
25542
25542
  x.denyStageAccess,
25543
25543
  k0.toBinary(e)
25544
25544
  );
25545
25545
  });
25546
25546
  }
25547
25547
  joinStage() {
25548
- return n(this, Ct).sendMessagePromise(
25548
+ return n(this, Rt).sendMessagePromise(
25549
25549
  x.joinStage,
25550
25550
  void 0,
25551
25551
  void 0,
@@ -25556,7 +25556,7 @@ class OO {
25556
25556
  const e = {
25557
25557
  userIds: [t]
25558
25558
  };
25559
- return n(this, Ct).sendMessagePromise(
25559
+ return n(this, Rt).sendMessagePromise(
25560
25560
  x.leaveStage,
25561
25561
  qg.toBinary(e),
25562
25562
  void 0,
@@ -25567,7 +25567,7 @@ class OO {
25567
25567
  const e = {
25568
25568
  userIds: t
25569
25569
  };
25570
- return n(this, Ct).sendMessagePromise(
25570
+ return n(this, Rt).sendMessagePromise(
25571
25571
  x.leaveStage,
25572
25572
  qg.toBinary(e)
25573
25573
  );
@@ -25599,7 +25599,7 @@ class OO {
25599
25599
  break;
25600
25600
  }
25601
25601
  }
25602
- n(this, Ct).on(t, ({ payload: i, id: a }) => {
25602
+ n(this, Rt).on(t, ({ payload: i, id: a }) => {
25603
25603
  if (!i || !r)
25604
25604
  return e(void 0, a);
25605
25605
  const o = r(i);
@@ -25608,7 +25608,7 @@ class OO {
25608
25608
  }
25609
25609
  getPeerInfo(t) {
25610
25610
  return u(this, null, function* () {
25611
- const e = yield n(this, Ct).sendMessagePromise(
25611
+ const e = yield n(this, Rt).sendMessagePromise(
25612
25612
  x.getPeerInfo,
25613
25613
  Xf.toBinary({ peerId: t })
25614
25614
  );
@@ -25616,7 +25616,7 @@ class OO {
25616
25616
  });
25617
25617
  }
25618
25618
  }
25619
- Ct = new WeakMap();
25619
+ Rt = new WeakMap();
25620
25620
  var Yr, ka;
25621
25621
  class NO {
25622
25622
  constructor(t, e) {
@@ -26322,7 +26322,7 @@ var QO = Object.defineProperty, XO = Object.getOwnPropertyDescriptor, Eu = (s, t
26322
26322
  return r && i && QO(t, e, i), i;
26323
26323
  };
26324
26324
  const am = 65535, ZO = 3, e1 = 15e3, t1 = 8e3, s1 = 50, r1 = 1e3, i1 = 1e4;
26325
- var Ms, Ia, _e, st, ct, Qr, Xr, Zi, en, Zr, Ds, Os, ei, tn, vt, ti, Tt, Ue, jc, Bh, Yl, Iv, Ql, Av, Xl, Mv, qc, Fh, Gc, jh, sn, mo, Zl, ju, Dv, eu, Ov, Wc, qh, Jc, Gh, Kc, Wh, tu, Nv, zc, Jh, Yc, Kh;
26325
+ var Ms, Ia, _e, st, dt, Qr, Xr, Zi, en, Zr, Ds, Os, ei, tn, vt, ti, Tt, Ue, jc, Bh, Yl, Iv, Ql, Av, Xl, Mv, qc, Fh, Gc, jh, sn, mo, Zl, ju, Dv, eu, Ov, Wc, qh, Jc, Gh, Kc, Wh, tu, Nv, zc, Jh, Yc, Kh;
26326
26326
  const kv = (ju = class {
26327
26327
  constructor(s, {
26328
26328
  peerId: t,
@@ -26380,10 +26380,10 @@ const kv = (ju = class {
26380
26380
  })), this.handleSocketConnectionEvents();
26381
26381
  }
26382
26382
  get joinAttempted() {
26383
- return n(this, st, ct).socketJoinAttempted;
26383
+ return n(this, st, dt).socketJoinAttempted;
26384
26384
  }
26385
26385
  set joinAttempted(s) {
26386
- n(this, st, ct).socketJoinAttempted = s;
26386
+ n(this, st, dt).socketJoinAttempted = s;
26387
26387
  }
26388
26388
  /**
26389
26389
  * @access private
@@ -26425,7 +26425,7 @@ const kv = (ju = class {
26425
26425
  try {
26426
26426
  if (yield n(this, _e).connect(), !n(this, Tt) || s !== n(this, vt))
26427
26427
  throw new Error("Socket connection was canceled");
26428
- I(this, Gc, jh).call(this, this.peerId), (t = n(this, Ds)) != null || f(this, Ds, this.peerId), n(this, st, ct).socketState = {
26428
+ I(this, Gc, jh).call(this, this.peerId), (t = n(this, Ds)) != null || f(this, Ds, this.peerId), n(this, st, dt).socketState = {
26429
26429
  state: "connected",
26430
26430
  reconnected: !1,
26431
26431
  reconnectionAttempt: void 0
@@ -26436,7 +26436,7 @@ const kv = (ju = class {
26436
26436
  });
26437
26437
  }
26438
26438
  disconnect() {
26439
- f(this, vt, n(this, vt) + 1), f(this, Tt, !1), I(this, Wc, qh).call(this), I(this, qc, Fh).call(this), f(this, Ds, void 0), n(this, _e).disconnect(), n(this, st, ct).socketState = {
26439
+ f(this, vt, n(this, vt) + 1), f(this, Tt, !1), I(this, Wc, qh).call(this), I(this, qc, Fh).call(this), f(this, Ds, void 0), n(this, _e).disconnect(), n(this, st, dt).socketState = {
26440
26440
  state: "disconnected",
26441
26441
  reconnected: !1,
26442
26442
  reconnectionAttempt: void 0
@@ -26548,15 +26548,15 @@ const kv = (ju = class {
26548
26548
  handleSocketConnectionEvents() {
26549
26549
  this.onStateEvent("connected", () => u(this, null, function* () {
26550
26550
  var s;
26551
- this.logger.info(`Websocket connected with URL: ${n(this, sn, mo)}`), (s = n(this, Ds)) != null || f(this, Ds, this.peerId), n(this, st, ct).updateSocketConnectionState("connected");
26551
+ this.logger.info(`Websocket connected with URL: ${n(this, sn, mo)}`), (s = n(this, Ds)) != null || f(this, Ds, this.peerId), n(this, st, dt).updateSocketConnectionState("connected");
26552
26552
  })), this.onStateEvent("disconnected", ({ code: s, reason: t }) => {
26553
- !n(this, Tt) || n(this, ti) === n(this, vt) || (this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t } }), n(this, st, ct).updateSocketConnectionState("disconnected"), n(this, Ue).getValue("peerSessionStore").emit(
26553
+ !n(this, Tt) || n(this, ti) === n(this, vt) || (this.logger.info("SocketService::Disconnected from socket-edge", { error: { code: s, reason: t } }), n(this, st, dt).updateSocketConnectionState("disconnected"), n(this, Ue).getValue("peerSessionStore").emit(
26554
26554
  _.SOCKET_SERVICE_DISCONNECTED,
26555
- { joinAttempted: n(this, st, ct).joinAttempted }
26555
+ { joinAttempted: n(this, st, dt).joinAttempted }
26556
26556
  ), I(this, Kc, Wh).call(this, n(this, vt)));
26557
26557
  });
26558
26558
  }
26559
- }, Ms = new WeakMap(), Ia = new WeakMap(), _e = new WeakMap(), st = new WeakSet(), ct = function() {
26559
+ }, Ms = new WeakMap(), Ia = new WeakMap(), _e = new WeakMap(), st = new WeakSet(), dt = function() {
26560
26560
  return n(this, Ue).getValue("connectionHandler");
26561
26561
  }, Qr = new WeakMap(), Xr = new WeakMap(), Zi = new WeakMap(), en = new WeakMap(), Zr = new WeakMap(), Ds = new WeakMap(), Os = new WeakMap(), ei = new WeakMap(), tn = new WeakMap(), vt = new WeakMap(), ti = new WeakMap(), Tt = new WeakMap(), Ue = new WeakMap(), jc = new WeakSet(), Bh = function(s) {
26562
26562
  let t = up({
@@ -26651,9 +26651,9 @@ const kv = (ju = class {
26651
26651
  var s;
26652
26652
  n(this, ei) !== void 0 && (n(this, Os).clearTimeout(n(this, ei)), f(this, ei, void 0)), (s = n(this, tn)) == null || s.call(this), f(this, tn, void 0);
26653
26653
  }, Jc = new WeakSet(), Gh = function(s, t) {
26654
- !n(this, Tt) || s !== n(this, vt) || (t && this.logger.error("SocketService::Reconnect loop failed", { error: t }), f(this, Tt, !1), I(this, qc, Fh).call(this), f(this, Ds, void 0), n(this, st, ct).updateSocketConnectionState("failed"), n(this, Ue).getValue("peerSessionStore").emit(_.SOCKET_SERVICE_FAILED));
26654
+ !n(this, Tt) || s !== n(this, vt) || (t && this.logger.error("SocketService::Reconnect loop failed", { error: t }), f(this, Tt, !1), I(this, qc, Fh).call(this), f(this, Ds, void 0), n(this, st, dt).updateSocketConnectionState("failed"), n(this, Ue).getValue("peerSessionStore").emit(_.SOCKET_SERVICE_FAILED));
26655
26655
  }, Kc = new WeakSet(), Wh = function(s) {
26656
- !n(this, Tt) || n(this, ti) === s || (f(this, ti, s), n(this, st, ct).updateSocketConnectionState("reconnecting"), I(this, tu, Nv).call(this, s).catch(
26656
+ !n(this, Tt) || n(this, ti) === s || (f(this, ti, s), n(this, st, dt).updateSocketConnectionState("reconnecting"), I(this, tu, Nv).call(this, s).catch(
26657
26657
  (t) => I(this, Jc, Gh).call(this, s, t)
26658
26658
  ));
26659
26659
  }, tu = new WeakSet(), Nv = function(s) {
@@ -26664,17 +26664,17 @@ const kv = (ju = class {
26664
26664
  return;
26665
26665
  this.updateURL(ln()), this.logger.info("SocketService::Attempting to reconnect to socket-edge", {
26666
26666
  socket: { retryAttempt: t }
26667
- }), n(this, st, ct).updateSocketConnectionState("reconnectAttempt", t);
26667
+ }), n(this, st, dt).updateSocketConnectionState("reconnectAttempt", t);
26668
26668
  try {
26669
26669
  if (yield n(this, _e).connect(!0), !n(this, Tt) || s !== n(this, vt))
26670
26670
  return;
26671
26671
  if (!this.isConnected)
26672
26672
  throw new Error("Reconnect failed");
26673
- I(this, Gc, jh).call(this, this.peerId), f(this, Ds, this.peerId), n(this, st, ct).updateSocketConnectionState("reconnected"), n(this, Ue).getValue("peerSessionStore").emit(
26673
+ I(this, Gc, jh).call(this, this.peerId), f(this, Ds, this.peerId), n(this, st, dt).updateSocketConnectionState("reconnected"), n(this, Ue).getValue("peerSessionStore").emit(
26674
26674
  _.SOCKET_SERVICE_RECONNECTED,
26675
26675
  {
26676
- wasSocketJoinAttempted: n(this, st, ct).socketJoinAttempted,
26677
- wasMediaJoinAttempted: n(this, st, ct).mediaJoinAttempted
26676
+ wasSocketJoinAttempted: n(this, st, dt).socketJoinAttempted,
26677
+ wasMediaJoinAttempted: n(this, st, dt).mediaJoinAttempted
26678
26678
  }
26679
26679
  );
26680
26680
  return;
@@ -26687,7 +26687,7 @@ const kv = (ju = class {
26687
26687
  error: e,
26688
26688
  socket: { retryAttempt: t }
26689
26689
  }
26690
- ), n(this, st, ct).updateSocketConnectionState(
26690
+ ), n(this, st, dt).updateSocketConnectionState(
26691
26691
  "reconnectFailure",
26692
26692
  t
26693
26693
  );
@@ -27554,7 +27554,7 @@ let oi = (Rm = class {
27554
27554
  })
27555
27555
  });
27556
27556
  const h = yield wu.init(c), g = new oi(c, h);
27557
- return c.setValue("meeting", g), g;
27557
+ return c.setValue("meeting", g), l.info(`Meeting view type: ${g.meta.viewType}`), g;
27558
27558
  });
27559
27559
  }
27560
27560
  /**
@@ -27571,7 +27571,7 @@ let oi = (Rm = class {
27571
27571
  video: !0
27572
27572
  };
27573
27573
  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", AC({ baseURI: i.baseURI })), a.setValue("defaults", c), a.setValue("onError", e.onError || (() => {
27574
- })), a.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.4-staging.2"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new m1()), a;
27574
+ })), a.setValue("cachedUserDetails", Vs(e.cachedUserDetails)), a.setValue("sdkVersion", "2.0.4-staging.4"), (l = e.modules) != null && l.experimentalAudioPlayback && a.setValue("audioPlayback", new m1()), a;
27575
27575
  }
27576
27576
  join() {
27577
27577
  return u(this, null, function* () {
@@ -27691,7 +27691,7 @@ let oi = (Rm = class {
27691
27691
  }
27692
27692
  }, Le = new WeakMap(), an = new WeakMap(), Rm);
27693
27693
  _u([
27694
- at("0002"),
27694
+ ot("0002"),
27695
27695
  Pr.executeWithLock({
27696
27696
  methodName: "meeting.join",
27697
27697
  lockName: "Client.join",
@@ -27699,10 +27699,10 @@ _u([
27699
27699
  })
27700
27700
  ], oi.prototype, "join", 1);
27701
27701
  _u([
27702
- at("0003")
27702
+ ot("0003")
27703
27703
  ], oi.prototype, "leave", 1);
27704
27704
  _u([
27705
- at("0001"),
27705
+ ot("0001"),
27706
27706
  Pr.executeWithLock({
27707
27707
  methodName: "Client.init",
27708
27708
  lockName: "Client.init",
@@ -27710,7 +27710,7 @@ _u([
27710
27710
  })
27711
27711
  ], oi, "init", 1);
27712
27712
  oi = _u([
27713
- at("0000")
27713
+ ot("0000")
27714
27714
  ], oi);
27715
27715
  const v1 = oi;
27716
27716
  export {