liveroom-client-element 0.0.33 → 0.0.34

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.
@@ -27,7 +27,7 @@ function Oe(i, e) {
27
27
  function Jo(i, e, t) {
28
28
  const n = jo(i);
29
29
  if (!n.getElementById(e)) {
30
- const s = Xe("style");
30
+ const s = Ye("style");
31
31
  s.id = e, s.textContent = t, Vo(n, s);
32
32
  }
33
33
  }
@@ -54,7 +54,7 @@ function Ln(i, e, t) {
54
54
  function an(i) {
55
55
  i.parentNode && i.parentNode.removeChild(i);
56
56
  }
57
- function Xe(i) {
57
+ function Ye(i) {
58
58
  return document.createElement(i);
59
59
  }
60
60
  function $s(i) {
@@ -172,20 +172,20 @@ function ec(i, e, t, n, s, r, a, o, c, u, d, h) {
172
172
  let x = a.get(K);
173
173
  x ? n && Q.push(() => x.p(q, e)) : (x = u(K, q), x.c()), I.set(K, w[b] = x), K in T && D.set(K, Math.abs(b - T[K]));
174
174
  }
175
- const j = /* @__PURE__ */ new Set(), de = /* @__PURE__ */ new Set();
176
- function ce(q) {
175
+ const j = /* @__PURE__ */ new Set(), ce = /* @__PURE__ */ new Set();
176
+ function ae(q) {
177
177
  Wr(q, 1), q.m(o, d), a.set(q.key, q), d = q.first, m--;
178
178
  }
179
179
  for (; f && m; ) {
180
180
  const q = w[m - 1], K = i[f - 1], x = q.key, F = K.key;
181
- q === K ? (d = q.first, f--, m--) : I.has(F) ? !a.has(x) || j.has(x) ? ce(q) : de.has(F) ? f-- : D.get(x) > D.get(F) ? (de.add(x), ce(q)) : (j.add(F), f--) : (c(K, a), f--);
181
+ q === K ? (d = q.first, f--, m--) : I.has(F) ? !a.has(x) || j.has(x) ? ae(q) : ce.has(F) ? f-- : D.get(x) > D.get(F) ? (ce.add(x), ae(q)) : (j.add(F), f--) : (c(K, a), f--);
182
182
  }
183
183
  for (; f--; ) {
184
184
  const q = i[f];
185
185
  I.has(q.key) || c(q, a);
186
186
  }
187
187
  for (; m; )
188
- ce(w[m - 1]);
188
+ ae(w[m - 1]);
189
189
  return rn(Q), w;
190
190
  }
191
191
  function tc(i, e, t) {
@@ -285,7 +285,7 @@ typeof HTMLElement == "function" && (Gr = class extends HTMLElement {
285
285
  let a;
286
286
  return {
287
287
  c: function() {
288
- a = Xe("slot"), r !== "default" && z(a, "name", r);
288
+ a = Ye("slot"), r !== "default" && z(a, "name", r);
289
289
  },
290
290
  /**
291
291
  * @param {HTMLElement} target
@@ -710,7 +710,7 @@ class Sc extends Me {
710
710
  t.encodeArrayHeader(3), t.writer.u8(3), t.encodeArray(this.path), t.encodeArray(this.from);
711
711
  }
712
712
  }
713
- class we extends Me {
713
+ class Ce extends Me {
714
714
  apply(e) {
715
715
  if (!this.test(e))
716
716
  throw new Error("TEST");
@@ -743,7 +743,7 @@ const Pn = (i, e) => {
743
743
  }
744
744
  return !1;
745
745
  };
746
- class Cc extends we {
746
+ class Cc extends Ce {
747
747
  constructor(t, n, s) {
748
748
  super(t);
749
749
  L(this, "value");
@@ -1098,7 +1098,7 @@ class Lc extends Me {
1098
1098
  t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(12), t.encodeArray(this.path), t.encodeObject(this.props), s && t.writer.u8(1);
1099
1099
  }
1100
1100
  }
1101
- class Nc extends we {
1101
+ class Nc extends Ce {
1102
1102
  constructor(e) {
1103
1103
  super(e);
1104
1104
  }
@@ -1125,7 +1125,7 @@ class Nc extends we {
1125
1125
  e.encodeArrayHeader(2), e.writer.u8(31), e.encodeArray(t ? this.path.slice(t.path.length) : this.path);
1126
1126
  }
1127
1127
  }
1128
- class Dc extends we {
1128
+ class Dc extends Ce {
1129
1129
  constructor(e) {
1130
1130
  super(e);
1131
1131
  }
@@ -1159,7 +1159,7 @@ class Dc extends we {
1159
1159
  }
1160
1160
  }
1161
1161
  const { isArray: Mc } = Array;
1162
- class Uc extends we {
1162
+ class Uc extends Ce {
1163
1163
  constructor(t, n) {
1164
1164
  super(t);
1165
1165
  L(this, "type");
@@ -1189,7 +1189,7 @@ class Uc extends we {
1189
1189
  t.encodeArrayHeader(3), t.writer.u8(39), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeArray(this.type);
1190
1190
  }
1191
1191
  }
1192
- class Fc extends we {
1192
+ class Fc extends Ce {
1193
1193
  constructor(t, n, s, r) {
1194
1194
  super(t);
1195
1195
  L(this, "pos");
@@ -1227,7 +1227,7 @@ class Fc extends we {
1227
1227
  t.encodeArrayHeader(this.not ? 5 : 4), t.writer.u8(40), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeNumber(this.pos), t.encodeString(this.str), this.not && t.writer.u8(1);
1228
1228
  }
1229
1229
  }
1230
- class Bc extends we {
1230
+ class Bc extends Ce {
1231
1231
  constructor(t, n, s) {
1232
1232
  super(t);
1233
1233
  L(this, "len");
@@ -1263,7 +1263,7 @@ class Bc extends we {
1263
1263
  t.encodeArrayHeader(this.not ? 4 : 3), t.writer.u8(41), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeNumber(this.len), this.not && t.writer.u8(1);
1264
1264
  }
1265
1265
  }
1266
- class Jc extends we {
1266
+ class Jc extends Ce {
1267
1267
  constructor(t, n, s) {
1268
1268
  super(t);
1269
1269
  L(this, "value");
@@ -1300,7 +1300,7 @@ class Jc extends we {
1300
1300
  t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(30), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeString(this.value), s && t.writer.u8(1);
1301
1301
  }
1302
1302
  }
1303
- class jc extends we {
1303
+ class jc extends Ce {
1304
1304
  constructor(t, n, s) {
1305
1305
  super(t);
1306
1306
  L(this, "value");
@@ -1337,7 +1337,7 @@ class jc extends we {
1337
1337
  t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(32), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeString(this.value), s && t.writer.u8(1);
1338
1338
  }
1339
1339
  }
1340
- class Vc extends we {
1340
+ class Vc extends Ce {
1341
1341
  constructor(t, n, s) {
1342
1342
  super(t);
1343
1343
  L(this, "value");
@@ -1374,7 +1374,7 @@ class Vc extends we {
1374
1374
  t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(37), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeString(this.value), s && t.writer.u8(1);
1375
1375
  }
1376
1376
  }
1377
- class $c extends we {
1377
+ class $c extends Ce {
1378
1378
  constructor(t, n) {
1379
1379
  super(t);
1380
1380
  L(this, "value");
@@ -1407,7 +1407,7 @@ class $c extends we {
1407
1407
  t.encodeArrayHeader(3), t.writer.u8(33), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeArray(this.value);
1408
1408
  }
1409
1409
  }
1410
- class qc extends we {
1410
+ class qc extends Ce {
1411
1411
  constructor(t, n) {
1412
1412
  super(t);
1413
1413
  L(this, "value");
@@ -1437,7 +1437,7 @@ class qc extends we {
1437
1437
  t.encodeArrayHeader(3), t.writer.u8(34), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeNumber(this.value);
1438
1438
  }
1439
1439
  }
1440
- class Hc extends we {
1440
+ class Hc extends Ce {
1441
1441
  constructor(t, n) {
1442
1442
  super(t);
1443
1443
  L(this, "value");
@@ -1467,7 +1467,7 @@ class Hc extends we {
1467
1467
  t.encodeArrayHeader(3), t.writer.u8(36), t.encodeArray(n ? this.path.slice(n.path.length) : this.path), t.encodeNumber(this.value);
1468
1468
  }
1469
1469
  }
1470
- class Is extends we {
1470
+ class Is extends Ce {
1471
1471
  constructor(t, n) {
1472
1472
  super(t);
1473
1473
  L(this, "ops");
@@ -1595,7 +1595,7 @@ class zc extends Is {
1595
1595
  this.ops[r].encode(t, this);
1596
1596
  }
1597
1597
  }
1598
- class Kc extends we {
1598
+ class Kc extends Ce {
1599
1599
  constructor(t, n, s, r) {
1600
1600
  super(t);
1601
1601
  L(this, "value");
@@ -1631,7 +1631,7 @@ class Kc extends we {
1631
1631
  }
1632
1632
  }
1633
1633
  const { isArray: Yc } = Array;
1634
- class Xc extends we {
1634
+ class Xc extends Ce {
1635
1635
  constructor(t, n) {
1636
1636
  super(t);
1637
1637
  L(this, "value");
@@ -1747,7 +1747,7 @@ function Zc(i, e, t) {
1747
1747
  }
1748
1748
  var Vi = (i) => typeof i == "function" ? i : function() {
1749
1749
  return i;
1750
- }, eu = typeof self < "u" ? self : null, Fi = typeof window < "u" ? window : null, $i = eu || Fi || $i, tu = "2.0.0", Qe = { connecting: 0, open: 1, closing: 2, closed: 3 }, iu = 1e4, nu = 1e3, Ae = {
1750
+ }, eu = typeof self < "u" ? self : null, Fi = typeof window < "u" ? window : null, $i = eu || Fi || $i, tu = "2.0.0", Xe = { connecting: 0, open: 1, closing: 2, closed: 3 }, iu = 1e4, nu = 1e3, Ae = {
1751
1751
  closed: "closed",
1752
1752
  errored: "errored",
1753
1753
  joined: "joined",
@@ -1972,7 +1972,7 @@ var Vi = (i) => typeof i == "function" ? i : function() {
1972
1972
  }, this.onerror = function() {
1973
1973
  }, this.onmessage = function() {
1974
1974
  }, this.onclose = function() {
1975
- }, this.pollEndpoint = this.normalizeEndpoint(i), this.readyState = Qe.connecting, this.poll();
1975
+ }, this.pollEndpoint = this.normalizeEndpoint(i), this.readyState = Xe.connecting, this.poll();
1976
1976
  }
1977
1977
  normalizeEndpoint(i) {
1978
1978
  return i.replace("ws://", "http://").replace("wss://", "https://").replace(new RegExp("(.*)/" + as.websocket), "$1/" + as.longpoll);
@@ -1981,13 +1981,13 @@ var Vi = (i) => typeof i == "function" ? i : function() {
1981
1981
  return Rn.appendParams(this.pollEndpoint, { token: this.token });
1982
1982
  }
1983
1983
  closeAndRetry(i, e, t) {
1984
- this.close(i, e, t), this.readyState = Qe.connecting;
1984
+ this.close(i, e, t), this.readyState = Xe.connecting;
1985
1985
  }
1986
1986
  ontimeout() {
1987
1987
  this.onerror("timeout"), this.closeAndRetry(1005, "timeout", !1);
1988
1988
  }
1989
1989
  isActive() {
1990
- return this.readyState === Qe.open || this.readyState === Qe.connecting;
1990
+ return this.readyState === Xe.open || this.readyState === Xe.connecting;
1991
1991
  }
1992
1992
  poll() {
1993
1993
  this.ajax("GET", null, () => this.ontimeout(), (i) => {
@@ -2006,7 +2006,7 @@ var Vi = (i) => typeof i == "function" ? i : function() {
2006
2006
  this.poll();
2007
2007
  break;
2008
2008
  case 410:
2009
- this.readyState = Qe.open, this.onopen({}), this.poll();
2009
+ this.readyState = Xe.open, this.onopen({}), this.poll();
2010
2010
  break;
2011
2011
  case 403:
2012
2012
  this.onerror(403), this.close(1008, "forbidden", !1);
@@ -2028,7 +2028,7 @@ var Vi = (i) => typeof i == "function" ? i : function() {
2028
2028
  close(i, e, t) {
2029
2029
  for (let s of this.reqs)
2030
2030
  s.abort();
2031
- this.readyState = Qe.closed;
2031
+ this.readyState = Xe.closed;
2032
2032
  let n = Object.assign({ code: 1e3, reason: void 0, wasClean: !0 }, { code: i, reason: e, wasClean: t });
2033
2033
  typeof CloseEvent < "u" ? this.onclose(new CloseEvent("close", n)) : this.onclose(n);
2034
2034
  }
@@ -2205,7 +2205,7 @@ var Vi = (i) => typeof i == "function" ? i : function() {
2205
2205
  }, 150 * e);
2206
2206
  }
2207
2207
  waitForSocketClosed(i, e = 1) {
2208
- if (e === 5 || !this.conn || this.conn.readyState === Qe.closed) {
2208
+ if (e === 5 || !this.conn || this.conn.readyState === Xe.closed) {
2209
2209
  i();
2210
2210
  return;
2211
2211
  }
@@ -2231,11 +2231,11 @@ var Vi = (i) => typeof i == "function" ? i : function() {
2231
2231
  }
2232
2232
  connectionState() {
2233
2233
  switch (this.conn && this.conn.readyState) {
2234
- case Qe.connecting:
2234
+ case Xe.connecting:
2235
2235
  return "connecting";
2236
- case Qe.open:
2236
+ case Xe.open:
2237
2237
  return "open";
2238
- case Qe.closing:
2238
+ case Xe.closing:
2239
2239
  return "closing";
2240
2240
  default:
2241
2241
  return "closed";
@@ -2424,7 +2424,7 @@ var Gs;
2424
2424
  }
2425
2425
  }, d = Object.getPrototypeOf(Function), h = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", f = !h && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : Lo(), m = !h && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : No(), b = !h && typeof WeakMap == "function" ? WeakMap : Do(), T = new b();
2426
2426
  function w(v, y, S, E) {
2427
- if (ie(S)) {
2427
+ if (te(S)) {
2428
2428
  if (!Fs(v))
2429
2429
  throw new TypeError();
2430
2430
  if (!Bs(y))
@@ -2433,78 +2433,78 @@ var Gs;
2433
2433
  } else {
2434
2434
  if (!Fs(v))
2435
2435
  throw new TypeError();
2436
- if (!oe(y))
2436
+ if (!re(y))
2437
2437
  throw new TypeError();
2438
- if (!oe(E) && !ie(E) && !vt(E))
2438
+ if (!re(E) && !te(E) && !vt(E))
2439
2439
  throw new TypeError();
2440
- return vt(E) && (E = void 0), S = yt(S), fe(v, y, S, E);
2440
+ return vt(E) && (E = void 0), S = yt(S), le(v, y, S, E);
2441
2441
  }
2442
2442
  }
2443
2443
  e("decorate", w);
2444
2444
  function I(v, y) {
2445
2445
  function S(E, N) {
2446
- if (!oe(E))
2446
+ if (!re(E))
2447
2447
  throw new TypeError();
2448
- if (!ie(N) && !_o(N))
2448
+ if (!te(N) && !_o(N))
2449
2449
  throw new TypeError();
2450
- te(v, y, E, N);
2450
+ fe(v, y, E, N);
2451
2451
  }
2452
2452
  return S;
2453
2453
  }
2454
2454
  e("metadata", I);
2455
2455
  function D(v, y, S, E) {
2456
- if (!oe(S))
2456
+ if (!re(S))
2457
2457
  throw new TypeError();
2458
- return ie(E) || (E = yt(E)), te(v, y, S, E);
2458
+ return te(E) || (E = yt(E)), fe(v, y, S, E);
2459
2459
  }
2460
2460
  e("defineMetadata", D);
2461
2461
  function Q(v, y, S) {
2462
- if (!oe(y))
2462
+ if (!re(y))
2463
2463
  throw new TypeError();
2464
- return ie(S) || (S = yt(S)), xi(v, y, S);
2464
+ return te(S) || (S = yt(S)), xi(v, y, S);
2465
2465
  }
2466
2466
  e("hasMetadata", Q);
2467
2467
  function j(v, y, S) {
2468
- if (!oe(y))
2468
+ if (!re(y))
2469
2469
  throw new TypeError();
2470
- return ie(S) || (S = yt(S)), Ai(v, y, S);
2470
+ return te(S) || (S = yt(S)), Ai(v, y, S);
2471
2471
  }
2472
2472
  e("hasOwnMetadata", j);
2473
- function de(v, y, S) {
2474
- if (!oe(y))
2473
+ function ce(v, y, S) {
2474
+ if (!re(y))
2475
2475
  throw new TypeError();
2476
- return ie(S) || (S = yt(S)), M(v, y, S);
2476
+ return te(S) || (S = yt(S)), U(v, y, S);
2477
2477
  }
2478
- e("getMetadata", de);
2479
- function ce(v, y, S) {
2480
- if (!oe(y))
2478
+ e("getMetadata", ce);
2479
+ function ae(v, y, S) {
2480
+ if (!re(y))
2481
2481
  throw new TypeError();
2482
- return ie(S) || (S = yt(S)), ae(v, y, S);
2482
+ return te(S) || (S = yt(S)), he(v, y, S);
2483
2483
  }
2484
- e("getOwnMetadata", ce);
2484
+ e("getOwnMetadata", ae);
2485
2485
  function q(v, y) {
2486
- if (!oe(v))
2486
+ if (!re(v))
2487
2487
  throw new TypeError();
2488
- return ie(y) || (y = yt(y)), pe(v, y);
2488
+ return te(y) || (y = yt(y)), Ie(v, y);
2489
2489
  }
2490
2490
  e("getMetadataKeys", q);
2491
2491
  function K(v, y) {
2492
- if (!oe(v))
2492
+ if (!re(v))
2493
2493
  throw new TypeError();
2494
- return ie(y) || (y = yt(y)), Ee(v, y);
2494
+ return te(y) || (y = yt(y)), xe(v, y);
2495
2495
  }
2496
2496
  e("getOwnMetadataKeys", K);
2497
2497
  function x(v, y, S) {
2498
- if (!oe(y))
2498
+ if (!re(y))
2499
2499
  throw new TypeError();
2500
- ie(S) || (S = yt(S));
2500
+ te(S) || (S = yt(S));
2501
2501
  var E = Ue(
2502
2502
  y,
2503
2503
  S,
2504
2504
  /*Create*/
2505
2505
  !1
2506
2506
  );
2507
- if (ie(E) || !E.delete(v))
2507
+ if (te(E) || !E.delete(v))
2508
2508
  return !1;
2509
2509
  if (E.size > 0)
2510
2510
  return !0;
@@ -2515,7 +2515,7 @@ var Gs;
2515
2515
  function F(v, y) {
2516
2516
  for (var S = v.length - 1; S >= 0; --S) {
2517
2517
  var E = v[S], N = E(y);
2518
- if (!ie(N) && !vt(N)) {
2518
+ if (!te(N) && !vt(N)) {
2519
2519
  if (!Bs(N))
2520
2520
  throw new TypeError();
2521
2521
  y = N;
@@ -2523,11 +2523,11 @@ var Gs;
2523
2523
  }
2524
2524
  return y;
2525
2525
  }
2526
- function fe(v, y, S, E) {
2526
+ function le(v, y, S, E) {
2527
2527
  for (var N = v.length - 1; N >= 0; --N) {
2528
- var le = v[N], B = le(y, S, E);
2529
- if (!ie(B) && !vt(B)) {
2530
- if (!oe(B))
2528
+ var ue = v[N], B = ue(y, S, E);
2529
+ if (!te(B) && !vt(B)) {
2530
+ if (!re(B))
2531
2531
  throw new TypeError();
2532
2532
  E = B;
2533
2533
  }
@@ -2536,13 +2536,13 @@ var Gs;
2536
2536
  }
2537
2537
  function Ue(v, y, S) {
2538
2538
  var E = T.get(v);
2539
- if (ie(E)) {
2539
+ if (te(E)) {
2540
2540
  if (!S)
2541
2541
  return;
2542
2542
  E = new f(), T.set(v, E);
2543
2543
  }
2544
2544
  var N = E.get(y);
2545
- if (ie(N)) {
2545
+ if (te(N)) {
2546
2546
  if (!S)
2547
2547
  return;
2548
2548
  N = new f(), E.set(y, N);
@@ -2563,27 +2563,27 @@ var Gs;
2563
2563
  /*Create*/
2564
2564
  !1
2565
2565
  );
2566
- return ie(E) ? !1 : Po(E.has(v));
2566
+ return te(E) ? !1 : Po(E.has(v));
2567
2567
  }
2568
- function M(v, y, S) {
2568
+ function U(v, y, S) {
2569
2569
  var E = Ai(v, y, S);
2570
2570
  if (E)
2571
- return ae(v, y, S);
2571
+ return he(v, y, S);
2572
2572
  var N = Jn(y);
2573
2573
  if (!vt(N))
2574
- return M(v, N, S);
2574
+ return U(v, N, S);
2575
2575
  }
2576
- function ae(v, y, S) {
2576
+ function he(v, y, S) {
2577
2577
  var E = Ue(
2578
2578
  y,
2579
2579
  S,
2580
2580
  /*Create*/
2581
2581
  !1
2582
2582
  );
2583
- if (!ie(E))
2583
+ if (!te(E))
2584
2584
  return E.get(v);
2585
2585
  }
2586
- function te(v, y, S, E) {
2586
+ function fe(v, y, S, E) {
2587
2587
  var N = Ue(
2588
2588
  S,
2589
2589
  E,
@@ -2592,44 +2592,44 @@ var Gs;
2592
2592
  );
2593
2593
  N.set(v, y);
2594
2594
  }
2595
- function pe(v, y) {
2596
- var S = Ee(v, y), E = Jn(v);
2595
+ function Ie(v, y) {
2596
+ var S = xe(v, y), E = Jn(v);
2597
2597
  if (E === null)
2598
2598
  return S;
2599
- var N = pe(E, y);
2599
+ var N = Ie(E, y);
2600
2600
  if (N.length <= 0)
2601
2601
  return S;
2602
2602
  if (S.length <= 0)
2603
2603
  return N;
2604
- for (var le = new m(), B = [], J = 0, U = S; J < U.length; J++) {
2605
- var H = U[J], W = le.has(H);
2606
- W || (le.add(H), B.push(H));
2604
+ for (var ue = new m(), B = [], J = 0, M = S; J < M.length; J++) {
2605
+ var H = M[J], W = ue.has(H);
2606
+ W || (ue.add(H), B.push(H));
2607
2607
  }
2608
2608
  for (var zt = 0, js = N; zt < js.length; zt++) {
2609
- var H = js[zt], W = le.has(H);
2610
- W || (le.add(H), B.push(H));
2609
+ var H = js[zt], W = ue.has(H);
2610
+ W || (ue.add(H), B.push(H));
2611
2611
  }
2612
2612
  return B;
2613
2613
  }
2614
- function Ee(v, y) {
2614
+ function xe(v, y) {
2615
2615
  var S = [], E = Ue(
2616
2616
  v,
2617
2617
  y,
2618
2618
  /*Create*/
2619
2619
  !1
2620
2620
  );
2621
- if (ie(E))
2621
+ if (te(E))
2622
2622
  return S;
2623
- for (var N = E.keys(), le = Io(N), B = 0; ; ) {
2624
- var J = Ao(le);
2623
+ for (var N = E.keys(), ue = Io(N), B = 0; ; ) {
2624
+ var J = Ao(ue);
2625
2625
  if (!J)
2626
2626
  return S.length = B, S;
2627
- var U = xo(J);
2627
+ var M = xo(J);
2628
2628
  try {
2629
- S[B] = U;
2629
+ S[B] = M;
2630
2630
  } catch (H) {
2631
2631
  try {
2632
- Oo(le);
2632
+ Oo(ue);
2633
2633
  } finally {
2634
2634
  throw H;
2635
2635
  }
@@ -2637,7 +2637,7 @@ var Gs;
2637
2637
  B++;
2638
2638
  }
2639
2639
  }
2640
- function Fe(v) {
2640
+ function gt(v) {
2641
2641
  if (v === null)
2642
2642
  return 1;
2643
2643
  switch (typeof v) {
@@ -2657,7 +2657,7 @@ var Gs;
2657
2657
  return 6;
2658
2658
  }
2659
2659
  }
2660
- function ie(v) {
2660
+ function te(v) {
2661
2661
  return v === void 0;
2662
2662
  }
2663
2663
  function vt(v) {
@@ -2666,11 +2666,11 @@ var Gs;
2666
2666
  function di(v) {
2667
2667
  return typeof v == "symbol";
2668
2668
  }
2669
- function oe(v) {
2669
+ function re(v) {
2670
2670
  return typeof v == "object" ? v !== null : typeof v == "function";
2671
2671
  }
2672
2672
  function wo(v, y) {
2673
- switch (Fe(v)) {
2673
+ switch (gt(v)) {
2674
2674
  case 0:
2675
2675
  return v;
2676
2676
  case 1:
@@ -2687,7 +2687,7 @@ var Gs;
2687
2687
  var S = y === 3 ? "string" : y === 5 ? "number" : "default", E = Js(v, s);
2688
2688
  if (E !== void 0) {
2689
2689
  var N = E.call(v, S);
2690
- if (oe(N))
2690
+ if (re(N))
2691
2691
  throw new TypeError();
2692
2692
  return N;
2693
2693
  }
@@ -2698,26 +2698,26 @@ var Gs;
2698
2698
  var S = v.toString;
2699
2699
  if (li(S)) {
2700
2700
  var E = S.call(v);
2701
- if (!oe(E))
2701
+ if (!re(E))
2702
2702
  return E;
2703
2703
  }
2704
2704
  var N = v.valueOf;
2705
2705
  if (li(N)) {
2706
2706
  var E = N.call(v);
2707
- if (!oe(E))
2707
+ if (!re(E))
2708
2708
  return E;
2709
2709
  }
2710
2710
  } else {
2711
2711
  var N = v.valueOf;
2712
2712
  if (li(N)) {
2713
2713
  var E = N.call(v);
2714
- if (!oe(E))
2714
+ if (!re(E))
2715
2715
  return E;
2716
2716
  }
2717
- var le = v.toString;
2718
- if (li(le)) {
2719
- var E = le.call(v);
2720
- if (!oe(E))
2717
+ var ue = v.toString;
2718
+ if (li(ue)) {
2719
+ var E = ue.call(v);
2720
+ if (!re(E))
2721
2721
  return E;
2722
2722
  }
2723
2723
  }
@@ -2747,7 +2747,7 @@ var Gs;
2747
2747
  return typeof v == "function";
2748
2748
  }
2749
2749
  function _o(v) {
2750
- switch (Fe(v)) {
2750
+ switch (gt(v)) {
2751
2751
  case 3:
2752
2752
  return !0;
2753
2753
  case 4:
@@ -2769,7 +2769,7 @@ var Gs;
2769
2769
  if (!li(y))
2770
2770
  throw new TypeError();
2771
2771
  var S = y.call(v);
2772
- if (!oe(S))
2772
+ if (!re(S))
2773
2773
  throw new TypeError();
2774
2774
  return S;
2775
2775
  }
@@ -2798,8 +2798,8 @@ var Gs;
2798
2798
  var v = {}, y = [], S = (
2799
2799
  /** @class */
2800
2800
  function() {
2801
- function B(J, U, H) {
2802
- this._index = 0, this._keys = J, this._values = U, this._selector = H;
2801
+ function B(J, M, H) {
2802
+ this._index = 0, this._keys = J, this._values = M, this._selector = H;
2803
2803
  }
2804
2804
  return B.prototype["@@iterator"] = function() {
2805
2805
  return this;
@@ -2808,8 +2808,8 @@ var Gs;
2808
2808
  }, B.prototype.next = function() {
2809
2809
  var J = this._index;
2810
2810
  if (J >= 0 && J < this._keys.length) {
2811
- var U = this._selector(this._keys[J], this._values[J]);
2812
- return J + 1 >= this._keys.length ? (this._index = -1, this._keys = y, this._values = y) : this._index++, { value: U, done: !1 };
2811
+ var M = this._selector(this._keys[J], this._values[J]);
2812
+ return J + 1 >= this._keys.length ? (this._index = -1, this._keys = y, this._values = y) : this._index++, { value: M, done: !1 };
2813
2813
  }
2814
2814
  return { value: void 0, done: !0 };
2815
2815
  }, B.prototype.throw = function(J) {
@@ -2838,27 +2838,27 @@ var Gs;
2838
2838
  !1
2839
2839
  ) >= 0;
2840
2840
  }, B.prototype.get = function(J) {
2841
- var U = this._find(
2841
+ var M = this._find(
2842
2842
  J,
2843
2843
  /*insert*/
2844
2844
  !1
2845
2845
  );
2846
- return U >= 0 ? this._values[U] : void 0;
2847
- }, B.prototype.set = function(J, U) {
2846
+ return M >= 0 ? this._values[M] : void 0;
2847
+ }, B.prototype.set = function(J, M) {
2848
2848
  var H = this._find(
2849
2849
  J,
2850
2850
  /*insert*/
2851
2851
  !0
2852
2852
  );
2853
- return this._values[H] = U, this;
2853
+ return this._values[H] = M, this;
2854
2854
  }, B.prototype.delete = function(J) {
2855
- var U = this._find(
2855
+ var M = this._find(
2856
2856
  J,
2857
2857
  /*insert*/
2858
2858
  !1
2859
2859
  );
2860
- if (U >= 0) {
2861
- for (var H = this._keys.length, W = U + 1; W < H; W++)
2860
+ if (M >= 0) {
2861
+ for (var H = this._keys.length, W = M + 1; W < H; W++)
2862
2862
  this._keys[W - 1] = this._keys[W], this._values[W - 1] = this._values[W];
2863
2863
  return this._keys.length--, this._values.length--, J === this._cacheKey && (this._cacheKey = v, this._cacheIndex = -2), !0;
2864
2864
  }
@@ -2870,13 +2870,13 @@ var Gs;
2870
2870
  }, B.prototype.values = function() {
2871
2871
  return new S(this._keys, this._values, N);
2872
2872
  }, B.prototype.entries = function() {
2873
- return new S(this._keys, this._values, le);
2873
+ return new S(this._keys, this._values, ue);
2874
2874
  }, B.prototype["@@iterator"] = function() {
2875
2875
  return this.entries();
2876
2876
  }, B.prototype[r] = function() {
2877
2877
  return this.entries();
2878
- }, B.prototype._find = function(J, U) {
2879
- return this._cacheKey !== J && (this._cacheIndex = this._keys.indexOf(this._cacheKey = J)), this._cacheIndex < 0 && U && (this._cacheIndex = this._keys.length, this._keys.push(J), this._values.push(void 0)), this._cacheIndex;
2878
+ }, B.prototype._find = function(J, M) {
2879
+ return this._cacheKey !== J && (this._cacheIndex = this._keys.indexOf(this._cacheKey = J)), this._cacheIndex < 0 && M && (this._cacheIndex = this._keys.length, this._keys.push(J), this._values.push(void 0)), this._cacheIndex;
2880
2880
  }, B;
2881
2881
  }()
2882
2882
  );
@@ -2886,7 +2886,7 @@ var Gs;
2886
2886
  function N(B, J) {
2887
2887
  return J;
2888
2888
  }
2889
- function le(B, J) {
2889
+ function ue(B, J) {
2890
2890
  return [B, J];
2891
2891
  }
2892
2892
  }
@@ -2930,70 +2930,70 @@ var Gs;
2930
2930
  return (
2931
2931
  /** @class */
2932
2932
  function() {
2933
- function U() {
2933
+ function M() {
2934
2934
  this._key = E();
2935
2935
  }
2936
- return U.prototype.has = function(H) {
2936
+ return M.prototype.has = function(H) {
2937
2937
  var W = N(
2938
2938
  H,
2939
2939
  /*create*/
2940
2940
  !1
2941
2941
  );
2942
2942
  return W !== void 0 ? u.has(W, this._key) : !1;
2943
- }, U.prototype.get = function(H) {
2943
+ }, M.prototype.get = function(H) {
2944
2944
  var W = N(
2945
2945
  H,
2946
2946
  /*create*/
2947
2947
  !1
2948
2948
  );
2949
2949
  return W !== void 0 ? u.get(W, this._key) : void 0;
2950
- }, U.prototype.set = function(H, W) {
2950
+ }, M.prototype.set = function(H, W) {
2951
2951
  var zt = N(
2952
2952
  H,
2953
2953
  /*create*/
2954
2954
  !0
2955
2955
  );
2956
2956
  return zt[this._key] = W, this;
2957
- }, U.prototype.delete = function(H) {
2957
+ }, M.prototype.delete = function(H) {
2958
2958
  var W = N(
2959
2959
  H,
2960
2960
  /*create*/
2961
2961
  !1
2962
2962
  );
2963
2963
  return W !== void 0 ? delete W[this._key] : !1;
2964
- }, U.prototype.clear = function() {
2964
+ }, M.prototype.clear = function() {
2965
2965
  this._key = E();
2966
- }, U;
2966
+ }, M;
2967
2967
  }()
2968
2968
  );
2969
2969
  function E() {
2970
- var U;
2970
+ var M;
2971
2971
  do
2972
- U = "@@WeakMap@@" + J();
2973
- while (u.has(y, U));
2974
- return y[U] = !0, U;
2972
+ M = "@@WeakMap@@" + J();
2973
+ while (u.has(y, M));
2974
+ return y[M] = !0, M;
2975
2975
  }
2976
- function N(U, H) {
2977
- if (!t.call(U, S)) {
2976
+ function N(M, H) {
2977
+ if (!t.call(M, S)) {
2978
2978
  if (!H)
2979
2979
  return;
2980
- Object.defineProperty(U, S, { value: u.create() });
2980
+ Object.defineProperty(M, S, { value: u.create() });
2981
2981
  }
2982
- return U[S];
2982
+ return M[S];
2983
2983
  }
2984
- function le(U, H) {
2984
+ function ue(M, H) {
2985
2985
  for (var W = 0; W < H; ++W)
2986
- U[W] = Math.random() * 255 | 0;
2987
- return U;
2986
+ M[W] = Math.random() * 255 | 0;
2987
+ return M;
2988
2988
  }
2989
- function B(U) {
2990
- return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(U)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(U)) : le(new Uint8Array(U), U) : le(new Array(U), U);
2989
+ function B(M) {
2990
+ return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(M)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(M)) : ue(new Uint8Array(M), M) : ue(new Array(M), M);
2991
2991
  }
2992
2992
  function J() {
2993
- var U = B(v);
2994
- U[6] = U[6] & 79 | 64, U[8] = U[8] & 191 | 128;
2993
+ var M = B(v);
2994
+ M[6] = M[6] & 79 | 64, M[8] = M[8] & 191 | 128;
2995
2995
  for (var H = "", W = 0; W < v; ++W) {
2996
- var zt = U[W];
2996
+ var zt = M[W];
2997
2997
  (W === 4 || W === 6 || W === 8) && (H += "-"), zt < 16 && (H += "0"), H += zt.toString(16).toLowerCase();
2998
2998
  }
2999
2999
  return H;
@@ -3068,7 +3068,7 @@ var Xr = { exports: {} };
3068
3068
  w = w ?? "WARN";
3069
3069
  var j = "loglevel";
3070
3070
  typeof T == "string" ? j += ":" + T : typeof T == "symbol" && (j = void 0);
3071
- function de(x) {
3071
+ function ce(x) {
3072
3072
  var F = (s[x] || "silent").toUpperCase();
3073
3073
  if (!(typeof window === t || !j)) {
3074
3074
  try {
@@ -3082,7 +3082,7 @@ var Xr = { exports: {} };
3082
3082
  }
3083
3083
  }
3084
3084
  }
3085
- function ce() {
3085
+ function ae() {
3086
3086
  var x;
3087
3087
  if (!(typeof window === t || !j)) {
3088
3088
  try {
@@ -3091,8 +3091,8 @@ var Xr = { exports: {} };
3091
3091
  }
3092
3092
  if (typeof x === t)
3093
3093
  try {
3094
- var F = window.document.cookie, fe = F.indexOf(encodeURIComponent(j) + "=");
3095
- fe !== -1 && (x = /^([^;]+)/.exec(F.slice(fe))[1]);
3094
+ var F = window.document.cookie, le = F.indexOf(encodeURIComponent(j) + "=");
3095
+ le !== -1 && (x = /^([^;]+)/.exec(F.slice(le))[1]);
3096
3096
  } catch {
3097
3097
  }
3098
3098
  return D.levels[x] === void 0 && (x = void 0), x;
@@ -3122,12 +3122,12 @@ var Xr = { exports: {} };
3122
3122
  return Q;
3123
3123
  }, D.setLevel = function(x, F) {
3124
3124
  if (typeof x == "string" && D.levels[x.toUpperCase()] !== void 0 && (x = D.levels[x.toUpperCase()]), typeof x == "number" && x >= 0 && x <= D.levels.SILENT) {
3125
- if (Q = x, F !== !1 && de(x), c.call(D, x, T), typeof console === t && x < D.levels.SILENT)
3125
+ if (Q = x, F !== !1 && ce(x), c.call(D, x, T), typeof console === t && x < D.levels.SILENT)
3126
3126
  return "No console available for logging";
3127
3127
  } else
3128
3128
  throw "log.setLevel() called with invalid level: " + x;
3129
3129
  }, D.setDefaultLevel = function(x) {
3130
- w = x, ce() || D.setLevel(x, !1);
3130
+ w = x, ae() || D.setLevel(x, !1);
3131
3131
  }, D.resetLevel = function() {
3132
3132
  D.setLevel(w, !1), q();
3133
3133
  }, D.enableAll = function(x) {
@@ -3135,7 +3135,7 @@ var Xr = { exports: {} };
3135
3135
  }, D.disableAll = function(x) {
3136
3136
  D.setLevel(D.levels.SILENT, x);
3137
3137
  };
3138
- var K = ce();
3138
+ var K = ae();
3139
3139
  K == null && (K = w), D.setLevel(K, !1);
3140
3140
  }
3141
3141
  var f = new h(), m = {};
@@ -3160,7 +3160,7 @@ var Qr = Xr.exports, os;
3160
3160
  const p = Qr.getLogger("livekit");
3161
3161
  p.setDefaultLevel(os.info);
3162
3162
  Qr.getLogger("lk-e2ee");
3163
- function Re(i, e) {
3163
+ function Ee(i, e) {
3164
3164
  if (!i)
3165
3165
  throw new Error(e);
3166
3166
  }
@@ -3186,7 +3186,7 @@ function Zr(i) {
3186
3186
  const ea = Symbol("@bufbuild/protobuf/enum-type");
3187
3187
  function gu(i) {
3188
3188
  const e = i[ea];
3189
- return Re(e, "missing enum type on enum object"), e;
3189
+ return Ee(e, "missing enum type on enum object"), e;
3190
3190
  }
3191
3191
  function ta(i, e, t, n) {
3192
3192
  i[ea] = ia(e, t.map((s) => ({
@@ -3516,7 +3516,7 @@ function wu() {
3516
3516
  }
3517
3517
  };
3518
3518
  }
3519
- const t = (s) => Re(/^-?[0-9]+$/.test(s), "int64 invalid: ".concat(s)), n = (s) => Re(/^[0-9]+$/.test(s), "uint64 invalid: ".concat(s));
3519
+ const t = (s) => Ee(/^-?[0-9]+$/.test(s), "int64 invalid: ".concat(s)), n = (s) => Ee(/^[0-9]+$/.test(s), "uint64 invalid: ".concat(s));
3520
3520
  return {
3521
3521
  zero: "0",
3522
3522
  supported: !1,
@@ -3541,10 +3541,10 @@ function wu() {
3541
3541
  };
3542
3542
  }
3543
3543
  const V = wu();
3544
- var se;
3544
+ var ne;
3545
3545
  (function(i) {
3546
3546
  i[i.Varint = 0] = "Varint", i[i.Bit64 = 1] = "Bit64", i[i.LengthDelimited = 2] = "LengthDelimited", i[i.StartGroup = 3] = "StartGroup", i[i.EndGroup = 4] = "EndGroup", i[i.Bit32 = 5] = "Bit32";
3547
- })(se || (se = {}));
3547
+ })(ne || (ne = {}));
3548
3548
  class Eu {
3549
3549
  constructor(e) {
3550
3550
  this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
@@ -3726,22 +3726,22 @@ class Pu {
3726
3726
  skip(e) {
3727
3727
  let t = this.pos;
3728
3728
  switch (e) {
3729
- case se.Varint:
3729
+ case ne.Varint:
3730
3730
  for (; this.buf[this.pos++] & 128; )
3731
3731
  ;
3732
3732
  break;
3733
- case se.Bit64:
3733
+ case ne.Bit64:
3734
3734
  this.pos += 4;
3735
- case se.Bit32:
3735
+ case ne.Bit32:
3736
3736
  this.pos += 4;
3737
3737
  break;
3738
- case se.LengthDelimited:
3738
+ case ne.LengthDelimited:
3739
3739
  let n = this.uint32();
3740
3740
  this.pos += n;
3741
3741
  break;
3742
- case se.StartGroup:
3742
+ case ne.StartGroup:
3743
3743
  let s;
3744
- for (; (s = this.tag()[1]) !== se.EndGroup; )
3744
+ for (; (s = this.tag()[1]) !== ne.EndGroup; )
3745
3745
  this.skip(s);
3746
3746
  break;
3747
3747
  default:
@@ -3893,19 +3893,19 @@ function ds(i) {
3893
3893
  }
3894
3894
  function aa(i, e) {
3895
3895
  const t = e === void 0;
3896
- let n = se.Varint, s = e === 0;
3896
+ let n = ne.Varint, s = e === 0;
3897
3897
  switch (i) {
3898
3898
  case k.STRING:
3899
- s = t || !e.length, n = se.LengthDelimited;
3899
+ s = t || !e.length, n = ne.LengthDelimited;
3900
3900
  break;
3901
3901
  case k.BOOL:
3902
3902
  s = e === !1;
3903
3903
  break;
3904
3904
  case k.DOUBLE:
3905
- n = se.Bit64;
3905
+ n = ne.Bit64;
3906
3906
  break;
3907
3907
  case k.FLOAT:
3908
- n = se.Bit32;
3908
+ n = ne.Bit32;
3909
3909
  break;
3910
3910
  case k.INT64:
3911
3911
  s = t || e == 0;
@@ -3914,19 +3914,19 @@ function aa(i, e) {
3914
3914
  s = t || e == 0;
3915
3915
  break;
3916
3916
  case k.FIXED64:
3917
- s = t || e == 0, n = se.Bit64;
3917
+ s = t || e == 0, n = ne.Bit64;
3918
3918
  break;
3919
3919
  case k.BYTES:
3920
- s = t || !e.byteLength, n = se.LengthDelimited;
3920
+ s = t || !e.byteLength, n = ne.LengthDelimited;
3921
3921
  break;
3922
3922
  case k.FIXED32:
3923
- n = se.Bit32;
3923
+ n = ne.Bit32;
3924
3924
  break;
3925
3925
  case k.SFIXED32:
3926
- n = se.Bit32;
3926
+ n = ne.Bit32;
3927
3927
  break;
3928
3928
  case k.SFIXED64:
3929
- s = t || e == 0, n = se.Bit64;
3929
+ s = t || e == 0, n = ne.Bit64;
3930
3930
  break;
3931
3931
  case k.SINT64:
3932
3932
  s = t || e == 0;
@@ -3989,7 +3989,7 @@ function Iu() {
3989
3989
  const f = c.kind == "enum" ? k.INT32 : c.T;
3990
3990
  if (d) {
3991
3991
  let w = u[h];
3992
- if (o == se.LengthDelimited && f != k.STRING && f != k.BYTES) {
3992
+ if (o == ne.LengthDelimited && f != k.STRING && f != k.BYTES) {
3993
3993
  let I = e.uint32() + e.pos;
3994
3994
  for (; e.pos < I; )
3995
3995
  w.push(qi(e, f));
@@ -4091,7 +4091,7 @@ function qi(i, e) {
4091
4091
  }
4092
4092
  }
4093
4093
  function Au(i, e, t, n, s) {
4094
- i.tag(t.no, se.LengthDelimited), i.fork();
4094
+ i.tag(t.no, ne.LengthDelimited), i.fork();
4095
4095
  let r = n;
4096
4096
  switch (t.K) {
4097
4097
  case k.INT32:
@@ -4102,7 +4102,7 @@ function Au(i, e, t, n, s) {
4102
4102
  r = Number.parseInt(n);
4103
4103
  break;
4104
4104
  case k.BOOL:
4105
- Re(n == "true" || n == "false"), r = n == "true";
4105
+ Ee(n == "true" || n == "false"), r = n == "true";
4106
4106
  break;
4107
4107
  }
4108
4108
  switch (Hi(i, t.K, 1, r, !0), t.V.kind) {
@@ -4121,7 +4121,7 @@ function Au(i, e, t, n, s) {
4121
4121
  function ls(i, e, t, n, s) {
4122
4122
  if (s !== void 0) {
4123
4123
  const r = us(t, s);
4124
- i.tag(n, se.LengthDelimited).bytes(r.toBinary(e));
4124
+ i.tag(n, ne.LengthDelimited).bytes(r.toBinary(e));
4125
4125
  }
4126
4126
  }
4127
4127
  function Hi(i, e, t, n, s) {
@@ -4131,7 +4131,7 @@ function Hi(i, e, t, n, s) {
4131
4131
  function Ou(i, e, t, n) {
4132
4132
  if (!n.length)
4133
4133
  return;
4134
- i.tag(t, se.LengthDelimited).fork();
4134
+ i.tag(t, ne.LengthDelimited).fork();
4135
4135
  let [, s] = aa(e);
4136
4136
  for (let r = 0; r < n.length; r++)
4137
4137
  i[s](n[r]);
@@ -4532,22 +4532,22 @@ function tr(i, e, t) {
4532
4532
  case k.SINT32:
4533
4533
  case k.FIXED32:
4534
4534
  case k.UINT32:
4535
- return Re(typeof e == "number"), e != 0 || t ? e : void 0;
4535
+ return Ee(typeof e == "number"), e != 0 || t ? e : void 0;
4536
4536
  case k.FLOAT:
4537
4537
  case k.DOUBLE:
4538
- return Re(typeof e == "number"), Number.isNaN(e) ? "NaN" : e === Number.POSITIVE_INFINITY ? "Infinity" : e === Number.NEGATIVE_INFINITY ? "-Infinity" : e !== 0 || t ? e : void 0;
4538
+ return Ee(typeof e == "number"), Number.isNaN(e) ? "NaN" : e === Number.POSITIVE_INFINITY ? "Infinity" : e === Number.NEGATIVE_INFINITY ? "-Infinity" : e !== 0 || t ? e : void 0;
4539
4539
  case k.STRING:
4540
- return Re(typeof e == "string"), e.length > 0 || t ? e : void 0;
4540
+ return Ee(typeof e == "string"), e.length > 0 || t ? e : void 0;
4541
4541
  case k.BOOL:
4542
- return Re(typeof e == "boolean"), e || t ? e : void 0;
4542
+ return Ee(typeof e == "boolean"), e || t ? e : void 0;
4543
4543
  case k.UINT64:
4544
4544
  case k.FIXED64:
4545
4545
  case k.INT64:
4546
4546
  case k.SFIXED64:
4547
4547
  case k.SINT64:
4548
- return Re(typeof e == "bigint" || typeof e == "string" || typeof e == "number"), t || e != 0 ? e.toString(10) : void 0;
4548
+ return Ee(typeof e == "bigint" || typeof e == "string" || typeof e == "number"), t || e != 0 ? e.toString(10) : void 0;
4549
4549
  case k.BYTES:
4550
- return Re(e instanceof Uint8Array), t || e.byteLength > 0 ? oa.enc(e) : void 0;
4550
+ return Ee(e instanceof Uint8Array), t || e.byteLength > 0 ? oa.enc(e) : void 0;
4551
4551
  }
4552
4552
  }
4553
4553
  function Fu() {
@@ -4558,7 +4558,7 @@ function Fu() {
4558
4558
  case "scalar":
4559
4559
  for (const [c, u] of Object.entries(s)) {
4560
4560
  const d = e(n.V.T, u, !0);
4561
- Re(d !== void 0), a[c.toString()] = d;
4561
+ Ee(d !== void 0), a[c.toString()] = d;
4562
4562
  }
4563
4563
  break;
4564
4564
  case "message":
@@ -4568,9 +4568,9 @@ function Fu() {
4568
4568
  case "enum":
4569
4569
  const o = n.V.T;
4570
4570
  for (const [c, u] of Object.entries(s)) {
4571
- Re(u === void 0 || typeof u == "number");
4571
+ Ee(u === void 0 || typeof u == "number");
4572
4572
  const d = i(o, u, !0, r.enumAsInteger);
4573
- Re(d !== void 0), a[c.toString()] = d;
4573
+ Ee(d !== void 0), a[c.toString()] = d;
4574
4574
  }
4575
4575
  break;
4576
4576
  }
@@ -4853,7 +4853,7 @@ class Gu {
4853
4853
  this.kind = "oneof", this.repeated = !1, this.packed = !1, this.opt = !1, this.default = void 0, this.fields = [], this.name = e, this.localName = ju(e);
4854
4854
  }
4855
4855
  addField(e) {
4856
- Re(e.oneof === this, "field ".concat(e.name, " not one of ").concat(this.name)), this.fields.push(e);
4856
+ Ee(e.oneof === this, "field ".concat(e.name, " not one of ").concat(this.name)), this.fields.push(e);
4857
4857
  }
4858
4858
  findField(e) {
4859
4859
  if (!this._lookup) {
@@ -4910,7 +4910,7 @@ function zu(i) {
4910
4910
  }
4911
4911
  return s;
4912
4912
  }
4913
- class ge extends _ {
4913
+ class me extends _ {
4914
4914
  constructor(e) {
4915
4915
  super(), this.seconds = V.zero, this.nanos = 0, l.util.initPartial(e, this);
4916
4916
  }
@@ -4944,31 +4944,31 @@ class ge extends _ {
4944
4944
  return new Date(Number(this.seconds) * 1e3 + Math.ceil(this.nanos / 1e6));
4945
4945
  }
4946
4946
  static now() {
4947
- return ge.fromDate(/* @__PURE__ */ new Date());
4947
+ return me.fromDate(/* @__PURE__ */ new Date());
4948
4948
  }
4949
4949
  static fromDate(e) {
4950
4950
  const t = e.getTime();
4951
- return new ge({
4951
+ return new me({
4952
4952
  seconds: V.parse(Math.floor(t / 1e3)),
4953
4953
  nanos: t % 1e3 * 1e6
4954
4954
  });
4955
4955
  }
4956
4956
  static fromBinary(e, t) {
4957
- return new ge().fromBinary(e, t);
4957
+ return new me().fromBinary(e, t);
4958
4958
  }
4959
4959
  static fromJson(e, t) {
4960
- return new ge().fromJson(e, t);
4960
+ return new me().fromJson(e, t);
4961
4961
  }
4962
4962
  static fromJsonString(e, t) {
4963
- return new ge().fromJsonString(e, t);
4963
+ return new me().fromJsonString(e, t);
4964
4964
  }
4965
4965
  static equals(e, t) {
4966
- return l.util.equals(ge, e, t);
4966
+ return l.util.equals(me, e, t);
4967
4967
  }
4968
4968
  }
4969
- ge.runtime = l;
4970
- ge.typeName = "google.protobuf.Timestamp";
4971
- ge.fields = l.util.newFieldList(() => [{
4969
+ me.runtime = l;
4970
+ me.typeName = "google.protobuf.Timestamp";
4971
+ me.fields = l.util.newFieldList(() => [{
4972
4972
  no: 1,
4973
4973
  name: "seconds",
4974
4974
  kind: "scalar",
@@ -5015,11 +5015,11 @@ l.util.setEnumType(fs, "livekit.VideoCodec", [{
5015
5015
  no: 4,
5016
5016
  name: "VP8"
5017
5017
  }]);
5018
- var ve;
5018
+ var ge;
5019
5019
  (function(i) {
5020
5020
  i[i.AUDIO = 0] = "AUDIO", i[i.VIDEO = 1] = "VIDEO", i[i.DATA = 2] = "DATA";
5021
- })(ve || (ve = {}));
5022
- l.util.setEnumType(ve, "livekit.TrackType", [{
5021
+ })(ge || (ge = {}));
5022
+ l.util.setEnumType(ge, "livekit.TrackType", [{
5023
5023
  no: 0,
5024
5024
  name: "AUDIO"
5025
5025
  }, {
@@ -5029,11 +5029,11 @@ l.util.setEnumType(ve, "livekit.TrackType", [{
5029
5029
  no: 2,
5030
5030
  name: "DATA"
5031
5031
  }]);
5032
- var re;
5032
+ var se;
5033
5033
  (function(i) {
5034
5034
  i[i.UNKNOWN = 0] = "UNKNOWN", i[i.CAMERA = 1] = "CAMERA", i[i.MICROPHONE = 2] = "MICROPHONE", i[i.SCREEN_SHARE = 3] = "SCREEN_SHARE", i[i.SCREEN_SHARE_AUDIO = 4] = "SCREEN_SHARE_AUDIO";
5035
- })(re || (re = {}));
5036
- l.util.setEnumType(re, "livekit.TrackSource", [{
5035
+ })(se || (se = {}));
5036
+ l.util.setEnumType(se, "livekit.TrackSource", [{
5037
5037
  no: 0,
5038
5038
  name: "UNKNOWN"
5039
5039
  }, {
@@ -5049,11 +5049,11 @@ l.util.setEnumType(re, "livekit.TrackSource", [{
5049
5049
  no: 4,
5050
5050
  name: "SCREEN_SHARE_AUDIO"
5051
5051
  }]);
5052
- var ue;
5052
+ var oe;
5053
5053
  (function(i) {
5054
5054
  i[i.LOW = 0] = "LOW", i[i.MEDIUM = 1] = "MEDIUM", i[i.HIGH = 2] = "HIGH", i[i.OFF = 3] = "OFF";
5055
- })(ue || (ue = {}));
5056
- l.util.setEnumType(ue, "livekit.VideoQuality", [{
5055
+ })(oe || (oe = {}));
5056
+ l.util.setEnumType(oe, "livekit.VideoQuality", [{
5057
5057
  no: 0,
5058
5058
  name: "LOW"
5059
5059
  }, {
@@ -5080,11 +5080,11 @@ l.util.setEnumType(ti, "livekit.ConnectionQuality", [{
5080
5080
  no: 2,
5081
5081
  name: "EXCELLENT"
5082
5082
  }]);
5083
- var Ye;
5083
+ var Ke;
5084
5084
  (function(i) {
5085
5085
  i[i.UNSET = 0] = "UNSET", i[i.DISABLED = 1] = "DISABLED", i[i.ENABLED = 2] = "ENABLED";
5086
- })(Ye || (Ye = {}));
5087
- l.util.setEnumType(Ye, "livekit.ClientConfigSetting", [{
5086
+ })(Ke || (Ke = {}));
5087
+ l.util.setEnumType(Ke, "livekit.ClientConfigSetting", [{
5088
5088
  no: 0,
5089
5089
  name: "UNSET"
5090
5090
  }, {
@@ -5123,11 +5123,11 @@ l.util.setEnumType(Wt, "livekit.DisconnectReason", [{
5123
5123
  no: 7,
5124
5124
  name: "JOIN_FAILURE"
5125
5125
  }]);
5126
- var Be;
5126
+ var Fe;
5127
5127
  (function(i) {
5128
5128
  i[i.RR_UNKNOWN = 0] = "RR_UNKNOWN", i[i.RR_SIGNAL_DISCONNECTED = 1] = "RR_SIGNAL_DISCONNECTED", i[i.RR_PUBLISHER_FAILED = 2] = "RR_PUBLISHER_FAILED", i[i.RR_SUBSCRIBER_FAILED = 3] = "RR_SUBSCRIBER_FAILED", i[i.RR_SWITCH_CANDIDATE = 4] = "RR_SWITCH_CANDIDATE";
5129
- })(Be || (Be = {}));
5130
- l.util.setEnumType(Be, "livekit.ReconnectReason", [{
5129
+ })(Fe || (Fe = {}));
5130
+ l.util.setEnumType(Fe, "livekit.ReconnectReason", [{
5131
5131
  no: 0,
5132
5132
  name: "RR_UNKNOWN"
5133
5133
  }, {
@@ -5216,7 +5216,7 @@ Pi.fields = l.util.newFieldList(() => [{
5216
5216
  no: 7,
5217
5217
  name: "enabled_codecs",
5218
5218
  kind: "message",
5219
- T: qe,
5219
+ T: $e,
5220
5220
  repeated: !0
5221
5221
  }, {
5222
5222
  no: 8,
@@ -5248,26 +5248,26 @@ Pi.fields = l.util.newFieldList(() => [{
5248
5248
  kind: "message",
5249
5249
  T: St
5250
5250
  }]);
5251
- class qe extends _ {
5251
+ class $e extends _ {
5252
5252
  constructor(e) {
5253
5253
  super(), this.mime = "", this.fmtpLine = "", l.util.initPartial(e, this);
5254
5254
  }
5255
5255
  static fromBinary(e, t) {
5256
- return new qe().fromBinary(e, t);
5256
+ return new $e().fromBinary(e, t);
5257
5257
  }
5258
5258
  static fromJson(e, t) {
5259
- return new qe().fromJson(e, t);
5259
+ return new $e().fromJson(e, t);
5260
5260
  }
5261
5261
  static fromJsonString(e, t) {
5262
- return new qe().fromJsonString(e, t);
5262
+ return new $e().fromJsonString(e, t);
5263
5263
  }
5264
5264
  static equals(e, t) {
5265
- return l.util.equals(qe, e, t);
5265
+ return l.util.equals($e, e, t);
5266
5266
  }
5267
5267
  }
5268
- qe.runtime = l;
5269
- qe.typeName = "livekit.Codec";
5270
- qe.fields = l.util.newFieldList(() => [{
5268
+ $e.runtime = l;
5269
+ $e.typeName = "livekit.Codec";
5270
+ $e.fields = l.util.newFieldList(() => [{
5271
5271
  no: 1,
5272
5272
  name: "mime",
5273
5273
  kind: "scalar",
@@ -5359,7 +5359,7 @@ Ct.fields = l.util.newFieldList(() => [{
5359
5359
  no: 9,
5360
5360
  name: "can_publish_sources",
5361
5361
  kind: "enum",
5362
- T: l.getEnumType(re),
5362
+ T: l.getEnumType(se),
5363
5363
  repeated: !0
5364
5364
  }, {
5365
5365
  no: 7,
@@ -5420,7 +5420,7 @@ De.fields = l.util.newFieldList(() => [{
5420
5420
  no: 4,
5421
5421
  name: "tracks",
5422
5422
  kind: "message",
5423
- T: _e,
5423
+ T: Pe,
5424
5424
  repeated: !0
5425
5425
  }, {
5426
5426
  no: 5,
@@ -5501,11 +5501,11 @@ class Yt extends _ {
5501
5501
  Yt.runtime = l;
5502
5502
  Yt.typeName = "livekit.Encryption";
5503
5503
  Yt.fields = l.util.newFieldList(() => []);
5504
- var Te;
5504
+ var ke;
5505
5505
  (function(i) {
5506
5506
  i[i.NONE = 0] = "NONE", i[i.GCM = 1] = "GCM", i[i.CUSTOM = 2] = "CUSTOM";
5507
- })(Te || (Te = {}));
5508
- l.util.setEnumType(Te, "livekit.Encryption.Type", [{
5507
+ })(ke || (ke = {}));
5508
+ l.util.setEnumType(ke, "livekit.Encryption.Type", [{
5509
5509
  no: 0,
5510
5510
  name: "NONE"
5511
5511
  }, {
@@ -5556,29 +5556,29 @@ wt.fields = l.util.newFieldList(() => [{
5556
5556
  no: 4,
5557
5557
  name: "layers",
5558
5558
  kind: "message",
5559
- T: Se,
5559
+ T: Te,
5560
5560
  repeated: !0
5561
5561
  }]);
5562
- class _e extends _ {
5562
+ class Pe extends _ {
5563
5563
  constructor(e) {
5564
- super(), this.sid = "", this.type = ve.AUDIO, this.name = "", this.muted = !1, this.width = 0, this.height = 0, this.simulcast = !1, this.disableDtx = !1, this.source = re.UNKNOWN, this.layers = [], this.mimeType = "", this.mid = "", this.codecs = [], this.stereo = !1, this.disableRed = !1, this.encryption = Te.NONE, this.stream = "", l.util.initPartial(e, this);
5564
+ super(), this.sid = "", this.type = ge.AUDIO, this.name = "", this.muted = !1, this.width = 0, this.height = 0, this.simulcast = !1, this.disableDtx = !1, this.source = se.UNKNOWN, this.layers = [], this.mimeType = "", this.mid = "", this.codecs = [], this.stereo = !1, this.disableRed = !1, this.encryption = ke.NONE, this.stream = "", l.util.initPartial(e, this);
5565
5565
  }
5566
5566
  static fromBinary(e, t) {
5567
- return new _e().fromBinary(e, t);
5567
+ return new Pe().fromBinary(e, t);
5568
5568
  }
5569
5569
  static fromJson(e, t) {
5570
- return new _e().fromJson(e, t);
5570
+ return new Pe().fromJson(e, t);
5571
5571
  }
5572
5572
  static fromJsonString(e, t) {
5573
- return new _e().fromJsonString(e, t);
5573
+ return new Pe().fromJsonString(e, t);
5574
5574
  }
5575
5575
  static equals(e, t) {
5576
- return l.util.equals(_e, e, t);
5576
+ return l.util.equals(Pe, e, t);
5577
5577
  }
5578
5578
  }
5579
- _e.runtime = l;
5580
- _e.typeName = "livekit.TrackInfo";
5581
- _e.fields = l.util.newFieldList(() => [{
5579
+ Pe.runtime = l;
5580
+ Pe.typeName = "livekit.TrackInfo";
5581
+ Pe.fields = l.util.newFieldList(() => [{
5582
5582
  no: 1,
5583
5583
  name: "sid",
5584
5584
  kind: "scalar",
@@ -5588,7 +5588,7 @@ _e.fields = l.util.newFieldList(() => [{
5588
5588
  no: 2,
5589
5589
  name: "type",
5590
5590
  kind: "enum",
5591
- T: l.getEnumType(ve)
5591
+ T: l.getEnumType(ge)
5592
5592
  }, {
5593
5593
  no: 3,
5594
5594
  name: "name",
@@ -5629,12 +5629,12 @@ _e.fields = l.util.newFieldList(() => [{
5629
5629
  no: 9,
5630
5630
  name: "source",
5631
5631
  kind: "enum",
5632
- T: l.getEnumType(re)
5632
+ T: l.getEnumType(se)
5633
5633
  }, {
5634
5634
  no: 10,
5635
5635
  name: "layers",
5636
5636
  kind: "message",
5637
- T: Se,
5637
+ T: Te,
5638
5638
  repeated: !0
5639
5639
  }, {
5640
5640
  no: 11,
@@ -5670,7 +5670,7 @@ _e.fields = l.util.newFieldList(() => [{
5670
5670
  no: 16,
5671
5671
  name: "encryption",
5672
5672
  kind: "enum",
5673
- T: l.getEnumType(Te)
5673
+ T: l.getEnumType(ke)
5674
5674
  }, {
5675
5675
  no: 17,
5676
5676
  name: "stream",
@@ -5678,30 +5678,30 @@ _e.fields = l.util.newFieldList(() => [{
5678
5678
  T: 9
5679
5679
  /* ScalarType.STRING */
5680
5680
  }]);
5681
- class Se extends _ {
5681
+ class Te extends _ {
5682
5682
  constructor(e) {
5683
- super(), this.quality = ue.LOW, this.width = 0, this.height = 0, this.bitrate = 0, this.ssrc = 0, l.util.initPartial(e, this);
5683
+ super(), this.quality = oe.LOW, this.width = 0, this.height = 0, this.bitrate = 0, this.ssrc = 0, l.util.initPartial(e, this);
5684
5684
  }
5685
5685
  static fromBinary(e, t) {
5686
- return new Se().fromBinary(e, t);
5686
+ return new Te().fromBinary(e, t);
5687
5687
  }
5688
5688
  static fromJson(e, t) {
5689
- return new Se().fromJson(e, t);
5689
+ return new Te().fromJson(e, t);
5690
5690
  }
5691
5691
  static fromJsonString(e, t) {
5692
- return new Se().fromJsonString(e, t);
5692
+ return new Te().fromJsonString(e, t);
5693
5693
  }
5694
5694
  static equals(e, t) {
5695
- return l.util.equals(Se, e, t);
5695
+ return l.util.equals(Te, e, t);
5696
5696
  }
5697
5697
  }
5698
- Se.runtime = l;
5699
- Se.typeName = "livekit.VideoLayer";
5700
- Se.fields = l.util.newFieldList(() => [{
5698
+ Te.runtime = l;
5699
+ Te.typeName = "livekit.VideoLayer";
5700
+ Te.fields = l.util.newFieldList(() => [{
5701
5701
  no: 1,
5702
5702
  name: "quality",
5703
5703
  kind: "enum",
5704
- T: l.getEnumType(ue)
5704
+ T: l.getEnumType(oe)
5705
5705
  }, {
5706
5706
  no: 2,
5707
5707
  name: "width",
@@ -5727,37 +5727,37 @@ Se.fields = l.util.newFieldList(() => [{
5727
5727
  T: 13
5728
5728
  /* ScalarType.UINT32 */
5729
5729
  }]);
5730
- class et extends _ {
5730
+ class Ze extends _ {
5731
5731
  constructor(e) {
5732
- super(), this.kind = he.RELIABLE, this.value = {
5732
+ super(), this.kind = de.RELIABLE, this.value = {
5733
5733
  case: void 0
5734
5734
  }, l.util.initPartial(e, this);
5735
5735
  }
5736
5736
  static fromBinary(e, t) {
5737
- return new et().fromBinary(e, t);
5737
+ return new Ze().fromBinary(e, t);
5738
5738
  }
5739
5739
  static fromJson(e, t) {
5740
- return new et().fromJson(e, t);
5740
+ return new Ze().fromJson(e, t);
5741
5741
  }
5742
5742
  static fromJsonString(e, t) {
5743
- return new et().fromJsonString(e, t);
5743
+ return new Ze().fromJsonString(e, t);
5744
5744
  }
5745
5745
  static equals(e, t) {
5746
- return l.util.equals(et, e, t);
5746
+ return l.util.equals(Ze, e, t);
5747
5747
  }
5748
5748
  }
5749
- et.runtime = l;
5750
- et.typeName = "livekit.DataPacket";
5751
- et.fields = l.util.newFieldList(() => [{
5749
+ Ze.runtime = l;
5750
+ Ze.typeName = "livekit.DataPacket";
5751
+ Ze.fields = l.util.newFieldList(() => [{
5752
5752
  no: 1,
5753
5753
  name: "kind",
5754
5754
  kind: "enum",
5755
- T: l.getEnumType(he)
5755
+ T: l.getEnumType(de)
5756
5756
  }, {
5757
5757
  no: 2,
5758
5758
  name: "user",
5759
5759
  kind: "message",
5760
- T: it,
5760
+ T: tt,
5761
5761
  oneof: "value"
5762
5762
  }, {
5763
5763
  no: 3,
@@ -5766,11 +5766,11 @@ et.fields = l.util.newFieldList(() => [{
5766
5766
  T: Et,
5767
5767
  oneof: "value"
5768
5768
  }]);
5769
- var he;
5769
+ var de;
5770
5770
  (function(i) {
5771
5771
  i[i.RELIABLE = 0] = "RELIABLE", i[i.LOSSY = 1] = "LOSSY";
5772
- })(he || (he = {}));
5773
- l.util.setEnumType(he, "livekit.DataPacket.Kind", [{
5772
+ })(de || (de = {}));
5773
+ l.util.setEnumType(de, "livekit.DataPacket.Kind", [{
5774
5774
  no: 0,
5775
5775
  name: "RELIABLE"
5776
5776
  }, {
@@ -5800,29 +5800,29 @@ Et.fields = l.util.newFieldList(() => [{
5800
5800
  no: 1,
5801
5801
  name: "speakers",
5802
5802
  kind: "message",
5803
- T: tt,
5803
+ T: et,
5804
5804
  repeated: !0
5805
5805
  }]);
5806
- class tt extends _ {
5806
+ class et extends _ {
5807
5807
  constructor(e) {
5808
5808
  super(), this.sid = "", this.level = 0, this.active = !1, l.util.initPartial(e, this);
5809
5809
  }
5810
5810
  static fromBinary(e, t) {
5811
- return new tt().fromBinary(e, t);
5811
+ return new et().fromBinary(e, t);
5812
5812
  }
5813
5813
  static fromJson(e, t) {
5814
- return new tt().fromJson(e, t);
5814
+ return new et().fromJson(e, t);
5815
5815
  }
5816
5816
  static fromJsonString(e, t) {
5817
- return new tt().fromJsonString(e, t);
5817
+ return new et().fromJsonString(e, t);
5818
5818
  }
5819
5819
  static equals(e, t) {
5820
- return l.util.equals(tt, e, t);
5820
+ return l.util.equals(et, e, t);
5821
5821
  }
5822
5822
  }
5823
- tt.runtime = l;
5824
- tt.typeName = "livekit.SpeakerInfo";
5825
- tt.fields = l.util.newFieldList(() => [{
5823
+ et.runtime = l;
5824
+ et.typeName = "livekit.SpeakerInfo";
5825
+ et.fields = l.util.newFieldList(() => [{
5826
5826
  no: 1,
5827
5827
  name: "sid",
5828
5828
  kind: "scalar",
@@ -5841,26 +5841,26 @@ tt.fields = l.util.newFieldList(() => [{
5841
5841
  T: 8
5842
5842
  /* ScalarType.BOOL */
5843
5843
  }]);
5844
- class it extends _ {
5844
+ class tt extends _ {
5845
5845
  constructor(e) {
5846
5846
  super(), this.participantSid = "", this.payload = new Uint8Array(0), this.destinationSids = [], l.util.initPartial(e, this);
5847
5847
  }
5848
5848
  static fromBinary(e, t) {
5849
- return new it().fromBinary(e, t);
5849
+ return new tt().fromBinary(e, t);
5850
5850
  }
5851
5851
  static fromJson(e, t) {
5852
- return new it().fromJson(e, t);
5852
+ return new tt().fromJson(e, t);
5853
5853
  }
5854
5854
  static fromJsonString(e, t) {
5855
- return new it().fromJsonString(e, t);
5855
+ return new tt().fromJsonString(e, t);
5856
5856
  }
5857
5857
  static equals(e, t) {
5858
- return l.util.equals(it, e, t);
5858
+ return l.util.equals(tt, e, t);
5859
5859
  }
5860
5860
  }
5861
- it.runtime = l;
5862
- it.typeName = "livekit.UserPacket";
5863
- it.fields = l.util.newFieldList(() => [{
5861
+ tt.runtime = l;
5862
+ tt.typeName = "livekit.UserPacket";
5863
+ tt.fields = l.util.newFieldList(() => [{
5864
5864
  no: 1,
5865
5865
  name: "participant_sid",
5866
5866
  kind: "scalar",
@@ -5885,26 +5885,26 @@ it.fields = l.util.newFieldList(() => [{
5885
5885
  T: 9,
5886
5886
  opt: !0
5887
5887
  }]);
5888
- class nt extends _ {
5888
+ class it extends _ {
5889
5889
  constructor(e) {
5890
5890
  super(), this.participantSid = "", this.trackSids = [], l.util.initPartial(e, this);
5891
5891
  }
5892
5892
  static fromBinary(e, t) {
5893
- return new nt().fromBinary(e, t);
5893
+ return new it().fromBinary(e, t);
5894
5894
  }
5895
5895
  static fromJson(e, t) {
5896
- return new nt().fromJson(e, t);
5896
+ return new it().fromJson(e, t);
5897
5897
  }
5898
5898
  static fromJsonString(e, t) {
5899
- return new nt().fromJsonString(e, t);
5899
+ return new it().fromJsonString(e, t);
5900
5900
  }
5901
5901
  static equals(e, t) {
5902
- return l.util.equals(nt, e, t);
5902
+ return l.util.equals(it, e, t);
5903
5903
  }
5904
5904
  }
5905
- nt.runtime = l;
5906
- nt.typeName = "livekit.ParticipantTracks";
5907
- nt.fields = l.util.newFieldList(() => [{
5905
+ it.runtime = l;
5906
+ it.typeName = "livekit.ParticipantTracks";
5907
+ it.fields = l.util.newFieldList(() => [{
5908
5908
  no: 1,
5909
5909
  name: "participant_sid",
5910
5910
  kind: "scalar",
@@ -6094,40 +6094,40 @@ l.util.setEnumType(Ei, "livekit.ClientInfo.SDK", [{
6094
6094
  no: 8,
6095
6095
  name: "RUST"
6096
6096
  }]);
6097
- class st extends _ {
6097
+ class nt extends _ {
6098
6098
  constructor(e) {
6099
- super(), this.resumeConnection = Ye.UNSET, this.forceRelay = Ye.UNSET, l.util.initPartial(e, this);
6099
+ super(), this.resumeConnection = Ke.UNSET, this.forceRelay = Ke.UNSET, l.util.initPartial(e, this);
6100
6100
  }
6101
6101
  static fromBinary(e, t) {
6102
- return new st().fromBinary(e, t);
6102
+ return new nt().fromBinary(e, t);
6103
6103
  }
6104
6104
  static fromJson(e, t) {
6105
- return new st().fromJson(e, t);
6105
+ return new nt().fromJson(e, t);
6106
6106
  }
6107
6107
  static fromJsonString(e, t) {
6108
- return new st().fromJsonString(e, t);
6108
+ return new nt().fromJsonString(e, t);
6109
6109
  }
6110
6110
  static equals(e, t) {
6111
- return l.util.equals(st, e, t);
6111
+ return l.util.equals(nt, e, t);
6112
6112
  }
6113
6113
  }
6114
- st.runtime = l;
6115
- st.typeName = "livekit.ClientConfiguration";
6116
- st.fields = l.util.newFieldList(() => [{
6114
+ nt.runtime = l;
6115
+ nt.typeName = "livekit.ClientConfiguration";
6116
+ nt.fields = l.util.newFieldList(() => [{
6117
6117
  no: 1,
6118
6118
  name: "video",
6119
6119
  kind: "message",
6120
- T: rt
6120
+ T: st
6121
6121
  }, {
6122
6122
  no: 2,
6123
6123
  name: "screen",
6124
6124
  kind: "message",
6125
- T: rt
6125
+ T: st
6126
6126
  }, {
6127
6127
  no: 3,
6128
6128
  name: "resume_connection",
6129
6129
  kind: "enum",
6130
- T: l.getEnumType(Ye)
6130
+ T: l.getEnumType(Ke)
6131
6131
  }, {
6132
6132
  no: 4,
6133
6133
  name: "disabled_codecs",
@@ -6137,32 +6137,32 @@ st.fields = l.util.newFieldList(() => [{
6137
6137
  no: 5,
6138
6138
  name: "force_relay",
6139
6139
  kind: "enum",
6140
- T: l.getEnumType(Ye)
6140
+ T: l.getEnumType(Ke)
6141
6141
  }]);
6142
- class rt extends _ {
6142
+ class st extends _ {
6143
6143
  constructor(e) {
6144
- super(), this.hardwareEncoder = Ye.UNSET, l.util.initPartial(e, this);
6144
+ super(), this.hardwareEncoder = Ke.UNSET, l.util.initPartial(e, this);
6145
6145
  }
6146
6146
  static fromBinary(e, t) {
6147
- return new rt().fromBinary(e, t);
6147
+ return new st().fromBinary(e, t);
6148
6148
  }
6149
6149
  static fromJson(e, t) {
6150
- return new rt().fromJson(e, t);
6150
+ return new st().fromJson(e, t);
6151
6151
  }
6152
6152
  static fromJsonString(e, t) {
6153
- return new rt().fromJsonString(e, t);
6153
+ return new st().fromJsonString(e, t);
6154
6154
  }
6155
6155
  static equals(e, t) {
6156
- return l.util.equals(rt, e, t);
6156
+ return l.util.equals(st, e, t);
6157
6157
  }
6158
6158
  }
6159
- rt.runtime = l;
6160
- rt.typeName = "livekit.VideoConfiguration";
6161
- rt.fields = l.util.newFieldList(() => [{
6159
+ st.runtime = l;
6160
+ st.typeName = "livekit.VideoConfiguration";
6161
+ st.fields = l.util.newFieldList(() => [{
6162
6162
  no: 1,
6163
6163
  name: "hardware_encoder",
6164
6164
  kind: "enum",
6165
- T: l.getEnumType(Ye)
6165
+ T: l.getEnumType(Ke)
6166
6166
  }]);
6167
6167
  class _t extends _ {
6168
6168
  constructor(e) {
@@ -6187,13 +6187,13 @@ _t.fields = l.util.newFieldList(() => [{
6187
6187
  no: 1,
6188
6188
  name: "codecs",
6189
6189
  kind: "message",
6190
- T: qe,
6190
+ T: $e,
6191
6191
  repeated: !0
6192
6192
  }, {
6193
6193
  no: 2,
6194
6194
  name: "publish",
6195
6195
  kind: "message",
6196
- T: qe,
6196
+ T: $e,
6197
6197
  repeated: !0
6198
6198
  }]);
6199
6199
  class Xt extends _ {
@@ -6219,12 +6219,12 @@ Xt.fields = l.util.newFieldList(() => [{
6219
6219
  no: 1,
6220
6220
  name: "start_time",
6221
6221
  kind: "message",
6222
- T: ge
6222
+ T: me
6223
6223
  }, {
6224
6224
  no: 2,
6225
6225
  name: "end_time",
6226
6226
  kind: "message",
6227
- T: ge
6227
+ T: me
6228
6228
  }, {
6229
6229
  no: 3,
6230
6230
  name: "duration",
@@ -6413,7 +6413,7 @@ Xt.fields = l.util.newFieldList(() => [{
6413
6413
  no: 28,
6414
6414
  name: "last_pli",
6415
6415
  kind: "message",
6416
- T: ge
6416
+ T: me
6417
6417
  }, {
6418
6418
  no: 29,
6419
6419
  name: "firs",
@@ -6424,7 +6424,7 @@ Xt.fields = l.util.newFieldList(() => [{
6424
6424
  no: 30,
6425
6425
  name: "last_fir",
6426
6426
  kind: "message",
6427
- T: ge
6427
+ T: me
6428
6428
  }, {
6429
6429
  no: 31,
6430
6430
  name: "rtt_current",
@@ -6447,7 +6447,7 @@ Xt.fields = l.util.newFieldList(() => [{
6447
6447
  no: 34,
6448
6448
  name: "last_key_frame",
6449
6449
  kind: "message",
6450
- T: ge
6450
+ T: me
6451
6451
  }, {
6452
6452
  no: 35,
6453
6453
  name: "layer_lock_plis",
@@ -6458,7 +6458,7 @@ Xt.fields = l.util.newFieldList(() => [{
6458
6458
  no: 36,
6459
6459
  name: "last_layer_lock_pli",
6460
6460
  kind: "message",
6461
- T: ge
6461
+ T: me
6462
6462
  }, {
6463
6463
  no: 42,
6464
6464
  name: "sample_rate",
@@ -6805,7 +6805,7 @@ function ba(i, e, t, n) {
6805
6805
  else
6806
6806
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof i);
6807
6807
  }
6808
- var gt = As.exports;
6808
+ var mt = As.exports;
6809
6809
  let ka = !0, Ta = !0;
6810
6810
  function kn(i, e, t) {
6811
6811
  const n = i.match(e);
@@ -8377,11 +8377,11 @@ function dd() {
8377
8377
  dd({
8378
8378
  window: typeof window > "u" ? void 0 : window
8379
8379
  });
8380
- var Ie;
8380
+ var Re;
8381
8381
  (function(i) {
8382
8382
  i[i.PUBLISHER = 0] = "PUBLISHER", i[i.SUBSCRIBER = 1] = "SUBSCRIBER";
8383
- })(Ie || (Ie = {}));
8384
- l.util.setEnumType(Ie, "livekit.SignalTarget", [{
8383
+ })(Re || (Re = {}));
8384
+ l.util.setEnumType(Re, "livekit.SignalTarget", [{
8385
8385
  no: 0,
8386
8386
  name: "PUBLISHER"
8387
8387
  }, {
@@ -8438,73 +8438,73 @@ It.fields = l.util.newFieldList(() => [{
8438
8438
  no: 1,
8439
8439
  name: "offer",
8440
8440
  kind: "message",
8441
- T: Ce,
8441
+ T: Se,
8442
8442
  oneof: "message"
8443
8443
  }, {
8444
8444
  no: 2,
8445
8445
  name: "answer",
8446
8446
  kind: "message",
8447
- T: Ce,
8447
+ T: Se,
8448
8448
  oneof: "message"
8449
8449
  }, {
8450
8450
  no: 3,
8451
8451
  name: "trickle",
8452
8452
  kind: "message",
8453
- T: We,
8453
+ T: He,
8454
8454
  oneof: "message"
8455
8455
  }, {
8456
8456
  no: 4,
8457
8457
  name: "add_track",
8458
8458
  kind: "message",
8459
- T: He,
8459
+ T: qe,
8460
8460
  oneof: "message"
8461
8461
  }, {
8462
8462
  no: 5,
8463
8463
  name: "mute",
8464
8464
  kind: "message",
8465
- T: Ge,
8465
+ T: We,
8466
8466
  oneof: "message"
8467
8467
  }, {
8468
8468
  no: 6,
8469
8469
  name: "subscription",
8470
8470
  kind: "message",
8471
- T: je,
8471
+ T: Je,
8472
8472
  oneof: "message"
8473
8473
  }, {
8474
8474
  no: 7,
8475
8475
  name: "track_setting",
8476
8476
  kind: "message",
8477
- T: ot,
8477
+ T: at,
8478
8478
  oneof: "message"
8479
8479
  }, {
8480
8480
  no: 8,
8481
8481
  name: "leave",
8482
8482
  kind: "message",
8483
- T: Ve,
8483
+ T: je,
8484
8484
  oneof: "message"
8485
8485
  }, {
8486
8486
  no: 10,
8487
8487
  name: "update_layers",
8488
8488
  kind: "message",
8489
- T: ct,
8489
+ T: ot,
8490
8490
  oneof: "message"
8491
8491
  }, {
8492
8492
  no: 11,
8493
8493
  name: "subscription_permission",
8494
8494
  kind: "message",
8495
- T: ht,
8495
+ T: lt,
8496
8496
  oneof: "message"
8497
8497
  }, {
8498
8498
  no: 12,
8499
8499
  name: "sync_state",
8500
8500
  kind: "message",
8501
- T: ft,
8501
+ T: ht,
8502
8502
  oneof: "message"
8503
8503
  }, {
8504
8504
  no: 13,
8505
8505
  name: "simulate",
8506
8506
  kind: "message",
8507
- T: be,
8507
+ T: ye,
8508
8508
  oneof: "message"
8509
8509
  }, {
8510
8510
  no: 14,
@@ -8516,37 +8516,37 @@ It.fields = l.util.newFieldList(() => [{
8516
8516
  no: 15,
8517
8517
  name: "update_metadata",
8518
8518
  kind: "message",
8519
- T: ut,
8519
+ T: ct,
8520
8520
  oneof: "message"
8521
8521
  }, {
8522
8522
  no: 16,
8523
8523
  name: "ping_req",
8524
8524
  kind: "message",
8525
- T: mt,
8525
+ T: pt,
8526
8526
  oneof: "message"
8527
8527
  }]);
8528
- class at extends _ {
8528
+ class rt extends _ {
8529
8529
  constructor(e) {
8530
8530
  super(), this.message = {
8531
8531
  case: void 0
8532
8532
  }, l.util.initPartial(e, this);
8533
8533
  }
8534
8534
  static fromBinary(e, t) {
8535
- return new at().fromBinary(e, t);
8535
+ return new rt().fromBinary(e, t);
8536
8536
  }
8537
8537
  static fromJson(e, t) {
8538
- return new at().fromJson(e, t);
8538
+ return new rt().fromJson(e, t);
8539
8539
  }
8540
8540
  static fromJsonString(e, t) {
8541
- return new at().fromJsonString(e, t);
8541
+ return new rt().fromJsonString(e, t);
8542
8542
  }
8543
8543
  static equals(e, t) {
8544
- return l.util.equals(at, e, t);
8544
+ return l.util.equals(rt, e, t);
8545
8545
  }
8546
8546
  }
8547
- at.runtime = l;
8548
- at.typeName = "livekit.SignalResponse";
8549
- at.fields = l.util.newFieldList(() => [{
8547
+ rt.runtime = l;
8548
+ rt.typeName = "livekit.SignalResponse";
8549
+ rt.fields = l.util.newFieldList(() => [{
8550
8550
  no: 1,
8551
8551
  name: "join",
8552
8552
  kind: "message",
@@ -8556,19 +8556,19 @@ at.fields = l.util.newFieldList(() => [{
8556
8556
  no: 2,
8557
8557
  name: "answer",
8558
8558
  kind: "message",
8559
- T: Ce,
8559
+ T: Se,
8560
8560
  oneof: "message"
8561
8561
  }, {
8562
8562
  no: 3,
8563
8563
  name: "offer",
8564
8564
  kind: "message",
8565
- T: Ce,
8565
+ T: Se,
8566
8566
  oneof: "message"
8567
8567
  }, {
8568
8568
  no: 4,
8569
8569
  name: "trickle",
8570
8570
  kind: "message",
8571
- T: We,
8571
+ T: He,
8572
8572
  oneof: "message"
8573
8573
  }, {
8574
8574
  no: 5,
@@ -8580,19 +8580,19 @@ at.fields = l.util.newFieldList(() => [{
8580
8580
  no: 6,
8581
8581
  name: "track_published",
8582
8582
  kind: "message",
8583
- T: ze,
8583
+ T: Ge,
8584
8584
  oneof: "message"
8585
8585
  }, {
8586
8586
  no: 8,
8587
8587
  name: "leave",
8588
8588
  kind: "message",
8589
- T: Ve,
8589
+ T: je,
8590
8590
  oneof: "message"
8591
8591
  }, {
8592
8592
  no: 9,
8593
8593
  name: "mute",
8594
8594
  kind: "message",
8595
- T: Ge,
8595
+ T: We,
8596
8596
  oneof: "message"
8597
8597
  }, {
8598
8598
  no: 10,
@@ -8667,26 +8667,26 @@ at.fields = l.util.newFieldList(() => [{
8667
8667
  T: Ht,
8668
8668
  oneof: "message"
8669
8669
  }]);
8670
- class Je extends _ {
8670
+ class Be extends _ {
8671
8671
  constructor(e) {
8672
8672
  super(), this.codec = "", this.cid = "", this.enableSimulcastLayers = !1, l.util.initPartial(e, this);
8673
8673
  }
8674
8674
  static fromBinary(e, t) {
8675
- return new Je().fromBinary(e, t);
8675
+ return new Be().fromBinary(e, t);
8676
8676
  }
8677
8677
  static fromJson(e, t) {
8678
- return new Je().fromJson(e, t);
8678
+ return new Be().fromJson(e, t);
8679
8679
  }
8680
8680
  static fromJsonString(e, t) {
8681
- return new Je().fromJsonString(e, t);
8681
+ return new Be().fromJsonString(e, t);
8682
8682
  }
8683
8683
  static equals(e, t) {
8684
- return l.util.equals(Je, e, t);
8684
+ return l.util.equals(Be, e, t);
8685
8685
  }
8686
8686
  }
8687
- Je.runtime = l;
8688
- Je.typeName = "livekit.SimulcastCodec";
8689
- Je.fields = l.util.newFieldList(() => [{
8687
+ Be.runtime = l;
8688
+ Be.typeName = "livekit.SimulcastCodec";
8689
+ Be.fields = l.util.newFieldList(() => [{
8690
8690
  no: 1,
8691
8691
  name: "codec",
8692
8692
  kind: "scalar",
@@ -8705,26 +8705,26 @@ Je.fields = l.util.newFieldList(() => [{
8705
8705
  T: 8
8706
8706
  /* ScalarType.BOOL */
8707
8707
  }]);
8708
- class He extends _ {
8708
+ class qe extends _ {
8709
8709
  constructor(e) {
8710
- super(), this.cid = "", this.name = "", this.type = ve.AUDIO, this.width = 0, this.height = 0, this.muted = !1, this.disableDtx = !1, this.source = re.UNKNOWN, this.layers = [], this.simulcastCodecs = [], this.sid = "", this.stereo = !1, this.disableRed = !1, this.encryption = Te.NONE, this.stream = "", l.util.initPartial(e, this);
8710
+ super(), this.cid = "", this.name = "", this.type = ge.AUDIO, this.width = 0, this.height = 0, this.muted = !1, this.disableDtx = !1, this.source = se.UNKNOWN, this.layers = [], this.simulcastCodecs = [], this.sid = "", this.stereo = !1, this.disableRed = !1, this.encryption = ke.NONE, this.stream = "", l.util.initPartial(e, this);
8711
8711
  }
8712
8712
  static fromBinary(e, t) {
8713
- return new He().fromBinary(e, t);
8713
+ return new qe().fromBinary(e, t);
8714
8714
  }
8715
8715
  static fromJson(e, t) {
8716
- return new He().fromJson(e, t);
8716
+ return new qe().fromJson(e, t);
8717
8717
  }
8718
8718
  static fromJsonString(e, t) {
8719
- return new He().fromJsonString(e, t);
8719
+ return new qe().fromJsonString(e, t);
8720
8720
  }
8721
8721
  static equals(e, t) {
8722
- return l.util.equals(He, e, t);
8722
+ return l.util.equals(qe, e, t);
8723
8723
  }
8724
8724
  }
8725
- He.runtime = l;
8726
- He.typeName = "livekit.AddTrackRequest";
8727
- He.fields = l.util.newFieldList(() => [{
8725
+ qe.runtime = l;
8726
+ qe.typeName = "livekit.AddTrackRequest";
8727
+ qe.fields = l.util.newFieldList(() => [{
8728
8728
  no: 1,
8729
8729
  name: "cid",
8730
8730
  kind: "scalar",
@@ -8740,7 +8740,7 @@ He.fields = l.util.newFieldList(() => [{
8740
8740
  no: 3,
8741
8741
  name: "type",
8742
8742
  kind: "enum",
8743
- T: l.getEnumType(ve)
8743
+ T: l.getEnumType(ge)
8744
8744
  }, {
8745
8745
  no: 4,
8746
8746
  name: "width",
@@ -8769,18 +8769,18 @@ He.fields = l.util.newFieldList(() => [{
8769
8769
  no: 8,
8770
8770
  name: "source",
8771
8771
  kind: "enum",
8772
- T: l.getEnumType(re)
8772
+ T: l.getEnumType(se)
8773
8773
  }, {
8774
8774
  no: 9,
8775
8775
  name: "layers",
8776
8776
  kind: "message",
8777
- T: Se,
8777
+ T: Te,
8778
8778
  repeated: !0
8779
8779
  }, {
8780
8780
  no: 10,
8781
8781
  name: "simulcast_codecs",
8782
8782
  kind: "message",
8783
- T: Je,
8783
+ T: Be,
8784
8784
  repeated: !0
8785
8785
  }, {
8786
8786
  no: 11,
@@ -8804,7 +8804,7 @@ He.fields = l.util.newFieldList(() => [{
8804
8804
  no: 14,
8805
8805
  name: "encryption",
8806
8806
  kind: "enum",
8807
- T: l.getEnumType(Te)
8807
+ T: l.getEnumType(ke)
8808
8808
  }, {
8809
8809
  no: 15,
8810
8810
  name: "stream",
@@ -8812,26 +8812,26 @@ He.fields = l.util.newFieldList(() => [{
8812
8812
  T: 9
8813
8813
  /* ScalarType.STRING */
8814
8814
  }]);
8815
- class We extends _ {
8815
+ class He extends _ {
8816
8816
  constructor(e) {
8817
- super(), this.candidateInit = "", this.target = Ie.PUBLISHER, l.util.initPartial(e, this);
8817
+ super(), this.candidateInit = "", this.target = Re.PUBLISHER, l.util.initPartial(e, this);
8818
8818
  }
8819
8819
  static fromBinary(e, t) {
8820
- return new We().fromBinary(e, t);
8820
+ return new He().fromBinary(e, t);
8821
8821
  }
8822
8822
  static fromJson(e, t) {
8823
- return new We().fromJson(e, t);
8823
+ return new He().fromJson(e, t);
8824
8824
  }
8825
8825
  static fromJsonString(e, t) {
8826
- return new We().fromJsonString(e, t);
8826
+ return new He().fromJsonString(e, t);
8827
8827
  }
8828
8828
  static equals(e, t) {
8829
- return l.util.equals(We, e, t);
8829
+ return l.util.equals(He, e, t);
8830
8830
  }
8831
8831
  }
8832
- We.runtime = l;
8833
- We.typeName = "livekit.TrickleRequest";
8834
- We.fields = l.util.newFieldList(() => [{
8832
+ He.runtime = l;
8833
+ He.typeName = "livekit.TrickleRequest";
8834
+ He.fields = l.util.newFieldList(() => [{
8835
8835
  no: 1,
8836
8836
  name: "candidateInit",
8837
8837
  kind: "scalar",
@@ -8841,28 +8841,28 @@ We.fields = l.util.newFieldList(() => [{
8841
8841
  no: 2,
8842
8842
  name: "target",
8843
8843
  kind: "enum",
8844
- T: l.getEnumType(Ie)
8844
+ T: l.getEnumType(Re)
8845
8845
  }]);
8846
- class Ge extends _ {
8846
+ class We extends _ {
8847
8847
  constructor(e) {
8848
8848
  super(), this.sid = "", this.muted = !1, l.util.initPartial(e, this);
8849
8849
  }
8850
8850
  static fromBinary(e, t) {
8851
- return new Ge().fromBinary(e, t);
8851
+ return new We().fromBinary(e, t);
8852
8852
  }
8853
8853
  static fromJson(e, t) {
8854
- return new Ge().fromJson(e, t);
8854
+ return new We().fromJson(e, t);
8855
8855
  }
8856
8856
  static fromJsonString(e, t) {
8857
- return new Ge().fromJsonString(e, t);
8857
+ return new We().fromJsonString(e, t);
8858
8858
  }
8859
8859
  static equals(e, t) {
8860
- return l.util.equals(Ge, e, t);
8860
+ return l.util.equals(We, e, t);
8861
8861
  }
8862
8862
  }
8863
- Ge.runtime = l;
8864
- Ge.typeName = "livekit.MuteTrackRequest";
8865
- Ge.fields = l.util.newFieldList(() => [{
8863
+ We.runtime = l;
8864
+ We.typeName = "livekit.MuteTrackRequest";
8865
+ We.fields = l.util.newFieldList(() => [{
8866
8866
  no: 1,
8867
8867
  name: "sid",
8868
8868
  kind: "scalar",
@@ -8920,7 +8920,7 @@ xt.fields = l.util.newFieldList(() => [{
8920
8920
  no: 5,
8921
8921
  name: "ice_servers",
8922
8922
  kind: "message",
8923
- T: dt,
8923
+ T: ut,
8924
8924
  repeated: !0
8925
8925
  }, {
8926
8926
  no: 6,
@@ -8938,7 +8938,7 @@ xt.fields = l.util.newFieldList(() => [{
8938
8938
  no: 8,
8939
8939
  name: "client_configuration",
8940
8940
  kind: "message",
8941
- T: st
8941
+ T: nt
8942
8942
  }, {
8943
8943
  no: 9,
8944
8944
  name: "server_region",
@@ -8992,34 +8992,34 @@ At.fields = l.util.newFieldList(() => [{
8992
8992
  no: 1,
8993
8993
  name: "ice_servers",
8994
8994
  kind: "message",
8995
- T: dt,
8995
+ T: ut,
8996
8996
  repeated: !0
8997
8997
  }, {
8998
8998
  no: 2,
8999
8999
  name: "client_configuration",
9000
9000
  kind: "message",
9001
- T: st
9001
+ T: nt
9002
9002
  }]);
9003
- class ze extends _ {
9003
+ class Ge extends _ {
9004
9004
  constructor(e) {
9005
9005
  super(), this.cid = "", l.util.initPartial(e, this);
9006
9006
  }
9007
9007
  static fromBinary(e, t) {
9008
- return new ze().fromBinary(e, t);
9008
+ return new Ge().fromBinary(e, t);
9009
9009
  }
9010
9010
  static fromJson(e, t) {
9011
- return new ze().fromJson(e, t);
9011
+ return new Ge().fromJson(e, t);
9012
9012
  }
9013
9013
  static fromJsonString(e, t) {
9014
- return new ze().fromJsonString(e, t);
9014
+ return new Ge().fromJsonString(e, t);
9015
9015
  }
9016
9016
  static equals(e, t) {
9017
- return l.util.equals(ze, e, t);
9017
+ return l.util.equals(Ge, e, t);
9018
9018
  }
9019
9019
  }
9020
- ze.runtime = l;
9021
- ze.typeName = "livekit.TrackPublishedResponse";
9022
- ze.fields = l.util.newFieldList(() => [{
9020
+ Ge.runtime = l;
9021
+ Ge.typeName = "livekit.TrackPublishedResponse";
9022
+ Ge.fields = l.util.newFieldList(() => [{
9023
9023
  no: 1,
9024
9024
  name: "cid",
9025
9025
  kind: "scalar",
@@ -9029,7 +9029,7 @@ ze.fields = l.util.newFieldList(() => [{
9029
9029
  no: 2,
9030
9030
  name: "track",
9031
9031
  kind: "message",
9032
- T: _e
9032
+ T: Pe
9033
9033
  }]);
9034
9034
  class Ot extends _ {
9035
9035
  constructor(e) {
@@ -9057,26 +9057,26 @@ Ot.fields = l.util.newFieldList(() => [{
9057
9057
  T: 9
9058
9058
  /* ScalarType.STRING */
9059
9059
  }]);
9060
- class Ce extends _ {
9060
+ class Se extends _ {
9061
9061
  constructor(e) {
9062
9062
  super(), this.type = "", this.sdp = "", l.util.initPartial(e, this);
9063
9063
  }
9064
9064
  static fromBinary(e, t) {
9065
- return new Ce().fromBinary(e, t);
9065
+ return new Se().fromBinary(e, t);
9066
9066
  }
9067
9067
  static fromJson(e, t) {
9068
- return new Ce().fromJson(e, t);
9068
+ return new Se().fromJson(e, t);
9069
9069
  }
9070
9070
  static fromJsonString(e, t) {
9071
- return new Ce().fromJsonString(e, t);
9071
+ return new Se().fromJsonString(e, t);
9072
9072
  }
9073
9073
  static equals(e, t) {
9074
- return l.util.equals(Ce, e, t);
9074
+ return l.util.equals(Se, e, t);
9075
9075
  }
9076
9076
  }
9077
- Ce.runtime = l;
9078
- Ce.typeName = "livekit.SessionDescription";
9079
- Ce.fields = l.util.newFieldList(() => [{
9077
+ Se.runtime = l;
9078
+ Se.typeName = "livekit.SessionDescription";
9079
+ Se.fields = l.util.newFieldList(() => [{
9080
9080
  no: 1,
9081
9081
  name: "type",
9082
9082
  kind: "scalar",
@@ -9115,26 +9115,26 @@ Lt.fields = l.util.newFieldList(() => [{
9115
9115
  T: De,
9116
9116
  repeated: !0
9117
9117
  }]);
9118
- class je extends _ {
9118
+ class Je extends _ {
9119
9119
  constructor(e) {
9120
9120
  super(), this.trackSids = [], this.subscribe = !1, this.participantTracks = [], l.util.initPartial(e, this);
9121
9121
  }
9122
9122
  static fromBinary(e, t) {
9123
- return new je().fromBinary(e, t);
9123
+ return new Je().fromBinary(e, t);
9124
9124
  }
9125
9125
  static fromJson(e, t) {
9126
- return new je().fromJson(e, t);
9126
+ return new Je().fromJson(e, t);
9127
9127
  }
9128
9128
  static fromJsonString(e, t) {
9129
- return new je().fromJsonString(e, t);
9129
+ return new Je().fromJsonString(e, t);
9130
9130
  }
9131
9131
  static equals(e, t) {
9132
- return l.util.equals(je, e, t);
9132
+ return l.util.equals(Je, e, t);
9133
9133
  }
9134
9134
  }
9135
- je.runtime = l;
9136
- je.typeName = "livekit.UpdateSubscription";
9137
- je.fields = l.util.newFieldList(() => [{
9135
+ Je.runtime = l;
9136
+ Je.typeName = "livekit.UpdateSubscription";
9137
+ Je.fields = l.util.newFieldList(() => [{
9138
9138
  no: 1,
9139
9139
  name: "track_sids",
9140
9140
  kind: "scalar",
@@ -9150,29 +9150,29 @@ je.fields = l.util.newFieldList(() => [{
9150
9150
  no: 3,
9151
9151
  name: "participant_tracks",
9152
9152
  kind: "message",
9153
- T: nt,
9153
+ T: it,
9154
9154
  repeated: !0
9155
9155
  }]);
9156
- class ot extends _ {
9156
+ class at extends _ {
9157
9157
  constructor(e) {
9158
- super(), this.trackSids = [], this.disabled = !1, this.quality = ue.LOW, this.width = 0, this.height = 0, this.fps = 0, this.priority = 0, l.util.initPartial(e, this);
9158
+ super(), this.trackSids = [], this.disabled = !1, this.quality = oe.LOW, this.width = 0, this.height = 0, this.fps = 0, this.priority = 0, l.util.initPartial(e, this);
9159
9159
  }
9160
9160
  static fromBinary(e, t) {
9161
- return new ot().fromBinary(e, t);
9161
+ return new at().fromBinary(e, t);
9162
9162
  }
9163
9163
  static fromJson(e, t) {
9164
- return new ot().fromJson(e, t);
9164
+ return new at().fromJson(e, t);
9165
9165
  }
9166
9166
  static fromJsonString(e, t) {
9167
- return new ot().fromJsonString(e, t);
9167
+ return new at().fromJsonString(e, t);
9168
9168
  }
9169
9169
  static equals(e, t) {
9170
- return l.util.equals(ot, e, t);
9170
+ return l.util.equals(at, e, t);
9171
9171
  }
9172
9172
  }
9173
- ot.runtime = l;
9174
- ot.typeName = "livekit.UpdateTrackSettings";
9175
- ot.fields = l.util.newFieldList(() => [{
9173
+ at.runtime = l;
9174
+ at.typeName = "livekit.UpdateTrackSettings";
9175
+ at.fields = l.util.newFieldList(() => [{
9176
9176
  no: 1,
9177
9177
  name: "track_sids",
9178
9178
  kind: "scalar",
@@ -9188,7 +9188,7 @@ ot.fields = l.util.newFieldList(() => [{
9188
9188
  no: 4,
9189
9189
  name: "quality",
9190
9190
  kind: "enum",
9191
- T: l.getEnumType(ue)
9191
+ T: l.getEnumType(oe)
9192
9192
  }, {
9193
9193
  no: 5,
9194
9194
  name: "width",
@@ -9214,26 +9214,26 @@ ot.fields = l.util.newFieldList(() => [{
9214
9214
  T: 13
9215
9215
  /* ScalarType.UINT32 */
9216
9216
  }]);
9217
- class Ve extends _ {
9217
+ class je extends _ {
9218
9218
  constructor(e) {
9219
9219
  super(), this.canReconnect = !1, this.reason = Wt.UNKNOWN_REASON, l.util.initPartial(e, this);
9220
9220
  }
9221
9221
  static fromBinary(e, t) {
9222
- return new Ve().fromBinary(e, t);
9222
+ return new je().fromBinary(e, t);
9223
9223
  }
9224
9224
  static fromJson(e, t) {
9225
- return new Ve().fromJson(e, t);
9225
+ return new je().fromJson(e, t);
9226
9226
  }
9227
9227
  static fromJsonString(e, t) {
9228
- return new Ve().fromJsonString(e, t);
9228
+ return new je().fromJsonString(e, t);
9229
9229
  }
9230
9230
  static equals(e, t) {
9231
- return l.util.equals(Ve, e, t);
9231
+ return l.util.equals(je, e, t);
9232
9232
  }
9233
9233
  }
9234
- Ve.runtime = l;
9235
- Ve.typeName = "livekit.LeaveRequest";
9236
- Ve.fields = l.util.newFieldList(() => [{
9234
+ je.runtime = l;
9235
+ je.typeName = "livekit.LeaveRequest";
9236
+ je.fields = l.util.newFieldList(() => [{
9237
9237
  no: 1,
9238
9238
  name: "can_reconnect",
9239
9239
  kind: "scalar",
@@ -9245,26 +9245,26 @@ Ve.fields = l.util.newFieldList(() => [{
9245
9245
  kind: "enum",
9246
9246
  T: l.getEnumType(Wt)
9247
9247
  }]);
9248
- class ct extends _ {
9248
+ class ot extends _ {
9249
9249
  constructor(e) {
9250
9250
  super(), this.trackSid = "", this.layers = [], l.util.initPartial(e, this);
9251
9251
  }
9252
9252
  static fromBinary(e, t) {
9253
- return new ct().fromBinary(e, t);
9253
+ return new ot().fromBinary(e, t);
9254
9254
  }
9255
9255
  static fromJson(e, t) {
9256
- return new ct().fromJson(e, t);
9256
+ return new ot().fromJson(e, t);
9257
9257
  }
9258
9258
  static fromJsonString(e, t) {
9259
- return new ct().fromJsonString(e, t);
9259
+ return new ot().fromJsonString(e, t);
9260
9260
  }
9261
9261
  static equals(e, t) {
9262
- return l.util.equals(ct, e, t);
9262
+ return l.util.equals(ot, e, t);
9263
9263
  }
9264
9264
  }
9265
- ct.runtime = l;
9266
- ct.typeName = "livekit.UpdateVideoLayers";
9267
- ct.fields = l.util.newFieldList(() => [{
9265
+ ot.runtime = l;
9266
+ ot.typeName = "livekit.UpdateVideoLayers";
9267
+ ot.fields = l.util.newFieldList(() => [{
9268
9268
  no: 1,
9269
9269
  name: "track_sid",
9270
9270
  kind: "scalar",
@@ -9274,29 +9274,29 @@ ct.fields = l.util.newFieldList(() => [{
9274
9274
  no: 2,
9275
9275
  name: "layers",
9276
9276
  kind: "message",
9277
- T: Se,
9277
+ T: Te,
9278
9278
  repeated: !0
9279
9279
  }]);
9280
- class ut extends _ {
9280
+ class ct extends _ {
9281
9281
  constructor(e) {
9282
9282
  super(), this.metadata = "", this.name = "", l.util.initPartial(e, this);
9283
9283
  }
9284
9284
  static fromBinary(e, t) {
9285
- return new ut().fromBinary(e, t);
9285
+ return new ct().fromBinary(e, t);
9286
9286
  }
9287
9287
  static fromJson(e, t) {
9288
- return new ut().fromJson(e, t);
9288
+ return new ct().fromJson(e, t);
9289
9289
  }
9290
9290
  static fromJsonString(e, t) {
9291
- return new ut().fromJsonString(e, t);
9291
+ return new ct().fromJsonString(e, t);
9292
9292
  }
9293
9293
  static equals(e, t) {
9294
- return l.util.equals(ut, e, t);
9294
+ return l.util.equals(ct, e, t);
9295
9295
  }
9296
9296
  }
9297
- ut.runtime = l;
9298
- ut.typeName = "livekit.UpdateParticipantMetadata";
9299
- ut.fields = l.util.newFieldList(() => [{
9297
+ ct.runtime = l;
9298
+ ct.typeName = "livekit.UpdateParticipantMetadata";
9299
+ ct.fields = l.util.newFieldList(() => [{
9300
9300
  no: 1,
9301
9301
  name: "metadata",
9302
9302
  kind: "scalar",
@@ -9309,26 +9309,26 @@ ut.fields = l.util.newFieldList(() => [{
9309
9309
  T: 9
9310
9310
  /* ScalarType.STRING */
9311
9311
  }]);
9312
- class dt extends _ {
9312
+ class ut extends _ {
9313
9313
  constructor(e) {
9314
9314
  super(), this.urls = [], this.username = "", this.credential = "", l.util.initPartial(e, this);
9315
9315
  }
9316
9316
  static fromBinary(e, t) {
9317
- return new dt().fromBinary(e, t);
9317
+ return new ut().fromBinary(e, t);
9318
9318
  }
9319
9319
  static fromJson(e, t) {
9320
- return new dt().fromJson(e, t);
9320
+ return new ut().fromJson(e, t);
9321
9321
  }
9322
9322
  static fromJsonString(e, t) {
9323
- return new dt().fromJsonString(e, t);
9323
+ return new ut().fromJsonString(e, t);
9324
9324
  }
9325
9325
  static equals(e, t) {
9326
- return l.util.equals(dt, e, t);
9326
+ return l.util.equals(ut, e, t);
9327
9327
  }
9328
9328
  }
9329
- dt.runtime = l;
9330
- dt.typeName = "livekit.ICEServer";
9331
- dt.fields = l.util.newFieldList(() => [{
9329
+ ut.runtime = l;
9330
+ ut.typeName = "livekit.ICEServer";
9331
+ ut.fields = l.util.newFieldList(() => [{
9332
9332
  no: 1,
9333
9333
  name: "urls",
9334
9334
  kind: "scalar",
@@ -9370,7 +9370,7 @@ Nt.fields = l.util.newFieldList(() => [{
9370
9370
  no: 1,
9371
9371
  name: "speakers",
9372
9372
  kind: "message",
9373
- T: tt,
9373
+ T: et,
9374
9374
  repeated: !0
9375
9375
  }]);
9376
9376
  class Dt extends _ {
@@ -9524,30 +9524,30 @@ Bt.fields = l.util.newFieldList(() => [{
9524
9524
  T: Ft,
9525
9525
  repeated: !0
9526
9526
  }]);
9527
- class Ke extends _ {
9527
+ class ze extends _ {
9528
9528
  constructor(e) {
9529
- super(), this.quality = ue.LOW, this.enabled = !1, l.util.initPartial(e, this);
9529
+ super(), this.quality = oe.LOW, this.enabled = !1, l.util.initPartial(e, this);
9530
9530
  }
9531
9531
  static fromBinary(e, t) {
9532
- return new Ke().fromBinary(e, t);
9532
+ return new ze().fromBinary(e, t);
9533
9533
  }
9534
9534
  static fromJson(e, t) {
9535
- return new Ke().fromJson(e, t);
9535
+ return new ze().fromJson(e, t);
9536
9536
  }
9537
9537
  static fromJsonString(e, t) {
9538
- return new Ke().fromJsonString(e, t);
9538
+ return new ze().fromJsonString(e, t);
9539
9539
  }
9540
9540
  static equals(e, t) {
9541
- return l.util.equals(Ke, e, t);
9541
+ return l.util.equals(ze, e, t);
9542
9542
  }
9543
9543
  }
9544
- Ke.runtime = l;
9545
- Ke.typeName = "livekit.SubscribedQuality";
9546
- Ke.fields = l.util.newFieldList(() => [{
9544
+ ze.runtime = l;
9545
+ ze.typeName = "livekit.SubscribedQuality";
9546
+ ze.fields = l.util.newFieldList(() => [{
9547
9547
  no: 1,
9548
9548
  name: "quality",
9549
9549
  kind: "enum",
9550
- T: l.getEnumType(ue)
9550
+ T: l.getEnumType(oe)
9551
9551
  }, {
9552
9552
  no: 2,
9553
9553
  name: "enabled",
@@ -9584,7 +9584,7 @@ Jt.fields = l.util.newFieldList(() => [{
9584
9584
  no: 2,
9585
9585
  name: "qualities",
9586
9586
  kind: "message",
9587
- T: Ke,
9587
+ T: ze,
9588
9588
  repeated: !0
9589
9589
  }]);
9590
9590
  class jt extends _ {
@@ -9616,7 +9616,7 @@ jt.fields = l.util.newFieldList(() => [{
9616
9616
  no: 2,
9617
9617
  name: "subscribed_qualities",
9618
9618
  kind: "message",
9619
- T: Ke,
9619
+ T: ze,
9620
9620
  repeated: !0
9621
9621
  }, {
9622
9622
  no: 3,
@@ -9625,26 +9625,26 @@ jt.fields = l.util.newFieldList(() => [{
9625
9625
  T: Jt,
9626
9626
  repeated: !0
9627
9627
  }]);
9628
- class lt extends _ {
9628
+ class dt extends _ {
9629
9629
  constructor(e) {
9630
9630
  super(), this.participantSid = "", this.allTracks = !1, this.trackSids = [], this.participantIdentity = "", l.util.initPartial(e, this);
9631
9631
  }
9632
9632
  static fromBinary(e, t) {
9633
- return new lt().fromBinary(e, t);
9633
+ return new dt().fromBinary(e, t);
9634
9634
  }
9635
9635
  static fromJson(e, t) {
9636
- return new lt().fromJson(e, t);
9636
+ return new dt().fromJson(e, t);
9637
9637
  }
9638
9638
  static fromJsonString(e, t) {
9639
- return new lt().fromJsonString(e, t);
9639
+ return new dt().fromJsonString(e, t);
9640
9640
  }
9641
9641
  static equals(e, t) {
9642
- return l.util.equals(lt, e, t);
9642
+ return l.util.equals(dt, e, t);
9643
9643
  }
9644
9644
  }
9645
- lt.runtime = l;
9646
- lt.typeName = "livekit.TrackPermission";
9647
- lt.fields = l.util.newFieldList(() => [{
9645
+ dt.runtime = l;
9646
+ dt.typeName = "livekit.TrackPermission";
9647
+ dt.fields = l.util.newFieldList(() => [{
9648
9648
  no: 1,
9649
9649
  name: "participant_sid",
9650
9650
  kind: "scalar",
@@ -9669,26 +9669,26 @@ lt.fields = l.util.newFieldList(() => [{
9669
9669
  T: 9
9670
9670
  /* ScalarType.STRING */
9671
9671
  }]);
9672
- class ht extends _ {
9672
+ class lt extends _ {
9673
9673
  constructor(e) {
9674
9674
  super(), this.allParticipants = !1, this.trackPermissions = [], l.util.initPartial(e, this);
9675
9675
  }
9676
9676
  static fromBinary(e, t) {
9677
- return new ht().fromBinary(e, t);
9677
+ return new lt().fromBinary(e, t);
9678
9678
  }
9679
9679
  static fromJson(e, t) {
9680
- return new ht().fromJson(e, t);
9680
+ return new lt().fromJson(e, t);
9681
9681
  }
9682
9682
  static fromJsonString(e, t) {
9683
- return new ht().fromJsonString(e, t);
9683
+ return new lt().fromJsonString(e, t);
9684
9684
  }
9685
9685
  static equals(e, t) {
9686
- return l.util.equals(ht, e, t);
9686
+ return l.util.equals(lt, e, t);
9687
9687
  }
9688
9688
  }
9689
- ht.runtime = l;
9690
- ht.typeName = "livekit.SubscriptionPermission";
9691
- ht.fields = l.util.newFieldList(() => [{
9689
+ lt.runtime = l;
9690
+ lt.typeName = "livekit.SubscriptionPermission";
9691
+ lt.fields = l.util.newFieldList(() => [{
9692
9692
  no: 1,
9693
9693
  name: "all_participants",
9694
9694
  kind: "scalar",
@@ -9698,7 +9698,7 @@ ht.fields = l.util.newFieldList(() => [{
9698
9698
  no: 2,
9699
9699
  name: "track_permissions",
9700
9700
  kind: "message",
9701
- T: lt,
9701
+ T: dt,
9702
9702
  repeated: !0
9703
9703
  }]);
9704
9704
  class Vt extends _ {
@@ -9739,73 +9739,73 @@ Vt.fields = l.util.newFieldList(() => [{
9739
9739
  T: 8
9740
9740
  /* ScalarType.BOOL */
9741
9741
  }]);
9742
- class ft extends _ {
9742
+ class ht extends _ {
9743
9743
  constructor(e) {
9744
9744
  super(), this.publishTracks = [], this.dataChannels = [], l.util.initPartial(e, this);
9745
9745
  }
9746
9746
  static fromBinary(e, t) {
9747
- return new ft().fromBinary(e, t);
9747
+ return new ht().fromBinary(e, t);
9748
9748
  }
9749
9749
  static fromJson(e, t) {
9750
- return new ft().fromJson(e, t);
9750
+ return new ht().fromJson(e, t);
9751
9751
  }
9752
9752
  static fromJsonString(e, t) {
9753
- return new ft().fromJsonString(e, t);
9753
+ return new ht().fromJsonString(e, t);
9754
9754
  }
9755
9755
  static equals(e, t) {
9756
- return l.util.equals(ft, e, t);
9756
+ return l.util.equals(ht, e, t);
9757
9757
  }
9758
9758
  }
9759
- ft.runtime = l;
9760
- ft.typeName = "livekit.SyncState";
9761
- ft.fields = l.util.newFieldList(() => [{
9759
+ ht.runtime = l;
9760
+ ht.typeName = "livekit.SyncState";
9761
+ ht.fields = l.util.newFieldList(() => [{
9762
9762
  no: 1,
9763
9763
  name: "answer",
9764
9764
  kind: "message",
9765
- T: Ce
9765
+ T: Se
9766
9766
  }, {
9767
9767
  no: 2,
9768
9768
  name: "subscription",
9769
9769
  kind: "message",
9770
- T: je
9770
+ T: Je
9771
9771
  }, {
9772
9772
  no: 3,
9773
9773
  name: "publish_tracks",
9774
9774
  kind: "message",
9775
- T: ze,
9775
+ T: Ge,
9776
9776
  repeated: !0
9777
9777
  }, {
9778
9778
  no: 4,
9779
9779
  name: "data_channels",
9780
9780
  kind: "message",
9781
- T: pt,
9781
+ T: ft,
9782
9782
  repeated: !0
9783
9783
  }, {
9784
9784
  no: 5,
9785
9785
  name: "offer",
9786
9786
  kind: "message",
9787
- T: Ce
9787
+ T: Se
9788
9788
  }]);
9789
- class pt extends _ {
9789
+ class ft extends _ {
9790
9790
  constructor(e) {
9791
- super(), this.label = "", this.id = 0, this.target = Ie.PUBLISHER, l.util.initPartial(e, this);
9791
+ super(), this.label = "", this.id = 0, this.target = Re.PUBLISHER, l.util.initPartial(e, this);
9792
9792
  }
9793
9793
  static fromBinary(e, t) {
9794
- return new pt().fromBinary(e, t);
9794
+ return new ft().fromBinary(e, t);
9795
9795
  }
9796
9796
  static fromJson(e, t) {
9797
- return new pt().fromJson(e, t);
9797
+ return new ft().fromJson(e, t);
9798
9798
  }
9799
9799
  static fromJsonString(e, t) {
9800
- return new pt().fromJsonString(e, t);
9800
+ return new ft().fromJsonString(e, t);
9801
9801
  }
9802
9802
  static equals(e, t) {
9803
- return l.util.equals(pt, e, t);
9803
+ return l.util.equals(ft, e, t);
9804
9804
  }
9805
9805
  }
9806
- pt.runtime = l;
9807
- pt.typeName = "livekit.DataChannelInfo";
9808
- pt.fields = l.util.newFieldList(() => [{
9806
+ ft.runtime = l;
9807
+ ft.typeName = "livekit.DataChannelInfo";
9808
+ ft.fields = l.util.newFieldList(() => [{
9809
9809
  no: 1,
9810
9810
  name: "label",
9811
9811
  kind: "scalar",
@@ -9821,30 +9821,30 @@ pt.fields = l.util.newFieldList(() => [{
9821
9821
  no: 3,
9822
9822
  name: "target",
9823
9823
  kind: "enum",
9824
- T: l.getEnumType(Ie)
9824
+ T: l.getEnumType(Re)
9825
9825
  }]);
9826
- class be extends _ {
9826
+ class ye extends _ {
9827
9827
  constructor(e) {
9828
9828
  super(), this.scenario = {
9829
9829
  case: void 0
9830
9830
  }, l.util.initPartial(e, this);
9831
9831
  }
9832
9832
  static fromBinary(e, t) {
9833
- return new be().fromBinary(e, t);
9833
+ return new ye().fromBinary(e, t);
9834
9834
  }
9835
9835
  static fromJson(e, t) {
9836
- return new be().fromJson(e, t);
9836
+ return new ye().fromJson(e, t);
9837
9837
  }
9838
9838
  static fromJsonString(e, t) {
9839
- return new be().fromJsonString(e, t);
9839
+ return new ye().fromJsonString(e, t);
9840
9840
  }
9841
9841
  static equals(e, t) {
9842
- return l.util.equals(be, e, t);
9842
+ return l.util.equals(ye, e, t);
9843
9843
  }
9844
9844
  }
9845
- be.runtime = l;
9846
- be.typeName = "livekit.SimulateScenario";
9847
- be.fields = l.util.newFieldList(() => [{
9845
+ ye.runtime = l;
9846
+ ye.typeName = "livekit.SimulateScenario";
9847
+ ye.fields = l.util.newFieldList(() => [{
9848
9848
  no: 1,
9849
9849
  name: "speaker_update",
9850
9850
  kind: "scalar",
@@ -9881,26 +9881,26 @@ be.fields = l.util.newFieldList(() => [{
9881
9881
  T: 3,
9882
9882
  oneof: "scenario"
9883
9883
  }]);
9884
- class mt extends _ {
9884
+ class pt extends _ {
9885
9885
  constructor(e) {
9886
9886
  super(), this.timestamp = V.zero, this.rtt = V.zero, l.util.initPartial(e, this);
9887
9887
  }
9888
9888
  static fromBinary(e, t) {
9889
- return new mt().fromBinary(e, t);
9889
+ return new pt().fromBinary(e, t);
9890
9890
  }
9891
9891
  static fromJson(e, t) {
9892
- return new mt().fromJson(e, t);
9892
+ return new pt().fromJson(e, t);
9893
9893
  }
9894
9894
  static fromJsonString(e, t) {
9895
- return new mt().fromJsonString(e, t);
9895
+ return new pt().fromJsonString(e, t);
9896
9896
  }
9897
9897
  static equals(e, t) {
9898
- return l.util.equals(mt, e, t);
9898
+ return l.util.equals(pt, e, t);
9899
9899
  }
9900
9900
  }
9901
- mt.runtime = l;
9902
- mt.typeName = "livekit.Ping";
9903
- mt.fields = l.util.newFieldList(() => [{
9901
+ pt.runtime = l;
9902
+ pt.typeName = "livekit.Ping";
9903
+ pt.fields = l.util.newFieldList(() => [{
9904
9904
  no: 1,
9905
9905
  name: "timestamp",
9906
9906
  kind: "scalar",
@@ -10045,7 +10045,7 @@ class Ri extends Error {
10045
10045
  super(t || "an error has occured"), this.code = e;
10046
10046
  }
10047
10047
  }
10048
- class ne extends Ri {
10048
+ class ie extends Ri {
10049
10049
  constructor(e, t, n) {
10050
10050
  super(1, e), this.status = n, this.reason = t;
10051
10051
  }
@@ -10055,7 +10055,7 @@ class Ls extends Ri {
10055
10055
  super(21, e ?? "device is unsupported");
10056
10056
  }
10057
10057
  }
10058
- class Ze extends Ri {
10058
+ class Qe extends Ri {
10059
10059
  constructor(e) {
10060
10060
  super(20, e ?? "track is invalid");
10061
10061
  }
@@ -10065,7 +10065,7 @@ class ld extends Ri {
10065
10065
  super(10, e ?? "unsupported server");
10066
10066
  }
10067
10067
  }
10068
- class me extends Ri {
10068
+ class pe extends Ri {
10069
10069
  constructor(e) {
10070
10070
  super(12, e ?? "unexpected connection state");
10071
10071
  }
@@ -10086,18 +10086,18 @@ var In;
10086
10086
  }
10087
10087
  i.getFailure = e;
10088
10088
  })(In || (In = {}));
10089
- class ye {
10089
+ class ve {
10090
10090
  }
10091
- ye.setTimeout = function() {
10091
+ ve.setTimeout = function() {
10092
10092
  return setTimeout(...arguments);
10093
10093
  };
10094
- ye.setInterval = function() {
10094
+ ve.setInterval = function() {
10095
10095
  return setInterval(...arguments);
10096
10096
  };
10097
- ye.clearTimeout = function() {
10097
+ ve.clearTimeout = function() {
10098
10098
  return clearTimeout(...arguments);
10099
10099
  };
10100
- ye.clearInterval = function() {
10100
+ ve.clearInterval = function() {
10101
10101
  return clearInterval(...arguments);
10102
10102
  };
10103
10103
  const hd = /version\/(\d+(\.?_?\d+)+)/i;
@@ -10243,7 +10243,7 @@ var R;
10243
10243
  i.Message = "message", i.Muted = "muted", i.Unmuted = "unmuted", i.Restarted = "restarted", i.Ended = "ended", i.Subscribed = "subscribed", i.Unsubscribed = "unsubscribed", i.UpdateSettings = "updateSettings", i.UpdateSubscription = "updateSubscription", i.AudioPlaybackStarted = "audioPlaybackStarted", i.AudioPlaybackFailed = "audioPlaybackFailed", i.AudioSilenceDetected = "audioSilenceDetected", i.VisibilityChanged = "visibilityChanged", i.VideoDimensionsChanged = "videoDimensionsChanged", i.ElementAttached = "elementAttached", i.ElementDetached = "elementDetached", i.UpstreamPaused = "upstreamPaused", i.UpstreamResumed = "upstreamResumed", i.SubscriptionPermissionChanged = "subscriptionPermissionChanged", i.SubscriptionStatusChanged = "subscriptionStatusChanged", i.SubscriptionFailed = "subscriptionFailed";
10244
10244
  })(R || (R = {}));
10245
10245
  const bd = 5e3, Di = [];
10246
- class C extends gt.EventEmitter {
10246
+ class C extends mt.EventEmitter {
10247
10247
  constructor(e, t) {
10248
10248
  super(), this.attachedElements = [], this.isMuted = !1, this.streamState = C.StreamState.Active, this.isInBackground = !1, this._currentBitrate = 0, this.appVisibilityChangedListener = () => {
10249
10249
  this.backgroundTimeout && clearTimeout(this.backgroundTimeout), document.visibilityState === "hidden" ? this.backgroundTimeout = setTimeout(() => this.handleAppVisibilityChanged(), bd) : this.handleAppVisibilityChanged();
@@ -10319,10 +10319,10 @@ class C extends gt.EventEmitter {
10319
10319
  });
10320
10320
  }
10321
10321
  addAppVisibilityListener() {
10322
- xe() ? (this.isInBackground = document.visibilityState === "hidden", document.addEventListener("visibilitychange", this.appVisibilityChangedListener)) : this.isInBackground = !1;
10322
+ _e() ? (this.isInBackground = document.visibilityState === "hidden", document.addEventListener("visibilitychange", this.appVisibilityChangedListener)) : this.isInBackground = !1;
10323
10323
  }
10324
10324
  removeAppVisibilityListener() {
10325
- xe() && document.removeEventListener("visibilitychange", this.appVisibilityChangedListener);
10325
+ _e() && document.removeEventListener("visibilitychange", this.appVisibilityChangedListener);
10326
10326
  }
10327
10327
  }
10328
10328
  function yi(i, e) {
@@ -10358,19 +10358,19 @@ function Si(i, e) {
10358
10358
  function s(u) {
10359
10359
  switch (u) {
10360
10360
  case e.Audio:
10361
- return ve.AUDIO;
10361
+ return ge.AUDIO;
10362
10362
  case e.Video:
10363
- return ve.VIDEO;
10363
+ return ge.VIDEO;
10364
10364
  default:
10365
- return ve.DATA;
10365
+ return ge.DATA;
10366
10366
  }
10367
10367
  }
10368
10368
  i.kindToProto = s;
10369
10369
  function r(u) {
10370
10370
  switch (u) {
10371
- case ve.AUDIO:
10371
+ case ge.AUDIO:
10372
10372
  return e.Audio;
10373
- case ve.VIDEO:
10373
+ case ge.VIDEO:
10374
10374
  return e.Video;
10375
10375
  default:
10376
10376
  return e.Unknown;
@@ -10380,27 +10380,27 @@ function Si(i, e) {
10380
10380
  function a(u) {
10381
10381
  switch (u) {
10382
10382
  case t.Camera:
10383
- return re.CAMERA;
10383
+ return se.CAMERA;
10384
10384
  case t.Microphone:
10385
- return re.MICROPHONE;
10385
+ return se.MICROPHONE;
10386
10386
  case t.ScreenShare:
10387
- return re.SCREEN_SHARE;
10387
+ return se.SCREEN_SHARE;
10388
10388
  case t.ScreenShareAudio:
10389
- return re.SCREEN_SHARE_AUDIO;
10389
+ return se.SCREEN_SHARE_AUDIO;
10390
10390
  default:
10391
- return re.UNKNOWN;
10391
+ return se.UNKNOWN;
10392
10392
  }
10393
10393
  }
10394
10394
  i.sourceToProto = a;
10395
10395
  function o(u) {
10396
10396
  switch (u) {
10397
- case re.CAMERA:
10397
+ case se.CAMERA:
10398
10398
  return t.Camera;
10399
- case re.MICROPHONE:
10399
+ case se.MICROPHONE:
10400
10400
  return t.Microphone;
10401
- case re.SCREEN_SHARE:
10401
+ case se.SCREEN_SHARE:
10402
10402
  return t.ScreenShare;
10403
- case re.SCREEN_SHARE_AUDIO:
10403
+ case se.SCREEN_SHARE_AUDIO:
10404
10404
  return t.ScreenShareAudio;
10405
10405
  default:
10406
10406
  return t.Unknown;
@@ -10561,7 +10561,7 @@ const Rd = {
10561
10561
  Firefox: "100"
10562
10562
  };
10563
10563
  function _d(i) {
10564
- if (!xe() || !("setCodecPreferences" in i))
10564
+ if (!_e() || !("setCodecPreferences" in i))
10565
10565
  return !1;
10566
10566
  const e = _i();
10567
10567
  if (!(e != null && e.name) || !e.version)
@@ -10582,9 +10582,9 @@ function Fn() {
10582
10582
  return ((i = _i()) === null || i === void 0 ? void 0 : i.name) === "Safari";
10583
10583
  }
10584
10584
  function no() {
10585
- return xe() ? /Tablet|iPad|Mobile|Android|BlackBerry/.test(navigator.userAgent) : !1;
10585
+ return _e() ? /Tablet|iPad|Mobile|Android|BlackBerry/.test(navigator.userAgent) : !1;
10586
10586
  }
10587
- function xe() {
10587
+ function _e() {
10588
10588
  return typeof document < "u";
10589
10589
  }
10590
10590
  function ci() {
@@ -10605,7 +10605,7 @@ function ro() {
10605
10605
  return i.platform;
10606
10606
  }
10607
10607
  function mr() {
10608
- if (xe())
10608
+ if (_e())
10609
10609
  return window.devicePixelRatio;
10610
10610
  if (ci()) {
10611
10611
  let i = so();
@@ -10792,9 +10792,9 @@ class Ds {
10792
10792
  const r = Od(), a = Fd(t, r, n);
10793
10793
  return new Promise((o, c) => g(this, void 0, void 0, function* () {
10794
10794
  const u = () => g(this, void 0, void 0, function* () {
10795
- this.close(), clearTimeout(d), c(new ne("room connection has been cancelled (signal)"));
10795
+ this.close(), clearTimeout(d), c(new ie("room connection has been cancelled (signal)"));
10796
10796
  }), d = setTimeout(() => {
10797
- this.close(), c(new ne("room connection has timed out (signal)"));
10797
+ this.close(), c(new ie("room connection has timed out (signal)"));
10798
10798
  }, n.websocketTimeout);
10799
10799
  s != null && s.aborted && u(), s == null || s.addEventListener("abort", u), p.debug("connecting to ".concat(e + a)), this.ws && (yield this.close()), this.ws = new WebSocket(e + a), this.ws.binaryType = "arraybuffer", this.ws.onopen = () => {
10800
10800
  clearTimeout(d);
@@ -10805,11 +10805,11 @@ class Ds {
10805
10805
  const f = yield fetch("http".concat(e.substring(2), "/validate").concat(a));
10806
10806
  if (f.status.toFixed(0).startsWith("4")) {
10807
10807
  const m = yield f.text();
10808
- c(new ne(m, 0, f.status));
10808
+ c(new ie(m, 0, f.status));
10809
10809
  } else
10810
- c(new ne("Internal error", 2, f.status));
10810
+ c(new ie("Internal error", 2, f.status));
10811
10811
  } catch {
10812
- c(new ne(
10812
+ c(new ie(
10813
10813
  "server was not reachable",
10814
10814
  1
10815
10815
  /* ConnectionErrorReason.ServerUnreachable */
@@ -10823,9 +10823,9 @@ class Ds {
10823
10823
  let w;
10824
10824
  if (typeof h.data == "string") {
10825
10825
  const I = JSON.parse(h.data);
10826
- w = at.fromJson(I);
10826
+ w = rt.fromJson(I);
10827
10827
  } else if (h.data instanceof ArrayBuffer)
10828
- w = at.fromBinary(new Uint8Array(h.data));
10828
+ w = rt.fromBinary(new Uint8Array(h.data));
10829
10829
  else {
10830
10830
  p.error("could not decode websocket message: ".concat(typeof h.data));
10831
10831
  return;
@@ -10835,7 +10835,7 @@ class Ds {
10835
10835
  if (((f = w.message) === null || f === void 0 ? void 0 : f.case) === "join" ? (this.isConnected = !0, s == null || s.removeEventListener("abort", u), this.pingTimeoutDuration = w.message.value.pingTimeout, this.pingIntervalDuration = w.message.value.pingInterval, this.pingTimeoutDuration && this.pingTimeoutDuration > 0 && (p.debug("ping config", {
10836
10836
  timeout: this.pingTimeoutDuration,
10837
10837
  interval: this.pingIntervalDuration
10838
- }), this.startPingInterval()), o(w.message.value)) : n.reconnect ? (this.isConnected = !0, s == null || s.removeEventListener("abort", u), this.startPingInterval(), ((m = w.message) === null || m === void 0 ? void 0 : m.case) === "reconnect" ? o((b = w.message) === null || b === void 0 ? void 0 : b.value) : (o(), I = !0)) : n.reconnect || c(new ne("did not receive join response, got ".concat((T = w.message) === null || T === void 0 ? void 0 : T.case, " instead"))), !I)
10838
+ }), this.startPingInterval()), o(w.message.value)) : n.reconnect ? (this.isConnected = !0, s == null || s.removeEventListener("abort", u), this.startPingInterval(), ((m = w.message) === null || m === void 0 ? void 0 : m.case) === "reconnect" ? o((b = w.message) === null || b === void 0 ? void 0 : b.value) : (o(), I = !0)) : n.reconnect || c(new ie("did not receive join response, got ".concat((T = w.message) === null || T === void 0 ? void 0 : T.case, " instead"))), !I)
10839
10839
  return;
10840
10840
  }
10841
10841
  this.signalLatency && (yield si(this.signalLatency)), this.handleSignalResponse(w);
@@ -10881,7 +10881,7 @@ class Ds {
10881
10881
  sendIceCandidate(e, t) {
10882
10882
  return p.trace("sending ice candidate", e), this.sendRequest({
10883
10883
  case: "trickle",
10884
- value: new We({
10884
+ value: new He({
10885
10885
  candidateInit: JSON.stringify(e),
10886
10886
  target: t
10887
10887
  })
@@ -10890,7 +10890,7 @@ class Ds {
10890
10890
  sendMuteTrack(e, t) {
10891
10891
  return this.sendRequest({
10892
10892
  case: "mute",
10893
- value: new Ge({
10893
+ value: new We({
10894
10894
  sid: e,
10895
10895
  muted: t
10896
10896
  })
@@ -10905,7 +10905,7 @@ class Ds {
10905
10905
  sendUpdateLocalMetadata(e, t) {
10906
10906
  return this.sendRequest({
10907
10907
  case: "updateMetadata",
10908
- value: new ut({
10908
+ value: new ct({
10909
10909
  metadata: e,
10910
10910
  name: t
10911
10911
  })
@@ -10932,7 +10932,7 @@ class Ds {
10932
10932
  sendUpdateVideoLayers(e, t) {
10933
10933
  return this.sendRequest({
10934
10934
  case: "updateLayers",
10935
- value: new ct({
10935
+ value: new ot({
10936
10936
  trackSid: e,
10937
10937
  layers: t
10938
10938
  })
@@ -10941,7 +10941,7 @@ class Ds {
10941
10941
  sendUpdateSubscriptionPermissions(e, t) {
10942
10942
  return this.sendRequest({
10943
10943
  case: "subscriptionPermission",
10944
- value: new ht({
10944
+ value: new lt({
10945
10945
  allParticipants: e,
10946
10946
  trackPermissions: t
10947
10947
  })
@@ -10959,7 +10959,7 @@ class Ds {
10959
10959
  value: V.parse(Date.now())
10960
10960
  }), this.sendRequest({
10961
10961
  case: "pingReq",
10962
- value: new mt({
10962
+ value: new pt({
10963
10963
  timestamp: V.parse(Date.now()),
10964
10964
  rtt: V.parse(this.rtt)
10965
10965
  })
@@ -10968,7 +10968,7 @@ class Ds {
10968
10968
  sendLeave() {
10969
10969
  return this.sendRequest({
10970
10970
  case: "leave",
10971
- value: new Ve({
10971
+ value: new je({
10972
10972
  canReconnect: !1,
10973
10973
  reason: Wt.CLIENT_INITIATED
10974
10974
  })
@@ -11045,7 +11045,7 @@ class Ds {
11045
11045
  p.warn("ping timeout duration not set");
11046
11046
  return;
11047
11047
  }
11048
- this.pingTimeout = ye.setTimeout(() => {
11048
+ this.pingTimeout = ve.setTimeout(() => {
11049
11049
  p.warn("ping timeout triggered. last pong received at: ".concat(new Date(Date.now() - this.pingTimeoutDuration * 1e3).toUTCString())), this.handleOnClose("ping timeout");
11050
11050
  }, this.pingTimeoutDuration * 1e3);
11051
11051
  }
@@ -11053,19 +11053,19 @@ class Ds {
11053
11053
  * Clears ping timeout (does not start a new timeout)
11054
11054
  */
11055
11055
  clearPingTimeout() {
11056
- this.pingTimeout && ye.clearTimeout(this.pingTimeout);
11056
+ this.pingTimeout && ve.clearTimeout(this.pingTimeout);
11057
11057
  }
11058
11058
  startPingInterval() {
11059
11059
  if (this.clearPingInterval(), this.resetPingTimeout(), !this.pingIntervalDuration) {
11060
11060
  p.warn("ping interval duration not set");
11061
11061
  return;
11062
11062
  }
11063
- p.debug("start ping interval"), this.pingInterval = ye.setInterval(() => {
11063
+ p.debug("start ping interval"), this.pingInterval = ve.setInterval(() => {
11064
11064
  this.sendPing();
11065
11065
  }, this.pingIntervalDuration * 1e3);
11066
11066
  }
11067
11067
  clearPingInterval() {
11068
- p.debug("clearing ping interval"), this.clearPingTimeout(), this.pingInterval && ye.clearInterval(this.pingInterval);
11068
+ p.debug("clearing ping interval"), this.clearPingTimeout(), this.pingInterval && ve.clearInterval(this.pingInterval);
11069
11069
  }
11070
11070
  }
11071
11071
  function kr(i) {
@@ -11084,7 +11084,7 @@ function kr(i) {
11084
11084
  return e;
11085
11085
  }
11086
11086
  function An(i) {
11087
- return new Ce({
11087
+ return new Se({
11088
11088
  sdp: i.sdp,
11089
11089
  type: i.type
11090
11090
  });
@@ -11132,7 +11132,7 @@ function qd(i) {
11132
11132
  throw Error("Video codec not supported: ".concat(e));
11133
11133
  return e;
11134
11134
  }
11135
- class Ul extends gt.EventEmitter {
11135
+ class Ul extends mt.EventEmitter {
11136
11136
  constructor() {
11137
11137
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
11138
11138
  super(), this.onKeyRatcheted = (t, n) => {
@@ -11206,18 +11206,18 @@ function Ms(i, e, t) {
11206
11206
  }, f;
11207
11207
  }
11208
11208
  const Cr = "default";
11209
- class ke {
11209
+ class be {
11210
11210
  static getInstance() {
11211
- return this.instance === void 0 && (this.instance = new ke()), this.instance;
11211
+ return this.instance === void 0 && (this.instance = new be()), this.instance;
11212
11212
  }
11213
11213
  getDevices(e) {
11214
11214
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
11215
11215
  var n;
11216
11216
  return g(this, void 0, void 0, function* () {
11217
- if (((n = ke.userMediaPromiseMap) === null || n === void 0 ? void 0 : n.size) > 0) {
11217
+ if (((n = be.userMediaPromiseMap) === null || n === void 0 ? void 0 : n.size) > 0) {
11218
11218
  p.debug("awaiting getUserMedia promise");
11219
11219
  try {
11220
- e ? yield ke.userMediaPromiseMap.get(e) : yield Promise.all(ke.userMediaPromiseMap.values());
11220
+ e ? yield be.userMediaPromiseMap.get(e) : yield Promise.all(be.userMediaPromiseMap.values());
11221
11221
  } catch {
11222
11222
  p.warn("error waiting for media permissons");
11223
11223
  }
@@ -11248,11 +11248,11 @@ class ke {
11248
11248
  });
11249
11249
  }
11250
11250
  hasDeviceInUse(e) {
11251
- return e ? ke.userMediaPromiseMap.has(e) : ke.userMediaPromiseMap.size > 0;
11251
+ return e ? be.userMediaPromiseMap.has(e) : be.userMediaPromiseMap.size > 0;
11252
11252
  }
11253
11253
  }
11254
- ke.mediaDeviceKinds = ["audioinput", "audiooutput", "videoinput"];
11255
- ke.userMediaPromiseMap = /* @__PURE__ */ new Map();
11254
+ be.mediaDeviceKinds = ["audioinput", "audiooutput", "videoinput"];
11255
+ be.userMediaPromiseMap = /* @__PURE__ */ new Map();
11256
11256
  const Hd = 1e3;
11257
11257
  class nn extends C {
11258
11258
  get constraints() {
@@ -11335,7 +11335,7 @@ class nn extends C {
11335
11335
  return n;
11336
11336
  yield si(50);
11337
11337
  }
11338
- throw new Ze("unable to get track dimensions after timeout");
11338
+ throw new Qe("unable to get track dimensions after timeout");
11339
11339
  });
11340
11340
  }
11341
11341
  /**
@@ -11349,7 +11349,7 @@ class nn extends C {
11349
11349
  deviceId: e,
11350
11350
  groupId: t
11351
11351
  } = this._mediaStreamTrack.getSettings(), n = this.kind === C.Kind.Audio ? "audioinput" : "videoinput";
11352
- return ke.getInstance().normalizeDeviceId(n, e, t);
11352
+ return be.getInstance().normalizeDeviceId(n, e, t);
11353
11353
  });
11354
11354
  }
11355
11355
  mute() {
@@ -11366,7 +11366,7 @@ class nn extends C {
11366
11366
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
11367
11367
  return g(this, void 0, void 0, function* () {
11368
11368
  if (!this.sender)
11369
- throw new Ze("unable to replace an unpublished track");
11369
+ throw new Qe("unable to replace an unpublished track");
11370
11370
  return p.debug("replace MediaStreamTrack"), yield this.setMediaStreamTrack(e), this.providedByUser = t, this.processor && (yield this.stopProcessor()), this;
11371
11371
  });
11372
11372
  }
@@ -11511,7 +11511,7 @@ class nn extends C {
11511
11511
  });
11512
11512
  }
11513
11513
  }
11514
- class Wd extends gt.EventEmitter {
11514
+ class Wd extends mt.EventEmitter {
11515
11515
  constructor(e) {
11516
11516
  super(), this.onWorkerMessage = (t) => {
11517
11517
  var n, s;
@@ -11588,10 +11588,10 @@ class Wd extends gt.EventEmitter {
11588
11588
  });
11589
11589
  }
11590
11590
  setupEventListeners(e, t) {
11591
- e.on(P.TrackPublished, (n, s) => this.setParticipantCryptorEnabled(n.trackInfo.encryption !== Te.NONE, s.identity)), e.on(P.ConnectionStateChanged, (n) => {
11591
+ e.on(P.TrackPublished, (n, s) => this.setParticipantCryptorEnabled(n.trackInfo.encryption !== ke.NONE, s.identity)), e.on(P.ConnectionStateChanged, (n) => {
11592
11592
  n === Y.Connected && e.participants.forEach((s) => {
11593
11593
  s.tracks.forEach((r) => {
11594
- this.setParticipantCryptorEnabled(r.trackInfo.encryption !== Te.NONE, s.identity);
11594
+ this.setParticipantCryptorEnabled(r.trackInfo.encryption !== ke.NONE, s.identity);
11595
11595
  });
11596
11596
  });
11597
11597
  }).on(P.TrackUnsubscribed, (n, s, r) => {
@@ -12363,11 +12363,11 @@ const Er = 0.7, Ci = {
12363
12363
  NegotiationComplete: "negotiationComplete",
12364
12364
  RTPVideoPayloadTypes: "rtpVideoPayloadTypes"
12365
12365
  };
12366
- class Pr extends gt.EventEmitter {
12366
+ class Pr extends mt.EventEmitter {
12367
12367
  get pc() {
12368
12368
  if (this._pc)
12369
12369
  return this._pc;
12370
- throw new me("Expected peer connection to be available");
12370
+ throw new pe("Expected peer connection to be available");
12371
12371
  }
12372
12372
  constructor(e) {
12373
12373
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -12586,7 +12586,7 @@ var Le;
12586
12586
  (function(i) {
12587
12587
  i[i.New = 0] = "New", i[i.Connected = 1] = "Connected", i[i.Disconnected = 2] = "Disconnected", i[i.Reconnecting = 3] = "Reconnecting", i[i.Closed = 4] = "Closed";
12588
12588
  })(Le || (Le = {}));
12589
- class rl extends gt.EventEmitter {
12589
+ class rl extends mt.EventEmitter {
12590
12590
  get isClosed() {
12591
12591
  return this._isClosed;
12592
12592
  }
@@ -12619,7 +12619,7 @@ class rl extends gt.EventEmitter {
12619
12619
  p.error("unsupported data type", t.data);
12620
12620
  return;
12621
12621
  }
12622
- const o = et.fromBinary(new Uint8Array(a));
12622
+ const o = Ze.fromBinary(new Uint8Array(a));
12623
12623
  ((n = o.value) === null || n === void 0 ? void 0 : n.case) === "speaker" ? this.emit(O.ActiveSpeakersUpdate, o.value.value.speakers) : ((s = o.value) === null || s === void 0 ? void 0 : s.case) === "user" && this.emit(O.DataPacketReceived, o.value.value, o.kind);
12624
12624
  } finally {
12625
12625
  r();
@@ -12634,7 +12634,7 @@ class rl extends gt.EventEmitter {
12634
12634
  } else
12635
12635
  p.error("Unknown DataChannel error on ".concat(s), t);
12636
12636
  }, this.handleBufferedAmountLow = (t) => {
12637
- const s = t.currentTarget.maxRetransmits === 0 ? he.LOSSY : he.RELIABLE;
12637
+ const s = t.currentTarget.maxRetransmits === 0 ? de.LOSSY : de.RELIABLE;
12638
12638
  this.updateAndEmitDCBufferStatus(s);
12639
12639
  }, this.handleDisconnect = (t, n) => {
12640
12640
  if (this._isClosed)
@@ -12651,7 +12651,7 @@ class rl extends gt.EventEmitter {
12651
12651
  s(r);
12652
12652
  return;
12653
12653
  }
12654
- t === xr && (a = 0), p.debug("reconnecting in ".concat(a, "ms")), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = ye.setTimeout(() => this.attemptReconnect(n), a);
12654
+ t === xr && (a = 0), p.debug("reconnecting in ".concat(a, "ms")), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = ve.setTimeout(() => this.attemptReconnect(n), a);
12655
12655
  }, this.waitForRestarted = () => new Promise((t, n) => {
12656
12656
  this.pcState === Le.Connected && t();
12657
12657
  const s = () => {
@@ -12668,8 +12668,8 @@ class rl extends gt.EventEmitter {
12668
12668
  if (n)
12669
12669
  return n.bufferedAmount <= n.bufferedAmountLowThreshold;
12670
12670
  }, this.handleBrowserOnLine = () => {
12671
- this.client.isReconnecting && (this.clearReconnectTimeout(), this.attemptReconnect(Be.RR_SIGNAL_DISCONNECTED));
12672
- }, this.client = new Ds(), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new Gt(), this.dataProcessLock = new Gt(), this.dcBufferStatus = /* @__PURE__ */ new Map([[he.LOSSY, !0], [he.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(O.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(O.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(O.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(O.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(O.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(O.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(O.StreamStateChanged, t);
12671
+ this.client.isReconnecting && (this.clearReconnectTimeout(), this.attemptReconnect(Fe.RR_SIGNAL_DISCONNECTED));
12672
+ }, this.client = new Ds(), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new Gt(), this.dataProcessLock = new Gt(), this.dcBufferStatus = /* @__PURE__ */ new Map([[de.LOSSY, !0], [de.RELIABLE, !0]]), this.client.onParticipantUpdate = (t) => this.emit(O.ParticipantUpdate, t), this.client.onConnectionQuality = (t) => this.emit(O.ConnectionQualityUpdate, t), this.client.onRoomUpdate = (t) => this.emit(O.RoomUpdate, t), this.client.onSubscriptionError = (t) => this.emit(O.SubscriptionError, t), this.client.onSubscriptionPermissionUpdate = (t) => this.emit(O.SubscriptionPermissionUpdate, t), this.client.onSpeakersChanged = (t) => this.emit(O.SpeakersChanged, t), this.client.onStreamStateUpdate = (t) => this.emit(O.StreamStateChanged, t);
12673
12673
  }
12674
12674
  join(e, t, n, s) {
12675
12675
  return g(this, void 0, void 0, function* () {
@@ -12679,7 +12679,7 @@ class rl extends gt.EventEmitter {
12679
12679
  const r = yield this.client.join(e, t, n, s);
12680
12680
  return this._isClosed = !1, this.latestJoinResponse = r, this.subscriberPrimary = r.subscriberPrimary, this.publisher || this.configure(r), this.subscriberPrimary || this.negotiate(), this.clientConfiguration = r.clientConfiguration, r;
12681
12681
  } catch (r) {
12682
- if (r instanceof ne && r.reason === 1 && (p.warn("Couldn't connect to server, attempt ".concat(this.joinAttempts, " of ").concat(this.maxJoinAttempts)), this.joinAttempts < this.maxJoinAttempts))
12682
+ if (r instanceof ie && r.reason === 1 && (p.warn("Couldn't connect to server, attempt ".concat(this.joinAttempts, " of ").concat(this.maxJoinAttempts)), this.joinAttempts < this.maxJoinAttempts))
12683
12683
  return this.join(e, t, n, s);
12684
12684
  throw r;
12685
12685
  }
@@ -12724,10 +12724,10 @@ class rl extends gt.EventEmitter {
12724
12724
  }
12725
12725
  addTrack(e) {
12726
12726
  if (this.pendingTrackResolvers[e.cid])
12727
- throw new Ze("a track with the same ID has already been published");
12727
+ throw new Qe("a track with the same ID has already been published");
12728
12728
  return new Promise((t, n) => {
12729
12729
  const s = setTimeout(() => {
12730
- delete this.pendingTrackResolvers[e.cid], n(new ne("publication of local track timed out, no response from server"));
12730
+ delete this.pendingTrackResolvers[e.cid], n(new ie("publication of local track timed out, no response from server"));
12731
12731
  }, 1e4);
12732
12732
  this.pendingTrackResolvers[e.cid] = {
12733
12733
  resolve: (r) => {
@@ -12793,9 +12793,9 @@ class rl extends gt.EventEmitter {
12793
12793
  }]
12794
12794
  };
12795
12795
  this.publisher = new Pr(s, r), this.subscriber = new Pr(s), this.emit(O.TransportsCreated, this.publisher, this.subscriber), this.publisher.pc.onicecandidate = (u) => {
12796
- u.candidate && (p.trace("adding ICE candidate for peer", u.candidate), this.client.sendIceCandidate(u.candidate, Ie.PUBLISHER));
12796
+ u.candidate && (p.trace("adding ICE candidate for peer", u.candidate), this.client.sendIceCandidate(u.candidate, Re.PUBLISHER));
12797
12797
  }, this.subscriber.pc.onicecandidate = (u) => {
12798
- u.candidate && this.client.sendIceCandidate(u.candidate, Ie.SUBSCRIBER);
12798
+ u.candidate && this.client.sendIceCandidate(u.candidate, Re.SUBSCRIBER);
12799
12799
  }, this.publisher.onOffer = (u) => {
12800
12800
  this.client.sendOffer(u);
12801
12801
  };
@@ -12805,9 +12805,9 @@ class rl extends gt.EventEmitter {
12805
12805
  const u = this.pcState === Le.New;
12806
12806
  this.pcState = Le.Connected, u && this.emit(O.Connected, e);
12807
12807
  } else
12808
- a.connectionState === "failed" && this.pcState === Le.Connected && (this.pcState = Le.Disconnected, this.handleDisconnect("primary peerconnection", c ? Be.RR_SUBSCRIBER_FAILED : Be.RR_PUBLISHER_FAILED));
12808
+ a.connectionState === "failed" && this.pcState === Le.Connected && (this.pcState = Le.Disconnected, this.handleDisconnect("primary peerconnection", c ? Fe.RR_SUBSCRIBER_FAILED : Fe.RR_PUBLISHER_FAILED));
12809
12809
  }), o.onconnectionstatechange = () => g(this, void 0, void 0, function* () {
12810
- p.debug("secondary PC state changed ".concat(o.connectionState)), o.connectionState === "failed" && this.handleDisconnect("secondary peerconnection", c ? Be.RR_PUBLISHER_FAILED : Be.RR_SUBSCRIBER_FAILED);
12810
+ p.debug("secondary PC state changed ".concat(o.connectionState)), o.connectionState === "failed" && this.handleDisconnect("secondary peerconnection", c ? Fe.RR_PUBLISHER_FAILED : Fe.RR_SUBSCRIBER_FAILED);
12811
12811
  }), this.subscriber.pc.ontrack = (u) => {
12812
12812
  this.emit(O.MediaTrackAdded, u.track, u.streams[0], u.receiver);
12813
12813
  }, this.createDataChannels();
@@ -12822,7 +12822,7 @@ class rl extends gt.EventEmitter {
12822
12822
  !this.publisher || !this.subscriber || (p.trace("got ICE candidate from peer", {
12823
12823
  candidate: e,
12824
12824
  target: t
12825
- }), t === Ie.PUBLISHER ? this.publisher.addIceCandidate(e) : this.subscriber.addIceCandidate(e));
12825
+ }), t === Re.PUBLISHER ? this.publisher.addIceCandidate(e) : this.subscriber.addIceCandidate(e));
12826
12826
  }, this.client.onOffer = (e) => g(this, void 0, void 0, function* () {
12827
12827
  if (!this.subscriber)
12828
12828
  return;
@@ -12844,7 +12844,7 @@ class rl extends gt.EventEmitter {
12844
12844
  }, this.client.onTokenRefresh = (e) => {
12845
12845
  this.token = e;
12846
12846
  }, this.client.onClose = () => {
12847
- this.handleDisconnect("signal", Be.RR_SIGNAL_DISCONNECTED);
12847
+ this.handleDisconnect("signal", Fe.RR_SIGNAL_DISCONNECTED);
12848
12848
  }, this.client.onLeave = (e) => {
12849
12849
  e != null && e.canReconnect ? (this.fullReconnectOnNext = !0, this.primaryPC = void 0, this.handleDisconnect(xr)) : (this.emit(O.Disconnected, e == null ? void 0 : e.reason), this.close()), p.trace("leave request", {
12850
12850
  leave: e
@@ -12862,7 +12862,7 @@ class rl extends gt.EventEmitter {
12862
12862
  s.username && (r.username = s.username), s.credential && (r.credential = s.credential), n.push(r);
12863
12863
  }), t.iceServers = n;
12864
12864
  }
12865
- return e.clientConfiguration && e.clientConfiguration.forceRelay === Ye.ENABLED && (t.iceTransportPolicy = "relay"), t.sdpSemantics = "unified-plan", t.continualGatheringPolicy = "gather_continually", t;
12865
+ return e.clientConfiguration && e.clientConfiguration.forceRelay === Ke.ENABLED && (t.iceTransportPolicy = "relay"), t.sdpSemantics = "unified-plan", t.continualGatheringPolicy = "gather_continually", t;
12866
12866
  }
12867
12867
  createDataChannels() {
12868
12868
  this.publisher && (this.lossyDC && (this.lossyDC.onmessage = null, this.lossyDC.onerror = null), this.reliableDC && (this.reliableDC.onmessage = null, this.reliableDC.onerror = null), this.lossyDC = this.publisher.pc.createDataChannel(_r, {
@@ -12904,7 +12904,7 @@ class rl extends gt.EventEmitter {
12904
12904
  return yield this.createTransceiverRTCRtpSender(e, t, n);
12905
12905
  if (pr())
12906
12906
  return p.warn("using add-track fallback"), yield this.createRTCRtpSender(e.mediaStreamTrack);
12907
- throw new me("Required webRTC APIs not supported on this device");
12907
+ throw new pe("Required webRTC APIs not supported on this device");
12908
12908
  });
12909
12909
  }
12910
12910
  createSimulcastSender(e, t, n, s) {
@@ -12913,13 +12913,13 @@ class rl extends gt.EventEmitter {
12913
12913
  return this.createSimulcastTransceiverSender(e, t, n, s);
12914
12914
  if (pr())
12915
12915
  return p.debug("using add-track fallback"), this.createRTCRtpSender(e.mediaStreamTrack);
12916
- throw new me("Cannot stream on this device");
12916
+ throw new pe("Cannot stream on this device");
12917
12917
  });
12918
12918
  }
12919
12919
  createTransceiverRTCRtpSender(e, t, n) {
12920
12920
  return g(this, void 0, void 0, function* () {
12921
12921
  if (!this.publisher)
12922
- throw new me("publisher is closed");
12922
+ throw new pe("publisher is closed");
12923
12923
  const s = [];
12924
12924
  e.mediaStream && s.push(e.mediaStream);
12925
12925
  const r = {
@@ -12934,7 +12934,7 @@ class rl extends gt.EventEmitter {
12934
12934
  createSimulcastTransceiverSender(e, t, n, s) {
12935
12935
  return g(this, void 0, void 0, function* () {
12936
12936
  if (!this.publisher)
12937
- throw new me("publisher is closed");
12937
+ throw new pe("publisher is closed");
12938
12938
  const r = {
12939
12939
  direction: "sendonly"
12940
12940
  };
@@ -12947,7 +12947,7 @@ class rl extends gt.EventEmitter {
12947
12947
  createRTCRtpSender(e) {
12948
12948
  return g(this, void 0, void 0, function* () {
12949
12949
  if (!this.publisher)
12950
- throw new me("publisher is closed");
12950
+ throw new pe("publisher is closed");
12951
12951
  return this.publisher.pc.addTrack(e);
12952
12952
  });
12953
12953
  }
@@ -12955,7 +12955,7 @@ class rl extends gt.EventEmitter {
12955
12955
  var t, n, s;
12956
12956
  return g(this, void 0, void 0, function* () {
12957
12957
  if (!this._isClosed && !this.attemptingReconnect) {
12958
- (((t = this.clientConfiguration) === null || t === void 0 ? void 0 : t.resumeConnection) === Ye.DISABLED || // signaling state could change to closed due to hardware sleep
12958
+ (((t = this.clientConfiguration) === null || t === void 0 ? void 0 : t.resumeConnection) === Ke.DISABLED || // signaling state could change to closed due to hardware sleep
12959
12959
  // those connections cannot be resumed
12960
12960
  ((s = (n = this.primaryPC) === null || n === void 0 ? void 0 : n.signalingState) !== null && s !== void 0 ? s : "closed") === "closed") && (this.fullReconnectOnNext = !0);
12961
12961
  try {
@@ -12963,9 +12963,9 @@ class rl extends gt.EventEmitter {
12963
12963
  } catch (r) {
12964
12964
  this.reconnectAttempts += 1;
12965
12965
  let a = !0;
12966
- r instanceof me ? (p.debug("received unrecoverable error", {
12966
+ r instanceof pe ? (p.debug("received unrecoverable error", {
12967
12967
  error: r
12968
- }), a = !1) : r instanceof fn || (this.fullReconnectOnNext = !0), a ? this.handleDisconnect("reconnect", Be.RR_UNKNOWN) : (p.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up")), this.emit(O.Disconnected), yield this.close());
12968
+ }), a = !1) : r instanceof fn || (this.fullReconnectOnNext = !0), a ? this.handleDisconnect("reconnect", Fe.RR_UNKNOWN) : (p.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up")), this.emit(O.Disconnected), yield this.close());
12969
12969
  } finally {
12970
12970
  this.attemptingReconnect = !1;
12971
12971
  }
@@ -12987,7 +12987,7 @@ class rl extends gt.EventEmitter {
12987
12987
  return g(this, void 0, void 0, function* () {
12988
12988
  try {
12989
12989
  if (!this.url || !this.token)
12990
- throw new me("could not reconnect, url or token not saved");
12990
+ throw new pe("could not reconnect, url or token not saved");
12991
12991
  p.info("reconnecting, attempt: ".concat(this.reconnectAttempts)), this.emit(O.Restarting), this.client.isConnected && (yield this.client.sendLeave()), yield this.cleanupPeerConnections(), yield this.cleanupClient();
12992
12992
  let r;
12993
12993
  try {
@@ -12995,7 +12995,7 @@ class rl extends gt.EventEmitter {
12995
12995
  throw p.warn("attempted connection restart, without signal options present"), new fn();
12996
12996
  r = yield this.join(e ?? this.url, this.token, this.signalOpts);
12997
12997
  } catch (a) {
12998
- throw a instanceof ne && a.reason === 0 ? new me("could not reconnect, token might be expired") : new fn();
12998
+ throw a instanceof ie && a.reason === 0 ? new pe("could not reconnect, token might be expired") : new fn();
12999
12999
  }
13000
13000
  if (this.shouldFailNext)
13001
13001
  throw this.shouldFailNext = !1, new Error("simulated failure");
@@ -13014,9 +13014,9 @@ class rl extends gt.EventEmitter {
13014
13014
  var t;
13015
13015
  return g(this, void 0, void 0, function* () {
13016
13016
  if (!this.url || !this.token)
13017
- throw new me("could not reconnect, url or token not saved");
13017
+ throw new pe("could not reconnect, url or token not saved");
13018
13018
  if (!this.publisher || !this.subscriber)
13019
- throw new me("publisher and subscriber connections unset");
13019
+ throw new pe("publisher and subscriber connections unset");
13020
13020
  p.info("resuming signal connection, attempt ".concat(this.reconnectAttempts)), this.emit(O.Resuming);
13021
13021
  try {
13022
13022
  this.setupSignalClientCallbacks();
@@ -13027,7 +13027,7 @@ class rl extends gt.EventEmitter {
13027
13027
  }
13028
13028
  } catch (n) {
13029
13029
  let s = "";
13030
- throw n instanceof Error && (s = n.message), n instanceof ne && n.reason === 0 ? new me("could not reconnect, token might be expired") : new fn(s);
13030
+ throw n instanceof Error && (s = n.message), n instanceof ie && n.reason === 0 ? new pe("could not reconnect, token might be expired") : new fn(s);
13031
13031
  }
13032
13032
  if (this.emit(O.SignalResumed), this.shouldFailNext)
13033
13033
  throw this.shouldFailNext = !1, new Error("simulated failure");
@@ -13040,10 +13040,10 @@ class rl extends gt.EventEmitter {
13040
13040
  return g(this, void 0, void 0, function* () {
13041
13041
  if (this.pcState !== Le.Connected) {
13042
13042
  if (this.pcState !== Le.New)
13043
- throw new me("Expected peer connection to be new on initial connection");
13043
+ throw new pe("Expected peer connection to be new on initial connection");
13044
13044
  return new Promise((n, s) => {
13045
13045
  const r = () => {
13046
- p.warn("closing engine"), ye.clearTimeout(o), s(new ne(
13046
+ p.warn("closing engine"), ve.clearTimeout(o), s(new ie(
13047
13047
  "room connection has been cancelled",
13048
13048
  3
13049
13049
  /* ConnectionErrorReason.Cancelled */
@@ -13051,9 +13051,9 @@ class rl extends gt.EventEmitter {
13051
13051
  };
13052
13052
  t != null && t.signal.aborted && r(), t == null || t.signal.addEventListener("abort", r);
13053
13053
  const a = () => {
13054
- ye.clearTimeout(o), t == null || t.signal.removeEventListener("abort", r), n();
13055
- }, o = ye.setTimeout(() => {
13056
- this.off(O.Connected, a), s(new ne("could not establish pc connection"));
13054
+ ve.clearTimeout(o), t == null || t.signal.removeEventListener("abort", r), n();
13055
+ }, o = ve.setTimeout(() => {
13056
+ this.off(O.Connected, a), s(new ie("could not establish pc connection"));
13057
13057
  }, e ?? this.peerConnectionTimeout);
13058
13058
  this.once(O.Connected, a);
13059
13059
  });
@@ -13075,7 +13075,7 @@ class rl extends gt.EventEmitter {
13075
13075
  return;
13076
13076
  yield si(100), s = Date.now();
13077
13077
  }
13078
- throw new ne("could not establish PC connection");
13078
+ throw new ie("could not establish PC connection");
13079
13079
  });
13080
13080
  }
13081
13081
  /* @internal */
@@ -13096,7 +13096,7 @@ class rl extends gt.EventEmitter {
13096
13096
  return g(this, void 0, void 0, function* () {
13097
13097
  const a = t ? this.subscriber : this.publisher, o = t ? "Subscriber" : "Publisher";
13098
13098
  if (!a)
13099
- throw new ne("".concat(o, " connection not set"));
13099
+ throw new ie("".concat(o, " connection not set"));
13100
13100
  !t && !(!((n = this.publisher) === null || n === void 0) && n.isICEConnected) && ((s = this.publisher) === null || s === void 0 ? void 0 : s.pc.iceConnectionState) !== "checking" && this.negotiate();
13101
13101
  const c = this.dataChannelForKind(e, t);
13102
13102
  if ((c == null ? void 0 : c.readyState) === "open")
@@ -13107,7 +13107,7 @@ class rl extends gt.EventEmitter {
13107
13107
  return;
13108
13108
  yield si(50);
13109
13109
  }
13110
- throw new ne("could not establish ".concat(o, " connection, state: ").concat(a.pc.iceConnectionState));
13110
+ throw new ie("could not establish ".concat(o, " connection, state: ").concat(a.pc.iceConnectionState));
13111
13111
  });
13112
13112
  }
13113
13113
  ensurePublisherConnected(e) {
@@ -13132,7 +13132,7 @@ class rl extends gt.EventEmitter {
13132
13132
  };
13133
13133
  this.isClosed && t("cannot negotiate on closed engine"), this.on(O.Closing, n);
13134
13134
  const s = setTimeout(() => {
13135
- t("negotiation timed out"), this.handleDisconnect("negotiation", Be.RR_SIGNAL_DISCONNECTED);
13135
+ t("negotiation timed out"), this.handleDisconnect("negotiation", Fe.RR_SIGNAL_DISCONNECTED);
13136
13136
  }, this.peerConnectionTimeout), r = () => {
13137
13137
  clearTimeout(s), this.off(O.Closing, n);
13138
13138
  };
@@ -13148,20 +13148,20 @@ class rl extends gt.EventEmitter {
13148
13148
  Ld(u) && o.set(c.payload, u);
13149
13149
  }), this.emit(O.RTPVideoMapUpdate, o);
13150
13150
  }), this.publisher.negotiate((a) => {
13151
- r(), t(a), a instanceof ks && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", Be.RR_UNKNOWN);
13151
+ r(), t(a), a instanceof ks && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", Fe.RR_UNKNOWN);
13152
13152
  });
13153
13153
  });
13154
13154
  }
13155
13155
  dataChannelForKind(e, t) {
13156
13156
  if (t) {
13157
- if (e === he.LOSSY)
13157
+ if (e === de.LOSSY)
13158
13158
  return this.lossyDCSub;
13159
- if (e === he.RELIABLE)
13159
+ if (e === de.RELIABLE)
13160
13160
  return this.reliableDCSub;
13161
13161
  } else {
13162
- if (e === he.LOSSY)
13162
+ if (e === de.LOSSY)
13163
13163
  return this.lossyDC;
13164
- if (e === he.RELIABLE)
13164
+ if (e === de.RELIABLE)
13165
13165
  return this.reliableDC;
13166
13166
  }
13167
13167
  }
@@ -13170,16 +13170,16 @@ class rl extends gt.EventEmitter {
13170
13170
  this.shouldFailNext = !0;
13171
13171
  }
13172
13172
  clearReconnectTimeout() {
13173
- this.reconnectTimeout && ye.clearTimeout(this.reconnectTimeout);
13173
+ this.reconnectTimeout && ve.clearTimeout(this.reconnectTimeout);
13174
13174
  }
13175
13175
  clearPendingReconnect() {
13176
13176
  this.clearReconnectTimeout(), this.reconnectAttempts = 0;
13177
13177
  }
13178
13178
  registerOnLineListener() {
13179
- xe() && window.addEventListener("online", this.handleBrowserOnLine);
13179
+ _e() && window.addEventListener("online", this.handleBrowserOnLine);
13180
13180
  }
13181
13181
  deregisterOnLineListener() {
13182
- xe() && window.removeEventListener("online", this.handleBrowserOnLine);
13182
+ _e() && window.removeEventListener("online", this.handleBrowserOnLine);
13183
13183
  }
13184
13184
  }
13185
13185
  function al(i) {
@@ -13250,7 +13250,7 @@ class Ar {
13250
13250
  const n = yield t.json();
13251
13251
  return this.lastUpdateAt = Date.now(), n;
13252
13252
  } else
13253
- throw new ne("Could not fetch region settings: ".concat(t.statusText), t.status === 401 ? 0 : void 0, t.status);
13253
+ throw new ie("Could not fetch region settings: ".concat(t.statusText), t.status === 401 ? 0 : void 0, t.status);
13254
13254
  });
13255
13255
  }
13256
13256
  }
@@ -13264,7 +13264,7 @@ function Bn(i, e) {
13264
13264
  let t, n;
13265
13265
  return "bytesReceived" in i ? (t = i.bytesReceived, n = e.bytesReceived) : "bytesSent" in i && (t = i.bytesSent, n = e.bytesSent), t === void 0 || n === void 0 || i.timestamp === void 0 || e.timestamp === void 0 ? 0 : (t - n) * 8 * 1e3 / (i.timestamp - e.timestamp);
13266
13266
  }
13267
- class Pe extends nn {
13267
+ class we extends nn {
13268
13268
  /**
13269
13269
  *
13270
13270
  * @param mediaTrack
@@ -13351,7 +13351,7 @@ class Pe extends nn {
13351
13351
  }
13352
13352
  /* @internal */
13353
13353
  startMonitor() {
13354
- xe() && (this.monitorInterval || (this.monitorInterval = setInterval(() => {
13354
+ _e() && (this.monitorInterval || (this.monitorInterval = setInterval(() => {
13355
13355
  this.monitorSender();
13356
13356
  }, Us)));
13357
13357
  }
@@ -13413,11 +13413,11 @@ class Pe extends nn {
13413
13413
  function mo(i, e) {
13414
13414
  switch (i.kind) {
13415
13415
  case "audio":
13416
- return new Pe(i, e, !1);
13416
+ return new we(i, e, !1);
13417
13417
  case "video":
13418
13418
  return new Ne(i, e, !1);
13419
13419
  default:
13420
- throw new Ze("unsupported track type: ".concat(i.kind));
13420
+ throw new Qe("unsupported track type: ".concat(i.kind));
13421
13421
  }
13422
13422
  }
13423
13423
  const cl = Object.values(en), ul = Object.values(Ts), dl = Object.values(Ns), ll = [en.h180, en.h360], hl = [Ts.h180, Ts.h360], fl = (i) => [{
@@ -13611,7 +13611,7 @@ class Ne extends nn {
13611
13611
  /* @internal */
13612
13612
  startMonitor(e) {
13613
13613
  var t;
13614
- if (this.signalClient = e, !xe())
13614
+ if (this.signalClient = e, !_e())
13615
13615
  return;
13616
13616
  const n = (t = this.sender) === null || t === void 0 ? void 0 : t.getParameters();
13617
13617
  n && (this.encodings = n.encodings), !this.monitorInterval && (this.monitorInterval = setInterval(() => {
@@ -13746,8 +13746,8 @@ class Ne extends nn {
13746
13746
  }
13747
13747
  setPublishingQuality(e) {
13748
13748
  const t = [];
13749
- for (let n = ue.LOW; n <= ue.HIGH; n += 1)
13750
- t.push(new Ke({
13749
+ for (let n = oe.LOW; n <= oe.HIGH; n += 1)
13750
+ t.push(new ze({
13751
13751
  quality: n,
13752
13752
  enabled: n <= e
13753
13753
  }));
@@ -13934,19 +13934,19 @@ function Dr(i, e, t, n) {
13934
13934
  function yo(i) {
13935
13935
  switch (i) {
13936
13936
  case "f":
13937
- return ue.HIGH;
13937
+ return oe.HIGH;
13938
13938
  case "h":
13939
- return ue.MEDIUM;
13939
+ return oe.MEDIUM;
13940
13940
  case "q":
13941
- return ue.LOW;
13941
+ return oe.LOW;
13942
13942
  default:
13943
- return ue.HIGH;
13943
+ return oe.HIGH;
13944
13944
  }
13945
13945
  }
13946
13946
  function Mr(i, e, t, n) {
13947
13947
  if (!t)
13948
- return [new Se({
13949
- quality: ue.HIGH,
13948
+ return [new Te({
13949
+ quality: oe.HIGH,
13950
13950
  width: i,
13951
13951
  height: e,
13952
13952
  bitrate: 0,
@@ -13955,8 +13955,8 @@ function Mr(i, e, t, n) {
13955
13955
  if (n) {
13956
13956
  const s = t[0].scalabilityMode, r = new vo(s), a = [];
13957
13957
  for (let o = 0; o < r.spatial; o += 1)
13958
- a.push(new Se({
13959
- quality: ue.HIGH - o,
13958
+ a.push(new Te({
13959
+ quality: oe.HIGH - o,
13960
13960
  width: Math.ceil(i / Math.pow(2, o)),
13961
13961
  height: Math.ceil(e / Math.pow(2, o)),
13962
13962
  bitrate: t[0].maxBitrate ? Math.ceil(t[0].maxBitrate / Math.pow(3, o)) : 0,
@@ -13968,7 +13968,7 @@ function Mr(i, e, t, n) {
13968
13968
  var r, a, o;
13969
13969
  const c = (r = s.scaleResolutionDownBy) !== null && r !== void 0 ? r : 1;
13970
13970
  let u = yo((a = s.rid) !== null && a !== void 0 ? a : "");
13971
- return new Se({
13971
+ return new Te({
13972
13972
  quality: u,
13973
13973
  width: Math.ceil(i / c),
13974
13974
  height: Math.ceil(e / c),
@@ -14244,7 +14244,7 @@ class Ki extends bo {
14244
14244
  const n = this.elementInfos.reduce((o, c) => Math.max(o, c.visibilityChangedAt || 0), 0), s = !((t = (e = this.adaptiveStreamSettings) === null || e === void 0 ? void 0 : e.pauseVideoInBackground) !== null && t !== void 0) || t ? this.isInBackground : !1, r = this.elementInfos.some((o) => o.pictureInPicture), a = this.elementInfos.some((o) => o.visible) && !s || r;
14245
14245
  if (this.lastVisible !== a) {
14246
14246
  if (!a && Date.now() - n < es) {
14247
- ye.setTimeout(() => {
14247
+ ve.setTimeout(() => {
14248
14248
  this.updateVisibility();
14249
14249
  }, es);
14250
14250
  return;
@@ -14292,7 +14292,7 @@ class vl {
14292
14292
  }, this.onLeavePiP = () => {
14293
14293
  var n;
14294
14294
  this.isPiP = !1, (n = this.handleVisibilityChanged) === null || n === void 0 || n.call(this);
14295
- }, this.element = e, this.isIntersecting = t ?? Ur(e), this.isPiP = xe() && document.pictureInPictureElement === e, this.visibilityChangedAt = 0;
14295
+ }, this.element = e, this.isIntersecting = t ?? Ur(e), this.isPiP = _e() && document.pictureInPictureElement === e, this.visibilityChangedAt = 0;
14296
14296
  }
14297
14297
  width() {
14298
14298
  return this.element.clientWidth;
@@ -14323,9 +14323,9 @@ function Ur(i) {
14323
14323
  i = i.offsetParent, e += i.offsetTop, t += i.offsetLeft;
14324
14324
  return e < window.pageYOffset + window.innerHeight && t < window.pageXOffset + window.innerWidth && e + s > window.pageYOffset && t + n > window.pageXOffset && !r && (a !== "" ? parseFloat(a) > 0 : !0) && o !== "none";
14325
14325
  }
14326
- class kt extends gt.EventEmitter {
14326
+ class kt extends mt.EventEmitter {
14327
14327
  constructor(e, t, n) {
14328
- super(), this.metadataMuted = !1, this.encryption = Te.NONE, this.handleMuted = () => {
14328
+ super(), this.metadataMuted = !1, this.encryption = ke.NONE, this.handleMuted = () => {
14329
14329
  this.emit(R.Muted);
14330
14330
  }, this.handleUnmuted = () => {
14331
14331
  this.emit(R.Unmuted);
@@ -14345,13 +14345,13 @@ class kt extends gt.EventEmitter {
14345
14345
  return this.track !== void 0;
14346
14346
  }
14347
14347
  get isEncrypted() {
14348
- return this.encryption !== Te.NONE;
14348
+ return this.encryption !== ke.NONE;
14349
14349
  }
14350
14350
  /**
14351
14351
  * an [AudioTrack] if this publication holds an audio track
14352
14352
  */
14353
14353
  get audioTrack() {
14354
- if (this.track instanceof Pe || this.track instanceof zi)
14354
+ if (this.track instanceof we || this.track instanceof zi)
14355
14355
  return this.track;
14356
14356
  }
14357
14357
  /**
@@ -14456,7 +14456,7 @@ function yl(i) {
14456
14456
  return ni.Unknown;
14457
14457
  }
14458
14458
  }
14459
- class ko extends gt.EventEmitter {
14459
+ class ko extends mt.EventEmitter {
14460
14460
  get isEncrypted() {
14461
14461
  return this.tracks.size > 0 && Array.from(this.tracks.values()).every((e) => e.isEncrypted);
14462
14462
  }
@@ -14550,7 +14550,7 @@ class ko extends gt.EventEmitter {
14550
14550
  * @internal
14551
14551
  */
14552
14552
  setAudioContext(e) {
14553
- this.audioContext = e, this.audioTracks.forEach((t) => (t.track instanceof zi || t.track instanceof Pe) && t.track.setAudioContext(e));
14553
+ this.audioContext = e, this.audioTracks.forEach((t) => (t.track instanceof zi || t.track instanceof we) && t.track.setAudioContext(e));
14554
14554
  }
14555
14555
  addTrackPublication(e) {
14556
14556
  e.on(R.Muted, () => {
@@ -14573,7 +14573,7 @@ function bl(i) {
14573
14573
  var e, t, n;
14574
14574
  if (!i.participantSid && !i.participantIdentity)
14575
14575
  throw new Error("Invalid track permission, must provide at least one of participantIdentity and participantSid");
14576
- return new lt({
14576
+ return new dt({
14577
14577
  participantIdentity: (e = i.participantIdentity) !== null && e !== void 0 ? e : "",
14578
14578
  participantSid: (t = i.participantSid) !== null && t !== void 0 ? t : "",
14579
14579
  allTracks: (n = i.allowAll) !== null && n !== void 0 ? n : !1,
@@ -14582,7 +14582,7 @@ function bl(i) {
14582
14582
  }
14583
14583
  class To extends kt {
14584
14584
  constructor(e, t, n) {
14585
- super(e, t.sid, t.name), this.track = void 0, this.allowed = !0, this.disabled = !1, this.currentVideoQuality = ue.HIGH, this.handleEnded = (s) => {
14585
+ super(e, t.sid, t.name), this.track = void 0, this.allowed = !0, this.disabled = !1, this.currentVideoQuality = oe.HIGH, this.handleEnded = (s) => {
14586
14586
  this.setTrack(void 0), this.emit(R.Ended, s);
14587
14587
  }, this.handleVisibilityChange = (s) => {
14588
14588
  p.debug("adaptivestream video visibility ".concat(this.trackSid, ", visible=").concat(s), {
@@ -14601,10 +14601,10 @@ class To extends kt {
14601
14601
  setSubscribed(e) {
14602
14602
  const t = this.subscriptionStatus, n = this.permissionStatus;
14603
14603
  this.subscribed = e, e && (this.allowed = !0);
14604
- const s = new je({
14604
+ const s = new Je({
14605
14605
  trackSids: [this.trackSid],
14606
14606
  subscribe: this.subscribed,
14607
- participantTracks: [new nt({
14607
+ participantTracks: [new it({
14608
14608
  // sending an empty participant id since TrackPublication doesn't keep it
14609
14609
  // this is filled in by the participant that receives this message
14610
14610
  participantSid: "",
@@ -14700,12 +14700,12 @@ class To extends kt {
14700
14700
  }
14701
14701
  /* @internal */
14702
14702
  emitTrackUpdate() {
14703
- const e = new ot({
14703
+ const e = new at({
14704
14704
  trackSids: [this.trackSid],
14705
14705
  disabled: this.disabled,
14706
14706
  fps: this.fps
14707
14707
  });
14708
- this.videoDimensions ? (e.width = Math.ceil(this.videoDimensions.width), e.height = Math.ceil(this.videoDimensions.height)) : this.currentVideoQuality !== void 0 ? e.quality = this.currentVideoQuality : e.quality = ue.HIGH, this.emit(R.UpdateSettings, e);
14708
+ this.videoDimensions ? (e.width = Math.ceil(this.videoDimensions.width), e.height = Math.ceil(this.videoDimensions.height)) : this.currentVideoQuality !== void 0 ? e.quality = this.currentVideoQuality : e.quality = oe.HIGH, this.emit(R.UpdateSettings, e);
14709
14709
  }
14710
14710
  }
14711
14711
  class sn extends ko {
@@ -14880,7 +14880,7 @@ class sn extends ko {
14880
14880
  class Fr extends ko {
14881
14881
  /** @internal */
14882
14882
  constructor(e, t, n, s) {
14883
- super(e, t), this.pendingPublishing = /* @__PURE__ */ new Set(), this.pendingPublishPromises = /* @__PURE__ */ new Map(), this.participantTrackPermissions = [], this.allParticipantsAllowedToSubscribe = !0, this.encryptionType = Te.NONE, this.handleReconnecting = () => {
14883
+ super(e, t), this.pendingPublishing = /* @__PURE__ */ new Set(), this.pendingPublishPromises = /* @__PURE__ */ new Map(), this.participantTrackPermissions = [], this.allParticipantsAllowedToSubscribe = !0, this.encryptionType = ke.NONE, this.handleReconnecting = () => {
14884
14884
  this.reconnectFuture || (this.reconnectFuture = new oo());
14885
14885
  }, this.handleReconnected = () => {
14886
14886
  var r, a;
@@ -14958,9 +14958,9 @@ class Fr extends ko {
14958
14958
  }), this.unpublishTrack(r);
14959
14959
  else if (r.isUserProvided)
14960
14960
  yield r.mute();
14961
- else if (r instanceof Pe || r instanceof Ne)
14961
+ else if (r instanceof we || r instanceof Ne)
14962
14962
  try {
14963
- if (xe())
14963
+ if (_e())
14964
14964
  try {
14965
14965
  const a = yield navigator == null ? void 0 : navigator.permissions.query({
14966
14966
  // the permission query for camera and microphone currently not supported in Safari and Firefox
@@ -14986,7 +14986,7 @@ class Fr extends ko {
14986
14986
  return this.microphoneError;
14987
14987
  }
14988
14988
  get isE2EEEnabled() {
14989
- return this.encryptionType !== Te.NONE;
14989
+ return this.encryptionType !== ke.NONE;
14990
14990
  }
14991
14991
  getTrack(e) {
14992
14992
  const t = super.getTrack(e);
@@ -15062,7 +15062,7 @@ class Fr extends ko {
15062
15062
  /** @internal */
15063
15063
  setE2EEEnabled(e) {
15064
15064
  return g(this, void 0, void 0, function* () {
15065
- this.encryptionType = e ? Te.GCM : Te.NONE, yield this.republishAllTracks(void 0, !1);
15065
+ this.encryptionType = e ? ke.GCM : ke.NONE, yield this.republishAllTracks(void 0, !1);
15066
15066
  });
15067
15067
  }
15068
15068
  setTrackEnabled(e, t, n, s) {
@@ -15101,7 +15101,7 @@ class Fr extends ko {
15101
15101
  c = yield this.createScreenTracks(Object.assign({}, n));
15102
15102
  break;
15103
15103
  default:
15104
- throw new Ze(e);
15104
+ throw new Qe(e);
15105
15105
  }
15106
15106
  const u = [];
15107
15107
  for (const h of c)
@@ -15112,7 +15112,7 @@ class Fr extends ko {
15112
15112
  } catch (u) {
15113
15113
  throw c == null || c.forEach((d) => {
15114
15114
  d.stop();
15115
- }), u instanceof Error && !(u instanceof Ze) && this.emit(A.MediaDevicesError, u), u;
15115
+ }), u instanceof Error && !(u instanceof Qe) && this.emit(A.MediaDevicesError, u), u;
15116
15116
  } finally {
15117
15117
  this.pendingPublishing.delete(e);
15118
15118
  }
@@ -15184,12 +15184,12 @@ class Fr extends ko {
15184
15184
  throw new Ls("getDisplayMedia not supported");
15185
15185
  const t = Sd(e), n = yield navigator.mediaDevices.getDisplayMedia(t), s = n.getVideoTracks();
15186
15186
  if (s.length === 0)
15187
- throw new Ze("no video track found");
15187
+ throw new Qe("no video track found");
15188
15188
  const r = new Ne(s[0], void 0, !1);
15189
15189
  r.source = C.Source.ScreenShare;
15190
15190
  const a = [r];
15191
15191
  if (n.getAudioTracks().length > 0) {
15192
- const o = new Pe(n.getAudioTracks()[0], void 0, !1, this.audioContext);
15192
+ const o = new we(n.getAudioTracks()[0], void 0, !1, this.audioContext);
15193
15193
  o.source = C.Source.ScreenShareAudio, a.push(o);
15194
15194
  }
15195
15195
  return a;
@@ -15224,15 +15224,15 @@ class Fr extends ko {
15224
15224
  if (e instanceof MediaStreamTrack)
15225
15225
  switch (e.kind) {
15226
15226
  case "audio":
15227
- e = new Pe(e, o, !0, this.audioContext);
15227
+ e = new we(e, o, !0, this.audioContext);
15228
15228
  break;
15229
15229
  case "video":
15230
15230
  e = new Ne(e, o, !0);
15231
15231
  break;
15232
15232
  default:
15233
- throw new Ze("unsupported MediaStreamTrack kind ".concat(e.kind));
15233
+ throw new Qe("unsupported MediaStreamTrack kind ".concat(e.kind));
15234
15234
  }
15235
- e instanceof Pe && e.setAudioContext(this.audioContext);
15235
+ e instanceof we && e.setAudioContext(this.audioContext);
15236
15236
  let c;
15237
15237
  if (this.tracks.forEach((m) => {
15238
15238
  m.track && m.track === e && (c = m);
@@ -15268,8 +15268,8 @@ class Fr extends ko {
15268
15268
  trace: F.stack
15269
15269
  });
15270
15270
  }
15271
- t.stopMicTrackOnMute && e instanceof Pe && (e.stopOnMute = !0), e.source === C.Source.ScreenShare && tn() && (t.simulcast = !1), t.videoCodec === "av1" && !Ed() && (t.videoCodec = void 0), t.videoCodec === "vp9" && !Pd() && (t.videoCodec = void 0), e.on(R.Muted, this.onTrackMuted), e.on(R.Unmuted, this.onTrackUnmuted), e.on(R.Ended, this.handleTrackEnded), e.on(R.UpstreamPaused, this.onTrackUpstreamPaused), e.on(R.UpstreamResumed, this.onTrackUpstreamResumed);
15272
- const Q = new He({
15271
+ t.stopMicTrackOnMute && e instanceof we && (e.stopOnMute = !0), e.source === C.Source.ScreenShare && tn() && (t.simulcast = !1), t.videoCodec === "av1" && !Ed() && (t.videoCodec = void 0), t.videoCodec === "vp9" && !Pd() && (t.videoCodec = void 0), e.on(R.Muted, this.onTrackMuted), e.on(R.Unmuted, this.onTrackUnmuted), e.on(R.Ended, this.handleTrackEnded), e.on(R.UpstreamPaused, this.onTrackUpstreamPaused), e.on(R.UpstreamResumed, this.onTrackUpstreamResumed);
15272
+ const Q = new qe({
15273
15273
  // get local track id for use during publishing
15274
15274
  cid: e.mediaStreamTrack.id,
15275
15275
  name: t.name,
@@ -15281,7 +15281,7 @@ class Fr extends ko {
15281
15281
  stereo: n,
15282
15282
  disableRed: this.isE2EEEnabled || !(!((r = t.red) !== null && r !== void 0) || r)
15283
15283
  });
15284
- let j, de;
15284
+ let j, ce;
15285
15285
  if (e.kind === C.Kind.Video) {
15286
15286
  let F = {
15287
15287
  width: 0,
@@ -15299,18 +15299,18 @@ class Fr extends ko {
15299
15299
  if (Q.width = F.width, Q.height = F.height, e instanceof Ne)
15300
15300
  if (Wi(t.videoCodec) && (t.scalabilityMode = (c = t.scalabilityMode) !== null && c !== void 0 ? c : "L3T3_KEY"), t.videoCodec && t.backupCodec && t.videoCodec !== t.backupCodec.codec) {
15301
15301
  this.roomOptions.dynacast || (this.roomOptions.dynacast = !0);
15302
- const fe = Object.assign({}, t);
15303
- fe.simulcast = !0, de = Or(e, t.backupCodec.codec, fe), Q.simulcastCodecs = [new Je({
15302
+ const le = Object.assign({}, t);
15303
+ le.simulcast = !0, ce = Or(e, t.backupCodec.codec, le), Q.simulcastCodecs = [new Be({
15304
15304
  codec: t.videoCodec,
15305
15305
  cid: e.mediaStreamTrack.id,
15306
15306
  enableSimulcastLayers: !0
15307
- }), new Je({
15307
+ }), new Be({
15308
15308
  codec: t.backupCodec.codec,
15309
15309
  cid: "",
15310
15310
  enableSimulcastLayers: !0
15311
15311
  })];
15312
15312
  } else
15313
- t.videoCodec && (Q.simulcastCodecs = [new Je({
15313
+ t.videoCodec && (Q.simulcastCodecs = [new Be({
15314
15314
  codec: t.videoCodec,
15315
15315
  cid: e.mediaStreamTrack.id,
15316
15316
  enableSimulcastLayers: (u = t.simulcast) !== null && u !== void 0 ? u : !1
@@ -15323,31 +15323,31 @@ class Fr extends ko {
15323
15323
  networkPriority: (T = (b = t.audioPreset) === null || b === void 0 ? void 0 : b.priority) !== null && T !== void 0 ? T : "high"
15324
15324
  }]);
15325
15325
  if (!this.engine || this.engine.isClosed)
15326
- throw new me("cannot publish track when not connected");
15327
- const ce = yield this.engine.addTrack(Q);
15326
+ throw new pe("cannot publish track when not connected");
15327
+ const ae = yield this.engine.addTrack(Q);
15328
15328
  let q = !1, K = !1;
15329
- if (ce.codecs.forEach((F) => {
15329
+ if (ae.codecs.forEach((F) => {
15330
15330
  lr(F.mimeType, t.videoCodec) ? q = !0 : t.backupCodec && lr(F.mimeType, t.backupCodec.codec) && (K = !0);
15331
15331
  }), Q.simulcastCodecs.length > 0) {
15332
15332
  if (!q && !K)
15333
15333
  throw Error("cannot publish track, codec not supported by server");
15334
15334
  if (!q && t.backupCodec) {
15335
15335
  const F = t.backupCodec;
15336
- t = Object.assign({}, t), p.debug("primary codec ".concat(t.videoCodec, " not supported, fallback to ").concat(F.codec)), t.videoCodec = F.codec, t.videoEncoding = F.encoding, j = de;
15336
+ t = Object.assign({}, t), p.debug("primary codec ".concat(t.videoCodec, " not supported, fallback to ").concat(F.codec)), t.videoCodec = F.codec, t.videoEncoding = F.encoding, j = ce;
15337
15337
  }
15338
15338
  }
15339
- const x = new On(e.kind, ce, e);
15340
- if (x.options = t, e.sid = ce.sid, !this.engine.publisher)
15341
- throw new me("publisher is closed");
15339
+ const x = new On(e.kind, ae, e);
15340
+ if (x.options = t, e.sid = ae.sid, !this.engine.publisher)
15341
+ throw new pe("publisher is closed");
15342
15342
  if (p.debug("publishing ".concat(e.kind, " with encodings"), {
15343
15343
  encodings: j,
15344
- trackInfo: ce
15344
+ trackInfo: ae
15345
15345
  }), e.sender = yield this.engine.createSender(e, t, j), j)
15346
15346
  if (tn() && e.kind === C.Kind.Audio) {
15347
15347
  let F;
15348
- for (const fe of this.engine.publisher.pc.getTransceivers())
15349
- if (fe.sender === e.sender) {
15350
- F = fe;
15348
+ for (const le of this.engine.publisher.pc.getTransceivers())
15349
+ if (le.sender === e.sender) {
15350
+ F = le;
15351
15351
  break;
15352
15352
  }
15353
15353
  F && this.engine.publisher.setTrackCodecBitrate({
@@ -15361,7 +15361,7 @@ class Fr extends ko {
15361
15361
  codec: e.codec,
15362
15362
  maxbr: j[0].maxBitrate / 1e3
15363
15363
  });
15364
- return yield this.engine.negotiate(), e instanceof Ne ? e.startMonitor(this.engine.client) : e instanceof Pe && e.startMonitor(), this.addTrackPublication(x), this.emit(A.LocalTrackPublished, x), x;
15364
+ return yield this.engine.negotiate(), e instanceof Ne ? e.startMonitor(this.engine.client) : e instanceof we && e.startMonitor(), this.addTrackPublication(x), this.emit(A.LocalTrackPublished, x), x;
15365
15365
  });
15366
15366
  }
15367
15367
  get isLocal() {
@@ -15377,15 +15377,15 @@ class Fr extends ko {
15377
15377
  if (this.tracks.forEach((h) => {
15378
15378
  h.track && h.track === e && (r = h);
15379
15379
  }), !r)
15380
- throw new Ze("track is not published");
15380
+ throw new Qe("track is not published");
15381
15381
  if (!(e instanceof Ne))
15382
- throw new Ze("track is not a video track");
15382
+ throw new Qe("track is not a video track");
15383
15383
  const a = Object.assign(Object.assign({}, (s = this.roomOptions) === null || s === void 0 ? void 0 : s.publishDefaults), n), o = Or(e, t, a);
15384
15384
  if (!o) {
15385
15385
  p.info("backup codec has been disabled, ignoring request to add additional codec for track");
15386
15386
  return;
15387
15387
  }
15388
- const c = e.addSimulcastTrack(t, o), u = new He({
15388
+ const c = e.addSimulcastTrack(t, o), u = new qe({
15389
15389
  cid: c.mediaStreamTrack.id,
15390
15390
  type: C.kindToProto(e.kind),
15391
15391
  muted: e.isMuted,
@@ -15398,7 +15398,7 @@ class Fr extends ko {
15398
15398
  }]
15399
15399
  });
15400
15400
  if (u.layers = Mr(u.width, u.height, o), !this.engine || this.engine.isClosed)
15401
- throw new me("cannot publish track when not connected");
15401
+ throw new pe("cannot publish track when not connected");
15402
15402
  const d = yield this.engine.addTrack(u);
15403
15403
  yield this.engine.createSimulcastSender(e, c, a, o), yield this.engine.negotiate(), p.debug("published ".concat(t, " for track ").concat(e.sid), {
15404
15404
  encodings: o,
@@ -15462,7 +15462,7 @@ class Fr extends ko {
15462
15462
  s.track && (e && (s.options = Object.assign(Object.assign({}, s.options), e)), n.push(s));
15463
15463
  }), yield Promise.all(n.map((s) => g(this, void 0, void 0, function* () {
15464
15464
  const r = s.track;
15465
- yield this.unpublishTrack(r, !1), t && !r.isMuted && (r instanceof Pe || r instanceof Ne) && !r.isUserProvided && (p.debug("restarting existing track", {
15465
+ yield this.unpublishTrack(r, !1), t && !r.isMuted && (r instanceof we || r instanceof Ne) && !r.isUserProvided && (p.debug("restarting existing track", {
15466
15466
  track: s.trackSid
15467
15467
  }), yield r.restartTrack()), yield this.publishTrack(r, s.options);
15468
15468
  })));
@@ -15475,11 +15475,11 @@ class Fr extends ko {
15475
15475
  s !== void 0 && s.forEach((c) => {
15476
15476
  c instanceof sn ? r.push(c.sid) : r.push(c);
15477
15477
  });
15478
- const o = new et({
15478
+ const o = new Ze({
15479
15479
  kind: t,
15480
15480
  value: {
15481
15481
  case: "user",
15482
- value: new it({
15482
+ value: new tt({
15483
15483
  participantSid: this.sid,
15484
15484
  payload: e,
15485
15485
  destinationSids: r,
@@ -15529,14 +15529,14 @@ class Fr extends ko {
15529
15529
  let t;
15530
15530
  return this.tracks.forEach((n) => {
15531
15531
  const s = n.track;
15532
- s && (e instanceof MediaStreamTrack ? (s instanceof Pe || s instanceof Ne) && s.mediaStreamTrack === e && (t = n) : e === s && (t = n));
15532
+ s && (e instanceof MediaStreamTrack ? (s instanceof we || s instanceof Ne) && s.mediaStreamTrack === e && (t = n) : e === s && (t = n));
15533
15533
  }), t;
15534
15534
  }
15535
15535
  /** @internal */
15536
15536
  publishedTracksInfo() {
15537
15537
  const e = [];
15538
15538
  return this.tracks.forEach((t) => {
15539
- t.track !== void 0 && e.push(new ze({
15539
+ t.track !== void 0 && e.push(new Ge({
15540
15540
  cid: t.track.mediaStreamID,
15541
15541
  track: t.trackInfo
15542
15542
  }));
@@ -15545,13 +15545,13 @@ class Fr extends ko {
15545
15545
  /** @internal */
15546
15546
  dataChannelsInfo() {
15547
15547
  const e = [], t = (n, s) => {
15548
- (n == null ? void 0 : n.id) !== void 0 && n.id !== null && e.push(new pt({
15548
+ (n == null ? void 0 : n.id) !== void 0 && n.id !== null && e.push(new ft({
15549
15549
  label: n.label,
15550
15550
  id: n.id,
15551
15551
  target: s
15552
15552
  }));
15553
15553
  };
15554
- return t(this.engine.dataChannelForKind(he.LOSSY), Ie.PUBLISHER), t(this.engine.dataChannelForKind(he.RELIABLE), Ie.PUBLISHER), t(this.engine.dataChannelForKind(he.LOSSY, !0), Ie.SUBSCRIBER), t(this.engine.dataChannelForKind(he.RELIABLE, !0), Ie.SUBSCRIBER), e;
15554
+ return t(this.engine.dataChannelForKind(de.LOSSY), Re.PUBLISHER), t(this.engine.dataChannelForKind(de.RELIABLE), Re.PUBLISHER), t(this.engine.dataChannelForKind(de.LOSSY, !0), Re.SUBSCRIBER), t(this.engine.dataChannelForKind(de.RELIABLE, !0), Re.SUBSCRIBER), e;
15555
15555
  }
15556
15556
  }
15557
15557
  var Y;
@@ -15559,7 +15559,7 @@ var Y;
15559
15559
  i.Disconnected = "disconnected", i.Connecting = "connecting", i.Connected = "connected", i.Reconnecting = "reconnecting";
15560
15560
  })(Y || (Y = {}));
15561
15561
  const kl = 2 * 1e3;
15562
- class So extends gt.EventEmitter {
15562
+ class So extends mt.EventEmitter {
15563
15563
  /**
15564
15564
  * Creates a new Room, the primary construct for a LiveKit session.
15565
15565
  * @param options
@@ -15586,12 +15586,12 @@ class So extends gt.EventEmitter {
15586
15586
  try {
15587
15587
  yield this.attemptConnection(m ?? s, r, a, T), this.abortController = void 0, h();
15588
15588
  } catch (w) {
15589
- if (this.regionUrlProvider && w instanceof ne && w.reason !== 3 && w.reason !== 0) {
15589
+ if (this.regionUrlProvider && w instanceof ie && w.reason !== 3 && w.reason !== 0) {
15590
15590
  let I = null;
15591
15591
  try {
15592
15592
  I = yield this.regionUrlProvider.getNextBestRegionUrl((b = this.abortController) === null || b === void 0 ? void 0 : b.signal);
15593
15593
  } catch (D) {
15594
- if (D instanceof ne && (D.status === 401 || D.reason === 3)) {
15594
+ if (D instanceof ie && (D.status === 401 || D.reason === 3)) {
15595
15595
  f(D);
15596
15596
  return;
15597
15597
  }
@@ -15636,19 +15636,19 @@ class So extends gt.EventEmitter {
15636
15636
  this.applyJoinResponse(d), this.setupLocalParticipantEvents(), this.emit(P.SignalConnected);
15637
15637
  } catch (d) {
15638
15638
  this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish);
15639
- const h = new ne("could not establish signal connection");
15640
- throw d instanceof Error && (h.message = "".concat(h.message, ": ").concat(d.message)), d instanceof ne && (h.reason = d.reason, h.status = d.status), p.debug("error trying to establish signal connection", {
15639
+ const h = new ie("could not establish signal connection");
15640
+ throw d instanceof Error && (h.message = "".concat(h.message, ": ").concat(d.message)), d instanceof ie && (h.reason = d.reason, h.status = d.status), p.debug("error trying to establish signal connection", {
15641
15641
  error: d
15642
15642
  }), h;
15643
15643
  }
15644
15644
  if (o.signal.aborted)
15645
- throw this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), new ne("Connection attempt aborted");
15645
+ throw this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), new ie("Connection attempt aborted");
15646
15646
  try {
15647
15647
  yield this.engine.waitForPCInitialConnection(this.connOptions.peerConnectionTimeout, o);
15648
15648
  } catch (d) {
15649
15649
  throw this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), d;
15650
15650
  }
15651
- xe() && this.options.disconnectOnPageLeave && (window.addEventListener("pagehide", this.onPageLeave), window.addEventListener("beforeunload", this.onPageLeave)), xe() && (document.addEventListener("freeze", this.onPageLeave), (u = navigator.mediaDevices) === null || u === void 0 || u.addEventListener("devicechange", this.handleDeviceChange)), this.setAndEmitConnectionState(Y.Connected), this.emit(P.Connected), this.registerConnectionReconcile();
15651
+ _e() && this.options.disconnectOnPageLeave && (window.addEventListener("pagehide", this.onPageLeave), window.addEventListener("beforeunload", this.onPageLeave)), _e() && (document.addEventListener("freeze", this.onPageLeave), (u = navigator.mediaDevices) === null || u === void 0 || u.addEventListener("devicechange", this.handleDeviceChange)), this.setAndEmitConnectionState(Y.Connected), this.emit(P.Connected), this.registerConnectionReconcile();
15652
15652
  }), this.disconnect = function() {
15653
15653
  let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
15654
15654
  return g(t, void 0, void 0, function* () {
@@ -15661,7 +15661,7 @@ class So extends gt.EventEmitter {
15661
15661
  }
15662
15662
  p.info("disconnect from room", {
15663
15663
  identity: this.localParticipant.identity
15664
- }), (this.state === Y.Connecting || this.state === Y.Reconnecting) && (p.warn("abort connection attempt"), (r = this.abortController) === null || r === void 0 || r.abort(), (o = (a = this.connectFuture) === null || a === void 0 ? void 0 : a.reject) === null || o === void 0 || o.call(a, new ne("Client initiated disconnect")), this.connectFuture = void 0), !((c = this.engine) === null || c === void 0) && c.client.isConnected && (yield this.engine.client.sendLeave()), this.engine && (yield this.engine.close()), this.handleDisconnect(s, Wt.CLIENT_INITIATED), this.engine = void 0;
15664
+ }), (this.state === Y.Connecting || this.state === Y.Reconnecting) && (p.warn("abort connection attempt"), (r = this.abortController) === null || r === void 0 || r.abort(), (o = (a = this.connectFuture) === null || a === void 0 ? void 0 : a.reject) === null || o === void 0 || o.call(a, new ie("Client initiated disconnect")), this.connectFuture = void 0), !((c = this.engine) === null || c === void 0) && c.client.isConnected && (yield this.engine.client.sendLeave()), this.engine && (yield this.engine.close()), this.handleDisconnect(s, Wt.CLIENT_INITIATED), this.engine = void 0;
15665
15665
  } finally {
15666
15666
  u();
15667
15667
  }
@@ -15683,7 +15683,7 @@ class So extends gt.EventEmitter {
15683
15683
  a.track && r.push(a);
15684
15684
  }), yield Promise.all(r.map((a) => g(this, void 0, void 0, function* () {
15685
15685
  const o = a.track;
15686
- this.localParticipant.unpublishTrack(o, !1), o.isMuted || ((o instanceof Pe || o instanceof Ne) && o.source !== C.Source.ScreenShare && o.source !== C.Source.ScreenShareAudio && !o.isUserProvided && (p.debug("restarting existing track", {
15686
+ this.localParticipant.unpublishTrack(o, !1), o.isMuted || ((o instanceof we || o instanceof Ne) && o.source !== C.Source.ScreenShare && o.source !== C.Source.ScreenShareAudio && !o.isUserProvided && (p.debug("restarting existing track", {
15687
15687
  track: a.trackSid
15688
15688
  }), yield o.restartTrack()), p.debug("publishing new track", {
15689
15689
  track: a.trackSid
@@ -15789,7 +15789,7 @@ class So extends gt.EventEmitter {
15789
15789
  this.emit(P.TrackUnmuted, s, this.localParticipant);
15790
15790
  }, this.onLocalTrackPublished = (s) => g(this, void 0, void 0, function* () {
15791
15791
  var r;
15792
- this.emit(P.LocalTrackPublished, s, this.localParticipant), s.track instanceof Pe && (yield s.track.checkForSilence()) && this.emit(P.LocalAudioSilenceDetected, s);
15792
+ this.emit(P.LocalTrackPublished, s, this.localParticipant), s.track instanceof we && (yield s.track.checkForSilence()) && this.emit(P.LocalAudioSilenceDetected, s);
15793
15793
  const a = yield (r = s.track) === null || r === void 0 ? void 0 : r.getDeviceId(), o = Td(s.source);
15794
15794
  o && a && a !== this.localParticipant.activeDeviceMap.get(o) && (this.localParticipant.activeDeviceMap.set(o, a), this.emit(P.ActiveDeviceChanged, o, a));
15795
15795
  }), this.onLocalTrackUnpublished = (s) => {
@@ -15874,7 +15874,7 @@ class So extends gt.EventEmitter {
15874
15874
  */
15875
15875
  static getLocalDevices(e) {
15876
15876
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
15877
- return ke.getInstance().getDevices(e, t);
15877
+ return be.getInstance().getDevices(e, t);
15878
15878
  }
15879
15879
  /**
15880
15880
  * prepareConnection should be called as soon as the page is loaded, in order
@@ -15935,7 +15935,7 @@ class So extends gt.EventEmitter {
15935
15935
  yield this.engine.client.handleOnClose("simulate disconnect");
15936
15936
  break;
15937
15937
  case "speaker":
15938
- s = new be({
15938
+ s = new ye({
15939
15939
  scenario: {
15940
15940
  case: "speakerUpdate",
15941
15941
  value: 3
@@ -15943,7 +15943,7 @@ class So extends gt.EventEmitter {
15943
15943
  });
15944
15944
  break;
15945
15945
  case "node-failure":
15946
- s = new be({
15946
+ s = new ye({
15947
15947
  scenario: {
15948
15948
  case: "nodeFailure",
15949
15949
  value: !0
@@ -15951,7 +15951,7 @@ class So extends gt.EventEmitter {
15951
15951
  });
15952
15952
  break;
15953
15953
  case "server-leave":
15954
- s = new be({
15954
+ s = new ye({
15955
15955
  scenario: {
15956
15956
  case: "serverLeave",
15957
15957
  value: !0
@@ -15959,7 +15959,7 @@ class So extends gt.EventEmitter {
15959
15959
  });
15960
15960
  break;
15961
15961
  case "migration":
15962
- s = new be({
15962
+ s = new ye({
15963
15963
  scenario: {
15964
15964
  case: "migration",
15965
15965
  value: !0
@@ -15974,14 +15974,14 @@ class So extends gt.EventEmitter {
15974
15974
  break;
15975
15975
  case "force-tcp":
15976
15976
  case "force-tls":
15977
- s = new be({
15977
+ s = new ye({
15978
15978
  scenario: {
15979
15979
  case: "switchCandidateProtocol",
15980
15980
  value: e === "force-tls" ? 2 : 1
15981
15981
  }
15982
15982
  }), n = () => g(this, void 0, void 0, function* () {
15983
15983
  const r = this.engine.client.onLeave;
15984
- r && r(new Ve({
15984
+ r && r(new je({
15985
15985
  reason: Wt.CLIENT_INITIATED,
15986
15986
  canReconnect: !0
15987
15987
  }));
@@ -15990,7 +15990,7 @@ class So extends gt.EventEmitter {
15990
15990
  case "subscriber-bandwidth":
15991
15991
  if (t === void 0 || typeof t != "number")
15992
15992
  throw new Error("subscriber-bandwidth requires a number as argument");
15993
- s = new be({
15993
+ s = new ye({
15994
15994
  scenario: {
15995
15995
  case: "subscriberBandwidth",
15996
15996
  value: BigInt(t)
@@ -16166,7 +16166,7 @@ class So extends gt.EventEmitter {
16166
16166
  }), this.localParticipant.tracks.forEach((s) => {
16167
16167
  var r, a;
16168
16168
  s.track && this.localParticipant.unpublishTrack(s.track, e), e && ((r = s.track) === null || r === void 0 || r.detach(), (a = s.track) === null || a === void 0 || a.stop());
16169
- }), this.localParticipant.off(A.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).off(A.ParticipantNameChanged, this.onLocalParticipantNameChanged).off(A.TrackMuted, this.onLocalTrackMuted).off(A.TrackUnmuted, this.onLocalTrackUnmuted).off(A.LocalTrackPublished, this.onLocalTrackPublished).off(A.LocalTrackUnpublished, this.onLocalTrackUnpublished).off(A.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).off(A.MediaDevicesError, this.onMediaDevicesError).off(A.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged), this.localParticipant.tracks.clear(), this.localParticipant.videoTracks.clear(), this.localParticipant.audioTracks.clear(), this.participants.clear(), this.activeSpeakers = [], this.audioContext && typeof this.options.expWebAudioMix == "boolean" && (this.audioContext.close(), this.audioContext = void 0), xe() && (window.removeEventListener("beforeunload", this.onPageLeave), window.removeEventListener("pagehide", this.onPageLeave), window.removeEventListener("freeze", this.onPageLeave), (n = navigator.mediaDevices) === null || n === void 0 || n.removeEventListener("devicechange", this.handleDeviceChange));
16169
+ }), this.localParticipant.off(A.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).off(A.ParticipantNameChanged, this.onLocalParticipantNameChanged).off(A.TrackMuted, this.onLocalTrackMuted).off(A.TrackUnmuted, this.onLocalTrackUnmuted).off(A.LocalTrackPublished, this.onLocalTrackPublished).off(A.LocalTrackUnpublished, this.onLocalTrackUnpublished).off(A.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).off(A.MediaDevicesError, this.onMediaDevicesError).off(A.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged), this.localParticipant.tracks.clear(), this.localParticipant.videoTracks.clear(), this.localParticipant.audioTracks.clear(), this.participants.clear(), this.activeSpeakers = [], this.audioContext && typeof this.options.expWebAudioMix == "boolean" && (this.audioContext.close(), this.audioContext = void 0), _e() && (window.removeEventListener("beforeunload", this.onPageLeave), window.removeEventListener("pagehide", this.onPageLeave), window.removeEventListener("freeze", this.onPageLeave), (n = navigator.mediaDevices) === null || n === void 0 || n.removeEventListener("devicechange", this.handleDeviceChange));
16170
16170
  } finally {
16171
16171
  this.setAndEmitConnectionState(Y.Disconnected), this.emit(P.Disconnected, t);
16172
16172
  }
@@ -16238,7 +16238,7 @@ class So extends gt.EventEmitter {
16238
16238
  o.tracks.forEach((c) => {
16239
16239
  c.isDesired !== r && a.push(c.trackSid);
16240
16240
  });
16241
- }), this.engine.client.sendSyncState(new ft({
16241
+ }), this.engine.client.sendSyncState(new ht({
16242
16242
  answer: An({
16243
16243
  sdp: n.sdp,
16244
16244
  type: n.type
@@ -16247,7 +16247,7 @@ class So extends gt.EventEmitter {
16247
16247
  sdp: s.sdp,
16248
16248
  type: s.type
16249
16249
  }) : void 0,
16250
- subscription: new je({
16250
+ subscription: new Je({
16251
16251
  trackSids: a,
16252
16252
  subscribe: !r,
16253
16253
  participantTracks: []
@@ -16268,7 +16268,7 @@ class So extends gt.EventEmitter {
16268
16268
  registerConnectionReconcile() {
16269
16269
  this.clearConnectionReconcile();
16270
16270
  let e = 0;
16271
- this.connectionReconcileInterval = ye.setInterval(() => {
16271
+ this.connectionReconcileInterval = ve.setInterval(() => {
16272
16272
  // ensure we didn't tear it down
16273
16273
  !this.engine || // engine detected close, but Room missed it
16274
16274
  this.engine.isClosed || // transports failed without notifying engine
@@ -16278,7 +16278,7 @@ class So extends gt.EventEmitter {
16278
16278
  }, kl);
16279
16279
  }
16280
16280
  clearConnectionReconcile() {
16281
- this.connectionReconcileInterval && ye.clearInterval(this.connectionReconcileInterval);
16281
+ this.connectionReconcileInterval && ve.clearInterval(this.connectionReconcileInterval);
16282
16282
  }
16283
16283
  setAndEmitConnectionState(e) {
16284
16284
  return e === this.state ? !1 : (this.state = e, this.emit(P.ConnectionStateChanged, this.state), !0);
@@ -16325,10 +16325,10 @@ class So extends gt.EventEmitter {
16325
16325
  identity: "simulated-local",
16326
16326
  name: "local-name"
16327
16327
  })), this.setupLocalParticipantEvents(), this.emit(P.SignalConnected), this.emit(P.Connected), this.setAndEmitConnectionState(Y.Connected), s.video) {
16328
- const a = new On(C.Kind.Video, new _e({
16329
- source: re.CAMERA,
16328
+ const a = new On(C.Kind.Video, new Pe({
16329
+ source: se.CAMERA,
16330
16330
  sid: Math.floor(Math.random() * 1e4).toString(),
16331
- type: ve.AUDIO,
16331
+ type: ge.AUDIO,
16332
16332
  name: "video-dummy"
16333
16333
  }), new Ne(s.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
16334
16334
  video: !0
@@ -16336,11 +16336,11 @@ class So extends gt.EventEmitter {
16336
16336
  this.localParticipant.addTrackPublication(a), this.localParticipant.emit(A.LocalTrackPublished, a);
16337
16337
  }
16338
16338
  if (s.audio) {
16339
- const a = new On(C.Kind.Audio, new _e({
16340
- source: re.MICROPHONE,
16339
+ const a = new On(C.Kind.Audio, new Pe({
16340
+ source: se.MICROPHONE,
16341
16341
  sid: Math.floor(Math.random() * 1e4).toString(),
16342
- type: ve.AUDIO
16343
- }), new Pe(s.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
16342
+ type: ge.AUDIO
16343
+ }), new we(s.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
16344
16344
  audio: !0
16345
16345
  })).getAudioTracks()[0] : Yn()));
16346
16346
  this.localParticipant.addTrackPublication(a), this.localParticipant.emit(A.LocalTrackPublished, a);
@@ -16355,18 +16355,18 @@ class So extends gt.EventEmitter {
16355
16355
  });
16356
16356
  const c = this.getOrCreateParticipant(o.identity, o);
16357
16357
  if (r.video) {
16358
- const u = yr((n = 160 * r.aspectRatios[a % r.aspectRatios.length]) !== null && n !== void 0 ? n : 1, 160, !1, !0), d = new _e({
16359
- source: re.CAMERA,
16358
+ const u = yr((n = 160 * r.aspectRatios[a % r.aspectRatios.length]) !== null && n !== void 0 ? n : 1, 160, !1, !0), d = new Pe({
16359
+ source: se.CAMERA,
16360
16360
  sid: Math.floor(Math.random() * 1e4).toString(),
16361
- type: ve.AUDIO
16361
+ type: ge.AUDIO
16362
16362
  });
16363
16363
  c.addSubscribedMediaTrack(u, d.sid, new MediaStream([u])), o.tracks = [...o.tracks, d];
16364
16364
  }
16365
16365
  if (r.audio) {
16366
- const u = Yn(), d = new _e({
16367
- source: re.MICROPHONE,
16366
+ const u = Yn(), d = new Pe({
16367
+ source: se.MICROPHONE,
16368
16368
  sid: Math.floor(Math.random() * 1e4).toString(),
16369
- type: ve.AUDIO
16369
+ type: ge.AUDIO
16370
16370
  });
16371
16371
  c.addSubscribedMediaTrack(u, d.sid, new MediaStream([u])), o.tracks = [...o.tracks, d];
16372
16372
  }
@@ -16384,26 +16384,26 @@ class So extends gt.EventEmitter {
16384
16384
  }), super.emit(e, ...n);
16385
16385
  }
16386
16386
  }
16387
- var $e;
16387
+ var Ve;
16388
16388
  (function(i) {
16389
16389
  i[i.IDLE = 0] = "IDLE", i[i.RUNNING = 1] = "RUNNING", i[i.SKIPPED = 2] = "SKIPPED", i[i.SUCCESS = 3] = "SUCCESS", i[i.FAILED = 4] = "FAILED";
16390
- })($e || ($e = {}));
16391
- class Ii extends gt.EventEmitter {
16390
+ })(Ve || (Ve = {}));
16391
+ class Ii extends mt.EventEmitter {
16392
16392
  constructor(e, t) {
16393
16393
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
16394
- super(), this.status = $e.IDLE, this.logs = [], this.errorsAsWarnings = !1, this.url = e, this.token = t, this.name = this.constructor.name, this.room = new So(n.roomOptions), this.connectOptions = n.connectOptions, n.errorsAsWarnings && (this.errorsAsWarnings = n.errorsAsWarnings);
16394
+ super(), this.status = Ve.IDLE, this.logs = [], this.errorsAsWarnings = !1, this.url = e, this.token = t, this.name = this.constructor.name, this.room = new So(n.roomOptions), this.connectOptions = n.connectOptions, n.errorsAsWarnings && (this.errorsAsWarnings = n.errorsAsWarnings);
16395
16395
  }
16396
16396
  run(e) {
16397
16397
  return g(this, void 0, void 0, function* () {
16398
- if (this.status !== $e.IDLE)
16398
+ if (this.status !== Ve.IDLE)
16399
16399
  throw Error("check is running already");
16400
- this.setStatus($e.RUNNING);
16400
+ this.setStatus(Ve.RUNNING);
16401
16401
  try {
16402
16402
  yield this.perform();
16403
16403
  } catch (t) {
16404
16404
  t instanceof Error && (this.errorsAsWarnings ? this.appendWarning(t.message) : this.appendError(t.message));
16405
16405
  }
16406
- return yield this.disconnect(), yield new Promise((t) => setTimeout(t, 500)), this.status !== $e.SKIPPED && this.setStatus(this.isSuccess() ? $e.SUCCESS : $e.FAILED), e && e(), this.getInfo();
16406
+ return yield this.disconnect(), yield new Promise((t) => setTimeout(t, 500)), this.status !== Ve.SKIPPED && this.setStatus(this.isSuccess() ? Ve.SUCCESS : Ve.FAILED), e && e(), this.getInfo();
16407
16407
  });
16408
16408
  }
16409
16409
  isSuccess() {
@@ -16420,7 +16420,7 @@ class Ii extends gt.EventEmitter {
16420
16420
  });
16421
16421
  }
16422
16422
  skip() {
16423
- this.setStatus($e.SKIPPED);
16423
+ this.setStatus(Ve.SKIPPED);
16424
16424
  }
16425
16425
  appendMessage(e) {
16426
16426
  this.logs.push({
@@ -16461,7 +16461,7 @@ function Co(i) {
16461
16461
  return g(this, void 0, void 0, function* () {
16462
16462
  i ?? (i = {}), (e = i.audio) !== null && e !== void 0 || (i.audio = !0), (t = i.video) !== null && t !== void 0 || (i.video = !0);
16463
16463
  const n = to(i, ho, fo), s = Un(n), r = navigator.mediaDevices.getUserMedia(s);
16464
- i.audio && (ke.userMediaPromiseMap.set("audioinput", r), r.catch(() => ke.userMediaPromiseMap.delete("audioinput"))), i.video && (ke.userMediaPromiseMap.set("videoinput", r), r.catch(() => ke.userMediaPromiseMap.delete("videoinput")));
16464
+ i.audio && (be.userMediaPromiseMap.set("audioinput", r), r.catch(() => be.userMediaPromiseMap.delete("audioinput"))), i.video && (be.userMediaPromiseMap.set("videoinput", r), r.catch(() => be.userMediaPromiseMap.delete("videoinput")));
16465
16465
  const a = yield r;
16466
16466
  return a.getTracks().map((o) => {
16467
16467
  const c = o.kind === "audio";
@@ -16648,7 +16648,7 @@ class Il extends Ii {
16648
16648
  });
16649
16649
  }
16650
16650
  }
16651
- class Fl extends gt.EventEmitter {
16651
+ class Fl extends mt.EventEmitter {
16652
16652
  constructor(e, t) {
16653
16653
  super(), this.checkResults = /* @__PURE__ */ new Map(), this.url = e, this.token = t;
16654
16654
  }
@@ -16656,7 +16656,7 @@ class Fl extends gt.EventEmitter {
16656
16656
  const e = this.checkResults.size;
16657
16657
  return this.checkResults.set(e, {
16658
16658
  logs: [],
16659
- status: $e.IDLE,
16659
+ status: Ve.IDLE,
16660
16660
  name: "",
16661
16661
  description: ""
16662
16662
  }), e;
@@ -16665,7 +16665,7 @@ class Fl extends gt.EventEmitter {
16665
16665
  this.checkResults.set(e, t), this.emit("checkUpdate", e, t);
16666
16666
  }
16667
16667
  isSuccess() {
16668
- return Array.from(this.checkResults.values()).every((e) => e.status !== $e.FAILED);
16668
+ return Array.from(this.checkResults.values()).every((e) => e.status !== Ve.FAILED);
16669
16669
  }
16670
16670
  getResults() {
16671
16671
  return Array.from(this.checkResults.values());
@@ -16750,7 +16750,7 @@ function Jr(i) {
16750
16750
  }
16751
16751
  return {
16752
16752
  c() {
16753
- e = Xe("div");
16753
+ e = Ye("div");
16754
16754
  for (let a = 0; a < t.length; a += 1)
16755
16755
  t[a].c();
16756
16756
  z(e, "id", "users-container"), z(e, "class", "svelte-xrxt5b");
@@ -16781,8 +16781,8 @@ function jr(i, e) {
16781
16781
  ), h, f, m = (
16782
16782
  /*user*/
16783
16783
  e[28].name + ""
16784
- ), b, T, w, I, D, Q, j, de;
16785
- const ce = () => (
16784
+ ), b, T, w, I, D, Q, j, ce;
16785
+ const ae = () => (
16786
16786
  /*video_binding*/
16787
16787
  e[12](c, d)
16788
16788
  ), q = () => (
@@ -16793,7 +16793,7 @@ function jr(i, e) {
16793
16793
  key: i,
16794
16794
  first: null,
16795
16795
  c() {
16796
- t = Xe("div"), n = $s("svg"), s = $s("path"), r = cn(), a = Xe("div"), o = Xe("div"), c = Xe("video"), h = cn(), f = Xe("div"), b = qr(m), w = cn(), I = Xe("div"), Q = cn(), z(s, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), z(n, "width", "23"), z(n, "viewBox", "0 0 27 24"), z(n, "fill", "currentColor"), z(n, "aria-hidden", "true"), z(n, "xmlns", "http://www.w3.org/2000/svg"), z(n, "class", "cursor svelte-xrxt5b"), z(c, "id", u = `user-video-${/*user*/
16796
+ t = Ye("div"), n = $s("svg"), s = $s("path"), r = cn(), a = Ye("div"), o = Ye("div"), c = Ye("video"), h = cn(), f = Ye("div"), b = qr(m), w = cn(), I = Ye("div"), Q = cn(), z(s, "d", "M2.2706 0.0593359L25.4277 8.05957H25.45926C25.65896 8.13153 25.83096 8.25952 25.95221 8.42653C26.07357 8.59354 26.13851 8.79166 26.13851 8.99459C26.13851 9.19751 26.07357 9.39564 25.95221 9.56265C25.83096 9.72966 25.65896 9.85765 25.45926 9.92962L15.3543 13.7698L11.3124 23.37C11.2344 23.5561 11.0994 23.7156 10.9248 23.828C10.7503 23.9402 10.5443 24.0002 10.3335 24C10.1172 24 9.9061 23.9365 9.7291 23.8184C9.552 23.7004 9.4176 23.5332 9.344 23.34L0.9233 1.33937C0.8555 1.16076 0.8426 0.967504 0.8861 0.782189C0.9297 0.596873 1.0278 0.427163 1.1691 0.292901C1.3105 0.158639 1.4891 0.0653762 1.6841 0.0240151C1.8792 -0.0173461 2.0826 -0.00509504 2.2706 0.0593359Z"), z(n, "width", "23"), z(n, "viewBox", "0 0 27 24"), z(n, "fill", "currentColor"), z(n, "aria-hidden", "true"), z(n, "xmlns", "http://www.w3.org/2000/svg"), z(n, "class", "cursor svelte-xrxt5b"), z(c, "id", u = `user-video-${/*user*/
16797
16797
  e[28].id}`), z(c, "class", "svelte-xrxt5b"), z(o, "id", "video-container"), z(o, "class", "svelte-xrxt5b"), z(f, "class", "user-name svelte-xrxt5b"), z(a, "class", "user-label svelte-xrxt5b"), z(a, "data-hidevideo", T = !/*user*/
16798
16798
  e[28].camera_enabled), z(I, "class", "halo svelte-xrxt5b"), z(I, "data-show", D = /*user*/
16799
16799
  (e[28].id == /*me*/
@@ -16804,7 +16804,7 @@ function jr(i, e) {
16804
16804
  (e[28].is_shift_key_down || /*user*/
16805
16805
  e[28].is_mouse_down)) && /*users_count*/
16806
16806
  e[3] > 1), z(t, "id", j = "user-" + /*user*/
16807
- e[28].id), z(t, "class", "user svelte-xrxt5b"), z(t, "data-isself", de = /*user*/
16807
+ e[28].id), z(t, "class", "user svelte-xrxt5b"), z(t, "data-isself", ce = /*user*/
16808
16808
  e[28].id == /*me*/
16809
16809
  e[0].id), hi(
16810
16810
  t,
@@ -16820,14 +16820,14 @@ function jr(i, e) {
16820
16820
  ) + "vh"), this.first = t;
16821
16821
  },
16822
16822
  m(K, x) {
16823
- Ln(K, t, x), Oe(t, n), Oe(n, s), Oe(t, r), Oe(t, a), Oe(a, o), Oe(o, c), ce(), Oe(a, h), Oe(a, f), Oe(f, b), Oe(t, w), Oe(t, I), Oe(t, Q);
16823
+ Ln(K, t, x), Oe(t, n), Oe(n, s), Oe(t, r), Oe(t, a), Oe(a, o), Oe(o, c), ae(), Oe(a, h), Oe(a, f), Oe(f, b), Oe(t, w), Oe(t, I), Oe(t, Q);
16824
16824
  },
16825
16825
  p(K, x) {
16826
16826
  e = K, x & /*users*/
16827
16827
  2 && u !== (u = `user-video-${/*user*/
16828
16828
  e[28].id}`) && z(c, "id", u), d !== /*user*/
16829
16829
  e[28] && (q(), d = /*user*/
16830
- e[28], ce()), x & /*users*/
16830
+ e[28], ae()), x & /*users*/
16831
16831
  2 && m !== (m = /*user*/
16832
16832
  e[28].name + "") && qo(b, m), x & /*users*/
16833
16833
  2 && T !== (T = !/*user*/
@@ -16843,9 +16843,9 @@ function jr(i, e) {
16843
16843
  e[3] > 1) && z(I, "data-show", D), x & /*users*/
16844
16844
  2 && j !== (j = "user-" + /*user*/
16845
16845
  e[28].id) && z(t, "id", j), x & /*users, me*/
16846
- 3 && de !== (de = /*user*/
16846
+ 3 && ce !== (ce = /*user*/
16847
16847
  e[28].id == /*me*/
16848
- e[0].id) && z(t, "data-isself", de), x & /*users*/
16848
+ e[0].id) && z(t, "data-isself", ce), x & /*users*/
16849
16849
  2 && hi(
16850
16850
  t,
16851
16851
  "--color",
@@ -16874,7 +16874,7 @@ function Ll(i) {
16874
16874
  );
16875
16875
  return {
16876
16876
  c() {
16877
- e = Xe("div"), t && t.c(), z(e, "id", "liveroom-client-element"), z(e, "class", "svelte-xrxt5b");
16877
+ e = Ye("div"), t && t.c(), z(e, "id", "liveroom-client-element"), z(e, "class", "svelte-xrxt5b");
16878
16878
  },
16879
16879
  m(n, s) {
16880
16880
  Ln(n, e, s), t && t.m(e, null);
@@ -16900,24 +16900,19 @@ function Rs(i, e) {
16900
16900
  function Nl(i, e, t) {
16901
16901
  let { version: n } = e, { url: s } = e, { room_id: r } = e, { user_name: a = void 0 } = e, o, c, u = !1, d = xl(), h = Al(), f, m, b, T, w = {}, I;
16902
16902
  Wo(async () => {
16903
- console.log(`[Liveroom] Starting... (v${n})`);
16904
- const M = new URLSearchParams(window.location.search), ae = M.get("_liveroom"), te = ae == null ? void 0 : ae.split("https://meet.google.com/");
16905
- let pe = te == null ? void 0 : te[0];
16906
- !!(te != null && te[1]) && (pe = te[1].split("?")[0]), t(4, r = pe || r);
16907
- const Fe = M.get("_liveroom_user_name");
16908
- Fe && t(5, a = Fe), Q();
16903
+ console.log(`[Liveroom] Starting in room '${r}' (user name: '${a}')... (v${n})`), Q();
16909
16904
  }), Go(() => {
16910
16905
  j(), xi();
16911
16906
  });
16912
16907
  async function D() {
16913
- if (console.log("[LiveKit] Beginning setup..."), t(8, c = new So({ dynacast: !0 }).on(P.TrackSubscribed, async (M, ae, te) => {
16914
- switch (console.log("[LiveKit] Track Subscribed", M, ae, te), console.table({
16915
- identity: te.identity,
16916
- source: ae.source
16917
- }), ae.source) {
16908
+ if (console.log("[LiveKit] Beginning setup..."), t(8, c = new So({ dynacast: !0 }).on(P.TrackSubscribed, async (U, he, fe) => {
16909
+ switch (console.log("[LiveKit] Track Subscribed", U, he, fe), console.table({
16910
+ identity: fe.identity,
16911
+ source: he.source
16912
+ }), he.source) {
16918
16913
  case C.Source.Camera: {
16919
- const pe = w[te.identity];
16920
- pe && (console.log(`[LiveKit] Attaching user camera (identity ${te.identity})`), M.attach(pe));
16914
+ const Ie = w[fe.identity];
16915
+ Ie && (console.log(`[LiveKit] Attaching user camera (identity ${fe.identity})`), U.attach(Ie));
16921
16916
  break;
16922
16917
  }
16923
16918
  }
@@ -16927,9 +16922,9 @@ function Nl(i, e, t) {
16927
16922
  throw new Error("LiveKit token not set");
16928
16923
  console.log(`[LiveKit] Connecting to '${b}'...`), await c.connect(b, T, { autoSubscribe: !0 }), console.log("[LiveKit] Connected to room", c.name), await Promise.all([
16929
16924
  c.localParticipant.enableCameraAndMicrophone().then(() => console.log("[LiveKit] Local camera & mic enabled")).then(async () => {
16930
- var pe, Ee, Fe;
16931
- const M = (Ee = (pe = c == null ? void 0 : c.localParticipant) == null ? void 0 : pe.videoTracks) == null ? void 0 : Ee.values(), ae = M && ((Fe = Array.from(M)[0]) == null ? void 0 : Fe.track), te = f && w[f.id];
16932
- te && ae && (console.log("[LiveKit] Attaching local user camera"), ae.attach(te));
16925
+ var Ie, xe, gt;
16926
+ const U = (xe = (Ie = c == null ? void 0 : c.localParticipant) == null ? void 0 : Ie.videoTracks) == null ? void 0 : xe.values(), he = U && ((gt = Array.from(U)[0]) == null ? void 0 : gt.track), fe = f && w[f.id];
16927
+ fe && he && (console.log("[LiveKit] Attaching local user camera"), he.attach(fe));
16933
16928
  })
16934
16929
  ]);
16935
16930
  }
@@ -16948,80 +16943,80 @@ function Nl(i, e, t) {
16948
16943
  user_agent: window.navigator.userAgent
16949
16944
  },
16950
16945
  socketOptions: { logger: null }
16951
- }), o.addEventListener("wheel-from-another-user", ({ detail: { delta_x: M, delta_y: ae, x: te, y: pe } }) => {
16952
- const Ee = parseInt(M), Fe = parseInt(ae), ie = new WheelEvent(
16946
+ }), o.addEventListener("wheel-from-another-user", ({ detail: { delta_x: U, delta_y: he, x: fe, y: Ie } }) => {
16947
+ const xe = parseInt(U), gt = parseInt(he), te = new WheelEvent(
16953
16948
  "wheel",
16954
16949
  {
16955
16950
  view: window,
16956
16951
  bubbles: !0,
16957
16952
  cancelable: !0,
16958
- clientX: window.innerWidth * parseFloat(te) / 100,
16959
- clientY: window.innerHeight * parseFloat(pe) / 100,
16960
- deltaX: Ee,
16961
- deltaY: Fe,
16953
+ clientX: window.innerWidth * parseFloat(fe) / 100,
16954
+ clientY: window.innerHeight * parseFloat(Ie) / 100,
16955
+ deltaX: xe,
16956
+ deltaY: gt,
16962
16957
  deltaMode: 0
16963
16958
  }
16964
16959
  ), vt = document.head.contains(h);
16965
16960
  vt && document.head.removeChild(h);
16966
- const di = document.elementFromPoint(ie.clientX, ie.clientY);
16967
- vt && document.head.appendChild(h), (di instanceof HTMLElement || di instanceof SVGElement) && (Math.abs(Fe) >= Math.abs(Ee) ? Rs(di, "vertical").scrollBy({
16968
- top: Fe,
16961
+ const di = document.elementFromPoint(te.clientX, te.clientY);
16962
+ vt && document.head.appendChild(h), (di instanceof HTMLElement || di instanceof SVGElement) && (Math.abs(gt) >= Math.abs(xe) ? Rs(di, "vertical").scrollBy({
16963
+ top: gt,
16969
16964
  left: 0,
16970
16965
  behavior: "instant"
16971
16966
  }) : Rs(di, "horizontal").scrollBy({
16972
16967
  top: 0,
16973
- left: Ee,
16968
+ left: xe,
16974
16969
  behavior: "instant"
16975
16970
  }));
16976
- }), o.addEventListener("click-from-another-user", ({ detail: { x: M, y: ae } }) => {
16977
- const te = new MouseEvent(
16971
+ }), o.addEventListener("click-from-another-user", ({ detail: { x: U, y: he } }) => {
16972
+ const fe = new MouseEvent(
16978
16973
  "click",
16979
16974
  {
16980
16975
  view: window,
16981
16976
  bubbles: !0,
16982
16977
  cancelable: !0,
16983
- clientX: window.innerWidth * parseFloat(M) / 100,
16984
- clientY: window.innerHeight * parseFloat(ae) / 100
16978
+ clientX: window.innerWidth * parseFloat(U) / 100,
16979
+ clientY: window.innerHeight * parseFloat(he) / 100
16985
16980
  }
16986
- ), pe = document.head.contains(h);
16987
- pe && document.head.removeChild(h);
16988
- const Ee = document.elementFromPoint(te.clientX, te.clientY);
16989
- pe && document.head.appendChild(h), (Ee instanceof HTMLElement || Ee instanceof SVGElement) && Ee.dispatchEvent(te);
16990
- }), o.addEventListener("livestate-change", ({ detail: { state: M } }) => {
16991
- t(4, r = M.room_id), t(0, f = M.me), t(1, m = M.users), t(10, b = M.livekit_ws_url), t(11, T = M.livekit_token);
16992
- }), o.connect(), window.addEventListener("mousemove", de), window.addEventListener("mousedown", ce), window.addEventListener("mouseup", q), window.addEventListener("keydown", x), window.addEventListener("keyup", F), window.addEventListener("resize", fe);
16981
+ ), Ie = document.head.contains(h);
16982
+ Ie && document.head.removeChild(h);
16983
+ const xe = document.elementFromPoint(fe.clientX, fe.clientY);
16984
+ Ie && document.head.appendChild(h), (xe instanceof HTMLElement || xe instanceof SVGElement) && xe.dispatchEvent(fe);
16985
+ }), o.addEventListener("livestate-change", ({ detail: { state: U } }) => {
16986
+ t(4, r = U.room_id), t(0, f = U.me), t(1, m = U.users), t(10, b = U.livekit_ws_url), t(11, T = U.livekit_token);
16987
+ }), o.connect(), window.addEventListener("mousemove", ce), window.addEventListener("mousedown", ae), window.addEventListener("mouseup", q), window.addEventListener("keydown", x), window.addEventListener("keyup", F), window.addEventListener("resize", le);
16993
16988
  }
16994
16989
  function j() {
16995
- window.removeEventListener("resize", fe), window.removeEventListener("keyup", F), window.removeEventListener("keydown", x), window.removeEventListener("mouseup", q), window.removeEventListener("mousedown", ce), window.removeEventListener("mousemove", de), o == null || o.disconnect(), o = void 0, c == null || c.disconnect(), t(8, c = void 0);
16990
+ window.removeEventListener("resize", le), window.removeEventListener("keyup", F), window.removeEventListener("keydown", x), window.removeEventListener("mouseup", q), window.removeEventListener("mousedown", ae), window.removeEventListener("mousemove", ce), o == null || o.disconnect(), o = void 0, c == null || c.disconnect(), t(8, c = void 0);
16996
16991
  }
16997
- function de(M) {
16992
+ function ce(U) {
16998
16993
  o && (f != null && f.id) && o.dispatchEvent(new CustomEvent(
16999
16994
  "mouse_move",
17000
16995
  {
17001
16996
  detail: {
17002
16997
  user_id: f.id,
17003
- x: Number(M.clientX / window.innerWidth * 100).toFixed(2),
16998
+ x: Number(U.clientX / window.innerWidth * 100).toFixed(2),
17004
16999
  // in %
17005
- y: Number(M.clientY / window.innerHeight * 100).toFixed(2)
17000
+ y: Number(U.clientY / window.innerHeight * 100).toFixed(2)
17006
17001
  }
17007
17002
  // in %
17008
17003
  }
17009
17004
  ));
17010
17005
  }
17011
- function ce() {
17006
+ function ae() {
17012
17007
  o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("mouse_down", { detail: { user_id: f.id } }));
17013
17008
  }
17014
17009
  function q() {
17015
17010
  o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("mouse_up", { detail: { user_id: f.id } }));
17016
17011
  }
17017
17012
  const K = ["Shift"];
17018
- function x(M) {
17019
- !M.repeat && K.includes(M.key) && o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("key_down", { detail: { key: M.key, user_id: f.id } }));
17013
+ function x(U) {
17014
+ !U.repeat && K.includes(U.key) && o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("key_down", { detail: { key: U.key, user_id: f.id } }));
17020
17015
  }
17021
- function F(M) {
17022
- K.includes(M.key) && o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("key_up", { detail: { key: M.key, user_id: f.id } }));
17016
+ function F(U) {
17017
+ K.includes(U.key) && o && (f != null && f.id) && o.dispatchEvent(new CustomEvent("key_up", { detail: { key: U.key, user_id: f.id } }));
17023
17018
  }
17024
- function fe() {
17019
+ function le() {
17025
17020
  o && (f != null && f.id) && o.dispatchEvent(new CustomEvent(
17026
17021
  "window_resize",
17027
17022
  {
@@ -17039,28 +17034,28 @@ function Nl(i, e, t) {
17039
17034
  function xi() {
17040
17035
  document.head.removeChild(d), document.head.removeChild(h), t(9, u = !1);
17041
17036
  }
17042
- function Ai(M, ae) {
17043
- ts[M ? "unshift" : "push"](() => {
17044
- w[ae.id] = M, t(2, w);
17037
+ function Ai(U, he) {
17038
+ ts[U ? "unshift" : "push"](() => {
17039
+ w[he.id] = U, t(2, w);
17045
17040
  });
17046
17041
  }
17047
- return i.$$set = (M) => {
17048
- "version" in M && t(6, n = M.version), "url" in M && t(7, s = M.url), "room_id" in M && t(4, r = M.room_id), "user_name" in M && t(5, a = M.user_name);
17042
+ return i.$$set = (U) => {
17043
+ "version" in U && t(5, n = U.version), "url" in U && t(6, s = U.url), "room_id" in U && t(4, r = U.room_id), "user_name" in U && t(7, a = U.user_name);
17049
17044
  }, i.$$.update = () => {
17050
17045
  i.$$.dirty & /*livekitRoom, me, users, livekit_ws_url, livekit_token*/
17051
17046
  3331 && !c && f && m && b && T && D(), i.$$.dirty & /*users*/
17052
17047
  2 && t(3, I = Object.keys(m || {}).length), i.$$.dirty & /*isClickBlocked, users*/
17053
- 514 && !u && m && Object.values(m).some((M) => M.type == "admin" && M.is_space_key_down) && Ue(), i.$$.dirty & /*isClickBlocked, users*/
17054
- 514 && u && m && Object.values(m).filter((M) => M.type == "admin").every((M) => !M.is_space_key_down) && xi();
17048
+ 514 && !u && m && Object.values(m).some((U) => U.type == "admin" && U.is_space_key_down) && Ue(), i.$$.dirty & /*isClickBlocked, users*/
17049
+ 514 && u && m && Object.values(m).filter((U) => U.type == "admin").every((U) => !U.is_space_key_down) && xi();
17055
17050
  }, [
17056
17051
  f,
17057
17052
  m,
17058
17053
  w,
17059
17054
  I,
17060
17055
  r,
17061
- a,
17062
17056
  n,
17063
17057
  s,
17058
+ a,
17064
17059
  c,
17065
17060
  u,
17066
17061
  b,
@@ -17077,22 +17072,22 @@ class Dl extends ac {
17077
17072
  Ll,
17078
17073
  Fo,
17079
17074
  {
17080
- version: 6,
17081
- url: 7,
17075
+ version: 5,
17076
+ url: 6,
17082
17077
  room_id: 4,
17083
- user_name: 5
17078
+ user_name: 7
17084
17079
  },
17085
17080
  Ol
17086
17081
  );
17087
17082
  }
17088
17083
  get version() {
17089
- return this.$$.ctx[6];
17084
+ return this.$$.ctx[5];
17090
17085
  }
17091
17086
  set version(e) {
17092
17087
  this.$$set({ version: e }), vi();
17093
17088
  }
17094
17089
  get url() {
17095
- return this.$$.ctx[7];
17090
+ return this.$$.ctx[6];
17096
17091
  }
17097
17092
  set url(e) {
17098
17093
  this.$$set({ url: e }), vi();
@@ -17104,7 +17099,7 @@ class Dl extends ac {
17104
17099
  this.$$set({ room_id: e }), vi();
17105
17100
  }
17106
17101
  get user_name() {
17107
- return this.$$.ctx[5];
17102
+ return this.$$.ctx[7];
17108
17103
  }
17109
17104
  set user_name(e) {
17110
17105
  this.$$set({ user_name: e }), vi();