@avaturn-live/web-sdk 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +22 -35
- package/dist/main.d.ts +22 -8
- package/dist/main.js +401 -430
- package/dist/type.d.ts +6 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ea = Object.defineProperty;
|
|
2
2
|
var ta = (t, e, n) => e in t ? ea(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var
|
|
3
|
+
var H = (t, e, n) => ta(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
function Gr(t, e) {
|
|
5
5
|
if (t == null) return {};
|
|
6
6
|
var n, r, i = function(a, c) {
|
|
@@ -38,14 +38,14 @@ function js(t) {
|
|
|
38
38
|
}(t, "string");
|
|
39
39
|
return U(e) === "symbol" ? e : String(e);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Hr(t, e) {
|
|
42
42
|
for (var n = 0; n < e.length; n++) {
|
|
43
43
|
var r = e[n];
|
|
44
44
|
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, js(r.key), r);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
function fe(t, e, n) {
|
|
48
|
-
return e &&
|
|
48
|
+
return e && Hr(t.prototype, e), n && Hr(t, n), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
49
49
|
}
|
|
50
50
|
function Se(t) {
|
|
51
51
|
if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -70,10 +70,10 @@ function de(t) {
|
|
|
70
70
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
71
71
|
}, de(t);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function Ae(t, e, n) {
|
|
74
74
|
return (e = js(e)) in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function zr(t, e, n, r, i, s, a) {
|
|
77
77
|
try {
|
|
78
78
|
var c = t[s](a), l = c.value;
|
|
79
79
|
} catch (p) {
|
|
@@ -87,10 +87,10 @@ function O(t) {
|
|
|
87
87
|
return new Promise(function(r, i) {
|
|
88
88
|
var s = t.apply(e, n);
|
|
89
89
|
function a(l) {
|
|
90
|
-
|
|
90
|
+
zr(s, r, i, a, c, "next", l);
|
|
91
91
|
}
|
|
92
92
|
function c(l) {
|
|
93
|
-
|
|
93
|
+
zr(s, r, i, a, c, "throw", l);
|
|
94
94
|
}
|
|
95
95
|
a(void 0);
|
|
96
96
|
});
|
|
@@ -167,7 +167,7 @@ na.exports = j, Ee.once = function(t, e) {
|
|
|
167
167
|
});
|
|
168
168
|
}, j.EventEmitter = j, j.prototype._events = void 0, j.prototype._eventsCount = 0, j.prototype._maxListeners = void 0;
|
|
169
169
|
var Qr = 10;
|
|
170
|
-
function
|
|
170
|
+
function zt(t) {
|
|
171
171
|
if (typeof t != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
172
172
|
}
|
|
173
173
|
function Bs(t) {
|
|
@@ -175,7 +175,7 @@ function Bs(t) {
|
|
|
175
175
|
}
|
|
176
176
|
function Xr(t, e, n, r) {
|
|
177
177
|
var i, s, a, c;
|
|
178
|
-
if (
|
|
178
|
+
if (zt(n), (s = t._events) === void 0 ? (s = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (s.newListener !== void 0 && (t.emit("newListener", e, n.listener ? n.listener : n), s = t._events), a = s[e]), a === void 0) a = s[e] = n, ++t._eventsCount;
|
|
179
179
|
else if (typeof a == "function" ? a = s[e] = r ? [n, a] : [a, n] : r ? a.unshift(n) : a.push(n), (i = Bs(t)) > 0 && a.length > i && !a.warned) {
|
|
180
180
|
a.warned = !0;
|
|
181
181
|
var l = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
@@ -257,12 +257,12 @@ Object.defineProperty(j, "defaultMaxListeners", { enumerable: !0, get: function(
|
|
|
257
257
|
}, j.prototype.on = j.prototype.addListener, j.prototype.prependListener = function(t, e) {
|
|
258
258
|
return Xr(this, t, e, !0);
|
|
259
259
|
}, j.prototype.once = function(t, e) {
|
|
260
|
-
return
|
|
260
|
+
return zt(e), this.on(t, Zr(this, t, e)), this;
|
|
261
261
|
}, j.prototype.prependOnceListener = function(t, e) {
|
|
262
|
-
return
|
|
262
|
+
return zt(e), this.prependListener(t, Zr(this, t, e)), this;
|
|
263
263
|
}, j.prototype.removeListener = function(t, e) {
|
|
264
264
|
var n, r, i, s, a;
|
|
265
|
-
if (
|
|
265
|
+
if (zt(e), (r = this._events) === void 0) return this;
|
|
266
266
|
if ((n = r[t]) === void 0) return this;
|
|
267
267
|
if (n === e || n.listener === e) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete r[t], r.removeListener && this.emit("removeListener", t, n.listener || e));
|
|
268
268
|
else if (typeof n != "function") {
|
|
@@ -860,7 +860,7 @@ function Js(t) {
|
|
|
860
860
|
case "[object DOMException]":
|
|
861
861
|
return !0;
|
|
862
862
|
default:
|
|
863
|
-
return
|
|
863
|
+
return He(t, Error);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
function lt(t, e) {
|
|
@@ -882,12 +882,12 @@ function ot(t) {
|
|
|
882
882
|
return lt(t, "Object");
|
|
883
883
|
}
|
|
884
884
|
function Zt(t) {
|
|
885
|
-
return typeof Event < "u" &&
|
|
885
|
+
return typeof Event < "u" && He(t, Event);
|
|
886
886
|
}
|
|
887
887
|
function mr(t) {
|
|
888
888
|
return !!(t && t.then && typeof t.then == "function");
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function He(t, e) {
|
|
891
891
|
try {
|
|
892
892
|
return t instanceof e;
|
|
893
893
|
} catch {
|
|
@@ -917,7 +917,7 @@ function Dt(t, e = [], n = !1) {
|
|
|
917
917
|
return e.some((r) => ua(t, r, n));
|
|
918
918
|
}
|
|
919
919
|
function da(t, e, n = 250, r, i, s, a) {
|
|
920
|
-
if (!(s.exception && s.exception.values && a &&
|
|
920
|
+
if (!(s.exception && s.exception.values && a && He(a.originalException, Error))) return;
|
|
921
921
|
const c = s.exception.values.length > 0 ? s.exception.values[s.exception.values.length - 1] : void 0;
|
|
922
922
|
var l, p;
|
|
923
923
|
c && (s.exception.values = (l = Fn(t, e, i, a.originalException, r, s.exception.values, c, 0), p = n, l.map((h) => (h.value && (h.value = et(h.value, p)), h))));
|
|
@@ -925,13 +925,13 @@ function da(t, e, n = 250, r, i, s, a) {
|
|
|
925
925
|
function Fn(t, e, n, r, i, s, a, c) {
|
|
926
926
|
if (s.length >= n + 1) return s;
|
|
927
927
|
let l = [...s];
|
|
928
|
-
if (
|
|
928
|
+
if (He(r[i], Error)) {
|
|
929
929
|
ci(a, c);
|
|
930
930
|
const p = t(e, r[i]), h = l.length;
|
|
931
931
|
li(p, i, h, c), l = Fn(t, e, n, r[i], i, [p, ...l], p, h);
|
|
932
932
|
}
|
|
933
933
|
return Array.isArray(r.errors) && r.errors.forEach((p, h) => {
|
|
934
|
-
if (
|
|
934
|
+
if (He(p, Error)) {
|
|
935
935
|
ci(a, c);
|
|
936
936
|
const f = t(e, p), _ = l.length;
|
|
937
937
|
li(f, `errors[${h}]`, _, c), l = Fn(t, e, n, p, i, [f, ...l], f, _);
|
|
@@ -950,14 +950,14 @@ function Lt(t) {
|
|
|
950
950
|
const ie = typeof globalThis == "object" && Lt(globalThis) || typeof window == "object" && Lt(window) || typeof self == "object" && Lt(self) || typeof global == "object" && Lt(global) || /* @__PURE__ */ function() {
|
|
951
951
|
return this;
|
|
952
952
|
}() || {};
|
|
953
|
-
function
|
|
953
|
+
function At() {
|
|
954
954
|
return ie;
|
|
955
955
|
}
|
|
956
956
|
function gr(t, e, n) {
|
|
957
957
|
const r = n || ie, i = r.__SENTRY__ = r.__SENTRY__ || {};
|
|
958
958
|
return i[t] || (i[t] = e());
|
|
959
959
|
}
|
|
960
|
-
const ha =
|
|
960
|
+
const ha = At(), pa = 80;
|
|
961
961
|
function Un(t, e = {}) {
|
|
962
962
|
try {
|
|
963
963
|
let n = t;
|
|
@@ -1060,7 +1060,7 @@ function z(t, e, n) {
|
|
|
1060
1060
|
if (!(e in t)) return;
|
|
1061
1061
|
const r = t[e], i = n(r);
|
|
1062
1062
|
if (typeof i == "function") try {
|
|
1063
|
-
|
|
1063
|
+
Hs(i, r);
|
|
1064
1064
|
} catch {
|
|
1065
1065
|
}
|
|
1066
1066
|
t[e] = i;
|
|
@@ -1068,24 +1068,24 @@ function z(t, e, n) {
|
|
|
1068
1068
|
function vr(t, e, n) {
|
|
1069
1069
|
Object.defineProperty(t, e, { value: n, writable: !0, configurable: !0 });
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function Hs(t, e) {
|
|
1072
1072
|
const n = e.prototype || {};
|
|
1073
1073
|
t.prototype = e.prototype = n, vr(t, "__sentry_original__", e);
|
|
1074
1074
|
}
|
|
1075
1075
|
function yr(t) {
|
|
1076
1076
|
return t.__sentry_original__;
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1078
|
+
function zs(t) {
|
|
1079
1079
|
if (Js(t)) return { message: t.message, name: t.name, stack: t.stack, ...pi(t) };
|
|
1080
1080
|
if (Zt(t)) {
|
|
1081
1081
|
const e = { type: t.type, target: hi(t.target), currentTarget: hi(t.currentTarget), ...pi(t) };
|
|
1082
|
-
return typeof CustomEvent < "u" &&
|
|
1082
|
+
return typeof CustomEvent < "u" && He(t, CustomEvent) && (e.detail = t.detail), e;
|
|
1083
1083
|
}
|
|
1084
1084
|
return t;
|
|
1085
1085
|
}
|
|
1086
1086
|
function hi(t) {
|
|
1087
1087
|
try {
|
|
1088
|
-
return e = t, typeof Element < "u" &&
|
|
1088
|
+
return e = t, typeof Element < "u" && He(e, Element) ? Un(t) : Object.prototype.toString.call(t);
|
|
1089
1089
|
} catch {
|
|
1090
1090
|
return "<unknown>";
|
|
1091
1091
|
}
|
|
@@ -1129,7 +1129,7 @@ function Le(t) {
|
|
|
1129
1129
|
return fi;
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
const wn =
|
|
1132
|
+
const wn = At();
|
|
1133
1133
|
function Vn(t) {
|
|
1134
1134
|
return t && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
|
|
1135
1135
|
}
|
|
@@ -1153,7 +1153,7 @@ function va() {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
return t;
|
|
1155
1155
|
}
|
|
1156
|
-
const Nt =
|
|
1156
|
+
const Nt = At(), V = At(), vt = "__sentry_xhr_v2__", _t = {}, mi = {};
|
|
1157
1157
|
function ya(t) {
|
|
1158
1158
|
if (!mi[t]) switch (mi[t] = !0, t) {
|
|
1159
1159
|
case "console":
|
|
@@ -1353,7 +1353,7 @@ function xe() {
|
|
|
1353
1353
|
function Ws(t) {
|
|
1354
1354
|
return t.exception && t.exception.values ? t.exception.values[0] : void 0;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function Pe(t) {
|
|
1357
1357
|
const { message: e, event_id: n } = t;
|
|
1358
1358
|
if (e) return e;
|
|
1359
1359
|
const r = Ws(t);
|
|
@@ -1411,24 +1411,24 @@ function Gn(t, e, n = 1 / 0, r = 1 / 0, i = /* @__PURE__ */ function() {
|
|
|
1411
1411
|
const [s, a] = i;
|
|
1412
1412
|
if (e == null || ["number", "boolean", "string"].includes(typeof e) && (typeof (c = e) != "number" || c == c)) return e;
|
|
1413
1413
|
var c;
|
|
1414
|
-
const l = function(v,
|
|
1414
|
+
const l = function(v, w) {
|
|
1415
1415
|
try {
|
|
1416
|
-
if (v === "domain" &&
|
|
1416
|
+
if (v === "domain" && w && typeof w == "object" && w._events) return "[Domain]";
|
|
1417
1417
|
if (v === "domainEmitter") return "[DomainEmitter]";
|
|
1418
|
-
if (typeof global < "u" &&
|
|
1419
|
-
if (typeof window < "u" &&
|
|
1420
|
-
if (typeof document < "u" &&
|
|
1418
|
+
if (typeof global < "u" && w === global) return "[Global]";
|
|
1419
|
+
if (typeof window < "u" && w === window) return "[Window]";
|
|
1420
|
+
if (typeof document < "u" && w === document) return "[Document]";
|
|
1421
1421
|
if (function(M) {
|
|
1422
1422
|
return ot(M) && "nativeEvent" in M && "preventDefault" in M && "stopPropagation" in M;
|
|
1423
|
-
}(
|
|
1424
|
-
if (typeof
|
|
1425
|
-
if (typeof
|
|
1426
|
-
if (typeof
|
|
1427
|
-
if (typeof
|
|
1423
|
+
}(w)) return "[SyntheticEvent]";
|
|
1424
|
+
if (typeof w == "number" && w != w) return "[NaN]";
|
|
1425
|
+
if (typeof w == "function") return `[Function: ${Le(w)}]`;
|
|
1426
|
+
if (typeof w == "symbol") return `[${String(w)}]`;
|
|
1427
|
+
if (typeof w == "bigint") return `[BigInt: ${String(w)}]`;
|
|
1428
1428
|
const T = function(M) {
|
|
1429
1429
|
const B = Object.getPrototypeOf(M);
|
|
1430
1430
|
return B ? B.constructor.name : "null prototype";
|
|
1431
|
-
}(
|
|
1431
|
+
}(w);
|
|
1432
1432
|
return /^HTML(\w*)Element$/.test(T) ? `[HTMLElement: ${T}]` : `[object ${T}]`;
|
|
1433
1433
|
} catch (T) {
|
|
1434
1434
|
return `**non-serializable** (${T})`;
|
|
@@ -1446,20 +1446,20 @@ function Gn(t, e, n = 1 / 0, r = 1 / 0, i = /* @__PURE__ */ function() {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
const f = Array.isArray(e) ? [] : {};
|
|
1448
1448
|
let _ = 0;
|
|
1449
|
-
const k =
|
|
1449
|
+
const k = zs(e);
|
|
1450
1450
|
for (const v in k) {
|
|
1451
1451
|
if (!Object.prototype.hasOwnProperty.call(k, v)) continue;
|
|
1452
1452
|
if (_ >= r) {
|
|
1453
1453
|
f[v] = "[MaxProperties ~]";
|
|
1454
1454
|
break;
|
|
1455
1455
|
}
|
|
1456
|
-
const
|
|
1457
|
-
f[v] = Gn(v,
|
|
1456
|
+
const w = k[v];
|
|
1457
|
+
f[v] = Gn(v, w, p - 1, r, i), _++;
|
|
1458
1458
|
}
|
|
1459
1459
|
return a(e), f;
|
|
1460
1460
|
}
|
|
1461
1461
|
var ke;
|
|
1462
|
-
function
|
|
1462
|
+
function ze(t) {
|
|
1463
1463
|
return new Q((e) => {
|
|
1464
1464
|
e(t);
|
|
1465
1465
|
});
|
|
@@ -1564,7 +1564,7 @@ function ba(t) {
|
|
|
1564
1564
|
r && r > 0 && i(!1);
|
|
1565
1565
|
}, r);
|
|
1566
1566
|
e.forEach((l) => {
|
|
1567
|
-
|
|
1567
|
+
ze(l).then(() => {
|
|
1568
1568
|
--a || (clearTimeout(c), i(!0));
|
|
1569
1569
|
}, s);
|
|
1570
1570
|
});
|
|
@@ -1578,7 +1578,7 @@ function kn(t) {
|
|
|
1578
1578
|
const n = e[6] || "", r = e[8] || "";
|
|
1579
1579
|
return { host: e[4], path: e[5], protocol: e[2], search: n, hash: r, relative: e[5] + n + r };
|
|
1580
1580
|
}
|
|
1581
|
-
const wa = ["fatal", "error", "warning", "log", "info", "debug"], Ks =
|
|
1581
|
+
const wa = ["fatal", "error", "warning", "log", "info", "debug"], Ks = At(), Hn = { nowSeconds: () => Date.now() / 1e3 }, En = typeof __SENTRY_BROWSER_BUNDLE__ < "u" && __SENTRY_BROWSER_BUNDLE__ || Object.prototype.toString.call(typeof process < "u" ? process : 0) !== "[object process]" ? function() {
|
|
1582
1582
|
const { performance: t } = Ks;
|
|
1583
1583
|
if (!(!t || !t.now))
|
|
1584
1584
|
return { now: () => t.now(), timeOrigin: Date.now() - t.now() };
|
|
@@ -1589,7 +1589,7 @@ const wa = ["fatal", "error", "warning", "log", "info", "debug"], Ks = Pt(), zn
|
|
|
1589
1589
|
return;
|
|
1590
1590
|
}
|
|
1591
1591
|
var t, e;
|
|
1592
|
-
}(), _i = En === void 0 ?
|
|
1592
|
+
}(), _i = En === void 0 ? Hn : { nowSeconds: () => (En.timeOrigin + En.now()) / 1e3 }, pn = Hn.nowSeconds.bind(Hn), Qs = _i.nowSeconds.bind(_i);
|
|
1593
1593
|
function Et(t, e = []) {
|
|
1594
1594
|
return [t, e];
|
|
1595
1595
|
}
|
|
@@ -1603,14 +1603,14 @@ function bi(t, e) {
|
|
|
1603
1603
|
if (e(r, r[0].type)) return !0;
|
|
1604
1604
|
return !1;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function zn(t, e) {
|
|
1607
1607
|
return (e || new TextEncoder()).encode(t);
|
|
1608
1608
|
}
|
|
1609
1609
|
function ka(t, e) {
|
|
1610
1610
|
const [n, r] = t;
|
|
1611
1611
|
let i = JSON.stringify(n);
|
|
1612
1612
|
function s(a) {
|
|
1613
|
-
typeof i == "string" ? i = typeof a == "string" ? i + a : [
|
|
1613
|
+
typeof i == "string" ? i = typeof a == "string" ? i + a : [zn(i, e), a] : i.push(typeof a == "string" ? zn(a, e) : a);
|
|
1614
1614
|
}
|
|
1615
1615
|
for (const a of r) {
|
|
1616
1616
|
const [c, l] = a;
|
|
@@ -1635,7 +1635,7 @@ ${JSON.stringify(c)}
|
|
|
1635
1635
|
}(i);
|
|
1636
1636
|
}
|
|
1637
1637
|
function Ea(t, e) {
|
|
1638
|
-
const n = typeof t.data == "string" ?
|
|
1638
|
+
const n = typeof t.data == "string" ? zn(t.data, e) : t.data;
|
|
1639
1639
|
return [hn({ type: "attachment", length: n.length, filename: t.filename, content_type: t.contentType, attachment_type: t.attachmentType }), n];
|
|
1640
1640
|
}
|
|
1641
1641
|
(() => {
|
|
@@ -1833,7 +1833,7 @@ function eo(t) {
|
|
|
1833
1833
|
function Si() {
|
|
1834
1834
|
return { traceId: xe(), spanId: xe().substring(16), sampled: !1 };
|
|
1835
1835
|
}
|
|
1836
|
-
const to = 4,
|
|
1836
|
+
const to = 4, Aa = 100;
|
|
1837
1837
|
class br {
|
|
1838
1838
|
constructor(e, n = new Ve(), r = to) {
|
|
1839
1839
|
this._version = r, this._stack = [{ scope: n }], e && this.bindClient(e);
|
|
@@ -1895,7 +1895,7 @@ class br {
|
|
|
1895
1895
|
addBreadcrumb(e, n) {
|
|
1896
1896
|
const { scope: r, client: i } = this.getStackTop();
|
|
1897
1897
|
if (!i) return;
|
|
1898
|
-
const { beforeBreadcrumb: s = null, maxBreadcrumbs: a =
|
|
1898
|
+
const { beforeBreadcrumb: s = null, maxBreadcrumbs: a = Aa } = i.getOptions && i.getOptions() || {};
|
|
1899
1899
|
if (a <= 0) return;
|
|
1900
1900
|
const c = { timestamp: pn(), ...e }, l = s ? Gs(() => s(c, n)) : c;
|
|
1901
1901
|
l !== null && (i.emit && i.emit("beforeAddBreadcrumb", l, n), r.addBreadcrumb(l, a));
|
|
@@ -2007,9 +2007,9 @@ function Wn(t) {
|
|
|
2007
2007
|
function no(t, e) {
|
|
2008
2008
|
return t ? ((t.__SENTRY__ = t.__SENTRY__ || {}).hub = e, !0) : !1;
|
|
2009
2009
|
}
|
|
2010
|
-
const
|
|
2010
|
+
const Pa = "7";
|
|
2011
2011
|
function Ra(t, e) {
|
|
2012
|
-
return n = { sentry_key: t.publicKey, sentry_version:
|
|
2012
|
+
return n = { sentry_key: t.publicKey, sentry_version: Pa, ...e && { sentry_client: `${e.name}/${e.version}` } }, Object.keys(n).map((r) => `${encodeURIComponent(r)}=${encodeURIComponent(n[r])}`).join("&");
|
|
2013
2013
|
var n;
|
|
2014
2014
|
}
|
|
2015
2015
|
function xa(t, e, n, r) {
|
|
@@ -2030,12 +2030,12 @@ function Ti(t, e) {
|
|
|
2030
2030
|
function Da(t, e, n, r) {
|
|
2031
2031
|
const { normalizeDepth: i = 3, normalizeMaxBreadth: s = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || xe(), timestamp: e.timestamp || pn() }, c = n.integrations || t.integrations.map((h) => h.name);
|
|
2032
2032
|
(function(h, f) {
|
|
2033
|
-
const { environment: _, release: k, dist: v, maxValueLength:
|
|
2034
|
-
"environment" in h || (h.environment = "environment" in f ? _ : _r), h.release === void 0 && k !== void 0 && (h.release = k), h.dist === void 0 && v !== void 0 && (h.dist = v), h.message && (h.message = et(h.message,
|
|
2033
|
+
const { environment: _, release: k, dist: v, maxValueLength: w = 250 } = f;
|
|
2034
|
+
"environment" in h || (h.environment = "environment" in f ? _ : _r), h.release === void 0 && k !== void 0 && (h.release = k), h.dist === void 0 && v !== void 0 && (h.dist = v), h.message && (h.message = et(h.message, w));
|
|
2035
2035
|
const T = h.exception && h.exception.values && h.exception.values[0];
|
|
2036
|
-
T && T.value && (T.value = et(T.value,
|
|
2036
|
+
T && T.value && (T.value = et(T.value, w));
|
|
2037
2037
|
const M = h.request;
|
|
2038
|
-
M && M.url && (M.url = et(M.url,
|
|
2038
|
+
M && M.url && (M.url = et(M.url, w));
|
|
2039
2039
|
})(a, t), function(h, f) {
|
|
2040
2040
|
f.length > 0 && (h.sdk = h.sdk || {}, h.sdk.integrations = [...h.sdk.integrations || [], ...f]);
|
|
2041
2041
|
}(a, c), e.type === void 0 && function(h, f) {
|
|
@@ -2044,7 +2044,7 @@ function Da(t, e, n, r) {
|
|
|
2044
2044
|
let k;
|
|
2045
2045
|
const v = Ci.get(f);
|
|
2046
2046
|
v ? k = v : (k = /* @__PURE__ */ new Map(), Ci.set(f, k));
|
|
2047
|
-
const
|
|
2047
|
+
const w = Object.keys(_).reduce((T, M) => {
|
|
2048
2048
|
let B;
|
|
2049
2049
|
const L = k.get(M);
|
|
2050
2050
|
L ? B = L : (B = f(M), k.set(M, B));
|
|
@@ -2060,7 +2060,7 @@ function Da(t, e, n, r) {
|
|
|
2060
2060
|
try {
|
|
2061
2061
|
h.exception.values.forEach((T) => {
|
|
2062
2062
|
T.stacktrace.frames.forEach((M) => {
|
|
2063
|
-
M.filename && (M.debug_id =
|
|
2063
|
+
M.filename && (M.debug_id = w[M.filename]);
|
|
2064
2064
|
});
|
|
2065
2065
|
});
|
|
2066
2066
|
} catch {
|
|
@@ -2068,7 +2068,7 @@ function Da(t, e, n, r) {
|
|
|
2068
2068
|
}(a, t.stackParser);
|
|
2069
2069
|
let l = r;
|
|
2070
2070
|
n.captureContext && (l = Ve.clone(l).update(n.captureContext));
|
|
2071
|
-
let p =
|
|
2071
|
+
let p = ze(a);
|
|
2072
2072
|
if (l) {
|
|
2073
2073
|
if (l.getAttachments) {
|
|
2074
2074
|
const h = [...n.attachments || [], ...l.getAttachments()];
|
|
@@ -2080,8 +2080,8 @@ function Da(t, e, n, r) {
|
|
|
2080
2080
|
const _ = {};
|
|
2081
2081
|
try {
|
|
2082
2082
|
f.exception.values.forEach((v) => {
|
|
2083
|
-
v.stacktrace.frames.forEach((
|
|
2084
|
-
|
|
2083
|
+
v.stacktrace.frames.forEach((w) => {
|
|
2084
|
+
w.debug_id && (w.abs_path ? _[w.abs_path] = w.debug_id : w.filename && (_[w.filename] = w.debug_id), delete w.debug_id);
|
|
2085
2085
|
});
|
|
2086
2086
|
});
|
|
2087
2087
|
} catch {
|
|
@@ -2094,8 +2094,8 @@ function Da(t, e, n, r) {
|
|
|
2094
2094
|
});
|
|
2095
2095
|
}(h), typeof i == "number" && i > 0 ? function(f, _, k) {
|
|
2096
2096
|
if (!f) return null;
|
|
2097
|
-
const v = { ...f, ...f.breadcrumbs && { breadcrumbs: f.breadcrumbs.map((
|
|
2098
|
-
return f.contexts && f.contexts.trace && v.contexts && (v.contexts.trace = f.contexts.trace, f.contexts.trace.data && (v.contexts.trace.data = Re(f.contexts.trace.data, _, k))), f.spans && (v.spans = f.spans.map((
|
|
2097
|
+
const v = { ...f, ...f.breadcrumbs && { breadcrumbs: f.breadcrumbs.map((w) => ({ ...w, ...w.data && { data: Re(w.data, _, k) } })) }, ...f.user && { user: Re(f.user, _, k) }, ...f.contexts && { contexts: Re(f.contexts, _, k) }, ...f.extra && { extra: Re(f.extra, _, k) } };
|
|
2098
|
+
return f.contexts && f.contexts.trace && v.contexts && (v.contexts.trace = f.contexts.trace, f.contexts.trace.data && (v.contexts.trace.data = Re(f.contexts.trace.data, _, k))), f.spans && (v.spans = f.spans.map((w) => (w.data && (w.data = Re(w.data, _, k)), w))), v;
|
|
2099
2099
|
}(h, i, s) : h));
|
|
2100
2100
|
}
|
|
2101
2101
|
const Ci = /* @__PURE__ */ new WeakMap(), Mi = "Not capturing exception because it's already been captured.";
|
|
@@ -2167,7 +2167,7 @@ class qe {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
flush(e) {
|
|
2169
2169
|
const n = this._transport;
|
|
2170
|
-
return n ? this._isClientDoneProcessing(e).then((r) => n.flush(e).then((i) => r && i)) :
|
|
2170
|
+
return n ? this._isClientDoneProcessing(e).then((r) => n.flush(e).then((i) => r && i)) : ze(!0);
|
|
2171
2171
|
}
|
|
2172
2172
|
close(e) {
|
|
2173
2173
|
return this.flush(e).then((n) => (this.getOptions().enabled = !1, n));
|
|
@@ -2257,8 +2257,8 @@ class qe {
|
|
|
2257
2257
|
if (!(a.contexts && a.contexts.trace) && c) {
|
|
2258
2258
|
const { traceId: l, spanId: p, parentSpanId: h, dsc: f } = c;
|
|
2259
2259
|
a.contexts = { trace: { trace_id: l, span_id: p, parent_span_id: h }, ...a.contexts };
|
|
2260
|
-
const _ = f || function(k, v,
|
|
2261
|
-
const T = v.getOptions(), { publicKey: M } = v.getDsn() || {}, { segment: B } =
|
|
2260
|
+
const _ = f || function(k, v, w) {
|
|
2261
|
+
const T = v.getOptions(), { publicKey: M } = v.getDsn() || {}, { segment: B } = w && w.getUser() || {}, L = hn({ environment: T.environment || _r, release: T.release, user_segment: B, public_key: M, trace_id: k });
|
|
2262
2262
|
return v.emit && v.emit("createDsc", L), L;
|
|
2263
2263
|
}(l, this, r);
|
|
2264
2264
|
a.sdkProcessingMetadata = { dynamicSamplingContext: _, ...a.sdkProcessingMetadata };
|
|
@@ -2277,25 +2277,25 @@ class qe {
|
|
|
2277
2277
|
_processEvent(e, n, r) {
|
|
2278
2278
|
const i = this.getOptions(), { sampleRate: s } = i;
|
|
2279
2279
|
if (!this._isEnabled()) return nn(new le("SDK not enabled, will not capture event.", "log"));
|
|
2280
|
-
const a =
|
|
2280
|
+
const a = Ai(e), c = Oi(e), l = e.type || "error", p = `before send for type \`${l}\``;
|
|
2281
2281
|
if (c && typeof s == "number" && Math.random() > s) return this.recordDroppedEvent("sample_rate", "error", e), nn(new le(`Discarding event because it's not included in the random sample (sampling rate = ${s})`, "log"));
|
|
2282
2282
|
const h = l === "replay_event" ? "replay" : l;
|
|
2283
2283
|
return this._prepareEvent(e, n, r).then((f) => {
|
|
2284
2284
|
if (f === null) throw this.recordDroppedEvent("event_processor", h, e), new le("An event processor returned `null`, will not send event.", "log");
|
|
2285
2285
|
if (n.data && n.data.__sentry__ === !0) return f;
|
|
2286
|
-
const _ = function(k, v,
|
|
2286
|
+
const _ = function(k, v, w) {
|
|
2287
2287
|
const { beforeSend: T, beforeSendTransaction: M } = k;
|
|
2288
|
-
return Oi(v) && T ? T(v,
|
|
2288
|
+
return Oi(v) && T ? T(v, w) : Ai(v) && M ? M(v, w) : v;
|
|
2289
2289
|
}(i, f, n);
|
|
2290
2290
|
return function(k, v) {
|
|
2291
|
-
const
|
|
2291
|
+
const w = `${v} must return \`null\` or a valid event.`;
|
|
2292
2292
|
if (mr(k)) return k.then((T) => {
|
|
2293
|
-
if (!ot(T) && T !== null) throw new le(
|
|
2293
|
+
if (!ot(T) && T !== null) throw new le(w);
|
|
2294
2294
|
return T;
|
|
2295
2295
|
}, (T) => {
|
|
2296
2296
|
throw new le(`${v} rejected with ${T}`);
|
|
2297
2297
|
});
|
|
2298
|
-
if (!ot(k) && k !== null) throw new le(
|
|
2298
|
+
if (!ot(k) && k !== null) throw new le(w);
|
|
2299
2299
|
return k;
|
|
2300
2300
|
}(_, p);
|
|
2301
2301
|
}).then((f) => {
|
|
@@ -2333,7 +2333,7 @@ Reason: ${f}`));
|
|
|
2333
2333
|
function Oi(t) {
|
|
2334
2334
|
return t.type === void 0;
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2336
|
+
function Ai(t) {
|
|
2337
2337
|
return t.type === "transaction";
|
|
2338
2338
|
}
|
|
2339
2339
|
const La = 30;
|
|
@@ -2344,30 +2344,30 @@ function Na(t, e, n = ba(t.bufferSize || La)) {
|
|
|
2344
2344
|
if (bi(s, (p, h) => {
|
|
2345
2345
|
const f = wi(h);
|
|
2346
2346
|
if (function(_, k, v = Date.now()) {
|
|
2347
|
-
return function(
|
|
2348
|
-
return
|
|
2347
|
+
return function(w, T) {
|
|
2348
|
+
return w[T] || w.all || 0;
|
|
2349
2349
|
}(_, k) > v;
|
|
2350
2350
|
}(r, f)) {
|
|
2351
|
-
const _ =
|
|
2351
|
+
const _ = Pi(p, h);
|
|
2352
2352
|
t.recordDroppedEvent("ratelimit_backoff", f, _);
|
|
2353
2353
|
} else a.push(p);
|
|
2354
|
-
}), a.length === 0) return
|
|
2354
|
+
}), a.length === 0) return ze();
|
|
2355
2355
|
const c = Et(s[0], a), l = (p) => {
|
|
2356
2356
|
bi(c, (h, f) => {
|
|
2357
|
-
const _ =
|
|
2357
|
+
const _ = Pi(h, f);
|
|
2358
2358
|
t.recordDroppedEvent(p, wi(f), _);
|
|
2359
2359
|
});
|
|
2360
2360
|
};
|
|
2361
2361
|
return n.add(() => e({ body: ka(c, t.textEncoder) }).then((p) => (p.statusCode !== void 0 && (p.statusCode < 200 || p.statusCode >= 300) && (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.warn(`Sentry responded with status code ${p.statusCode} to sent event.`), r = Ma(r, p), p), (p) => {
|
|
2362
2362
|
throw l("network_error"), p;
|
|
2363
2363
|
})).then((p) => p, (p) => {
|
|
2364
|
-
if (p instanceof le) return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.error("Skipped sending event because buffer is full."), l("queue_overflow"),
|
|
2364
|
+
if (p instanceof le) return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.error("Skipped sending event because buffer is full."), l("queue_overflow"), ze();
|
|
2365
2365
|
throw p;
|
|
2366
2366
|
});
|
|
2367
2367
|
}
|
|
2368
2368
|
return i.__sentry__baseTransport__ = !0, { send: i, flush: (s) => n.drain(s) };
|
|
2369
2369
|
}
|
|
2370
|
-
function
|
|
2370
|
+
function Pi(t, e) {
|
|
2371
2371
|
if (e === "event" || e === "transaction") return Array.isArray(t) ? t[1] : void 0;
|
|
2372
2372
|
}
|
|
2373
2373
|
const Ri = "7.60.1";
|
|
@@ -2422,38 +2422,38 @@ class tt {
|
|
|
2422
2422
|
}
|
|
2423
2423
|
return !1;
|
|
2424
2424
|
}(h) ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.warn(`Event dropped due to being internal Sentry Error.
|
|
2425
|
-
Event: ${
|
|
2425
|
+
Event: ${Pe(h)}`), !0) : function(_, k) {
|
|
2426
2426
|
return _.type || !k || !k.length ? !1 : function(v) {
|
|
2427
2427
|
if (v.message) return [v.message];
|
|
2428
2428
|
if (v.exception) {
|
|
2429
|
-
const { values:
|
|
2429
|
+
const { values: w } = v.exception;
|
|
2430
2430
|
try {
|
|
2431
|
-
const { type: T = "", value: M = "" } =
|
|
2431
|
+
const { type: T = "", value: M = "" } = w && w[w.length - 1] || {};
|
|
2432
2432
|
return [`${M}`, `${T}: ${M}`];
|
|
2433
2433
|
} catch {
|
|
2434
|
-
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.error(`Cannot extract message for event ${
|
|
2434
|
+
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.error(`Cannot extract message for event ${Pe(v)}`), [];
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
2437
|
return [];
|
|
2438
2438
|
}(_).some((v) => Dt(v, k));
|
|
2439
2439
|
}(h, f.ignoreErrors) ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
2440
|
-
Event: ${
|
|
2440
|
+
Event: ${Pe(h)}`), !0) : function(_, k) {
|
|
2441
2441
|
if (_.type !== "transaction" || !k || !k.length) return !1;
|
|
2442
2442
|
const v = _.transaction;
|
|
2443
2443
|
return !!v && Dt(v, k);
|
|
2444
2444
|
}(h, f.ignoreTransactions) ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
2445
|
-
Event: ${
|
|
2445
|
+
Event: ${Pe(h)}`), !0) : function(_, k) {
|
|
2446
2446
|
if (!k || !k.length) return !1;
|
|
2447
2447
|
const v = Ut(_);
|
|
2448
2448
|
return !!v && Dt(v, k);
|
|
2449
2449
|
}(h, f.denyUrls) ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
2450
|
-
Event: ${
|
|
2450
|
+
Event: ${Pe(h)}.
|
|
2451
2451
|
Url: ${Ut(h)}`), !0) : function(_, k) {
|
|
2452
2452
|
if (!k || !k.length) return !0;
|
|
2453
2453
|
const v = Ut(_);
|
|
2454
2454
|
return !v || Dt(v, k);
|
|
2455
2455
|
}(h, f.allowUrls) ? !1 : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
2456
|
-
Event: ${
|
|
2456
|
+
Event: ${Pe(h)}.
|
|
2457
2457
|
Url: ${Ut(h)}`), !0);
|
|
2458
2458
|
}(i, p) ? null : i;
|
|
2459
2459
|
}
|
|
@@ -2478,7 +2478,7 @@ function Ut(t) {
|
|
|
2478
2478
|
return null;
|
|
2479
2479
|
}(e) : null;
|
|
2480
2480
|
} catch {
|
|
2481
|
-
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.error(`Cannot extract url for event ${
|
|
2481
|
+
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && R.error(`Cannot extract url for event ${Pe(t)}`), null;
|
|
2482
2482
|
}
|
|
2483
2483
|
}
|
|
2484
2484
|
tt.__initStatic();
|
|
@@ -2517,7 +2517,7 @@ function ct(t, e = {}, n) {
|
|
|
2517
2517
|
for (const i in t) Object.prototype.hasOwnProperty.call(t, i) && (r[i] = t[i]);
|
|
2518
2518
|
} catch {
|
|
2519
2519
|
}
|
|
2520
|
-
|
|
2520
|
+
Hs(r, t), vr(t, "__sentry_wrapped__", r);
|
|
2521
2521
|
try {
|
|
2522
2522
|
Object.getOwnPropertyDescriptor(r, "name").configurable && Object.defineProperty(r, "name", { get: () => t.name });
|
|
2523
2523
|
} catch {
|
|
@@ -2582,7 +2582,7 @@ function Kn(t, e, n, r) {
|
|
|
2582
2582
|
}
|
|
2583
2583
|
function qa(t, { isUnhandledRejection: e }) {
|
|
2584
2584
|
const n = function(i, s = 40) {
|
|
2585
|
-
const a = Object.keys(
|
|
2585
|
+
const a = Object.keys(zs(i));
|
|
2586
2586
|
if (a.sort(), !a.length) return "[object has no keys]";
|
|
2587
2587
|
if (a[0].length >= s) return et(a[0], s);
|
|
2588
2588
|
for (let c = a.length; c > 0; c--) {
|
|
@@ -2629,7 +2629,7 @@ class Ct {
|
|
|
2629
2629
|
}(this.options.dom)), this.options.xhr && Ue("xhr", Ja), this.options.fetch && Ue("fetch", $a), this.options.history && Ue("history", Ga);
|
|
2630
2630
|
}
|
|
2631
2631
|
addSentryBreadcrumb(e) {
|
|
2632
|
-
this.options.sentry && te().addBreadcrumb({ category: "sentry." + (e.type === "transaction" ? "transaction" : "event"), event_id: e.event_id, level: e.level, message:
|
|
2632
|
+
this.options.sentry && te().addBreadcrumb({ category: "sentry." + (e.type === "transaction" ? "transaction" : "event"), event_id: e.event_id, level: e.level, message: Pe(e) }, { event: e });
|
|
2633
2633
|
}
|
|
2634
2634
|
}
|
|
2635
2635
|
function Va(t) {
|
|
@@ -2669,7 +2669,7 @@ function Ga(t) {
|
|
|
2669
2669
|
i.path || (i = r), r.protocol === s.protocol && r.host === s.host && (n = s.relative), r.protocol === i.protocol && r.host === i.host && (e = i.relative), te().addBreadcrumb({ category: "navigation", data: { from: e, to: n } });
|
|
2670
2670
|
}
|
|
2671
2671
|
Ct.__initStatic();
|
|
2672
|
-
class
|
|
2672
|
+
class Ha extends qe {
|
|
2673
2673
|
constructor(e) {
|
|
2674
2674
|
const n = F.SENTRY_SDK_SOURCE || "npm";
|
|
2675
2675
|
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "sentry.javascript.browser", packages: [{ name: `${n}:@sentry/browser`, version: Ri }], version: Ri }, super(e), e.sendClientReports && F.document && F.document.addEventListener("visibilitychange", () => {
|
|
@@ -2679,13 +2679,13 @@ class za extends qe {
|
|
|
2679
2679
|
eventFromException(e, n) {
|
|
2680
2680
|
return function(r, i, s, a) {
|
|
2681
2681
|
const c = Sr(r, i, s && s.syntheticException || void 0, a);
|
|
2682
|
-
return kt(c), c.level = "error", s && s.event_id && (c.event_id = s.event_id),
|
|
2682
|
+
return kt(c), c.level = "error", s && s.event_id && (c.event_id = s.event_id), ze(c);
|
|
2683
2683
|
}(this._options.stackParser, e, n, this._options.attachStacktrace);
|
|
2684
2684
|
}
|
|
2685
2685
|
eventFromMessage(e, n = "info", r) {
|
|
2686
2686
|
return function(i, s, a = "info", c, l) {
|
|
2687
2687
|
const p = Kn(i, s, c && c.syntheticException || void 0, l);
|
|
2688
|
-
return p.level = a, c && c.event_id && (p.event_id = c.event_id),
|
|
2688
|
+
return p.level = a, c && c.event_id && (p.event_id = c.event_id), ze(p);
|
|
2689
2689
|
}(this._options.stackParser, e, n, r, this._options.attachStacktrace);
|
|
2690
2690
|
}
|
|
2691
2691
|
sendEvent(e, n) {
|
|
@@ -2716,7 +2716,7 @@ class za extends qe {
|
|
|
2716
2716
|
}
|
|
2717
2717
|
}
|
|
2718
2718
|
let ft;
|
|
2719
|
-
function
|
|
2719
|
+
function za(t, e = function() {
|
|
2720
2720
|
if (ft) return ft;
|
|
2721
2721
|
if (Vn(F.fetch)) return ft = F.fetch.bind(F);
|
|
2722
2722
|
const n = F.document;
|
|
@@ -2774,9 +2774,9 @@ function Wa() {
|
|
|
2774
2774
|
if (ro() || l && l.__sentry_own_request__) return;
|
|
2775
2775
|
const p = l === void 0 && Ge(i) ? function(h, f, _, k) {
|
|
2776
2776
|
const v = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
2777
|
-
let
|
|
2778
|
-
const M =
|
|
2779
|
-
return M && (T = M[1],
|
|
2777
|
+
let w = fr(h) ? h.message : h, T = "Error";
|
|
2778
|
+
const M = w.match(v);
|
|
2779
|
+
return M && (T = M[1], w = M[2]), Li({ exception: { values: [{ type: T, value: w }] } }, f, _, k);
|
|
2780
2780
|
}(i, s, a, c) : Li(Sr(n, l || i, void 0, r, !1), s, a, c);
|
|
2781
2781
|
p.level = "error", oo(e, l, p, "onerror");
|
|
2782
2782
|
});
|
|
@@ -2988,7 +2988,7 @@ var ec = Object.freeze({ __proto__: null, Breadcrumbs: Ct, Dedupe: it, GlobalHan
|
|
|
2988
2988
|
let co = {};
|
|
2989
2989
|
F.Sentry && F.Sentry.Integrations && (co = F.Sentry.Integrations);
|
|
2990
2990
|
const Ui = { ...co, ...Ba, ...ec };
|
|
2991
|
-
var qi = "new", Vi = "loading", Ji = "loaded", Qn = "joining-meeting", Qe = "joined-meeting", Ie = "left-meeting", Ce = "error", Cn = "unknown", tc = "full", nc = "base", rc = "*", ic = "iframe-ready-for-launch-config", sc = "iframe-launch-config", oc = "theme-updated", ac = "loading", cc = "load-attempt-failed", $i = "loaded", lc = "started-camera", uc = "camera-error", dc = "joining-meeting", hc = "joined-meeting", pc = "left-meeting", fc = "participant-joined", mc = "participant-updated", gc = "participant-left", vc = "participant-counts-updated", yc = "access-state-updated", _c = "meeting-session-summary-updated", bc = "meeting-session-state-updated", wc = "waiting-participant-added", Sc = "waiting-participant-updated", kc = "waiting-participant-removed", Ec = "track-started", Tc = "track-stopped", Cc = "transcription-started", Mc = "transcription-stopped", Oc = "transcription-error", Gi = "recording-started",
|
|
2991
|
+
var qi = "new", Vi = "loading", Ji = "loaded", Qn = "joining-meeting", Qe = "joined-meeting", Ie = "left-meeting", Ce = "error", Cn = "unknown", tc = "full", nc = "base", rc = "*", ic = "iframe-ready-for-launch-config", sc = "iframe-launch-config", oc = "theme-updated", ac = "loading", cc = "load-attempt-failed", $i = "loaded", lc = "started-camera", uc = "camera-error", dc = "joining-meeting", hc = "joined-meeting", pc = "left-meeting", fc = "participant-joined", mc = "participant-updated", gc = "participant-left", vc = "participant-counts-updated", yc = "access-state-updated", _c = "meeting-session-summary-updated", bc = "meeting-session-state-updated", wc = "waiting-participant-added", Sc = "waiting-participant-updated", kc = "waiting-participant-removed", Ec = "track-started", Tc = "track-stopped", Cc = "transcription-started", Mc = "transcription-stopped", Oc = "transcription-error", Gi = "recording-started", Hi = "recording-stopped", Ac = "recording-stats", Pc = "recording-error", Rc = "recording-upload-completed", xc = "recording-data", Dc = "app-message", Lc = "transcription-message", Nc = "remote-media-player-started", jc = "remote-media-player-updated", Ic = "remote-media-player-stopped", Bc = "local-screen-share-started", Fc = "local-screen-share-stopped", Uc = "local-screen-share-canceled", qc = "active-speaker-change", Vc = "active-speaker-mode-change", Jc = "network-quality-change", $c = "network-connection", Gc = "cpu-load-change", Hc = "face-counts-updated", qt = "fullscreen", Vt = "exited-fullscreen", zc = "live-streaming-started", Wc = "live-streaming-updated", Yc = "live-streaming-stopped", Kc = "live-streaming-error", Qc = "lang-updated", Xc = "receive-settings-updated", Zc = "input-settings-updated", zi = "nonfatal-error", Wi = "error", Yi = 102400, Mn = "iframe-call-message", Ki = "local-screen-start", Qi = "daily-method-update-live-streaming-endpoints", Jt = "transmit-log", yt = "daily-custom-track", Wt = { NONE: "none", BGBLUR: "background-blur", BGIMAGE: "background-image", FACE_DETECTION: "face-detection" }, lo = { NONE: "none", NOISE_CANCELLATION: "noise-cancellation" }, Xn = { PLAY: "play", PAUSE: "pause" }, Xi = 10, On = ["jpg", "png", "jpeg"], el = "add-endpoints", tl = "remove-endpoints", Zi = "sip-call-transfer";
|
|
2992
2992
|
function he() {
|
|
2993
2993
|
return !N() && typeof window < "u" && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : "";
|
|
2994
2994
|
}
|
|
@@ -3154,11 +3154,11 @@ function ns(t, e) {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
return n;
|
|
3156
3156
|
}
|
|
3157
|
-
function
|
|
3157
|
+
function An(t) {
|
|
3158
3158
|
for (var e = 1; e < arguments.length; e++) {
|
|
3159
3159
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
3160
3160
|
e % 2 ? ns(Object(n), !0).forEach(function(r) {
|
|
3161
|
-
|
|
3161
|
+
Ae(t, r, n[r]);
|
|
3162
3162
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : ns(Object(n)).forEach(function(r) {
|
|
3163
3163
|
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
3164
3164
|
});
|
|
@@ -3195,7 +3195,7 @@ var ol = function(t) {
|
|
|
3195
3195
|
return fe(n, [{ key: "addListenerForMessagesFromCallMachine", value: function(r, i, s) {
|
|
3196
3196
|
var a = this, c = function(l) {
|
|
3197
3197
|
if (l.data && l.data.what === "iframe-call-message" && (!l.data.callClientId || l.data.callClientId === i) && (!l.data.from || l.data.from !== "module")) {
|
|
3198
|
-
var p =
|
|
3198
|
+
var p = An({}, l.data);
|
|
3199
3199
|
if (delete p.from, p.callbackStamp && a._messageCallbacks[p.callbackStamp]) {
|
|
3200
3200
|
var h = p.callbackStamp;
|
|
3201
3201
|
a._messageCallbacks[h].call(s, p), delete a._messageCallbacks[h];
|
|
@@ -3215,7 +3215,7 @@ var ol = function(t) {
|
|
|
3215
3215
|
this._wrappedListeners[r] = a, window.addEventListener("message", a);
|
|
3216
3216
|
} }, { key: "sendMessageToCallMachine", value: function(r, i, s, a) {
|
|
3217
3217
|
if (!a) throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");
|
|
3218
|
-
var c =
|
|
3218
|
+
var c = An({}, r);
|
|
3219
3219
|
if (c.what = Mn, c.from = "module", c.callClientId = a, i) {
|
|
3220
3220
|
var l = dn();
|
|
3221
3221
|
this._messageCallbacks[l] = i, c.callbackStamp = l;
|
|
@@ -3228,7 +3228,7 @@ var ol = function(t) {
|
|
|
3228
3228
|
var i = this._wrappedListeners[r];
|
|
3229
3229
|
i && (window.removeEventListener("message", i), delete this._wrappedListeners[r]);
|
|
3230
3230
|
} }, { key: "forwardPackagedMessageToCallMachine", value: function(r, i, s) {
|
|
3231
|
-
var a =
|
|
3231
|
+
var a = An({}, r);
|
|
3232
3232
|
a.callClientId = s;
|
|
3233
3233
|
var c = i ? i.contentWindow : window, l = this._callMachineTargetOrigin(i);
|
|
3234
3234
|
l && c.postMessage(a, l);
|
|
@@ -3433,7 +3433,7 @@ var dl = function() {
|
|
|
3433
3433
|
} }, { key: "succeeded", get: function() {
|
|
3434
3434
|
return this._currentAttempt && this._currentAttempt.succeeded;
|
|
3435
3435
|
} }]), t;
|
|
3436
|
-
}(),
|
|
3436
|
+
}(), Pn = function(t) {
|
|
3437
3437
|
ln(n, ir(Error));
|
|
3438
3438
|
var e = ul(n);
|
|
3439
3439
|
function n() {
|
|
@@ -3485,12 +3485,12 @@ var dl = function() {
|
|
|
3485
3485
|
}, sn);
|
|
3486
3486
|
try {
|
|
3487
3487
|
var c = this._refetchHeaders ? { headers: this._refetchHeaders } : {}, l = yield fetch(s, c);
|
|
3488
|
-
if (clearTimeout(this._networkTimeout), this.cancelled || this._networkTimedOut) throw new
|
|
3488
|
+
if (clearTimeout(this._networkTimeout), this.cancelled || this._networkTimedOut) throw new Pn();
|
|
3489
3489
|
var p = yield this._getBundleCodeFromResponse(s, l);
|
|
3490
|
-
if (this.cancelled) throw new
|
|
3490
|
+
if (this.cancelled) throw new Pn();
|
|
3491
3491
|
Function('"use strict";' + p)(), this._iosCache && this._iosCache.set(s, p, l.headers), this.succeeded = !0, this._successCallback();
|
|
3492
3492
|
} catch (h) {
|
|
3493
|
-
if (clearTimeout(this._networkTimeout), h instanceof
|
|
3493
|
+
if (clearTimeout(this._networkTimeout), h instanceof Pn || this.cancelled || this._networkTimedOut) return;
|
|
3494
3494
|
this._failureCallback({ msg: "Failed to load call object bundle ".concat(s, ": ").concat(h), type: h.message });
|
|
3495
3495
|
}
|
|
3496
3496
|
}), function(s) {
|
|
@@ -3795,18 +3795,18 @@ function ds(t, e) {
|
|
|
3795
3795
|
}
|
|
3796
3796
|
return n;
|
|
3797
3797
|
}
|
|
3798
|
-
function
|
|
3798
|
+
function A(t) {
|
|
3799
3799
|
for (var e = 1; e < arguments.length; e++) {
|
|
3800
3800
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
3801
3801
|
e % 2 ? ds(Object(n), !0).forEach(function(r) {
|
|
3802
|
-
|
|
3802
|
+
Ae(t, r, n[r]);
|
|
3803
3803
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : ds(Object(n)).forEach(function(r) {
|
|
3804
3804
|
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
3805
3805
|
});
|
|
3806
3806
|
}
|
|
3807
3807
|
return t;
|
|
3808
3808
|
}
|
|
3809
|
-
function
|
|
3809
|
+
function Al(t) {
|
|
3810
3810
|
var e = function() {
|
|
3811
3811
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
3812
3812
|
if (typeof Proxy == "function") return !0;
|
|
@@ -3870,7 +3870,7 @@ function ps(t, e) {
|
|
|
3870
3870
|
for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
|
|
3871
3871
|
return r;
|
|
3872
3872
|
}
|
|
3873
|
-
var Be = {}, fs = "video",
|
|
3873
|
+
var Be = {}, fs = "video", Pl = "voice", ms = N() ? { data: {} } : { data: {}, topology: "none" }, gs = { present: 0, hidden: 0 }, vo = { maxBitrate: { min: 1e5, max: 25e5 }, maxFramerate: { min: 1, max: 30 }, scaleResolutionDownBy: { min: 1, max: 8 } }, Rn = Object.keys(vo), vs = ["state", "volume", "simulcastEncodings"], ys = { androidInCallNotification: { title: "string", subtitle: "string", iconName: "string", disableForCustomOverride: "boolean" }, disableAutoDeviceManagement: { audio: "boolean", video: "boolean" } }, on = { id: { iconPath: "string", iconPathDarkMode: "string", label: "string", tooltip: "string" } }, sr = { id: { allow: "string", controlledBy: "'*' | 'owners' | string[]", csp: "string", iconURL: "string", label: "string", loading: "'eager' | 'lazy'", location: "'main' | 'sidebar'", name: "string", referrerPolicy: "string", sandbox: "string", src: "string", srcdoc: "string", shared: "string[] | 'owners' | boolean" } }, Fe = { customIntegrations: { validate: To, help: ko() }, customTrayButtons: { validate: Eo, help: "customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(on)) }, url: { validate: function(t) {
|
|
3874
3874
|
return typeof t == "string";
|
|
3875
3875
|
}, help: "url should be a string" }, baseUrl: { validate: function(t) {
|
|
3876
3876
|
return typeof t == "string";
|
|
@@ -4028,18 +4028,18 @@ Promise.any || (Promise.any = function() {
|
|
|
4028
4028
|
}());
|
|
4029
4029
|
var Rl = function(t) {
|
|
4030
4030
|
ln(re, Ee);
|
|
4031
|
-
var e, n, r, i, s, a, c, l, p, h, f, _, k, v,
|
|
4031
|
+
var e, n, r, i, s, a, c, l, p, h, f, _, k, v, w, T, M, B, L, ne, Ne, oe, _e, ht, Rr, xr, Dr, Lr, Nr, jr, Ir, Br, Fr, Ur, qr, Vr, Jr, $r, Xo = Al(re);
|
|
4032
4032
|
function re(o) {
|
|
4033
4033
|
var u, d, g, m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4034
|
-
if (pe(this, re),
|
|
4034
|
+
if (pe(this, re), Ae(Se(d = Xo.call(this)), "startListeningForDeviceChanges", function() {
|
|
4035
4035
|
kl(d.handleDeviceChange);
|
|
4036
|
-
}),
|
|
4036
|
+
}), Ae(Se(d), "stopListeningForDeviceChanges", function() {
|
|
4037
4037
|
El(d.handleDeviceChange);
|
|
4038
|
-
}),
|
|
4038
|
+
}), Ae(Se(d), "handleDeviceChange", function(E) {
|
|
4039
4039
|
E = E.map(function(C) {
|
|
4040
4040
|
return JSON.parse(JSON.stringify(C));
|
|
4041
4041
|
}), d.emitDailyJSEvent({ action: "available-devices-updated", availableDevices: E });
|
|
4042
|
-
}),
|
|
4042
|
+
}), Ae(Se(d), "handleNativeAppStateChange", function() {
|
|
4043
4043
|
var E = O(function* (C) {
|
|
4044
4044
|
if (C === "destroyed") return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"), void (yield d.destroy());
|
|
4045
4045
|
var x = C === "active";
|
|
@@ -4048,21 +4048,21 @@ var Rl = function(t) {
|
|
|
4048
4048
|
return function(C) {
|
|
4049
4049
|
return E.apply(this, arguments);
|
|
4050
4050
|
};
|
|
4051
|
-
}()),
|
|
4051
|
+
}()), Ae(Se(d), "handleNativeAudioFocusChange", function(E) {
|
|
4052
4052
|
d.disableReactNativeAutoDeviceManagement("audio") || (d._hasNativeAudioFocus = E, d.toggleParticipantAudioBasedOnNativeAudioFocus(), d._hasNativeAudioFocus ? d.micUnmutedBeforeLosingNativeAudioFocus && d.setLocalAudio(!0) : (d.micUnmutedBeforeLosingNativeAudioFocus = d.localAudio(), d.setLocalAudio(!1)));
|
|
4053
|
-
}),
|
|
4053
|
+
}), Ae(Se(d), "handleNativeSystemScreenCaptureStop", function() {
|
|
4054
4054
|
d.stopScreenShare();
|
|
4055
4055
|
}), d.strictMode = m.strictMode === void 0 || m.strictMode, d.allowMultipleCallInstances = (u = m.allowMultipleCallInstances) !== null && u !== void 0 && u, Object.keys(Be).length && (d._logDuplicateInstanceAttempt(), !d.allowMultipleCallInstances)) {
|
|
4056
4056
|
if (d.strictMode) throw new Error("Duplicate DailyIframe instances are not allowed");
|
|
4057
4057
|
console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`");
|
|
4058
4058
|
}
|
|
4059
|
-
if (window._daily || (window._daily = { pendings: [], instances: {} }), d.callClientId = dn(), g = Se(d), Be[g.callClientId] = g, window._daily.instances[d.callClientId] = {}, d._sharedTracks = {}, window._daily.instances[d.callClientId].tracks = d._sharedTracks, m.dailyJsVersion = re.version(), d._iframe = o, d._callObjectMode = m.layout === "none" && !d._iframe, d._preloadCache = { subscribeToTracksAutomatically: !0, audioDeviceId: null, videoDeviceId: null, outputDeviceId: null, inputSettings: null, sendSettings: null, videoTrackForNetworkConnectivityTest: null, videoTrackForConnectionQualityTest: null }, m.showLocalVideo !== void 0 ? d._callObjectMode ? console.error("showLocalVideo is not available in call object mode") : d._showLocalVideo = !!m.showLocalVideo : d._showLocalVideo = !0, m.showParticipantsBar !== void 0 ? d._callObjectMode ? console.error("showParticipantsBar is not available in call object mode") : d._showParticipantsBar = !!m.showParticipantsBar : d._showParticipantsBar = !0, m.customIntegrations !== void 0 ? d._callObjectMode ? console.error("customIntegrations is not available in call object mode") : d._customIntegrations = m.customIntegrations : d._customIntegrations = {}, m.customTrayButtons !== void 0 ? d._callObjectMode ? console.error("customTrayButtons is not available in call object mode") : d._customTrayButtons = m.customTrayButtons : d._customTrayButtons = {}, m.activeSpeakerMode !== void 0 ? d._callObjectMode ? console.error("activeSpeakerMode is not available in call object mode") : d._activeSpeakerMode = !!m.activeSpeakerMode : d._activeSpeakerMode = !1, m.receiveSettings ? d._callObjectMode ? d._receiveSettings = m.receiveSettings : console.error("receiveSettings is only available in call object mode") : d._receiveSettings = {}, d.validateProperties(m), d.properties =
|
|
4059
|
+
if (window._daily || (window._daily = { pendings: [], instances: {} }), d.callClientId = dn(), g = Se(d), Be[g.callClientId] = g, window._daily.instances[d.callClientId] = {}, d._sharedTracks = {}, window._daily.instances[d.callClientId].tracks = d._sharedTracks, m.dailyJsVersion = re.version(), d._iframe = o, d._callObjectMode = m.layout === "none" && !d._iframe, d._preloadCache = { subscribeToTracksAutomatically: !0, audioDeviceId: null, videoDeviceId: null, outputDeviceId: null, inputSettings: null, sendSettings: null, videoTrackForNetworkConnectivityTest: null, videoTrackForConnectionQualityTest: null }, m.showLocalVideo !== void 0 ? d._callObjectMode ? console.error("showLocalVideo is not available in call object mode") : d._showLocalVideo = !!m.showLocalVideo : d._showLocalVideo = !0, m.showParticipantsBar !== void 0 ? d._callObjectMode ? console.error("showParticipantsBar is not available in call object mode") : d._showParticipantsBar = !!m.showParticipantsBar : d._showParticipantsBar = !0, m.customIntegrations !== void 0 ? d._callObjectMode ? console.error("customIntegrations is not available in call object mode") : d._customIntegrations = m.customIntegrations : d._customIntegrations = {}, m.customTrayButtons !== void 0 ? d._callObjectMode ? console.error("customTrayButtons is not available in call object mode") : d._customTrayButtons = m.customTrayButtons : d._customTrayButtons = {}, m.activeSpeakerMode !== void 0 ? d._callObjectMode ? console.error("activeSpeakerMode is not available in call object mode") : d._activeSpeakerMode = !!m.activeSpeakerMode : d._activeSpeakerMode = !1, m.receiveSettings ? d._callObjectMode ? d._receiveSettings = m.receiveSettings : console.error("receiveSettings is only available in call object mode") : d._receiveSettings = {}, d.validateProperties(m), d.properties = A({}, m), d._preloadCache.inputSettings || (d._preloadCache.inputSettings = {}), m.inputSettings && m.inputSettings.audio && (d._preloadCache.inputSettings.audio = m.inputSettings.audio), m.inputSettings && m.inputSettings.video && (d._preloadCache.inputSettings.video = m.inputSettings.video), d._callObjectLoader = d._callObjectMode ? new dl(d.callClientId) : null, d._callState = qi, d._isPreparingToJoin = !1, d._accessState = { access: Cn }, d._meetingSessionSummary = {}, d._finalSummaryOfPrevSession = {}, d._meetingSessionState = Ln(ms, d._callObjectMode), d._nativeInCallAudioMode = fs, d._participants = {}, d._isScreenSharing = !1, d._participantCounts = gs, d._rmpPlayerState = {}, d._waitingParticipants = {}, d._network = { threshold: "good", quality: 100 }, d._activeSpeaker = {}, d._localAudioLevel = 0, d._isLocalAudioLevelObserverRunning = !1, d._remoteParticipantsAudioLevel = {}, d._isRemoteParticipantsAudioLevelObserverRunning = !1, d._messageChannel = N() ? new cl() : new ol(), d._iframe && (d._iframe.requestFullscreen ? d._iframe.addEventListener("fullscreenchange", function() {
|
|
4060
4060
|
document.fullscreenElement === d._iframe ? (d.emitDailyJSEvent({ action: qt }), d.sendMessageToCallMachine({ action: qt })) : (d.emitDailyJSEvent({ action: Vt }), d.sendMessageToCallMachine({ action: Vt }));
|
|
4061
4061
|
}) : d._iframe.webkitRequestFullscreen && d._iframe.addEventListener("webkitfullscreenchange", function() {
|
|
4062
4062
|
document.webkitFullscreenElement === d._iframe ? (d.emitDailyJSEvent({ action: qt }), d.sendMessageToCallMachine({ action: qt })) : (d.emitDailyJSEvent({ action: Vt }), d.sendMessageToCallMachine({ action: Vt }));
|
|
4063
4063
|
})), N()) {
|
|
4064
|
-
var
|
|
4065
|
-
|
|
4064
|
+
var b = d.nativeUtils();
|
|
4065
|
+
b.addAudioFocusChangeListener && b.removeAudioFocusChangeListener && b.addAppStateChangeListener && b.removeAppStateChangeListener && b.addSystemScreenCaptureStopListener && b.removeSystemScreenCaptureStopListener || console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"), d._hasNativeAudioFocus = !0, b.addAudioFocusChangeListener(d.handleNativeAudioFocusChange), b.addAppStateChangeListener(d.handleNativeAppStateChange), b.addSystemScreenCaptureStopListener(d.handleNativeSystemScreenCaptureStop);
|
|
4066
4066
|
}
|
|
4067
4067
|
return d._callObjectMode && d.startListeningForDeviceChanges(), d._messageChannel.addListenerForMessagesFromCallMachine(d.handleMessageFromCallMachine, d.callClientId, Se(d)), d;
|
|
4068
4068
|
}
|
|
@@ -4116,8 +4116,8 @@ var Rl = function(t) {
|
|
|
4116
4116
|
var o = this, u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
4117
4117
|
if (ce(this._callObjectMode, "updateWaitingParticipant()"), q(this._callState, "updateWaitingParticipant()"), typeof u != "string" || U(d) !== "object") throw new Error("updateWaitingParticipant() must take an id string and a updates object");
|
|
4118
4118
|
return new Promise(function(g, m) {
|
|
4119
|
-
o.sendMessageToCallMachine({ action: "daily-method-update-waiting-participant", id: u, updates: d }, function(
|
|
4120
|
-
|
|
4119
|
+
o.sendMessageToCallMachine({ action: "daily-method-update-waiting-participant", id: u, updates: d }, function(b) {
|
|
4120
|
+
b.error && m(b.error), b.id || m(new Error("unknown error in updateWaitingParticipant()")), g({ id: b.id });
|
|
4121
4121
|
});
|
|
4122
4122
|
});
|
|
4123
4123
|
}), function() {
|
|
@@ -4133,9 +4133,9 @@ var Rl = function(t) {
|
|
|
4133
4133
|
}), function() {
|
|
4134
4134
|
return Vr.apply(this, arguments);
|
|
4135
4135
|
}) }, { key: "requestAccess", value: (qr = O(function* () {
|
|
4136
|
-
var o = this, u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, d = u.access, g = d === void 0 ? { level: tc } : d, m = u.name,
|
|
4136
|
+
var o = this, u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, d = u.access, g = d === void 0 ? { level: tc } : d, m = u.name, b = m === void 0 ? "" : m;
|
|
4137
4137
|
return ce(this._callObjectMode, "requestAccess()"), q(this._callState, "requestAccess()"), new Promise(function(E, C) {
|
|
4138
|
-
o.sendMessageToCallMachine({ action: "daily-method-request-access", access: g, name:
|
|
4138
|
+
o.sendMessageToCallMachine({ action: "daily-method-request-access", access: g, name: b }, function(x) {
|
|
4139
4139
|
x.error && C(x.error), x.access || C(new Error("unknown error in requestAccess()")), E({ access: x.access, granted: x.granted });
|
|
4140
4140
|
});
|
|
4141
4141
|
});
|
|
@@ -4163,8 +4163,8 @@ var Rl = function(t) {
|
|
|
4163
4163
|
switch (U(o)) {
|
|
4164
4164
|
case "string":
|
|
4165
4165
|
return new Promise(function(m) {
|
|
4166
|
-
u.sendMessageToCallMachine({ action: "get-single-participant-receive-settings", id: o, showInheritedValues: g }, function(
|
|
4167
|
-
m(
|
|
4166
|
+
u.sendMessageToCallMachine({ action: "get-single-participant-receive-settings", id: o, showInheritedValues: g }, function(b) {
|
|
4167
|
+
m(b.receiveSettings);
|
|
4168
4168
|
});
|
|
4169
4169
|
});
|
|
4170
4170
|
case "undefined":
|
|
@@ -4185,19 +4185,19 @@ var Rl = function(t) {
|
|
|
4185
4185
|
}), function(o) {
|
|
4186
4186
|
return Fr.apply(this, arguments);
|
|
4187
4187
|
}) }, { key: "_prepInputSettingsToPresentToUser", value: function(o) {
|
|
4188
|
-
var u, d, g, m,
|
|
4188
|
+
var u, d, g, m, b, E, C, x;
|
|
4189
4189
|
if (o) {
|
|
4190
|
-
var
|
|
4190
|
+
var W = {}, G = ((u = o.audio) === null || u === void 0 || (d = u.processor) === null || d === void 0 ? void 0 : d.type) === "none" && ((g = o.audio) === null || g === void 0 || (m = g.processor) === null || m === void 0 ? void 0 : m._isDefaultWhenNone);
|
|
4191
4191
|
if (o.audio && !G) {
|
|
4192
|
-
var be =
|
|
4193
|
-
delete be._isDefaultWhenNone,
|
|
4192
|
+
var be = A({}, o.audio.processor);
|
|
4193
|
+
delete be._isDefaultWhenNone, W.audio = A(A({}, o.audio), {}, { processor: be });
|
|
4194
4194
|
}
|
|
4195
|
-
var Te = ((
|
|
4195
|
+
var Te = ((b = o.video) === null || b === void 0 || (E = b.processor) === null || E === void 0 ? void 0 : E.type) === "none" && ((C = o.video) === null || C === void 0 || (x = C.processor) === null || x === void 0 ? void 0 : x._isDefaultWhenNone);
|
|
4196
4196
|
if (o.video && !Te) {
|
|
4197
|
-
var we =
|
|
4198
|
-
delete we._isDefaultWhenNone,
|
|
4197
|
+
var we = A({}, o.video.processor);
|
|
4198
|
+
delete we._isDefaultWhenNone, W.video = A(A({}, o.video), {}, { processor: we });
|
|
4199
4199
|
}
|
|
4200
|
-
return
|
|
4200
|
+
return W;
|
|
4201
4201
|
}
|
|
4202
4202
|
} }, { key: "getInputSettings", value: function() {
|
|
4203
4203
|
var o = this;
|
|
@@ -4205,10 +4205,10 @@ var Rl = function(t) {
|
|
|
4205
4205
|
u(o._getInputSettings());
|
|
4206
4206
|
});
|
|
4207
4207
|
} }, { key: "_getInputSettings", value: function() {
|
|
4208
|
-
var o, u, d, g, m,
|
|
4209
|
-
this._inputSettings ? (o = ((d = this._inputSettings) === null || d === void 0 ? void 0 : d.video) || x, u = ((g = this._inputSettings) === null || g === void 0 ? void 0 : g.audio) || x) : (o = ((m = this._preloadCache) === null || m === void 0 || (
|
|
4210
|
-
var
|
|
4211
|
-
return this._prepInputSettingsToPresentToUser(
|
|
4208
|
+
var o, u, d, g, m, b, E, C, x = { processor: { type: "none", _isDefaultWhenNone: !0 } };
|
|
4209
|
+
this._inputSettings ? (o = ((d = this._inputSettings) === null || d === void 0 ? void 0 : d.video) || x, u = ((g = this._inputSettings) === null || g === void 0 ? void 0 : g.audio) || x) : (o = ((m = this._preloadCache) === null || m === void 0 || (b = m.inputSettings) === null || b === void 0 ? void 0 : b.video) || x, u = ((E = this._preloadCache) === null || E === void 0 || (C = E.inputSettings) === null || C === void 0 ? void 0 : C.audio) || x);
|
|
4210
|
+
var W = { audio: u, video: o };
|
|
4211
|
+
return this._prepInputSettingsToPresentToUser(W);
|
|
4212
4212
|
} }, { key: "updateInputSettings", value: (Br = O(function* (o) {
|
|
4213
4213
|
var u = this;
|
|
4214
4214
|
return D(), bo(o) ? (o && (this._preloadCache.inputSettings || (this._preloadCache.inputSettings = {}), wo(o, this.properties.dailyConfig), o.audio && (this._preloadCache.inputSettings.audio = o.audio), o.video && (this._preloadCache.inputSettings.video = o.video)), o.video || o.audio ? this._callObjectMode && !this._callMachineInitialized ? this._getInputSettings() : new Promise(function(d, g) {
|
|
@@ -4326,7 +4326,7 @@ var Rl = function(t) {
|
|
|
4326
4326
|
if (u.url && u.url !== this.properties.url) return console.error("url in startCamera() is different than the one used in preAuth()"), Promise.reject();
|
|
4327
4327
|
if (u.token && u.token !== this.properties.token) return console.error("token in startCamera() is different than the one used in preAuth()"), Promise.reject();
|
|
4328
4328
|
}
|
|
4329
|
-
this.validateProperties(u), this.properties =
|
|
4329
|
+
this.validateProperties(u), this.properties = A(A({}, this.properties), u);
|
|
4330
4330
|
}
|
|
4331
4331
|
return new Promise(function(d) {
|
|
4332
4332
|
o.sendMessageToCallMachine({ action: "start-camera", properties: Ke(o.properties, o.callClientId), preloadCache: Ke(o._preloadCache, o.callClientId) }, function(g) {
|
|
@@ -4356,7 +4356,7 @@ var Rl = function(t) {
|
|
|
4356
4356
|
});
|
|
4357
4357
|
} }, { key: "setCamera", value: function(o) {
|
|
4358
4358
|
var u = this;
|
|
4359
|
-
return mt(),
|
|
4359
|
+
return mt(), Ht(this._callMachineInitialized, "setCamera()"), new Promise(function(d) {
|
|
4360
4360
|
u.sendMessageToCallMachine({ action: "set-camera", cameraDeviceId: o }, function(g) {
|
|
4361
4361
|
d({ device: g.device });
|
|
4362
4362
|
});
|
|
@@ -4387,8 +4387,8 @@ var Rl = function(t) {
|
|
|
4387
4387
|
});
|
|
4388
4388
|
});
|
|
4389
4389
|
} }, { key: "setInputDevicesAsync", value: (Dr = O(function* (o) {
|
|
4390
|
-
var u = this, d = o.audioDeviceId, g = o.videoDeviceId, m = o.audioSource,
|
|
4391
|
-
return D(), m !== void 0 && (d = m),
|
|
4390
|
+
var u = this, d = o.audioDeviceId, g = o.videoDeviceId, m = o.audioSource, b = o.videoSource;
|
|
4391
|
+
return D(), m !== void 0 && (d = m), b !== void 0 && (g = b), d && (this._preloadCache.audioDeviceId = d, this._sharedTracks.audioDeviceId = d), g && (this._preloadCache.videoDeviceId = g, this._sharedTracks.videoDeviceId = g), this._callObjectMode && this.needsLoad() ? { camera: { deviceId: this._preloadCache.videoDeviceId }, mic: { deviceId: this._preloadCache.audioDeviceId }, speaker: { deviceId: this._preloadCache.outputDeviceId } } : (d instanceof MediaStreamTrack && (d = yt), g instanceof MediaStreamTrack && (g = yt), new Promise(function(E) {
|
|
4392
4392
|
u.sendMessageToCallMachine({ action: "set-input-devices", audioDeviceId: d, videoDeviceId: g }, function(C) {
|
|
4393
4393
|
delete C.action, delete C.callbackStamp, C.returnPreloadCache ? E({ camera: { deviceId: u._preloadCache.videoDeviceId }, mic: { deviceId: u._preloadCache.audioDeviceId }, speaker: { deviceId: u._preloadCache.outputDeviceId } }) : E(C);
|
|
4394
4394
|
});
|
|
@@ -4416,13 +4416,13 @@ var Rl = function(t) {
|
|
|
4416
4416
|
}) }, { key: "nativeInCallAudioMode", value: function() {
|
|
4417
4417
|
return mt(), this._nativeInCallAudioMode;
|
|
4418
4418
|
} }, { key: "setNativeInCallAudioMode", value: function(o) {
|
|
4419
|
-
if (mt(), [fs,
|
|
4419
|
+
if (mt(), [fs, Pl].includes(o)) {
|
|
4420
4420
|
if (o !== this._nativeInCallAudioMode) return this._nativeInCallAudioMode = o, !this.disableReactNativeAutoDeviceManagement("audio") && Yt(this._callState, this._isPreparingToJoin) && this.nativeUtils().setAudioMode(this._nativeInCallAudioMode), this;
|
|
4421
4421
|
} else console.error("invalid in-call audio mode specified: ", o);
|
|
4422
4422
|
} }, { key: "preAuth", value: (ht = O(function* () {
|
|
4423
4423
|
var o = this, u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4424
4424
|
if (ce(this._callObjectMode, "preAuth()"), xn(this._callState, this._isPreparingToJoin, "preAuth()"), this.needsLoad() && (yield this.load(u)), !u.url) throw new Error("preAuth() requires at least a url to be provided");
|
|
4425
|
-
return this.validateProperties(u), this.properties =
|
|
4425
|
+
return this.validateProperties(u), this.properties = A(A({}, this.properties), u), new Promise(function(d, g) {
|
|
4426
4426
|
o.sendMessageToCallMachine({ action: "daily-method-preauth", properties: Ke(o.properties, o.callClientId), preloadCache: Ke(o._preloadCache, o.callClientId) }, function(m) {
|
|
4427
4427
|
return m.error ? g(m.error) : m.access ? (o._didPreAuth = !0, void d({ access: m.access })) : g(new Error("unknown error in preAuth()"));
|
|
4428
4428
|
});
|
|
@@ -4433,17 +4433,17 @@ var Rl = function(t) {
|
|
|
4433
4433
|
var u = this;
|
|
4434
4434
|
if (this.needsLoad()) {
|
|
4435
4435
|
if (this._destroyed && (this._logUseAfterDestroy(), this.strictMode)) throw new Error("Use after destroy");
|
|
4436
|
-
if (o && (this.validateProperties(o), this.properties =
|
|
4436
|
+
if (o && (this.validateProperties(o), this.properties = A(A({}, this.properties), o)), !this._callObjectMode && !this.properties.url) throw new Error("can't load iframe meeting because url property isn't set");
|
|
4437
4437
|
return this._updateCallState(Vi), this.emitDailyJSEvent({ action: ac }), this._callObjectMode ? new Promise(function(d, g) {
|
|
4438
4438
|
u._callObjectLoader.cancel();
|
|
4439
4439
|
var m = Date.now();
|
|
4440
|
-
u._callObjectLoader.load(u.properties.dailyConfig, function(
|
|
4441
|
-
u._bundleLoadTime =
|
|
4442
|
-
}, function(
|
|
4440
|
+
u._callObjectLoader.load(u.properties.dailyConfig, function(b) {
|
|
4441
|
+
u._bundleLoadTime = b ? "no-op" : Date.now() - m, u._updateCallState(Ji), b && u.emitDailyJSEvent({ action: $i }), d();
|
|
4442
|
+
}, function(b, E) {
|
|
4443
4443
|
if (u.emitDailyJSEvent({ action: cc }), !E) {
|
|
4444
4444
|
u._updateCallState(Ce), u.resetMeetingDependentVars();
|
|
4445
|
-
var C = { action: Wi, errorMsg:
|
|
4446
|
-
u._maybeSendToSentry(C), u.emitDailyJSEvent(C), g(
|
|
4445
|
+
var C = { action: Wi, errorMsg: b.msg, error: { type: "connection-error", msg: "Failed to load call object bundle.", details: { on: "load", sourceError: b, bundleUrl: Xt(u.properties.dailyConfig) } } };
|
|
4446
|
+
u._maybeSendToSentry(C), u.emitDailyJSEvent(C), g(b.msg);
|
|
4447
4447
|
}
|
|
4448
4448
|
});
|
|
4449
4449
|
}) : (this._iframe.src = qs(this.assembleMeetingUrl(), this.properties.dailyConfig), new Promise(function(d, g) {
|
|
@@ -4471,19 +4471,19 @@ var Rl = function(t) {
|
|
|
4471
4471
|
if (u.token && u.token !== this.properties.token) return console.error("token in join() is different than the one used in preAuth()"), this.updateIsPreparingToJoin(!1), Promise.reject();
|
|
4472
4472
|
}
|
|
4473
4473
|
if (u.url && !this._callObjectMode && u.url && u.url !== this.properties.url) return console.error("url in join() is different than the one used in load() (".concat(this.properties.url, " -> ").concat(u.url, ")")), this.updateIsPreparingToJoin(!1), Promise.reject();
|
|
4474
|
-
this.validateProperties(u), this.properties =
|
|
4474
|
+
this.validateProperties(u), this.properties = A(A({}, this.properties), u);
|
|
4475
4475
|
}
|
|
4476
4476
|
return u.showLocalVideo !== void 0 && (this._callObjectMode ? console.error("showLocalVideo is not available in callObject mode") : this._showLocalVideo = !!u.showLocalVideo), u.showParticipantsBar !== void 0 && (this._callObjectMode ? console.error("showParticipantsBar is not available in callObject mode") : this._showParticipantsBar = !!u.showParticipantsBar), this._callState === Qe || this._callState === Qn ? (console.warn("already joined meeting, call leave() before joining again"), void this.updateIsPreparingToJoin(!1)) : (this._updateCallState(Qn, !1), this.emitDailyJSEvent({ action: dc }), this._preloadCache.inputSettings || (this._preloadCache.inputSettings = {}), u.inputSettings && u.inputSettings.audio && (this._preloadCache.inputSettings.audio = u.inputSettings.audio), u.inputSettings && u.inputSettings.video && (this._preloadCache.inputSettings.video = u.inputSettings.video), this.sendMessageToCallMachine({ action: "join-meeting", properties: Ke(this.properties, this.callClientId), preloadCache: Ke(this._preloadCache, this.callClientId) }), new Promise(function(g, m) {
|
|
4477
|
-
o._joinedCallback = function(
|
|
4477
|
+
o._joinedCallback = function(b, E) {
|
|
4478
4478
|
if (o._callState !== Ce) {
|
|
4479
|
-
if (o._updateCallState(Qe),
|
|
4479
|
+
if (o._updateCallState(Qe), b) for (var C in b) {
|
|
4480
4480
|
if (o._callObjectMode) {
|
|
4481
4481
|
var x = o._callMachine().store;
|
|
4482
|
-
os(
|
|
4482
|
+
os(b[C], x), as(b[C], x), cs(b[C], o._participants[C], x);
|
|
4483
4483
|
}
|
|
4484
|
-
o._participants[C] =
|
|
4484
|
+
o._participants[C] = A({}, b[C]), o.toggleParticipantAudioBasedOnNativeAudioFocus();
|
|
4485
4485
|
}
|
|
4486
|
-
d && o.loadCss(o.properties), g(
|
|
4486
|
+
d && o.loadCss(o.properties), g(b);
|
|
4487
4487
|
} else m(E);
|
|
4488
4488
|
};
|
|
4489
4489
|
}));
|
|
@@ -4498,9 +4498,9 @@ var Rl = function(t) {
|
|
|
4498
4498
|
return Ne.apply(this, arguments);
|
|
4499
4499
|
}) }, { key: "startScreenShare", value: (ne = O(function* () {
|
|
4500
4500
|
var o = this, u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4501
|
-
if (
|
|
4501
|
+
if (Ht(this._callMachineInitialized, "startScreenShare()"), u.screenVideoSendSettings && this._validateVideoSendSettings("screenVideo", u.screenVideoSendSettings), u.mediaStream && (this._sharedTracks.screenMediaStream = u.mediaStream, u.mediaStream = yt), typeof DailyNativeUtils < "u" && DailyNativeUtils.isIOS !== void 0 && DailyNativeUtils.isIOS) {
|
|
4502
4502
|
var d = this.nativeUtils();
|
|
4503
|
-
if (yield d.isScreenBeingCaptured()) return void this.emitDailyJSEvent({ action:
|
|
4503
|
+
if (yield d.isScreenBeingCaptured()) return void this.emitDailyJSEvent({ action: zi, type: "screen-share-error", errorMsg: "Could not start the screen sharing. The screen is already been captured!" });
|
|
4504
4504
|
d.setSystemScreenCaptureStartCallback(function() {
|
|
4505
4505
|
d.setSystemScreenCaptureStartCallback(null), o.sendMessageToCallMachine({ action: Ki, captureOptions: u });
|
|
4506
4506
|
}), d.presentSystemScreenCapturePrompt();
|
|
@@ -4508,19 +4508,19 @@ var Rl = function(t) {
|
|
|
4508
4508
|
}), function() {
|
|
4509
4509
|
return ne.apply(this, arguments);
|
|
4510
4510
|
}) }, { key: "stopScreenShare", value: function() {
|
|
4511
|
-
|
|
4511
|
+
Ht(this._callMachineInitialized, "stopScreenShare()"), this.sendMessageToCallMachine({ action: "local-screen-stop" });
|
|
4512
4512
|
} }, { key: "startRecording", value: function() {
|
|
4513
4513
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4514
|
-
this.sendMessageToCallMachine(
|
|
4514
|
+
this.sendMessageToCallMachine(A({ action: "local-recording-start" }, o));
|
|
4515
4515
|
} }, { key: "updateRecording", value: function(o) {
|
|
4516
4516
|
var u = o.layout, d = u === void 0 ? { preset: "default" } : u, g = o.instanceId;
|
|
4517
4517
|
this.sendMessageToCallMachine({ action: "daily-method-update-recording", layout: d, instanceId: g });
|
|
4518
4518
|
} }, { key: "stopRecording", value: function() {
|
|
4519
4519
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4520
|
-
this.sendMessageToCallMachine(
|
|
4520
|
+
this.sendMessageToCallMachine(A({ action: "local-recording-stop" }, o));
|
|
4521
4521
|
} }, { key: "startLiveStreaming", value: function() {
|
|
4522
4522
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4523
|
-
this.sendMessageToCallMachine(
|
|
4523
|
+
this.sendMessageToCallMachine(A({ action: "daily-method-start-live-streaming" }, o));
|
|
4524
4524
|
} }, { key: "updateLiveStreaming", value: function(o) {
|
|
4525
4525
|
var u = o.layout, d = u === void 0 ? { preset: "default" } : u, g = o.instanceId;
|
|
4526
4526
|
this.sendMessageToCallMachine({ action: "daily-method-update-live-streaming", layout: d, instanceId: g });
|
|
@@ -4532,7 +4532,7 @@ var Rl = function(t) {
|
|
|
4532
4532
|
this.sendMessageToCallMachine({ action: Qi, endpointsOp: tl, endpoints: u, instanceId: d });
|
|
4533
4533
|
} }, { key: "stopLiveStreaming", value: function() {
|
|
4534
4534
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4535
|
-
this.sendMessageToCallMachine(
|
|
4535
|
+
this.sendMessageToCallMachine(A({ action: "daily-method-stop-live-streaming" }, o));
|
|
4536
4536
|
} }, { key: "validateDailyConfig", value: function(o) {
|
|
4537
4537
|
o.camSimulcastEncodings && (console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."), this.validateSimulcastEncodings(o.camSimulcastEncodings)), o.screenSimulcastEncodings && console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."), he().match(/Linux; Android/) && o.noAutoDefaultDeviceChange && console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.");
|
|
4538
4538
|
} }, { key: "validateSimulcastEncodings", value: function(o) {
|
|
@@ -4542,34 +4542,34 @@ var Rl = function(t) {
|
|
|
4542
4542
|
if (!ws(o.length, 1, 3)) throw new Error("encodings must be an Array with between 1 to ".concat(3, " layers"));
|
|
4543
4543
|
for (var g = 0; g < o.length; g++) {
|
|
4544
4544
|
var m = o[g];
|
|
4545
|
-
for (var
|
|
4546
|
-
if (typeof m[
|
|
4545
|
+
for (var b in this._validateEncodingLayerHasValidProperties(m), m) if (Rn.includes(b)) {
|
|
4546
|
+
if (typeof m[b] != "number") throw new Error("".concat(b, " must be a number"));
|
|
4547
4547
|
if (u) {
|
|
4548
|
-
var E = u[
|
|
4549
|
-
if (!ws(m[
|
|
4548
|
+
var E = u[b], C = E.min, x = E.max;
|
|
4549
|
+
if (!ws(m[b], C, x)) throw new Error("".concat(b, " value not in range. valid range: ").concat(C, " to ").concat(x));
|
|
4550
4550
|
}
|
|
4551
|
-
} else if (!["active", "scalabilityMode"].includes(
|
|
4551
|
+
} else if (!["active", "scalabilityMode"].includes(b)) throw new Error("Invalid key ".concat(b, ", valid keys are:") + Object.values(Rn));
|
|
4552
4552
|
if (d && !m.hasOwnProperty("maxBitrate")) throw new Error("maxBitrate is not specified");
|
|
4553
4553
|
}
|
|
4554
4554
|
}
|
|
4555
4555
|
} }, { key: "startRemoteMediaPlayer", value: (L = O(function* (o) {
|
|
4556
4556
|
var u = this, d = o.url, g = o.settings, m = g === void 0 ? { state: Xn.PLAY } : g;
|
|
4557
4557
|
try {
|
|
4558
|
-
(function(
|
|
4559
|
-
if (typeof
|
|
4560
|
-
})(d), bs(m), function(
|
|
4561
|
-
for (var E in
|
|
4562
|
-
|
|
4558
|
+
(function(b) {
|
|
4559
|
+
if (typeof b != "string") throw new Error('url parameter must be "string" type');
|
|
4560
|
+
})(d), bs(m), function(b) {
|
|
4561
|
+
for (var E in b) if (!vs.includes(E)) throw new Error("Invalid key ".concat(E, ", valid keys are: ").concat(vs));
|
|
4562
|
+
b.simulcastEncodings && this.validateSimulcastEncodings(b.simulcastEncodings, vo, !0);
|
|
4563
4563
|
}(m);
|
|
4564
|
-
} catch (
|
|
4565
|
-
throw console.error("invalid argument Error: ".concat(
|
|
4564
|
+
} catch (b) {
|
|
4565
|
+
throw console.error("invalid argument Error: ".concat(b)), console.error(`startRemoteMediaPlayer arguments must be of the form:
|
|
4566
4566
|
{ url: "playback url",
|
|
4567
4567
|
settings?:
|
|
4568
|
-
{state: "play"|"pause", simulcastEncodings?: [{}] } }`),
|
|
4568
|
+
{state: "play"|"pause", simulcastEncodings?: [{}] } }`), b;
|
|
4569
4569
|
}
|
|
4570
|
-
return new Promise(function(
|
|
4570
|
+
return new Promise(function(b, E) {
|
|
4571
4571
|
u.sendMessageToCallMachine({ action: "daily-method-start-remote-media-player", url: d, settings: m }, function(C) {
|
|
4572
|
-
C.error ? E({ error: C.error, errorMsg: C.errorMsg }) :
|
|
4572
|
+
C.error ? E({ error: C.error, errorMsg: C.errorMsg }) : b({ session_id: C.session_id, remoteMediaPlayerState: { state: C.state, settings: C.settings } });
|
|
4573
4573
|
});
|
|
4574
4574
|
});
|
|
4575
4575
|
}), function(o) {
|
|
@@ -4593,15 +4593,15 @@ var Rl = function(t) {
|
|
|
4593
4593
|
session_id: "participant session",
|
|
4594
4594
|
{ settings?: {state: "play"|"pause"} }`), m;
|
|
4595
4595
|
}
|
|
4596
|
-
return new Promise(function(m,
|
|
4596
|
+
return new Promise(function(m, b) {
|
|
4597
4597
|
u.sendMessageToCallMachine({ action: "daily-method-update-remote-media-player", session_id: d, settings: g }, function(E) {
|
|
4598
|
-
E.error ?
|
|
4598
|
+
E.error ? b({ error: E.error, errorMsg: E.errorMsg }) : m({ session_id: E.session_id, remoteMediaPlayerState: { state: E.state, settings: E.settings } });
|
|
4599
4599
|
});
|
|
4600
4600
|
});
|
|
4601
4601
|
}), function(o) {
|
|
4602
4602
|
return M.apply(this, arguments);
|
|
4603
4603
|
}) }, { key: "startTranscription", value: function(o) {
|
|
4604
|
-
this.sendMessageToCallMachine(
|
|
4604
|
+
this.sendMessageToCallMachine(A({ action: "daily-method-start-transcription" }, o));
|
|
4605
4605
|
} }, { key: "stopTranscription", value: function() {
|
|
4606
4606
|
this.sendMessageToCallMachine({ action: "daily-method-stop-transcription" });
|
|
4607
4607
|
} }, { key: "startDialOut", value: (T = O(function* (o) {
|
|
@@ -4648,8 +4648,8 @@ var Rl = function(t) {
|
|
|
4648
4648
|
if (o.displayName.length >= 200) throw new Error("Error starting dial out: displayName length must be less than 200");
|
|
4649
4649
|
}
|
|
4650
4650
|
return new Promise(function(g, m) {
|
|
4651
|
-
u.sendMessageToCallMachine(
|
|
4652
|
-
|
|
4651
|
+
u.sendMessageToCallMachine(A({ action: "dialout-start" }, o), function(b) {
|
|
4652
|
+
b.error ? m(b.error) : g(b);
|
|
4653
4653
|
});
|
|
4654
4654
|
});
|
|
4655
4655
|
}), function(o) {
|
|
@@ -4657,25 +4657,25 @@ var Rl = function(t) {
|
|
|
4657
4657
|
}) }, { key: "stopDialOut", value: function(o) {
|
|
4658
4658
|
var u = this;
|
|
4659
4659
|
return q(this._callState, "stopDialOut()"), new Promise(function(d, g) {
|
|
4660
|
-
u.sendMessageToCallMachine(
|
|
4660
|
+
u.sendMessageToCallMachine(A({ action: "dialout-stop" }, o), function(m) {
|
|
4661
4661
|
m.error ? g(m.error) : d(m);
|
|
4662
4662
|
});
|
|
4663
4663
|
});
|
|
4664
|
-
} }, { key: "sipCallTransfer", value: (
|
|
4664
|
+
} }, { key: "sipCallTransfer", value: (w = O(function* (o) {
|
|
4665
4665
|
var u = this;
|
|
4666
4666
|
if (q(this._callState, "sipCallTransfer()"), !o) throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");
|
|
4667
4667
|
return o.useSipRefer = !1, _s(o, "sipCallTransfer"), new Promise(function(d, g) {
|
|
4668
|
-
u.sendMessageToCallMachine(
|
|
4668
|
+
u.sendMessageToCallMachine(A({ action: Zi }, o), function(m) {
|
|
4669
4669
|
m.error ? g(m.error) : d(m);
|
|
4670
4670
|
});
|
|
4671
4671
|
});
|
|
4672
4672
|
}), function(o) {
|
|
4673
|
-
return
|
|
4673
|
+
return w.apply(this, arguments);
|
|
4674
4674
|
}) }, { key: "sipRefer", value: (v = O(function* (o) {
|
|
4675
4675
|
var u = this;
|
|
4676
4676
|
if (q(this._callState, "sipRefer()"), !o) throw new Error("sessionId and toEndPoint are mandatory parameter");
|
|
4677
4677
|
return o.useSipRefer = !0, _s(o, "sipRefer"), new Promise(function(d, g) {
|
|
4678
|
-
u.sendMessageToCallMachine(
|
|
4678
|
+
u.sendMessageToCallMachine(A({ action: Zi }, o), function(m) {
|
|
4679
4679
|
m.error ? g(m.error) : d(m);
|
|
4680
4680
|
});
|
|
4681
4681
|
});
|
|
@@ -4688,10 +4688,10 @@ var Rl = function(t) {
|
|
|
4688
4688
|
if (!g || !m) throw new Error("sessionId and tones are mandatory parameter");
|
|
4689
4689
|
if (typeof g != "string" || typeof m != "string") throw new Error("sessionId and tones should be of string type");
|
|
4690
4690
|
if (m.length > 20) throw new Error("tones string must be upto 20 characters");
|
|
4691
|
-
var
|
|
4691
|
+
var b = /[^0-9A-D*#]/g, E = m.match(b);
|
|
4692
4692
|
if (E && E[0]) throw new Error("".concat(E[0], " is not valid DTMF tone"));
|
|
4693
4693
|
}(o), new Promise(function(d, g) {
|
|
4694
|
-
u.sendMessageToCallMachine(
|
|
4694
|
+
u.sendMessageToCallMachine(A({ action: "send-dtmf" }, o), function(m) {
|
|
4695
4695
|
m.error ? g(m.error) : d(m);
|
|
4696
4696
|
});
|
|
4697
4697
|
});
|
|
@@ -4701,7 +4701,7 @@ var Rl = function(t) {
|
|
|
4701
4701
|
var o = this;
|
|
4702
4702
|
return this._callState !== Qe ? { stats: { latest: {} } } : new Promise(function(u) {
|
|
4703
4703
|
o.sendMessageToCallMachine({ action: "get-calc-stats" }, function(d) {
|
|
4704
|
-
u(
|
|
4704
|
+
u(A({ stats: d.stats }, o._network));
|
|
4705
4705
|
});
|
|
4706
4706
|
});
|
|
4707
4707
|
} }, { key: "testWebsocketConnectivity", value: (_ = O(function* () {
|
|
@@ -4724,7 +4724,7 @@ var Rl = function(t) {
|
|
|
4724
4724
|
return o ? o instanceof MediaStreamTrack ? !!Cl(o) || (console.error("Video track is not playable. This test needs a live video track."), !1) : (console.error("Video track needs to be of type `MediaStreamTrack`."), !1) : (console.error("Missing video track. You must provide a video track in order to run this test."), !1);
|
|
4725
4725
|
} }, { key: "testCallQuality", value: (f = O(function* () {
|
|
4726
4726
|
var o = this;
|
|
4727
|
-
D(), ce(this._callObjectMode, "testCallQuality()"),
|
|
4727
|
+
D(), ce(this._callObjectMode, "testCallQuality()"), Ht(this._callMachineInitialized, "testCallQuality()", null, !0), xn(this._callState, this._isPreparingToJoin, "testCallQuality()");
|
|
4728
4728
|
var u = this._testCallAlreadyInProgress, d = function(m) {
|
|
4729
4729
|
u || (o._testCallInProgress = m);
|
|
4730
4730
|
};
|
|
@@ -4735,13 +4735,13 @@ var Rl = function(t) {
|
|
|
4735
4735
|
return d(!1), Promise.reject(m);
|
|
4736
4736
|
}
|
|
4737
4737
|
return new Promise(function(m) {
|
|
4738
|
-
o.sendMessageToCallMachine({ action: "test-call-quality", dailyJsVersion: o.properties.dailyJsVersion }, function(
|
|
4739
|
-
var E =
|
|
4738
|
+
o.sendMessageToCallMachine({ action: "test-call-quality", dailyJsVersion: o.properties.dailyJsVersion }, function(b) {
|
|
4739
|
+
var E = b.results, C = E.result, x = Gr(E, Ml);
|
|
4740
4740
|
if (C === "failed") {
|
|
4741
|
-
var
|
|
4742
|
-
(
|
|
4741
|
+
var W, G = A({}, x);
|
|
4742
|
+
(W = x.error) !== null && W !== void 0 && W.details ? (x.error.details = JSON.parse(x.error.details), G.error = A(A({}, G.error), {}, { details: A({}, G.error.details) }), G.error.details.duringTest = "testCallQuality") : (G.error = G.error ? A({}, G.error) : {}, G.error.details = { duringTest: "testCallQuality" }), o._maybeSendToSentry(G);
|
|
4743
4743
|
}
|
|
4744
|
-
d(!1), m(
|
|
4744
|
+
d(!1), m(A({ result: C }, x));
|
|
4745
4745
|
});
|
|
4746
4746
|
});
|
|
4747
4747
|
}), function() {
|
|
@@ -4764,9 +4764,9 @@ var Rl = function(t) {
|
|
|
4764
4764
|
}
|
|
4765
4765
|
var d = o.videoTrack, g = o.duration;
|
|
4766
4766
|
if (!this._validateVideoTrackForNetworkTests(d)) throw new Error("Video track error");
|
|
4767
|
-
return this._sharedTracks.videoTrackForConnectionQualityTest = d, new Promise(function(m,
|
|
4767
|
+
return this._sharedTracks.videoTrackForConnectionQualityTest = d, new Promise(function(m, b) {
|
|
4768
4768
|
u.sendMessageToCallMachine({ action: "test-p2p-call-quality", duration: g }, function(E) {
|
|
4769
|
-
E.error ?
|
|
4769
|
+
E.error ? b(E.error) : m(E.results);
|
|
4770
4770
|
});
|
|
4771
4771
|
});
|
|
4772
4772
|
}), function(o) {
|
|
@@ -4833,8 +4833,8 @@ var Rl = function(t) {
|
|
|
4833
4833
|
var u = this;
|
|
4834
4834
|
if (!o || Object.keys(o).length === 0) throw new Error("Send settings must contain at least information for one track!");
|
|
4835
4835
|
Object.entries(o).forEach(function(d) {
|
|
4836
|
-
var g = $e(d, 2), m = g[0],
|
|
4837
|
-
u._validateVideoSendSettings(m,
|
|
4836
|
+
var g = $e(d, 2), m = g[0], b = g[1];
|
|
4837
|
+
u._validateVideoSendSettings(m, b);
|
|
4838
4838
|
});
|
|
4839
4839
|
} }, { key: "updateSendSettings", value: function(o) {
|
|
4840
4840
|
var u = this;
|
|
@@ -4868,8 +4868,8 @@ var Rl = function(t) {
|
|
|
4868
4868
|
})), { devices: u.map(function(d) {
|
|
4869
4869
|
var g = JSON.parse(JSON.stringify(d));
|
|
4870
4870
|
if (!N() && d.kind === "videoinput" && d.getCapabilities) {
|
|
4871
|
-
var m,
|
|
4872
|
-
g.facing = (
|
|
4871
|
+
var m, b = d.getCapabilities();
|
|
4872
|
+
g.facing = (b == null || (m = b.facingMode) === null || m === void 0 ? void 0 : m.length) >= 1 ? b.facingMode[0] : void 0;
|
|
4873
4873
|
}
|
|
4874
4874
|
return g;
|
|
4875
4875
|
}) };
|
|
@@ -4886,7 +4886,7 @@ var Rl = function(t) {
|
|
|
4886
4886
|
if (q(this._callState, "sendAppMessage()"), JSON.stringify(o).length > 4096) throw new Error("Message data too large. Max size is 4096");
|
|
4887
4887
|
return this.sendMessageToCallMachine({ action: "app-msg", data: o, to: u }), this;
|
|
4888
4888
|
} }, { key: "addFakeParticipant", value: function(o) {
|
|
4889
|
-
return D(), q(this._callState, "addFakeParticipant()"), this.sendMessageToCallMachine(
|
|
4889
|
+
return D(), q(this._callState, "addFakeParticipant()"), this.sendMessageToCallMachine(A({ action: "add-fake-participant" }, o)), this;
|
|
4890
4890
|
} }, { key: "setShowNamesMode", value: function(o) {
|
|
4891
4891
|
return ee(this._callObjectMode, "setShowNamesMode()"), D(), o && o !== "always" && o !== "never" ? (console.error('setShowNamesMode argument should be "always", "never", or false'), this) : (this.sendMessageToCallMachine({ action: "set-show-names", mode: o }), this);
|
|
4892
4892
|
} }, { key: "setShowLocalVideo", value: function() {
|
|
@@ -4931,7 +4931,7 @@ var Rl = function(t) {
|
|
|
4931
4931
|
var u = this;
|
|
4932
4932
|
return ee(this._callObjectMode, "setTheme()"), new Promise(function(d, g) {
|
|
4933
4933
|
try {
|
|
4934
|
-
u.validateProperties({ theme: o }), u.properties.theme =
|
|
4934
|
+
u.validateProperties({ theme: o }), u.properties.theme = A({}, o), u.sendMessageToCallMachine({ action: "set-theme", theme: u.properties.theme });
|
|
4935
4935
|
try {
|
|
4936
4936
|
u.emitDailyJSEvent({ action: oc, theme: u.properties.theme });
|
|
4937
4937
|
} catch (m) {
|
|
@@ -5014,7 +5014,7 @@ var Rl = function(t) {
|
|
|
5014
5014
|
if (Fe[u].validate && !Fe[u].validate(o[u], this)) throw new Error("property '".concat(u, "': ").concat(Fe[u].help));
|
|
5015
5015
|
}
|
|
5016
5016
|
} }, { key: "assembleMeetingUrl", value: function() {
|
|
5017
|
-
var o, u, d =
|
|
5017
|
+
var o, u, d = A(A({}, this.properties), {}, { emb: this.callClientId, embHref: encodeURIComponent(window.location.href), proxy: (o = this.properties.dailyConfig) !== null && o !== void 0 && o.proxyUrl ? encodeURIComponent((u = this.properties.dailyConfig) === null || u === void 0 ? void 0 : u.proxyUrl) : void 0 }), g = d.url.match(/\?/) ? "&" : "?";
|
|
5018
5018
|
return d.url + g + Object.keys(Fe).filter(function(m) {
|
|
5019
5019
|
return Fe[m].queryString && d[m] !== void 0;
|
|
5020
5020
|
}).map(function(m) {
|
|
@@ -5034,7 +5034,7 @@ var Rl = function(t) {
|
|
|
5034
5034
|
} }, { key: "handleMessageFromCallMachine", value: function(o) {
|
|
5035
5035
|
switch (o.action) {
|
|
5036
5036
|
case ic:
|
|
5037
|
-
this.sendMessageToCallMachine(
|
|
5037
|
+
this.sendMessageToCallMachine(A({ action: sc }, this.properties));
|
|
5038
5038
|
break;
|
|
5039
5039
|
case "call-machine-initialized":
|
|
5040
5040
|
this._callMachineInitialized = !0;
|
|
@@ -5061,7 +5061,7 @@ var Rl = function(t) {
|
|
|
5061
5061
|
} catch (bn) {
|
|
5062
5062
|
console.error("track events error", bn);
|
|
5063
5063
|
}
|
|
5064
|
-
this.compareEqualForParticipantUpdateEvent(o.participant, this._participants[d]) || (this._participants[d] =
|
|
5064
|
+
this.compareEqualForParticipantUpdateEvent(o.participant, this._participants[d]) || (this._participants[d] = A({}, o.participant), this.toggleParticipantAudioBasedOnNativeAudioFocus(), this.emitDailyJSEvent(o));
|
|
5065
5065
|
}
|
|
5066
5066
|
break;
|
|
5067
5067
|
case gc:
|
|
@@ -5074,13 +5074,13 @@ var Rl = function(t) {
|
|
|
5074
5074
|
X(this._participantCounts, o.participantCounts) || (this._participantCounts = o.participantCounts, this.emitDailyJSEvent(o));
|
|
5075
5075
|
break;
|
|
5076
5076
|
case yc:
|
|
5077
|
-
var
|
|
5078
|
-
o.awaitingAccess && (
|
|
5077
|
+
var b = { access: o.access };
|
|
5078
|
+
o.awaitingAccess && (b.awaitingAccess = o.awaitingAccess), X(this._accessState, b) || (this._accessState = b, this.emitDailyJSEvent(o));
|
|
5079
5079
|
break;
|
|
5080
5080
|
case _c:
|
|
5081
5081
|
if (o.meetingSession) {
|
|
5082
5082
|
this._meetingSessionSummary = o.meetingSession, this.emitDailyJSEvent(o);
|
|
5083
|
-
var E =
|
|
5083
|
+
var E = A(A({}, o), {}, { action: "meeting-session-updated" });
|
|
5084
5084
|
this.emitDailyJSEvent(E);
|
|
5085
5085
|
}
|
|
5086
5086
|
break;
|
|
@@ -5097,13 +5097,13 @@ var Rl = function(t) {
|
|
|
5097
5097
|
o.devices && this.emitDailyJSEvent(o);
|
|
5098
5098
|
break;
|
|
5099
5099
|
case Jc:
|
|
5100
|
-
var
|
|
5101
|
-
|
|
5100
|
+
var W = o.threshold, G = o.quality;
|
|
5101
|
+
W === this._network.threshold && G === this._network.quality || (this._network.quality = G, this._network.threshold = W, this.emitDailyJSEvent(o));
|
|
5102
5102
|
break;
|
|
5103
5103
|
case Gc:
|
|
5104
5104
|
o && o.cpuLoadState && this.emitDailyJSEvent(o);
|
|
5105
5105
|
break;
|
|
5106
|
-
case
|
|
5106
|
+
case Hc:
|
|
5107
5107
|
o && o.faceCounts !== void 0 && this.emitDailyJSEvent(o);
|
|
5108
5108
|
break;
|
|
5109
5109
|
case qc:
|
|
@@ -5143,8 +5143,8 @@ var Rl = function(t) {
|
|
|
5143
5143
|
this._remoteParticipantsAudioLevel = o.participantsAudioLevel, this._preloadCache.remoteParticipantsAudioLevelObserver = null, this.emitDailyJSEvent(o);
|
|
5144
5144
|
break;
|
|
5145
5145
|
case Nc:
|
|
5146
|
-
var
|
|
5147
|
-
this._rmpPlayerState[
|
|
5146
|
+
var Y = o.session_id;
|
|
5147
|
+
this._rmpPlayerState[Y] = o.playerState, this.emitDailyJSEvent(o);
|
|
5148
5148
|
break;
|
|
5149
5149
|
case Ic:
|
|
5150
5150
|
delete this._rmpPlayerState[o.session_id], this.emitDailyJSEvent(o);
|
|
@@ -5169,9 +5169,9 @@ var Rl = function(t) {
|
|
|
5169
5169
|
this._isScreenSharing = !1, this.emitDailyJSEvent(o);
|
|
5170
5170
|
break;
|
|
5171
5171
|
case Gi:
|
|
5172
|
-
case
|
|
5173
|
-
case Pc:
|
|
5172
|
+
case Hi:
|
|
5174
5173
|
case Ac:
|
|
5174
|
+
case Pc:
|
|
5175
5175
|
case Rc:
|
|
5176
5176
|
case Cc:
|
|
5177
5177
|
case Mc:
|
|
@@ -5182,11 +5182,11 @@ var Rl = function(t) {
|
|
|
5182
5182
|
case Lc:
|
|
5183
5183
|
case $c:
|
|
5184
5184
|
case xc:
|
|
5185
|
-
case
|
|
5185
|
+
case zc:
|
|
5186
5186
|
case Wc:
|
|
5187
5187
|
case Yc:
|
|
5188
5188
|
case Kc:
|
|
5189
|
-
case
|
|
5189
|
+
case zi:
|
|
5190
5190
|
case Qc:
|
|
5191
5191
|
case "dialin-ready":
|
|
5192
5192
|
case "dialin-connected":
|
|
@@ -5208,7 +5208,7 @@ var Rl = function(t) {
|
|
|
5208
5208
|
}
|
|
5209
5209
|
} }, { key: "maybeEventRecordingStopped", value: function(o, u) {
|
|
5210
5210
|
var d = "record";
|
|
5211
|
-
o && (u.local || u[d] !== !1 || o[d] === u[d] || this.emitDailyJSEvent({ action:
|
|
5211
|
+
o && (u.local || u[d] !== !1 || o[d] === u[d] || this.emitDailyJSEvent({ action: Hi }));
|
|
5212
5212
|
} }, { key: "maybeEventRecordingStarted", value: function(o, u) {
|
|
5213
5213
|
var d = "record";
|
|
5214
5214
|
o && (u.local || u[d] !== !0 || o[d] === u[d] || this.emitDailyJSEvent({ action: Gi }));
|
|
@@ -5240,8 +5240,8 @@ var Rl = function(t) {
|
|
|
5240
5240
|
if (o !== this._callState || u !== this._isPreparingToJoin) {
|
|
5241
5241
|
var d = this._callState, g = this._isPreparingToJoin;
|
|
5242
5242
|
this._callState = o, this._isPreparingToJoin = u;
|
|
5243
|
-
var m = Yt(d, g),
|
|
5244
|
-
m !==
|
|
5243
|
+
var m = Yt(d, g), b = Yt(this._callState, this._isPreparingToJoin);
|
|
5244
|
+
m !== b && (this.updateKeepDeviceAwake(b), this.updateDeviceAudioMode(b), this.updateShowAndroidOngoingMeetingNotification(b), this.updateNoOpRecordingEnsuringBackgroundContinuity(b));
|
|
5245
5245
|
}
|
|
5246
5246
|
} }, { key: "resetMeetingDependentVars", value: function() {
|
|
5247
5247
|
this._participants = {}, this._participantCounts = gs, this._waitingParticipants = {}, this._activeSpeaker = {}, this._activeSpeakerMode = !1, this._didPreAuth = !1, this._accessState = { access: Cn }, this._finalSummaryOfPrevSession = this._meetingSessionSummary, this._meetingSessionSummary = {}, this._meetingSessionState = Ln(ms, this._callObjectMode), this._isScreenSharing = !1, this._receiveSettings = {}, this._inputSettings = void 0, this._sendSettings = {}, this._localAudioLevel = 0, this._isLocalAudioLevelObserverRunning = !1, this._remoteParticipantsAudioLevel = {}, this._isRemoteParticipantsAudioLevelObserverRunning = !1, this._callMachineInitialized = !1, this._bundleLoadTime = void 0, this._preloadCache;
|
|
@@ -5256,8 +5256,8 @@ var Rl = function(t) {
|
|
|
5256
5256
|
if (N() && this.nativeUtils().setShowOngoingMeetingNotification) {
|
|
5257
5257
|
var u, d, g, m;
|
|
5258
5258
|
if (this.properties.reactNativeConfig && this.properties.reactNativeConfig.androidInCallNotification) {
|
|
5259
|
-
var
|
|
5260
|
-
u =
|
|
5259
|
+
var b = this.properties.reactNativeConfig.androidInCallNotification;
|
|
5260
|
+
u = b.title, d = b.subtitle, g = b.iconName, m = b.disableForCustomOverride;
|
|
5261
5261
|
}
|
|
5262
5262
|
m && (o = !1), this.nativeUtils().setShowOngoingMeetingNotification(o, u, d, g, this.callClientId);
|
|
5263
5263
|
}
|
|
@@ -5297,14 +5297,14 @@ var Rl = function(t) {
|
|
|
5297
5297
|
var o = Object.values(Be)[0], u = o._callMachineInitialized ? o : this._callMachineInitialized ? this : void 0;
|
|
5298
5298
|
u ? (u.sendMessageToCallMachine({ action: Jt, level: "warn", code: this.allowMultipleCallInstances ? 9993 : 9992 }), this._delayDuplicateInstanceLog = !1) : (this._delayDuplicateInstanceLog = !0, o._delayDuplicateInstanceLog = !0);
|
|
5299
5299
|
} }, { key: "_maybeSendToSentry", value: function(o) {
|
|
5300
|
-
var u, d, g, m,
|
|
5300
|
+
var u, d, g, m, b, E;
|
|
5301
5301
|
if (!((u = o.error) !== null && u !== void 0 && u.type && !["connection-error", "end-of-life", "no-room"].includes(o.error.type))) {
|
|
5302
5302
|
var C = (d = this.properties) !== null && d !== void 0 && d.url ? new URL(this.properties.url) : void 0, x = "production";
|
|
5303
5303
|
C && C.host.includes(".staging.daily") && (x = "staging");
|
|
5304
|
-
var
|
|
5305
|
-
if (this.session_id &&
|
|
5306
|
-
var ge =
|
|
5307
|
-
ge.userName = ge.userName ? "[Filtered]" : void 0, ge.userData = ge.userData ? "[Filtered]" : void 0, ge.token = ge.token ? "[Filtered]" : void 0,
|
|
5304
|
+
var W, G, be, Te, we, _n = new Ha({ dsn: "https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844", transport: za, integrations: [new Ui.GlobalHandlers({ onunhandledrejection: !1 }), new Ui.HttpContext()], environment: x }), Y = new br(_n, void 0, re.version());
|
|
5305
|
+
if (this.session_id && Y.setExtra("sessionId", this.session_id), this.properties) {
|
|
5306
|
+
var ge = A({}, this.properties);
|
|
5307
|
+
ge.userName = ge.userName ? "[Filtered]" : void 0, ge.userData = ge.userData ? "[Filtered]" : void 0, ge.token = ge.token ? "[Filtered]" : void 0, Y.setExtra("properties", ge);
|
|
5308
5308
|
}
|
|
5309
5309
|
if (C) {
|
|
5310
5310
|
var je = C.searchParams.get("domain");
|
|
@@ -5312,11 +5312,11 @@ var Rl = function(t) {
|
|
|
5312
5312
|
var xt = C.host.match(/(.*?)\./);
|
|
5313
5313
|
je = xt && xt[1] || "";
|
|
5314
5314
|
}
|
|
5315
|
-
je &&
|
|
5315
|
+
je && Y.setTag("domain", je);
|
|
5316
5316
|
}
|
|
5317
|
-
o.error && (
|
|
5317
|
+
o.error && (Y.setTag("fatalErrorType", o.error.type), Y.setExtra("errorDetails", o.error.details), !((W = o.error.details) === null || W === void 0) && W.uri && Y.setTag("serverAddress", o.error.details.uri), !((G = o.error.details) === null || G === void 0) && G.workerGroup && Y.setTag("workerGroup", o.error.details.workerGroup), !((be = o.error.details) === null || be === void 0) && be.geoGroup && Y.setTag("geoGroup", o.error.details.geoGroup), !((Te = o.error.details) === null || Te === void 0) && Te.on && Y.setTag("connectionAttempt", o.error.details.on), (we = o.error.details) !== null && we !== void 0 && we.bundleUrl && (Y.setTag("bundleUrl", o.error.details.bundleUrl), Y.setTag("bundleError", o.error.details.sourceError.type))), Y.setTags({ callMode: this._callObjectMode ? N() ? "reactNative" : (g = this.properties) !== null && g !== void 0 && (m = g.dailyConfig) !== null && m !== void 0 && (b = m.callMode) !== null && b !== void 0 && b.includes("prebuilt") ? this.properties.dailyConfig.callMode : "custom" : "prebuilt-frame", version: re.version() });
|
|
5318
5318
|
var bn = ((E = o.error) === null || E === void 0 ? void 0 : E.msg) || o.errorMsg;
|
|
5319
|
-
|
|
5319
|
+
Y.run(function(Zo) {
|
|
5320
5320
|
Zo.captureException(new Error(bn));
|
|
5321
5321
|
});
|
|
5322
5322
|
}
|
|
@@ -5341,14 +5341,14 @@ var Rl = function(t) {
|
|
|
5341
5341
|
D(), o && u ? (d = o, g = u) : o && o.append ? (d = o, g = {}) : (d = document.body, g = o || {});
|
|
5342
5342
|
var m = g.iframeStyle;
|
|
5343
5343
|
m || (m = d === document.body ? { position: "fixed", border: "1px solid black", backgroundColor: "white", width: "375px", height: "450px", right: "1em", bottom: "1em" } : { border: 0, width: "100%", height: "100%" });
|
|
5344
|
-
var
|
|
5345
|
-
window.navigator && window.navigator.userAgent.match(/Chrome\/61\./) ?
|
|
5346
|
-
return
|
|
5344
|
+
var b = document.createElement("iframe");
|
|
5345
|
+
window.navigator && window.navigator.userAgent.match(/Chrome\/61\./) ? b.allow = "microphone, camera" : b.allow = "microphone; camera; autoplay; display-capture; screen-wake-lock", b.style.visibility = "hidden", d.appendChild(b), b.style.visibility = null, Object.keys(m).forEach(function(E) {
|
|
5346
|
+
return b.style[E] = m[E];
|
|
5347
5347
|
}), g.layout || (g.customLayout ? g.layout = "custom-v1" : g.layout = "browser");
|
|
5348
5348
|
try {
|
|
5349
|
-
return new re(
|
|
5349
|
+
return new re(b, g);
|
|
5350
5350
|
} catch (E) {
|
|
5351
|
-
throw d.removeChild(
|
|
5351
|
+
throw d.removeChild(b), E;
|
|
5352
5352
|
}
|
|
5353
5353
|
} }, { key: "createTransparentFrame", value: function() {
|
|
5354
5354
|
var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -5401,7 +5401,7 @@ function xn(t, e) {
|
|
|
5401
5401
|
throw r && (i += " ".concat(r)), console.error(i), new Error(i);
|
|
5402
5402
|
}
|
|
5403
5403
|
}
|
|
5404
|
-
function
|
|
5404
|
+
function Ht(t) {
|
|
5405
5405
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "This daily-js method", n = arguments.length > 2 ? arguments[2] : void 0;
|
|
5406
5406
|
if (!t) {
|
|
5407
5407
|
var r = "".concat(e, arguments.length > 3 && arguments[3] !== void 0 && arguments[3] ? " requires preAuth() or startCamera() to initialize call state." : " requires preAuth(), startCamera(), or join() to initialize call state.");
|
|
@@ -5475,14 +5475,14 @@ function bo(t) {
|
|
|
5475
5475
|
if (h.source === "default") return h.type = "default", !0;
|
|
5476
5476
|
if (h.source instanceof ArrayBuffer) return !0;
|
|
5477
5477
|
if (St(h.source)) return h.type = "url", !!function(k) {
|
|
5478
|
-
var v = new URL(k),
|
|
5478
|
+
var v = new URL(k), w = v.pathname;
|
|
5479
5479
|
if (v.protocol === "data:") try {
|
|
5480
|
-
var T =
|
|
5480
|
+
var T = w.substring(w.indexOf(":") + 1, w.indexOf(";")).split("/")[1];
|
|
5481
5481
|
return On.includes(T);
|
|
5482
5482
|
} catch (B) {
|
|
5483
5483
|
return console.error("failed to deduce blob content type", B), !1;
|
|
5484
5484
|
}
|
|
5485
|
-
var M =
|
|
5485
|
+
var M = w.split(".").at(-1).toLowerCase().trim();
|
|
5486
5486
|
return On.includes(M);
|
|
5487
5487
|
}(h.source) || (console.error("invalid image type; supported types: [".concat(On.join(", "), "]")), !1);
|
|
5488
5488
|
return f = h.source, _ = Number(f), isNaN(_) || !Number.isInteger(_) || _ <= 0 || _ > Xi ? (console.error("invalid image selection; must be an int, > 0, <= ".concat(Xi)), !1) : (h.type = "daily-preselect", !0);
|
|
@@ -5632,7 +5632,7 @@ function Ll(t) {
|
|
|
5632
5632
|
let e;
|
|
5633
5633
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Oo(t.buffer), e;
|
|
5634
5634
|
}
|
|
5635
|
-
const Nl = mn("string"), se = mn("function"),
|
|
5635
|
+
const Nl = mn("string"), se = mn("function"), Ao = mn("number"), gn = (t) => t !== null && typeof t == "object", jl = (t) => t === !0 || t === !1, Kt = (t) => {
|
|
5636
5636
|
if (fn(t) !== "object")
|
|
5637
5637
|
return !1;
|
|
5638
5638
|
const e = Cr(t);
|
|
@@ -5641,8 +5641,8 @@ const Nl = mn("string"), se = mn("function"), Po = mn("number"), gn = (t) => t !
|
|
|
5641
5641
|
let e;
|
|
5642
5642
|
return t && (typeof FormData == "function" && t instanceof FormData || se(t.append) && ((e = fn(t)) === "formdata" || // detect form-data instance
|
|
5643
5643
|
e === "object" && se(t.toString) && t.toString() === "[object FormData]"));
|
|
5644
|
-
}, Jl = me("URLSearchParams"), [$l, Gl,
|
|
5645
|
-
function
|
|
5644
|
+
}, Jl = me("URLSearchParams"), [$l, Gl, Hl, zl] = ["ReadableStream", "Request", "Response", "Headers"].map(me), Wl = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
5645
|
+
function Pt(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
5646
5646
|
if (t === null || typeof t > "u")
|
|
5647
5647
|
return;
|
|
5648
5648
|
let r, i;
|
|
@@ -5656,7 +5656,7 @@ function At(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
5656
5656
|
c = s[r], e.call(null, t[c], c, t);
|
|
5657
5657
|
}
|
|
5658
5658
|
}
|
|
5659
|
-
function
|
|
5659
|
+
function Po(t, e) {
|
|
5660
5660
|
e = e.toLowerCase();
|
|
5661
5661
|
const n = Object.keys(t);
|
|
5662
5662
|
let r = n.length, i;
|
|
@@ -5668,14 +5668,14 @@ function Ao(t, e) {
|
|
|
5668
5668
|
const Ro = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, xo = (t) => !Ot(t) && t !== Ro;
|
|
5669
5669
|
function ar() {
|
|
5670
5670
|
const { caseless: t } = xo(this) && this || {}, e = {}, n = (r, i) => {
|
|
5671
|
-
const s = t &&
|
|
5671
|
+
const s = t && Po(e, i) || i;
|
|
5672
5672
|
Kt(e[s]) && Kt(r) ? e[s] = ar(e[s], r) : Kt(r) ? e[s] = ar({}, r) : ut(r) ? e[s] = r.slice() : e[s] = r;
|
|
5673
5673
|
};
|
|
5674
5674
|
for (let r = 0, i = arguments.length; r < i; r++)
|
|
5675
|
-
arguments[r] &&
|
|
5675
|
+
arguments[r] && Pt(arguments[r], n);
|
|
5676
5676
|
return e;
|
|
5677
5677
|
}
|
|
5678
|
-
const Yl = (t, e, n, { allOwnKeys: r } = {}) => (
|
|
5678
|
+
const Yl = (t, e, n, { allOwnKeys: r } = {}) => (Pt(e, (i, s) => {
|
|
5679
5679
|
n && se(i) ? t[s] = Mo(i, n) : t[s] = i;
|
|
5680
5680
|
}, { allOwnKeys: r }), t), Kl = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Ql = (t, e, n, r) => {
|
|
5681
5681
|
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
@@ -5699,7 +5699,7 @@ const Yl = (t, e, n, { allOwnKeys: r } = {}) => (At(e, (i, s) => {
|
|
|
5699
5699
|
if (!t) return null;
|
|
5700
5700
|
if (ut(t)) return t;
|
|
5701
5701
|
let e = t.length;
|
|
5702
|
-
if (!
|
|
5702
|
+
if (!Ao(e)) return null;
|
|
5703
5703
|
const n = new Array(e);
|
|
5704
5704
|
for (; e-- > 0; )
|
|
5705
5705
|
n[e] = t[e];
|
|
@@ -5724,7 +5724,7 @@ const Yl = (t, e, n, { allOwnKeys: r } = {}) => (At(e, (i, s) => {
|
|
|
5724
5724
|
}
|
|
5725
5725
|
), Ss = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), ou = me("RegExp"), Do = (t, e) => {
|
|
5726
5726
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
5727
|
-
|
|
5727
|
+
Pt(n, (i, s) => {
|
|
5728
5728
|
let a;
|
|
5729
5729
|
(a = e(i, s, t)) !== !1 && (r[s] = a || i);
|
|
5730
5730
|
}), Object.defineProperties(t, r);
|
|
@@ -5773,7 +5773,7 @@ const pu = (t) => {
|
|
|
5773
5773
|
if (!("toJSON" in r)) {
|
|
5774
5774
|
e[i] = r;
|
|
5775
5775
|
const s = ut(r) ? [] : {};
|
|
5776
|
-
return
|
|
5776
|
+
return Pt(r, (a, c) => {
|
|
5777
5777
|
const l = n(a, i + 1);
|
|
5778
5778
|
!Ot(l) && (s[c] = l);
|
|
5779
5779
|
}), e[i] = void 0, s;
|
|
@@ -5789,14 +5789,14 @@ const pu = (t) => {
|
|
|
5789
5789
|
isFormData: Vl,
|
|
5790
5790
|
isArrayBufferView: Ll,
|
|
5791
5791
|
isString: Nl,
|
|
5792
|
-
isNumber:
|
|
5792
|
+
isNumber: Ao,
|
|
5793
5793
|
isBoolean: jl,
|
|
5794
5794
|
isObject: gn,
|
|
5795
5795
|
isPlainObject: Kt,
|
|
5796
5796
|
isReadableStream: $l,
|
|
5797
5797
|
isRequest: Gl,
|
|
5798
|
-
isResponse:
|
|
5799
|
-
isHeaders:
|
|
5798
|
+
isResponse: Hl,
|
|
5799
|
+
isHeaders: zl,
|
|
5800
5800
|
isUndefined: Ot,
|
|
5801
5801
|
isDate: Il,
|
|
5802
5802
|
isFile: Bl,
|
|
@@ -5807,7 +5807,7 @@ const pu = (t) => {
|
|
|
5807
5807
|
isURLSearchParams: Jl,
|
|
5808
5808
|
isTypedArray: tu,
|
|
5809
5809
|
isFileList: Ul,
|
|
5810
|
-
forEach:
|
|
5810
|
+
forEach: Pt,
|
|
5811
5811
|
merge: ar,
|
|
5812
5812
|
extend: Yl,
|
|
5813
5813
|
trim: Wl,
|
|
@@ -5830,7 +5830,7 @@ const pu = (t) => {
|
|
|
5830
5830
|
toCamelCase: su,
|
|
5831
5831
|
noop: lu,
|
|
5832
5832
|
toFiniteNumber: uu,
|
|
5833
|
-
findKey:
|
|
5833
|
+
findKey: Po,
|
|
5834
5834
|
global: Ro,
|
|
5835
5835
|
isContextDefined: xo,
|
|
5836
5836
|
ALPHABET: Lo,
|
|
@@ -5840,10 +5840,10 @@ const pu = (t) => {
|
|
|
5840
5840
|
isAsyncFn: fu,
|
|
5841
5841
|
isThenable: mu
|
|
5842
5842
|
};
|
|
5843
|
-
function
|
|
5843
|
+
function P(t, e, n, r, i) {
|
|
5844
5844
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), i && (this.response = i);
|
|
5845
5845
|
}
|
|
5846
|
-
y.inherits(
|
|
5846
|
+
y.inherits(P, Error, {
|
|
5847
5847
|
toJSON: function() {
|
|
5848
5848
|
return {
|
|
5849
5849
|
// Standard
|
|
@@ -5864,7 +5864,7 @@ y.inherits(A, Error, {
|
|
|
5864
5864
|
};
|
|
5865
5865
|
}
|
|
5866
5866
|
});
|
|
5867
|
-
const No =
|
|
5867
|
+
const No = P.prototype, jo = {};
|
|
5868
5868
|
[
|
|
5869
5869
|
"ERR_BAD_OPTION_VALUE",
|
|
5870
5870
|
"ERR_BAD_OPTION",
|
|
@@ -5882,13 +5882,13 @@ const No = A.prototype, jo = {};
|
|
|
5882
5882
|
].forEach((t) => {
|
|
5883
5883
|
jo[t] = { value: t };
|
|
5884
5884
|
});
|
|
5885
|
-
Object.defineProperties(
|
|
5885
|
+
Object.defineProperties(P, jo);
|
|
5886
5886
|
Object.defineProperty(No, "isAxiosError", { value: !0 });
|
|
5887
|
-
|
|
5887
|
+
P.from = (t, e, n, r, i, s) => {
|
|
5888
5888
|
const a = Object.create(No);
|
|
5889
5889
|
return y.toFlatObject(t, a, function(l) {
|
|
5890
5890
|
return l !== Error.prototype;
|
|
5891
|
-
}, (c) => c !== "isAxiosError"),
|
|
5891
|
+
}, (c) => c !== "isAxiosError"), P.call(a, t.message, e, n, r, i), a.cause = t, a.name = t.name, s && Object.assign(a, s), a;
|
|
5892
5892
|
};
|
|
5893
5893
|
const gu = null;
|
|
5894
5894
|
function cr(t) {
|
|
@@ -5915,8 +5915,8 @@ function vn(t, e, n) {
|
|
|
5915
5915
|
metaTokens: !0,
|
|
5916
5916
|
dots: !1,
|
|
5917
5917
|
indexes: !1
|
|
5918
|
-
}, !1, function(
|
|
5919
|
-
return !y.isUndefined(T[
|
|
5918
|
+
}, !1, function(w, T) {
|
|
5919
|
+
return !y.isUndefined(T[w]);
|
|
5920
5920
|
});
|
|
5921
5921
|
const r = n.metaTokens, i = n.visitor || h, s = n.dots, a = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && y.isSpecCompliantForm(e);
|
|
5922
5922
|
if (!y.isFunction(i))
|
|
@@ -5926,42 +5926,42 @@ function vn(t, e, n) {
|
|
|
5926
5926
|
if (y.isDate(v))
|
|
5927
5927
|
return v.toISOString();
|
|
5928
5928
|
if (!l && y.isBlob(v))
|
|
5929
|
-
throw new
|
|
5929
|
+
throw new P("Blob is not supported. Use a Buffer instead.");
|
|
5930
5930
|
return y.isArrayBuffer(v) || y.isTypedArray(v) ? l && typeof Blob == "function" ? new Blob([v]) : Buffer.from(v) : v;
|
|
5931
5931
|
}
|
|
5932
|
-
function h(v,
|
|
5932
|
+
function h(v, w, T) {
|
|
5933
5933
|
let M = v;
|
|
5934
5934
|
if (v && !T && typeof v == "object") {
|
|
5935
|
-
if (y.endsWith(
|
|
5936
|
-
|
|
5937
|
-
else if (y.isArray(v) && vu(v) || (y.isFileList(v) || y.endsWith(
|
|
5938
|
-
return
|
|
5935
|
+
if (y.endsWith(w, "{}"))
|
|
5936
|
+
w = r ? w : w.slice(0, -2), v = JSON.stringify(v);
|
|
5937
|
+
else if (y.isArray(v) && vu(v) || (y.isFileList(v) || y.endsWith(w, "[]")) && (M = y.toArray(v)))
|
|
5938
|
+
return w = Io(w), M.forEach(function(L, ne) {
|
|
5939
5939
|
!(y.isUndefined(L) || L === null) && e.append(
|
|
5940
5940
|
// eslint-disable-next-line no-nested-ternary
|
|
5941
|
-
a === !0 ? Es([
|
|
5941
|
+
a === !0 ? Es([w], ne, s) : a === null ? w : w + "[]",
|
|
5942
5942
|
p(L)
|
|
5943
5943
|
);
|
|
5944
5944
|
}), !1;
|
|
5945
5945
|
}
|
|
5946
|
-
return cr(v) ? !0 : (e.append(Es(T,
|
|
5946
|
+
return cr(v) ? !0 : (e.append(Es(T, w, s), p(v)), !1);
|
|
5947
5947
|
}
|
|
5948
5948
|
const f = [], _ = Object.assign(yu, {
|
|
5949
5949
|
defaultVisitor: h,
|
|
5950
5950
|
convertValue: p,
|
|
5951
5951
|
isVisitable: cr
|
|
5952
5952
|
});
|
|
5953
|
-
function k(v,
|
|
5953
|
+
function k(v, w) {
|
|
5954
5954
|
if (!y.isUndefined(v)) {
|
|
5955
5955
|
if (f.indexOf(v) !== -1)
|
|
5956
|
-
throw Error("Circular reference detected in " +
|
|
5956
|
+
throw Error("Circular reference detected in " + w.join("."));
|
|
5957
5957
|
f.push(v), y.forEach(v, function(M, B) {
|
|
5958
5958
|
(!(y.isUndefined(M) || M === null) && i.call(
|
|
5959
5959
|
e,
|
|
5960
5960
|
M,
|
|
5961
5961
|
y.isString(B) ? B.trim() : B,
|
|
5962
|
-
|
|
5962
|
+
w,
|
|
5963
5963
|
_
|
|
5964
|
-
)) === !0 && k(M,
|
|
5964
|
+
)) === !0 && k(M, w ? w.concat(B) : [B]);
|
|
5965
5965
|
}), f.pop();
|
|
5966
5966
|
}
|
|
5967
5967
|
}
|
|
@@ -6096,10 +6096,10 @@ function Ou(t, e) {
|
|
|
6096
6096
|
}
|
|
6097
6097
|
}, e));
|
|
6098
6098
|
}
|
|
6099
|
-
function
|
|
6099
|
+
function Au(t) {
|
|
6100
6100
|
return y.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
6101
6101
|
}
|
|
6102
|
-
function
|
|
6102
|
+
function Pu(t) {
|
|
6103
6103
|
const e = {}, n = Object.keys(t);
|
|
6104
6104
|
let r;
|
|
6105
6105
|
const i = n.length;
|
|
@@ -6113,12 +6113,12 @@ function qo(t) {
|
|
|
6113
6113
|
let a = n[s++];
|
|
6114
6114
|
if (a === "__proto__") return !0;
|
|
6115
6115
|
const c = Number.isFinite(+a), l = s >= n.length;
|
|
6116
|
-
return a = !a && y.isArray(i) ? i.length : a, l ? (y.hasOwnProp(i, a) ? i[a] = [i[a], r] : i[a] = r, !c) : ((!i[a] || !y.isObject(i[a])) && (i[a] = []), e(n, r, i[a], s) && y.isArray(i[a]) && (i[a] =
|
|
6116
|
+
return a = !a && y.isArray(i) ? i.length : a, l ? (y.hasOwnProp(i, a) ? i[a] = [i[a], r] : i[a] = r, !c) : ((!i[a] || !y.isObject(i[a])) && (i[a] = []), e(n, r, i[a], s) && y.isArray(i[a]) && (i[a] = Pu(i[a])), !c);
|
|
6117
6117
|
}
|
|
6118
6118
|
if (y.isFormData(t) && y.isFunction(t.entries)) {
|
|
6119
6119
|
const n = {};
|
|
6120
6120
|
return y.forEachEntry(t, (r, i) => {
|
|
6121
|
-
e(
|
|
6121
|
+
e(Au(r), i, n, 0);
|
|
6122
6122
|
}), n;
|
|
6123
6123
|
}
|
|
6124
6124
|
return null;
|
|
@@ -6171,7 +6171,7 @@ const Rt = {
|
|
|
6171
6171
|
return JSON.parse(e);
|
|
6172
6172
|
} catch (c) {
|
|
6173
6173
|
if (a)
|
|
6174
|
-
throw c.name === "SyntaxError" ?
|
|
6174
|
+
throw c.name === "SyntaxError" ? P.from(c, P.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
6175
6175
|
}
|
|
6176
6176
|
}
|
|
6177
6177
|
return e;
|
|
@@ -6406,16 +6406,16 @@ function Vo(t) {
|
|
|
6406
6406
|
return !!(t && t.__CANCEL__);
|
|
6407
6407
|
}
|
|
6408
6408
|
function dt(t, e, n) {
|
|
6409
|
-
|
|
6409
|
+
P.call(this, t ?? "canceled", P.ERR_CANCELED, e, n), this.name = "CanceledError";
|
|
6410
6410
|
}
|
|
6411
|
-
y.inherits(dt,
|
|
6411
|
+
y.inherits(dt, P, {
|
|
6412
6412
|
__CANCEL__: !0
|
|
6413
6413
|
});
|
|
6414
6414
|
function Jo(t, e, n) {
|
|
6415
6415
|
const r = n.config.validateStatus;
|
|
6416
|
-
!n.status || !r || r(n.status) ? t(n) : e(new
|
|
6416
|
+
!n.status || !r || r(n.status) ? t(n) : e(new P(
|
|
6417
6417
|
"Request failed with status code " + n.status,
|
|
6418
|
-
[
|
|
6418
|
+
[P.ERR_BAD_REQUEST, P.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
6419
6419
|
n.config,
|
|
6420
6420
|
n.request,
|
|
6421
6421
|
n
|
|
@@ -6623,7 +6623,7 @@ const Go = (t) => {
|
|
|
6623
6623
|
p && a.set(i, p);
|
|
6624
6624
|
}
|
|
6625
6625
|
return e;
|
|
6626
|
-
}, Gu = typeof XMLHttpRequest < "u",
|
|
6626
|
+
}, Gu = typeof XMLHttpRequest < "u", Hu = Gu && function(t) {
|
|
6627
6627
|
return new Promise(function(n, r) {
|
|
6628
6628
|
const i = Go(t);
|
|
6629
6629
|
let s = i.data;
|
|
@@ -6639,7 +6639,7 @@ const Go = (t) => {
|
|
|
6639
6639
|
return;
|
|
6640
6640
|
const k = Z.from(
|
|
6641
6641
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
6642
|
-
),
|
|
6642
|
+
), w = {
|
|
6643
6643
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
6644
6644
|
status: h.status,
|
|
6645
6645
|
statusText: h.statusText,
|
|
@@ -6651,46 +6651,46 @@ const Go = (t) => {
|
|
|
6651
6651
|
n(M), p();
|
|
6652
6652
|
}, function(M) {
|
|
6653
6653
|
r(M), p();
|
|
6654
|
-
},
|
|
6654
|
+
}, w), h = null;
|
|
6655
6655
|
}
|
|
6656
6656
|
"onloadend" in h ? h.onloadend = f : h.onreadystatechange = function() {
|
|
6657
6657
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(f);
|
|
6658
6658
|
}, h.onabort = function() {
|
|
6659
|
-
h && (r(new
|
|
6659
|
+
h && (r(new P("Request aborted", P.ECONNABORTED, i, h)), h = null);
|
|
6660
6660
|
}, h.onerror = function() {
|
|
6661
|
-
r(new
|
|
6661
|
+
r(new P("Network Error", P.ERR_NETWORK, i, h)), h = null;
|
|
6662
6662
|
}, h.ontimeout = function() {
|
|
6663
6663
|
let v = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
|
|
6664
|
-
const
|
|
6665
|
-
i.timeoutErrorMessage && (v = i.timeoutErrorMessage), r(new
|
|
6664
|
+
const w = i.transitional || Uo;
|
|
6665
|
+
i.timeoutErrorMessage && (v = i.timeoutErrorMessage), r(new P(
|
|
6666
6666
|
v,
|
|
6667
|
-
|
|
6667
|
+
w.clarifyTimeoutError ? P.ETIMEDOUT : P.ECONNABORTED,
|
|
6668
6668
|
i,
|
|
6669
6669
|
h
|
|
6670
6670
|
)), h = null;
|
|
6671
|
-
}, s === void 0 && a.setContentType(null), "setRequestHeader" in h && y.forEach(a.toJSON(), function(v,
|
|
6672
|
-
h.setRequestHeader(
|
|
6671
|
+
}, s === void 0 && a.setContentType(null), "setRequestHeader" in h && y.forEach(a.toJSON(), function(v, w) {
|
|
6672
|
+
h.setRequestHeader(w, v);
|
|
6673
6673
|
}), y.isUndefined(i.withCredentials) || (h.withCredentials = !!i.withCredentials), c && c !== "json" && (h.responseType = i.responseType), typeof i.onDownloadProgress == "function" && h.addEventListener("progress", an(i.onDownloadProgress, !0)), typeof i.onUploadProgress == "function" && h.upload && h.upload.addEventListener("progress", an(i.onUploadProgress)), (i.cancelToken || i.signal) && (l = (k) => {
|
|
6674
6674
|
h && (r(!k || k.type ? new dt(null, t, h) : k), h.abort(), h = null);
|
|
6675
6675
|
}, i.cancelToken && i.cancelToken.subscribe(l), i.signal && (i.signal.aborted ? l() : i.signal.addEventListener("abort", l)));
|
|
6676
6676
|
const _ = Bu(i.url);
|
|
6677
6677
|
if (_ && ue.protocols.indexOf(_) === -1) {
|
|
6678
|
-
r(new
|
|
6678
|
+
r(new P("Unsupported protocol " + _ + ":", P.ERR_BAD_REQUEST, t));
|
|
6679
6679
|
return;
|
|
6680
6680
|
}
|
|
6681
6681
|
h.send(s || null);
|
|
6682
6682
|
});
|
|
6683
|
-
},
|
|
6683
|
+
}, zu = (t, e) => {
|
|
6684
6684
|
let n = new AbortController(), r;
|
|
6685
6685
|
const i = function(l) {
|
|
6686
6686
|
if (!r) {
|
|
6687
6687
|
r = !0, a();
|
|
6688
6688
|
const p = l instanceof Error ? l : this.reason;
|
|
6689
|
-
n.abort(p instanceof
|
|
6689
|
+
n.abort(p instanceof P ? p : new dt(p instanceof Error ? p.message : p));
|
|
6690
6690
|
}
|
|
6691
6691
|
};
|
|
6692
6692
|
let s = e && setTimeout(() => {
|
|
6693
|
-
i(new
|
|
6693
|
+
i(new P(`timeout ${e} of ms exceeded`, P.ETIMEDOUT));
|
|
6694
6694
|
}, e);
|
|
6695
6695
|
const a = () => {
|
|
6696
6696
|
t && (s && clearTimeout(s), s = null, t.forEach((l) => {
|
|
@@ -6714,7 +6714,7 @@ const Go = (t) => {
|
|
|
6714
6714
|
}, Yu = async function* (t, e, n) {
|
|
6715
6715
|
for await (const r of t)
|
|
6716
6716
|
yield* Wu(ArrayBuffer.isView(r) ? r : await n(String(r)), e);
|
|
6717
|
-
},
|
|
6717
|
+
}, As = (t, e, n, r, i) => {
|
|
6718
6718
|
const s = Yu(t, e, i);
|
|
6719
6719
|
let a = 0;
|
|
6720
6720
|
return new ReadableStream({
|
|
@@ -6734,14 +6734,14 @@ const Go = (t) => {
|
|
|
6734
6734
|
}, {
|
|
6735
6735
|
highWaterMark: 2
|
|
6736
6736
|
});
|
|
6737
|
-
},
|
|
6737
|
+
}, Ps = (t, e) => {
|
|
6738
6738
|
const n = t != null;
|
|
6739
6739
|
return (r) => setTimeout(() => e({
|
|
6740
6740
|
lengthComputable: n,
|
|
6741
6741
|
total: t,
|
|
6742
6742
|
loaded: r
|
|
6743
6743
|
}));
|
|
6744
|
-
}, yn = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
6744
|
+
}, yn = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ho = yn && typeof ReadableStream == "function", lr = yn && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), Ku = Ho && (() => {
|
|
6745
6745
|
let t = !1;
|
|
6746
6746
|
const e = new Request(ue.origin, {
|
|
6747
6747
|
body: new ReadableStream(),
|
|
@@ -6751,7 +6751,7 @@ const Go = (t) => {
|
|
|
6751
6751
|
}
|
|
6752
6752
|
}).headers.has("Content-Type");
|
|
6753
6753
|
return t && !e;
|
|
6754
|
-
})(), Rs = 64 * 1024, ur =
|
|
6754
|
+
})(), Rs = 64 * 1024, ur = Ho && !!(() => {
|
|
6755
6755
|
try {
|
|
6756
6756
|
return y.isReadableStream(new Response("").body);
|
|
6757
6757
|
} catch {
|
|
@@ -6762,7 +6762,7 @@ const Go = (t) => {
|
|
|
6762
6762
|
yn && ((t) => {
|
|
6763
6763
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
6764
6764
|
!cn[e] && (cn[e] = y.isFunction(t[e]) ? (n) => n[e]() : (n, r) => {
|
|
6765
|
-
throw new
|
|
6765
|
+
throw new P(`Response type '${e}' is not supported`, P.ERR_NOT_SUPPORT, r);
|
|
6766
6766
|
});
|
|
6767
6767
|
});
|
|
6768
6768
|
})(new Response());
|
|
@@ -6796,11 +6796,11 @@ const Qu = async (t) => {
|
|
|
6796
6796
|
fetchOptions: _
|
|
6797
6797
|
} = Go(t);
|
|
6798
6798
|
p = p ? (p + "").toLowerCase() : "text";
|
|
6799
|
-
let [k, v] = i || s || a ?
|
|
6799
|
+
let [k, v] = i || s || a ? zu([i, s], a) : [], w, T;
|
|
6800
6800
|
const M = () => {
|
|
6801
|
-
!
|
|
6801
|
+
!w && setTimeout(() => {
|
|
6802
6802
|
k && k.unsubscribe();
|
|
6803
|
-
}),
|
|
6803
|
+
}), w = !0;
|
|
6804
6804
|
};
|
|
6805
6805
|
let B;
|
|
6806
6806
|
try {
|
|
@@ -6810,7 +6810,7 @@ const Qu = async (t) => {
|
|
|
6810
6810
|
body: r,
|
|
6811
6811
|
duplex: "half"
|
|
6812
6812
|
}), _e;
|
|
6813
|
-
y.isFormData(r) && (_e = oe.headers.get("content-type")) && h.setContentType(_e), oe.body && (r =
|
|
6813
|
+
y.isFormData(r) && (_e = oe.headers.get("content-type")) && h.setContentType(_e), oe.body && (r = As(oe.body, Rs, Ps(
|
|
6814
6814
|
B,
|
|
6815
6815
|
an(l)
|
|
6816
6816
|
), null, lr));
|
|
@@ -6833,7 +6833,7 @@ const Qu = async (t) => {
|
|
|
6833
6833
|
});
|
|
6834
6834
|
const _e = y.toFiniteNumber(L.headers.get("content-length"));
|
|
6835
6835
|
L = new Response(
|
|
6836
|
-
|
|
6836
|
+
As(L.body, Rs, c && Ps(
|
|
6837
6837
|
_e,
|
|
6838
6838
|
an(c, !0)
|
|
6839
6839
|
), ne && M, lr),
|
|
@@ -6854,15 +6854,15 @@ const Qu = async (t) => {
|
|
|
6854
6854
|
});
|
|
6855
6855
|
} catch (L) {
|
|
6856
6856
|
throw M(), L && L.name === "TypeError" && /fetch/i.test(L.message) ? Object.assign(
|
|
6857
|
-
new
|
|
6857
|
+
new P("Network Error", P.ERR_NETWORK, t, T),
|
|
6858
6858
|
{
|
|
6859
6859
|
cause: L.cause || L
|
|
6860
6860
|
}
|
|
6861
|
-
) :
|
|
6861
|
+
) : P.from(L, L && L.code, t, T);
|
|
6862
6862
|
}
|
|
6863
6863
|
}), dr = {
|
|
6864
6864
|
http: gu,
|
|
6865
|
-
xhr:
|
|
6865
|
+
xhr: Hu,
|
|
6866
6866
|
fetch: Zu
|
|
6867
6867
|
};
|
|
6868
6868
|
y.forEach(dr, (t, e) => {
|
|
@@ -6874,7 +6874,7 @@ y.forEach(dr, (t, e) => {
|
|
|
6874
6874
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
6875
6875
|
}
|
|
6876
6876
|
});
|
|
6877
|
-
const xs = (t) => `- ${t}`, ed = (t) => y.isFunction(t) || t === null || t === !1,
|
|
6877
|
+
const xs = (t) => `- ${t}`, ed = (t) => y.isFunction(t) || t === null || t === !1, zo = {
|
|
6878
6878
|
getAdapter: (t) => {
|
|
6879
6879
|
t = y.isArray(t) ? t : [t];
|
|
6880
6880
|
const { length: e } = t;
|
|
@@ -6884,7 +6884,7 @@ const xs = (t) => `- ${t}`, ed = (t) => y.isFunction(t) || t === null || t === !
|
|
|
6884
6884
|
n = t[s];
|
|
6885
6885
|
let a;
|
|
6886
6886
|
if (r = n, !ed(n) && (r = dr[(a = String(n)).toLowerCase()], r === void 0))
|
|
6887
|
-
throw new
|
|
6887
|
+
throw new P(`Unknown adapter '${a}'`);
|
|
6888
6888
|
if (r)
|
|
6889
6889
|
break;
|
|
6890
6890
|
i[a || "#" + s] = r;
|
|
@@ -6896,7 +6896,7 @@ const xs = (t) => `- ${t}`, ed = (t) => y.isFunction(t) || t === null || t === !
|
|
|
6896
6896
|
let a = e ? s.length > 1 ? `since :
|
|
6897
6897
|
` + s.map(xs).join(`
|
|
6898
6898
|
`) : " " + xs(s[0]) : "as no adapter specified";
|
|
6899
|
-
throw new
|
|
6899
|
+
throw new P(
|
|
6900
6900
|
"There is no suitable adapter to dispatch the request " + a,
|
|
6901
6901
|
"ERR_NOT_SUPPORT"
|
|
6902
6902
|
);
|
|
@@ -6913,7 +6913,7 @@ function Ds(t) {
|
|
|
6913
6913
|
return Bn(t), t.headers = Z.from(t.headers), t.data = In.call(
|
|
6914
6914
|
t,
|
|
6915
6915
|
t.transformRequest
|
|
6916
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
6916
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), zo.getAdapter(t.adapter || Rt.adapter)(t).then(function(r) {
|
|
6917
6917
|
return Bn(t), r.data = In.call(
|
|
6918
6918
|
t,
|
|
6919
6919
|
t.transformResponse,
|
|
@@ -6927,22 +6927,22 @@ function Ds(t) {
|
|
|
6927
6927
|
), r.response.headers = Z.from(r.response.headers))), Promise.reject(r);
|
|
6928
6928
|
});
|
|
6929
6929
|
}
|
|
6930
|
-
const Wo = "1.7.2",
|
|
6930
|
+
const Wo = "1.7.2", Ar = {};
|
|
6931
6931
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
6932
|
-
|
|
6932
|
+
Ar[t] = function(r) {
|
|
6933
6933
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
6934
6934
|
};
|
|
6935
6935
|
});
|
|
6936
6936
|
const Ls = {};
|
|
6937
|
-
|
|
6937
|
+
Ar.transitional = function(e, n, r) {
|
|
6938
6938
|
function i(s, a) {
|
|
6939
6939
|
return "[Axios v" + Wo + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
|
|
6940
6940
|
}
|
|
6941
6941
|
return (s, a, c) => {
|
|
6942
6942
|
if (e === !1)
|
|
6943
|
-
throw new
|
|
6943
|
+
throw new P(
|
|
6944
6944
|
i(a, " has been removed" + (n ? " in " + n : "")),
|
|
6945
|
-
|
|
6945
|
+
P.ERR_DEPRECATED
|
|
6946
6946
|
);
|
|
6947
6947
|
return n && !Ls[a] && (Ls[a] = !0, console.warn(
|
|
6948
6948
|
i(
|
|
@@ -6954,7 +6954,7 @@ Pr.transitional = function(e, n, r) {
|
|
|
6954
6954
|
};
|
|
6955
6955
|
function td(t, e, n) {
|
|
6956
6956
|
if (typeof t != "object")
|
|
6957
|
-
throw new
|
|
6957
|
+
throw new P("options must be an object", P.ERR_BAD_OPTION_VALUE);
|
|
6958
6958
|
const r = Object.keys(t);
|
|
6959
6959
|
let i = r.length;
|
|
6960
6960
|
for (; i-- > 0; ) {
|
|
@@ -6962,16 +6962,16 @@ function td(t, e, n) {
|
|
|
6962
6962
|
if (a) {
|
|
6963
6963
|
const c = t[s], l = c === void 0 || a(c, s, t);
|
|
6964
6964
|
if (l !== !0)
|
|
6965
|
-
throw new
|
|
6965
|
+
throw new P("option " + s + " must be " + l, P.ERR_BAD_OPTION_VALUE);
|
|
6966
6966
|
continue;
|
|
6967
6967
|
}
|
|
6968
6968
|
if (n !== !0)
|
|
6969
|
-
throw new
|
|
6969
|
+
throw new P("Unknown option " + s, P.ERR_BAD_OPTION);
|
|
6970
6970
|
}
|
|
6971
6971
|
}
|
|
6972
6972
|
const hr = {
|
|
6973
6973
|
assertOptions: td,
|
|
6974
|
-
validators:
|
|
6974
|
+
validators: Ar
|
|
6975
6975
|
}, Me = hr.validators;
|
|
6976
6976
|
class Je {
|
|
6977
6977
|
constructor(e) {
|
|
@@ -7030,12 +7030,12 @@ class Je {
|
|
|
7030
7030
|
), n.headers = Z.concat(a, s);
|
|
7031
7031
|
const c = [];
|
|
7032
7032
|
let l = !0;
|
|
7033
|
-
this.interceptors.request.forEach(function(
|
|
7034
|
-
typeof
|
|
7033
|
+
this.interceptors.request.forEach(function(w) {
|
|
7034
|
+
typeof w.runWhen == "function" && w.runWhen(n) === !1 || (l = l && w.synchronous, c.unshift(w.fulfilled, w.rejected));
|
|
7035
7035
|
});
|
|
7036
7036
|
const p = [];
|
|
7037
|
-
this.interceptors.response.forEach(function(
|
|
7038
|
-
p.push(
|
|
7037
|
+
this.interceptors.response.forEach(function(w) {
|
|
7038
|
+
p.push(w.fulfilled, w.rejected);
|
|
7039
7039
|
});
|
|
7040
7040
|
let h, f = 0, _;
|
|
7041
7041
|
if (!l) {
|
|
@@ -7047,11 +7047,11 @@ class Je {
|
|
|
7047
7047
|
_ = c.length;
|
|
7048
7048
|
let k = n;
|
|
7049
7049
|
for (f = 0; f < _; ) {
|
|
7050
|
-
const v = c[f++],
|
|
7050
|
+
const v = c[f++], w = c[f++];
|
|
7051
7051
|
try {
|
|
7052
7052
|
k = v(k);
|
|
7053
7053
|
} catch (T) {
|
|
7054
|
-
|
|
7054
|
+
w.call(this, T);
|
|
7055
7055
|
break;
|
|
7056
7056
|
}
|
|
7057
7057
|
}
|
|
@@ -7094,7 +7094,7 @@ y.forEach(["post", "put", "patch"], function(e) {
|
|
|
7094
7094
|
}
|
|
7095
7095
|
Je.prototype[e] = n(), Je.prototype[e + "Form"] = n(!0);
|
|
7096
7096
|
});
|
|
7097
|
-
class
|
|
7097
|
+
class Pr {
|
|
7098
7098
|
constructor(e) {
|
|
7099
7099
|
if (typeof e != "function")
|
|
7100
7100
|
throw new TypeError("executor must be a function.");
|
|
@@ -7154,7 +7154,7 @@ class Ar {
|
|
|
7154
7154
|
static source() {
|
|
7155
7155
|
let e;
|
|
7156
7156
|
return {
|
|
7157
|
-
token: new
|
|
7157
|
+
token: new Pr(function(i) {
|
|
7158
7158
|
e = i;
|
|
7159
7159
|
}),
|
|
7160
7160
|
cancel: e
|
|
@@ -7246,11 +7246,11 @@ function Yo(t) {
|
|
|
7246
7246
|
const $ = Yo(Rt);
|
|
7247
7247
|
$.Axios = Je;
|
|
7248
7248
|
$.CanceledError = dt;
|
|
7249
|
-
$.CancelToken =
|
|
7249
|
+
$.CancelToken = Pr;
|
|
7250
7250
|
$.isCancel = Vo;
|
|
7251
7251
|
$.VERSION = Wo;
|
|
7252
7252
|
$.toFormData = vn;
|
|
7253
|
-
$.AxiosError =
|
|
7253
|
+
$.AxiosError = P;
|
|
7254
7254
|
$.Cancel = $.CanceledError;
|
|
7255
7255
|
$.all = function(e) {
|
|
7256
7256
|
return Promise.all(e);
|
|
@@ -7260,7 +7260,7 @@ $.isAxiosError = rd;
|
|
|
7260
7260
|
$.mergeConfig = Ye;
|
|
7261
7261
|
$.AxiosHeaders = Z;
|
|
7262
7262
|
$.formToJSON = (t) => qo(y.isHTMLForm(t) ? new FormData(t) : t);
|
|
7263
|
-
$.getAdapter =
|
|
7263
|
+
$.getAdapter = zo.getAdapter;
|
|
7264
7264
|
$.HttpStatusCode = pr;
|
|
7265
7265
|
$.default = $;
|
|
7266
7266
|
const id = `
|
|
@@ -7371,17 +7371,21 @@ class ud {
|
|
|
7371
7371
|
* @param param2 Configuration options if the first parameter is a DOM element.
|
|
7372
7372
|
*/
|
|
7373
7373
|
constructor(e, n) {
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7374
|
+
H(this, "inited", !1);
|
|
7375
|
+
H(this, "mediaStream");
|
|
7376
|
+
H(this, "session_id", "");
|
|
7377
|
+
H(this, "shadow", null);
|
|
7378
|
+
H(this, "frameHandle", 0);
|
|
7379
|
+
H(this, "rootElement");
|
|
7380
|
+
H(this, "abortController");
|
|
7381
|
+
H(this, "timeout", 0);
|
|
7382
|
+
H(this, "keepAlive", !1);
|
|
7383
|
+
H(this, "fetcher");
|
|
7384
|
+
H(this, "call");
|
|
7385
|
+
H(this, "handlers", {});
|
|
7386
|
+
H(this, "uiOptions", {
|
|
7387
|
+
background: { transparent: !0 }
|
|
7388
|
+
});
|
|
7385
7389
|
if (typeof window > "u")
|
|
7386
7390
|
throw new Error("Unfortunately, SDK only works on the client side.");
|
|
7387
7391
|
const [{ apiHost: r = Qo, sessionToken: i, preloadBundle: s, preconnect: a, keepAlive: c }, l] = this.parseConfig(e, n);
|
|
@@ -7399,6 +7403,9 @@ class ud {
|
|
|
7399
7403
|
}
|
|
7400
7404
|
}), s && this.call.load(), a && this.fetcher.post("/sessions/start_stream");
|
|
7401
7405
|
}
|
|
7406
|
+
get sessionId() {
|
|
7407
|
+
return this.session_id;
|
|
7408
|
+
}
|
|
7402
7409
|
parseConfig(e, n) {
|
|
7403
7410
|
try {
|
|
7404
7411
|
let r, i;
|
|
@@ -7413,35 +7420,24 @@ class ud {
|
|
|
7413
7420
|
throw new Error("Filed to parse configuration object. Bad configuration!");
|
|
7414
7421
|
}
|
|
7415
7422
|
}
|
|
7416
|
-
drawUI(
|
|
7417
|
-
if (!this.rootElement || this.inited)
|
|
7423
|
+
drawUI() {
|
|
7424
|
+
if (!this.rootElement || !this.inited)
|
|
7418
7425
|
return;
|
|
7419
|
-
const
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
overflow: hidden;
|
|
7425
|
-
}
|
|
7426
|
-
|
|
7427
|
-
canvas {
|
|
7428
|
-
display: block;
|
|
7429
|
-
width: 100%;
|
|
7430
|
-
object-fit: cover;
|
|
7431
|
-
height: 100%;
|
|
7432
|
-
}
|
|
7433
|
-
`), n.adoptedStyleSheets = [r];
|
|
7434
|
-
const i = document.createElement("video");
|
|
7435
|
-
if (i.srcObject = this.mediaStream, i.autoplay = !0, i.style.position = "absolute", i.style.opacity = "0", i.style.objectFit = "cover", i.style.userSelect = "none", n.appendChild(i), !(e != null && e.transparent)) {
|
|
7436
|
-
i.style.width = "100%", i.style.height = "100%", i.style.opacity = "1", i.style.userSelect = "all";
|
|
7426
|
+
const e = document.createElement("div");
|
|
7427
|
+
e.style.width = "100%", e.style.height = "100%", e.style.position = "relative", e.style.overflow = "hidden", this.rootElement.appendChild(e), this.shadow || (this.shadow = e.attachShadow({ mode: "closed" }));
|
|
7428
|
+
const n = this.shadow, r = document.createElement("video");
|
|
7429
|
+
if (r.srcObject = this.mediaStream, r.autoplay = !0, r.style.position = "absolute", r.style.opacity = "0", r.style.objectFit = "cover", r.style.pointerEvents = "none", n.appendChild(r), !this.uiOptions.background.transparent) {
|
|
7430
|
+
r.style.width = "100%", r.style.height = "100%", r.style.opacity = "1", r.style.pointerEvents = "all";
|
|
7437
7431
|
return;
|
|
7438
7432
|
}
|
|
7439
|
-
const
|
|
7440
|
-
|
|
7441
|
-
const
|
|
7442
|
-
|
|
7433
|
+
const i = document.createElement("canvas");
|
|
7434
|
+
i.style.width = "100%", i.style.height = "100%", i.style.objectFit = "cover", i.style.position = "absolute", i.style.top = "0", i.style.left = "0", n.appendChild(i);
|
|
7435
|
+
const s = ad(i);
|
|
7436
|
+
this.frameHandle && cancelAnimationFrame(this.frameHandle);
|
|
7437
|
+
const a = () => {
|
|
7438
|
+
ld(s, r), this.frameHandle = requestAnimationFrame(a);
|
|
7443
7439
|
};
|
|
7444
|
-
|
|
7440
|
+
a();
|
|
7445
7441
|
}
|
|
7446
7442
|
startIdleTimeout() {
|
|
7447
7443
|
this.timeout = setTimeout(() => {
|
|
@@ -7452,29 +7448,16 @@ class ud {
|
|
|
7452
7448
|
restartIdleTimeout() {
|
|
7453
7449
|
clearTimeout(this.timeout), this.startIdleTimeout();
|
|
7454
7450
|
}
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
return e;
|
|
7458
|
-
}
|
|
7459
|
-
async init(e) {
|
|
7460
|
-
if (this.inited)
|
|
7461
|
-
return;
|
|
7462
|
-
this.startIdleTimeout();
|
|
7463
|
-
const { data: n } = await this.fetcher.get("/sessions");
|
|
7464
|
-
return this.session_id = n.id, this.abortController.signal.aborted || await this.call.join({
|
|
7465
|
-
token: n.limited_access_token,
|
|
7466
|
-
url: n.room_url
|
|
7467
|
-
}), new Promise((r, i) => {
|
|
7451
|
+
applyEventHandlers(e, n) {
|
|
7452
|
+
new Promise((r, i) => {
|
|
7468
7453
|
var c, l;
|
|
7469
|
-
const s =
|
|
7454
|
+
const s = n != null && n.timeout && n.timeout > 0 ? n == null ? void 0 : n.timeout : 3e4, a = n != null && n.timeout ? setTimeout(() => i("Connection timeout"), s) : null;
|
|
7470
7455
|
(c = this.call) == null || c.on("participant-updated", ({ participant: p }) => {
|
|
7471
7456
|
var _, k;
|
|
7472
7457
|
if (!p.owner)
|
|
7473
7458
|
return;
|
|
7474
7459
|
const { video: h, audio: f } = p.tracks;
|
|
7475
|
-
h.persistentTrack && (this.mediaStream.getVideoTracks().forEach((v) => this.mediaStream.removeTrack(v)), (_ = this.mediaStream) == null || _.addTrack(h.persistentTrack)), f.persistentTrack && (this.mediaStream.getAudioTracks().forEach((v) => this.mediaStream.removeTrack(v)), (k = this.mediaStream) == null || k.addTrack(f.persistentTrack)), a && clearTimeout(a), h.persistentTrack && (this.drawUI(
|
|
7476
|
-
transparent: n.session_config.uses_stacked_alpha
|
|
7477
|
-
}), this.inited = !0, r(null));
|
|
7460
|
+
h.persistentTrack && (this.mediaStream.getVideoTracks().forEach((v) => this.mediaStream.removeTrack(v)), (_ = this.mediaStream) == null || _.addTrack(h.persistentTrack)), f.persistentTrack && (this.mediaStream.getAudioTracks().forEach((v) => this.mediaStream.removeTrack(v)), (k = this.mediaStream) == null || k.addTrack(f.persistentTrack)), a && clearTimeout(a), h.persistentTrack && (this.drawUI(), this.inited = !0, r(null));
|
|
7478
7461
|
}), this.call.on("error", (p) => {
|
|
7479
7462
|
console.error("[SKD_ERROR]: ", p);
|
|
7480
7463
|
}), (l = this.call) == null || l.on("app-message", ({ data: p }) => {
|
|
@@ -7483,8 +7466,25 @@ class ud {
|
|
|
7483
7466
|
});
|
|
7484
7467
|
});
|
|
7485
7468
|
}
|
|
7469
|
+
attachDOMNode(e) {
|
|
7470
|
+
this.rootElement && (this.rootElement.innerHTML = ""), this.shadow && (this.shadow = null), this.rootElement = e, this.drawUI();
|
|
7471
|
+
}
|
|
7472
|
+
async cancelAllTasks() {
|
|
7473
|
+
const { data: e } = await this.fetcher.post("/sessions/cancel_all_speech_tasks");
|
|
7474
|
+
return e;
|
|
7475
|
+
}
|
|
7476
|
+
async init(e) {
|
|
7477
|
+
if (this.inited)
|
|
7478
|
+
return;
|
|
7479
|
+
this.startIdleTimeout();
|
|
7480
|
+
const { data: n } = await this.fetcher.get("/sessions");
|
|
7481
|
+
return this.session_id = n.id, this.uiOptions.background.transparent = n.session_config.uses_stacked_alpha, this.abortController.signal.aborted || await this.call.join({
|
|
7482
|
+
token: n.limited_access_token,
|
|
7483
|
+
url: n.room_url
|
|
7484
|
+
}), this.applyEventHandlers(n, e);
|
|
7485
|
+
}
|
|
7486
7486
|
async task(e) {
|
|
7487
|
-
if (!this.
|
|
7487
|
+
if (!this.sessionId)
|
|
7488
7488
|
throw new Error("It seems that the session is not initialized.");
|
|
7489
7489
|
this.restartIdleTimeout();
|
|
7490
7490
|
const { data: n } = await this.fetcher.post("/sessions/tasks", {
|
|
@@ -7499,16 +7499,15 @@ class ud {
|
|
|
7499
7499
|
this.handlers[e] && (this.handlers[e] = this.handlers[e].filter((r) => r !== n));
|
|
7500
7500
|
}
|
|
7501
7501
|
async dispose() {
|
|
7502
|
-
|
|
7503
|
-
this.inited = !1, this.mediaStream = new MediaStream(), this.inited = !1, this.timeout && clearTimeout(this.timeout), this.frameHandle && cancelAnimationFrame(this.frameHandle), await ((e = this.call) == null ? void 0 : e.destroy()), this.abortController.abort();
|
|
7502
|
+
this.inited = !1, this.mediaStream = new MediaStream(), this.timeout && clearTimeout(this.timeout), this.frameHandle && cancelAnimationFrame(this.frameHandle), this.rootElement && (this.rootElement.innerHTML = ""), await this.call.destroy(), this.abortController.abort(), this.abortController = new AbortController(), this.fetcher.defaults.signal = this.abortController.signal;
|
|
7504
7503
|
}
|
|
7505
7504
|
}
|
|
7506
7505
|
class hd extends ud {
|
|
7507
7506
|
constructor(n) {
|
|
7508
7507
|
super(n);
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7508
|
+
H(this, "assistantSessionToken", "");
|
|
7509
|
+
H(this, "assistantFetcher");
|
|
7510
|
+
H(this, "sessionToken", "");
|
|
7512
7511
|
this.assistantSessionToken = n.assistantSessionToken, this.sessionToken = n.sessionToken, this.assistantFetcher = $.create({
|
|
7513
7512
|
baseURL: `${n.apiHost || Qo}/`,
|
|
7514
7513
|
headers: {
|
|
@@ -7517,35 +7516,8 @@ class hd extends ud {
|
|
|
7517
7516
|
signal: this.abortController.signal
|
|
7518
7517
|
});
|
|
7519
7518
|
}
|
|
7520
|
-
async init(n) {
|
|
7521
|
-
if (this.inited)
|
|
7522
|
-
return;
|
|
7523
|
-
this.startIdleTimeout();
|
|
7524
|
-
const { data: r } = await this.fetcher.get("/sessions");
|
|
7525
|
-
return this.session_id = r.id, await this.call.join({
|
|
7526
|
-
token: r.limited_access_token,
|
|
7527
|
-
url: r.room_url
|
|
7528
|
-
}), new Promise((i, s) => {
|
|
7529
|
-
var l, p;
|
|
7530
|
-
const a = n != null && n.timeout && n.timeout > 0 ? n == null ? void 0 : n.timeout : 3e4, c = n != null && n.timeout ? setTimeout(() => s("Connection timeout"), a) : null;
|
|
7531
|
-
(l = this.call) == null || l.on("participant-updated", ({ participant: h }) => {
|
|
7532
|
-
var k, v;
|
|
7533
|
-
if (!h.owner)
|
|
7534
|
-
return;
|
|
7535
|
-
const { video: f, audio: _ } = h.tracks;
|
|
7536
|
-
f.persistentTrack && (this.mediaStream.getVideoTracks().forEach((b) => this.mediaStream.removeTrack(b)), (k = this.mediaStream) == null || k.addTrack(f.persistentTrack)), _.persistentTrack && (this.mediaStream.getAudioTracks().forEach((b) => this.mediaStream.removeTrack(b)), (v = this.mediaStream) == null || v.addTrack(_.persistentTrack)), c && clearTimeout(c), f.persistentTrack && (this.drawUI({
|
|
7537
|
-
transparent: r.session_config.uses_stacked_alpha
|
|
7538
|
-
}), this.inited = !0, i(null));
|
|
7539
|
-
}), this.call.on("error", (h) => {
|
|
7540
|
-
console.error("[SKD_ERROR]: ", h);
|
|
7541
|
-
}), (p = this.call) == null || p.on("app-message", ({ data: h }) => {
|
|
7542
|
-
var f;
|
|
7543
|
-
h.type && ((f = this.handlers[h.type]) == null || f.forEach((_) => _(h)));
|
|
7544
|
-
});
|
|
7545
|
-
});
|
|
7546
|
-
}
|
|
7547
7519
|
async task(n, r) {
|
|
7548
|
-
if (!this.
|
|
7520
|
+
if (!this.sessionId)
|
|
7549
7521
|
throw new Error("It seems that the session is not initialized.");
|
|
7550
7522
|
this.restartIdleTimeout();
|
|
7551
7523
|
const { data: i } = await this.assistantFetcher.post("/assistants/tasks", {
|
|
@@ -7554,8 +7526,7 @@ class hd extends ud {
|
|
|
7554
7526
|
return i;
|
|
7555
7527
|
}
|
|
7556
7528
|
async dispose() {
|
|
7557
|
-
|
|
7558
|
-
this.inited = !1, this.mediaStream = new MediaStream(), this.timeout && clearTimeout(this.timeout), await ((n = this.call) == null ? void 0 : n.destroy()), await this.assistantFetcher.delete("/assistants/sessions"), this.abortController.abort();
|
|
7529
|
+
this.inited = !1, this.mediaStream = new MediaStream(), this.timeout && clearTimeout(this.timeout), this.frameHandle && cancelAnimationFrame(this.frameHandle), await this.call.destroy(), this.abortController.abort(), this.abortController = new AbortController(), this.fetcher.defaults.signal = this.abortController.signal, this.assistantFetcher.defaults.signal = this.abortController.signal;
|
|
7559
7530
|
}
|
|
7560
7531
|
}
|
|
7561
7532
|
export {
|