@cloudflare/realtimekit 2.0.3 → 2.0.4-staging.2

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 af from "bowser";
3
3
  import { MessageType as A, PbLong as Xo, typeofJsonValue as Um } from "@protobuf-ts/runtime";
4
4
  import * as Uu from "worker-timers";
5
5
  import * as Nn from "sdp-transform";
6
- var wm = ["chat", "connectedMeetings", "plugins", "polls", "media"], bm = ["id"], Pm = ["meetingId"], ee, Gn, Je, ya, nl, ro, Jn, il, Cc, xi, ea, Co, an, ta, Kn, ka, no, zn, io, ao, sn, ra, It, Qn, Er, so, oo, Yn, tr, Ea, un, ai, Rc, Ro, _o, Ao, Ta, na, ia, aa, qt, Ne, sa, oa, Dt, Xn, mn, Zn, _c, st, uo, cn, xn, Cr, Ac, co, Ic, Mc, ke, lo, ei, ua, ti, wt, Wt, ur, on, je, _r, si, ri, Oc, Dc, ho, Lc, Nc, Vc, ca, ot, la, $e, Rr, Ve, da, be, wa, ba, po, Cl, ha, Gt, Z, ut, Zl, cr, Pa, me, ze, yn, pn, oi, ui, dn, xt, lr, vn, ci, lt, kn, dt, Ae, vo, al, sl, $c, Io, Mo, ii, ol, ul, fo, $o, go, cl, mo, yo, he, _e, ni;
6
+ var wm = ["chat", "connectedMeetings", "plugins", "polls", "media"], bm = ["id"], Pm = ["meetingId"], ee, Gn, Je, ya, nl, ro, Jn, il, Cc, xi, ea, Co, an, ta, Kn, ka, no, zn, io, ao, sn, ra, It, Qn, Er, so, oo, Yn, tr, Ea, un, ai, Rc, Ro, _o, Ao, Ta, na, ia, aa, qt, Ne, sa, oa, Dt, Xn, mn, Zn, _c, st, uo, cn, xn, Cr, Ac, co, Ic, Mc, ke, lo, ei, ua, ti, bt, Wt, ur, on, je, _r, si, ri, Oc, Dc, ho, Lc, Nc, Vc, ca, ot, la, $e, Rr, Ve, da, be, wa, ba, po, Cl, ha, Gt, Z, ut, Zl, cr, Pa, me, ze, yn, pn, oi, ui, dn, xt, lr, vn, ci, lt, kn, dt, Ae, vo, al, sl, $c, Io, Mo, ii, ol, ul, fo, $o, go, cl, mo, yo, he, _e, ni;
7
7
  function Gh(s, r) {
8
8
  if (s == null)
9
9
  return {};
@@ -927,7 +927,7 @@ var zm = /* @__PURE__ */ function() {
927
927
  } }, { key: "isIOSMobile", value: function() {
928
928
  return this.isMobile && this._bowser.getOSName() === "iOS";
929
929
  } }]);
930
- }(zm), Tt = new Qm(), Pr = {}, Ym = { get exports() {
930
+ }(zm), wt = new Qm(), Pr = {}, Ym = { get exports() {
931
931
  return Pr;
932
932
  }, set exports(s) {
933
933
  Pr = s;
@@ -1875,7 +1875,7 @@ var Nf = /* @__PURE__ */ S(function s() {
1875
1875
  }, Le);
1876
1876
  d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Lt);
1877
1877
  } else if (N.mediaType === "audio" || N.kind === "audio") {
1878
- var Pt = N, ht = V({ retransmittedBytesSent: Pt.retransmittedBytesSent, retransmittedPacketsSent: Pt.retransmittedPacketsSent }, Le);
1878
+ var St = N, ht = V({ retransmittedBytesSent: St.retransmittedBytesSent, retransmittedPacketsSent: St.retransmittedPacketsSent }, Le);
1879
1879
  d.outboundAudioRtp.set(E.id, ht), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, le, ht);
1880
1880
  }
1881
1881
  } else
@@ -1939,12 +1939,12 @@ var Nf = /* @__PURE__ */ S(function s() {
1939
1939
  }
1940
1940
  if (d.producerStreamMap.forEach(function(te, ne) {
1941
1941
  if (te.outboundVideoRtpId.length > 0) {
1942
- var Nt, St, Qa, Ir, Ya, Xa, Za, xa, Mr, es, Yo = [];
1942
+ var Nt, Et, Qa, Ir, Ya, Xa, Za, xa, Mr, es, Yo = [];
1943
1943
  te.outboundVideoRtpId.forEach(function(Xl) {
1944
1944
  Yo.push(d.outboundVideoRtp.get(Xl));
1945
1945
  });
1946
1946
  var Se = n.getWorkingSimulcastVideoStats(Yo);
1947
- Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((St = n.videoProducerToStatsMap.get(ne)) === null || St === void 0 ? void 0 : St.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), y.set(ne, {
1947
+ Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((Et = n.videoProducerToStatsMap.get(ne)) === null || Et === void 0 ? void 0 : Et.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), y.set(ne, {
1948
1948
  score: +(Se.score * 10).toFixed(),
1949
1949
  frameWidth: Se.frameWidth || 0,
1950
1950
  frameHeight: Se.frameHeight || 0,
@@ -1969,10 +1969,10 @@ var Nf = /* @__PURE__ */ S(function s() {
1969
1969
  }), n.audioProducerToStatsMap.set(ne, Vt);
1970
1970
  }
1971
1971
  }), g.forEach(function(te) {
1972
- var ne = v.find(function(St) {
1973
- return St.id === te.localCandidateId ? (te.localCandidateId = St.id, St) : null;
1974
- }), Nt = f.find(function(St) {
1975
- return St.id === te.remoteCandidateId ? (te.remoteCandidateId = St.id, St) : null;
1972
+ var ne = v.find(function(Et) {
1973
+ return Et.id === te.localCandidateId ? (te.localCandidateId = Et.id, Et) : null;
1974
+ }), Nt = f.find(function(Et) {
1975
+ return Et.id === te.remoteCandidateId ? (te.remoteCandidateId = Et.id, Et) : null;
1976
1976
  });
1977
1977
  ne && (te.localCandidateType = ne.type, te.localCandidateAddress = _a(ne.address), te.localCandidatePort = ne.port, te.localCandidateProtocol = ne.protocol, te.localCandidateUrl = ne.url, te.localCandidateNetworkType = ne.networkType, te.localCandidateRelatedAddress = _a(ne.relatedAddress), te.localCandidateRelatedPort = ne.relatedPort), Nt && (te.remoteCandidateType = Nt.type, te.remoteCandidateAddress = _a(Nt.address), te.remoteCandidatePort = Nt.port, te.remoteCandidateProtocol = Nt.protocol, te.remoteCandidateUrl = Nt.url);
1978
1978
  }), d.candidatePair && (d.transport ? (d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
@@ -2478,7 +2478,7 @@ var Nf = /* @__PURE__ */ S(function s() {
2478
2478
  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);
2479
2479
  d.outboundVideoRtp.set(E.id, Lt), d.producerStreamMap.get(U).outboundVideoRtpId.push(E.id), this.processOutboundProducerVideoStats(U, le, Lt);
2480
2480
  } else if (N.mediaType === "audio" || N.kind === "audio") {
2481
- var Pt = N, ht = V({ retransmittedBytesSent: Pt.retransmittedBytesSent, retransmittedPacketsSent: Pt.retransmittedPacketsSent }, Le);
2481
+ var St = N, ht = V({ retransmittedBytesSent: St.retransmittedBytesSent, retransmittedPacketsSent: St.retransmittedPacketsSent }, Le);
2482
2482
  d.outboundAudioRtp.set(E.id, ht), d.producerStreamMap.get(U).outboundAudioRtpId.push(E.id), this.processOutboundProducerAudioStats(U, le, ht);
2483
2483
  }
2484
2484
  } else
@@ -2542,12 +2542,12 @@ var Nf = /* @__PURE__ */ S(function s() {
2542
2542
  }
2543
2543
  if (d.producerStreamMap.forEach(function(te, ne) {
2544
2544
  if (te.outboundVideoRtpId.length > 0) {
2545
- var Nt, St, Qa, Ir, Ya, Xa, Za, xa, Mr, es, Yo = [];
2545
+ var Nt, Et, Qa, Ir, Ya, Xa, Za, xa, Mr, es, Yo = [];
2546
2546
  te.outboundVideoRtpId.forEach(function(Xl) {
2547
2547
  Yo.push(d.outboundVideoRtp.get(Xl));
2548
2548
  });
2549
2549
  var Se = n.getWorkingSimulcastVideoStats(Yo);
2550
- Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((St = n.videoProducerToStatsMap.get(ne)) === null || St === void 0 ? void 0 : St.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), y.set(ne, {
2550
+ Se.score = Af({ frameWidth: Se.frameWidth || 0, framesPerSecond: Se.framesPerSecond || 0, jitter: ((Nt = Se.remoteData) === null || Nt === void 0 ? void 0 : Nt.jitter) || 0, isScreenShare: n.screenShareProducers.has(ne), packetsSent: (Se.packetsSent || 0) - (((Et = n.videoProducerToStatsMap.get(ne)) === null || Et === void 0 ? void 0 : Et.packetsSent) || 0), packetsLost: (((Qa = Se.remoteData) === null || Qa === void 0 ? void 0 : Qa.packetsLost) || 0) - (((Ir = n.videoProducerToStatsMap.get(ne)) === null || Ir === void 0 || (Ir = Ir.remoteData) === null || Ir === void 0 ? void 0 : Ir.packetsLost) || 0), framesEncoded: (Se.framesEncoded || 0) - (((Ya = n.videoProducerToStatsMap.get(ne)) === null || Ya === void 0 ? void 0 : Ya.framesEncoded) || 0) }), y.set(ne, {
2551
2551
  score: +(Se.score * 10).toFixed(),
2552
2552
  frameWidth: Se.frameWidth || 0,
2553
2553
  frameHeight: Se.frameHeight || 0,
@@ -2572,10 +2572,10 @@ var Nf = /* @__PURE__ */ S(function s() {
2572
2572
  }), n.audioProducerToStatsMap.set(ne, Vt);
2573
2573
  }
2574
2574
  }), g.forEach(function(te) {
2575
- var ne = v.find(function(St) {
2576
- return St.id === te.localCandidateId ? (te.localCandidateId = St.id, St) : null;
2577
- }), Nt = f.find(function(St) {
2578
- return St.id === te.remoteCandidateId ? (te.remoteCandidateId = St.id, St) : null;
2575
+ var ne = v.find(function(Et) {
2576
+ return Et.id === te.localCandidateId ? (te.localCandidateId = Et.id, Et) : null;
2577
+ }), Nt = f.find(function(Et) {
2578
+ return Et.id === te.remoteCandidateId ? (te.remoteCandidateId = Et.id, Et) : null;
2579
2579
  });
2580
2580
  ne && (te.localCandidateType = ne.type, te.localCandidateAddress = _a(ne.address), te.localCandidatePort = ne.port, te.localCandidateProtocol = ne.protocol, te.localCandidateUrl = ne.url, te.localCandidateNetworkType = ne.networkType, te.localCandidateRelatedAddress = _a(ne.relatedAddress), te.localCandidateRelatedPort = ne.relatedPort), Nt && (te.remoteCandidateType = Nt.type, te.remoteCandidateAddress = _a(Nt.address), te.remoteCandidatePort = Nt.port, te.remoteCandidateProtocol = Nt.protocol, te.remoteCandidateUrl = Nt.url);
2581
2581
  }), d.candidatePair && (d.transport ? (d.transport.bytesReceived = d.candidatePair.bytesReceived, d.transport.bytesSent = d.candidatePair.bytesSent, d.transport.totalRoundTripTime = d.candidatePair.totalRoundTripTime, d.transport.availableOutgoingBitrate = d.candidatePair.availableOutgoingBitrate, d.transport.availableIncomingBitrate = d.candidatePair.availableIncomingBitrate, d.transport.roundTripTime = d.candidatePair.currentRoundTripTime) : d.transport = {
@@ -4029,11 +4029,11 @@ var Wf = Object.prototype, Jk = Wf.hasOwnProperty, Kk = Wf.propertyIsEnumerable,
4029
4029
  function Qk() {
4030
4030
  return !1;
4031
4031
  }
4032
- var Gf = (typeof exports == "undefined" ? "undefined" : ye(exports)) == "object" && exports && !exports.nodeType && exports, Jp = Gf && (typeof module == "undefined" ? "undefined" : ye(module)) == "object" && module && !module.nodeType && module, Yk = Jp && Jp.exports === Gf, Kp = Yk ? Bn.Buffer : void 0, Xk = Kp ? Kp.isBuffer : void 0, Zk = Xk || Qk, jo = Zk, xk = "[object Arguments]", eT = "[object Array]", tT = "[object Boolean]", rT = "[object Date]", nT = "[object Error]", iT = "[object Function]", aT = "[object Map]", sT = "[object Number]", oT = "[object Object]", uT = "[object RegExp]", cT = "[object Set]", lT = "[object String]", dT = "[object WeakMap]", hT = "[object ArrayBuffer]", pT = "[object DataView]", vT = "[object Float32Array]", fT = "[object Float64Array]", gT = "[object Int8Array]", mT = "[object Int16Array]", yT = "[object Int32Array]", kT = "[object Uint8Array]", TT = "[object Uint8ClampedArray]", wT = "[object Uint16Array]", bT = "[object Uint32Array]", kt = {};
4033
- kt[vT] = kt[fT] = kt[gT] = kt[mT] = kt[yT] = kt[kT] = kt[TT] = kt[wT] = kt[bT] = !0;
4034
- kt[xk] = kt[eT] = kt[hT] = kt[tT] = kt[pT] = kt[rT] = kt[nT] = kt[iT] = kt[aT] = kt[sT] = kt[oT] = kt[uT] = kt[cT] = kt[lT] = kt[dT] = !1;
4032
+ var Gf = (typeof exports == "undefined" ? "undefined" : ye(exports)) == "object" && exports && !exports.nodeType && exports, Jp = Gf && (typeof module == "undefined" ? "undefined" : ye(module)) == "object" && module && !module.nodeType && module, Yk = Jp && Jp.exports === Gf, Kp = Yk ? Bn.Buffer : void 0, Xk = Kp ? Kp.isBuffer : void 0, Zk = Xk || Qk, jo = Zk, xk = "[object Arguments]", eT = "[object Array]", tT = "[object Boolean]", rT = "[object Date]", nT = "[object Error]", iT = "[object Function]", aT = "[object Map]", sT = "[object Number]", oT = "[object Object]", uT = "[object RegExp]", cT = "[object Set]", lT = "[object String]", dT = "[object WeakMap]", hT = "[object ArrayBuffer]", pT = "[object DataView]", vT = "[object Float32Array]", fT = "[object Float64Array]", gT = "[object Int8Array]", mT = "[object Int16Array]", yT = "[object Int32Array]", kT = "[object Uint8Array]", TT = "[object Uint8ClampedArray]", wT = "[object Uint16Array]", bT = "[object Uint32Array]", Tt = {};
4033
+ Tt[vT] = Tt[fT] = Tt[gT] = Tt[mT] = Tt[yT] = Tt[kT] = Tt[TT] = Tt[wT] = Tt[bT] = !0;
4034
+ Tt[xk] = Tt[eT] = Tt[hT] = Tt[tT] = Tt[pT] = Tt[rT] = Tt[nT] = Tt[iT] = Tt[aT] = Tt[sT] = Tt[oT] = Tt[uT] = Tt[cT] = Tt[lT] = Tt[dT] = !1;
4035
4035
  function PT(s) {
4036
- return pi(s) && ep(s.length) && !!kt[Ys(s)];
4036
+ return pi(s) && ep(s.length) && !!Tt[Ys(s)];
4037
4037
  }
4038
4038
  function tp(s) {
4039
4039
  return function(r) {
@@ -5018,7 +5018,7 @@ var D = /* @__PURE__ */ function() {
5018
5018
  var o = e.getValue("peerId");
5019
5019
  this.meetingMetadata = t, this.tracingEnabled = n, this.meetingMetadata.peerId = o, this.meetingMetadata.sdkVersion = e.getValue("sdkVersion");
5020
5020
  var c = navigator, l = c.RNDeviceInfoImpl;
5021
- this.meetingMetadata.deviceInfo = navigator.isReactNative ? l == null ? void 0 : l.getDeviceInfo() : Tt.getDeviceInfo(), this.meetingMetadata.visitedUrl = !navigator.isReactNative && typeof window != "undefined" && window.location.href, this.logsProcessorTimer = setInterval(
5021
+ this.meetingMetadata.deviceInfo = navigator.isReactNative ? l == null ? void 0 : l.getDeviceInfo() : wt.getDeviceInfo(), this.meetingMetadata.visitedUrl = !navigator.isReactNative && typeof window != "undefined" && window.location.href, this.logsProcessorTimer = setInterval(
5022
5022
  // Errors are already logged inside sendOtelLogsToNewRelic; catch here
5023
5023
  // prevents unhandled rejection from crashing the host app.
5024
5024
  function() {
@@ -5618,7 +5618,7 @@ function hp() {
5618
5618
  return op(QP);
5619
5619
  }
5620
5620
  function YP() {
5621
- Tt.isElectron() && window.electronGetDisplayMediaSource && (navigator.mediaDevices.getDisplayMedia = /* @__PURE__ */ m(/* @__PURE__ */ h().m(function s() {
5621
+ wt.isElectron() && window.electronGetDisplayMediaSource && (navigator.mediaDevices.getDisplayMedia = /* @__PURE__ */ m(/* @__PURE__ */ h().m(function s() {
5622
5622
  var r, e, t, n, i, a;
5623
5623
  return h().w(function(o) {
5624
5624
  for (; ; )
@@ -5656,12 +5656,12 @@ function XP(s) {
5656
5656
  var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5657
5657
  var o = 0.5, c = 0.5, l = i, d = a, p = Math.min(t / l, n / d), v = l * p, f = d * p, g, y, k, b, T = 1;
5658
5658
  return v < t && (T = t / v), Math.abs(T - 1) < 1e-14 && f < n && (T = n / f), v *= T, f *= T, k = l / (v / t), b = d / (f / n), g = (l - k) * o, y = (d - b) * c, g < 0 && (g = 0), y < 0 && (y = 0), k > l && (k = l), b > d && (b = d), [g, y, k, b, r, e, t, n];
5659
- }, Et = /* @__PURE__ */ w("canvas"), Pn = /* @__PURE__ */ w("context"), at = /* @__PURE__ */ w("videoContainer"), Jt = /* @__PURE__ */ w("video"), Te = /* @__PURE__ */ w("dimensions"), Kt = /* @__PURE__ */ w("colors"), Vr = /* @__PURE__ */ w("rafRequest"), Me = /* @__PURE__ */ w("sources"), Ee = /* @__PURE__ */ w("self"), us = /* @__PURE__ */ w("selfSourceId"), cs = /* @__PURE__ */ w("pinIcon"), ls = /* @__PURE__ */ w("handRaiseIcon"), $r = /* @__PURE__ */ w("state"), ds = /* @__PURE__ */ w("initComplete"), nd = /* @__PURE__ */ w("handleSelfPeerIdChange"), eu = /* @__PURE__ */ w("roomLeftListener"), xP = /* @__PURE__ */ function(s) {
5659
+ }, Ct = /* @__PURE__ */ w("canvas"), Pn = /* @__PURE__ */ w("context"), at = /* @__PURE__ */ w("videoContainer"), Jt = /* @__PURE__ */ w("video"), Te = /* @__PURE__ */ w("dimensions"), Kt = /* @__PURE__ */ w("colors"), Vr = /* @__PURE__ */ w("rafRequest"), Me = /* @__PURE__ */ w("sources"), Ee = /* @__PURE__ */ w("self"), us = /* @__PURE__ */ w("selfSourceId"), cs = /* @__PURE__ */ w("pinIcon"), ls = /* @__PURE__ */ w("handRaiseIcon"), $r = /* @__PURE__ */ w("state"), ds = /* @__PURE__ */ w("initComplete"), nd = /* @__PURE__ */ w("handleSelfPeerIdChange"), eu = /* @__PURE__ */ w("roomLeftListener"), xP = /* @__PURE__ */ function(s) {
5660
5660
  function r(e, t, n, i) {
5661
5661
  var a;
5662
5662
  P(this, r);
5663
5663
  var o = e.getValue("logger");
5664
- return a = C(this, r, [o]), Object.defineProperty(a, Et, { writable: !0, value: void 0 }), Object.defineProperty(a, Pn, { writable: !0, value: void 0 }), Object.defineProperty(a, at, { writable: !0, value: void 0 }), Object.defineProperty(a, Jt, { writable: !0, value: void 0 }), Object.defineProperty(a, Te, { writable: !0, value: { height: mv, width: yv } }), Object.defineProperty(a, Kt, { writable: !0, value: { brand: "#2160FD", background: "#141414", text: "#000000", videoBackground: "#191919", textOnBrand: "#EEEEEE" } }), Object.defineProperty(a, Vr, { writable: !0, value: void 0 }), Object.defineProperty(a, Me, { writable: !0, value: {} }), Object.defineProperty(a, Ee, { writable: !0, value: void 0 }), Object.defineProperty(a, us, { writable: !0, value: void 0 }), Object.defineProperty(a, cs, { writable: !0, value: void 0 }), Object.defineProperty(a, ls, { writable: !0, value: void 0 }), Object.defineProperty(a, $r, { writable: !0, value: void 0 }), Object.defineProperty(a, ds, { writable: !0, value: !1 }), Object.defineProperty(a, nd, { writable: !0, value: function(l) {
5664
+ return a = C(this, r, [o]), Object.defineProperty(a, Ct, { writable: !0, value: void 0 }), Object.defineProperty(a, Pn, { writable: !0, value: void 0 }), Object.defineProperty(a, at, { writable: !0, value: void 0 }), Object.defineProperty(a, Jt, { writable: !0, value: void 0 }), Object.defineProperty(a, Te, { writable: !0, value: { height: mv, width: yv } }), Object.defineProperty(a, Kt, { writable: !0, value: { brand: "#2160FD", background: "#141414", text: "#000000", videoBackground: "#191919", textOnBrand: "#EEEEEE" } }), Object.defineProperty(a, Vr, { writable: !0, value: void 0 }), Object.defineProperty(a, Me, { writable: !0, value: {} }), Object.defineProperty(a, Ee, { writable: !0, value: void 0 }), Object.defineProperty(a, us, { writable: !0, value: void 0 }), Object.defineProperty(a, cs, { writable: !0, value: void 0 }), Object.defineProperty(a, ls, { writable: !0, value: void 0 }), Object.defineProperty(a, $r, { writable: !0, value: void 0 }), Object.defineProperty(a, ds, { writable: !0, value: !1 }), Object.defineProperty(a, nd, { writable: !0, value: function(l) {
5665
5665
  var d = u(a, us)[us];
5666
5666
  if (u(a, us)[us] = l, !(!d || d === l)) {
5667
5667
  var p = u(a, Me)[Me][d];
@@ -5777,7 +5777,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5777
5777
  /** @access private */
5778
5778
  function() {
5779
5779
  var t = document.createElement("canvas");
5780
- t.height = u(this, Te)[Te].height, t.width = u(this, Te)[Te].width, u(this, Et)[Et] = t;
5780
+ t.height = u(this, Te)[Te].height, t.width = u(this, Te)[Te].width, u(this, Ct)[Ct] = t;
5781
5781
  }
5782
5782
  ) }, {
5783
5783
  key: "setupMediaSessionEvents",
@@ -5820,8 +5820,8 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5820
5820
  }, {
5821
5821
  key: "drawEmptyTile",
5822
5822
  value: function(t, n, i, a) {
5823
- if (u(this, Et)[Et] !== void 0) {
5824
- var o = u(this, Et)[Et].getContext("2d"), c = u(this, Et)[Et].width, l = 0, d = 0, p = n - l * 2, v = i - l * 2, f = Math.floor(c / p), g = Math.floor(t / f), y = t % f, k = y * (p + l) + l, b = g * (v + l) + l, T = a != null ? a : {}, E = T.displayText, I = T.image;
5823
+ if (u(this, Ct)[Ct] !== void 0) {
5824
+ var o = u(this, Ct)[Ct].getContext("2d"), c = u(this, Ct)[Ct].width, l = 0, d = 0, p = n - l * 2, v = i - l * 2, f = Math.floor(c / p), g = Math.floor(t / f), y = t % f, k = y * (p + l) + l, b = g * (v + l) + l, T = a != null ? a : {}, E = T.displayText, I = T.image;
5825
5825
  o.fillStyle = E || I ? u(this, Kt)[Kt].videoBackground : u(this, Kt)[Kt].background, o.strokeStyle = u(this, Kt)[Kt].brand, o.beginPath(), o.moveTo(k + d, b), o.arcTo(k + p, b, k + p, b + d, d), o.arcTo(k + p, b + v, k + p - d, b + v, d), o.arcTo(k, b + v, k, b + v - d, d), o.arcTo(k, b, k + d, b, d), o.closePath(), o.fill(), o.stroke();
5826
5826
  var M = p / 6, _ = p / 2 + k, O = v / 2 + b;
5827
5827
  o.save(), (E || I) && (o.beginPath(), o.arc(_, O, M, 0, Math.PI * 2), o.fillStyle = u(this, Kt)[Kt].brand, o.fill(), I ? (o.clip(), o.drawImage(I, _ - M, O - M, M * 2, M * 2), o.restore()) : E && (o.fillStyle = u(this, Kt)[Kt].textOnBrand, o.font = "".concat(M / 2, "px sans-serif"), o.textAlign = "center", o.textBaseline = "middle", o.fillText(E, _, O)), this.drawIcons(a, k, b, Math.max(p, v)));
@@ -5832,7 +5832,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5832
5832
  key: "drawIcons",
5833
5833
  value: function(t, n, i, a) {
5834
5834
  var o = this, c = Math.min(Math.max(a * 0.15, 100), 200), l = c * 0.2, d = c * 0.2, p = n + l, v = i + l, f = function(y) {
5835
- var k = u(o, Et)[Et].getContext("2d");
5835
+ var k = u(o, Ct)[Ct].getContext("2d");
5836
5836
  k.save(), k.fillStyle = u(o, Kt)[Kt].background, k.beginPath(), k.moveTo(p + d, v), k.arcTo(p + c, v, p + c, v + d, d), k.arcTo(p + c, v + c, p + c - d, v + c, d), k.arcTo(p, v + c, p, v + c - d, d), k.arcTo(p, v, p + d, v, d), k.closePath(), k.fill(), typeof y == "string" ? (k.font = "".concat(c / 1.5, "px sans-serif"), k.fillStyle = u(o, Kt)[Kt].text, k.textAlign = "center", k.textBaseline = "top", k.fillText(y, c / 2 + p, v + l)) : k.drawImage(y, p + l, v + l, c - l * 2, c - l * 2), p += c + l, k.restore();
5837
5837
  };
5838
5838
  t.pinned && f(u(this, cs)[cs]), t.handRaised && f(u(this, ls)[ls]), t.reaction && f(t.reaction);
@@ -5841,9 +5841,9 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5841
5841
  }, {
5842
5842
  key: "drawTile",
5843
5843
  value: function(t, n, i) {
5844
- if (u(this, Et)[Et] !== void 0) {
5845
- var a = u(this, Et)[Et].getContext("2d");
5846
- a.fillStyle = u(this, Kt)[Kt].background, a.fillRect(0, 0, u(this, Et)[Et].width, u(this, Et)[Et].height);
5844
+ if (u(this, Ct)[Ct] !== void 0) {
5845
+ var a = u(this, Ct)[Ct].getContext("2d");
5846
+ a.fillStyle = u(this, Kt)[Kt].background, a.fillRect(0, 0, u(this, Ct)[Ct].width, u(this, Ct)[Ct].height);
5847
5847
  for (var o = this.getSources(), c = 0, l = 0; c < u(this, Te)[Te].height - 5; ) {
5848
5848
  for (var d = 0; d < u(this, Te)[Te].width - 5 && l < i; ) {
5849
5849
  var p;
@@ -5905,7 +5905,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5905
5905
  document.body.removeChild(u(this, at)[at]);
5906
5906
  } catch (t) {
5907
5907
  }
5908
- this.removeAllSources(), u(this, Et)[Et] = void 0, u(this, Jt)[Jt] = void 0, u(this, Vr)[Vr] = void 0;
5908
+ this.removeAllSources(), u(this, Ct)[Ct] = void 0, u(this, Jt)[Jt] = void 0, u(this, Vr)[Vr] = void 0;
5909
5909
  }
5910
5910
  /**
5911
5911
  * Initialize PiP and prepare sources
@@ -5922,7 +5922,7 @@ var mv = 1080, yv = 1920, ZP = function(r, e, t, n, i, a) {
5922
5922
  if (!u(this, ds)[ds]) {
5923
5923
  u(this, ds)[ds] = !0, this.createCanvas();
5924
5924
  var o = document.createElement("video");
5925
- u(this, Te)[Te] = { height: i != null ? i : mv, width: a != null ? a : yv }, o.height = u(this, Te)[Te].height, o.width = u(this, Te)[Te].width, o.autoplay = !0, o.muted = !0, o.srcObject = u(this, Et)[Et].captureStream(24), u(this, Jt)[Jt] = o, u(this, Jt)[Jt].onloadedmetadata = function() {
5925
+ u(this, Te)[Te] = { height: i != null ? i : mv, width: a != null ? a : yv }, o.height = u(this, Te)[Te].height, o.width = u(this, Te)[Te].width, o.autoplay = !0, o.muted = !0, o.srcObject = u(this, Ct)[Ct].captureStream(24), u(this, Jt)[Jt] = o, u(this, Jt)[Jt].onloadedmetadata = function() {
5926
5926
  try {
5927
5927
  t.emit("pipStarted"), u(t, Jt)[Jt].onleavepictureinpicture = function() {
5928
5928
  t.emit("pipEnded");
@@ -13975,7 +13975,7 @@ var ki = /* @__PURE__ */ w("context"), hI = /* @__PURE__ */ function() {
13975
13975
  } }]);
13976
13976
  }(), pI = /* @__PURE__ */ function() {
13977
13977
  function s(r, e, t, n) {
13978
- P(this, s), this.authToken = void 0, this.logger = void 0, this.features = void 0, this.browserSpecs = void 0, this.callStats = void 0, this.authToken = r, this.logger = e, this.features = t, this.browserSpecs = Tt, this.callStats = n;
13978
+ P(this, s), this.authToken = void 0, this.logger = void 0, this.features = void 0, this.browserSpecs = void 0, this.callStats = void 0, this.authToken = r, this.logger = e, this.features = t, this.browserSpecs = wt, this.callStats = n;
13979
13979
  }
13980
13980
  return S(s, null, [{ key: "init", value: function(e) {
13981
13981
  return new s(e.getValue("authToken"), e.getValue("logger"), new hI(e), e.getValue("callstats"));
@@ -14610,7 +14610,7 @@ nn([D.trace("MediaHandler.destruct")], Ar.prototype, "destruct", 1);
14610
14610
  nn([D.trace("MediaHandler.onDeviceChange")], Ar.prototype, "onDeviceChange", 1);
14611
14611
  function Gc(s, r, e) {
14612
14612
  switch (!0) {
14613
- case Tt.isChromiumBased():
14613
+ case wt.isChromiumBased():
14614
14614
  switch (r) {
14615
14615
  case "NotAllowedError":
14616
14616
  return e.includes("by system") ? "SYSTEM_DENIED" : s === "screenshare" ? "CANCELED" : "DENIED";
@@ -14618,14 +14618,14 @@ function Gc(s, r, e) {
14618
14618
  default:
14619
14619
  return "COULD_NOT_START";
14620
14620
  }
14621
- case Tt.isSafari():
14621
+ case wt.isSafari():
14622
14622
  switch (r) {
14623
14623
  case "NotAllowedError":
14624
14624
  return "DENIED";
14625
14625
  default:
14626
14626
  return "COULD_NOT_START";
14627
14627
  }
14628
- case Tt.isFirefox():
14628
+ case wt.isFirefox():
14629
14629
  switch (r) {
14630
14630
  case "NotFoundError":
14631
14631
  case "NotReadableError":
@@ -14670,7 +14670,7 @@ var mI = [
14670
14670
  ];
14671
14671
  function kl(s) {
14672
14672
  var r, e, t = (r = s.label) === null || r === void 0 ? void 0 : r.toLowerCase();
14673
- return ((e = Tt._bowser) === null || e === void 0 ? void 0 : e.getOSName()) === "macOS" && t.includes("iphone") ? !0 : mI.some(function(n) {
14673
+ return ((e = wt._bowser) === null || e === void 0 ? void 0 : e.getOSName()) === "macOS" && t.includes("iphone") ? !0 : mI.some(function(n) {
14674
14674
  return t == null ? void 0 : t.includes(n);
14675
14675
  });
14676
14676
  }
@@ -14811,9 +14811,9 @@ var Ti = /* @__PURE__ */ w("middlewareWebWorkerInterval"), uu = /* @__PURE__ */
14811
14811
  return l.forEach(function(v, f) {
14812
14812
  Math.abs(v - o) < d && (d = Math.abs(v - o), p = f);
14813
14813
  }), c[p][1];
14814
- }, bt = /* @__PURE__ */ function(s) {
14814
+ }, Pt = /* @__PURE__ */ function(s) {
14815
14815
  return s.WEBCAM = "webcam", s.WEBCAM_BACKUP = "webcam_backup", s.MIC = "mic", s.SCREENSHARE_VIDEO = "screenshare_video", s.SCREENSHARE_AUDIO = "screenshare_audio", s;
14816
- }(bt || {}), PI = zP(), To = di(PI.config.media);
14816
+ }(Pt || {}), PI = zP(), To = di(PI.config.media);
14817
14817
  function SI(s) {
14818
14818
  var r = {};
14819
14819
  if (s.audio) {
@@ -14830,7 +14830,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
14830
14830
  return T !== void 0 && ["monitor", "browser", "window"].includes(T) && (I = V(V({}, I), {}, { displaySurface: T })), E !== void 0 && (I = V(V({}, I), {}, { selfBrowserSurface: E })), { audio: !0, video: I };
14831
14831
  }, this.getAudioConstraints = function(n) {
14832
14832
  var i, a, o, c, l = {}, d = (i = u(t, wi)[wi]) === null || i === void 0 ? void 0 : i.audio, p = d != null && d.enableStereo ? 2 : 1;
14833
- if (Tt.isFirefox() || Tt.isWebKitBased()) {
14833
+ if (wt.isFirefox() || wt.isWebKitBased()) {
14834
14834
  var v, f, g;
14835
14835
  return l.audio = { deviceId: n, autoGainControl: (v = d == null ? void 0 : d.autoGainControl) !== null && v !== void 0 ? v : !0, echoCancellation: (f = d == null ? void 0 : d.echoCancellation) !== null && f !== void 0 ? f : !0, noiseSuppression: (g = d == null ? void 0 : d.noiseSupression) !== null && g !== void 0 ? g : !0, channelCount: p }, l;
14836
14836
  }
@@ -15130,7 +15130,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15130
15130
  return _.deviceId === i;
15131
15131
  })), 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() {
15132
15132
  var _ = m(/* @__PURE__ */ h().m(function O(L) {
15133
- var q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, Pt;
15133
+ var q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, St;
15134
15134
  return h().w(function(ht) {
15135
15135
  for (; ; )
15136
15136
  switch (ht.p = ht.n) {
@@ -15139,7 +15139,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15139
15139
  case 1:
15140
15140
  return H = ht.v.getVideoTracks(), J = Ue(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);
15141
15141
  case 2:
15142
- if (ht.p = 2, Pt = ht.v, pe = Gc("video", Pt.name, Pt.message), Le = new pd(Pt.name, Pt.message, L), pe !== "COULD_NOT_START") {
15142
+ if (ht.p = 2, St = ht.v, pe = Gc("video", St.name, St.message), Le = new pd(St.name, St.message, L), pe !== "COULD_NOT_START") {
15143
15143
  ht.n = 4;
15144
15144
  break;
15145
15145
  }
@@ -15149,7 +15149,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15149
15149
  }
15150
15150
  throw Le;
15151
15151
  case 3:
15152
- return c.logger.info("getVideoTrack::gum_failed", { constraints: JSON.stringify(L), error: Pt }), 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 }));
15152
+ 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 }));
15153
15153
  case 4:
15154
15154
  throw Le;
15155
15155
  case 5:
@@ -15364,7 +15364,7 @@ var wi = /* @__PURE__ */ w("mediaConstraints"), hd = /* @__PURE__ */ w("context"
15364
15364
  for (; ; )
15365
15365
  switch (c.n) {
15366
15366
  case 0:
15367
- if (!Tt.supportsDeviceChangeEvent()) {
15367
+ if (!wt.supportsDeviceChangeEvent()) {
15368
15368
  c.n = 2;
15369
15369
  break;
15370
15370
  }
@@ -15737,7 +15737,7 @@ var VI = Object.defineProperty, $I = Object.getOwnPropertyDescriptor, Kg = funct
15737
15737
  for (; ; )
15738
15738
  switch (o.p = o.n) {
15739
15739
  case 0:
15740
- if (!(Tt.isWebKitBased() && !(Tt.isSafari() && OP.test(Tt.getVersion())))) {
15740
+ if (!(wt.isWebKitBased() && !(wt.isSafari() && OP.test(wt.getVersion())))) {
15741
15741
  o.n = 1;
15742
15742
  break;
15743
15743
  }
@@ -16229,7 +16229,7 @@ var FI = Fl, bi = /* @__PURE__ */ w("mediaInterface"), HI = /* @__PURE__ */ func
16229
16229
  return t;
16230
16230
  }() }, { key: "addMediaTrackListeners", value: function() {
16231
16231
  var t;
16232
- if ((t = this.videoMediaTrack) === null || t === void 0 || t.addEventListener("ended", this.onTrackEnded.bind(this)), Tt.isWebKitBased()) {
16232
+ if ((t = this.videoMediaTrack) === null || t === void 0 || t.addEventListener("ended", this.onTrackEnded.bind(this)), wt.isWebKitBased()) {
16233
16233
  var n;
16234
16234
  (n = this.videoMediaTrack) === null || n === void 0 || n.addEventListener("mute", this.onTrackEnded.bind(this));
16235
16235
  }
@@ -17686,12 +17686,12 @@ var pu = /* @__PURE__ */ function(s) {
17686
17686
  for (var i = n > 1 ? void 0 : n ? bM(e, t) : e, a = r.length - 1, o; a >= 0; a--)
17687
17687
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
17688
17688
  return n && i && wM(e, t, i), i;
17689
- }, PM = ["ACTIVE_GRID", "PAGINATED", "MANUAL"], bn = (ke = /* @__PURE__ */ w("context"), lo = /* @__PURE__ */ w("roomNodeClient"), ei = /* @__PURE__ */ w("socketJoined"), ua = /* @__PURE__ */ w("mediaJoined"), ti = /* @__PURE__ */ w("self"), wt = /* @__PURE__ */ w("roomSocketHandler"), /* @__PURE__ */ function(s) {
17689
+ }, PM = ["ACTIVE_GRID", "PAGINATED", "MANUAL"], bn = (ke = /* @__PURE__ */ w("context"), lo = /* @__PURE__ */ w("roomNodeClient"), ei = /* @__PURE__ */ w("socketJoined"), ua = /* @__PURE__ */ w("mediaJoined"), ti = /* @__PURE__ */ w("self"), bt = /* @__PURE__ */ w("roomSocketHandler"), /* @__PURE__ */ function(s) {
17690
17690
  function r(e, t, n) {
17691
17691
  var i;
17692
17692
  P(this, r);
17693
17693
  var a = e.getValue("logger");
17694
- return i = C(this, r, [a]), Object.defineProperty(i, ua, { get: CM, set: void 0 }), Object.defineProperty(i, ei, { get: EM, set: void 0 }), Object.defineProperty(i, lo, { get: SM, set: void 0 }), i.waitlisted = void 0, i.joined = void 0, i.active = void 0, i.videoSubscribed = void 0, i.audioSubscribed = void 0, i.pinned = void 0, i.all = void 0, Object.defineProperty(i, ke, { writable: !0, value: void 0 }), Object.defineProperty(i, ti, { writable: !0, value: void 0 }), Object.defineProperty(i, wt, { writable: !0, value: void 0 }), i.rateLimitConfig = { maxInvocations: 5, period: 1 }, i.viewMode = void 0, i.currentPage = void 0, i.lastActiveSpeaker = void 0, i.selectedPeers = Xg, u(i, ke)[ke] = e, u(i, ti)[ti] = t, u(i, wt)[wt] = n, i.waitlisted = new pu(a), i.joined = new pu(a), i.videoSubscribed = new pu(a), i.audioSubscribed = new pu(a), i.active = i.videoSubscribed, i.pinned = new pu(a), i.all = new yM(a), i.viewMode = "ACTIVE_GRID", i.currentPage = 0, i.setupEvents(), i;
17694
+ return i = C(this, r, [a]), Object.defineProperty(i, ua, { get: CM, set: void 0 }), Object.defineProperty(i, ei, { get: EM, set: void 0 }), Object.defineProperty(i, lo, { get: SM, set: void 0 }), i.waitlisted = void 0, i.joined = void 0, i.active = void 0, i.videoSubscribed = void 0, i.audioSubscribed = void 0, i.pinned = void 0, i.all = void 0, Object.defineProperty(i, ke, { writable: !0, value: void 0 }), Object.defineProperty(i, ti, { writable: !0, value: void 0 }), Object.defineProperty(i, bt, { writable: !0, value: void 0 }), i.rateLimitConfig = { maxInvocations: 5, period: 1 }, i.viewMode = void 0, i.currentPage = void 0, i.lastActiveSpeaker = void 0, i.selectedPeers = Xg, u(i, ke)[ke] = e, u(i, ti)[ti] = t, u(i, bt)[bt] = n, i.waitlisted = new pu(a), i.joined = new pu(a), i.videoSubscribed = new pu(a), i.audioSubscribed = new pu(a), i.active = i.videoSubscribed, i.pinned = new pu(a), i.all = new yM(a), i.viewMode = "ACTIVE_GRID", i.currentPage = 0, i.setupEvents(), i;
17695
17695
  }
17696
17696
  return R(r, s), S(r, [{ key: "pip", get: (
17697
17697
  /**
@@ -17784,7 +17784,7 @@ var pu = /* @__PURE__ */ function(s) {
17784
17784
  if (!u(this, ei)[ei])
17785
17785
  throw new j("Can`t accept waiting room request without joining room", "1205");
17786
17786
  var a = (n = (i = this.waitlisted.get(t)) === null || i === void 0 ? void 0 : i.userId) !== null && n !== void 0 ? n : t;
17787
- return u(this, wt)[wt].acceptWaitingRoomRequest([a]);
17787
+ return u(this, bt)[bt].acceptWaitingRoomRequest([a]);
17788
17788
  }
17789
17789
  /**
17790
17790
  * We need a new event for socket service events
@@ -17802,7 +17802,7 @@ var pu = /* @__PURE__ */ function(s) {
17802
17802
  return o = i.map(function(l) {
17803
17803
  var d, p;
17804
17804
  return (d = (p = a.waitlisted.get(l)) === null || p === void 0 ? void 0 : p.userId) !== null && d !== void 0 ? d : l;
17805
- }), c.a(2, u(this, wt)[wt].acceptWaitingRoomRequest(o));
17805
+ }), c.a(2, u(this, bt)[bt].acceptWaitingRoomRequest(o));
17806
17806
  }
17807
17807
  }, n, this);
17808
17808
  }));
@@ -17823,7 +17823,7 @@ var pu = /* @__PURE__ */ function(s) {
17823
17823
  }
17824
17824
  throw new j("Can`t reject waiting room request without joining room", "1205");
17825
17825
  case 1:
17826
- c = (a = (o = this.waitlisted.get(i)) === null || o === void 0 ? void 0 : o.userId) !== null && a !== void 0 ? a : i, u(this, wt)[wt].rejectWaitingRoomRequest([c]);
17826
+ c = (a = (o = this.waitlisted.get(i)) === null || o === void 0 ? void 0 : o.userId) !== null && a !== void 0 ? a : i, u(this, bt)[bt].rejectWaitingRoomRequest([c]);
17827
17827
  case 2:
17828
17828
  return l.a(2);
17829
17829
  }
@@ -18039,7 +18039,7 @@ var pu = /* @__PURE__ */ function(s) {
18039
18039
  }
18040
18040
  throw this.logger.error("Participants::unauthorized_kick_all"), new j("Unauthorized: User does not have permission to kick peers.", "1201");
18041
18041
  case 2:
18042
- a = !0, u(this, wt)[wt].kickAll(a);
18042
+ a = !0, u(this, bt)[bt].kickAll(a);
18043
18043
  case 3:
18044
18044
  return o.a(2);
18045
18045
  }
@@ -18076,7 +18076,7 @@ var pu = /* @__PURE__ */ function(s) {
18076
18076
  l.n = 4;
18077
18077
  break;
18078
18078
  }
18079
- return l.n = 3, u(this, wt)[wt].broadcastToMeetings(i, o.meetingIds, a);
18079
+ return l.n = 3, u(this, bt)[bt].broadcastToMeetings(i, o.meetingIds, a);
18080
18080
  case 3:
18081
18081
  l.n = 5;
18082
18082
  break;
@@ -18086,12 +18086,12 @@ var pu = /* @__PURE__ */ function(s) {
18086
18086
  return (p = o.presetNames) === null || p === void 0 ? void 0 : p.includes(d.presetName);
18087
18087
  }).map(function(d) {
18088
18088
  return d.id;
18089
- }), l.n = 5, u(this, wt)[wt].broadcastToPeers(i, c, a);
18089
+ }), l.n = 5, u(this, bt)[bt].broadcastToPeers(i, c, a);
18090
18090
  case 5:
18091
18091
  l.n = 7;
18092
18092
  break;
18093
18093
  case 6:
18094
- return l.n = 7, u(this, wt)[wt].broadcastMessage(i, a);
18094
+ return l.n = 7, u(this, bt)[bt].broadcastMessage(i, a);
18095
18095
  case 7:
18096
18096
  return l.a(2);
18097
18097
  }
@@ -18110,7 +18110,7 @@ var pu = /* @__PURE__ */ function(s) {
18110
18110
  for (; ; )
18111
18111
  switch (l.n) {
18112
18112
  case 0:
18113
- return l.n = 1, u(this, wt)[wt].getRoomPeers(i, a, o);
18113
+ return l.n = 1, u(this, bt)[bt].getRoomPeers(i, a, o);
18114
18114
  case 1:
18115
18115
  return c = l.v, l.a(2, c.peers.map(Zi.formatSocketPeerMessage));
18116
18116
  }
@@ -18142,7 +18142,7 @@ var pu = /* @__PURE__ */ function(s) {
18142
18142
  }
18143
18143
  throw new j("Cannot update permissions, no valid userIDs found", "1204");
18144
18144
  case 1:
18145
- u(this, wt)[wt].updatePermissions(c, a);
18145
+ u(this, bt)[bt].updatePermissions(c, a);
18146
18146
  case 2:
18147
18147
  return l.a(2);
18148
18148
  }
@@ -18158,7 +18158,7 @@ var pu = /* @__PURE__ */ function(s) {
18158
18158
  for (; ; )
18159
18159
  switch (i.n) {
18160
18160
  case 0:
18161
- return i.a(2, u(this, wt)[wt].getRoomPeersNonPaginated());
18161
+ return i.a(2, u(this, bt)[bt].getRoomPeersNonPaginated());
18162
18162
  }
18163
18163
  }, n, this);
18164
18164
  }));
@@ -18294,7 +18294,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18294
18294
  }
18295
18295
  n.logger.debug("Processing socket join for ".concat(n.self.id === f.id ? "local peer" : "remote peer", " ").concat(f.id, " listed in socket peers.")), n.onParticipantSocketJoined(f), n.logger.debug("Processed socket join for ".concat(n.self.id === f.id ? "local peer" : "remote peer", " ").concat(f.id, " listed in socket peers."));
18296
18296
  });
18297
- } }, { key: "handlePeerJoinedBroadcast", value: function(e) {
18297
+ } }, { key: "handlePeerMediaJoinedBroadcast", value: function(e) {
18298
18298
  var t, n = e.participant, i = e.producerHandoverFromPeerId;
18299
18299
  if (n) {
18300
18300
  var a = n.peerId === this.self.id, o = (t = n.producerStates) !== null && t !== void 0 ? t : [];
@@ -18313,7 +18313,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18313
18313
  key: "setupEvents",
18314
18314
  value: function() {
18315
18315
  var e = this;
18316
- 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.handlePeerJoinedBroadcast.bind(this)), this.roomSocketHandler.on(this.events.selfJoinComplete, /* @__PURE__ */ function() {
18316
+ 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() {
18317
18317
  var t = m(/* @__PURE__ */ h().m(function n(i) {
18318
18318
  var a, o, c, l, d, p;
18319
18319
  return h().w(function(v) {
@@ -18414,19 +18414,21 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18414
18414
  * Socket Service only
18415
18415
  */
18416
18416
  }, { key: "waitingRoomRequestHandler", value: function(e) {
18417
- var t = this, n = e.requests.filter(function(a) {
18418
- return !t.participants.waitlisted.toArray().find(function(o) {
18419
- return o.userId === a.userId;
18420
- });
18421
- }), i = this.participants.waitlisted.toArray().filter(function(a) {
18422
- return !e.requests.find(function(o) {
18423
- return o.userId === a.userId;
18417
+ var t, n = this;
18418
+ this.logger.info("Received waitlisted peers: ".concat((e == null || (t = e.requests) === null || t === void 0 || (t = t.map(function(o) {
18419
+ return o.peerId;
18420
+ })) === null || t === void 0 ? void 0 : t.join(", ")) || "none"));
18421
+ var i = e.requests.filter(function(o) {
18422
+ return !n.participants.waitlisted.get(o.peerId);
18423
+ }), a = this.participants.waitlisted.toArray().filter(function(o) {
18424
+ return !e.requests.find(function(c) {
18425
+ return c.peerId === o.id;
18424
18426
  });
18425
18427
  });
18426
- n.forEach(function(a) {
18427
- return t.participants.waitlisted.add(new Ji(t.context, { id: a.peerId, displayName: a.displayName, audioMuted: !0, videoEnabled: !1, audioTrack: void 0, videoTrack: void 0, stageStatus: "OFF_STAGE", userId: a.userId, flags: {}, isHost: !1, customParticipantId: a.customParticipantId, picture: a.picture, metadata: { preset_name: a.presetName } }, t.self, t.roomSocketHandler));
18428
- }), i.forEach(function(a) {
18429
- return t.participants.waitlisted.delete(a.id);
18428
+ i.forEach(function(o) {
18429
+ return n.participants.waitlisted.add(new Ji(n.context, { id: o.peerId, displayName: o.displayName, audioMuted: !0, videoEnabled: !1, audioTrack: void 0, videoTrack: void 0, stageStatus: "OFF_STAGE", userId: o.userId, flags: {}, isHost: !1, customParticipantId: o.customParticipantId, picture: o.picture, metadata: { preset_name: o.presetName } }, n.self, n.roomSocketHandler));
18430
+ }), a.forEach(function(o) {
18431
+ return n.participants.waitlisted.delete(o.id);
18430
18432
  });
18431
18433
  } }, { key: "maxPreferredStreams", get: function() {
18432
18434
  return this.participants.maxActiveParticipantsCount;
@@ -18572,7 +18574,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18572
18574
  return pe.kind === "video";
18573
18575
  })) !== null && U !== void 0 ? U : [];
18574
18576
  le && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18575
- var Le, Q, Lt, Pt, 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 = (Pt = le.manualProducerConfig) === null || Pt === void 0 ? void 0 : Pt.screenshareVideo) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "video" && pe.screenShare;
18577
+ 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;
18576
18578
  (ht || re) && (pe.pause || v.push(pe));
18577
18579
  });
18578
18580
  }), this.participants.audioSubscribed.forEach(function(N) {
@@ -18580,7 +18582,7 @@ var RM = Object.defineProperty, _M = Object.getOwnPropertyDescriptor, eo = funct
18580
18582
  return pe.kind === "audio";
18581
18583
  })) !== null && U !== void 0 ? U : [];
18582
18584
  le && Re !== null && Re !== void 0 && Re.length && Re.forEach(function(pe) {
18583
- var Le, Q, Lt, Pt, 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 = (Pt = le.manualProducerConfig) === null || Pt === void 0 ? void 0 : Pt.screenshareAudio) !== null && Lt !== void 0 ? Lt : !0) && pe.kind === "audio" && pe.screenShare;
18585
+ 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;
18584
18586
  (ht || re) && v.push(pe);
18585
18587
  });
18586
18588
  }), v = EP(v, function(N) {
@@ -19520,7 +19522,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19520
19522
  i.mediaPermissions[k] = b;
19521
19523
  var T = { message: i.mediaPermissions[k], kind: k };
19522
19524
  b === "DENIED" ? u(i, jt)[jt].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_ERROR, T) : u(i, jt)[jt].getValue("peerSessionStore").emit($.MEDIA_PERMISSION_UPDATE, T);
19523
- }, Tt.getName() !== "firefox") {
19525
+ }, wt.getName() !== "firefox") {
19524
19526
  g.n = 1;
19525
19527
  break;
19526
19528
  }
@@ -19597,7 +19599,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
19597
19599
  for (; ; )
19598
19600
  switch (_.p = _.n) {
19599
19601
  case 0:
19600
- if (a = I.length > 0 && I[0] !== void 0 ? I[0] : {}, o = I.length > 1 && I[1] !== void 0 ? I[1] : !1, c = I.length > 2 && I[2] !== void 0 ? I[2] : null, Tt.init(), c && (u(this, jt)[jt] = c), !this.localMediaHandler) {
19602
+ if (a = I.length > 0 && I[0] !== void 0 ? I[0] : {}, o = I.length > 1 && I[1] !== void 0 ? I[1] : !1, c = I.length > 2 && I[2] !== void 0 ? I[2] : null, wt.init(), c && (u(this, jt)[jt] = c), !this.localMediaHandler) {
19601
19603
  _.n = 1;
19602
19604
  break;
19603
19605
  }
@@ -20114,7 +20116,7 @@ var jt = /* @__PURE__ */ w("context"), Zg = /* @__PURE__ */ function(s) {
20114
20116
  var o;
20115
20117
  P(this, r);
20116
20118
  var c = e.getValue("logger");
20117
- return o = C(this, r, [e, c]), Object.defineProperty(o, po, { value: GM }), Object.defineProperty(o, be, { get: WM, set: void 0 }), Object.defineProperty(o, da, { get: qM, set: void 0 }), Object.defineProperty(o, Ve, { get: BM, set: void 0 }), Object.defineProperty(o, Rr, { get: HM, set: void 0 }), o.name = void 0, o.picture = void 0, o.customParticipantId = void 0, o.waitlistStatus = void 0, Object.defineProperty(o, ca, { writable: !0, value: void 0 }), Object.defineProperty(o, ot, { writable: !0, value: void 0 }), Object.defineProperty(o, la, { writable: !0, value: void 0 }), o.role = void 0, o.userId = void 0, o.organizationId = void 0, o.supportsRemoteControl = !1, o.device = void 0, Object.defineProperty(o, $e, { writable: !0, value: void 0 }), o.hidden = !1, o.presetName = void 0, o.roomState = "init", Object.defineProperty(o, wa, { writable: !0, value: /* @__PURE__ */ new Set() }), Object.defineProperty(o, ba, { writable: !0, value: /* @__PURE__ */ new Set() }), u(o, $e)[$e] = e, o.userId = t.id, o.name = t.name, o.picture = t.picture, o.customParticipantId = t.customParticipantId, o.waitlistStatus = "none", u(o, ot)[ot] = n, u(o, ca)[ca] = i, o.hidden = !1, u(o, la)[la] = !1, o.organizationId = t.organizationId, o.supportsRemoteControl = Tt.isElectron(), o.device = Tt.getDeviceInfo(), o.presetName = a, o.updatePermission(), o.updateVideo = o.updateVideo.bind(o), u(o, po)[po](), o;
20119
+ return o = C(this, r, [e, c]), Object.defineProperty(o, po, { value: GM }), Object.defineProperty(o, be, { get: WM, set: void 0 }), Object.defineProperty(o, da, { get: qM, set: void 0 }), Object.defineProperty(o, Ve, { get: BM, set: void 0 }), Object.defineProperty(o, Rr, { get: HM, set: void 0 }), o.name = void 0, o.picture = void 0, o.customParticipantId = void 0, o.waitlistStatus = void 0, Object.defineProperty(o, ca, { writable: !0, value: void 0 }), Object.defineProperty(o, ot, { writable: !0, value: void 0 }), Object.defineProperty(o, la, { writable: !0, value: void 0 }), o.role = void 0, o.userId = void 0, o.organizationId = void 0, o.supportsRemoteControl = !1, o.device = void 0, Object.defineProperty(o, $e, { writable: !0, value: void 0 }), o.hidden = !1, o.presetName = void 0, o.roomState = "init", Object.defineProperty(o, wa, { writable: !0, value: /* @__PURE__ */ new Set() }), Object.defineProperty(o, ba, { writable: !0, value: /* @__PURE__ */ new Set() }), u(o, $e)[$e] = e, o.userId = t.id, o.name = t.name, o.picture = t.picture, o.customParticipantId = t.customParticipantId, o.waitlistStatus = "none", u(o, ot)[ot] = n, u(o, ca)[ca] = i, o.hidden = !1, u(o, la)[la] = !1, o.organizationId = t.organizationId, o.supportsRemoteControl = wt.isElectron(), o.device = wt.getDeviceInfo(), o.presetName = a, o.updatePermission(), o.updateVideo = o.updateVideo.bind(o), u(o, po)[po](), o;
20118
20120
  }
20119
20121
  return R(r, s), S(r, [{ key: "telemetry", get: (
20120
20122
  /**
@@ -24040,12 +24042,12 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24040
24042
  for (var i = n > 1 ? void 0 : n ? JO(e, t) : e, a = r.length - 1, o; a >= 0; a--)
24041
24043
  (o = r[a]) && (i = (n ? o(e, t, i) : o(i)) || i);
24042
24044
  return n && i && GO(e, t, i), i;
24043
- }, Yu = /* @__PURE__ */ w("roomUUID"), Xu = /* @__PURE__ */ w("peerDisplayName"), Be = /* @__PURE__ */ w("socketClient"), B = /* @__PURE__ */ w("sfuHandler"), _h = /* @__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"), yt = /* @__PURE__ */ w("producerTypes"), Ct = /* @__PURE__ */ w("audioActivityReporter"), Jr = /* @__PURE__ */ w("connectionHandler"), Iu = /* @__PURE__ */ w("handleMediaRoomJoinFailure"), Ad = /* @__PURE__ */ w("joinRoom"), Ah = /* @__PURE__ */ w("completeJoinRoom"), Ih = /* @__PURE__ */ w("reportRoomJoinedAnalytics"), Zu = /* @__PURE__ */ w("initializeConnection"), Mh = /* @__PURE__ */ w("getRtpCapabilities"), Oh = /* @__PURE__ */ w("sendJoinRoomMessage"), Ye = /* @__PURE__ */ w("getProducer"), Mi = /* @__PURE__ */ w("setProducer"), Id = /* @__PURE__ */ w("deleteProducer"), Md = /* @__PURE__ */ w("handlePeerProducerCreateBroadcast"), Od = /* @__PURE__ */ w("getMicProducerDefaults"), Dd = /* @__PURE__ */ w("getWebcamProducerDefaults"), Ze = /* @__PURE__ */ function() {
24045
+ }, Yu = /* @__PURE__ */ w("roomUUID"), Xu = /* @__PURE__ */ w("peerDisplayName"), Be = /* @__PURE__ */ w("socketClient"), B = /* @__PURE__ */ w("sfuHandler"), _h = /* @__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"), Ad = /* @__PURE__ */ w("joinRoom"), Ah = /* @__PURE__ */ w("completeJoinRoom"), Ih = /* @__PURE__ */ w("reportRoomJoinedAnalytics"), Zu = /* @__PURE__ */ w("initializeConnection"), Mh = /* @__PURE__ */ w("getRtpCapabilities"), Oh = /* @__PURE__ */ w("sendJoinRoomMessage"), Ye = /* @__PURE__ */ w("getProducer"), Mi = /* @__PURE__ */ w("setProducer"), Id = /* @__PURE__ */ w("deleteProducer"), Md = /* @__PURE__ */ w("handlePeerProducerCreateBroadcast"), Od = /* @__PURE__ */ w("getMicProducerDefaults"), Dd = /* @__PURE__ */ w("getWebcamProducerDefaults"), Ze = /* @__PURE__ */ function() {
24044
24046
  function s(r, e) {
24045
24047
  var t, n, i = this;
24046
- P(this, s), Object.defineProperty(this, Dd, { value: sD }), Object.defineProperty(this, Od, { value: aD }), Object.defineProperty(this, Md, { value: iD }), Object.defineProperty(this, Id, { value: nD }), Object.defineProperty(this, Mi, { value: rD }), Object.defineProperty(this, Ye, { value: tD }), Object.defineProperty(this, Oh, { value: eD }), Object.defineProperty(this, Mh, { value: xO }), Object.defineProperty(this, Zu, { value: ZO }), Object.defineProperty(this, Ih, { value: XO }), Object.defineProperty(this, Ah, { value: YO }), Object.defineProperty(this, Ad, { value: QO }), Object.defineProperty(this, Iu, { value: zO }), Object.defineProperty(this, Jr, { get: KO, 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, Be, { writable: !0, value: void 0 }), Object.defineProperty(this, B, { writable: !0, value: void 0 }), Object.defineProperty(this, _h, { 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, yt, { writable: !0, value: void 0 }), Object.defineProperty(this, Ct, { writable: !0, value: void 0 }), this.context = r;
24048
+ P(this, s), Object.defineProperty(this, Dd, { value: sD }), Object.defineProperty(this, Od, { value: aD }), Object.defineProperty(this, Md, { value: iD }), Object.defineProperty(this, Id, { value: nD }), Object.defineProperty(this, Mi, { value: rD }), Object.defineProperty(this, Ye, { value: tD }), Object.defineProperty(this, Oh, { value: eD }), Object.defineProperty(this, Mh, { value: xO }), Object.defineProperty(this, Zu, { value: ZO }), Object.defineProperty(this, Ih, { value: XO }), Object.defineProperty(this, Ah, { value: YO }), Object.defineProperty(this, Ad, { value: QO }), Object.defineProperty(this, Iu, { value: zO }), Object.defineProperty(this, Jr, { get: KO, 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, Be, { writable: !0, value: void 0 }), Object.defineProperty(this, B, { writable: !0, value: void 0 }), Object.defineProperty(this, _h, { 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;
24047
24049
  var a = e.socket;
24048
- this.mediaJoined = !1, u(this, Be)[Be] = a, u(this, Xr)[Xr] = !1, u(this, B)[B] = new _O(r, a), u(this, mt)[mt] = u(this, B)[B].events, u(this, qr)[qr] = /* @__PURE__ */ new Set(), u(this, yt)[yt] = /* @__PURE__ */ new Map(), u(this, Vi)[Vi] = !1, u(this, Ii)[Ii] = new oh(r.getValue("logger")), u(this, Ct)[Ct] = new Wl(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] = cp(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function o() {
24050
+ this.mediaJoined = !1, u(this, Be)[Be] = a, u(this, Xr)[Xr] = !1, u(this, B)[B] = new _O(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 oh(r.getValue("logger")), u(this, yt)[yt] = new Wl(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] = cp(/* @__PURE__ */ m(/* @__PURE__ */ h().m(function o() {
24049
24051
  var c, l;
24050
24052
  return h().w(function(d) {
24051
24053
  for (; ; )
@@ -24092,7 +24094,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24092
24094
  u(this, Jr)[Jr].mediaJoined = e;
24093
24095
  } }, { key: "reset", value: function(e) {
24094
24096
  var t = e.resetTransportQueue;
24095
- 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, yt)[yt].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 oh());
24097
+ 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 oh());
24096
24098
  } }, { key: "joinRoom", value: function() {
24097
24099
  var r = m(/* @__PURE__ */ h().m(function t(n, i) {
24098
24100
  var a = this, o, c, l, d, p = arguments, v;
@@ -24169,22 +24171,22 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24169
24171
  });
24170
24172
  } }, { key: "leaveRoom", value: function() {
24171
24173
  var r = m(/* @__PURE__ */ h().m(function t() {
24172
- var n = this, i, a, o;
24173
- return h().w(function(c) {
24174
+ var n, i = this, a, o, c;
24175
+ return h().w(function(l) {
24174
24176
  for (; ; )
24175
- switch (c.n) {
24177
+ switch (l.n) {
24176
24178
  case 0:
24177
- u(this, B)[B].stopAllTransports(), u(this, Vi)[Vi] = !1, u(this, Jr)[Jr].mediaJoinAttempted = !1, i = { closeRoom: !1 };
24179
+ (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 };
24178
24180
  try {
24179
- a = u(this, Be)[Be].sendMessage(u(this, mt)[mt].leaveRoom, jS.toBinary(i)), a || this.logger.warn("MediaNodeClient.leaveRoom: media leave was not sent");
24180
- } catch (l) {
24181
- this.logger.error("MediaNodeClient.leaveRoom: media leave failed", { error: l });
24181
+ o = u(this, Be)[Be].sendMessage(u(this, mt)[mt].leaveRoom, jS.toBinary(a)), o || this.logger.warn("MediaNodeClient.leaveRoom: media leave was not sent");
24182
+ } catch (d) {
24183
+ this.logger.error("MediaNodeClient.leaveRoom: media leave failed", { error: d });
24182
24184
  }
24183
- this.context.getValue("callstats").callEnded(), o = this.context.getValue("telemetry"), o.destruct().catch(function(l) {
24184
- n.logger.error("leaveRoom::telemetry_destruct_failed", { error: l });
24185
+ this.context.getValue("callstats").callEnded(), c = this.context.getValue("telemetry"), c.destruct().catch(function(d) {
24186
+ i.logger.error("leaveRoom::telemetry_destruct_failed", { error: d });
24185
24187
  });
24186
24188
  case 1:
24187
- return c.a(2);
24189
+ return l.a(2);
24188
24190
  }
24189
24191
  }, t, this);
24190
24192
  }));
@@ -24257,7 +24259,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24257
24259
  for (; ; )
24258
24260
  switch (T.n) {
24259
24261
  case 0:
24260
- if (c = bt.WEBCAM, l = u(this, Ye)[Ye](c), !l) {
24262
+ if (c = Pt.WEBCAM, l = u(this, Ye)[Ye](c), !l) {
24261
24263
  T.n = 6;
24262
24264
  break;
24263
24265
  }
@@ -24282,7 +24284,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24282
24284
  return T.a(2, this._shareWebcam(n));
24283
24285
  case 6:
24284
24286
  return v = u(this, Dd)[Dd](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, y = f || g && g.disable || !((a = this.context) !== null && a !== void 0 && (a = a.getValue("theme")) !== null && a !== void 0 && a.isSimulcastEnabled), y ? this.logger.info("Simulcast disabled for webcam producer, SFU: CF") : (this.logger.info("Simulcast enabled for SFU: CF"), v.encodings = bI(this.context, n), this.logger.info("Simulcast encodings: ".concat(JSON.stringify(v.encodings)))), k = function() {
24285
- o.logger.info("Disabling video due to the producer closure"), u(o, yt)[yt].delete(c);
24287
+ o.logger.info("Disabling video due to the producer closure"), u(o, kt)[kt].delete(c);
24286
24288
  }, b = u(this, B)[B].createProducer(v, k), u(this, Mi)[Mi](c, b.then(function(E) {
24287
24289
  return E.id;
24288
24290
  })), T.a(2, b.then(function(E) {
@@ -24328,16 +24330,16 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24328
24330
  }
24329
24331
  return E.a(2);
24330
24332
  case 1:
24331
- return E.n = 2, u(this, Ye)[Ye](bt.SCREENSHARE_VIDEO);
24333
+ return E.n = 2, u(this, Ye)[Ye](Pt.SCREENSHARE_VIDEO);
24332
24334
  case 2:
24333
- return c = E.v, E.n = 3, u(this, Ye)[Ye](bt.SCREENSHARE_AUDIO);
24335
+ return c = E.v, E.n = 3, u(this, Ye)[Ye](Pt.SCREENSHARE_AUDIO);
24334
24336
  case 3:
24335
- 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: Tt.isElectron() }, stopTracks: !1 }, g = function() {
24336
- i.logger.info("Disabling screenShare due to the producer closure"), u(i, yt)[yt].delete(bt.SCREENSHARE_VIDEO), u(i, yt)[yt].delete(bt.SCREENSHARE_AUDIO);
24337
- }, y = u(this, B)[B].createProducer(f, g), u(this, Mi)[Mi](bt.SCREENSHARE_VIDEO, y.then(function(I) {
24337
+ 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() {
24338
+ 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);
24339
+ }, y = u(this, B)[B].createProducer(f, g), u(this, Mi)[Mi](Pt.SCREENSHARE_VIDEO, y.then(function(I) {
24338
24340
  return I.id;
24339
- })), v.push(y)), o && (p && !p.closed ? v.push(p.replaceTrack({ track: o })) : (k = { track: o, codecOptions: [{ name: "opus" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: Tt.isElectron() }, stopTracks: !1, zeroRtpOnPause: !1 }, b = function() {
24340
- }, T = u(this, B)[B].createProducer(k, b), u(this, Mi)[Mi](bt.SCREENSHARE_AUDIO, T.then(function(I) {
24341
+ })), v.push(y)), o && (p && !p.closed ? v.push(p.replaceTrack({ track: o })) : (k = { track: o, codecOptions: [{ name: "opus" }], appData: { screenShare: !0, e2ee: this.e2ee, supportsRemoteControl: wt.isElectron() }, stopTracks: !1, zeroRtpOnPause: !1 }, b = function() {
24342
+ }, T = u(this, B)[B].createProducer(k, b), u(this, Mi)[Mi](Pt.SCREENSHARE_AUDIO, T.then(function(I) {
24341
24343
  return I.id;
24342
24344
  })), v.push(T))), E.n = 4, Promise.all(v);
24343
24345
  case 4:
@@ -24364,7 +24366,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24364
24366
  }
24365
24367
  throw new gn("track undefined");
24366
24368
  case 1:
24367
- if (a = u(this, Ye)[Ye](bt.MIC), !a) {
24369
+ if (a = u(this, Ye)[Ye](Pt.MIC), !a) {
24368
24370
  f.n = 8;
24369
24371
  break;
24370
24372
  }
@@ -24382,7 +24384,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24382
24384
  case 3:
24383
24385
  return f.n = 4, this.resumeMic();
24384
24386
  case 4:
24385
- return u(this, Ct)[Ct] && (u(this, Ct)[Ct].audioTrack = n, u(this, Ct)[Ct].producerId = o, u(this, Ct)[Ct].start(!0)), f.a(2);
24387
+ 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);
24386
24388
  case 5:
24387
24389
  return f.n = 6, u(this, B)[B].closeProducer(o, { stopTrack: !1 });
24388
24390
  case 6:
@@ -24391,11 +24393,11 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24391
24393
  return f.a(2);
24392
24394
  case 8:
24393
24395
  return l = u(this, Od)[Od](n), d = function() {
24394
- u(i, yt)[yt].delete(bt.MIC);
24395
- }, p = u(this, B)[B].createProducer(l, d), u(this, Mi)[Mi](bt.MIC, p.then(function(g) {
24396
+ u(i, kt)[kt].delete(Pt.MIC);
24397
+ }, p = u(this, B)[B].createProducer(l, d), u(this, Mi)[Mi](Pt.MIC, p.then(function(g) {
24396
24398
  return g.id;
24397
24399
  })), f.n = 9, p.then(function(g) {
24398
- u(i, Ct)[Ct] && (u(i, Ct)[Ct].audioTrack = g.track, u(i, Ct)[Ct].producerId = g.id, u(i, Ct)[Ct].start());
24400
+ u(i, yt)[yt] && (u(i, yt)[yt].audioTrack = g.track, u(i, yt)[yt].producerId = g.id, u(i, yt)[yt].start());
24399
24401
  });
24400
24402
  case 9:
24401
24403
  f.n = 11;
@@ -24418,7 +24420,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24418
24420
  for (; ; )
24419
24421
  switch (c.n) {
24420
24422
  case 0:
24421
- return c.n = 1, u(this, Ye)[Ye](bt.MIC);
24423
+ return c.n = 1, u(this, Ye)[Ye](Pt.MIC);
24422
24424
  case 1:
24423
24425
  if (i = c.v, a = u(this, B)[B].producers.get(i), a) {
24424
24426
  c.n = 2;
@@ -24432,7 +24434,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24432
24434
  }
24433
24435
  return this.logger.info("pauseMic::mic_producer_already_paused"), c.a(2);
24434
24436
  case 3:
24435
- a.pause(), (n = u(this, Ct)[Ct]) === null || n === void 0 || n.stop(), o = { producerId: a.id, pause: !0 }, u(this, Be)[Be].sendMessage(u(this, mt)[mt].toggleProducer, Hc.toBinary(o)), this.logger.info("Paused mic producer ".concat(a.id, " of local peer ").concat(this.peerId, ". Remote peers will stop hearing this peer."));
24437
+ a.pause(), (n = u(this, yt)[yt]) === null || n === void 0 || n.stop(), o = { producerId: a.id, pause: !0 }, u(this, Be)[Be].sendMessage(u(this, mt)[mt].toggleProducer, Hc.toBinary(o)), this.logger.info("Paused mic producer ".concat(a.id, " of local peer ").concat(this.peerId, ". Remote peers will stop hearing this peer."));
24436
24438
  case 4:
24437
24439
  return c.a(2);
24438
24440
  }
@@ -24449,7 +24451,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24449
24451
  for (; ; )
24450
24452
  switch (o.n) {
24451
24453
  case 0:
24452
- return o.n = 1, u(this, Ye)[Ye](bt.WEBCAM);
24454
+ return o.n = 1, u(this, Ye)[Ye](Pt.WEBCAM);
24453
24455
  case 1:
24454
24456
  if (n = o.v, i = u(this, B)[B].producers.get(n), i) {
24455
24457
  o.n = 2;
@@ -24474,7 +24476,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24474
24476
  for (; ; )
24475
24477
  switch (o.n) {
24476
24478
  case 0:
24477
- return o.n = 1, u(this, Ye)[Ye](bt.MIC);
24479
+ return o.n = 1, u(this, Ye)[Ye](Pt.MIC);
24478
24480
  case 1:
24479
24481
  if (n = o.v, i = u(this, B)[B].producers.get(n), i) {
24480
24482
  o.n = 2;
@@ -24505,7 +24507,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24505
24507
  for (; ; )
24506
24508
  switch (l.n) {
24507
24509
  case 0:
24508
- return n = c.length > 0 && c[0] !== void 0 ? c[0] : bt.WEBCAM, l.n = 1, u(this, Ye)[Ye](n);
24510
+ return n = c.length > 0 && c[0] !== void 0 ? c[0] : Pt.WEBCAM, l.n = 1, u(this, Ye)[Ye](n);
24509
24511
  case 1:
24510
24512
  if (i = l.v, a = u(this, B)[B].producers.get(i), a) {
24511
24513
  l.n = 2;
@@ -24536,7 +24538,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24536
24538
  for (; ; )
24537
24539
  switch (a.n) {
24538
24540
  case 0:
24539
- return n = bt.WEBCAM, a.n = 1, u(this, Ye)[Ye](n);
24541
+ return n = Pt.WEBCAM, a.n = 1, u(this, Ye)[Ye](n);
24540
24542
  case 1:
24541
24543
  if (i = a.v, u(this, Id)[Id](n), !i) {
24542
24544
  a.n = 2;
@@ -24559,7 +24561,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24559
24561
  for (; ; )
24560
24562
  switch (a.n) {
24561
24563
  case 0:
24562
- return a.n = 1, u(this, Ye)[Ye](bt.MIC);
24564
+ return a.n = 1, u(this, Ye)[Ye](Pt.MIC);
24563
24565
  case 1:
24564
24566
  if (i = a.v, !i) {
24565
24567
  a.n = 2;
@@ -24567,7 +24569,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24567
24569
  }
24568
24570
  return a.n = 2, u(this, B)[B].closeProducer(i);
24569
24571
  case 2:
24570
- (n = u(this, Ct)[Ct]) === null || n === void 0 || n.stop(), u(this, yt)[yt].delete(bt.MIC);
24572
+ (n = u(this, yt)[yt]) === null || n === void 0 || n.stop(), u(this, kt)[kt].delete(Pt.MIC);
24571
24573
  case 3:
24572
24574
  return a.a(2);
24573
24575
  }
@@ -24584,9 +24586,9 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24584
24586
  for (; ; )
24585
24587
  switch (a.n) {
24586
24588
  case 0:
24587
- return this.logger.info("screen_sharing_stopped"), this.context.getValue("callstats").screenShareStop(), a.n = 1, u(this, Ye)[Ye](bt.SCREENSHARE_VIDEO);
24589
+ return this.logger.info("screen_sharing_stopped"), this.context.getValue("callstats").screenShareStop(), a.n = 1, u(this, Ye)[Ye](Pt.SCREENSHARE_VIDEO);
24588
24590
  case 1:
24589
- return n = a.v, a.n = 2, u(this, Ye)[Ye](bt.SCREENSHARE_AUDIO);
24591
+ return n = a.v, a.n = 2, u(this, Ye)[Ye](Pt.SCREENSHARE_AUDIO);
24590
24592
  case 2:
24591
24593
  if (i = a.v, !n) {
24592
24594
  a.n = 3;
@@ -24600,7 +24602,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24600
24602
  }
24601
24603
  return a.n = 4, u(this, B)[B].closeProducer(i);
24602
24604
  case 4:
24603
- u(this, qr)[qr].clear(), u(this, yt)[yt].delete(bt.SCREENSHARE_VIDEO), u(this, yt)[yt].delete(bt.SCREENSHARE_AUDIO);
24605
+ u(this, qr)[qr].clear(), u(this, kt)[kt].delete(Pt.SCREENSHARE_VIDEO), u(this, kt)[kt].delete(Pt.SCREENSHARE_AUDIO);
24604
24606
  case 5:
24605
24607
  return a.a(2);
24606
24608
  }
@@ -24637,7 +24639,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24637
24639
  c.n = 3;
24638
24640
  break;
24639
24641
  }
24640
- return c.n = 1, u(this, Ye)[Ye](bt.WEBCAM);
24642
+ return c.n = 1, u(this, Ye)[Ye](Pt.WEBCAM);
24641
24643
  case 1:
24642
24644
  return a = c.v, c.n = 2, u(this, B)[B].closeProducer(a, { stopTrack: !1 });
24643
24645
  case 2:
@@ -24647,7 +24649,7 @@ var GO = Object.defineProperty, JO = Object.getOwnPropertyDescriptor, nt = funct
24647
24649
  c.n = 6;
24648
24650
  break;
24649
24651
  }
24650
- return c.n = 4, u(this, Ye)[Ye](bt.SCREENSHARE_VIDEO);
24652
+ return c.n = 4, u(this, Ye)[Ye](Pt.SCREENSHARE_VIDEO);
24651
24653
  case 4:
24652
24654
  return o = c.v, c.n = 5, u(this, B)[B].closeProducer(o, { stopTrack: !1 });
24653
24655
  case 5:
@@ -25017,7 +25019,7 @@ function XO(s) {
25017
25019
  var r = this;
25018
25020
  navigator.product !== "ReactNative" && setTimeout(function() {
25019
25021
  try {
25020
- var e = r.context.getValue("userId"), t = { userId: e, peerId: r.peerId, roomUUID: s, roomViewType: "groupCall", deviceInfo: V(V({}, Tt.getDeviceInfo()), {}, { userAgent: navigator.userAgent, memory: navigator.deviceMemory, cpus: navigator.hardwareConcurrency }), sdkName: r.context.getValue("sdkName"), sdkVersion: r.context.getValue("sdkVersion"), metaData: {}, permissions: {} };
25022
+ var e = r.context.getValue("userId"), t = { userId: e, peerId: r.peerId, roomUUID: s, roomViewType: "groupCall", deviceInfo: V(V({}, wt.getDeviceInfo()), {}, { userAgent: navigator.userAgent, memory: navigator.deviceMemory, cpus: navigator.hardwareConcurrency }), sdkName: r.context.getValue("sdkName"), sdkVersion: r.context.getValue("sdkVersion"), metaData: {}, permissions: {} };
25021
25023
  r.context.getValue("callstats").roomJoined(t);
25022
25024
  } catch (n) {
25023
25025
  r.logger.error("Error reporting room joined analytics", { error: n });
@@ -25106,13 +25108,13 @@ function Vh() {
25106
25108
  })), Vh.apply(this, arguments);
25107
25109
  }
25108
25110
  function tD(s) {
25109
- return u(this, yt)[yt].get(s);
25111
+ return u(this, kt)[kt].get(s);
25110
25112
  }
25111
25113
  function rD(s, r) {
25112
- return u(this, yt)[yt].set(s, r);
25114
+ return u(this, kt)[kt].set(s, r);
25113
25115
  }
25114
25116
  function nD(s) {
25115
- return u(this, yt)[yt].delete(s);
25117
+ return u(this, kt)[kt].delete(s);
25116
25118
  }
25117
25119
  function iD(s) {
25118
25120
  var r, e = s.participantId, t = s.producerState;
@@ -25698,7 +25700,7 @@ var uD = Object.defineProperty, cD = Object.getOwnPropertyDescriptor, to = funct
25698
25700
  return N.kind === "videoinput";
25699
25701
  })), n.getValue("callstats").devices("SPEAKER", k == null ? void 0 : k.filter(function(N) {
25700
25702
  return N.kind === "audiooutput";
25701
- })), v.info("Callstats:: initializing"), J.p = 2, b = n.getValue("callstats"), T = n.getValue("peerId"), E = Tt.getDeviceInfo().engineName, I = n.getValue("env") === "prod" ? "prod" : "devel", J.n = 3, l.getICEServers();
25703
+ })), v.info("Callstats:: initializing"), J.p = 2, b = n.getValue("callstats"), T = n.getValue("peerId"), E = wt.getDeviceInfo().engineName, I = n.getValue("env") === "prod" ? "prod" : "devel", J.n = 3, l.getICEServers();
25702
25704
  case 3:
25703
25705
  return M = J.v, _ = n.getValue("apiBase"), O = {}, L = v, q = AP(n), X = f, Y = n.getValue("authToken"), J.n = 4, b.initialize.call(b, { peerId: T, engineName: E, env: I, iceServers: M, apiBase: _, flags: O, logger: L, apiHostnames: q, skipConnectivityChecks: X, authToken: Y });
25704
25706
  case 4:
@@ -27959,7 +27961,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
27959
27961
  for (; ; )
27960
27962
  switch (N.p = N.n) {
27961
27963
  case 0:
27962
- 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, oD(n), Tt.isSupported() !== !1) {
27964
+ 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, oD(n), wt.isSupported() !== !1) {
27963
27965
  N.n = 1;
27964
27966
  break;
27965
27967
  }
@@ -28036,12 +28038,12 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28036
28038
  return e;
28037
28039
  }() }, { key: "setupControllers", value: function() {
28038
28040
  var r = m(/* @__PURE__ */ h().m(function t(n, i, a, o, c, l) {
28039
- var d, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, Pt, ht, re;
28041
+ var d, p, v, f, g, y, k, b, T, E, I, M, _, O, L, q, X, Y, H, J, N, U, x, le, Re, pe, Le, Q, Lt, St, ht, re;
28040
28042
  return h().w(function(K) {
28041
28043
  for (; ; )
28042
28044
  switch (K.n) {
28043
28045
  case 0:
28044
- return f = i.getValue("modules"), g = a.participant, y = i.getValue("defaults"), k = i.getValue("logger"), b = c.viewType, T = c.mediaConstraints.audio, i.setValue("viewType", b), 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 } } }, y)), i.setValue("maxPreferredStreams", Tt.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), H = new hD(i, n), J = new s2(n), i.setValue("connectedMeetingsSocketHandler", J), N = new Gl(i, n), U = new Qi(i, n), x = new yD(n), le = new rm(i, n), Re = new kD(i, n), pe = new dD(n), K.n = 1, Na.init(i, le, g, l, c);
28046
+ return f = i.getValue("modules"), g = a.participant, y = i.getValue("defaults"), k = i.getValue("logger"), b = c.viewType, T = c.mediaConstraints.audio, i.setValue("viewType", b), 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 } } }, y)), i.setValue("maxPreferredStreams", wt.isMobile() ? c.maxVideoStreams.mobile : c.maxVideoStreams.desktop), H = new hD(i, n), J = new s2(n), i.setValue("connectedMeetingsSocketHandler", J), N = new Gl(i, n), U = new Qi(i, n), x = new yD(n), le = new rm(i, n), Re = new kD(i, n), pe = new dD(n), K.n = 1, Na.init(i, le, g, l, c);
28045
28047
  case 1:
28046
28048
  return Le = K.v, i.setValue("selfController", Le), K.n = 2, Fg.init(i, Le.self, le, H, o);
28047
28049
  case 2:
@@ -28079,7 +28081,7 @@ var h2 = Object.defineProperty, p2 = Object.getOwnPropertyDescriptor, Ep = funct
28079
28081
  }
28080
28082
  throw new j("The plugin module cannot be initialized without the `participant` module", "0102");
28081
28083
  case 9:
28082
- return Pt = y.plugins || [], K.n = 10, Wg.init(i, Pt, Le.self, Lt);
28084
+ return St = y.plugins || [], K.n = 10, Wg.init(i, St, Le.self, Lt);
28083
28085
  case 10:
28084
28086
  _ = K.v;
28085
28087
  case 11:
@@ -28423,7 +28425,7 @@ var gr = /* @__PURE__ */ w("trackMap"), m2 = /* @__PURE__ */ function(s) {
28423
28425
  for (; ; )
28424
28426
  switch (_.n) {
28425
28427
  case 0:
28426
- if (Tt.init(), p = (i = n == null || (a = n.cachedUserDetails) === null || a === void 0 ? void 0 : a.peerId) !== null && i !== void 0 ? i : Js(), v = n.authToken, f = n.baseURI, g = ND(v, f), y = g.meetingId, k = Gh(g, Pm), !((o = k.baseURI) !== null && o !== void 0 && o.includes("dyte.io"))) {
28428
+ if (wt.init(), p = (i = n == null || (a = n.cachedUserDetails) === null || a === void 0 ? void 0 : a.peerId) !== null && i !== void 0 ? i : Js(), v = n.authToken, f = n.baseURI, g = ND(v, f), y = g.meetingId, k = Gh(g, Pm), !((o = k.baseURI) !== null && o !== void 0 && o.includes("dyte.io"))) {
28427
28429
  _.n = 1;
28428
28430
  break;
28429
28431
  }
@@ -28450,7 +28452,7 @@ var gr = /* @__PURE__ */ w("trackMap"), m2 = /* @__PURE__ */ function(s) {
28450
28452
  }, { key: "setupContext", value: function(e, t, n, i) {
28451
28453
  var a, o, c = Aa.createContext(e, t), l = V(V({}, RP), t == null ? void 0 : t.modules), d = t.defaults || { audio: !0, video: !0 };
28452
28454
  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", _P({ baseURI: i.baseURI })), c.setValue("defaults", d), c.setValue("onError", t.onError || function() {
28453
- }), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.3"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new m2()), c;
28455
+ }), c.setValue("cachedUserDetails", di(t.cachedUserDetails)), c.setValue("sdkVersion", "2.0.4-staging.2"), (o = t.modules) !== null && o !== void 0 && o.experimentalAudioPlayback && c.setValue("audioPlayback", new m2()), c;
28454
28456
  } }]);
28455
28457
  }());
28456
28458
  Yl([dr("0002"), Xi.executeWithLock({ methodName: "meeting.join", lockName: "Client.join", timeout: 3e3 })], Ma.prototype, "join", 1);