@cloudflare/realtimekit 2.0.5-staging.2 → 2.1.0-staging.1

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.es5.js CHANGED
@@ -3,7 +3,7 @@ import tf from "bowser";
3
3
  import { MessageType as A, PbLong as Xo, typeofJsonValue as $m } from "@protobuf-ts/runtime";
4
4
  import * as Uu from "worker-timers";
5
5
  import * as Nn from "sdp-transform";
6
- var km = ["chat", "connectedMeetings", "plugins", "polls", "media"], Tm = ["id"], wm = ["meetingId"], ee, Gn, Je, ya, nl, to, Jn, il, Cc, xi, ea, Eo, an, ta, Kn, ka, ro, zn, no, io, sn, ra, It, Qn, Er, ao, so, Yn, tr, Ea, un, ai, Rc, Co, Ro, _o, Ta, na, ia, aa, qt, Ne, sa, oa, Dt, Xn, mn, Zn, _c, ot, oo, cn, xn, Cr, Ac, uo, Ic, Mc, ke, co, ei, ua, ti, bt, Wt, ur, on, je, _r, si, ri, Oc, Dc, lo, Lc, Nc, Vc, ca, ut, la, $e, Rr, Ve, da, be, wa, ba, ho, El, ha, Gt, Z, xe, Xl, cr, Pa, me, ze, yn, pn, oi, ui, dn, xt, lr, vn, ci, lt, kn, dt, Ae, po, al, sl, $c, Ao, Io, ii, ol, ul, vo, $o, fo, cl, go, mo, de, _e, ni;
6
+ var km = ["chat", "connectedMeetings", "plugins", "polls", "media"], Tm = ["id"], wm = ["meetingId"], ee, Gn, Je, ya, nl, to, Jn, il, Cc, xi, ea, Eo, an, ta, Kn, ka, ro, zn, no, io, sn, ra, It, Qn, Er, ao, so, Yn, tr, Ea, un, ai, Rc, Co, Ro, _o, Ta, na, ia, aa, qt, Ne, sa, oa, Dt, Xn, mn, Zn, _c, ot, oo, cn, xn, Cr, Ac, uo, Ic, Mc, ke, co, ei, ua, ti, bt, Wt, ur, on, je, _r, si, ri, Oc, Dc, lo, Lc, Nc, Vc, ca, ut, la, $e, Rr, Ve, da, be, wa, ba, ho, El, ha, Gt, x, xe, Xl, cr, Pa, me, ze, yn, pn, oi, ui, dn, xt, lr, vn, ci, lt, kn, dt, Ae, po, al, sl, $c, Ao, Io, ii, ol, ul, vo, $o, fo, cl, go, mo, de, _e, ni;
7
7
  function Wh(s, r) {
8
8
  if (s == null)
9
9
  return {};
@@ -218,25 +218,25 @@ function h() {
218
218
  function i(f, g, k, y) {
219
219
  var S = g && g.prototype instanceof o ? g : o, T = Object.create(S.prototype);
220
220
  return Kr(T, "_invoke", function(E, I, M) {
221
- var _, O, L, q = 0, X = M || [], Y = !1, H = { p: 0, n: 0, v: s, a: J, f: J.bind(s, 4), d: function(U, x) {
222
- return _ = U, O = 0, L = s, H.n = x, a;
221
+ var _, O, L, B = 0, X = M || [], Z = !1, W = { p: 0, n: 0, v: s, a: K, f: K.bind(s, 4), d: function(U, J) {
222
+ return _ = U, O = 0, L = s, W.n = J, a;
223
223
  } };
224
- function J(N, U) {
225
- for (O = N, L = U, r = 0; !Y && q && !x && r < X.length; r++) {
226
- var x, le = X[r], Re = H.p, pe = le[2];
227
- N > 3 ? (x = pe === U) && (L = le[(O = le[4]) ? 5 : (O = 3, 3)], le[4] = le[5] = s) : le[0] <= Re && ((x = N < 2 && Re < le[1]) ? (O = 0, H.v = U, H.n = le[1]) : Re < pe && (x = N < 3 || le[0] > U || U > pe) && (le[4] = N, le[5] = U, H.n = pe, O = 0));
224
+ function K(N, U) {
225
+ for (O = N, L = U, r = 0; !Z && B && !J && r < X.length; r++) {
226
+ var J, se = X[r], Re = W.p, pe = se[2];
227
+ N > 3 ? (J = pe === U) && (L = se[(O = se[4]) ? 5 : (O = 3, 3)], se[4] = se[5] = s) : se[0] <= Re && ((J = N < 2 && Re < se[1]) ? (O = 0, W.v = U, W.n = se[1]) : Re < pe && (J = N < 3 || se[0] > U || U > pe) && (se[4] = N, se[5] = U, W.n = pe, O = 0));
228
228
  }
229
- if (x || N > 1)
229
+ if (J || N > 1)
230
230
  return a;
231
- throw Y = !0, U;
231
+ throw Z = !0, U;
232
232
  }
233
- return function(N, U, x) {
234
- if (q > 1)
233
+ return function(N, U, J) {
234
+ if (B > 1)
235
235
  throw TypeError("Generator is already running");
236
- for (Y && U === 1 && J(U, x), O = U, L = x; (r = O < 2 ? s : L) || !Y; ) {
237
- _ || (O ? O < 3 ? (O > 1 && (H.n = -1), J(O, L)) : H.n = L : H.v = L);
236
+ for (Z && U === 1 && K(U, J), O = U, L = J; (r = O < 2 ? s : L) || !Z; ) {
237
+ _ || (O ? O < 3 ? (O > 1 && (W.n = -1), K(O, L)) : W.n = L : W.v = L);
238
238
  try {
239
- if (q = 2, _) {
239
+ if (B = 2, _) {
240
240
  if (O || (N = "next"), r = _[N]) {
241
241
  if (!(r = r.call(_, L)))
242
242
  throw TypeError("iterator result is not an object");
@@ -246,15 +246,15 @@ function h() {
246
246
  } else
247
247
  O === 1 && (r = _.return) && r.call(_), O < 2 && (L = TypeError("The iterator does not provide a '" + N + "' method"), O = 1);
248
248
  _ = s;
249
- } else if ((r = (Y = H.n < 0) ? L : E.call(I, H)) !== a)
249
+ } else if ((r = (Z = W.n < 0) ? L : E.call(I, W)) !== a)
250
250
  break;
251
- } catch (le) {
252
- _ = s, O = 1, L = le;
251
+ } catch (se) {
252
+ _ = s, O = 1, L = se;
253
253
  } finally {
254
- q = 1;
254
+ B = 1;
255
255
  }
256
256
  }
257
- return { value: r, done: Y };
257
+ return { value: r, done: Z };
258
258
  };
259
259
  }(f, k, y), !0), T;
260
260
  }
@@ -1147,66 +1147,66 @@ function mf(s, r, e, t) {
1147
1147
  else
1148
1148
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + ye(s));
1149
1149
  }
1150
- var oe;
1150
+ var ue;
1151
1151
  (function(s) {
1152
1152
  s[s.MAJOR_EVENT = 0] = "MAJOR_EVENT", s[s.MINOR_EVENT = 1] = "MINOR_EVENT";
1153
- })(oe || (oe = {}));
1154
- var W;
1153
+ })(ue || (ue = {}));
1154
+ var q;
1155
1155
  (function(s) {
1156
1156
  s.PRECALL_TEST_BEGIN = "precall_begin", s.PRECALL_TEST_COMPLETE = "precall_end", s.CALL_JOIN_BEGIN = "call_join", s.NET_QUALITY_TEST_BEGIN = "net_quality_test_begin", s.NET_QUALITY_TEST_END = "net_quality_test_end", s.WEBSOCKET_CONNECTED = "websocket_connected", s.TRANSPORT_CONNECTED = "transport_connected", s.AUDIO_ON = "audio_on", s.AUDIO_OFF = "audio_off", s.VIDEO_ON = "video_on", s.VIDEO_OFF = "video_off", s.PARTICIPANT_ROLE = "participant_role", s.PING_STAT = "ping_stat", s.DISCONNECT = "disconnect", s.RECONNECT_ATTEMPT = "reconnect_attempt", s.SCREENSHARE_START_REQUESTED = "screenshare_start_requested", s.SCREENSHARE_STARTED = "screenshare_started", s.SCREENSHARE_STOPPED = "screenshare_stopped", s.TAB_CHANGE = "tab_change", s.BROWSER_BACKGROUNDED = "browser_backgrounded", s.BROWSER_FOREGROUNDED = "browser_foregrounded", s.DOMINANT_SPEAKER = "dominant_speaker", s.AUDIO_DEVICES_UPDATES = "audio_devices_updates", s.VIDEO_DEVICES_UPDATES = "video_devices_updates", s.SPEAKER_DEVICES_UPDATES = "speaker_devices_updates", s.SELECTED_MICROHPONE_UPDATE = "selected_microphone_update", s.SELECTED_CAMERA_UPDATE = "selected_camera_update", s.SELECTED_SPEAKER_UPDATE = "selected_speaker_update", s.EXPECTED_VIDEO_RESOLUTION = "expected_video_resolution", s.EXPECTED_SCREENSHARE_RESOLUTION = "expected_screenshare_resolution", s.MEDIA_PERMISSION = "media_permission", s.LEGACY_SWITCH = "legacy_switch", s.AUDIO_PLAY_FAILED = "audio_play_failed", s.VIDEO_PLAY_FAILED = "video_play_failed", s.AUDIO_TRACK_MUTED = "audio_track_muted", s.VIDEO_TRACK_MUTED = "video_track_muted", s.IVS_PLAYER_REBUFFERING = "ivs_player_rebuffering", s.IVS_PLAYER_AUDIO_BLOCKED = "ivs_player_audio_blocked", s.IVS_PLAYER_PLAYBACK_BLOCKED = "ivs_player_playback_blocked", s.IVS_PLAYER_ERROR = "ivs_player_error", s.IVS_PLAYER_RECOVERABLE_ERROR = "ivs_player_recoverable_error", s.IVS_PLAYER_WORKER_ERROR = "ivs_player_worker_error", s.IVS_PLAYER_NETWORK_UNAVAILABLE = "ivs_player_network_unavailable", s.LIVESTREAM_LATENCY = "livestream_latency", s.IVS_PLAYER_ANALYTICS_EVENT = "ivs_player_analytics_event", s.IVS_PLAYER_PLAYBACK_RATE_CHANGED = "ivs_player_playback_rate_changed", s.IVS_PLAYER_QUALITY_CHANGED = "ivs_player_quality_changed", s.IVS_PLAYER_INITIALIZED = "ivs_player_initialized";
1157
- })(W || (W = {}));
1157
+ })(q || (q = {}));
1158
1158
  var ty = /* @__PURE__ */ new Map([
1159
- [W.PRECALL_TEST_BEGIN, oe.MINOR_EVENT],
1160
- [W.PRECALL_TEST_COMPLETE, oe.MINOR_EVENT],
1161
- [W.CALL_JOIN_BEGIN, oe.MAJOR_EVENT],
1162
- [W.NET_QUALITY_TEST_BEGIN, oe.MINOR_EVENT],
1163
- [W.NET_QUALITY_TEST_END, oe.MINOR_EVENT],
1164
- [W.WEBSOCKET_CONNECTED, oe.MINOR_EVENT],
1165
- [W.TRANSPORT_CONNECTED, oe.MAJOR_EVENT],
1166
- [W.AUDIO_ON, oe.MINOR_EVENT],
1167
- [W.AUDIO_OFF, oe.MINOR_EVENT],
1168
- [W.VIDEO_ON, oe.MINOR_EVENT],
1169
- [W.VIDEO_OFF, oe.MINOR_EVENT],
1170
- [W.PARTICIPANT_ROLE, oe.MINOR_EVENT],
1171
- [W.PING_STAT, oe.MAJOR_EVENT],
1172
- [W.DISCONNECT, oe.MAJOR_EVENT],
1173
- [W.RECONNECT_ATTEMPT, oe.MAJOR_EVENT],
1174
- [W.SCREENSHARE_START_REQUESTED, oe.MINOR_EVENT],
1175
- [W.SCREENSHARE_STARTED, oe.MINOR_EVENT],
1176
- [W.SCREENSHARE_STOPPED, oe.MINOR_EVENT],
1177
- [W.TAB_CHANGE, oe.MINOR_EVENT],
1178
- [W.BROWSER_BACKGROUNDED, oe.MINOR_EVENT],
1179
- [W.BROWSER_FOREGROUNDED, oe.MINOR_EVENT],
1180
- [W.DOMINANT_SPEAKER, oe.MINOR_EVENT],
1181
- [W.AUDIO_DEVICES_UPDATES, oe.MINOR_EVENT],
1182
- [W.VIDEO_DEVICES_UPDATES, oe.MINOR_EVENT],
1183
- [W.SPEAKER_DEVICES_UPDATES, oe.MINOR_EVENT],
1184
- [W.SELECTED_MICROHPONE_UPDATE, oe.MINOR_EVENT],
1185
- [W.SELECTED_CAMERA_UPDATE, oe.MINOR_EVENT],
1186
- [W.SELECTED_SPEAKER_UPDATE, oe.MINOR_EVENT],
1187
- [W.MEDIA_PERMISSION, oe.MINOR_EVENT],
1188
- [W.LEGACY_SWITCH, oe.MINOR_EVENT],
1189
- [W.AUDIO_PLAY_FAILED, oe.MINOR_EVENT],
1190
- [W.VIDEO_PLAY_FAILED, oe.MINOR_EVENT],
1191
- [W.AUDIO_TRACK_MUTED, oe.MINOR_EVENT],
1192
- [W.VIDEO_TRACK_MUTED, oe.MINOR_EVENT],
1159
+ [q.PRECALL_TEST_BEGIN, ue.MINOR_EVENT],
1160
+ [q.PRECALL_TEST_COMPLETE, ue.MINOR_EVENT],
1161
+ [q.CALL_JOIN_BEGIN, ue.MAJOR_EVENT],
1162
+ [q.NET_QUALITY_TEST_BEGIN, ue.MINOR_EVENT],
1163
+ [q.NET_QUALITY_TEST_END, ue.MINOR_EVENT],
1164
+ [q.WEBSOCKET_CONNECTED, ue.MINOR_EVENT],
1165
+ [q.TRANSPORT_CONNECTED, ue.MAJOR_EVENT],
1166
+ [q.AUDIO_ON, ue.MINOR_EVENT],
1167
+ [q.AUDIO_OFF, ue.MINOR_EVENT],
1168
+ [q.VIDEO_ON, ue.MINOR_EVENT],
1169
+ [q.VIDEO_OFF, ue.MINOR_EVENT],
1170
+ [q.PARTICIPANT_ROLE, ue.MINOR_EVENT],
1171
+ [q.PING_STAT, ue.MAJOR_EVENT],
1172
+ [q.DISCONNECT, ue.MAJOR_EVENT],
1173
+ [q.RECONNECT_ATTEMPT, ue.MAJOR_EVENT],
1174
+ [q.SCREENSHARE_START_REQUESTED, ue.MINOR_EVENT],
1175
+ [q.SCREENSHARE_STARTED, ue.MINOR_EVENT],
1176
+ [q.SCREENSHARE_STOPPED, ue.MINOR_EVENT],
1177
+ [q.TAB_CHANGE, ue.MINOR_EVENT],
1178
+ [q.BROWSER_BACKGROUNDED, ue.MINOR_EVENT],
1179
+ [q.BROWSER_FOREGROUNDED, ue.MINOR_EVENT],
1180
+ [q.DOMINANT_SPEAKER, ue.MINOR_EVENT],
1181
+ [q.AUDIO_DEVICES_UPDATES, ue.MINOR_EVENT],
1182
+ [q.VIDEO_DEVICES_UPDATES, ue.MINOR_EVENT],
1183
+ [q.SPEAKER_DEVICES_UPDATES, ue.MINOR_EVENT],
1184
+ [q.SELECTED_MICROHPONE_UPDATE, ue.MINOR_EVENT],
1185
+ [q.SELECTED_CAMERA_UPDATE, ue.MINOR_EVENT],
1186
+ [q.SELECTED_SPEAKER_UPDATE, ue.MINOR_EVENT],
1187
+ [q.MEDIA_PERMISSION, ue.MINOR_EVENT],
1188
+ [q.LEGACY_SWITCH, ue.MINOR_EVENT],
1189
+ [q.AUDIO_PLAY_FAILED, ue.MINOR_EVENT],
1190
+ [q.VIDEO_PLAY_FAILED, ue.MINOR_EVENT],
1191
+ [q.AUDIO_TRACK_MUTED, ue.MINOR_EVENT],
1192
+ [q.VIDEO_TRACK_MUTED, ue.MINOR_EVENT],
1193
1193
  // IVS Player Events
1194
- [W.IVS_PLAYER_REBUFFERING, oe.MAJOR_EVENT],
1195
- [W.IVS_PLAYER_AUDIO_BLOCKED, oe.MAJOR_EVENT],
1196
- [W.IVS_PLAYER_PLAYBACK_BLOCKED, oe.MAJOR_EVENT],
1197
- [W.IVS_PLAYER_ERROR, oe.MAJOR_EVENT],
1198
- [W.IVS_PLAYER_RECOVERABLE_ERROR, oe.MAJOR_EVENT],
1199
- [W.IVS_PLAYER_WORKER_ERROR, oe.MAJOR_EVENT],
1200
- [W.IVS_PLAYER_NETWORK_UNAVAILABLE, oe.MAJOR_EVENT],
1194
+ [q.IVS_PLAYER_REBUFFERING, ue.MAJOR_EVENT],
1195
+ [q.IVS_PLAYER_AUDIO_BLOCKED, ue.MAJOR_EVENT],
1196
+ [q.IVS_PLAYER_PLAYBACK_BLOCKED, ue.MAJOR_EVENT],
1197
+ [q.IVS_PLAYER_ERROR, ue.MAJOR_EVENT],
1198
+ [q.IVS_PLAYER_RECOVERABLE_ERROR, ue.MAJOR_EVENT],
1199
+ [q.IVS_PLAYER_WORKER_ERROR, ue.MAJOR_EVENT],
1200
+ [q.IVS_PLAYER_NETWORK_UNAVAILABLE, ue.MAJOR_EVENT],
1201
1201
  // We are keeping live latency as major, so that it
1202
1202
  // acts as a ping alternative for livestream viewer
1203
- [W.LIVESTREAM_LATENCY, oe.MAJOR_EVENT],
1204
- [W.IVS_PLAYER_ANALYTICS_EVENT, oe.MINOR_EVENT],
1205
- [W.IVS_PLAYER_PLAYBACK_RATE_CHANGED, oe.MINOR_EVENT],
1206
- [W.IVS_PLAYER_QUALITY_CHANGED, oe.MINOR_EVENT],
1207
- [W.IVS_PLAYER_INITIALIZED, oe.MINOR_EVENT],
1208
- [W.EXPECTED_VIDEO_RESOLUTION, oe.MINOR_EVENT],
1209
- [W.EXPECTED_SCREENSHARE_RESOLUTION, oe.MINOR_EVENT]
1203
+ [q.LIVESTREAM_LATENCY, ue.MAJOR_EVENT],
1204
+ [q.IVS_PLAYER_ANALYTICS_EVENT, ue.MINOR_EVENT],
1205
+ [q.IVS_PLAYER_PLAYBACK_RATE_CHANGED, ue.MINOR_EVENT],
1206
+ [q.IVS_PLAYER_QUALITY_CHANGED, ue.MINOR_EVENT],
1207
+ [q.IVS_PLAYER_INITIALIZED, ue.MINOR_EVENT],
1208
+ [q.EXPECTED_VIDEO_RESOLUTION, ue.MINOR_EVENT],
1209
+ [q.EXPECTED_SCREENSHARE_RESOLUTION, ue.MINOR_EVENT]
1210
1210
  ]), ry = /* @__PURE__ */ function() {
1211
1211
  function s() {
1212
1212
  b(this, s), this.events = void 0, this.events = [];
@@ -1248,7 +1248,7 @@ var ty = /* @__PURE__ */ new Map([
1248
1248
  }
1249
1249
  return t;
1250
1250
  }() }, { key: "callEvent", value: function(t) {
1251
- t.timestamp = new Date(), this.eventStore.add(t), this.emit(t.event, t.metaData), ty.get(t.event) === oe.MAJOR_EVENT && this.flush();
1251
+ t.timestamp = new Date(), this.eventStore.add(t), this.emit(t.event, t.metaData), ty.get(t.event) === ue.MAJOR_EVENT && this.flush();
1252
1252
  } }, { key: "flush", value: function() {
1253
1253
  var e = m(/* @__PURE__ */ h().m(function n() {
1254
1254
  var i, a = this, o, c;
@@ -1743,7 +1743,7 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
1743
1743
  case "transport": {
1744
1744
  var L = E;
1745
1745
  c && (c.producing && (this.overallProducingTransportsStatsMap[c.id] || (this.overallProducingTransportsStatsMap[c.id] = { totalPacketsSent: 0 })), c.consuming && (this.overallConsumingTransportsStatsMap[c.id] || (this.overallConsumingTransportsStatsMap[c.id] = { totalPacketsReceived: 0 })));
1746
- var q = {
1746
+ var B = {
1747
1747
  bytesReceived: L.bytesReceived,
1748
1748
  bytesSent: L.bytesSent,
1749
1749
  packetsSent: L.packetsSent,
@@ -1754,34 +1754,34 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
1754
1754
  // @ts-ignore
1755
1755
  iceRole: L.iceRole
1756
1756
  };
1757
- if (d.transport = q, c) {
1757
+ if (d.transport = B, c) {
1758
1758
  if (c.producing) {
1759
1759
  var X = this.overallProducingTransportsStatsMap[c.id];
1760
- this.processProducingTransportStats(c.id, X, q);
1760
+ this.processProducingTransportStats(c.id, X, B);
1761
1761
  }
1762
1762
  if (c.consuming) {
1763
- var Y = this.overallConsumingTransportsStatsMap[c.id];
1764
- this.processConsumingTransportStats(c.id, Y, q);
1763
+ var Z = this.overallConsumingTransportsStatsMap[c.id];
1764
+ this.processConsumingTransportStats(c.id, Z, B);
1765
1765
  }
1766
1766
  }
1767
1767
  break;
1768
1768
  }
1769
1769
  case "remote-inbound-rtp": {
1770
- var H = E, J = { jitter: H.jitter, fractionLost: H.fractionLost, roundTripTime: H.roundTripTime, roundTripTimeMeasurements: H.roundTripTimeMeasurements, totalRoundTripTime: H.totalRoundTripTime, packetsLost: H.packetsLost };
1771
- d.remoteInboundRtp.set(H.localId, J);
1770
+ var W = E, K = { jitter: W.jitter, fractionLost: W.fractionLost, roundTripTime: W.roundTripTime, roundTripTimeMeasurements: W.roundTripTimeMeasurements, totalRoundTripTime: W.totalRoundTripTime, packetsLost: W.packetsLost };
1771
+ d.remoteInboundRtp.set(W.localId, K);
1772
1772
  break;
1773
1773
  }
1774
1774
  case "outbound-rtp": {
1775
1775
  if (!this.outboundProducerMap.has(E.id))
1776
1776
  break;
1777
- var N = E, U = o || this.outboundProducerMap.get(E.id), x = this.pausedProducerMap.get(U);
1778
- if (x) {
1779
- if (x.lastReportCalculated === !0)
1777
+ var N = E, U = o || this.outboundProducerMap.get(E.id), J = this.pausedProducerMap.get(U);
1778
+ if (J) {
1779
+ if (J.lastReportCalculated === !0)
1780
1780
  break;
1781
1781
  this.pausedProducerMap.set(U, { lastReportCalculated: !0 });
1782
1782
  }
1783
1783
  this.overallProducersStatsMap[U] || (this.overallProducersStatsMap[U] = { totalVideoPacketsSent: 0, totalAudioPacketsSent: 0 });
1784
- var le = this.overallProducersStatsMap[U];
1784
+ var se = this.overallProducersStatsMap[U];
1785
1785
  if (["video", "audio"].includes(N.mediaType) || ["video", "audio"].includes(N.kind)) {
1786
1786
  var Re;
1787
1787
  if (!this.outboundProducerMap.has(E.id)) {
@@ -1794,35 +1794,35 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
1794
1794
  d.producerStreamMap.has(U) || d.producerStreamMap.set(U, { outboundVideoRtpId: [], outboundAudioRtpId: [] });
1795
1795
  var Le = { bytesSent: N.bytesSent, packetsSent: N.packetsSent, nackCount: N.nackCount, ssrc: N.ssrc, mid: N.mid, active: N.active, codecId: N.codecId, headerBytesSent: N.headerBytesSent || 0, totalPacketSendDelay: N.totalPacketSendDelay || 0 };
1796
1796
  if (N.mediaType === "video" || N.kind === "video") {
1797
- var Q = N, Lt = V({
1798
- frameHeight: Q.frameHeight,
1799
- frameWidth: Q.frameWidth,
1800
- framesEncoded: Q.framesEncoded,
1801
- framesDropped: Q.framesDropped,
1802
- framesPerSecond: Q.framesPerSecond,
1803
- framesSent: Q.framesSent,
1804
- keyFramesEncoded: Q.keyFramesEncoded,
1805
- firCount: Q.firCount,
1806
- encoderImplementation: Q.encoderImplementation,
1807
- hugeFramesSent: Q.hugeFramesSent,
1808
- pliCount: Q.pliCount,
1809
- qpSum: Q.qpSum,
1810
- qualityLimitationDurations: Q.qualityLimitationDurations,
1811
- qualityLimitationReason: Q.qualityLimitationReason,
1812
- qualityLimitationResolutionChanges: Q.qualityLimitationResolutionChanges,
1797
+ var Y = N, Lt = V({
1798
+ frameHeight: Y.frameHeight,
1799
+ frameWidth: Y.frameWidth,
1800
+ framesEncoded: Y.framesEncoded,
1801
+ framesDropped: Y.framesDropped,
1802
+ framesPerSecond: Y.framesPerSecond,
1803
+ framesSent: Y.framesSent,
1804
+ keyFramesEncoded: Y.keyFramesEncoded,
1805
+ firCount: Y.firCount,
1806
+ encoderImplementation: Y.encoderImplementation,
1807
+ hugeFramesSent: Y.hugeFramesSent,
1808
+ pliCount: Y.pliCount,
1809
+ qpSum: Y.qpSum,
1810
+ qualityLimitationDurations: Y.qualityLimitationDurations,
1811
+ qualityLimitationReason: Y.qualityLimitationReason,
1812
+ qualityLimitationResolutionChanges: Y.qualityLimitationResolutionChanges,
1813
1813
  // temp sending target bitrate in total encode time
1814
1814
  // to avoid the delay with making the backend changes
1815
- totalEncodeTime: Q.targetBitrate,
1816
- totalPacketSendDelay: Q.totalPacketSendDelay,
1817
- retransmittedBytesSent: Q.retransmittedBytesSent,
1818
- retransmittedPacketsSent: Q.retransmittedPacketsSent,
1819
- scalabilityMode: Q.scalabilityMode,
1820
- powerEfficientEncoder: Q.powerEfficientEncoder
1815
+ totalEncodeTime: Y.targetBitrate,
1816
+ totalPacketSendDelay: Y.totalPacketSendDelay,
1817
+ retransmittedBytesSent: Y.retransmittedBytesSent,
1818
+ retransmittedPacketsSent: Y.retransmittedPacketsSent,
1819
+ scalabilityMode: Y.scalabilityMode,
1820
+ powerEfficientEncoder: Y.powerEfficientEncoder
1821
1821
  }, Le);
1822
- d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Lt);
1822
+ d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, se, Lt);
1823
1823
  } else if (N.mediaType === "audio" || N.kind === "audio") {
1824
1824
  var St = N, ht = V({ retransmittedBytesSent: St.retransmittedBytesSent, retransmittedPacketsSent: St.retransmittedPacketsSent }, Le);
1825
- d.outboundAudioRtp.set(E.id, ht), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, le, ht);
1825
+ d.outboundAudioRtp.set(E.id, ht), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, se, ht);
1826
1826
  }
1827
1827
  } else
1828
1828
  this.callStatsInstance.logger.error("Callstats: Unknown Outbound-rtp. mediatype: ".concat(N.mediaType, " kind: ").concat(N.kind));
@@ -1831,46 +1831,46 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
1831
1831
  case "inbound-rtp": {
1832
1832
  if (!this.inboundConsumerMap.has(E.id))
1833
1833
  break;
1834
- var re = E, K = o || this.inboundConsumerMap.get(E.id), Jo = this.pausedConsumerMap.get(K);
1834
+ var re = E, z = o || this.inboundConsumerMap.get(E.id), Jo = this.pausedConsumerMap.get(z);
1835
1835
  if (Jo) {
1836
1836
  if (Jo.lastReportCalculated === !0)
1837
1837
  break;
1838
- this.pausedConsumerMap.set(K, { lastReportCalculated: !0 });
1838
+ this.pausedConsumerMap.set(z, { lastReportCalculated: !0 });
1839
1839
  }
1840
1840
  if (re.ssrc === 1234)
1841
1841
  break;
1842
- this.overallConsumersStatsMap[K] || (this.overallConsumersStatsMap[K] = { totalVideoPacketsReceived: 0, totalAudioPacketsReceived: 0 });
1843
- var Ko = this.overallConsumersStatsMap[K];
1842
+ this.overallConsumersStatsMap[z] || (this.overallConsumersStatsMap[z] = { totalVideoPacketsReceived: 0, totalAudioPacketsReceived: 0 });
1843
+ var Ko = this.overallConsumersStatsMap[z];
1844
1844
  if (["video", "audio"].includes(re.mediaType) || ["video", "audio"].includes(re.kind)) {
1845
1845
  if (!this.inboundConsumerMap.has(E.id)) {
1846
1846
  d.staleConsumerStreamMap = !0;
1847
1847
  break;
1848
1848
  }
1849
- d.consumerStreamMap.has(K) || d.consumerStreamMap.set(K, { inboundVideoRtpId: [], inboundAudioRtpId: [] });
1849
+ d.consumerStreamMap.has(z) || d.consumerStreamMap.set(z, { inboundVideoRtpId: [], inboundAudioRtpId: [] });
1850
1850
  var zo = { bytesReceived: re.bytesReceived, packetsReceived: re.packetsReceived, packetsLost: re.packetsLost >= 0 ? re.packetsLost : 0, jitter: re.jitter, nackCount: re.nackCount, jitterBufferDelay: re.jitterBufferDelay, jitterBufferEmittedCount: re.jitterBufferEmittedCount, lastPacketReceivedTimestamp: re.lastPacketReceivedTimestamp, ssrc: re.ssrc, mid: re.mid, codecId: re.codecId, headerBytesReceived: re.headerBytesReceived || 0, packetsDiscarded: re.packetsDiscarded || 0, jitterBufferMinimumDelay: re.jitterBufferMinimumDelay || 0, jitterBufferTargetDelay: re.jitterBufferTargetDelay || 0 };
1851
1851
  if (re.mediaType === "video" || re.kind === "video") {
1852
1852
  var Na, Va, $a, ja, Ua, Fa, ve = re, Pe = V({ frameHeight: ve.frameHeight, frameWidth: ve.frameWidth, framesDecoded: ve.framesDecoded, framesDropped: ve.framesDropped, framesPerSecond: ve.framesPerSecond, framesReceived: ve.framesReceived, keyFramesDecoded: ve.keyFramesDecoded, firCount: ve.firCount, decoderImplementation: ve.decoderImplementation, pliCount: ve.pliCount, totalProcessingDelay: ve.totalProcessingDelay, qpSum: ve.qpSum || 0, totalAssemblyTime: ve.totalAssemblyTime || 0, totalDecodeTime: ve.totalDecodeTime || 0, totalFreezesDuration: ve.totalFreezesDuration || 0, totalInterFrameDelay: ve.totalInterFrameDelay || 0, totalPausesDuration: ve.totalPausesDuration || 0, totalSquaredInterFrameDelay: ve.totalSquaredInterFrameDelay || 0, freezeCount: ve.freezeCount || 0, pauseCount: ve.pauseCount || 0, powerEfficientDecoder: ve.powerEfficientDecoder }, zo);
1853
- Pe.score = Af({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Na = this.videoConsumerToStatsMap.get(K)) === null || Na === void 0 ? void 0 : Na.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - (((Va = this.videoConsumerToStatsMap.get(K)) === null || Va === void 0 ? void 0 : Va.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - ((($a = this.videoConsumerToStatsMap.get(K)) === null || $a === void 0 ? void 0 : $a.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(K) }), y.set(K, {
1853
+ Pe.score = Af({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Na = this.videoConsumerToStatsMap.get(z)) === null || Na === void 0 ? void 0 : Na.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - (((Va = this.videoConsumerToStatsMap.get(z)) === null || Va === void 0 ? void 0 : Va.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - ((($a = this.videoConsumerToStatsMap.get(z)) === null || $a === void 0 ? void 0 : $a.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(z) }), y.set(z, {
1854
1854
  score: +(Pe.score * 10).toFixed(),
1855
1855
  frameWidth: Pe.frameWidth || 0,
1856
1856
  frameHeight: Pe.frameHeight || 0,
1857
1857
  framesPerSecond: Pe.framesPerSecond || 0,
1858
- packetsLostPercentage: hl({ packetsLost: (Pe.packetsLost || 0) - (((ja = this.videoConsumerToStatsMap.get(K)) === null || ja === void 0 ? void 0 : ja.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((Ua = this.videoConsumerToStatsMap.get(K)) === null || Ua === void 0 ? void 0 : Ua.packetsReceived) || 0) }),
1858
+ packetsLostPercentage: hl({ packetsLost: (Pe.packetsLost || 0) - (((ja = this.videoConsumerToStatsMap.get(z)) === null || ja === void 0 ? void 0 : ja.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((Ua = this.videoConsumerToStatsMap.get(z)) === null || Ua === void 0 ? void 0 : Ua.packetsReceived) || 0) }),
1859
1859
  jitter: Pe.jitter || 0,
1860
- isScreenShare: this.screenShareConsumers.has(K),
1861
- bitrate: ((Pe.bytesReceived || 0) - (((Fa = this.videoConsumerToStatsMap.get(K)) === null || Fa === void 0 ? void 0 : Fa.bytesReceived) || 0)) * 8 / 7
1860
+ isScreenShare: this.screenShareConsumers.has(z),
1861
+ bitrate: ((Pe.bytesReceived || 0) - (((Fa = this.videoConsumerToStatsMap.get(z)) === null || Fa === void 0 ? void 0 : Fa.bytesReceived) || 0)) * 8 / 7
1862
1862
  // Bytes received in last 7 seconds
1863
- }), this.videoConsumerToStatsMap.set(K, Pe), d.inboundVideoRtp.set(E.id, Pe), d.consumerStreamMap.get(K).inboundVideoRtpId.push(E.id), this.processInboundConsumerVideoStats(K, Ko, Pe);
1863
+ }), this.videoConsumerToStatsMap.set(z, Pe), d.inboundVideoRtp.set(E.id, Pe), d.consumerStreamMap.get(z).inboundVideoRtpId.push(E.id), this.processInboundConsumerVideoStats(z, Ko, Pe);
1864
1864
  } else if (re.mediaType === "audio" || re.kind === "audio") {
1865
1865
  var Ha, Ba, qa, Wa, Ga, Ja, pt = re, at = V({ audioLevel: pt.audioLevel, concealedSamples: pt.concealedSamples, concealmentEvents: pt.concealmentEvents, totalAudioEnergy: pt.totalAudioEnergy, totalSamplesDuration: pt.totalSamplesDuration, totalSamplesReceived: pt.totalSamplesReceived, fecPacketsDiscarded: pt.fecPacketsDiscarded || 0, fecPacketsReceived: pt.fecPacketsReceived || 0, insertedSamplesForDeceleration: pt.insertedSamplesForDeceleration || 0, removedSamplesForAcceleration: pt.removedSamplesForAcceleration || 0, silentConcealedSamples: pt.silentConcealedSamples || 0, playoutId: pt.playoutId }, zo);
1866
- at.score = _f({ concealmentEvents: (at.concealmentEvents || 0) - (((Ha = this.audioConsumerToStatsMap.get(K)) === null || Ha === void 0 ? void 0 : Ha.concealmentEvents) || 0), packetsLost: (at.packetsLost || 0) - (((Ba = this.audioConsumerToStatsMap.get(K)) === null || Ba === void 0 ? void 0 : Ba.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((qa = this.audioConsumerToStatsMap.get(K)) === null || qa === void 0 ? void 0 : qa.packetsReceived) || 0), jitter: at.jitter || 0 }), y.set(K, {
1866
+ at.score = _f({ concealmentEvents: (at.concealmentEvents || 0) - (((Ha = this.audioConsumerToStatsMap.get(z)) === null || Ha === void 0 ? void 0 : Ha.concealmentEvents) || 0), packetsLost: (at.packetsLost || 0) - (((Ba = this.audioConsumerToStatsMap.get(z)) === null || Ba === void 0 ? void 0 : Ba.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((qa = this.audioConsumerToStatsMap.get(z)) === null || qa === void 0 ? void 0 : qa.packetsReceived) || 0), jitter: at.jitter || 0 }), y.set(z, {
1867
1867
  score: +(at.score * 10).toFixed(),
1868
- packetsLostPercentage: hl({ packetsLost: (at.packetsLost || 0) - (((Wa = this.audioConsumerToStatsMap.get(K)) === null || Wa === void 0 ? void 0 : Wa.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Ga = this.audioConsumerToStatsMap.get(K)) === null || Ga === void 0 ? void 0 : Ga.packetsReceived) || 0) }),
1868
+ packetsLostPercentage: hl({ packetsLost: (at.packetsLost || 0) - (((Wa = this.audioConsumerToStatsMap.get(z)) === null || Wa === void 0 ? void 0 : Wa.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Ga = this.audioConsumerToStatsMap.get(z)) === null || Ga === void 0 ? void 0 : Ga.packetsReceived) || 0) }),
1869
1869
  jitter: at.jitter || 0,
1870
- isScreenShare: this.screenShareConsumers.has(K),
1871
- bitrate: ((at.bytesReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(K)) === null || Ja === void 0 ? void 0 : Ja.bytesReceived) || 0)) * 8 / 7
1870
+ isScreenShare: this.screenShareConsumers.has(z),
1871
+ bitrate: ((at.bytesReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(z)) === null || Ja === void 0 ? void 0 : Ja.bytesReceived) || 0)) * 8 / 7
1872
1872
  // Bytes received in last 7 seconds
1873
- }), this.audioConsumerToStatsMap.set(K, at), d.inboundAudioRtp.set(E.id, at), d.consumerStreamMap.get(K).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(K, Ko, at);
1873
+ }), this.audioConsumerToStatsMap.set(z, at), d.inboundAudioRtp.set(E.id, at), d.consumerStreamMap.get(z).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(z, Ko, at);
1874
1874
  }
1875
1875
  } else
1876
1876
  this.callStatsInstance.logger.error("Callstats: Unknown Inbound-rtp. mediatype: ".concat(re.mediaType, " kind: ").concat(re.kind));
@@ -2336,35 +2336,35 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
2336
2336
  case "transport": {
2337
2337
  var L = E;
2338
2338
  c && (c.producing && (this.overallProducingTransportsStatsMap[c.id] || (this.overallProducingTransportsStatsMap[c.id] = { totalPacketsSent: 0 })), c.consuming && (this.overallConsumingTransportsStatsMap[c.id] || (this.overallConsumingTransportsStatsMap[c.id] = { totalPacketsReceived: 0 })));
2339
- var q = { bytesReceived: L.bytesReceived, bytesSent: L.bytesSent, packetsSent: L.packetsSent, packetsReceived: L.packetsReceived, dtlsCipher: L.dtlsCipher, dtlsState: L.dtlsState, iceRole: L.iceRole };
2340
- if (d.transport = q, c) {
2339
+ var B = { bytesReceived: L.bytesReceived, bytesSent: L.bytesSent, packetsSent: L.packetsSent, packetsReceived: L.packetsReceived, dtlsCipher: L.dtlsCipher, dtlsState: L.dtlsState, iceRole: L.iceRole };
2340
+ if (d.transport = B, c) {
2341
2341
  if (c.producing) {
2342
2342
  var X = this.overallProducingTransportsStatsMap[c.id];
2343
- this.processProducingTransportStats(c.id, X, q);
2343
+ this.processProducingTransportStats(c.id, X, B);
2344
2344
  }
2345
2345
  if (c.consuming) {
2346
- var Y = this.overallConsumingTransportsStatsMap[c.id];
2347
- this.processConsumingTransportStats(c.id, Y, q);
2346
+ var Z = this.overallConsumingTransportsStatsMap[c.id];
2347
+ this.processConsumingTransportStats(c.id, Z, B);
2348
2348
  }
2349
2349
  }
2350
2350
  break;
2351
2351
  }
2352
2352
  case "remote-inbound-rtp": {
2353
- var H = E, J = { jitter: H.jitter, fractionLost: H.fractionLost, roundTripTime: H.roundTripTime, roundTripTimeMeasurements: H.roundTripTimeMeasurements, totalRoundTripTime: H.totalRoundTripTime, packetsLost: H.packetsLost };
2354
- d.remoteInboundRtp.set(H.localId, J);
2353
+ var W = E, K = { jitter: W.jitter, fractionLost: W.fractionLost, roundTripTime: W.roundTripTime, roundTripTimeMeasurements: W.roundTripTimeMeasurements, totalRoundTripTime: W.totalRoundTripTime, packetsLost: W.packetsLost };
2354
+ d.remoteInboundRtp.set(W.localId, K);
2355
2355
  break;
2356
2356
  }
2357
2357
  case "outbound-rtp": {
2358
2358
  if (!this.outboundProducerMap.has(E.id))
2359
2359
  break;
2360
- var N = E, U = o || this.outboundProducerMap.get(E.id), x = this.pausedProducerMap.get(U);
2361
- if (x) {
2362
- if (x.lastReportCalculated === !0)
2360
+ var N = E, U = o || this.outboundProducerMap.get(E.id), J = this.pausedProducerMap.get(U);
2361
+ if (J) {
2362
+ if (J.lastReportCalculated === !0)
2363
2363
  break;
2364
2364
  this.pausedProducerMap.set(U, { lastReportCalculated: !0 });
2365
2365
  }
2366
2366
  this.overallProducersStatsMap[U] || (this.overallProducersStatsMap[U] = { totalVideoPacketsSent: 0, totalAudioPacketsSent: 0 });
2367
- var le = this.overallProducersStatsMap[U];
2367
+ var se = this.overallProducersStatsMap[U];
2368
2368
  if (["video", "audio"].includes(N.mediaType) || ["video", "audio"].includes(N.kind)) {
2369
2369
  var Re;
2370
2370
  if (!this.outboundProducerMap.has(E.id)) {
@@ -2377,11 +2377,11 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
2377
2377
  d.producerStreamMap.has(U) || d.producerStreamMap.set(U, { outboundVideoRtpId: [], outboundAudioRtpId: [] });
2378
2378
  var Le = { bytesSent: N.bytesSent, packetsSent: N.packetsSent, nackCount: N.nackCount, ssrc: N.ssrc, mid: N.mid, active: N.active, codecId: N.codecId, headerBytesSent: N.headerBytesSent || 0, totalPacketSendDelay: N.totalPacketSendDelay || 0 };
2379
2379
  if (N.mediaType === "video" || N.kind === "video") {
2380
- var Q = N, Lt = V({ frameHeight: Q.frameHeight, frameWidth: Q.frameWidth, framesEncoded: Q.framesEncoded, framesDropped: Q.framesDropped ? Q.framesDropped : Q.droppedFrames, framesPerSecond: Q.framesPerSecond ? Q.framesPerSecond : Q.framerateMean, framesSent: Q.framesSent, keyFramesEncoded: Q.keyFramesEncoded, firCount: Q.firCount, encoderImplementation: Q.encoderImplementation, hugeFramesSent: Q.hugeFramesSent, pliCount: Q.pliCount, qpSum: Q.qpSum, qualityLimitationReason: Q.qualityLimitationReason, qualityLimitationDurations: Q.qualityLimitationDurations, qualityLimitationResolutionChanges: Q.qualityLimitationResolutionChanges, totalEncodeTime: Q.totalEncodeTime, totalPacketSendDelay: Q.totalEncodeTime, retransmittedBytesSent: Q.retransmittedBytesSent, retransmittedPacketsSent: Q.retransmittedPacketsSent, scalabilityMode: Q.scalabilityMode, powerEfficientEncoder: Q.powerEfficientEncoder }, Le);
2381
- d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Lt);
2380
+ var Y = N, Lt = V({ frameHeight: Y.frameHeight, frameWidth: Y.frameWidth, framesEncoded: Y.framesEncoded, framesDropped: Y.framesDropped ? Y.framesDropped : Y.droppedFrames, framesPerSecond: Y.framesPerSecond ? Y.framesPerSecond : Y.framerateMean, framesSent: Y.framesSent, keyFramesEncoded: Y.keyFramesEncoded, firCount: Y.firCount, encoderImplementation: Y.encoderImplementation, hugeFramesSent: Y.hugeFramesSent, pliCount: Y.pliCount, qpSum: Y.qpSum, qualityLimitationReason: Y.qualityLimitationReason, qualityLimitationDurations: Y.qualityLimitationDurations, qualityLimitationResolutionChanges: Y.qualityLimitationResolutionChanges, totalEncodeTime: Y.totalEncodeTime, totalPacketSendDelay: Y.totalEncodeTime, retransmittedBytesSent: Y.retransmittedBytesSent, retransmittedPacketsSent: Y.retransmittedPacketsSent, scalabilityMode: Y.scalabilityMode, powerEfficientEncoder: Y.powerEfficientEncoder }, Le);
2381
+ d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, se, Lt);
2382
2382
  } else if (N.mediaType === "audio" || N.kind === "audio") {
2383
2383
  var St = N, ht = V({ retransmittedBytesSent: St.retransmittedBytesSent, retransmittedPacketsSent: St.retransmittedPacketsSent }, Le);
2384
- d.outboundAudioRtp.set(E.id, ht), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, le, ht);
2384
+ d.outboundAudioRtp.set(E.id, ht), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, se, ht);
2385
2385
  }
2386
2386
  } else
2387
2387
  this.callStatsInstance.logger.error("Callstats: Unknown Outbound-rtp. mediatype: ".concat(N.mediaType, " kind: ").concat(N.kind));
@@ -2390,46 +2390,46 @@ b=AS:`.concat(this.constrainVideoBitrateKbps, `\r
2390
2390
  case "inbound-rtp": {
2391
2391
  if (!this.inboundConsumerMap.has(E.id))
2392
2392
  break;
2393
- var re = E, K = o || this.inboundConsumerMap.get(E.id), Jo = this.pausedConsumerMap.get(K);
2393
+ var re = E, z = o || this.inboundConsumerMap.get(E.id), Jo = this.pausedConsumerMap.get(z);
2394
2394
  if (Jo) {
2395
2395
  if (Jo.lastReportCalculated === !0)
2396
2396
  break;
2397
- this.pausedConsumerMap.set(K, { lastReportCalculated: !0 });
2397
+ this.pausedConsumerMap.set(z, { lastReportCalculated: !0 });
2398
2398
  }
2399
2399
  if (re.ssrc === 1234)
2400
2400
  break;
2401
- this.overallConsumersStatsMap[K] || (this.overallConsumersStatsMap[K] = { totalVideoPacketsReceived: 0, totalAudioPacketsReceived: 0 });
2402
- var Ko = this.overallConsumersStatsMap[K];
2401
+ this.overallConsumersStatsMap[z] || (this.overallConsumersStatsMap[z] = { totalVideoPacketsReceived: 0, totalAudioPacketsReceived: 0 });
2402
+ var Ko = this.overallConsumersStatsMap[z];
2403
2403
  if (["video", "audio"].includes(re.mediaType) || ["video", "audio"].includes(re.kind)) {
2404
2404
  if (!this.inboundConsumerMap.has(E.id)) {
2405
2405
  d.staleConsumerStreamMap = !0;
2406
2406
  break;
2407
2407
  }
2408
- d.consumerStreamMap.has(K) || d.consumerStreamMap.set(K, { inboundVideoRtpId: [], inboundAudioRtpId: [] });
2408
+ d.consumerStreamMap.has(z) || d.consumerStreamMap.set(z, { inboundVideoRtpId: [], inboundAudioRtpId: [] });
2409
2409
  var zo = { bytesReceived: re.bytesReceived, packetsReceived: re.packetsReceived, packetsLost: re.packetsLost >= 0 ? re.packetsLost : 0, jitter: re.jitter, nackCount: re.nackCount, jitterBufferDelay: re.jitterBufferDelay, jitterBufferEmittedCount: re.jitterBufferEmittedCount, lastPacketReceivedTimestamp: re.lastPacketReceivedTimestamp, ssrc: re.ssrc, mid: re.mid, codecId: re.codecId, headerBytesReceived: re.headerBytesReceived || 0, packetsDiscarded: re.packetsDiscarded || 0, jitterBufferMinimumDelay: re.jitterBufferMinimumDelay || 0, jitterBufferTargetDelay: re.jitterBufferTargetDelay || 0 };
2410
2410
  if (re.mediaType === "video" || re.kind === "video") {
2411
2411
  var Na, Va, $a, ja, Ua, Fa, ve = re, Pe = V({ frameHeight: ve.frameHeight, frameWidth: ve.frameWidth, framesDecoded: ve.framesDecoded, framesDropped: ve.framesDropped ? ve.framesDropped : ve.droppedFrames, framesPerSecond: ve.framesPerSecond ? ve.framesPerSecond : ve.framerateMean, framesReceived: ve.framesReceived, keyFramesDecoded: ve.keyFramesDecoded, firCount: ve.firCount, decoderImplementation: ve.decoderImplementation, pliCount: ve.pliCount, totalProcessingDelay: ve.totalProcessingDelay, qpSum: ve.qpSum || 0, totalAssemblyTime: ve.totalAssemblyTime || 0, totalDecodeTime: ve.totalDecodeTime || 0, totalFreezesDuration: ve.totalFreezesDuration || 0, totalInterFrameDelay: ve.totalInterFrameDelay || 0, totalPausesDuration: ve.totalPausesDuration || 0, totalSquaredInterFrameDelay: ve.totalSquaredInterFrameDelay || 0, freezeCount: ve.freezeCount || 0, pauseCount: ve.pauseCount || 0, powerEfficientDecoder: ve.powerEfficientDecoder }, zo);
2412
- Pe.score = Af({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Na = this.videoConsumerToStatsMap.get(K)) === null || Na === void 0 ? void 0 : Na.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - (((Va = this.videoConsumerToStatsMap.get(K)) === null || Va === void 0 ? void 0 : Va.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - ((($a = this.videoConsumerToStatsMap.get(K)) === null || $a === void 0 ? void 0 : $a.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(K) }), y.set(K, {
2412
+ Pe.score = Af({ frameWidth: Pe.frameWidth || 0, framesDecoded: (Pe.framesDecoded || 0) - (((Na = this.videoConsumerToStatsMap.get(z)) === null || Na === void 0 ? void 0 : Na.framesDecoded) || 0), framesPerSecond: Pe.framesPerSecond || 0, packetsLost: (Pe.packetsLost || 0) - (((Va = this.videoConsumerToStatsMap.get(z)) === null || Va === void 0 ? void 0 : Va.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - ((($a = this.videoConsumerToStatsMap.get(z)) === null || $a === void 0 ? void 0 : $a.packetsReceived) || 0), jitter: Pe.jitter || 0, isScreenShare: this.screenShareConsumers.has(z) }), y.set(z, {
2413
2413
  score: +(Pe.score * 10).toFixed(),
2414
2414
  frameWidth: Pe.frameWidth || 0,
2415
2415
  frameHeight: Pe.frameHeight || 0,
2416
2416
  framesPerSecond: Pe.framesPerSecond || 0,
2417
- packetsLostPercentage: hl({ packetsLost: (Pe.packetsLost || 0) - (((ja = this.videoConsumerToStatsMap.get(K)) === null || ja === void 0 ? void 0 : ja.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((Ua = this.videoConsumerToStatsMap.get(K)) === null || Ua === void 0 ? void 0 : Ua.packetsReceived) || 0) }),
2417
+ packetsLostPercentage: hl({ packetsLost: (Pe.packetsLost || 0) - (((ja = this.videoConsumerToStatsMap.get(z)) === null || ja === void 0 ? void 0 : ja.packetsLost) || 0), packetsReceived: (Pe.packetsReceived || 0) - (((Ua = this.videoConsumerToStatsMap.get(z)) === null || Ua === void 0 ? void 0 : Ua.packetsReceived) || 0) }),
2418
2418
  jitter: Pe.jitter || 0,
2419
- isScreenShare: this.screenShareConsumers.has(K),
2420
- bitrate: ((Pe.bytesReceived || 0) - (((Fa = this.videoConsumerToStatsMap.get(K)) === null || Fa === void 0 ? void 0 : Fa.bytesReceived) || 0)) * 8 / 7
2419
+ isScreenShare: this.screenShareConsumers.has(z),
2420
+ bitrate: ((Pe.bytesReceived || 0) - (((Fa = this.videoConsumerToStatsMap.get(z)) === null || Fa === void 0 ? void 0 : Fa.bytesReceived) || 0)) * 8 / 7
2421
2421
  // Bytes received in last 7 seconds
2422
- }), this.videoConsumerToStatsMap.set(K, Pe), d.inboundVideoRtp.set(E.id, Pe), d.consumerStreamMap.get(K).inboundVideoRtpId.push(E.id), this.processInboundConsumerVideoStats(K, Ko, Pe);
2422
+ }), this.videoConsumerToStatsMap.set(z, Pe), d.inboundVideoRtp.set(E.id, Pe), d.consumerStreamMap.get(z).inboundVideoRtpId.push(E.id), this.processInboundConsumerVideoStats(z, Ko, Pe);
2423
2423
  } else if (re.mediaType === "audio" || re.kind === "audio") {
2424
2424
  var Ha, Ba, qa, Wa, Ga, Ja, pt = re, at = V({ audioLevel: pt.audioLevel, concealedSamples: pt.concealedSamples, concealmentEvents: pt.concealmentEvents, totalAudioEnergy: pt.totalAudioEnergy, totalSamplesDuration: pt.totalSamplesDuration, totalSamplesReceived: pt.totalSamplesReceived, fecPacketsDiscarded: pt.fecPacketsDiscarded || 0, fecPacketsReceived: pt.fecPacketsReceived || 0, insertedSamplesForDeceleration: pt.insertedSamplesForDeceleration || 0, removedSamplesForAcceleration: pt.removedSamplesForAcceleration || 0, silentConcealedSamples: pt.silentConcealedSamples || 0, playoutId: pt.playoutId }, zo);
2425
- at.score = _f({ concealmentEvents: (at.concealmentEvents || 0) - (((Ha = this.audioConsumerToStatsMap.get(K)) === null || Ha === void 0 ? void 0 : Ha.concealmentEvents) || 0), packetsLost: (at.packetsLost || 0) - (((Ba = this.audioConsumerToStatsMap.get(K)) === null || Ba === void 0 ? void 0 : Ba.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((qa = this.audioConsumerToStatsMap.get(K)) === null || qa === void 0 ? void 0 : qa.packetsReceived) || 0), jitter: at.jitter || 0 }), y.set(K, {
2425
+ at.score = _f({ concealmentEvents: (at.concealmentEvents || 0) - (((Ha = this.audioConsumerToStatsMap.get(z)) === null || Ha === void 0 ? void 0 : Ha.concealmentEvents) || 0), packetsLost: (at.packetsLost || 0) - (((Ba = this.audioConsumerToStatsMap.get(z)) === null || Ba === void 0 ? void 0 : Ba.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((qa = this.audioConsumerToStatsMap.get(z)) === null || qa === void 0 ? void 0 : qa.packetsReceived) || 0), jitter: at.jitter || 0 }), y.set(z, {
2426
2426
  score: +(at.score * 10).toFixed(),
2427
- packetsLostPercentage: hl({ packetsLost: (at.packetsLost || 0) - (((Wa = this.audioConsumerToStatsMap.get(K)) === null || Wa === void 0 ? void 0 : Wa.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Ga = this.audioConsumerToStatsMap.get(K)) === null || Ga === void 0 ? void 0 : Ga.packetsReceived) || 0) }),
2427
+ packetsLostPercentage: hl({ packetsLost: (at.packetsLost || 0) - (((Wa = this.audioConsumerToStatsMap.get(z)) === null || Wa === void 0 ? void 0 : Wa.packetsLost) || 0), packetsReceived: (at.packetsReceived || 0) - (((Ga = this.audioConsumerToStatsMap.get(z)) === null || Ga === void 0 ? void 0 : Ga.packetsReceived) || 0) }),
2428
2428
  jitter: at.jitter || 0,
2429
- isScreenShare: this.screenShareConsumers.has(K),
2430
- bitrate: ((at.bytesReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(K)) === null || Ja === void 0 ? void 0 : Ja.bytesReceived) || 0)) * 8 / 7
2429
+ isScreenShare: this.screenShareConsumers.has(z),
2430
+ bitrate: ((at.bytesReceived || 0) - (((Ja = this.audioConsumerToStatsMap.get(z)) === null || Ja === void 0 ? void 0 : Ja.bytesReceived) || 0)) * 8 / 7
2431
2431
  // Bytes received in last 7 seconds
2432
- }), this.audioConsumerToStatsMap.set(K, at), d.inboundAudioRtp.set(E.id, at), d.consumerStreamMap.get(K).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(K, Ko, at);
2432
+ }), this.audioConsumerToStatsMap.set(z, at), d.inboundAudioRtp.set(E.id, at), d.consumerStreamMap.get(z).inboundAudioRtpId.push(E.id), this.processInboundConsumerAudioStats(z, Ko, at);
2433
2433
  }
2434
2434
  } else
2435
2435
  this.callStatsInstance.logger.error("Callstats: Unknown Inbound-rtp. mediatype: ".concat(re.mediaType, " kind: ").concat(re.kind));
@@ -2611,7 +2611,7 @@ var he = function(r, e) {
2611
2611
  a.f();
2612
2612
  }
2613
2613
  };
2614
- }, ue = globalThis && globalThis.__decorate || function(s, r, e, t) {
2614
+ }, ce = globalThis && globalThis.__decorate || function(s, r, e, t) {
2615
2615
  var n = arguments.length, i = n < 3 ? r : t === null ? t = Object.getOwnPropertyDescriptor(r, e) : t, a;
2616
2616
  if ((typeof Reflect == "undefined" ? "undefined" : ye(Reflect)) === "object" && typeof Reflect.decorate == "function")
2617
2617
  i = Reflect.decorate(s, r, e, t);
@@ -2619,7 +2619,7 @@ var he = function(r, e) {
2619
2619
  for (var o = s.length - 1; o >= 0; o--)
2620
2620
  (a = s[o]) && (i = (n < 3 ? a(i) : n > 3 ? a(r, e, i) : a(r, e)) || i);
2621
2621
  return n > 3 && i && Object.defineProperty(r, e, i), i;
2622
- }, ce = console, ae = /* @__PURE__ */ function(s) {
2622
+ }, le = console, ae = /* @__PURE__ */ function(s) {
2623
2623
  function r() {
2624
2624
  var e, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "https://api.testingv3.dyte.in", n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Blink", i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : yf.PROD, a = arguments.length > 3 ? arguments[3] : void 0, o = arguments.length > 4 ? arguments[4] : void 0, c = arguments.length > 5 ? arguments[5] : void 0, l = arguments.length > 6 ? arguments[6] : void 0, d = arguments.length > 7 ? arguments[7] : void 0;
2625
2625
  if (b(this, r), e = C(this, r), e.observer = void 0, e.eventHandler = void 0, e.measurements = void 0, e.producingTransport = void 0, e.consumingTransport = void 0, e.producers = /* @__PURE__ */ new Map(), e.consumers = /* @__PURE__ */ new Map(), e.iceServers = void 0, e.connectionInfoPromise = void 0, e.pingStatsTimeout = void 0, e.logger = void 0, e.env = void 0, e.apiHostnames = void 0, e.peerId = void 0, e.consumerSharedMediaStatesMap = /* @__PURE__ */ new Map(), e.currentUserMediaStates = {}, !d)
@@ -2688,34 +2688,34 @@ var he = function(r, e) {
2688
2688
  this.eventHandler.callEvent(t);
2689
2689
  } }, { key: "sendPreCallTestBeginEvent", value: function() {
2690
2690
  var t = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, i = arguments.length > 1 ? arguments[1] : void 0;
2691
- this.connectionInfoPromise = this.measurements.getNetworkInfo(this.iceServers, n), this.eventHandler.callEvent({ event: W.PRECALL_TEST_BEGIN, timestamp: i }), this.connectionInfoPromise.then(function(a) {
2692
- t.eventHandler.callEvent({ event: W.PRECALL_TEST_COMPLETE, metaData: { connectionInfo: a }, timestamp: i });
2691
+ this.connectionInfoPromise = this.measurements.getNetworkInfo(this.iceServers, n), this.eventHandler.callEvent({ event: q.PRECALL_TEST_BEGIN, timestamp: i }), this.connectionInfoPromise.then(function(a) {
2692
+ t.eventHandler.callEvent({ event: q.PRECALL_TEST_COMPLETE, metaData: { connectionInfo: a }, timestamp: i });
2693
2693
  });
2694
2694
  } }, { key: "sendScreenShareToggleEvent", value: function(t) {
2695
2695
  var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, i = arguments.length > 2 ? arguments[2] : void 0;
2696
- this.currentUserMediaStates.screen = t, this.eventHandler.callEvent({ event: t ? W.SCREENSHARE_STARTED : W.SCREENSHARE_STOPPED, metaData: { ssrc: n }, timestamp: i });
2696
+ this.currentUserMediaStates.screen = t, this.eventHandler.callEvent({ event: t ? q.SCREENSHARE_STARTED : q.SCREENSHARE_STOPPED, metaData: { ssrc: n }, timestamp: i });
2697
2697
  } }, { key: "sendScreenShareRequestedEvent", value: function(t) {
2698
- this.eventHandler.callEvent({ event: W.SCREENSHARE_START_REQUESTED, timestamp: t });
2698
+ this.eventHandler.callEvent({ event: q.SCREENSHARE_START_REQUESTED, timestamp: t });
2699
2699
  } }, { key: "sendActiveSpeakerEvent", value: function(t, n) {
2700
- this.eventHandler.callEvent({ event: W.DOMINANT_SPEAKER, metaData: { peerId: t }, timestamp: n });
2700
+ this.eventHandler.callEvent({ event: q.DOMINANT_SPEAKER, metaData: { peerId: t }, timestamp: n });
2701
2701
  } }, { key: "devices", value: function(t, n, i) {
2702
- this.eventHandler.callEvent({ event: t === ln.AUDIO && W.AUDIO_DEVICES_UPDATES || t === ln.VIDEO && W.VIDEO_DEVICES_UPDATES || t === ln.SPEAKER && W.SPEAKER_DEVICES_UPDATES, metaData: { deviceList: n }, timestamp: i });
2702
+ this.eventHandler.callEvent({ event: t === ln.AUDIO && q.AUDIO_DEVICES_UPDATES || t === ln.VIDEO && q.VIDEO_DEVICES_UPDATES || t === ln.SPEAKER && q.SPEAKER_DEVICES_UPDATES, metaData: { deviceList: n }, timestamp: i });
2703
2703
  } }, { key: "selectedDevice", value: function(t, n, i) {
2704
- this.eventHandler.callEvent({ event: t === ln.AUDIO && W.SELECTED_MICROHPONE_UPDATE || t === ln.VIDEO && W.SELECTED_CAMERA_UPDATE || t === ln.SPEAKER && W.SELECTED_SPEAKER_UPDATE, metaData: { device: n }, timestamp: i });
2704
+ this.eventHandler.callEvent({ event: t === ln.AUDIO && q.SELECTED_MICROHPONE_UPDATE || t === ln.VIDEO && q.SELECTED_CAMERA_UPDATE || t === ln.SPEAKER && q.SELECTED_SPEAKER_UPDATE, metaData: { device: n }, timestamp: i });
2705
2705
  } }, { key: "mediaPermission", value: function(t, n, i) {
2706
- this.eventHandler.callEvent({ event: W.MEDIA_PERMISSION, metaData: { deviceType: t, permission: n }, timestamp: i });
2706
+ this.eventHandler.callEvent({ event: q.MEDIA_PERMISSION, metaData: { deviceType: t, permission: n }, timestamp: i });
2707
2707
  } }, { key: "mediaPlaybackFailed", value: function(t, n) {
2708
- this.eventHandler.callEvent({ event: t === ln.AUDIO && W.AUDIO_PLAY_FAILED || t === ln.VIDEO && W.VIDEO_PLAY_FAILED, metaData: { deviceType: t }, timestamp: n });
2708
+ this.eventHandler.callEvent({ event: t === ln.AUDIO && q.AUDIO_PLAY_FAILED || t === ln.VIDEO && q.VIDEO_PLAY_FAILED, metaData: { deviceType: t }, timestamp: n });
2709
2709
  } }, { key: "mediaTrackMuted", value: function(t, n) {
2710
- this.eventHandler.callEvent({ event: t === ln.AUDIO && W.AUDIO_TRACK_MUTED || t === ln.VIDEO && W.VIDEO_TRACK_MUTED, metaData: { deviceType: t }, timestamp: n });
2710
+ this.eventHandler.callEvent({ event: t === ln.AUDIO && q.AUDIO_TRACK_MUTED || t === ln.VIDEO && q.VIDEO_TRACK_MUTED, metaData: { deviceType: t }, timestamp: n });
2711
2711
  } }, { key: "tabChanged", value: function(t, n) {
2712
- this.eventHandler.callEvent({ event: W.TAB_CHANGE, metaData: { isMeetingsTabActive: t }, timestamp: n });
2712
+ this.eventHandler.callEvent({ event: q.TAB_CHANGE, metaData: { isMeetingsTabActive: t }, timestamp: n });
2713
2713
  } }, { key: "browserBackgrounded", value: function(t) {
2714
- this.eventHandler.callEvent({ event: W.BROWSER_BACKGROUNDED, timestamp: t });
2714
+ this.eventHandler.callEvent({ event: q.BROWSER_BACKGROUNDED, timestamp: t });
2715
2715
  } }, { key: "browserForegrounded", value: function(t) {
2716
- this.eventHandler.callEvent({ event: W.BROWSER_FOREGROUNDED, timestamp: t });
2716
+ this.eventHandler.callEvent({ event: q.BROWSER_FOREGROUNDED, timestamp: t });
2717
2717
  } }, { key: "legacySwitch", value: function(t, n) {
2718
- this.eventHandler.callEvent({ event: W.LEGACY_SWITCH, metadata: { on: t }, timestamp: n });
2718
+ this.eventHandler.callEvent({ event: q.LEGACY_SWITCH, metadata: { on: t }, timestamp: n });
2719
2719
  } }, { key: "getPreCallTestResults", value: function() {
2720
2720
  var e = m(/* @__PURE__ */ h().m(function n() {
2721
2721
  return h().w(function(i) {
@@ -2731,10 +2731,10 @@ var he = function(r, e) {
2731
2731
  }
2732
2732
  return t;
2733
2733
  }() }, { key: "sendCallJoinBeginEvent", value: function(t, n) {
2734
- t = V(V({}, t), {}, { meetingEnv: this.env }), t.deviceInfo = V(V({}, t.deviceInfo), {}, { userAgent: navigator.userAgent, cpus: navigator.hardwareConcurrency, memory: navigator.deviceMemory }), this.eventHandler.callEvent({ event: W.CALL_JOIN_BEGIN, metaData: { peerMetaData: t }, timestamp: n });
2734
+ t = V(V({}, t), {}, { meetingEnv: this.env }), t.deviceInfo = V(V({}, t.deviceInfo), {}, { userAgent: navigator.userAgent, cpus: navigator.hardwareConcurrency, memory: navigator.deviceMemory }), this.eventHandler.callEvent({ event: q.CALL_JOIN_BEGIN, metaData: { peerMetaData: t }, timestamp: n });
2735
2735
  } }, { key: "sendNetworkQualityTestBeginEvent", value: function(t, n) {
2736
2736
  var i = this;
2737
- this.eventHandler.callEvent({ event: W.NET_QUALITY_TEST_BEGIN, timestamp: n });
2737
+ this.eventHandler.callEvent({ event: q.NET_QUALITY_TEST_BEGIN, timestamp: n });
2738
2738
  var a = new Promise(/* @__PURE__ */ function() {
2739
2739
  var o = m(/* @__PURE__ */ h().m(function c(l, d) {
2740
2740
  var p, v, f, g, k, y, S, T;
@@ -2785,22 +2785,22 @@ var he = function(r, e) {
2785
2785
  };
2786
2786
  }());
2787
2787
  a.then(function(o) {
2788
- i.eventHandler.callEvent({ event: W.NET_QUALITY_TEST_END, timestamp: n, metaData: o });
2788
+ i.eventHandler.callEvent({ event: q.NET_QUALITY_TEST_END, timestamp: n, metaData: o });
2789
2789
  });
2790
2790
  } }, { key: "sendWebSocketConnectedEvent", value: function(t) {
2791
- this.eventHandler.callEvent({ event: W.WEBSOCKET_CONNECTED, timestamp: t });
2791
+ this.eventHandler.callEvent({ event: q.WEBSOCKET_CONNECTED, timestamp: t });
2792
2792
  } }, { key: "sendTransportConnectedEvent", value: function(t) {
2793
- this.eventHandler.callEvent({ event: W.TRANSPORT_CONNECTED, timestamp: t });
2793
+ this.eventHandler.callEvent({ event: q.TRANSPORT_CONNECTED, timestamp: t });
2794
2794
  } }, { key: "sendAudioToggleEvent", value: function(t, n) {
2795
2795
  this.currentUserMediaStates.audio = t;
2796
2796
  var i;
2797
- t ? i = W.AUDIO_ON : i = W.AUDIO_OFF, this.eventHandler.callEvent({ event: i, timestamp: n });
2797
+ t ? i = q.AUDIO_ON : i = q.AUDIO_OFF, this.eventHandler.callEvent({ event: i, timestamp: n });
2798
2798
  } }, { key: "sendVideoToggleEvent", value: function(t, n) {
2799
2799
  this.currentUserMediaStates.video = t;
2800
2800
  var i;
2801
- t ? i = W.VIDEO_ON : i = W.VIDEO_OFF, this.eventHandler.callEvent({ event: i, timestamp: n });
2801
+ t ? i = q.VIDEO_ON : i = q.VIDEO_OFF, this.eventHandler.callEvent({ event: i, timestamp: n });
2802
2802
  } }, { key: "sendParticipantRoleToggleEvent", value: function(t, n) {
2803
- this.eventHandler.callEvent({ event: W.PARTICIPANT_ROLE, timestamp: n, metaData: t });
2803
+ this.eventHandler.callEvent({ event: q.PARTICIPANT_ROLE, timestamp: n, metaData: t });
2804
2804
  } }, { key: "startPingStats", value: function() {
2805
2805
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 7e3;
2806
2806
  this.sendPingStatsEvent(!1, new Date()), this.pingStatsTimeout = setInterval(this.sendPingStatsEvent.bind(this), t);
@@ -2867,7 +2867,7 @@ var he = function(r, e) {
2867
2867
  case 11:
2868
2868
  return _.a(2);
2869
2869
  case 12:
2870
- this.eventHandler.callEvent({ event: W.PING_STAT, metaData: I, timestamp: v });
2870
+ this.eventHandler.callEvent({ event: q.PING_STAT, metaData: I, timestamp: v });
2871
2871
  case 13:
2872
2872
  return _.a(2);
2873
2873
  }
@@ -2878,191 +2878,191 @@ var he = function(r, e) {
2878
2878
  }
2879
2879
  return t;
2880
2880
  }() }, { key: "sendIVSPlayerRebufferEvent", value: function(t) {
2881
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_REBUFFERING, timestamp: t });
2881
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_REBUFFERING, timestamp: t });
2882
2882
  } }, { key: "sendIVSPlayerAudioBlockEvent", value: function(t) {
2883
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_AUDIO_BLOCKED, timestamp: t });
2883
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_AUDIO_BLOCKED, timestamp: t });
2884
2884
  } }, { key: "sendIVSPlayerPlaybackBlockedEvent", value: function(t) {
2885
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_PLAYBACK_BLOCKED, timestamp: t });
2885
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_PLAYBACK_BLOCKED, timestamp: t });
2886
2886
  } }, { key: "sendIVSPlayerNetworkUnavailableEvent", value: function(t) {
2887
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_NETWORK_UNAVAILABLE, timestamp: t });
2887
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_NETWORK_UNAVAILABLE, timestamp: t });
2888
2888
  } }, { key: "sendIVSPlayerInitializedEvent", value: function(t) {
2889
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_INITIALIZED, timestamp: t });
2889
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_INITIALIZED, timestamp: t });
2890
2890
  } }, { key: "sendIVSPlayerWorkerErrorEvent", value: function(t) {
2891
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_WORKER_ERROR, timestamp: t });
2891
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_WORKER_ERROR, timestamp: t });
2892
2892
  } }, { key: "sendIVSPlayerErrorEvent", value: function(t, n) {
2893
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_ERROR, timestamp: n, metaData: t });
2893
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_ERROR, timestamp: n, metaData: t });
2894
2894
  } }, { key: "sendIVSPlayerRecoverableErrorEvent", value: function(t, n) {
2895
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_RECOVERABLE_ERROR, timestamp: n, metaData: t });
2895
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_RECOVERABLE_ERROR, timestamp: n, metaData: t });
2896
2896
  } }, { key: "sendIVSPlayerAnalyticsEvent", value: function(t, n) {
2897
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_ANALYTICS_EVENT, timestamp: n, metaData: t });
2897
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_ANALYTICS_EVENT, timestamp: n, metaData: t });
2898
2898
  } }, { key: "sendIVSPlayerPlaybackRateChangedEvent", value: function(t, n) {
2899
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_PLAYBACK_RATE_CHANGED, timestamp: n, metaData: { updatedPlaybackRate: t } });
2899
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_PLAYBACK_RATE_CHANGED, timestamp: n, metaData: { updatedPlaybackRate: t } });
2900
2900
  } }, { key: "sendIVSPlayerQualityChanged", value: function(t, n) {
2901
- this.eventHandler.callEvent({ event: W.IVS_PLAYER_QUALITY_CHANGED, timestamp: n, metaData: t });
2901
+ this.eventHandler.callEvent({ event: q.IVS_PLAYER_QUALITY_CHANGED, timestamp: n, metaData: t });
2902
2902
  } }, { key: "sendPlayerLiveLatency", value: function(t, n) {
2903
- this.eventHandler.callEvent({ event: W.LIVESTREAM_LATENCY, timestamp: n, metaData: { latency: t } });
2903
+ this.eventHandler.callEvent({ event: q.LIVESTREAM_LATENCY, timestamp: n, metaData: { latency: t } });
2904
2904
  } }, { key: "sendDisconnectEvent", value: function(t) {
2905
- this.eventHandler.callEvent({ event: W.DISCONNECT, timestamp: t });
2905
+ this.eventHandler.callEvent({ event: q.DISCONNECT, timestamp: t });
2906
2906
  } }, { key: "sendReconnectEvent", value: function(t) {
2907
- this.eventHandler.callEvent({ event: W.RECONNECT_ATTEMPT, timestamp: t });
2907
+ this.eventHandler.callEvent({ event: q.RECONNECT_ATTEMPT, timestamp: t });
2908
2908
  } }, { key: "expectedVideoResolution", value: function(t, n, i) {
2909
- this.eventHandler.callEvent({ event: W.EXPECTED_VIDEO_RESOLUTION, timestamp: i, metaData: { frameWidth: t, frameHeight: n } });
2909
+ this.eventHandler.callEvent({ event: q.EXPECTED_VIDEO_RESOLUTION, timestamp: i, metaData: { frameWidth: t, frameHeight: n } });
2910
2910
  } }, { key: "expectedScreenshareResolution", value: function(t, n, i) {
2911
- this.eventHandler.callEvent({ event: W.EXPECTED_SCREENSHARE_RESOLUTION, timestamp: i, metaData: { frameWidth: t, frameHeight: n } });
2911
+ this.eventHandler.callEvent({ event: q.EXPECTED_SCREENSHARE_RESOLUTION, timestamp: i, metaData: { frameWidth: t, frameHeight: n } });
2912
2912
  } }]);
2913
2913
  }(Pr);
2914
- ue([he(TypeError, function(s, r) {
2915
- return ce.error(r, s);
2914
+ ce([he(TypeError, function(s, r) {
2915
+ return le.error(r, s);
2916
2916
  })], ae.prototype, "registerIceServers", null);
2917
- ue([he(TypeError, function(s, r) {
2918
- return ce.error(r, s);
2917
+ ce([he(TypeError, function(s, r) {
2918
+ return le.error(r, s);
2919
2919
  })], ae.prototype, "registerConsumer", null);
2920
- ue([he(TypeError, function(s, r) {
2921
- return ce.error(r, s);
2920
+ ce([he(TypeError, function(s, r) {
2921
+ return le.error(r, s);
2922
2922
  })], ae.prototype, "registerProducer", null);
2923
- ue([he(TypeError, function(s, r) {
2924
- return ce.error(r, s);
2923
+ ce([he(TypeError, function(s, r) {
2924
+ return le.error(r, s);
2925
2925
  })], ae.prototype, "sendConsumerSharedMediaStateEvent", null);
2926
- ue([he(TypeError, function(s, r) {
2927
- return ce.error(r, s);
2926
+ ce([he(TypeError, function(s, r) {
2927
+ return le.error(r, s);
2928
2928
  })], ae.prototype, "registerProducingTransport", null);
2929
- ue([he(TypeError, function(s, r) {
2930
- return ce.error(r, s);
2929
+ ce([he(TypeError, function(s, r) {
2930
+ return le.error(r, s);
2931
2931
  })], ae.prototype, "registerConsumingTransport", null);
2932
- ue([he(TypeError, function(s, r) {
2933
- return ce.error(r, s);
2932
+ ce([he(TypeError, function(s, r) {
2933
+ return le.error(r, s);
2934
2934
  })], ae.prototype, "deRegisterConsumer", null);
2935
- ue([he(TypeError, function(s, r) {
2936
- return ce.error(r, s);
2935
+ ce([he(TypeError, function(s, r) {
2936
+ return le.error(r, s);
2937
2937
  })], ae.prototype, "deRegisterProducer", null);
2938
- ue([he(TypeError, function(s, r) {
2939
- return ce.error(r, s);
2938
+ ce([he(TypeError, function(s, r) {
2939
+ return le.error(r, s);
2940
2940
  })], ae.prototype, "disconnectConsumingTransport", null);
2941
- ue([he(TypeError, function(s, r) {
2942
- return ce.error(r, s);
2941
+ ce([he(TypeError, function(s, r) {
2942
+ return le.error(r, s);
2943
2943
  })], ae.prototype, "disconnectProducingTransport", null);
2944
- ue([he(TypeError, function(s, r) {
2945
- return ce.error(r, s);
2944
+ ce([he(TypeError, function(s, r) {
2945
+ return le.error(r, s);
2946
2946
  })], ae.prototype, "sendPreCallTestBeginEvent", null);
2947
- ue([he(TypeError, function(s, r) {
2948
- return ce.error(r, s);
2947
+ ce([he(TypeError, function(s, r) {
2948
+ return le.error(r, s);
2949
2949
  })], ae.prototype, "sendScreenShareToggleEvent", null);
2950
- ue([he(TypeError, function(s, r) {
2951
- return ce.error(r, s);
2950
+ ce([he(TypeError, function(s, r) {
2951
+ return le.error(r, s);
2952
2952
  })], ae.prototype, "sendScreenShareRequestedEvent", null);
2953
- ue([he(TypeError, function(s, r) {
2954
- return ce.error(r, s);
2953
+ ce([he(TypeError, function(s, r) {
2954
+ return le.error(r, s);
2955
2955
  })], ae.prototype, "sendActiveSpeakerEvent", null);
2956
- ue([he(TypeError, function(s, r) {
2957
- return ce.error(r, s);
2956
+ ce([he(TypeError, function(s, r) {
2957
+ return le.error(r, s);
2958
2958
  })], ae.prototype, "devices", null);
2959
- ue([he(TypeError, function(s, r) {
2960
- return ce.error(r, s);
2959
+ ce([he(TypeError, function(s, r) {
2960
+ return le.error(r, s);
2961
2961
  })], ae.prototype, "selectedDevice", null);
2962
- ue([he(TypeError, function(s, r) {
2963
- return ce.error(r, s);
2962
+ ce([he(TypeError, function(s, r) {
2963
+ return le.error(r, s);
2964
2964
  })], ae.prototype, "mediaPermission", null);
2965
- ue([he(TypeError, function(s, r) {
2966
- return ce.error(r, s);
2965
+ ce([he(TypeError, function(s, r) {
2966
+ return le.error(r, s);
2967
2967
  })], ae.prototype, "mediaPlaybackFailed", null);
2968
- ue([he(TypeError, function(s, r) {
2969
- return ce.error(r, s);
2968
+ ce([he(TypeError, function(s, r) {
2969
+ return le.error(r, s);
2970
2970
  })], ae.prototype, "mediaTrackMuted", null);
2971
- ue([he(TypeError, function(s, r) {
2972
- return ce.error(r, s);
2971
+ ce([he(TypeError, function(s, r) {
2972
+ return le.error(r, s);
2973
2973
  })], ae.prototype, "tabChanged", null);
2974
- ue([he(TypeError, function(s, r) {
2975
- return ce.error(r, s);
2974
+ ce([he(TypeError, function(s, r) {
2975
+ return le.error(r, s);
2976
2976
  })], ae.prototype, "browserBackgrounded", null);
2977
- ue([he(TypeError, function(s, r) {
2978
- return ce.error(r, s);
2977
+ ce([he(TypeError, function(s, r) {
2978
+ return le.error(r, s);
2979
2979
  })], ae.prototype, "browserForegrounded", null);
2980
- ue([he(TypeError, function(s, r) {
2981
- return ce.error(r, s);
2980
+ ce([he(TypeError, function(s, r) {
2981
+ return le.error(r, s);
2982
2982
  })], ae.prototype, "legacySwitch", null);
2983
- ue([he(TypeError, function(s, r) {
2984
- return ce.error(r, s);
2983
+ ce([he(TypeError, function(s, r) {
2984
+ return le.error(r, s);
2985
2985
  })], ae.prototype, "getPreCallTestResults", null);
2986
- ue([he(TypeError, function(s, r) {
2987
- return ce.error(r, s);
2986
+ ce([he(TypeError, function(s, r) {
2987
+ return le.error(r, s);
2988
2988
  })], ae.prototype, "sendCallJoinBeginEvent", null);
2989
- ue([he(TypeError, function(s, r) {
2990
- return ce.error(r, s);
2989
+ ce([he(TypeError, function(s, r) {
2990
+ return le.error(r, s);
2991
2991
  })], ae.prototype, "sendNetworkQualityTestBeginEvent", null);
2992
- ue([he(TypeError, function(s, r) {
2993
- return ce.error(r, s);
2992
+ ce([he(TypeError, function(s, r) {
2993
+ return le.error(r, s);
2994
2994
  })], ae.prototype, "sendWebSocketConnectedEvent", null);
2995
- ue([he(TypeError, function(s, r) {
2996
- return ce.error(r, s);
2995
+ ce([he(TypeError, function(s, r) {
2996
+ return le.error(r, s);
2997
2997
  })], ae.prototype, "sendTransportConnectedEvent", null);
2998
- ue([he(TypeError, function(s, r) {
2999
- return ce.error(r, s);
2998
+ ce([he(TypeError, function(s, r) {
2999
+ return le.error(r, s);
3000
3000
  })], ae.prototype, "sendAudioToggleEvent", null);
3001
- ue([he(TypeError, function(s, r) {
3002
- return ce.error(r, s);
3001
+ ce([he(TypeError, function(s, r) {
3002
+ return le.error(r, s);
3003
3003
  })], ae.prototype, "sendVideoToggleEvent", null);
3004
- ue([he(TypeError, function(s, r) {
3005
- return ce.error(r, s);
3004
+ ce([he(TypeError, function(s, r) {
3005
+ return le.error(r, s);
3006
3006
  })], ae.prototype, "sendParticipantRoleToggleEvent", null);
3007
- ue([he(TypeError, function(s, r) {
3008
- return ce.error(r, s);
3007
+ ce([he(TypeError, function(s, r) {
3008
+ return le.error(r, s);
3009
3009
  })], ae.prototype, "startPingStats", null);
3010
- ue([he(TypeError, function(s, r) {
3011
- return ce.error(r, s);
3010
+ ce([he(TypeError, function(s, r) {
3011
+ return le.error(r, s);
3012
3012
  })], ae.prototype, "stopPingStats", null);
3013
- ue([he(TypeError, function(s, r) {
3014
- return ce.error(r, s);
3013
+ ce([he(TypeError, function(s, r) {
3014
+ return le.error(r, s);
3015
3015
  })], ae.prototype, "sendPingStatsEvent", null);
3016
- ue([he(TypeError, function(s, r) {
3017
- return ce.error(r, s);
3016
+ ce([he(TypeError, function(s, r) {
3017
+ return le.error(r, s);
3018
3018
  })], ae.prototype, "sendIVSPlayerRebufferEvent", null);
3019
- ue([he(TypeError, function(s, r) {
3020
- return ce.error(r, s);
3019
+ ce([he(TypeError, function(s, r) {
3020
+ return le.error(r, s);
3021
3021
  })], ae.prototype, "sendIVSPlayerAudioBlockEvent", null);
3022
- ue([he(TypeError, function(s, r) {
3023
- return ce.error(r, s);
3022
+ ce([he(TypeError, function(s, r) {
3023
+ return le.error(r, s);
3024
3024
  })], ae.prototype, "sendIVSPlayerPlaybackBlockedEvent", null);
3025
- ue([he(TypeError, function(s, r) {
3026
- return ce.error(r, s);
3025
+ ce([he(TypeError, function(s, r) {
3026
+ return le.error(r, s);
3027
3027
  })], ae.prototype, "sendIVSPlayerNetworkUnavailableEvent", null);
3028
- ue([he(TypeError, function(s, r) {
3029
- return ce.error(r, s);
3028
+ ce([he(TypeError, function(s, r) {
3029
+ return le.error(r, s);
3030
3030
  })], ae.prototype, "sendIVSPlayerInitializedEvent", null);
3031
- ue([he(TypeError, function(s, r) {
3032
- return ce.error(r, s);
3031
+ ce([he(TypeError, function(s, r) {
3032
+ return le.error(r, s);
3033
3033
  })], ae.prototype, "sendIVSPlayerWorkerErrorEvent", null);
3034
- ue([he(TypeError, function(s, r) {
3035
- return ce.error(r, s);
3034
+ ce([he(TypeError, function(s, r) {
3035
+ return le.error(r, s);
3036
3036
  })], ae.prototype, "sendIVSPlayerErrorEvent", null);
3037
- ue([he(TypeError, function(s, r) {
3038
- return ce.error(r, s);
3037
+ ce([he(TypeError, function(s, r) {
3038
+ return le.error(r, s);
3039
3039
  })], ae.prototype, "sendIVSPlayerRecoverableErrorEvent", null);
3040
- ue([he(TypeError, function(s, r) {
3041
- return ce.error(r, s);
3040
+ ce([he(TypeError, function(s, r) {
3041
+ return le.error(r, s);
3042
3042
  })], ae.prototype, "sendIVSPlayerAnalyticsEvent", null);
3043
- ue([he(TypeError, function(s, r) {
3044
- return ce.error(r, s);
3043
+ ce([he(TypeError, function(s, r) {
3044
+ return le.error(r, s);
3045
3045
  })], ae.prototype, "sendIVSPlayerPlaybackRateChangedEvent", null);
3046
- ue([he(TypeError, function(s, r) {
3047
- return ce.error(r, s);
3046
+ ce([he(TypeError, function(s, r) {
3047
+ return le.error(r, s);
3048
3048
  })], ae.prototype, "sendIVSPlayerQualityChanged", null);
3049
- ue([he(TypeError, function(s, r) {
3050
- return ce.error(r, s);
3049
+ ce([he(TypeError, function(s, r) {
3050
+ return le.error(r, s);
3051
3051
  })], ae.prototype, "sendPlayerLiveLatency", null);
3052
- ue([he(TypeError, function(s, r) {
3053
- return ce.error(r, s);
3052
+ ce([he(TypeError, function(s, r) {
3053
+ return le.error(r, s);
3054
3054
  })], ae.prototype, "sendDisconnectEvent", null);
3055
- ue([he(TypeError, function(s, r) {
3056
- return ce.error(r, s);
3055
+ ce([he(TypeError, function(s, r) {
3056
+ return le.error(r, s);
3057
3057
  })], ae.prototype, "sendReconnectEvent", null);
3058
- ue([he(TypeError, function(s, r) {
3059
- return ce.error(r, s);
3058
+ ce([he(TypeError, function(s, r) {
3059
+ return le.error(r, s);
3060
3060
  })], ae.prototype, "expectedVideoResolution", null);
3061
- ue([he(TypeError, function(s, r) {
3062
- return ce.error(r, s);
3061
+ ce([he(TypeError, function(s, r) {
3062
+ return le.error(r, s);
3063
3063
  })], ae.prototype, "expectedScreenshareResolution", null);
3064
- ae = ue([yy(TypeError, function(s, r) {
3065
- return ce.error(r, s);
3064
+ ae = ce([yy(TypeError, function(s, r) {
3065
+ return le.error(r, s);
3066
3066
  })], ae);
3067
3067
  var ky = ae, Lf = /* @__PURE__ */ function(s) {
3068
3068
  function r() {
@@ -4679,8 +4679,8 @@ function up(s, r, e) {
4679
4679
  return l = _, o = setTimeout(S, r), d ? f(_) : a;
4680
4680
  }
4681
4681
  function k(_) {
4682
- var O = _ - c, L = _ - l, q = r - O;
4683
- return p ? aP(q, i - L) : q;
4682
+ var O = _ - c, L = _ - l, B = r - O;
4683
+ return p ? aP(B, i - L) : B;
4684
4684
  }
4685
4685
  function y(_) {
4686
4686
  var O = _ - c, L = _ - l;
@@ -5250,24 +5250,24 @@ Object.keys(Qc).forEach(function(s) {
5250
5250
  });
5251
5251
  var j = /* @__PURE__ */ function(s) {
5252
5252
  function r(e, t) {
5253
- var n, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
5254
- b(this, r), n = C(this, r, [e]), n.code = void 0, n.code = t, n.name = "ClientError";
5255
- var o = n.code ? "[ERR".concat(n.code, "]") : "[ERR]", c = n.code ? Qc[n.code] : "";
5256
- n.message = "".concat(o, ": ").concat(c, `
5253
+ var n, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : void 0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : void 0;
5254
+ b(this, r), n = C(this, r, [e]), n.code = void 0, n.reason = void 0, n.code = t, n.name = "ClientError", n.reason = o;
5255
+ var c = n.code ? "[ERR".concat(n.code, "]") : "[ERR]", l = n.code ? Qc[n.code] : "";
5256
+ n.message = "".concat(c, ": ").concat(l, `
5257
5257
  `).concat(n.message);
5258
5258
  try {
5259
- var l = a && !!i;
5260
- t && t.endsWith("00") && i && (l = !0), l && i.error("ClientError", { error: { message: n.message, name: n.name, code: t } });
5261
- var d = _a.getContext(_a.getMostRecentPeerId());
5262
- if (d) {
5263
- var p = d.getValue("onError");
5259
+ var d = a && !!i;
5260
+ t && t.endsWith("00") && i && (d = !0), d && i.error("ClientError", { error: { message: n.message, name: n.name, code: t } });
5261
+ var p = _a.getContext(_a.getMostRecentPeerId());
5262
+ if (p) {
5263
+ var v = p.getValue("onError");
5264
5264
  try {
5265
- p(n);
5266
- } catch (v) {
5265
+ v(n);
5266
+ } catch (f) {
5267
5267
  }
5268
5268
  }
5269
5269
  typeof window != "undefined" && window.dispatchEvent(new CustomEvent("ClientError", { detail: n }));
5270
- } catch (v) {
5270
+ } catch (f) {
5271
5271
  }
5272
5272
  return n;
5273
5273
  }
@@ -5337,9 +5337,9 @@ var dr = function(r) {
5337
5337
  return NP(Error, r);
5338
5338
  }, jn = /* @__PURE__ */ function(s) {
5339
5339
  return s.GroupCall = "GROUP_CALL", s.Webinar = "WEBINAR", s.AudioRoom = "AUDIO_ROOM", s.Livestream = "LIVESTREAM", s.Chat = "CHAT", s;
5340
- }(jn || {}), se = /* @__PURE__ */ function(s) {
5340
+ }(jn || {}), oe = /* @__PURE__ */ function(s) {
5341
5341
  return s.Allowed = "ALLOWED", s.NotAllowed = "NOT_ALLOWED", s.CanRequest = "CAN_REQUEST", s;
5342
- }(se || {});
5342
+ }(oe || {});
5343
5343
  if (typeof process != "undefined") {
5344
5344
  var yo;
5345
5345
  (yo = process) !== null && yo !== void 0 && (yo = yo.env) !== null && yo !== void 0 && yo.FLAGSMITH_ENVIRONMENT_KEY && process.env.FLAGSMITH_ENVIRONMENT_KEY;
@@ -5400,8 +5400,8 @@ var jP = function(r, e, t) {
5400
5400
  for (M.s(); !(_ = M.n()).done; ) {
5401
5401
  var O = _.value, L = void 0;
5402
5402
  O < 0 ? L = k + O * I * t : O > 0 ? L = k + O * E * t : L = k;
5403
- var q = jP(v, f, L / 100), X = Ge(q, 3), Y = X[0], H = X[1], J = X[2];
5404
- n.push(FP(Y, H, J));
5403
+ var B = jP(v, f, L / 100), X = Ge(B, 3), Z = X[0], W = X[1], K = X[2];
5404
+ n.push(FP(Z, W, K));
5405
5405
  }
5406
5406
  } catch (N) {
5407
5407
  M.e(N);
@@ -10541,7 +10541,7 @@ function Og(s, r) {
10541
10541
  return e[t] = r | s[t], e;
10542
10542
  }, {});
10543
10543
  }
10544
- var z = wc(G1, Y1), Zt = wc(J1, X1), ji = wc(K1, Z1), Ui = wc(z1, x1), Sa = Og(Mg, 16777216), $n = Og(Mg, 50331648), Yc = wc(Q1, eA), tA = Object.defineProperty, rA = Object.getOwnPropertyDescriptor, Oa = function(r, e, t, n) {
10544
+ var Q = wc(G1, Y1), Zt = wc(J1, X1), ji = wc(K1, Z1), Ui = wc(z1, x1), Sa = Og(Mg, 16777216), $n = Og(Mg, 50331648), Yc = wc(Q1, eA), tA = Object.defineProperty, rA = Object.getOwnPropertyDescriptor, Oa = function(r, e, t, n) {
10545
10545
  for (var i = n > 1 ? void 0 : n ? rA(e, t) : e, a = r.length - 1, o; a >= 0; a--)
10546
10546
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
10547
10547
  return n && i && tA(e, t, i), i;
@@ -10821,8 +10821,8 @@ var ml = /* @__PURE__ */ function(s) {
10821
10821
  case 5:
10822
10822
  T = O.v;
10823
10823
  case 6:
10824
- if (I = {}, S.headers.forEach(function(L, q) {
10825
- I[q] = L;
10824
+ if (I = {}, S.headers.forEach(function(L, B) {
10825
+ I[B] = L;
10826
10826
  }), M = { data: T, status: S.status, statusText: S.statusText, headers: I, config: n }, S.ok) {
10827
10827
  O.n = 7;
10828
10828
  break;
@@ -10913,36 +10913,36 @@ var ml = /* @__PURE__ */ function(s) {
10913
10913
  var k = this.requests.request.bind(this.requests);
10914
10914
  this.requests.request = /* @__PURE__ */ function() {
10915
10915
  var y = m(/* @__PURE__ */ h().m(function S(T) {
10916
- var E, I, M, _, O, L, q, X, Y, H;
10917
- return h().w(function(J) {
10916
+ var E, I, M, _, O, L, B, X, Z, W;
10917
+ return h().w(function(K) {
10918
10918
  for (; ; )
10919
- switch (J.p = J.n) {
10919
+ switch (K.p = K.n) {
10920
10920
  case 0:
10921
- return E = r.getValue("telemetry"), J.p = 1, E.injectContext(t.requests.defaults.headers.common), J.n = 2, k(T);
10921
+ return E = r.getValue("telemetry"), K.p = 1, E.injectContext(t.requests.defaults.headers.common), K.n = 2, k(T);
10922
10922
  case 2:
10923
- return I = J.v, T.url !== E.logsEndpoint && t.logger.debug("XHR - Fetched ".concat(T.method, ":").concat(T.url, " with status ").concat(I.status), { networkCall: { status: I.status, statusText: I.statusText, baseURL: T.baseURL || t.requests.defaults.baseURL, url: T.url, method: T.method } }), J.a(2, I);
10923
+ return I = K.v, T.url !== E.logsEndpoint && t.logger.debug("XHR - Fetched ".concat(T.method, ":").concat(T.url, " with status ").concat(I.status), { networkCall: { status: I.status, statusText: I.statusText, baseURL: T.baseURL || t.requests.defaults.baseURL, url: T.url, method: T.method } }), K.a(2, I);
10924
10924
  case 3:
10925
- if (J.p = 3, H = J.v, H) {
10926
- J.n = 4;
10925
+ if (K.p = 3, W = K.v, W) {
10926
+ K.n = 4;
10927
10927
  break;
10928
10928
  }
10929
10929
  throw new j("Unknown network error occurred", "0011");
10930
10930
  case 4:
10931
- if (!(H instanceof j)) {
10932
- J.n = 5;
10931
+ if (!(W instanceof j)) {
10932
+ K.n = 5;
10933
10933
  break;
10934
10934
  }
10935
- throw H;
10935
+ throw W;
10936
10936
  case 5:
10937
- if (!(H instanceof ml)) {
10938
- J.n = 6;
10937
+ if (!(W instanceof ml)) {
10938
+ K.n = 6;
10939
10939
  break;
10940
10940
  }
10941
- throw H;
10941
+ throw W;
10942
10942
  case 6:
10943
- throw ((M = H.config) === null || M === void 0 ? void 0 : M.url) !== E.logsEndpoint && t.logger.error("XHR - Fetch failed on ".concat(T.method, ":").concat(T.url, " with status ").concat(H.status, ". Retry: ").concat((_ = H.config) === null || _ === void 0 ? void 0 : _.retry), { error: H, networkCall: { status: H.status, statusText: H.statusText, baseURL: ((O = H.config) === null || O === void 0 ? void 0 : O.baseURL) || t.requests.defaults.baseURL, url: (L = H.config) === null || L === void 0 ? void 0 : L.url, retries: (q = H.config) === null || q === void 0 ? void 0 : q.retry, method: (X = H.config) === null || X === void 0 ? void 0 : X.method, isOnline: navigator.onLine ? "online" : "offline" } }), Y = H instanceof Error && H.message || "Network request failed", new j(Y, "0011"), new ml(H);
10943
+ throw ((M = W.config) === null || M === void 0 ? void 0 : M.url) !== E.logsEndpoint && t.logger.error("XHR - Fetch failed on ".concat(T.method, ":").concat(T.url, " with status ").concat(W.status, ". Retry: ").concat((_ = W.config) === null || _ === void 0 ? void 0 : _.retry), { error: W, networkCall: { status: W.status, statusText: W.statusText, baseURL: ((O = W.config) === null || O === void 0 ? void 0 : O.baseURL) || t.requests.defaults.baseURL, url: (L = W.config) === null || L === void 0 ? void 0 : L.url, retries: (B = W.config) === null || B === void 0 ? void 0 : B.retry, method: (X = W.config) === null || X === void 0 ? void 0 : X.method, isOnline: navigator.onLine ? "online" : "offline" } }), Z = W instanceof Error && W.message || "Network request failed", new j(Z, "0011"), new ml(W);
10944
10944
  case 7:
10945
- return J.a(2);
10945
+ return K.a(2);
10946
10946
  }
10947
10947
  }, S, null, [[1, 3]]);
10948
10948
  }));
@@ -11495,106 +11495,106 @@ var hA = Object.defineProperty, pA = Object.getOwnPropertyDescriptor, fi = funct
11495
11495
  */
11496
11496
  }, { key: "sendCustomMessage", value: function() {
11497
11497
  var e = m(/* @__PURE__ */ h().m(function n(i, a) {
11498
- var o, c, l, d = this, p, v, f, g, k, y, S, T, E, I, M, _, O, L, q, X, Y;
11499
- return h().w(function(H) {
11498
+ var o, c, l, d = this, p, v, f, g, k, y, S, T, E, I, M, _, O, L, B, X, Z;
11499
+ return h().w(function(W) {
11500
11500
  for (; ; )
11501
- switch (H.n) {
11501
+ switch (W.n) {
11502
11502
  case 0:
11503
11503
  if (!(a && a.length > 0)) {
11504
- H.n = 2;
11504
+ W.n = 2;
11505
11505
  break;
11506
11506
  }
11507
11507
  if (!(!((S = u(this, ee)[ee].permissions) !== null && S !== void 0 && S.chatPrivate.canSend) || !((T = u(this, ee)[ee].permissions) !== null && T !== void 0 && T.chatPrivate.files) || !((E = u(this, ee)[ee].permissions) !== null && E !== void 0 && E.chatPrivate.text))) {
11508
- H.n = 1;
11508
+ W.n = 1;
11509
11509
  break;
11510
11510
  }
11511
- return this.logger.error("sendCustomMessage::private_chat_permission_denied"), H.a(2);
11511
+ return this.logger.error("sendCustomMessage::private_chat_permission_denied"), W.a(2);
11512
11512
  case 1:
11513
- H.n = 3;
11513
+ W.n = 3;
11514
11514
  break;
11515
11515
  case 2:
11516
11516
  if (!(!((o = u(this, ee)[ee].permissions) !== null && o !== void 0 && (o = o.chatPublic) !== null && o !== void 0 && o.canSend) || !((c = u(this, ee)[ee].permissions) !== null && c !== void 0 && (c = c.chatPublic) !== null && c !== void 0 && c.files) || !((l = u(this, ee)[ee].permissions) !== null && l !== void 0 && (l = l.chatPublic) !== null && l !== void 0 && l.text))) {
11517
- H.n = 3;
11517
+ W.n = 3;
11518
11518
  break;
11519
11519
  }
11520
- return this.logger.error("sendCustomMessage::permission_denied"), H.a(2);
11520
+ return this.logger.error("sendCustomMessage::permission_denied"), W.a(2);
11521
11521
  case 3:
11522
11522
  return I = /* @__PURE__ */ function() {
11523
- var J = m(/* @__PURE__ */ h().m(function N(U) {
11524
- var x, le, Re, pe, Le;
11525
- return h().w(function(Q) {
11523
+ var K = m(/* @__PURE__ */ h().m(function N(U) {
11524
+ var J, se, Re, pe, Le;
11525
+ return h().w(function(Y) {
11526
11526
  for (; ; )
11527
- switch (Q.p = Q.n) {
11527
+ switch (Y.p = Y.n) {
11528
11528
  case 0:
11529
- if (Q.p = 0, typeof U != "string") {
11530
- Q.n = 1;
11529
+ if (Y.p = 0, typeof U != "string") {
11530
+ Y.n = 1;
11531
11531
  break;
11532
11532
  }
11533
- return Q.a(2, { link: U });
11533
+ return Y.a(2, { link: U });
11534
11534
  case 1:
11535
- return x = Zr(), Q.n = 2, x.getPresignedUrls(U.name);
11535
+ return J = Zr(), Y.n = 2, J.getPresignedUrls(U.name);
11536
11536
  case 2:
11537
- return le = Q.v, Re = le.getLocation, pe = le.putLocation, Q.n = 3, x.uploadFile(U, pe);
11537
+ return se = Y.v, Re = se.getLocation, pe = se.putLocation, Y.n = 3, J.uploadFile(U, pe);
11538
11538
  case 3:
11539
- return Q.a(2, { link: Re, type: U.type, name: U.name, size: U.size });
11539
+ return Y.a(2, { link: Re, type: U.type, name: U.name, size: U.size });
11540
11540
  case 4:
11541
- throw Q.p = 4, Le = Q.v, new j("Error sending image message.", "0500", d.logger);
11541
+ throw Y.p = 4, Le = Y.v, new j("Error sending image message.", "0500", d.logger);
11542
11542
  case 5:
11543
- return Q.a(2);
11543
+ return Y.a(2);
11544
11544
  }
11545
11545
  }, N, null, [[0, 4]]);
11546
11546
  }));
11547
11547
  return function(U) {
11548
- return J.apply(this, arguments);
11548
+ return K.apply(this, arguments);
11549
11549
  };
11550
- }(), _ = V, O = V({}, i), L = {}, H.n = 4, Promise.all((p = (v = i.files) !== null && v !== void 0 ? v : []) === null || p === void 0 ? void 0 : p.map(/* @__PURE__ */ function() {
11551
- var J = m(/* @__PURE__ */ h().m(function N(U) {
11552
- return h().w(function(x) {
11550
+ }(), _ = V, O = V({}, i), L = {}, W.n = 4, Promise.all((p = (v = i.files) !== null && v !== void 0 ? v : []) === null || p === void 0 ? void 0 : p.map(/* @__PURE__ */ function() {
11551
+ var K = m(/* @__PURE__ */ h().m(function N(U) {
11552
+ return h().w(function(J) {
11553
11553
  for (; ; )
11554
- switch (x.n) {
11554
+ switch (J.n) {
11555
11555
  case 0:
11556
- return x.a(2, I(U));
11556
+ return J.a(2, I(U));
11557
11557
  }
11558
11558
  }, N);
11559
11559
  }));
11560
11560
  return function(N) {
11561
- return J.apply(this, arguments);
11561
+ return K.apply(this, arguments);
11562
11562
  };
11563
11563
  }()));
11564
11564
  case 4:
11565
- return q = H.v, H.n = 5, Promise.all((f = (g = i.images) !== null && g !== void 0 ? g : []) === null || f === void 0 ? void 0 : f.map(/* @__PURE__ */ function() {
11566
- var J = m(/* @__PURE__ */ h().m(function N(U) {
11567
- return h().w(function(x) {
11565
+ return B = W.v, W.n = 5, Promise.all((f = (g = i.images) !== null && g !== void 0 ? g : []) === null || f === void 0 ? void 0 : f.map(/* @__PURE__ */ function() {
11566
+ var K = m(/* @__PURE__ */ h().m(function N(U) {
11567
+ return h().w(function(J) {
11568
11568
  for (; ; )
11569
- switch (x.n) {
11569
+ switch (J.n) {
11570
11570
  case 0:
11571
- return x.a(2, I(U));
11571
+ return J.a(2, I(U));
11572
11572
  }
11573
11573
  }, N);
11574
11574
  }));
11575
11575
  return function(N) {
11576
- return J.apply(this, arguments);
11576
+ return K.apply(this, arguments);
11577
11577
  };
11578
11578
  }()));
11579
11579
  case 5:
11580
- return X = H.v, H.n = 6, Promise.all((k = (y = i.videos) !== null && y !== void 0 ? y : []) === null || k === void 0 ? void 0 : k.map(/* @__PURE__ */ function() {
11581
- var J = m(/* @__PURE__ */ h().m(function N(U) {
11582
- return h().w(function(x) {
11580
+ return X = W.v, W.n = 6, Promise.all((k = (y = i.videos) !== null && y !== void 0 ? y : []) === null || k === void 0 ? void 0 : k.map(/* @__PURE__ */ function() {
11581
+ var K = m(/* @__PURE__ */ h().m(function N(U) {
11582
+ return h().w(function(J) {
11583
11583
  for (; ; )
11584
- switch (x.n) {
11584
+ switch (J.n) {
11585
11585
  case 0:
11586
- return x.a(2, I(U));
11586
+ return J.a(2, I(U));
11587
11587
  }
11588
11588
  }, N);
11589
11589
  }));
11590
11590
  return function(N) {
11591
- return J.apply(this, arguments);
11591
+ return K.apply(this, arguments);
11592
11592
  };
11593
11593
  }()));
11594
11594
  case 6:
11595
- Y = H.v, M = _(O, L, { files: q, images: X, videos: Y }), u(this, Je)[Je].sendMessage(JSON.stringify(M), hn.CUSTOM, a);
11595
+ Z = W.v, M = _(O, L, { files: B, images: X, videos: Z }), u(this, Je)[Je].sendMessage(JSON.stringify(M), hn.CUSTOM, a);
11596
11596
  case 7:
11597
- return H.a(2);
11597
+ return W.a(2);
11598
11598
  }
11599
11599
  }, n, this);
11600
11600
  }));
@@ -12589,7 +12589,7 @@ var NA = Object.defineProperty, VA = Object.getOwnPropertyDescriptor, $A = funct
12589
12589
  } else
12590
12590
  return;
12591
12591
  e.logger.info("Spotlight Assertion Received", { spotlight: { spotlighter: { id: a.userId }, currentTab: { id: (n = a.currentTab) === null || n === void 0 ? void 0 : n.id, type: (i = a.currentTab) === null || i === void 0 ? void 0 : i.type } } }), e.conditionallySetActiveTab(a);
12592
- }), this.aiSocketHandler.on(z.transcript, function(t) {
12592
+ }), this.aiSocketHandler.on(Q.transcript, function(t) {
12593
12593
  var n;
12594
12594
  try {
12595
12595
  n = xd.extractSocketTranscript(t);
@@ -12782,7 +12782,7 @@ var ru = {}, Xi = {
12782
12782
  }
12783
12783
  throw new j("Unable to request access you are currently ".concat(this.status), "2006");
12784
12784
  case 2:
12785
- if (u(this, ie)[ie].permissions.stageAccess !== se.Allowed) {
12785
+ if (u(this, ie)[ie].permissions.stageAccess !== oe.Allowed) {
12786
12786
  i.n = 3;
12787
12787
  break;
12788
12788
  }
@@ -12869,7 +12869,7 @@ var ru = {}, Xi = {
12869
12869
  }
12870
12870
  throw new j("You are already on stage.", "2006");
12871
12871
  case 1:
12872
- if (!(this.status !== "ACCEPTED_TO_JOIN_STAGE" || u(this, ie)[ie].permissions.stageAccess === se.NotAllowed)) {
12872
+ if (!(this.status !== "ACCEPTED_TO_JOIN_STAGE" || u(this, ie)[ie].permissions.stageAccess === oe.NotAllowed)) {
12873
12873
  a.n = 2;
12874
12874
  break;
12875
12875
  }
@@ -13056,20 +13056,20 @@ var qA = Object.defineProperty, WA = Object.getOwnPropertyDescriptor, GA = funct
13056
13056
  var e = this;
13057
13057
  u(this, vt)[vt].subscribe("stageStatus", function(t) {
13058
13058
  e.stage.emit("stageStatusUpdate", t);
13059
- }), u(this, En)[En].on(z.grantStageAccess, function() {
13060
- u(e, Sn)[Sn].permissions.stageAccess !== se.Allowed && (e.stage.emit("stageRequestApproved"), e.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
13061
- }), u(this, En)[En].on(z.peerStageStatusUpdate, function(t) {
13059
+ }), u(this, En)[En].on(Q.grantStageAccess, function() {
13060
+ u(e, Sn)[Sn].permissions.stageAccess !== oe.Allowed && (e.stage.emit("stageRequestApproved"), e.setStageStatus("ACCEPTED_TO_JOIN_STAGE"));
13061
+ }), u(this, En)[En].on(Q.peerStageStatusUpdate, function(t) {
13062
13062
  t !== void 0 && (t.peerId === u(e, Sn)[Sn].id ? e.selfStageStatusHandler(t) : e.peerStageStatusHandler(t));
13063
- }), u(this, En)[En].on(z.denyStageAccess, function() {
13064
- u(e, Sn)[Sn].permissions.stageAccess !== se.Allowed && (e.stage.emit("stageRequestRejected"), e.setStageStatus("OFF_STAGE"));
13065
- }), u(this, En)[En].on(z.getStageRequests, /* @__PURE__ */ function() {
13063
+ }), u(this, En)[En].on(Q.denyStageAccess, function() {
13064
+ u(e, Sn)[Sn].permissions.stageAccess !== oe.Allowed && (e.stage.emit("stageRequestRejected"), e.setStageStatus("OFF_STAGE"));
13065
+ }), u(this, En)[En].on(Q.getStageRequests, /* @__PURE__ */ function() {
13066
13066
  var t = m(/* @__PURE__ */ h().m(function n(i) {
13067
13067
  var a, o;
13068
13068
  return h().w(function(c) {
13069
13069
  for (; ; )
13070
13070
  switch (c.n) {
13071
13071
  case 0:
13072
- if (u(e, Sn)[Sn].permissions.stageAccess === se.Allowed) {
13072
+ if (u(e, Sn)[Sn].permissions.stageAccess === oe.Allowed) {
13073
13073
  c.n = 1;
13074
13074
  break;
13075
13075
  }
@@ -13842,7 +13842,7 @@ var uI = Object.defineProperty, cI = Object.getOwnPropertyDescriptor, lI = funct
13842
13842
  var i = e.getRecordingTypeFromProtoType(n.recordingType);
13843
13843
  return { id: n.recordingId, state: n.recordingStatus, type: i };
13844
13844
  })) : e.recording.recordings.length && e.recording.updateRecordings([]);
13845
- }), this.room.on(z.recordingStarted, function(t) {
13845
+ }), this.room.on(Q.recordingStarted, function(t) {
13846
13846
  var n = !1, i = Me(e.recording.recordings);
13847
13847
  if (i.forEach(function(o) {
13848
13848
  o.id === t.recordingId && (n = !0, o.state = "RECORDING");
@@ -13851,12 +13851,12 @@ var uI = Object.defineProperty, cI = Object.getOwnPropertyDescriptor, lI = funct
13851
13851
  i.push({ id: t.recordingId, state: "RECORDING", type: a });
13852
13852
  }
13853
13853
  e.recording.updateRecordings(i);
13854
- }), this.room.on(z.recordingPaused, function(t) {
13854
+ }), this.room.on(Q.recordingPaused, function(t) {
13855
13855
  var n = Me(e.recording.recordings);
13856
13856
  n.forEach(function(i) {
13857
13857
  i.id === t.recordingId && (i.state = "PAUSED");
13858
13858
  }), e.recording.updateRecordings(n);
13859
- }), this.room.on(z.recordingStopped, function(t) {
13859
+ }), this.room.on(Q.recordingStopped, function(t) {
13860
13860
  var n = Me(e.recording.recordings.filter(function(i) {
13861
13861
  return i.id !== t.recordingId;
13862
13862
  }));
@@ -14910,10 +14910,10 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), dd = /* @__PURE__ */ w("context"
14910
14910
  case 1:
14911
14911
  return l = L.v, L.n = 2, this.getVideoInputDevices();
14912
14912
  case 2:
14913
- return d = L.v, p = !!(l != null && l.find(function(q) {
14914
- return q.deviceId === i;
14915
- })), i && p ? v = i : l && (o = l[0]) !== null && o !== void 0 && o.deviceId && (v = (f = l[0]) === null || f === void 0 ? void 0 : f.deviceId), g = !!(d != null && d.find(function(q) {
14916
- return q.deviceId === a;
14913
+ return d = L.v, p = !!(l != null && l.find(function(B) {
14914
+ return B.deviceId === i;
14915
+ })), i && p ? v = i : l && (o = l[0]) !== null && o !== void 0 && o.deviceId && (v = (f = l[0]) === null || f === void 0 ? void 0 : f.deviceId), g = !!(d != null && d.find(function(B) {
14916
+ return B.deviceId === a;
14917
14917
  })), a && g ? k = a : d && (c = d[0]) !== null && c !== void 0 && c.deviceId && (k = (y = d[0]) === null || y === void 0 ? void 0 : y.deviceId), S = { audio: u(this, qt)[qt].getAudioConstraints(v).audio, video: u(this, qt)[qt].getVideoConstraints(k).video }, this.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(S) }), L.n = 3, navigator.mediaDevices.getUserMedia(S);
14918
14918
  case 3:
14919
14919
  if (T = L.v, this.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(S) }), E = T.getAudioTracks()[0], I = T.getVideoTracks()[0], this.permissions.audio = "ACCEPTED", this.permissions.video = "ACCEPTED", !I.label.includes("OBS Virtual")) {
@@ -14922,8 +14922,8 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), dd = /* @__PURE__ */ w("context"
14922
14922
  }
14923
14923
  return L.n = 4, this.getVideoInputDevices();
14924
14924
  case 4:
14925
- return M = L.v, _ = M.find(function(q) {
14926
- return q.label.includes("OBS Virtual");
14925
+ return M = L.v, _ = M.find(function(B) {
14926
+ return B.label.includes("OBS Virtual");
14927
14927
  }), L.n = 5, this.getVideoTrack(_.deviceId);
14928
14928
  case 5:
14929
14929
  I = L.v;
@@ -14959,30 +14959,30 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), dd = /* @__PURE__ */ w("context"
14959
14959
  return E.deviceId === a;
14960
14960
  })), a && v ? f = a : (l = p[0]) !== null && l !== void 0 && l.deviceId && (f = (g = p[0]) === null || g === void 0 ? void 0 : g.deviceId), k = /* @__PURE__ */ function() {
14961
14961
  var E = m(/* @__PURE__ */ h().m(function I(M) {
14962
- var _, O, L, q, X, Y, H, J, N;
14962
+ var _, O, L, B, X, Z, W, K, N;
14963
14963
  return h().w(function(U) {
14964
14964
  for (; ; )
14965
14965
  switch (U.p = U.n) {
14966
14966
  case 0:
14967
- return U.p = 0, p = p.filter(function(x) {
14968
- return x.deviceId !== M;
14967
+ return U.p = 0, p = p.filter(function(J) {
14968
+ return J.deviceId !== M;
14969
14969
  }), _ = u(d, qt)[qt].getAudioConstraints(M), d.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(_) }), U.n = 1, navigator.mediaDevices.getUserMedia(_);
14970
14970
  case 1:
14971
- return O = U.v.getAudioTracks(), L = Ge(O, 1), q = L[0], d.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(_) }), U.a(2, q);
14971
+ return O = U.v.getAudioTracks(), L = Ge(O, 1), B = L[0], d.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(_) }), U.a(2, B);
14972
14972
  case 2:
14973
- if (U.p = 2, N = U.v, X = Gc("audio", N.name, N.message), Y = new hd(N.name, N.message, _), X !== "COULD_NOT_START") {
14973
+ if (U.p = 2, N = U.v, X = Gc("audio", N.name, N.message), Z = new hd(N.name, N.message, _), X !== "COULD_NOT_START") {
14974
14974
  U.n = 4;
14975
14975
  break;
14976
14976
  }
14977
- if (H = p.shift(), H) {
14977
+ if (W = p.shift(), W) {
14978
14978
  U.n = 3;
14979
14979
  break;
14980
14980
  }
14981
- throw Y;
14981
+ throw Z;
14982
14982
  case 3:
14983
- return d.logger.info("getAudioTrack::gum_failed", { constraints: JSON.stringify(_), error: N }), J = u(d, qt)[qt].getAudioConstraints(H.deviceId), d.logger.info("getAudioTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(J) }), U.a(2, k(H.deviceId));
14983
+ return d.logger.info("getAudioTrack::gum_failed", { constraints: JSON.stringify(_), error: N }), K = u(d, qt)[qt].getAudioConstraints(W.deviceId), d.logger.info("getAudioTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(K) }), U.a(2, k(W.deviceId));
14984
14984
  case 4:
14985
- throw Y;
14985
+ throw Z;
14986
14986
  case 5:
14987
14987
  return U.a(2);
14988
14988
  }
@@ -15041,26 +15041,26 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), dd = /* @__PURE__ */ w("context"
15041
15041
  return _.deviceId === i;
15042
15042
  })), i && p ? v = i : (o = d[0]) !== null && o !== void 0 && o.deviceId && (v = (f = d[0]) === null || f === void 0 ? void 0 : f.deviceId), g = /* @__PURE__ */ function() {
15043
15043
  var _ = m(/* @__PURE__ */ h().m(function O(L) {
15044
- var q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, St;
15044
+ var B, X, Z, W, K, N, U, J, se, Re, pe, Le, Y, Lt, St;
15045
15045
  return h().w(function(ht) {
15046
15046
  for (; ; )
15047
15047
  switch (ht.p = ht.n) {
15048
15048
  case 0:
15049
- return ht.p = 0, q = L, X = q, Y = X.video, l && typeof Y != "boolean" && (q = { video: { deviceId: Y.deviceId } }), c.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(q) }), ht.n = 1, navigator.mediaDevices.getUserMedia(q);
15049
+ return ht.p = 0, B = L, X = B, Z = X.video, l && typeof Z != "boolean" && (B = { video: { deviceId: Z.deviceId } }), c.logger.info("getUserMediaWithoutTimeout::requesting_user_media", { constraints: JSON.stringify(B) }), ht.n = 1, navigator.mediaDevices.getUserMedia(B);
15050
15050
  case 1:
15051
- return H = ht.v.getVideoTracks(), J = Ge(H, 1), N = J[0], l && typeof Y != "boolean" && ye(Y.width) === "object" && (U = N.getSettings(), x = U.width, le = U.height, Re = Y.width.ideal, N.applyConstraints({ width: { ideal: Re }, height: { ideal: Math.floor(le * Re / x) }, frameRate: Y.frameRate })), c.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(q) }), ht.a(2, N);
15051
+ return W = ht.v.getVideoTracks(), K = Ge(W, 1), N = K[0], l && typeof Z != "boolean" && ye(Z.width) === "object" && (U = N.getSettings(), J = U.width, se = U.height, Re = Z.width.ideal, N.applyConstraints({ width: { ideal: Re }, height: { ideal: Math.floor(se * Re / J) }, frameRate: Z.frameRate })), c.logger.info("getUserMediaWithoutTimeout::received_user_media", { constraints: JSON.stringify(B) }), ht.a(2, N);
15052
15052
  case 2:
15053
15053
  if (ht.p = 2, St = ht.v, pe = Gc("video", St.name, St.message), Le = new hd(St.name, St.message, L), pe !== "COULD_NOT_START") {
15054
15054
  ht.n = 4;
15055
15055
  break;
15056
15056
  }
15057
- if (Q = d.shift(), Q) {
15057
+ if (Y = d.shift(), Y) {
15058
15058
  ht.n = 3;
15059
15059
  break;
15060
15060
  }
15061
15061
  throw Le;
15062
15062
  case 3:
15063
- return c.logger.info("getVideoTrack::gum_failed", { constraints: JSON.stringify(L), error: St }), Lt = u(c, qt)[qt].getVideoConstraints(Q.deviceId), c.logger.info("getVideoTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(Lt) }), ht.a(2, g({ video: Lt.video }));
15063
+ return c.logger.info("getVideoTrack::gum_failed", { constraints: JSON.stringify(L), error: St }), Lt = u(c, qt)[qt].getVideoConstraints(Y.deviceId), c.logger.info("getVideoTrack::retrying_gum_for_next_device", { constraints: JSON.stringify(Lt) }), ht.a(2, g({ video: Lt.video }));
15064
15064
  case 4:
15065
15065
  throw Le;
15066
15066
  case 5:
@@ -16682,7 +16682,7 @@ var YI = Object.defineProperty, XI = Object.getOwnPropertyDescriptor, ZI = funct
16682
16682
  return e;
16683
16683
  }() }, { key: "setupEvents", value: function() {
16684
16684
  var e = this;
16685
- u(this, Ur)[Ur].on(z.startedLivestream, /* @__PURE__ */ function() {
16685
+ u(this, Ur)[Ur].on(Q.startedLivestream, /* @__PURE__ */ function() {
16686
16686
  var t = m(/* @__PURE__ */ h().m(function n(i) {
16687
16687
  var a;
16688
16688
  return h().w(function(o) {
@@ -16707,7 +16707,7 @@ var YI = Object.defineProperty, XI = Object.getOwnPropertyDescriptor, ZI = funct
16707
16707
  return function(n) {
16708
16708
  return t.apply(this, arguments);
16709
16709
  };
16710
- }()), u(this, Ur)[Ur].on(z.livestreamingInvoked, /* @__PURE__ */ function() {
16710
+ }()), u(this, Ur)[Ur].on(Q.livestreamingInvoked, /* @__PURE__ */ function() {
16711
16711
  var t = m(/* @__PURE__ */ h().m(function n(i) {
16712
16712
  var a;
16713
16713
  return h().w(function(o) {
@@ -16738,11 +16738,11 @@ var YI = Object.defineProperty, XI = Object.getOwnPropertyDescriptor, ZI = funct
16738
16738
  return function(n) {
16739
16739
  return t.apply(this, arguments);
16740
16740
  };
16741
- }()), u(this, Ur)[Ur].on(z.stoppedLivestream, function() {
16741
+ }()), u(this, Ur)[Ur].on(Q.stoppedLivestream, function() {
16742
16742
  e.livestream.setLivestreamState("IDLE"), e.livestream.playbackUrl = void 0, e.livestream.ingestionCredentials = void 0;
16743
- }), u(this, Ur)[Ur].on(z.erroredLivestream, function() {
16743
+ }), u(this, Ur)[Ur].on(Q.erroredLivestream, function() {
16744
16744
  e.livestream.setLivestreamState("IDLE"), e.livestream.playbackUrl = void 0;
16745
- }), u(this, Ur)[Ur].on(z.roomPeerCount, function(t) {
16745
+ }), u(this, Ur)[Ur].on(Q.roomPeerCount, function(t) {
16746
16746
  e.livestream.viewerCount = t.count, e.livestream.emit("viewerCountUpdate", t.count);
16747
16747
  }), u(this, pr)[pr].getValue("peerSessionStore").on($.PEER_JOINED_INTERNAL, /* @__PURE__ */ function() {
16748
16748
  var t = m(/* @__PURE__ */ h().m(function n(i) {
@@ -17153,10 +17153,10 @@ var aM = Object.defineProperty, sM = Object.getOwnPropertyDescriptor, Go = funct
17153
17153
  var o = e.getValue("logger");
17154
17154
  a = C(this, r, [o]), Object.defineProperty(a, Mc, { value: gM }), Object.defineProperty(a, Ic, { value: fM }), Object.defineProperty(a, uo, { value: vM }), Object.defineProperty(a, xn, { get: pM, set: void 0 }), Object.defineProperty(a, _c, { get: hM, set: void 0 }), Object.defineProperty(a, Zn, { get: dM, set: void 0 }), Object.defineProperty(a, mn, { get: lM, set: void 0 }), Object.defineProperty(a, Xn, { get: cM, set: void 0 }), a.id = void 0, a.userId = void 0, a.name = void 0, a.picture = void 0, a.isHost = void 0, a.customParticipantId = void 0, a.flags = void 0, a.device = void 0, a.videoTrack = void 0, a.audioTrack = void 0, a.screenShareTracks = void 0, a.videoEnabled = void 0, a.audioEnabled = void 0, a.screenShareEnabled = void 0, a.producers = void 0, a.manualProducerConfig = void 0, Object.defineProperty(a, sa, { writable: !0, value: void 0 }), a.supportsRemoteControl = !1, Object.defineProperty(a, oa, { writable: !0, value: void 0 }), a.presetName = void 0, Object.defineProperty(a, Dt, { writable: !0, value: void 0 }), Object.defineProperty(a, ot, { writable: !0, value: void 0 }), Object.defineProperty(a, oo, { writable: !0, value: void 0 }), Object.defineProperty(a, cn, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(a, Cr, { writable: !0, value: 1 }), Object.defineProperty(a, Ac, { writable: !0, value: up(function(L) {
17155
17155
  if (a.videoTrack) {
17156
- var q = L.clientWidth, X = L.clientHeight, Y = a.videoTrack.getSettings(), H = Y.width, J = Y.height;
17157
- if (!(!H || !J)) {
17158
- var N = J / X, U = H / q, x = Math.max(N, U);
17159
- x > uM && u(a, Cr)[Cr] === 1 ? (u(a, Cr)[Cr] = 0, u(a, Dt)[Dt].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Cr)[Cr] })) : x < oM && u(a, Cr)[Cr] === 0 && (u(a, Cr)[Cr] = 1, u(a, Dt)[Dt].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Cr)[Cr] }));
17156
+ var B = L.clientWidth, X = L.clientHeight, Z = a.videoTrack.getSettings(), W = Z.width, K = Z.height;
17157
+ if (!(!W || !K)) {
17158
+ var N = K / X, U = W / B, J = Math.max(N, U);
17159
+ J > uM && u(a, Cr)[Cr] === 1 ? (u(a, Cr)[Cr] = 0, u(a, Dt)[Dt].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Cr)[Cr] })) : J < oM && u(a, Cr)[Cr] === 0 && (u(a, Cr)[Cr] = 1, u(a, Dt)[Dt].getValue("peerSessionStore").emit($.MAX_SPATIAL_LAYER_CHANGE, { peerId: a.id, maxSpatialLayer: u(a, Cr)[Cr] }));
17160
17160
  }
17161
17161
  }
17162
17162
  }, 2e3) }), u(a, Dt)[Dt] = e;
@@ -18224,7 +18224,7 @@ var CM = Object.defineProperty, RM = Object.getOwnPropertyDescriptor, xs = funct
18224
18224
  key: "setupEvents",
18225
18225
  value: function() {
18226
18226
  var e = this;
18227
- this.roomSocketHandler.on(z.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on($.SOCKET_PEERS, this.handleSocketPeers.bind(this)), this.roomSocketHandler.on(this.events.peerJoinedBroadcast, this.handlePeerMediaJoinedBroadcast.bind(this)), this.roomSocketHandler.on(this.events.selfJoinComplete, /* @__PURE__ */ function() {
18227
+ this.roomSocketHandler.on(Q.getWaitingRoomRequests, this.waitingRoomRequestHandler.bind(this)), this.context.getValue("peerSessionStore").on($.SOCKET_PEERS, this.handleSocketPeers.bind(this)), this.roomSocketHandler.on(this.events.peerJoinedBroadcast, this.handlePeerMediaJoinedBroadcast.bind(this)), this.roomSocketHandler.on(this.events.selfJoinComplete, /* @__PURE__ */ function() {
18228
18228
  var t = m(/* @__PURE__ */ h().m(function n(i) {
18229
18229
  var a, o, c, l, d, p;
18230
18230
  return h().w(function(v) {
@@ -18457,43 +18457,43 @@ var CM = Object.defineProperty, RM = Object.getOwnPropertyDescriptor, xs = funct
18457
18457
  */
18458
18458
  }, { key: "syncConsumers", value: function() {
18459
18459
  var r = m(/* @__PURE__ */ h().m(function t() {
18460
- var n, i, a = this, o, c, l, d, p, v, f, g, k, y, S, T, E, I, M, _, O, L, q, X, Y, H;
18461
- return h().w(function(J) {
18460
+ var n, i, a = this, o, c, l, d, p, v, f, g, k, y, S, T, E, I, M, _, O, L, B, X, Z, W;
18461
+ return h().w(function(K) {
18462
18462
  for (; ; )
18463
- switch (J.p = J.n) {
18463
+ switch (K.p = K.n) {
18464
18464
  case 0:
18465
18465
  if (p = this.context.getValue("connectionHandler"), !(p != null && (n = p.socketState) !== null && n !== void 0 && n.state && p.socketState.state !== "connected")) {
18466
- J.n = 1;
18466
+ K.n = 1;
18467
18467
  break;
18468
18468
  }
18469
- return u(this, ri)[ri]("socket not connected"), this.logger.info("syncConsumers: Socket not connected, deferring sync."), J.a(2);
18469
+ return u(this, ri)[ri]("socket not connected"), this.logger.info("syncConsumers: Socket not connected, deferring sync."), K.a(2);
18470
18470
  case 1:
18471
18471
  if ((p == null || (i = p.mediaState) === null || i === void 0 || (i = i.recv) === null || i === void 0 ? void 0 : i.state) === "connected") {
18472
- J.n = 2;
18472
+ K.n = 2;
18473
18473
  break;
18474
18474
  }
18475
- return u(this, ri)[ri]("Recv transport not connected"), this.logger.info("syncConsumers: Connection not ready, exiting."), J.a(2);
18475
+ return u(this, ri)[ri]("Recv transport not connected"), this.logger.info("syncConsumers: Connection not ready, exiting."), K.a(2);
18476
18476
  case 2:
18477
18477
  if (u(this, Oc)[Oc](), !u(this, ur)[ur]) {
18478
- J.n = 3;
18478
+ K.n = 3;
18479
18479
  break;
18480
18480
  }
18481
- return u(this, on)[on] = !0, this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting."), J.a(2);
18481
+ return u(this, on)[on] = !0, this.logger.info("syncConsumers: Sync in progress, marking resyncRequired=true and exiting."), K.a(2);
18482
18482
  case 3:
18483
18483
  if (this.logger.info("syncConsumers: Starting sync operation."), u(this, ur)[ur] = !0, u(this, on)[on] = !1, v = [], this.participants.videoSubscribed.forEach(function(N) {
18484
- var U, x, le = a.participants.joined.get(N.id), Re = (U = (x = N.producers) === null || x === void 0 ? void 0 : x.filter(function(pe) {
18484
+ var U, J, se = a.participants.joined.get(N.id), Re = (U = (J = N.producers) === null || J === void 0 ? void 0 : J.filter(function(pe) {
18485
18485
  return pe.kind === "video";
18486
18486
  })) !== null && U !== void 0 ? U : [];
18487
- le && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18488
- var Le, Q, Lt, St, ht = ((Le = (Q = le.manualProducerConfig) === null || Q === void 0 ? void 0 : Q.video) !== null && Le !== void 0 ? Le : !0) && pe.kind === "video" && !pe.screenShare, re = ((Lt = (St = le.manualProducerConfig) === null || St === void 0 ? void 0 : St.screenshareVideo) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "video" && pe.screenShare;
18487
+ se && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18488
+ var Le, Y, Lt, St, ht = ((Le = (Y = se.manualProducerConfig) === null || Y === void 0 ? void 0 : Y.video) !== null && Le !== void 0 ? Le : !0) && pe.kind === "video" && !pe.screenShare, re = ((Lt = (St = se.manualProducerConfig) === null || St === void 0 ? void 0 : St.screenshareVideo) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "video" && pe.screenShare;
18489
18489
  (ht || re) && (pe.pause || v.push(pe));
18490
18490
  });
18491
18491
  }), this.participants.audioSubscribed.forEach(function(N) {
18492
- var U, x, le = a.participants.joined.get(N.id), Re = (U = (x = N.producers) === null || x === void 0 ? void 0 : x.filter(function(pe) {
18492
+ var U, J, se = a.participants.joined.get(N.id), Re = (U = (J = N.producers) === null || J === void 0 ? void 0 : J.filter(function(pe) {
18493
18493
  return pe.kind === "audio";
18494
18494
  })) !== null && U !== void 0 ? U : [];
18495
- le && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18496
- var Le, Q, Lt, St, ht = ((Le = (Q = le.manualProducerConfig) === null || Q === void 0 ? void 0 : Q.audio) !== null && Le !== void 0 ? Le : !0) && pe.kind === "audio" && !pe.screenShare, re = ((Lt = (St = le.manualProducerConfig) === null || St === void 0 ? void 0 : St.screenshareAudio) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "audio" && pe.screenShare;
18495
+ se && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18496
+ var Le, Y, Lt, St, ht = ((Le = (Y = se.manualProducerConfig) === null || Y === void 0 ? void 0 : Y.audio) !== null && Le !== void 0 ? Le : !0) && pe.kind === "audio" && !pe.screenShare, re = ((Lt = (St = se.manualProducerConfig) === null || St === void 0 ? void 0 : St.screenshareAudio) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "audio" && pe.screenShare;
18497
18497
  (ht || re) && v.push(pe);
18498
18498
  });
18499
18499
  }), v = bP(v, function(N) {
@@ -18511,13 +18511,13 @@ var CM = Object.defineProperty, RM = Object.getOwnPropertyDescriptor, xs = funct
18511
18511
  return;
18512
18512
  }
18513
18513
  T.add(U.id);
18514
- var x = u(a, lo)[lo](U, N), le = x.needsRemap, Re = x.wasMarkedForDeletion;
18515
- le && I.push(U.id), Re && E.push(U.id);
18514
+ var J = u(a, lo)[lo](U, N), se = J.needsRemap, Re = J.wasMarkedForDeletion;
18515
+ se && I.push(U.id), Re && E.push(U.id);
18516
18516
  }), M = [], g.forEach(function(N) {
18517
18517
  N.closed || T.has(N.id) || u(a, Dc)[Dc](N) && M.push(N.id);
18518
18518
  }), _ = Date.now(), O = [], L = [], u(this, je)[je].forEach(function(N, U) {
18519
- var x = g.get(U);
18520
- if (!x || x.closed) {
18519
+ var J = g.get(U);
18520
+ if (!J || J.closed) {
18521
18521
  u(a, je)[je].delete(U);
18522
18522
  return;
18523
18523
  }
@@ -18525,35 +18525,35 @@ var CM = Object.defineProperty, RM = Object.getOwnPropertyDescriptor, xs = funct
18525
18525
  u(a, je)[je].delete(U);
18526
18526
  return;
18527
18527
  }
18528
- var le = _ - N;
18529
- le >= AM ? L.push(U) : O.push(U);
18528
+ var se = _ - N;
18529
+ se >= AM ? L.push(U) : O.push(U);
18530
18530
  }), f.size > 0 && this.logger.debug("syncConsumers: Desired producer IDs: [".concat(Array.from(f.keys()).join(","), "].")), g.size > 0 && this.logger.debug("syncConsumers: Current consumer IDs: [".concat(Array.from(g.keys()).join(","), "].")), S.length > 0 && this.logger.info("syncConsumers: Producer IDs requiring consumers: [".concat(S.map(function(N) {
18531
18531
  var U = N.producerId;
18532
18532
  return U;
18533
- }).join(","), "].")), T.size > 0 && this.logger.debug("syncConsumers: Consumer IDs to keep: [".concat(Array.from(T).join(","), "].")), I.length > 0 && this.logger.info("syncConsumers: Consumer IDs with consumer rewiring: [".concat(I.join(","), "].")), E.length > 0 && this.logger.info("syncConsumers: Consumer IDs revived before deletion: [".concat(E.join(","), "].")), M.length > 0 && this.logger.info("syncConsumers: Newly marked consumer IDs: [".concat(M.join(","), "].")), O.length > 0 && this.logger.info("syncConsumers: Consumer IDs in deletion grace period: [".concat(O.join(","), "].")), L.length > 0 && this.logger.info("syncConsumers: Consumer IDs ready for deletion: [".concat(L.join(","), "].")), q = 35, X = 35, S.length > q && (this.logger.warn("syncConsumers: Too many remote producers to create consumers: ".concat(S.length, ". Only adding ").concat(q, " in this run.")), S = S.slice(0, q), this.scheduleSyncConsumers({ source: "SOFT_CAPPED_CREATE_CONSUMERS" })), L.length > X && (this.logger.warn("syncConsumers: Too many remote consumers ready to close: ".concat(L.length, ". Only removing ").concat(X, " in this run.")), L = L.slice(0, X), this.scheduleSyncConsumers({ source: "SOFT_CAPPED_REMOVE_CONSUMERS" })), J.p = 4, !(S.length > 0 || L.length > 0)) {
18534
- J.n = 6;
18533
+ }).join(","), "].")), T.size > 0 && this.logger.debug("syncConsumers: Consumer IDs to keep: [".concat(Array.from(T).join(","), "].")), I.length > 0 && this.logger.info("syncConsumers: Consumer IDs with consumer rewiring: [".concat(I.join(","), "].")), E.length > 0 && this.logger.info("syncConsumers: Consumer IDs revived before deletion: [".concat(E.join(","), "].")), M.length > 0 && this.logger.info("syncConsumers: Newly marked consumer IDs: [".concat(M.join(","), "].")), O.length > 0 && this.logger.info("syncConsumers: Consumer IDs in deletion grace period: [".concat(O.join(","), "].")), L.length > 0 && this.logger.info("syncConsumers: Consumer IDs ready for deletion: [".concat(L.join(","), "].")), B = 35, X = 35, S.length > B && (this.logger.warn("syncConsumers: Too many remote producers to create consumers: ".concat(S.length, ". Only adding ").concat(B, " in this run.")), S = S.slice(0, B), this.scheduleSyncConsumers({ source: "SOFT_CAPPED_CREATE_CONSUMERS" })), L.length > X && (this.logger.warn("syncConsumers: Too many remote consumers ready to close: ".concat(L.length, ". Only removing ").concat(X, " in this run.")), L = L.slice(0, X), this.scheduleSyncConsumers({ source: "SOFT_CAPPED_REMOVE_CONSUMERS" })), K.p = 4, !(S.length > 0 || L.length > 0)) {
18534
+ K.n = 6;
18535
18535
  break;
18536
18536
  }
18537
18537
  return this.logger.info("syncConsumers: Calling updateConsumers: createProducerIds=[".concat(S.map(function(N) {
18538
18538
  var U = N.producerId;
18539
18539
  return U;
18540
- }).join(","), "], deleteConsumerIds=[").concat(L.join(","), "].")), J.n = 5, this.updateConsumers(S, L);
18540
+ }).join(","), "], deleteConsumerIds=[").concat(L.join(","), "].")), K.n = 5, this.updateConsumers(S, L);
18541
18541
  case 5:
18542
- this.logger.info("syncConsumers: updateConsumers completed successfully."), J.n = 7;
18542
+ this.logger.info("syncConsumers: updateConsumers completed successfully."), K.n = 7;
18543
18543
  break;
18544
18544
  case 6:
18545
18545
  this.logger.info("syncConsumers: No changes needed, skipping updateConsumers.");
18546
18546
  case 7:
18547
- J.n = 9;
18547
+ K.n = 9;
18548
18548
  break;
18549
18549
  case 8:
18550
- J.p = 8, H = J.v, this.logger.error("syncConsumers: updateConsumers failed with error.", { error: H });
18550
+ K.p = 8, W = K.v, this.logger.error("syncConsumers: updateConsumers failed with error.", { error: W });
18551
18551
  case 9:
18552
- return J.p = 9, this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), u(this, ur)[ur] = !1, p != null && (Y = p.socketState) !== null && Y !== void 0 && Y.state && p.socketState.state !== "connected" && (u(this, on)[on] = !0), J.f(9);
18552
+ return K.p = 9, this.logger.info("syncConsumers: Setting consumersSyncing=false and completing sync."), u(this, ur)[ur] = !1, p != null && (Z = p.socketState) !== null && Z !== void 0 && Z.state && p.socketState.state !== "connected" && (u(this, on)[on] = !0), K.f(9);
18553
18553
  case 10:
18554
18554
  u(this, on)[on] && (this.logger.info("syncConsumers: Resync required, calling syncConsumers again."), this.syncConsumers());
18555
18555
  case 11:
18556
- return J.a(2);
18556
+ return K.a(2);
18557
18557
  }
18558
18558
  }, t, this, [[4, 8, 9, 10]]);
18559
18559
  }));
@@ -18725,10 +18725,10 @@ var CM = Object.defineProperty, RM = Object.getOwnPropertyDescriptor, xs = funct
18725
18725
  }
18726
18726
  } }, { key: "setupEventsGlobal", value: function() {
18727
18727
  var e = this;
18728
- this.roomSocketHandler.on(z.joinRoom, function(t) {
18728
+ this.roomSocketHandler.on(Q.joinRoom, function(t) {
18729
18729
  var n = t.peer;
18730
18730
  n.waitlisted || (e.logger.info("Processing socket join for ".concat(e.self.id === n.peerId ? "local peer" : "remote peer", " ").concat(n.peerId, ".")), e.onParticipantSocketJoined(e.createParticipantObjFromSocketPeer(n)), e.logger.info("Processed socket join for ".concat(e.self.id === n.peerId ? "local peer" : "remote peer", " ").concat(n.peerId, ".")));
18731
- }), this.roomSocketHandler.on(z.leaveRoom, /* @__PURE__ */ function() {
18731
+ }), this.roomSocketHandler.on(Q.leaveRoom, /* @__PURE__ */ function() {
18732
18732
  var t = m(/* @__PURE__ */ h().m(function n(i) {
18733
18733
  var a;
18734
18734
  return h().w(function(o) {
@@ -19097,13 +19097,13 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19097
19097
  var y, S, T, E = function(_) {
19098
19098
  switch (_) {
19099
19099
  case Ca.NONE:
19100
- return se.Allowed;
19100
+ return oe.Allowed;
19101
19101
  case Ca.ALLOWED:
19102
- return se.Allowed;
19102
+ return oe.Allowed;
19103
19103
  case Ca.NOT_ALLOWED:
19104
- return se.NotAllowed;
19104
+ return oe.NotAllowed;
19105
19105
  case Ca.CAN_REQUEST:
19106
- return se.CanRequest;
19106
+ return oe.CanRequest;
19107
19107
  default:
19108
19108
  return;
19109
19109
  }
@@ -19149,7 +19149,7 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19149
19149
  key: "stageAccess",
19150
19150
  get: function() {
19151
19151
  var t, n, i;
19152
- return ((t = u(this, G)[G]) === null || t === void 0 ? void 0 : t.stageAccess) === se.NotAllowed ? se.NotAllowed : ((n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.stageAccess) === se.CanRequest ? se.CanRequest : ((i = u(this, G)[G]) === null || i === void 0 ? void 0 : i.stageAccess) === se.Allowed || u(this, G)[G].media.audio.canProduce === se.Allowed || u(this, G)[G].media.video.canProduce === se.Allowed || u(this, G)[G].media.screenshare.canProduce === se.Allowed ? se.Allowed : u(this, G)[G].media.audio.canProduce === se.CanRequest || u(this, G)[G].media.video.canProduce === se.CanRequest || u(this, G)[G].media.screenshare.canProduce === se.CanRequest ? se.CanRequest : se.NotAllowed;
19152
+ return ((t = u(this, G)[G]) === null || t === void 0 ? void 0 : t.stageAccess) === oe.NotAllowed ? oe.NotAllowed : ((n = u(this, G)[G]) === null || n === void 0 ? void 0 : n.stageAccess) === oe.CanRequest ? oe.CanRequest : ((i = u(this, G)[G]) === null || i === void 0 ? void 0 : i.stageAccess) === oe.Allowed || u(this, G)[G].media.audio.canProduce === oe.Allowed || u(this, G)[G].media.video.canProduce === oe.Allowed || u(this, G)[G].media.screenshare.canProduce === oe.Allowed ? oe.Allowed : u(this, G)[G].media.audio.canProduce === oe.CanRequest || u(this, G)[G].media.video.canProduce === oe.CanRequest || u(this, G)[G].media.screenshare.canProduce === oe.CanRequest ? oe.CanRequest : oe.NotAllowed;
19153
19153
  }
19154
19154
  /**
19155
19155
  * The `acceptWaitingRequests` returns boolean value.
@@ -19170,7 +19170,7 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19170
19170
  key: "requestProduceVideo",
19171
19171
  get: function() {
19172
19172
  var t;
19173
- return ((t = u(this, G)[G]) === null || t === void 0 || (t = t.media) === null || t === void 0 || (t = t.video) === null || t === void 0 ? void 0 : t.canProduce) === se.CanRequest;
19173
+ return ((t = u(this, G)[G]) === null || t === void 0 || (t = t.media) === null || t === void 0 || (t = t.video) === null || t === void 0 ? void 0 : t.canProduce) === oe.CanRequest;
19174
19174
  }
19175
19175
  /**
19176
19176
  * The `requestProduceAudio` returns boolean value.
@@ -19181,7 +19181,7 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19181
19181
  key: "requestProduceAudio",
19182
19182
  get: function() {
19183
19183
  var t;
19184
- return ((t = u(this, G)[G]) === null || t === void 0 || (t = t.media) === null || t === void 0 || (t = t.audio) === null || t === void 0 ? void 0 : t.canProduce) === se.CanRequest;
19184
+ return ((t = u(this, G)[G]) === null || t === void 0 || (t = t.media) === null || t === void 0 || (t = t.audio) === null || t === void 0 ? void 0 : t.canProduce) === oe.CanRequest;
19185
19185
  }
19186
19186
  /**
19187
19187
  * The `requestProduceScreenshare` returns boolean value.
@@ -19192,7 +19192,7 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19192
19192
  key: "requestProduceScreenshare",
19193
19193
  get: function() {
19194
19194
  var t;
19195
- return ((t = u(this, G)[G]) === null || t === void 0 || (t = t.media) === null || t === void 0 || (t = t.screenshare) === null || t === void 0 ? void 0 : t.canProduce) === se.CanRequest;
19195
+ return ((t = u(this, G)[G]) === null || t === void 0 || (t = t.media) === null || t === void 0 || (t = t.screenshare) === null || t === void 0 ? void 0 : t.canProduce) === oe.CanRequest;
19196
19196
  }
19197
19197
  /**
19198
19198
  * The `canAllowParticipantAudio` returns boolean value.
@@ -19309,7 +19309,7 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19309
19309
  key: "canProduceVideo",
19310
19310
  get: function() {
19311
19311
  var t, n = (t = u(this, G)[G].media.video.canProduce) !== null && t !== void 0 ? t : Mt.media.video.canProduce;
19312
- return this.stageEnabled && (u(this, gt)[gt] === "ACCEPTED_TO_JOIN_STAGE" || u(this, gt)[gt] === "ON_STAGE") && n === se.CanRequest ? se.Allowed : this.stageEnabled && (u(this, gt)[gt] === "OFF_STAGE" || u(this, gt)[gt] === "REQUESTED_TO_JOIN_STAGE") && n === se.Allowed ? se.NotAllowed : n;
19312
+ return this.stageEnabled && (u(this, gt)[gt] === "ACCEPTED_TO_JOIN_STAGE" || u(this, gt)[gt] === "ON_STAGE") && n === oe.CanRequest ? oe.Allowed : this.stageEnabled && (u(this, gt)[gt] === "OFF_STAGE" || u(this, gt)[gt] === "REQUESTED_TO_JOIN_STAGE") && n === oe.Allowed ? oe.NotAllowed : n;
19313
19313
  }
19314
19314
  /**
19315
19315
  * The `canProduceScreenshare` shows permissions for sharing screen.
@@ -19319,7 +19319,7 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19319
19319
  key: "canProduceScreenshare",
19320
19320
  get: function() {
19321
19321
  var t, n = (t = u(this, G)[G].media.screenshare.canProduce) !== null && t !== void 0 ? t : Mt.media.screenshare.canProduce;
19322
- return this.stageEnabled && (u(this, gt)[gt] === "ACCEPTED_TO_JOIN_STAGE" || u(this, gt)[gt] === "ON_STAGE") && n === se.CanRequest ? se.Allowed : this.stageEnabled && (u(this, gt)[gt] === "OFF_STAGE" || u(this, gt)[gt] === "REQUESTED_TO_JOIN_STAGE") && n === se.Allowed ? se.NotAllowed : n;
19322
+ return this.stageEnabled && (u(this, gt)[gt] === "ACCEPTED_TO_JOIN_STAGE" || u(this, gt)[gt] === "ON_STAGE") && n === oe.CanRequest ? oe.Allowed : this.stageEnabled && (u(this, gt)[gt] === "OFF_STAGE" || u(this, gt)[gt] === "REQUESTED_TO_JOIN_STAGE") && n === oe.Allowed ? oe.NotAllowed : n;
19323
19323
  }
19324
19324
  /**
19325
19325
  * The `canProduceAudio` shows permissions for enabling audio.
@@ -19329,7 +19329,7 @@ var Mt = di(dp().permissions), G = /* @__PURE__ */ w("permissions"), ys = /* @__
19329
19329
  key: "canProduceAudio",
19330
19330
  get: function() {
19331
19331
  var t, n = (t = u(this, G)[G].media.audio.canProduce) !== null && t !== void 0 ? t : Mt.media.audio.canProduce;
19332
- return this.stageEnabled && (u(this, gt)[gt] === "ACCEPTED_TO_JOIN_STAGE" || u(this, gt)[gt] === "ON_STAGE") && n === se.CanRequest ? se.Allowed : this.stageEnabled && (u(this, gt)[gt] === "OFF_STAGE" || u(this, gt)[gt] === "REQUESTED_TO_JOIN_STAGE") && n === se.Allowed ? se.NotAllowed : n;
19332
+ return this.stageEnabled && (u(this, gt)[gt] === "ACCEPTED_TO_JOIN_STAGE" || u(this, gt)[gt] === "ON_STAGE") && n === oe.CanRequest ? oe.Allowed : this.stageEnabled && (u(this, gt)[gt] === "OFF_STAGE" || u(this, gt)[gt] === "REQUESTED_TO_JOIN_STAGE") && n === oe.Allowed ? oe.NotAllowed : n;
19333
19333
  }
19334
19334
  /**
19335
19335
  * The `chatPublic` shows permissions for public chat
@@ -19535,28 +19535,28 @@ var jt = /* @__PURE__ */ w("context"), Yg = /* @__PURE__ */ function(s) {
19535
19535
  this.localMediaHandler = new Ar(c, a.constraints, c == null || (f = c.getValue("defaults")) === null || f === void 0 ? void 0 : f.isNonPreferredDevice, c == null || (g = c.getValue("defaults")) === null || g === void 0 ? void 0 : g.autoSwitchAudioDevice);
19536
19536
  case 5:
19537
19537
  if (c == null || c.getValue("peerSessionStore").on($.MEDIA_PERMISSION_UPDATE, /* @__PURE__ */ function() {
19538
- var O = m(/* @__PURE__ */ h().m(function L(q) {
19538
+ var O = m(/* @__PURE__ */ h().m(function L(B) {
19539
19539
  var X;
19540
- return h().w(function(Y) {
19540
+ return h().w(function(Z) {
19541
19541
  for (; ; )
19542
- switch (Y.n) {
19542
+ switch (Z.n) {
19543
19543
  case 0:
19544
- if (i.populateMediaPermissionsInCallstats({ message: q.message, kind: q.kind }), q.message !== "NOT_REQUESTED") {
19545
- Y.n = 4;
19544
+ if (i.populateMediaPermissionsInCallstats({ message: B.message, kind: B.kind }), B.message !== "NOT_REQUESTED") {
19545
+ Z.n = 4;
19546
19546
  break;
19547
19547
  }
19548
- X = q == null ? void 0 : q.kind, Y.n = X === "audio" ? 1 : X === "video" ? 2 : 3;
19548
+ X = B == null ? void 0 : B.kind, Z.n = X === "audio" ? 1 : X === "video" ? 2 : 3;
19549
19549
  break;
19550
19550
  case 1:
19551
- return i.rawAudioTrack && (i.logger.info("Disabling audio due to media permission update"), i.disableAudio()), Y.a(3, 4);
19551
+ return i.rawAudioTrack && (i.logger.info("Disabling audio due to media permission update"), i.disableAudio()), Z.a(3, 4);
19552
19552
  case 2:
19553
- return i.rawVideoTrack && (i.logger.info("Disabling video due to media permission update"), i.disableVideo()), Y.a(3, 4);
19553
+ return i.rawVideoTrack && (i.logger.info("Disabling video due to media permission update"), i.disableVideo()), Z.a(3, 4);
19554
19554
  case 3:
19555
- return Y.a(3, 4);
19555
+ return Z.a(3, 4);
19556
19556
  case 4:
19557
- i.emit("mediaPermissionUpdate", q);
19557
+ i.emit("mediaPermissionUpdate", B);
19558
19558
  case 5:
19559
- return Y.a(2);
19559
+ return Z.a(2);
19560
19560
  }
19561
19561
  }, L);
19562
19562
  }));
@@ -19564,15 +19564,15 @@ var jt = /* @__PURE__ */ w("context"), Yg = /* @__PURE__ */ function(s) {
19564
19564
  return O.apply(this, arguments);
19565
19565
  };
19566
19566
  }()), c == null || c.getValue("peerSessionStore").on($.MEDIA_PERMISSION_ERROR, /* @__PURE__ */ function() {
19567
- var O = m(/* @__PURE__ */ h().m(function L(q) {
19568
- var X, Y, H;
19569
- return h().w(function(J) {
19567
+ var O = m(/* @__PURE__ */ h().m(function L(B) {
19568
+ var X, Z, W;
19569
+ return h().w(function(K) {
19570
19570
  for (; ; )
19571
- switch (J.n) {
19571
+ switch (K.n) {
19572
19572
  case 0:
19573
- X = q.kind, Y = q.message, H = q.constraints, i.populateMediaPermissionsInCallstats({ message: Y, kind: X }), X === "audio" ? (i.logger.info("Disabling audio due to media permission error skipping: ".concat(i.localMediaHandler.audioUpdateInProgress)), i.localMediaHandler.audioUpdateInProgress === !1 && i.disableAudio()) : X === "video" && (i.logger.info("Disabling video due to media permission error skipping: ".concat(i.localMediaHandler.videoUpdateInProgress)), i.localMediaHandler.videoUpdateInProgress === !1 && i.disableVideo()), i.logger.error("SelfController::mediaPermissionError", { error: { message: Y }, constraints: H, mediaPermissionsErrors: { kind: X, message: Y } }), i.emit("mediaPermissionError", q), i.emit("mediaPermissionUpdate", { message: Y, kind: X });
19573
+ X = B.kind, Z = B.message, W = B.constraints, i.populateMediaPermissionsInCallstats({ message: Z, kind: X }), X === "audio" ? (i.logger.info("Disabling audio due to media permission error skipping: ".concat(i.localMediaHandler.audioUpdateInProgress)), i.localMediaHandler.audioUpdateInProgress === !1 && i.disableAudio()) : X === "video" && (i.logger.info("Disabling video due to media permission error skipping: ".concat(i.localMediaHandler.videoUpdateInProgress)), i.localMediaHandler.videoUpdateInProgress === !1 && i.disableVideo()), i.logger.error("SelfController::mediaPermissionError", { error: { message: Z }, constraints: W, mediaPermissionsErrors: { kind: X, message: Z } }), i.emit("mediaPermissionError", B), i.emit("mediaPermissionUpdate", { message: Z, kind: X });
19574
19574
  case 1:
19575
- return J.a(2);
19575
+ return K.a(2);
19576
19576
  }
19577
19577
  }, L);
19578
19578
  }));
@@ -20207,7 +20207,7 @@ var jt = /* @__PURE__ */ w("context"), Yg = /* @__PURE__ */ function(s) {
20207
20207
  }, i);
20208
20208
  }))), u(this, ut)[ut].on("permissionsUpdate", function(i) {
20209
20209
  var a, o, c;
20210
- i != null && (a = i.media) !== null && a !== void 0 && a.audio && u(t, ut)[ut].canProduceAudio !== se.Allowed && (t.disableAudio(), t.logger.info("Disabled audio due to dynamic preset change: canProduceAudio: ".concat(t.permissions.canProduceAudio))), i != null && (o = i.media) !== null && o !== void 0 && o.video && u(t, ut)[ut].canProduceVideo !== se.Allowed && (t.disableVideo(), t.logger.info("Disabled video due to dynamic preset change: canProduceVideo: ".concat(t.permissions.canProduceVideo))), i != null && (c = i.media) !== null && c !== void 0 && c.screenshare && u(t, ut)[ut].canProduceScreenshare !== se.Allowed && (t.disableScreenShare(), t.logger.info("Disabled screenshare due to dynamic preset change: canProduceScreenshare: ".concat(t.permissions.canProduceScreenshare)));
20210
+ i != null && (a = i.media) !== null && a !== void 0 && a.audio && u(t, ut)[ut].canProduceAudio !== oe.Allowed && (t.disableAudio(), t.logger.info("Disabled audio due to dynamic preset change: canProduceAudio: ".concat(t.permissions.canProduceAudio))), i != null && (o = i.media) !== null && o !== void 0 && o.video && u(t, ut)[ut].canProduceVideo !== oe.Allowed && (t.disableVideo(), t.logger.info("Disabled video due to dynamic preset change: canProduceVideo: ".concat(t.permissions.canProduceVideo))), i != null && (c = i.media) !== null && c !== void 0 && c.screenshare && u(t, ut)[ut].canProduceScreenshare !== oe.Allowed && (t.disableScreenShare(), t.logger.info("Disabled screenshare due to dynamic preset change: canProduceScreenshare: ".concat(t.permissions.canProduceScreenshare)));
20211
20211
  });
20212
20212
  }
20213
20213
  /**
@@ -20312,13 +20312,13 @@ var jt = /* @__PURE__ */ w("context"), Yg = /* @__PURE__ */ function(s) {
20312
20312
  for (; ; )
20313
20313
  switch (c.p = c.n) {
20314
20314
  case 0:
20315
- if (this.permissions.canProduceAudio !== se.NotAllowed) {
20315
+ if (this.permissions.canProduceAudio !== oe.NotAllowed) {
20316
20316
  c.n = 1;
20317
20317
  break;
20318
20318
  }
20319
20319
  return c.a(2);
20320
20320
  case 1:
20321
- if (!(u(this, ut)[ut].canProduceAudio === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20321
+ if (!(u(this, ut)[ut].canProduceAudio === oe.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20322
20322
  c.n = 2;
20323
20323
  break;
20324
20324
  }
@@ -20370,13 +20370,13 @@ var jt = /* @__PURE__ */ w("context"), Yg = /* @__PURE__ */ function(s) {
20370
20370
  for (; ; )
20371
20371
  switch (c.p = c.n) {
20372
20372
  case 0:
20373
- if (u(this, ut)[ut].canProduceVideo !== se.NotAllowed) {
20373
+ if (u(this, ut)[ut].canProduceVideo !== oe.NotAllowed) {
20374
20374
  c.n = 1;
20375
20375
  break;
20376
20376
  }
20377
20377
  return c.a(2);
20378
20378
  case 1:
20379
- if (!(u(this, ut)[ut].canProduceVideo === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20379
+ if (!(u(this, ut)[ut].canProduceVideo === oe.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20380
20380
  c.n = 2;
20381
20381
  break;
20382
20382
  }
@@ -20446,13 +20446,13 @@ var jt = /* @__PURE__ */ w("context"), Yg = /* @__PURE__ */ function(s) {
20446
20446
  }
20447
20447
  throw new j("Can`t enable screenshare without joining room", "1105");
20448
20448
  case 1:
20449
- if (u(this, ut)[ut].canProduceScreenshare !== se.NotAllowed) {
20449
+ if (u(this, ut)[ut].canProduceScreenshare !== oe.NotAllowed) {
20450
20450
  a.n = 2;
20451
20451
  break;
20452
20452
  }
20453
20453
  return a.a(2);
20454
20454
  case 2:
20455
- if (!(u(this, ut)[ut].canProduceScreenshare === se.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20455
+ if (!(u(this, ut)[ut].canProduceScreenshare === oe.CanRequest && (this.stageStatus === "OFF_STAGE" || this.stageStatus === "REQUESTED_TO_JOIN_STAGE"))) {
20456
20456
  a.n = 3;
20457
20457
  break;
20458
20458
  }
@@ -21695,21 +21695,21 @@ var Tl = "transport closed", iO = 3e4, bs = /* @__PURE__ */ w("context"), aO = /
21695
21695
  }
21696
21696
  throw new Error("Cannot produce");
21697
21697
  case 2:
21698
- return l = i.track, d = i.encodings, p = i.codecOptions, v = i.stopTracks, f = v === void 0 ? !0 : v, g = i.disableTrackOnPause, k = g === void 0 ? !0 : g, y = i.zeroRtpOnPause, S = y === void 0 ? !1 : y, T = i.appData, E = T === void 0 ? {} : T, this.logger.debug("produce() [track:".concat(l.id, "]")), L.n = 3, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function q() {
21699
- var X, Y, H, J, N, U, x, le, Re;
21698
+ return l = i.track, d = i.encodings, p = i.codecOptions, v = i.stopTracks, f = v === void 0 ? !0 : v, g = i.disableTrackOnPause, k = g === void 0 ? !0 : g, y = i.zeroRtpOnPause, S = y === void 0 ? !1 : y, T = i.appData, E = T === void 0 ? {} : T, this.logger.debug("produce() [track:".concat(l.id, "]")), L.n = 3, this.awaitQueue.push(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function B() {
21699
+ var X, Z, W, K, N, U, J, se, Re;
21700
21700
  return h().w(function(pe) {
21701
21701
  for (; ; )
21702
21702
  switch (pe.n) {
21703
21703
  case 0:
21704
21704
  return pe.n = 1, o.handler.send({ track: l, encodings: d, codecOptions: p, screenShare: E == null ? void 0 : E.screenShare });
21705
21705
  case 1:
21706
- return X = pe.v, Y = X.offerSdp, H = X.callback, J = X.sender, N = X.mid, pe.n = 2, a({ offer: Y, kind: l.kind, paused: k ? !l.enabled || Object.hasOwn(l, "fakeTracks") : !1, appData: V(V({}, E || {}), {}, { mid: N }), codecOptions: p, producingTransportId: o.serverId });
21706
+ return X = pe.v, Z = X.offerSdp, W = X.callback, K = X.sender, N = X.mid, pe.n = 2, a({ offer: Z, kind: l.kind, paused: k ? !l.enabled || Object.hasOwn(l, "fakeTracks") : !1, appData: V(V({}, E || {}), {}, { mid: N }), codecOptions: p, producingTransportId: o.serverId });
21707
21707
  case 2:
21708
- return U = pe.v, x = U.answer, le = U.producerId, pe.n = 3, H(x);
21708
+ return U = pe.v, J = U.answer, se = U.producerId, pe.n = 3, W(J);
21709
21709
  case 3:
21710
- return Re = pe.v, pe.a(2, { producerId: le, localId: Re, rtpSender: J });
21710
+ return Re = pe.v, pe.a(2, { producerId: se, localId: Re, rtpSender: K });
21711
21711
  }
21712
- }, q);
21712
+ }, B);
21713
21713
  })), "Transport.produce");
21714
21714
  case 3:
21715
21715
  return I = L.v, M = I.producerId, _ = I.localId, O = I.rtpSender, L.a(2, this.createProducerObject({ id: M, localId: _, track: l, stopTracks: f, disableTrackOnPause: k, zeroRtpOnPause: S, appData: E, handler: this.handler, rtpSender: O }));
@@ -21920,31 +21920,31 @@ var Tl = "transport closed", iO = 3e4, bs = /* @__PURE__ */ w("context"), aO = /
21920
21920
  case 0:
21921
21921
  return o = i.consumerId, c = i.producerId, l = i.producingPeerId, d = i.producingTransportId, p = i.streamId, v = i.paused, f = i.screenShare, g = i.appData, k = i.kind, y = i.mimeType, S = "".concat(p, ":").concat(k), T = V(V({}, i), {}, { name: "consumer creation task error", message: "consumer creation failed" }), E.a(2, new Promise(/* @__PURE__ */ function() {
21922
21922
  var I = m(/* @__PURE__ */ h().m(function M(_, O) {
21923
- var L, q, X;
21924
- return h().w(function(Y) {
21923
+ var L, B, X;
21924
+ return h().w(function(Z) {
21925
21925
  for (; ; )
21926
- switch (Y.n) {
21926
+ switch (Z.n) {
21927
21927
  case 0:
21928
21928
  L = setTimeout(function() {
21929
21929
  a.logger.warn("Timed out waiting for track event ".concat(S, " producingPeerId: ").concat(l)), a.consumerTrackEvents.delete(S), T.isTimedout = !0, O(T);
21930
- }, iO), q = function(J, N) {
21930
+ }, iO), B = function(K, N) {
21931
21931
  try {
21932
- if (J.readyState === "ended")
21932
+ if (K.readyState === "ended")
21933
21933
  clearTimeout(L), O(T);
21934
21934
  else {
21935
- var U = J;
21935
+ var U = K;
21936
21936
  U.enabled = !0, a.handler.midTransceiverMap.set(N.mid, N);
21937
- var x = new XM(u(a, bs)[bs], { id: o, localId: N.mid, transceiver: N, track: U, paused: v, producerId: c, producingPeerId: l, producingTransportId: d, handler: a.handler, appData: V(V({}, g), {}, { screenShare: f, peerId: l }), rtpReceiver: N.receiver, mimeType: y });
21938
- a.consumers.set(o, x), x.once("close", function() {
21939
- a.consumers.delete(x.id), a.handler.midTransceiverMap.delete(N.mid);
21940
- }), a.logger.info("".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " created for producer ").concat(c, " of remote producing peer ").concat(l, " with track ").concat(J.id, " on mid ").concat(N.mid)), a.emit("newconsumer", x), clearTimeout(L), _(x);
21937
+ var J = new XM(u(a, bs)[bs], { id: o, localId: N.mid, transceiver: N, track: U, paused: v, producerId: c, producingPeerId: l, producingTransportId: d, handler: a.handler, appData: V(V({}, g), {}, { screenShare: f, peerId: l }), rtpReceiver: N.receiver, mimeType: y });
21938
+ a.consumers.set(o, J), J.once("close", function() {
21939
+ a.consumers.delete(J.id), a.handler.midTransceiverMap.delete(N.mid);
21940
+ }), a.logger.info("".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " created for producer ").concat(c, " of remote producing peer ").concat(l, " with track ").concat(K.id, " on mid ").concat(N.mid)), a.emit("newconsumer", J), clearTimeout(L), _(J);
21941
21941
  }
21942
- } catch (le) {
21943
- a.logger.error("Error while creating ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer for producerId ").concat(c, " of remote peer ").concat(l), le), clearTimeout(L), O(T);
21942
+ } catch (se) {
21943
+ a.logger.error("Error while creating ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer for producerId ").concat(c, " of remote peer ").concat(l), se), clearTimeout(L), O(T);
21944
21944
  }
21945
- }, X = a.unknownTracksMap.get(S), X ? (a.logger.info("track event already received for ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " of a remote peer ").concat(l, " with trackId ").concat(X.track.id, " on mid ").concat(X.transceiver.mid, " having key ").concat(S)), a.unknownTracksMap.delete(S), q(X.track, X.transceiver)) : (a.logger.info("Registering onTrack handler for ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " of a remote peer ").concat(l, " with key ").concat(S)), a.consumerTrackEvents.set(S, q));
21945
+ }, X = a.unknownTracksMap.get(S), X ? (a.logger.info("track event already received for ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " of a remote peer ").concat(l, " with trackId ").concat(X.track.id, " on mid ").concat(X.transceiver.mid, " having key ").concat(S)), a.unknownTracksMap.delete(S), B(X.track, X.transceiver)) : (a.logger.info("Registering onTrack handler for ".concat(f ? "screenshare" : "participant", " ").concat(k, " consumer ").concat(o, " of a remote peer ").concat(l, " with key ").concat(S)), a.consumerTrackEvents.set(S, B));
21946
21946
  case 1:
21947
- return Y.a(2);
21947
+ return Z.a(2);
21948
21948
  }
21949
21949
  }, M);
21950
21950
  }));
@@ -22207,7 +22207,7 @@ var Tl = "transport closed", iO = 3e4, bs = /* @__PURE__ */ w("context"), aO = /
22207
22207
  /**
22208
22208
  * Does not use mediaEventSlugs is the same irrespective of the SFU
22209
22209
  */
22210
- z.kickAll,
22210
+ Q.kickAll,
22211
22211
  bg.toBinary(n)
22212
22212
  );
22213
22213
  case 1:
@@ -22229,7 +22229,7 @@ var Tl = "transport closed", iO = 3e4, bs = /* @__PURE__ */ w("context"), aO = /
22229
22229
  /**
22230
22230
  * Does not use mediaEventSlugs is the same irrespective of the SFU
22231
22231
  */
22232
- z.kick,
22232
+ Q.kick,
22233
22233
  Rg.toBinary(n)
22234
22234
  );
22235
22235
  case 1:
@@ -22616,8 +22616,8 @@ var Tl = "transport closed", iO = 3e4, bs = /* @__PURE__ */ w("context"), aO = /
22616
22616
  switch (E.n) {
22617
22617
  case 0:
22618
22618
  return o = i.track, c = i.encodings, l = i.codecOptions, d = i.screenShare, this._assertSendDirection(), p = this.pc.addTransceiver(o, { direction: "sendonly", streams: [d ? this._sendScreenShareStream : this._sendWebStream], sendEncodings: c }), navigator.isReactNative || (this.logger.debug("creating new transceiver"), v = RTCRtpSender.getCapabilities(typeof o == "string" ? o : o.kind), this.logger.info("senders available params: ".concat(JSON.stringify(v))), f = [], l && l.length && l.forEach(function(I) {
22619
- var M = v.codecs.find(function(q) {
22620
- return q.mimeType.includes(I.name);
22619
+ var M = v.codecs.find(function(B) {
22620
+ return B.mimeType.includes(I.name);
22621
22621
  });
22622
22622
  if (I.parameters) {
22623
22623
  var _;
@@ -22690,22 +22690,22 @@ var Tl = "transport closed", iO = 3e4, bs = /* @__PURE__ */ w("context"), aO = /
22690
22690
  return c.reverse(), f = v.sender.getParameters(), f.encodings = c, I.n = 1, v.sender.setParameters(f);
22691
22691
  case 1:
22692
22692
  return g = function(_, O) {
22693
- var L, q = Nn.parse(_), X = q.media[q.media.length - 1], Y = X.rtp.filter(function(U) {
22694
- return O.some(function(x) {
22695
- return x.name === U.codec;
22693
+ var L, B = Nn.parse(_), X = B.media[B.media.length - 1], Z = X.rtp.filter(function(U) {
22694
+ return O.some(function(J) {
22695
+ return J.name === U.codec;
22696
22696
  });
22697
- }), H = X.fmtp.filter(function(U) {
22698
- return Y.some(function(x) {
22699
- return x.payload === U.payload;
22697
+ }), W = X.fmtp.filter(function(U) {
22698
+ return Z.some(function(J) {
22699
+ return J.payload === U.payload;
22700
22700
  });
22701
- }), J = (L = X.rtcpFb) === null || L === void 0 ? void 0 : L.filter(function(U) {
22702
- return Y.some(function(x) {
22703
- return x.payload === U.payload;
22701
+ }), K = (L = X.rtcpFb) === null || L === void 0 ? void 0 : L.filter(function(U) {
22702
+ return Z.some(function(J) {
22703
+ return J.payload === U.payload;
22704
22704
  });
22705
- }), N = Y.map(function(U) {
22705
+ }), N = Z.map(function(U) {
22706
22706
  return U.payload;
22707
22707
  });
22708
- return q.media[q.media.length - 1].rtp = Y, q.media[q.media.length - 1].fmtp = H, q.media[q.media.length - 1].rtcpFb = J, q.media[q.media.length - 1].payloads = N.join(" "), Nn.write(q);
22708
+ return B.media[B.media.length - 1].rtp = Z, B.media[B.media.length - 1].fmtp = W, B.media[B.media.length - 1].rtcpFb = K, B.media[B.media.length - 1].payloads = N.join(" "), Nn.write(B);
22709
22709
  }, I.n = 2, this.pc.createOffer();
22710
22710
  case 2:
22711
22711
  return k = I.v, k.sdp = g(k.sdp, l), this.logger.debug("[SDP] send() | calling pc.setLocalDescription() [offer:".concat(JSON.stringify(k), "]")), I.n = 3, this.pc.setLocalDescription(k);
@@ -22785,8 +22785,8 @@ var Tl = "transport closed", iO = 3e4, bs = /* @__PURE__ */ w("context"), aO = /
22785
22785
  switch (E.n) {
22786
22786
  case 0:
22787
22787
  return o = i.track, c = i.encodings, l = i.codecOptions, d = i.screenShare, this._assertSendDirection(), this.logger.debug("Safari12::creating new transceiver"), p = this.pc.addTransceiver(o, { direction: "sendonly", streams: [d ? this._sendScreenShareStream : this._sendWebStream], sendEncodings: c }), v = RTCRtpSender.getCapabilities(typeof o == "string" ? o : o.kind), this.logger.info("Safari12::senders available params: ".concat(JSON.stringify(v))), f = [], l && l.length > 0 && l.forEach(function(I) {
22788
- var M = v.codecs.find(function(q) {
22789
- return q.mimeType.includes(I.name);
22788
+ var M = v.codecs.find(function(B) {
22789
+ return B.mimeType.includes(I.name);
22790
22790
  });
22791
22791
  if (I.parameters) {
22792
22792
  var _;
@@ -23953,12 +23953,12 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
23953
23953
  for (var i = n > 1 ? void 0 : n ? GO(e, t) : e, a = r.length - 1, o; a >= 0; a--)
23954
23954
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
23955
23955
  return n && i && WO(e, t, i), i;
23956
- }, Yu = /* @__PURE__ */ w("roomUUID"), Xu = /* @__PURE__ */ w("peerDisplayName"), He = /* @__PURE__ */ w("socketClient"), B = /* @__PURE__ */ w("sfuHandler"), Rh = /* @__PURE__ */ w("rtpCapabilities"), mt = /* @__PURE__ */ w("events"), Xr = /* @__PURE__ */ w("roomJoiningInProgress"), Vi = /* @__PURE__ */ w("onceJoined"), Ii = /* @__PURE__ */ w("transportQueue"), Au = /* @__PURE__ */ w("rejoinRoomFn"), Bt = /* @__PURE__ */ w("connectionPromise"), qr = /* @__PURE__ */ w("screenshareConsumerProducer"), kt = /* @__PURE__ */ w("producerTypes"), yt = /* @__PURE__ */ w("audioActivityReporter"), Jr = /* @__PURE__ */ w("connectionHandler"), Iu = /* @__PURE__ */ w("handleMediaRoomJoinFailure"), _d = /* @__PURE__ */ w("joinRoom"), _h = /* @__PURE__ */ w("completeJoinRoom"), Ah = /* @__PURE__ */ w("reportRoomJoinedAnalytics"), Zu = /* @__PURE__ */ w("initializeConnection"), Ih = /* @__PURE__ */ w("getRtpCapabilities"), Mh = /* @__PURE__ */ w("sendJoinRoomMessage"), Ye = /* @__PURE__ */ w("getProducer"), Mi = /* @__PURE__ */ w("setProducer"), Ad = /* @__PURE__ */ w("deleteProducer"), Id = /* @__PURE__ */ w("handlePeerProducerCreateBroadcast"), Md = /* @__PURE__ */ w("getMicProducerDefaults"), Od = /* @__PURE__ */ w("getWebcamProducerDefaults"), Ze = /* @__PURE__ */ function() {
23956
+ }, Yu = /* @__PURE__ */ w("roomUUID"), Xu = /* @__PURE__ */ w("peerDisplayName"), He = /* @__PURE__ */ w("socketClient"), H = /* @__PURE__ */ w("sfuHandler"), Rh = /* @__PURE__ */ w("rtpCapabilities"), mt = /* @__PURE__ */ w("events"), Xr = /* @__PURE__ */ w("roomJoiningInProgress"), Vi = /* @__PURE__ */ w("onceJoined"), Ii = /* @__PURE__ */ w("transportQueue"), Au = /* @__PURE__ */ w("rejoinRoomFn"), Bt = /* @__PURE__ */ w("connectionPromise"), qr = /* @__PURE__ */ w("screenshareConsumerProducer"), kt = /* @__PURE__ */ w("producerTypes"), yt = /* @__PURE__ */ w("audioActivityReporter"), Jr = /* @__PURE__ */ w("connectionHandler"), Iu = /* @__PURE__ */ w("handleMediaRoomJoinFailure"), _d = /* @__PURE__ */ w("joinRoom"), _h = /* @__PURE__ */ w("completeJoinRoom"), Ah = /* @__PURE__ */ w("reportRoomJoinedAnalytics"), Zu = /* @__PURE__ */ w("initializeConnection"), Ih = /* @__PURE__ */ w("getRtpCapabilities"), Mh = /* @__PURE__ */ w("sendJoinRoomMessage"), Ye = /* @__PURE__ */ w("getProducer"), Mi = /* @__PURE__ */ w("setProducer"), Ad = /* @__PURE__ */ w("deleteProducer"), Id = /* @__PURE__ */ w("handlePeerProducerCreateBroadcast"), Md = /* @__PURE__ */ w("getMicProducerDefaults"), Od = /* @__PURE__ */ w("getWebcamProducerDefaults"), Ze = /* @__PURE__ */ function() {
23957
23957
  function s(r, e) {
23958
23958
  var t, n, i = this;
23959
- b(this, s), Object.defineProperty(this, Od, { value: a2 }), Object.defineProperty(this, Md, { value: i2 }), Object.defineProperty(this, Id, { value: n2 }), Object.defineProperty(this, Ad, { value: r2 }), Object.defineProperty(this, Mi, { value: t2 }), Object.defineProperty(this, Ye, { value: e2 }), Object.defineProperty(this, Mh, { value: xO }), Object.defineProperty(this, Ih, { value: ZO }), Object.defineProperty(this, Zu, { value: XO }), Object.defineProperty(this, Ah, { value: YO }), Object.defineProperty(this, _h, { value: QO }), Object.defineProperty(this, _d, { value: zO }), Object.defineProperty(this, Iu, { value: KO }), Object.defineProperty(this, Jr, { get: JO, set: void 0 }), this.context = void 0, this.authToken = void 0, this.e2ee = void 0, Object.defineProperty(this, Yu, { writable: !0, value: void 0 }), Object.defineProperty(this, Xu, { writable: !0, value: void 0 }), Object.defineProperty(this, He, { writable: !0, value: void 0 }), Object.defineProperty(this, B, { writable: !0, value: void 0 }), Object.defineProperty(this, Rh, { writable: !0, value: void 0 }), Object.defineProperty(this, mt, { writable: !0, value: void 0 }), Object.defineProperty(this, Xr, { writable: !0, value: void 0 }), Object.defineProperty(this, Vi, { writable: !0, value: void 0 }), Object.defineProperty(this, Ii, { writable: !0, value: void 0 }), Object.defineProperty(this, Au, { writable: !0, value: void 0 }), Object.defineProperty(this, Bt, { writable: !0, value: null }), Object.defineProperty(this, qr, { writable: !0, value: void 0 }), Object.defineProperty(this, kt, { writable: !0, value: void 0 }), Object.defineProperty(this, yt, { writable: !0, value: void 0 }), this.context = r;
23959
+ b(this, s), Object.defineProperty(this, Od, { value: a2 }), Object.defineProperty(this, Md, { value: i2 }), Object.defineProperty(this, Id, { value: n2 }), Object.defineProperty(this, Ad, { value: r2 }), Object.defineProperty(this, Mi, { value: t2 }), Object.defineProperty(this, Ye, { value: e2 }), Object.defineProperty(this, Mh, { value: xO }), Object.defineProperty(this, Ih, { value: ZO }), Object.defineProperty(this, Zu, { value: XO }), Object.defineProperty(this, Ah, { value: YO }), Object.defineProperty(this, _h, { value: QO }), Object.defineProperty(this, _d, { value: zO }), Object.defineProperty(this, Iu, { value: KO }), Object.defineProperty(this, Jr, { get: JO, set: void 0 }), this.context = void 0, this.authToken = void 0, this.e2ee = void 0, Object.defineProperty(this, Yu, { writable: !0, value: void 0 }), Object.defineProperty(this, Xu, { writable: !0, value: void 0 }), Object.defineProperty(this, He, { writable: !0, value: void 0 }), Object.defineProperty(this, H, { writable: !0, value: void 0 }), Object.defineProperty(this, Rh, { writable: !0, value: void 0 }), Object.defineProperty(this, mt, { writable: !0, value: void 0 }), Object.defineProperty(this, Xr, { writable: !0, value: void 0 }), Object.defineProperty(this, Vi, { writable: !0, value: void 0 }), Object.defineProperty(this, Ii, { writable: !0, value: void 0 }), Object.defineProperty(this, Au, { writable: !0, value: void 0 }), Object.defineProperty(this, Bt, { writable: !0, value: null }), Object.defineProperty(this, qr, { writable: !0, value: void 0 }), Object.defineProperty(this, kt, { writable: !0, value: void 0 }), Object.defineProperty(this, yt, { writable: !0, value: void 0 }), this.context = r;
23960
23960
  var a = e.socket;
23961
- this.mediaJoined = !1, u(this, He)[He] = a, u(this, Xr)[Xr] = !1, u(this, B)[B] = new RO(r, a), u(this, mt)[mt] = u(this, B)[B].events, u(this, qr)[qr] = /* @__PURE__ */ new Set(), u(this, kt)[kt] = /* @__PURE__ */ new Map(), u(this, Vi)[Vi] = !1, u(this, Ii)[Ii] = new sh(r.getValue("logger")), u(this, yt)[yt] = new ql(this.context, u(this, B)[B].socketHandler.audioActivity.bind(u(this, B)[B].socketHandler)), this.e2ee = (t = (n = r.getValue("modules").e2ee) === null || n === void 0 ? void 0 : n.enabled) !== null && t !== void 0 ? t : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), u(this, Au)[Au] = up(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function o() {
23961
+ this.mediaJoined = !1, u(this, He)[He] = a, u(this, Xr)[Xr] = !1, u(this, H)[H] = new RO(r, a), u(this, mt)[mt] = u(this, H)[H].events, u(this, qr)[qr] = /* @__PURE__ */ new Set(), u(this, kt)[kt] = /* @__PURE__ */ new Map(), u(this, Vi)[Vi] = !1, u(this, Ii)[Ii] = new sh(r.getValue("logger")), u(this, yt)[yt] = new ql(this.context, u(this, H)[H].socketHandler.audioActivity.bind(u(this, H)[H].socketHandler)), this.e2ee = (t = (n = r.getValue("modules").e2ee) === null || n === void 0 ? void 0 : n.enabled) !== null && t !== void 0 ? t : !1, this.handleSocketEvents(), this.handleCallstatsEvents(), u(this, Au)[Au] = up(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function o() {
23962
23962
  var c, l;
23963
23963
  return h().w(function(d) {
23964
23964
  for (; ; )
@@ -24005,7 +24005,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24005
24005
  u(this, Jr)[Jr].mediaJoined = e;
24006
24006
  } }, { key: "reset", value: function(e) {
24007
24007
  var t = e.resetTransportQueue;
24008
- this.logger.info("Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ".concat(t, ").")), u(this, B)[B].closeAllProducers(), u(this, B)[B].closeAllConsumers(), u(this, kt)[kt].clear(), u(this, qr)[qr].clear(), u(this, Bt)[Bt] = null, t && u(this, Ii)[Ii].stop(), u(this, B)[B].stopAllTransports(), u(this, B)[B].reset(), t && (u(this, Ii)[Ii] = new sh());
24008
+ this.logger.info("Resetting media node client: closing all transports, producers, consumers, and queues(resetTransportQueue: ".concat(t, ").")), u(this, H)[H].closeAllProducers(), u(this, H)[H].closeAllConsumers(), u(this, kt)[kt].clear(), u(this, qr)[qr].clear(), u(this, Bt)[Bt] = null, t && u(this, Ii)[Ii].stop(), u(this, H)[H].stopAllTransports(), u(this, H)[H].reset(), t && (u(this, Ii)[Ii] = new sh());
24009
24009
  } }, { key: "joinRoom", value: function() {
24010
24010
  var r = m(/* @__PURE__ */ h().m(function t(n, i) {
24011
24011
  var a = this, o, c, l, d, p = arguments, v;
@@ -24072,12 +24072,12 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24072
24072
  return e;
24073
24073
  }()
24074
24074
  ) }, { key: "getConsumers", value: function() {
24075
- return u(this, B)[B].consumers;
24075
+ return u(this, H)[H].consumers;
24076
24076
  } }, { key: "getProducers", value: function() {
24077
- return u(this, B)[B].producers;
24077
+ return u(this, H)[H].producers;
24078
24078
  } }, { key: "handoverPeerProducers", value: function(e, t) {
24079
24079
  var n = new Set(t);
24080
- return Array.from(u(this, B)[B].consumers.values()).filter(function(i) {
24080
+ return Array.from(u(this, H)[H].consumers.values()).filter(function(i) {
24081
24081
  return n.has(i.producerId) ? (i.reassignPeer(e), !0) : !1;
24082
24082
  });
24083
24083
  } }, { key: "leaveRoom", value: function() {
@@ -24087,7 +24087,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24087
24087
  for (; ; )
24088
24088
  switch (l.n) {
24089
24089
  case 0:
24090
- (n = u(this, yt)[yt]) === null || n === void 0 || n.stop(), u(this, B)[B].stopAllTransports(), u(this, Vi)[Vi] = !1, u(this, Jr)[Jr].mediaJoinAttempted = !1, a = { closeRoom: !1 };
24090
+ (n = u(this, yt)[yt]) === null || n === void 0 || n.stop(), u(this, H)[H].stopAllTransports(), u(this, Vi)[Vi] = !1, u(this, Jr)[Jr].mediaJoinAttempted = !1, a = { closeRoom: !1 };
24091
24091
  try {
24092
24092
  o = u(this, He)[He].sendMessage(u(this, mt)[mt].leaveRoom, NS.toBinary(a)), o || this.logger.warn("MediaNodeClient.leaveRoom: media leave was not sent");
24093
24093
  } catch (d) {
@@ -24131,7 +24131,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24131
24131
  }
24132
24132
  return i.a(2, Promise.resolve());
24133
24133
  case 1:
24134
- return i.a(2, u(this, B)[B].createConsumers(n));
24134
+ return i.a(2, u(this, H)[H].createConsumers(n));
24135
24135
  }
24136
24136
  }, t, this);
24137
24137
  }));
@@ -24140,7 +24140,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24140
24140
  }
24141
24141
  return e;
24142
24142
  }() }, { key: "removeClosedConsumers", value: function(e) {
24143
- return u(this, B)[B].removeClosedConsumers(e);
24143
+ return u(this, H)[H].removeClosedConsumers(e);
24144
24144
  } }, { key: "closeConsumersById", value: function() {
24145
24145
  var r = m(/* @__PURE__ */ h().m(function t(n) {
24146
24146
  return h().w(function(i) {
@@ -24153,7 +24153,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24153
24153
  }
24154
24154
  return i.a(2);
24155
24155
  case 1:
24156
- return i.n = 2, u(this, B)[B].closeConsumers(n);
24156
+ return i.n = 2, u(this, H)[H].closeConsumers(n);
24157
24157
  case 2:
24158
24158
  return i.a(2);
24159
24159
  }
@@ -24176,11 +24176,11 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24176
24176
  }
24177
24177
  return T.n = 1, l;
24178
24178
  case 1:
24179
- if (d = T.v, !u(this, B)[B].producers.has(d)) {
24179
+ if (d = T.v, !u(this, H)[H].producers.has(d)) {
24180
24180
  T.n = 5;
24181
24181
  break;
24182
24182
  }
24183
- if (p = u(this, B)[B].producers.get(d), p.closed) {
24183
+ if (p = u(this, H)[H].producers.get(d), p.closed) {
24184
24184
  T.n = 4;
24185
24185
  break;
24186
24186
  }
@@ -24196,7 +24196,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24196
24196
  case 6:
24197
24197
  return v = u(this, Od)[Od](n), f = kc(this.context, "disableSimulcast"), g = (i = this.context) === null || i === void 0 || (i = i.getValue("overrides")) === null || i === void 0 ? void 0 : i.simulcastConfig, k = f || g && g.disable || !((a = this.context) !== null && a !== void 0 && (a = a.getValue("theme")) !== null && a !== void 0 && a.isSimulcastEnabled), k ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), v.encodings = wI(this.context, n), this.logger.info("Simulcast encodings: ".concat(JSON.stringify(v.encodings)))), y = function() {
24198
24198
  o.logger.info("Disabling video due to the producer closure"), u(o, kt)[kt].delete(c);
24199
- }, S = u(this, B)[B].createProducer(v, y), u(this, Mi)[Mi](c, S.then(function(E) {
24199
+ }, S = u(this, H)[H].createProducer(v, y), u(this, Mi)[Mi](c, S.then(function(E) {
24200
24200
  return E.id;
24201
24201
  })), T.a(2, S.then(function(E) {
24202
24202
  return E.track;
@@ -24245,12 +24245,12 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24245
24245
  case 2:
24246
24246
  return c = E.v, E.n = 3, u(this, Ye)[Ye](Pt.SCREENSHARE_AUDIO);
24247
24247
  case 3:
24248
- return l = E.v, d = u(this, B)[B].producers.get(c), p = u(this, B)[B].producers.get(l), v = [], d && !d.closed ? v.push(d.replaceTrack({ track: a })) : (f = { track: a, codecOptions: [{ name: "VP8" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: wt.isElectron() }, stopTracks: !1 }, g = function() {
24248
+ return l = E.v, d = u(this, H)[H].producers.get(c), p = u(this, H)[H].producers.get(l), v = [], d && !d.closed ? v.push(d.replaceTrack({ track: a })) : (f = { track: a, codecOptions: [{ name: "VP8" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: wt.isElectron() }, stopTracks: !1 }, g = function() {
24249
24249
  i.logger.info("Disabling screenShare due to the producer closure"), u(i, kt)[kt].delete(Pt.SCREENSHARE_VIDEO), u(i, kt)[kt].delete(Pt.SCREENSHARE_AUDIO);
24250
- }, k = u(this, B)[B].createProducer(f, g), u(this, Mi)[Mi](Pt.SCREENSHARE_VIDEO, k.then(function(I) {
24250
+ }, k = u(this, H)[H].createProducer(f, g), u(this, Mi)[Mi](Pt.SCREENSHARE_VIDEO, k.then(function(I) {
24251
24251
  return I.id;
24252
24252
  })), v.push(k)), o && (p && !p.closed ? v.push(p.replaceTrack({ track: o })) : (y = { track: o, codecOptions: [{ name: "opus" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: wt.isElectron() }, stopTracks: !1, zeroRtpOnPause: !1 }, S = function() {
24253
- }, T = u(this, B)[B].createProducer(y, S), u(this, Mi)[Mi](Pt.SCREENSHARE_AUDIO, T.then(function(I) {
24253
+ }, T = u(this, H)[H].createProducer(y, S), u(this, Mi)[Mi](Pt.SCREENSHARE_AUDIO, T.then(function(I) {
24254
24254
  return I.id;
24255
24255
  })), v.push(T))), E.n = 4, Promise.all(v);
24256
24256
  case 4:
@@ -24283,11 +24283,11 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24283
24283
  }
24284
24284
  return f.n = 2, a;
24285
24285
  case 2:
24286
- if (o = f.v, !u(this, B)[B].producers.has(o)) {
24286
+ if (o = f.v, !u(this, H)[H].producers.has(o)) {
24287
24287
  f.n = 6;
24288
24288
  break;
24289
24289
  }
24290
- if (c = u(this, B)[B].producers.get(o), c.closed) {
24290
+ if (c = u(this, H)[H].producers.get(o), c.closed) {
24291
24291
  f.n = 5;
24292
24292
  break;
24293
24293
  }
@@ -24297,7 +24297,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24297
24297
  case 4:
24298
24298
  return u(this, yt)[yt] && (u(this, yt)[yt].audioTrack = n, u(this, yt)[yt].producerId = o, u(this, yt)[yt].start(!0)), f.a(2);
24299
24299
  case 5:
24300
- return f.n = 6, u(this, B)[B].closeProducer(o, { stopTrack: !1 });
24300
+ return f.n = 6, u(this, H)[H].closeProducer(o, { stopTrack: !1 });
24301
24301
  case 6:
24302
24302
  return f.n = 7, this.shareMic(n);
24303
24303
  case 7:
@@ -24305,7 +24305,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24305
24305
  case 8:
24306
24306
  return l = u(this, Md)[Md](n), d = function() {
24307
24307
  u(i, kt)[kt].delete(Pt.MIC);
24308
- }, p = u(this, B)[B].createProducer(l, d), u(this, Mi)[Mi](Pt.MIC, p.then(function(g) {
24308
+ }, p = u(this, H)[H].createProducer(l, d), u(this, Mi)[Mi](Pt.MIC, p.then(function(g) {
24309
24309
  return g.id;
24310
24310
  })), f.n = 9, p.then(function(g) {
24311
24311
  u(i, yt)[yt] && (u(i, yt)[yt].audioTrack = g.track, u(i, yt)[yt].producerId = g.id, u(i, yt)[yt].start());
@@ -24333,7 +24333,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24333
24333
  case 0:
24334
24334
  return c.n = 1, u(this, Ye)[Ye](Pt.MIC);
24335
24335
  case 1:
24336
- if (i = c.v, a = u(this, B)[B].producers.get(i), a) {
24336
+ if (i = c.v, a = u(this, H)[H].producers.get(i), a) {
24337
24337
  c.n = 2;
24338
24338
  break;
24339
24339
  }
@@ -24364,7 +24364,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24364
24364
  case 0:
24365
24365
  return o.n = 1, u(this, Ye)[Ye](Pt.WEBCAM);
24366
24366
  case 1:
24367
- if (n = o.v, i = u(this, B)[B].producers.get(n), i) {
24367
+ if (n = o.v, i = u(this, H)[H].producers.get(n), i) {
24368
24368
  o.n = 2;
24369
24369
  break;
24370
24370
  }
@@ -24389,7 +24389,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24389
24389
  case 0:
24390
24390
  return o.n = 1, u(this, Ye)[Ye](Pt.MIC);
24391
24391
  case 1:
24392
- if (n = o.v, i = u(this, B)[B].producers.get(n), i) {
24392
+ if (n = o.v, i = u(this, H)[H].producers.get(n), i) {
24393
24393
  o.n = 2;
24394
24394
  break;
24395
24395
  }
@@ -24420,7 +24420,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24420
24420
  case 0:
24421
24421
  return n = c.length > 0 && c[0] !== void 0 ? c[0] : Pt.WEBCAM, l.n = 1, u(this, Ye)[Ye](n);
24422
24422
  case 1:
24423
- if (i = l.v, a = u(this, B)[B].producers.get(i), a) {
24423
+ if (i = l.v, a = u(this, H)[H].producers.get(i), a) {
24424
24424
  l.n = 2;
24425
24425
  break;
24426
24426
  }
@@ -24455,7 +24455,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24455
24455
  a.n = 2;
24456
24456
  break;
24457
24457
  }
24458
- return a.n = 2, u(this, B)[B].closeProducer(i);
24458
+ return a.n = 2, u(this, H)[H].closeProducer(i);
24459
24459
  case 2:
24460
24460
  return a.a(2);
24461
24461
  }
@@ -24478,7 +24478,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24478
24478
  a.n = 2;
24479
24479
  break;
24480
24480
  }
24481
- return a.n = 2, u(this, B)[B].closeProducer(i);
24481
+ return a.n = 2, u(this, H)[H].closeProducer(i);
24482
24482
  case 2:
24483
24483
  (n = u(this, yt)[yt]) === null || n === void 0 || n.stop(), u(this, kt)[kt].delete(Pt.MIC);
24484
24484
  case 3:
@@ -24505,13 +24505,13 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24505
24505
  a.n = 3;
24506
24506
  break;
24507
24507
  }
24508
- return a.n = 3, u(this, B)[B].closeProducer(n);
24508
+ return a.n = 3, u(this, H)[H].closeProducer(n);
24509
24509
  case 3:
24510
24510
  if (!i) {
24511
24511
  a.n = 4;
24512
24512
  break;
24513
24513
  }
24514
- return a.n = 4, u(this, B)[B].closeProducer(i);
24514
+ return a.n = 4, u(this, H)[H].closeProducer(i);
24515
24515
  case 4:
24516
24516
  u(this, qr)[qr].clear(), u(this, kt)[kt].delete(Pt.SCREENSHARE_VIDEO), u(this, kt)[kt].delete(Pt.SCREENSHARE_AUDIO);
24517
24517
  case 5:
@@ -24552,7 +24552,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24552
24552
  }
24553
24553
  return c.n = 1, u(this, Ye)[Ye](Pt.WEBCAM);
24554
24554
  case 1:
24555
- return a = c.v, c.n = 2, u(this, B)[B].closeProducer(a, { stopTrack: !1 });
24555
+ return a = c.v, c.n = 2, u(this, H)[H].closeProducer(a, { stopTrack: !1 });
24556
24556
  case 2:
24557
24557
  this.shareWebcam(n);
24558
24558
  case 3:
@@ -24562,7 +24562,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24562
24562
  }
24563
24563
  return c.n = 4, u(this, Ye)[Ye](Pt.SCREENSHARE_VIDEO);
24564
24564
  case 4:
24565
- return o = c.v, c.n = 5, u(this, B)[B].closeProducer(o, { stopTrack: !1 });
24565
+ return o = c.v, c.n = 5, u(this, H)[H].closeProducer(o, { stopTrack: !1 });
24566
24566
  case 5:
24567
24567
  this.shareScreen({ video: i });
24568
24568
  case 6:
@@ -24581,7 +24581,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24581
24581
  for (; ; )
24582
24582
  switch (c.n) {
24583
24583
  case 0:
24584
- return a = { displayName: n, participantId: i != null ? i : this.peerId }, c.n = 1, u(this, B)[B].socketHandler.changeDisplayName(a);
24584
+ return a = { displayName: n, participantId: i != null ? i : this.peerId }, c.n = 1, u(this, H)[H].socketHandler.changeDisplayName(a);
24585
24585
  case 1:
24586
24586
  if (o = c.v, o) {
24587
24587
  c.n = 2;
@@ -24599,11 +24599,11 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24599
24599
  return e;
24600
24600
  }() }, { key: "kick", value: function(e) {
24601
24601
  var t = { peerIds: [e] };
24602
- u(this, B)[B].socketHandler.kickPeer(t);
24602
+ u(this, H)[H].socketHandler.kickPeer(t);
24603
24603
  } }, {
24604
24604
  key: "kickAll",
24605
24605
  value: function() {
24606
- u(this, B)[B].socketHandler.kickAll();
24606
+ u(this, H)[H].socketHandler.kickAll();
24607
24607
  }
24608
24608
  /* eslint-disable-next-line @typescript-eslint/no-unused-vars */
24609
24609
  }, { key: "muteAll", value: function() {
@@ -24613,7 +24613,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24613
24613
  for (; ; )
24614
24614
  switch (a.n) {
24615
24615
  case 0:
24616
- return a.n = 1, u(this, B)[B].socketHandler.hostControlForAll("audio");
24616
+ return a.n = 1, u(this, H)[H].socketHandler.hostControlForAll("audio");
24617
24617
  case 1:
24618
24618
  if (i = a.v, i) {
24619
24619
  a.n = 2;
@@ -24636,7 +24636,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24636
24636
  for (; ; )
24637
24637
  switch (i.n) {
24638
24638
  case 0:
24639
- return i.n = 1, u(this, B)[B].socketHandler.hostControlForAll("video");
24639
+ return i.n = 1, u(this, H)[H].socketHandler.hostControlForAll("video");
24640
24640
  case 1:
24641
24641
  if (n = i.v, n) {
24642
24642
  i.n = 2;
@@ -24659,7 +24659,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24659
24659
  for (; ; )
24660
24660
  switch (a.n) {
24661
24661
  case 0:
24662
- return a.n = 1, u(this, B)[B].socketHandler.hostControlForPeer(n, "audio");
24662
+ return a.n = 1, u(this, H)[H].socketHandler.hostControlForPeer(n, "audio");
24663
24663
  case 1:
24664
24664
  if (i = a.v, i) {
24665
24665
  a.n = 2;
@@ -24682,7 +24682,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24682
24682
  for (; ; )
24683
24683
  switch (a.n) {
24684
24684
  case 0:
24685
- return a.n = 1, u(this, B)[B].socketHandler.hostControlForPeer(n, "video");
24685
+ return a.n = 1, u(this, H)[H].socketHandler.hostControlForPeer(n, "video");
24686
24686
  case 1:
24687
24687
  if (i = a.v, i) {
24688
24688
  a.n = 2;
@@ -24721,7 +24721,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24721
24721
  }
24722
24722
  return e;
24723
24723
  }() }, { key: "validateScreenShare", value: function(e) {
24724
- return this.peerId === e.peerId && u(this, B)[B].producers.get(e.producerId) && u(this, qr)[qr].add(e.consumerPeerId), u(this, qr)[qr].size;
24724
+ return this.peerId === e.peerId && u(this, H)[H].producers.get(e.producerId) && u(this, qr)[qr].add(e.consumerPeerId), u(this, qr)[qr].size;
24725
24725
  } }, { key: "switchConsumersToLayer", value: function() {
24726
24726
  var r = m(/* @__PURE__ */ h().m(function t(n, i) {
24727
24727
  var a = this, o;
@@ -24731,7 +24731,7 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24731
24731
  case 0:
24732
24732
  o = n.map(function(l) {
24733
24733
  return a.getConsumers().get(l);
24734
- }), u(this, B)[B].switchConsumersToLayer(o, i);
24734
+ }), u(this, H)[H].switchConsumersToLayer(o, i);
24735
24735
  case 1:
24736
24736
  return c.a(2);
24737
24737
  }
@@ -24834,12 +24834,12 @@ var WO = Object.defineProperty, GO = Object.getOwnPropertyDescriptor, it = funct
24834
24834
  var e = this;
24835
24835
  this.context.getValue("callstats").onConsumerScore(function(t) {
24836
24836
  t.forEach(function(n, i) {
24837
- var a = u(e, B)[B].consumers.get(i);
24837
+ var a = u(e, H)[H].consumers.get(i);
24838
24838
  a && e.context.getValue("peerSessionStore").emit($.CONSUMER_SCORE_UPDATE, { id: i, kind: a.kind, peerId: a.peerId, score: n.score, scoreStats: n });
24839
24839
  });
24840
24840
  }), this.context.getValue("callstats").onProducerScore(function(t) {
24841
24841
  t.forEach(function(n, i) {
24842
- var a = Array.from(u(e, B)[B].producers.values()).find(function(o) {
24842
+ var a = Array.from(u(e, H)[H].producers.values()).find(function(o) {
24843
24843
  return o.id === i;
24844
24844
  });
24845
24845
  a && e.context.getValue("peerSessionStore").emit($.PRODUCER_SCORE_UPDATE, { id: i, kind: a.kind, appData: a.appData, score: n.score, scoreStats: n });
@@ -24910,7 +24910,7 @@ function Dh() {
24910
24910
  }
24911
24911
  throw p = new Error("Media room join completion superseded by a newer connection"), d(p), p;
24912
24912
  case 1:
24913
- return l > 0 && r.logger.warn("Retrying media room join completion for peer ".concat(e, ": attempt=").concat(l + 1)), v.a(2, u(r, B)[B].socketHandler.notifySelfJoinComplete());
24913
+ return l > 0 && r.logger.warn("Retrying media room join completion for peer ".concat(e, ": attempt=").concat(l + 1)), v.a(2, u(r, H)[H].socketHandler.notifySelfJoinComplete());
24914
24914
  }
24915
24915
  }, c);
24916
24916
  }));
@@ -24953,7 +24953,7 @@ function Lh() {
24953
24953
  l.n = 4;
24954
24954
  break;
24955
24955
  }
24956
- return l.n = 3, u(this, B)[B].setupTransports({ send: !0, recv: !0 });
24956
+ return l.n = 3, u(this, H)[H].setupTransports({ send: !0, recv: !0 });
24957
24957
  case 3:
24958
24958
  l.n = 5;
24959
24959
  break;
@@ -24997,7 +24997,7 @@ function Nh() {
24997
24997
  }
24998
24998
  return d(new Error("Socket is not connected")), v.a(2);
24999
24999
  case 1:
25000
- return l > 0 && i.logger.warn("Retry: send joinRoom message", { debuggingHint: "Retry attempt ".concat(l) }), v.p = 2, v.n = 3, u(i, B)[B].socketHandler.joinRoom(e, r, n, t);
25000
+ return l > 0 && i.logger.warn("Retry: send joinRoom message", { debuggingHint: "Retry attempt ".concat(l) }), v.p = 2, v.n = 3, u(i, H)[H].socketHandler.joinRoom(e, r, n, t);
25001
25001
  case 3:
25002
25002
  v.n = 5;
25003
25003
  break;
@@ -25092,14 +25092,14 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25092
25092
  for (var i = n > 1 ? void 0 : n ? u2(e, t) : e, a = r.length - 1, o; a >= 0; a--)
25093
25093
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
25094
25094
  return n && i && o2(e, t, i), i;
25095
- }, xg = (ha = /* @__PURE__ */ w("socketService"), Gt = /* @__PURE__ */ w("roomSocketHandler"), Z = /* @__PURE__ */ w("context"), xe = /* @__PURE__ */ w("roomNodeClient"), /* @__PURE__ */ function() {
25095
+ }, xg = (ha = /* @__PURE__ */ w("socketService"), Gt = /* @__PURE__ */ w("roomSocketHandler"), x = /* @__PURE__ */ w("context"), xe = /* @__PURE__ */ w("roomNodeClient"), /* @__PURE__ */ function() {
25096
25096
  function s(r, e, t, n) {
25097
- b(this, s), Object.defineProperty(this, xe, { get: c2, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, ha, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, Gt, { writable: !0, value: void 0 }), Object.defineProperty(this, Z, { writable: !0, value: void 0 });
25097
+ b(this, s), Object.defineProperty(this, xe, { get: c2, set: void 0 }), this.self = void 0, this.authToken = void 0, Object.defineProperty(this, ha, { writable: !0, value: void 0 }), this.viewType = void 0, Object.defineProperty(this, Gt, { writable: !0, value: void 0 }), Object.defineProperty(this, x, { writable: !0, value: void 0 });
25098
25098
  var i = t.socket, a = r.getValue("authToken");
25099
- this.self = e, u(this, Z)[Z] = r, this.viewType = n, this.authToken = a, u(this, ha)[ha] = i, u(this, Gt)[Gt] = t, this.setupEvents();
25099
+ this.self = e, u(this, x)[x] = r, this.viewType = n, this.authToken = a, u(this, ha)[ha] = i, u(this, Gt)[Gt] = t, this.setupEvents();
25100
25100
  }
25101
25101
  return P(s, [{ key: "peerId", get: function() {
25102
- return u(this, Z)[Z].getValue("peerId");
25102
+ return u(this, x)[x].getValue("peerId");
25103
25103
  } }, {
25104
25104
  key: "telemetry",
25105
25105
  get: (
@@ -25108,7 +25108,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25108
25108
  * Not for external use
25109
25109
  */
25110
25110
  function() {
25111
- return u(this, Z)[Z].getValue("telemetry");
25111
+ return u(this, x)[x].getValue("telemetry");
25112
25112
  }
25113
25113
  )
25114
25114
  /**
@@ -25116,9 +25116,9 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25116
25116
  * Not for external use
25117
25117
  */
25118
25118
  }, { key: "logger", get: function() {
25119
- return u(this, Z)[Z].getValue("logger");
25119
+ return u(this, x)[x].getValue("logger");
25120
25120
  } }, { key: "mediaJoined", get: function() {
25121
- return u(this, Z)[Z].getValue("connectionHandler").mediaJoined;
25121
+ return u(this, x)[x].getValue("connectionHandler").mediaJoined;
25122
25122
  } }, { key: "shareMediaTracks", value: function() {
25123
25123
  var r = m(/* @__PURE__ */ h().m(function t() {
25124
25124
  var n, i, a, o, c, l, d, p, v, f, g, k, y, S;
@@ -25126,7 +25126,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25126
25126
  for (; ; )
25127
25127
  switch (T.p = T.n) {
25128
25128
  case 0:
25129
- if (n = this.self, i = n.audioTrack, a = n.videoTrack, o = n.permissions, c = n.audioEnabled, l = n.videoEnabled, d = n.screenShareEnabled, p = n.screenShareTracks, !(o.canProduceAudio === se.Allowed && c)) {
25129
+ if (n = this.self, i = n.audioTrack, a = n.videoTrack, o = n.permissions, c = n.audioEnabled, l = n.videoEnabled, d = n.screenShareEnabled, p = n.screenShareTracks, !(o.canProduceAudio === oe.Allowed && c)) {
25130
25130
  T.n = 6;
25131
25131
  break;
25132
25132
  }
@@ -25146,7 +25146,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25146
25146
  case 5:
25147
25147
  this.logger.warn("shareMediaTracks: audio track is dead, disabling audio"), this.self.disableAudio();
25148
25148
  case 6:
25149
- if (!(o.canProduceVideo === se.Allowed && l)) {
25149
+ if (!(o.canProduceVideo === oe.Allowed && l)) {
25150
25150
  T.n = 12;
25151
25151
  break;
25152
25152
  }
@@ -25166,7 +25166,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25166
25166
  case 11:
25167
25167
  this.logger.warn("shareMediaTracks: video track is dead, disabling video"), this.self.disableVideo();
25168
25168
  case 12:
25169
- if (!(o.canProduceScreenshare === se.Allowed && d)) {
25169
+ if (!(o.canProduceScreenshare === oe.Allowed && d)) {
25170
25170
  T.n = 18;
25171
25171
  break;
25172
25172
  }
@@ -25238,7 +25238,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25238
25238
  for (; ; )
25239
25239
  switch (c.n) {
25240
25240
  case 0:
25241
- if (i = n.wasSocketJoinAttempted, a = n.wasMediaJoinAttempted, u(this, Z)[Z].getValue("callstats").callEnded(), !(i || a)) {
25241
+ if (i = n.wasSocketJoinAttempted, a = n.wasMediaJoinAttempted, u(this, x)[x].getValue("callstats").callEnded(), !(i || a)) {
25242
25242
  c.n = 2;
25243
25243
  break;
25244
25244
  }
@@ -25259,7 +25259,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25259
25259
  return e;
25260
25260
  }() }, { key: "setupEvents", value: function() {
25261
25261
  var e = this;
25262
- u(this, Z)[Z].getValue("peerSessionStore").on($.RESET_PRODUCER_STATE, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
25262
+ u(this, x)[x].getValue("peerSessionStore").on($.RESET_PRODUCER_STATE, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
25263
25263
  return h().w(function(n) {
25264
25264
  for (; ; )
25265
25265
  switch (n.n) {
@@ -25275,36 +25275,36 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25275
25275
  return n.a(2);
25276
25276
  }
25277
25277
  }, t);
25278
- }))), u(this, Z)[Z].getValue("peerSessionStore").on($.ROOM_NODE_RECONNECTED, function() {
25278
+ }))), u(this, x)[x].getValue("peerSessionStore").on($.ROOM_NODE_RECONNECTED, function() {
25279
25279
  e.self.roomState = "joined", e.self.emit("roomJoined", { reconnected: !0 });
25280
- }), u(this, Z)[Z].getValue("peerSessionStore").on($.ROOM_NODE_DISCONNECTED, function() {
25280
+ }), u(this, x)[x].getValue("peerSessionStore").on($.ROOM_NODE_DISCONNECTED, function() {
25281
25281
  e.self.roomState !== "disconnected" && (e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" }));
25282
- }), u(this, Z)[Z].getValue("peerSessionStore").on($.ROOM_NODE_FAILED, function() {
25282
+ }), u(this, x)[x].getValue("peerSessionStore").on($.ROOM_NODE_FAILED, function() {
25283
25283
  e.logger.error("Room node failed. SDK re-initialization is required."), e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
25284
- }), u(this, Z)[Z].getValue("peerSessionStore").on($.SOCKET_SERVICE_RECONNECTED, function(t) {
25284
+ }), u(this, x)[x].getValue("peerSessionStore").on($.SOCKET_SERVICE_RECONNECTED, function(t) {
25285
25285
  !t.wasSocketJoinAttempted && !t.wasMediaJoinAttempted && (e.self.roomState = "init"), e.resetSelf(t).catch(function(n) {
25286
25286
  e.logger.error("Failed to reset self after socket reconnection", { error: n });
25287
25287
  });
25288
- }), u(this, Z)[Z].getValue("peerSessionStore").on($.SOCKET_SERVICE_DISCONNECTED, function() {
25288
+ }), u(this, x)[x].getValue("peerSessionStore").on($.SOCKET_SERVICE_DISCONNECTED, function() {
25289
25289
  e.self.roomState !== "disconnected" && (e.self.roomState = "disconnected", e.self.emit("roomLeft", { state: "disconnected" }));
25290
- }), u(this, Z)[Z].getValue("peerSessionStore").on($.SOCKET_SERVICE_FAILED, function() {
25290
+ }), u(this, x)[x].getValue("peerSessionStore").on($.SOCKET_SERVICE_FAILED, function() {
25291
25291
  e.logger.error("Socket reconnection failed after exhausting all attempts. SDK re-initialization is required."), e.self.roomState = "failed", e.self.emit("roomLeft", { state: "failed" });
25292
- }), u(this, Gt)[Gt].on(z.waitingRoomRequestAccepted, function() {
25292
+ }), u(this, Gt)[Gt].on(Q.waitingRoomRequestAccepted, function() {
25293
25293
  e.waitlistAcceptHandler();
25294
25294
  }), u(this, Gt)[Gt].on(Yc.updateUserPreset, function(t) {
25295
25295
  t.updatePeersPresets.forEach(function(n) {
25296
- n.userIds === e.self.userId && u(e, Z)[Z].getValue("peerSessionStore").emit($.UPDATE_PERMISSIONS, n.patch);
25296
+ n.userIds === e.self.userId && u(e, x)[x].getValue("peerSessionStore").emit($.UPDATE_PERMISSIONS, n.patch);
25297
25297
  });
25298
- }), u(this, Gt)[Gt].on(z.waitingRoomRequestDenied, function() {
25298
+ }), u(this, Gt)[Gt].on(Q.waitingRoomRequestDenied, function() {
25299
25299
  e.waitlistRejectedHandler();
25300
- }), u(this, Gt)[Gt].on(z.kick, function() {
25300
+ }), u(this, Gt)[Gt].on(Q.kick, function() {
25301
25301
  e.kickHandler({ kickType: "kick" });
25302
- }), u(this, Gt)[Gt].on(z.kickAll, function() {
25302
+ }), u(this, Gt)[Gt].on(Q.kickAll, function() {
25303
25303
  e.kickHandler({ kickType: "kickAll" });
25304
- }), u(this, Z)[Z].getValue("peerSessionStore").onAsync($.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), u(this, Z)[Z].getValue("peerSessionStore").on($.PRODUCER_SCORE_UPDATE, function(t) {
25304
+ }), u(this, x)[x].getValue("peerSessionStore").onAsync($.JOIN_MEDIA_ROOM, this.joinMediaRoom.bind(this)), u(this, x)[x].getValue("peerSessionStore").on($.PRODUCER_SCORE_UPDATE, function(t) {
25305
25305
  var n, i = t.score, a = t.kind, o = t.appData, c = t.scoreStats, l = (n = o == null ? void 0 : o.screenShare) !== null && n !== void 0 ? n : !1;
25306
25306
  e.self.emit("mediaScoreUpdate", { kind: a, isScreenshare: l, score: i, participantId: e.self.id, scoreStats: c });
25307
- }), u(this, Z)[Z].getValue("peerSessionStore").on($.MUTE_SELF, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
25307
+ }), u(this, x)[x].getValue("peerSessionStore").on($.MUTE_SELF, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
25308
25308
  return h().w(function(n) {
25309
25309
  for (; ; )
25310
25310
  switch (n.n) {
@@ -25315,12 +25315,12 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25315
25315
  }
25316
25316
  return n.n = 1, e.self.disableAudio();
25317
25317
  case 1:
25318
- u(e, Z)[Z].getValue("callstats").audioOff();
25318
+ u(e, x)[x].getValue("callstats").audioOff();
25319
25319
  case 2:
25320
25320
  return n.a(2);
25321
25321
  }
25322
25322
  }, t);
25323
- }))), u(this, Z)[Z].getValue("peerSessionStore").on($.MUTE_SELF_VIDEO, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
25323
+ }))), u(this, x)[x].getValue("peerSessionStore").on($.MUTE_SELF_VIDEO, /* @__PURE__ */ m(/* @__PURE__ */ h().m(function t() {
25324
25324
  return h().w(function(n) {
25325
25325
  for (; ; )
25326
25326
  switch (n.n) {
@@ -25331,12 +25331,12 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25331
25331
  }
25332
25332
  return n.n = 1, e.self.disableVideo();
25333
25333
  case 1:
25334
- u(e, Z)[Z].getValue("callstats").videoOff();
25334
+ u(e, x)[x].getValue("callstats").videoOff();
25335
25335
  case 2:
25336
25336
  return n.a(2);
25337
25337
  }
25338
25338
  }, t);
25339
- }))), u(this, Z)[Z].getValue("peerSessionStore").onAsync($.LEAVE_MEDIA_ROOM, this.leaveMediaRoom.bind(this)), u(this, Z)[Z].getValue("peerSessionStore").on($.PIP_HANGUP, this.leaveRoom.bind(this));
25339
+ }))), u(this, x)[x].getValue("peerSessionStore").onAsync($.LEAVE_MEDIA_ROOM, this.leaveMediaRoom.bind(this)), u(this, x)[x].getValue("peerSessionStore").on($.PIP_HANGUP, this.leaveRoom.bind(this));
25340
25340
  } }, { key: "joinSocketRoomWithRetry", value: function() {
25341
25341
  var r = m(/* @__PURE__ */ h().m(function t() {
25342
25342
  var n = this, i;
@@ -25389,7 +25389,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25389
25389
  case 0:
25390
25390
  return n = f.length > 0 && f[0] !== void 0 ? f[0] : {}, i = n.reconnected, a = i === void 0 ? !1 : i, o = n.joinAttempts, y.p = 1, this.logger.info("Local peer is joining socket room."), y.n = 2, this.joinSocketRoomWithRetry();
25391
25391
  case 2:
25392
- if (c = y.v, l = c.peer, this.logger.info("Local peer has joined socket room."), u(this, Gt)[Gt].socket.flush(), d = fp(l.stageType), u(this, Z)[Z].setValue("stageStatus", d, !1), !l.waitlisted) {
25392
+ if (c = y.v, l = c.peer, this.logger.info("Local peer has joined socket room."), u(this, Gt)[Gt].socket.flush(), d = fp(l.stageType), u(this, x)[x].setValue("stageStatus", d, !1), !l.waitlisted) {
25393
25393
  y.n = 3;
25394
25394
  break;
25395
25395
  }
@@ -25400,15 +25400,15 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25400
25400
  case 4:
25401
25401
  throw y.p = 4, g = y.v, this.logger.error("SelfController.joinRoom: socket join failed", { error: g }), new j("Check the network and try again.", "0002");
25402
25402
  case 5:
25403
- if (!(this.viewType === jn.Livestream && o !== null && o !== void 0 && o.wasSocketJoinAttempted && !o.wasMediaJoinAttempted && u(this, Z)[Z].getValue("stageStatus") !== "ON_STAGE")) {
25403
+ if (!(this.viewType === jn.Livestream && o !== null && o !== void 0 && o.wasSocketJoinAttempted && !o.wasMediaJoinAttempted && u(this, x)[x].getValue("stageStatus") !== "ON_STAGE")) {
25404
25404
  y.n = 6;
25405
25405
  break;
25406
25406
  }
25407
- return this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (v = u(this, xe)[xe]) === null || v === void 0 || v.reset({ resetTransportQueue: !0 }), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: a }), u(this, Z)[Z].notify("stageStatus"), y.a(2);
25407
+ return this.logger.info("Local livestream peer that only joined the socket room is not ON_STAGE. Closing transports, if any."), (v = u(this, xe)[xe]) === null || v === void 0 || v.reset({ resetTransportQueue: !0 }), this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: a }), u(this, x)[x].notify("stageStatus"), y.a(2);
25408
25408
  case 6:
25409
25409
  return y.p = 6, this.logger.info("Local peer is joining media room."), y.n = 7, this.joinMediaRoom(a);
25410
25410
  case 7:
25411
- this.logger.info("Local peer has joined media room."), u(this, Z)[Z].notify("stageStatus"), y.n = 10;
25411
+ this.logger.info("Local peer has joined media room."), u(this, x)[x].notify("stageStatus"), y.n = 10;
25412
25412
  break;
25413
25413
  case 8:
25414
25414
  if (y.p = 8, k = y.v, this.logger.error("SelfController.joinRoom: media room join failed", { error: k }), !(k instanceof Aa && k.message === "ice connection failed")) {
@@ -25440,15 +25440,15 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25440
25440
  }
25441
25441
  return this.self.roomState = i, this.self.emit("roomLeft", { state: i }), l.a(2);
25442
25442
  case 1:
25443
- return this.self.setIsPinned(!1), u(this, Z)[Z].setValue("stageStatus", "OFF_STAGE", !1), l.n = 2, this.leaveMediaRoom(i);
25443
+ return this.self.setIsPinned(!1), u(this, x)[x].setValue("stageStatus", "OFF_STAGE", !1), l.n = 2, this.leaveMediaRoom(i);
25444
25444
  case 2:
25445
- if (u(this, Z)[Z].setValue("roomNodeClient", void 0), u(this, Z)[Z].notify("stageStatus"), a = u(this, Z)[Z].getValue("connectionHandler"), a.socketJoined)
25445
+ if (u(this, x)[x].setValue("roomNodeClient", void 0), u(this, x)[x].notify("stageStatus"), a = u(this, x)[x].getValue("connectionHandler"), a.socketJoined)
25446
25446
  try {
25447
25447
  o = u(this, Gt)[Gt].leaveRoom(this.self), o || this.logger.warn("SelfController.leaveRoom: socket leave was not sent");
25448
25448
  } catch (d) {
25449
25449
  this.logger.error("SelfController.leaveRoom: socket leave failed", { error: d });
25450
25450
  }
25451
- (n = u(this, Z)[Z].getValue("roomSocketHandler")) === null || n === void 0 || n.cleanup(), this.self.roomState = i, this.self.emit("roomLeft", { state: i }), this.logger.info("roomLeft event emitted with state: ".concat(i));
25451
+ (n = u(this, x)[x].getValue("roomSocketHandler")) === null || n === void 0 || n.cleanup(), this.self.roomState = i, this.self.emit("roomLeft", { state: i }), this.logger.info("roomLeft event emitted with state: ".concat(i));
25452
25452
  case 3:
25453
25453
  return l.a(2);
25454
25454
  }
@@ -25465,7 +25465,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25465
25465
  for (; ; )
25466
25466
  switch (L.p = L.n) {
25467
25467
  case 0:
25468
- if (n = E.length > 0 && E[0] !== void 0 ? E[0] : !1, i = u(this, Z)[Z].getAllValues(), a = i.peerId, o = i.viewType, c = i.meetingId, l = i.stageStatus, L.p = 1, o !== jn.Livestream) {
25468
+ if (n = E.length > 0 && E[0] !== void 0 ? E[0] : !1, i = u(this, x)[x].getAllValues(), a = i.peerId, o = i.viewType, c = i.meetingId, l = i.stageStatus, L.p = 1, o !== jn.Livestream) {
25469
25469
  L.n = 3;
25470
25470
  break;
25471
25471
  }
@@ -25475,7 +25475,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25475
25475
  }
25476
25476
  return this.self.roomState = "joined", this.self.emit("roomJoined", { reconnected: n }), L.a(2);
25477
25477
  case 2:
25478
- Zg(u(this, Z)[Z], { socket: u(this, ha)[ha], peerId: a });
25478
+ Zg(u(this, x)[x], { socket: u(this, ha)[ha], peerId: a });
25479
25479
  case 3:
25480
25480
  return v = this.self.permissions, f = v.canProduceAudio, g = v.canProduceVideo, k = v.canProduceScreenshare, L.n = 4, (p = u(this, xe)[xe]) === null || p === void 0 ? void 0 : p.joinRoom(this.self.name, c, n, { canProduceAudio: f, canProduceVideo: g, canProduceScreenshare: k });
25481
25481
  case 4:
@@ -25526,7 +25526,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25526
25526
  for (; ; )
25527
25527
  switch (a.n) {
25528
25528
  case 0:
25529
- if (i = u(this, Z)[Z].getValue("viewType"), n === "connected-meeting") {
25529
+ if (i = u(this, x)[x].getValue("viewType"), n === "connected-meeting") {
25530
25530
  a.n = 1;
25531
25531
  break;
25532
25532
  }
@@ -25598,29 +25598,29 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25598
25598
  return l = Zr(), d = !!n.getValue("cachedUserDetails"), g.n = 1, rr.__init__(n, a, o, c, c.name, d);
25599
25599
  case 1:
25600
25600
  return p = g.v, n.setValue("self", p), v = n.getValue("logger"), navigator.product !== "ReactNative" ? (f = !0, setTimeout(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function k() {
25601
- var y, S, T, E, I, M, _, O, L, q, X, Y, H;
25602
- return h().w(function(J) {
25601
+ var y, S, T, E, I, M, _, O, L, B, X, Z, W;
25602
+ return h().w(function(K) {
25603
25603
  for (; ; )
25604
- switch (J.p = J.n) {
25604
+ switch (K.p = K.n) {
25605
25605
  case 0:
25606
- return J.n = 1, p.getAllDevices();
25606
+ return K.n = 1, p.getAllDevices();
25607
25607
  case 1:
25608
- return y = J.v, v.info("populated_full_device_list", { devices: JSON.stringify(y) }), n.getValue("callstats").devices("AUDIO", y == null ? void 0 : y.filter(function(N) {
25608
+ return y = K.v, v.info("populated_full_device_list", { devices: JSON.stringify(y) }), n.getValue("callstats").devices("AUDIO", y == null ? void 0 : y.filter(function(N) {
25609
25609
  return N.kind === "audioinput";
25610
25610
  })), n.getValue("callstats").devices("VIDEO", y == null ? void 0 : y.filter(function(N) {
25611
25611
  return N.kind === "videoinput";
25612
25612
  })), n.getValue("callstats").devices("SPEAKER", y == null ? void 0 : y.filter(function(N) {
25613
25613
  return N.kind === "audiooutput";
25614
- })), v.info("Callstats:: initializing"), J.p = 2, S = n.getValue("callstats"), T = n.getValue("peerId"), E = wt.getDeviceInfo().engineName, I = n.getValue("env") === "prod" ? "prod" : "devel", J.n = 3, l.getICEServers();
25614
+ })), v.info("Callstats:: initializing"), K.p = 2, S = n.getValue("callstats"), T = n.getValue("peerId"), E = wt.getDeviceInfo().engineName, I = n.getValue("env") === "prod" ? "prod" : "devel", K.n = 3, l.getICEServers();
25615
25615
  case 3:
25616
- return M = J.v, _ = n.getValue("apiBase"), O = {}, L = v, q = CP(n), X = f, Y = n.getValue("authToken"), J.n = 4, S.initialize.call(S, { peerId: T, engineName: E, env: I, iceServers: M, apiBase: _, flags: O, logger: L, apiHostnames: q, skipConnectivityChecks: X, authToken: Y });
25616
+ return M = K.v, _ = n.getValue("apiBase"), O = {}, L = v, B = CP(n), X = f, Z = n.getValue("authToken"), K.n = 4, S.initialize.call(S, { peerId: T, engineName: E, env: I, iceServers: M, apiBase: _, flags: O, logger: L, apiHostnames: B, skipConnectivityChecks: X, authToken: Z });
25617
25617
  case 4:
25618
- i.socket.updateCallstatsPeerId(n.getValue("peerId")), v.info("Callstats:: initialized"), J.n = 6;
25618
+ i.socket.updateCallstatsPeerId(n.getValue("peerId")), v.info("Callstats:: initialized"), K.n = 6;
25619
25619
  break;
25620
25620
  case 5:
25621
- J.p = 5, H = J.v, v.error("Callstats:: initialization failed", { error: H });
25621
+ K.p = 5, W = K.v, v.error("Callstats:: initialization failed", { error: W });
25622
25622
  case 6:
25623
- return J.a(2);
25623
+ return K.a(2);
25624
25624
  }
25625
25625
  }, k, null, [[2, 5]]);
25626
25626
  })), 0)) : v.info("Callstats:: Skipped initialization due to navigator product being ReactNative."), g.a(2, new xg(n, p, i, c.viewType));
@@ -25634,7 +25634,7 @@ var o2 = Object.defineProperty, u2 = Object.getOwnPropertyDescriptor, eo = funct
25634
25634
  }() }]);
25635
25635
  }());
25636
25636
  function c2() {
25637
- return u(this, Z)[Z].getValue("roomNodeClient");
25637
+ return u(this, x)[x].getValue("roomNodeClient");
25638
25638
  }
25639
25639
  var La = xg;
25640
25640
  eo([D.trace("SelfController.resetSelf")], La.prototype, "resetSelf", 1);
@@ -25650,9 +25650,9 @@ var Mu = /* @__PURE__ */ w("socket"), l2 = /* @__PURE__ */ function() {
25650
25650
  }
25651
25651
  return P(s, [{ key: "on", value: function(e, t) {
25652
25652
  var n;
25653
- e === z.roomPeerCount ? n = Ev.fromBinary.bind(Ev) : n = Ov.fromBinary.bind(Ov), u(this, Mu)[Mu].on(e, function(i) {
25653
+ e === Q.roomPeerCount ? n = Ev.fromBinary.bind(Ev) : n = Ov.fromBinary.bind(Ov), u(this, Mu)[Mu].on(e, function(i) {
25654
25654
  var a = i.payload;
25655
- if (!(e === z.roomPeerCount && !a)) {
25655
+ if (!(e === Q.roomPeerCount && !a)) {
25656
25656
  var o = n(a);
25657
25657
  t(o);
25658
25658
  }
@@ -25673,7 +25673,7 @@ var Mu = /* @__PURE__ */ w("socket"), l2 = /* @__PURE__ */ function() {
25673
25673
  ) }, { key: "on", value: function(e, t) {
25674
25674
  var n = this, i, a;
25675
25675
  switch (e) {
25676
- case z.transcript: {
25676
+ case Q.transcript: {
25677
25677
  i = nd.fromBinary.bind(nd), a = nd.create();
25678
25678
  break;
25679
25679
  }
@@ -25790,7 +25790,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25790
25790
  for (; ; )
25791
25791
  switch (T.p = T.n) {
25792
25792
  case 0:
25793
- return this.socket.joinAttempted = !0, a = { capabilities: [], peer: { displayName: (i = n.name) !== null && i !== void 0 ? i : "Participant", customParticipantId: n.customParticipantId, peerId: n.id, userId: n.userId, displayPictureUrl: n.picture, waitlisted: !1 }, roomUuid: "" }, o = this.socket.sendMessagePromise(z.joinRoom, OC.toBinary(a)), T.p = 1, y = To, T.n = 2, o;
25793
+ return this.socket.joinAttempted = !0, a = { capabilities: [], peer: { displayName: (i = n.name) !== null && i !== void 0 ? i : "Participant", customParticipantId: n.customParticipantId, peerId: n.id, userId: n.userId, displayPictureUrl: n.picture, waitlisted: !1 }, roomUuid: "" }, o = this.socket.sendMessagePromise(Q.joinRoom, OC.toBinary(a)), T.p = 1, y = To, T.n = 2, o;
25794
25794
  case 2:
25795
25795
  return c = y.fromBinary.call(y, T.v.payload), l = c.peer, u(this, Ft)[Ft].getValue("connectionHandler").socketJoined = !0, u(this, Ft)[Ft].getValue("peerSessionStore").emit($.SOCKET_SERVICE_ROOM_JOINED, { peer: l }), d = this.getRoomState(), p = this.getRoomPeersNonPaginated(), T.n = 3, Promise.all([d, p]);
25796
25796
  case 3:
@@ -25813,7 +25813,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25813
25813
  for (; ; )
25814
25814
  switch (o.p = o.n) {
25815
25815
  case 0:
25816
- return o.p = 0, i = yR, o.n = 1, this.socket.sendMessagePromise(z.getAllAddedParticipants);
25816
+ return o.p = 0, i = yR, o.n = 1, this.socket.sendMessagePromise(Q.getAllAddedParticipants);
25817
25817
  case 1:
25818
25818
  return n = i.fromBinary.call(i, o.v.payload), o.a(2, n.participants.map(function(c) {
25819
25819
  var l = c.id, d = Wh(c, Tm);
@@ -25840,7 +25840,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25840
25840
  seachQuery: n,
25841
25841
  limit: i,
25842
25842
  offset: a
25843
- }, p.n = 1, this.socket.sendMessagePromise(z.getRoomPeersInfo, bC.toBinary(c));
25843
+ }, p.n = 1, this.socket.sendMessagePromise(Q.getRoomPeersInfo, bC.toBinary(c));
25844
25844
  case 1:
25845
25845
  l = p.v, o = id.fromBinary(l.payload), p.n = 3;
25846
25846
  break;
@@ -25864,7 +25864,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25864
25864
  for (; ; )
25865
25865
  switch (o.p = o.n) {
25866
25866
  case 0:
25867
- return o.p = 0, o.n = 1, this.socket.sendMessagePromise(z.getRoomPeersInfo);
25867
+ return o.p = 0, o.n = 1, this.socket.sendMessagePromise(Q.getRoomPeersInfo);
25868
25868
  case 1:
25869
25869
  i = o.v, n = id.fromBinary(i.payload), o.n = 3;
25870
25870
  break;
@@ -25891,7 +25891,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25891
25891
  for (; ; )
25892
25892
  switch (o.p = o.n) {
25893
25893
  case 0:
25894
- return o.p = 0, o.n = 1, this.socket.sendMessagePromise(z.getRoomPeersInfo);
25894
+ return o.p = 0, o.n = 1, this.socket.sendMessagePromise(Q.getRoomPeersInfo);
25895
25895
  case 1:
25896
25896
  i = o.v, n = id.fromBinary(i.payload), o.n = 3;
25897
25897
  break;
@@ -25913,7 +25913,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25913
25913
  for (; ; )
25914
25914
  switch (c.p = c.n) {
25915
25915
  case 0:
25916
- return c.p = 0, c.n = 1, this.socket.sendMessagePromise(z.getPeerInfo, Eg.toBinary({ peerId: n }));
25916
+ return c.p = 0, c.n = 1, this.socket.sendMessagePromise(Q.getPeerInfo, Eg.toBinary({ peerId: n }));
25917
25917
  case 1:
25918
25918
  a = c.v, i = To.fromBinary(a.payload), c.n = 3;
25919
25919
  break;
@@ -25935,7 +25935,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25935
25935
  for (; ; )
25936
25936
  switch (o.p = o.n) {
25937
25937
  case 0:
25938
- return n = Cv.create(), o.p = 1, o.n = 2, this.socket.sendMessagePromise(z.getRoomInfo);
25938
+ return n = Cv.create(), o.p = 1, o.n = 2, this.socket.sendMessagePromise(Q.getRoomInfo);
25939
25939
  case 2:
25940
25940
  i = o.v, n = Cv.fromBinary(i.payload), o.n = 4;
25941
25941
  break;
@@ -25957,7 +25957,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25957
25957
  for (; ; )
25958
25958
  switch (o.p = o.n) {
25959
25959
  case 0:
25960
- return n = Av.create(), o.p = 1, o.n = 2, this.socket.sendMessagePromise(z.getRoomStageState);
25960
+ return n = Av.create(), o.p = 1, o.n = 2, this.socket.sendMessagePromise(Q.getRoomStageState);
25961
25961
  case 2:
25962
25962
  i = o.v, n = Av.fromBinary(i.payload), o.n = 4;
25963
25963
  break;
@@ -25985,7 +25985,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
25985
25985
  timestamp: Date.now(),
25986
25986
  ids: []
25987
25987
  // broadcast to all in all cases, this field has no value
25988
- }, o.a(2, this.socket.sendMessagePromise(z.broadcastMessage, tu.toBinary(a)));
25988
+ }, o.a(2, this.socket.sendMessagePromise(Q.broadcastMessage, tu.toBinary(a)));
25989
25989
  }
25990
25990
  }, t, this);
25991
25991
  }));
@@ -26008,7 +26008,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26008
26008
  // Broadcast to given meetings
26009
26009
  broadcastType: 1
26010
26010
  // meetings
26011
- }, c.a(2, this.socket.sendMessagePromise(z.broadcastToEntity, tu.toBinary(o)));
26011
+ }, c.a(2, this.socket.sendMessagePromise(Q.broadcastToEntity, tu.toBinary(o)));
26012
26012
  }
26013
26013
  }, t, this);
26014
26014
  }));
@@ -26031,7 +26031,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26031
26031
  // Broadcast to peers
26032
26032
  broadcastType: 0
26033
26033
  // peers
26034
- }, c.a(2, this.socket.sendMessage(z.broadcastToEntity, tu.toBinary(o)));
26034
+ }, c.a(2, this.socket.sendMessage(Q.broadcastToEntity, tu.toBinary(o)));
26035
26035
  }
26036
26036
  }, t, this);
26037
26037
  }));
@@ -26042,7 +26042,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26042
26042
  }() }, { key: "leaveRoom", value: function(e) {
26043
26043
  this.socket.joinAttempted = !1;
26044
26044
  var t = { peer: { peerId: e.peerId, userId: e.userId, displayName: e.name, waitlisted: e.waitlistStatus === "waiting" } };
26045
- return this.socket.sendMessage(z.leaveRoom, LC.toBinary(t));
26045
+ return this.socket.sendMessage(Q.leaveRoom, LC.toBinary(t));
26046
26046
  } }, { key: "kick", value: function() {
26047
26047
  var r = m(/* @__PURE__ */ h().m(function t(n) {
26048
26048
  var i;
@@ -26050,7 +26050,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26050
26050
  for (; ; )
26051
26051
  switch (a.n) {
26052
26052
  case 0:
26053
- i = { peerIds: [n] }, this.socket.sendMessage(z.kick, Rg.toBinary(i));
26053
+ i = { peerIds: [n] }, this.socket.sendMessage(Q.kick, Rg.toBinary(i));
26054
26054
  case 1:
26055
26055
  return a.a(2);
26056
26056
  }
@@ -26067,7 +26067,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26067
26067
  for (; ; )
26068
26068
  switch (o.n) {
26069
26069
  case 0:
26070
- n = a.length > 0 && a[0] !== void 0 ? a[0] : !1, i = { propagateKickAcrossRooms: n }, this.socket.sendMessage(z.kickAll, bg.toBinary(i));
26070
+ n = a.length > 0 && a[0] !== void 0 ? a[0] : !1, i = { propagateKickAcrossRooms: n }, this.socket.sendMessage(Q.kickAll, bg.toBinary(i));
26071
26071
  case 1:
26072
26072
  return o.a(2);
26073
26073
  }
@@ -26078,13 +26078,13 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26078
26078
  }
26079
26079
  return e;
26080
26080
  }() }, { key: "getWaitingRoomRequests", value: function() {
26081
- this.socket.sendMessage(z.getWaitingRoomRequests);
26081
+ this.socket.sendMessage(Q.getWaitingRoomRequests);
26082
26082
  } }, { key: "acceptWaitingRoomRequest", value: function(e) {
26083
26083
  var t = { userIds: e };
26084
- this.socket.sendMessage(z.acceptWaitingRoomRequests, SR.toBinary(t));
26084
+ this.socket.sendMessage(Q.acceptWaitingRoomRequests, SR.toBinary(t));
26085
26085
  } }, { key: "rejectWaitingRoomRequest", value: function(e) {
26086
26086
  var t = { userIds: e };
26087
- this.socket.sendMessage(z.denyWaitingRoomRequests, CR.toBinary(t));
26087
+ this.socket.sendMessage(Q.denyWaitingRoomRequests, CR.toBinary(t));
26088
26088
  } }, { key: "updatePermissions", value: function() {
26089
26089
  var r = m(/* @__PURE__ */ h().m(function t(n, i) {
26090
26090
  var a;
@@ -26104,7 +26104,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26104
26104
  return e;
26105
26105
  }() }, { key: "handleSocketEvents", value: function() {
26106
26106
  var e = this;
26107
- this.socket.on(z.broadcastMessage, function(t) {
26107
+ this.socket.on(Q.broadcastMessage, function(t) {
26108
26108
  var n = t.payload;
26109
26109
  try {
26110
26110
  var i = tu.fromBinary(n);
@@ -26112,7 +26112,7 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26112
26112
  } catch (a) {
26113
26113
  e.logger.error("failed to decode broadcast message:", a);
26114
26114
  }
26115
- }), this.socket.on(z.broadcastToEntity, function(t) {
26115
+ }), this.socket.on(Q.broadcastToEntity, function(t) {
26116
26116
  var n = t.payload;
26117
26117
  try {
26118
26118
  var i = tu.fromBinary(n);
@@ -26124,22 +26124,22 @@ var v2 = Object.defineProperty, f2 = Object.getOwnPropertyDescriptor, g2 = funct
26124
26124
  } }, { key: "on", value: function(e, t) {
26125
26125
  var n = this, i, a;
26126
26126
  switch (e) {
26127
- case z.joinRoom:
26128
- case z.leaveRoom:
26129
- case z.kick:
26130
- case z.kickAll: {
26127
+ case Q.joinRoom:
26128
+ case Q.leaveRoom:
26129
+ case Q.kick:
26130
+ case Q.kickAll: {
26131
26131
  i = To.fromBinary.bind(To), a = To.create();
26132
26132
  break;
26133
26133
  }
26134
- case z.getWaitingRoomRequests: {
26134
+ case Q.getWaitingRoomRequests: {
26135
26135
  i = function(c, l) {
26136
26136
  return c ? _v.fromBinary(c, l) : { requests: [] };
26137
26137
  }, a = _v.create();
26138
26138
  break;
26139
26139
  }
26140
- case z.recordingPaused:
26141
- case z.recordingStarted:
26142
- case z.recordingStopped: {
26140
+ case Q.recordingPaused:
26141
+ case Q.recordingStarted:
26142
+ case Q.recordingStopped: {
26143
26143
  i = Nv.fromBinary.bind(Nv);
26144
26144
  break;
26145
26145
  }
@@ -26224,7 +26224,7 @@ var Rt = /* @__PURE__ */ w("socket"), m2 = /* @__PURE__ */ function() {
26224
26224
  for (; ; )
26225
26225
  switch (a.n) {
26226
26226
  case 0:
26227
- return a.n = 1, u(this, Rt)[Rt].sendMessagePromise(z.getStageRequests);
26227
+ return a.n = 1, u(this, Rt)[Rt].sendMessagePromise(Q.getStageRequests);
26228
26228
  case 1:
26229
26229
  return n = a.v, i = n.payload, a.a(2, i ? ud.fromBinary(i) : { stageRequests: [] });
26230
26230
  }
@@ -26235,9 +26235,9 @@ var Rt = /* @__PURE__ */ w("socket"), m2 = /* @__PURE__ */ function() {
26235
26235
  }
26236
26236
  return e;
26237
26237
  }() }, { key: "requestAccess", value: function() {
26238
- u(this, Rt)[Rt].sendMessage(z.requestStageAccess);
26238
+ u(this, Rt)[Rt].sendMessage(Q.requestStageAccess);
26239
26239
  } }, { key: "cancelRequestAccess", value: function() {
26240
- u(this, Rt)[Rt].sendMessage(z.cancelStageRequest);
26240
+ u(this, Rt)[Rt].sendMessage(Q.cancelStageRequest);
26241
26241
  } }, { key: "grantAccess", value: function() {
26242
26242
  var r = m(/* @__PURE__ */ h().m(function t(n) {
26243
26243
  var i;
@@ -26245,7 +26245,7 @@ var Rt = /* @__PURE__ */ w("socket"), m2 = /* @__PURE__ */ function() {
26245
26245
  for (; ; )
26246
26246
  switch (a.n) {
26247
26247
  case 0:
26248
- i = { userIds: n }, u(this, Rt)[Rt].sendMessage(z.grantStageAccess, S1.toBinary(i));
26248
+ i = { userIds: n }, u(this, Rt)[Rt].sendMessage(Q.grantStageAccess, S1.toBinary(i));
26249
26249
  case 1:
26250
26250
  return a.a(2);
26251
26251
  }
@@ -26262,7 +26262,7 @@ var Rt = /* @__PURE__ */ w("socket"), m2 = /* @__PURE__ */ function() {
26262
26262
  for (; ; )
26263
26263
  switch (a.n) {
26264
26264
  case 0:
26265
- i = { userIds: n }, u(this, Rt)[Rt].sendMessage(z.denyStageAccess, C1.toBinary(i));
26265
+ i = { userIds: n }, u(this, Rt)[Rt].sendMessage(Q.denyStageAccess, C1.toBinary(i));
26266
26266
  case 1:
26267
26267
  return a.a(2);
26268
26268
  }
@@ -26273,32 +26273,32 @@ var Rt = /* @__PURE__ */ w("socket"), m2 = /* @__PURE__ */ function() {
26273
26273
  }
26274
26274
  return e;
26275
26275
  }() }, { key: "joinStage", value: function() {
26276
- return u(this, Rt)[Rt].sendMessagePromise(z.joinStage, void 0, void 0, z.peerStageStatusUpdate);
26276
+ return u(this, Rt)[Rt].sendMessagePromise(Q.joinStage, void 0, void 0, Q.peerStageStatusUpdate);
26277
26277
  } }, { key: "leaveStage", value: function(e) {
26278
26278
  var t = { userIds: [e] };
26279
- return u(this, Rt)[Rt].sendMessagePromise(z.leaveStage, Lv.toBinary(t), void 0, z.peerStageStatusUpdate);
26279
+ return u(this, Rt)[Rt].sendMessagePromise(Q.leaveStage, Lv.toBinary(t), void 0, Q.peerStageStatusUpdate);
26280
26280
  } }, { key: "kick", value: function(e) {
26281
26281
  var t = { userIds: e };
26282
- return u(this, Rt)[Rt].sendMessagePromise(z.leaveStage, Lv.toBinary(t));
26282
+ return u(this, Rt)[Rt].sendMessagePromise(Q.leaveStage, Lv.toBinary(t));
26283
26283
  } }, { key: "on", value: function(e, t) {
26284
26284
  var n;
26285
26285
  switch (e) {
26286
- case z.grantStageAccess:
26287
- case z.denyStageAccess: {
26286
+ case Q.grantStageAccess:
26287
+ case Q.denyStageAccess: {
26288
26288
  n = void 0;
26289
26289
  break;
26290
26290
  }
26291
- case z.getStagePeers: {
26291
+ case Q.getStagePeers: {
26292
26292
  n = Dv.fromBinary.bind(Dv);
26293
26293
  break;
26294
26294
  }
26295
- case z.getStageRequests:
26296
- case z.requestStageAccess:
26297
- case z.cancelStageRequest: {
26295
+ case Q.getStageRequests:
26296
+ case Q.requestStageAccess:
26297
+ case Q.cancelStageRequest: {
26298
26298
  n = ud.fromBinary.bind(ud);
26299
26299
  break;
26300
26300
  }
26301
- case z.peerStageStatusUpdate: {
26301
+ case Q.peerStageStatusUpdate: {
26302
26302
  n = Sv.fromBinary.bind(Sv);
26303
26303
  break;
26304
26304
  }
@@ -26317,7 +26317,7 @@ var Rt = /* @__PURE__ */ w("socket"), m2 = /* @__PURE__ */ function() {
26317
26317
  for (; ; )
26318
26318
  switch (a.n) {
26319
26319
  case 0:
26320
- return a.n = 1, u(this, Rt)[Rt].sendMessagePromise(z.getPeerInfo, Eg.toBinary({ peerId: n }));
26320
+ return a.n = 1, u(this, Rt)[Rt].sendMessagePromise(Q.getPeerInfo, Eg.toBinary({ peerId: n }));
26321
26321
  case 1:
26322
26322
  return i = a.v, a.a(2, To.fromBinary(i.payload));
26323
26323
  }
@@ -26707,8 +26707,8 @@ var lm = /* @__PURE__ */ function(s) {
26707
26707
  function s(r, e) {
26708
26708
  var t, n, i, a, o, c, l, d, p, v, f, g;
26709
26709
  b(this, s), et(this, Vh), et(this, $u), et(this, $h), et(this, el), et(this, bl), et(this, Uh), et(this, xu), et(this, No), et(this, Pl), et(this, Vo), et(this, Hh), et(this, rc), et(this, nc), et(this, Ot, void 0), et(this, bo, void 0), et(this, tt, void 0), et(this, _t, void 0), et(this, ma, void 0), et(this, er, void 0), et(this, qi, void 0), et(this, Ra, void 0), et(this, Vn, void 0), et(this, Po, void 0), et(this, So, void 0), et(this, $i, void 0);
26710
- var k, y, S, T, E, I, M, _, O, L, q;
26711
- Be(this, bo, r), Be(this, ma, []), Be(this, er, new wl()), Be(this, qi, !0), Be(this, Vn, !1), Be(this, tt, e != null ? e : {}), (t = (k = F(this, tt)).autoReconnect) !== null && t !== void 0 || (k.autoReconnect = !0), (n = (y = F(this, tt)).retryConnectionInterval) !== null && n !== void 0 || (y.retryConnectionInterval = 1e3), (i = (S = F(this, tt)).pingTimeout) !== null && i !== void 0 || (S.pingTimeout = 3e4), (a = (T = F(this, tt)).connectionTimeout) !== null && a !== void 0 || (T.connectionTimeout = 5e3), (o = (E = F(this, tt)).debug) !== null && o !== void 0 || (E.debug = !0), (c = (I = F(this, tt)).maxReconnectionAttempts) !== null && c !== void 0 || (I.maxReconnectionAttempts = 10), (l = (M = F(this, tt)).disconnectOnPingTimeout) !== null && l !== void 0 || (M.disconnectOnPingTimeout = !0), (d = (_ = F(this, tt)).queueOnDisconnect) !== null && d !== void 0 || (_.queueOnDisconnect = !1), (p = (O = F(this, tt)).flushOnReconnect) !== null && p !== void 0 || (O.flushOnReconnect = !1), (v = (L = F(this, tt)).clientInitiatedPings) !== null && v !== void 0 || (L.clientInitiatedPings = !1), (f = (q = F(this, tt)).clientInitiatedPingInterval) !== null && f !== void 0 || (q.clientInitiatedPingInterval = 3e4), Be(this, Ra, { code: void 0, reason: void 0 }), Be(this, _t, (g = F(this, tt).logger) !== null && g !== void 0 ? g : new O2(F(this, tt).debug ? "debug" : "info")), Be(this, $i, new M2());
26710
+ var k, y, S, T, E, I, M, _, O, L, B;
26711
+ Be(this, bo, r), Be(this, ma, []), Be(this, er, new wl()), Be(this, qi, !0), Be(this, Vn, !1), Be(this, tt, e != null ? e : {}), (t = (k = F(this, tt)).autoReconnect) !== null && t !== void 0 || (k.autoReconnect = !0), (n = (y = F(this, tt)).retryConnectionInterval) !== null && n !== void 0 || (y.retryConnectionInterval = 1e3), (i = (S = F(this, tt)).pingTimeout) !== null && i !== void 0 || (S.pingTimeout = 3e4), (a = (T = F(this, tt)).connectionTimeout) !== null && a !== void 0 || (T.connectionTimeout = 5e3), (o = (E = F(this, tt)).debug) !== null && o !== void 0 || (E.debug = !0), (c = (I = F(this, tt)).maxReconnectionAttempts) !== null && c !== void 0 || (I.maxReconnectionAttempts = 10), (l = (M = F(this, tt)).disconnectOnPingTimeout) !== null && l !== void 0 || (M.disconnectOnPingTimeout = !0), (d = (_ = F(this, tt)).queueOnDisconnect) !== null && d !== void 0 || (_.queueOnDisconnect = !1), (p = (O = F(this, tt)).flushOnReconnect) !== null && p !== void 0 || (O.flushOnReconnect = !1), (v = (L = F(this, tt)).clientInitiatedPings) !== null && v !== void 0 || (L.clientInitiatedPings = !1), (f = (B = F(this, tt)).clientInitiatedPingInterval) !== null && f !== void 0 || (B.clientInitiatedPingInterval = 3e4), Be(this, Ra, { code: void 0, reason: void 0 }), Be(this, _t, (g = F(this, tt).logger) !== null && g !== void 0 ? g : new O2(F(this, tt).debug ? "debug" : "info")), Be(this, $i, new M2());
26712
26712
  }
26713
26713
  return P(s, [{
26714
26714
  key: "readyState",
@@ -27173,15 +27173,15 @@ var N2 = Object.defineProperty, V2 = Object.getOwnPropertyDescriptor, Jl = funct
27173
27173
  if (g === _) {
27174
27174
  var L;
27175
27175
  try {
27176
- var q = pE.fromBinary(O);
27177
- L = new Error(q.errorMessage);
27178
- } catch (Y) {
27179
- L = new Error("failed to parse error message", { cause: Y });
27176
+ var B = pE.fromBinary(O);
27177
+ L = new Error(B.errorMessage);
27178
+ } catch (Z) {
27179
+ L = new Error("failed to parse error message", { cause: Z });
27180
27180
  try {
27181
27181
  var X = fC.fromBinary(O);
27182
27182
  L = new Error(X.message);
27183
- } catch (H) {
27184
- L = new Error("failed to parse error message", { cause: H });
27183
+ } catch (W) {
27184
+ L = new Error("failed to parse error message", { cause: W });
27185
27185
  }
27186
27186
  }
27187
27187
  p(L), f(T, S);
@@ -27448,7 +27448,7 @@ var aD = /* @__PURE__ */ function() {
27448
27448
  for (; ; )
27449
27449
  switch (i.n) {
27450
27450
  case 0:
27451
- return i.n = 1, this.socketService.sendMessagePromise(z.getConnectedRoomsDump);
27451
+ return i.n = 1, this.socketService.sendMessagePromise(Q.getConnectedRoomsDump);
27452
27452
  case 1:
27453
27453
  return n = i.v, i.a(2, this.handleConnectedRoomsDumpRaw(n));
27454
27454
  }
@@ -27465,7 +27465,7 @@ var aD = /* @__PURE__ */ function() {
27465
27465
  for (; ; )
27466
27466
  switch (a.n) {
27467
27467
  case 0:
27468
- return a.n = 1, this.socketService.sendMessagePromise(z.createConnectedRooms, JC.toBinary({ payloads: n }));
27468
+ return a.n = 1, this.socketService.sendMessagePromise(Q.createConnectedRooms, JC.toBinary({ payloads: n }));
27469
27469
  case 1:
27470
27470
  return i = a.v, a.a(2, this.handleConnectedRoomsUpdatedRaw(i));
27471
27471
  }
@@ -27482,7 +27482,7 @@ var aD = /* @__PURE__ */ function() {
27482
27482
  for (; ; )
27483
27483
  switch (a.n) {
27484
27484
  case 0:
27485
- return a.n = 1, this.socketService.sendMessagePromise(z.updateConnectedRooms, eR.toBinary({ payloads: n }));
27485
+ return a.n = 1, this.socketService.sendMessagePromise(Q.updateConnectedRooms, eR.toBinary({ payloads: n }));
27486
27486
  case 1:
27487
27487
  return i = a.v, a.a(2, this.handleConnectedRoomsUpdatedRaw(i));
27488
27488
  }
@@ -27501,7 +27501,7 @@ var aD = /* @__PURE__ */ function() {
27501
27501
  case 0:
27502
27502
  return i = n.map(function(c) {
27503
27503
  return { id: c };
27504
- }), o.n = 1, this.socketService.sendMessagePromise(z.deleteConnectedRooms, iR.toBinary({ payloads: i }));
27504
+ }), o.n = 1, this.socketService.sendMessagePromise(Q.deleteConnectedRooms, iR.toBinary({ payloads: i }));
27505
27505
  case 1:
27506
27506
  return a = o.v, o.a(2, this.handleConnectedRoomsDeletedRaw(a));
27507
27507
  }
@@ -27518,7 +27518,7 @@ var aD = /* @__PURE__ */ function() {
27518
27518
  for (; ; )
27519
27519
  switch (c.p = c.n) {
27520
27520
  case 0:
27521
- return c.p = 0, c.n = 1, this.socketService.sendMessagePromise(z.movePeers, hR.toBinary({ sourceMeetingId: n.sourceMeetingId, destinationMeetingId: n.destinationMeetingId, participants: n.participants }));
27521
+ return c.p = 0, c.n = 1, this.socketService.sendMessagePromise(Q.movePeers, hR.toBinary({ sourceMeetingId: n.sourceMeetingId, destinationMeetingId: n.destinationMeetingId, participants: n.participants }));
27522
27522
  case 1:
27523
27523
  if (i = c.v, a = new TextDecoder().decode(i.payload), !a.includes("error")) {
27524
27524
  c.n = 2;
@@ -27779,7 +27779,7 @@ var cD = Object.defineProperty, lD = Object.getOwnPropertyDescriptor, Pp = funct
27779
27779
  } }, {
27780
27780
  key: "setupEvents",
27781
27781
  value: function() {
27782
- u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(z.getConnectedRoomsDump, this.handleConnectedRoomsDump.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(z.transferPeer, this.handleTransferPeer.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(z.movedPeer, this.handleMovedPeer.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(z.connectedRoomsUpdated, this.handleConnectedRoomsUpdated.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(z.connectedRoomsDeleted, this.handleConnectedRoomsDeleted.bind(this));
27782
+ u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(Q.getConnectedRoomsDump, this.handleConnectedRoomsDump.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(Q.transferPeer, this.handleTransferPeer.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(Q.movedPeer, this.handleMovedPeer.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(Q.connectedRoomsUpdated, this.handleConnectedRoomsUpdated.bind(this)), u(this, de)[de].getValue("connectedMeetingsSocketHandler").socketService.on(Q.connectedRoomsDeleted, this.handleConnectedRoomsDeleted.bind(this));
27783
27783
  }
27784
27784
  // event handlers
27785
27785
  }, { key: "handleTransferPeer", value: function(e) {
@@ -27800,7 +27800,7 @@ var cD = Object.defineProperty, lD = Object.getOwnPropertyDescriptor, Pp = funct
27800
27800
  case 3:
27801
27801
  y.p = 3, g = y.v, this.logger.error("ConnectedMeetingsController:: switchMeeting:: issues in leaving previous meeting. Meeting Id: ".concat((d = u(this, de)[de].getValue("meeting")) === null || d === void 0 || (d = d.meta) === null || d === void 0 ? void 0 : d.meetingId), { error: g });
27802
27802
  case 4:
27803
- return this.logger.info("ConnectedMeetingsController::switchMeeting:: initializing new meeting. Meeting Id: ".concat(c)), y.n = 5, kD.init(V(V({}, u(this, de)[de].getValue("options")), {}, { cachedUserDetails: null, defaults: V(V(V({}, u(this, de)[de].getValue("options").defaults), l), {}, {
27803
+ return this.logger.info("ConnectedMeetingsController::switchMeeting:: initializing new meeting. Meeting Id: ".concat(c)), y.n = 5, TD.init(V(V({}, u(this, de)[de].getValue("options")), {}, { cachedUserDetails: null, defaults: V(V(V({}, u(this, de)[de].getValue("options").defaults), l), {}, {
27804
27804
  /**
27805
27805
  * NOTE(ravindra-cloudflare):
27806
27806
  * Protected methods & variables of SelfMedia,
@@ -27878,87 +27878,98 @@ var dD = Object.defineProperty, hD = Object.getOwnPropertyDescriptor, Sp = funct
27878
27878
  for (var i = n > 1 ? void 0 : n ? hD(e, t) : e, a = r.length - 1, o; a >= 0; a--)
27879
27879
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
27880
27880
  return n && i && dD(e, t, i), i;
27881
- }, ju = /* @__PURE__ */ function() {
27881
+ };
27882
+ function pD(s) {
27883
+ switch (s) {
27884
+ case "participant_token_not_yet_valid":
27885
+ return "The participant authentication token is not valid yet.";
27886
+ case "participant_token_expired":
27887
+ return "The participant authentication token has expired.";
27888
+ case "participant_token_revoked":
27889
+ return "The participant authentication token has been revoked.";
27890
+ case "participant_token_invalid":
27891
+ return "The participant authentication token is invalid.";
27892
+ case "meeting_inactive":
27893
+ return "The meeting is inactive and is not accepting participants.";
27894
+ default:
27895
+ return "The participant authentication token may be invalid, expired, or not yet valid. Verify the token and its validity window.";
27896
+ }
27897
+ }
27898
+ var ju = /* @__PURE__ */ function() {
27882
27899
  function s(r, e, t) {
27883
27900
  b(this, s), this.apiBase = void 0, this.selfController = void 0, this.pollController = void 0, this.chatController = void 0, this.metaController = void 0, this.storesManager = void 0, this.stageController = void 0, this.pluginController = void 0, this.internalsController = void 0, this.recordingController = void 0, this.livestreamController = void 0, this.participantController = void 0, this.connectedMeetingsController = void 0, this.telemetry = void 0, this.logger = void 0, this.apiBase = r, this.storesManager = e.storesManager, this.metaController = e.metaController, this.selfController = e.selfController, this.chatController = e.chatController, this.pollController = e.pollController, this.stageController = e.stageController, this.pluginController = e.pluginController, this.recordingController = e.recordingController, this.internalsController = e.internalsController, this.participantController = e.participantController, this.livestreamController = e.livestreamController, this.connectedMeetingsController = e.connectedMeetingsController, this.telemetry = t.getValue("telemetry"), this.logger = t.getValue("logger");
27884
27901
  }
27885
27902
  return P(s, null, [{ key: "init", value: function() {
27886
27903
  var r = m(/* @__PURE__ */ h().m(function t(n) {
27887
- var i, a, o, c, l, d, p, v, f, g, k, y, S, T, E, I, M, _, O, L, q, X, Y, H, J;
27888
- return h().w(function(N) {
27904
+ var i, a, o, c, l, d, p, v, f, g, k, y, S, T, E, I, M, _, O, L, B, X, Z, W, K, N, U;
27905
+ return h().w(function(J) {
27889
27906
  for (; ; )
27890
- switch (N.p = N.n) {
27907
+ switch (J.p = J.n) {
27891
27908
  case 0:
27892
27909
  if (i = n.getAllValues(), a = i.peerId, o = i.apiBase, c = i.authToken, l = i.meetingId, d = i.organizationId, p = i.cachedUserDetails, v = i.logger, s2(n), wt.isSupported() !== !1) {
27893
- N.n = 1;
27910
+ J.n = 1;
27894
27911
  break;
27895
27912
  }
27896
27913
  throw new j("Browser not supported", "0010", v, !0);
27897
27914
  case 1:
27898
27915
  return f = dA(n, { authToken: c, baseURL: o, cachedUserDetails: p }), f.setRoomName(l), f.setRoomUUID(l), f.setOrganizationId(d), f.setHeader("tracing-id", a), n.setValue("apiClient", f), g = new iI(n), n.setValue("connectionHandler", g), k = "", y = null, v.info("CF SFU is being used."), S = ju.createSocketService(n), T = S.connect(), T.catch(function() {
27899
- }), E = f.getUserDetails(), N.p = 2, N.n = 3, E;
27916
+ }), E = f.getUserDetails(), J.p = 2, J.n = 3, E;
27900
27917
  case 3:
27901
- y = N.v, k = ((I = y.meeting) === null || I === void 0 ? void 0 : I.title) || "", n.setValue("presetName", y.preset.name), N.n = 12;
27918
+ y = J.v, k = ((I = y.meeting) === null || I === void 0 ? void 0 : I.title) || "", n.setValue("presetName", y.preset.name), J.n = 11;
27902
27919
  break;
27903
27920
  case 4:
27904
- if (N.p = 4, H = N.v, v.error("Failed to get user details", { error: H }), S.disconnect(), !(H instanceof ml)) {
27905
- N.n = 11;
27921
+ if (J.p = 4, N = J.v, v.error("Failed to get user details", { error: N }), S.disconnect(), !(N instanceof ml)) {
27922
+ J.n = 10;
27906
27923
  break;
27907
27924
  }
27908
- if (H.status !== 401) {
27909
- N.n = 5;
27925
+ if (!(N.status === 401 || N.status === 403)) {
27926
+ J.n = 5;
27910
27927
  break;
27911
27928
  }
27912
- throw new j("Unauthorized. The auth token may be invalid or expired. (401)", "0004");
27929
+ throw _ = (M = N.response) === null || M === void 0 || (M = M.data) === null || M === void 0 || (M = M.error) === null || M === void 0 ? void 0 : M.reason, new j(pD(_), "0004", void 0, !1, _);
27913
27930
  case 5:
27914
- if (H.status !== 403) {
27915
- N.n = 6;
27931
+ if (N.status !== 404) {
27932
+ J.n = 6;
27916
27933
  break;
27917
27934
  }
27918
- throw new j("Access denied. Insufficient permissions to join the meeting. (403)", "0004");
27935
+ throw v.error("[ERROR:0004] participant-details returned 404."), new j("The auth token is not associated with an active participant in this meeting. The meeting may have ended, or the participant may no longer exist. (404)", "0004");
27919
27936
  case 6:
27920
- if (H.status !== 404) {
27921
- N.n = 7;
27937
+ if (!(N.status >= 500)) {
27938
+ J.n = 7;
27922
27939
  break;
27923
27940
  }
27924
- throw v.error("[ERROR:0004] participant-details returned 404."), new j("The auth token is not associated with an active participant in this meeting. The meeting may have ended, or the participant may no longer exist. (404)", "0004");
27941
+ throw new j("The server encountered an error. Try again. (".concat(N.status, ")"), "0001");
27925
27942
  case 7:
27926
- if (!(H.status >= 500)) {
27927
- N.n = 8;
27943
+ if (!N.isHttpError) {
27944
+ J.n = 8;
27928
27945
  break;
27929
27946
  }
27930
- throw new j("The server encountered an error. Try again. (".concat(H.status, ")"), "0001");
27947
+ throw new j("Request rejected by the server. (".concat(N.status, ")"), "0001");
27931
27948
  case 8:
27932
- if (!H.isHttpError) {
27933
- N.n = 9;
27934
- break;
27935
- }
27936
- throw new j("Request rejected by the server. (".concat(H.status, ")"), "0001");
27937
- case 9:
27938
- if (!H.isTimeout) {
27939
- N.n = 10;
27949
+ if (!N.isTimeout) {
27950
+ J.n = 9;
27940
27951
  break;
27941
27952
  }
27942
27953
  throw new j("Connection timed out. Check the network and try again.", "0001");
27943
- case 10:
27954
+ case 9:
27944
27955
  throw new j("Unable to connect to the server. Check the internet connection.", "0001");
27956
+ case 10:
27957
+ throw new j((N == null ? void 0 : N.message) || "Failed to initialize.", "0001");
27945
27958
  case 11:
27946
- throw new j((H == null ? void 0 : H.message) || "Failed to initialize.", "0001");
27959
+ return J.p = 11, J.n = 12, T;
27947
27960
  case 12:
27948
- return N.p = 12, N.n = 13, T;
27949
- case 13:
27950
- N.n = 15;
27961
+ J.n = 14;
27951
27962
  break;
27963
+ case 13:
27964
+ J.p = 13, U = J.v, v.error("[Controller]: Failed to connect to socket server:", { error: U });
27952
27965
  case 14:
27953
- N.p = 14, J = N.v, v.error("[Controller]: Failed to connect to socket server:", { error: J });
27966
+ return O = KI.init(y.preset, !n.getValue("modules").theme), n.setValue("theme", O), L = VM.init(n, O.viewType, y.preset.permissions), B = ju.setupControllers(S, n, y, k, O, L), BA(O) && (Z = ju.createRoomNodeClient(n, S), (X = Z.initializeConnection(y.participant.name, l, !1, L)) === null || X === void 0 || X.catch(function(se) {
27967
+ v.error("[Controller]: Failed to queue partial media room promise:", { error: se });
27968
+ })), J.n = 15, B;
27954
27969
  case 15:
27955
- return M = KI.init(y.preset, !n.getValue("modules").theme), n.setValue("theme", M), _ = VM.init(n, M.viewType, y.preset.permissions), O = ju.setupControllers(S, n, y, k, M, _), BA(M) && (q = ju.createRoomNodeClient(n, S), (L = q.initializeConnection(y.participant.name, l, !1, _)) === null || L === void 0 || L.catch(function(U) {
27956
- v.error("[Controller]: Failed to queue partial media room promise:", { error: U });
27957
- })), N.n = 16, O;
27958
- case 16:
27959
- return X = N.v, Y = X.controllers, KP(), N.a(2, new ju(o, Y, n));
27970
+ return W = J.v, K = W.controllers, KP(), J.a(2, new ju(o, K, n));
27960
27971
  }
27961
- }, t, null, [[12, 14], [2, 4]]);
27972
+ }, t, null, [[11, 13], [2, 4]]);
27962
27973
  }));
27963
27974
  function e(t) {
27964
27975
  return r.apply(this, arguments);
@@ -27966,70 +27977,70 @@ var dD = Object.defineProperty, hD = Object.getOwnPropertyDescriptor, Sp = funct
27966
27977
  return e;
27967
27978
  }() }, { key: "setupControllers", value: function() {
27968
27979
  var r = m(/* @__PURE__ */ h().m(function t(n, i, a, o, c, l) {
27969
- var d, p, v, f, g, k, y, S, T, E, I, M, _, O, L, q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, St, ht, re;
27970
- return h().w(function(K) {
27980
+ var d, p, v, f, g, k, y, S, T, E, I, M, _, O, L, B, X, Z, W, K, N, U, J, se, Re, pe, Le, Y, Lt, St, ht, re;
27981
+ return h().w(function(z) {
27971
27982
  for (; ; )
27972
- switch (K.n) {
27983
+ switch (z.n) {
27973
27984
  case 0:
27974
- return f = i.getValue("modules"), g = a.participant, k = i.getValue("defaults"), y = i.getValue("logger"), S = c.viewType, T = c.mediaConstraints.audio, i.setValue("viewType", S), i.setValue("defaults", V({ mediaConfiguration: { audio: { enableHighBitrate: (d = T.enableHighBitrate) !== null && d !== void 0 ? d : !1, enableStereo: (p = T.enableStereo) !== null && p !== void 0 ? p : !1 } } }, k)), i.setValue("maxPreferredStreams", wt.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), H = new d2(i, n), J = new aD(n), i.setValue("connectedMeetingsSocketHandler", J), N = new Wl(i, n), U = new Qi(i, n), x = new m2(n), le = new em(i, n), Re = new y2(i, n), pe = new l2(n), K.n = 1, La.init(i, le, g, l, c);
27985
+ return f = i.getValue("modules"), g = a.participant, k = i.getValue("defaults"), y = i.getValue("logger"), S = c.viewType, T = c.mediaConstraints.audio, i.setValue("viewType", S), i.setValue("defaults", V({ mediaConfiguration: { audio: { enableHighBitrate: (d = T.enableHighBitrate) !== null && d !== void 0 ? d : !1, enableStereo: (p = T.enableStereo) !== null && p !== void 0 ? p : !1 } } }, k)), i.setValue("maxPreferredStreams", wt.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), W = new d2(i, n), K = new aD(n), i.setValue("connectedMeetingsSocketHandler", K), N = new Wl(i, n), U = new Qi(i, n), J = new m2(n), se = new em(i, n), Re = new y2(i, n), pe = new l2(n), z.n = 1, La.init(i, se, g, l, c);
27975
27986
  case 1:
27976
- return Le = K.v, i.setValue("selfController", Le), K.n = 2, jg.init(i, Le.self, le, H, o);
27987
+ return Le = z.v, i.setValue("selfController", Le), z.n = 2, jg.init(i, Le.self, se, W, o);
27977
27988
  case 2:
27978
- if (Q = K.v, f.participant && (X = new Zi(i, Le.self, le)), (v = f.e2ee) !== null && v !== void 0 && v.enabled && f.e2ee.manager.init(y, i.getValue("peerSessionStore")), !f.chat) {
27979
- K.n = 4;
27989
+ if (Y = z.v, f.participant && (X = new Zi(i, Le.self, se)), (v = f.e2ee) !== null && v !== void 0 && v.enabled && f.e2ee.manager.init(y, i.getValue("peerSessionStore")), !f.chat) {
27990
+ z.n = 4;
27980
27991
  break;
27981
27992
  }
27982
- return K.n = 3, Bu.init(i, U, Le.self, X.participants);
27993
+ return z.n = 3, Bu.init(i, U, Le.self, X.participants);
27983
27994
  case 3:
27984
- I = K.v;
27995
+ I = z.v;
27985
27996
  case 4:
27986
27997
  if (!f.internals) {
27987
- K.n = 6;
27998
+ z.n = 6;
27988
27999
  break;
27989
28000
  }
27990
- return K.n = 5, pI.init(i);
28001
+ return z.n = 5, pI.init(i);
27991
28002
  case 5:
27992
- O = K.v;
28003
+ O = z.v;
27993
28004
  case 6:
27994
- if (f.livestream && c.viewType === jn.Livestream && (q = new zg(i, Le.self, pe)), !f.poll) {
27995
- K.n = 8;
28005
+ if (f.livestream && c.viewType === jn.Livestream && (B = new zg(i, Le.self, pe)), !f.poll) {
28006
+ z.n = 8;
27996
28007
  break;
27997
28008
  }
27998
- return K.n = 7, Lg.init(i, Le.self, N);
28009
+ return z.n = 7, Lg.init(i, Le.self, N);
27999
28010
  case 7:
28000
- E = K.v;
28011
+ E = z.v;
28001
28012
  case 8:
28002
- if (f.recording && (L = new qg(i, Le.self, le)), f.stage && (M = new Ug(i, x, le, Le.self, X.participants)), Lt = new rM(i, Re), !f.plugin) {
28003
- K.n = 11;
28013
+ if (f.recording && (L = new qg(i, Le.self, se)), f.stage && (M = new Ug(i, J, se, Le.self, X.participants)), Lt = new rM(i, Re), !f.plugin) {
28014
+ z.n = 11;
28004
28015
  break;
28005
28016
  }
28006
28017
  if (X) {
28007
- K.n = 9;
28018
+ z.n = 9;
28008
28019
  break;
28009
28020
  }
28010
28021
  throw new j("The plugin module cannot be initialized without the `participant` module", "0102");
28011
28022
  case 9:
28012
- return St = k.plugins || [], K.n = 10, Bg.init(i, St, Le.self, Lt);
28023
+ return St = k.plugins || [], z.n = 10, Bg.init(i, St, Le.self, Lt);
28013
28024
  case 10:
28014
- _ = K.v;
28025
+ _ = z.v;
28015
28026
  case 11:
28016
28027
  if (!f.connectedMeetings) {
28017
- K.n = 13;
28028
+ z.n = 13;
28018
28029
  break;
28019
28030
  }
28020
- return K.n = 12, Kl.init(i);
28031
+ return z.n = 12, Kl.init(i);
28021
28032
  case 12:
28022
- Y = K.v;
28033
+ Z = z.v;
28023
28034
  case 13:
28024
28035
  if (!f.pip) {
28025
- K.n = 15;
28036
+ z.n = 15;
28026
28037
  break;
28027
28038
  }
28028
- return K.n = 14, YP._init(i, Le.self);
28039
+ return z.n = 14, YP._init(i, Le.self);
28029
28040
  case 14:
28030
- ht = K.v, i.setValue("pip", ht);
28041
+ ht = z.v, i.setValue("pip", ht);
28031
28042
  case 15:
28032
- return re = { storesManager: Lt, pollController: E, selfController: Le, metaController: Q, chatController: I, stageController: M, pluginController: _, recordingController: L, internalsController: O, livestreamController: q, participantController: X, connectedMeetingsController: Y }, K.a(2, { theme: c, permissions: l, controllers: re });
28043
+ return re = { storesManager: Lt, pollController: E, selfController: Le, metaController: Y, chatController: I, stageController: M, pluginController: _, recordingController: L, internalsController: O, livestreamController: B, participantController: X, connectedMeetingsController: Z }, z.a(2, { theme: c, permissions: l, controllers: re });
28033
28044
  }
28034
28045
  }, t);
28035
28046
  }));
@@ -28048,7 +28059,7 @@ var dD = Object.defineProperty, hD = Object.getOwnPropertyDescriptor, Sp = funct
28048
28059
  Sp([D.trace("Controller.init")], zl, "init", 1);
28049
28060
  Sp([D.trace("Controller.createRoomNodeClient")], zl, "createRoomNodeClient", 1);
28050
28061
  Sp([D.trace("Controller.createSocketService")], zl, "createSocketService", 1);
28051
- var pD = /* @__PURE__ */ P(function s() {
28062
+ var vD = /* @__PURE__ */ P(function s() {
28052
28063
  var r = this;
28053
28064
  b(this, s), this.battery = void 0, this.logger = void 0, this.init = /* @__PURE__ */ function() {
28054
28065
  var e = m(/* @__PURE__ */ h().m(function t(n) {
@@ -28092,9 +28103,9 @@ var pD = /* @__PURE__ */ P(function s() {
28092
28103
  (e = r.battery) === null || e === void 0 || e.removeEventListener("chargingchange", r.updateChargeInfo), (t = r.battery) === null || t === void 0 || t.removeEventListener("levelchange", r.updateLevelInfo);
28093
28104
  }
28094
28105
  };
28095
- }), Zv = new pD(), Mn = /* @__PURE__ */ w("audioEl"), Oi = /* @__PURE__ */ w("stream"), Di = /* @__PURE__ */ w("tracks"), ic = /* @__PURE__ */ w("onError"), Ld = /* @__PURE__ */ w("runErrorCallbacks"), vD = /* @__PURE__ */ function() {
28106
+ }), Zv = new vD(), Mn = /* @__PURE__ */ w("audioEl"), Oi = /* @__PURE__ */ w("stream"), Di = /* @__PURE__ */ w("tracks"), ic = /* @__PURE__ */ w("onError"), Ld = /* @__PURE__ */ w("runErrorCallbacks"), fD = /* @__PURE__ */ function() {
28096
28107
  function s() {
28097
- b(this, s), Object.defineProperty(this, Ld, { value: fD }), Object.defineProperty(this, Mn, { writable: !0, value: new Audio() }), Object.defineProperty(this, Oi, { writable: !0, value: new MediaStream() }), Object.defineProperty(this, Di, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, ic, { writable: !0, value: void 0 }), u(this, Mn)[Mn].srcObject = u(this, Oi)[Oi], u(this, Mn)[Mn].autoplay = !0;
28108
+ b(this, s), Object.defineProperty(this, Ld, { value: gD }), Object.defineProperty(this, Mn, { writable: !0, value: new Audio() }), Object.defineProperty(this, Oi, { writable: !0, value: new MediaStream() }), Object.defineProperty(this, Di, { writable: !0, value: /* @__PURE__ */ new Map() }), Object.defineProperty(this, ic, { writable: !0, value: void 0 }), u(this, Mn)[Mn].srcObject = u(this, Oi)[Oi], u(this, Mn)[Mn].autoplay = !0;
28098
28109
  }
28099
28110
  return P(s, [{ key: "playTracks", value: function() {
28100
28111
  var r = m(/* @__PURE__ */ h().m(function t(n) {
@@ -28139,11 +28150,11 @@ var pD = /* @__PURE__ */ P(function s() {
28139
28150
  u(this, ic)[ic] = e;
28140
28151
  } }]);
28141
28152
  }();
28142
- function fD(s) {
28153
+ function gD(s) {
28143
28154
  var r, e;
28144
28155
  (r = (e = u(this, ic))[ic]) === null || r === void 0 || r.call(e, s);
28145
28156
  }
28146
- var gr = /* @__PURE__ */ w("trackMap"), gD = /* @__PURE__ */ function(s) {
28157
+ var gr = /* @__PURE__ */ w("trackMap"), mD = /* @__PURE__ */ function(s) {
28147
28158
  function r() {
28148
28159
  var e;
28149
28160
  return b(this, r), e = C(this, r), Object.defineProperty(e, gr, { writable: !0, value: void 0 }), u(e, gr)[gr] = /* @__PURE__ */ new Map(), e;
@@ -28157,10 +28168,10 @@ var gr = /* @__PURE__ */ w("trackMap"), gD = /* @__PURE__ */ function(s) {
28157
28168
  var n = u(this, gr)[gr].get(t);
28158
28169
  n && this.removeTrack(n), u(this, gr)[gr].delete(t);
28159
28170
  } }]);
28160
- }(vD), mD = Object.defineProperty, yD = Object.getOwnPropertyDescriptor, Ql = function(r, e, t, n) {
28161
- for (var i = n > 1 ? void 0 : n ? yD(e, t) : e, a = r.length - 1, o; a >= 0; a--)
28171
+ }(fD), yD = Object.defineProperty, kD = Object.getOwnPropertyDescriptor, Ql = function(r, e, t, n) {
28172
+ for (var i = n > 1 ? void 0 : n ? kD(e, t) : e, a = r.length - 1, o; a >= 0; a--)
28162
28173
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
28163
- return n && i && mD(e, t, i), i;
28174
+ return n && i && yD(e, t, i), i;
28164
28175
  }, Ia = (_e = /* @__PURE__ */ w("controller"), ni = /* @__PURE__ */ w("context"), /* @__PURE__ */ function() {
28165
28176
  function s(r, e) {
28166
28177
  b(this, s), Object.defineProperty(this, _e, { writable: !0, value: void 0 }), Object.defineProperty(this, ni, { writable: !0, value: void 0 }), u(this, ni)[ni] = r, u(this, _e)[_e] = e;
@@ -28380,14 +28391,14 @@ var gr = /* @__PURE__ */ w("trackMap"), gD = /* @__PURE__ */ function(s) {
28380
28391
  }, { key: "setupContext", value: function(e, t, n, i) {
28381
28392
  var a, o, c = _a.createContext(e, t), l = V(V({}, SP), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
28382
28393
  return c.setValue("options", t), c.setValue("peerId", e), c.setValue("modules", l), c.setValue("sdkName", "web-core"), c.setValue("meetingId", n), c.setValue("apiBase", i.apiBase), c.setValue("baseURI", i.baseURI), c.setValue("userId", i.participantId), c.setValue("organizationId", i.orgId), c.setValue("authToken", t.authToken), c.setValue("overrides", (a = t.overrides) !== null && a !== void 0 ? a : {}), c.setValue("env", EP({ baseURI: i.baseURI })), c.setValue("defaults", d), c.setValue("onError", t.onError || function() {
28383
- }), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.5-staging.2"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new gD()), c;
28394
+ }), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.1.0-staging.1"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new mD()), c;
28384
28395
  } }]);
28385
28396
  }());
28386
28397
  Ql([dr("0002"), Xi.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Ia.prototype, "join", 1);
28387
28398
  Ql([dr("0003")], Ia.prototype, "leave", 1);
28388
28399
  Ql([dr("0001"), Xi.executeWithLock({ methodName: "Client.init", lockName: "Client.init", timeout: 3e3 })], Ia, "init", 1);
28389
28400
  Ia = Ql([dr("0000")], Ia);
28390
- var kD = Ia;
28401
+ var TD = Ia;
28391
28402
  export {
28392
- kD as default
28403
+ TD as default
28393
28404
  };