liveroom-client-element 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{constants-DxKL5GJ4.js → constants-C8O2fXxM.js} +1 -1
- package/dist/{constants-ClJvwRne.cjs → constants-mjPxcM4R.cjs} +1 -1
- package/dist/liveroom-client-element.cjs +10 -10
- package/dist/liveroom-client-element.js +630 -646
- package/dist/main.cjs +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var yc = Object.defineProperty;
|
|
2
2
|
var bc = (n, e, t) => e in n ? yc(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var x = (n, e, t) => (bc(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
import { b as Tc, d as Cc } from "./constants-
|
|
5
|
-
function
|
|
4
|
+
import { b as Tc, d as Cc } from "./constants-C8O2fXxM.js";
|
|
5
|
+
function mn() {
|
|
6
6
|
}
|
|
7
7
|
function Gr(n) {
|
|
8
8
|
return n();
|
|
@@ -10,7 +10,7 @@ function Gr(n) {
|
|
|
10
10
|
function Fs() {
|
|
11
11
|
return /* @__PURE__ */ Object.create(null);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function Cn(n) {
|
|
14
14
|
n.forEach(Gr);
|
|
15
15
|
}
|
|
16
16
|
function zr(n) {
|
|
@@ -64,7 +64,7 @@ function Bs(n) {
|
|
|
64
64
|
function ps(n) {
|
|
65
65
|
return document.createTextNode(n);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function en() {
|
|
68
68
|
return ps(" ");
|
|
69
69
|
}
|
|
70
70
|
function Rc() {
|
|
@@ -81,7 +81,7 @@ function Oc(n, e) {
|
|
|
81
81
|
e);
|
|
82
82
|
}
|
|
83
83
|
function Ve(n, e, t, i) {
|
|
84
|
-
t == null ? n.style.removeProperty(e) : n.style.setProperty(e, t,
|
|
84
|
+
t == null ? n.style.removeProperty(e) : n.style.setProperty(e, t, "");
|
|
85
85
|
}
|
|
86
86
|
function Mc(n) {
|
|
87
87
|
const e = {};
|
|
@@ -92,14 +92,14 @@ function Mc(n) {
|
|
|
92
92
|
}
|
|
93
93
|
), e;
|
|
94
94
|
}
|
|
95
|
-
let
|
|
96
|
-
function
|
|
97
|
-
|
|
95
|
+
let gn;
|
|
96
|
+
function an(n) {
|
|
97
|
+
gn = n;
|
|
98
98
|
}
|
|
99
99
|
function Wr() {
|
|
100
|
-
if (!
|
|
100
|
+
if (!gn)
|
|
101
101
|
throw new Error("Function called outside component initialization");
|
|
102
|
-
return
|
|
102
|
+
return gn;
|
|
103
103
|
}
|
|
104
104
|
function xc(n) {
|
|
105
105
|
Wr().$$.on_mount.push(n);
|
|
@@ -107,53 +107,53 @@ function xc(n) {
|
|
|
107
107
|
function Ac(n) {
|
|
108
108
|
Wr().$$.on_destroy.push(n);
|
|
109
109
|
}
|
|
110
|
-
const
|
|
111
|
-
let
|
|
110
|
+
const At = [], Ai = [];
|
|
111
|
+
let Lt = [];
|
|
112
112
|
const Vs = [], Dc = /* @__PURE__ */ Promise.resolve();
|
|
113
113
|
let Di = !1;
|
|
114
114
|
function Nc() {
|
|
115
115
|
Di || (Di = !0, Dc.then(ct));
|
|
116
116
|
}
|
|
117
117
|
function Ni(n) {
|
|
118
|
-
|
|
118
|
+
Lt.push(n);
|
|
119
119
|
}
|
|
120
120
|
const bi = /* @__PURE__ */ new Set();
|
|
121
|
-
let
|
|
121
|
+
let It = 0;
|
|
122
122
|
function ct() {
|
|
123
|
-
if (
|
|
123
|
+
if (It !== 0)
|
|
124
124
|
return;
|
|
125
|
-
const n =
|
|
125
|
+
const n = gn;
|
|
126
126
|
do {
|
|
127
127
|
try {
|
|
128
|
-
for (;
|
|
129
|
-
const e =
|
|
130
|
-
|
|
128
|
+
for (; It < At.length; ) {
|
|
129
|
+
const e = At[It];
|
|
130
|
+
It++, an(e), Lc(e.$$);
|
|
131
131
|
}
|
|
132
132
|
} catch (e) {
|
|
133
|
-
throw
|
|
133
|
+
throw At.length = 0, It = 0, e;
|
|
134
134
|
}
|
|
135
|
-
for (
|
|
135
|
+
for (an(null), At.length = 0, It = 0; Ai.length; )
|
|
136
136
|
Ai.pop()();
|
|
137
|
-
for (let e = 0; e <
|
|
138
|
-
const t =
|
|
137
|
+
for (let e = 0; e < Lt.length; e += 1) {
|
|
138
|
+
const t = Lt[e];
|
|
139
139
|
bi.has(t) || (bi.add(t), t());
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
} while (
|
|
141
|
+
Lt.length = 0;
|
|
142
|
+
} while (At.length);
|
|
143
143
|
for (; Vs.length; )
|
|
144
144
|
Vs.pop()();
|
|
145
|
-
Di = !1, bi.clear(),
|
|
145
|
+
Di = !1, bi.clear(), an(n);
|
|
146
146
|
}
|
|
147
147
|
function Lc(n) {
|
|
148
148
|
if (n.fragment !== null) {
|
|
149
|
-
n.update(),
|
|
149
|
+
n.update(), Cn(n.before_update);
|
|
150
150
|
const e = n.dirty;
|
|
151
151
|
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Ni);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
function Uc(n) {
|
|
155
155
|
const e = [], t = [];
|
|
156
|
-
|
|
156
|
+
Lt.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), Lt = e;
|
|
157
157
|
}
|
|
158
158
|
const jc = /* @__PURE__ */ new Set();
|
|
159
159
|
function Jr(n, e) {
|
|
@@ -170,51 +170,51 @@ function Bc(n, e, t, i, s, r, a, o, c, d, l, u) {
|
|
|
170
170
|
const v = {};
|
|
171
171
|
for (; k--; )
|
|
172
172
|
v[n[k].key] = k;
|
|
173
|
-
const S = [], O = /* @__PURE__ */ new Map(),
|
|
173
|
+
const S = [], O = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), F = [];
|
|
174
174
|
for (k = m; k--; ) {
|
|
175
175
|
const N = u(s, r, k), X = t(N);
|
|
176
176
|
let A = a.get(X);
|
|
177
|
-
A ?
|
|
177
|
+
A ? F.push(() => A.p(N, e)) : (A = d(X, N), A.c()), O.set(X, S[k] = A), X in v && w.set(X, Math.abs(k - v[X]));
|
|
178
178
|
}
|
|
179
179
|
const W = /* @__PURE__ */ new Set(), he = /* @__PURE__ */ new Set();
|
|
180
|
-
function
|
|
180
|
+
function de(N) {
|
|
181
181
|
Jr(N, 1), N.m(o, l), a.set(N.key, N), l = N.first, m--;
|
|
182
182
|
}
|
|
183
183
|
for (; p && m; ) {
|
|
184
184
|
const N = S[m - 1], X = n[p - 1], A = N.key, H = X.key;
|
|
185
|
-
N === X ? (l = N.first, p--, m--) : O.has(H) ? !a.has(A) || W.has(A) ?
|
|
185
|
+
N === X ? (l = N.first, p--, m--) : O.has(H) ? !a.has(A) || W.has(A) ? de(N) : he.has(H) ? p-- : w.get(A) > w.get(H) ? (he.add(A), de(N)) : (W.add(H), p--) : (c(X, a), p--);
|
|
186
186
|
}
|
|
187
187
|
for (; p--; ) {
|
|
188
188
|
const N = n[p];
|
|
189
189
|
O.has(N.key) || c(N, a);
|
|
190
190
|
}
|
|
191
191
|
for (; m; )
|
|
192
|
-
|
|
193
|
-
return
|
|
192
|
+
de(S[m - 1]);
|
|
193
|
+
return Cn(F), S;
|
|
194
194
|
}
|
|
195
195
|
function Vc(n, e, t) {
|
|
196
196
|
const { fragment: i, after_update: s } = n.$$;
|
|
197
197
|
i && i.m(e, t), Ni(() => {
|
|
198
198
|
const r = n.$$.on_mount.map(Gr).filter(zr);
|
|
199
|
-
n.$$.on_destroy ? n.$$.on_destroy.push(...r) :
|
|
199
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...r) : Cn(r), n.$$.on_mount = [];
|
|
200
200
|
}), s.forEach(Ni);
|
|
201
201
|
}
|
|
202
202
|
function $c(n, e) {
|
|
203
203
|
const t = n.$$;
|
|
204
|
-
t.fragment !== null && (Uc(t.after_update),
|
|
204
|
+
t.fragment !== null && (Uc(t.after_update), Cn(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
205
205
|
}
|
|
206
206
|
function Hc(n, e) {
|
|
207
|
-
n.$$.dirty[0] === -1 && (
|
|
207
|
+
n.$$.dirty[0] === -1 && (At.push(n), Nc(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
208
208
|
}
|
|
209
209
|
function qc(n, e, t, i, s, r, a = null, o = [-1]) {
|
|
210
|
-
const c =
|
|
211
|
-
|
|
210
|
+
const c = gn;
|
|
211
|
+
an(n);
|
|
212
212
|
const d = n.$$ = {
|
|
213
213
|
fragment: null,
|
|
214
214
|
ctx: [],
|
|
215
215
|
// state
|
|
216
216
|
props: r,
|
|
217
|
-
update:
|
|
217
|
+
update: mn,
|
|
218
218
|
not_equal: s,
|
|
219
219
|
bound: Fs(),
|
|
220
220
|
// lifecycle
|
|
@@ -235,7 +235,7 @@ function qc(n, e, t, i, s, r, a = null, o = [-1]) {
|
|
|
235
235
|
if (d.ctx = t ? t(n, e.props || {}, (u, p, ...m) => {
|
|
236
236
|
const k = m.length ? m[0] : p;
|
|
237
237
|
return d.ctx && s(d.ctx[u], d.ctx[u] = k) && (!d.skip_bound && d.bound[u] && d.bound[u](k), l && Hc(n, u)), p;
|
|
238
|
-
}) : [], d.update(), l = !0,
|
|
238
|
+
}) : [], d.update(), l = !0, Cn(d.before_update), d.fragment = i ? i(d.ctx) : !1, e.target) {
|
|
239
239
|
if (e.hydrate) {
|
|
240
240
|
const u = Ic(e.target);
|
|
241
241
|
d.fragment && d.fragment.l(u), u.forEach(ut);
|
|
@@ -243,7 +243,7 @@ function qc(n, e, t, i, s, r, a = null, o = [-1]) {
|
|
|
243
243
|
d.fragment && d.fragment.c();
|
|
244
244
|
e.intro && Jr(n.$$.fragment), Vc(n, e.target, e.anchor), ct();
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
an(c);
|
|
247
247
|
}
|
|
248
248
|
let Kr;
|
|
249
249
|
typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
|
|
@@ -423,7 +423,7 @@ function Gc(n, e, t, i, s, r) {
|
|
|
423
423
|
return (c = this.$$c) == null ? void 0 : c[o];
|
|
424
424
|
}
|
|
425
425
|
});
|
|
426
|
-
}),
|
|
426
|
+
}), n.element = /** @type {any} */
|
|
427
427
|
a, a;
|
|
428
428
|
}
|
|
429
429
|
class zc {
|
|
@@ -447,7 +447,7 @@ class zc {
|
|
|
447
447
|
}
|
|
448
448
|
/** @returns {void} */
|
|
449
449
|
$destroy() {
|
|
450
|
-
$c(this, 1), this.$destroy =
|
|
450
|
+
$c(this, 1), this.$destroy = mn;
|
|
451
451
|
}
|
|
452
452
|
/**
|
|
453
453
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -457,7 +457,7 @@ class zc {
|
|
|
457
457
|
*/
|
|
458
458
|
$on(e, t) {
|
|
459
459
|
if (!zr(t))
|
|
460
|
-
return
|
|
460
|
+
return mn;
|
|
461
461
|
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
462
462
|
return i.push(t), () => {
|
|
463
463
|
const s = i.indexOf(t);
|
|
@@ -474,19 +474,19 @@ class zc {
|
|
|
474
474
|
}
|
|
475
475
|
const Wc = "4";
|
|
476
476
|
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Wc);
|
|
477
|
-
const { isArray: Jc } = Array, Kc = Object.keys,
|
|
477
|
+
const { isArray: Jc } = Array, Kc = Object.keys, vn = (n) => {
|
|
478
478
|
if (!n)
|
|
479
479
|
return n;
|
|
480
480
|
if (Jc(n)) {
|
|
481
481
|
const e = [], t = n.length;
|
|
482
482
|
for (let i = 0; i < t; i++)
|
|
483
|
-
e.push(
|
|
483
|
+
e.push(vn(n[i]));
|
|
484
484
|
return e;
|
|
485
485
|
} else if (typeof n == "object") {
|
|
486
486
|
const e = Kc(n), t = e.length, i = {};
|
|
487
487
|
for (let s = 0; s < t; s++) {
|
|
488
488
|
const r = e[s];
|
|
489
|
-
i[r] =
|
|
489
|
+
i[r] = vn(n[r]);
|
|
490
490
|
}
|
|
491
491
|
return i;
|
|
492
492
|
}
|
|
@@ -539,7 +539,7 @@ const { isArray: Qr } = Array, ne = (n, e) => {
|
|
|
539
539
|
else
|
|
540
540
|
throw new Error("NOT_FOUND");
|
|
541
541
|
return { val: n, obj: i, key: s };
|
|
542
|
-
},
|
|
542
|
+
}, Sn = (n) => Qr(n.obj) && typeof n.key == "number", ai = (n) => typeof n.obj == "object" && typeof n.key == "string";
|
|
543
543
|
class fs extends Re {
|
|
544
544
|
constructor(t, i) {
|
|
545
545
|
super(t);
|
|
@@ -553,7 +553,7 @@ class fs extends Re {
|
|
|
553
553
|
return 0;
|
|
554
554
|
}
|
|
555
555
|
apply(t) {
|
|
556
|
-
const { val: i, key: s, obj: r } = ne(t, this.path), a =
|
|
556
|
+
const { val: i, key: s, obj: r } = ne(t, this.path), a = vn(this.value);
|
|
557
557
|
if (!r)
|
|
558
558
|
t = a;
|
|
559
559
|
else if (typeof s == "string")
|
|
@@ -600,7 +600,7 @@ class Yr extends Re {
|
|
|
600
600
|
const i = ne(t, this.path);
|
|
601
601
|
if (i.val === void 0)
|
|
602
602
|
throw new Error("NOT_FOUND");
|
|
603
|
-
return ai(i) ? delete i.obj[i.key] :
|
|
603
|
+
return ai(i) ? delete i.obj[i.key] : Sn(i) ? i.val !== void 0 && i.obj.splice(i.key, 1) : t = null, { doc: t, old: i.val };
|
|
604
604
|
}
|
|
605
605
|
toJson(t) {
|
|
606
606
|
const i = {
|
|
@@ -635,7 +635,7 @@ class ad extends Re {
|
|
|
635
635
|
const i = ne(t, this.path);
|
|
636
636
|
if (i.val === void 0)
|
|
637
637
|
throw new Error("NOT_FOUND");
|
|
638
|
-
return ai(i) ? i.obj[i.key] = this.value :
|
|
638
|
+
return ai(i) ? i.obj[i.key] = this.value : Sn(i) ? i.obj[i.key] = this.value : t = this.value, { doc: t, old: i.val };
|
|
639
639
|
}
|
|
640
640
|
toJson(t) {
|
|
641
641
|
const i = {
|
|
@@ -700,7 +700,7 @@ class cd extends Re {
|
|
|
700
700
|
const { val: i } = ne(t, this.from);
|
|
701
701
|
if (i === void 0)
|
|
702
702
|
throw new Error("NOT_FOUND");
|
|
703
|
-
return new fs(this.path,
|
|
703
|
+
return new fs(this.path, vn(i)).apply(t);
|
|
704
704
|
}
|
|
705
705
|
toJson(t) {
|
|
706
706
|
return {
|
|
@@ -716,7 +716,7 @@ class cd extends Re {
|
|
|
716
716
|
t.encodeArrayHeader(3), t.writer.u8(3), t.encodeArray(this.path), t.encodeArray(this.from);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
class
|
|
719
|
+
class Ce extends Re {
|
|
720
720
|
apply(e) {
|
|
721
721
|
if (!this.test(e))
|
|
722
722
|
throw new Error("TEST");
|
|
@@ -749,7 +749,7 @@ const Qn = (n, e) => {
|
|
|
749
749
|
}
|
|
750
750
|
return !1;
|
|
751
751
|
};
|
|
752
|
-
class dd extends
|
|
752
|
+
class dd extends Ce {
|
|
753
753
|
constructor(t, i, s) {
|
|
754
754
|
super(t);
|
|
755
755
|
x(this, "value");
|
|
@@ -949,7 +949,7 @@ class gd extends Re {
|
|
|
949
949
|
if (i.val === void 0)
|
|
950
950
|
throw new Error("NOT_FOUND");
|
|
951
951
|
const s = this.split(i.val);
|
|
952
|
-
return ai(i) ? i.obj[i.key] = s :
|
|
952
|
+
return ai(i) ? i.obj[i.key] = s : Sn(i) ? (i.obj[i.key] = s[0], i.obj.splice(i.key + 1, 0, s[1])) : t = s, { doc: t, old: i.val };
|
|
953
953
|
}
|
|
954
954
|
split(t) {
|
|
955
955
|
if (typeof t == "string") {
|
|
@@ -1029,7 +1029,7 @@ class vd extends Re {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
apply(t) {
|
|
1031
1031
|
const i = ne(t, this.path);
|
|
1032
|
-
if (!
|
|
1032
|
+
if (!Sn(i))
|
|
1033
1033
|
throw new Error("INVALID_TARGET");
|
|
1034
1034
|
if (i.key <= 0)
|
|
1035
1035
|
throw new Error("INVALID_KEY");
|
|
@@ -1071,7 +1071,7 @@ class yd extends Re {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
apply(t) {
|
|
1073
1073
|
const i = ne(t, this.path);
|
|
1074
|
-
return
|
|
1074
|
+
return Sn(i) ? i.val !== void 0 && (i.obj[i.key] = this.extend(i.val)) : ai(i) ? i.obj[i.key] = this.extend(i.val) : t = this.extend(t), { doc: t };
|
|
1075
1075
|
}
|
|
1076
1076
|
extend(t) {
|
|
1077
1077
|
if (kd(t) || typeof t != "object" || !t)
|
|
@@ -1104,7 +1104,7 @@ class yd extends Re {
|
|
|
1104
1104
|
t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(12), t.encodeArray(this.path), t.encodeObject(this.props), s && t.writer.u8(1);
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
class bd extends
|
|
1107
|
+
class bd extends Ce {
|
|
1108
1108
|
constructor(e) {
|
|
1109
1109
|
super(e);
|
|
1110
1110
|
}
|
|
@@ -1131,7 +1131,7 @@ class bd extends Se {
|
|
|
1131
1131
|
e.encodeArrayHeader(2), e.writer.u8(31), e.encodeArray(t ? this.path.slice(t.path.length) : this.path);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
|
-
class Td extends
|
|
1134
|
+
class Td extends Ce {
|
|
1135
1135
|
constructor(e) {
|
|
1136
1136
|
super(e);
|
|
1137
1137
|
}
|
|
@@ -1165,7 +1165,7 @@ class Td extends Se {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
1167
|
const { isArray: Cd } = Array;
|
|
1168
|
-
class Sd extends
|
|
1168
|
+
class Sd extends Ce {
|
|
1169
1169
|
constructor(t, i) {
|
|
1170
1170
|
super(t);
|
|
1171
1171
|
x(this, "type");
|
|
@@ -1195,7 +1195,7 @@ class Sd extends Se {
|
|
|
1195
1195
|
t.encodeArrayHeader(3), t.writer.u8(39), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeArray(this.type);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
class _d extends
|
|
1198
|
+
class _d extends Ce {
|
|
1199
1199
|
constructor(t, i, s, r) {
|
|
1200
1200
|
super(t);
|
|
1201
1201
|
x(this, "pos");
|
|
@@ -1233,7 +1233,7 @@ class _d extends Se {
|
|
|
1233
1233
|
t.encodeArrayHeader(this.not ? 5 : 4), t.writer.u8(40), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeNumber(this.pos), t.encodeString(this.str), this.not && t.writer.u8(1);
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
|
-
class Ed extends
|
|
1236
|
+
class Ed extends Ce {
|
|
1237
1237
|
constructor(t, i, s) {
|
|
1238
1238
|
super(t);
|
|
1239
1239
|
x(this, "len");
|
|
@@ -1269,7 +1269,7 @@ class Ed extends Se {
|
|
|
1269
1269
|
t.encodeArrayHeader(this.not ? 4 : 3), t.writer.u8(41), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeNumber(this.len), this.not && t.writer.u8(1);
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
|
-
class wd extends
|
|
1272
|
+
class wd extends Ce {
|
|
1273
1273
|
constructor(t, i, s) {
|
|
1274
1274
|
super(t);
|
|
1275
1275
|
x(this, "value");
|
|
@@ -1306,7 +1306,7 @@ class wd extends Se {
|
|
|
1306
1306
|
t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(30), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeString(this.value), s && t.writer.u8(1);
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
class Pd extends
|
|
1309
|
+
class Pd extends Ce {
|
|
1310
1310
|
constructor(t, i, s) {
|
|
1311
1311
|
super(t);
|
|
1312
1312
|
x(this, "value");
|
|
@@ -1343,7 +1343,7 @@ class Pd extends Se {
|
|
|
1343
1343
|
t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(32), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeString(this.value), s && t.writer.u8(1);
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
|
-
class Rd extends
|
|
1346
|
+
class Rd extends Ce {
|
|
1347
1347
|
constructor(t, i, s) {
|
|
1348
1348
|
super(t);
|
|
1349
1349
|
x(this, "value");
|
|
@@ -1380,7 +1380,7 @@ class Rd extends Se {
|
|
|
1380
1380
|
t.encodeArrayHeader(s ? 4 : 3), t.writer.u8(37), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeString(this.value), s && t.writer.u8(1);
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
|
-
class Id extends
|
|
1383
|
+
class Id extends Ce {
|
|
1384
1384
|
constructor(t, i) {
|
|
1385
1385
|
super(t);
|
|
1386
1386
|
x(this, "value");
|
|
@@ -1413,7 +1413,7 @@ class Id extends Se {
|
|
|
1413
1413
|
t.encodeArrayHeader(3), t.writer.u8(33), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeArray(this.value);
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
|
-
class Od extends
|
|
1416
|
+
class Od extends Ce {
|
|
1417
1417
|
constructor(t, i) {
|
|
1418
1418
|
super(t);
|
|
1419
1419
|
x(this, "value");
|
|
@@ -1443,7 +1443,7 @@ class Od extends Se {
|
|
|
1443
1443
|
t.encodeArrayHeader(3), t.writer.u8(34), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeNumber(this.value);
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
|
-
class Md extends
|
|
1446
|
+
class Md extends Ce {
|
|
1447
1447
|
constructor(t, i) {
|
|
1448
1448
|
super(t);
|
|
1449
1449
|
x(this, "value");
|
|
@@ -1473,7 +1473,7 @@ class Md extends Se {
|
|
|
1473
1473
|
t.encodeArrayHeader(3), t.writer.u8(36), t.encodeArray(i ? this.path.slice(i.path.length) : this.path), t.encodeNumber(this.value);
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
class ms extends
|
|
1476
|
+
class ms extends Ce {
|
|
1477
1477
|
constructor(t, i) {
|
|
1478
1478
|
super(t);
|
|
1479
1479
|
x(this, "ops");
|
|
@@ -1601,7 +1601,7 @@ class Dd extends ms {
|
|
|
1601
1601
|
this.ops[r].encode(t, this);
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
1604
|
-
class Nd extends
|
|
1604
|
+
class Nd extends Ce {
|
|
1605
1605
|
constructor(t, i, s, r) {
|
|
1606
1606
|
super(t);
|
|
1607
1607
|
x(this, "value");
|
|
@@ -1637,7 +1637,7 @@ class Nd extends Se {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
1639
|
const { isArray: Ld } = Array;
|
|
1640
|
-
class Ud extends
|
|
1640
|
+
class Ud extends Ce {
|
|
1641
1641
|
constructor(t, i) {
|
|
1642
1642
|
super(t);
|
|
1643
1643
|
x(this, "value");
|
|
@@ -1743,7 +1743,7 @@ const jd = (n, e) => {
|
|
|
1743
1743
|
}
|
|
1744
1744
|
};
|
|
1745
1745
|
function Fd(n, e, t) {
|
|
1746
|
-
|
|
1746
|
+
n = vn(n);
|
|
1747
1747
|
const i = [], s = e.length;
|
|
1748
1748
|
for (let r = 0; r < s; r++) {
|
|
1749
1749
|
const o = jd(e[r], t).apply(n);
|
|
@@ -1751,9 +1751,9 @@ function Fd(n, e, t) {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
return { doc: n, res: i };
|
|
1753
1753
|
}
|
|
1754
|
-
var
|
|
1754
|
+
var on = (n) => typeof n == "function" ? n : function() {
|
|
1755
1755
|
return n;
|
|
1756
|
-
}, Bd = typeof self < "u" ? self : null,
|
|
1756
|
+
}, Bd = typeof self < "u" ? self : null, tn = typeof window < "u" ? window : null, cn = Bd || tn || cn, Vd = "2.0.0", He = { connecting: 0, open: 1, closing: 2, closed: 3 }, $d = 1e4, Hd = 1e3, Ee = {
|
|
1757
1757
|
closed: "closed",
|
|
1758
1758
|
errored: "errored",
|
|
1759
1759
|
joined: "joined",
|
|
@@ -1830,7 +1830,7 @@ var cn = (n) => typeof n == "function" ? n : function() {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
}, Gd = class {
|
|
1832
1832
|
constructor(n, e, t) {
|
|
1833
|
-
this.state = Ee.closed, this.topic = n, this.params =
|
|
1833
|
+
this.state = Ee.closed, this.topic = n, this.params = on(e || {}), this.socket = t, this.bindings = [], this.bindingRef = 0, this.timeout = this.socket.timeout, this.joinedOnce = !1, this.joinPush = new Dn(this, Qe.join, this.params, this.timeout), this.pushBuffer = [], this.stateChangeRefs = [], this.rejoinTimer = new Xr(() => {
|
|
1834
1834
|
this.socket.isConnected() && this.rejoin();
|
|
1835
1835
|
}, this.socket.rejoinAfterMs), this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset())), this.stateChangeRefs.push(this.socket.onOpen(() => {
|
|
1836
1836
|
this.rejoinTimer.reset(), this.isErrored() && this.rejoin();
|
|
@@ -1843,7 +1843,7 @@ var cn = (n) => typeof n == "function" ? n : function() {
|
|
|
1843
1843
|
}), this.onError((i) => {
|
|
1844
1844
|
this.socket.hasLogger() && this.socket.log("channel", `error ${this.topic}`, i), this.isJoining() && this.joinPush.reset(), this.state = Ee.errored, this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1845
1845
|
}), this.joinPush.receive("timeout", () => {
|
|
1846
|
-
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new Dn(this, Qe.leave,
|
|
1846
|
+
this.socket.hasLogger() && this.socket.log("channel", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout), new Dn(this, Qe.leave, on({}), this.timeout).send(), this.state = Ee.errored, this.joinPush.reset(), this.socket.isConnected() && this.rejoinTimer.scheduleTimeout();
|
|
1847
1847
|
}), this.on(Qe.reply, (i, s) => {
|
|
1848
1848
|
this.trigger(this.replyEventName(s), i);
|
|
1849
1849
|
});
|
|
@@ -1881,7 +1881,7 @@ var cn = (n) => typeof n == "function" ? n : function() {
|
|
|
1881
1881
|
this.rejoinTimer.reset(), this.joinPush.cancelTimeout(), this.state = Ee.leaving;
|
|
1882
1882
|
let e = () => {
|
|
1883
1883
|
this.socket.hasLogger() && this.socket.log("channel", `leave ${this.topic}`), this.trigger(Qe.close, "leave");
|
|
1884
|
-
}, t = new Dn(this, Qe.leave,
|
|
1884
|
+
}, t = new Dn(this, Qe.leave, on({}), n);
|
|
1885
1885
|
return t.receive("ok", () => e()).receive("timeout", () => e()), t.send(), this.canPush() || t.trigger("ok", {}), t;
|
|
1886
1886
|
}
|
|
1887
1887
|
onMessage(n, e, t) {
|
|
@@ -1924,11 +1924,11 @@ var cn = (n) => typeof n == "function" ? n : function() {
|
|
|
1924
1924
|
}
|
|
1925
1925
|
}, Yn = class {
|
|
1926
1926
|
static request(n, e, t, i, s, r, a) {
|
|
1927
|
-
if (
|
|
1928
|
-
let o = new
|
|
1927
|
+
if (cn.XDomainRequest) {
|
|
1928
|
+
let o = new cn.XDomainRequest();
|
|
1929
1929
|
return this.xdomainRequest(o, n, e, i, s, r, a);
|
|
1930
1930
|
} else {
|
|
1931
|
-
let o = new
|
|
1931
|
+
let o = new cn.XMLHttpRequest();
|
|
1932
1932
|
return this.xhrRequest(o, n, e, t, i, s, r, a);
|
|
1933
1933
|
}
|
|
1934
1934
|
}
|
|
@@ -2115,13 +2115,13 @@ var cn = (n) => typeof n == "function" ? n : function() {
|
|
|
2115
2115
|
}
|
|
2116
2116
|
}, zd = class {
|
|
2117
2117
|
constructor(n, e = {}) {
|
|
2118
|
-
this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = e.timeout || $d, this.transport = e.transport ||
|
|
2118
|
+
this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] }, this.channels = [], this.sendBuffer = [], this.ref = 0, this.timeout = e.timeout || $d, this.transport = e.transport || cn.WebSocket || Ti, this.establishedConnections = 0, this.defaultEncoder = Nn.encode.bind(Nn), this.defaultDecoder = Nn.decode.bind(Nn), this.closeWasClean = !1, this.binaryType = e.binaryType || "arraybuffer", this.connectClock = 1, this.transport !== Ti ? (this.encode = e.encode || this.defaultEncoder, this.decode = e.decode || this.defaultDecoder) : (this.encode = this.defaultEncoder, this.decode = this.defaultDecoder);
|
|
2119
2119
|
let t = null;
|
|
2120
|
-
|
|
2120
|
+
tn && tn.addEventListener && (tn.addEventListener("pagehide", (i) => {
|
|
2121
2121
|
this.conn && (this.disconnect(), t = this.connectClock);
|
|
2122
|
-
}),
|
|
2122
|
+
}), tn.addEventListener("pageshow", (i) => {
|
|
2123
2123
|
t === this.connectClock && (t = null, this.connect());
|
|
2124
|
-
})), this.heartbeatIntervalMs = e.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (i) => e.rejoinAfterMs ? e.rejoinAfterMs(i) : [1e3, 2e3, 5e3][i - 1] || 1e4, this.reconnectAfterMs = (i) => e.reconnectAfterMs ? e.reconnectAfterMs(i) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][i - 1] || 5e3, this.logger = e.logger || null, this.longpollerTimeout = e.longpollerTimeout || 2e4, this.params =
|
|
2124
|
+
})), this.heartbeatIntervalMs = e.heartbeatIntervalMs || 3e4, this.rejoinAfterMs = (i) => e.rejoinAfterMs ? e.rejoinAfterMs(i) : [1e3, 2e3, 5e3][i - 1] || 1e4, this.reconnectAfterMs = (i) => e.reconnectAfterMs ? e.reconnectAfterMs(i) : [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][i - 1] || 5e3, this.logger = e.logger || null, this.longpollerTimeout = e.longpollerTimeout || 2e4, this.params = on(e.params || {}), this.endPoint = `${n}/${ji.websocket}`, this.vsn = e.vsn || Vd, this.heartbeatTimeoutTimer = null, this.heartbeatTimer = null, this.pendingHeartbeatRef = null, this.reconnectTimer = new Xr(() => {
|
|
2125
2125
|
this.teardown(() => this.connect());
|
|
2126
2126
|
}, this.reconnectAfterMs);
|
|
2127
2127
|
}
|
|
@@ -2142,7 +2142,7 @@ var cn = (n) => typeof n == "function" ? n : function() {
|
|
|
2142
2142
|
this.connectClock++, this.closeWasClean = !0, this.reconnectTimer.reset(), this.teardown(n, e, t);
|
|
2143
2143
|
}
|
|
2144
2144
|
connect(n) {
|
|
2145
|
-
n && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params =
|
|
2145
|
+
n && (console && console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"), this.params = on(n)), !this.conn && (this.connectClock++, this.closeWasClean = !1, this.conn = new this.transport(this.endPointURL()), this.conn.binaryType = this.binaryType, this.conn.timeout = this.longpollerTimeout, this.conn.onopen = () => this.onConnOpen(), this.conn.onerror = (e) => this.onConnError(e), this.conn.onmessage = (e) => this.onConnMessage(e), this.conn.onclose = (e) => this.onConnClose(e));
|
|
2146
2146
|
}
|
|
2147
2147
|
log(n, e, t) {
|
|
2148
2148
|
this.logger(n, e, t);
|
|
@@ -2393,39 +2393,39 @@ class Wd {
|
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
2395
|
const Zr = 32;
|
|
2396
|
-
let
|
|
2396
|
+
let ce, je, Xn = (n) => (ce = 0, je = n, n = rt(), je[ce] ? nt() : n || ""), nt = (n = "Bad syntax", e = je[ce], t = je.slice(0, ce).split(`
|
|
2397
2397
|
`), i = t.pop()) => {
|
|
2398
|
-
let s = je.slice(
|
|
2399
|
-
`).pop(), r = je.slice(
|
|
2398
|
+
let s = je.slice(ce - 108, ce).split(`
|
|
2399
|
+
`).pop(), r = je.slice(ce + 1, ce + 108).split(`
|
|
2400
2400
|
`).shift();
|
|
2401
2401
|
throw EvalError(`${n} at ${t.length}:${i.length} \`${s + e + r}\``, "font-weight: bold");
|
|
2402
|
-
},
|
|
2402
|
+
}, dn = (n = 1, e = ce, t) => {
|
|
2403
2403
|
if (typeof n == "number")
|
|
2404
|
-
|
|
2404
|
+
ce += n;
|
|
2405
2405
|
else
|
|
2406
|
-
for (; t = n(je.charCodeAt(
|
|
2407
|
-
|
|
2408
|
-
return je.slice(e,
|
|
2406
|
+
for (; t = n(je.charCodeAt(ce)); )
|
|
2407
|
+
ce += t;
|
|
2408
|
+
return je.slice(e, ce);
|
|
2409
2409
|
}, rt = (n = 0, e, t, i, s, r) => {
|
|
2410
2410
|
for (; (t = Xn.space()) && // till not end
|
|
2411
2411
|
// FIXME: extra work is happening here, when lookup bails out due to lower precedence -
|
|
2412
2412
|
// it makes extra `space` call for parent exprs on the same character to check precedence again
|
|
2413
|
-
(s = ((r =
|
|
2413
|
+
(s = ((r = Vt[t]) && r(i, n)) ?? // if operator with higher precedence isn't found
|
|
2414
2414
|
(!i && Xn.id())); )
|
|
2415
2415
|
i = s;
|
|
2416
|
-
return e && (t == e ?
|
|
2416
|
+
return e && (t == e ? ce++ : nt()), i;
|
|
2417
2417
|
}, ea = (n) => n >= 48 && n <= 57 || // 0..9
|
|
2418
2418
|
n >= 65 && n <= 90 || // A...Z
|
|
2419
2419
|
n >= 97 && n <= 122 || // a...z
|
|
2420
2420
|
n == 36 || n == 95 || // $, _,
|
|
2421
2421
|
n >= 192 && n != 215 && n != 247;
|
|
2422
2422
|
Xn.space = (n) => {
|
|
2423
|
-
for (; (n = je.charCodeAt(
|
|
2424
|
-
|
|
2423
|
+
for (; (n = je.charCodeAt(ce)) <= Zr; )
|
|
2424
|
+
ce++;
|
|
2425
2425
|
return n;
|
|
2426
2426
|
};
|
|
2427
|
-
Xn.id = (n) =>
|
|
2428
|
-
let
|
|
2427
|
+
Xn.id = (n) => dn(ea);
|
|
2428
|
+
let Vt = [], bt = (n, e = Zr, t, i = n.charCodeAt(0), s = n.length, r = Vt[i], a = n.toUpperCase() !== n) => Vt[i] = (o, c, d = ce) => c < e && (s < 2 || je.substr(ce, s) == n) && (!a || !ea(je.charCodeAt(ce + s))) && (ce += s, t(o, c)) || (ce = d, r == null ? void 0 : r(o, c)), ta = (n, e, t = 0) => bt(n, e, (i, s) => i && (s = rt(e - t / 2)) && [n, i, s]), Jd = (n, e, t) => bt(n, e, (i) => !i && (i = rt(e - 0.5)) && [n, i]), Kd = (n, e, t) => {
|
|
2429
2429
|
bt(
|
|
2430
2430
|
n,
|
|
2431
2431
|
e,
|
|
@@ -2435,25 +2435,25 @@ let $t = [], bt = (n, e = Zr, t, i = n.charCodeAt(0), s = n.length, r = $t[i], a
|
|
|
2435
2435
|
(s || t) && i.push(s), i)
|
|
2436
2436
|
);
|
|
2437
2437
|
};
|
|
2438
|
-
const
|
|
2438
|
+
const oe = (n) => Array.isArray(n) ? Fi[n[0]](...n.slice(1)) : (e) => e == null ? void 0 : e[n], Fi = {}, et = (n, e, t = Fi[n]) => Fi[n] = (...i) => e(...i) || t && t(...i), na = 41, Qd = 93, Hs = 34, ia = 46, sa = 48, Yd = 57, Xd = 1, Zd = 4, el = 5, tl = 6, nl = 7, il = 8, ra = 9, oi = 10, gs = 11, aa = 12, vs = 13, _n = 15, kn = 18, re = (n, e, t) => t.length ? t.length > 1 ? (ta(n, Math.abs(e), e < 0), et(
|
|
2439
2439
|
n,
|
|
2440
|
-
(i, s) => s && (i =
|
|
2441
|
-
)) : (Jd(n, e), et(n, (i, s) => !s && (i =
|
|
2440
|
+
(i, s) => s && (i = oe(i), s = oe(s), !i.length && !s.length ? (i = t(i(), s()), () => i) : (r) => t(i(r), s(r)))
|
|
2441
|
+
)) : (Jd(n, e), et(n, (i, s) => !s && (i = oe(i), i.length ? (r) => t(i(r)) : (i = t(i()), () => i)))) : (Kd(n, Math.abs(e), e < 0), et(n, (...i) => (i = i.map(oe), (s) => t(...i.map((r) => r(s)))))), oa = (n) => n ? nt() : ["", (n = +dn((e) => e === ia || e >= sa && e <= Yd || (e === 69 || e === 101 ? 2 : 0))) != n ? nt() : n], ca = (n, e, t, i) => (bt(n, e, (s) => s ? [n === "++" ? "-" : "+", [n, s], ["", 1]] : [n, rt(e - 1)]), // ++a → [++, a], a++ → [-,[++,a],1]
|
|
2442
2442
|
et(n, i = (s, r) => s[0] === "(" ? i(s[1]) : (
|
|
2443
2443
|
// ++(((a)))
|
|
2444
|
-
s[0] === "." ? (r = s[2], s =
|
|
2444
|
+
s[0] === "." ? (r = s[2], s = oe(s[1]), (a) => t(s(a), r)) : (
|
|
2445
2445
|
// ++a.b
|
|
2446
|
-
s[0] === "[" ? ([, s, r] = s, s =
|
|
2446
|
+
s[0] === "[" ? ([, s, r] = s, s = oe(s), r = oe(r), (a) => t(s(a), r(a))) : (
|
|
2447
2447
|
// ++a[b]
|
|
2448
2448
|
(a) => t(a, s)
|
|
2449
2449
|
)
|
|
2450
2450
|
)
|
|
2451
2451
|
)));
|
|
2452
2452
|
et("", (n) => () => n);
|
|
2453
|
-
|
|
2454
|
-
|
|
2453
|
+
Vt[Hs] = (n) => n ? nt() : ["", (dn() + dn((e) => e - Hs ? 1 : 0) + (dn() || nt("Bad string"))).slice(1, -1)];
|
|
2454
|
+
Vt[ia] = (n) => !n && oa();
|
|
2455
2455
|
for (let n = 0; n <= 9; n++)
|
|
2456
|
-
|
|
2456
|
+
Vt[sa + n] = oa;
|
|
2457
2457
|
re(",", Xd, (...n) => n[n.length - 1]);
|
|
2458
2458
|
re("||", Zd, (...n) => {
|
|
2459
2459
|
let e = 0, t;
|
|
@@ -2469,7 +2469,7 @@ re("&&", el, (...n) => {
|
|
|
2469
2469
|
});
|
|
2470
2470
|
ta("=", 10, !0);
|
|
2471
2471
|
et("=", (n, e) => {
|
|
2472
|
-
let t =
|
|
2472
|
+
let t = oe(e), i, s, r = typeof n == "string" ? (a, o) => a[n] = o : n[0] === "." ? (i = oe(n[1]), s = n[2], (a, o) => i(a)[s] = o) : n[0] === "[" ? (i = oe(n[1]), s = oe(n[2]), (a, o) => i(a)[s(a)] = o) : nt("Bad left value");
|
|
2473
2473
|
return (a) => r(a, t(a));
|
|
2474
2474
|
});
|
|
2475
2475
|
re("+", aa, (n, e) => n + e);
|
|
@@ -2489,31 +2489,31 @@ re("<=", oi, (n, e) => n <= e);
|
|
|
2489
2489
|
re(">>", gs, (n, e) => n >> e);
|
|
2490
2490
|
re(">>>", gs, (n, e) => n >>> e);
|
|
2491
2491
|
re("<<", gs, (n, e) => n << e);
|
|
2492
|
-
re("+",
|
|
2493
|
-
re("-",
|
|
2494
|
-
re("!",
|
|
2495
|
-
ca("++",
|
|
2496
|
-
ca("--",
|
|
2497
|
-
bt("[",
|
|
2498
|
-
et("[", (n, e) => e && (n =
|
|
2499
|
-
bt(".",
|
|
2500
|
-
et(".", (n, e) => (n =
|
|
2501
|
-
bt("(",
|
|
2502
|
-
bt("(",
|
|
2492
|
+
re("+", _n, (n) => +n);
|
|
2493
|
+
re("-", _n, (n) => -n);
|
|
2494
|
+
re("!", _n, (n) => !n);
|
|
2495
|
+
ca("++", _n, (n, e) => ++n[e]);
|
|
2496
|
+
ca("--", _n, (n, e) => --n[e]);
|
|
2497
|
+
bt("[", kn, (n) => n && ["[", n, rt(0, Qd) || nt()]);
|
|
2498
|
+
et("[", (n, e) => e && (n = oe(n), e = oe(e), (t) => n(t)[e(t)]));
|
|
2499
|
+
bt(".", kn, (n, e) => n && (e = rt(kn)) && [".", n, e]);
|
|
2500
|
+
et(".", (n, e) => (n = oe(n), e = e[0] ? e : e[1], (t) => n(t)[e]));
|
|
2501
|
+
bt("(", kn, (n) => !n && ["(", rt(0, na) || nt()]);
|
|
2502
|
+
bt("(", kn, (n, e) => n && (e = rt(0, na), e ? ["(", n, e] : ["(", n, ""]));
|
|
2503
2503
|
et(
|
|
2504
2504
|
"(",
|
|
2505
|
-
(n, e, t, i, s) => e == null ?
|
|
2505
|
+
(n, e, t, i, s) => e == null ? oe(n) : (s = e == "" ? () => [] : (
|
|
2506
2506
|
// a()
|
|
2507
|
-
e[0] === "," ? (e = e.slice(1).map(
|
|
2507
|
+
e[0] === "," ? (e = e.slice(1).map(oe), (r) => e.map((a) => a(r))) : (
|
|
2508
2508
|
// a(b,c)
|
|
2509
|
-
(e =
|
|
2509
|
+
(e = oe(e), (r) => [e(r)])
|
|
2510
2510
|
)
|
|
2511
2511
|
), // a(b)
|
|
2512
|
-
n[0] === "." ? (t = n[2], n =
|
|
2512
|
+
n[0] === "." ? (t = n[2], n = oe(n[1]), (r) => n(r)[t](...s(r))) : (
|
|
2513
2513
|
// a.b(...args)
|
|
2514
|
-
n[0] === "[" ? (t =
|
|
2514
|
+
n[0] === "[" ? (t = oe(n[2]), n = oe(n[1]), (r) => n(r)[t(r)](...s(r))) : (
|
|
2515
2515
|
// a[b](...args)
|
|
2516
|
-
(n =
|
|
2516
|
+
(n = oe(n), (r) => n(r)(...s(r)))
|
|
2517
2517
|
)
|
|
2518
2518
|
))
|
|
2519
2519
|
);
|
|
@@ -2564,7 +2564,7 @@ var Gs;
|
|
|
2564
2564
|
return g[y];
|
|
2565
2565
|
}
|
|
2566
2566
|
}, l = Object.getPrototypeOf(Function), u = typeof process == "object" && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL === "true", p = !u && typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : gc(), m = !u && typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : vc(), k = !u && typeof WeakMap == "function" ? WeakMap : kc(), v = new k();
|
|
2567
|
-
function S(g, y, C,
|
|
2567
|
+
function S(g, y, C, P) {
|
|
2568
2568
|
if (Y(C)) {
|
|
2569
2569
|
if (!Ns(g))
|
|
2570
2570
|
throw new TypeError();
|
|
@@ -2574,80 +2574,80 @@ var Gs;
|
|
|
2574
2574
|
} else {
|
|
2575
2575
|
if (!Ns(g))
|
|
2576
2576
|
throw new TypeError();
|
|
2577
|
-
if (!
|
|
2577
|
+
if (!le(y))
|
|
2578
2578
|
throw new TypeError();
|
|
2579
|
-
if (!
|
|
2579
|
+
if (!le(P) && !Y(P) && !be(P))
|
|
2580
2580
|
throw new TypeError();
|
|
2581
|
-
return
|
|
2581
|
+
return be(P) && (P = void 0), C = Je(C), ze(g, y, C, P);
|
|
2582
2582
|
}
|
|
2583
2583
|
}
|
|
2584
2584
|
e("decorate", S);
|
|
2585
2585
|
function O(g, y) {
|
|
2586
|
-
function C(
|
|
2587
|
-
if (!
|
|
2586
|
+
function C(P, D) {
|
|
2587
|
+
if (!le(P))
|
|
2588
2588
|
throw new TypeError();
|
|
2589
2589
|
if (!Y(D) && !uc(D))
|
|
2590
2590
|
throw new TypeError();
|
|
2591
|
-
|
|
2591
|
+
Mn(g, y, P, D);
|
|
2592
2592
|
}
|
|
2593
2593
|
return C;
|
|
2594
2594
|
}
|
|
2595
2595
|
e("metadata", O);
|
|
2596
|
-
function
|
|
2597
|
-
if (!
|
|
2596
|
+
function w(g, y, C, P) {
|
|
2597
|
+
if (!le(C))
|
|
2598
2598
|
throw new TypeError();
|
|
2599
|
-
return Y(
|
|
2599
|
+
return Y(P) || (P = Je(P)), Mn(g, y, C, P);
|
|
2600
2600
|
}
|
|
2601
|
-
e("defineMetadata",
|
|
2601
|
+
e("defineMetadata", w);
|
|
2602
2602
|
function F(g, y, C) {
|
|
2603
|
-
if (!
|
|
2603
|
+
if (!le(y))
|
|
2604
2604
|
throw new TypeError();
|
|
2605
|
-
return Y(C) || (C = Je(C)),
|
|
2605
|
+
return Y(C) || (C = Je(C)), Wt(g, y, C);
|
|
2606
2606
|
}
|
|
2607
2607
|
e("hasMetadata", F);
|
|
2608
2608
|
function W(g, y, C) {
|
|
2609
|
-
if (!
|
|
2609
|
+
if (!le(y))
|
|
2610
2610
|
throw new TypeError();
|
|
2611
2611
|
return Y(C) || (C = Je(C)), wt(g, y, C);
|
|
2612
2612
|
}
|
|
2613
2613
|
e("hasOwnMetadata", W);
|
|
2614
2614
|
function he(g, y, C) {
|
|
2615
|
-
if (!
|
|
2615
|
+
if (!le(y))
|
|
2616
2616
|
throw new TypeError();
|
|
2617
|
-
return Y(C) || (C = Je(C)),
|
|
2617
|
+
return Y(C) || (C = Je(C)), On(g, y, C);
|
|
2618
2618
|
}
|
|
2619
2619
|
e("getMetadata", he);
|
|
2620
|
-
function
|
|
2621
|
-
if (!
|
|
2620
|
+
function de(g, y, C) {
|
|
2621
|
+
if (!le(y))
|
|
2622
2622
|
throw new TypeError();
|
|
2623
|
-
return Y(C) || (C = Je(C)),
|
|
2623
|
+
return Y(C) || (C = Je(C)), Jt(g, y, C);
|
|
2624
2624
|
}
|
|
2625
|
-
e("getOwnMetadata",
|
|
2625
|
+
e("getOwnMetadata", de);
|
|
2626
2626
|
function N(g, y) {
|
|
2627
|
-
if (!
|
|
2627
|
+
if (!le(g))
|
|
2628
2628
|
throw new TypeError();
|
|
2629
2629
|
return Y(y) || (y = Je(y)), R(g, y);
|
|
2630
2630
|
}
|
|
2631
2631
|
e("getMetadataKeys", N);
|
|
2632
2632
|
function X(g, y) {
|
|
2633
|
-
if (!
|
|
2633
|
+
if (!le(g))
|
|
2634
2634
|
throw new TypeError();
|
|
2635
2635
|
return Y(y) || (y = Je(y)), pe(g, y);
|
|
2636
2636
|
}
|
|
2637
2637
|
e("getOwnMetadataKeys", X);
|
|
2638
2638
|
function A(g, y, C) {
|
|
2639
|
-
if (!
|
|
2639
|
+
if (!le(y))
|
|
2640
2640
|
throw new TypeError();
|
|
2641
2641
|
Y(C) || (C = Je(C));
|
|
2642
|
-
var
|
|
2642
|
+
var P = Be(
|
|
2643
2643
|
y,
|
|
2644
2644
|
C,
|
|
2645
2645
|
/*Create*/
|
|
2646
2646
|
!1
|
|
2647
2647
|
);
|
|
2648
|
-
if (Y(
|
|
2648
|
+
if (Y(P) || !P.delete(g))
|
|
2649
2649
|
return !1;
|
|
2650
|
-
if (
|
|
2650
|
+
if (P.size > 0)
|
|
2651
2651
|
return !0;
|
|
2652
2652
|
var D = v.get(y);
|
|
2653
2653
|
return D.delete(C), D.size > 0 || v.delete(y), !0;
|
|
@@ -2655,8 +2655,8 @@ var Gs;
|
|
|
2655
2655
|
e("deleteMetadata", A);
|
|
2656
2656
|
function H(g, y) {
|
|
2657
2657
|
for (var C = g.length - 1; C >= 0; --C) {
|
|
2658
|
-
var
|
|
2659
|
-
if (!Y(D) && !
|
|
2658
|
+
var P = g[C], D = P(y);
|
|
2659
|
+
if (!Y(D) && !be(D)) {
|
|
2660
2660
|
if (!Ls(D))
|
|
2661
2661
|
throw new TypeError();
|
|
2662
2662
|
y = D;
|
|
@@ -2664,105 +2664,105 @@ var Gs;
|
|
|
2664
2664
|
}
|
|
2665
2665
|
return y;
|
|
2666
2666
|
}
|
|
2667
|
-
function ze(g, y, C,
|
|
2667
|
+
function ze(g, y, C, P) {
|
|
2668
2668
|
for (var D = g.length - 1; D >= 0; --D) {
|
|
2669
|
-
var
|
|
2670
|
-
if (!Y(U) && !
|
|
2671
|
-
if (!
|
|
2669
|
+
var Se = g[D], U = Se(y, C, P);
|
|
2670
|
+
if (!Y(U) && !be(U)) {
|
|
2671
|
+
if (!le(U))
|
|
2672
2672
|
throw new TypeError();
|
|
2673
|
-
|
|
2673
|
+
P = U;
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
|
-
return
|
|
2676
|
+
return P;
|
|
2677
2677
|
}
|
|
2678
2678
|
function Be(g, y, C) {
|
|
2679
|
-
var
|
|
2680
|
-
if (Y(
|
|
2679
|
+
var P = v.get(g);
|
|
2680
|
+
if (Y(P)) {
|
|
2681
2681
|
if (!C)
|
|
2682
2682
|
return;
|
|
2683
|
-
|
|
2683
|
+
P = new p(), v.set(g, P);
|
|
2684
2684
|
}
|
|
2685
|
-
var D =
|
|
2685
|
+
var D = P.get(y);
|
|
2686
2686
|
if (Y(D)) {
|
|
2687
2687
|
if (!C)
|
|
2688
2688
|
return;
|
|
2689
|
-
D = new p(),
|
|
2689
|
+
D = new p(), P.set(y, D);
|
|
2690
2690
|
}
|
|
2691
2691
|
return D;
|
|
2692
2692
|
}
|
|
2693
|
-
function
|
|
2694
|
-
var
|
|
2695
|
-
if (
|
|
2693
|
+
function Wt(g, y, C) {
|
|
2694
|
+
var P = wt(g, y, C);
|
|
2695
|
+
if (P)
|
|
2696
2696
|
return !0;
|
|
2697
2697
|
var D = ki(y);
|
|
2698
|
-
return
|
|
2698
|
+
return be(D) ? !1 : Wt(g, D, C);
|
|
2699
2699
|
}
|
|
2700
2700
|
function wt(g, y, C) {
|
|
2701
|
-
var
|
|
2701
|
+
var P = Be(
|
|
2702
2702
|
y,
|
|
2703
2703
|
C,
|
|
2704
2704
|
/*Create*/
|
|
2705
2705
|
!1
|
|
2706
2706
|
);
|
|
2707
|
-
return Y(
|
|
2707
|
+
return Y(P) ? !1 : We(P.has(g));
|
|
2708
2708
|
}
|
|
2709
|
-
function
|
|
2710
|
-
var
|
|
2711
|
-
if (
|
|
2712
|
-
return
|
|
2709
|
+
function On(g, y, C) {
|
|
2710
|
+
var P = wt(g, y, C);
|
|
2711
|
+
if (P)
|
|
2712
|
+
return Jt(g, y, C);
|
|
2713
2713
|
var D = ki(y);
|
|
2714
|
-
if (!
|
|
2715
|
-
return
|
|
2714
|
+
if (!be(D))
|
|
2715
|
+
return On(g, D, C);
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2718
|
-
var
|
|
2717
|
+
function Jt(g, y, C) {
|
|
2718
|
+
var P = Be(
|
|
2719
2719
|
y,
|
|
2720
2720
|
C,
|
|
2721
2721
|
/*Create*/
|
|
2722
2722
|
!1
|
|
2723
2723
|
);
|
|
2724
|
-
if (!Y(
|
|
2725
|
-
return
|
|
2724
|
+
if (!Y(P))
|
|
2725
|
+
return P.get(g);
|
|
2726
2726
|
}
|
|
2727
|
-
function
|
|
2727
|
+
function Mn(g, y, C, P) {
|
|
2728
2728
|
var D = Be(
|
|
2729
2729
|
C,
|
|
2730
|
-
|
|
2730
|
+
P,
|
|
2731
2731
|
/*Create*/
|
|
2732
2732
|
!0
|
|
2733
2733
|
);
|
|
2734
2734
|
D.set(g, y);
|
|
2735
2735
|
}
|
|
2736
2736
|
function R(g, y) {
|
|
2737
|
-
var C = pe(g, y),
|
|
2738
|
-
if (
|
|
2737
|
+
var C = pe(g, y), P = ki(g);
|
|
2738
|
+
if (P === null)
|
|
2739
2739
|
return C;
|
|
2740
|
-
var D = R(
|
|
2740
|
+
var D = R(P, y);
|
|
2741
2741
|
if (D.length <= 0)
|
|
2742
2742
|
return C;
|
|
2743
2743
|
if (C.length <= 0)
|
|
2744
2744
|
return D;
|
|
2745
|
-
for (var
|
|
2746
|
-
var q = L[j], G =
|
|
2747
|
-
G || (
|
|
2745
|
+
for (var Se = new m(), U = [], j = 0, L = C; j < L.length; j++) {
|
|
2746
|
+
var q = L[j], G = Se.has(q);
|
|
2747
|
+
G || (Se.add(q), U.push(q));
|
|
2748
2748
|
}
|
|
2749
2749
|
for (var at = 0, js = D; at < js.length; at++) {
|
|
2750
|
-
var q = js[at], G =
|
|
2751
|
-
G || (
|
|
2750
|
+
var q = js[at], G = Se.has(q);
|
|
2751
|
+
G || (Se.add(q), U.push(q));
|
|
2752
2752
|
}
|
|
2753
2753
|
return U;
|
|
2754
2754
|
}
|
|
2755
2755
|
function pe(g, y) {
|
|
2756
|
-
var C = [],
|
|
2756
|
+
var C = [], P = Be(
|
|
2757
2757
|
g,
|
|
2758
2758
|
y,
|
|
2759
2759
|
/*Create*/
|
|
2760
2760
|
!1
|
|
2761
2761
|
);
|
|
2762
|
-
if (Y(
|
|
2762
|
+
if (Y(P))
|
|
2763
2763
|
return C;
|
|
2764
|
-
for (var D =
|
|
2765
|
-
var j = fc(
|
|
2764
|
+
for (var D = P.keys(), Se = hc(D), U = 0; ; ) {
|
|
2765
|
+
var j = fc(Se);
|
|
2766
2766
|
if (!j)
|
|
2767
2767
|
return C.length = U, C;
|
|
2768
2768
|
var L = pc(j);
|
|
@@ -2770,7 +2770,7 @@ var Gs;
|
|
|
2770
2770
|
C[U] = L;
|
|
2771
2771
|
} catch (q) {
|
|
2772
2772
|
try {
|
|
2773
|
-
mc(
|
|
2773
|
+
mc(Se);
|
|
2774
2774
|
} finally {
|
|
2775
2775
|
throw q;
|
|
2776
2776
|
}
|
|
@@ -2801,16 +2801,16 @@ var Gs;
|
|
|
2801
2801
|
function Y(g) {
|
|
2802
2802
|
return g === void 0;
|
|
2803
2803
|
}
|
|
2804
|
-
function
|
|
2804
|
+
function be(g) {
|
|
2805
2805
|
return g === null;
|
|
2806
2806
|
}
|
|
2807
2807
|
function Pt(g) {
|
|
2808
2808
|
return typeof g == "symbol";
|
|
2809
2809
|
}
|
|
2810
|
-
function
|
|
2810
|
+
function le(g) {
|
|
2811
2811
|
return typeof g == "object" ? g !== null : typeof g == "function";
|
|
2812
2812
|
}
|
|
2813
|
-
function
|
|
2813
|
+
function xn(g, y) {
|
|
2814
2814
|
switch (fe(g)) {
|
|
2815
2815
|
case 0:
|
|
2816
2816
|
return g;
|
|
@@ -2825,41 +2825,29 @@ var Gs;
|
|
|
2825
2825
|
case 5:
|
|
2826
2826
|
return g;
|
|
2827
2827
|
}
|
|
2828
|
-
var C =
|
|
2829
|
-
if (
|
|
2830
|
-
var D =
|
|
2831
|
-
if (
|
|
2828
|
+
var C = "string", P = Us(g, s);
|
|
2829
|
+
if (P !== void 0) {
|
|
2830
|
+
var D = P.call(g, C);
|
|
2831
|
+
if (le(D))
|
|
2832
2832
|
throw new TypeError();
|
|
2833
2833
|
return D;
|
|
2834
2834
|
}
|
|
2835
|
-
return Rt(g
|
|
2835
|
+
return Rt(g);
|
|
2836
2836
|
}
|
|
2837
2837
|
function Rt(g, y) {
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
var D = g.valueOf;
|
|
2846
|
-
if (It(D)) {
|
|
2847
|
-
var E = D.call(g);
|
|
2848
|
-
if (!oe(E))
|
|
2849
|
-
return E;
|
|
2850
|
-
}
|
|
2851
|
-
} else {
|
|
2852
|
-
var D = g.valueOf;
|
|
2853
|
-
if (It(D)) {
|
|
2854
|
-
var E = D.call(g);
|
|
2855
|
-
if (!oe(E))
|
|
2856
|
-
return E;
|
|
2838
|
+
var C, P;
|
|
2839
|
+
{
|
|
2840
|
+
var D = g.toString;
|
|
2841
|
+
if (An(D)) {
|
|
2842
|
+
var P = D.call(g);
|
|
2843
|
+
if (!le(P))
|
|
2844
|
+
return P;
|
|
2857
2845
|
}
|
|
2858
|
-
var
|
|
2859
|
-
if (
|
|
2860
|
-
var
|
|
2861
|
-
if (!
|
|
2862
|
-
return
|
|
2846
|
+
var C = g.valueOf;
|
|
2847
|
+
if (An(C)) {
|
|
2848
|
+
var P = C.call(g);
|
|
2849
|
+
if (!le(P))
|
|
2850
|
+
return P;
|
|
2863
2851
|
}
|
|
2864
2852
|
}
|
|
2865
2853
|
throw new TypeError();
|
|
@@ -2871,17 +2859,13 @@ var Gs;
|
|
|
2871
2859
|
return "" + g;
|
|
2872
2860
|
}
|
|
2873
2861
|
function Je(g) {
|
|
2874
|
-
var y =
|
|
2875
|
-
g,
|
|
2876
|
-
3
|
|
2877
|
-
/* String */
|
|
2878
|
-
);
|
|
2862
|
+
var y = xn(g);
|
|
2879
2863
|
return Pt(y) ? y : lc(y);
|
|
2880
2864
|
}
|
|
2881
2865
|
function Ns(g) {
|
|
2882
2866
|
return Array.isArray ? Array.isArray(g) : g instanceof Object ? g instanceof Array : Object.prototype.toString.call(g) === "[object Array]";
|
|
2883
2867
|
}
|
|
2884
|
-
function
|
|
2868
|
+
function An(g) {
|
|
2885
2869
|
return typeof g == "function";
|
|
2886
2870
|
}
|
|
2887
2871
|
function Ls(g) {
|
|
@@ -2900,17 +2884,17 @@ var Gs;
|
|
|
2900
2884
|
function Us(g, y) {
|
|
2901
2885
|
var C = g[y];
|
|
2902
2886
|
if (C != null) {
|
|
2903
|
-
if (!
|
|
2887
|
+
if (!An(C))
|
|
2904
2888
|
throw new TypeError();
|
|
2905
2889
|
return C;
|
|
2906
2890
|
}
|
|
2907
2891
|
}
|
|
2908
2892
|
function hc(g) {
|
|
2909
2893
|
var y = Us(g, r);
|
|
2910
|
-
if (!
|
|
2894
|
+
if (!An(y))
|
|
2911
2895
|
throw new TypeError();
|
|
2912
2896
|
var C = y.call(g);
|
|
2913
|
-
if (!
|
|
2897
|
+
if (!le(C))
|
|
2914
2898
|
throw new TypeError();
|
|
2915
2899
|
return C;
|
|
2916
2900
|
}
|
|
@@ -2929,10 +2913,10 @@ var Gs;
|
|
|
2929
2913
|
var y = Object.getPrototypeOf(g);
|
|
2930
2914
|
if (typeof g != "function" || g === l || y !== l)
|
|
2931
2915
|
return y;
|
|
2932
|
-
var C = g.prototype,
|
|
2933
|
-
if (
|
|
2916
|
+
var C = g.prototype, P = C && Object.getPrototypeOf(C);
|
|
2917
|
+
if (P == null || P === Object.prototype)
|
|
2934
2918
|
return y;
|
|
2935
|
-
var D =
|
|
2919
|
+
var D = P.constructor;
|
|
2936
2920
|
return typeof D != "function" || D === g ? y : D;
|
|
2937
2921
|
}
|
|
2938
2922
|
function gc() {
|
|
@@ -3007,11 +2991,11 @@ var Gs;
|
|
|
3007
2991
|
}, U.prototype.clear = function() {
|
|
3008
2992
|
this._keys.length = 0, this._values.length = 0, this._cacheKey = g, this._cacheIndex = -2;
|
|
3009
2993
|
}, U.prototype.keys = function() {
|
|
3010
|
-
return new C(this._keys, this._values,
|
|
2994
|
+
return new C(this._keys, this._values, P);
|
|
3011
2995
|
}, U.prototype.values = function() {
|
|
3012
2996
|
return new C(this._keys, this._values, D);
|
|
3013
2997
|
}, U.prototype.entries = function() {
|
|
3014
|
-
return new C(this._keys, this._values,
|
|
2998
|
+
return new C(this._keys, this._values, Se);
|
|
3015
2999
|
}, U.prototype["@@iterator"] = function() {
|
|
3016
3000
|
return this.entries();
|
|
3017
3001
|
}, U.prototype[r] = function() {
|
|
@@ -3021,13 +3005,13 @@ var Gs;
|
|
|
3021
3005
|
}, U;
|
|
3022
3006
|
}()
|
|
3023
3007
|
);
|
|
3024
|
-
function
|
|
3008
|
+
function P(U, j) {
|
|
3025
3009
|
return U;
|
|
3026
3010
|
}
|
|
3027
3011
|
function D(U, j) {
|
|
3028
3012
|
return j;
|
|
3029
3013
|
}
|
|
3030
|
-
function
|
|
3014
|
+
function Se(U, j) {
|
|
3031
3015
|
return [U, j];
|
|
3032
3016
|
}
|
|
3033
3017
|
}
|
|
@@ -3067,12 +3051,12 @@ var Gs;
|
|
|
3067
3051
|
);
|
|
3068
3052
|
}
|
|
3069
3053
|
function kc() {
|
|
3070
|
-
var g = 16, y = d.create(), C =
|
|
3054
|
+
var g = 16, y = d.create(), C = P();
|
|
3071
3055
|
return (
|
|
3072
3056
|
/** @class */
|
|
3073
3057
|
function() {
|
|
3074
3058
|
function L() {
|
|
3075
|
-
this._key =
|
|
3059
|
+
this._key = P();
|
|
3076
3060
|
}
|
|
3077
3061
|
return L.prototype.has = function(q) {
|
|
3078
3062
|
var G = D(
|
|
@@ -3103,11 +3087,11 @@ var Gs;
|
|
|
3103
3087
|
);
|
|
3104
3088
|
return G !== void 0 ? delete G[this._key] : !1;
|
|
3105
3089
|
}, L.prototype.clear = function() {
|
|
3106
|
-
this._key =
|
|
3090
|
+
this._key = P();
|
|
3107
3091
|
}, L;
|
|
3108
3092
|
}()
|
|
3109
3093
|
);
|
|
3110
|
-
function
|
|
3094
|
+
function P() {
|
|
3111
3095
|
var L;
|
|
3112
3096
|
do
|
|
3113
3097
|
L = "@@WeakMap@@" + j();
|
|
@@ -3122,13 +3106,13 @@ var Gs;
|
|
|
3122
3106
|
}
|
|
3123
3107
|
return L[C];
|
|
3124
3108
|
}
|
|
3125
|
-
function
|
|
3109
|
+
function Se(L, q) {
|
|
3126
3110
|
for (var G = 0; G < q; ++G)
|
|
3127
3111
|
L[G] = Math.random() * 255 | 0;
|
|
3128
3112
|
return L;
|
|
3129
3113
|
}
|
|
3130
3114
|
function U(L) {
|
|
3131
|
-
return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(L)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(L)) :
|
|
3115
|
+
return typeof Uint8Array == "function" ? typeof crypto < "u" ? crypto.getRandomValues(new Uint8Array(L)) : typeof msCrypto < "u" ? msCrypto.getRandomValues(new Uint8Array(L)) : Se(new Uint8Array(L), L) : Se(new Array(L), L);
|
|
3132
3116
|
}
|
|
3133
3117
|
function j() {
|
|
3134
3118
|
var L = U(g);
|
|
@@ -3160,7 +3144,7 @@ function sl(n, e) {
|
|
|
3160
3144
|
});
|
|
3161
3145
|
}), Object.freeze(n);
|
|
3162
3146
|
}
|
|
3163
|
-
function
|
|
3147
|
+
function Te(n, e) {
|
|
3164
3148
|
if (!n)
|
|
3165
3149
|
throw new Error(e);
|
|
3166
3150
|
}
|
|
@@ -3186,7 +3170,7 @@ function da(n) {
|
|
|
3186
3170
|
const la = Symbol("@bufbuild/protobuf/enum-type");
|
|
3187
3171
|
function ll(n) {
|
|
3188
3172
|
const e = n[la];
|
|
3189
|
-
return
|
|
3173
|
+
return Te(e, "missing enum type on enum object"), e;
|
|
3190
3174
|
}
|
|
3191
3175
|
function ua(n, e, t, i) {
|
|
3192
3176
|
n[la] = ha(e, t.map((s) => ({
|
|
@@ -3227,7 +3211,7 @@ function pa(n) {
|
|
|
3227
3211
|
localName: n.name
|
|
3228
3212
|
});
|
|
3229
3213
|
}
|
|
3230
|
-
class
|
|
3214
|
+
class Ht {
|
|
3231
3215
|
/**
|
|
3232
3216
|
* Compare with a message of the same type.
|
|
3233
3217
|
*/
|
|
@@ -3331,7 +3315,7 @@ function hl(n, e, t, i) {
|
|
|
3331
3315
|
n.util.initFields(this), n.util.initPartial(o, this);
|
|
3332
3316
|
}
|
|
3333
3317
|
}[r];
|
|
3334
|
-
return Object.setPrototypeOf(a.prototype, new
|
|
3318
|
+
return Object.setPrototypeOf(a.prototype, new Ht()), Object.assign(a, {
|
|
3335
3319
|
runtime: n,
|
|
3336
3320
|
typeName: e,
|
|
3337
3321
|
fields: n.util.newFieldList(t),
|
|
@@ -3506,7 +3490,7 @@ function vl() {
|
|
|
3506
3490
|
}
|
|
3507
3491
|
};
|
|
3508
3492
|
}
|
|
3509
|
-
const t = (s) =>
|
|
3493
|
+
const t = (s) => Te(/^-?[0-9]+$/.test(s), "int64 invalid: ".concat(s)), i = (s) => Te(/^[0-9]+$/.test(s), "uint64 invalid: ".concat(s));
|
|
3510
3494
|
return {
|
|
3511
3495
|
zero: "0",
|
|
3512
3496
|
supported: !1,
|
|
@@ -3985,10 +3969,10 @@ function Sl(n, e, t, i) {
|
|
|
3985
3969
|
};
|
|
3986
3970
|
}
|
|
3987
3971
|
function ka(n, e) {
|
|
3988
|
-
return e instanceof
|
|
3972
|
+
return e instanceof Ht || !n.fieldWrapper ? e : n.fieldWrapper.wrapField(e);
|
|
3989
3973
|
}
|
|
3990
3974
|
b.DOUBLE, b.FLOAT, b.INT64, b.UINT64, b.INT32, b.UINT32, b.BOOL, b.STRING, b.BYTES;
|
|
3991
|
-
const
|
|
3975
|
+
const Ot = Symbol("@bufbuild/protobuf/unknown-fields"), Ks = {
|
|
3992
3976
|
readUnknownFields: !0,
|
|
3993
3977
|
readerFactory: (n) => new yl(n)
|
|
3994
3978
|
}, Qs = {
|
|
@@ -4007,20 +3991,20 @@ function wl() {
|
|
|
4007
3991
|
makeWriteOptions: El,
|
|
4008
3992
|
listUnknownFields(n) {
|
|
4009
3993
|
var e;
|
|
4010
|
-
return (e = n[
|
|
3994
|
+
return (e = n[Ot]) !== null && e !== void 0 ? e : [];
|
|
4011
3995
|
},
|
|
4012
3996
|
discardUnknownFields(n) {
|
|
4013
|
-
delete n[
|
|
3997
|
+
delete n[Ot];
|
|
4014
3998
|
},
|
|
4015
3999
|
writeUnknownFields(n, e) {
|
|
4016
|
-
const i = n[
|
|
4000
|
+
const i = n[Ot];
|
|
4017
4001
|
if (i)
|
|
4018
4002
|
for (const s of i)
|
|
4019
4003
|
e.tag(s.no, s.wireType).raw(s.data);
|
|
4020
4004
|
},
|
|
4021
4005
|
onUnknownField(n, e, t, i) {
|
|
4022
4006
|
const s = n;
|
|
4023
|
-
Array.isArray(s[
|
|
4007
|
+
Array.isArray(s[Ot]) || (s[Ot] = []), s[Ot].push({
|
|
4024
4008
|
no: e,
|
|
4025
4009
|
wireType: t,
|
|
4026
4010
|
data: i
|
|
@@ -4068,7 +4052,7 @@ function Ys(n, e, t, i, s) {
|
|
|
4068
4052
|
break;
|
|
4069
4053
|
case "message":
|
|
4070
4054
|
const d = t.T;
|
|
4071
|
-
r ? n[a].push($n(e, new d(), s, t)) : n[a] instanceof
|
|
4055
|
+
r ? n[a].push($n(e, new d(), s, t)) : n[a] instanceof Ht ? $n(e, n[a], s, t) : (n[a] = $n(e, new d(), s, t), d.fieldWrapper && !t.oneof && !t.repeated && (n[a] = d.fieldWrapper.unwrapField(n[a])));
|
|
4072
4056
|
break;
|
|
4073
4057
|
case "map":
|
|
4074
4058
|
let [l, u] = Pl(t, e, s);
|
|
@@ -4179,15 +4163,15 @@ function Il(n, e, t, i, s) {
|
|
|
4179
4163
|
r = Number.parseInt(i);
|
|
4180
4164
|
break;
|
|
4181
4165
|
case b.BOOL:
|
|
4182
|
-
|
|
4166
|
+
Te(i == "true" || i == "false"), r = i == "true";
|
|
4183
4167
|
break;
|
|
4184
4168
|
}
|
|
4185
|
-
switch (
|
|
4169
|
+
switch (ln(n, t.K, 1, r, !0), t.V.kind) {
|
|
4186
4170
|
case "scalar":
|
|
4187
|
-
|
|
4171
|
+
ln(n, t.V.T, 2, s, !0);
|
|
4188
4172
|
break;
|
|
4189
4173
|
case "enum":
|
|
4190
|
-
|
|
4174
|
+
ln(n, b.INT32, 2, s, !0);
|
|
4191
4175
|
break;
|
|
4192
4176
|
case "message":
|
|
4193
4177
|
n.tag(2, ee.LengthDelimited).bytes(s.toBinary(e));
|
|
@@ -4199,7 +4183,7 @@ function Xs(n, e, t, i) {
|
|
|
4199
4183
|
const s = ka(t.T, i);
|
|
4200
4184
|
t != null && t.delimited ? n.tag(t.no, ee.StartGroup).raw(s.toBinary(e)).tag(t.no, ee.EndGroup) : n.tag(t.no, ee.LengthDelimited).bytes(s.toBinary(e));
|
|
4201
4185
|
}
|
|
4202
|
-
function
|
|
4186
|
+
function ln(n, e, t, i, s) {
|
|
4203
4187
|
let [r, a, o] = ga(e, i);
|
|
4204
4188
|
(!o || s) && n.tag(t, r)[a](i);
|
|
4205
4189
|
}
|
|
@@ -4243,9 +4227,9 @@ function Zs(n, e, t, i) {
|
|
|
4243
4227
|
Ol(t, r, n.no, e);
|
|
4244
4228
|
else
|
|
4245
4229
|
for (const a of e)
|
|
4246
|
-
|
|
4230
|
+
ln(t, r, n.no, a, !0);
|
|
4247
4231
|
else
|
|
4248
|
-
e !== void 0 &&
|
|
4232
|
+
e !== void 0 && ln(t, r, n.no, e, !!n.oneof || n.opt);
|
|
4249
4233
|
break;
|
|
4250
4234
|
case "message":
|
|
4251
4235
|
if (s)
|
|
@@ -4366,7 +4350,7 @@ function ba(n, e) {
|
|
|
4366
4350
|
return e.extendee.typeName === t.typeName && !!t.runtime.bin.listUnknownFields(n).find((i) => i.no == e.field.no);
|
|
4367
4351
|
}
|
|
4368
4352
|
function Ta(n, e) {
|
|
4369
|
-
|
|
4353
|
+
Te(n.extendee.typeName == e.getType().typeName, "extension ".concat(n.typeName, " can only be applied to message ").concat(n.extendee.typeName));
|
|
4370
4354
|
}
|
|
4371
4355
|
const er = {
|
|
4372
4356
|
ignoreUnknownFields: !1
|
|
@@ -4452,7 +4436,7 @@ function Ll(n, e) {
|
|
|
4452
4436
|
}
|
|
4453
4437
|
return a;
|
|
4454
4438
|
},
|
|
4455
|
-
readScalar: (i, s, r) =>
|
|
4439
|
+
readScalar: (i, s, r) => nn(i, s, r, n),
|
|
4456
4440
|
// eslint-disable-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return
|
|
4457
4441
|
writeScalar: ir,
|
|
4458
4442
|
debug: $e
|
|
@@ -4499,7 +4483,7 @@ function nr(n, e, t, i, s, r) {
|
|
|
4499
4483
|
break;
|
|
4500
4484
|
case "scalar":
|
|
4501
4485
|
try {
|
|
4502
|
-
d =
|
|
4486
|
+
d = nn(t.T, c, t.L, !0);
|
|
4503
4487
|
} catch (l) {
|
|
4504
4488
|
let u = "cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat($e(c));
|
|
4505
4489
|
throw l instanceof Error && l.message.length > 0 && (u += ": ".concat(l.message)), new Error(u);
|
|
@@ -4528,7 +4512,7 @@ function nr(n, e, t, i, s, r) {
|
|
|
4528
4512
|
break;
|
|
4529
4513
|
case "scalar":
|
|
4530
4514
|
try {
|
|
4531
|
-
l =
|
|
4515
|
+
l = nn(t.V.T, d, Ct.BIGINT, !0);
|
|
4532
4516
|
} catch (u) {
|
|
4533
4517
|
let p = "cannot decode map value for field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat($e(e));
|
|
4534
4518
|
throw u instanceof Error && u.message.length > 0 && (p += ": ".concat(u.message)), new Error(p);
|
|
@@ -4536,7 +4520,7 @@ function nr(n, e, t, i, s, r) {
|
|
|
4536
4520
|
break;
|
|
4537
4521
|
}
|
|
4538
4522
|
try {
|
|
4539
|
-
o[
|
|
4523
|
+
o[nn(t.K, t.K == b.BOOL ? c == "true" ? !0 : c == "false" ? !1 : c : c, Ct.BIGINT, !0).toString()] = l;
|
|
4540
4524
|
} catch (u) {
|
|
4541
4525
|
let p = "cannot decode map key for field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat($e(e));
|
|
4542
4526
|
throw u instanceof Error && u.message.length > 0 && (p += ": ".concat(u.message)), new Error(p);
|
|
@@ -4551,7 +4535,7 @@ function nr(n, e, t, i, s, r) {
|
|
|
4551
4535
|
throw new Error("cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: null is invalid for oneof field"));
|
|
4552
4536
|
return;
|
|
4553
4537
|
}
|
|
4554
|
-
n[a] instanceof
|
|
4538
|
+
n[a] instanceof Ht ? n[a].fromJson(e, i) : (n[a] = o.fromJson(e, i), o.fieldWrapper && !t.oneof && (n[a] = o.fieldWrapper.unwrapField(n[a])));
|
|
4555
4539
|
break;
|
|
4556
4540
|
case "enum":
|
|
4557
4541
|
const c = Si(t.T, e, i.ignoreUnknownFields, r);
|
|
@@ -4559,7 +4543,7 @@ function nr(n, e, t, i, s, r) {
|
|
|
4559
4543
|
break;
|
|
4560
4544
|
case "scalar":
|
|
4561
4545
|
try {
|
|
4562
|
-
n[a] =
|
|
4546
|
+
n[a] = nn(t.T, e, t.L, r);
|
|
4563
4547
|
} catch (d) {
|
|
4564
4548
|
let l = "cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat($e(e));
|
|
4565
4549
|
throw d instanceof Error && d.message.length > 0 && (l += ": ".concat(d.message)), new Error(l);
|
|
@@ -4567,7 +4551,7 @@ function nr(n, e, t, i, s, r) {
|
|
|
4567
4551
|
break;
|
|
4568
4552
|
}
|
|
4569
4553
|
}
|
|
4570
|
-
function
|
|
4554
|
+
function nn(n, e, t, i) {
|
|
4571
4555
|
switch (n) {
|
|
4572
4556
|
case b.DOUBLE:
|
|
4573
4557
|
case b.FLOAT:
|
|
@@ -4678,22 +4662,22 @@ function ir(n, e, t) {
|
|
|
4678
4662
|
case b.SINT32:
|
|
4679
4663
|
case b.FIXED32:
|
|
4680
4664
|
case b.UINT32:
|
|
4681
|
-
return
|
|
4665
|
+
return Te(typeof e == "number"), e != 0 || t ? e : void 0;
|
|
4682
4666
|
case b.FLOAT:
|
|
4683
4667
|
case b.DOUBLE:
|
|
4684
|
-
return
|
|
4668
|
+
return Te(typeof e == "number"), Number.isNaN(e) ? "NaN" : e === Number.POSITIVE_INFINITY ? "Infinity" : e === Number.NEGATIVE_INFINITY ? "-Infinity" : e !== 0 || t ? e : void 0;
|
|
4685
4669
|
case b.STRING:
|
|
4686
|
-
return
|
|
4670
|
+
return Te(typeof e == "string"), e.length > 0 || t ? e : void 0;
|
|
4687
4671
|
case b.BOOL:
|
|
4688
|
-
return
|
|
4672
|
+
return Te(typeof e == "boolean"), e || t ? e : void 0;
|
|
4689
4673
|
case b.UINT64:
|
|
4690
4674
|
case b.FIXED64:
|
|
4691
4675
|
case b.INT64:
|
|
4692
4676
|
case b.SFIXED64:
|
|
4693
4677
|
case b.SINT64:
|
|
4694
|
-
return
|
|
4678
|
+
return Te(typeof e == "bigint" || typeof e == "string" || typeof e == "number"), t || e != 0 ? e.toString(10) : void 0;
|
|
4695
4679
|
case b.BYTES:
|
|
4696
|
-
return
|
|
4680
|
+
return Te(e instanceof Uint8Array), t || e.byteLength > 0 ? ya.enc(e) : void 0;
|
|
4697
4681
|
}
|
|
4698
4682
|
}
|
|
4699
4683
|
function jl() {
|
|
@@ -4704,7 +4688,7 @@ function jl() {
|
|
|
4704
4688
|
case "scalar":
|
|
4705
4689
|
for (const [c, d] of Object.entries(s)) {
|
|
4706
4690
|
const l = e(i.V.T, d, !0);
|
|
4707
|
-
|
|
4691
|
+
Te(l !== void 0), a[c.toString()] = l;
|
|
4708
4692
|
}
|
|
4709
4693
|
break;
|
|
4710
4694
|
case "message":
|
|
@@ -4714,9 +4698,9 @@ function jl() {
|
|
|
4714
4698
|
case "enum":
|
|
4715
4699
|
const o = i.V.T;
|
|
4716
4700
|
for (const [c, d] of Object.entries(s)) {
|
|
4717
|
-
|
|
4701
|
+
Te(d === void 0 || typeof d == "number");
|
|
4718
4702
|
const l = n(o, d, !0, r.enumAsInteger);
|
|
4719
|
-
|
|
4703
|
+
Te(l !== void 0), a[c.toString()] = l;
|
|
4720
4704
|
}
|
|
4721
4705
|
break;
|
|
4722
4706
|
}
|
|
@@ -4769,7 +4753,7 @@ function Fl() {
|
|
|
4769
4753
|
continue;
|
|
4770
4754
|
const c = i.findField(o);
|
|
4771
4755
|
let d = a[s].value;
|
|
4772
|
-
c && c.kind == "message" && !(d instanceof c.T) ? d = new c.T(d) : c && c.kind === "scalar" && c.T === b.BYTES && (d =
|
|
4756
|
+
c && c.kind == "message" && !(d instanceof c.T) ? d = new c.T(d) : c && c.kind === "scalar" && c.T === b.BYTES && (d = Kt(d)), r[s] = {
|
|
4773
4757
|
case: o,
|
|
4774
4758
|
value: d
|
|
4775
4759
|
};
|
|
@@ -4777,7 +4761,7 @@ function Fl() {
|
|
|
4777
4761
|
case "scalar":
|
|
4778
4762
|
case "enum":
|
|
4779
4763
|
let l = a[s];
|
|
4780
|
-
i.T === b.BYTES && (l = i.repeated ? l.map(
|
|
4764
|
+
i.T === b.BYTES && (l = i.repeated ? l.map(Kt) : Kt(l)), r[s] = l;
|
|
4781
4765
|
break;
|
|
4782
4766
|
case "map":
|
|
4783
4767
|
switch (i.V.kind) {
|
|
@@ -4785,7 +4769,7 @@ function Fl() {
|
|
|
4785
4769
|
case "enum":
|
|
4786
4770
|
if (i.V.T === b.BYTES)
|
|
4787
4771
|
for (const [m, k] of Object.entries(a[s]))
|
|
4788
|
-
r[s][m] =
|
|
4772
|
+
r[s][m] = Kt(k);
|
|
4789
4773
|
else
|
|
4790
4774
|
Object.assign(r[s], a[s]);
|
|
4791
4775
|
break;
|
|
@@ -4804,7 +4788,7 @@ function Fl() {
|
|
|
4804
4788
|
r[s] = a[s].map((p) => p instanceof u ? p : new u(p));
|
|
4805
4789
|
else if (a[s] !== void 0) {
|
|
4806
4790
|
const p = a[s];
|
|
4807
|
-
u.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ u.typeName === "google.protobuf.BytesValue" ? r[s] =
|
|
4791
|
+
u.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ u.typeName === "google.protobuf.BytesValue" ? r[s] = Kt(p) : r[s] = p : r[s] = p instanceof u ? p : new u(p);
|
|
4808
4792
|
}
|
|
4809
4793
|
break;
|
|
4810
4794
|
}
|
|
@@ -4891,7 +4875,7 @@ function Fl() {
|
|
|
4891
4875
|
function Ln(n) {
|
|
4892
4876
|
if (n === void 0)
|
|
4893
4877
|
return n;
|
|
4894
|
-
if (n instanceof
|
|
4878
|
+
if (n instanceof Ht)
|
|
4895
4879
|
return n.clone();
|
|
4896
4880
|
if (n instanceof Uint8Array) {
|
|
4897
4881
|
const e = new Uint8Array(n.byteLength);
|
|
@@ -4899,7 +4883,7 @@ function Ln(n) {
|
|
|
4899
4883
|
}
|
|
4900
4884
|
return n;
|
|
4901
4885
|
}
|
|
4902
|
-
function
|
|
4886
|
+
function Kt(n) {
|
|
4903
4887
|
return n instanceof Uint8Array ? n : new Uint8Array(n);
|
|
4904
4888
|
}
|
|
4905
4889
|
class Bl {
|
|
@@ -5002,7 +4986,7 @@ class Wl {
|
|
|
5002
4986
|
this.kind = "oneof", this.repeated = !1, this.packed = !1, this.opt = !1, this.default = void 0, this.fields = [], this.name = e, this.localName = Vl(e);
|
|
5003
4987
|
}
|
|
5004
4988
|
addField(e) {
|
|
5005
|
-
|
|
4989
|
+
Te(e.oneof === this, "field ".concat(e.name, " not one of ").concat(this.name)), this.fields.push(e);
|
|
5006
4990
|
}
|
|
5007
4991
|
findField(e) {
|
|
5008
4992
|
if (!this._lookup) {
|
|
@@ -5059,7 +5043,7 @@ function Jl(n) {
|
|
|
5059
5043
|
}
|
|
5060
5044
|
return r;
|
|
5061
5045
|
}
|
|
5062
|
-
class ge extends
|
|
5046
|
+
class ge extends Ht {
|
|
5063
5047
|
constructor(e) {
|
|
5064
5048
|
super(), this.seconds = se.zero, this.nanos = 0, h.util.initPartial(e, this);
|
|
5065
5049
|
}
|
|
@@ -5196,7 +5180,7 @@ const Ea = h.makeEnum("livekit.AudioCodec", [{
|
|
|
5196
5180
|
}, {
|
|
5197
5181
|
no: 3,
|
|
5198
5182
|
name: "OFF"
|
|
5199
|
-
}]),
|
|
5183
|
+
}]), sn = h.makeEnum("livekit.ConnectionQuality", [{
|
|
5200
5184
|
no: 0,
|
|
5201
5185
|
name: "POOR"
|
|
5202
5186
|
}, {
|
|
@@ -5208,7 +5192,7 @@ const Ea = h.makeEnum("livekit.AudioCodec", [{
|
|
|
5208
5192
|
}, {
|
|
5209
5193
|
no: 3,
|
|
5210
5194
|
name: "LOST"
|
|
5211
|
-
}]),
|
|
5195
|
+
}]), yn = h.makeEnum("livekit.ClientConfigSetting", [{
|
|
5212
5196
|
no: 0,
|
|
5213
5197
|
name: "UNSET"
|
|
5214
5198
|
}, {
|
|
@@ -5217,7 +5201,7 @@ const Ea = h.makeEnum("livekit.AudioCodec", [{
|
|
|
5217
5201
|
}, {
|
|
5218
5202
|
no: 2,
|
|
5219
5203
|
name: "ENABLED"
|
|
5220
|
-
}]),
|
|
5204
|
+
}]), un = h.makeEnum("livekit.DisconnectReason", [{
|
|
5221
5205
|
no: 0,
|
|
5222
5206
|
name: "UNKNOWN_REASON"
|
|
5223
5207
|
}, {
|
|
@@ -5247,7 +5231,7 @@ const Ea = h.makeEnum("livekit.AudioCodec", [{
|
|
|
5247
5231
|
}, {
|
|
5248
5232
|
no: 9,
|
|
5249
5233
|
name: "SIGNAL_CLOSE"
|
|
5250
|
-
}]),
|
|
5234
|
+
}]), Mt = h.makeEnum("livekit.ReconnectReason", [{
|
|
5251
5235
|
no: 0,
|
|
5252
5236
|
name: "RR_UNKNOWN"
|
|
5253
5237
|
}, {
|
|
@@ -5271,7 +5255,7 @@ const Ea = h.makeEnum("livekit.AudioCodec", [{
|
|
|
5271
5255
|
}, {
|
|
5272
5256
|
no: 2,
|
|
5273
5257
|
name: "SE_TRACK_NOTFOUND"
|
|
5274
|
-
}]),
|
|
5258
|
+
}]), qt = h.makeMessageType("livekit.Room", () => [{
|
|
5275
5259
|
no: 1,
|
|
5276
5260
|
name: "sid",
|
|
5277
5261
|
kind: "scalar",
|
|
@@ -5696,7 +5680,7 @@ const Oe = h.makeEnum("livekit.Encryption.Type", [{
|
|
|
5696
5680
|
no: 1,
|
|
5697
5681
|
name: "kind",
|
|
5698
5682
|
kind: "enum",
|
|
5699
|
-
T: h.getEnumType(
|
|
5683
|
+
T: h.getEnumType(ke)
|
|
5700
5684
|
}, {
|
|
5701
5685
|
no: 4,
|
|
5702
5686
|
name: "participant_identity",
|
|
@@ -5727,7 +5711,7 @@ const Oe = h.makeEnum("livekit.Encryption.Type", [{
|
|
|
5727
5711
|
kind: "message",
|
|
5728
5712
|
T: eu,
|
|
5729
5713
|
oneof: "value"
|
|
5730
|
-
}]),
|
|
5714
|
+
}]), ke = h.makeEnum("livekit.DataPacket.Kind", [{
|
|
5731
5715
|
no: 0,
|
|
5732
5716
|
name: "RELIABLE"
|
|
5733
5717
|
}, {
|
|
@@ -5964,7 +5948,7 @@ const Oe = h.makeEnum("livekit.Encryption.Type", [{
|
|
|
5964
5948
|
no: 3,
|
|
5965
5949
|
name: "resume_connection",
|
|
5966
5950
|
kind: "enum",
|
|
5967
|
-
T: h.getEnumType(
|
|
5951
|
+
T: h.getEnumType(yn)
|
|
5968
5952
|
}, {
|
|
5969
5953
|
no: 4,
|
|
5970
5954
|
name: "disabled_codecs",
|
|
@@ -5974,12 +5958,12 @@ const Oe = h.makeEnum("livekit.Encryption.Type", [{
|
|
|
5974
5958
|
no: 5,
|
|
5975
5959
|
name: "force_relay",
|
|
5976
5960
|
kind: "enum",
|
|
5977
|
-
T: h.getEnumType(
|
|
5961
|
+
T: h.getEnumType(yn)
|
|
5978
5962
|
}]), sr = h.makeMessageType("livekit.VideoConfiguration", () => [{
|
|
5979
5963
|
no: 1,
|
|
5980
5964
|
name: "hardware_encoder",
|
|
5981
5965
|
kind: "enum",
|
|
5982
|
-
T: h.getEnumType(
|
|
5966
|
+
T: h.getEnumType(yn)
|
|
5983
5967
|
}]), iu = h.makeMessageType("livekit.DisabledCodecs", () => [{
|
|
5984
5968
|
no: 1,
|
|
5985
5969
|
name: "codecs",
|
|
@@ -6345,7 +6329,7 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6345
6329
|
}, {
|
|
6346
6330
|
no: 1,
|
|
6347
6331
|
name: "RTMP"
|
|
6348
|
-
}]),
|
|
6332
|
+
}]), En = h.makeEnum("livekit.EncodingOptionsPreset", [{
|
|
6349
6333
|
no: 0,
|
|
6350
6334
|
name: "H264_720P_30"
|
|
6351
6335
|
}, {
|
|
@@ -6442,13 +6426,13 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6442
6426
|
no: 8,
|
|
6443
6427
|
name: "preset",
|
|
6444
6428
|
kind: "enum",
|
|
6445
|
-
T: h.getEnumType(
|
|
6429
|
+
T: h.getEnumType(En),
|
|
6446
6430
|
oneof: "options"
|
|
6447
6431
|
}, {
|
|
6448
6432
|
no: 9,
|
|
6449
6433
|
name: "advanced",
|
|
6450
6434
|
kind: "message",
|
|
6451
|
-
T:
|
|
6435
|
+
T: In,
|
|
6452
6436
|
oneof: "options"
|
|
6453
6437
|
}, {
|
|
6454
6438
|
no: 11,
|
|
@@ -6520,13 +6504,13 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6520
6504
|
no: 7,
|
|
6521
6505
|
name: "preset",
|
|
6522
6506
|
kind: "enum",
|
|
6523
|
-
T: h.getEnumType(
|
|
6507
|
+
T: h.getEnumType(En),
|
|
6524
6508
|
oneof: "options"
|
|
6525
6509
|
}, {
|
|
6526
6510
|
no: 8,
|
|
6527
6511
|
name: "advanced",
|
|
6528
6512
|
kind: "message",
|
|
6529
|
-
T:
|
|
6513
|
+
T: In,
|
|
6530
6514
|
oneof: "options"
|
|
6531
6515
|
}, {
|
|
6532
6516
|
no: 9,
|
|
@@ -6574,13 +6558,13 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6574
6558
|
no: 4,
|
|
6575
6559
|
name: "preset",
|
|
6576
6560
|
kind: "enum",
|
|
6577
|
-
T: h.getEnumType(
|
|
6561
|
+
T: h.getEnumType(En),
|
|
6578
6562
|
oneof: "options"
|
|
6579
6563
|
}, {
|
|
6580
6564
|
no: 5,
|
|
6581
6565
|
name: "advanced",
|
|
6582
6566
|
kind: "message",
|
|
6583
|
-
T:
|
|
6567
|
+
T: In,
|
|
6584
6568
|
oneof: "options"
|
|
6585
6569
|
}, {
|
|
6586
6570
|
no: 6,
|
|
@@ -6646,13 +6630,13 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6646
6630
|
no: 6,
|
|
6647
6631
|
name: "preset",
|
|
6648
6632
|
kind: "enum",
|
|
6649
|
-
T: h.getEnumType(
|
|
6633
|
+
T: h.getEnumType(En),
|
|
6650
6634
|
oneof: "options"
|
|
6651
6635
|
}, {
|
|
6652
6636
|
no: 7,
|
|
6653
6637
|
name: "advanced",
|
|
6654
6638
|
kind: "message",
|
|
6655
|
-
T:
|
|
6639
|
+
T: In,
|
|
6656
6640
|
oneof: "options"
|
|
6657
6641
|
}, {
|
|
6658
6642
|
no: 11,
|
|
@@ -6723,19 +6707,19 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6723
6707
|
no: 3,
|
|
6724
6708
|
name: "s3",
|
|
6725
6709
|
kind: "message",
|
|
6726
|
-
T:
|
|
6710
|
+
T: wn,
|
|
6727
6711
|
oneof: "output"
|
|
6728
6712
|
}, {
|
|
6729
6713
|
no: 4,
|
|
6730
6714
|
name: "gcp",
|
|
6731
6715
|
kind: "message",
|
|
6732
|
-
T:
|
|
6716
|
+
T: Pn,
|
|
6733
6717
|
oneof: "output"
|
|
6734
6718
|
}, {
|
|
6735
6719
|
no: 5,
|
|
6736
6720
|
name: "azure",
|
|
6737
6721
|
kind: "message",
|
|
6738
|
-
T:
|
|
6722
|
+
T: Rn,
|
|
6739
6723
|
oneof: "output"
|
|
6740
6724
|
}, {
|
|
6741
6725
|
no: 7,
|
|
@@ -6787,19 +6771,19 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6787
6771
|
no: 5,
|
|
6788
6772
|
name: "s3",
|
|
6789
6773
|
kind: "message",
|
|
6790
|
-
T:
|
|
6774
|
+
T: wn,
|
|
6791
6775
|
oneof: "output"
|
|
6792
6776
|
}, {
|
|
6793
6777
|
no: 6,
|
|
6794
6778
|
name: "gcp",
|
|
6795
6779
|
kind: "message",
|
|
6796
|
-
T:
|
|
6780
|
+
T: Pn,
|
|
6797
6781
|
oneof: "output"
|
|
6798
6782
|
}, {
|
|
6799
6783
|
no: 7,
|
|
6800
6784
|
name: "azure",
|
|
6801
6785
|
kind: "message",
|
|
6802
|
-
T:
|
|
6786
|
+
T: Rn,
|
|
6803
6787
|
oneof: "output"
|
|
6804
6788
|
}, {
|
|
6805
6789
|
no: 9,
|
|
@@ -6823,19 +6807,19 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6823
6807
|
no: 2,
|
|
6824
6808
|
name: "s3",
|
|
6825
6809
|
kind: "message",
|
|
6826
|
-
T:
|
|
6810
|
+
T: wn,
|
|
6827
6811
|
oneof: "output"
|
|
6828
6812
|
}, {
|
|
6829
6813
|
no: 3,
|
|
6830
6814
|
name: "gcp",
|
|
6831
6815
|
kind: "message",
|
|
6832
|
-
T:
|
|
6816
|
+
T: Pn,
|
|
6833
6817
|
oneof: "output"
|
|
6834
6818
|
}, {
|
|
6835
6819
|
no: 4,
|
|
6836
6820
|
name: "azure",
|
|
6837
6821
|
kind: "message",
|
|
6838
|
-
T:
|
|
6822
|
+
T: Rn,
|
|
6839
6823
|
oneof: "output"
|
|
6840
6824
|
}, {
|
|
6841
6825
|
no: 6,
|
|
@@ -6887,19 +6871,19 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6887
6871
|
no: 8,
|
|
6888
6872
|
name: "s3",
|
|
6889
6873
|
kind: "message",
|
|
6890
|
-
T:
|
|
6874
|
+
T: wn,
|
|
6891
6875
|
oneof: "output"
|
|
6892
6876
|
}, {
|
|
6893
6877
|
no: 9,
|
|
6894
6878
|
name: "gcp",
|
|
6895
6879
|
kind: "message",
|
|
6896
|
-
T:
|
|
6880
|
+
T: Pn,
|
|
6897
6881
|
oneof: "output"
|
|
6898
6882
|
}, {
|
|
6899
6883
|
no: 10,
|
|
6900
6884
|
name: "azure",
|
|
6901
6885
|
kind: "message",
|
|
6902
|
-
T:
|
|
6886
|
+
T: Rn,
|
|
6903
6887
|
oneof: "output"
|
|
6904
6888
|
}, {
|
|
6905
6889
|
no: 11,
|
|
@@ -6907,7 +6891,7 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6907
6891
|
kind: "message",
|
|
6908
6892
|
T: li,
|
|
6909
6893
|
oneof: "output"
|
|
6910
|
-
}]),
|
|
6894
|
+
}]), wn = h.makeMessageType("livekit.S3Upload", () => [{
|
|
6911
6895
|
no: 1,
|
|
6912
6896
|
name: "access_key",
|
|
6913
6897
|
kind: "scalar",
|
|
@@ -6965,7 +6949,7 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6965
6949
|
kind: "scalar",
|
|
6966
6950
|
T: 9
|
|
6967
6951
|
/* ScalarType.STRING */
|
|
6968
|
-
}]),
|
|
6952
|
+
}]), Pn = h.makeMessageType("livekit.GCPUpload", () => [{
|
|
6969
6953
|
no: 1,
|
|
6970
6954
|
name: "credentials",
|
|
6971
6955
|
kind: "scalar",
|
|
@@ -6983,7 +6967,7 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
6983
6967
|
kind: "scalar",
|
|
6984
6968
|
T: 9
|
|
6985
6969
|
/* ScalarType.STRING */
|
|
6986
|
-
}]),
|
|
6970
|
+
}]), Rn = h.makeMessageType("livekit.AzureBlobUpload", () => [{
|
|
6987
6971
|
no: 1,
|
|
6988
6972
|
name: "account_name",
|
|
6989
6973
|
kind: "scalar",
|
|
@@ -7042,7 +7026,7 @@ const Da = h.makeMessageType("livekit.TimedVersion", () => [{
|
|
|
7042
7026
|
kind: "scalar",
|
|
7043
7027
|
T: 9,
|
|
7044
7028
|
repeated: !0
|
|
7045
|
-
}]),
|
|
7029
|
+
}]), In = h.makeMessageType("livekit.EncodingOptions", () => [{
|
|
7046
7030
|
no: 1,
|
|
7047
7031
|
name: "width",
|
|
7048
7032
|
kind: "scalar",
|
|
@@ -7465,13 +7449,13 @@ const La = h.makeMessageType("livekit.EgressInfo", () => [{
|
|
|
7465
7449
|
no: 1,
|
|
7466
7450
|
name: "preset",
|
|
7467
7451
|
kind: "enum",
|
|
7468
|
-
T: h.getEnumType(
|
|
7452
|
+
T: h.getEnumType(En),
|
|
7469
7453
|
oneof: "options"
|
|
7470
7454
|
}, {
|
|
7471
7455
|
no: 2,
|
|
7472
7456
|
name: "advanced",
|
|
7473
7457
|
kind: "message",
|
|
7474
|
-
T:
|
|
7458
|
+
T: In,
|
|
7475
7459
|
oneof: "options"
|
|
7476
7460
|
}, {
|
|
7477
7461
|
no: 3,
|
|
@@ -7501,19 +7485,19 @@ const La = h.makeMessageType("livekit.EgressInfo", () => [{
|
|
|
7501
7485
|
no: 2,
|
|
7502
7486
|
name: "s3",
|
|
7503
7487
|
kind: "message",
|
|
7504
|
-
T:
|
|
7488
|
+
T: wn,
|
|
7505
7489
|
oneof: "output"
|
|
7506
7490
|
}, {
|
|
7507
7491
|
no: 3,
|
|
7508
7492
|
name: "gcp",
|
|
7509
7493
|
kind: "message",
|
|
7510
|
-
T:
|
|
7494
|
+
T: Pn,
|
|
7511
7495
|
oneof: "output"
|
|
7512
7496
|
}, {
|
|
7513
7497
|
no: 4,
|
|
7514
7498
|
name: "azure",
|
|
7515
7499
|
kind: "message",
|
|
7516
|
-
T:
|
|
7500
|
+
T: Rn,
|
|
7517
7501
|
oneof: "output"
|
|
7518
7502
|
}]);
|
|
7519
7503
|
h.makeMessageType("livekit.CreateRoomRequest", () => [{
|
|
@@ -7603,7 +7587,7 @@ h.makeMessageType("livekit.ListRoomsResponse", () => [{
|
|
|
7603
7587
|
no: 1,
|
|
7604
7588
|
name: "rooms",
|
|
7605
7589
|
kind: "message",
|
|
7606
|
-
T:
|
|
7590
|
+
T: qt,
|
|
7607
7591
|
repeated: !0
|
|
7608
7592
|
}]);
|
|
7609
7593
|
h.makeMessageType("livekit.DeleteRoomRequest", () => [{
|
|
@@ -7751,7 +7735,7 @@ h.makeMessageType("livekit.SendDataRequest", () => [{
|
|
|
7751
7735
|
no: 3,
|
|
7752
7736
|
name: "kind",
|
|
7753
7737
|
kind: "enum",
|
|
7754
|
-
T: h.getEnumType(
|
|
7738
|
+
T: h.getEnumType(ke)
|
|
7755
7739
|
}, {
|
|
7756
7740
|
no: 4,
|
|
7757
7741
|
name: "destination_sids",
|
|
@@ -7841,7 +7825,7 @@ const Fa = h.makeMessageType("livekit.Job", () => [{
|
|
|
7841
7825
|
no: 3,
|
|
7842
7826
|
name: "room",
|
|
7843
7827
|
kind: "message",
|
|
7844
|
-
T:
|
|
7828
|
+
T: qt
|
|
7845
7829
|
}, {
|
|
7846
7830
|
no: 4,
|
|
7847
7831
|
name: "participant",
|
|
@@ -8335,7 +8319,7 @@ const Su = h.makeMessageType("livekit.RegisterWorkerRequest", () => [{
|
|
|
8335
8319
|
no: 1,
|
|
8336
8320
|
name: "room",
|
|
8337
8321
|
kind: "message",
|
|
8338
|
-
T:
|
|
8322
|
+
T: qt
|
|
8339
8323
|
}, {
|
|
8340
8324
|
no: 2,
|
|
8341
8325
|
name: "participant",
|
|
@@ -8520,7 +8504,7 @@ const Su = h.makeMessageType("livekit.RegisterWorkerRequest", () => [{
|
|
|
8520
8504
|
no: 2,
|
|
8521
8505
|
name: "reason",
|
|
8522
8506
|
kind: "enum",
|
|
8523
|
-
T: h.getEnumType(
|
|
8507
|
+
T: h.getEnumType(un)
|
|
8524
8508
|
}, {
|
|
8525
8509
|
no: 3,
|
|
8526
8510
|
name: "action",
|
|
@@ -8592,7 +8576,7 @@ const Su = h.makeMessageType("livekit.RegisterWorkerRequest", () => [{
|
|
|
8592
8576
|
no: 1,
|
|
8593
8577
|
name: "room",
|
|
8594
8578
|
kind: "message",
|
|
8595
|
-
T:
|
|
8579
|
+
T: qt
|
|
8596
8580
|
}]), Fu = h.makeMessageType("livekit.ConnectionQualityInfo", () => [{
|
|
8597
8581
|
no: 1,
|
|
8598
8582
|
name: "participant_sid",
|
|
@@ -8603,7 +8587,7 @@ const Su = h.makeMessageType("livekit.RegisterWorkerRequest", () => [{
|
|
|
8603
8587
|
no: 2,
|
|
8604
8588
|
name: "quality",
|
|
8605
8589
|
kind: "enum",
|
|
8606
|
-
T: h.getEnumType(
|
|
8590
|
+
T: h.getEnumType(sn)
|
|
8607
8591
|
}, {
|
|
8608
8592
|
no: 3,
|
|
8609
8593
|
name: "score",
|
|
@@ -9372,7 +9356,7 @@ h.makeMessageType("livekit.WebhookEvent", () => [{
|
|
|
9372
9356
|
no: 2,
|
|
9373
9357
|
name: "room",
|
|
9374
9358
|
kind: "message",
|
|
9375
|
-
T:
|
|
9359
|
+
T: qt
|
|
9376
9360
|
}, {
|
|
9377
9361
|
no: 3,
|
|
9378
9362
|
name: "participant",
|
|
@@ -9712,8 +9696,8 @@ var Xa = { exports: {} };
|
|
|
9712
9696
|
}
|
|
9713
9697
|
function c(v, S) {
|
|
9714
9698
|
for (var O = 0; O < s.length; O++) {
|
|
9715
|
-
var
|
|
9716
|
-
this[
|
|
9699
|
+
var w = s[O];
|
|
9700
|
+
this[w] = O < v ? e : this.methodFactory(w, v, S);
|
|
9717
9701
|
}
|
|
9718
9702
|
this.log = this.debug;
|
|
9719
9703
|
}
|
|
@@ -9726,7 +9710,7 @@ var Xa = { exports: {} };
|
|
|
9726
9710
|
return o(v) || d.apply(this, arguments);
|
|
9727
9711
|
}
|
|
9728
9712
|
function u(v, S, O) {
|
|
9729
|
-
var
|
|
9713
|
+
var w = this, F;
|
|
9730
9714
|
S = S ?? "WARN";
|
|
9731
9715
|
var W = "loglevel";
|
|
9732
9716
|
typeof v == "string" ? W += ":" + v : typeof v == "symbol" && (W = void 0);
|
|
@@ -9744,7 +9728,7 @@ var Xa = { exports: {} };
|
|
|
9744
9728
|
}
|
|
9745
9729
|
}
|
|
9746
9730
|
}
|
|
9747
|
-
function
|
|
9731
|
+
function de() {
|
|
9748
9732
|
var A;
|
|
9749
9733
|
if (!(typeof window === t || !W)) {
|
|
9750
9734
|
try {
|
|
@@ -9757,7 +9741,7 @@ var Xa = { exports: {} };
|
|
|
9757
9741
|
ze !== -1 && (A = /^([^;]+)/.exec(H.slice(ze))[1]);
|
|
9758
9742
|
} catch {
|
|
9759
9743
|
}
|
|
9760
|
-
return
|
|
9744
|
+
return w.levels[A] === void 0 && (A = void 0), A;
|
|
9761
9745
|
}
|
|
9762
9746
|
}
|
|
9763
9747
|
function N() {
|
|
@@ -9773,32 +9757,32 @@ var Xa = { exports: {} };
|
|
|
9773
9757
|
}
|
|
9774
9758
|
}
|
|
9775
9759
|
}
|
|
9776
|
-
|
|
9760
|
+
w.name = v, w.levels = {
|
|
9777
9761
|
TRACE: 0,
|
|
9778
9762
|
DEBUG: 1,
|
|
9779
9763
|
INFO: 2,
|
|
9780
9764
|
WARN: 3,
|
|
9781
9765
|
ERROR: 4,
|
|
9782
9766
|
SILENT: 5
|
|
9783
|
-
},
|
|
9767
|
+
}, w.methodFactory = O || l, w.getLevel = function() {
|
|
9784
9768
|
return F;
|
|
9785
|
-
},
|
|
9786
|
-
if (typeof A == "string" &&
|
|
9787
|
-
if (F = A, H !== !1 && he(A), c.call(
|
|
9769
|
+
}, w.setLevel = function(A, H) {
|
|
9770
|
+
if (typeof A == "string" && w.levels[A.toUpperCase()] !== void 0 && (A = w.levels[A.toUpperCase()]), typeof A == "number" && A >= 0 && A <= w.levels.SILENT) {
|
|
9771
|
+
if (F = A, H !== !1 && he(A), c.call(w, A, v), typeof console === t && A < w.levels.SILENT)
|
|
9788
9772
|
return "No console available for logging";
|
|
9789
9773
|
} else
|
|
9790
9774
|
throw "log.setLevel() called with invalid level: " + A;
|
|
9791
|
-
},
|
|
9792
|
-
S = A,
|
|
9793
|
-
},
|
|
9794
|
-
|
|
9795
|
-
},
|
|
9796
|
-
|
|
9797
|
-
},
|
|
9798
|
-
|
|
9775
|
+
}, w.setDefaultLevel = function(A) {
|
|
9776
|
+
S = A, de() || w.setLevel(A, !1);
|
|
9777
|
+
}, w.resetLevel = function() {
|
|
9778
|
+
w.setLevel(S, !1), N();
|
|
9779
|
+
}, w.enableAll = function(A) {
|
|
9780
|
+
w.setLevel(w.levels.TRACE, A);
|
|
9781
|
+
}, w.disableAll = function(A) {
|
|
9782
|
+
w.setLevel(w.levels.SILENT, A);
|
|
9799
9783
|
};
|
|
9800
|
-
var X =
|
|
9801
|
-
X == null && (X = S),
|
|
9784
|
+
var X = de();
|
|
9785
|
+
X == null && (X = S), w.setLevel(X, !1);
|
|
9802
9786
|
}
|
|
9803
9787
|
var p = new u(), m = {};
|
|
9804
9788
|
p.getLogger = function(S) {
|
|
@@ -9830,7 +9814,7 @@ function it(n) {
|
|
|
9830
9814
|
const e = pi.getLogger(n);
|
|
9831
9815
|
return e.setDefaultLevel($.getLevel()), e;
|
|
9832
9816
|
}
|
|
9833
|
-
const lh = pi.getLogger("lk-e2ee"),
|
|
9817
|
+
const lh = pi.getLogger("lk-e2ee"), Qt = 7e3, uh = [0, 300, 2 * 2 * 300, 3 * 3 * 300, 4 * 4 * 300, Qt, Qt, Qt, Qt, Qt];
|
|
9834
9818
|
class hh {
|
|
9835
9819
|
constructor(e) {
|
|
9836
9820
|
this._retryDelays = e !== void 0 ? [...e] : uh;
|
|
@@ -9866,7 +9850,7 @@ function f(n, e, t, i) {
|
|
|
9866
9850
|
function d(l) {
|
|
9867
9851
|
l.done ? r(l.value) : s(l.value).then(o, c);
|
|
9868
9852
|
}
|
|
9869
|
-
d((i = i.apply(n,
|
|
9853
|
+
d((i = i.apply(n, [])).next());
|
|
9870
9854
|
});
|
|
9871
9855
|
}
|
|
9872
9856
|
function dr(n) {
|
|
@@ -9881,7 +9865,7 @@ function dr(n) {
|
|
|
9881
9865
|
};
|
|
9882
9866
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
9883
9867
|
}
|
|
9884
|
-
function
|
|
9868
|
+
function Dt(n) {
|
|
9885
9869
|
if (!Symbol.asyncIterator)
|
|
9886
9870
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
9887
9871
|
var e = n[Symbol.asyncIterator], t;
|
|
@@ -9901,10 +9885,10 @@ function Nt(n) {
|
|
|
9901
9885
|
}, a);
|
|
9902
9886
|
}
|
|
9903
9887
|
}
|
|
9904
|
-
var Ps = { exports: {} },
|
|
9888
|
+
var Ps = { exports: {} }, Ut = typeof Reflect == "object" ? Reflect : null, lr = Ut && typeof Ut.apply == "function" ? Ut.apply : function(e, t, i) {
|
|
9905
9889
|
return Function.prototype.apply.call(e, t, i);
|
|
9906
9890
|
}, Hn;
|
|
9907
|
-
|
|
9891
|
+
Ut && typeof Ut.ownKeys == "function" ? Hn = Ut.ownKeys : Object.getOwnPropertySymbols ? Hn = function(e) {
|
|
9908
9892
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
9909
9893
|
} : Hn = function(e) {
|
|
9910
9894
|
return Object.getOwnPropertyNames(e);
|
|
@@ -11441,9 +11425,9 @@ t=0 0\r
|
|
|
11441
11425
|
return !0;
|
|
11442
11426
|
}, n.exports = e;
|
|
11443
11427
|
})(Bo);
|
|
11444
|
-
var Vo = Bo.exports,
|
|
11428
|
+
var Vo = Bo.exports, jt = /* @__PURE__ */ dh(Vo), _h = /* @__PURE__ */ sl({
|
|
11445
11429
|
__proto__: null,
|
|
11446
|
-
default:
|
|
11430
|
+
default: jt
|
|
11447
11431
|
}, [Vo]);
|
|
11448
11432
|
function Gn(n) {
|
|
11449
11433
|
if (!n.RTCIceCandidate || n.RTCIceCandidate && "foundation" in n.RTCIceCandidate.prototype)
|
|
@@ -11451,7 +11435,7 @@ function Gn(n) {
|
|
|
11451
11435
|
const e = n.RTCIceCandidate;
|
|
11452
11436
|
n.RTCIceCandidate = function(i) {
|
|
11453
11437
|
if (typeof i == "object" && i.candidate && i.candidate.indexOf("a=") === 0 && (i = JSON.parse(JSON.stringify(i)), i.candidate = i.candidate.substring(2)), i.candidate && i.candidate.length) {
|
|
11454
|
-
const s = new e(i), r =
|
|
11438
|
+
const s = new e(i), r = jt.parseCandidate(i.candidate);
|
|
11455
11439
|
for (const a in r)
|
|
11456
11440
|
a in s || Object.defineProperty(s, a, {
|
|
11457
11441
|
value: r[a]
|
|
@@ -11474,7 +11458,7 @@ function Gn(n) {
|
|
|
11474
11458
|
function Qi(n) {
|
|
11475
11459
|
!n.RTCIceCandidate || n.RTCIceCandidate && "relayProtocol" in n.RTCIceCandidate.prototype || Et(n, "icecandidate", (e) => {
|
|
11476
11460
|
if (e.candidate) {
|
|
11477
|
-
const t =
|
|
11461
|
+
const t = jt.parseCandidate(e.candidate.candidate);
|
|
11478
11462
|
t.type === "relay" && (e.candidate.relayProtocol = {
|
|
11479
11463
|
0: "tls",
|
|
11480
11464
|
1: "tcp",
|
|
@@ -11495,9 +11479,9 @@ function zn(n, e) {
|
|
|
11495
11479
|
const t = function(o) {
|
|
11496
11480
|
if (!o || !o.sdp)
|
|
11497
11481
|
return !1;
|
|
11498
|
-
const c =
|
|
11482
|
+
const c = jt.splitSections(o.sdp);
|
|
11499
11483
|
return c.shift(), c.some((d) => {
|
|
11500
|
-
const l =
|
|
11484
|
+
const l = jt.parseMLine(d);
|
|
11501
11485
|
return l && l.kind === "application" && l.protocol.indexOf("SCTP") !== -1;
|
|
11502
11486
|
});
|
|
11503
11487
|
}, i = function(o) {
|
|
@@ -11512,7 +11496,7 @@ function zn(n, e) {
|
|
|
11512
11496
|
}, r = function(o, c) {
|
|
11513
11497
|
let d = 65536;
|
|
11514
11498
|
e.browser === "firefox" && e.version === 57 && (d = 65535);
|
|
11515
|
-
const l =
|
|
11499
|
+
const l = jt.matchPrefix(o.sdp, "a=max-message-size:");
|
|
11516
11500
|
return l.length > 0 ? d = parseInt(l[0].substring(19), 10) : e.browser === "firefox" && c !== -1 && (d = 2147483637), d;
|
|
11517
11501
|
}, a = n.RTCPeerConnection.prototype.setRemoteDescription;
|
|
11518
11502
|
n.RTCPeerConnection.prototype.setRemoteDescription = function() {
|
|
@@ -11772,37 +11756,37 @@ class rf extends Ge.EventEmitter {
|
|
|
11772
11756
|
this.emit(pt.RatchetRequest, e, t);
|
|
11773
11757
|
}
|
|
11774
11758
|
}
|
|
11775
|
-
class
|
|
11759
|
+
class Gt extends Error {
|
|
11776
11760
|
constructor(e, t) {
|
|
11777
11761
|
super(t || "an error has occured"), this.code = e;
|
|
11778
11762
|
}
|
|
11779
11763
|
}
|
|
11780
|
-
class te extends
|
|
11764
|
+
class te extends Gt {
|
|
11781
11765
|
constructor(e, t, i) {
|
|
11782
11766
|
super(1, e), this.status = i, this.reason = t;
|
|
11783
11767
|
}
|
|
11784
11768
|
}
|
|
11785
|
-
class Is extends
|
|
11769
|
+
class Is extends Gt {
|
|
11786
11770
|
constructor(e) {
|
|
11787
11771
|
super(21, e ?? "device is unsupported");
|
|
11788
11772
|
}
|
|
11789
11773
|
}
|
|
11790
|
-
class qe extends
|
|
11774
|
+
class qe extends Gt {
|
|
11791
11775
|
constructor(e) {
|
|
11792
11776
|
super(20, e ?? "track is invalid");
|
|
11793
11777
|
}
|
|
11794
11778
|
}
|
|
11795
|
-
class xh extends
|
|
11779
|
+
class xh extends Gt {
|
|
11796
11780
|
constructor(e) {
|
|
11797
11781
|
super(10, e ?? "unsupported server");
|
|
11798
11782
|
}
|
|
11799
11783
|
}
|
|
11800
|
-
class ue extends
|
|
11784
|
+
class ue extends Gt {
|
|
11801
11785
|
constructor(e) {
|
|
11802
11786
|
super(12, e ?? "unexpected connection state");
|
|
11803
11787
|
}
|
|
11804
11788
|
}
|
|
11805
|
-
class es extends
|
|
11789
|
+
class es extends Gt {
|
|
11806
11790
|
constructor(e) {
|
|
11807
11791
|
super(13, e ?? "unable to negotiate");
|
|
11808
11792
|
}
|
|
@@ -11818,10 +11802,10 @@ var ti;
|
|
|
11818
11802
|
}
|
|
11819
11803
|
n.getFailure = e;
|
|
11820
11804
|
})(ti || (ti = {}));
|
|
11821
|
-
var
|
|
11805
|
+
var E;
|
|
11822
11806
|
(function(n) {
|
|
11823
11807
|
n.Connected = "connected", n.Reconnecting = "reconnecting", n.Reconnected = "reconnected", n.Disconnected = "disconnected", n.ConnectionStateChanged = "connectionStateChanged", n.MediaDevicesChanged = "mediaDevicesChanged", n.ParticipantConnected = "participantConnected", n.ParticipantDisconnected = "participantDisconnected", n.TrackPublished = "trackPublished", n.TrackSubscribed = "trackSubscribed", n.TrackSubscriptionFailed = "trackSubscriptionFailed", n.TrackUnpublished = "trackUnpublished", n.TrackUnsubscribed = "trackUnsubscribed", n.TrackMuted = "trackMuted", n.TrackUnmuted = "trackUnmuted", n.LocalTrackPublished = "localTrackPublished", n.LocalTrackUnpublished = "localTrackUnpublished", n.LocalAudioSilenceDetected = "localAudioSilenceDetected", n.ActiveSpeakersChanged = "activeSpeakersChanged", n.ParticipantMetadataChanged = "participantMetadataChanged", n.ParticipantNameChanged = "participantNameChanged", n.RoomMetadataChanged = "roomMetadataChanged", n.DataReceived = "dataReceived", n.ConnectionQualityChanged = "connectionQualityChanged", n.TrackStreamStateChanged = "trackStreamStateChanged", n.TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged", n.TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged", n.AudioPlaybackStatusChanged = "audioPlaybackChanged", n.VideoPlaybackStatusChanged = "videoPlaybackChanged", n.MediaDevicesError = "mediaDevicesError", n.ParticipantPermissionsChanged = "participantPermissionsChanged", n.SignalConnected = "signalConnected", n.RecordingStatusChanged = "recordingStatusChanged", n.ParticipantEncryptionStatusChanged = "participantEncryptionStatusChanged", n.EncryptionError = "encryptionError", n.DCBufferStatusChanged = "dcBufferStatusChanged", n.ActiveDeviceChanged = "activeDeviceChanged";
|
|
11824
|
-
})(
|
|
11808
|
+
})(E || (E = {}));
|
|
11825
11809
|
var M;
|
|
11826
11810
|
(function(n) {
|
|
11827
11811
|
n.TrackPublished = "trackPublished", n.TrackSubscribed = "trackSubscribed", n.TrackSubscriptionFailed = "trackSubscriptionFailed", n.TrackUnpublished = "trackUnpublished", n.TrackUnsubscribed = "trackUnsubscribed", n.TrackMuted = "trackMuted", n.TrackUnmuted = "trackUnmuted", n.LocalTrackPublished = "localTrackPublished", n.LocalTrackUnpublished = "localTrackUnpublished", n.ParticipantMetadataChanged = "participantMetadataChanged", n.ParticipantNameChanged = "participantNameChanged", n.DataReceived = "dataReceived", n.IsSpeakingChanged = "isSpeakingChanged", n.ConnectionQualityChanged = "connectionQualityChanged", n.TrackStreamStateChanged = "trackStreamStateChanged", n.TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged", n.TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged", n.MediaDevicesError = "mediaDevicesError", n.AudioStreamAcquired = "audioStreamAcquired", n.ParticipantPermissionsChanged = "participantPermissionsChanged", n.PCTrackAdded = "pcTrackAdded";
|
|
@@ -11858,8 +11842,8 @@ function Os(n, e, t) {
|
|
|
11858
11842
|
}), l = [];
|
|
11859
11843
|
}
|
|
11860
11844
|
}, u()), O) {
|
|
11861
|
-
var
|
|
11862
|
-
return o && o(
|
|
11845
|
+
var w = n.apply(k, m);
|
|
11846
|
+
return o && o(w), v(w);
|
|
11863
11847
|
}
|
|
11864
11848
|
l.push({
|
|
11865
11849
|
resolve: v,
|
|
@@ -11877,9 +11861,9 @@ const Ah = /version\/(\d+(\.?_?\d+)+)/i;
|
|
|
11877
11861
|
let _i;
|
|
11878
11862
|
function st(n) {
|
|
11879
11863
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
11880
|
-
if (typeof
|
|
11864
|
+
if (typeof navigator > "u")
|
|
11881
11865
|
return;
|
|
11882
|
-
const t =
|
|
11866
|
+
const t = navigator.userAgent.toLowerCase();
|
|
11883
11867
|
if (_i === void 0 || e) {
|
|
11884
11868
|
const i = Dh.find((s) => {
|
|
11885
11869
|
let {
|
|
@@ -11931,18 +11915,18 @@ function Ei(n, e) {
|
|
|
11931
11915
|
}
|
|
11932
11916
|
var Nh = "2.0.10";
|
|
11933
11917
|
const Lh = Nh, Uh = 12;
|
|
11934
|
-
class
|
|
11918
|
+
class ve {
|
|
11935
11919
|
}
|
|
11936
|
-
|
|
11920
|
+
ve.setTimeout = function() {
|
|
11937
11921
|
return setTimeout(...arguments);
|
|
11938
11922
|
};
|
|
11939
|
-
|
|
11923
|
+
ve.setInterval = function() {
|
|
11940
11924
|
return setInterval(...arguments);
|
|
11941
11925
|
};
|
|
11942
|
-
|
|
11926
|
+
ve.clearTimeout = function() {
|
|
11943
11927
|
return clearTimeout(...arguments);
|
|
11944
11928
|
};
|
|
11945
|
-
|
|
11929
|
+
ve.clearInterval = function() {
|
|
11946
11930
|
return clearInterval(...arguments);
|
|
11947
11931
|
};
|
|
11948
11932
|
class K {
|
|
@@ -11991,7 +11975,7 @@ var ts;
|
|
|
11991
11975
|
maxBitrate: 96e3
|
|
11992
11976
|
};
|
|
11993
11977
|
})(ts || (ts = {}));
|
|
11994
|
-
const
|
|
11978
|
+
const bn = {
|
|
11995
11979
|
h90: new K(160, 90, 9e4, 20),
|
|
11996
11980
|
h180: new K(320, 180, 16e4, 20),
|
|
11997
11981
|
h216: new K(384, 216, 18e4, 20),
|
|
@@ -12026,7 +12010,7 @@ function Bh(n) {
|
|
|
12026
12010
|
if (!(typeof n > "u"))
|
|
12027
12011
|
return typeof structuredClone == "function" ? structuredClone(n) : JSON.parse(JSON.stringify(n));
|
|
12028
12012
|
}
|
|
12029
|
-
const Vh = 5e3,
|
|
12013
|
+
const Vh = 5e3, Yt = [];
|
|
12030
12014
|
var Me;
|
|
12031
12015
|
(function(n) {
|
|
12032
12016
|
n[n.LOW = 0] = "LOW", n[n.MEDIUM = 1] = "MEDIUM", n[n.HIGH = 2] = "HIGH";
|
|
@@ -12060,9 +12044,9 @@ class T extends Ge.EventEmitter {
|
|
|
12060
12044
|
}
|
|
12061
12045
|
attach(e) {
|
|
12062
12046
|
let t = "audio";
|
|
12063
|
-
this.kind === T.Kind.Video && (t = "video"), this.attachedElements.length === 0 && T.Kind.Video && this.addAppVisibilityListener(), e || (t === "audio" && (
|
|
12047
|
+
this.kind === T.Kind.Video && (t = "video"), this.attachedElements.length === 0 && T.Kind.Video && this.addAppVisibilityListener(), e || (t === "audio" && (Yt.forEach((r) => {
|
|
12064
12048
|
r.parentElement === null && !e && (e = r);
|
|
12065
|
-
}), e &&
|
|
12049
|
+
}), e && Yt.splice(Yt.indexOf(e), 1)), e || (e = document.createElement(t))), this.attachedElements.includes(e) || this.attachedElements.push(e), Nt(this.mediaStreamTrack, e);
|
|
12066
12050
|
const i = e.srcObject.getTracks(), s = i.some((r) => r.kind === "audio");
|
|
12067
12051
|
return e.play().then(() => {
|
|
12068
12052
|
this.emit(s ? _.AudioPlaybackStarted : _.VideoPlaybackStarted);
|
|
@@ -12074,13 +12058,13 @@ class T extends Ge.EventEmitter {
|
|
|
12074
12058
|
detach(e) {
|
|
12075
12059
|
try {
|
|
12076
12060
|
if (e) {
|
|
12077
|
-
|
|
12061
|
+
Ft(this.mediaStreamTrack, e);
|
|
12078
12062
|
const i = this.attachedElements.indexOf(e);
|
|
12079
12063
|
return i >= 0 && (this.attachedElements.splice(i, 1), this.recycleElement(e), this.emit(_.ElementDetached, e)), e;
|
|
12080
12064
|
}
|
|
12081
12065
|
const t = [];
|
|
12082
12066
|
return this.attachedElements.forEach((i) => {
|
|
12083
|
-
|
|
12067
|
+
Ft(this.mediaStreamTrack, i), t.push(i), this.recycleElement(i), this.emit(_.ElementDetached, i);
|
|
12084
12068
|
}), this.attachedElements = [], t;
|
|
12085
12069
|
} finally {
|
|
12086
12070
|
this.attachedElements.length === 0 && this.removeAppVisibilityListener();
|
|
@@ -12106,9 +12090,9 @@ class T extends Ge.EventEmitter {
|
|
|
12106
12090
|
recycleElement(e) {
|
|
12107
12091
|
if (e instanceof HTMLAudioElement) {
|
|
12108
12092
|
let t = !0;
|
|
12109
|
-
e.pause(),
|
|
12093
|
+
e.pause(), Yt.forEach((i) => {
|
|
12110
12094
|
i.parentElement || (t = !1);
|
|
12111
|
-
}), t &&
|
|
12095
|
+
}), t && Yt.push(e);
|
|
12112
12096
|
}
|
|
12113
12097
|
}
|
|
12114
12098
|
handleAppVisibilityChanged() {
|
|
@@ -12123,18 +12107,18 @@ class T extends Ge.EventEmitter {
|
|
|
12123
12107
|
_e() && document.removeEventListener("visibilitychange", this.appVisibilityChangedListener);
|
|
12124
12108
|
}
|
|
12125
12109
|
}
|
|
12126
|
-
function
|
|
12110
|
+
function Nt(n, e) {
|
|
12127
12111
|
let t;
|
|
12128
12112
|
e.srcObject instanceof MediaStream ? t = e.srcObject : t = new MediaStream();
|
|
12129
12113
|
let i;
|
|
12130
12114
|
n.kind === "audio" ? i = t.getAudioTracks() : i = t.getVideoTracks(), i.includes(n) || (i.forEach((s) => {
|
|
12131
12115
|
t.removeTrack(s);
|
|
12132
|
-
}), t.addTrack(n)), (!kt() || !(e instanceof HTMLVideoElement)) && (e.autoplay = !0), e.muted = t.getAudioTracks().length === 0, e instanceof HTMLVideoElement && (e.playsInline = !0), e.srcObject !== t && (e.srcObject = t, (kt() ||
|
|
12116
|
+
}), t.addTrack(n)), (!kt() || !(e instanceof HTMLVideoElement)) && (e.autoplay = !0), e.muted = t.getAudioTracks().length === 0, e instanceof HTMLVideoElement && (e.playsInline = !0), e.srcObject !== t && (e.srcObject = t, (kt() || $t()) && e instanceof HTMLVideoElement && setTimeout(() => {
|
|
12133
12117
|
e.srcObject = t, e.play().catch(() => {
|
|
12134
12118
|
});
|
|
12135
12119
|
}, 0));
|
|
12136
12120
|
}
|
|
12137
|
-
function
|
|
12121
|
+
function Ft(n, e) {
|
|
12138
12122
|
if (e.srcObject instanceof MediaStream) {
|
|
12139
12123
|
const t = e.srcObject;
|
|
12140
12124
|
t.removeTrack(n), t.getTracks().length > 0 ? e.srcObject = t : e.srcObject = null;
|
|
@@ -12349,7 +12333,7 @@ function Wh(n) {
|
|
|
12349
12333
|
}
|
|
12350
12334
|
function tt(n) {
|
|
12351
12335
|
return f(this, void 0, void 0, function* () {
|
|
12352
|
-
return new Promise((e) =>
|
|
12336
|
+
return new Promise((e) => ve.setTimeout(e, n));
|
|
12353
12337
|
});
|
|
12354
12338
|
}
|
|
12355
12339
|
function ss() {
|
|
@@ -12373,7 +12357,7 @@ function Jh() {
|
|
|
12373
12357
|
return e;
|
|
12374
12358
|
}
|
|
12375
12359
|
function Kh() {
|
|
12376
|
-
if (!("getCapabilities" in RTCRtpSender) ||
|
|
12360
|
+
if (!("getCapabilities" in RTCRtpSender) || $t())
|
|
12377
12361
|
return !1;
|
|
12378
12362
|
if (kt()) {
|
|
12379
12363
|
const t = st();
|
|
@@ -12414,7 +12398,7 @@ function Yh(n) {
|
|
|
12414
12398
|
function Xh() {
|
|
12415
12399
|
return typeof RTCPeerConnection > "u" ? !1 : ss() || rs();
|
|
12416
12400
|
}
|
|
12417
|
-
function
|
|
12401
|
+
function $t() {
|
|
12418
12402
|
var n;
|
|
12419
12403
|
return ((n = st()) === null || n === void 0 ? void 0 : n.name) === "Firefox";
|
|
12420
12404
|
}
|
|
@@ -12507,17 +12491,17 @@ function _r() {
|
|
|
12507
12491
|
throw Error("Could not get empty media stream video track");
|
|
12508
12492
|
return o.enabled = t, o;
|
|
12509
12493
|
}
|
|
12510
|
-
let
|
|
12494
|
+
let Xt;
|
|
12511
12495
|
function Ri() {
|
|
12512
|
-
if (!
|
|
12496
|
+
if (!Xt) {
|
|
12513
12497
|
const n = new AudioContext(), e = n.createOscillator(), t = n.createGain();
|
|
12514
12498
|
t.gain.setValueAtTime(0, 0);
|
|
12515
12499
|
const i = n.createMediaStreamDestination();
|
|
12516
|
-
if (e.connect(t), t.connect(i), e.start(), [
|
|
12500
|
+
if (e.connect(t), t.connect(i), e.start(), [Xt] = i.stream.getAudioTracks(), !Xt)
|
|
12517
12501
|
throw Error("Could not get empty media stream audio track");
|
|
12518
|
-
|
|
12502
|
+
Xt.enabled = !1;
|
|
12519
12503
|
}
|
|
12520
|
-
return
|
|
12504
|
+
return Xt.clone();
|
|
12521
12505
|
}
|
|
12522
12506
|
class Ko {
|
|
12523
12507
|
constructor(e, t) {
|
|
@@ -12566,18 +12550,18 @@ function Er(n) {
|
|
|
12566
12550
|
return n.startsWith("ws") ? n.replace(/^(ws)/, "http") : n;
|
|
12567
12551
|
}
|
|
12568
12552
|
const wr = "default";
|
|
12569
|
-
class
|
|
12553
|
+
class ye {
|
|
12570
12554
|
static getInstance() {
|
|
12571
|
-
return this.instance === void 0 && (this.instance = new
|
|
12555
|
+
return this.instance === void 0 && (this.instance = new ye()), this.instance;
|
|
12572
12556
|
}
|
|
12573
12557
|
getDevices(e) {
|
|
12574
12558
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
12575
12559
|
var i;
|
|
12576
12560
|
return f(this, void 0, void 0, function* () {
|
|
12577
|
-
if (((i =
|
|
12561
|
+
if (((i = ye.userMediaPromiseMap) === null || i === void 0 ? void 0 : i.size) > 0) {
|
|
12578
12562
|
$.debug("awaiting getUserMedia promise");
|
|
12579
12563
|
try {
|
|
12580
|
-
e ? yield
|
|
12564
|
+
e ? yield ye.userMediaPromiseMap.get(e) : yield Promise.all(ye.userMediaPromiseMap.values());
|
|
12581
12565
|
} catch {
|
|
12582
12566
|
$.warn("error waiting for media permissons");
|
|
12583
12567
|
}
|
|
@@ -12616,13 +12600,13 @@ class be {
|
|
|
12616
12600
|
});
|
|
12617
12601
|
}
|
|
12618
12602
|
hasDeviceInUse(e) {
|
|
12619
|
-
return e ?
|
|
12603
|
+
return e ? ye.userMediaPromiseMap.has(e) : ye.userMediaPromiseMap.size > 0;
|
|
12620
12604
|
}
|
|
12621
12605
|
}
|
|
12622
|
-
|
|
12623
|
-
|
|
12606
|
+
ye.mediaDeviceKinds = ["audioinput", "audiooutput", "videoinput"];
|
|
12607
|
+
ye.userMediaPromiseMap = /* @__PURE__ */ new Map();
|
|
12624
12608
|
const rp = 1e3;
|
|
12625
|
-
class
|
|
12609
|
+
class Tn extends T {
|
|
12626
12610
|
get constraints() {
|
|
12627
12611
|
return this._constraints;
|
|
12628
12612
|
}
|
|
@@ -12674,7 +12658,7 @@ class Cn extends T {
|
|
|
12674
12658
|
if (e === this._mediaStreamTrack && !t)
|
|
12675
12659
|
return;
|
|
12676
12660
|
this._mediaStreamTrack && (this.attachedElements.forEach((s) => {
|
|
12677
|
-
|
|
12661
|
+
Ft(this._mediaStreamTrack, s);
|
|
12678
12662
|
}), this.debouncedTrackMuteHandler.cancel("new-track"), this._mediaStreamTrack.removeEventListener("ended", this.handleEnded), this._mediaStreamTrack.removeEventListener("mute", this.handleTrackMuteEvent), this._mediaStreamTrack.removeEventListener("unmute", this.handleTrackUnmuteEvent)), this.mediaStream = new MediaStream([e]), e && (e.addEventListener("ended", this.handleEnded), e.addEventListener("mute", this.handleTrackMuteEvent), e.addEventListener("unmute", this.handleTrackUnmuteEvent), this._constraints = e.getConstraints());
|
|
12679
12663
|
let i;
|
|
12680
12664
|
if (this.processor && e) {
|
|
@@ -12682,7 +12666,7 @@ class Cn extends T {
|
|
|
12682
12666
|
try {
|
|
12683
12667
|
if (this.log.debug("restarting processor", this.logContext), this.kind === "unknown")
|
|
12684
12668
|
throw TypeError("cannot set processor on track of unknown kind");
|
|
12685
|
-
this.processorElement && (
|
|
12669
|
+
this.processorElement && (Nt(e, this.processorElement), this.processorElement.muted = !0), yield this.processor.restart({
|
|
12686
12670
|
track: e,
|
|
12687
12671
|
kind: this.kind,
|
|
12688
12672
|
element: this.processorElement
|
|
@@ -12692,7 +12676,7 @@ class Cn extends T {
|
|
|
12692
12676
|
}
|
|
12693
12677
|
}
|
|
12694
12678
|
this.sender && (yield this.sender.replaceTrack(i ?? e)), !this.providedByUser && this._mediaStreamTrack !== e && this._mediaStreamTrack.stop(), this._mediaStreamTrack = e, e && (this._mediaStreamTrack.enabled = !this.isMuted, yield this.resumeUpstream(), this.attachedElements.forEach((s) => {
|
|
12695
|
-
|
|
12679
|
+
Nt(i ?? e, s);
|
|
12696
12680
|
}));
|
|
12697
12681
|
});
|
|
12698
12682
|
}
|
|
@@ -12724,7 +12708,7 @@ class Cn extends T {
|
|
|
12724
12708
|
deviceId: e,
|
|
12725
12709
|
groupId: t
|
|
12726
12710
|
} = this._mediaStreamTrack.getSettings(), i = this.kind === T.Kind.Audio ? "audioinput" : "videoinput";
|
|
12727
|
-
return
|
|
12711
|
+
return ye.getInstance().normalizeDeviceId(i, e, t);
|
|
12728
12712
|
});
|
|
12729
12713
|
}
|
|
12730
12714
|
mute() {
|
|
@@ -12757,7 +12741,7 @@ class Cn extends T {
|
|
|
12757
12741
|
video: !1
|
|
12758
12742
|
};
|
|
12759
12743
|
this.kind === T.Kind.Video ? i.video = e : i.audio = e, this.attachedElements.forEach((a) => {
|
|
12760
|
-
|
|
12744
|
+
Ft(this.mediaStreamTrack, a);
|
|
12761
12745
|
}), this._mediaStreamTrack.removeEventListener("ended", this.handleEnded), this._mediaStreamTrack.stop();
|
|
12762
12746
|
const r = (yield navigator.mediaDevices.getUserMedia(i)).getTracks()[0];
|
|
12763
12747
|
return r.addEventListener("ended", this.handleEnded), this.log.debug("re-acquired MediaStreamTrack", this.logContext), yield this.setMediaStreamTrack(r), this._constraints = e, this.emit(_.Restarted, this), this;
|
|
@@ -12865,11 +12849,11 @@ class Cn extends T {
|
|
|
12865
12849
|
};
|
|
12866
12850
|
if (yield e.init(a), this.processor && (yield this.stopProcessor()), this.kind === "unknown")
|
|
12867
12851
|
throw TypeError("cannot set processor on track of unknown kind");
|
|
12868
|
-
if (
|
|
12852
|
+
if (Nt(this._mediaStreamTrack, this.processorElement), this.processorElement.muted = !0, this.processorElement.play().catch((o) => this.log.error("failed to play processor element", Object.assign(Object.assign({}, this.logContext), {
|
|
12869
12853
|
error: o
|
|
12870
12854
|
}))), this.processor = e, this.processor.processedTrack) {
|
|
12871
12855
|
for (const o of this.attachedElements)
|
|
12872
|
-
o !== this.processorElement && t && (
|
|
12856
|
+
o !== this.processorElement && t && (Ft(this._mediaStreamTrack, o), Nt(this.processor.processedTrack, o));
|
|
12873
12857
|
yield (s = this.sender) === null || s === void 0 ? void 0 : s.replaceTrack(this.processor.processedTrack);
|
|
12874
12858
|
}
|
|
12875
12859
|
this.emit(_.TrackProcessorUpdate, this.processor);
|
|
@@ -12973,13 +12957,13 @@ class ap extends Ge.EventEmitter {
|
|
|
12973
12957
|
});
|
|
12974
12958
|
}
|
|
12975
12959
|
setupEventListeners(e, t) {
|
|
12976
|
-
e.on(
|
|
12960
|
+
e.on(E.TrackPublished, (i, s) => this.setParticipantCryptorEnabled(i.trackInfo.encryption !== Oe.NONE, s.identity)), e.on(E.ConnectionStateChanged, (i) => {
|
|
12977
12961
|
i === J.Connected && e.remoteParticipants.forEach((s) => {
|
|
12978
12962
|
s.trackPublications.forEach((r) => {
|
|
12979
12963
|
this.setParticipantCryptorEnabled(r.trackInfo.encryption !== Oe.NONE, s.identity);
|
|
12980
12964
|
});
|
|
12981
12965
|
});
|
|
12982
|
-
}).on(
|
|
12966
|
+
}).on(E.TrackUnsubscribed, (i, s, r) => {
|
|
12983
12967
|
var a;
|
|
12984
12968
|
const o = {
|
|
12985
12969
|
kind: "removeTransform",
|
|
@@ -12989,9 +12973,9 @@ class ap extends Ge.EventEmitter {
|
|
|
12989
12973
|
}
|
|
12990
12974
|
};
|
|
12991
12975
|
(a = this.worker) === null || a === void 0 || a.postMessage(o);
|
|
12992
|
-
}).on(
|
|
12976
|
+
}).on(E.TrackSubscribed, (i, s, r) => {
|
|
12993
12977
|
this.setupE2EEReceiver(i, r.identity, s.trackInfo);
|
|
12994
|
-
}).on(
|
|
12978
|
+
}).on(E.SignalConnected, () => {
|
|
12995
12979
|
if (!this.room)
|
|
12996
12980
|
throw new TypeError("expected room to be present on signal connect");
|
|
12997
12981
|
this.setParticipantCryptorEnabled(this.room.localParticipant.isE2EEEnabled, this.room.localParticipant.identity), t.getKeys().forEach((i) => {
|
|
@@ -13080,7 +13064,7 @@ class ap extends Ge.EventEmitter {
|
|
|
13080
13064
|
}
|
|
13081
13065
|
}
|
|
13082
13066
|
setupE2EESender(e, t) {
|
|
13083
|
-
if (!(e instanceof
|
|
13067
|
+
if (!(e instanceof Tn) || !t) {
|
|
13084
13068
|
t || $.warn("early return because sender is not ready");
|
|
13085
13069
|
return;
|
|
13086
13070
|
}
|
|
@@ -13173,10 +13157,10 @@ class ap extends Ge.EventEmitter {
|
|
|
13173
13157
|
}
|
|
13174
13158
|
}
|
|
13175
13159
|
}
|
|
13176
|
-
var
|
|
13160
|
+
var hn;
|
|
13177
13161
|
(function(n) {
|
|
13178
13162
|
n[n.WAITING = 0] = "WAITING", n[n.RUNNING = 1] = "RUNNING", n[n.COMPLETED = 2] = "COMPLETED";
|
|
13179
|
-
})(
|
|
13163
|
+
})(hn || (hn = {}));
|
|
13180
13164
|
class op {
|
|
13181
13165
|
constructor() {
|
|
13182
13166
|
this.pendingTasks = /* @__PURE__ */ new Map(), this.taskMutex = new xe(), this.nextTaskIndex = 0;
|
|
@@ -13186,14 +13170,14 @@ class op {
|
|
|
13186
13170
|
const t = {
|
|
13187
13171
|
id: this.nextTaskIndex++,
|
|
13188
13172
|
enqueuedAt: Date.now(),
|
|
13189
|
-
status:
|
|
13173
|
+
status: hn.WAITING
|
|
13190
13174
|
};
|
|
13191
13175
|
this.pendingTasks.set(t.id, t);
|
|
13192
13176
|
const i = yield this.taskMutex.lock();
|
|
13193
13177
|
try {
|
|
13194
|
-
return t.executedAt = Date.now(), t.status =
|
|
13178
|
+
return t.executedAt = Date.now(), t.status = hn.RUNNING, yield e();
|
|
13195
13179
|
} finally {
|
|
13196
|
-
t.status =
|
|
13180
|
+
t.status = hn.COMPLETED, this.pendingTasks.delete(t.id), i();
|
|
13197
13181
|
}
|
|
13198
13182
|
});
|
|
13199
13183
|
}
|
|
@@ -13462,7 +13446,7 @@ class xs {
|
|
|
13462
13446
|
case: "leave",
|
|
13463
13447
|
value: new hi({
|
|
13464
13448
|
canReconnect: !1,
|
|
13465
|
-
reason:
|
|
13449
|
+
reason: un.CLIENT_INITIATED
|
|
13466
13450
|
})
|
|
13467
13451
|
});
|
|
13468
13452
|
}
|
|
@@ -13544,7 +13528,7 @@ class xs {
|
|
|
13544
13528
|
this.log.warn("ping timeout duration not set", this.logContext);
|
|
13545
13529
|
return;
|
|
13546
13530
|
}
|
|
13547
|
-
this.pingTimeout =
|
|
13531
|
+
this.pingTimeout = ve.setTimeout(() => {
|
|
13548
13532
|
this.log.warn("ping timeout triggered. last pong received at: ".concat(new Date(Date.now() - this.pingTimeoutDuration * 1e3).toUTCString()), this.logContext), this.handleOnClose("ping timeout");
|
|
13549
13533
|
}, this.pingTimeoutDuration * 1e3);
|
|
13550
13534
|
}
|
|
@@ -13552,19 +13536,19 @@ class xs {
|
|
|
13552
13536
|
* Clears ping timeout (does not start a new timeout)
|
|
13553
13537
|
*/
|
|
13554
13538
|
clearPingTimeout() {
|
|
13555
|
-
this.pingTimeout &&
|
|
13539
|
+
this.pingTimeout && ve.clearTimeout(this.pingTimeout);
|
|
13556
13540
|
}
|
|
13557
13541
|
startPingInterval() {
|
|
13558
13542
|
if (this.clearPingInterval(), this.resetPingTimeout(), !this.pingIntervalDuration) {
|
|
13559
13543
|
this.log.warn("ping interval duration not set", this.logContext);
|
|
13560
13544
|
return;
|
|
13561
13545
|
}
|
|
13562
|
-
this.log.debug("start ping interval", this.logContext), this.pingInterval =
|
|
13546
|
+
this.log.debug("start ping interval", this.logContext), this.pingInterval = ve.setInterval(() => {
|
|
13563
13547
|
this.sendPing();
|
|
13564
13548
|
}, this.pingIntervalDuration * 1e3);
|
|
13565
13549
|
}
|
|
13566
13550
|
clearPingInterval() {
|
|
13567
|
-
this.log.debug("clearing ping interval", this.logContext), this.clearPingTimeout(), this.pingInterval &&
|
|
13551
|
+
this.log.debug("clearing ping interval", this.logContext), this.clearPingTimeout(), this.pingInterval && ve.clearInterval(this.pingInterval);
|
|
13568
13552
|
}
|
|
13569
13553
|
}
|
|
13570
13554
|
function Pr(n) {
|
|
@@ -14130,7 +14114,7 @@ var Ii = Xo, up = /%[sdv%]/g, hp = function(n) {
|
|
|
14130
14114
|
return "";
|
|
14131
14115
|
}
|
|
14132
14116
|
});
|
|
14133
|
-
},
|
|
14117
|
+
}, Zt = function(n, e, t) {
|
|
14134
14118
|
var i = e.format instanceof Function ? e.format(e.push ? t : t[e.name]) : e.format, s = [n + "=" + i];
|
|
14135
14119
|
if (e.names)
|
|
14136
14120
|
for (var r = 0; r < e.names.length; r += 1) {
|
|
@@ -14147,23 +14131,23 @@ var Ii = Xo, up = /%[sdv%]/g, hp = function(n) {
|
|
|
14147
14131
|
var t = e.outerOrder || pp, i = e.innerOrder || fp, s = [];
|
|
14148
14132
|
return t.forEach(function(r) {
|
|
14149
14133
|
Ii[r].forEach(function(a) {
|
|
14150
|
-
a.name in n && n[a.name] != null ? s.push(
|
|
14151
|
-
s.push(
|
|
14134
|
+
a.name in n && n[a.name] != null ? s.push(Zt(r, a, n)) : a.push in n && n[a.push] != null && n[a.push].forEach(function(o) {
|
|
14135
|
+
s.push(Zt(r, a, o));
|
|
14152
14136
|
});
|
|
14153
14137
|
});
|
|
14154
14138
|
}), n.media.forEach(function(r) {
|
|
14155
|
-
s.push(
|
|
14139
|
+
s.push(Zt("m", Ii.m[0], r)), i.forEach(function(a) {
|
|
14156
14140
|
Ii[a].forEach(function(o) {
|
|
14157
|
-
o.name in r && r[o.name] != null ? s.push(
|
|
14158
|
-
s.push(
|
|
14141
|
+
o.name in r && r[o.name] != null ? s.push(Zt(a, o, r)) : o.push in r && r[o.push] != null && r[o.push].forEach(function(c) {
|
|
14142
|
+
s.push(Zt(a, o, c));
|
|
14159
14143
|
});
|
|
14160
14144
|
});
|
|
14161
14145
|
});
|
|
14162
14146
|
}), s.join(`\r
|
|
14163
14147
|
`) + `\r
|
|
14164
14148
|
`;
|
|
14165
|
-
}, gp = Qo, vp = mp, Oi = vp,
|
|
14166
|
-
const kp = 0.7,
|
|
14149
|
+
}, gp = Qo, vp = mp, Oi = vp, rn = gp.parse;
|
|
14150
|
+
const kp = 0.7, Bt = {
|
|
14167
14151
|
NegotiationStarted: "negotiationStarted",
|
|
14168
14152
|
NegotiationComplete: "negotiationComplete",
|
|
14169
14153
|
RTPVideoPayloadTypes: "rtpVideoPayloadTypes"
|
|
@@ -14176,7 +14160,7 @@ class Ir extends Ge.EventEmitter {
|
|
|
14176
14160
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
14177
14161
|
var i;
|
|
14178
14162
|
super(), this.log = $, this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate = !1, this.trackBitrates = [], this.remoteStereoMids = [], this.remoteNackMids = [], this.negotiate = Os((s) => f(this, void 0, void 0, function* () {
|
|
14179
|
-
this.emit(
|
|
14163
|
+
this.emit(Bt.NegotiationStarted);
|
|
14180
14164
|
try {
|
|
14181
14165
|
yield this.createAndSendOffer();
|
|
14182
14166
|
} catch (r) {
|
|
@@ -14239,7 +14223,7 @@ class Ir extends Ge.EventEmitter {
|
|
|
14239
14223
|
} = bp(e);
|
|
14240
14224
|
this.remoteStereoMids = s, this.remoteNackMids = r;
|
|
14241
14225
|
} else if (e.type === "answer") {
|
|
14242
|
-
const s =
|
|
14226
|
+
const s = rn((t = e.sdp) !== null && t !== void 0 ? t : "");
|
|
14243
14227
|
s.media.forEach((r) => {
|
|
14244
14228
|
r.type === "audio" && this.trackBitrates.some((a) => {
|
|
14245
14229
|
if (!a.transceiver || r.mid != a.transceiver.mid)
|
|
@@ -14262,8 +14246,8 @@ class Ir extends Ge.EventEmitter {
|
|
|
14262
14246
|
}
|
|
14263
14247
|
yield this.setMungedSDP(e, i, !0), this.pendingCandidates.forEach((s) => {
|
|
14264
14248
|
this.pc.addIceCandidate(s);
|
|
14265
|
-
}), this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate ? (this.renegotiate = !1, yield this.createAndSendOffer()) : e.type === "answer" && (this.emit(
|
|
14266
|
-
r.type === "video" && this.emit(
|
|
14249
|
+
}), this.pendingCandidates = [], this.restartingIce = !1, this.renegotiate ? (this.renegotiate = !1, yield this.createAndSendOffer()) : e.type === "answer" && (this.emit(Bt.NegotiationComplete), e.sdp && rn(e.sdp).media.forEach((r) => {
|
|
14250
|
+
r.type === "video" && this.emit(Bt.RTPVideoPayloadTypes, r.rtp);
|
|
14267
14251
|
}));
|
|
14268
14252
|
});
|
|
14269
14253
|
}
|
|
@@ -14285,7 +14269,7 @@ class Ir extends Ge.EventEmitter {
|
|
|
14285
14269
|
return;
|
|
14286
14270
|
}
|
|
14287
14271
|
this.log.debug("starting to negotiate", this.logContext);
|
|
14288
|
-
const i = yield this.pc.createOffer(e), s =
|
|
14272
|
+
const i = yield this.pc.createOffer(e), s = rn((t = i.sdp) !== null && t !== void 0 ? t : "");
|
|
14289
14273
|
s.media.forEach((r) => {
|
|
14290
14274
|
r.type === "audio" ? Or(r, [], []) : r.type === "video" && (yp(r), this.trackBitrates.some((a) => {
|
|
14291
14275
|
if (!r.msid || !a.cid || !r.msid.includes(a.cid))
|
|
@@ -14307,7 +14291,7 @@ class Ir extends Ge.EventEmitter {
|
|
|
14307
14291
|
createAndSetAnswer() {
|
|
14308
14292
|
var e;
|
|
14309
14293
|
return f(this, void 0, void 0, function* () {
|
|
14310
|
-
const t = yield this.pc.createAnswer(), i =
|
|
14294
|
+
const t = yield this.pc.createAnswer(), i = rn((e = t.sdp) !== null && e !== void 0 ? e : "");
|
|
14311
14295
|
return i.media.forEach((s) => {
|
|
14312
14296
|
s.type === "audio" && Or(s, this.remoteStereoMids, this.remoteNackMids);
|
|
14313
14297
|
}), yield this.setMungedSDP(t, Oi(i)), t;
|
|
@@ -14449,7 +14433,7 @@ function yp(n) {
|
|
|
14449
14433
|
}
|
|
14450
14434
|
function bp(n) {
|
|
14451
14435
|
var e;
|
|
14452
|
-
const t = [], i = [], s =
|
|
14436
|
+
const t = [], i = [], s = rn((e = n.sdp) !== null && e !== void 0 ? e : "");
|
|
14453
14437
|
let r = 0;
|
|
14454
14438
|
return s.media.forEach((a) => {
|
|
14455
14439
|
var o;
|
|
@@ -14474,7 +14458,7 @@ const cs = "vp8", Tp = {
|
|
|
14474
14458
|
echoCancellation: !0,
|
|
14475
14459
|
noiseSuppression: !0
|
|
14476
14460
|
}, ec = {
|
|
14477
|
-
resolution:
|
|
14461
|
+
resolution: bn.h720.resolution
|
|
14478
14462
|
}, Cp = {
|
|
14479
14463
|
adaptiveStream: !1,
|
|
14480
14464
|
dynacast: !1,
|
|
@@ -14605,8 +14589,8 @@ class Sp {
|
|
|
14605
14589
|
}, this.peerConnectionTimeout), r = () => {
|
|
14606
14590
|
clearTimeout(s), i("negotiation aborted");
|
|
14607
14591
|
};
|
|
14608
|
-
e.signal.addEventListener("abort", r), this.publisher.once(
|
|
14609
|
-
e.signal.aborted || this.publisher.once(
|
|
14592
|
+
e.signal.addEventListener("abort", r), this.publisher.once(Bt.NegotiationStarted, () => {
|
|
14593
|
+
e.signal.aborted || this.publisher.once(Bt.NegotiationComplete, () => {
|
|
14610
14594
|
clearTimeout(s), t();
|
|
14611
14595
|
});
|
|
14612
14596
|
}), yield this.publisher.negotiate((a) => {
|
|
@@ -14640,14 +14624,14 @@ class Sp {
|
|
|
14640
14624
|
if (e.getConnectionState() !== "connected")
|
|
14641
14625
|
return new Promise((r, a) => f(this, void 0, void 0, function* () {
|
|
14642
14626
|
const o = () => {
|
|
14643
|
-
this.log.warn("abort transport connection", this.logContext),
|
|
14627
|
+
this.log.warn("abort transport connection", this.logContext), ve.clearTimeout(c), a(new te(
|
|
14644
14628
|
"room connection has been cancelled",
|
|
14645
14629
|
3
|
|
14646
14630
|
/* ConnectionErrorReason.Cancelled */
|
|
14647
14631
|
));
|
|
14648
14632
|
};
|
|
14649
14633
|
t != null && t.signal.aborted && o(), t == null || t.signal.addEventListener("abort", o);
|
|
14650
|
-
const c =
|
|
14634
|
+
const c = ve.setTimeout(() => {
|
|
14651
14635
|
t == null || t.signal.removeEventListener("abort", o), a(new te("could not establish pc connection"));
|
|
14652
14636
|
}, i);
|
|
14653
14637
|
for (; this.state !== ae.CONNECTED; )
|
|
@@ -14659,7 +14643,7 @@ class Sp {
|
|
|
14659
14643
|
));
|
|
14660
14644
|
return;
|
|
14661
14645
|
}
|
|
14662
|
-
|
|
14646
|
+
ve.clearTimeout(c), t == null || t.signal.removeEventListener("abort", o), r();
|
|
14663
14647
|
}));
|
|
14664
14648
|
});
|
|
14665
14649
|
}
|
|
@@ -14727,7 +14711,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
14727
14711
|
event: i
|
|
14728
14712
|
}));
|
|
14729
14713
|
}, this.handleBufferedAmountLow = (i) => {
|
|
14730
|
-
const r = i.currentTarget.maxRetransmits === 0 ?
|
|
14714
|
+
const r = i.currentTarget.maxRetransmits === 0 ? ke.LOSSY : ke.RELIABLE;
|
|
14731
14715
|
this.updateAndEmitDCBufferStatus(r);
|
|
14732
14716
|
}, this.handleDisconnect = (i, s) => {
|
|
14733
14717
|
if (this._isClosed)
|
|
@@ -14744,7 +14728,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
14744
14728
|
r(a);
|
|
14745
14729
|
return;
|
|
14746
14730
|
}
|
|
14747
|
-
i === Ar && (o = 0), this.log.debug("reconnecting in ".concat(o, "ms"), this.logContext), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout =
|
|
14731
|
+
i === Ar && (o = 0), this.log.debug("reconnecting in ".concat(o, "ms"), this.logContext), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = ve.setTimeout(() => this.attemptReconnect(s).finally(() => this.reconnectTimeout = void 0), o);
|
|
14748
14732
|
}, this.waitForRestarted = () => new Promise((i, s) => {
|
|
14749
14733
|
this.pcState === Ae.Connected && i();
|
|
14750
14734
|
const r = () => {
|
|
@@ -14761,11 +14745,11 @@ class Ep extends Ge.EventEmitter {
|
|
|
14761
14745
|
if (s)
|
|
14762
14746
|
return s.bufferedAmount <= s.bufferedAmountLowThreshold;
|
|
14763
14747
|
}, this.handleBrowserOnLine = () => {
|
|
14764
|
-
this.client.currentState === ie.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(
|
|
14748
|
+
this.client.currentState === ie.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(Mt.RR_SIGNAL_DISCONNECTED));
|
|
14765
14749
|
}, this.log = it((t = e.loggerName) !== null && t !== void 0 ? t : Fe.Engine), this.loggerOptions = {
|
|
14766
14750
|
loggerName: e.loggerName,
|
|
14767
14751
|
loggerContextCb: () => this.logContext
|
|
14768
|
-
}, this.client = new xs(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new xe(), this.dataProcessLock = new xe(), this.dcBufferStatus = /* @__PURE__ */ new Map([[
|
|
14752
|
+
}, this.client = new xs(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new xe(), this.dataProcessLock = new xe(), this.dcBufferStatus = /* @__PURE__ */ new Map([[ke.LOSSY, !0], [ke.RELIABLE, !0]]), this.client.onParticipantUpdate = (i) => this.emit(I.ParticipantUpdate, i), this.client.onConnectionQuality = (i) => this.emit(I.ConnectionQualityUpdate, i), this.client.onRoomUpdate = (i) => this.emit(I.RoomUpdate, i), this.client.onSubscriptionError = (i) => this.emit(I.SubscriptionError, i), this.client.onSubscriptionPermissionUpdate = (i) => this.emit(I.SubscriptionPermissionUpdate, i), this.client.onSpeakersChanged = (i) => this.emit(I.SpeakersChanged, i), this.client.onStreamStateUpdate = (i) => this.emit(I.StreamStateChanged, i);
|
|
14769
14753
|
}
|
|
14770
14754
|
/** @internal */
|
|
14771
14755
|
get logContext() {
|
|
@@ -14892,7 +14876,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
14892
14876
|
const d = this.pcState === Ae.New;
|
|
14893
14877
|
this.pcState = Ae.Connected, d && this.emit(I.Connected, e);
|
|
14894
14878
|
} else
|
|
14895
|
-
s === ae.FAILED && this.pcState === Ae.Connected && (this.pcState = Ae.Disconnected, this.handleDisconnect("peerconnection failed", a === "failed" ?
|
|
14879
|
+
s === ae.FAILED && this.pcState === Ae.Connected && (this.pcState = Ae.Disconnected, this.handleDisconnect("peerconnection failed", a === "failed" ? Mt.RR_SUBSCRIBER_FAILED : Mt.RR_PUBLISHER_FAILED));
|
|
14896
14880
|
const o = this.client.isDisconnected || this.client.currentState === ie.RECONNECTING, c = [ae.FAILED, ae.CLOSING, ae.CLOSED].includes(s);
|
|
14897
14881
|
o && c && !this._isClosed && this.emit(I.Offline);
|
|
14898
14882
|
}), this.pcManager.onTrack = (s) => {
|
|
@@ -14939,7 +14923,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
14939
14923
|
}, this.client.onSubscribedQualityUpdate = (e) => {
|
|
14940
14924
|
this.emit(I.SubscribedQualityUpdate, e);
|
|
14941
14925
|
}, this.client.onClose = () => {
|
|
14942
|
-
this.handleDisconnect("signal",
|
|
14926
|
+
this.handleDisconnect("signal", Mt.RR_SIGNAL_DISCONNECTED);
|
|
14943
14927
|
}, this.client.onLeave = (e) => {
|
|
14944
14928
|
e != null && e.canReconnect ? (this.fullReconnectOnNext = !0, this.handleDisconnect(Ar)) : (this.emit(I.Disconnected, e == null ? void 0 : e.reason), this.close()), this.log.debug("client leave request", Object.assign(Object.assign({}, this.logContext), {
|
|
14945
14929
|
reason: e == null ? void 0 : e.reason
|
|
@@ -14958,7 +14942,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
14958
14942
|
r.username && (a.username = r.username), r.credential && (a.credential = r.credential), s.push(a);
|
|
14959
14943
|
}), i.iceServers = s;
|
|
14960
14944
|
}
|
|
14961
|
-
return e.clientConfiguration && e.clientConfiguration.forceRelay ===
|
|
14945
|
+
return e.clientConfiguration && e.clientConfiguration.forceRelay === yn.ENABLED && (i.iceTransportPolicy = "relay"), i.sdpSemantics = "unified-plan", i.continualGatheringPolicy = "gather_continually", i;
|
|
14962
14946
|
}
|
|
14963
14947
|
createDataChannels() {
|
|
14964
14948
|
this.pcManager && (this.lossyDC && (this.lossyDC.onmessage = null, this.lossyDC.onerror = null), this.reliableDC && (this.reliableDC.onmessage = null, this.reliableDC.onerror = null), this.lossyDC = this.pcManager.createPublisherDataChannel(Mr, {
|
|
@@ -15057,7 +15041,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
15057
15041
|
$.warn("already attempting reconnect, returning early", this.logContext);
|
|
15058
15042
|
return;
|
|
15059
15043
|
}
|
|
15060
|
-
(((t = this.clientConfiguration) === null || t === void 0 ? void 0 : t.resumeConnection) ===
|
|
15044
|
+
(((t = this.clientConfiguration) === null || t === void 0 ? void 0 : t.resumeConnection) === yn.DISABLED || // signaling state could change to closed due to hardware sleep
|
|
15061
15045
|
// those connections cannot be resumed
|
|
15062
15046
|
((s = (i = this.pcManager) === null || i === void 0 ? void 0 : i.currentState) !== null && s !== void 0 ? s : ae.NEW) === ae.NEW) && (this.fullReconnectOnNext = !0);
|
|
15063
15047
|
try {
|
|
@@ -15067,7 +15051,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
15067
15051
|
let a = !0;
|
|
15068
15052
|
r instanceof ue ? (this.log.debug("received unrecoverable error", Object.assign(Object.assign({}, this.logContext), {
|
|
15069
15053
|
error: r
|
|
15070
|
-
})), a = !1) : r instanceof
|
|
15054
|
+
})), a = !1) : r instanceof xt || (this.fullReconnectOnNext = !0), a ? this.handleDisconnect("reconnect", Mt.RR_UNKNOWN) : (this.log.info("could not recover connection after ".concat(this.reconnectAttempts, " attempts, ").concat(Date.now() - this.reconnectStart, "ms. giving up"), this.logContext), this.emit(I.Disconnected), yield this.close());
|
|
15071
15055
|
} finally {
|
|
15072
15056
|
this.attemptingReconnect = !1;
|
|
15073
15057
|
}
|
|
@@ -15094,15 +15078,15 @@ class Ep extends Ge.EventEmitter {
|
|
|
15094
15078
|
let r;
|
|
15095
15079
|
try {
|
|
15096
15080
|
if (!this.signalOpts)
|
|
15097
|
-
throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new
|
|
15081
|
+
throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new xt();
|
|
15098
15082
|
r = yield this.join(e ?? this.url, this.token, this.signalOpts);
|
|
15099
15083
|
} catch (a) {
|
|
15100
|
-
throw a instanceof te && a.reason === 0 ? new ue("could not reconnect, token might be expired") : new
|
|
15084
|
+
throw a instanceof te && a.reason === 0 ? new ue("could not reconnect, token might be expired") : new xt();
|
|
15101
15085
|
}
|
|
15102
15086
|
if (this.shouldFailNext)
|
|
15103
15087
|
throw this.shouldFailNext = !1, new Error("simulated failure");
|
|
15104
15088
|
if (this.client.setReconnected(), this.emit(I.SignalRestarted, r), yield this.waitForPCReconnected(), this.client.currentState !== ie.CONNECTED)
|
|
15105
|
-
throw new
|
|
15089
|
+
throw new xt("Signal connection got severed during reconnect");
|
|
15106
15090
|
(t = this.regionUrlProvider) === null || t === void 0 || t.resetAttempts(), this.emit(I.Restarted);
|
|
15107
15091
|
} catch (r) {
|
|
15108
15092
|
const a = yield (i = this.regionUrlProvider) === null || i === void 0 ? void 0 : i.getNextBestRegionUrl();
|
|
@@ -15129,7 +15113,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
15129
15113
|
let r = "";
|
|
15130
15114
|
throw s instanceof Error && (r = s.message, this.log.error(s.message, Object.assign(Object.assign({}, this.logContext), {
|
|
15131
15115
|
error: s
|
|
15132
|
-
}))), s instanceof te && s.reason === 0 ? new ue("could not reconnect, token might be expired") : s instanceof te && s.reason === 4 ? s : new
|
|
15116
|
+
}))), s instanceof te && s.reason === 0 ? new ue("could not reconnect, token might be expired") : s instanceof te && s.reason === 4 ? s : new xt(r);
|
|
15133
15117
|
}
|
|
15134
15118
|
if (this.emit(I.SignalResumed), i) {
|
|
15135
15119
|
const s = this.makeRTCConfiguration(i);
|
|
@@ -15139,7 +15123,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
15139
15123
|
if (this.shouldFailNext)
|
|
15140
15124
|
throw this.shouldFailNext = !1, new Error("simulated failure");
|
|
15141
15125
|
if (yield this.pcManager.triggerIceRestart(), yield this.waitForPCReconnected(), this.client.currentState !== ie.CONNECTED)
|
|
15142
|
-
throw new
|
|
15126
|
+
throw new xt("Signal connection got severed during reconnect");
|
|
15143
15127
|
this.client.setReconnected(), ((t = this.reliableDC) === null || t === void 0 ? void 0 : t.readyState) === "open" && this.reliableDC.id === null && this.createDataChannels(), this.emit(I.Resumed);
|
|
15144
15128
|
});
|
|
15145
15129
|
}
|
|
@@ -15217,7 +15201,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
15217
15201
|
const i = new AbortController(), s = () => {
|
|
15218
15202
|
i.abort(), this.log.debug("engine disconnected while negotiation was ongoing", this.logContext), e();
|
|
15219
15203
|
};
|
|
15220
|
-
this.isClosed && t("cannot negotiate on closed engine"), this.on(I.Closing, s), this.pcManager.publisher.once(
|
|
15204
|
+
this.isClosed && t("cannot negotiate on closed engine"), this.on(I.Closing, s), this.pcManager.publisher.once(Bt.RTPVideoPayloadTypes, (r) => {
|
|
15221
15205
|
const a = /* @__PURE__ */ new Map();
|
|
15222
15206
|
r.forEach((o) => {
|
|
15223
15207
|
const c = o.codec.toLowerCase();
|
|
@@ -15227,7 +15211,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
15227
15211
|
try {
|
|
15228
15212
|
yield this.pcManager.negotiate(i), e();
|
|
15229
15213
|
} catch (r) {
|
|
15230
|
-
r instanceof es && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation",
|
|
15214
|
+
r instanceof es && (this.fullReconnectOnNext = !0), this.handleDisconnect("negotiation", Mt.RR_UNKNOWN), t(r);
|
|
15231
15215
|
} finally {
|
|
15232
15216
|
this.off(I.Closing, s);
|
|
15233
15217
|
}
|
|
@@ -15236,14 +15220,14 @@ class Ep extends Ge.EventEmitter {
|
|
|
15236
15220
|
}
|
|
15237
15221
|
dataChannelForKind(e, t) {
|
|
15238
15222
|
if (t) {
|
|
15239
|
-
if (e ===
|
|
15223
|
+
if (e === ke.LOSSY)
|
|
15240
15224
|
return this.lossyDCSub;
|
|
15241
|
-
if (e ===
|
|
15225
|
+
if (e === ke.RELIABLE)
|
|
15242
15226
|
return this.reliableDCSub;
|
|
15243
15227
|
} else {
|
|
15244
|
-
if (e ===
|
|
15228
|
+
if (e === ke.LOSSY)
|
|
15245
15229
|
return this.lossyDC;
|
|
15246
|
-
if (e ===
|
|
15230
|
+
if (e === ke.RELIABLE)
|
|
15247
15231
|
return this.reliableDC;
|
|
15248
15232
|
}
|
|
15249
15233
|
}
|
|
@@ -15288,10 +15272,10 @@ class Ep extends Ge.EventEmitter {
|
|
|
15288
15272
|
target: s
|
|
15289
15273
|
}));
|
|
15290
15274
|
};
|
|
15291
|
-
return t(this.dataChannelForKind(
|
|
15275
|
+
return t(this.dataChannelForKind(ke.LOSSY), Ue.PUBLISHER), t(this.dataChannelForKind(ke.RELIABLE), Ue.PUBLISHER), t(this.dataChannelForKind(ke.LOSSY, !0), Ue.SUBSCRIBER), t(this.dataChannelForKind(ke.RELIABLE, !0), Ue.SUBSCRIBER), e;
|
|
15292
15276
|
}
|
|
15293
15277
|
clearReconnectTimeout() {
|
|
15294
|
-
this.reconnectTimeout &&
|
|
15278
|
+
this.reconnectTimeout && ve.clearTimeout(this.reconnectTimeout);
|
|
15295
15279
|
}
|
|
15296
15280
|
clearPendingReconnect() {
|
|
15297
15281
|
this.clearReconnectTimeout(), this.reconnectAttempts = 0;
|
|
@@ -15303,7 +15287,7 @@ class Ep extends Ge.EventEmitter {
|
|
|
15303
15287
|
_e() && window.removeEventListener("online", this.handleBrowserOnLine);
|
|
15304
15288
|
}
|
|
15305
15289
|
}
|
|
15306
|
-
class
|
|
15290
|
+
class xt extends Error {
|
|
15307
15291
|
}
|
|
15308
15292
|
class Dr {
|
|
15309
15293
|
constructor(e, t) {
|
|
@@ -15361,7 +15345,7 @@ function vi(n, e) {
|
|
|
15361
15345
|
let t, i;
|
|
15362
15346
|
return "bytesReceived" in n ? (t = n.bytesReceived, i = e.bytesReceived) : "bytesSent" in n && (t = n.bytesSent, i = e.bytesSent), t === void 0 || i === void 0 || n.timestamp === void 0 || e.timestamp === void 0 ? 0 : (t - i) * 8 * 1e3 / (n.timestamp - e.timestamp);
|
|
15363
15347
|
}
|
|
15364
|
-
class Pe extends
|
|
15348
|
+
class Pe extends Tn {
|
|
15365
15349
|
/**
|
|
15366
15350
|
*
|
|
15367
15351
|
* @param mediaTrack
|
|
@@ -15518,7 +15502,7 @@ function tc(n, e, t) {
|
|
|
15518
15502
|
throw new qe("unsupported track type: ".concat(n.kind));
|
|
15519
15503
|
}
|
|
15520
15504
|
}
|
|
15521
|
-
const Pp = Object.values(
|
|
15505
|
+
const Pp = Object.values(bn), Rp = Object.values(ns), Ip = Object.values(Ms), Op = [bn.h180, bn.h360], Mp = [ns.h180, ns.h360], xp = (n) => [{
|
|
15522
15506
|
scaleResolutionDownBy: 2,
|
|
15523
15507
|
fps: n.encoding.maxFramerate
|
|
15524
15508
|
}].map((t) => {
|
|
@@ -15633,7 +15617,7 @@ function Mi(n, e, t) {
|
|
|
15633
15617
|
maxBitrate: s.encoding.maxBitrate
|
|
15634
15618
|
};
|
|
15635
15619
|
s.encoding.maxFramerate && (c.maxFramerate = s.encoding.maxFramerate);
|
|
15636
|
-
const d =
|
|
15620
|
+
const d = $t() || r === 0;
|
|
15637
15621
|
s.encoding.priority && d && (c.priority = s.encoding.priority, c.networkPriority = s.encoding.priority), i.push(c);
|
|
15638
15622
|
}), yt() && Jo() === "ios") {
|
|
15639
15623
|
let s;
|
|
@@ -15678,7 +15662,7 @@ class nc {
|
|
|
15678
15662
|
}
|
|
15679
15663
|
}
|
|
15680
15664
|
const Lp = 5e3;
|
|
15681
|
-
class Ie extends
|
|
15665
|
+
class Ie extends Tn {
|
|
15682
15666
|
/**
|
|
15683
15667
|
*
|
|
15684
15668
|
* @param mediaTrack
|
|
@@ -15741,7 +15725,7 @@ class Ie extends Cn {
|
|
|
15741
15725
|
return f(this, void 0, void 0, function* () {
|
|
15742
15726
|
yield e.pauseUpstream.call(this);
|
|
15743
15727
|
try {
|
|
15744
|
-
for (var o = !0, c =
|
|
15728
|
+
for (var o = !0, c = Dt(this.simulcastCodecs.values()), d; d = yield c.next(), t = d.done, !t; o = !0)
|
|
15745
15729
|
r = d.value, o = !1, yield (a = r.sender) === null || a === void 0 ? void 0 : a.replaceTrack(null);
|
|
15746
15730
|
} catch (l) {
|
|
15747
15731
|
i = {
|
|
@@ -15767,7 +15751,7 @@ class Ie extends Cn {
|
|
|
15767
15751
|
return f(this, void 0, void 0, function* () {
|
|
15768
15752
|
yield e.resumeUpstream.call(this);
|
|
15769
15753
|
try {
|
|
15770
|
-
for (var o = !0, c =
|
|
15754
|
+
for (var o = !0, c = Dt(this.simulcastCodecs.values()), d; d = yield c.next(), t = d.done, !t; o = !0) {
|
|
15771
15755
|
r = d.value, o = !1;
|
|
15772
15756
|
const l = r;
|
|
15773
15757
|
yield (a = l.sender) === null || a === void 0 ? void 0 : a.replaceTrack(l.mediaStreamTrack);
|
|
@@ -15884,7 +15868,7 @@ class Ie extends Cn {
|
|
|
15884
15868
|
}
|
|
15885
15869
|
yield this.restart(a);
|
|
15886
15870
|
try {
|
|
15887
|
-
for (var o = !0, c =
|
|
15871
|
+
for (var o = !0, c = Dt(this.simulcastCodecs.values()), d; d = yield c.next(), t = d.done, !t; o = !0) {
|
|
15888
15872
|
r = d.value, o = !1;
|
|
15889
15873
|
const l = r;
|
|
15890
15874
|
l.sender && (l.mediaStreamTrack = this.mediaStreamTrack.clone(), yield l.sender.replaceTrack(l.mediaStreamTrack));
|
|
@@ -15914,7 +15898,7 @@ class Ie extends Cn {
|
|
|
15914
15898
|
return f(this, void 0, void 0, function* () {
|
|
15915
15899
|
if (yield i.setProcessor.call(this, e, t), !((c = this.processor) === null || c === void 0) && c.processedTrack)
|
|
15916
15900
|
try {
|
|
15917
|
-
for (var l = !0, u =
|
|
15901
|
+
for (var l = !0, u = Dt(this.simulcastCodecs.values()), p; p = yield u.next(), s = p.done, !s; l = !0)
|
|
15918
15902
|
o = p.value, l = !1, yield (d = o.sender) === null || d === void 0 ? void 0 : d.replaceTrack(this.processor.processedTrack);
|
|
15919
15903
|
} catch (m) {
|
|
15920
15904
|
r = {
|
|
@@ -15965,7 +15949,7 @@ class Ie extends Cn {
|
|
|
15965
15949
|
this.subscribedCodecs = e;
|
|
15966
15950
|
const d = [];
|
|
15967
15951
|
try {
|
|
15968
|
-
for (t = !0, i =
|
|
15952
|
+
for (t = !0, i = Dt(e); s = yield i.next(), r = s.done, !r; t = !0) {
|
|
15969
15953
|
c = s.value, t = !1;
|
|
15970
15954
|
const l = c;
|
|
15971
15955
|
if (!this.codec || this.codec === l.codec)
|
|
@@ -16048,7 +16032,7 @@ function Ur(n, e, t, i, s, r) {
|
|
|
16048
16032
|
let k = (m = u.rid) !== null && m !== void 0 ? m : "";
|
|
16049
16033
|
k === "" && (k = "q");
|
|
16050
16034
|
const v = ic(k), S = t.find((O) => O.quality === v);
|
|
16051
|
-
S && u.active !== S.enabled && (d = !0, u.active = S.enabled, s.debug("setting layer ".concat(S.quality, " to ").concat(u.active ? "enabled" : "disabled"), r),
|
|
16035
|
+
S && u.active !== S.enabled && (d = !0, u.active = S.enabled, s.debug("setting layer ".concat(S.quality, " to ").concat(u.active ? "enabled" : "disabled"), r), $t() && (S.enabled ? (u.scaleResolutionDownBy = e[p].scaleResolutionDownBy, u.maxBitrate = e[p].maxBitrate, u.maxFrameRate = e[p].maxFrameRate) : (u.scaleResolutionDownBy = 4, u.maxBitrate = 10, u.maxFrameRate = 2)));
|
|
16052
16036
|
}), d && (o.encodings = c, s.debug("setting encodings", Object.assign(Object.assign({}, r), {
|
|
16053
16037
|
encodings: o.encodings
|
|
16054
16038
|
})), yield n.setParameters(o));
|
|
@@ -16142,7 +16126,7 @@ class sc extends T {
|
|
|
16142
16126
|
this.monitorInterval || (this.monitorInterval = setInterval(() => this.monitorReceiver(), Ds));
|
|
16143
16127
|
}
|
|
16144
16128
|
}
|
|
16145
|
-
class
|
|
16129
|
+
class pn extends sc {
|
|
16146
16130
|
constructor(e, t, i, s, r, a) {
|
|
16147
16131
|
super(e, t, T.Kind.Audio, i, a), this.monitorReceiver = () => f(this, void 0, void 0, function* () {
|
|
16148
16132
|
if (!this.receiver) {
|
|
@@ -16249,7 +16233,7 @@ class fn extends sc {
|
|
|
16249
16233
|
}
|
|
16250
16234
|
}
|
|
16251
16235
|
const xi = 100;
|
|
16252
|
-
class
|
|
16236
|
+
class fn extends sc {
|
|
16253
16237
|
constructor(e, t, i, s, r) {
|
|
16254
16238
|
super(e, t, T.Kind.Video, i, r), this.elementInfos = [], this.monitorReceiver = () => f(this, void 0, void 0, function* () {
|
|
16255
16239
|
if (!this.receiver) {
|
|
@@ -16274,7 +16258,7 @@ class mn extends sc {
|
|
|
16274
16258
|
/** @internal */
|
|
16275
16259
|
setMuted(e) {
|
|
16276
16260
|
super.setMuted(e), this.attachedElements.forEach((t) => {
|
|
16277
|
-
e ?
|
|
16261
|
+
e ? Ft(this._mediaStreamTrack, t) : Nt(this._mediaStreamTrack, t);
|
|
16278
16262
|
});
|
|
16279
16263
|
}
|
|
16280
16264
|
attach(e) {
|
|
@@ -16372,7 +16356,7 @@ class mn extends sc {
|
|
|
16372
16356
|
const i = 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;
|
|
16373
16357
|
if (this.lastVisible !== a) {
|
|
16374
16358
|
if (!a && Date.now() - i < xi) {
|
|
16375
|
-
|
|
16359
|
+
ve.setTimeout(() => {
|
|
16376
16360
|
this.updateVisibility();
|
|
16377
16361
|
}, xi);
|
|
16378
16362
|
return;
|
|
@@ -16484,14 +16468,14 @@ class Ye extends Ge.EventEmitter {
|
|
|
16484
16468
|
* an [AudioTrack] if this publication holds an audio track
|
|
16485
16469
|
*/
|
|
16486
16470
|
get audioTrack() {
|
|
16487
|
-
if (this.track instanceof Pe || this.track instanceof
|
|
16471
|
+
if (this.track instanceof Pe || this.track instanceof pn)
|
|
16488
16472
|
return this.track;
|
|
16489
16473
|
}
|
|
16490
16474
|
/**
|
|
16491
16475
|
* an [VideoTrack] if this publication holds a video track
|
|
16492
16476
|
*/
|
|
16493
16477
|
get videoTrack() {
|
|
16494
|
-
if (this.track instanceof Ie || this.track instanceof
|
|
16478
|
+
if (this.track instanceof Ie || this.track instanceof fn)
|
|
16495
16479
|
return this.track;
|
|
16496
16480
|
}
|
|
16497
16481
|
/** @internal */
|
|
@@ -16579,13 +16563,13 @@ var dt;
|
|
|
16579
16563
|
})(dt || (dt = {}));
|
|
16580
16564
|
function jp(n) {
|
|
16581
16565
|
switch (n) {
|
|
16582
|
-
case
|
|
16566
|
+
case sn.EXCELLENT:
|
|
16583
16567
|
return dt.Excellent;
|
|
16584
|
-
case
|
|
16568
|
+
case sn.GOOD:
|
|
16585
16569
|
return dt.Good;
|
|
16586
|
-
case
|
|
16570
|
+
case sn.POOR:
|
|
16587
16571
|
return dt.Poor;
|
|
16588
|
-
case
|
|
16572
|
+
case sn.LOST:
|
|
16589
16573
|
return dt.Lost;
|
|
16590
16574
|
default:
|
|
16591
16575
|
return dt.Unknown;
|
|
@@ -16690,7 +16674,7 @@ class rc extends Ge.EventEmitter {
|
|
|
16690
16674
|
* @internal
|
|
16691
16675
|
*/
|
|
16692
16676
|
setAudioContext(e) {
|
|
16693
|
-
this.audioContext = e, this.audioTrackPublications.forEach((t) => (t.track instanceof
|
|
16677
|
+
this.audioContext = e, this.audioTrackPublications.forEach((t) => (t.track instanceof pn || t.track instanceof Pe) && t.track.setAudioContext(e));
|
|
16694
16678
|
}
|
|
16695
16679
|
addTrackPublication(e) {
|
|
16696
16680
|
e.on(_.Muted, () => {
|
|
@@ -16767,7 +16751,7 @@ class Br extends rc {
|
|
|
16767
16751
|
return;
|
|
16768
16752
|
const S = yield p.videoTrack.setPublishingCodecs(r.subscribedCodecs);
|
|
16769
16753
|
try {
|
|
16770
|
-
for (var m = !0, k =
|
|
16754
|
+
for (var m = !0, k = Dt(S), v; v = yield k.next(), a = v.done, !a; m = !0) {
|
|
16771
16755
|
d = v.value, m = !1;
|
|
16772
16756
|
const O = d;
|
|
16773
16757
|
Fh(O) && (this.log.debug("publish ".concat(O, " for ").concat(p.videoTrack.sid), Object.assign(Object.assign({}, this.logContext), Z(p))), yield this.publishAdditionalCodecForTrack(p.videoTrack, O, p.options));
|
|
@@ -17054,7 +17038,7 @@ class Br extends rc {
|
|
|
17054
17038
|
publishTrack(e, t) {
|
|
17055
17039
|
var i, s, r, a;
|
|
17056
17040
|
return f(this, void 0, void 0, function* () {
|
|
17057
|
-
e instanceof Pe && e.setAudioContext(this.audioContext), yield (i = this.reconnectFuture) === null || i === void 0 ? void 0 : i.promise, e instanceof
|
|
17041
|
+
e instanceof Pe && e.setAudioContext(this.audioContext), yield (i = this.reconnectFuture) === null || i === void 0 ? void 0 : i.promise, e instanceof Tn && this.pendingPublishPromises.has(e) && (yield this.pendingPublishPromises.get(e));
|
|
17058
17042
|
let o;
|
|
17059
17043
|
if (e instanceof MediaStreamTrack)
|
|
17060
17044
|
o = e.getConstraints();
|
|
@@ -17118,10 +17102,10 @@ class Br extends rc {
|
|
|
17118
17102
|
publish(e, t, i) {
|
|
17119
17103
|
var s, r, a, o, c, d, l, u, p, m, k, v;
|
|
17120
17104
|
return f(this, void 0, void 0, function* () {
|
|
17121
|
-
Array.from(this.trackPublications.values()).find((N) => e instanceof
|
|
17105
|
+
Array.from(this.trackPublications.values()).find((N) => e instanceof Tn && N.source === e.source) && e.source !== T.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(e.source), Object.assign(Object.assign({}, this.logContext), Z(e))), t.stopMicTrackOnMute && e instanceof Pe && (e.stopOnMute = !0), e.source === T.Source.ScreenShare && $t() && (t.simulcast = !1), t.videoCodec === "av1" && !Jh() && (t.videoCodec = void 0), t.videoCodec === "vp9" && !Kh() && (t.videoCodec = void 0), t.videoCodec === void 0 && (t.videoCodec = cs);
|
|
17122
17106
|
const O = t.videoCodec;
|
|
17123
17107
|
e.on(_.Muted, this.onTrackMuted), e.on(_.Unmuted, this.onTrackUnmuted), e.on(_.Ended, this.handleTrackEnded), e.on(_.UpstreamPaused, this.onTrackUpstreamPaused), e.on(_.UpstreamResumed, this.onTrackUpstreamResumed);
|
|
17124
|
-
const
|
|
17108
|
+
const w = new Gi({
|
|
17125
17109
|
// get local track id for use during publishing
|
|
17126
17110
|
cid: e.mediaStreamTrack.id,
|
|
17127
17111
|
name: t.name,
|
|
@@ -17143,7 +17127,7 @@ class Br extends rc {
|
|
|
17143
17127
|
try {
|
|
17144
17128
|
N = yield e.waitForDimensions();
|
|
17145
17129
|
} catch {
|
|
17146
|
-
const A = (o = (a = this.roomOptions.videoCaptureDefaults) === null || a === void 0 ? void 0 : a.resolution) !== null && o !== void 0 ? o :
|
|
17130
|
+
const A = (o = (a = this.roomOptions.videoCaptureDefaults) === null || a === void 0 ? void 0 : a.resolution) !== null && o !== void 0 ? o : bn.h720.resolution;
|
|
17147
17131
|
N = {
|
|
17148
17132
|
width: A.width,
|
|
17149
17133
|
height: A.height
|
|
@@ -17151,16 +17135,16 @@ class Br extends rc {
|
|
|
17151
17135
|
dims: N
|
|
17152
17136
|
}));
|
|
17153
17137
|
}
|
|
17154
|
-
|
|
17138
|
+
w.width = N.width, w.height = N.height, e instanceof Ie && (ni(O) && (e.source === T.Source.ScreenShare && (t.scalabilityMode = "L1T3", "contentHint" in e.mediaStreamTrack && (e.mediaStreamTrack.contentHint = "motion", this.log.info("forcing contentHint to motion for screenshare with SVC codecs", Object.assign(Object.assign({}, this.logContext), Z(e))))), t.scalabilityMode = (c = t.scalabilityMode) !== null && c !== void 0 ? c : "L3T3_KEY"), w.simulcastCodecs = [new qi({
|
|
17155
17139
|
codec: O,
|
|
17156
17140
|
cid: e.mediaStreamTrack.id
|
|
17157
17141
|
})], t.backupCodec === !0 && (t.backupCodec = {
|
|
17158
17142
|
codec: cs
|
|
17159
17143
|
}), t.backupCodec && O !== t.backupCodec.codec && // TODO remove this once e2ee is supported for backup codecs
|
|
17160
|
-
|
|
17144
|
+
w.encryption === Oe.NONE && (this.roomOptions.dynacast || (this.roomOptions.dynacast = !0), w.simulcastCodecs.push(new qi({
|
|
17161
17145
|
codec: t.backupCodec.codec,
|
|
17162
17146
|
cid: ""
|
|
17163
|
-
})))), F = ls(e.source === T.Source.ScreenShare,
|
|
17147
|
+
})))), F = ls(e.source === T.Source.ScreenShare, w.width, w.height, t), w.layers = jr(w.width, w.height, F, ni(t.videoCodec));
|
|
17164
17148
|
} else
|
|
17165
17149
|
e.kind === T.Kind.Audio && (F = [{
|
|
17166
17150
|
maxBitrate: (d = t.audioPreset) === null || d === void 0 ? void 0 : d.maxBitrate,
|
|
@@ -17169,7 +17153,7 @@ class Br extends rc {
|
|
|
17169
17153
|
}]);
|
|
17170
17154
|
if (!this.engine || this.engine.isClosed)
|
|
17171
17155
|
throw new ue("cannot publish track when not connected");
|
|
17172
|
-
const W = yield this.engine.addTrack(
|
|
17156
|
+
const W = yield this.engine.addTrack(w);
|
|
17173
17157
|
let he;
|
|
17174
17158
|
if (W.codecs.forEach((N) => {
|
|
17175
17159
|
he === void 0 && (he = N.mimeType);
|
|
@@ -17177,19 +17161,19 @@ class Br extends rc {
|
|
|
17177
17161
|
const N = Go(he);
|
|
17178
17162
|
N !== O && (this.log.debug("falling back to server selected codec", Object.assign(Object.assign(Object.assign({}, this.logContext), Z(e)), {
|
|
17179
17163
|
codec: N
|
|
17180
|
-
})), t.videoCodec = N, F = ls(e.source === T.Source.ScreenShare,
|
|
17164
|
+
})), t.videoCodec = N, F = ls(e.source === T.Source.ScreenShare, w.width, w.height, t));
|
|
17181
17165
|
}
|
|
17182
|
-
const
|
|
17166
|
+
const de = new si(e.kind, W, e, {
|
|
17183
17167
|
loggerName: this.roomOptions.loggerName,
|
|
17184
17168
|
loggerContextCb: () => this.logContext
|
|
17185
17169
|
});
|
|
17186
|
-
if (
|
|
17170
|
+
if (de.options = t, e.sid = W.sid, !this.engine.pcManager)
|
|
17187
17171
|
throw new ue("pcManager is not ready");
|
|
17188
17172
|
if (this.log.debug("publishing ".concat(e.kind, " with encodings"), Object.assign(Object.assign({}, this.logContext), {
|
|
17189
17173
|
encodings: F,
|
|
17190
17174
|
trackInfo: W
|
|
17191
17175
|
})), e.sender = yield this.engine.createSender(e, t, F), F)
|
|
17192
|
-
if (
|
|
17176
|
+
if ($t() && e.kind === T.Kind.Audio) {
|
|
17193
17177
|
let N;
|
|
17194
17178
|
for (const X of this.engine.pcManager.publisher.getTransceivers())
|
|
17195
17179
|
if (X.sender === e.sender) {
|
|
@@ -17203,7 +17187,7 @@ class Br extends rc {
|
|
|
17203
17187
|
});
|
|
17204
17188
|
} else
|
|
17205
17189
|
e.codec && e.codec == "av1" && (!((v = F[0]) === null || v === void 0) && v.maxBitrate) && this.engine.pcManager.publisher.setTrackCodecBitrate({
|
|
17206
|
-
cid:
|
|
17190
|
+
cid: w.cid,
|
|
17207
17191
|
codec: e.codec,
|
|
17208
17192
|
maxbr: F[0].maxBitrate / 1e3
|
|
17209
17193
|
});
|
|
@@ -17215,7 +17199,7 @@ class Br extends rc {
|
|
|
17215
17199
|
} catch (N) {
|
|
17216
17200
|
this.log.warn("failed to set degradationPreference: ".concat(N));
|
|
17217
17201
|
}
|
|
17218
|
-
return yield this.engine.negotiate(), e instanceof Ie ? e.startMonitor(this.engine.client) : e instanceof Pe && e.startMonitor(), this.addTrackPublication(
|
|
17202
|
+
return yield this.engine.negotiate(), e instanceof Ie ? e.startMonitor(this.engine.client) : e instanceof Pe && e.startMonitor(), this.addTrackPublication(de), this.emit(M.LocalTrackPublished, de), de;
|
|
17219
17203
|
});
|
|
17220
17204
|
}
|
|
17221
17205
|
get isLocal() {
|
|
@@ -17329,7 +17313,7 @@ class Br extends rc {
|
|
|
17329
17313
|
publishData(e) {
|
|
17330
17314
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
17331
17315
|
return f(this, void 0, void 0, function* () {
|
|
17332
|
-
const i = t.reliable ?
|
|
17316
|
+
const i = t.reliable ? ke.RELIABLE : ke.LOSSY, s = t.destinationIdentities, r = t.topic, a = new Ra({
|
|
17333
17317
|
kind: i,
|
|
17334
17318
|
value: {
|
|
17335
17319
|
case: "user",
|
|
@@ -17455,10 +17439,10 @@ class ac extends Ye {
|
|
|
17455
17439
|
}
|
|
17456
17440
|
setVideoDimensions(e) {
|
|
17457
17441
|
var t, i;
|
|
17458
|
-
this.isManualOperationAllowed() && (((t = this.videoDimensions) === null || t === void 0 ? void 0 : t.width) === e.width && ((i = this.videoDimensions) === null || i === void 0 ? void 0 : i.height) === e.height || (this.track instanceof
|
|
17442
|
+
this.isManualOperationAllowed() && (((t = this.videoDimensions) === null || t === void 0 ? void 0 : t.width) === e.width && ((i = this.videoDimensions) === null || i === void 0 ? void 0 : i.height) === e.height || (this.track instanceof fn && (this.videoDimensions = e), this.currentVideoQuality = void 0, this.emitTrackUpdate()));
|
|
17459
17443
|
}
|
|
17460
17444
|
setVideoFPS(e) {
|
|
17461
|
-
this.isManualOperationAllowed() && this.track instanceof
|
|
17445
|
+
this.isManualOperationAllowed() && this.track instanceof fn && this.fps !== e && (this.fps = e, this.emitTrackUpdate());
|
|
17462
17446
|
}
|
|
17463
17447
|
get videoQuality() {
|
|
17464
17448
|
return this.currentVideoQuality;
|
|
@@ -17494,7 +17478,7 @@ class ac extends Ye {
|
|
|
17494
17478
|
return this.kind === T.Kind.Video && this.isAdaptiveStream ? (this.log.warn("adaptive stream is enabled, cannot change video track settings", this.logContext), !1) : this.isDesired ? !0 : (this.log.warn("cannot update track settings when not subscribed", this.logContext), !1);
|
|
17495
17479
|
}
|
|
17496
17480
|
get isAdaptiveStream() {
|
|
17497
|
-
return this.track instanceof
|
|
17481
|
+
return this.track instanceof fn && this.track.isAdaptiveStream;
|
|
17498
17482
|
}
|
|
17499
17483
|
/* @internal */
|
|
17500
17484
|
emitTrackUpdate() {
|
|
@@ -17593,7 +17577,7 @@ class ri extends rc {
|
|
|
17593
17577
|
}
|
|
17594
17578
|
const c = e.kind === "video";
|
|
17595
17579
|
let d;
|
|
17596
|
-
return c ? d = new
|
|
17580
|
+
return c ? d = new fn(e, t, s, r) : d = new pn(e, t, s, this.audioContext, this.audioOutput), d.source = o.source, d.isMuted = o.isMuted, d.setMediaStream(i), d.start(), o.setTrack(d), this.volumeMap.has(o.source) && d instanceof pn && d.setVolume(this.volumeMap.get(o.source)), o;
|
|
17597
17581
|
}
|
|
17598
17582
|
/** @internal */
|
|
17599
17583
|
get hasMetadata() {
|
|
@@ -17663,7 +17647,7 @@ class ri extends rc {
|
|
|
17663
17647
|
const t = [];
|
|
17664
17648
|
this.audioTrackPublications.forEach((i) => {
|
|
17665
17649
|
var s;
|
|
17666
|
-
i.track instanceof
|
|
17650
|
+
i.track instanceof pn && t.push(i.track.setSinkId((s = e.deviceId) !== null && s !== void 0 ? s : "default"));
|
|
17667
17651
|
}), yield Promise.all(t);
|
|
17668
17652
|
});
|
|
17669
17653
|
}
|
|
@@ -17712,16 +17696,16 @@ class oc extends Ge.EventEmitter {
|
|
|
17712
17696
|
yield this.attemptConnection(k ?? r, a, o, S), this.abortController = void 0, p();
|
|
17713
17697
|
} catch (O) {
|
|
17714
17698
|
if (this.regionUrlProvider && O instanceof te && O.reason !== 3 && O.reason !== 0) {
|
|
17715
|
-
let
|
|
17699
|
+
let w = null;
|
|
17716
17700
|
try {
|
|
17717
|
-
|
|
17701
|
+
w = yield this.regionUrlProvider.getNextBestRegionUrl((v = this.abortController) === null || v === void 0 ? void 0 : v.signal);
|
|
17718
17702
|
} catch (F) {
|
|
17719
17703
|
if (F instanceof te && (F.status === 401 || F.reason === 3)) {
|
|
17720
17704
|
this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), m(F);
|
|
17721
17705
|
return;
|
|
17722
17706
|
}
|
|
17723
17707
|
}
|
|
17724
|
-
|
|
17708
|
+
w ? (this.log.info("Initial connection failed with ConnectionError: ".concat(O.message, ". Retrying with another region: ").concat(w), this.logContext), this.recreateEngine(), yield l(p, m, w)) : (this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), m(O));
|
|
17725
17709
|
} else
|
|
17726
17710
|
this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), m(O);
|
|
17727
17711
|
}
|
|
@@ -17745,8 +17729,8 @@ class oc extends Ge.EventEmitter {
|
|
|
17745
17729
|
version: k.serverVersion,
|
|
17746
17730
|
region: k.serverRegion
|
|
17747
17731
|
}), this.log.debug("connected to Livekit Server ".concat(Object.entries(v).map((S) => {
|
|
17748
|
-
let [O,
|
|
17749
|
-
return "".concat(O, ": ").concat(
|
|
17732
|
+
let [O, w] = S;
|
|
17733
|
+
return "".concat(O, ": ").concat(w);
|
|
17750
17734
|
}).join(", ")), {
|
|
17751
17735
|
room: (u = k.room) === null || u === void 0 ? void 0 : u.name,
|
|
17752
17736
|
roomSid: (p = k.room) === null || p === void 0 ? void 0 : p.sid,
|
|
@@ -17770,7 +17754,7 @@ class oc extends Ge.EventEmitter {
|
|
|
17770
17754
|
this.state === J.Reconnecting || this.isResuming || !((d = this.engine) === null || d === void 0) && d.pendingReconnect ? (this.log.info("Reconnection attempt replaced by new connection attempt", this.logContext), this.recreateEngine()) : this.maybeCreateEngine(), !((l = this.regionUrlProvider) === null || l === void 0) && l.isCloud() && this.engine.setRegionUrlProvider(this.regionUrlProvider), this.acquireAudioContext(), this.connOptions = Object.assign(Object.assign({}, As), o), this.connOptions.rtcConfig && (this.engine.rtcConfig = this.connOptions.rtcConfig), this.connOptions.peerConnectionTimeout && (this.engine.peerConnectionTimeout = this.connOptions.peerConnectionTimeout);
|
|
17771
17755
|
try {
|
|
17772
17756
|
const p = yield this.connectSignal(r, a, this.engine, this.connOptions, this.options, c);
|
|
17773
|
-
this.applyJoinResponse(p), this.setupLocalParticipantEvents(), this.emit(
|
|
17757
|
+
this.applyJoinResponse(p), this.setupLocalParticipantEvents(), this.emit(E.SignalConnected);
|
|
17774
17758
|
} catch (p) {
|
|
17775
17759
|
yield this.engine.close(), this.recreateEngine();
|
|
17776
17760
|
const m = new te("could not establish signal connection");
|
|
@@ -17785,7 +17769,7 @@ class oc extends Ge.EventEmitter {
|
|
|
17785
17769
|
} catch (p) {
|
|
17786
17770
|
throw yield this.engine.close(), this.recreateEngine(), p;
|
|
17787
17771
|
}
|
|
17788
|
-
_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(J.Connected), this.emit(
|
|
17772
|
+
_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(J.Connected), this.emit(E.Connected), this.registerConnectionReconcile();
|
|
17789
17773
|
}), this.disconnect = function() {
|
|
17790
17774
|
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
|
|
17791
17775
|
return f(t, void 0, void 0, function* () {
|
|
@@ -17796,7 +17780,7 @@ class oc extends Ge.EventEmitter {
|
|
|
17796
17780
|
this.log.debug("already disconnected", this.logContext);
|
|
17797
17781
|
return;
|
|
17798
17782
|
}
|
|
17799
|
-
this.log.info("disconnect from room", Object.assign({}, this.logContext)), (this.state === J.Connecting || this.state === J.Reconnecting || this.isResuming) && (this.log.warn("abort connection attempt", this.logContext), (a = this.abortController) === null || a === void 0 || a.abort(), (c = (o = this.connectFuture) === null || o === void 0 ? void 0 : o.reject) === null || c === void 0 || c.call(o, new te("Client initiated disconnect")), this.connectFuture = void 0), !((d = this.engine) === null || d === void 0) && d.client.isDisconnected || (yield this.engine.client.sendLeave()), this.engine && (yield this.engine.close()), this.handleDisconnect(r,
|
|
17783
|
+
this.log.info("disconnect from room", Object.assign({}, this.logContext)), (this.state === J.Connecting || this.state === J.Reconnecting || this.isResuming) && (this.log.warn("abort connection attempt", this.logContext), (a = this.abortController) === null || a === void 0 || a.abort(), (c = (o = this.connectFuture) === null || o === void 0 ? void 0 : o.reject) === null || c === void 0 || c.call(o, new te("Client initiated disconnect")), this.connectFuture = void 0), !((d = this.engine) === null || d === void 0) && d.client.isDisconnected || (yield this.engine.client.sendLeave()), this.engine && (yield this.engine.close()), this.handleDisconnect(r, un.CLIENT_INITIATED), this.engine = void 0;
|
|
17800
17784
|
} finally {
|
|
17801
17785
|
l();
|
|
17802
17786
|
}
|
|
@@ -17815,7 +17799,7 @@ class oc extends Ge.EventEmitter {
|
|
|
17815
17799
|
const l = new MediaStream([d]);
|
|
17816
17800
|
c.srcObject = l, document.addEventListener("visibilitychange", () => {
|
|
17817
17801
|
c && (c.srcObject = document.hidden ? null : l, document.hidden || (this.log.debug("page visible again, triggering startAudio to resume playback and update playback status", this.logContext), this.startAudio()));
|
|
17818
|
-
}), document.body.append(c), this.once(
|
|
17802
|
+
}), document.body.append(c), this.once(E.Disconnected, () => {
|
|
17819
17803
|
c == null || c.remove(), c = null;
|
|
17820
17804
|
});
|
|
17821
17805
|
}
|
|
@@ -17851,7 +17835,7 @@ class oc extends Ge.EventEmitter {
|
|
|
17851
17835
|
this.clearConnectionReconcile(), this.isResuming = !1;
|
|
17852
17836
|
for (const r of this.remoteParticipants.values())
|
|
17853
17837
|
this.handleParticipantDisconnected(r.identity, r);
|
|
17854
|
-
this.setAndEmitConnectionState(J.Reconnecting) && this.emit(
|
|
17838
|
+
this.setAndEmitConnectionState(J.Reconnecting) && this.emit(E.Reconnecting);
|
|
17855
17839
|
}, this.handleSignalRestarted = (r) => f(this, void 0, void 0, function* () {
|
|
17856
17840
|
this.log.debug("signal reconnected to server, region ".concat(r.serverRegion), Object.assign(Object.assign({}, this.logContext), {
|
|
17857
17841
|
region: r.serverRegion
|
|
@@ -17870,7 +17854,7 @@ class oc extends Ge.EventEmitter {
|
|
|
17870
17854
|
} catch {
|
|
17871
17855
|
return;
|
|
17872
17856
|
}
|
|
17873
|
-
this.setAndEmitConnectionState(J.Connected), this.emit(
|
|
17857
|
+
this.setAndEmitConnectionState(J.Connected), this.emit(E.Reconnected), this.registerConnectionReconcile(), this.emitBufferedEvents();
|
|
17874
17858
|
}), this.handleParticipantUpdates = (r) => {
|
|
17875
17859
|
r.forEach((a) => {
|
|
17876
17860
|
var o;
|
|
@@ -17893,7 +17877,7 @@ class oc extends Ge.EventEmitter {
|
|
|
17893
17877
|
}
|
|
17894
17878
|
}), o[this.localParticipant.sid] || (this.localParticipant.audioLevel = 0, this.localParticipant.setIsSpeaking(!1)), this.remoteParticipants.forEach((c) => {
|
|
17895
17879
|
o[c.sid] || (c.audioLevel = 0, c.setIsSpeaking(!1));
|
|
17896
|
-
}), this.activeSpeakers = a, this.emitWhenConnected(
|
|
17880
|
+
}), this.activeSpeakers = a, this.emitWhenConnected(E.ActiveSpeakersChanged, a);
|
|
17897
17881
|
}, this.handleSpeakersChanged = (r) => {
|
|
17898
17882
|
const a = /* @__PURE__ */ new Map();
|
|
17899
17883
|
this.activeSpeakers.forEach((c) => {
|
|
@@ -17903,14 +17887,14 @@ class oc extends Ge.EventEmitter {
|
|
|
17903
17887
|
c.sid === this.localParticipant.sid && (d = this.localParticipant), d && (d.audioLevel = c.level, d.setIsSpeaking(c.active), c.active ? a.set(c.sid, d) : a.delete(c.sid));
|
|
17904
17888
|
});
|
|
17905
17889
|
const o = Array.from(a.values());
|
|
17906
|
-
o.sort((c, d) => d.audioLevel - c.audioLevel), this.activeSpeakers = o, this.emitWhenConnected(
|
|
17890
|
+
o.sort((c, d) => d.audioLevel - c.audioLevel), this.activeSpeakers = o, this.emitWhenConnected(E.ActiveSpeakersChanged, o);
|
|
17907
17891
|
}, this.handleStreamStateUpdate = (r) => {
|
|
17908
17892
|
r.streamStates.forEach((a) => {
|
|
17909
17893
|
const o = this.getRemoteParticipantBySid(a.participantSid);
|
|
17910
17894
|
if (!o)
|
|
17911
17895
|
return;
|
|
17912
17896
|
const c = o.getTrackPublicationBySid(a.trackSid);
|
|
17913
|
-
!c || !c.track || (c.track.streamState = T.streamStateFromProto(a.state), o.emit(M.TrackStreamStateChanged, c, c.track.streamState), this.emitWhenConnected(
|
|
17897
|
+
!c || !c.track || (c.track.streamState = T.streamStateFromProto(a.state), o.emit(M.TrackStreamStateChanged, c, c.track.streamState), this.emitWhenConnected(E.TrackStreamStateChanged, c, c.track.streamState, o));
|
|
17914
17898
|
});
|
|
17915
17899
|
}, this.handleSubscriptionPermissionUpdate = (r) => {
|
|
17916
17900
|
const a = this.getRemoteParticipantBySid(r.participantSid);
|
|
@@ -17926,22 +17910,22 @@ class oc extends Ge.EventEmitter {
|
|
|
17926
17910
|
o && o.setSubscriptionError(r.err);
|
|
17927
17911
|
}, this.handleDataPacket = (r, a) => {
|
|
17928
17912
|
const o = this.remoteParticipants.get(r.participantIdentity);
|
|
17929
|
-
this.emit(
|
|
17913
|
+
this.emit(E.DataReceived, r.payload, o, a, r.topic), o == null || o.emit(M.DataReceived, r.payload, a);
|
|
17930
17914
|
}, this.handleAudioPlaybackStarted = () => {
|
|
17931
|
-
this.canPlaybackAudio || (this.audioEnabled = !0, this.emit(
|
|
17915
|
+
this.canPlaybackAudio || (this.audioEnabled = !0, this.emit(E.AudioPlaybackStatusChanged, !0));
|
|
17932
17916
|
}, this.handleAudioPlaybackFailed = (r) => {
|
|
17933
17917
|
this.log.warn("could not playback audio", Object.assign(Object.assign({}, this.logContext), {
|
|
17934
17918
|
error: r
|
|
17935
|
-
})), this.canPlaybackAudio && (this.audioEnabled = !1, this.emit(
|
|
17919
|
+
})), this.canPlaybackAudio && (this.audioEnabled = !1, this.emit(E.AudioPlaybackStatusChanged, !1));
|
|
17936
17920
|
}, this.handleVideoPlaybackStarted = () => {
|
|
17937
|
-
this.isVideoPlaybackBlocked && (this.isVideoPlaybackBlocked = !1, this.emit(
|
|
17921
|
+
this.isVideoPlaybackBlocked && (this.isVideoPlaybackBlocked = !1, this.emit(E.VideoPlaybackStatusChanged, !0));
|
|
17938
17922
|
}, this.handleVideoPlaybackFailed = () => {
|
|
17939
|
-
this.isVideoPlaybackBlocked || (this.isVideoPlaybackBlocked = !0, this.emit(
|
|
17923
|
+
this.isVideoPlaybackBlocked || (this.isVideoPlaybackBlocked = !0, this.emit(E.VideoPlaybackStatusChanged, !1));
|
|
17940
17924
|
}, this.handleDeviceChange = () => f(this, void 0, void 0, function* () {
|
|
17941
|
-
this.emit(
|
|
17925
|
+
this.emit(E.MediaDevicesChanged);
|
|
17942
17926
|
}), this.handleRoomUpdate = (r) => {
|
|
17943
17927
|
const a = this.roomInfo;
|
|
17944
|
-
this.roomInfo = r, a && a.metadata !== r.metadata && this.emitWhenConnected(
|
|
17928
|
+
this.roomInfo = r, a && a.metadata !== r.metadata && this.emitWhenConnected(E.RoomMetadataChanged, r.metadata), (a == null ? void 0 : a.activeRecording) !== r.activeRecording && this.emitWhenConnected(E.RecordingStatusChanged, r.activeRecording);
|
|
17945
17929
|
}, this.handleConnectionQualityUpdate = (r) => {
|
|
17946
17930
|
r.updates.forEach((a) => {
|
|
17947
17931
|
if (a.participantSid === this.localParticipant.sid) {
|
|
@@ -17952,30 +17936,30 @@ class oc extends Ge.EventEmitter {
|
|
|
17952
17936
|
o && o.setConnectionQuality(a.quality);
|
|
17953
17937
|
});
|
|
17954
17938
|
}, this.onLocalParticipantMetadataChanged = (r) => {
|
|
17955
|
-
this.emit(
|
|
17939
|
+
this.emit(E.ParticipantMetadataChanged, r, this.localParticipant);
|
|
17956
17940
|
}, this.onLocalParticipantNameChanged = (r) => {
|
|
17957
|
-
this.emit(
|
|
17941
|
+
this.emit(E.ParticipantNameChanged, r, this.localParticipant);
|
|
17958
17942
|
}, this.onLocalTrackMuted = (r) => {
|
|
17959
|
-
this.emit(
|
|
17943
|
+
this.emit(E.TrackMuted, r, this.localParticipant);
|
|
17960
17944
|
}, this.onLocalTrackUnmuted = (r) => {
|
|
17961
|
-
this.emit(
|
|
17945
|
+
this.emit(E.TrackUnmuted, r, this.localParticipant);
|
|
17962
17946
|
}, this.onTrackProcessorUpdate = (r) => {
|
|
17963
17947
|
var a;
|
|
17964
17948
|
(a = r == null ? void 0 : r.onPublish) === null || a === void 0 || a.call(r, this);
|
|
17965
17949
|
}, this.onLocalTrackPublished = (r) => f(this, void 0, void 0, function* () {
|
|
17966
17950
|
var a, o, c, d, l;
|
|
17967
|
-
(a = r.track) === null || a === void 0 || a.on(_.TrackProcessorUpdate, this.onTrackProcessorUpdate), (d = (c = (o = r.track) === null || o === void 0 ? void 0 : o.getProcessor()) === null || c === void 0 ? void 0 : c.onPublish) === null || d === void 0 || d.call(c, this), this.emit(
|
|
17951
|
+
(a = r.track) === null || a === void 0 || a.on(_.TrackProcessorUpdate, this.onTrackProcessorUpdate), (d = (c = (o = r.track) === null || o === void 0 ? void 0 : o.getProcessor()) === null || c === void 0 ? void 0 : c.onPublish) === null || d === void 0 || d.call(c, this), this.emit(E.LocalTrackPublished, r, this.localParticipant), r.track instanceof Pe && (yield r.track.checkForSilence()) && this.emit(E.LocalAudioSilenceDetected, r);
|
|
17968
17952
|
const u = yield (l = r.track) === null || l === void 0 ? void 0 : l.getDeviceId(), p = Hh(r.source);
|
|
17969
|
-
p && u && u !== this.localParticipant.activeDeviceMap.get(p) && (this.localParticipant.activeDeviceMap.set(p, u), this.emit(
|
|
17953
|
+
p && u && u !== this.localParticipant.activeDeviceMap.get(p) && (this.localParticipant.activeDeviceMap.set(p, u), this.emit(E.ActiveDeviceChanged, p, u));
|
|
17970
17954
|
}), this.onLocalTrackUnpublished = (r) => {
|
|
17971
17955
|
var a;
|
|
17972
|
-
(a = r.track) === null || a === void 0 || a.off(_.TrackProcessorUpdate, this.onTrackProcessorUpdate), this.emit(
|
|
17956
|
+
(a = r.track) === null || a === void 0 || a.off(_.TrackProcessorUpdate, this.onTrackProcessorUpdate), this.emit(E.LocalTrackUnpublished, r, this.localParticipant);
|
|
17973
17957
|
}, this.onLocalConnectionQualityChanged = (r) => {
|
|
17974
|
-
this.emit(
|
|
17958
|
+
this.emit(E.ConnectionQualityChanged, r, this.localParticipant);
|
|
17975
17959
|
}, this.onMediaDevicesError = (r) => {
|
|
17976
|
-
this.emit(
|
|
17960
|
+
this.emit(E.MediaDevicesError, r);
|
|
17977
17961
|
}, this.onLocalParticipantPermissionsChanged = (r) => {
|
|
17978
|
-
this.emit(
|
|
17962
|
+
this.emit(E.ParticipantPermissionsChanged, r, this.localParticipant);
|
|
17979
17963
|
}, this.setMaxListeners(100), this.remoteParticipants = /* @__PURE__ */ new Map(), this.sidToIdentity = /* @__PURE__ */ new Map(), this.options = Object.assign(Object.assign({}, Cp), e), this.log = it((i = this.options.loggerName) !== null && i !== void 0 ? i : Fe.Room), this.options.audioCaptureDefaults = Object.assign(Object.assign({}, Zo), e == null ? void 0 : e.audioCaptureDefaults), this.options.videoCaptureDefaults = Object.assign(Object.assign({}, ec), e == null ? void 0 : e.videoCaptureDefaults), this.options.publishDefaults = Object.assign(Object.assign({}, Tp), e == null ? void 0 : e.publishDefaults), this.maybeCreateEngine(), this.disconnectLock = new xe(), this.localParticipant = new Br("", "", this.engine, this.options), this.options.videoCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("videoinput", ft(this.options.videoCaptureDefaults.deviceId)), this.options.audioCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("audioinput", ft(this.options.audioCaptureDefaults.deviceId)), !((s = this.options.audioOutput) === null || s === void 0) && s.deviceId && this.switchActiveDevice("audiooutput", ft(this.options.audioOutput.deviceId)).catch((r) => this.log.warn("Could not set audio output: ".concat(r.message), this.logContext)), this.options.e2ee && this.setupE2EE();
|
|
17980
17964
|
}
|
|
17981
17965
|
/**
|
|
@@ -17992,8 +17976,8 @@ class oc extends Ge.EventEmitter {
|
|
|
17992
17976
|
setupE2EE() {
|
|
17993
17977
|
var e;
|
|
17994
17978
|
this.options.e2ee && (this.e2eeManager = new ap(this.options.e2ee), this.e2eeManager.on(lt.ParticipantEncryptionStatusChanged, (t, i) => {
|
|
17995
|
-
i instanceof Br && (this.isE2EEEnabled = t), this.emit(
|
|
17996
|
-
}), this.e2eeManager.on(lt.EncryptionError, (t) => this.emit(
|
|
17979
|
+
i instanceof Br && (this.isE2EEEnabled = t), this.emit(E.ParticipantEncryptionStatusChanged, t, i);
|
|
17980
|
+
}), this.e2eeManager.on(lt.EncryptionError, (t) => this.emit(E.EncryptionError, t)), (e = this.e2eeManager) === null || e === void 0 || e.setup(this));
|
|
17997
17981
|
}
|
|
17998
17982
|
get logContext() {
|
|
17999
17983
|
var e;
|
|
@@ -18021,7 +18005,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18021
18005
|
const i = (s) => {
|
|
18022
18006
|
s.sid !== "" && (this.engine.off(I.RoomUpdate, i), e(s.sid));
|
|
18023
18007
|
};
|
|
18024
|
-
this.engine.on(I.RoomUpdate, i), this.once(
|
|
18008
|
+
this.engine.on(I.RoomUpdate, i), this.once(E.Disconnected, () => {
|
|
18025
18009
|
this.engine.off(I.RoomUpdate, i), t("Room disconnected before room server id was available");
|
|
18026
18010
|
});
|
|
18027
18011
|
});
|
|
@@ -18057,9 +18041,9 @@ class oc extends Ge.EventEmitter {
|
|
|
18057
18041
|
}).on(I.SignalResumed, () => {
|
|
18058
18042
|
this.bufferedEvents = [], (this.state === J.Reconnecting || this.isResuming) && this.sendSyncState();
|
|
18059
18043
|
}).on(I.Restarting, this.handleRestarting).on(I.SignalRestarted, this.handleSignalRestarted).on(I.Offline, () => {
|
|
18060
|
-
this.setAndEmitConnectionState(J.Reconnecting) && this.emit(
|
|
18044
|
+
this.setAndEmitConnectionState(J.Reconnecting) && this.emit(E.Reconnecting);
|
|
18061
18045
|
}).on(I.DCBufferStatusChanged, (e, t) => {
|
|
18062
|
-
this.emit(
|
|
18046
|
+
this.emit(E.DCBufferStatusChanged, e, t);
|
|
18063
18047
|
}), this.localParticipant && this.localParticipant.setupEngine(this.engine), this.e2eeManager && this.e2eeManager.setupEngine(this.engine));
|
|
18064
18048
|
}
|
|
18065
18049
|
/**
|
|
@@ -18072,7 +18056,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18072
18056
|
*/
|
|
18073
18057
|
static getLocalDevices(e) {
|
|
18074
18058
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
18075
|
-
return
|
|
18059
|
+
return ye.getInstance().getDevices(e, t);
|
|
18076
18060
|
}
|
|
18077
18061
|
/**
|
|
18078
18062
|
* prepareConnection should be called as soon as the page is loaded, in order
|
|
@@ -18196,7 +18180,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18196
18180
|
}), i = () => f(this, void 0, void 0, function* () {
|
|
18197
18181
|
const r = this.engine.client.onLeave;
|
|
18198
18182
|
r && r(new hi({
|
|
18199
|
-
reason:
|
|
18183
|
+
reason: un.CLIENT_INITIATED,
|
|
18200
18184
|
canReconnect: !0
|
|
18201
18185
|
}));
|
|
18202
18186
|
});
|
|
@@ -18275,7 +18259,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18275
18259
|
} else if (e === "audiooutput") {
|
|
18276
18260
|
if (!as() && !this.options.webAudioMix || this.options.webAudioMix && this.audioContext && !("setSinkId" in this.audioContext))
|
|
18277
18261
|
throw new Error("cannot switch audio output, setSinkId not supported");
|
|
18278
|
-
this.options.webAudioMix && (t = (s = yield
|
|
18262
|
+
this.options.webAudioMix && (t = (s = yield ye.getInstance().normalizeDeviceId("audiooutput", t)) !== null && s !== void 0 ? s : ""), (r = (o = this.options).audioOutput) !== null && r !== void 0 || (o.audioOutput = {});
|
|
18279
18263
|
const u = this.options.audioOutput.deviceId;
|
|
18280
18264
|
this.options.audioOutput.deviceId = t, c = u !== l;
|
|
18281
18265
|
try {
|
|
@@ -18286,7 +18270,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18286
18270
|
throw this.options.audioOutput.deviceId = u, p;
|
|
18287
18271
|
}
|
|
18288
18272
|
}
|
|
18289
|
-
return c && d && (this.localParticipant.activeDeviceMap.set(e, t), this.emit(
|
|
18273
|
+
return c && d && (this.localParticipant.activeDeviceMap.set(e, t), this.emit(E.ActiveDeviceChanged, e, t)), d;
|
|
18290
18274
|
});
|
|
18291
18275
|
}
|
|
18292
18276
|
setupLocalParticipantEvents() {
|
|
@@ -18301,9 +18285,9 @@ class oc extends Ge.EventEmitter {
|
|
|
18301
18285
|
const l = () => {
|
|
18302
18286
|
this.onTrackAdded(e, t, i), u();
|
|
18303
18287
|
}, u = () => {
|
|
18304
|
-
this.off(
|
|
18288
|
+
this.off(E.Reconnected, l), this.off(E.Connected, l), this.off(E.Disconnected, u);
|
|
18305
18289
|
};
|
|
18306
|
-
this.once(
|
|
18290
|
+
this.once(E.Reconnected, l), this.once(E.Connected, l), this.once(E.Disconnected, u);
|
|
18307
18291
|
return;
|
|
18308
18292
|
}
|
|
18309
18293
|
if (this.state === J.Disconnected) {
|
|
@@ -18339,14 +18323,14 @@ class oc extends Ge.EventEmitter {
|
|
|
18339
18323
|
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());
|
|
18340
18324
|
}), this.localParticipant.off(M.ParticipantMetadataChanged, this.onLocalParticipantMetadataChanged).off(M.ParticipantNameChanged, this.onLocalParticipantNameChanged).off(M.TrackMuted, this.onLocalTrackMuted).off(M.TrackUnmuted, this.onLocalTrackUnmuted).off(M.LocalTrackPublished, this.onLocalTrackPublished).off(M.LocalTrackUnpublished, this.onLocalTrackUnpublished).off(M.ConnectionQualityChanged, this.onLocalConnectionQualityChanged).off(M.MediaDevicesError, this.onMediaDevicesError).off(M.AudioStreamAcquired, this.startAudio).off(M.ParticipantPermissionsChanged, this.onLocalParticipantPermissionsChanged), this.localParticipant.trackPublications.clear(), this.localParticipant.videoTrackPublications.clear(), this.localParticipant.audioTrackPublications.clear(), this.remoteParticipants.clear(), this.sidToIdentity.clear(), this.activeSpeakers = [], this.audioContext && typeof this.options.webAudioMix == "boolean" && (this.audioContext.close(), this.audioContext = void 0), _e() && (window.removeEventListener("beforeunload", this.onPageLeave), window.removeEventListener("pagehide", this.onPageLeave), window.removeEventListener("freeze", this.onPageLeave), (i = navigator.mediaDevices) === null || i === void 0 || i.removeEventListener("devicechange", this.handleDeviceChange));
|
|
18341
18325
|
} finally {
|
|
18342
|
-
this.setAndEmitConnectionState(J.Disconnected), this.emit(
|
|
18326
|
+
this.setAndEmitConnectionState(J.Disconnected), this.emit(E.Disconnected, t);
|
|
18343
18327
|
}
|
|
18344
18328
|
}
|
|
18345
18329
|
}
|
|
18346
18330
|
handleParticipantDisconnected(e, t) {
|
|
18347
18331
|
this.remoteParticipants.delete(e), t && (t.trackPublications.forEach((i) => {
|
|
18348
18332
|
t.unpublishTrack(i.trackSid, !0);
|
|
18349
|
-
}), this.emit(
|
|
18333
|
+
}), this.emit(E.ParticipantDisconnected, t));
|
|
18350
18334
|
}
|
|
18351
18335
|
acquireAudioContext() {
|
|
18352
18336
|
var e, t;
|
|
@@ -18361,7 +18345,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18361
18345
|
}
|
|
18362
18346
|
this.options.webAudioMix && this.remoteParticipants.forEach((s) => s.setAudioContext(this.audioContext)), this.localParticipant.setAudioContext(this.audioContext);
|
|
18363
18347
|
const i = ((t = this.audioContext) === null || t === void 0 ? void 0 : t.state) === "running";
|
|
18364
|
-
i !== this.canPlaybackAudio && (this.audioEnabled = i, this.emit(
|
|
18348
|
+
i !== this.canPlaybackAudio && (this.audioEnabled = i, this.emit(E.AudioPlaybackStatusChanged, i));
|
|
18365
18349
|
});
|
|
18366
18350
|
}
|
|
18367
18351
|
createParticipant(e, t) {
|
|
@@ -18378,34 +18362,34 @@ class oc extends Ge.EventEmitter {
|
|
|
18378
18362
|
return t && s.updateInfo(t) && this.sidToIdentity.set(t.sid, t.identity), s;
|
|
18379
18363
|
}
|
|
18380
18364
|
const i = this.createParticipant(e, t);
|
|
18381
|
-
return this.remoteParticipants.set(e, i), this.sidToIdentity.set(t.sid, t.identity), this.emitWhenConnected(
|
|
18382
|
-
this.emitWhenConnected(
|
|
18365
|
+
return this.remoteParticipants.set(e, i), this.sidToIdentity.set(t.sid, t.identity), this.emitWhenConnected(E.ParticipantConnected, i), i.on(M.TrackPublished, (s) => {
|
|
18366
|
+
this.emitWhenConnected(E.TrackPublished, s, i);
|
|
18383
18367
|
}).on(M.TrackSubscribed, (s, r) => {
|
|
18384
|
-
s.kind === T.Kind.Audio ? (s.on(_.AudioPlaybackStarted, this.handleAudioPlaybackStarted), s.on(_.AudioPlaybackFailed, this.handleAudioPlaybackFailed)) : s.kind === T.Kind.Video && (s.on(_.VideoPlaybackFailed, this.handleVideoPlaybackFailed), s.on(_.VideoPlaybackStarted, this.handleVideoPlaybackStarted)), this.emit(
|
|
18368
|
+
s.kind === T.Kind.Audio ? (s.on(_.AudioPlaybackStarted, this.handleAudioPlaybackStarted), s.on(_.AudioPlaybackFailed, this.handleAudioPlaybackFailed)) : s.kind === T.Kind.Video && (s.on(_.VideoPlaybackFailed, this.handleVideoPlaybackFailed), s.on(_.VideoPlaybackStarted, this.handleVideoPlaybackStarted)), this.emit(E.TrackSubscribed, s, r, i);
|
|
18385
18369
|
}).on(M.TrackUnpublished, (s) => {
|
|
18386
|
-
this.emit(
|
|
18370
|
+
this.emit(E.TrackUnpublished, s, i);
|
|
18387
18371
|
}).on(M.TrackUnsubscribed, (s, r) => {
|
|
18388
|
-
this.emit(
|
|
18372
|
+
this.emit(E.TrackUnsubscribed, s, r, i);
|
|
18389
18373
|
}).on(M.TrackSubscriptionFailed, (s) => {
|
|
18390
|
-
this.emit(
|
|
18374
|
+
this.emit(E.TrackSubscriptionFailed, s, i);
|
|
18391
18375
|
}).on(M.TrackMuted, (s) => {
|
|
18392
|
-
this.emitWhenConnected(
|
|
18376
|
+
this.emitWhenConnected(E.TrackMuted, s, i);
|
|
18393
18377
|
}).on(M.TrackUnmuted, (s) => {
|
|
18394
|
-
this.emitWhenConnected(
|
|
18378
|
+
this.emitWhenConnected(E.TrackUnmuted, s, i);
|
|
18395
18379
|
}).on(M.ParticipantMetadataChanged, (s) => {
|
|
18396
|
-
this.emitWhenConnected(
|
|
18380
|
+
this.emitWhenConnected(E.ParticipantMetadataChanged, s, i);
|
|
18397
18381
|
}).on(M.ParticipantNameChanged, (s) => {
|
|
18398
|
-
this.emitWhenConnected(
|
|
18382
|
+
this.emitWhenConnected(E.ParticipantNameChanged, s, i);
|
|
18399
18383
|
}).on(M.ConnectionQualityChanged, (s) => {
|
|
18400
|
-
this.emitWhenConnected(
|
|
18384
|
+
this.emitWhenConnected(E.ConnectionQualityChanged, s, i);
|
|
18401
18385
|
}).on(M.ParticipantPermissionsChanged, (s) => {
|
|
18402
|
-
this.emitWhenConnected(
|
|
18386
|
+
this.emitWhenConnected(E.ParticipantPermissionsChanged, s, i);
|
|
18403
18387
|
}).on(M.TrackSubscriptionStatusChanged, (s, r) => {
|
|
18404
|
-
this.emitWhenConnected(
|
|
18388
|
+
this.emitWhenConnected(E.TrackSubscriptionStatusChanged, s, r, i);
|
|
18405
18389
|
}).on(M.TrackSubscriptionFailed, (s, r) => {
|
|
18406
|
-
this.emit(
|
|
18390
|
+
this.emit(E.TrackSubscriptionFailed, s, i, r);
|
|
18407
18391
|
}).on(M.TrackSubscriptionPermissionChanged, (s, r) => {
|
|
18408
|
-
this.emitWhenConnected(
|
|
18392
|
+
this.emitWhenConnected(E.TrackSubscriptionPermissionChanged, s, r, i);
|
|
18409
18393
|
}), t && i.updateInfo(t), i;
|
|
18410
18394
|
}
|
|
18411
18395
|
sendSyncState() {
|
|
@@ -18429,7 +18413,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18429
18413
|
registerConnectionReconcile() {
|
|
18430
18414
|
this.clearConnectionReconcile();
|
|
18431
18415
|
let e = 0;
|
|
18432
|
-
this.connectionReconcileInterval =
|
|
18416
|
+
this.connectionReconcileInterval = ve.setInterval(() => {
|
|
18433
18417
|
// ensure we didn't tear it down
|
|
18434
18418
|
!this.engine || // engine detected close, but Room missed it
|
|
18435
18419
|
this.engine.isClosed || // transports failed without notifying engine
|
|
@@ -18439,14 +18423,14 @@ class oc extends Ge.EventEmitter {
|
|
|
18439
18423
|
closed: this.engine.isClosed,
|
|
18440
18424
|
transportsConnected: this.engine.verifyTransport()
|
|
18441
18425
|
}
|
|
18442
|
-
})), e >= 3 && (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish,
|
|
18426
|
+
})), e >= 3 && (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, un.STATE_MISMATCH))) : e = 0;
|
|
18443
18427
|
}, Bp);
|
|
18444
18428
|
}
|
|
18445
18429
|
clearConnectionReconcile() {
|
|
18446
|
-
this.connectionReconcileInterval &&
|
|
18430
|
+
this.connectionReconcileInterval && ve.clearInterval(this.connectionReconcileInterval);
|
|
18447
18431
|
}
|
|
18448
18432
|
setAndEmitConnectionState(e) {
|
|
18449
|
-
return e === this.state ? !1 : (this.state = e, this.emit(
|
|
18433
|
+
return e === this.state ? !1 : (this.state = e, this.emit(E.ConnectionStateChanged, this.state), !0);
|
|
18450
18434
|
}
|
|
18451
18435
|
emitBufferedEvents() {
|
|
18452
18436
|
this.bufferedEvents.forEach((e) => {
|
|
@@ -18481,7 +18465,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18481
18465
|
video: !0,
|
|
18482
18466
|
aspectRatios: [1.66, 1.7, 1.3]
|
|
18483
18467
|
}, e.participants);
|
|
18484
|
-
if (this.handleDisconnect(), this.roomInfo = new
|
|
18468
|
+
if (this.handleDisconnect(), this.roomInfo = new qt({
|
|
18485
18469
|
sid: "RM_SIMULATED",
|
|
18486
18470
|
name: "simulated-room",
|
|
18487
18471
|
emptyTimeout: 0,
|
|
@@ -18496,7 +18480,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18496
18480
|
}), this.localParticipant.updateInfo(new mt({
|
|
18497
18481
|
identity: "simulated-local",
|
|
18498
18482
|
name: "local-name"
|
|
18499
|
-
})), this.setupLocalParticipantEvents(), this.emit(
|
|
18483
|
+
})), this.setupLocalParticipantEvents(), this.emit(E.SignalConnected), this.emit(E.Connected), this.setAndEmitConnectionState(J.Connected), s.video) {
|
|
18500
18484
|
const a = new si(T.Kind.Video, new Ze({
|
|
18501
18485
|
source: me.CAMERA,
|
|
18502
18486
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
@@ -18562,7 +18546,7 @@ class oc extends Ge.EventEmitter {
|
|
|
18562
18546
|
emit(e) {
|
|
18563
18547
|
for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
18564
18548
|
i[s - 1] = arguments[s];
|
|
18565
|
-
if (e !==
|
|
18549
|
+
if (e !== E.ActiveSpeakersChanged) {
|
|
18566
18550
|
const r = cc(i).filter((a) => a !== void 0);
|
|
18567
18551
|
this.log.debug("room event ".concat(e), Object.assign(Object.assign({}, this.logContext), {
|
|
18568
18552
|
event: e,
|
|
@@ -18582,7 +18566,7 @@ var De;
|
|
|
18582
18566
|
(function(n) {
|
|
18583
18567
|
n[n.IDLE = 0] = "IDLE", n[n.RUNNING = 1] = "RUNNING", n[n.SKIPPED = 2] = "SKIPPED", n[n.SUCCESS = 3] = "SUCCESS", n[n.FAILED = 4] = "FAILED";
|
|
18584
18568
|
})(De || (De = {}));
|
|
18585
|
-
class
|
|
18569
|
+
class zt extends Ge.EventEmitter {
|
|
18586
18570
|
constructor(e, t) {
|
|
18587
18571
|
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
18588
18572
|
super(), this.status = De.IDLE, this.logs = [], this.errorsAsWarnings = !1, this.url = e, this.token = t, this.name = this.constructor.name, this.room = new oc(i.roomOptions), this.connectOptions = i.connectOptions, i.errorsAsWarnings && (this.errorsAsWarnings = i.errorsAsWarnings);
|
|
@@ -18655,7 +18639,7 @@ function dc(n) {
|
|
|
18655
18639
|
return f(this, void 0, void 0, function* () {
|
|
18656
18640
|
n ?? (n = {}), (e = n.audio) !== null && e !== void 0 || (n.audio = !0), (t = n.video) !== null && t !== void 0 || (n.video = !0);
|
|
18657
18641
|
const i = Ho(n, Zo, ec), s = mi(i), r = navigator.mediaDevices.getUserMedia(s);
|
|
18658
|
-
n.audio && (
|
|
18642
|
+
n.audio && (ye.userMediaPromiseMap.set("audioinput", r), r.catch(() => ye.userMediaPromiseMap.delete("audioinput"))), n.video && (ye.userMediaPromiseMap.set("videoinput", r), r.catch(() => ye.userMediaPromiseMap.delete("videoinput")));
|
|
18659
18643
|
const a = yield r;
|
|
18660
18644
|
return a.getTracks().map((o) => {
|
|
18661
18645
|
const c = o.kind === "audio";
|
|
@@ -18686,7 +18670,7 @@ function $p(n) {
|
|
|
18686
18670
|
}))[0];
|
|
18687
18671
|
});
|
|
18688
18672
|
}
|
|
18689
|
-
class Hp extends
|
|
18673
|
+
class Hp extends zt {
|
|
18690
18674
|
get description() {
|
|
18691
18675
|
return "Can publish audio";
|
|
18692
18676
|
}
|
|
@@ -18707,7 +18691,7 @@ class Hp extends Wt {
|
|
|
18707
18691
|
});
|
|
18708
18692
|
}
|
|
18709
18693
|
}
|
|
18710
|
-
class qp extends
|
|
18694
|
+
class qp extends zt {
|
|
18711
18695
|
get description() {
|
|
18712
18696
|
return "Can publish video";
|
|
18713
18697
|
}
|
|
@@ -18728,7 +18712,7 @@ class qp extends Wt {
|
|
|
18728
18712
|
});
|
|
18729
18713
|
}
|
|
18730
18714
|
}
|
|
18731
|
-
class Gp extends
|
|
18715
|
+
class Gp extends zt {
|
|
18732
18716
|
get description() {
|
|
18733
18717
|
return "Resuming connection after interruption";
|
|
18734
18718
|
}
|
|
@@ -18740,9 +18724,9 @@ class Gp extends Wt {
|
|
|
18740
18724
|
const a = new Promise((c) => {
|
|
18741
18725
|
setTimeout(c, 5e3), r = c;
|
|
18742
18726
|
});
|
|
18743
|
-
t.on(
|
|
18727
|
+
t.on(E.Reconnecting, () => {
|
|
18744
18728
|
i = !0;
|
|
18745
|
-
}).on(
|
|
18729
|
+
}).on(E.Reconnected, () => {
|
|
18746
18730
|
s = !0, r(!0);
|
|
18747
18731
|
}), (e = t.engine.client.ws) === null || e === void 0 || e.close();
|
|
18748
18732
|
const o = t.engine.client.onClose;
|
|
@@ -18754,7 +18738,7 @@ class Gp extends Wt {
|
|
|
18754
18738
|
});
|
|
18755
18739
|
}
|
|
18756
18740
|
}
|
|
18757
|
-
class zp extends
|
|
18741
|
+
class zp extends zt {
|
|
18758
18742
|
get description() {
|
|
18759
18743
|
return "Can connect via TURN";
|
|
18760
18744
|
}
|
|
@@ -18779,14 +18763,14 @@ class zp extends Wt {
|
|
|
18779
18763
|
});
|
|
18780
18764
|
}
|
|
18781
18765
|
}
|
|
18782
|
-
class Wp extends
|
|
18766
|
+
class Wp extends zt {
|
|
18783
18767
|
get description() {
|
|
18784
18768
|
return "Establishing WebRTC connection";
|
|
18785
18769
|
}
|
|
18786
18770
|
perform() {
|
|
18787
18771
|
return f(this, void 0, void 0, function* () {
|
|
18788
18772
|
let e = !1, t = !1;
|
|
18789
|
-
this.room.on(
|
|
18773
|
+
this.room.on(E.SignalConnected, () => {
|
|
18790
18774
|
const i = this.room.engine.client.onTrickle;
|
|
18791
18775
|
this.room.engine.client.onTrickle = (s, r) => {
|
|
18792
18776
|
if (s.candidate) {
|
|
@@ -18823,7 +18807,7 @@ function Jp(n) {
|
|
|
18823
18807
|
}
|
|
18824
18808
|
return !1;
|
|
18825
18809
|
}
|
|
18826
|
-
class Kp extends
|
|
18810
|
+
class Kp extends zt {
|
|
18827
18811
|
get description() {
|
|
18828
18812
|
return "Connecting to signal connection via WebSocket";
|
|
18829
18813
|
}
|
|
@@ -18975,7 +18959,7 @@ function Hr(n, e) {
|
|
|
18975
18959
|
), u, p, m = (
|
|
18976
18960
|
/*user*/
|
|
18977
18961
|
e[31].name + ""
|
|
18978
|
-
), k, v, S, O,
|
|
18962
|
+
), k, v, S, O, w, F, W, he, de;
|
|
18979
18963
|
const N = () => (
|
|
18980
18964
|
/*video_binding*/
|
|
18981
18965
|
e[15](c, l)
|
|
@@ -18987,9 +18971,9 @@ function Hr(n, e) {
|
|
|
18987
18971
|
key: n,
|
|
18988
18972
|
first: null,
|
|
18989
18973
|
c() {
|
|
18990
|
-
t = Ne("div"), i = Bs("svg"), s = Bs("path"), r =
|
|
18974
|
+
t = Ne("div"), i = Bs("svg"), s = Bs("path"), r = en(), a = Ne("div"), o = Ne("div"), c = Ne("video"), u = en(), p = Ne("div"), k = ps(m), S = en(), O = Ne("div"), F = en(), V(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"), V(i, "width", "23"), V(i, "viewBox", "0 0 27 24"), V(i, "fill", "currentColor"), V(i, "aria-hidden", "true"), V(i, "xmlns", "http://www.w3.org/2000/svg"), V(i, "class", "cursor svelte-10y2zdk"), V(c, "id", d = `user-video-${/*user*/
|
|
18991
18975
|
e[31].id}`), V(c, "class", "svelte-10y2zdk"), V(o, "id", "video-container"), V(o, "class", "svelte-10y2zdk"), V(p, "class", "user-name svelte-10y2zdk"), V(a, "class", "user-label svelte-10y2zdk"), V(a, "data-cameraenabled", v = /*user*/
|
|
18992
|
-
e[31].camera_enabled), V(O, "class", "halo svelte-10y2zdk"), V(O, "data-show",
|
|
18976
|
+
e[31].camera_enabled), V(O, "class", "halo svelte-10y2zdk"), V(O, "data-show", w = /*user*/
|
|
18993
18977
|
(e[31].id == /*me*/
|
|
18994
18978
|
e[1].id && /*user*/
|
|
18995
18979
|
e[31].is_shift_key_down || /*user*/
|
|
@@ -19000,7 +18984,7 @@ function Hr(n, e) {
|
|
|
19000
18984
|
e[4] > 1), V(t, "id", W = "user-" + /*user*/
|
|
19001
18985
|
e[31].id), V(t, "class", "user svelte-10y2zdk"), V(t, "data-isself", he = /*user*/
|
|
19002
18986
|
e[31].id == /*me*/
|
|
19003
|
-
e[1].id), V(t, "data-isfocusmode",
|
|
18987
|
+
e[1].id), V(t, "data-isfocusmode", de = /*user*/
|
|
19004
18988
|
e[31].is_f_key_down), Ve(
|
|
19005
18989
|
t,
|
|
19006
18990
|
"--color",
|
|
@@ -19037,7 +19021,7 @@ function Hr(n, e) {
|
|
|
19037
19021
|
e[31].name + "") && Oc(k, m), H[0] & /*users*/
|
|
19038
19022
|
4 && v !== (v = /*user*/
|
|
19039
19023
|
e[31].camera_enabled) && V(a, "data-cameraenabled", v), H[0] & /*users, me, users_count*/
|
|
19040
|
-
22 &&
|
|
19024
|
+
22 && w !== (w = /*user*/
|
|
19041
19025
|
(e[31].id == /*me*/
|
|
19042
19026
|
e[1].id && /*user*/
|
|
19043
19027
|
e[31].is_shift_key_down || /*user*/
|
|
@@ -19045,14 +19029,14 @@ function Hr(n, e) {
|
|
|
19045
19029
|
e[1].id && /*user*/
|
|
19046
19030
|
(e[31].is_shift_key_down || /*user*/
|
|
19047
19031
|
e[31].is_mouse_down)) && /*users_count*/
|
|
19048
|
-
e[4] > 1) && V(O, "data-show",
|
|
19032
|
+
e[4] > 1) && V(O, "data-show", w), H[0] & /*users*/
|
|
19049
19033
|
4 && W !== (W = "user-" + /*user*/
|
|
19050
19034
|
e[31].id) && V(t, "id", W), H[0] & /*users, me*/
|
|
19051
19035
|
6 && he !== (he = /*user*/
|
|
19052
19036
|
e[31].id == /*me*/
|
|
19053
19037
|
e[1].id) && V(t, "data-isself", he), H[0] & /*users*/
|
|
19054
|
-
4 &&
|
|
19055
|
-
e[31].is_f_key_down) && V(t, "data-isfocusmode",
|
|
19038
|
+
4 && de !== (de = /*user*/
|
|
19039
|
+
e[31].is_f_key_down) && V(t, "data-isfocusmode", de), H[0] & /*users*/
|
|
19056
19040
|
4 && Ve(
|
|
19057
19041
|
t,
|
|
19058
19042
|
"--color",
|
|
@@ -19110,7 +19094,7 @@ function Zp(n) {
|
|
|
19110
19094
|
);
|
|
19111
19095
|
return {
|
|
19112
19096
|
c() {
|
|
19113
|
-
e = Ne("div"), s && s.c(), t =
|
|
19097
|
+
e = Ne("div"), s && s.c(), t = en(), r && r.c(), i = Rc(), V(e, "id", "liveroom-client-element"), V(e, "class", "svelte-10y2zdk");
|
|
19114
19098
|
},
|
|
19115
19099
|
m(a, o) {
|
|
19116
19100
|
Tt(a, e, o), s && s.m(e, null), Tt(a, t, o), r && r.m(a, o), Tt(a, i, o);
|
|
@@ -19121,8 +19105,8 @@ function Zp(n) {
|
|
|
19121
19105
|
a[2] ? s ? s.p(a, o) : (s = $r(a), s.c(), s.m(e, null)) : s && (s.d(1), s = null), /*isFocusMode*/
|
|
19122
19106
|
a[0] ? r || (r = qr(), r.c(), r.m(i.parentNode, i)) : r && (r.d(1), r = null);
|
|
19123
19107
|
},
|
|
19124
|
-
i:
|
|
19125
|
-
o:
|
|
19108
|
+
i: mn,
|
|
19109
|
+
o: mn,
|
|
19126
19110
|
d(a) {
|
|
19127
19111
|
a && (ut(e), ut(t), ut(i)), s && s.d(), r && r.d(a);
|
|
19128
19112
|
}
|
|
@@ -19140,14 +19124,14 @@ function hs(n) {
|
|
|
19140
19124
|
return n.tagName === "ION-CONTENT" && typeof n.scrollByPoint == "function";
|
|
19141
19125
|
}
|
|
19142
19126
|
function ef(n, e, t) {
|
|
19143
|
-
let { version: i } = e, { url: s } = e, { room_id: r } = e, { room_token: a } = e, { user_name: o = void 0 } = e, { user_color: c = void 0 } = e, d, l, u = !1, p = !1, m = Qp(), k = Yp(), v, S, O,
|
|
19127
|
+
let { version: i } = e, { url: s } = e, { room_id: r } = e, { room_token: a } = e, { user_name: o = void 0 } = e, { user_color: c = void 0 } = e, d, l, u = !1, p = !1, m = Qp(), k = Yp(), v, S, O, w, F = {}, W;
|
|
19144
19128
|
xc(async () => {
|
|
19145
|
-
console.log(`[Liveroom] Starting in room '${r}' (user name: '${o}')... (v${i})`),
|
|
19129
|
+
console.log(`[Liveroom] Starting in room '${r}' (user name: '${o}')... (v${i})`), de();
|
|
19146
19130
|
}), Ac(() => {
|
|
19147
|
-
N(),
|
|
19131
|
+
N(), Jt(), t(0, p = !1);
|
|
19148
19132
|
});
|
|
19149
19133
|
async function he() {
|
|
19150
|
-
if (console.log("[LiveKit] Beginning setup..."), t(11, l = new oc({ dynacast: !0 }).on(
|
|
19134
|
+
if (console.log("[LiveKit] Beginning setup..."), t(11, l = new oc({ dynacast: !0 }).on(E.TrackSubscribed, async (R, pe, fe) => {
|
|
19151
19135
|
switch (console.log("[LiveKit] Track Subscribed", R, pe, fe), console.table({
|
|
19152
19136
|
identity: fe.identity,
|
|
19153
19137
|
source: pe.source
|
|
@@ -19160,11 +19144,11 @@ function ef(n, e, t) {
|
|
|
19160
19144
|
}
|
|
19161
19145
|
})), console.log("[LiveKit] Created room", l.name), !O)
|
|
19162
19146
|
throw new Error("LiveKit websocket URL not set");
|
|
19163
|
-
if (!
|
|
19147
|
+
if (!w)
|
|
19164
19148
|
throw new Error("LiveKit token not set");
|
|
19165
|
-
console.log(`[LiveKit] Connecting to '${O}'...`), await l.connect(O,
|
|
19149
|
+
console.log(`[LiveKit] Connecting to '${O}'...`), await l.connect(O, w, { autoSubscribe: !0 }), console.log("[LiveKit] Connected to room", l.name);
|
|
19166
19150
|
}
|
|
19167
|
-
function
|
|
19151
|
+
function de() {
|
|
19168
19152
|
console.log(`[Liveroom] Starting session on room ${r}`), d = new Wd({
|
|
19169
19153
|
url: s,
|
|
19170
19154
|
topic: `liveroom-livestate:rooms:${r}`,
|
|
@@ -19204,7 +19188,7 @@ function ef(n, e, t) {
|
|
|
19204
19188
|
}
|
|
19205
19189
|
}
|
|
19206
19190
|
}), d.addEventListener("wheel-from-another-user", ({ detail: { delta_x: R, delta_y: pe, x: fe, y: Y } }) => {
|
|
19207
|
-
const
|
|
19191
|
+
const be = parseInt(R), Pt = parseInt(pe), le = new WheelEvent(
|
|
19208
19192
|
"wheel",
|
|
19209
19193
|
{
|
|
19210
19194
|
view: window,
|
|
@@ -19212,15 +19196,15 @@ function ef(n, e, t) {
|
|
|
19212
19196
|
cancelable: !0,
|
|
19213
19197
|
clientX: window.innerWidth * parseFloat(fe) / 100,
|
|
19214
19198
|
clientY: window.innerHeight * parseFloat(Y) / 100,
|
|
19215
|
-
deltaX:
|
|
19199
|
+
deltaX: be,
|
|
19216
19200
|
deltaY: Pt,
|
|
19217
19201
|
deltaMode: 0
|
|
19218
19202
|
}
|
|
19219
|
-
),
|
|
19220
|
-
|
|
19221
|
-
const Rt = document.elementFromPoint(
|
|
19222
|
-
if (
|
|
19223
|
-
if (Math.abs(Pt) >= Math.abs(
|
|
19203
|
+
), xn = document.head.contains(k);
|
|
19204
|
+
xn && document.head.removeChild(k);
|
|
19205
|
+
const Rt = document.elementFromPoint(le.clientX, le.clientY);
|
|
19206
|
+
if (xn && document.head.appendChild(k), Rt instanceof HTMLElement || Rt instanceof SVGElement)
|
|
19207
|
+
if (Math.abs(Pt) >= Math.abs(be)) {
|
|
19224
19208
|
const We = us(Rt, "vertical");
|
|
19225
19209
|
hs(We) ? We.scrollByPoint(0, Pt, 0) : We.scrollBy({
|
|
19226
19210
|
top: Pt,
|
|
@@ -19229,9 +19213,9 @@ function ef(n, e, t) {
|
|
|
19229
19213
|
});
|
|
19230
19214
|
} else {
|
|
19231
19215
|
const We = us(Rt, "horizontal");
|
|
19232
|
-
hs(We) ? We.scrollByPoint(
|
|
19216
|
+
hs(We) ? We.scrollByPoint(be, 0, 0) : We.scrollBy({
|
|
19233
19217
|
top: 0,
|
|
19234
|
-
left:
|
|
19218
|
+
left: be,
|
|
19235
19219
|
behavior: "instant"
|
|
19236
19220
|
});
|
|
19237
19221
|
}
|
|
@@ -19248,15 +19232,15 @@ function ef(n, e, t) {
|
|
|
19248
19232
|
}
|
|
19249
19233
|
), Y = document.head.contains(k);
|
|
19250
19234
|
Y && document.head.removeChild(k);
|
|
19251
|
-
const
|
|
19252
|
-
|
|
19235
|
+
const be = document.elementFromPoint(fe.clientX, fe.clientY);
|
|
19236
|
+
be == null || be.dispatchEvent(fe), Y && document.head.appendChild(k);
|
|
19253
19237
|
}), d.addEventListener("livestate-change", ({ detail: { state: R } }) => {
|
|
19254
19238
|
var pe, fe;
|
|
19255
|
-
(pe = R == null ? void 0 : R.me) != null && pe.name && R.me.name != (v == null ? void 0 : v.name) && (sessionStorage == null || sessionStorage.setItem(Tc, R.me.name)), (fe = R == null ? void 0 : R.me) != null && fe.color && R.me.color != (v == null ? void 0 : v.color) && (sessionStorage == null || sessionStorage.setItem(Cc, R.me.color)), t(5, r = R.room_id), t(1, v = R.me), t(2, S = R.users), t(13, O = R.livekit_ws_url), t(14,
|
|
19256
|
-
}), d.connect(), window.addEventListener("mousemove", X), window.addEventListener("mousedown", A), window.addEventListener("mouseup", H), window.addEventListener("keydown", Be), window.addEventListener("keyup",
|
|
19239
|
+
(pe = R == null ? void 0 : R.me) != null && pe.name && R.me.name != (v == null ? void 0 : v.name) && (sessionStorage == null || sessionStorage.setItem(Tc, R.me.name)), (fe = R == null ? void 0 : R.me) != null && fe.color && R.me.color != (v == null ? void 0 : v.color) && (sessionStorage == null || sessionStorage.setItem(Cc, R.me.color)), t(5, r = R.room_id), t(1, v = R.me), t(2, S = R.users), t(13, O = R.livekit_ws_url), t(14, w = R.livekit_token);
|
|
19240
|
+
}), d.connect(), window.addEventListener("mousemove", X), window.addEventListener("mousedown", A), window.addEventListener("mouseup", H), window.addEventListener("keydown", Be), window.addEventListener("keyup", Wt), window.addEventListener("resize", wt);
|
|
19257
19241
|
}
|
|
19258
19242
|
function N() {
|
|
19259
|
-
window.removeEventListener("resize", wt), window.removeEventListener("keyup",
|
|
19243
|
+
window.removeEventListener("resize", wt), window.removeEventListener("keyup", Wt), window.removeEventListener("keydown", Be), window.removeEventListener("mouseup", H), window.removeEventListener("mousedown", A), window.removeEventListener("mousemove", X), d == null || d.disconnect(), d = void 0, l == null || l.disconnect(), t(11, l = void 0);
|
|
19260
19244
|
}
|
|
19261
19245
|
function X(R) {
|
|
19262
19246
|
d && (v != null && v.id) && d.dispatchEvent(new CustomEvent(
|
|
@@ -19286,7 +19270,7 @@ function ef(n, e, t) {
|
|
|
19286
19270
|
function Be(R) {
|
|
19287
19271
|
!R.repeat && ze.includes(R.key) && d && (v != null && v.id) && d.dispatchEvent(new CustomEvent("key_down", { detail: { key: R.key, user_id: v.id } }));
|
|
19288
19272
|
}
|
|
19289
|
-
function
|
|
19273
|
+
function Wt(R) {
|
|
19290
19274
|
ze.includes(R.key) && d && (v != null && v.id) && d.dispatchEvent(new CustomEvent("key_up", { detail: { key: R.key, user_id: v.id } }));
|
|
19291
19275
|
}
|
|
19292
19276
|
function wt() {
|
|
@@ -19311,13 +19295,13 @@ function ef(n, e, t) {
|
|
|
19311
19295
|
100
|
|
19312
19296
|
);
|
|
19313
19297
|
}
|
|
19314
|
-
function
|
|
19298
|
+
function On() {
|
|
19315
19299
|
document.head.appendChild(m), document.head.appendChild(k), t(12, u = !0);
|
|
19316
19300
|
}
|
|
19317
|
-
function
|
|
19301
|
+
function Jt() {
|
|
19318
19302
|
document.head.removeChild(m), document.head.removeChild(k), t(12, u = !1);
|
|
19319
19303
|
}
|
|
19320
|
-
function
|
|
19304
|
+
function Mn(R, pe) {
|
|
19321
19305
|
Ai[R ? "unshift" : "push"](() => {
|
|
19322
19306
|
F[pe.id] = R, t(3, F);
|
|
19323
19307
|
});
|
|
@@ -19326,10 +19310,10 @@ function ef(n, e, t) {
|
|
|
19326
19310
|
"version" in R && t(6, i = R.version), "url" in R && t(7, s = R.url), "room_id" in R && t(5, r = R.room_id), "room_token" in R && t(8, a = R.room_token), "user_name" in R && t(9, o = R.user_name), "user_color" in R && t(10, c = R.user_color);
|
|
19327
19311
|
}, n.$$.update = () => {
|
|
19328
19312
|
n.$$.dirty[0] & /*livekitRoom, me, users, livekit_ws_url, livekit_token*/
|
|
19329
|
-
26630 && !l && v && S && O &&
|
|
19313
|
+
26630 && !l && v && S && O && w && he(), n.$$.dirty[0] & /*users*/
|
|
19330
19314
|
4 && t(4, W = Object.keys(S || {}).length), n.$$.dirty[0] & /*isClickBlocked, users*/
|
|
19331
|
-
4100 && !u && S && Object.values(S).some((R) => R.type == "admin" && R.is_b_key_down) &&
|
|
19332
|
-
4100 && u && S && Object.values(S).filter((R) => R.type == "admin").every((R) => !R.is_b_key_down) &&
|
|
19315
|
+
4100 && !u && S && Object.values(S).some((R) => R.type == "admin" && R.is_b_key_down) && On(), n.$$.dirty[0] & /*isClickBlocked, users*/
|
|
19316
|
+
4100 && u && S && Object.values(S).filter((R) => R.type == "admin").every((R) => !R.is_b_key_down) && Jt(), n.$$.dirty[0] & /*isFocusMode, users*/
|
|
19333
19317
|
5 && !p && S && Object.values(S).some((R) => R.type == "admin" && R.is_f_key_down) && t(0, p = !0), n.$$.dirty[0] & /*isFocusMode, users*/
|
|
19334
19318
|
5 && p && S && Object.values(S).filter((R) => R.type == "admin").every((R) => !R.is_f_key_down) && t(0, p = !1);
|
|
19335
19319
|
}, [
|
|
@@ -19347,8 +19331,8 @@ function ef(n, e, t) {
|
|
|
19347
19331
|
l,
|
|
19348
19332
|
u,
|
|
19349
19333
|
O,
|
|
19350
|
-
|
|
19351
|
-
|
|
19334
|
+
w,
|
|
19335
|
+
Mn
|
|
19352
19336
|
];
|
|
19353
19337
|
}
|
|
19354
19338
|
class tf extends zc {
|