@floe-ai/sdk 0.1.0-dev.36 → 0.1.0-dev.37
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-sdk/floe-sdk.es.js +902 -835
- package/dist-sdk/floe-sdk.es.js.map +1 -1
- package/dist-sdk/floe-sdk.iife.js +36 -36
- package/dist-sdk/floe-sdk.iife.js.map +1 -1
- package/dist-sdk/floe-sdk.umd.js +36 -36
- package/dist-sdk/floe-sdk.umd.js.map +1 -1
- package/dist-sdk/index.d.ts +23 -0
- package/package.json +1 -1
package/dist-sdk/floe-sdk.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Mc = Object.defineProperty;
|
|
2
2
|
var Ac = (n, e, t) => e in n ? Mc(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var M = (n, e, t) => Ac(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import Ys, { useState as ze, useEffect as
|
|
4
|
+
import Ys, { useState as ze, useEffect as Ze, useRef as kr, useCallback as Ye, useMemo as Oc } from "react";
|
|
5
5
|
import Dc from "react-dom/client";
|
|
6
6
|
import { jsx as A, jsxs as Y, Fragment as fr } from "react/jsx-runtime";
|
|
7
7
|
function Lc(n) {
|
|
@@ -232,11 +232,11 @@ function ia(n, e, t, r) {
|
|
|
232
232
|
}
|
|
233
233
|
var $c = bi.exports;
|
|
234
234
|
const jc = /* @__PURE__ */ Lc($c);
|
|
235
|
-
var
|
|
235
|
+
var Ee = [];
|
|
236
236
|
for (var kn = 0; kn < 256; ++kn)
|
|
237
|
-
|
|
237
|
+
Ee.push((kn + 256).toString(16).slice(1));
|
|
238
238
|
function Uc(n, e = 0) {
|
|
239
|
-
return (
|
|
239
|
+
return (Ee[n[e + 0]] + Ee[n[e + 1]] + Ee[n[e + 2]] + Ee[n[e + 3]] + "-" + Ee[n[e + 4]] + Ee[n[e + 5]] + "-" + Ee[n[e + 6]] + Ee[n[e + 7]] + "-" + Ee[n[e + 8]] + Ee[n[e + 9]] + "-" + Ee[n[e + 10]] + Ee[n[e + 11]] + Ee[n[e + 12]] + Ee[n[e + 13]] + Ee[n[e + 14]] + Ee[n[e + 15]]).toLowerCase();
|
|
240
240
|
}
|
|
241
241
|
var Dr, Hc = new Uint8Array(16);
|
|
242
242
|
function zc() {
|
|
@@ -405,7 +405,7 @@ const Kc = {
|
|
|
405
405
|
mobile: "mobile",
|
|
406
406
|
tablet: "tablet",
|
|
407
407
|
tv: "tv"
|
|
408
|
-
},
|
|
408
|
+
}, Te = {
|
|
409
409
|
Android: "Android",
|
|
410
410
|
Bada: "Bada",
|
|
411
411
|
BlackBerry: "BlackBerry",
|
|
@@ -1429,7 +1429,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1429
1429
|
describe(n) {
|
|
1430
1430
|
const e = _.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, n);
|
|
1431
1431
|
return {
|
|
1432
|
-
name:
|
|
1432
|
+
name: Te.Roku,
|
|
1433
1433
|
version: e
|
|
1434
1434
|
};
|
|
1435
1435
|
}
|
|
@@ -1440,7 +1440,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1440
1440
|
describe(n) {
|
|
1441
1441
|
const e = _.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, n);
|
|
1442
1442
|
return {
|
|
1443
|
-
name:
|
|
1443
|
+
name: Te.WindowsPhone,
|
|
1444
1444
|
version: e
|
|
1445
1445
|
};
|
|
1446
1446
|
}
|
|
@@ -1451,7 +1451,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1451
1451
|
describe(n) {
|
|
1452
1452
|
const e = _.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, n), t = _.getWindowsVersionName(e);
|
|
1453
1453
|
return {
|
|
1454
|
-
name:
|
|
1454
|
+
name: Te.Windows,
|
|
1455
1455
|
version: e,
|
|
1456
1456
|
versionName: t
|
|
1457
1457
|
};
|
|
@@ -1462,7 +1462,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1462
1462
|
test: [/Macintosh(.*?) FxiOS(.*?)\//],
|
|
1463
1463
|
describe(n) {
|
|
1464
1464
|
const e = {
|
|
1465
|
-
name:
|
|
1465
|
+
name: Te.iOS
|
|
1466
1466
|
}, t = _.getSecondMatch(/(Version\/)(\d[\d.]+)/, n);
|
|
1467
1467
|
return t && (e.version = t), e;
|
|
1468
1468
|
}
|
|
@@ -1472,7 +1472,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1472
1472
|
test: [/macintosh/i],
|
|
1473
1473
|
describe(n) {
|
|
1474
1474
|
const e = _.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, n).replace(/[_\s]/g, "."), t = _.getMacOSVersionName(e), r = {
|
|
1475
|
-
name:
|
|
1475
|
+
name: Te.MacOS,
|
|
1476
1476
|
version: e
|
|
1477
1477
|
};
|
|
1478
1478
|
return t && (r.versionName = t), r;
|
|
@@ -1484,7 +1484,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1484
1484
|
describe(n) {
|
|
1485
1485
|
const e = _.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, n).replace(/[_\s]/g, ".");
|
|
1486
1486
|
return {
|
|
1487
|
-
name:
|
|
1487
|
+
name: Te.iOS,
|
|
1488
1488
|
version: e
|
|
1489
1489
|
};
|
|
1490
1490
|
}
|
|
@@ -1495,7 +1495,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1495
1495
|
describe(n) {
|
|
1496
1496
|
const e = _.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i, n);
|
|
1497
1497
|
return {
|
|
1498
|
-
name:
|
|
1498
|
+
name: Te.HarmonyOS,
|
|
1499
1499
|
version: e
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
@@ -1508,7 +1508,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1508
1508
|
},
|
|
1509
1509
|
describe(n) {
|
|
1510
1510
|
const e = _.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, n), t = _.getAndroidVersionName(e), r = {
|
|
1511
|
-
name:
|
|
1511
|
+
name: Te.Android,
|
|
1512
1512
|
version: e
|
|
1513
1513
|
};
|
|
1514
1514
|
return t && (r.versionName = t), r;
|
|
@@ -1519,7 +1519,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1519
1519
|
test: [/(web|hpw)[o0]s/i],
|
|
1520
1520
|
describe(n) {
|
|
1521
1521
|
const e = _.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, n), t = {
|
|
1522
|
-
name:
|
|
1522
|
+
name: Te.WebOS
|
|
1523
1523
|
};
|
|
1524
1524
|
return e && e.length && (t.version = e), t;
|
|
1525
1525
|
}
|
|
@@ -1530,7 +1530,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1530
1530
|
describe(n) {
|
|
1531
1531
|
const e = _.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, n) || _.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, n) || _.getFirstMatch(/\bbb(\d+)/i, n);
|
|
1532
1532
|
return {
|
|
1533
|
-
name:
|
|
1533
|
+
name: Te.BlackBerry,
|
|
1534
1534
|
version: e
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
@@ -1541,7 +1541,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1541
1541
|
describe(n) {
|
|
1542
1542
|
const e = _.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, n);
|
|
1543
1543
|
return {
|
|
1544
|
-
name:
|
|
1544
|
+
name: Te.Bada,
|
|
1545
1545
|
version: e
|
|
1546
1546
|
};
|
|
1547
1547
|
}
|
|
@@ -1552,7 +1552,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1552
1552
|
describe(n) {
|
|
1553
1553
|
const e = _.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, n);
|
|
1554
1554
|
return {
|
|
1555
|
-
name:
|
|
1555
|
+
name: Te.Tizen,
|
|
1556
1556
|
version: e
|
|
1557
1557
|
};
|
|
1558
1558
|
}
|
|
@@ -1562,7 +1562,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1562
1562
|
test: [/linux/i],
|
|
1563
1563
|
describe() {
|
|
1564
1564
|
return {
|
|
1565
|
-
name:
|
|
1565
|
+
name: Te.Linux
|
|
1566
1566
|
};
|
|
1567
1567
|
}
|
|
1568
1568
|
},
|
|
@@ -1571,7 +1571,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1571
1571
|
test: [/CrOS/],
|
|
1572
1572
|
describe() {
|
|
1573
1573
|
return {
|
|
1574
|
-
name:
|
|
1574
|
+
name: Te.ChromeOS
|
|
1575
1575
|
};
|
|
1576
1576
|
}
|
|
1577
1577
|
},
|
|
@@ -1581,7 +1581,7 @@ const K = /version\/(\d+(\.?_?\d+)+)/i, Wc = [
|
|
|
1581
1581
|
describe(n) {
|
|
1582
1582
|
const e = _.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, n);
|
|
1583
1583
|
return {
|
|
1584
|
-
name:
|
|
1584
|
+
name: Te.PlayStation4,
|
|
1585
1585
|
version: e
|
|
1586
1586
|
};
|
|
1587
1587
|
}
|
|
@@ -2585,7 +2585,7 @@ class Xc {
|
|
|
2585
2585
|
return wt;
|
|
2586
2586
|
}
|
|
2587
2587
|
static get OS_MAP() {
|
|
2588
|
-
return
|
|
2588
|
+
return Te;
|
|
2589
2589
|
}
|
|
2590
2590
|
static get PLATFORMS_MAP() {
|
|
2591
2591
|
return V;
|
|
@@ -2608,7 +2608,7 @@ function ge(n, e, t, r) {
|
|
|
2608
2608
|
Object.defineProperty(n, e, { get: t, set: r, enumerable: !0, configurable: !0 });
|
|
2609
2609
|
}
|
|
2610
2610
|
var or = {}, sa = {};
|
|
2611
|
-
ge(sa, "PipecatClient", () =>
|
|
2611
|
+
ge(sa, "PipecatClient", () => Ve);
|
|
2612
2612
|
var Zt = {};
|
|
2613
2613
|
Zt = JSON.parse('{"name":"@pipecat-ai/client-js","version":"1.6.0","license":"BSD-2-Clause","main":"dist/index.js","module":"dist/index.module.js","types":"dist/index.d.ts","source":"index.ts","repository":{"type":"git","url":"git+https://github.com/pipecat-ai/pipecat-client-web.git"},"files":["dist","package.json","README.md"],"scripts":{"build":"jest --silent --passWithNoTests && parcel build --no-cache","dev":"parcel watch","lint":"eslint . --report-unused-disable-directives --max-warnings 0","test":"jest"},"jest":{"preset":"ts-jest","testEnvironment":"jsdom","setupFilesAfterEnv":["<rootDir>/tests/jest.setup.ts"]},"devDependencies":{"@jest/globals":"^29.7.0","@types/clone-deep":"^4.0.4","@types/jest":"^29.5.12","@types/uuid":"^10.0.0","eslint":"^9.11.1","eslint-config-prettier":"^9.1.0","eslint-plugin-simple-import-sort":"^12.1.1","jest":"^29.7.0","jest-environment-jsdom":"^30.0.2","ts-jest":"^29.2.5","whatwg-fetch":"^3.6.20"},"dependencies":{"@types/events":"^3.0.3","bowser":"^2.11.0","clone-deep":"^4.0.1","events":"^3.3.0","typed-emitter":"^2.1.0","uuid":"^10.0.0"}}');
|
|
2614
2614
|
var pn = {}, aa = {};
|
|
@@ -2691,7 +2691,7 @@ ge(Ht, "RTVI_MESSAGE_LABEL", () => fa);
|
|
|
2691
2691
|
ge(Ht, "RTVIMessageType", () => X);
|
|
2692
2692
|
ge(Ht, "AggregationType", () => qn);
|
|
2693
2693
|
ge(Ht, "setAboutClient", () => ma);
|
|
2694
|
-
ge(Ht, "RTVIMessage", () =>
|
|
2694
|
+
ge(Ht, "RTVIMessage", () => xe);
|
|
2695
2695
|
const ga = "1.2.0", fa = "rtvi-ai";
|
|
2696
2696
|
var X;
|
|
2697
2697
|
(function(n) {
|
|
@@ -2708,13 +2708,13 @@ function ma(n) {
|
|
|
2708
2708
|
...n
|
|
2709
2709
|
} : mr = n;
|
|
2710
2710
|
}
|
|
2711
|
-
class
|
|
2711
|
+
class xe {
|
|
2712
2712
|
constructor(e, t, r) {
|
|
2713
2713
|
this.label = fa, this.type = e, this.data = t, this.id = r || Vc().slice(0, 8);
|
|
2714
2714
|
}
|
|
2715
2715
|
// Outbound message types
|
|
2716
2716
|
static clientReady() {
|
|
2717
|
-
return new
|
|
2717
|
+
return new xe(X.CLIENT_READY, {
|
|
2718
2718
|
version: ga,
|
|
2719
2719
|
about: mr || {
|
|
2720
2720
|
library: Zt.name,
|
|
@@ -2723,10 +2723,10 @@ class ke {
|
|
|
2723
2723
|
});
|
|
2724
2724
|
}
|
|
2725
2725
|
static disconnectBot() {
|
|
2726
|
-
return new
|
|
2726
|
+
return new xe(X.DISCONNECT_BOT, {});
|
|
2727
2727
|
}
|
|
2728
2728
|
static error(e, t = !1) {
|
|
2729
|
-
return new
|
|
2729
|
+
return new xe(X.ERROR, {
|
|
2730
2730
|
message: e,
|
|
2731
2731
|
fatal: t
|
|
2732
2732
|
});
|
|
@@ -2799,7 +2799,7 @@ class ya {
|
|
|
2799
2799
|
this._gcInterval || (this._gcInterval = setInterval(() => {
|
|
2800
2800
|
this._gc();
|
|
2801
2801
|
}, 2e3));
|
|
2802
|
-
const i = new
|
|
2802
|
+
const i = new xe(t, e), o = new Promise((s, a) => {
|
|
2803
2803
|
this._queue.push({
|
|
2804
2804
|
message: i,
|
|
2805
2805
|
timestamp: Date.now(),
|
|
@@ -2835,7 +2835,7 @@ class ya {
|
|
|
2835
2835
|
const r = Date.now() - t.timestamp < t.timeout;
|
|
2836
2836
|
return r || e.push(t), r;
|
|
2837
2837
|
}), e.forEach((t) => {
|
|
2838
|
-
t.message.type === X.CLIENT_MESSAGE && t.reject(new
|
|
2838
|
+
t.message.type === X.CLIENT_MESSAGE && t.reject(new xe(X.ERROR_RESPONSE, {
|
|
2839
2839
|
error: "Timed out waiting for response",
|
|
2840
2840
|
msgType: t.message.data.t,
|
|
2841
2841
|
data: t.message.data.d,
|
|
@@ -3015,7 +3015,7 @@ var Tt = function(n, e, t, r) {
|
|
|
3015
3015
|
};
|
|
3016
3016
|
class rl extends jc {
|
|
3017
3017
|
}
|
|
3018
|
-
class
|
|
3018
|
+
class Ve extends rl {
|
|
3019
3019
|
constructor(e) {
|
|
3020
3020
|
super(), this._functionCallCallbacks = {}, this._botTranscriptionWarned = !1, this._llmFunctionCallWarned = !1, ma(xa()), this._transport = e.transport, this._transportWrapper = new ka(this._transport);
|
|
3021
3021
|
const t = {
|
|
@@ -3224,7 +3224,7 @@ class et extends rl {
|
|
|
3224
3224
|
const u = await a.json();
|
|
3225
3225
|
c = u.info ?? u.detail ?? a.statusText, d = a.status;
|
|
3226
3226
|
} else a instanceof Error && (c = a.message);
|
|
3227
|
-
throw (i = (r = this._options.callbacks) == null ? void 0 : r.onError) == null || i.call(r, new
|
|
3227
|
+
throw (i = (r = this._options.callbacks) == null ? void 0 : r.onError) == null || i.call(r, new xe(X.ERROR_RESPONSE, {
|
|
3228
3228
|
message: c,
|
|
3229
3229
|
fatal: !0
|
|
3230
3230
|
})), new ca(c, d);
|
|
@@ -3281,12 +3281,12 @@ class et extends rl {
|
|
|
3281
3281
|
var t, r, i, o, s, a;
|
|
3282
3282
|
if (!_a(e, this._transport.maxMessageSize)) {
|
|
3283
3283
|
const c = `Message data too large. Max size is ${this._transport.maxMessageSize}`;
|
|
3284
|
-
throw (r = (t = this._options.callbacks) == null ? void 0 : t.onError) == null || r.call(t,
|
|
3284
|
+
throw (r = (t = this._options.callbacks) == null ? void 0 : t.onError) == null || r.call(t, xe.error(c, !1)), new ha(c);
|
|
3285
3285
|
}
|
|
3286
3286
|
try {
|
|
3287
3287
|
this._transport.sendMessage(e);
|
|
3288
3288
|
} catch (c) {
|
|
3289
|
-
throw c instanceof Error ? (o = (i = this._options.callbacks) == null ? void 0 : i.onError) == null || o.call(i,
|
|
3289
|
+
throw c instanceof Error ? (o = (i = this._options.callbacks) == null ? void 0 : i.onError) == null || o.call(i, xe.error(c.message, !1)) : (a = (s = this._options.callbacks) == null ? void 0 : s.onError) == null || a.call(s, xe.error("Unknown error sending message", !1)), c;
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
3292
|
/**
|
|
@@ -3364,7 +3364,7 @@ class et extends rl {
|
|
|
3364
3364
|
* @param data - a dictionary of data to send with the message
|
|
3365
3365
|
*/
|
|
3366
3366
|
sendClientMessage(e, t) {
|
|
3367
|
-
this._sendMessage(new
|
|
3367
|
+
this._sendMessage(new xe(X.CLIENT_MESSAGE, {
|
|
3368
3368
|
t: e,
|
|
3369
3369
|
d: t
|
|
3370
3370
|
}));
|
|
@@ -3393,14 +3393,14 @@ class et extends rl {
|
|
|
3393
3393
|
this._functionCallCallbacks = {};
|
|
3394
3394
|
}
|
|
3395
3395
|
async appendToContext(e) {
|
|
3396
|
-
return ne.warn("appendToContext() is deprecated. Use sendText() instead."), await this._sendMessage(new
|
|
3396
|
+
return ne.warn("appendToContext() is deprecated. Use sendText() instead."), await this._sendMessage(new xe(X.APPEND_TO_CONTEXT, {
|
|
3397
3397
|
role: e.role,
|
|
3398
3398
|
content: e.content,
|
|
3399
3399
|
run_immediately: e.run_immediately
|
|
3400
3400
|
})), !0;
|
|
3401
3401
|
}
|
|
3402
3402
|
async sendText(e, t = {}) {
|
|
3403
|
-
await this._sendMessage(new
|
|
3403
|
+
await this._sendMessage(new xe(X.SEND_TEXT, {
|
|
3404
3404
|
content: e,
|
|
3405
3405
|
options: t
|
|
3406
3406
|
}));
|
|
@@ -3409,18 +3409,18 @@ class et extends rl {
|
|
|
3409
3409
|
* Disconnects the bot, but keeps the session alive
|
|
3410
3410
|
*/
|
|
3411
3411
|
disconnectBot() {
|
|
3412
|
-
this._sendMessage(new
|
|
3412
|
+
this._sendMessage(new xe(X.DISCONNECT_BOT, {}));
|
|
3413
3413
|
}
|
|
3414
3414
|
handleMessage(e) {
|
|
3415
|
-
var t, r, i, o, s, a, c, d, u, h, f, b, y, m, v, w, x, E, L,
|
|
3415
|
+
var t, r, i, o, s, a, c, d, u, h, f, b, y, m, v, w, x, E, L, P, N, B, ae, ue, be, $, z, H, te, U, F, Q, ve, he, Z, ke, Ue, l, g, p, S, k, T, O, I, R, W, re, Oe, nt, it, we;
|
|
3416
3416
|
switch (ne.debug("[RTVI Message]", e), e.type) {
|
|
3417
3417
|
case X.BOT_READY: {
|
|
3418
|
-
const
|
|
3418
|
+
const ee = e.data, Je = ee.version ? ee.version.split(".").map(Number) : [
|
|
3419
3419
|
0,
|
|
3420
3420
|
0,
|
|
3421
3421
|
0
|
|
3422
3422
|
];
|
|
3423
|
-
ne.debug(`[Pipecat Client] Bot is ready. Version: ${
|
|
3423
|
+
ne.debug(`[Pipecat Client] Bot is ready. Version: ${ee.version}`), Je[0] < 1 && ne.warn("[Pipecat Client] Bot version is less than 1.0.0, which may not be compatible with this client."), (t = this._connectResolve) == null || t.call(this, e.data), (i = (r = this._options.callbacks) == null ? void 0 : r.onBotReady) == null || i.call(r, e.data);
|
|
3424
3424
|
break;
|
|
3425
3425
|
}
|
|
3426
3426
|
case X.ERROR:
|
|
@@ -3430,8 +3430,8 @@ class et extends rl {
|
|
|
3430
3430
|
this._messageDispatcher.resolve(e);
|
|
3431
3431
|
break;
|
|
3432
3432
|
case X.ERROR_RESPONSE: {
|
|
3433
|
-
const
|
|
3434
|
-
(c = (a = this._options.callbacks) == null ? void 0 : a.onMessageError) == null || c.call(a,
|
|
3433
|
+
const ee = this._messageDispatcher.reject(e);
|
|
3434
|
+
(c = (a = this._options.callbacks) == null ? void 0 : a.onMessageError) == null || c.call(a, ee);
|
|
3435
3435
|
break;
|
|
3436
3436
|
}
|
|
3437
3437
|
case X.USER_STARTED_SPEAKING:
|
|
@@ -3453,33 +3453,33 @@ class et extends rl {
|
|
|
3453
3453
|
(L = (E = this._options.callbacks) == null ? void 0 : E.onUserMuteStopped) == null || L.call(E);
|
|
3454
3454
|
break;
|
|
3455
3455
|
case X.USER_TRANSCRIPTION: {
|
|
3456
|
-
const
|
|
3457
|
-
(N = (
|
|
3456
|
+
const ee = e.data;
|
|
3457
|
+
(N = (P = this._options.callbacks) == null ? void 0 : P.onUserTranscript) == null || N.call(P, ee);
|
|
3458
3458
|
break;
|
|
3459
3459
|
}
|
|
3460
3460
|
case X.BOT_OUTPUT:
|
|
3461
|
-
(
|
|
3461
|
+
(ae = (B = this._options.callbacks) == null ? void 0 : B.onBotOutput) == null || ae.call(B, e.data);
|
|
3462
3462
|
break;
|
|
3463
3463
|
case X.BOT_TRANSCRIPTION:
|
|
3464
|
-
(
|
|
3464
|
+
(be = (ue = this._options.callbacks) == null ? void 0 : ue.onBotTranscript) == null || be.call(ue, e.data);
|
|
3465
3465
|
break;
|
|
3466
3466
|
case X.BOT_LLM_TEXT:
|
|
3467
|
-
(
|
|
3467
|
+
(z = ($ = this._options.callbacks) == null ? void 0 : $.onBotLlmText) == null || z.call($, e.data);
|
|
3468
3468
|
break;
|
|
3469
3469
|
case X.BOT_LLM_STARTED:
|
|
3470
|
-
(
|
|
3470
|
+
(te = (H = this._options.callbacks) == null ? void 0 : H.onBotLlmStarted) == null || te.call(H);
|
|
3471
3471
|
break;
|
|
3472
3472
|
case X.BOT_LLM_STOPPED:
|
|
3473
|
-
(
|
|
3473
|
+
(F = (U = this._options.callbacks) == null ? void 0 : U.onBotLlmStopped) == null || F.call(U);
|
|
3474
3474
|
break;
|
|
3475
3475
|
case X.BOT_TTS_TEXT:
|
|
3476
|
-
(
|
|
3476
|
+
(ve = (Q = this._options.callbacks) == null ? void 0 : Q.onBotTtsText) == null || ve.call(Q, e.data);
|
|
3477
3477
|
break;
|
|
3478
3478
|
case X.BOT_TTS_STARTED:
|
|
3479
|
-
(
|
|
3479
|
+
(Z = (he = this._options.callbacks) == null ? void 0 : he.onBotTtsStarted) == null || Z.call(he);
|
|
3480
3480
|
break;
|
|
3481
3481
|
case X.BOT_TTS_STOPPED:
|
|
3482
|
-
(Ue = (
|
|
3482
|
+
(Ue = (ke = this._options.callbacks) == null ? void 0 : ke.onBotTtsStopped) == null || Ue.call(ke);
|
|
3483
3483
|
break;
|
|
3484
3484
|
case X.METRICS:
|
|
3485
3485
|
(g = (l = this._options.callbacks) == null ? void 0 : l.onMetrics) == null || g.call(l, e.data), this.emit(q.Metrics, e.data);
|
|
@@ -3488,32 +3488,32 @@ class et extends rl {
|
|
|
3488
3488
|
(S = (p = this._options.callbacks) == null ? void 0 : p.onServerMessage) == null || S.call(p, e.data), this.emit(q.ServerMessage, e.data);
|
|
3489
3489
|
break;
|
|
3490
3490
|
case X.LLM_FUNCTION_CALL_STARTED: {
|
|
3491
|
-
const
|
|
3492
|
-
(T = (k = this._options.callbacks) == null ? void 0 : k.onLLMFunctionCallStarted) == null || T.call(k,
|
|
3491
|
+
const ee = e.data;
|
|
3492
|
+
(T = (k = this._options.callbacks) == null ? void 0 : k.onLLMFunctionCallStarted) == null || T.call(k, ee), this.emit(q.LLMFunctionCallStarted, ee);
|
|
3493
3493
|
break;
|
|
3494
3494
|
}
|
|
3495
3495
|
case X.LLM_FUNCTION_CALL_IN_PROGRESS: {
|
|
3496
|
-
const
|
|
3497
|
-
this._maybeTriggerFunctionCallCallback(
|
|
3496
|
+
const ee = e.data;
|
|
3497
|
+
this._maybeTriggerFunctionCallCallback(ee), (I = (O = this._options.callbacks) == null ? void 0 : O.onLLMFunctionCallInProgress) == null || I.call(O, ee), this.emit(q.LLMFunctionCallInProgress, ee);
|
|
3498
3498
|
break;
|
|
3499
3499
|
}
|
|
3500
3500
|
case X.LLM_FUNCTION_CALL_STOPPED: {
|
|
3501
|
-
const
|
|
3502
|
-
(W = (R = this._options.callbacks) == null ? void 0 : R.onLLMFunctionCallStopped) == null || W.call(R,
|
|
3501
|
+
const ee = e.data;
|
|
3502
|
+
(W = (R = this._options.callbacks) == null ? void 0 : R.onLLMFunctionCallStopped) == null || W.call(R, ee), this.emit(q.LLMFunctionCallStopped, ee);
|
|
3503
3503
|
break;
|
|
3504
3504
|
}
|
|
3505
3505
|
case X.LLM_FUNCTION_CALL: {
|
|
3506
|
-
const
|
|
3507
|
-
function_name:
|
|
3508
|
-
tool_call_id:
|
|
3509
|
-
arguments:
|
|
3506
|
+
const ee = e.data, Je = {
|
|
3507
|
+
function_name: ee.function_name,
|
|
3508
|
+
tool_call_id: ee.tool_call_id,
|
|
3509
|
+
arguments: ee.args
|
|
3510
3510
|
};
|
|
3511
|
-
this._maybeTriggerFunctionCallCallback(
|
|
3511
|
+
this._maybeTriggerFunctionCallCallback(Je), (re = this._options.callbacks) != null && re.onLLMFunctionCall && (this._llmFunctionCallWarned || (ne.warn("[Pipecat Client] onLLMFunctionCall is deprecated. Please use onLLMFunctionCallInProgress instead."), this._llmFunctionCallWarned = !0)), (nt = (Oe = this._options.callbacks) == null ? void 0 : Oe.onLLMFunctionCall) == null || nt.call(Oe, ee), this.emit(q.LLMFunctionCall, ee);
|
|
3512
3512
|
break;
|
|
3513
3513
|
}
|
|
3514
3514
|
case X.BOT_LLM_SEARCH_RESPONSE: {
|
|
3515
|
-
const
|
|
3516
|
-
(
|
|
3515
|
+
const ee = e.data;
|
|
3516
|
+
(we = (it = this._options.callbacks) == null ? void 0 : it.onBotLlmSearchResponse) == null || we.call(it, ee), this.emit(q.BotLlmSearchResponse, ee);
|
|
3517
3517
|
break;
|
|
3518
3518
|
}
|
|
3519
3519
|
default:
|
|
@@ -3530,7 +3530,7 @@ class et extends rl {
|
|
|
3530
3530
|
arguments: e.arguments ?? {}
|
|
3531
3531
|
};
|
|
3532
3532
|
t(r).then((i) => {
|
|
3533
|
-
i != null && this._sendMessage(new
|
|
3533
|
+
i != null && this._sendMessage(new xe(X.LLM_FUNCTION_CALL_RESULT, {
|
|
3534
3534
|
function_name: e.function_name,
|
|
3535
3535
|
tool_call_id: e.tool_call_id,
|
|
3536
3536
|
arguments: e.arguments ?? {},
|
|
@@ -3544,28 +3544,28 @@ class et extends rl {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
Tt([
|
|
3546
3546
|
yi
|
|
3547
|
-
],
|
|
3547
|
+
], Ve.prototype, "startBot", null);
|
|
3548
3548
|
Tt([
|
|
3549
3549
|
yi
|
|
3550
|
-
],
|
|
3550
|
+
], Ve.prototype, "connect", null);
|
|
3551
3551
|
Tt([
|
|
3552
3552
|
yi
|
|
3553
|
-
],
|
|
3553
|
+
], Ve.prototype, "startBotAndConnect", null);
|
|
3554
3554
|
Tt([
|
|
3555
3555
|
Er
|
|
3556
|
-
],
|
|
3556
|
+
], Ve.prototype, "sendClientMessage", null);
|
|
3557
3557
|
Tt([
|
|
3558
3558
|
Er
|
|
3559
|
-
],
|
|
3559
|
+
], Ve.prototype, "sendClientRequest", null);
|
|
3560
3560
|
Tt([
|
|
3561
3561
|
Er
|
|
3562
|
-
],
|
|
3562
|
+
], Ve.prototype, "appendToContext", null);
|
|
3563
3563
|
Tt([
|
|
3564
3564
|
Er
|
|
3565
|
-
],
|
|
3565
|
+
], Ve.prototype, "sendText", null);
|
|
3566
3566
|
Tt([
|
|
3567
3567
|
Er
|
|
3568
|
-
],
|
|
3568
|
+
], Ve.prototype, "disconnectBot", null);
|
|
3569
3569
|
ct(or, sa);
|
|
3570
3570
|
ct(or, ba);
|
|
3571
3571
|
ct(or, vi);
|
|
@@ -3592,25 +3592,25 @@ function Ki(n, e) {
|
|
|
3592
3592
|
function $e(n, e) {
|
|
3593
3593
|
if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
3594
3594
|
}
|
|
3595
|
-
function
|
|
3596
|
-
return
|
|
3595
|
+
function ce(n) {
|
|
3596
|
+
return ce = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
3597
3597
|
return typeof e;
|
|
3598
3598
|
} : function(e) {
|
|
3599
3599
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3600
|
-
},
|
|
3600
|
+
}, ce(n);
|
|
3601
3601
|
}
|
|
3602
3602
|
function Ca(n) {
|
|
3603
3603
|
var e = function(t, r) {
|
|
3604
|
-
if (
|
|
3604
|
+
if (ce(t) != "object" || !t) return t;
|
|
3605
3605
|
var i = t[Symbol.toPrimitive];
|
|
3606
3606
|
if (i !== void 0) {
|
|
3607
3607
|
var o = i.call(t, r);
|
|
3608
|
-
if (
|
|
3608
|
+
if (ce(o) != "object") return o;
|
|
3609
3609
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3610
3610
|
}
|
|
3611
3611
|
return String(t);
|
|
3612
3612
|
}(n, "string");
|
|
3613
|
-
return
|
|
3613
|
+
return ce(e) == "symbol" ? e : e + "";
|
|
3614
3614
|
}
|
|
3615
3615
|
function Wi(n, e) {
|
|
3616
3616
|
for (var t = 0; t < e.length; t++) {
|
|
@@ -3622,7 +3622,7 @@ function je(n, e, t) {
|
|
|
3622
3622
|
return e && Wi(n.prototype, e), t && Wi(n, t), Object.defineProperty(n, "prototype", { writable: !1 }), n;
|
|
3623
3623
|
}
|
|
3624
3624
|
function gn(n, e) {
|
|
3625
|
-
if (e && (
|
|
3625
|
+
if (e && (ce(e) == "object" || typeof e == "function")) return e;
|
|
3626
3626
|
if (e !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
3627
3627
|
return function(t) {
|
|
3628
3628
|
if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -3674,7 +3674,7 @@ function Gi(n, e) {
|
|
|
3674
3674
|
for (var t = 0, r = Array(e); t < e; t++) r[t] = n[t];
|
|
3675
3675
|
return r;
|
|
3676
3676
|
}
|
|
3677
|
-
function
|
|
3677
|
+
function Ae(n, e) {
|
|
3678
3678
|
return function(t) {
|
|
3679
3679
|
if (Array.isArray(t)) return t;
|
|
3680
3680
|
}(n) || function(t, r) {
|
|
@@ -3730,14 +3730,14 @@ var Yi, Lr = { exports: {} }, Vn = function() {
|
|
|
3730
3730
|
}
|
|
3731
3731
|
Lr.exports = i, Lr.exports.once = function(m, v) {
|
|
3732
3732
|
return new Promise(function(w, x) {
|
|
3733
|
-
function E(
|
|
3734
|
-
m.removeListener(v, L), x(
|
|
3733
|
+
function E(P) {
|
|
3734
|
+
m.removeListener(v, L), x(P);
|
|
3735
3735
|
}
|
|
3736
3736
|
function L() {
|
|
3737
3737
|
typeof m.removeListener == "function" && m.removeListener("error", E), w([].slice.call(arguments));
|
|
3738
3738
|
}
|
|
3739
|
-
y(m, v, L, { once: !0 }), v !== "error" && function(
|
|
3740
|
-
typeof
|
|
3739
|
+
y(m, v, L, { once: !0 }), v !== "error" && function(P, N, B) {
|
|
3740
|
+
typeof P.on == "function" && y(P, "error", N, B);
|
|
3741
3741
|
}(m, E, { once: !0 });
|
|
3742
3742
|
});
|
|
3743
3743
|
}, i.EventEmitter = i, i.prototype._events = void 0, i.prototype._eventsCount = 0, i.prototype._maxListeners = void 0;
|
|
@@ -3749,12 +3749,12 @@ var Yi, Lr = { exports: {} }, Vn = function() {
|
|
|
3749
3749
|
return m._maxListeners === void 0 ? i.defaultMaxListeners : m._maxListeners;
|
|
3750
3750
|
}
|
|
3751
3751
|
function c(m, v, w, x) {
|
|
3752
|
-
var E, L,
|
|
3753
|
-
if (s(w), (L = m._events) === void 0 ? (L = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (L.newListener !== void 0 && (m.emit("newListener", v, w.listener ? w.listener : w), L = m._events),
|
|
3754
|
-
else if (typeof
|
|
3755
|
-
|
|
3756
|
-
var
|
|
3757
|
-
|
|
3752
|
+
var E, L, P, N;
|
|
3753
|
+
if (s(w), (L = m._events) === void 0 ? (L = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (L.newListener !== void 0 && (m.emit("newListener", v, w.listener ? w.listener : w), L = m._events), P = L[v]), P === void 0) P = L[v] = w, ++m._eventsCount;
|
|
3754
|
+
else if (typeof P == "function" ? P = L[v] = x ? [w, P] : [P, w] : x ? P.unshift(w) : P.push(w), (E = a(m)) > 0 && P.length > E && !P.warned) {
|
|
3755
|
+
P.warned = !0;
|
|
3756
|
+
var B = new Error("Possible EventEmitter memory leak detected. " + P.length + " " + String(v) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3757
|
+
B.name = "MaxListenersExceededWarning", B.emitter = m, B.type = v, B.count = P.length, N = B, console && console.warn && console.warn(N);
|
|
3758
3758
|
}
|
|
3759
3759
|
return m;
|
|
3760
3760
|
}
|
|
@@ -3770,8 +3770,8 @@ var Yi, Lr = { exports: {} }, Vn = function() {
|
|
|
3770
3770
|
if (x === void 0) return [];
|
|
3771
3771
|
var E = x[v];
|
|
3772
3772
|
return E === void 0 ? [] : typeof E == "function" ? w ? [E.listener || E] : [E] : w ? function(L) {
|
|
3773
|
-
for (var
|
|
3774
|
-
return
|
|
3773
|
+
for (var P = new Array(L.length), N = 0; N < P.length; ++N) P[N] = L[N].listener || L[N];
|
|
3774
|
+
return P;
|
|
3775
3775
|
}(E) : b(E, E.length);
|
|
3776
3776
|
}
|
|
3777
3777
|
function f(m) {
|
|
@@ -3816,15 +3816,15 @@ var Yi, Lr = { exports: {} }, Vn = function() {
|
|
|
3816
3816
|
if (x) {
|
|
3817
3817
|
var L;
|
|
3818
3818
|
if (v.length > 0 && (L = v[0]), L instanceof Error) throw L;
|
|
3819
|
-
var
|
|
3820
|
-
throw
|
|
3819
|
+
var P = new Error("Unhandled error." + (L ? " (" + L.message + ")" : ""));
|
|
3820
|
+
throw P.context = L, P;
|
|
3821
3821
|
}
|
|
3822
3822
|
var N = E[m];
|
|
3823
3823
|
if (N === void 0) return !1;
|
|
3824
3824
|
if (typeof N == "function") t(N, this, v);
|
|
3825
3825
|
else {
|
|
3826
|
-
var
|
|
3827
|
-
for (w = 0; w <
|
|
3826
|
+
var B = N.length, ae = b(N, B);
|
|
3827
|
+
for (w = 0; w < B; ++w) t(ae[w], this, v);
|
|
3828
3828
|
}
|
|
3829
3829
|
return !0;
|
|
3830
3830
|
}, i.prototype.addListener = function(m, v) {
|
|
@@ -3836,20 +3836,20 @@ var Yi, Lr = { exports: {} }, Vn = function() {
|
|
|
3836
3836
|
}, i.prototype.prependOnceListener = function(m, v) {
|
|
3837
3837
|
return s(v), this.prependListener(m, u(this, m, v)), this;
|
|
3838
3838
|
}, i.prototype.removeListener = function(m, v) {
|
|
3839
|
-
var w, x, E, L,
|
|
3839
|
+
var w, x, E, L, P;
|
|
3840
3840
|
if (s(v), (x = this._events) === void 0) return this;
|
|
3841
3841
|
if ((w = x[m]) === void 0) return this;
|
|
3842
3842
|
if (w === v || w.listener === v) --this._eventsCount == 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete x[m], x.removeListener && this.emit("removeListener", m, w.listener || v));
|
|
3843
3843
|
else if (typeof w != "function") {
|
|
3844
3844
|
for (E = -1, L = w.length - 1; L >= 0; L--) if (w[L] === v || w[L].listener === v) {
|
|
3845
|
-
|
|
3845
|
+
P = w[L].listener, E = L;
|
|
3846
3846
|
break;
|
|
3847
3847
|
}
|
|
3848
3848
|
if (E < 0) return this;
|
|
3849
|
-
E === 0 ? w.shift() : function(N,
|
|
3850
|
-
for (;
|
|
3849
|
+
E === 0 ? w.shift() : function(N, B) {
|
|
3850
|
+
for (; B + 1 < N.length; B++) N[B] = N[B + 1];
|
|
3851
3851
|
N.pop();
|
|
3852
|
-
}(w, E), w.length === 1 && (x[m] = w[0]), x.removeListener !== void 0 && this.emit("removeListener", m,
|
|
3852
|
+
}(w, E), w.length === 1 && (x[m] = w[0]), x.removeListener !== void 0 && this.emit("removeListener", m, P || v);
|
|
3853
3853
|
}
|
|
3854
3854
|
return this;
|
|
3855
3855
|
}, i.prototype.off = i.prototype.removeListener, i.prototype.removeAllListeners = function(m) {
|
|
@@ -3916,7 +3916,7 @@ function Le(n, e) {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
return n != n && e != e;
|
|
3918
3918
|
}
|
|
3919
|
-
const il = { "Amazon Silk": "amazon_silk", "Android Browser": "android", Bada: "bada", BlackBerry: "blackberry", Chrome: "chrome", Chromium: "chromium", Electron: "electron", Epiphany: "epiphany", Firefox: "firefox", Focus: "focus", Generic: "generic", "Google Search": "google_search", Googlebot: "googlebot", "Internet Explorer": "ie", "K-Meleon": "k_meleon", Maxthon: "maxthon", "Microsoft Edge": "edge", "MZ Browser": "mz", "NAVER Whale Browser": "naver", Opera: "opera", "Opera Coast": "opera_coast", PhantomJS: "phantomjs", Puffin: "puffin", QupZilla: "qupzilla", QQ: "qq", QQLite: "qqlite", Safari: "safari", Sailfish: "sailfish", "Samsung Internet for Android": "samsung_internet", SeaMonkey: "seamonkey", Sleipnir: "sleipnir", Swing: "swing", Tizen: "tizen", "UC Browser": "uc", Vivaldi: "vivaldi", "WebOS Browser": "webos", WeChat: "wechat", "Yandex Browser": "yandex", Roku: "roku" }, Ea = { amazon_silk: "Amazon Silk", android: "Android Browser", bada: "Bada", blackberry: "BlackBerry", chrome: "Chrome", chromium: "Chromium", electron: "Electron", epiphany: "Epiphany", firefox: "Firefox", focus: "Focus", generic: "Generic", googlebot: "Googlebot", google_search: "Google Search", ie: "Internet Explorer", k_meleon: "K-Meleon", maxthon: "Maxthon", edge: "Microsoft Edge", mz: "MZ Browser", naver: "NAVER Whale Browser", opera: "Opera", opera_coast: "Opera Coast", phantomjs: "PhantomJS", puffin: "Puffin", qupzilla: "QupZilla", qq: "QQ Browser", qqlite: "QQ Browser Lite", safari: "Safari", sailfish: "Sailfish", samsung_internet: "Samsung Internet for Android", seamonkey: "SeaMonkey", sleipnir: "Sleipnir", swing: "Swing", tizen: "Tizen", uc: "UC Browser", vivaldi: "Vivaldi", webos: "WebOS Browser", wechat: "WeChat", yandex: "Yandex Browser" },
|
|
3919
|
+
const il = { "Amazon Silk": "amazon_silk", "Android Browser": "android", Bada: "bada", BlackBerry: "blackberry", Chrome: "chrome", Chromium: "chromium", Electron: "electron", Epiphany: "epiphany", Firefox: "firefox", Focus: "focus", Generic: "generic", "Google Search": "google_search", Googlebot: "googlebot", "Internet Explorer": "ie", "K-Meleon": "k_meleon", Maxthon: "maxthon", "Microsoft Edge": "edge", "MZ Browser": "mz", "NAVER Whale Browser": "naver", Opera: "opera", "Opera Coast": "opera_coast", PhantomJS: "phantomjs", Puffin: "puffin", QupZilla: "qupzilla", QQ: "qq", QQLite: "qqlite", Safari: "safari", Sailfish: "sailfish", "Samsung Internet for Android": "samsung_internet", SeaMonkey: "seamonkey", Sleipnir: "sleipnir", Swing: "swing", Tizen: "tizen", "UC Browser": "uc", Vivaldi: "vivaldi", "WebOS Browser": "webos", WeChat: "wechat", "Yandex Browser": "yandex", Roku: "roku" }, Ea = { amazon_silk: "Amazon Silk", android: "Android Browser", bada: "Bada", blackberry: "BlackBerry", chrome: "Chrome", chromium: "Chromium", electron: "Electron", epiphany: "Epiphany", firefox: "Firefox", focus: "Focus", generic: "Generic", googlebot: "Googlebot", google_search: "Google Search", ie: "Internet Explorer", k_meleon: "K-Meleon", maxthon: "Maxthon", edge: "Microsoft Edge", mz: "MZ Browser", naver: "NAVER Whale Browser", opera: "Opera", opera_coast: "Opera Coast", phantomjs: "PhantomJS", puffin: "Puffin", qupzilla: "QupZilla", qq: "QQ Browser", qqlite: "QQ Browser Lite", safari: "Safari", sailfish: "Sailfish", samsung_internet: "Samsung Internet for Android", seamonkey: "SeaMonkey", sleipnir: "Sleipnir", swing: "Swing", tizen: "Tizen", uc: "UC Browser", vivaldi: "Vivaldi", webos: "WebOS Browser", wechat: "WeChat", yandex: "Yandex Browser" }, Se = { tablet: "tablet", mobile: "mobile", desktop: "desktop", tv: "tv" }, De = { WindowsPhone: "Windows Phone", Windows: "Windows", MacOS: "macOS", iOS: "iOS", Android: "Android", WebOS: "WebOS", BlackBerry: "BlackBerry", Bada: "Bada", Tizen: "Tizen", Linux: "Linux", ChromeOS: "Chrome OS", PlayStation4: "PlayStation 4", Roku: "Roku" }, St = { EdgeHTML: "EdgeHTML", Blink: "Blink", Trident: "Trident", Presto: "Presto", Gecko: "Gecko", WebKit: "WebKit" };
|
|
3920
3920
|
class D {
|
|
3921
3921
|
static getFirstMatch(e, t) {
|
|
3922
3922
|
const r = t.match(e);
|
|
@@ -4212,18 +4212,18 @@ var sl = [{ test: [/Roku\/DVP/], describe(n) {
|
|
|
4212
4212
|
const e = D.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, n);
|
|
4213
4213
|
return { name: De.PlayStation4, version: e };
|
|
4214
4214
|
} }], al = [{ test: [/googlebot/i], describe: () => ({ type: "bot", vendor: "Google" }) }, { test: [/huawei/i], describe(n) {
|
|
4215
|
-
const e = D.getFirstMatch(/(can-l01)/i, n) && "Nova", t = { type:
|
|
4215
|
+
const e = D.getFirstMatch(/(can-l01)/i, n) && "Nova", t = { type: Se.mobile, vendor: "Huawei" };
|
|
4216
4216
|
return e && (t.model = e), t;
|
|
4217
|
-
} }, { test: [/nexus\s*(?:7|8|9|10).*/i], describe: () => ({ type:
|
|
4217
|
+
} }, { test: [/nexus\s*(?:7|8|9|10).*/i], describe: () => ({ type: Se.tablet, vendor: "Nexus" }) }, { test: [/ipad/i], describe: () => ({ type: Se.tablet, vendor: "Apple", model: "iPad" }) }, { test: [/Macintosh(.*?) FxiOS(.*?)\//], describe: () => ({ type: Se.tablet, vendor: "Apple", model: "iPad" }) }, { test: [/kftt build/i], describe: () => ({ type: Se.tablet, vendor: "Amazon", model: "Kindle Fire HD 7" }) }, { test: [/silk/i], describe: () => ({ type: Se.tablet, vendor: "Amazon" }) }, { test: [/tablet(?! pc)/i], describe: () => ({ type: Se.tablet }) }, { test(n) {
|
|
4218
4218
|
const e = n.test(/ipod|iphone/i), t = n.test(/like (ipod|iphone)/i);
|
|
4219
4219
|
return e && !t;
|
|
4220
4220
|
}, describe(n) {
|
|
4221
4221
|
const e = D.getFirstMatch(/(ipod|iphone)/i, n);
|
|
4222
|
-
return { type:
|
|
4223
|
-
} }, { test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], describe: () => ({ type:
|
|
4222
|
+
return { type: Se.mobile, vendor: "Apple", model: e };
|
|
4223
|
+
} }, { test: [/nexus\s*[0-6].*/i, /galaxy nexus/i], describe: () => ({ type: Se.mobile, vendor: "Nexus" }) }, { test: [/[^-]mobi/i], describe: () => ({ type: Se.mobile }) }, { test: (n) => n.getBrowserName(!0) === "blackberry", describe: () => ({ type: Se.mobile, vendor: "BlackBerry" }) }, { test: (n) => n.getBrowserName(!0) === "bada", describe: () => ({ type: Se.mobile }) }, { test: (n) => n.getBrowserName() === "windows phone", describe: () => ({ type: Se.mobile, vendor: "Microsoft" }) }, { test(n) {
|
|
4224
4224
|
const e = Number(String(n.getOSVersion()).split(".")[0]);
|
|
4225
4225
|
return n.getOSName(!0) === "android" && e >= 3;
|
|
4226
|
-
}, describe: () => ({ type:
|
|
4226
|
+
}, describe: () => ({ type: Se.tablet }) }, { test: (n) => n.getOSName(!0) === "android", describe: () => ({ type: Se.mobile }) }, { test: (n) => n.getOSName(!0) === "macos", describe: () => ({ type: Se.desktop, vendor: "Apple" }) }, { test: (n) => n.getOSName(!0) === "windows", describe: () => ({ type: Se.desktop }) }, { test: (n) => n.getOSName(!0) === "linux", describe: () => ({ type: Se.desktop }) }, { test: (n) => n.getOSName(!0) === "playstation 4", describe: () => ({ type: Se.tv }) }, { test: (n) => n.getOSName(!0) === "roku", describe: () => ({ type: Se.tv }) }], cl = [{ test: (n) => n.getBrowserName(!0) === "microsoft edge", describe(n) {
|
|
4227
4227
|
if (/\sedg\//i.test(n)) return { name: St.Blink };
|
|
4228
4228
|
const e = D.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, n);
|
|
4229
4229
|
return { name: St.EdgeHTML, version: e };
|
|
@@ -4404,7 +4404,7 @@ class ll {
|
|
|
4404
4404
|
return De;
|
|
4405
4405
|
}
|
|
4406
4406
|
static get PLATFORMS_MAP() {
|
|
4407
|
-
return
|
|
4407
|
+
return Se;
|
|
4408
4408
|
}
|
|
4409
4409
|
}
|
|
4410
4410
|
function mn() {
|
|
@@ -4427,15 +4427,15 @@ function rn(n) {
|
|
|
4427
4427
|
}
|
|
4428
4428
|
return !0;
|
|
4429
4429
|
}
|
|
4430
|
-
const
|
|
4430
|
+
const ye = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Rt = "8.55.0", de = globalThis;
|
|
4431
4431
|
function nn(n, e, t) {
|
|
4432
|
-
const r =
|
|
4432
|
+
const r = de, i = r.__SENTRY__ = r.__SENTRY__ || {}, o = i[Rt] = i[Rt] || {};
|
|
4433
4433
|
return o[n] || (o[n] = e());
|
|
4434
4434
|
}
|
|
4435
4435
|
const zt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Kn = ["debug", "info", "warn", "error", "log", "assert", "trace"], on = {};
|
|
4436
4436
|
function Tr(n) {
|
|
4437
|
-
if (!("console" in
|
|
4438
|
-
const e =
|
|
4437
|
+
if (!("console" in de)) return n();
|
|
4438
|
+
const e = de.console, t = {}, r = Object.keys(on);
|
|
4439
4439
|
r.forEach((i) => {
|
|
4440
4440
|
const o = on[i];
|
|
4441
4441
|
t[i] = e[i], e[i] = o;
|
|
@@ -4458,7 +4458,7 @@ const G = nn("logger", function() {
|
|
|
4458
4458
|
return zt ? Kn.forEach((t) => {
|
|
4459
4459
|
e[t] = (...r) => {
|
|
4460
4460
|
n && Tr(() => {
|
|
4461
|
-
|
|
4461
|
+
de.console[t](`Sentry Logger [${t}]:`, ...r);
|
|
4462
4462
|
});
|
|
4463
4463
|
};
|
|
4464
4464
|
}) : Kn.forEach((t) => {
|
|
@@ -4504,7 +4504,7 @@ function Bt(n, e) {
|
|
|
4504
4504
|
}
|
|
4505
4505
|
}
|
|
4506
4506
|
}
|
|
4507
|
-
function
|
|
4507
|
+
function et(n, e) {
|
|
4508
4508
|
const t = n && Gr[n];
|
|
4509
4509
|
if (t) for (const r of t) try {
|
|
4510
4510
|
r(e);
|
|
@@ -4517,18 +4517,18 @@ Error:`, i);
|
|
|
4517
4517
|
}
|
|
4518
4518
|
let xn = null;
|
|
4519
4519
|
function dl() {
|
|
4520
|
-
xn =
|
|
4521
|
-
return
|
|
4522
|
-
},
|
|
4520
|
+
xn = de.onerror, de.onerror = function(n, e, t, r, i) {
|
|
4521
|
+
return et("error", { column: r, error: i, line: t, msg: n, url: e }), !!xn && xn.apply(this, arguments);
|
|
4522
|
+
}, de.onerror.__SENTRY_INSTRUMENTED__ = !0;
|
|
4523
4523
|
}
|
|
4524
4524
|
let _n = null;
|
|
4525
4525
|
function ul() {
|
|
4526
|
-
_n =
|
|
4527
|
-
return
|
|
4528
|
-
},
|
|
4526
|
+
_n = de.onunhandledrejection, de.onunhandledrejection = function(n) {
|
|
4527
|
+
return et("unhandledrejection", n), !_n || _n.apply(this, arguments);
|
|
4528
|
+
}, de.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
|
|
4529
4529
|
}
|
|
4530
4530
|
function bn() {
|
|
4531
|
-
return xi(
|
|
4531
|
+
return xi(de), de;
|
|
4532
4532
|
}
|
|
4533
4533
|
function xi(n) {
|
|
4534
4534
|
const e = n.__SENTRY__ = n.__SENTRY__ || {};
|
|
@@ -4583,7 +4583,7 @@ function Ft(n, e) {
|
|
|
4583
4583
|
function Oa(n) {
|
|
4584
4584
|
return !(typeof n != "object" || n === null || !n.__isVue && !n._isVue);
|
|
4585
4585
|
}
|
|
4586
|
-
const Ei =
|
|
4586
|
+
const Ei = de;
|
|
4587
4587
|
function Da(n, e = {}) {
|
|
4588
4588
|
if (!n) return "<unknown>";
|
|
4589
4589
|
try {
|
|
@@ -4733,13 +4733,13 @@ function Mr() {
|
|
|
4733
4733
|
return Date.now() / 1e3;
|
|
4734
4734
|
}
|
|
4735
4735
|
const ft = function() {
|
|
4736
|
-
const { performance: n } =
|
|
4736
|
+
const { performance: n } = de;
|
|
4737
4737
|
if (!n || !n.now) return Mr;
|
|
4738
4738
|
const e = Date.now() - n.now(), t = n.timeOrigin == null ? e : n.timeOrigin;
|
|
4739
4739
|
return () => (t + n.now()) / 1e3;
|
|
4740
4740
|
}();
|
|
4741
|
-
function
|
|
4742
|
-
const n =
|
|
4741
|
+
function Ke() {
|
|
4742
|
+
const n = de, e = n.crypto || n.msCrypto;
|
|
4743
4743
|
let t = () => 16 * Math.random();
|
|
4744
4744
|
try {
|
|
4745
4745
|
if (e && e.randomUUID) return e.randomUUID().replace(/-/g, "");
|
|
@@ -4798,7 +4798,7 @@ function sn(n) {
|
|
|
4798
4798
|
});
|
|
4799
4799
|
}
|
|
4800
4800
|
(() => {
|
|
4801
|
-
const { performance: n } =
|
|
4801
|
+
const { performance: n } = de;
|
|
4802
4802
|
!n || !n.now || (n.now(), n.timing && n.timing.navigationStart);
|
|
4803
4803
|
})(), function(n) {
|
|
4804
4804
|
n[n.PENDING = 0] = "PENDING", n[n.RESOLVED = 1] = "RESOLVED", n[n.REJECTED = 2] = "REJECTED";
|
|
@@ -4872,13 +4872,13 @@ class He {
|
|
|
4872
4872
|
}
|
|
4873
4873
|
}
|
|
4874
4874
|
function gl(n) {
|
|
4875
|
-
const e = ft(), t = { sid:
|
|
4875
|
+
const e = ft(), t = { sid: Ke(), init: !0, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: !1, toJSON: () => function(r) {
|
|
4876
4876
|
return qe({ sid: `${r.sid}`, init: r.init, started: new Date(1e3 * r.started).toISOString(), timestamp: new Date(1e3 * r.timestamp).toISOString(), status: r.status, errors: r.errors, did: typeof r.did == "number" || typeof r.did == "string" ? `${r.did}` : void 0, duration: r.duration, abnormal_mechanism: r.abnormal_mechanism, attrs: { release: r.release, environment: r.environment, ip_address: r.ipAddress, user_agent: r.userAgent } });
|
|
4877
4877
|
}(t) };
|
|
4878
4878
|
return n && rr(t, n), t;
|
|
4879
4879
|
}
|
|
4880
4880
|
function rr(n, e = {}) {
|
|
4881
|
-
if (e.user && (!n.ipAddress && e.user.ip_address && (n.ipAddress = e.user.ip_address), n.did || e.did || (n.did = e.user.id || e.user.email || e.user.username)), n.timestamp = e.timestamp || ft(), e.abnormal_mechanism && (n.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (n.ignoreDuration = e.ignoreDuration), e.sid && (n.sid = e.sid.length === 32 ? e.sid :
|
|
4881
|
+
if (e.user && (!n.ipAddress && e.user.ip_address && (n.ipAddress = e.user.ip_address), n.did || e.did || (n.did = e.user.id || e.user.email || e.user.username)), n.timestamp = e.timestamp || ft(), e.abnormal_mechanism && (n.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (n.ignoreDuration = e.ignoreDuration), e.sid && (n.sid = e.sid.length === 32 ? e.sid : Ke()), e.init !== void 0 && (n.init = e.init), !n.did && e.did && (n.did = `${e.did}`), typeof e.started == "number" && (n.started = e.started), n.ignoreDuration) n.duration = void 0;
|
|
4882
4882
|
else if (typeof e.duration == "number") n.duration = e.duration;
|
|
4883
4883
|
else {
|
|
4884
4884
|
const t = n.timestamp - n.started;
|
|
@@ -4887,10 +4887,10 @@ function rr(n, e = {}) {
|
|
|
4887
4887
|
e.release && (n.release = e.release), e.environment && (n.environment = e.environment), !n.ipAddress && e.ipAddress && (n.ipAddress = e.ipAddress), !n.userAgent && e.userAgent && (n.userAgent = e.userAgent), typeof e.errors == "number" && (n.errors = e.errors), e.status && (n.status = e.status);
|
|
4888
4888
|
}
|
|
4889
4889
|
function uo() {
|
|
4890
|
-
return
|
|
4890
|
+
return Ke();
|
|
4891
4891
|
}
|
|
4892
4892
|
function Yn() {
|
|
4893
|
-
return
|
|
4893
|
+
return Ke().substring(16);
|
|
4894
4894
|
}
|
|
4895
4895
|
function wn(n, e, t = 2) {
|
|
4896
4896
|
if (!e || typeof e != "object" || t <= 0) return e;
|
|
@@ -5013,19 +5013,19 @@ class Mi {
|
|
|
5013
5013
|
return this._propagationContext;
|
|
5014
5014
|
}
|
|
5015
5015
|
captureException(e, t) {
|
|
5016
|
-
const r = t && t.event_id ? t.event_id :
|
|
5016
|
+
const r = t && t.event_id ? t.event_id : Ke();
|
|
5017
5017
|
if (!this._client) return G.warn("No client configured on scope - will not capture exception!"), r;
|
|
5018
5018
|
const i = new Error("Sentry syntheticException");
|
|
5019
5019
|
return this._client.captureException(e, { originalException: e, syntheticException: i, ...t, event_id: r }, this), r;
|
|
5020
5020
|
}
|
|
5021
5021
|
captureMessage(e, t, r) {
|
|
5022
|
-
const i = r && r.event_id ? r.event_id :
|
|
5022
|
+
const i = r && r.event_id ? r.event_id : Ke();
|
|
5023
5023
|
if (!this._client) return G.warn("No client configured on scope - will not capture message!"), i;
|
|
5024
5024
|
const o = new Error(e);
|
|
5025
5025
|
return this._client.captureMessage(e, t, { originalException: e, syntheticException: o, ...r, event_id: i }, this), i;
|
|
5026
5026
|
}
|
|
5027
5027
|
captureEvent(e, t) {
|
|
5028
|
-
const r = t && t.event_id ? t.event_id :
|
|
5028
|
+
const r = t && t.event_id ? t.event_id : Ke();
|
|
5029
5029
|
return this._client ? (this._client.captureEvent(e, { ...t, event_id: r }, this), r) : (G.warn("No client configured on scope - will not capture event!"), r);
|
|
5030
5030
|
}
|
|
5031
5031
|
_notifyScopeListeners() {
|
|
@@ -5096,7 +5096,7 @@ function qt() {
|
|
|
5096
5096
|
function Ar() {
|
|
5097
5097
|
return Ai(bn()).getIsolationScope();
|
|
5098
5098
|
}
|
|
5099
|
-
function
|
|
5099
|
+
function Me() {
|
|
5100
5100
|
return qt().getClient();
|
|
5101
5101
|
}
|
|
5102
5102
|
function yl(n) {
|
|
@@ -5175,7 +5175,7 @@ function Na(n, e) {
|
|
|
5175
5175
|
return e.emit("createDsc", i), i;
|
|
5176
5176
|
}
|
|
5177
5177
|
function Cl(n) {
|
|
5178
|
-
const e =
|
|
5178
|
+
const e = Me();
|
|
5179
5179
|
if (!e) return {};
|
|
5180
5180
|
const t = Ra(n), r = t._frozenDsc;
|
|
5181
5181
|
if (r) return r;
|
|
@@ -5186,7 +5186,7 @@ function Cl(n) {
|
|
|
5186
5186
|
const h = d["sentry.source"], f = c.description;
|
|
5187
5187
|
return h !== "url" && f && (a.transaction = f), function(b) {
|
|
5188
5188
|
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return !1;
|
|
5189
|
-
const y =
|
|
5189
|
+
const y = Me(), m = y && y.getOptions();
|
|
5190
5190
|
return !!m && (m.enableTracing || "tracesSampleRate" in m || "tracesSampler" in m);
|
|
5191
5191
|
}() && (a.sampled = String(function(b) {
|
|
5192
5192
|
const { traceFlags: y } = b.spanContext();
|
|
@@ -5315,7 +5315,7 @@ function wo(n, e) {
|
|
|
5315
5315
|
return !1;
|
|
5316
5316
|
}
|
|
5317
5317
|
function Zn(n) {
|
|
5318
|
-
return
|
|
5318
|
+
return de.__SENTRY__ && de.__SENTRY__.encodePolyfill ? de.__SENTRY__.encodePolyfill(n) : new TextEncoder().encode(n);
|
|
5319
5319
|
}
|
|
5320
5320
|
function Al(n) {
|
|
5321
5321
|
const [e, t] = n;
|
|
@@ -5375,7 +5375,7 @@ function ei(n, e, t, r = 0) {
|
|
|
5375
5375
|
if (e === null || typeof s != "function") i(e);
|
|
5376
5376
|
else {
|
|
5377
5377
|
const a = s({ ...e }, t);
|
|
5378
|
-
|
|
5378
|
+
ye && s.id && a === null && G.log(`Event processor "${s.id}" dropped event`), vn(a) ? a.then((c) => ei(n, c, t, r + 1).then(i)).then(null, o) : ei(n, a, t, r + 1).then(i).then(null, o);
|
|
5379
5379
|
}
|
|
5380
5380
|
});
|
|
5381
5381
|
}
|
|
@@ -5412,31 +5412,31 @@ function Br(n, e, t) {
|
|
|
5412
5412
|
n[e] = wn(n[e], t, 1);
|
|
5413
5413
|
}
|
|
5414
5414
|
function Il(n, e, t, r, i, o) {
|
|
5415
|
-
const { normalizeDepth: s = 3, normalizeMaxBreadth: a = 1e3 } = n, c = { ...e, event_id: e.event_id || t.event_id ||
|
|
5415
|
+
const { normalizeDepth: s = 3, normalizeMaxBreadth: a = 1e3 } = n, c = { ...e, event_id: e.event_id || t.event_id || Ke(), timestamp: e.timestamp || Mr() }, d = t.integrations || n.integrations.map((y) => y.name);
|
|
5416
5416
|
(function(y, m) {
|
|
5417
5417
|
const { environment: v, release: w, dist: x, maxValueLength: E = 250 } = m;
|
|
5418
5418
|
y.environment = y.environment || v || Di, !y.release && w && (y.release = w), !y.dist && x && (y.dist = x), y.message && (y.message = Xt(y.message, E));
|
|
5419
5419
|
const L = y.exception && y.exception.values && y.exception.values[0];
|
|
5420
5420
|
L && L.value && (L.value = Xt(L.value, E));
|
|
5421
|
-
const
|
|
5422
|
-
|
|
5421
|
+
const P = y.request;
|
|
5422
|
+
P && P.url && (P.url = Xt(P.url, E));
|
|
5423
5423
|
})(c, n), function(y, m) {
|
|
5424
5424
|
m.length > 0 && (y.sdk = y.sdk || {}, y.sdk.integrations = [...y.sdk.integrations || [], ...m]);
|
|
5425
5425
|
}(c, d), i && i.emit("applyFrameMetadata", e), e.type === void 0 && function(y, m) {
|
|
5426
5426
|
const v = function(w) {
|
|
5427
|
-
const x =
|
|
5427
|
+
const x = de._sentryDebugIds;
|
|
5428
5428
|
if (!x) return {};
|
|
5429
5429
|
const E = Object.keys(x);
|
|
5430
|
-
return Cn && E.length === ko || (ko = E.length, Cn = E.reduce((L,
|
|
5430
|
+
return Cn && E.length === ko || (ko = E.length, Cn = E.reduce((L, P) => {
|
|
5431
5431
|
Nr || (Nr = {});
|
|
5432
|
-
const N = Nr[
|
|
5432
|
+
const N = Nr[P];
|
|
5433
5433
|
if (N) L[N[0]] = N[1];
|
|
5434
5434
|
else {
|
|
5435
|
-
const
|
|
5436
|
-
for (let
|
|
5437
|
-
const
|
|
5438
|
-
if (
|
|
5439
|
-
L[
|
|
5435
|
+
const B = w(P);
|
|
5436
|
+
for (let ae = B.length - 1; ae >= 0; ae--) {
|
|
5437
|
+
const ue = B[ae], be = ue && ue.filename, $ = x[P];
|
|
5438
|
+
if (be && $) {
|
|
5439
|
+
L[be] = $, Nr[P] = [be, $];
|
|
5440
5440
|
break;
|
|
5441
5441
|
}
|
|
5442
5442
|
}
|
|
@@ -5488,7 +5488,7 @@ function _o(n, e) {
|
|
|
5488
5488
|
return qt().captureEvent(n, e);
|
|
5489
5489
|
}
|
|
5490
5490
|
function Co(n) {
|
|
5491
|
-
const e =
|
|
5491
|
+
const e = Me(), t = Ar(), r = qt(), { release: i, environment: o = Di } = e && e.getOptions() || {}, { userAgent: s } = de.navigator || {}, a = gl({ release: i, environment: o, user: r.getUser() || t.getUser(), ...s && { userAgent: s }, ...n }), c = t.getSession();
|
|
5492
5492
|
return c && c.status === "ok" && rr(c, { status: "exited" }), $a(), t.setSession(a), r.setSession(a), a;
|
|
5493
5493
|
}
|
|
5494
5494
|
function $a() {
|
|
@@ -5499,7 +5499,7 @@ function $a() {
|
|
|
5499
5499
|
}(t), ja(), n.setSession(), e.setSession();
|
|
5500
5500
|
}
|
|
5501
5501
|
function ja() {
|
|
5502
|
-
const n = Ar(), e = qt(), t =
|
|
5502
|
+
const n = Ar(), e = qt(), t = Me(), r = e.getSession() || n.getSession();
|
|
5503
5503
|
r && t && t.captureSession(r);
|
|
5504
5504
|
}
|
|
5505
5505
|
function Eo(n = !1) {
|
|
@@ -5521,7 +5521,7 @@ function Mo(n, e) {
|
|
|
5521
5521
|
for (const t of e) t && t.afterAllSetup && t.afterAllSetup(n);
|
|
5522
5522
|
}
|
|
5523
5523
|
function Ao(n, e, t) {
|
|
5524
|
-
if (t[e.name])
|
|
5524
|
+
if (t[e.name]) ye && G.log(`Integration skipped because it was already installed: ${e.name}`);
|
|
5525
5525
|
else {
|
|
5526
5526
|
if (t[e.name] = e, To.indexOf(e.name) === -1 && typeof e.setupOnce == "function" && (e.setupOnce(), To.push(e.name)), e.setup && typeof e.setup == "function" && e.setup(n), typeof e.preprocessEvent == "function") {
|
|
5527
5527
|
const r = e.preprocessEvent.bind(e);
|
|
@@ -5531,10 +5531,10 @@ function Ao(n, e, t) {
|
|
|
5531
5531
|
const r = e.processEvent.bind(e), i = Object.assign((o, s) => r(o, s, n), { id: e.name });
|
|
5532
5532
|
n.addEventProcessor(i);
|
|
5533
5533
|
}
|
|
5534
|
-
|
|
5534
|
+
ye && G.log(`Integration installed: ${e.name}`);
|
|
5535
5535
|
}
|
|
5536
5536
|
}
|
|
5537
|
-
class
|
|
5537
|
+
class Xe extends Error {
|
|
5538
5538
|
constructor(e, t = "warn") {
|
|
5539
5539
|
super(e), this.message = e, this.logLevel = t;
|
|
5540
5540
|
}
|
|
@@ -5542,7 +5542,7 @@ class Ye extends Error {
|
|
|
5542
5542
|
const Oo = "Not capturing exception because it's already been captured.";
|
|
5543
5543
|
class Nl {
|
|
5544
5544
|
constructor(e) {
|
|
5545
|
-
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = Tl(e.dsn) :
|
|
5545
|
+
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = Tl(e.dsn) : ye && G.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
5546
5546
|
const r = Rl(this._dsn, e.tunnel, e._metadata ? e._metadata.sdk : void 0);
|
|
5547
5547
|
this._transport = e.transport({ tunnel: this._options.tunnel, recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: r });
|
|
5548
5548
|
}
|
|
@@ -5552,23 +5552,23 @@ class Nl {
|
|
|
5552
5552
|
});
|
|
5553
5553
|
}
|
|
5554
5554
|
captureException(e, t, r) {
|
|
5555
|
-
const i =
|
|
5556
|
-
if (lo(e)) return
|
|
5555
|
+
const i = Ke();
|
|
5556
|
+
if (lo(e)) return ye && G.log(Oo), i;
|
|
5557
5557
|
const o = { event_id: i, ...t };
|
|
5558
5558
|
return this._process(this.eventFromException(e, o).then((s) => this._captureEvent(s, o, r))), o.event_id;
|
|
5559
5559
|
}
|
|
5560
5560
|
captureMessage(e, t, r, i) {
|
|
5561
|
-
const o = { event_id:
|
|
5561
|
+
const o = { event_id: Ke(), ...r }, s = Ci(e) ? e : String(e), a = Wn(e) ? this.eventFromMessage(s, t, o) : this.eventFromException(e, o);
|
|
5562
5562
|
return this._process(a.then((c) => this._captureEvent(c, o, i))), o.event_id;
|
|
5563
5563
|
}
|
|
5564
5564
|
captureEvent(e, t, r) {
|
|
5565
|
-
const i =
|
|
5566
|
-
if (t && t.originalException && lo(t.originalException)) return
|
|
5565
|
+
const i = Ke();
|
|
5566
|
+
if (t && t.originalException && lo(t.originalException)) return ye && G.log(Oo), i;
|
|
5567
5567
|
const o = { event_id: i, ...t }, s = (e.sdkProcessingMetadata || {}).capturedSpanScope;
|
|
5568
5568
|
return this._process(this._captureEvent(e, o, s || r)), o.event_id;
|
|
5569
5569
|
}
|
|
5570
5570
|
captureSession(e) {
|
|
5571
|
-
typeof e.release != "string" ?
|
|
5571
|
+
typeof e.release != "string" ? ye && G.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), rr(e, { init: !1 }));
|
|
5572
5572
|
}
|
|
5573
5573
|
getDsn() {
|
|
5574
5574
|
return this._dsn;
|
|
@@ -5622,7 +5622,7 @@ class Nl {
|
|
|
5622
5622
|
recordDroppedEvent(e, t, r) {
|
|
5623
5623
|
if (this._options.sendClientReports) {
|
|
5624
5624
|
const i = typeof r == "number" ? r : 1, o = `${e}:${t}`;
|
|
5625
|
-
|
|
5625
|
+
ye && G.log(`Recording outcome: "${o}"${i > 1 ? ` (${i} times)` : ""}`), this._outcomes[o] = (this._outcomes[o] || 0) + i;
|
|
5626
5626
|
}
|
|
5627
5627
|
}
|
|
5628
5628
|
on(e, t) {
|
|
@@ -5637,7 +5637,7 @@ class Nl {
|
|
|
5637
5637
|
r && r.forEach((i) => i(...t));
|
|
5638
5638
|
}
|
|
5639
5639
|
sendEnvelope(e) {
|
|
5640
|
-
return this.emit("beforeEnvelope", e), this._isEnabled() && this._transport ? this._transport.send(e).then(null, (t) => (
|
|
5640
|
+
return this.emit("beforeEnvelope", e), this._isEnabled() && this._transport ? this._transport.send(e).then(null, (t) => (ye && G.error("Error while sending envelope:", t), t)) : (ye && G.error("Transport disabled"), jt({}));
|
|
5641
5641
|
}
|
|
5642
5642
|
_setupIntegrations() {
|
|
5643
5643
|
const { integrations: e } = this._options;
|
|
@@ -5689,7 +5689,7 @@ class Nl {
|
|
|
5689
5689
|
}
|
|
5690
5690
|
_captureEvent(e, t = {}, r) {
|
|
5691
5691
|
return this._processEvent(e, t, r).then((i) => i.event_id, (i) => {
|
|
5692
|
-
|
|
5692
|
+
ye && (i instanceof Xe && i.logLevel === "log" ? G.log(i.message) : G.warn(i));
|
|
5693
5693
|
});
|
|
5694
5694
|
}
|
|
5695
5695
|
_processEvent(e, t, r) {
|
|
@@ -5697,22 +5697,22 @@ class Nl {
|
|
|
5697
5697
|
if (typeof b == "boolean") return Number(b);
|
|
5698
5698
|
const y = typeof b == "string" ? parseFloat(b) : b;
|
|
5699
5699
|
if (!(typeof y != "number" || isNaN(y) || y < 0 || y > 1)) return y;
|
|
5700
|
-
|
|
5700
|
+
ye && G.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(b)} of type ${JSON.stringify(typeof b)}.`);
|
|
5701
5701
|
}(o);
|
|
5702
|
-
if (a && typeof u == "number" && Math.random() > u) return this.recordDroppedEvent("sample_rate", "error", e), sn(new
|
|
5702
|
+
if (a && typeof u == "number" && Math.random() > u) return this.recordDroppedEvent("sample_rate", "error", e), sn(new Xe(`Discarding event because it's not included in the random sample (sampling rate = ${o})`, "log"));
|
|
5703
5703
|
const h = c === "replay_event" ? "replay" : c, f = (e.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
|
|
5704
5704
|
return this._prepareEvent(e, t, r, f).then((b) => {
|
|
5705
|
-
if (b === null) throw this.recordDroppedEvent("event_processor", h, e), new
|
|
5705
|
+
if (b === null) throw this.recordDroppedEvent("event_processor", h, e), new Xe("An event processor returned `null`, will not send event.", "log");
|
|
5706
5706
|
if (t.data && t.data.__sentry__ === !0) return b;
|
|
5707
5707
|
const y = function(m, v, w, x) {
|
|
5708
|
-
const { beforeSend: E, beforeSendTransaction: L, beforeSendSpan:
|
|
5708
|
+
const { beforeSend: E, beforeSendTransaction: L, beforeSendSpan: P } = v;
|
|
5709
5709
|
if (Do(w) && E) return E(w, x);
|
|
5710
5710
|
if (Lo(w)) {
|
|
5711
|
-
if (w.spans &&
|
|
5711
|
+
if (w.spans && P) {
|
|
5712
5712
|
const N = [];
|
|
5713
|
-
for (const
|
|
5714
|
-
const
|
|
5715
|
-
|
|
5713
|
+
for (const B of w.spans) {
|
|
5714
|
+
const ae = P(B);
|
|
5715
|
+
ae ? N.push(ae) : (_l(), m.recordDroppedEvent("before_send", "span"));
|
|
5716
5716
|
}
|
|
5717
5717
|
w.spans = N;
|
|
5718
5718
|
}
|
|
@@ -5729,12 +5729,12 @@ class Nl {
|
|
|
5729
5729
|
return function(m, v) {
|
|
5730
5730
|
const w = `${v} must return \`null\` or a valid event.`;
|
|
5731
5731
|
if (vn(m)) return m.then((x) => {
|
|
5732
|
-
if (!er(x) && x !== null) throw new
|
|
5732
|
+
if (!er(x) && x !== null) throw new Xe(w);
|
|
5733
5733
|
return x;
|
|
5734
5734
|
}, (x) => {
|
|
5735
|
-
throw new
|
|
5735
|
+
throw new Xe(`${v} rejected with ${x}`);
|
|
5736
5736
|
});
|
|
5737
|
-
if (!er(m) && m !== null) throw new
|
|
5737
|
+
if (!er(m) && m !== null) throw new Xe(w);
|
|
5738
5738
|
return m;
|
|
5739
5739
|
}(y, d);
|
|
5740
5740
|
}).then((b) => {
|
|
@@ -5743,7 +5743,7 @@ class Nl {
|
|
|
5743
5743
|
const v = 1 + (e.spans || []).length;
|
|
5744
5744
|
this.recordDroppedEvent("before_send", "span", v);
|
|
5745
5745
|
}
|
|
5746
|
-
throw new
|
|
5746
|
+
throw new Xe(`${d} returned \`null\`, will not send event.`, "log");
|
|
5747
5747
|
}
|
|
5748
5748
|
const y = r && r.getSession();
|
|
5749
5749
|
if (!s && y && this._updateSessionFromEvent(y, b), s) {
|
|
@@ -5757,7 +5757,7 @@ class Nl {
|
|
|
5757
5757
|
}
|
|
5758
5758
|
return this.sendEvent(b, t), b;
|
|
5759
5759
|
}).then(null, (b) => {
|
|
5760
|
-
throw b instanceof
|
|
5760
|
+
throw b instanceof Xe ? b : (this.captureException(b, { data: { __sentry__: !0 }, originalException: b }), new Xe(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
5761
5761
|
Reason: ${b}`));
|
|
5762
5762
|
});
|
|
5763
5763
|
}
|
|
@@ -5772,11 +5772,11 @@ Reason: ${b}`));
|
|
|
5772
5772
|
});
|
|
5773
5773
|
}
|
|
5774
5774
|
_flushOutcomes() {
|
|
5775
|
-
|
|
5775
|
+
ye && G.log("Flushing outcomes...");
|
|
5776
5776
|
const e = this._clearOutcomes();
|
|
5777
|
-
if (e.length === 0) return void (
|
|
5778
|
-
if (!this._dsn) return void (
|
|
5779
|
-
|
|
5777
|
+
if (e.length === 0) return void (ye && G.log("No outcomes to send"));
|
|
5778
|
+
if (!this._dsn) return void (ye && G.log("No dsn provided, will not send outcomes"));
|
|
5779
|
+
ye && G.log("Sending outcomes:", e);
|
|
5780
5780
|
const t = (r = e, _r((i = this._options.tunnel && an(this._dsn)) ? { dsn: i } : {}, [[{ type: "client_report" }, { timestamp: o || Mr(), discarded_events: r }]]));
|
|
5781
5781
|
var r, i, o;
|
|
5782
5782
|
this.sendEnvelope(t);
|
|
@@ -5794,7 +5794,7 @@ function Bl(n) {
|
|
|
5794
5794
|
return e.splice(e.indexOf(r), 1)[0] || Promise.resolve(void 0);
|
|
5795
5795
|
}
|
|
5796
5796
|
return { $: e, add: function(r) {
|
|
5797
|
-
if (!(n === void 0 || e.length < n)) return sn(new
|
|
5797
|
+
if (!(n === void 0 || e.length < n)) return sn(new Xe("Not adding Promise because buffer limit was reached."));
|
|
5798
5798
|
const i = r();
|
|
5799
5799
|
return e.indexOf(i) === -1 && e.push(i), i.then(() => t(i)).then(null, () => t(i).then(null, () => {
|
|
5800
5800
|
})), i;
|
|
@@ -5849,10 +5849,10 @@ function $l(n, e, t = Bl(n.bufferSize || 64)) {
|
|
|
5849
5849
|
n.recordDroppedEvent(c, So(u), h);
|
|
5850
5850
|
});
|
|
5851
5851
|
};
|
|
5852
|
-
return t.add(() => e({ body: Al(s) }).then((c) => (c.statusCode !== void 0 && (c.statusCode < 200 || c.statusCode >= 300) &&
|
|
5852
|
+
return t.add(() => e({ body: Al(s) }).then((c) => (c.statusCode !== void 0 && (c.statusCode < 200 || c.statusCode >= 300) && ye && G.warn(`Sentry responded with status code ${c.statusCode} to sent event.`), r = Fl(r, c), c), (c) => {
|
|
5853
5853
|
throw a("network_error"), c;
|
|
5854
5854
|
})).then((c) => c, (c) => {
|
|
5855
|
-
if (c instanceof
|
|
5855
|
+
if (c instanceof Xe) return ye && G.error("Skipped sending event because buffer is full."), a("queue_overflow"), jt({});
|
|
5856
5856
|
throw c;
|
|
5857
5857
|
});
|
|
5858
5858
|
}, flush: (i) => t.drain(i) };
|
|
@@ -5862,7 +5862,7 @@ function Po(n, e) {
|
|
|
5862
5862
|
}
|
|
5863
5863
|
const jl = 100;
|
|
5864
5864
|
function Mt(n, e) {
|
|
5865
|
-
const t =
|
|
5865
|
+
const t = Me(), r = Ar();
|
|
5866
5866
|
if (!t) return;
|
|
5867
5867
|
const { beforeBreadcrumb: i = null, maxBreadcrumbs: o = jl } = t.getOptions();
|
|
5868
5868
|
if (o <= 0) return;
|
|
@@ -5874,7 +5874,7 @@ const Ro = /* @__PURE__ */ new WeakMap(), Ul = () => ({ name: "FunctionToString"
|
|
|
5874
5874
|
Io = Function.prototype.toString;
|
|
5875
5875
|
try {
|
|
5876
5876
|
Function.prototype.toString = function(...n) {
|
|
5877
|
-
const e = Ti(this), t = Ro.has(
|
|
5877
|
+
const e = Ti(this), t = Ro.has(Me()) && e !== void 0 ? e : this;
|
|
5878
5878
|
return Io.apply(t, n);
|
|
5879
5879
|
};
|
|
5880
5880
|
} catch {
|
|
@@ -5892,7 +5892,7 @@ const Ro = /* @__PURE__ */ new WeakMap(), Ul = () => ({ name: "FunctionToString"
|
|
|
5892
5892
|
} catch {
|
|
5893
5893
|
}
|
|
5894
5894
|
return !1;
|
|
5895
|
-
}(s) ? (
|
|
5895
|
+
}(s) ? (ye && G.warn(`Event dropped due to being internal Sentry Error.
|
|
5896
5896
|
Event: ${kt(s)}`), !0) : function(c, d) {
|
|
5897
5897
|
return c.type || !d || !d.length ? !1 : function(u) {
|
|
5898
5898
|
const h = [];
|
|
@@ -5904,26 +5904,26 @@ Event: ${kt(s)}`), !0) : function(c, d) {
|
|
|
5904
5904
|
}
|
|
5905
5905
|
return f && f.value && (h.push(f.value), f.type && h.push(`${f.type}: ${f.value}`)), h;
|
|
5906
5906
|
}(c).some((u) => Rr(u, d));
|
|
5907
|
-
}(s, a.ignoreErrors) ? (
|
|
5907
|
+
}(s, a.ignoreErrors) ? (ye && G.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
5908
5908
|
Event: ${kt(s)}`), !0) : function(c) {
|
|
5909
5909
|
return c.type || !c.exception || !c.exception.values || c.exception.values.length === 0 ? !1 : !c.message && !c.exception.values.some((d) => d.stacktrace || d.type && d.type !== "Error" || d.value);
|
|
5910
|
-
}(s) ? (
|
|
5910
|
+
}(s) ? (ye && G.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
5911
5911
|
Event: ${kt(s)}`), !0) : function(c, d) {
|
|
5912
5912
|
if (c.type !== "transaction" || !d || !d.length) return !1;
|
|
5913
5913
|
const u = c.transaction;
|
|
5914
5914
|
return !!u && Rr(u, d);
|
|
5915
|
-
}(s, a.ignoreTransactions) ? (
|
|
5915
|
+
}(s, a.ignoreTransactions) ? (ye && G.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
5916
5916
|
Event: ${kt(s)}`), !0) : function(c, d) {
|
|
5917
5917
|
if (!d || !d.length) return !1;
|
|
5918
5918
|
const u = Fr(c);
|
|
5919
5919
|
return !!u && Rr(u, d);
|
|
5920
|
-
}(s, a.denyUrls) ? (
|
|
5920
|
+
}(s, a.denyUrls) ? (ye && G.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
5921
5921
|
Event: ${kt(s)}.
|
|
5922
5922
|
Url: ${Fr(s)}`), !0) : function(c, d) {
|
|
5923
5923
|
if (!d || !d.length) return !0;
|
|
5924
5924
|
const u = Fr(c);
|
|
5925
5925
|
return !u || Rr(u, d);
|
|
5926
|
-
}(s, a.allowUrls) ? !1 : (
|
|
5926
|
+
}(s, a.allowUrls) ? !1 : (ye && G.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
5927
5927
|
Event: ${kt(s)}.
|
|
5928
5928
|
Url: ${Fr(s)}`), !0);
|
|
5929
5929
|
}(e, o) ? null : e;
|
|
@@ -5943,7 +5943,7 @@ function Fr(n) {
|
|
|
5943
5943
|
return null;
|
|
5944
5944
|
}(e) : null;
|
|
5945
5945
|
} catch {
|
|
5946
|
-
return
|
|
5946
|
+
return ye && G.error(`Cannot extract url for event ${kt(n)}`), null;
|
|
5947
5947
|
}
|
|
5948
5948
|
}
|
|
5949
5949
|
function ql(n, e, t = 250, r, i, o, s) {
|
|
@@ -5982,12 +5982,12 @@ function En(n) {
|
|
|
5982
5982
|
return { host: e[4], path: e[5], protocol: e[2], search: t, hash: r, relative: e[5] + t + r };
|
|
5983
5983
|
}
|
|
5984
5984
|
function Vl() {
|
|
5985
|
-
"console" in
|
|
5986
|
-
n in
|
|
5985
|
+
"console" in de && Kn.forEach(function(n) {
|
|
5986
|
+
n in de.console && Fe(de.console, n, function(e) {
|
|
5987
5987
|
return on[n] = e, function(...t) {
|
|
5988
|
-
|
|
5988
|
+
et("console", { args: t, level: n });
|
|
5989
5989
|
const r = on[n];
|
|
5990
|
-
r && r.apply(
|
|
5990
|
+
r && r.apply(de.console, t);
|
|
5991
5991
|
};
|
|
5992
5992
|
});
|
|
5993
5993
|
});
|
|
@@ -6008,7 +6008,7 @@ const Wl = () => {
|
|
|
6008
6008
|
const s = jo(o), a = jo(i);
|
|
6009
6009
|
return !(!s || !a || s.type !== a.type || s.value !== a.value || !$o(i, o) || !Fo(i, o));
|
|
6010
6010
|
}(t, r)) : !1;
|
|
6011
|
-
}(e, n)) return
|
|
6011
|
+
}(e, n)) return ye && G.warn("Event dropped due to being a duplicate of previously captured event."), null;
|
|
6012
6012
|
} catch {
|
|
6013
6013
|
}
|
|
6014
6014
|
return n = e;
|
|
@@ -6040,7 +6040,7 @@ function jo(n) {
|
|
|
6040
6040
|
function Uo(n) {
|
|
6041
6041
|
return n === void 0 ? void 0 : n >= 400 && n < 500 ? "warning" : n >= 500 ? "error" : void 0;
|
|
6042
6042
|
}
|
|
6043
|
-
const Tn =
|
|
6043
|
+
const Tn = de;
|
|
6044
6044
|
function ri(n) {
|
|
6045
6045
|
return n && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(n.toString());
|
|
6046
6046
|
}
|
|
@@ -6068,7 +6068,7 @@ function Jl() {
|
|
|
6068
6068
|
function Gl(n, e) {
|
|
6069
6069
|
const t = "fetch";
|
|
6070
6070
|
Nt(t, n), Bt(t, () => function(r, i = !1) {
|
|
6071
|
-
i && !Jl() || Fe(
|
|
6071
|
+
i && !Jl() || Fe(de, "fetch", function(o) {
|
|
6072
6072
|
return function(...s) {
|
|
6073
6073
|
const a = new Error(), { method: c, url: d } = function(h) {
|
|
6074
6074
|
if (h.length === 0) return { method: "GET", url: "" };
|
|
@@ -6079,8 +6079,8 @@ function Gl(n, e) {
|
|
|
6079
6079
|
const f = h[0];
|
|
6080
6080
|
return { url: Ho(f), method: ni(f, "method") ? String(f.method).toUpperCase() : "GET" };
|
|
6081
6081
|
}(s), u = { args: s, fetchData: { method: c, url: d }, startTimestamp: 1e3 * ft(), virtualError: a };
|
|
6082
|
-
return r ||
|
|
6083
|
-
throw
|
|
6082
|
+
return r || et("fetch", { ...u }), o.apply(de, s).then(async (h) => (r ? r(h) : et("fetch", { ...u, endTimestamp: 1e3 * ft(), response: h }), h), (h) => {
|
|
6083
|
+
throw et("fetch", { ...u, endTimestamp: 1e3 * ft(), error: h }), _i(h) && h.stack === void 0 && (h.stack = a.stack, $t(h, "framesToPop", 1)), h;
|
|
6084
6084
|
});
|
|
6085
6085
|
};
|
|
6086
6086
|
});
|
|
@@ -6092,7 +6092,7 @@ function ni(n, e) {
|
|
|
6092
6092
|
function Ho(n) {
|
|
6093
6093
|
return typeof n == "string" ? n : n ? ni(n, "url") ? n.url : n.toString ? n.toString() : "" : "";
|
|
6094
6094
|
}
|
|
6095
|
-
const $r =
|
|
6095
|
+
const $r = de, _e = de;
|
|
6096
6096
|
let ii = 0;
|
|
6097
6097
|
function zo() {
|
|
6098
6098
|
return ii > 0;
|
|
@@ -6145,7 +6145,7 @@ function Li(n, e) {
|
|
|
6145
6145
|
return t.length && (r.stacktrace = { frames: t }), r.type === void 0 && r.value === "" && (r.value = "Unrecoverable error caught"), r;
|
|
6146
6146
|
}
|
|
6147
6147
|
function Yl(n, e, t, r) {
|
|
6148
|
-
const i =
|
|
6148
|
+
const i = Me(), o = i && i.getOptions().normalizeDepth, s = function(d) {
|
|
6149
6149
|
for (const u in d) if (Object.prototype.hasOwnProperty.call(d, u)) {
|
|
6150
6150
|
const h = d[u];
|
|
6151
6151
|
if (h instanceof Error) return h;
|
|
@@ -6240,8 +6240,8 @@ class td extends Nl {
|
|
|
6240
6240
|
(function(r, i, o = [i], s = "npm") {
|
|
6241
6241
|
const a = r._metadata || {};
|
|
6242
6242
|
a.sdk || (a.sdk = { name: `sentry.javascript.${i}`, packages: o.map((c) => ({ name: `${s}:@sentry/${c}`, version: Rt })), version: Rt }), r._metadata = a;
|
|
6243
|
-
})(t, "browser", ["browser"],
|
|
6244
|
-
|
|
6243
|
+
})(t, "browser", ["browser"], _e.SENTRY_SDK_SOURCE || "npm"), super(t), t.sendClientReports && _e.document && _e.document.addEventListener("visibilitychange", () => {
|
|
6244
|
+
_e.document.visibilityState === "hidden" && this._flushOutcomes();
|
|
6245
6245
|
});
|
|
6246
6246
|
}
|
|
6247
6247
|
eventFromException(e, t) {
|
|
@@ -6270,11 +6270,11 @@ class td extends Nl {
|
|
|
6270
6270
|
return e.platform = e.platform || "javascript", super._prepareEvent(e, t, r);
|
|
6271
6271
|
}
|
|
6272
6272
|
}
|
|
6273
|
-
const rd = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Pe =
|
|
6273
|
+
const rd = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Pe = de;
|
|
6274
6274
|
let qo, An, On, jr;
|
|
6275
6275
|
function nd() {
|
|
6276
6276
|
if (!Pe.document) return;
|
|
6277
|
-
const n =
|
|
6277
|
+
const n = et.bind(null, "dom"), e = Vo(n, !0);
|
|
6278
6278
|
Pe.document.addEventListener("click", e, !1), Pe.document.addEventListener("keypress", e, !1), ["EventTarget", "Node"].forEach((t) => {
|
|
6279
6279
|
const r = Pe[t], i = r && r.prototype;
|
|
6280
6280
|
i && i.hasOwnProperty && i.hasOwnProperty("addEventListener") && (Fe(i, "addEventListener", function(o) {
|
|
@@ -6315,7 +6315,7 @@ function Vo(n, e = !1) {
|
|
|
6315
6315
|
if (function(o, s) {
|
|
6316
6316
|
return o === "keypress" && (!s || !s.tagName || s.tagName !== "INPUT" && s.tagName !== "TEXTAREA" && !s.isContentEditable);
|
|
6317
6317
|
}(t.type, r)) return;
|
|
6318
|
-
$t(t, "_sentryCaptured", !0), r && !r._sentryId && $t(r, "_sentryId",
|
|
6318
|
+
$t(t, "_sentryCaptured", !0), r && !r._sentryId && $t(r, "_sentryId", Ke());
|
|
6319
6319
|
const i = t.type === "keypress" ? "input" : t.type;
|
|
6320
6320
|
(function(o) {
|
|
6321
6321
|
if (o.type !== An) return !1;
|
|
@@ -6344,14 +6344,14 @@ function id() {
|
|
|
6344
6344
|
const i = r.length > 2 ? r[2] : void 0;
|
|
6345
6345
|
if (i) {
|
|
6346
6346
|
const o = jr, s = String(i);
|
|
6347
|
-
jr = s,
|
|
6347
|
+
jr = s, et("history", { from: o, to: s });
|
|
6348
6348
|
}
|
|
6349
6349
|
return t.apply(this, r);
|
|
6350
6350
|
};
|
|
6351
6351
|
}
|
|
6352
6352
|
Pe.onpopstate = function(...t) {
|
|
6353
6353
|
const r = Pe.location.href, i = jr;
|
|
6354
|
-
if (jr = r,
|
|
6354
|
+
if (jr = r, et("history", { from: i, to: r }), n) try {
|
|
6355
6355
|
return n.apply(this, t);
|
|
6356
6356
|
} catch {
|
|
6357
6357
|
}
|
|
@@ -6382,7 +6382,7 @@ function od() {
|
|
|
6382
6382
|
d.status_code = t.status;
|
|
6383
6383
|
} catch {
|
|
6384
6384
|
}
|
|
6385
|
-
|
|
6385
|
+
et("xhr", { endTimestamp: 1e3 * ft(), startTimestamp: o, xhr: t, virtualError: i });
|
|
6386
6386
|
}
|
|
6387
6387
|
};
|
|
6388
6388
|
return "onreadystatechange" in t && typeof t.onreadystatechange == "function" ? t.onreadystatechange = new Proxy(t.onreadystatechange, { apply: (d, u, h) => (c(), d.apply(u, h)) }) : t.addEventListener("readystatechange", c), t.setRequestHeader = new Proxy(t.setRequestHeader, { apply(d, u, h) {
|
|
@@ -6391,7 +6391,7 @@ function od() {
|
|
|
6391
6391
|
} }), e.apply(t, r);
|
|
6392
6392
|
} }), n.send = new Proxy(n.send, { apply(e, t, r) {
|
|
6393
6393
|
const i = t[br];
|
|
6394
|
-
return i ? (r[0] !== void 0 && (i.body = r[0]),
|
|
6394
|
+
return i ? (r[0] !== void 0 && (i.body = r[0]), et("xhr", { startTimestamp: 1e3 * ft(), xhr: t }), e.apply(t, r)) : e.apply(t, r);
|
|
6395
6395
|
} });
|
|
6396
6396
|
}
|
|
6397
6397
|
function sd(n, e = function(t) {
|
|
@@ -6490,7 +6490,7 @@ const ad = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, cd = /^\s*at (?:(.+?\)(?: \
|
|
|
6490
6490
|
Nt(o, i), Bt(o, Vl);
|
|
6491
6491
|
}(/* @__PURE__ */ function(i) {
|
|
6492
6492
|
return function(o) {
|
|
6493
|
-
if (
|
|
6493
|
+
if (Me() !== i) return;
|
|
6494
6494
|
const s = { category: "console", data: { arguments: o.args, logger: "console" }, level: Kl(o.level), message: so(o.args, " ") };
|
|
6495
6495
|
if (o.level === "assert") {
|
|
6496
6496
|
if (o.args[0] !== !1) return;
|
|
@@ -6500,7 +6500,7 @@ const ad = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, cd = /^\s*at (?:(.+?\)(?: \
|
|
|
6500
6500
|
};
|
|
6501
6501
|
}(t)), e.dom && (r = /* @__PURE__ */ function(i, o) {
|
|
6502
6502
|
return function(s) {
|
|
6503
|
-
if (
|
|
6503
|
+
if (Me() !== i) return;
|
|
6504
6504
|
let a, c, d = typeof o == "object" ? o.serializeAttribute : void 0, u = typeof o == "object" && typeof o.maxStringLength == "number" ? o.maxStringLength : void 0;
|
|
6505
6505
|
u && u > Jo && (Sn && G.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${u} was configured. Sentry will use 1024 instead.`), u = Jo), typeof d == "string" && (d = [d]);
|
|
6506
6506
|
try {
|
|
@@ -6531,7 +6531,7 @@ const ad = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, cd = /^\s*at (?:(.+?\)(?: \
|
|
|
6531
6531
|
Nt("xhr", i), Bt("xhr", od);
|
|
6532
6532
|
}(/* @__PURE__ */ function(i) {
|
|
6533
6533
|
return function(o) {
|
|
6534
|
-
if (
|
|
6534
|
+
if (Me() !== i) return;
|
|
6535
6535
|
const { startTimestamp: s, endTimestamp: a } = o, c = o.xhr[br];
|
|
6536
6536
|
if (!s || !a || !c) return;
|
|
6537
6537
|
const { method: d, url: u, status_code: h, body: f } = c, b = { method: d, url: u, status_code: h }, y = { xhr: o.xhr, input: f, startTimestamp: s, endTimestamp: a };
|
|
@@ -6539,7 +6539,7 @@ const ad = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, cd = /^\s*at (?:(.+?\)(?: \
|
|
|
6539
6539
|
};
|
|
6540
6540
|
}(t)), e.fetch && Gl(/* @__PURE__ */ function(i) {
|
|
6541
6541
|
return function(o) {
|
|
6542
|
-
if (
|
|
6542
|
+
if (Me() !== i) return;
|
|
6543
6543
|
const { startTimestamp: s, endTimestamp: a } = o;
|
|
6544
6544
|
if (a && (!o.fetchData.url.match(/sentry_key/) || o.fetchData.method !== "POST")) if (o.error)
|
|
6545
6545
|
Mt({ category: "fetch", data: o.fetchData, level: "error", type: "http" }, { data: o.error, input: o.args, startTimestamp: s, endTimestamp: a });
|
|
@@ -6550,23 +6550,23 @@ const ad = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, cd = /^\s*at (?:(.+?\)(?: \
|
|
|
6550
6550
|
};
|
|
6551
6551
|
}(t)), e.history && Ha(/* @__PURE__ */ function(i) {
|
|
6552
6552
|
return function(o) {
|
|
6553
|
-
if (
|
|
6553
|
+
if (Me() !== i) return;
|
|
6554
6554
|
let s = o.from, a = o.to;
|
|
6555
|
-
const c = En(
|
|
6555
|
+
const c = En(_e.location.href);
|
|
6556
6556
|
let d = s ? En(s) : void 0;
|
|
6557
6557
|
const u = En(a);
|
|
6558
6558
|
d && d.path || (d = c), c.protocol === u.protocol && c.host === u.host && (a = u.relative), c.protocol === d.protocol && c.host === d.host && (s = d.relative), Mt({ category: "navigation", data: { from: s, to: a } });
|
|
6559
6559
|
};
|
|
6560
6560
|
}(t)), e.sentry && t.on("beforeSendEvent", /* @__PURE__ */ function(i) {
|
|
6561
6561
|
return function(o) {
|
|
6562
|
-
|
|
6562
|
+
Me() === i && Mt({ category: "sentry." + (o.type === "transaction" ? "transaction" : "event"), event_id: o.event_id, level: o.level, message: kt(o) }, { event: o });
|
|
6563
6563
|
};
|
|
6564
6564
|
}(t));
|
|
6565
6565
|
} };
|
|
6566
6566
|
}, gd = ["EventTarget", "Window", "Node", "ApplicationCache", "AudioTrackList", "BroadcastChannel", "ChannelMergerNode", "CryptoOperation", "EventSource", "FileReader", "HTMLUnknownElement", "IDBDatabase", "IDBRequest", "IDBTransaction", "KeyOperation", "MediaController", "MessagePort", "ModalWindow", "Notification", "SVGElementInstance", "Screen", "SharedWorker", "TextTrack", "TextTrackCue", "TextTrackList", "WebSocket", "WebSocketWorker", "Worker", "XMLHttpRequest", "XMLHttpRequestEventTarget", "XMLHttpRequestUpload"], fd = (n = {}) => {
|
|
6567
6567
|
const e = { XMLHttpRequest: !0, eventTarget: !0, requestAnimationFrame: !0, setInterval: !0, setTimeout: !0, ...n };
|
|
6568
6568
|
return { name: "BrowserApiErrors", setupOnce() {
|
|
6569
|
-
e.setTimeout && Fe(
|
|
6569
|
+
e.setTimeout && Fe(_e, "setTimeout", Go), e.setInterval && Fe(_e, "setInterval", Go), e.requestAnimationFrame && Fe(_e, "requestAnimationFrame", md), e.XMLHttpRequest && "XMLHttpRequest" in _e && Fe(XMLHttpRequest.prototype, "send", bd);
|
|
6570
6570
|
const t = e.eventTarget;
|
|
6571
6571
|
t && (Array.isArray(t) ? t : gd).forEach(yd);
|
|
6572
6572
|
} };
|
|
@@ -6594,7 +6594,7 @@ function bd(n) {
|
|
|
6594
6594
|
};
|
|
6595
6595
|
}
|
|
6596
6596
|
function yd(n) {
|
|
6597
|
-
const e =
|
|
6597
|
+
const e = _e[n], t = e && e.prototype;
|
|
6598
6598
|
t && t.hasOwnProperty && t.hasOwnProperty("addEventListener") && (Fe(t, "addEventListener", function(r) {
|
|
6599
6599
|
return function(i, o, s) {
|
|
6600
6600
|
try {
|
|
@@ -6615,7 +6615,7 @@ function yd(n) {
|
|
|
6615
6615
|
}));
|
|
6616
6616
|
}
|
|
6617
6617
|
const vd = () => ({ name: "BrowserSession", setupOnce() {
|
|
6618
|
-
|
|
6618
|
+
_e.document !== void 0 ? (Co({ ignoreDuration: !0 }), Eo(), Ha(({ from: n, to: e }) => {
|
|
6619
6619
|
n !== void 0 && n !== e && (Co({ ignoreDuration: !0 }), Eo());
|
|
6620
6620
|
})) : Sn && G.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");
|
|
6621
6621
|
} }), wd = (n = {}) => {
|
|
@@ -6629,16 +6629,16 @@ const vd = () => ({ name: "BrowserSession", setupOnce() {
|
|
|
6629
6629
|
Nt(o, i), Bt(o, dl);
|
|
6630
6630
|
})((i) => {
|
|
6631
6631
|
const { stackParser: o, attachStacktrace: s } = Xo();
|
|
6632
|
-
if (
|
|
6632
|
+
if (Me() !== r || zo()) return;
|
|
6633
6633
|
const { msg: a, url: c, line: d, column: u, error: h } = i, f = function(b, y, m, v) {
|
|
6634
|
-
const w = b.exception = b.exception || {}, x = w.values = w.values || [], E = x[0] = x[0] || {}, L = E.stacktrace = E.stacktrace || {},
|
|
6634
|
+
const w = b.exception = b.exception || {}, x = w.values = w.values || [], E = x[0] = x[0] || {}, L = E.stacktrace = E.stacktrace || {}, P = L.frames = L.frames || [], N = v, B = m, ae = pt(y) && y.length > 0 ? y : function() {
|
|
6635
6635
|
try {
|
|
6636
6636
|
return Ei.document.location.href;
|
|
6637
6637
|
} catch {
|
|
6638
6638
|
return "";
|
|
6639
6639
|
}
|
|
6640
6640
|
}();
|
|
6641
|
-
return
|
|
6641
|
+
return P.length === 0 && P.push({ colno: N, filename: ae, function: It, in_app: !0, lineno: B }), b;
|
|
6642
6642
|
}(oi(o, h || a, void 0, s, !1), c, d, u);
|
|
6643
6643
|
f.level = "error", _o(f, { originalException: h, mechanism: { handled: !1, type: "onerror" } });
|
|
6644
6644
|
});
|
|
@@ -6648,7 +6648,7 @@ const vd = () => ({ name: "BrowserSession", setupOnce() {
|
|
|
6648
6648
|
Nt(o, i), Bt(o, ul);
|
|
6649
6649
|
})((i) => {
|
|
6650
6650
|
const { stackParser: o, attachStacktrace: s } = Xo();
|
|
6651
|
-
if (
|
|
6651
|
+
if (Me() !== r || zo()) return;
|
|
6652
6652
|
const a = function(d) {
|
|
6653
6653
|
if (Wn(d)) return d;
|
|
6654
6654
|
try {
|
|
@@ -6667,12 +6667,12 @@ function Yo(n) {
|
|
|
6667
6667
|
Sn && G.log(`Global Handler attached: ${n}`);
|
|
6668
6668
|
}
|
|
6669
6669
|
function Xo() {
|
|
6670
|
-
const n =
|
|
6670
|
+
const n = Me();
|
|
6671
6671
|
return n && n.getOptions() || { stackParser: () => [], attachStacktrace: !1 };
|
|
6672
6672
|
}
|
|
6673
6673
|
const Sd = () => ({ name: "HttpContext", preprocessEvent(n) {
|
|
6674
|
-
if (!
|
|
6675
|
-
const e = n.request && n.request.url ||
|
|
6674
|
+
if (!_e.navigator && !_e.location && !_e.document) return;
|
|
6675
|
+
const e = n.request && n.request.url || _e.location && _e.location.href, { referrer: t } = _e.document || {}, { userAgent: r } = _e.navigator || {}, i = { ...n.request && n.request.headers, ...t && { Referer: t }, ...r && { "User-Agent": r } }, o = { ...n.request, ...e && { url: e }, headers: i };
|
|
6676
6676
|
n.request = o;
|
|
6677
6677
|
} }), kd = (n = {}) => {
|
|
6678
6678
|
const e = n.limit || 5, t = n.key || "cause";
|
|
@@ -6682,10 +6682,10 @@ const Sd = () => ({ name: "HttpContext", preprocessEvent(n) {
|
|
|
6682
6682
|
} };
|
|
6683
6683
|
};
|
|
6684
6684
|
var Qo = "new", Zo = "loading", es = "loaded", ai = "joining-meeting", Pt = "joined-meeting", bt = "left-meeting", yt = "error", xd = "playable", Ln = "unknown", _d = "full", Cd = "base", ts = "no-room", Ed = "end-of-life", Td = "connection-error", Md = "iframe-ready-for-launch-config", Ad = "iframe-launch-config", Od = "theme-updated", Dd = "loading", Ld = "load-attempt-failed", rs = "loaded", Pd = "started-camera", Id = "camera-error", Rd = "joining-meeting", Nd = "joined-meeting", Bd = "left-meeting", Fd = "participant-joined", $d = "participant-updated", jd = "participant-left", Ud = "participant-counts-updated", Hd = "access-state-updated", zd = "meeting-session-summary-updated", qd = "meeting-session-state-updated", Vd = "waiting-participant-added", Kd = "waiting-participant-updated", Wd = "waiting-participant-removed", Jd = "track-started", Gd = "track-stopped", Yd = "transcription-started", Xd = "transcription-stopped", Qd = "transcription-error", ns = "recording-started", is = "recording-stopped", Zd = "recording-stats", eu = "recording-error", tu = "recording-upload-completed", ru = "recording-data", nu = "app-message", iu = "transcription-message", ou = "remote-media-player-started", su = "remote-media-player-updated", au = "remote-media-player-stopped", cu = "local-screen-share-started", lu = "local-screen-share-stopped", du = "local-screen-share-canceled", uu = "active-speaker-change", hu = "active-speaker-mode-change", pu = "network-quality-change", gu = "network-connection", fu = "cpu-load-change", mu = "face-counts-updated", Ur = "fullscreen", Hr = "exited-fullscreen", bu = "live-streaming-started", yu = "live-streaming-updated", vu = "live-streaming-stopped", wu = "live-streaming-error", Su = "lang-updated", ku = "receive-settings-updated", os = "input-settings-updated", ss = "nonfatal-error", as = "error", Pn = 4096, cs = 102400, In = "iframe-call-message", ls = "local-screen-start", ds = "daily-method-update-live-streaming-endpoints", zr = "transmit-log", gt = "daily-custom-track", Xr = { NONE: "none", BGBLUR: "background-blur", BGIMAGE: "background-image", FACE_DETECTION: "face-detection" }, za = { NONE: "none", NOISE_CANCELLATION: "noise-cancellation" }, ci = { PLAY: "play", PAUSE: "pause" }, Rn = ["jpg", "png", "jpeg"], xu = "add-endpoints", _u = "remove-endpoints", us = "sip-call-transfer";
|
|
6685
|
-
function
|
|
6686
|
-
return !
|
|
6685
|
+
function We() {
|
|
6686
|
+
return !se() && typeof window < "u" && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : "";
|
|
6687
6687
|
}
|
|
6688
|
-
function
|
|
6688
|
+
function se() {
|
|
6689
6689
|
return typeof navigator < "u" && navigator.product && navigator.product === "ReactNative";
|
|
6690
6690
|
}
|
|
6691
6691
|
function qa() {
|
|
@@ -6703,10 +6703,10 @@ function Cu() {
|
|
|
6703
6703
|
return e.major >= 67;
|
|
6704
6704
|
}
|
|
6705
6705
|
return !0;
|
|
6706
|
-
}(Ut(), cn()) ||
|
|
6706
|
+
}(Ut(), cn()) || se());
|
|
6707
6707
|
}
|
|
6708
6708
|
function hs() {
|
|
6709
|
-
if (
|
|
6709
|
+
if (se() || !document) return !1;
|
|
6710
6710
|
var n = document.createElement("iframe");
|
|
6711
6711
|
return !!n.requestFullscreen || !!n.webkitRequestFullscreen;
|
|
6712
6712
|
}
|
|
@@ -6722,7 +6722,7 @@ var li = "none", Eu = "software", Tu = "hardware", Mu = function() {
|
|
|
6722
6722
|
}();
|
|
6723
6723
|
function Va() {
|
|
6724
6724
|
var n = arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
|
|
6725
|
-
return !
|
|
6725
|
+
return !se() && Mu !== li && (n ? function() {
|
|
6726
6726
|
return ps() ? !1 : ["Chrome", "Firefox"].includes(Ut());
|
|
6727
6727
|
}() : function() {
|
|
6728
6728
|
if (ps()) return !1;
|
|
@@ -6735,7 +6735,7 @@ function Va() {
|
|
|
6735
6735
|
}());
|
|
6736
6736
|
}
|
|
6737
6737
|
function Ka() {
|
|
6738
|
-
if (
|
|
6738
|
+
if (se() || Wa() || typeof AudioWorkletNode > "u") return !1;
|
|
6739
6739
|
switch (Ut()) {
|
|
6740
6740
|
case "Chrome":
|
|
6741
6741
|
case "Firefox":
|
|
@@ -6749,7 +6749,7 @@ function Ka() {
|
|
|
6749
6749
|
function Nn() {
|
|
6750
6750
|
return qa() && typeof MediaStreamTrack < "u" && !function() {
|
|
6751
6751
|
var n, e = Ut();
|
|
6752
|
-
if (!
|
|
6752
|
+
if (!We()) return !0;
|
|
6753
6753
|
switch (e) {
|
|
6754
6754
|
case "Chrome":
|
|
6755
6755
|
return (n = Ii()).major && n.major > 0 && n.major < 75;
|
|
@@ -6763,15 +6763,15 @@ function Nn() {
|
|
|
6763
6763
|
}();
|
|
6764
6764
|
}
|
|
6765
6765
|
function Wa() {
|
|
6766
|
-
return
|
|
6766
|
+
return We().match(/Linux; Android/);
|
|
6767
6767
|
}
|
|
6768
6768
|
function ps() {
|
|
6769
|
-
var n, e =
|
|
6770
|
-
return !!(e.match(/Mobi/) || e.match(/Android/) || t) || !!
|
|
6769
|
+
var n, e = We(), t = e.match(/Mac/) && (!se() && typeof window < "u" && (n = window) !== null && n !== void 0 && (n = n.navigator) !== null && n !== void 0 && n.maxTouchPoints ? window.navigator.maxTouchPoints : 0) >= 5;
|
|
6770
|
+
return !!(e.match(/Mobi/) || e.match(/Android/) || t) || !!We().match(/DailyAnd\//) || void 0;
|
|
6771
6771
|
}
|
|
6772
6772
|
function Ut() {
|
|
6773
6773
|
if (typeof window < "u") {
|
|
6774
|
-
var n =
|
|
6774
|
+
var n = We();
|
|
6775
6775
|
return Ja() ? "Safari" : n.indexOf("Edge") > -1 ? "Edge" : n.match(/Chrome\//) ? "Chrome" : n.indexOf("Safari") > -1 || Ga() ? "Safari" : n.indexOf("Firefox") > -1 ? "Firefox" : n.indexOf("MSIE") > -1 || n.indexOf(".NET") > -1 ? "IE" : "Unknown Browser";
|
|
6776
6776
|
}
|
|
6777
6777
|
}
|
|
@@ -6787,7 +6787,7 @@ function cn() {
|
|
|
6787
6787
|
return function() {
|
|
6788
6788
|
var n = 0, e = 0;
|
|
6789
6789
|
if (typeof window < "u") {
|
|
6790
|
-
var t =
|
|
6790
|
+
var t = We().match(/Edge\/(\d+).(\d+)/);
|
|
6791
6791
|
if (t) try {
|
|
6792
6792
|
n = parseInt(t[1]), e = parseInt(t[2]);
|
|
6793
6793
|
} catch {
|
|
@@ -6800,7 +6800,7 @@ function cn() {
|
|
|
6800
6800
|
function Ii() {
|
|
6801
6801
|
var n = 0, e = 0, t = 0, r = 0, i = !1;
|
|
6802
6802
|
if (typeof window < "u") {
|
|
6803
|
-
var o =
|
|
6803
|
+
var o = We(), s = o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);
|
|
6804
6804
|
if (s) try {
|
|
6805
6805
|
n = parseInt(s[1]), e = parseInt(s[2]), t = parseInt(s[3]), r = parseInt(s[4]), i = o.indexOf("OPR/") > -1;
|
|
6806
6806
|
} catch {
|
|
@@ -6809,15 +6809,15 @@ function Ii() {
|
|
|
6809
6809
|
return { major: n, minor: e, build: t, patch: r, opera: i };
|
|
6810
6810
|
}
|
|
6811
6811
|
function Ja() {
|
|
6812
|
-
return !!
|
|
6812
|
+
return !!We().match(/iPad|iPhone|iPod/i) && qa();
|
|
6813
6813
|
}
|
|
6814
6814
|
function Ga() {
|
|
6815
|
-
return
|
|
6815
|
+
return We().indexOf("AppleWebKit/605.1.15") > -1;
|
|
6816
6816
|
}
|
|
6817
6817
|
function Ri() {
|
|
6818
6818
|
var n = 0, e = 0, t = 0;
|
|
6819
6819
|
if (typeof window < "u") {
|
|
6820
|
-
var r =
|
|
6820
|
+
var r = We().match(/Version\/(\d+).(\d+)(.(\d+))?/);
|
|
6821
6821
|
if (r) try {
|
|
6822
6822
|
n = parseInt(r[1]), e = parseInt(r[2]), t = parseInt(r[4]);
|
|
6823
6823
|
} catch {
|
|
@@ -6829,7 +6829,7 @@ function Ri() {
|
|
|
6829
6829
|
function Ni() {
|
|
6830
6830
|
var n = 0, e = 0;
|
|
6831
6831
|
if (typeof window < "u") {
|
|
6832
|
-
var t =
|
|
6832
|
+
var t = We().match(/Firefox\/(\d+).(\d+)/);
|
|
6833
6833
|
if (t) try {
|
|
6834
6834
|
n = parseInt(t[1]), e = parseInt(t[2]);
|
|
6835
6835
|
} catch {
|
|
@@ -7023,7 +7023,7 @@ var Ou = function() {
|
|
|
7023
7023
|
if (!ms.includes(e)) throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(ms, "]"));
|
|
7024
7024
|
} }, { key: "_validateData", value: function(e, t) {
|
|
7025
7025
|
if (!function(a) {
|
|
7026
|
-
if (a == null ||
|
|
7026
|
+
if (a == null || ce(a) !== "object") return !1;
|
|
7027
7027
|
var c = Object.getPrototypeOf(a);
|
|
7028
7028
|
return c == null || c === Object.prototype;
|
|
7029
7029
|
}(e)) throw Error("Meeting session data must be a plain (map-like) object");
|
|
@@ -7143,7 +7143,7 @@ var Lu = function() {
|
|
|
7143
7143
|
return fn(n, hi(Error)), je(n);
|
|
7144
7144
|
}(), ln = 2e4, ys = function() {
|
|
7145
7145
|
return je(function e(t, r, i) {
|
|
7146
|
-
$e(this, e), this._loadAttemptImpl =
|
|
7146
|
+
$e(this, e), this._loadAttemptImpl = se() || !t.avoidEval ? new Iu(t, r, i) : new Ru(t, r, i);
|
|
7147
7147
|
}, [{ key: "start", value: (n = J(function* () {
|
|
7148
7148
|
return this._loadAttemptImpl.start();
|
|
7149
7149
|
}), function() {
|
|
@@ -7207,7 +7207,7 @@ var Lu = function() {
|
|
|
7207
7207
|
}, [{ key: "start", value: function() {
|
|
7208
7208
|
window._dailyCallMachineLoadWaitlist || (window._dailyCallMachineLoadWaitlist = /* @__PURE__ */ new Set());
|
|
7209
7209
|
var n = tn(this._dailyConfig);
|
|
7210
|
-
(typeof document > "u" ? "undefined" :
|
|
7210
|
+
(typeof document > "u" ? "undefined" : ce(document)) === "object" ? this._startLoading(n) : this._failureCallback({ msg: "Call object bundle must be loaded in a DOM/web context", type: "missing context" });
|
|
7211
7211
|
} }, { key: "cancel", value: function() {
|
|
7212
7212
|
this._stopLoading(), this.cancelled = !0;
|
|
7213
7213
|
} }, { key: "_startLoading", value: function(n) {
|
|
@@ -7473,7 +7473,7 @@ function qu(n) {
|
|
|
7473
7473
|
}
|
|
7474
7474
|
function tc() {
|
|
7475
7475
|
var n;
|
|
7476
|
-
return
|
|
7476
|
+
return se() || ((n = navigator.mediaDevices) === null || n === void 0 ? void 0 : n.ondevicechange) !== void 0;
|
|
7477
7477
|
}
|
|
7478
7478
|
var Vu = /* @__PURE__ */ new Set();
|
|
7479
7479
|
function Ku(n, e) {
|
|
@@ -7521,24 +7521,24 @@ var rc = function() {
|
|
|
7521
7521
|
}
|
|
7522
7522
|
return je(n, [{ key: "clone", value: function() {
|
|
7523
7523
|
var e = new n();
|
|
7524
|
-
if (this.base instanceof
|
|
7524
|
+
if (this.base instanceof Ce ? e.base = this.base.clone() : e.base = this.base, this.byUserId !== void 0) for (var t in e.byUserId = {}, this.byUserId) {
|
|
7525
7525
|
var r = this.byUserId[t];
|
|
7526
|
-
e.byUserId[t] = r instanceof
|
|
7526
|
+
e.byUserId[t] = r instanceof Ce ? r.clone() : r;
|
|
7527
7527
|
}
|
|
7528
7528
|
if (this.byParticipantId !== void 0) for (var i in e.byParticipantId = {}, this.byParticipantId) {
|
|
7529
7529
|
var o = this.byParticipantId[i];
|
|
7530
|
-
e.byParticipantId[i] = o instanceof
|
|
7530
|
+
e.byParticipantId[i] = o instanceof Ce ? o.clone() : o;
|
|
7531
7531
|
}
|
|
7532
7532
|
return e;
|
|
7533
7533
|
} }, { key: "toJSONObject", value: function() {
|
|
7534
7534
|
var e = {};
|
|
7535
|
-
if (typeof this.base == "boolean" ? e.base = this.base : this.base instanceof
|
|
7535
|
+
if (typeof this.base == "boolean" ? e.base = this.base : this.base instanceof Ce && (e.base = this.base.toJSONObject()), this.byUserId !== void 0) for (var t in e.byUserId = {}, this.byUserId) {
|
|
7536
7536
|
var r = this.byUserId[t];
|
|
7537
|
-
e.byUserId[t] = r instanceof
|
|
7537
|
+
e.byUserId[t] = r instanceof Ce ? r.toJSONObject() : r;
|
|
7538
7538
|
}
|
|
7539
7539
|
if (this.byParticipantId !== void 0) for (var i in e.byParticipantId = {}, this.byParticipantId) {
|
|
7540
7540
|
var o = this.byParticipantId[i];
|
|
7541
|
-
e.byParticipantId[i] = o instanceof
|
|
7541
|
+
e.byParticipantId[i] = o instanceof Ce ? o.toJSONObject() : o;
|
|
7542
7542
|
}
|
|
7543
7543
|
return e;
|
|
7544
7544
|
} }, { key: "toMinifiedJSONObject", value: function() {
|
|
@@ -7553,54 +7553,54 @@ var rc = function() {
|
|
|
7553
7553
|
}
|
|
7554
7554
|
return e;
|
|
7555
7555
|
} }, { key: "normalize", value: function() {
|
|
7556
|
-
return this.base instanceof
|
|
7557
|
-
var t =
|
|
7558
|
-
return [r, i instanceof
|
|
7556
|
+
return this.base instanceof Ce && (this.base = this.base.normalize()), this.byUserId && (this.byUserId = Object.fromEntries(Object.entries(this.byUserId).map(function(e) {
|
|
7557
|
+
var t = Ae(e, 2), r = t[0], i = t[1];
|
|
7558
|
+
return [r, i instanceof Ce ? i.normalize() : i];
|
|
7559
7559
|
}))), this.byParticipantId && (this.byParticipantId = Object.fromEntries(Object.entries(this.byParticipantId).map(function(e) {
|
|
7560
|
-
var t =
|
|
7561
|
-
return [r, i instanceof
|
|
7560
|
+
var t = Ae(e, 2), r = t[0], i = t[1];
|
|
7561
|
+
return [r, i instanceof Ce ? i.normalize() : i];
|
|
7562
7562
|
}))), this;
|
|
7563
7563
|
} }], [{ key: "fromJSONObject", value: function(e) {
|
|
7564
7564
|
var t, r, i;
|
|
7565
|
-
if (e.base !== void 0 && (t = typeof e.base == "boolean" ? e.base :
|
|
7565
|
+
if (e.base !== void 0 && (t = typeof e.base == "boolean" ? e.base : Ce.fromJSONObject(e.base)), e.byUserId !== void 0) for (var o in r = {}, e.byUserId) {
|
|
7566
7566
|
var s = e.byUserId[o];
|
|
7567
|
-
r[o] = typeof s == "boolean" ? s :
|
|
7567
|
+
r[o] = typeof s == "boolean" ? s : Ce.fromJSONObject(s);
|
|
7568
7568
|
}
|
|
7569
7569
|
if (e.byParticipantId !== void 0) for (var a in i = {}, e.byParticipantId) {
|
|
7570
7570
|
var c = e.byParticipantId[a];
|
|
7571
|
-
i[a] = typeof c == "boolean" ? c :
|
|
7571
|
+
i[a] = typeof c == "boolean" ? c : Ce.fromJSONObject(c);
|
|
7572
7572
|
}
|
|
7573
7573
|
return new n({ base: t, byUserId: r, byParticipantId: i });
|
|
7574
7574
|
} }, { key: "fromMinifiedJSONObject", value: function(e) {
|
|
7575
7575
|
var t, r, i;
|
|
7576
|
-
if (e.b !== void 0 && (t = typeof e.b == "boolean" ? e.b :
|
|
7576
|
+
if (e.b !== void 0 && (t = typeof e.b == "boolean" ? e.b : Ce.fromMinifiedJSONObject(e.b)), e.u !== void 0) for (var o in r = {}, e.u) {
|
|
7577
7577
|
var s = e.u[o];
|
|
7578
|
-
r[o] = typeof s == "boolean" ? s :
|
|
7578
|
+
r[o] = typeof s == "boolean" ? s : Ce.fromMinifiedJSONObject(s);
|
|
7579
7579
|
}
|
|
7580
7580
|
if (e.p !== void 0) for (var a in i = {}, e.p) {
|
|
7581
7581
|
var c = e.p[a];
|
|
7582
|
-
i[a] = typeof c == "boolean" ? c :
|
|
7582
|
+
i[a] = typeof c == "boolean" ? c : Ce.fromMinifiedJSONObject(c);
|
|
7583
7583
|
}
|
|
7584
7584
|
return new n({ base: t, byUserId: r, byParticipantId: i });
|
|
7585
7585
|
} }, { key: "validateJSONObject", value: function(e) {
|
|
7586
|
-
if (
|
|
7586
|
+
if (ce(e) !== "object") return [!1, "canReceive must be an object"];
|
|
7587
7587
|
for (var t = ["base", "byUserId", "byParticipantId"], r = 0, i = Object.keys(e); r < i.length; r++) {
|
|
7588
7588
|
var o = i[r];
|
|
7589
7589
|
if (!t.includes(o)) return [!1, "canReceive can only contain keys (".concat(t.join(", "), ")")];
|
|
7590
7590
|
if (o === "base") {
|
|
7591
|
-
var s =
|
|
7591
|
+
var s = Ae(Ce.validateJSONObject(e.base, !0), 2), a = s[0], c = s[1];
|
|
7592
7592
|
if (!a) return [!1, c];
|
|
7593
7593
|
} else {
|
|
7594
|
-
if (
|
|
7594
|
+
if (ce(e[o]) !== "object") return [!1, "invalid (non-object) value for field '".concat(o, "' in canReceive")];
|
|
7595
7595
|
for (var d = 0, u = Object.values(e[o]); d < u.length; d++) {
|
|
7596
|
-
var h = u[d], f =
|
|
7596
|
+
var h = u[d], f = Ae(Ce.validateJSONObject(h), 2), b = f[0], y = f[1];
|
|
7597
7597
|
if (!b) return [!1, y];
|
|
7598
7598
|
}
|
|
7599
7599
|
}
|
|
7600
7600
|
}
|
|
7601
7601
|
return [!0];
|
|
7602
7602
|
} }]);
|
|
7603
|
-
}(),
|
|
7603
|
+
}(), Ce = function() {
|
|
7604
7604
|
function n() {
|
|
7605
7605
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = e.video, r = e.audio, i = e.screenVideo, o = e.screenAudio, s = e.customVideo, a = e.customAudio;
|
|
7606
7606
|
$e(this, n), this.video = t, this.audio = r, this.screenVideo = i, this.screenAudio = o, this.customVideo = s, this.customAudio = a;
|
|
@@ -7627,14 +7627,14 @@ var rc = function() {
|
|
|
7627
7627
|
return new n({ video: e.v, audio: e.a, screenVideo: e.sv, screenAudio: e.sa, customVideo: e.cv, customAudio: e.ca });
|
|
7628
7628
|
} }, { key: "validateJSONObject", value: function(e, t) {
|
|
7629
7629
|
if (typeof e == "boolean") return [!0];
|
|
7630
|
-
if (
|
|
7630
|
+
if (ce(e) !== "object") return [!1, "invalid (non-object, non-boolean) value in canReceive"];
|
|
7631
7631
|
for (var r = Object.keys(e), i = 0, o = r; i < o.length; i++) {
|
|
7632
7632
|
var s = o[i];
|
|
7633
7633
|
if (!Sr.includes(s)) return [!1, "invalid media type '".concat(s, "' in canReceive")];
|
|
7634
7634
|
if (Ju.includes(s)) {
|
|
7635
7635
|
if (typeof e[s] != "boolean") return [!1, "invalid (non-boolean) value for media type '".concat(s, "' in canReceive")];
|
|
7636
7636
|
} else {
|
|
7637
|
-
if (
|
|
7637
|
+
if (ce(e[s]) !== "object") return [!1, "invalid (non-object) value for media type '".concat(s, "' in canReceive")];
|
|
7638
7638
|
for (var a = 0, c = Object.values(e[s]); a < c.length; a++)
|
|
7639
7639
|
if (typeof c[a] != "boolean") return [!1, "invalid (non-boolean) value for entry within '".concat(s, "' in canReceive")];
|
|
7640
7640
|
if (t && e[s]["*"] === void 0) return [!1, `canReceive "base" permission must specify "*" as an entry within '`.concat(s, "'")];
|
|
@@ -7653,7 +7653,7 @@ function Ms(n, e) {
|
|
|
7653
7653
|
}
|
|
7654
7654
|
return t;
|
|
7655
7655
|
}
|
|
7656
|
-
function
|
|
7656
|
+
function j(n) {
|
|
7657
7657
|
for (var e = 1; e < arguments.length; e++) {
|
|
7658
7658
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
7659
7659
|
e % 2 ? Ms(Object(t), !0).forEach(function(r) {
|
|
@@ -7717,7 +7717,7 @@ function Os(n, e) {
|
|
|
7717
7717
|
for (var t = 0, r = Array(e); t < e; t++) r[t] = n[t];
|
|
7718
7718
|
return r;
|
|
7719
7719
|
}
|
|
7720
|
-
var At = {}, Ds = "video", Xu = "voice", Ls =
|
|
7720
|
+
var At = {}, Ds = "video", Xu = "voice", Ls = se() ? { data: {} } : { data: {}, topology: "none" }, Ps = { present: 0, hidden: 0 }, ic = { maxBitrate: { min: 1e5, max: 25e5 }, maxFramerate: { min: 1, max: 30 }, scaleResolutionDownBy: { min: 1, max: 8 } }, $n = Object.keys(ic), Is = ["state", "volume", "simulcastEncodings"], Rs = { androidInCallNotification: { title: "string", subtitle: "string", iconName: "string", disableForCustomOverride: "boolean" }, disableAutoDeviceManagement: { audio: "boolean", video: "boolean" } }, dn = { id: { iconPath: "string", iconPathDarkMode: "string", label: "string", tooltip: "string", visualState: "'default' | 'sidebar-open' | 'active'" } }, pi = { 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" } }, Ot = { customIntegrations: { validate: hc, help: dc() }, customTrayButtons: { validate: uc, help: "customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(dn)) }, url: { validate: function(n) {
|
|
7721
7721
|
return typeof n == "string";
|
|
7722
7722
|
}, help: "url should be a string" }, baseUrl: { validate: function(n) {
|
|
7723
7723
|
return typeof n == "string";
|
|
@@ -7769,7 +7769,7 @@ var At = {}, Ds = "video", Xu = "voice", Ls = ae() ? { data: {} } : { data: {},
|
|
|
7769
7769
|
}
|
|
7770
7770
|
return !0;
|
|
7771
7771
|
};
|
|
7772
|
-
return
|
|
7772
|
+
return ce(n) === "object" && ("light" in n && "dark" in n || "colors" in n) ? "light" in n && "dark" in n ? "colors" in n.light ? "colors" in n.dark ? t(n.light.colors) && t(n.dark.colors) : (console.error('Dark theme is missing "colors" property.', n), !1) : (console.error('Light theme is missing "colors" property.', n), !1) : t(n.colors) : (console.error('Theme must contain either both "light" and "dark" properties, or "colors".', n), !1);
|
|
7773
7773
|
}, help: "unsupported theme configuration. Check error logs for detailed info." }, layoutConfig: { validate: function(n) {
|
|
7774
7774
|
if ("grid" in n) {
|
|
7775
7775
|
var e = n.grid;
|
|
@@ -7811,7 +7811,7 @@ var At = {}, Ds = "video", Xu = "voice", Ls = ae() ? { data: {} } : { data: {},
|
|
|
7811
7811
|
}, help: "styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }" }, setSubscribedTracks: { validate: function(n, e) {
|
|
7812
7812
|
if (e._preloadCache.subscribeToTracksAutomatically) return !1;
|
|
7813
7813
|
var t = [!0, !1, "staged"];
|
|
7814
|
-
if (t.includes(n) || !
|
|
7814
|
+
if (t.includes(n) || !se() && n === "avatar") return !0;
|
|
7815
7815
|
var r = ["audio", "video", "screenAudio", "screenVideo", "rmpAudio", "rmpVideo"], i = function(o) {
|
|
7816
7816
|
var s = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
7817
7817
|
for (var a in o) if (a === "custom") {
|
|
@@ -7823,11 +7823,11 @@ var At = {}, Ds = "video", Xu = "voice", Ls = ae() ? { data: {} } : { data: {},
|
|
|
7823
7823
|
return !0;
|
|
7824
7824
|
};
|
|
7825
7825
|
return i(n);
|
|
7826
|
-
}, help: "setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: " + "true".concat(
|
|
7826
|
+
}, help: "setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: " + "true".concat(se() ? "" : " | 'avatar'", " | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }") }, setAudio: !0, setVideo: !0, setScreenShare: { validate: function(n) {
|
|
7827
7827
|
return n === !1;
|
|
7828
7828
|
}, help: "setScreenShare must be false, as it's only meant for stopping remote participants' screen shares" }, eject: !0, updatePermissions: { validate: function(n) {
|
|
7829
7829
|
for (var e = 0, t = Object.entries(n); e < t.length; e++) {
|
|
7830
|
-
var r =
|
|
7830
|
+
var r = Ae(t[e], 2), i = r[0], o = r[1];
|
|
7831
7831
|
switch (i) {
|
|
7832
7832
|
case "hasPresence":
|
|
7833
7833
|
if (typeof o != "boolean") return !1;
|
|
@@ -7849,7 +7849,7 @@ var At = {}, Ds = "video", Xu = "voice", Ls = ae() ? { data: {} } : { data: {},
|
|
|
7849
7849
|
(o instanceof Array || Array.isArray(o)) && (n.canSend = new Set(o));
|
|
7850
7850
|
break;
|
|
7851
7851
|
case "canReceive":
|
|
7852
|
-
var u =
|
|
7852
|
+
var u = Ae(rc.validateJSONObject(o), 2), h = u[0], f = u[1];
|
|
7853
7853
|
if (!h) return console.error(f), !1;
|
|
7854
7854
|
break;
|
|
7855
7855
|
case "canAdmin":
|
|
@@ -7893,7 +7893,7 @@ Promise.any || (Promise.any = function() {
|
|
|
7893
7893
|
}());
|
|
7894
7894
|
var Qu = function() {
|
|
7895
7895
|
function n(l) {
|
|
7896
|
-
var g, p, S, k, T, O,
|
|
7896
|
+
var g, p, S, k, T, O, I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
7897
7897
|
if ($e(this, n), S = this, k = tt(k = n), at(p = gn(S, nc() ? Reflect.construct(k, [], tt(S).constructor) : k.apply(S, T)), "startListeningForDeviceChanges", function() {
|
|
7898
7898
|
zu(p.handleDeviceChange);
|
|
7899
7899
|
}), at(p, "stopListeningForDeviceChanges", function() {
|
|
@@ -7915,16 +7915,16 @@ var Qu = function() {
|
|
|
7915
7915
|
p.disableReactNativeAutoDeviceManagement("audio") || (p._hasNativeAudioFocus = W, p.toggleParticipantAudioBasedOnNativeAudioFocus(), p._hasNativeAudioFocus ? p.micUnmutedBeforeLosingNativeAudioFocus && p.setLocalAudio(!0) : (p.micUnmutedBeforeLosingNativeAudioFocus = p.localAudio(), p.setLocalAudio(!1)));
|
|
7916
7916
|
}), at(p, "handleNativeSystemScreenCaptureStop", function() {
|
|
7917
7917
|
p.stopScreenShare();
|
|
7918
|
-
}), !Nn() && !
|
|
7919
|
-
if (p.strictMode =
|
|
7918
|
+
}), !Nn() && !se()) throw new Error("WebRTC not supported or suppressed");
|
|
7919
|
+
if (p.strictMode = I.strictMode === void 0 || I.strictMode, p.allowMultipleCallInstances = (g = I.allowMultipleCallInstances) !== null && g !== void 0 && g, Object.keys(At).length && (p._logDuplicateInstanceAttempt(), !p.allowMultipleCallInstances)) {
|
|
7920
7920
|
if (p.strictMode) throw new Error("Duplicate DailyIframe instances are not allowed");
|
|
7921
7921
|
console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`");
|
|
7922
7922
|
}
|
|
7923
|
-
if (window._daily || (window._daily = { pendings: [], instances: {} }), p.callClientId = mn(), At[(O = p).callClientId] = O, window._daily.instances[p.callClientId] = {}, p._sharedTracks = {}, window._daily.instances[p.callClientId].tracks = p._sharedTracks,
|
|
7923
|
+
if (window._daily || (window._daily = { pendings: [], instances: {} }), p.callClientId = mn(), At[(O = p).callClientId] = O, window._daily.instances[p.callClientId] = {}, p._sharedTracks = {}, window._daily.instances[p.callClientId].tracks = p._sharedTracks, I.dailyJsVersion = n.version(), p._iframe = l, p._callObjectMode = I.layout === "none" && !p._iframe, p._preloadCache = { subscribeToTracksAutomatically: !0, outputDeviceId: null, inputSettings: null, sendSettings: null, videoTrackForNetworkConnectivityTest: null, videoTrackForConnectionQualityTest: null }, I.showLocalVideo !== void 0 ? p._callObjectMode ? console.error("showLocalVideo is not available in call object mode") : p._showLocalVideo = !!I.showLocalVideo : p._showLocalVideo = !0, I.showParticipantsBar !== void 0 ? p._callObjectMode ? console.error("showParticipantsBar is not available in call object mode") : p._showParticipantsBar = !!I.showParticipantsBar : p._showParticipantsBar = !0, I.customIntegrations !== void 0 ? p._callObjectMode ? console.error("customIntegrations is not available in call object mode") : p._customIntegrations = I.customIntegrations : p._customIntegrations = {}, I.customTrayButtons !== void 0 ? p._callObjectMode ? console.error("customTrayButtons is not available in call object mode") : p._customTrayButtons = I.customTrayButtons : p._customTrayButtons = {}, I.activeSpeakerMode !== void 0 ? p._callObjectMode ? console.error("activeSpeakerMode is not available in call object mode") : p._activeSpeakerMode = !!I.activeSpeakerMode : p._activeSpeakerMode = !1, I.receiveSettings ? p._callObjectMode ? p._receiveSettings = I.receiveSettings : console.error("receiveSettings is only available in call object mode") : p._receiveSettings = {}, p.validateProperties(I), p.properties = j({}, I), p._inputSettings || (p._inputSettings = {}), p._callObjectLoader = p._callObjectMode ? new Lu(p.callClientId) : null, p._callState = Qo, p._isPreparingToJoin = !1, p._accessState = { access: Ln }, p._meetingSessionSummary = {}, p._finalSummaryOfPrevSession = {}, p._meetingSessionState = Hn(Ls, p._callObjectMode), p._nativeInCallAudioMode = Ds, p._participants = {}, p._isScreenSharing = !1, p._participantCounts = Ps, p._rmpPlayerState = {}, p._waitingParticipants = {}, p._network = { threshold: "good", quality: 100, networkState: "unknown", stats: {} }, p._activeSpeaker = {}, p._localAudioLevel = 0, p._isLocalAudioLevelObserverRunning = !1, p._remoteParticipantsAudioLevel = {}, p._isRemoteParticipantsAudioLevelObserverRunning = !1, p._maxAppMessageSize = Pn, p._messageChannel = se() ? new Ou() : new Au(), p._iframe && (p._iframe.requestFullscreen ? p._iframe.addEventListener("fullscreenchange", function() {
|
|
7924
7924
|
document.fullscreenElement === p._iframe ? (p.emitDailyJSEvent({ action: Ur }), p.sendMessageToCallMachine({ action: Ur })) : (p.emitDailyJSEvent({ action: Hr }), p.sendMessageToCallMachine({ action: Hr }));
|
|
7925
7925
|
}) : p._iframe.webkitRequestFullscreen && p._iframe.addEventListener("webkitfullscreenchange", function() {
|
|
7926
7926
|
document.webkitFullscreenElement === p._iframe ? (p.emitDailyJSEvent({ action: Ur }), p.sendMessageToCallMachine({ action: Ur })) : (p.emitDailyJSEvent({ action: Hr }), p.sendMessageToCallMachine({ action: Hr }));
|
|
7927
|
-
})),
|
|
7927
|
+
})), se()) {
|
|
7928
7928
|
var R = p.nativeUtils();
|
|
7929
7929
|
R.addAudioFocusChangeListener && R.removeAudioFocusChangeListener && R.addAppStateChangeListener && R.removeAppStateChangeListener && R.addSystemScreenCaptureStopListener && R.removeSystemScreenCaptureStopListener || console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"), p._hasNativeAudioFocus = !0, R.addAudioFocusChangeListener(p.handleNativeAudioFocusChange), R.addAppStateChangeListener(p.handleNativeAppStateChange), R.addSystemScreenCaptureStopListener(p.handleNativeSystemScreenCaptureStop);
|
|
7930
7930
|
}
|
|
@@ -7941,7 +7941,7 @@ var Qu = function() {
|
|
|
7941
7941
|
var p = g.parentElement;
|
|
7942
7942
|
p && p.removeChild(g);
|
|
7943
7943
|
}
|
|
7944
|
-
if (this._messageChannel.removeListener(this.handleMessageFromCallMachine),
|
|
7944
|
+
if (this._messageChannel.removeListener(this.handleMessageFromCallMachine), se()) {
|
|
7945
7945
|
var S = this.nativeUtils();
|
|
7946
7946
|
S.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange), S.removeAppStateChangeListener(this.handleNativeAppStateChange), S.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop);
|
|
7947
7947
|
}
|
|
@@ -7952,19 +7952,19 @@ var Qu = function() {
|
|
|
7952
7952
|
return !!this._destroyed;
|
|
7953
7953
|
} }, { key: "loadCss", value: function(l) {
|
|
7954
7954
|
var g = l.bodyClass, p = l.cssFile, S = l.cssText;
|
|
7955
|
-
return
|
|
7955
|
+
return oe(), this.sendMessageToCallMachine({ action: "load-css", cssFile: this.absoluteUrl(p), bodyClass: g, cssText: S }), this;
|
|
7956
7956
|
} }, { key: "iframe", value: function() {
|
|
7957
|
-
return
|
|
7957
|
+
return oe(), this._iframe;
|
|
7958
7958
|
} }, { key: "meetingState", value: function() {
|
|
7959
7959
|
return this._callState;
|
|
7960
7960
|
} }, { key: "accessState", value: function() {
|
|
7961
|
-
return
|
|
7961
|
+
return Ge(this._callObjectMode, "accessState()"), this._accessState;
|
|
7962
7962
|
} }, { key: "participants", value: function() {
|
|
7963
7963
|
return this._participants;
|
|
7964
7964
|
} }, { key: "participantCounts", value: function() {
|
|
7965
7965
|
return this._participantCounts;
|
|
7966
7966
|
} }, { key: "waitingParticipants", value: function() {
|
|
7967
|
-
return
|
|
7967
|
+
return Ge(this._callObjectMode, "waitingParticipants()"), this._waitingParticipants;
|
|
7968
7968
|
} }, { key: "validateParticipantProperties", value: function(l, g) {
|
|
7969
7969
|
for (var p in g) {
|
|
7970
7970
|
if (!Vr[p]) throw new Error("unrecognized updateParticipant property ".concat(p));
|
|
@@ -7976,42 +7976,42 @@ var Qu = function() {
|
|
|
7976
7976
|
var g = this._participants.local && this._participants.local.session_id;
|
|
7977
7977
|
for (var p in l) p === g && (p = "local"), p && l[p] && this.validateParticipantProperties(p, l[p]);
|
|
7978
7978
|
return this.sendMessageToCallMachine({ action: "update-participants", participants: l }), this;
|
|
7979
|
-
} }, { key: "updateWaitingParticipant", value: (
|
|
7979
|
+
} }, { key: "updateWaitingParticipant", value: (ke = J(function* () {
|
|
7980
7980
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
7981
|
-
if (
|
|
7981
|
+
if (Ge(this._callObjectMode, "updateWaitingParticipant()"), me(this._callState, "updateWaitingParticipant()"), typeof g != "string" || ce(p) !== "object") throw new Error("updateWaitingParticipant() must take an id string and a updates object");
|
|
7982
7982
|
return new Promise(function(S, k) {
|
|
7983
7983
|
l.sendMessageToCallMachine({ action: "daily-method-update-waiting-participant", id: g, updates: p }, function(T) {
|
|
7984
7984
|
T.error && k(T.error), T.id || k(new Error("unknown error in updateWaitingParticipant()")), S({ id: T.id });
|
|
7985
7985
|
});
|
|
7986
7986
|
});
|
|
7987
7987
|
}), function() {
|
|
7988
|
-
return
|
|
7989
|
-
}) }, { key: "updateWaitingParticipants", value: (
|
|
7988
|
+
return ke.apply(this, arguments);
|
|
7989
|
+
}) }, { key: "updateWaitingParticipants", value: (Z = J(function* () {
|
|
7990
7990
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7991
|
-
if (
|
|
7991
|
+
if (Ge(this._callObjectMode, "updateWaitingParticipants()"), me(this._callState, "updateWaitingParticipants()"), ce(g) !== "object") throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");
|
|
7992
7992
|
return new Promise(function(p, S) {
|
|
7993
7993
|
l.sendMessageToCallMachine({ action: "daily-method-update-waiting-participants", updatesById: g }, function(k) {
|
|
7994
7994
|
k.error && S(k.error), k.ids || S(new Error("unknown error in updateWaitingParticipants()")), p({ ids: k.ids });
|
|
7995
7995
|
});
|
|
7996
7996
|
});
|
|
7997
7997
|
}), function() {
|
|
7998
|
-
return
|
|
7999
|
-
}) }, { key: "requestAccess", value: (
|
|
7998
|
+
return Z.apply(this, arguments);
|
|
7999
|
+
}) }, { key: "requestAccess", value: (he = J(function* () {
|
|
8000
8000
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, p = g.access, S = p === void 0 ? { level: _d } : p, k = g.name, T = k === void 0 ? "" : k;
|
|
8001
|
-
return
|
|
8001
|
+
return Ge(this._callObjectMode, "requestAccess()"), me(this._callState, "requestAccess()"), new Promise(function(O, I) {
|
|
8002
8002
|
l.sendMessageToCallMachine({ action: "daily-method-request-access", access: S, name: T }, function(R) {
|
|
8003
|
-
R.error &&
|
|
8003
|
+
R.error && I(R.error), R.access || I(new Error("unknown error in requestAccess()")), O({ access: R.access, granted: R.granted });
|
|
8004
8004
|
});
|
|
8005
8005
|
});
|
|
8006
8006
|
}), function() {
|
|
8007
|
-
return
|
|
8007
|
+
return he.apply(this, arguments);
|
|
8008
8008
|
}) }, { key: "localAudio", value: function() {
|
|
8009
8009
|
return this._participants.local ? !["blocked", "off"].includes(this._participants.local.tracks.audio.state) : null;
|
|
8010
8010
|
} }, { key: "localVideo", value: function() {
|
|
8011
8011
|
return this._participants.local ? !["blocked", "off"].includes(this._participants.local.tracks.video.state) : null;
|
|
8012
8012
|
} }, { key: "setLocalAudio", value: function(l) {
|
|
8013
8013
|
var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
8014
|
-
return "forceDiscardTrack" in g && (
|
|
8014
|
+
return "forceDiscardTrack" in g && (se() ? (console.warn("forceDiscardTrack option not supported in React Native; ignoring"), g = {}) : l && (console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"), g = {})), this.sendMessageToCallMachine({ action: "local-audio", state: l, options: g }), this;
|
|
8015
8015
|
} }, { key: "localScreenAudio", value: function() {
|
|
8016
8016
|
return this._participants.local ? !["blocked", "off"].includes(this._participants.local.tracks.screenAudio.state) : null;
|
|
8017
8017
|
} }, { key: "localScreenVideo", value: function() {
|
|
@@ -8025,10 +8025,10 @@ var Qu = function() {
|
|
|
8025
8025
|
if (this._preloadCache.allowLocalAudio = l, this._callMachineInitialized) return this.sendMessageToCallMachine({ action: "set-allow-local-audio", state: l }), this;
|
|
8026
8026
|
} }, { key: "_setAllowLocalVideo", value: function(l) {
|
|
8027
8027
|
if (this._preloadCache.allowLocalVideo = l, this._callMachineInitialized) return this.sendMessageToCallMachine({ action: "set-allow-local-video", state: l }), this;
|
|
8028
|
-
} }, { key: "getReceiveSettings", value: (
|
|
8028
|
+
} }, { key: "getReceiveSettings", value: (ve = J(function* (l) {
|
|
8029
8029
|
var g = this, p = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).showInheritedValues, S = p !== void 0 && p;
|
|
8030
|
-
if (
|
|
8031
|
-
switch (
|
|
8030
|
+
if (Ge(this._callObjectMode, "getReceiveSettings()"), !this._callMachineInitialized) return this._receiveSettings;
|
|
8031
|
+
switch (ce(l)) {
|
|
8032
8032
|
case "string":
|
|
8033
8033
|
return new Promise(function(k) {
|
|
8034
8034
|
g.sendMessageToCallMachine({ action: "get-single-participant-receive-settings", id: l, showInheritedValues: S }, function(T) {
|
|
@@ -8041,67 +8041,67 @@ var Qu = function() {
|
|
|
8041
8041
|
throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments');
|
|
8042
8042
|
}
|
|
8043
8043
|
}), function(l) {
|
|
8044
|
-
return
|
|
8045
|
-
}) }, { key: "updateReceiveSettings", value: (
|
|
8044
|
+
return ve.apply(this, arguments);
|
|
8045
|
+
}) }, { key: "updateReceiveSettings", value: (Q = J(function* (l) {
|
|
8046
8046
|
var g = this;
|
|
8047
|
-
if (
|
|
8047
|
+
if (Ge(this._callObjectMode, "updateReceiveSettings()"), !sc(l, { allowAllParticipantsKey: !0 })) throw new Error(lc({ allowAllParticipantsKey: !0 }));
|
|
8048
8048
|
return me(this._callState, "updateReceiveSettings()", "To specify receive settings earlier, use the receiveSettings config property."), new Promise(function(p) {
|
|
8049
8049
|
g.sendMessageToCallMachine({ action: "update-receive-settings", receiveSettings: l }, function(S) {
|
|
8050
8050
|
p({ receiveSettings: S.receiveSettings });
|
|
8051
8051
|
});
|
|
8052
8052
|
});
|
|
8053
8053
|
}), function(l) {
|
|
8054
|
-
return
|
|
8054
|
+
return Q.apply(this, arguments);
|
|
8055
8055
|
}) }, { key: "_prepInputSettingsForSharing", value: function(l, g) {
|
|
8056
8056
|
if (l) {
|
|
8057
8057
|
var p = {};
|
|
8058
8058
|
if (l.audio) {
|
|
8059
8059
|
var S, k, T;
|
|
8060
|
-
l.audio.settings && (!Object.keys(l.audio.settings).length && g || (p.audio = { settings:
|
|
8060
|
+
l.audio.settings && (!Object.keys(l.audio.settings).length && g || (p.audio = { settings: j({}, l.audio.settings) })), g && (S = p.audio) !== null && S !== void 0 && (S = S.settings) !== null && S !== void 0 && S.customTrack && (p.audio.settings = { customTrack: this._sharedTracks.audioTrack });
|
|
8061
8061
|
var O = ((k = l.audio.processor) === null || k === void 0 ? void 0 : k.type) === "none" && ((T = l.audio.processor) === null || T === void 0 ? void 0 : T._isDefaultWhenNone);
|
|
8062
8062
|
if (l.audio.processor && !O) {
|
|
8063
|
-
var
|
|
8064
|
-
delete
|
|
8063
|
+
var I = j({}, l.audio.processor);
|
|
8064
|
+
delete I._isDefaultWhenNone, p.audio = j(j({}, p.audio), {}, { processor: I });
|
|
8065
8065
|
}
|
|
8066
8066
|
}
|
|
8067
8067
|
if (l.video) {
|
|
8068
8068
|
var R, W, re;
|
|
8069
|
-
l.video.settings && (!Object.keys(l.video.settings).length && g || (p.video = { settings:
|
|
8069
|
+
l.video.settings && (!Object.keys(l.video.settings).length && g || (p.video = { settings: j({}, l.video.settings) })), g && (R = p.video) !== null && R !== void 0 && (R = R.settings) !== null && R !== void 0 && R.customTrack && (p.video.settings = { customTrack: this._sharedTracks.videoTrack });
|
|
8070
8070
|
var Oe = ((W = l.video.processor) === null || W === void 0 ? void 0 : W.type) === "none" && ((re = l.video.processor) === null || re === void 0 ? void 0 : re._isDefaultWhenNone);
|
|
8071
8071
|
if (l.video.processor && !Oe) {
|
|
8072
|
-
var nt =
|
|
8073
|
-
delete nt._isDefaultWhenNone, p.video =
|
|
8072
|
+
var nt = j({}, l.video.processor);
|
|
8073
|
+
delete nt._isDefaultWhenNone, p.video = j(j({}, p.video), {}, { processor: nt });
|
|
8074
8074
|
}
|
|
8075
8075
|
}
|
|
8076
8076
|
return p;
|
|
8077
8077
|
}
|
|
8078
8078
|
} }, { key: "getInputSettings", value: function() {
|
|
8079
8079
|
var l = this;
|
|
8080
|
-
return
|
|
8080
|
+
return oe(), new Promise(function(g) {
|
|
8081
8081
|
g(l._getInputSettings());
|
|
8082
8082
|
});
|
|
8083
8083
|
} }, { key: "_getInputSettings", value: function() {
|
|
8084
8084
|
var l, g, p, S, k, T, O = { processor: { type: "none", _isDefaultWhenNone: !0 } };
|
|
8085
8085
|
this._inputSettings ? (l = ((p = this._inputSettings) === null || p === void 0 ? void 0 : p.video) || O, g = ((S = this._inputSettings) === null || S === void 0 ? void 0 : S.audio) || O) : (l = ((k = this._preloadCache) === null || k === void 0 || (k = k.inputSettings) === null || k === void 0 ? void 0 : k.video) || O, g = ((T = this._preloadCache) === null || T === void 0 || (T = T.inputSettings) === null || T === void 0 ? void 0 : T.audio) || O);
|
|
8086
|
-
var
|
|
8087
|
-
return this._prepInputSettingsForSharing(
|
|
8086
|
+
var I = { audio: g, video: l };
|
|
8087
|
+
return this._prepInputSettingsForSharing(I, !0);
|
|
8088
8088
|
} }, { key: "_updatePreloadCacheInputSettings", value: function(l, g) {
|
|
8089
8089
|
var p = this._inputSettings || {}, S = {};
|
|
8090
8090
|
if (l.video) {
|
|
8091
8091
|
var k, T, O;
|
|
8092
|
-
S.video = {}, l.video.settings ? (S.video.settings = {}, g || l.video.settings.customTrack || (O = p.video) === null || O === void 0 || !O.settings ? S.video.settings = l.video.settings : S.video.settings =
|
|
8092
|
+
S.video = {}, l.video.settings ? (S.video.settings = {}, g || l.video.settings.customTrack || (O = p.video) === null || O === void 0 || !O.settings ? S.video.settings = l.video.settings : S.video.settings = j(j({}, p.video.settings), l.video.settings), Object.keys(S.video.settings).length || delete S.video.settings) : (k = p.video) !== null && k !== void 0 && k.settings && (S.video.settings = p.video.settings), l.video.processor ? S.video.processor = l.video.processor : (T = p.video) !== null && T !== void 0 && T.processor && (S.video.processor = p.video.processor);
|
|
8093
8093
|
} else p.video && (S.video = p.video);
|
|
8094
8094
|
if (l.audio) {
|
|
8095
|
-
var
|
|
8096
|
-
S.audio = {}, l.audio.settings ? (S.audio.settings = {}, g || l.audio.settings.customTrack || (W = p.audio) === null || W === void 0 || !W.settings ? S.audio.settings = l.audio.settings : S.audio.settings =
|
|
8095
|
+
var I, R, W;
|
|
8096
|
+
S.audio = {}, l.audio.settings ? (S.audio.settings = {}, g || l.audio.settings.customTrack || (W = p.audio) === null || W === void 0 || !W.settings ? S.audio.settings = l.audio.settings : S.audio.settings = j(j({}, p.audio.settings), l.audio.settings), Object.keys(S.audio.settings).length || delete S.audio.settings) : (I = p.audio) !== null && I !== void 0 && I.settings && (S.audio.settings = p.audio.settings), l.audio.processor ? S.audio.processor = l.audio.processor : (R = p.audio) !== null && R !== void 0 && R.processor && (S.audio.processor = p.audio.processor);
|
|
8097
8097
|
} else p.audio && (S.audio = p.audio);
|
|
8098
8098
|
this._maybeUpdateInputSettings(S);
|
|
8099
8099
|
} }, { key: "_devicesFromInputSettings", value: function(l) {
|
|
8100
8100
|
var g, p, S = (l == null || (g = l.video) === null || g === void 0 || (g = g.settings) === null || g === void 0 ? void 0 : g.deviceId) || null, k = (l == null || (p = l.audio) === null || p === void 0 || (p = p.settings) === null || p === void 0 ? void 0 : p.deviceId) || null, T = this._preloadCache.outputDeviceId || null;
|
|
8101
8101
|
return { camera: S ? { deviceId: S } : {}, mic: k ? { deviceId: k } : {}, speaker: T ? { deviceId: T } : {} };
|
|
8102
|
-
} }, { key: "updateInputSettings", value: (
|
|
8102
|
+
} }, { key: "updateInputSettings", value: (F = J(function* (l) {
|
|
8103
8103
|
var g = this;
|
|
8104
|
-
return
|
|
8104
|
+
return oe(), ac(l) ? l.video || l.audio ? (cc(l, this.properties.dailyConfig, this._sharedTracks), this._callObjectMode && !this._callMachineInitialized ? (this._updatePreloadCacheInputSettings(l, !0), this._getInputSettings()) : new Promise(function(p, S) {
|
|
8105
8105
|
g.sendMessageToCallMachine({ action: "update-input-settings", inputSettings: l }, function(k) {
|
|
8106
8106
|
if (k.error) S(k.error);
|
|
8107
8107
|
else {
|
|
@@ -8111,26 +8111,26 @@ var Qu = function() {
|
|
|
8111
8111
|
});
|
|
8112
8112
|
})) : this._getInputSettings() : (console.error(gi()), Promise.reject(gi()));
|
|
8113
8113
|
}), function(l) {
|
|
8114
|
-
return
|
|
8114
|
+
return F.apply(this, arguments);
|
|
8115
8115
|
}) }, { key: "setBandwidth", value: function(l) {
|
|
8116
8116
|
var g = l.kbs, p = l.trackConstraints;
|
|
8117
|
-
if (
|
|
8117
|
+
if (oe(), this._callMachineInitialized) return this.sendMessageToCallMachine({ action: "set-bandwidth", kbs: g, trackConstraints: p }), this;
|
|
8118
8118
|
} }, { key: "getDailyLang", value: function() {
|
|
8119
8119
|
var l = this;
|
|
8120
|
-
if (
|
|
8120
|
+
if (oe(), this._callMachineInitialized) return new Promise(function(g) {
|
|
8121
8121
|
l.sendMessageToCallMachine({ action: "get-daily-lang" }, function(p) {
|
|
8122
8122
|
delete p.action, delete p.callbackStamp, g(p);
|
|
8123
8123
|
});
|
|
8124
8124
|
});
|
|
8125
8125
|
} }, { key: "setDailyLang", value: function(l) {
|
|
8126
|
-
return
|
|
8126
|
+
return oe(), this.sendMessageToCallMachine({ action: "set-daily-lang", lang: l }), this;
|
|
8127
8127
|
} }, { key: "setProxyUrl", value: function(l) {
|
|
8128
8128
|
return this.sendMessageToCallMachine({ action: "set-proxy-url", proxyUrl: l }), this;
|
|
8129
8129
|
} }, { key: "setIceConfig", value: function(l) {
|
|
8130
8130
|
return this.sendMessageToCallMachine({ action: "set-ice-config", iceConfig: l }), this;
|
|
8131
8131
|
} }, { key: "meetingSessionSummary", value: function() {
|
|
8132
8132
|
return [bt, yt].includes(this._callState) ? this._finalSummaryOfPrevSession : this._meetingSessionSummary;
|
|
8133
|
-
} }, { key: "getMeetingSession", value: (
|
|
8133
|
+
} }, { key: "getMeetingSession", value: (U = J(function* () {
|
|
8134
8134
|
var l = this;
|
|
8135
8135
|
return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"), me(this._callState, "getMeetingSession()"), new Promise(function(g) {
|
|
8136
8136
|
l.sendMessageToCallMachine({ action: "get-meeting-session" }, function(p) {
|
|
@@ -8138,12 +8138,12 @@ var Qu = function() {
|
|
|
8138
8138
|
});
|
|
8139
8139
|
});
|
|
8140
8140
|
}), function() {
|
|
8141
|
-
return
|
|
8141
|
+
return U.apply(this, arguments);
|
|
8142
8142
|
}) }, { key: "meetingSessionState", value: function() {
|
|
8143
8143
|
return me(this._callState, "meetingSessionState"), this._meetingSessionState;
|
|
8144
8144
|
} }, { key: "setMeetingSessionData", value: function(l) {
|
|
8145
8145
|
var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "replace";
|
|
8146
|
-
|
|
8146
|
+
Ge(this._callObjectMode, "setMeetingSessionData()"), me(this._callState, "setMeetingSessionData");
|
|
8147
8147
|
try {
|
|
8148
8148
|
(function(p, S) {
|
|
8149
8149
|
new Du({ data: p, mergeStrategy: S });
|
|
@@ -8159,11 +8159,11 @@ var Qu = function() {
|
|
|
8159
8159
|
} }, { key: "setUserName", value: function(l, g) {
|
|
8160
8160
|
var p = this;
|
|
8161
8161
|
return this.properties.userName = l, new Promise(function(S) {
|
|
8162
|
-
p.sendMessageToCallMachine({ action: "set-user-name", name: l ?? "", thisMeetingOnly:
|
|
8162
|
+
p.sendMessageToCallMachine({ action: "set-user-name", name: l ?? "", thisMeetingOnly: se() || !!g && !!g.thisMeetingOnly }, function(k) {
|
|
8163
8163
|
delete k.action, delete k.callbackStamp, S(k);
|
|
8164
8164
|
});
|
|
8165
8165
|
});
|
|
8166
|
-
} }, { key: "setUserData", value: (
|
|
8166
|
+
} }, { key: "setUserData", value: (te = J(function* (l) {
|
|
8167
8167
|
var g = this;
|
|
8168
8168
|
try {
|
|
8169
8169
|
oc(l);
|
|
@@ -8180,12 +8180,12 @@ var Qu = function() {
|
|
|
8180
8180
|
}
|
|
8181
8181
|
});
|
|
8182
8182
|
}), function(l) {
|
|
8183
|
-
return
|
|
8183
|
+
return te.apply(this, arguments);
|
|
8184
8184
|
}) }, { key: "validateAudioLevelInterval", value: function(l) {
|
|
8185
8185
|
if (l && (l < 100 || typeof l != "number")) throw new Error("The interval must be a number greater than or equal to 100 milliseconds.");
|
|
8186
8186
|
} }, { key: "startLocalAudioLevelObserver", value: function(l) {
|
|
8187
8187
|
var g = this;
|
|
8188
|
-
if (typeof AudioWorkletNode > "u" && !
|
|
8188
|
+
if (typeof AudioWorkletNode > "u" && !se()) throw new Error("startLocalAudioLevelObserver() is not supported on this browser");
|
|
8189
8189
|
if (this.validateAudioLevelInterval(l), this._callMachineInitialized) return this._isLocalAudioLevelObserverRunning = !0, new Promise(function(p, S) {
|
|
8190
8190
|
g.sendMessageToCallMachine({ action: "start-local-audio-level-observer", interval: l }, function(k) {
|
|
8191
8191
|
g._isLocalAudioLevelObserverRunning = !k.error, k.error ? S({ error: k.error }) : p();
|
|
@@ -8208,9 +8208,9 @@ var Qu = function() {
|
|
|
8208
8208
|
return this._isRemoteParticipantsAudioLevelObserverRunning;
|
|
8209
8209
|
} }, { key: "stopRemoteParticipantsAudioLevelObserver", value: function() {
|
|
8210
8210
|
this._preloadCache.remoteParticipantsAudioLevelObserver = null, this._remoteParticipantsAudioLevel = {}, this._isRemoteParticipantsAudioLevelObserverRunning = !1, this.sendMessageToCallMachine({ action: "stop-remote-participants-audio-level-observer" });
|
|
8211
|
-
} }, { key: "startCamera", value: (
|
|
8211
|
+
} }, { key: "startCamera", value: (H = J(function* () {
|
|
8212
8212
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8213
|
-
if (
|
|
8213
|
+
if (Ge(this._callObjectMode, "startCamera()"), jn(this._callState, this._isPreparingToJoin, "startCamera()", "Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"), this.needsLoad()) try {
|
|
8214
8214
|
yield this.load(g);
|
|
8215
8215
|
} catch (p) {
|
|
8216
8216
|
return Promise.reject(p);
|
|
@@ -8220,7 +8220,7 @@ var Qu = function() {
|
|
|
8220
8220
|
if (g.url && g.url !== this.properties.url) return console.error("url in startCamera() is different than the one used in preAuth()"), Promise.reject();
|
|
8221
8221
|
if (g.token && g.token !== this.properties.token) return console.error("token in startCamera() is different than the one used in preAuth()"), Promise.reject();
|
|
8222
8222
|
}
|
|
8223
|
-
this.validateProperties(g), this.properties =
|
|
8223
|
+
this.validateProperties(g), this.properties = j(j({}, this.properties), g);
|
|
8224
8224
|
}
|
|
8225
8225
|
return new Promise(function(p, S) {
|
|
8226
8226
|
l._preloadCache.inputSettings = l._prepInputSettingsForSharing(l._inputSettings, !1), l.sendMessageToCallMachine({ action: "start-camera", properties: Vt(l.properties, l.callClientId), preloadCache: Vt(l._preloadCache, l.callClientId) }, function(k) {
|
|
@@ -8228,7 +8228,7 @@ var Qu = function() {
|
|
|
8228
8228
|
});
|
|
8229
8229
|
});
|
|
8230
8230
|
}), function() {
|
|
8231
|
-
return
|
|
8231
|
+
return H.apply(this, arguments);
|
|
8232
8232
|
}) }, { key: "validateCustomTrack", value: function(l, g, p) {
|
|
8233
8233
|
if (p && p.length > 50) throw new Error("Custom track `trackName` must not be more than 50 characters");
|
|
8234
8234
|
if (g && g !== "music" && g !== "speech" && !(g instanceof Object)) throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");
|
|
@@ -8236,14 +8236,14 @@ var Qu = function() {
|
|
|
8236
8236
|
if (!(l instanceof MediaStreamTrack)) throw new Error("Custom tracks provided must be instances of MediaStreamTrack");
|
|
8237
8237
|
} }, { key: "startCustomTrack", value: function() {
|
|
8238
8238
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { track, mode, trackName, ignoreAudioLevel };
|
|
8239
|
-
return
|
|
8239
|
+
return oe(), me(this._callState, "startCustomTrack()"), this.validateCustomTrack(g.track, g.mode, g.trackName), new Promise(function(p, S) {
|
|
8240
8240
|
l._sharedTracks.customTrack = g.track, g.track = gt, l.sendMessageToCallMachine({ action: "start-custom-track", properties: g }, function(k) {
|
|
8241
8241
|
k.error ? S({ error: k.error }) : p(k.mediaTag);
|
|
8242
8242
|
});
|
|
8243
8243
|
});
|
|
8244
8244
|
} }, { key: "stopCustomTrack", value: function(l) {
|
|
8245
8245
|
var g = this;
|
|
8246
|
-
return
|
|
8246
|
+
return oe(), me(this._callState, "stopCustomTrack()"), new Promise(function(p) {
|
|
8247
8247
|
g.sendMessageToCallMachine({ action: "stop-custom-track", mediaTag: l }, function(S) {
|
|
8248
8248
|
p(S.mediaTag);
|
|
8249
8249
|
});
|
|
@@ -8255,10 +8255,10 @@ var Qu = function() {
|
|
|
8255
8255
|
p({ device: S.device });
|
|
8256
8256
|
});
|
|
8257
8257
|
});
|
|
8258
|
-
} }, { key: "setAudioDevice", value: (
|
|
8258
|
+
} }, { key: "setAudioDevice", value: (z = J(function* (l) {
|
|
8259
8259
|
return hr(), this.nativeUtils().setAudioDevice(l), { deviceId: yield this.nativeUtils().getAudioDevice() };
|
|
8260
8260
|
}), function(l) {
|
|
8261
|
-
return
|
|
8261
|
+
return z.apply(this, arguments);
|
|
8262
8262
|
}) }, { key: "cycleCamera", value: function() {
|
|
8263
8263
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8264
8264
|
return new Promise(function(p) {
|
|
@@ -8268,7 +8268,7 @@ var Qu = function() {
|
|
|
8268
8268
|
});
|
|
8269
8269
|
} }, { key: "cycleMic", value: function() {
|
|
8270
8270
|
var l = this;
|
|
8271
|
-
return
|
|
8271
|
+
return oe(), new Promise(function(g) {
|
|
8272
8272
|
l.sendMessageToCallMachine({ action: "cycle-mic" }, function(p) {
|
|
8273
8273
|
g({ device: p.device });
|
|
8274
8274
|
});
|
|
@@ -8280,21 +8280,21 @@ var Qu = function() {
|
|
|
8280
8280
|
g(p.facingMode);
|
|
8281
8281
|
});
|
|
8282
8282
|
});
|
|
8283
|
-
} }, { key: "setInputDevicesAsync", value: (
|
|
8283
|
+
} }, { key: "setInputDevicesAsync", value: ($ = J(function* (l) {
|
|
8284
8284
|
var g = this, p = l.audioDeviceId, S = l.videoDeviceId, k = l.audioSource, T = l.videoSource;
|
|
8285
|
-
if (
|
|
8285
|
+
if (oe(), k !== void 0 && (p = k), T !== void 0 && (S = T), typeof p == "boolean" && (this._setAllowLocalAudio(p), p = void 0), typeof S == "boolean" && (this._setAllowLocalVideo(S), S = void 0), !p && !S) return yield this.getInputDevices();
|
|
8286
8286
|
var O = {};
|
|
8287
|
-
return p && (p instanceof MediaStreamTrack ? (this._sharedTracks.audioTrack = p, p = gt, O.audio = { settings: { customTrack: p } }) : (delete this._sharedTracks.audioTrack, O.audio = { settings: { deviceId: p } })), S && (S instanceof MediaStreamTrack ? (this._sharedTracks.videoTrack = S, S = gt, O.video = { settings: { customTrack: S } }) : (delete this._sharedTracks.videoTrack, O.video = { settings: { deviceId: S } })), this._callObjectMode && this.needsLoad() ? (this._updatePreloadCacheInputSettings(O, !1), this._devicesFromInputSettings(this._inputSettings)) : new Promise(function(
|
|
8287
|
+
return p && (p instanceof MediaStreamTrack ? (this._sharedTracks.audioTrack = p, p = gt, O.audio = { settings: { customTrack: p } }) : (delete this._sharedTracks.audioTrack, O.audio = { settings: { deviceId: p } })), S && (S instanceof MediaStreamTrack ? (this._sharedTracks.videoTrack = S, S = gt, O.video = { settings: { customTrack: S } }) : (delete this._sharedTracks.videoTrack, O.video = { settings: { deviceId: S } })), this._callObjectMode && this.needsLoad() ? (this._updatePreloadCacheInputSettings(O, !1), this._devicesFromInputSettings(this._inputSettings)) : new Promise(function(I) {
|
|
8288
8288
|
g.sendMessageToCallMachine({ action: "set-input-devices", audioDeviceId: p, videoDeviceId: S }, function(R) {
|
|
8289
|
-
if (delete R.action, delete R.callbackStamp, R.returnPreloadCache) return g._updatePreloadCacheInputSettings(O, !1), void
|
|
8290
|
-
|
|
8289
|
+
if (delete R.action, delete R.callbackStamp, R.returnPreloadCache) return g._updatePreloadCacheInputSettings(O, !1), void I(g._devicesFromInputSettings(g._inputSettings));
|
|
8290
|
+
I(R);
|
|
8291
8291
|
});
|
|
8292
8292
|
});
|
|
8293
8293
|
}), function(l) {
|
|
8294
|
-
return
|
|
8295
|
-
}) }, { key: "setOutputDeviceAsync", value: (
|
|
8294
|
+
return $.apply(this, arguments);
|
|
8295
|
+
}) }, { key: "setOutputDeviceAsync", value: (be = J(function* (l) {
|
|
8296
8296
|
var g = this, p = l.outputDeviceId;
|
|
8297
|
-
if (
|
|
8297
|
+
if (oe(), !p || typeof p != "string") throw new Error("outputDeviceId must be provided and must be a valid device id");
|
|
8298
8298
|
return this._preloadCache.outputDeviceId = p, this._callObjectMode && this.needsLoad() ? this._devicesFromInputSettings(this._inputSettings) : new Promise(function(S, k) {
|
|
8299
8299
|
g.sendMessageToCallMachine({ action: "set-output-device", outputDeviceId: p }, function(T) {
|
|
8300
8300
|
if (delete T.action, delete T.callbackStamp, T.error) {
|
|
@@ -8305,8 +8305,8 @@ var Qu = function() {
|
|
|
8305
8305
|
});
|
|
8306
8306
|
});
|
|
8307
8307
|
}), function(l) {
|
|
8308
|
-
return
|
|
8309
|
-
}) }, { key: "getInputDevices", value: (
|
|
8308
|
+
return be.apply(this, arguments);
|
|
8309
|
+
}) }, { key: "getInputDevices", value: (ue = J(function* () {
|
|
8310
8310
|
var l = this;
|
|
8311
8311
|
return this._callObjectMode && this.needsLoad() ? this._devicesFromInputSettings(this._inputSettings) : new Promise(function(g) {
|
|
8312
8312
|
l.sendMessageToCallMachine({ action: "get-input-devices" }, function(p) {
|
|
@@ -8314,28 +8314,28 @@ var Qu = function() {
|
|
|
8314
8314
|
});
|
|
8315
8315
|
});
|
|
8316
8316
|
}), function() {
|
|
8317
|
-
return
|
|
8317
|
+
return ue.apply(this, arguments);
|
|
8318
8318
|
}) }, { key: "nativeInCallAudioMode", value: function() {
|
|
8319
8319
|
return hr(), this._nativeInCallAudioMode;
|
|
8320
8320
|
} }, { key: "setNativeInCallAudioMode", value: function(l) {
|
|
8321
8321
|
if (hr(), [Ds, Xu].includes(l)) {
|
|
8322
8322
|
if (l !== this._nativeInCallAudioMode) return this._nativeInCallAudioMode = l, !this.disableReactNativeAutoDeviceManagement("audio") && Qr(this._callState, this._isPreparingToJoin) && this.nativeUtils().setAudioMode(this._nativeInCallAudioMode), this;
|
|
8323
8323
|
} else console.error("invalid in-call audio mode specified: ", l);
|
|
8324
|
-
} }, { key: "preAuth", value: (
|
|
8324
|
+
} }, { key: "preAuth", value: (ae = J(function* () {
|
|
8325
8325
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8326
|
-
if (
|
|
8327
|
-
return this.validateProperties(g), this.properties =
|
|
8326
|
+
if (Ge(this._callObjectMode, "preAuth()"), jn(this._callState, this._isPreparingToJoin, "preAuth()"), this.needsLoad() && (yield this.load(g)), !g.url) throw new Error("preAuth() requires at least a url to be provided");
|
|
8327
|
+
return this.validateProperties(g), this.properties = j(j({}, this.properties), g), new Promise(function(p, S) {
|
|
8328
8328
|
l._preloadCache.inputSettings = l._prepInputSettingsForSharing(l._inputSettings, !1), l.sendMessageToCallMachine({ action: "daily-method-preauth", properties: Vt(l.properties, l.callClientId), preloadCache: Vt(l._preloadCache, l.callClientId) }, function(k) {
|
|
8329
8329
|
return k.error ? S(k.error) : k.access ? (l._didPreAuth = !0, void p({ access: k.access })) : S(new Error("unknown error in preAuth()"));
|
|
8330
8330
|
});
|
|
8331
8331
|
});
|
|
8332
8332
|
}), function() {
|
|
8333
|
-
return
|
|
8334
|
-
}) }, { key: "load", value: (
|
|
8333
|
+
return ae.apply(this, arguments);
|
|
8334
|
+
}) }, { key: "load", value: (B = J(function* (l) {
|
|
8335
8335
|
var g = this;
|
|
8336
8336
|
if (this.needsLoad()) {
|
|
8337
8337
|
if (this._destroyed && (this._logUseAfterDestroy(), this.strictMode)) throw new Error("Use after destroy");
|
|
8338
|
-
if (l && (this.validateProperties(l), this.properties =
|
|
8338
|
+
if (l && (this.validateProperties(l), this.properties = j(j({}, this.properties), l)), !this._callObjectMode && !this.properties.url) throw new Error("can't load iframe meeting because url property isn't set");
|
|
8339
8339
|
return this._updateCallState(Zo), this.emitDailyJSEvent({ action: Dd }), this._callObjectMode ? new Promise(function(p, S) {
|
|
8340
8340
|
g._callObjectLoader.cancel();
|
|
8341
8341
|
var k = Date.now();
|
|
@@ -8344,8 +8344,8 @@ var Qu = function() {
|
|
|
8344
8344
|
}, function(T, O) {
|
|
8345
8345
|
if (g.emitDailyJSEvent({ action: Ld }), !O) {
|
|
8346
8346
|
g._updateCallState(yt), g.resetMeetingDependentVars();
|
|
8347
|
-
var
|
|
8348
|
-
g._maybeSendToSentry(
|
|
8347
|
+
var I = { action: as, errorMsg: T.msg, error: { type: "connection-error", msg: "Failed to load call object bundle.", details: { on: "load", sourceError: T, bundleUrl: tn(g.properties.dailyConfig) } } };
|
|
8348
|
+
g._maybeSendToSentry(I), g.emitDailyJSEvent(I), S(T.msg);
|
|
8349
8349
|
}
|
|
8350
8350
|
});
|
|
8351
8351
|
}) : (this._iframe.src = Ta(this.assembleMeetingUrl(), this.properties.dailyConfig), new Promise(function(p, S) {
|
|
@@ -8355,7 +8355,7 @@ var Qu = function() {
|
|
|
8355
8355
|
}));
|
|
8356
8356
|
}
|
|
8357
8357
|
}), function(l) {
|
|
8358
|
-
return
|
|
8358
|
+
return B.apply(this, arguments);
|
|
8359
8359
|
}) }, { key: "join", value: (N = J(function* () {
|
|
8360
8360
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8361
8361
|
if (this._testCallInProgress && this.stopTestCallQuality(), !g.url && !this.properties.url) {
|
|
@@ -8376,34 +8376,34 @@ var Qu = function() {
|
|
|
8376
8376
|
if (g.token && g.token !== this.properties.token) return console.error("token in join() is different than the one used in preAuth()"), this.updateIsPreparingToJoin(!1), Promise.reject();
|
|
8377
8377
|
}
|
|
8378
8378
|
if (g.url && !this._callObjectMode && g.url && g.url !== this.properties.url) return console.error("url in join() is different than the one used in load() (".concat(this.properties.url, " -> ").concat(g.url, ")")), this.updateIsPreparingToJoin(!1), Promise.reject();
|
|
8379
|
-
this.validateProperties(g), this.properties =
|
|
8379
|
+
this.validateProperties(g), this.properties = j(j({}, this.properties), g);
|
|
8380
8380
|
}
|
|
8381
8381
|
return g.showLocalVideo !== void 0 && (this._callObjectMode ? console.error("showLocalVideo is not available in callObject mode") : this._showLocalVideo = !!g.showLocalVideo), g.showParticipantsBar !== void 0 && (this._callObjectMode ? console.error("showParticipantsBar is not available in callObject mode") : this._showParticipantsBar = !!g.showParticipantsBar), this._callState === Pt || this._callState === ai ? (console.warn("already joined meeting, call leave() before joining again"), void this.updateIsPreparingToJoin(!1)) : (this._updateCallState(ai, !1), this.emitDailyJSEvent({ action: Rd }), this._preloadCache.inputSettings = this._prepInputSettingsForSharing(this._inputSettings || {}, !1), this.sendMessageToCallMachine({ action: "join-meeting", properties: Vt(this.properties, this.callClientId), preloadCache: Vt(this._preloadCache, this.callClientId) }, function(k) {
|
|
8382
8382
|
k.error && l._joinedCallback && (l._joinedCallback(null, k.error), l._joinedCallback = null);
|
|
8383
8383
|
}), new Promise(function(k, T) {
|
|
8384
|
-
l._joinedCallback = function(O,
|
|
8384
|
+
l._joinedCallback = function(O, I) {
|
|
8385
8385
|
if (l._callState !== yt) {
|
|
8386
|
-
if (
|
|
8386
|
+
if (I) return l._updateCallState(bt), void T(I);
|
|
8387
8387
|
if (l._updateCallState(Pt), O) for (var R in O) {
|
|
8388
8388
|
if (l._callObjectMode) {
|
|
8389
8389
|
var W = l._callMachine().store;
|
|
8390
8390
|
vs(O[R], W), ws(O[R], W), Ss(O[R], l._participants[R], W);
|
|
8391
8391
|
}
|
|
8392
|
-
l._participants[R] =
|
|
8392
|
+
l._participants[R] = j({}, O[R]), l.toggleParticipantAudioBasedOnNativeAudioFocus();
|
|
8393
8393
|
}
|
|
8394
8394
|
S && l.loadCss(l.properties), k(O);
|
|
8395
|
-
} else T(
|
|
8395
|
+
} else T(I);
|
|
8396
8396
|
};
|
|
8397
8397
|
}));
|
|
8398
8398
|
}), function() {
|
|
8399
8399
|
return N.apply(this, arguments);
|
|
8400
|
-
}) }, { key: "leave", value: (
|
|
8400
|
+
}) }, { key: "leave", value: (P = J(function* () {
|
|
8401
8401
|
var l = this;
|
|
8402
8402
|
return this._testCallInProgress && this.stopTestCallQuality(), new Promise(function(g) {
|
|
8403
8403
|
l._callState === bt || l._callState === yt ? g() : l._callObjectLoader && !l._callObjectLoader.loaded ? (l._callObjectLoader.cancel(), l._updateCallState(bt), l.resetMeetingDependentVars(), l.emitDailyJSEvent({ action: bt }), g()) : (l._resolveLeave = g, l.sendMessageToCallMachine({ action: "leave-meeting" }));
|
|
8404
8404
|
});
|
|
8405
8405
|
}), function() {
|
|
8406
|
-
return
|
|
8406
|
+
return P.apply(this, arguments);
|
|
8407
8407
|
}) }, { key: "startScreenShare", value: (L = J(function* () {
|
|
8408
8408
|
var l = this, g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8409
8409
|
if (Kr(this._callMachineInitialized, "startScreenShare()"), g.screenVideoSendSettings && this._validateVideoSendSettings("screenVideo", g.screenVideoSendSettings), g.mediaStream && (this._sharedTracks.screenMediaStream = g.mediaStream, g.mediaStream = gt), typeof DailyNativeUtils < "u" && DailyNativeUtils.isIOS !== void 0 && DailyNativeUtils.isIOS) {
|
|
@@ -8420,16 +8420,16 @@ var Qu = function() {
|
|
|
8420
8420
|
} }, { key: "startRecording", value: function() {
|
|
8421
8421
|
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, g = l.type;
|
|
8422
8422
|
if (g && g !== "cloud" && g !== "cloud-audio-only" && g !== "raw-tracks" && g !== "local") throw new Error("invalid type: ".concat(g, ", allowed values 'cloud', 'cloud-audio-only', 'raw-tracks', or 'local'"));
|
|
8423
|
-
this.sendMessageToCallMachine(
|
|
8423
|
+
this.sendMessageToCallMachine(j({ action: "local-recording-start" }, l));
|
|
8424
8424
|
} }, { key: "updateRecording", value: function(l) {
|
|
8425
8425
|
var g = l.layout, p = g === void 0 ? { preset: "default" } : g, S = l.instanceId;
|
|
8426
8426
|
this.sendMessageToCallMachine({ action: "daily-method-update-recording", layout: p, instanceId: S });
|
|
8427
8427
|
} }, { key: "stopRecording", value: function() {
|
|
8428
8428
|
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8429
|
-
this.sendMessageToCallMachine(
|
|
8429
|
+
this.sendMessageToCallMachine(j({ action: "local-recording-stop" }, l));
|
|
8430
8430
|
} }, { key: "startLiveStreaming", value: function() {
|
|
8431
8431
|
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8432
|
-
this.sendMessageToCallMachine(
|
|
8432
|
+
this.sendMessageToCallMachine(j({ action: "daily-method-start-live-streaming" }, l));
|
|
8433
8433
|
} }, { key: "updateLiveStreaming", value: function(l) {
|
|
8434
8434
|
var g = l.layout, p = g === void 0 ? { preset: "default" } : g, S = l.instanceId;
|
|
8435
8435
|
this.sendMessageToCallMachine({ action: "daily-method-update-live-streaming", layout: p, instanceId: S });
|
|
@@ -8441,7 +8441,7 @@ var Qu = function() {
|
|
|
8441
8441
|
this.sendMessageToCallMachine({ action: ds, endpointsOp: _u, endpoints: g, instanceId: p });
|
|
8442
8442
|
} }, { key: "stopLiveStreaming", value: function() {
|
|
8443
8443
|
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
8444
|
-
this.sendMessageToCallMachine(
|
|
8444
|
+
this.sendMessageToCallMachine(j({ action: "daily-method-stop-live-streaming" }, l));
|
|
8445
8445
|
} }, { key: "validateDailyConfig", value: function(l) {
|
|
8446
8446
|
l.camSimulcastEncodings && (console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."), this.validateSimulcastEncodings(l.camSimulcastEncodings)), l.screenSimulcastEncodings && console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."), Wa() && l.noAutoDefaultDeviceChange && console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.");
|
|
8447
8447
|
} }, { key: "validateSimulcastEncodings", value: function(l) {
|
|
@@ -8454,8 +8454,8 @@ var Qu = function() {
|
|
|
8454
8454
|
for (var T in this._validateEncodingLayerHasValidProperties(k), k) if ($n.includes(T)) {
|
|
8455
8455
|
if (typeof k[T] != "number") throw new Error("".concat(T, " must be a number"));
|
|
8456
8456
|
if (g) {
|
|
8457
|
-
var O = g[T],
|
|
8458
|
-
if (!js(k[T],
|
|
8457
|
+
var O = g[T], I = O.min, R = O.max;
|
|
8458
|
+
if (!js(k[T], I, R)) throw new Error("".concat(T, " value not in range. valid range: ").concat(I, " to ").concat(R));
|
|
8459
8459
|
}
|
|
8460
8460
|
} else if (!["active", "scalabilityMode"].includes(T)) throw new Error("Invalid key ".concat(T, ", valid keys are:") + Object.values($n));
|
|
8461
8461
|
if (p && !k.hasOwnProperty("maxBitrate")) throw new Error("maxBitrate is not specified");
|
|
@@ -8477,8 +8477,8 @@ var Qu = function() {
|
|
|
8477
8477
|
{state: "play"|"pause", simulcastEncodings?: [{}] } }`), T;
|
|
8478
8478
|
}
|
|
8479
8479
|
return new Promise(function(T, O) {
|
|
8480
|
-
g.sendMessageToCallMachine({ action: "daily-method-start-remote-media-player", url: p, settings: k }, function(
|
|
8481
|
-
|
|
8480
|
+
g.sendMessageToCallMachine({ action: "daily-method-start-remote-media-player", url: p, settings: k }, function(I) {
|
|
8481
|
+
I.error ? O({ error: I.error, errorMsg: I.errorMsg }) : T({ session_id: I.session_id, remoteMediaPlayerState: { state: I.state, settings: I.settings } });
|
|
8482
8482
|
});
|
|
8483
8483
|
});
|
|
8484
8484
|
}), function(l) {
|
|
@@ -8510,16 +8510,16 @@ var Qu = function() {
|
|
|
8510
8510
|
}), function(l) {
|
|
8511
8511
|
return w.apply(this, arguments);
|
|
8512
8512
|
}) }, { key: "startTranscription", value: function(l) {
|
|
8513
|
-
me(this._callState, "startTranscription()"), this.sendMessageToCallMachine(
|
|
8513
|
+
me(this._callState, "startTranscription()"), this.sendMessageToCallMachine(j({ action: "daily-method-start-transcription" }, l));
|
|
8514
8514
|
} }, { key: "updateTranscription", value: function(l) {
|
|
8515
8515
|
if (me(this._callState, "updateTranscription()"), !l) throw new Error("updateTranscription Error: options is mandatory");
|
|
8516
|
-
if (
|
|
8516
|
+
if (ce(l) !== "object") throw new Error("updateTranscription Error: options must be object type");
|
|
8517
8517
|
if (l.participants && !Array.isArray(l.participants)) throw new Error("updateTranscription Error: participants must be an array");
|
|
8518
|
-
this.sendMessageToCallMachine(
|
|
8518
|
+
this.sendMessageToCallMachine(j({ action: "daily-method-update-transcription" }, l));
|
|
8519
8519
|
} }, { key: "stopTranscription", value: function(l) {
|
|
8520
|
-
if (me(this._callState, "stopTranscription()"), l &&
|
|
8520
|
+
if (me(this._callState, "stopTranscription()"), l && ce(l) !== "object") throw new Error("stopTranscription Error: options must be object type");
|
|
8521
8521
|
if (l && !l.instanceId) throw new Error('"instanceId" not provided');
|
|
8522
|
-
this.sendMessageToCallMachine(
|
|
8522
|
+
this.sendMessageToCallMachine(j({ action: "daily-method-stop-transcription" }, l));
|
|
8523
8523
|
} }, { key: "startDialOut", value: (v = J(function* (l) {
|
|
8524
8524
|
var g = this;
|
|
8525
8525
|
me(this._callState, "startDialOut()");
|
|
@@ -8527,9 +8527,9 @@ var Qu = function() {
|
|
|
8527
8527
|
if (O) {
|
|
8528
8528
|
if (!Array.isArray(O)) throw new Error("Error starting dial out: audio codec must be an array");
|
|
8529
8529
|
if (O.length <= 0) throw new Error("Error starting dial out: audio codec array specified but empty");
|
|
8530
|
-
O.forEach(function(
|
|
8531
|
-
if (typeof
|
|
8532
|
-
if (
|
|
8530
|
+
O.forEach(function(I) {
|
|
8531
|
+
if (typeof I != "string") throw new Error("Error starting dial out: audio codec must be a string");
|
|
8532
|
+
if (I !== "OPUS" && I !== "PCMU" && I !== "PCMA" && I !== "G722") throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722");
|
|
8533
8533
|
});
|
|
8534
8534
|
}
|
|
8535
8535
|
};
|
|
@@ -8543,9 +8543,9 @@ var Qu = function() {
|
|
|
8543
8543
|
if (O && (p(O.audio), O.video)) {
|
|
8544
8544
|
if (!Array.isArray(O.video)) throw new Error("Error starting dial out: video codec must be an array");
|
|
8545
8545
|
if (O.video.length <= 0) throw new Error("Error starting dial out: video codec array specified but empty");
|
|
8546
|
-
O.video.forEach(function(
|
|
8547
|
-
if (typeof
|
|
8548
|
-
if (
|
|
8546
|
+
O.video.forEach(function(I) {
|
|
8547
|
+
if (typeof I != "string") throw new Error("Error starting dial out: video codec must be a string");
|
|
8548
|
+
if (I !== "H264" && I !== "VP8") throw new Error("Error starting dial out: video codec must be H264 or VP8");
|
|
8549
8549
|
});
|
|
8550
8550
|
}
|
|
8551
8551
|
})(l.codecs);
|
|
@@ -8568,7 +8568,7 @@ var Qu = function() {
|
|
|
8568
8568
|
if (l.userId.length > 36) throw new Error("Error starting dial out: userId length must be less than or equal to 36");
|
|
8569
8569
|
}
|
|
8570
8570
|
if (Ns(l), l.permissions && l.permissions.canReceive) {
|
|
8571
|
-
var S =
|
|
8571
|
+
var S = Ae(rc.validateJSONObject(l.permissions.canReceive), 2), k = S[0], T = S[1];
|
|
8572
8572
|
if (!k) throw new Error(T);
|
|
8573
8573
|
}
|
|
8574
8574
|
if (l.provider) {
|
|
@@ -8576,9 +8576,9 @@ var Qu = function() {
|
|
|
8576
8576
|
if (l.phoneNumber) throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");
|
|
8577
8577
|
console.warn("(pre-beta) provider=daily is currently in pre-beta, things might break!");
|
|
8578
8578
|
}
|
|
8579
|
-
return new Promise(function(O,
|
|
8580
|
-
g.sendMessageToCallMachine(
|
|
8581
|
-
R.error ?
|
|
8579
|
+
return new Promise(function(O, I) {
|
|
8580
|
+
g.sendMessageToCallMachine(j({ action: "dialout-start" }, l), function(R) {
|
|
8581
|
+
R.error ? I(R.error) : O(R);
|
|
8582
8582
|
});
|
|
8583
8583
|
});
|
|
8584
8584
|
}), function(l) {
|
|
@@ -8586,7 +8586,7 @@ var Qu = function() {
|
|
|
8586
8586
|
}) }, { key: "stopDialOut", value: function(l) {
|
|
8587
8587
|
var g = this;
|
|
8588
8588
|
return me(this._callState, "stopDialOut()"), new Promise(function(p, S) {
|
|
8589
|
-
g.sendMessageToCallMachine(
|
|
8589
|
+
g.sendMessageToCallMachine(j({ action: "dialout-stop" }, l), function(k) {
|
|
8590
8590
|
k.error ? S(k.error) : p(k);
|
|
8591
8591
|
});
|
|
8592
8592
|
});
|
|
@@ -8594,7 +8594,7 @@ var Qu = function() {
|
|
|
8594
8594
|
var g = this;
|
|
8595
8595
|
if (me(this._callState, "sipCallTransfer()"), !l) throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");
|
|
8596
8596
|
return l.useSipRefer = !1, Fs(l, "sipCallTransfer"), Ns(l), new Promise(function(p, S) {
|
|
8597
|
-
g.sendMessageToCallMachine(
|
|
8597
|
+
g.sendMessageToCallMachine(j({ action: us }, l), function(k) {
|
|
8598
8598
|
k.error ? S(k.error) : p(k);
|
|
8599
8599
|
});
|
|
8600
8600
|
});
|
|
@@ -8604,7 +8604,7 @@ var Qu = function() {
|
|
|
8604
8604
|
var g = this;
|
|
8605
8605
|
if (me(this._callState, "sipRefer()"), !l) throw new Error("sessionId and toEndPoint are mandatory parameter");
|
|
8606
8606
|
return l.useSipRefer = !0, Fs(l, "sipRefer"), new Promise(function(p, S) {
|
|
8607
|
-
g.sendMessageToCallMachine(
|
|
8607
|
+
g.sendMessageToCallMachine(j({ action: us }, l), function(k) {
|
|
8608
8608
|
k.error ? S(k.error) : p(k);
|
|
8609
8609
|
});
|
|
8610
8610
|
});
|
|
@@ -8620,7 +8620,7 @@ var Qu = function() {
|
|
|
8620
8620
|
var T = /[^0-9A-D*#]/g, O = k.match(T);
|
|
8621
8621
|
if (O && O[0]) throw new Error("".concat(O[0], " is not valid DTMF tone"));
|
|
8622
8622
|
}(l), new Promise(function(p, S) {
|
|
8623
|
-
g.sendMessageToCallMachine(
|
|
8623
|
+
g.sendMessageToCallMachine(j({ action: "send-dtmf" }, l), function(k) {
|
|
8624
8624
|
k.error ? S(k.error) : p(k);
|
|
8625
8625
|
});
|
|
8626
8626
|
});
|
|
@@ -8628,9 +8628,9 @@ var Qu = function() {
|
|
|
8628
8628
|
return b.apply(this, arguments);
|
|
8629
8629
|
}) }, { key: "getNetworkStats", value: function() {
|
|
8630
8630
|
var l = this;
|
|
8631
|
-
return this._callState !== Pt ? Promise.resolve(
|
|
8631
|
+
return this._callState !== Pt ? Promise.resolve(j({ stats: { latest: {} } }, this._network)) : new Promise(function(g) {
|
|
8632
8632
|
l.sendMessageToCallMachine({ action: "get-calc-stats" }, function(p) {
|
|
8633
|
-
g(
|
|
8633
|
+
g(j(j({}, l._network), {}, { stats: p.stats }));
|
|
8634
8634
|
});
|
|
8635
8635
|
});
|
|
8636
8636
|
} }, { key: "testWebsocketConnectivity", value: (f = J(function* () {
|
|
@@ -8653,7 +8653,7 @@ var Qu = function() {
|
|
|
8653
8653
|
return l ? l instanceof MediaStreamTrack ? !!Ku(l) || (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);
|
|
8654
8654
|
} }, { key: "testCallQuality", value: (h = J(function* () {
|
|
8655
8655
|
var l = this;
|
|
8656
|
-
|
|
8656
|
+
oe(), Ge(this._callObjectMode, "testCallQuality()"), Kr(this._callMachineInitialized, "testCallQuality()", null, !0), jn(this._callState, this._isPreparingToJoin, "testCallQuality()");
|
|
8657
8657
|
var g = this._testCallAlreadyInProgress, p = function(k) {
|
|
8658
8658
|
g || (l._testCallInProgress = k);
|
|
8659
8659
|
};
|
|
@@ -8665,12 +8665,12 @@ var Qu = function() {
|
|
|
8665
8665
|
}
|
|
8666
8666
|
return new Promise(function(k) {
|
|
8667
8667
|
l.sendMessageToCallMachine({ action: "test-call-quality", dailyJsVersion: l.properties.dailyJsVersion }, function(T) {
|
|
8668
|
-
var O = T.results,
|
|
8669
|
-
if (
|
|
8670
|
-
var W, re =
|
|
8671
|
-
(W = R.error) !== null && W !== void 0 && W.details ? (R.error.details = JSON.parse(R.error.details), re.error =
|
|
8668
|
+
var O = T.results, I = O.result, R = Ki(O, Gu);
|
|
8669
|
+
if (I === "failed") {
|
|
8670
|
+
var W, re = j({}, R);
|
|
8671
|
+
(W = R.error) !== null && W !== void 0 && W.details ? (R.error.details = JSON.parse(R.error.details), re.error = j(j({}, re.error), {}, { details: j({}, re.error.details) }), re.error.details.duringTest = "testCallQuality") : (re.error = re.error ? j({}, re.error) : {}, re.error.details = { duringTest: "testCallQuality" }), l._maybeSendToSentry(re);
|
|
8672
8672
|
}
|
|
8673
|
-
p(!1), k(
|
|
8673
|
+
p(!1), k(j({ result: I }, R));
|
|
8674
8674
|
});
|
|
8675
8675
|
});
|
|
8676
8676
|
}), function() {
|
|
@@ -8679,7 +8679,7 @@ var Qu = function() {
|
|
|
8679
8679
|
this.sendMessageToCallMachine({ action: "stop-test-call-quality" });
|
|
8680
8680
|
} }, { key: "testConnectionQuality", value: (u = J(function* (l) {
|
|
8681
8681
|
var g;
|
|
8682
|
-
|
|
8682
|
+
se() ? (console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"), g = yield this.testPeerToPeerCallQuality(l)) : (console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"), g = yield this.testCallQuality());
|
|
8683
8683
|
var p = { result: g.result, secondsElapsed: g.secondsElapsed };
|
|
8684
8684
|
return g.data && (p.data = { maxRTT: g.data.maxRoundTripTime, packetLoss: g.data.avgRecvPacketLoss }), p;
|
|
8685
8685
|
}), function(l) {
|
|
@@ -8701,7 +8701,7 @@ var Qu = function() {
|
|
|
8701
8701
|
}), function(l) {
|
|
8702
8702
|
return d.apply(this, arguments);
|
|
8703
8703
|
}) }, { key: "stopTestConnectionQuality", value: function() {
|
|
8704
|
-
|
|
8704
|
+
se() ? (console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"), this.stopTestPeerToPeerCallQuality()) : (console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"), this.stopTestCallQuality());
|
|
8705
8705
|
} }, { key: "stopTestPeerToPeerCallQuality", value: function() {
|
|
8706
8706
|
this.sendMessageToCallMachine({ action: "stop-test-p2p-call-quality" });
|
|
8707
8707
|
} }, { key: "testNetworkConnectivity", value: (c = J(function* (l) {
|
|
@@ -8736,7 +8736,7 @@ var Qu = function() {
|
|
|
8736
8736
|
if (typeof g == "string") {
|
|
8737
8737
|
if (!p.includes(g)) throw new Error(S);
|
|
8738
8738
|
} else {
|
|
8739
|
-
if (
|
|
8739
|
+
if (ce(g) !== "object") throw new Error(S);
|
|
8740
8740
|
if (!g.maxQuality && !g.encodings && g.allowAdaptiveLayers === void 0) throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");
|
|
8741
8741
|
if (g.maxQuality && ["low", "medium", "high"].indexOf(g.maxQuality) === -1) throw new Error("maxQuality must be either low, medium or high");
|
|
8742
8742
|
if (g.encodings) {
|
|
@@ -8762,7 +8762,7 @@ var Qu = function() {
|
|
|
8762
8762
|
var g = this;
|
|
8763
8763
|
if (!l || Object.keys(l).length === 0) throw new Error("Send settings must contain at least information for one track!");
|
|
8764
8764
|
Object.entries(l).forEach(function(p) {
|
|
8765
|
-
var S =
|
|
8765
|
+
var S = Ae(p, 2), k = S[0], T = S[1];
|
|
8766
8766
|
g._validateVideoSendSettings(k, T);
|
|
8767
8767
|
});
|
|
8768
8768
|
} }, { key: "updateSendSettings", value: function(l) {
|
|
@@ -8779,11 +8779,11 @@ var Qu = function() {
|
|
|
8779
8779
|
} }, { key: "getRemoteParticipantsAudioLevel", value: function() {
|
|
8780
8780
|
return this._remoteParticipantsAudioLevel;
|
|
8781
8781
|
} }, { key: "getActiveSpeaker", value: function() {
|
|
8782
|
-
return
|
|
8782
|
+
return oe(), this._activeSpeaker;
|
|
8783
8783
|
} }, { key: "setActiveSpeakerMode", value: function(l) {
|
|
8784
|
-
return
|
|
8784
|
+
return oe(), this.sendMessageToCallMachine({ action: "set-active-speaker-mode", enabled: l }), this;
|
|
8785
8785
|
} }, { key: "activeSpeakerMode", value: function() {
|
|
8786
|
-
return
|
|
8786
|
+
return oe(), this._activeSpeakerMode;
|
|
8787
8787
|
} }, { key: "subscribeToTracksAutomatically", value: function() {
|
|
8788
8788
|
return this._preloadCache.subscribeToTracksAutomatically;
|
|
8789
8789
|
} }, { key: "setSubscribeToTracksAutomatically", value: function(l) {
|
|
@@ -8796,7 +8796,7 @@ var Qu = function() {
|
|
|
8796
8796
|
return p.kind !== "audiooutput";
|
|
8797
8797
|
})), { devices: g.map(function(p) {
|
|
8798
8798
|
var S = JSON.parse(JSON.stringify(p));
|
|
8799
|
-
if (!
|
|
8799
|
+
if (!se() && p.kind === "videoinput" && p.getCapabilities) {
|
|
8800
8800
|
var k, T = p.getCapabilities();
|
|
8801
8801
|
S.facing = (T == null || (k = T.facingMode) === null || k === void 0 ? void 0 : k.length) >= 1 ? T.facingMode[0] : void 0;
|
|
8802
8802
|
}
|
|
@@ -8815,26 +8815,26 @@ var Qu = function() {
|
|
|
8815
8815
|
if (me(this._callState, "sendAppMessage()"), JSON.stringify(l).length > this._maxAppMessageSize) throw new Error("Message data too large. Max size is " + this._maxAppMessageSize);
|
|
8816
8816
|
return this.sendMessageToCallMachine({ action: "app-msg", data: l, to: g }), this;
|
|
8817
8817
|
} }, { key: "addFakeParticipant", value: function(l) {
|
|
8818
|
-
return
|
|
8818
|
+
return oe(), me(this._callState, "addFakeParticipant()"), this.sendMessageToCallMachine(j({ action: "add-fake-participant" }, l)), this;
|
|
8819
8819
|
} }, { key: "setShowNamesMode", value: function(l) {
|
|
8820
|
-
return Re(this._callObjectMode, "setShowNamesMode()"),
|
|
8820
|
+
return Re(this._callObjectMode, "setShowNamesMode()"), oe(), l && l !== "always" && l !== "never" ? (console.error('setShowNamesMode argument should be "always", "never", or false'), this) : (this.sendMessageToCallMachine({ action: "set-show-names", mode: l }), this);
|
|
8821
8821
|
} }, { key: "setShowLocalVideo", value: function() {
|
|
8822
8822
|
var l = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
|
|
8823
|
-
return Re(this._callObjectMode, "setShowLocalVideo()"),
|
|
8823
|
+
return Re(this._callObjectMode, "setShowLocalVideo()"), oe(), me(this._callState, "setShowLocalVideo()"), typeof l != "boolean" ? (console.error("setShowLocalVideo only accepts a boolean value"), this) : (this.sendMessageToCallMachine({ action: "set-show-local-video", show: l }), this._showLocalVideo = l, this);
|
|
8824
8824
|
} }, { key: "showLocalVideo", value: function() {
|
|
8825
|
-
return Re(this._callObjectMode, "showLocalVideo()"),
|
|
8825
|
+
return Re(this._callObjectMode, "showLocalVideo()"), oe(), this._showLocalVideo;
|
|
8826
8826
|
} }, { key: "setShowParticipantsBar", value: function() {
|
|
8827
8827
|
var l = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
|
|
8828
|
-
return Re(this._callObjectMode, "setShowParticipantsBar()"),
|
|
8828
|
+
return Re(this._callObjectMode, "setShowParticipantsBar()"), oe(), me(this._callState, "setShowParticipantsBar()"), typeof l != "boolean" ? (console.error("setShowParticipantsBar only accepts a boolean value"), this) : (this.sendMessageToCallMachine({ action: "set-show-participants-bar", show: l }), this._showParticipantsBar = l, this);
|
|
8829
8829
|
} }, { key: "showParticipantsBar", value: function() {
|
|
8830
|
-
return Re(this._callObjectMode, "showParticipantsBar()"),
|
|
8830
|
+
return Re(this._callObjectMode, "showParticipantsBar()"), oe(), this._showParticipantsBar;
|
|
8831
8831
|
} }, { key: "customIntegrations", value: function() {
|
|
8832
|
-
return
|
|
8832
|
+
return oe(), Re(this._callObjectMode, "customIntegrations()"), this._customIntegrations;
|
|
8833
8833
|
} }, { key: "setCustomIntegrations", value: function(l) {
|
|
8834
|
-
return
|
|
8834
|
+
return oe(), Re(this._callObjectMode, "setCustomIntegrations()"), me(this._callState, "setCustomIntegrations()"), hc(l) ? (this.sendMessageToCallMachine({ action: "set-custom-integrations", integrations: l }), this._customIntegrations = l, this) : this;
|
|
8835
8835
|
} }, { key: "startCustomIntegrations", value: function(l) {
|
|
8836
8836
|
var g = this;
|
|
8837
|
-
if (
|
|
8837
|
+
if (oe(), Re(this._callObjectMode, "startCustomIntegrations()"), me(this._callState, "startCustomIntegrations()"), Array.isArray(l) && l.some(function(k) {
|
|
8838
8838
|
return typeof k != "string";
|
|
8839
8839
|
}) || !Array.isArray(l) && typeof l != "string") return console.error("startCustomIntegrations() only accepts string | string[]"), this;
|
|
8840
8840
|
var p = typeof l == "string" ? [l] : l, S = p.filter(function(k) {
|
|
@@ -8843,7 +8843,7 @@ var Qu = function() {
|
|
|
8843
8843
|
return S.length ? (console.error(`Can't find custom integration(s): "`.concat(S.join(", "), '"')), this) : (this.sendMessageToCallMachine({ action: "start-custom-integrations", ids: p }), this);
|
|
8844
8844
|
} }, { key: "stopCustomIntegrations", value: function(l) {
|
|
8845
8845
|
var g = this;
|
|
8846
|
-
if (
|
|
8846
|
+
if (oe(), Re(this._callObjectMode, "stopCustomIntegrations()"), me(this._callState, "stopCustomIntegrations()"), Array.isArray(l) && l.some(function(k) {
|
|
8847
8847
|
return typeof k != "string";
|
|
8848
8848
|
}) || !Array.isArray(l) && typeof l != "string") return console.error("stopCustomIntegrations() only accepts string | string[]"), this;
|
|
8849
8849
|
var p = typeof l == "string" ? [l] : l, S = p.filter(function(k) {
|
|
@@ -8851,16 +8851,16 @@ var Qu = function() {
|
|
|
8851
8851
|
});
|
|
8852
8852
|
return S.length ? (console.error(`Can't find custom integration(s): "`.concat(S.join(", "), '"')), this) : (this.sendMessageToCallMachine({ action: "stop-custom-integrations", ids: p }), this);
|
|
8853
8853
|
} }, { key: "customTrayButtons", value: function() {
|
|
8854
|
-
return Re(this._callObjectMode, "customTrayButtons()"),
|
|
8854
|
+
return Re(this._callObjectMode, "customTrayButtons()"), oe(), this._customTrayButtons;
|
|
8855
8855
|
} }, { key: "updateCustomTrayButtons", value: function(l) {
|
|
8856
|
-
return Re(this._callObjectMode, "updateCustomTrayButtons()"),
|
|
8856
|
+
return Re(this._callObjectMode, "updateCustomTrayButtons()"), oe(), me(this._callState, "updateCustomTrayButtons()"), uc(l) ? (this.sendMessageToCallMachine({ action: "update-custom-tray-buttons", btns: l }), this._customTrayButtons = l, this) : (console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(dn))), this);
|
|
8857
8857
|
} }, { key: "theme", value: function() {
|
|
8858
8858
|
return Re(this._callObjectMode, "theme()"), this.properties.theme;
|
|
8859
8859
|
} }, { key: "setTheme", value: function(l) {
|
|
8860
8860
|
var g = this;
|
|
8861
8861
|
return Re(this._callObjectMode, "setTheme()"), new Promise(function(p, S) {
|
|
8862
8862
|
try {
|
|
8863
|
-
g.validateProperties({ theme: l }), g.properties.theme =
|
|
8863
|
+
g.validateProperties({ theme: l }), g.properties.theme = j({}, l), g.sendMessageToCallMachine({ action: "set-theme", theme: g.properties.theme });
|
|
8864
8864
|
try {
|
|
8865
8865
|
g.emitDailyJSEvent({ action: Od, theme: g.properties.theme });
|
|
8866
8866
|
} catch (k) {
|
|
@@ -8872,7 +8872,7 @@ var Qu = function() {
|
|
|
8872
8872
|
}
|
|
8873
8873
|
});
|
|
8874
8874
|
} }, { key: "requestFullscreen", value: (s = J(function* () {
|
|
8875
|
-
if (
|
|
8875
|
+
if (oe(), this._iframe && !document.fullscreenElement && hs()) try {
|
|
8876
8876
|
(yield this._iframe.requestFullscreen) ? this._iframe.requestFullscreen() : this._iframe.webkitRequestFullscreen();
|
|
8877
8877
|
} catch (l) {
|
|
8878
8878
|
console.log("could not make video call fullscreen", l);
|
|
@@ -8880,7 +8880,7 @@ var Qu = function() {
|
|
|
8880
8880
|
}), function() {
|
|
8881
8881
|
return s.apply(this, arguments);
|
|
8882
8882
|
}) }, { key: "exitFullscreen", value: function() {
|
|
8883
|
-
|
|
8883
|
+
oe(), document.fullscreenElement ? document.exitFullscreen() : document.webkitFullscreenElement && document.webkitExitFullscreen();
|
|
8884
8884
|
} }, { key: "getSidebarView", value: (o = J(function* () {
|
|
8885
8885
|
var l = this;
|
|
8886
8886
|
return this._callObjectMode ? (console.error("getSidebarView is not available in callObject mode"), Promise.resolve(null)) : new Promise(function(g) {
|
|
@@ -8912,7 +8912,7 @@ var Qu = function() {
|
|
|
8912
8912
|
return r.apply(this, arguments);
|
|
8913
8913
|
}) }, { key: "setNetworkTopology", value: (t = J(function* (l) {
|
|
8914
8914
|
var g = this;
|
|
8915
|
-
return
|
|
8915
|
+
return oe(), me(this._callState, "setNetworkTopology()"), new Promise(function(p, S) {
|
|
8916
8916
|
g.sendMessageToCallMachine({ action: "set-network-topology", opts: l }, function(k) {
|
|
8917
8917
|
k.error ? S({ error: k.error }) : p({ workerId: k.workerId });
|
|
8918
8918
|
});
|
|
@@ -8929,7 +8929,7 @@ var Qu = function() {
|
|
|
8929
8929
|
}), function() {
|
|
8930
8930
|
return e.apply(this, arguments);
|
|
8931
8931
|
}) }, { key: "setPlayNewParticipantSound", value: function(l) {
|
|
8932
|
-
if (
|
|
8932
|
+
if (oe(), typeof l != "number" && l !== !0 && l !== !1) throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(l));
|
|
8933
8933
|
this.sendMessageToCallMachine({ action: "daily-method-set-play-ding", arg: l });
|
|
8934
8934
|
} }, { key: "on", value: function(l, g) {
|
|
8935
8935
|
return Pr.prototype.on.call(this, l, g);
|
|
@@ -8941,21 +8941,21 @@ var Qu = function() {
|
|
|
8941
8941
|
var g, p;
|
|
8942
8942
|
if (l != null && (g = l.dailyConfig) !== null && g !== void 0 && g.userMediaAudioConstraints) {
|
|
8943
8943
|
var S, k;
|
|
8944
|
-
|
|
8944
|
+
se() || console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");
|
|
8945
8945
|
var T = l.inputSettings || {};
|
|
8946
|
-
T.audio = ((S = l.inputSettings) === null || S === void 0 ? void 0 : S.audio) || {}, T.audio.settings = ((k = l.inputSettings) === null || k === void 0 || (k = k.audio) === null || k === void 0 ? void 0 : k.settings) || {}, T.audio.settings =
|
|
8946
|
+
T.audio = ((S = l.inputSettings) === null || S === void 0 ? void 0 : S.audio) || {}, T.audio.settings = ((k = l.inputSettings) === null || k === void 0 || (k = k.audio) === null || k === void 0 ? void 0 : k.settings) || {}, T.audio.settings = j(j({}, T.audio.settings), l.dailyConfig.userMediaAudioConstraints), l.inputSettings = T, delete l.dailyConfig.userMediaAudioConstraints;
|
|
8947
8947
|
}
|
|
8948
8948
|
if (l != null && (p = l.dailyConfig) !== null && p !== void 0 && p.userMediaVideoConstraints) {
|
|
8949
|
-
var O,
|
|
8950
|
-
|
|
8949
|
+
var O, I;
|
|
8950
|
+
se() || console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");
|
|
8951
8951
|
var R = l.inputSettings || {};
|
|
8952
|
-
R.video = ((O = l.inputSettings) === null || O === void 0 ? void 0 : O.video) || {}, R.video.settings = ((
|
|
8952
|
+
R.video = ((O = l.inputSettings) === null || O === void 0 ? void 0 : O.video) || {}, R.video.settings = ((I = l.inputSettings) === null || I === void 0 || (I = I.video) === null || I === void 0 ? void 0 : I.settings) || {}, R.video.settings = j(j({}, R.video.settings), l.dailyConfig.userMediaVideoConstraints), l.inputSettings = R, delete l.dailyConfig.userMediaVideoConstraints;
|
|
8953
8953
|
}
|
|
8954
8954
|
for (var W in l) if (Ot[W]) {
|
|
8955
8955
|
if (Ot[W].validate && !Ot[W].validate(l[W], this)) throw new Error("property '".concat(W, "': ").concat(Ot[W].help));
|
|
8956
8956
|
} else console.warn("Ignoring unrecognized property '".concat(W, "'")), delete l[W];
|
|
8957
8957
|
} }, { key: "assembleMeetingUrl", value: function() {
|
|
8958
|
-
var l, g, p =
|
|
8958
|
+
var l, g, p = j(j({}, this.properties), {}, { emb: this.callClientId, embHref: encodeURIComponent(window.location.href), proxy: (l = this.properties.dailyConfig) !== null && l !== void 0 && l.proxyUrl ? encodeURIComponent((g = this.properties.dailyConfig) === null || g === void 0 ? void 0 : g.proxyUrl) : void 0 }), S = p.url.match(/\?/) ? "&" : "?";
|
|
8959
8959
|
return p.url + S + Object.keys(Ot).filter(function(k) {
|
|
8960
8960
|
return Ot[k].queryString && p[k] !== void 0;
|
|
8961
8961
|
}).map(function(k) {
|
|
@@ -8975,7 +8975,7 @@ var Qu = function() {
|
|
|
8975
8975
|
} }, { key: "handleMessageFromCallMachine", value: function(l) {
|
|
8976
8976
|
switch (l.action) {
|
|
8977
8977
|
case Md:
|
|
8978
|
-
this.sendMessageToCallMachine(
|
|
8978
|
+
this.sendMessageToCallMachine(j({ action: Ad }, this.properties));
|
|
8979
8979
|
break;
|
|
8980
8980
|
case "call-machine-initialized":
|
|
8981
8981
|
this._callMachineInitialized = !0;
|
|
@@ -8986,7 +8986,7 @@ var Qu = function() {
|
|
|
8986
8986
|
this._loadedCallback && (this._loadedCallback(), this._loadedCallback = null), this.emitDailyJSEvent(l);
|
|
8987
8987
|
break;
|
|
8988
8988
|
case Nd:
|
|
8989
|
-
var p, S =
|
|
8989
|
+
var p, S = j({}, l);
|
|
8990
8990
|
delete S.internal, this._maxAppMessageSize = ((p = l.internal) === null || p === void 0 ? void 0 : p._maxAppMessageSize) || Pn, this._joinedCallback && (this._joinedCallback(l.participants), this._joinedCallback = null), this.emitDailyJSEvent(S);
|
|
8991
8991
|
break;
|
|
8992
8992
|
case Fd:
|
|
@@ -9003,7 +9003,7 @@ var Qu = function() {
|
|
|
9003
9003
|
} catch (Tc) {
|
|
9004
9004
|
console.error("track events error", Tc);
|
|
9005
9005
|
}
|
|
9006
|
-
this.compareEqualForParticipantUpdateEvent(l.participant, this._participants[k]) || (this._participants[k] =
|
|
9006
|
+
this.compareEqualForParticipantUpdateEvent(l.participant, this._participants[k]) || (this._participants[k] = j({}, l.participant), this.toggleParticipantAudioBasedOnNativeAudioFocus(), this.emitDailyJSEvent(l));
|
|
9007
9007
|
}
|
|
9008
9008
|
break;
|
|
9009
9009
|
case jd:
|
|
@@ -9016,13 +9016,13 @@ var Qu = function() {
|
|
|
9016
9016
|
Le(this._participantCounts, l.participantCounts) || (this._participantCounts = l.participantCounts, this.emitDailyJSEvent(l));
|
|
9017
9017
|
break;
|
|
9018
9018
|
case Hd:
|
|
9019
|
-
var
|
|
9020
|
-
l.awaitingAccess && (
|
|
9019
|
+
var I = { access: l.access };
|
|
9020
|
+
l.awaitingAccess && (I.awaitingAccess = l.awaitingAccess), Le(this._accessState, I) || (this._accessState = I, this.emitDailyJSEvent(l));
|
|
9021
9021
|
break;
|
|
9022
9022
|
case zd:
|
|
9023
9023
|
if (l.meetingSession) {
|
|
9024
9024
|
this._meetingSessionSummary = l.meetingSession, this.emitDailyJSEvent(l);
|
|
9025
|
-
var R =
|
|
9025
|
+
var R = j(j({}, l), {}, { action: "meeting-session-updated" });
|
|
9026
9026
|
this.emitDailyJSEvent(R);
|
|
9027
9027
|
}
|
|
9028
9028
|
break;
|
|
@@ -9039,8 +9039,8 @@ var Qu = function() {
|
|
|
9039
9039
|
l.devices && this.emitDailyJSEvent(l);
|
|
9040
9040
|
break;
|
|
9041
9041
|
case pu:
|
|
9042
|
-
var Oe = l.state, nt = l.threshold, it = l.quality,
|
|
9043
|
-
|
|
9042
|
+
var Oe = l.state, nt = l.threshold, it = l.quality, we = Oe.state, ee = Oe.reasons;
|
|
9043
|
+
we === this._network.networkState && Le(ee, this._network.networkStateReasons) && nt === this._network.threshold && it === this._network.quality || (this._network.networkState = we, this._network.networkStateReasons = ee, this._network.quality = it, this._network.threshold = nt, l.networkState = we, ee.length && (l.networkStateReasons = ee), delete l.state, this.emitDailyJSEvent(l));
|
|
9044
9044
|
break;
|
|
9045
9045
|
case fu:
|
|
9046
9046
|
l && l.cpuLoadState && this.emitDailyJSEvent(l);
|
|
@@ -9049,8 +9049,8 @@ var Qu = function() {
|
|
|
9049
9049
|
l && l.faceCounts !== void 0 && this.emitDailyJSEvent(l);
|
|
9050
9050
|
break;
|
|
9051
9051
|
case uu:
|
|
9052
|
-
var
|
|
9053
|
-
this._activeSpeaker.peerId !==
|
|
9052
|
+
var Je = l.activeSpeaker;
|
|
9053
|
+
this._activeSpeaker.peerId !== Je.peerId && (this._activeSpeaker.peerId = Je.peerId, this.emitDailyJSEvent({ action: l.action, activeSpeaker: this._activeSpeaker }));
|
|
9054
9054
|
break;
|
|
9055
9055
|
case "show-local-video-changed":
|
|
9056
9056
|
if (this._callObjectMode) return;
|
|
@@ -9159,16 +9159,16 @@ var Qu = function() {
|
|
|
9159
9159
|
} }, { key: "_trackChanged", value: function(l, g) {
|
|
9160
9160
|
return (l == null ? void 0 : l.id) !== (g == null ? void 0 : g.id);
|
|
9161
9161
|
} }, { key: "maybeEventTrackStopped", value: function(l, g, p) {
|
|
9162
|
-
var S, k, T = (S = g == null ? void 0 : g.tracks[l]) !== null && S !== void 0 ? S : null, O = (k = p == null ? void 0 : p.tracks[l]) !== null && k !== void 0 ? k : null,
|
|
9163
|
-
if (
|
|
9164
|
-
var R = this._trackStatePlayable(T), W = this._trackStatePlayable(O), re = this._trackChanged(
|
|
9165
|
-
R && (W && !re || this.emitDailyJSEvent({ action: Gd, track:
|
|
9162
|
+
var S, k, T = (S = g == null ? void 0 : g.tracks[l]) !== null && S !== void 0 ? S : null, O = (k = p == null ? void 0 : p.tracks[l]) !== null && k !== void 0 ? k : null, I = T == null ? void 0 : T.track;
|
|
9163
|
+
if (I) {
|
|
9164
|
+
var R = this._trackStatePlayable(T), W = this._trackStatePlayable(O), re = this._trackChanged(I, O == null ? void 0 : O.track);
|
|
9165
|
+
R && (W && !re || this.emitDailyJSEvent({ action: Gd, track: I, participant: p ?? g, type: l }));
|
|
9166
9166
|
}
|
|
9167
9167
|
} }, { key: "maybeEventTrackStarted", value: function(l, g, p) {
|
|
9168
|
-
var S, k, T = (S = g == null ? void 0 : g.tracks[l]) !== null && S !== void 0 ? S : null, O = (k = p == null ? void 0 : p.tracks[l]) !== null && k !== void 0 ? k : null,
|
|
9169
|
-
if (
|
|
9170
|
-
var R = this._trackStatePlayable(T), W = this._trackStatePlayable(O), re = this._trackChanged(T == null ? void 0 : T.track,
|
|
9171
|
-
W && (R && !re || this.emitDailyJSEvent({ action: Jd, track:
|
|
9168
|
+
var S, k, T = (S = g == null ? void 0 : g.tracks[l]) !== null && S !== void 0 ? S : null, O = (k = p == null ? void 0 : p.tracks[l]) !== null && k !== void 0 ? k : null, I = O == null ? void 0 : O.track;
|
|
9169
|
+
if (I) {
|
|
9170
|
+
var R = this._trackStatePlayable(T), W = this._trackStatePlayable(O), re = this._trackChanged(T == null ? void 0 : T.track, I);
|
|
9171
|
+
W && (R && !re || this.emitDailyJSEvent({ action: Jd, track: I, participant: p, type: l }));
|
|
9172
9172
|
}
|
|
9173
9173
|
} }, { key: "maybeParticipantTracksStopped", value: function(l, g) {
|
|
9174
9174
|
if (l) for (var p in l.tracks) this.maybeEventTrackStopped(p, l, g);
|
|
@@ -9186,7 +9186,7 @@ var Qu = function() {
|
|
|
9186
9186
|
} }, { key: "compareEqualForParticipantUpdateEvent", value: function(l, g) {
|
|
9187
9187
|
return !!Le(l, g) && (!l.videoTrack || !g.videoTrack || l.videoTrack.id === g.videoTrack.id && l.videoTrack.muted === g.videoTrack.muted && l.videoTrack.enabled === g.videoTrack.enabled) && (!l.audioTrack || !g.audioTrack || l.audioTrack.id === g.audioTrack.id && l.audioTrack.muted === g.audioTrack.muted && l.audioTrack.enabled === g.audioTrack.enabled);
|
|
9188
9188
|
} }, { key: "nativeUtils", value: function() {
|
|
9189
|
-
return
|
|
9189
|
+
return se() ? typeof DailyNativeUtils > "u" ? (console.warn("in React Native, DailyNativeUtils is expected to be available"), null) : DailyNativeUtils : null;
|
|
9190
9190
|
} }, { key: "updateIsPreparingToJoin", value: function(l) {
|
|
9191
9191
|
this._updateCallState(this._callState, l);
|
|
9192
9192
|
} }, { key: "_updateCallState", value: function(l) {
|
|
@@ -9202,14 +9202,14 @@ var Qu = function() {
|
|
|
9202
9202
|
} }, { key: "resetMeetingDependentVars", value: function() {
|
|
9203
9203
|
this._participants = {}, this._participantCounts = Ps, this._waitingParticipants = {}, this._activeSpeaker = {}, this._activeSpeakerMode = !1, this._didPreAuth = !1, this._accessState = { access: Ln }, this._finalSummaryOfPrevSession = this._meetingSessionSummary, this._meetingSessionSummary = {}, this._meetingSessionState = Hn(Ls, 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._maxAppMessageSize = Pn, this._callMachineInitialized = !1, this._bundleLoadTime = void 0, this._preloadCache;
|
|
9204
9204
|
} }, { key: "updateKeepDeviceAwake", value: function(l) {
|
|
9205
|
-
|
|
9205
|
+
se() && this.nativeUtils().setKeepDeviceAwake(l, this.callClientId);
|
|
9206
9206
|
} }, { key: "updateDeviceAudioMode", value: function(l) {
|
|
9207
|
-
if (
|
|
9207
|
+
if (se() && !this.disableReactNativeAutoDeviceManagement("audio")) {
|
|
9208
9208
|
var g = l ? this._nativeInCallAudioMode : "idle";
|
|
9209
9209
|
this.nativeUtils().setAudioMode(g);
|
|
9210
9210
|
}
|
|
9211
9211
|
} }, { key: "updateShowAndroidOngoingMeetingNotification", value: function(l) {
|
|
9212
|
-
if (
|
|
9212
|
+
if (se() && this.nativeUtils().setShowOngoingMeetingNotification) {
|
|
9213
9213
|
var g, p, S, k;
|
|
9214
9214
|
if (this.properties.reactNativeConfig && this.properties.reactNativeConfig.androidInCallNotification) {
|
|
9215
9215
|
var T = this.properties.reactNativeConfig.androidInCallNotification;
|
|
@@ -9218,10 +9218,10 @@ var Qu = function() {
|
|
|
9218
9218
|
k && (l = !1), this.nativeUtils().setShowOngoingMeetingNotification(l, g, p, S, this.callClientId);
|
|
9219
9219
|
}
|
|
9220
9220
|
} }, { key: "updateNoOpRecordingEnsuringBackgroundContinuity", value: function(l) {
|
|
9221
|
-
|
|
9221
|
+
se() && this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity && this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(l);
|
|
9222
9222
|
} }, { key: "toggleParticipantAudioBasedOnNativeAudioFocus", value: function() {
|
|
9223
9223
|
var l;
|
|
9224
|
-
if (
|
|
9224
|
+
if (se()) {
|
|
9225
9225
|
var g = (l = this._callMachine()) === null || l === void 0 || (l = l.store) === null || l === void 0 ? void 0 : l.getState();
|
|
9226
9226
|
for (var p in g == null ? void 0 : g.streams) {
|
|
9227
9227
|
var S = g.streams[p];
|
|
@@ -9259,27 +9259,27 @@ var Qu = function() {
|
|
|
9259
9259
|
if (!((g = l.error) !== null && g !== void 0 && g.type && (![Td, Ed, ts].includes(l.error.type) || l.error.type === ts && l.error.msg.includes("deleted")))) {
|
|
9260
9260
|
var T = (p = this.properties) !== null && p !== void 0 && p.url ? new URL(this.properties.url) : void 0, O = "production";
|
|
9261
9261
|
T && T.host.includes(".staging.daily") && (O = "staging");
|
|
9262
|
-
var
|
|
9262
|
+
var I, R, W, re, Oe, nt = function(lr) {
|
|
9263
9263
|
const dr = [zl(), Ul(), fd(), pd(), wd(), kd(), Wl(), Sd()];
|
|
9264
9264
|
return lr.autoSessionTracking !== !1 && dr.push(vd()), dr;
|
|
9265
9265
|
}({}).filter(function(lr) {
|
|
9266
9266
|
return !["BrowserApiErrors", "Breadcrumbs", "GlobalHandlers"].includes(lr.name);
|
|
9267
|
-
}), it = new td({ dsn: "https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844", transport: sd, stackParser: hd, integrations: nt, environment: O }),
|
|
9268
|
-
if (
|
|
9269
|
-
var
|
|
9270
|
-
|
|
9267
|
+
}), it = new td({ dsn: "https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844", transport: sd, stackParser: hd, integrations: nt, environment: O }), we = new Et();
|
|
9268
|
+
if (we.setClient(it), it.init(), this.session_id && we.setExtra("sessionId", this.session_id), this.properties) {
|
|
9269
|
+
var ee = j({}, this.properties);
|
|
9270
|
+
ee.userName = ee.userName ? "[Filtered]" : void 0, ee.userData = ee.userData ? "[Filtered]" : void 0, ee.token = ee.token ? "[Filtered]" : void 0, we.setExtra("properties", ee);
|
|
9271
9271
|
}
|
|
9272
9272
|
if (T) {
|
|
9273
|
-
var
|
|
9274
|
-
if (!
|
|
9273
|
+
var Je = T.searchParams.get("domain");
|
|
9274
|
+
if (!Je) {
|
|
9275
9275
|
var cr = T.host.match(/(.*?)\./);
|
|
9276
|
-
|
|
9276
|
+
Je = cr && cr[1] || "";
|
|
9277
9277
|
}
|
|
9278
|
-
|
|
9278
|
+
Je && we.setTag("domain", Je);
|
|
9279
9279
|
}
|
|
9280
|
-
l.error && (
|
|
9280
|
+
l.error && (we.setTag("fatalErrorType", l.error.type), we.setExtra("errorDetails", l.error.details), !((I = l.error.details) === null || I === void 0) && I.uri && we.setTag("serverAddress", l.error.details.uri), !((R = l.error.details) === null || R === void 0) && R.workerGroup && we.setTag("workerGroup", l.error.details.workerGroup), !((W = l.error.details) === null || W === void 0) && W.geoGroup && we.setTag("geoGroup", l.error.details.geoGroup), !((re = l.error.details) === null || re === void 0) && re.on && we.setTag("connectionAttempt", l.error.details.on), (Oe = l.error.details) !== null && Oe !== void 0 && Oe.bundleUrl && (we.setTag("bundleUrl", l.error.details.bundleUrl), we.setTag("bundleError", l.error.details.sourceError.type))), we.setTags({ callMode: this._callObjectMode ? se() ? "reactNative" : (S = this.properties) !== null && S !== void 0 && (S = S.dailyConfig) !== null && S !== void 0 && (S = S.callMode) !== null && S !== void 0 && S.includes("prebuilt") ? this.properties.dailyConfig.callMode : "custom" : "prebuilt-frame", version: n.version() });
|
|
9281
9281
|
var Or = ((k = l.error) === null || k === void 0 ? void 0 : k.msg) || l.errorMsg;
|
|
9282
|
-
|
|
9282
|
+
we.captureException(new Error(Or));
|
|
9283
9283
|
}
|
|
9284
9284
|
} }, { key: "_callMachine", value: function() {
|
|
9285
9285
|
var l;
|
|
@@ -9292,8 +9292,8 @@ var Qu = function() {
|
|
|
9292
9292
|
Le(g, p) || this.emitDailyJSEvent({ action: os, inputSettings: p });
|
|
9293
9293
|
}
|
|
9294
9294
|
} }], [{ key: "supportedBrowser", value: function() {
|
|
9295
|
-
if (
|
|
9296
|
-
var l = ll.getParser(
|
|
9295
|
+
if (se()) return { supported: !0, mobile: !0, name: "React Native", version: null, supportsScreenShare: !0, supportsSfu: !0, supportsVideoProcessing: !1, supportsAudioProcessing: !1 };
|
|
9296
|
+
var l = ll.getParser(We());
|
|
9297
9297
|
return { supported: !!Nn(), mobile: l.getPlatformType() === "mobile", name: l.getBrowserName(), version: l.getBrowserVersion(), supportsFullscreen: !!hs(), supportsScreenShare: !!Cu(), supportsSfu: !!Nn(), supportsVideoProcessing: Va(), supportsAudioProcessing: Ka() };
|
|
9298
9298
|
} }, { key: "version", value: function() {
|
|
9299
9299
|
return "0.86.0";
|
|
@@ -9302,11 +9302,11 @@ var Qu = function() {
|
|
|
9302
9302
|
return l.layout = "none", new n(null, l);
|
|
9303
9303
|
} }, { key: "wrap", value: function(l) {
|
|
9304
9304
|
var g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
9305
|
-
if (
|
|
9305
|
+
if (oe(), !l || !l.contentWindow || typeof l.src != "string") throw new Error("DailyIframe::Wrap needs an iframe-like first argument");
|
|
9306
9306
|
return g.layout || (g.customLayout ? g.layout = "custom-v1" : g.layout = "browser"), new n(l, g);
|
|
9307
9307
|
} }, { key: "createFrame", value: function(l, g) {
|
|
9308
9308
|
var p, S;
|
|
9309
|
-
|
|
9309
|
+
oe(), l && g ? (p = l, S = g) : l && l.append ? (p = l, S = {}) : (p = document.body, S = l || {});
|
|
9310
9310
|
var k = S.iframeStyle;
|
|
9311
9311
|
k || (k = p === document.body ? { position: "fixed", border: "1px solid black", backgroundColor: "white", width: "375px", height: "450px", right: "1em", bottom: "1em" } : { border: 0, width: "100%", height: "100%" });
|
|
9312
9312
|
var T = document.createElement("iframe");
|
|
@@ -9320,7 +9320,7 @@ var Qu = function() {
|
|
|
9320
9320
|
}
|
|
9321
9321
|
} }, { key: "createTransparentFrame", value: function() {
|
|
9322
9322
|
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
9323
|
-
|
|
9323
|
+
oe();
|
|
9324
9324
|
var g = document.createElement("iframe");
|
|
9325
9325
|
return g.allow = "microphone; camera; autoplay", g.style.cssText = `
|
|
9326
9326
|
position: fixed;
|
|
@@ -9335,7 +9335,7 @@ var Qu = function() {
|
|
|
9335
9335
|
var l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : void 0;
|
|
9336
9336
|
return l ? At[l] : Object.values(At)[0];
|
|
9337
9337
|
} }]);
|
|
9338
|
-
var e, t, r, i, o, s, a, c, d, u, h, f, b, y, m, v, w, x, E, L,
|
|
9338
|
+
var e, t, r, i, o, s, a, c, d, u, h, f, b, y, m, v, w, x, E, L, P, N, B, ae, ue, be, $, z, H, te, U, F, Q, ve, he, Z, ke, Ue;
|
|
9339
9339
|
}();
|
|
9340
9340
|
function Ns(n) {
|
|
9341
9341
|
if (n.extension) {
|
|
@@ -9394,7 +9394,7 @@ function Un(n) {
|
|
|
9394
9394
|
throw console.error(e), new Error(e);
|
|
9395
9395
|
}
|
|
9396
9396
|
}
|
|
9397
|
-
function
|
|
9397
|
+
function Ge(n) {
|
|
9398
9398
|
if (!n) {
|
|
9399
9399
|
var e = "".concat(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "This daily-js method", " is only supported on custom callObject instances");
|
|
9400
9400
|
throw console.error(e), new Error(e);
|
|
@@ -9406,11 +9406,11 @@ function Re(n) {
|
|
|
9406
9406
|
throw console.error(e), new Error(e);
|
|
9407
9407
|
}
|
|
9408
9408
|
}
|
|
9409
|
-
function
|
|
9410
|
-
if (
|
|
9409
|
+
function oe() {
|
|
9410
|
+
if (se()) throw new Error("This daily-js method is not currently supported in React Native");
|
|
9411
9411
|
}
|
|
9412
9412
|
function hr() {
|
|
9413
|
-
if (!
|
|
9413
|
+
if (!se()) throw new Error("This daily-js method is only supported in React Native");
|
|
9414
9414
|
}
|
|
9415
9415
|
function oc(n) {
|
|
9416
9416
|
if (n === void 0) return !0;
|
|
@@ -9433,20 +9433,20 @@ function sc(n, e) {
|
|
|
9433
9433
|
}, o = function(h) {
|
|
9434
9434
|
return !!h && !(h.video && !i(h.video)) && !(h.screenVideo && !i(h.screenVideo));
|
|
9435
9435
|
}, s = 0, a = Object.entries(n); s < a.length; s++) {
|
|
9436
|
-
var c =
|
|
9436
|
+
var c = Ae(a[s], 2), d = c[0], u = c[1];
|
|
9437
9437
|
if (!r(d) || !o(u)) return !1;
|
|
9438
9438
|
}
|
|
9439
9439
|
return !0;
|
|
9440
9440
|
}
|
|
9441
9441
|
function ac(n) {
|
|
9442
|
-
if (
|
|
9442
|
+
if (ce(n) !== "object") return !1;
|
|
9443
9443
|
for (var e = 0, t = Object.entries(n); e < t.length; e++) {
|
|
9444
|
-
var r =
|
|
9444
|
+
var r = Ae(t[e], 2), i = r[0], o = r[1];
|
|
9445
9445
|
switch (i) {
|
|
9446
9446
|
case "video":
|
|
9447
|
-
if (
|
|
9447
|
+
if (ce(o) !== "object") return !1;
|
|
9448
9448
|
for (var s = 0, a = Object.entries(o); s < a.length; s++) {
|
|
9449
|
-
var c =
|
|
9449
|
+
var c = Ae(a[s], 2), d = c[0], u = c[1];
|
|
9450
9450
|
switch (d) {
|
|
9451
9451
|
case "processor":
|
|
9452
9452
|
if (!eh(u)) return !1;
|
|
@@ -9460,9 +9460,9 @@ function ac(n) {
|
|
|
9460
9460
|
}
|
|
9461
9461
|
break;
|
|
9462
9462
|
case "audio":
|
|
9463
|
-
if (
|
|
9463
|
+
if (ce(o) !== "object") return !1;
|
|
9464
9464
|
for (var h = 0, f = Object.entries(o); h < f.length; h++) {
|
|
9465
|
-
var b =
|
|
9465
|
+
var b = Ae(f[h], 2), y = b[0], m = b[1];
|
|
9466
9466
|
switch (y) {
|
|
9467
9467
|
case "processor":
|
|
9468
9468
|
if (!Zu(m)) return !1;
|
|
@@ -9486,9 +9486,9 @@ function cc(n, e, t) {
|
|
|
9486
9486
|
n.video && n.video.processor && (Va((r = e == null ? void 0 : e.useLegacyVideoProcessor) !== null && r !== void 0 && r) || (n.video.settings ? delete n.video.processor : delete n.video, i.push("video"))), n.audio && n.audio.processor && (Ka() || (n.audio.settings ? delete n.audio.processor : delete n.audio, i.push("audio"))), i.length > 0 && console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(i.join(", "))), n.audio && n.audio.settings && (n.audio.settings.customTrack ? (t.audioTrack = n.audio.settings.customTrack, n.audio.settings = { customTrack: gt }) : delete t.audioTrack), n.video && n.video.settings && (n.video.settings.customTrack ? (t.videoTrack = n.video.settings.customTrack, n.video.settings = { customTrack: gt }) : delete t.videoTrack);
|
|
9487
9487
|
}
|
|
9488
9488
|
function Zu(n) {
|
|
9489
|
-
if (
|
|
9489
|
+
if (se()) return console.warn("Video processing is not yet supported in React Native"), !1;
|
|
9490
9490
|
var e = ["type"];
|
|
9491
|
-
return !!n &&
|
|
9491
|
+
return !!n && ce(n) === "object" && (Object.keys(n).filter(function(t) {
|
|
9492
9492
|
return !e.includes(t);
|
|
9493
9493
|
}).forEach(function(t) {
|
|
9494
9494
|
console.warn("invalid key inputSettings -> audio -> processor : ".concat(t)), delete n[t];
|
|
@@ -9497,11 +9497,11 @@ function Zu(n) {
|
|
|
9497
9497
|
}(n.type));
|
|
9498
9498
|
}
|
|
9499
9499
|
function eh(n) {
|
|
9500
|
-
if (
|
|
9500
|
+
if (se()) return console.warn("Video processing is not yet supported in React Native"), !1;
|
|
9501
9501
|
var e = ["type", "config"];
|
|
9502
|
-
return !n ||
|
|
9502
|
+
return !n || ce(n) !== "object" || !function(t) {
|
|
9503
9503
|
return typeof t != "string" ? !1 : Object.values(Xr).includes(t) ? !0 : (console.error("inputSettings video processor type invalid"), !1);
|
|
9504
|
-
}(n.type) || n.config && (
|
|
9504
|
+
}(n.type) || n.config && (ce(n.config) !== "object" || !function(t, r) {
|
|
9505
9505
|
var i = Object.keys(r);
|
|
9506
9506
|
if (i.length === 0) return !0;
|
|
9507
9507
|
var o = "invalid object in inputSettings -> video -> processor -> config";
|
|
@@ -9536,7 +9536,7 @@ function eh(n) {
|
|
|
9536
9536
|
}), !0);
|
|
9537
9537
|
}
|
|
9538
9538
|
function Bs(n) {
|
|
9539
|
-
return
|
|
9539
|
+
return ce(n) === "object" && (!n.customTrack || n.customTrack instanceof MediaStreamTrack);
|
|
9540
9540
|
}
|
|
9541
9541
|
function gi() {
|
|
9542
9542
|
var n = Object.values(Xr).join(" | "), e = Object.values(za).join(" | ");
|
|
@@ -9550,9 +9550,9 @@ function dc() {
|
|
|
9550
9550
|
return "customIntegrations should be an object of type ".concat(JSON.stringify(pi), ".");
|
|
9551
9551
|
}
|
|
9552
9552
|
function uc(n) {
|
|
9553
|
-
if (n &&
|
|
9554
|
-
if (n) for (var e = 0, t = Object.entries(n); e < t.length; e++) for (var r =
|
|
9555
|
-
var s =
|
|
9553
|
+
if (n && ce(n) !== "object" || Array.isArray(n)) return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(dn), ".")), !1;
|
|
9554
|
+
if (n) for (var e = 0, t = Object.entries(n); e < t.length; e++) for (var r = Ae(t[e], 1)[0], i = 0, o = Object.entries(n[r]); i < o.length; i++) {
|
|
9555
|
+
var s = Ae(o[i], 2), a = s[0], c = s[1], d = dn.id[a];
|
|
9556
9556
|
if (!d) return console.error("customTrayButton does not support key ".concat(a)), !1;
|
|
9557
9557
|
switch (a) {
|
|
9558
9558
|
case "iconPath":
|
|
@@ -9563,24 +9563,24 @@ function uc(n) {
|
|
|
9563
9563
|
if (!["default", "sidebar-open", "active"].includes(c)) return console.error("customTrayButton ".concat(a, " should be ").concat(d, ". Got: ").concat(c)), !1;
|
|
9564
9564
|
break;
|
|
9565
9565
|
default:
|
|
9566
|
-
if (
|
|
9566
|
+
if (ce(c) !== d) return console.error("customTrayButton ".concat(a, " should be a ").concat(d, ".")), !1;
|
|
9567
9567
|
}
|
|
9568
9568
|
}
|
|
9569
9569
|
return !0;
|
|
9570
9570
|
}
|
|
9571
9571
|
function hc(n) {
|
|
9572
|
-
if (!n || n &&
|
|
9572
|
+
if (!n || n && ce(n) !== "object" || Array.isArray(n)) return console.error(dc()), !1;
|
|
9573
9573
|
for (var e = function(h) {
|
|
9574
9574
|
return "".concat(h, " should be ").concat(pi.id[h]);
|
|
9575
9575
|
}, t = function(h, f) {
|
|
9576
9576
|
return console.error("customIntegration ".concat(h, ": ").concat(f));
|
|
9577
9577
|
}, r = 0, i = Object.entries(n); r < i.length; r++) {
|
|
9578
|
-
var o =
|
|
9578
|
+
var o = Ae(i[r], 1)[0];
|
|
9579
9579
|
if (!("label" in n[o])) return t(o, "label is required"), !1;
|
|
9580
9580
|
if (!("location" in n[o])) return t(o, "location is required"), !1;
|
|
9581
9581
|
if (!("src" in n[o]) && !("srcdoc" in n[o])) return t(o, "src or srcdoc is required"), !1;
|
|
9582
9582
|
for (var s = 0, a = Object.entries(n[o]); s < a.length; s++) {
|
|
9583
|
-
var c =
|
|
9583
|
+
var c = Ae(a[s], 2), d = c[0], u = c[1];
|
|
9584
9584
|
switch (d) {
|
|
9585
9585
|
case "allow":
|
|
9586
9586
|
case "csp":
|
|
@@ -9622,11 +9622,11 @@ function hc(n) {
|
|
|
9622
9622
|
}
|
|
9623
9623
|
function pc(n, e) {
|
|
9624
9624
|
if (e === void 0) return !1;
|
|
9625
|
-
switch (
|
|
9625
|
+
switch (ce(e)) {
|
|
9626
9626
|
case "string":
|
|
9627
|
-
return
|
|
9627
|
+
return ce(n) === e;
|
|
9628
9628
|
case "object":
|
|
9629
|
-
if (
|
|
9629
|
+
if (ce(n) !== "object") return !1;
|
|
9630
9630
|
for (var t in n) if (!pc(n[t], e[t])) return !1;
|
|
9631
9631
|
return !0;
|
|
9632
9632
|
default:
|
|
@@ -9643,7 +9643,7 @@ function Fs(n, e) {
|
|
|
9643
9643
|
if (i && !r.startsWith("+")) throw new Error("callerId is only valid when transferring to a PSTN number");
|
|
9644
9644
|
}
|
|
9645
9645
|
function $s(n) {
|
|
9646
|
-
if (
|
|
9646
|
+
if (ce(n) !== "object") throw new Error('RemoteMediaPlayerSettings: must be "object" type');
|
|
9647
9647
|
if (n.state && !Object.values(ci).includes(n.state)) throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: " + JSON.stringify(ci));
|
|
9648
9648
|
if (n.volume) {
|
|
9649
9649
|
if (typeof n.volume != "number") throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');
|
|
@@ -9665,7 +9665,7 @@ function gc(n, e, t, r) {
|
|
|
9665
9665
|
var fc = {};
|
|
9666
9666
|
gc(fc, "DailyRTVIMessageType", () => fi);
|
|
9667
9667
|
gc(fc, "DailyTransport", () => mt);
|
|
9668
|
-
class
|
|
9668
|
+
class Qe {
|
|
9669
9669
|
/**
|
|
9670
9670
|
* Converts Float32Array of amplitude data to ArrayBuffer in Int16Array format
|
|
9671
9671
|
* @param {Float32Array} float32Array
|
|
@@ -9752,7 +9752,7 @@ class Xe {
|
|
|
9752
9752
|
};
|
|
9753
9753
|
}
|
|
9754
9754
|
}
|
|
9755
|
-
globalThis.WavPacker =
|
|
9755
|
+
globalThis.WavPacker = Qe;
|
|
9756
9756
|
const Us = [
|
|
9757
9757
|
4186.01,
|
|
9758
9758
|
4434.92,
|
|
@@ -10344,7 +10344,7 @@ class hh {
|
|
|
10344
10344
|
else throw new Error('"audioData" must be one of: Blob, Float32Arrray, Int16Array, ArrayBuffer, Array<number>');
|
|
10345
10345
|
if (r === -1) throw new Error('Must specify "fromSampleRate" when reading from Float32Array, In16Array or Array');
|
|
10346
10346
|
if (r < 3e3) throw new Error('Minimum "fromSampleRate" is 3000 (3kHz)');
|
|
10347
|
-
h || (h =
|
|
10347
|
+
h || (h = Qe.floatTo16BitPCM(u));
|
|
10348
10348
|
const f = {
|
|
10349
10349
|
bitsPerSample: 16,
|
|
10350
10350
|
channels: [
|
|
@@ -10352,7 +10352,7 @@ class hh {
|
|
|
10352
10352
|
],
|
|
10353
10353
|
data: h
|
|
10354
10354
|
};
|
|
10355
|
-
s = new
|
|
10355
|
+
s = new Qe().pack(r, f).blob, o = await s.arrayBuffer();
|
|
10356
10356
|
}
|
|
10357
10357
|
const a = await i.decodeAudioData(o), c = a.getChannelData(0), d = URL.createObjectURL(s);
|
|
10358
10358
|
return {
|
|
@@ -10529,8 +10529,8 @@ class hh {
|
|
|
10529
10529
|
if (this._chunkProcessorSize) {
|
|
10530
10530
|
const f = this._chunkProcessorBuffer;
|
|
10531
10531
|
this._chunkProcessorBuffer = {
|
|
10532
|
-
raw:
|
|
10533
|
-
mono:
|
|
10532
|
+
raw: Qe.mergeBuffers(f.raw, h.raw),
|
|
10533
|
+
mono: Qe.mergeBuffers(f.mono, h.mono)
|
|
10534
10534
|
}, this._chunkProcessorBuffer.mono.byteLength >= this._chunkProcessorSize && (this._chunkProcessor(this._chunkProcessorBuffer), this._chunkProcessorBuffer = {
|
|
10535
10535
|
raw: new ArrayBuffer(0),
|
|
10536
10536
|
mono: new ArrayBuffer(0)
|
|
@@ -10607,7 +10607,7 @@ use only for debugging`), s.connect(t.destination)), this.source = r, this.node
|
|
|
10607
10607
|
if (!e && this.recording) throw new Error("Currently recording: please call .pause() first, or call .save(true) to force");
|
|
10608
10608
|
this.log("Exporting ...");
|
|
10609
10609
|
const t = await this._event("export");
|
|
10610
|
-
return new
|
|
10610
|
+
return new Qe().pack(this.sampleRate, t.audio);
|
|
10611
10611
|
}
|
|
10612
10612
|
/**
|
|
10613
10613
|
* Ends the current recording session and saves the result
|
|
@@ -10618,7 +10618,7 @@ use only for debugging`), s.connect(t.destination)), this.source = r, this.node
|
|
|
10618
10618
|
const e = this.processor;
|
|
10619
10619
|
this.log("Stopping ..."), await this._event("stop"), this.recording = !1, this.stream.getTracks().forEach((s) => s.stop()), this.log("Exporting ...");
|
|
10620
10620
|
const r = await this._event("export", {}, e);
|
|
10621
|
-
return this.processor.disconnect(), this.source.disconnect(), this.node.disconnect(), this.analyser.disconnect(), this.stream = null, this.processor = null, this.source = null, this.node = null, new
|
|
10621
|
+
return this.processor.disconnect(), this.source.disconnect(), this.node.disconnect(), this.analyser.disconnect(), this.stream = null, this.processor = null, this.source = null, this.node = null, new Qe().pack(this.sampleRate, r.audio);
|
|
10622
10622
|
}
|
|
10623
10623
|
/**
|
|
10624
10624
|
* Performs a full cleanup of WavRecorder instance
|
|
@@ -10733,8 +10733,8 @@ class ph {
|
|
|
10733
10733
|
if (this._chunkProcessorSize) {
|
|
10734
10734
|
const y = this._chunkProcessorBuffer;
|
|
10735
10735
|
this._chunkProcessorBuffer = {
|
|
10736
|
-
raw:
|
|
10737
|
-
mono:
|
|
10736
|
+
raw: Qe.mergeBuffers(y.raw, b.raw),
|
|
10737
|
+
mono: Qe.mergeBuffers(y.mono, b.mono)
|
|
10738
10738
|
}, this._chunkProcessorBuffer.mono.byteLength >= this._chunkProcessorSize && (this._chunkProcessor(this._chunkProcessorBuffer), this._chunkProcessorBuffer = {
|
|
10739
10739
|
raw: new ArrayBuffer(0),
|
|
10740
10740
|
mono: new ArrayBuffer(0)
|
|
@@ -10812,7 +10812,7 @@ use only for debugging`), c.connect(r.destination)), this.source = o, this.node
|
|
|
10812
10812
|
if (!e && this.recording) throw new Error("Currently recording: please call .pause() first, or call .save(true) to force");
|
|
10813
10813
|
this.log("Exporting ...");
|
|
10814
10814
|
const t = await this._event("export");
|
|
10815
|
-
return new
|
|
10815
|
+
return new Qe().pack(this.sampleRate, t.audio);
|
|
10816
10816
|
}
|
|
10817
10817
|
/**
|
|
10818
10818
|
* Ends the current recording session and saves the result
|
|
@@ -10823,7 +10823,7 @@ use only for debugging`), c.connect(r.destination)), this.source = o, this.node
|
|
|
10823
10823
|
const e = this.processor;
|
|
10824
10824
|
this.log("Stopping ..."), await this._event("stop"), this.recording = !1, this.log("Exporting ...");
|
|
10825
10825
|
const t = await this._event("export", {}, e);
|
|
10826
|
-
return this.processor.disconnect(), this.source.disconnect(), this.node.disconnect(), this.analyser.disconnect(), this.stream = null, this.processor = null, this.source = null, this.node = null, new
|
|
10826
|
+
return this.processor.disconnect(), this.source.disconnect(), this.node.disconnect(), this.analyser.disconnect(), this.stream = null, this.processor = null, this.source = null, this.node = null, new Qe().pack(this.sampleRate, t.audio);
|
|
10827
10827
|
}
|
|
10828
10828
|
/**
|
|
10829
10829
|
* Performs a full cleanup of WavRecorder instance
|
|
@@ -11064,7 +11064,7 @@ class mt extends Sa {
|
|
|
11064
11064
|
const a = navigator.userAgent;
|
|
11065
11065
|
return /iPad|iPhone|iPod/.test(a) || /Macintosh/.test(a) && "ontouchend" in document;
|
|
11066
11066
|
}, r = () => {
|
|
11067
|
-
this.state = "ready", this.flushAudioQueue(), this.sendMessage(
|
|
11067
|
+
this.state = "ready", this.flushAudioQueue(), this.sendMessage(xe.clientReady()), this.stopRecording(), e();
|
|
11068
11068
|
};
|
|
11069
11069
|
for (const a in this._daily.participants()) {
|
|
11070
11070
|
const c = this._daily.participants()[a];
|
|
@@ -11202,7 +11202,7 @@ class mt extends Sa {
|
|
|
11202
11202
|
}
|
|
11203
11203
|
handleFatalError(e) {
|
|
11204
11204
|
var t, r;
|
|
11205
|
-
ne.error("Daily fatal error", e.errorMsg), this.state = "error", this._botId = "", (r = (t = this._callbacks).onError) == null || r.call(t,
|
|
11205
|
+
ne.error("Daily fatal error", e.errorMsg), this.state = "error", this._botId = "", (r = (t = this._callbacks).onError) == null || r.call(t, xe.error(e.errorMsg, !0));
|
|
11206
11206
|
}
|
|
11207
11207
|
handleNonFatalError(e) {
|
|
11208
11208
|
var t, r;
|
|
@@ -11228,7 +11228,7 @@ const Dt = (n) => ({
|
|
|
11228
11228
|
orbSize: o = 56
|
|
11229
11229
|
}) => {
|
|
11230
11230
|
const [s, a] = ze(!1), [c, d] = ze(!1);
|
|
11231
|
-
return
|
|
11231
|
+
return Ze(() => {
|
|
11232
11232
|
if (e)
|
|
11233
11233
|
d(!0), requestAnimationFrame(() => {
|
|
11234
11234
|
requestAnimationFrame(() => {
|
|
@@ -11242,7 +11242,7 @@ const Dt = (n) => ({
|
|
|
11242
11242
|
}, fh);
|
|
11243
11243
|
return () => clearTimeout(u);
|
|
11244
11244
|
}
|
|
11245
|
-
}, [e]),
|
|
11245
|
+
}, [e]), Ze(() => {
|
|
11246
11246
|
if (e && r > 0 && i) {
|
|
11247
11247
|
const u = setTimeout(i, r);
|
|
11248
11248
|
return () => clearTimeout(u);
|
|
@@ -11338,74 +11338,74 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11338
11338
|
nudgeAutoHideDelay: d,
|
|
11339
11339
|
nudgeAutoShow: u = !0
|
|
11340
11340
|
}) => {
|
|
11341
|
-
const h = i || o, [f, b] = ze(!1), [y, m] = ze(!1), [v, w] = ze(!1), x = kr(null), E =
|
|
11341
|
+
const h = i || o, [f, b] = ze(!1), [y, m] = ze(!1), [v, w] = ze(!1), x = kr(null), E = Ye(() => {
|
|
11342
11342
|
try {
|
|
11343
|
-
const
|
|
11344
|
-
if (!
|
|
11345
|
-
const
|
|
11346
|
-
return !(
|
|
11343
|
+
const U = localStorage.getItem(Lt);
|
|
11344
|
+
if (!U) return !0;
|
|
11345
|
+
const F = JSON.parse(U);
|
|
11346
|
+
return !(F.hasEngaged || F.impressions >= pr.maxImpressions || F.lastDismissed && (Date.now() - F.lastDismissed) / 864e5 < pr.cooldownDays);
|
|
11347
11347
|
} catch {
|
|
11348
11348
|
return !0;
|
|
11349
11349
|
}
|
|
11350
|
-
}, []), L =
|
|
11350
|
+
}, []), L = Ye(() => {
|
|
11351
11351
|
try {
|
|
11352
|
-
const
|
|
11353
|
-
|
|
11352
|
+
const U = localStorage.getItem(Lt), F = U ? JSON.parse(U) : { impressions: 0 };
|
|
11353
|
+
F.impressions = (F.impressions || 0) + 1, F.lastShown = Date.now(), localStorage.setItem(Lt, JSON.stringify(F));
|
|
11354
11354
|
} catch {
|
|
11355
11355
|
}
|
|
11356
|
-
}, []),
|
|
11356
|
+
}, []), P = Ye(() => {
|
|
11357
11357
|
try {
|
|
11358
|
-
const
|
|
11359
|
-
|
|
11358
|
+
const U = localStorage.getItem(Lt), F = U ? JSON.parse(U) : { impressions: 0 };
|
|
11359
|
+
F.lastDismissed = Date.now(), localStorage.setItem(Lt, JSON.stringify(F));
|
|
11360
11360
|
} catch {
|
|
11361
11361
|
}
|
|
11362
|
-
}, []), N =
|
|
11362
|
+
}, []), N = Ye(() => {
|
|
11363
11363
|
try {
|
|
11364
|
-
const
|
|
11365
|
-
|
|
11364
|
+
const U = localStorage.getItem(Lt), F = U ? JSON.parse(U) : { impressions: 0 };
|
|
11365
|
+
F.hasEngaged = !0, localStorage.setItem(Lt, JSON.stringify(F));
|
|
11366
11366
|
} catch {
|
|
11367
11367
|
}
|
|
11368
|
-
}, []),
|
|
11368
|
+
}, []), B = Ye(() => {
|
|
11369
11369
|
try {
|
|
11370
11370
|
if (sessionStorage.getItem(qs)) return;
|
|
11371
|
-
const
|
|
11372
|
-
if (!
|
|
11373
|
-
const
|
|
11374
|
-
|
|
11375
|
-
const
|
|
11376
|
-
|
|
11377
|
-
const
|
|
11378
|
-
|
|
11379
|
-
const Ue =
|
|
11380
|
-
Ue.connect(l), l.connect(
|
|
11381
|
-
|
|
11371
|
+
const U = window.AudioContext || window.webkitAudioContext;
|
|
11372
|
+
if (!U) return;
|
|
11373
|
+
const F = new U();
|
|
11374
|
+
F.state === "suspended" && F.resume();
|
|
11375
|
+
const Q = F.currentTime, ve = F.createOscillator(), he = F.createGain();
|
|
11376
|
+
ve.connect(he), he.connect(F.destination), ve.frequency.setValueAtTime(659, Q), ve.type = "sine", he.gain.setValueAtTime(0.25, Q), he.gain.exponentialRampToValueAtTime(0.01, Q + 0.3), ve.start(Q), ve.stop(Q + 0.3);
|
|
11377
|
+
const Z = F.createOscillator(), ke = F.createGain();
|
|
11378
|
+
Z.connect(ke), ke.connect(F.destination), Z.frequency.setValueAtTime(784, Q + 0.12), Z.type = "sine", ke.gain.setValueAtTime(0, Q), ke.gain.setValueAtTime(0.2, Q + 0.12), ke.gain.exponentialRampToValueAtTime(0.01, Q + 0.5), Z.start(Q + 0.12), Z.stop(Q + 0.5);
|
|
11379
|
+
const Ue = F.createOscillator(), l = F.createGain();
|
|
11380
|
+
Ue.connect(l), l.connect(F.destination), Ue.frequency.setValueAtTime(1318, Q), Ue.type = "sine", l.gain.setValueAtTime(0.08, Q), l.gain.exponentialRampToValueAtTime(1e-3, Q + 0.2), Ue.start(Q), Ue.stop(Q + 0.2), Z.onended = () => {
|
|
11381
|
+
F.close();
|
|
11382
11382
|
}, ie.log("[Floe] Nudge sound played"), sessionStorage.setItem(qs, "true");
|
|
11383
11383
|
} catch {
|
|
11384
11384
|
}
|
|
11385
|
-
}, []),
|
|
11386
|
-
|
|
11385
|
+
}, []), ae = a !== void 0 ? a : y && !v && !n;
|
|
11386
|
+
Ze(() => {
|
|
11387
11387
|
if (a === void 0 && u && h && !n && !v) {
|
|
11388
11388
|
if (!E()) return;
|
|
11389
|
-
const
|
|
11390
|
-
m(!0), L(),
|
|
11391
|
-
}, pr.initialDelay),
|
|
11392
|
-
let
|
|
11393
|
-
return
|
|
11394
|
-
m(!1),
|
|
11395
|
-
}, pr.initialDelay +
|
|
11396
|
-
clearTimeout(
|
|
11389
|
+
const U = setTimeout(() => {
|
|
11390
|
+
m(!0), L(), B();
|
|
11391
|
+
}, pr.initialDelay), F = d === void 0 ? pr.autoHideDuration : d;
|
|
11392
|
+
let Q;
|
|
11393
|
+
return F > 0 && (Q = setTimeout(() => {
|
|
11394
|
+
m(!1), P();
|
|
11395
|
+
}, pr.initialDelay + F)), () => {
|
|
11396
|
+
clearTimeout(U), Q && clearTimeout(Q);
|
|
11397
11397
|
};
|
|
11398
11398
|
}
|
|
11399
|
-
}, [h, n, v, E, L,
|
|
11400
|
-
const
|
|
11401
|
-
m(!1), w(!0),
|
|
11402
|
-
}, [
|
|
11399
|
+
}, [h, n, v, E, L, P, B, a, u, d]);
|
|
11400
|
+
const ue = Ye(() => {
|
|
11401
|
+
m(!1), w(!0), P(), c == null || c();
|
|
11402
|
+
}, [P, c]), be = Ye(() => {
|
|
11403
11403
|
m(!1), N(), t == null || t(), h && !n && r && r();
|
|
11404
|
-
}, [N, t, h, n, r]),
|
|
11404
|
+
}, [N, t, h, n, r]), $ = Ye(() => {
|
|
11405
11405
|
N(), t == null || t(), h && !n && r && r();
|
|
11406
|
-
}, [N, t, h, n, r]),
|
|
11407
|
-
(
|
|
11408
|
-
}, [
|
|
11406
|
+
}, [N, t, h, n, r]), z = Ye((U) => {
|
|
11407
|
+
(U.key === "Enter" || U.key === " ") && (U.preventDefault(), $());
|
|
11408
|
+
}, [$]), H = () => {
|
|
11409
11409
|
switch (e) {
|
|
11410
11410
|
case "connecting":
|
|
11411
11411
|
return "#fbbf24";
|
|
@@ -11424,7 +11424,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11424
11424
|
default:
|
|
11425
11425
|
return "#6b7280";
|
|
11426
11426
|
}
|
|
11427
|
-
},
|
|
11427
|
+
}, te = h && !n ? 56 : 52;
|
|
11428
11428
|
return /* @__PURE__ */ Y(
|
|
11429
11429
|
"div",
|
|
11430
11430
|
{
|
|
@@ -11443,10 +11443,10 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11443
11443
|
mh,
|
|
11444
11444
|
{
|
|
11445
11445
|
text: s,
|
|
11446
|
-
isVisible:
|
|
11447
|
-
onClick:
|
|
11448
|
-
onAutoHide:
|
|
11449
|
-
orbSize:
|
|
11446
|
+
isVisible: ae,
|
|
11447
|
+
onClick: be,
|
|
11448
|
+
onAutoHide: ue,
|
|
11449
|
+
orbSize: te
|
|
11450
11450
|
}
|
|
11451
11451
|
),
|
|
11452
11452
|
/* @__PURE__ */ Y(
|
|
@@ -11456,14 +11456,14 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11456
11456
|
role: "button",
|
|
11457
11457
|
tabIndex: 0,
|
|
11458
11458
|
"aria-label": h ? i ? "Welcome back - Start Floe" : "Start Floe" : "Expand Floe",
|
|
11459
|
-
onClick:
|
|
11460
|
-
onKeyDown:
|
|
11459
|
+
onClick: $,
|
|
11460
|
+
onKeyDown: z,
|
|
11461
11461
|
onMouseEnter: () => b(!0),
|
|
11462
11462
|
onMouseLeave: () => b(!1),
|
|
11463
11463
|
style: {
|
|
11464
11464
|
position: "relative",
|
|
11465
|
-
width: `${
|
|
11466
|
-
height: `${
|
|
11465
|
+
width: `${te}px`,
|
|
11466
|
+
height: `${te}px`,
|
|
11467
11467
|
borderRadius: "50%",
|
|
11468
11468
|
background: "linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%)",
|
|
11469
11469
|
border: "1px solid rgba(255, 255, 255, 0.1)",
|
|
@@ -11485,7 +11485,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11485
11485
|
zIndex: 1
|
|
11486
11486
|
},
|
|
11487
11487
|
children: [
|
|
11488
|
-
(n && e !== "idle" || h && !n && !
|
|
11488
|
+
(n && e !== "idle" || h && !n && !ae) && /* @__PURE__ */ A(
|
|
11489
11489
|
"div",
|
|
11490
11490
|
{
|
|
11491
11491
|
style: {
|
|
@@ -11493,15 +11493,15 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11493
11493
|
width: "100%",
|
|
11494
11494
|
height: "100%",
|
|
11495
11495
|
borderRadius: "50%",
|
|
11496
|
-
border: `2px solid ${h && !n ? "rgba(255, 255, 255, 0.25)" :
|
|
11496
|
+
border: `2px solid ${h && !n ? "rgba(255, 255, 255, 0.25)" : H()}`,
|
|
11497
11497
|
animation: "pulseRing 2.5s ease-out infinite",
|
|
11498
11498
|
opacity: 0.5
|
|
11499
11499
|
}
|
|
11500
11500
|
}
|
|
11501
11501
|
),
|
|
11502
11502
|
/* @__PURE__ */ Y("svg", { width: "22", height: "18", viewBox: "0 0 159 138", fill: "none", style: { transition: "all 0.3s ease" }, children: [
|
|
11503
|
-
/* @__PURE__ */ A("path", { fill: n ?
|
|
11504
|
-
/* @__PURE__ */ A("path", { fill: n ?
|
|
11503
|
+
/* @__PURE__ */ A("path", { fill: n ? H() : "white", d: "M64 31.5c-23.5 0-34 18-64 48.5C0 31.5 26.5 1 54 1s105-1 105-1c-2 11.5-18.5 31.5-29.5 31.5z" }),
|
|
11504
|
+
/* @__PURE__ */ A("path", { fill: n ? H() : "white", d: "M64.5 89.5c-23.5 0-34 18-64 48.5 0-48.5 26.5-79 54-79s75-1 75-1c-2 11.5-18.5 31.5-29.5 31.5z" })
|
|
11505
11505
|
] })
|
|
11506
11506
|
]
|
|
11507
11507
|
}
|
|
@@ -11525,7 +11525,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11525
11525
|
audioLevels: s
|
|
11526
11526
|
}) => {
|
|
11527
11527
|
const a = Math.ceil(r / 2), [c, d] = ze(Array(a).fill(0.15)), u = kr(), h = kr(Array(a).fill(0.15));
|
|
11528
|
-
|
|
11528
|
+
Ze(() => {
|
|
11529
11529
|
if (s && s.length > 0 && n) {
|
|
11530
11530
|
const y = Array(a).fill(0).map((m, v) => {
|
|
11531
11531
|
let w = 0;
|
|
@@ -11533,16 +11533,16 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11533
11533
|
w = s.reduce((E, L) => E + L, 0) / s.length, w = Math.pow(w, 0.7) * 1.3;
|
|
11534
11534
|
else {
|
|
11535
11535
|
const x = Math.floor(s.length / (a - 1)), E = (v - 1) * x, L = Math.min(E + x, s.length);
|
|
11536
|
-
let
|
|
11537
|
-
for (let
|
|
11538
|
-
|
|
11539
|
-
w = N > 0 ?
|
|
11536
|
+
let P = 0, N = 0;
|
|
11537
|
+
for (let B = E; B < L; B++)
|
|
11538
|
+
P += s[B], N++;
|
|
11539
|
+
w = N > 0 ? P / N : 0, w = w * (1 - v * 0.08);
|
|
11540
11540
|
}
|
|
11541
11541
|
return Math.max(0.15, Math.min(1, 0.15 + w * 0.85));
|
|
11542
11542
|
});
|
|
11543
11543
|
h.current = y;
|
|
11544
11544
|
} else n || (h.current = Array(a).fill(0.15));
|
|
11545
|
-
}, [s, n, a]),
|
|
11545
|
+
}, [s, n, a]), Ze(() => {
|
|
11546
11546
|
const y = () => {
|
|
11547
11547
|
d((m) => m.map((v, w) => {
|
|
11548
11548
|
const x = h.current[w] || 0.15, E = n ? 0.35 : 0.15;
|
|
@@ -11613,25 +11613,26 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11613
11613
|
onStop: m,
|
|
11614
11614
|
connectionProgress: v,
|
|
11615
11615
|
textModeEnabled: w = !1,
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11616
|
+
micPermissionDenied: x = !1,
|
|
11617
|
+
onToggleTextMode: E,
|
|
11618
|
+
onSendText: L,
|
|
11619
|
+
planProgress: P
|
|
11619
11620
|
}) => {
|
|
11620
|
-
const
|
|
11621
|
-
|
|
11622
|
-
var
|
|
11623
|
-
(
|
|
11624
|
-
}, [i, o]),
|
|
11625
|
-
n &&
|
|
11621
|
+
const N = kr(null), B = kr(null), [ae, ue] = ze(!1), [be, $] = ze(""), [z, H] = ze(!1), [te, U] = ze(!1);
|
|
11622
|
+
Ze(() => {
|
|
11623
|
+
var Z;
|
|
11624
|
+
(Z = N.current) == null || Z.scrollIntoView({ behavior: "smooth" });
|
|
11625
|
+
}, [i, o]), Ze(() => {
|
|
11626
|
+
n && ue(!0);
|
|
11626
11627
|
}, [n]);
|
|
11627
|
-
const
|
|
11628
|
-
|
|
11629
|
-
w && !
|
|
11630
|
-
}, [w,
|
|
11631
|
-
const
|
|
11632
|
-
var
|
|
11633
|
-
|
|
11634
|
-
},
|
|
11628
|
+
const F = !t || e === "paused";
|
|
11629
|
+
Ze(() => {
|
|
11630
|
+
w && !F && B.current && B.current.focus();
|
|
11631
|
+
}, [w, F]);
|
|
11632
|
+
const Q = () => {
|
|
11633
|
+
var Z;
|
|
11634
|
+
F || !be.trim() || !L || (L(be.trim()), $(""), (Z = B.current) == null || Z.focus());
|
|
11635
|
+
}, ve = () => {
|
|
11635
11636
|
if (e === "connecting")
|
|
11636
11637
|
return (v == null ? void 0 : v.message) || "Connecting...";
|
|
11637
11638
|
if (w && t)
|
|
@@ -11684,10 +11685,10 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11684
11685
|
return "#6b7280";
|
|
11685
11686
|
}
|
|
11686
11687
|
};
|
|
11687
|
-
return !n && !
|
|
11688
|
+
return !n && !ae ? null : /* @__PURE__ */ A(fr, { children: /* @__PURE__ */ Y(
|
|
11688
11689
|
"div",
|
|
11689
11690
|
{
|
|
11690
|
-
onTransitionEnd: () => !n &&
|
|
11691
|
+
onTransitionEnd: () => !n && ue(!1),
|
|
11691
11692
|
style: {
|
|
11692
11693
|
position: "fixed",
|
|
11693
11694
|
bottom: "24px",
|
|
@@ -11791,7 +11792,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11791
11792
|
}
|
|
11792
11793
|
}
|
|
11793
11794
|
),
|
|
11794
|
-
|
|
11795
|
+
ve()
|
|
11795
11796
|
]
|
|
11796
11797
|
}
|
|
11797
11798
|
)
|
|
@@ -11909,8 +11910,8 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11909
11910
|
]
|
|
11910
11911
|
}
|
|
11911
11912
|
),
|
|
11912
|
-
|
|
11913
|
-
const
|
|
11913
|
+
P && (() => {
|
|
11914
|
+
const Z = Number.isFinite(P.progressPercent) ? Math.max(0, Math.min(100, P.progressPercent)) : 0;
|
|
11914
11915
|
return /* @__PURE__ */ Y(
|
|
11915
11916
|
"div",
|
|
11916
11917
|
{
|
|
@@ -11932,12 +11933,12 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11932
11933
|
children: [
|
|
11933
11934
|
/* @__PURE__ */ Y("span", { children: [
|
|
11934
11935
|
"Step ",
|
|
11935
|
-
|
|
11936
|
+
P.currentStep,
|
|
11936
11937
|
" of ",
|
|
11937
|
-
|
|
11938
|
+
P.totalSteps
|
|
11938
11939
|
] }),
|
|
11939
11940
|
/* @__PURE__ */ Y("span", { children: [
|
|
11940
|
-
Math.round(
|
|
11941
|
+
Math.round(Z),
|
|
11941
11942
|
"%"
|
|
11942
11943
|
] })
|
|
11943
11944
|
]
|
|
@@ -11958,14 +11959,14 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11958
11959
|
height: "100%",
|
|
11959
11960
|
borderRadius: "2px",
|
|
11960
11961
|
background: "linear-gradient(90deg, #3b82f6, #60a5fa)",
|
|
11961
|
-
width: `${
|
|
11962
|
+
width: `${Z}%`,
|
|
11962
11963
|
transition: "width 0.5s ease"
|
|
11963
11964
|
}
|
|
11964
11965
|
}
|
|
11965
11966
|
)
|
|
11966
11967
|
}
|
|
11967
11968
|
),
|
|
11968
|
-
|
|
11969
|
+
P.currentTaskTitle && /* @__PURE__ */ A(
|
|
11969
11970
|
"div",
|
|
11970
11971
|
{
|
|
11971
11972
|
style: {
|
|
@@ -11976,7 +11977,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
11976
11977
|
textOverflow: "ellipsis",
|
|
11977
11978
|
whiteSpace: "nowrap"
|
|
11978
11979
|
},
|
|
11979
|
-
children:
|
|
11980
|
+
children: P.currentTaskTitle
|
|
11980
11981
|
}
|
|
11981
11982
|
)
|
|
11982
11983
|
]
|
|
@@ -12067,11 +12068,11 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12067
12068
|
boxShadow: "0 4px 12px rgba(245, 158, 11, 0.3)",
|
|
12068
12069
|
transition: "all 0.2s ease"
|
|
12069
12070
|
},
|
|
12070
|
-
onMouseEnter: (
|
|
12071
|
-
|
|
12071
|
+
onMouseEnter: (Z) => {
|
|
12072
|
+
Z.currentTarget.style.transform = "scale(1.02)";
|
|
12072
12073
|
},
|
|
12073
|
-
onMouseLeave: (
|
|
12074
|
-
|
|
12074
|
+
onMouseLeave: (Z) => {
|
|
12075
|
+
Z.currentTarget.style.transform = "scale(1)";
|
|
12075
12076
|
},
|
|
12076
12077
|
children: [
|
|
12077
12078
|
/* @__PURE__ */ A("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ A("polygon", { points: "5 3 19 12 5 21 5 3" }) }),
|
|
@@ -12128,7 +12129,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12128
12129
|
]
|
|
12129
12130
|
}
|
|
12130
12131
|
) : /* @__PURE__ */ Y(fr, { children: [
|
|
12131
|
-
i.map((
|
|
12132
|
+
i.map((Z) => /* @__PURE__ */ A(Vs, { message: Z }, Z.id)),
|
|
12132
12133
|
o && s && /* @__PURE__ */ A(
|
|
12133
12134
|
Vs,
|
|
12134
12135
|
{
|
|
@@ -12142,7 +12143,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12142
12143
|
}
|
|
12143
12144
|
)
|
|
12144
12145
|
] }),
|
|
12145
|
-
/* @__PURE__ */ A("div", { ref:
|
|
12146
|
+
/* @__PURE__ */ A("div", { ref: N })
|
|
12146
12147
|
]
|
|
12147
12148
|
}
|
|
12148
12149
|
),
|
|
@@ -12169,9 +12170,10 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12169
12170
|
/* @__PURE__ */ A(
|
|
12170
12171
|
"button",
|
|
12171
12172
|
{
|
|
12172
|
-
onClick: w ?
|
|
12173
|
+
onClick: w ? E : h,
|
|
12173
12174
|
disabled: !t,
|
|
12174
|
-
"aria-label": w ? "Switch to voice mode" : r ? "Mute microphone" : "Unmute microphone",
|
|
12175
|
+
"aria-label": w && x ? "Microphone access was denied. Allow microphone in browser settings to switch to voice mode." : w ? "Switch to voice mode" : r ? "Mute microphone" : "Unmute microphone",
|
|
12176
|
+
title: w && x ? "Microphone access was denied. Allow microphone in browser settings to switch to voice mode." : void 0,
|
|
12175
12177
|
style: {
|
|
12176
12178
|
width: "32px",
|
|
12177
12179
|
height: "32px",
|
|
@@ -12215,14 +12217,14 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12215
12217
|
/* @__PURE__ */ A(
|
|
12216
12218
|
"input",
|
|
12217
12219
|
{
|
|
12218
|
-
ref:
|
|
12220
|
+
ref: B,
|
|
12219
12221
|
type: "text",
|
|
12220
|
-
placeholder:
|
|
12221
|
-
value:
|
|
12222
|
-
disabled:
|
|
12223
|
-
onChange: (
|
|
12224
|
-
onKeyDown: (
|
|
12225
|
-
|
|
12222
|
+
placeholder: F ? "Not connected..." : "Type a message...",
|
|
12223
|
+
value: be,
|
|
12224
|
+
disabled: F,
|
|
12225
|
+
onChange: (Z) => $(Z.target.value),
|
|
12226
|
+
onKeyDown: (Z) => {
|
|
12227
|
+
Z.key === "Enter" && !Z.shiftKey && (Z.preventDefault(), Q());
|
|
12226
12228
|
},
|
|
12227
12229
|
style: {
|
|
12228
12230
|
flex: 1,
|
|
@@ -12230,14 +12232,14 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12230
12232
|
borderRadius: "8px",
|
|
12231
12233
|
border: "none",
|
|
12232
12234
|
background: "transparent",
|
|
12233
|
-
color:
|
|
12235
|
+
color: F ? "rgba(255, 255, 255, 0.3)" : "rgba(255, 255, 255, 0.9)",
|
|
12234
12236
|
fontSize: "13px",
|
|
12235
12237
|
outline: "none",
|
|
12236
12238
|
caretColor: "#60a5fa",
|
|
12237
12239
|
fontFamily: "inherit",
|
|
12238
12240
|
width: "100%",
|
|
12239
12241
|
minWidth: 0,
|
|
12240
|
-
cursor:
|
|
12242
|
+
cursor: F ? "not-allowed" : "text"
|
|
12241
12243
|
}
|
|
12242
12244
|
}
|
|
12243
12245
|
)
|
|
@@ -12296,7 +12298,7 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12296
12298
|
color: !r && t && e !== "speaking" ? "#ef4444" : "rgba(255, 255, 255, 0.5)",
|
|
12297
12299
|
letterSpacing: "0.01em"
|
|
12298
12300
|
},
|
|
12299
|
-
children:
|
|
12301
|
+
children: ve()
|
|
12300
12302
|
}
|
|
12301
12303
|
)
|
|
12302
12304
|
] }) })
|
|
@@ -12306,19 +12308,19 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12306
12308
|
/* @__PURE__ */ A(
|
|
12307
12309
|
"button",
|
|
12308
12310
|
{
|
|
12309
|
-
onClick:
|
|
12310
|
-
disabled: !
|
|
12311
|
+
onClick: Q,
|
|
12312
|
+
disabled: !be.trim(),
|
|
12311
12313
|
"aria-label": "Send message",
|
|
12312
|
-
onMouseEnter: () =>
|
|
12313
|
-
onMouseLeave: () =>
|
|
12314
|
+
onMouseEnter: () => H(!0),
|
|
12315
|
+
onMouseLeave: () => H(!1),
|
|
12314
12316
|
style: {
|
|
12315
12317
|
width: "30px",
|
|
12316
12318
|
height: "30px",
|
|
12317
12319
|
borderRadius: "8px",
|
|
12318
12320
|
border: "none",
|
|
12319
|
-
background:
|
|
12320
|
-
color:
|
|
12321
|
-
cursor:
|
|
12321
|
+
background: be.trim() ? z ? "#2563eb" : "#3b82f6" : "transparent",
|
|
12322
|
+
color: be.trim() ? "white" : "rgba(255, 255, 255, 0.3)",
|
|
12323
|
+
cursor: be.trim() ? "pointer" : "default",
|
|
12322
12324
|
display: "flex",
|
|
12323
12325
|
alignItems: "center",
|
|
12324
12326
|
justifyContent: "center",
|
|
@@ -12338,17 +12340,17 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12338
12340
|
t && /* @__PURE__ */ A(
|
|
12339
12341
|
"button",
|
|
12340
12342
|
{
|
|
12341
|
-
onClick:
|
|
12343
|
+
onClick: E,
|
|
12342
12344
|
"aria-label": "Switch to text mode",
|
|
12343
|
-
onMouseEnter: () =>
|
|
12344
|
-
onMouseLeave: () =>
|
|
12345
|
+
onMouseEnter: () => U(!0),
|
|
12346
|
+
onMouseLeave: () => U(!1),
|
|
12345
12347
|
style: {
|
|
12346
12348
|
width: "30px",
|
|
12347
12349
|
height: "30px",
|
|
12348
12350
|
borderRadius: "8px",
|
|
12349
12351
|
border: "none",
|
|
12350
12352
|
background: "transparent",
|
|
12351
|
-
color:
|
|
12353
|
+
color: te ? "rgba(255, 255, 255, 0.7)" : "rgba(255, 255, 255, 0.4)",
|
|
12352
12354
|
cursor: "pointer",
|
|
12353
12355
|
display: "flex",
|
|
12354
12356
|
alignItems: "center",
|
|
@@ -12600,42 +12602,43 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12600
12602
|
onMinimize: E,
|
|
12601
12603
|
onExpand: L,
|
|
12602
12604
|
// Text mode props
|
|
12603
|
-
textModeEnabled:
|
|
12604
|
-
|
|
12605
|
-
|
|
12605
|
+
textModeEnabled: P = !1,
|
|
12606
|
+
micPermissionDenied: N = !1,
|
|
12607
|
+
onToggleTextMode: B,
|
|
12608
|
+
onSendText: ae,
|
|
12606
12609
|
// Nudge props
|
|
12607
|
-
nudgeText:
|
|
12608
|
-
showNudge:
|
|
12609
|
-
onNudgeDismiss:
|
|
12610
|
-
nudgeAutoHideDelay:
|
|
12611
|
-
nudgeAutoShow:
|
|
12610
|
+
nudgeText: ue,
|
|
12611
|
+
showNudge: be,
|
|
12612
|
+
onNudgeDismiss: $,
|
|
12613
|
+
nudgeAutoHideDelay: z,
|
|
12614
|
+
nudgeAutoShow: H,
|
|
12612
12615
|
// Plan progress props
|
|
12613
|
-
planProgress:
|
|
12616
|
+
planProgress: te
|
|
12614
12617
|
}) => {
|
|
12615
|
-
const [
|
|
12616
|
-
|
|
12617
|
-
(w || x) && !n &&
|
|
12618
|
-
}, [w, x, n]),
|
|
12619
|
-
n &&
|
|
12620
|
-
}, [n]),
|
|
12618
|
+
const [U, F] = ze(!w && !x);
|
|
12619
|
+
Ze(() => {
|
|
12620
|
+
(w || x) && !n && F(!1);
|
|
12621
|
+
}, [w, x, n]), Ze(() => {
|
|
12622
|
+
n && F(!0);
|
|
12623
|
+
}, [n]), Ze(() => {
|
|
12621
12624
|
ie.log("[AgentUI] Rendering with state:", {
|
|
12622
12625
|
connected: n,
|
|
12623
12626
|
agentState: t,
|
|
12624
12627
|
voiceEnabled: e,
|
|
12625
12628
|
screenShareEnabled: o,
|
|
12626
|
-
panelOpen:
|
|
12629
|
+
panelOpen: U,
|
|
12627
12630
|
historyCount: f.length,
|
|
12628
12631
|
botTranscript: r == null ? void 0 : r.substring(0, 30),
|
|
12629
12632
|
userTranscript: i == null ? void 0 : i.substring(0, 30)
|
|
12630
12633
|
});
|
|
12631
|
-
}, [n, t, e, o,
|
|
12632
|
-
const { currentTranscript:
|
|
12633
|
-
|
|
12634
|
-
}, [L]),
|
|
12635
|
-
|
|
12634
|
+
}, [n, t, e, o, U, f.length, r, i]);
|
|
12635
|
+
const { currentTranscript: Q, currentRole: ve } = Oc(() => t === "speaking" && r ? { currentTranscript: r, currentRole: "assistant" } : t === "listening" && i ? { currentTranscript: i, currentRole: "user" } : { currentTranscript: "", currentRole: void 0 }, [t, r, i]), he = Ye(() => {
|
|
12636
|
+
F(!0), L == null || L();
|
|
12637
|
+
}, [L]), Z = Ye(() => {
|
|
12638
|
+
F(!1), E == null || E();
|
|
12636
12639
|
}, [E]);
|
|
12637
12640
|
return /* @__PURE__ */ Y(fr, { children: [
|
|
12638
|
-
!
|
|
12641
|
+
!U && /* @__PURE__ */ A(
|
|
12639
12642
|
bh,
|
|
12640
12643
|
{
|
|
12641
12644
|
connected: n,
|
|
@@ -12644,37 +12647,38 @@ const ie = Fi(!1), Lt = "floe_nudge_state", qs = "floe_nudge_sound_played", pr =
|
|
|
12644
12647
|
onToggleConnection: d,
|
|
12645
12648
|
isReturningUser: w,
|
|
12646
12649
|
hasSkippedOnboarding: x,
|
|
12647
|
-
nudgeText:
|
|
12648
|
-
showNudge:
|
|
12649
|
-
onNudgeDismiss:
|
|
12650
|
-
nudgeAutoHideDelay:
|
|
12651
|
-
nudgeAutoShow:
|
|
12650
|
+
nudgeText: ue,
|
|
12651
|
+
showNudge: be,
|
|
12652
|
+
onNudgeDismiss: $,
|
|
12653
|
+
nudgeAutoHideDelay: z,
|
|
12654
|
+
nudgeAutoShow: H
|
|
12652
12655
|
}
|
|
12653
12656
|
),
|
|
12654
12657
|
/* @__PURE__ */ A(
|
|
12655
12658
|
vh,
|
|
12656
12659
|
{
|
|
12657
|
-
isOpen:
|
|
12660
|
+
isOpen: U,
|
|
12658
12661
|
agentState: t,
|
|
12659
12662
|
connected: n,
|
|
12660
12663
|
voiceEnabled: e,
|
|
12661
12664
|
messages: f,
|
|
12662
|
-
currentTranscript:
|
|
12663
|
-
currentRole:
|
|
12665
|
+
currentTranscript: Q,
|
|
12666
|
+
currentRole: ve,
|
|
12664
12667
|
screenShareEnabled: o,
|
|
12665
12668
|
isSpeaking: s || a,
|
|
12666
12669
|
audioLevels: c,
|
|
12667
12670
|
onToggleConnection: d,
|
|
12668
12671
|
onToggleMute: u,
|
|
12669
12672
|
onToggleScreenShare: h,
|
|
12670
|
-
onMinimize:
|
|
12673
|
+
onMinimize: Z,
|
|
12671
12674
|
onResume: b,
|
|
12672
12675
|
onStop: m,
|
|
12673
12676
|
connectionProgress: v,
|
|
12674
|
-
textModeEnabled:
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12677
|
+
textModeEnabled: P,
|
|
12678
|
+
micPermissionDenied: N,
|
|
12679
|
+
onToggleTextMode: B,
|
|
12680
|
+
onSendText: ae,
|
|
12681
|
+
planProgress: te
|
|
12678
12682
|
}
|
|
12679
12683
|
),
|
|
12680
12684
|
/* @__PURE__ */ A("style", { children: `
|
|
@@ -15320,17 +15324,17 @@ const C = class C {
|
|
|
15320
15324
|
const w = v.getAttribute("id");
|
|
15321
15325
|
if (w)
|
|
15322
15326
|
try {
|
|
15323
|
-
const
|
|
15324
|
-
if (
|
|
15327
|
+
const B = document.querySelector(`label[for="${CSS.escape(w)}"]`);
|
|
15328
|
+
if (B && h(B.textContent || ""))
|
|
15325
15329
|
return C._logger.log("[HybridTargetResolver] → Found via label[for] attribute"), v;
|
|
15326
15330
|
} catch {
|
|
15327
15331
|
}
|
|
15328
15332
|
const x = v.getAttribute("aria-labelledby");
|
|
15329
15333
|
if (x) {
|
|
15330
|
-
const
|
|
15331
|
-
for (const
|
|
15332
|
-
const
|
|
15333
|
-
if (
|
|
15334
|
+
const B = x.split(/\s+/).filter((ae) => ae.length > 0);
|
|
15335
|
+
for (const ae of B) {
|
|
15336
|
+
const ue = document.getElementById(ae);
|
|
15337
|
+
if (ue && h(ue.textContent || ""))
|
|
15334
15338
|
return C._logger.log("[HybridTargetResolver] → Found via aria-labelledby"), v;
|
|
15335
15339
|
}
|
|
15336
15340
|
}
|
|
@@ -15340,40 +15344,40 @@ const C = class C {
|
|
|
15340
15344
|
const L = v.getAttribute("placeholder") || "";
|
|
15341
15345
|
if (L && h(L))
|
|
15342
15346
|
return C._logger.log("[HybridTargetResolver] → Found via placeholder"), v;
|
|
15343
|
-
let
|
|
15344
|
-
for (;
|
|
15345
|
-
const
|
|
15346
|
-
|
|
15347
|
+
let P = v.parentElement, N = 0;
|
|
15348
|
+
for (; P && N < 6; ) {
|
|
15349
|
+
const B = P.querySelectorAll('input, select, textarea, [role="combobox"], [role="listbox"]'), ae = Array.from(B), ue = ae.includes(v), be = P.classList.contains("MuiFormControl-root") || P.tagName === "FIELDSET" || /form(-|_)?(field|group|control|item|row)/i.test(P.className) || // React pattern: div containing both a label-like child and an input wrapper
|
|
15350
|
+
P.childElementCount >= 2 && P.childElementCount <= 5, $ = P.querySelectorAll(
|
|
15347
15351
|
'label, [class*="label"]:not(input):not(select):not(textarea):not([role="combobox"]), .MuiFormLabel-root, [class*="FormLabel"], [class*="form-label"], [class*="field-label"]'
|
|
15348
15352
|
);
|
|
15349
|
-
for (const
|
|
15350
|
-
if (v.contains(
|
|
15351
|
-
const
|
|
15352
|
-
if (!(
|
|
15353
|
-
if (
|
|
15354
|
-
return C._logger.log(`[HybridTargetResolver] → Found via label in container: "${
|
|
15355
|
-
if (
|
|
15356
|
-
return C._logger.log(`[HybridTargetResolver] → Found via label position: "${
|
|
15353
|
+
for (const z of $) {
|
|
15354
|
+
if (v.contains(z) || z.contains(v) || z.querySelector('input, select, textarea, [role="combobox"]')) continue;
|
|
15355
|
+
const H = ((b = z.textContent) == null ? void 0 : b.trim()) || "";
|
|
15356
|
+
if (!(H.length > 50) && h(H)) {
|
|
15357
|
+
if (B.length === 1 && ue)
|
|
15358
|
+
return C._logger.log(`[HybridTargetResolver] → Found via label in container: "${H}"`), v;
|
|
15359
|
+
if (ue && this.isTextNearElement(z, v, ae))
|
|
15360
|
+
return C._logger.log(`[HybridTargetResolver] → Found via label position: "${H}"`), v;
|
|
15357
15361
|
}
|
|
15358
15362
|
}
|
|
15359
|
-
if (
|
|
15360
|
-
const
|
|
15363
|
+
if (be || N >= 3) {
|
|
15364
|
+
const z = P.querySelectorAll(
|
|
15361
15365
|
":scope > div, :scope > span, :scope > p, :scope > div > div, :scope > div > span, :scope > div > p"
|
|
15362
15366
|
);
|
|
15363
|
-
for (const
|
|
15364
|
-
if (
|
|
15365
|
-
const
|
|
15366
|
-
if (
|
|
15367
|
-
const
|
|
15368
|
-
if (
|
|
15369
|
-
if (
|
|
15370
|
-
return C._logger.log(`[HybridTargetResolver] → Found via nearby text: "${
|
|
15371
|
-
if (
|
|
15372
|
-
return C._logger.log(`[HybridTargetResolver] → Found via nearby text (position): "${
|
|
15367
|
+
for (const H of z) {
|
|
15368
|
+
if (H.querySelector('input, select, textarea, [role="combobox"]') || H.contains(v) || v.contains(H)) continue;
|
|
15369
|
+
const te = v.value || "";
|
|
15370
|
+
if (te && ((y = H.textContent) == null ? void 0 : y.trim()) === te) continue;
|
|
15371
|
+
const U = ((m = H.textContent) == null ? void 0 : m.trim()) || "";
|
|
15372
|
+
if (U.length > 0 && U.length <= 30 && h(U)) {
|
|
15373
|
+
if (B.length === 1 && ue)
|
|
15374
|
+
return C._logger.log(`[HybridTargetResolver] → Found via nearby text: "${U}"`), v;
|
|
15375
|
+
if (ue && this.isTextNearElement(H, v, ae))
|
|
15376
|
+
return C._logger.log(`[HybridTargetResolver] → Found via nearby text (position): "${U}"`), v;
|
|
15373
15377
|
}
|
|
15374
15378
|
}
|
|
15375
15379
|
}
|
|
15376
|
-
|
|
15380
|
+
P = P.parentElement, N++;
|
|
15377
15381
|
}
|
|
15378
15382
|
}
|
|
15379
15383
|
return null;
|
|
@@ -15407,15 +15411,15 @@ const C = class C {
|
|
|
15407
15411
|
* When selector is provided, uses it to find associated elements
|
|
15408
15412
|
*/
|
|
15409
15413
|
static findByText(e, t, r) {
|
|
15410
|
-
var L,
|
|
15414
|
+
var L, P, N, B, ae, ue, be;
|
|
15411
15415
|
if (!e) return null;
|
|
15412
15416
|
const i = e.trim();
|
|
15413
15417
|
if (!i) return null;
|
|
15414
15418
|
const o = i.toLowerCase(), s = t || "*", a = this.escapeXPathString(i);
|
|
15415
15419
|
if (r) {
|
|
15416
|
-
const
|
|
15417
|
-
if (
|
|
15418
|
-
return C._logger.log(`[HybridTargetResolver] → Found element matching selector "${r}" associated with label "${i}"`),
|
|
15420
|
+
const $ = this.findElementByLabelText(i, r);
|
|
15421
|
+
if ($)
|
|
15422
|
+
return C._logger.log(`[HybridTargetResolver] → Found element matching selector "${r}" associated with label "${i}"`), $;
|
|
15419
15423
|
}
|
|
15420
15424
|
const c = `//${s}[normalize-space(.)=${a}]`;
|
|
15421
15425
|
C._logger.log(`[HybridTargetResolver] → XPath exact query: ${c}`);
|
|
@@ -15428,28 +15432,28 @@ const C = class C {
|
|
|
15428
15432
|
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
|
|
15429
15433
|
null
|
|
15430
15434
|
);
|
|
15431
|
-
} catch (
|
|
15432
|
-
C._logger.warn("[HybridTargetResolver] → XPath query failed:",
|
|
15435
|
+
} catch ($) {
|
|
15436
|
+
C._logger.warn("[HybridTargetResolver] → XPath query failed:", $), d = { snapshotLength: 0, snapshotItem: () => null };
|
|
15433
15437
|
}
|
|
15434
15438
|
if (d.snapshotLength > 0) {
|
|
15435
15439
|
C._logger.log(`[HybridTargetResolver] → Found ${d.snapshotLength} exact match(es), checking visibility...`);
|
|
15436
|
-
let
|
|
15437
|
-
for (let
|
|
15438
|
-
const
|
|
15439
|
-
if (
|
|
15440
|
-
C._logger.log(`[HybridTargetResolver] → Skipping display value (not an option): "${(L =
|
|
15440
|
+
let $ = null, z = null;
|
|
15441
|
+
for (let H = 0; H < d.snapshotLength; H++) {
|
|
15442
|
+
const te = d.snapshotItem(H);
|
|
15443
|
+
if (z || (z = te), this.isDropdownDisplayValue(te)) {
|
|
15444
|
+
C._logger.log(`[HybridTargetResolver] → Skipping display value (not an option): "${(L = te.textContent) == null ? void 0 : L.trim().substring(0, 30)}..."`);
|
|
15441
15445
|
continue;
|
|
15442
15446
|
}
|
|
15443
|
-
const
|
|
15444
|
-
if (
|
|
15445
|
-
|
|
15447
|
+
const U = te.getBoundingClientRect();
|
|
15448
|
+
if (U.width > 0 && U.height > 0) {
|
|
15449
|
+
$ = te, C._logger.log(`[HybridTargetResolver] → Returning visible match ${H}: "${(P = te.textContent) == null ? void 0 : P.trim().substring(0, 30)}..."`);
|
|
15446
15450
|
break;
|
|
15447
15451
|
}
|
|
15448
15452
|
}
|
|
15449
|
-
if (
|
|
15450
|
-
return
|
|
15451
|
-
if (
|
|
15452
|
-
return C._logger.log("[HybridTargetResolver] → No visible matches, returning first (possibly hidden) element"),
|
|
15453
|
+
if ($)
|
|
15454
|
+
return $;
|
|
15455
|
+
if (z && !this.isDropdownDisplayValue(z))
|
|
15456
|
+
return C._logger.log("[HybridTargetResolver] → No visible matches, returning first (possibly hidden) element"), z;
|
|
15453
15457
|
}
|
|
15454
15458
|
C._logger.log("[HybridTargetResolver] → No exact match, trying partial match...");
|
|
15455
15459
|
const u = `//${s}[contains(normalize-space(.), ${a})]`;
|
|
@@ -15463,91 +15467,91 @@ const C = class C {
|
|
|
15463
15467
|
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
|
|
15464
15468
|
null
|
|
15465
15469
|
);
|
|
15466
|
-
} catch (
|
|
15467
|
-
C._logger.warn("[HybridTargetResolver] → XPath partial query failed:",
|
|
15470
|
+
} catch ($) {
|
|
15471
|
+
C._logger.warn("[HybridTargetResolver] → XPath partial query failed:", $), h = { snapshotLength: 0, snapshotItem: () => null };
|
|
15468
15472
|
}
|
|
15469
15473
|
if (h.snapshotLength > 0) {
|
|
15470
|
-
let
|
|
15471
|
-
const
|
|
15472
|
-
C._logger.log(`[HybridTargetResolver] → Selector context: parentTag="${
|
|
15473
|
-
for (let
|
|
15474
|
-
const
|
|
15475
|
-
if (
|
|
15476
|
-
const
|
|
15477
|
-
if (
|
|
15478
|
-
let
|
|
15479
|
-
if (new RegExp(`\\b${C.escapeRegex(o)}\\b`, "i").test(
|
|
15480
|
-
|
|
15481
|
-
else if (
|
|
15482
|
-
if (
|
|
15483
|
-
if (this.matchesSelectorContext(
|
|
15484
|
-
C._logger.log(`[HybridTargetResolver] → Skipping low ratio match that doesn't match selector context: "${
|
|
15474
|
+
let $ = null, z = -1;
|
|
15475
|
+
const H = r ? this.extractSelectorContext(r) : {}, te = !!(H.parentTag || H.parentSelector);
|
|
15476
|
+
C._logger.log(`[HybridTargetResolver] → Selector context: parentTag="${H.parentTag || "none"}", expectedTag="${H.expectedTag || "none"}"`);
|
|
15477
|
+
for (let U = 0; U < h.snapshotLength; U++) {
|
|
15478
|
+
const F = h.snapshotItem(U), Q = (F.textContent || "").trim();
|
|
15479
|
+
if (Q.length === 0) continue;
|
|
15480
|
+
const ve = Q.toLowerCase(), he = o.length / ve.length, Z = F.getBoundingClientRect();
|
|
15481
|
+
if (Z.width === 0 || Z.height === 0 || this.isDropdownDisplayValue(F)) continue;
|
|
15482
|
+
let ke = he;
|
|
15483
|
+
if (new RegExp(`\\b${C.escapeRegex(o)}\\b`, "i").test(ve))
|
|
15484
|
+
ke += 0.5;
|
|
15485
|
+
else if (he < 0.5)
|
|
15486
|
+
if (te) {
|
|
15487
|
+
if (this.matchesSelectorContext(F, H) < 0.5) {
|
|
15488
|
+
C._logger.log(`[HybridTargetResolver] → Skipping low ratio match that doesn't match selector context: "${Q.slice(0, 30)}..."`);
|
|
15485
15489
|
continue;
|
|
15486
15490
|
}
|
|
15487
15491
|
} else {
|
|
15488
|
-
C._logger.log(`[HybridTargetResolver] → Skipping low ratio match (${
|
|
15492
|
+
C._logger.log(`[HybridTargetResolver] → Skipping low ratio match (${he.toFixed(2)}): "${Q.slice(0, 30)}..."`);
|
|
15489
15493
|
continue;
|
|
15490
15494
|
}
|
|
15491
|
-
if (
|
|
15492
|
-
const g = this.matchesSelectorContext(
|
|
15493
|
-
|
|
15495
|
+
if (te) {
|
|
15496
|
+
const g = this.matchesSelectorContext(F, H);
|
|
15497
|
+
ke += g * 0.3;
|
|
15494
15498
|
}
|
|
15495
|
-
|
|
15499
|
+
ke > z && (z = ke, $ = F);
|
|
15496
15500
|
}
|
|
15497
|
-
if (
|
|
15498
|
-
return C._logger.log(`[HybridTargetResolver] → XPath partial match found (score=${
|
|
15501
|
+
if ($)
|
|
15502
|
+
return C._logger.log(`[HybridTargetResolver] → XPath partial match found (score=${z.toFixed(2)})!`), $;
|
|
15499
15503
|
}
|
|
15500
15504
|
C._logger.log("[HybridTargetResolver] → XPath found nothing, trying fallback...");
|
|
15501
15505
|
const f = document.querySelectorAll(t || "*");
|
|
15502
15506
|
C._logger.isDebug && C._logger.log(`[HybridTargetResolver] → Fallback: checking ${f.length} <${t || "*"}> elements for text "${i}"`);
|
|
15503
|
-
const b = (
|
|
15504
|
-
const
|
|
15505
|
-
return Be(
|
|
15507
|
+
const b = ($) => {
|
|
15508
|
+
const z = $;
|
|
15509
|
+
return Be(z) ? !0 : z.id === "root" || z.id === "app" || z.id === "__next" || z.tagName === "BODY" || z.tagName === "HTML";
|
|
15506
15510
|
};
|
|
15507
|
-
for (const
|
|
15508
|
-
if (b(
|
|
15509
|
-
const
|
|
15510
|
-
if (
|
|
15511
|
-
return C._logger.log("[HybridTargetResolver] → Found via exact text match"),
|
|
15511
|
+
for (const $ of f) {
|
|
15512
|
+
if (b($) || (((N = $.textContent) == null ? void 0 : N.trim().toLowerCase()) || "") !== o) continue;
|
|
15513
|
+
const H = $.getBoundingClientRect();
|
|
15514
|
+
if (H.width > 0 && H.height > 0 && (((B = $.innerText) == null ? void 0 : B.trim().toLowerCase()) || "") === o)
|
|
15515
|
+
return C._logger.log("[HybridTargetResolver] → Found via exact text match"), $;
|
|
15512
15516
|
}
|
|
15513
15517
|
let y = null, m = -1 / 0;
|
|
15514
|
-
for (const
|
|
15515
|
-
if (b(
|
|
15516
|
-
const
|
|
15517
|
-
if (
|
|
15518
|
-
const
|
|
15519
|
-
if (
|
|
15520
|
-
const
|
|
15521
|
-
|
|
15518
|
+
for (const $ of f) {
|
|
15519
|
+
if (b($)) continue;
|
|
15520
|
+
const z = ((ae = $.textContent) == null ? void 0 : ae.trim().toLowerCase()) || "";
|
|
15521
|
+
if (z.length !== 0 && z.includes(o)) {
|
|
15522
|
+
const H = o.length / z.length, te = $.getBoundingClientRect(), U = te.width * te.height;
|
|
15523
|
+
if (U > 0 && U < 5e5) {
|
|
15524
|
+
const F = Math.max(0, 50 - U / 1e4), Q = H * 50, ve = F + Q;
|
|
15525
|
+
ve > m && (m = ve, y = $);
|
|
15522
15526
|
}
|
|
15523
15527
|
}
|
|
15524
15528
|
}
|
|
15525
15529
|
if (y) {
|
|
15526
|
-
const
|
|
15527
|
-
return C._logger.log(`[HybridTargetResolver] → Found via textContent (${
|
|
15530
|
+
const $ = y.getBoundingClientRect();
|
|
15531
|
+
return C._logger.log(`[HybridTargetResolver] → Found via textContent (${$.width.toFixed(0)}x${$.height.toFixed(0)}px, score=${m.toFixed(0)})`), y;
|
|
15528
15532
|
}
|
|
15529
15533
|
const v = t && ["input", "textarea"].includes(t.toLowerCase()) ? t.toLowerCase() : "input, textarea", w = document.querySelectorAll(v);
|
|
15530
15534
|
C._logger.log(`[HybridTargetResolver] → Checking ${w.length} input/textarea elements for placeholder "${i}"`);
|
|
15531
|
-
for (const
|
|
15532
|
-
const
|
|
15533
|
-
if (Be(
|
|
15534
|
-
const
|
|
15535
|
-
if (
|
|
15536
|
-
const
|
|
15537
|
-
if (
|
|
15538
|
-
return C._logger.log(`[HybridTargetResolver] → Found via placeholder match: "${
|
|
15535
|
+
for (const $ of w) {
|
|
15536
|
+
const z = $;
|
|
15537
|
+
if (Be(z)) continue;
|
|
15538
|
+
const H = ((ue = z.getAttribute("placeholder")) == null ? void 0 : ue.trim()) || "";
|
|
15539
|
+
if (H.toLowerCase() === o) {
|
|
15540
|
+
const te = z.getBoundingClientRect();
|
|
15541
|
+
if (te.width > 0 && te.height > 0)
|
|
15542
|
+
return C._logger.log(`[HybridTargetResolver] → Found via placeholder match: "${H}"`), z;
|
|
15539
15543
|
}
|
|
15540
15544
|
}
|
|
15541
15545
|
let x = null, E = 0;
|
|
15542
|
-
for (const
|
|
15543
|
-
const
|
|
15544
|
-
if (Be(
|
|
15545
|
-
const
|
|
15546
|
-
if (
|
|
15547
|
-
const
|
|
15548
|
-
if (
|
|
15549
|
-
const
|
|
15550
|
-
|
|
15546
|
+
for (const $ of w) {
|
|
15547
|
+
const z = $;
|
|
15548
|
+
if (Be(z)) continue;
|
|
15549
|
+
const H = ((be = z.getAttribute("placeholder")) == null ? void 0 : be.trim().toLowerCase()) || "";
|
|
15550
|
+
if (H && H.includes(o)) {
|
|
15551
|
+
const te = o.length / H.length;
|
|
15552
|
+
if (te > 0.6 && te > E) {
|
|
15553
|
+
const U = z.getBoundingClientRect();
|
|
15554
|
+
U.width > 0 && U.height > 0 && (x = z, E = te);
|
|
15551
15555
|
}
|
|
15552
15556
|
}
|
|
15553
15557
|
}
|
|
@@ -15733,14 +15737,14 @@ const C = class C {
|
|
|
15733
15737
|
// Static reference to DOMIntrospector for bounding box lookups
|
|
15734
15738
|
M(C, "domIntrospector", null), // Instance-scoped logger, updated by ActionExecutor when it is constructed.
|
|
15735
15739
|
M(C, "_logger", ie);
|
|
15736
|
-
let
|
|
15740
|
+
let le = C;
|
|
15737
15741
|
class Ih {
|
|
15738
15742
|
constructor(e = ie) {
|
|
15739
15743
|
M(this, "confirmationSound");
|
|
15740
15744
|
M(this, "logger");
|
|
15741
15745
|
/** Last error message from a failed action (e.g., modal overlay blocking click) */
|
|
15742
15746
|
M(this, "lastError", null);
|
|
15743
|
-
this.logger = e,
|
|
15747
|
+
this.logger = e, le.setLogger(e), this.confirmationSound = new Audio("data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA=");
|
|
15744
15748
|
}
|
|
15745
15749
|
/**
|
|
15746
15750
|
* Human-like click wrapper - delegates to the standalone humanLikeClick function
|
|
@@ -15794,7 +15798,7 @@ class Ih {
|
|
|
15794
15798
|
}
|
|
15795
15799
|
if (e.target.optionText && e.action === "click") {
|
|
15796
15800
|
this.logger.log("[ActionExecutor] 🔽 Dropdown option click detected:", e.target.optionText);
|
|
15797
|
-
let s =
|
|
15801
|
+
let s = le.resolveTarget(e.target);
|
|
15798
15802
|
if (!s) {
|
|
15799
15803
|
this.logger.log("[ActionExecutor] Option not visible - dropdown may be closed, attempting to open...");
|
|
15800
15804
|
let a = !1;
|
|
@@ -15810,23 +15814,23 @@ class Ih {
|
|
|
15810
15814
|
}
|
|
15811
15815
|
if (!a && e.target.selector) {
|
|
15812
15816
|
this.logger.log("[ActionExecutor] Trying to find dropdown by selector:", e.target.selector);
|
|
15813
|
-
const c = { ...e.target, optionText: void 0 }, d =
|
|
15817
|
+
const c = { ...e.target, optionText: void 0 }, d = le.resolveTarget(c);
|
|
15814
15818
|
if (d) {
|
|
15815
15819
|
const u = this.findComboboxInput(d);
|
|
15816
15820
|
u && (this.handleComboboxClick(u), a = !0);
|
|
15817
15821
|
}
|
|
15818
15822
|
}
|
|
15819
15823
|
if (a) {
|
|
15820
|
-
if (this.logger.log("[ActionExecutor] Waiting for dropdown to open..."), await new Promise((c) => setTimeout(c, 300)), s =
|
|
15824
|
+
if (this.logger.log("[ActionExecutor] Waiting for dropdown to open..."), await new Promise((c) => setTimeout(c, 300)), s = le.resolveTarget(e.target), !s)
|
|
15821
15825
|
return this.logger.warn("[ActionExecutor] ❌ Option still not found after opening dropdown:", e.target.optionText), !1;
|
|
15822
15826
|
this.logger.log("[ActionExecutor] ✅ Found option after opening dropdown");
|
|
15823
15827
|
} else
|
|
15824
15828
|
return this.logger.warn("[ActionExecutor] ❌ Could not open dropdown - no trigger found. Add a separate task to open the dropdown first."), !1;
|
|
15825
15829
|
}
|
|
15826
|
-
return t && this.isHybridActionDestructive(e) && !await this.getHybridConsent(e) ? !1 : (
|
|
15830
|
+
return t && this.isHybridActionDestructive(e) && !await this.getHybridConsent(e) ? !1 : (le.scrollIntoView(s), await new Promise((a) => setTimeout(a, 100)), this.performClick(s), this.confirmationSound.play().catch(() => {
|
|
15827
15831
|
}), this.logger.log(`[ActionExecutor] ✅ Successfully clicked dropdown option: "${e.target.optionText}"`), !0);
|
|
15828
15832
|
}
|
|
15829
|
-
const r =
|
|
15833
|
+
const r = le.resolveTarget(e.target);
|
|
15830
15834
|
if (!r)
|
|
15831
15835
|
return this.logger.warn("[ActionExecutor] Could not resolve target:", e.target), !1;
|
|
15832
15836
|
if (t && this.isHybridActionDestructive(e) && !await this.getHybridConsent(e))
|
|
@@ -15846,7 +15850,7 @@ class Ih {
|
|
|
15846
15850
|
* @param selector - Optional selector for special dropdown handling
|
|
15847
15851
|
*/
|
|
15848
15852
|
async executeOnElement(e, t, r, i) {
|
|
15849
|
-
switch (
|
|
15853
|
+
switch (le.scrollIntoView(t), await new Promise((o) => setTimeout(o, 300)), e) {
|
|
15850
15854
|
case "click":
|
|
15851
15855
|
await this.expandCollapsedContainer(t), this.simulateClick(t, i);
|
|
15852
15856
|
break;
|
|
@@ -16116,7 +16120,7 @@ class Ih {
|
|
|
16116
16120
|
* Delegates to shared dropdown-helpers module.
|
|
16117
16121
|
*/
|
|
16118
16122
|
findDropdownOption(e) {
|
|
16119
|
-
return Cr(e,
|
|
16123
|
+
return Cr(e, le.isVisible);
|
|
16120
16124
|
}
|
|
16121
16125
|
/**
|
|
16122
16126
|
* Check if element appears to be a dropdown option
|
|
@@ -16794,7 +16798,7 @@ class Rh {
|
|
|
16794
16798
|
*/
|
|
16795
16799
|
highlightTarget(e, t = {}) {
|
|
16796
16800
|
this.logger.log("╔══════════════════════════════════════════════════════════════╗"), this.logger.log("║ [OverlaySystem] 💡 HIGHLIGHT TARGET CALLED ║"), this.logger.log("╚══════════════════════════════════════════════════════════════╝"), this.logger.log("[OverlaySystem] Target:", JSON.stringify(e, null, 2)), this.logger.log("[OverlaySystem] Options:", t);
|
|
16797
|
-
const r =
|
|
16801
|
+
const r = le.resolveTarget(e);
|
|
16798
16802
|
return r ? (this.logger.log("[OverlaySystem] ✅ Element found, applying highlight..."), this.logger.log("[OverlaySystem] Element details:"), this.logger.log(" • tagName:", r.tagName), this.logger.log(" • id:", r.id || "(none)"), this.logger.log(" • classes:", r.className || "(none)"), this.logger.log(" • innerText:", (r.innerText || "").substring(0, 50) + "..."), this.highlightElement(r, t), this.logger.log("[OverlaySystem] 🎨 Highlight applied successfully!"), !0) : (this.logger.warn("[OverlaySystem] ❌ Element not found for target"), !1);
|
|
16799
16803
|
}
|
|
16800
16804
|
/**
|
|
@@ -16828,7 +16832,7 @@ class Rh {
|
|
|
16828
16832
|
const h = c.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
16829
16833
|
h && (o = parseInt(h[1]), s = parseInt(h[2]), a = parseInt(h[3]));
|
|
16830
16834
|
}
|
|
16831
|
-
if (this.highlightEl || (this.logger.log("[OverlaySystem] Creating new highlight element"), this.highlightEl = document.createElement("div"), this.highlightEl.id = "hse-highlight-element", this.highlightEl.setAttribute(Gt, "highlight"), (u = this.container) == null || u.appendChild(this.highlightEl)), this.logger.log("[OverlaySystem] Scrolling element into view..."),
|
|
16835
|
+
if (this.highlightEl || (this.logger.log("[OverlaySystem] Creating new highlight element"), this.highlightEl = document.createElement("div"), this.highlightEl.id = "hse-highlight-element", this.highlightEl.setAttribute(Gt, "highlight"), (u = this.container) == null || u.appendChild(this.highlightEl)), this.logger.log("[OverlaySystem] Scrolling element into view..."), le.scrollIntoView(e), this.logger.log("[OverlaySystem] Waiting 300ms for scroll to complete..."), setTimeout(() => {
|
|
16832
16836
|
const h = e.getBoundingClientRect();
|
|
16833
16837
|
this.logger.log("[OverlaySystem] Element position after scroll:"), this.logger.log(" • top:", h.top), this.logger.log(" • left:", h.left), this.logger.log(" • width:", h.width), this.logger.log(" • height:", h.height), this.highlightEl && (this.highlightEl.style.cssText = `
|
|
16834
16838
|
position: fixed;
|
|
@@ -17190,20 +17194,20 @@ class ji {
|
|
|
17190
17194
|
this.logger.warn("[ScreenCapture] iframe contentWindow not available"), m(), this.safeCanvasToDataURL(a, o, i).then(h, f);
|
|
17191
17195
|
return;
|
|
17192
17196
|
}
|
|
17193
|
-
const x = new XMLSerializer().serializeToString(y.documentElement), E = `<svg xmlns="http://www.w3.org/2000/svg" width="${window.innerWidth}" height="${window.innerHeight}"><foreignObject width="100%" height="100%">` + x + "</foreignObject></svg>", L = new Blob([E], { type: "image/svg+xml;charset=utf-8" }),
|
|
17197
|
+
const x = new XMLSerializer().serializeToString(y.documentElement), E = `<svg xmlns="http://www.w3.org/2000/svg" width="${window.innerWidth}" height="${window.innerHeight}"><foreignObject width="100%" height="100%">` + x + "</foreignObject></svg>", L = new Blob([E], { type: "image/svg+xml;charset=utf-8" }), P = URL.createObjectURL(L), N = new Image();
|
|
17194
17198
|
N.onload = () => {
|
|
17195
|
-
if (c.save(), c.scale(r, r), c.drawImage(N, 0, 0), c.restore(), URL.revokeObjectURL(
|
|
17196
|
-
for (const
|
|
17199
|
+
if (c.save(), c.scale(r, r), c.drawImage(N, 0, 0), c.restore(), URL.revokeObjectURL(P), t && s.length > 0)
|
|
17200
|
+
for (const B of s)
|
|
17197
17201
|
this.applyBlur(c, {
|
|
17198
|
-
x:
|
|
17199
|
-
y:
|
|
17200
|
-
width:
|
|
17201
|
-
height:
|
|
17202
|
+
x: B.x * r,
|
|
17203
|
+
y: B.y * r,
|
|
17204
|
+
width: B.width * r,
|
|
17205
|
+
height: B.height * r
|
|
17202
17206
|
});
|
|
17203
17207
|
m(), this.safeCanvasToDataURL(a, o, i).then(h, f);
|
|
17204
17208
|
}, N.onerror = () => {
|
|
17205
|
-
URL.revokeObjectURL(
|
|
17206
|
-
}, N.src =
|
|
17209
|
+
URL.revokeObjectURL(P), this.logger.warn("[ScreenCapture] SVG image render failed, returning blank canvas"), m(), this.safeCanvasToDataURL(a, o, i).then(h, f);
|
|
17210
|
+
}, N.src = P;
|
|
17207
17211
|
} catch (v) {
|
|
17208
17212
|
this.logger.error("[ScreenCapture] Failed to render iframe content:", v), m(), this.safeCanvasToDataURL(a, o, i).then(h, f);
|
|
17209
17213
|
}
|
|
@@ -17721,7 +17725,7 @@ class $h {
|
|
|
17721
17725
|
let i = null;
|
|
17722
17726
|
const o = 3, s = [300, 500, 800];
|
|
17723
17727
|
for (let f = 0; f <= o; f++)
|
|
17724
|
-
if (f > 0 && (this.logger.log(`[BatchedActionExecutor] Retry ${f}/${o} in ${s[f - 1]}ms...`), await new Promise((b) => setTimeout(b, s[f - 1]))), i =
|
|
17728
|
+
if (f > 0 && (this.logger.log(`[BatchedActionExecutor] Retry ${f}/${o} in ${s[f - 1]}ms...`), await new Promise((b) => setTimeout(b, s[f - 1]))), i = le.resolveTarget(e.target), i) {
|
|
17725
17729
|
const b = ((u = i.textContent) == null ? void 0 : u.trim().toLowerCase()) || "", y = i.tagName.toLowerCase();
|
|
17726
17730
|
if (t && !b.includes(t))
|
|
17727
17731
|
if (b.length >= 15 && // Must have enough chars to be meaningful
|
|
@@ -17818,13 +17822,13 @@ class $h {
|
|
|
17818
17822
|
async executeScrollStep(e) {
|
|
17819
17823
|
if (!e.target)
|
|
17820
17824
|
return this.logger.warn("[BatchedActionExecutor] Scroll step has no target"), !1;
|
|
17821
|
-
const t =
|
|
17825
|
+
const t = le.resolveTarget(e.target);
|
|
17822
17826
|
return t ? (t.scrollIntoView({ behavior: "auto", block: "center" }), await new Promise((r) => setTimeout(r, 100)), !0) : (this.logger.warn("[BatchedActionExecutor] Scroll target not found:", e.target), !0);
|
|
17823
17827
|
}
|
|
17824
17828
|
async waitForElement(e, t) {
|
|
17825
17829
|
const r = Date.now();
|
|
17826
17830
|
for (; Date.now() - r < t; ) {
|
|
17827
|
-
if (
|
|
17831
|
+
if (le.resolveTarget(e)) return !0;
|
|
17828
17832
|
await new Promise((o) => setTimeout(o, 100));
|
|
17829
17833
|
}
|
|
17830
17834
|
return !1;
|
|
@@ -17996,6 +18000,8 @@ class Cc extends Ch {
|
|
|
17996
18000
|
M(this, "_isMinimized", !1);
|
|
17997
18001
|
// Text mode state
|
|
17998
18002
|
M(this, "textModeEnabled", !1);
|
|
18003
|
+
M(this, "micPermissionDenied", !1);
|
|
18004
|
+
// True when browser denied/cancelled mic access
|
|
17999
18005
|
// Plan progress state (sent from bot during guided plan execution)
|
|
18000
18006
|
M(this, "planProgress", null);
|
|
18001
18007
|
if (!t.clientKey)
|
|
@@ -18015,7 +18021,7 @@ class Cc extends Ch {
|
|
|
18015
18021
|
localStorage.getItem("floe_text_mode") === "true" && (this.textModeEnabled = !0);
|
|
18016
18022
|
} catch {
|
|
18017
18023
|
}
|
|
18018
|
-
this.sessionId = this.generateSessionId(), this.overlay = new Rh(this.logger), this.capture = new ji(this.config.redactionPatterns, this.logger), this.actionExecutor = new Ih(this.logger), this.pageTracker = new Nh(this, this.logger), this.domIntrospector = new Eh(this.logger),
|
|
18024
|
+
this.sessionId = this.generateSessionId(), this.overlay = new Rh(this.logger), this.capture = new ji(this.config.redactionPatterns, this.logger), this.actionExecutor = new Ih(this.logger), this.pageTracker = new Nh(this, this.logger), this.domIntrospector = new Eh(this.logger), le.setDOMIntrospector(this.domIntrospector), this.accessibleSnapshot = new mi(this.logger), this.batchedActionExecutor = new $h(this.overlay, this.actionExecutor, this.logger), this.batchedActionExecutor.setDOMIntrospector(this.domIntrospector), window.__onboardingSDK = this, this.logger.log("[OnboardingSDK] Initialized with config:", this.config);
|
|
18019
18025
|
}
|
|
18020
18026
|
/**
|
|
18021
18027
|
* Generate unique session ID
|
|
@@ -18103,13 +18109,13 @@ class Cc extends Ch {
|
|
|
18103
18109
|
this.logger.log("[OnboardingSDK] 📍 Initialized in minimized state - user clicks to connect"), this._isMinimized = !0, this.agentState = "idle", this.isInitialized = !0, this.renderReactUI(), this.emit("ready");
|
|
18104
18110
|
return;
|
|
18105
18111
|
}
|
|
18106
|
-
this.transport = new mt(), this.pipecatClient = new
|
|
18112
|
+
this.transport = new mt(), this.pipecatClient = new Ve({
|
|
18107
18113
|
transport: this.transport,
|
|
18108
18114
|
enableMic: this.textModeEnabled ? !1 : this.config.enableAudio !== !1,
|
|
18109
18115
|
enableCam: this.config.enableVideo || !1,
|
|
18110
18116
|
enableScreenShare: this.config.enableScreenCapture || !1,
|
|
18111
18117
|
callbacks: this.createPipecatCallbacks()
|
|
18112
|
-
}), this.setupNavigationDetection(), await this.
|
|
18118
|
+
}), this.setupNavigationDetection(), this.pipecatClient = await this.initDevicesWithMicFallback(this.pipecatClient), this.setupAudioPlayback();
|
|
18113
18119
|
const s = `${this.config.apiUrl}/sites/start-session`;
|
|
18114
18120
|
this.logger.log("[OnboardingSDK] Starting session via floe-api proxy:", s);
|
|
18115
18121
|
const a = {
|
|
@@ -18175,6 +18181,65 @@ class Cc extends Ch {
|
|
|
18175
18181
|
!(r != null && r.local) && t.kind === "audio" && (this.logger.log("[OnboardingSDK] 🔇 Bot audio track stopped"), this.botAudioAnalyzer && this.botAudioAnalyzer.stop(), this.audioLevels = []), r != null && r.local && t.kind === "video" && this.screenShareEnabled && (this.logger.log("[OnboardingSDK] 🖥️ Screen share track stopped (browser stop button)"), this.screenShareEnabled = !1, this.sendMetadata({ type: "screen_share_status", active: !1 }), this.renderReactUI());
|
|
18176
18182
|
}));
|
|
18177
18183
|
}
|
|
18184
|
+
/**
|
|
18185
|
+
* Initialize devices on `client`, retrying with mic disabled if the browser
|
|
18186
|
+
* denies the microphone permission. On a mic permission error the method:
|
|
18187
|
+
* - sets textModeEnabled/micPermissionDenied/micEnabled
|
|
18188
|
+
* - persists the preference to localStorage
|
|
18189
|
+
* - rebuilds PipecatClient with enableMic:false and calls initDevices again
|
|
18190
|
+
* - returns the new client so the caller can replace this.pipecatClient
|
|
18191
|
+
* Any non-permission error is rethrown unchanged.
|
|
18192
|
+
*/
|
|
18193
|
+
async initDevicesWithMicFallback(t) {
|
|
18194
|
+
try {
|
|
18195
|
+
return await t.initDevices(), this.logger.log("[OnboardingSDK] Devices initialized"), t;
|
|
18196
|
+
} catch (r) {
|
|
18197
|
+
if (!this.isMicPermissionError(r)) throw r;
|
|
18198
|
+
this.logger.warn("[OnboardingSDK] Mic permission denied during initDevices — retrying in text mode"), this.textModeEnabled = !0, this.micPermissionDenied = !0, this.micEnabled = !1;
|
|
18199
|
+
try {
|
|
18200
|
+
localStorage.setItem("floe_text_mode", "true");
|
|
18201
|
+
} catch {
|
|
18202
|
+
}
|
|
18203
|
+
const i = new Ve({
|
|
18204
|
+
transport: this.transport,
|
|
18205
|
+
enableMic: !1,
|
|
18206
|
+
enableCam: this.config.enableVideo || !1,
|
|
18207
|
+
enableScreenShare: this.config.enableScreenCapture || !1,
|
|
18208
|
+
callbacks: this.createPipecatCallbacks()
|
|
18209
|
+
});
|
|
18210
|
+
return await i.initDevices(), this.logger.log("[OnboardingSDK] Devices initialized (text mode fallback)"), i;
|
|
18211
|
+
}
|
|
18212
|
+
}
|
|
18213
|
+
/**
|
|
18214
|
+
* Returns true when the error represents a mic permission denial or cancellation.
|
|
18215
|
+
* Covers NotAllowedError (explicit deny), SecurityError (policy block), and
|
|
18216
|
+
* AbortError (user dismissed/cancelled the browser prompt).
|
|
18217
|
+
*/
|
|
18218
|
+
isMicPermissionError(t) {
|
|
18219
|
+
const r = ["NotAllowedError", "SecurityError", "AbortError"];
|
|
18220
|
+
if (t instanceof DOMException)
|
|
18221
|
+
return r.includes(t.name);
|
|
18222
|
+
if (t !== null && typeof t == "object") {
|
|
18223
|
+
const i = t.name;
|
|
18224
|
+
return typeof i == "string" && r.includes(i);
|
|
18225
|
+
}
|
|
18226
|
+
return !1;
|
|
18227
|
+
}
|
|
18228
|
+
/**
|
|
18229
|
+
* Switch to text mode automatically when mic permission is denied or cancelled.
|
|
18230
|
+
* Mutes the mic in the Pipecat client (if already connected), persists the
|
|
18231
|
+
* preference, and re-renders the UI so the text input is immediately visible.
|
|
18232
|
+
*/
|
|
18233
|
+
enableTextModeFallback() {
|
|
18234
|
+
if (!this.textModeEnabled) {
|
|
18235
|
+
this.logger.log("[OnboardingSDK] Mic permission denied/cancelled — switching to text mode automatically"), this.textModeEnabled = !0, this.micPermissionDenied = !0, this.micEnabled = !1, this.pipecatClient && this.pipecatClient.enableMic(!1), this.pipecatClient && this.isConnected && this.pipecatClient.sendClientMessage("set_text_mode", { enabled: !0 });
|
|
18236
|
+
try {
|
|
18237
|
+
localStorage.setItem("floe_text_mode", "true");
|
|
18238
|
+
} catch {
|
|
18239
|
+
}
|
|
18240
|
+
this.renderReactUI();
|
|
18241
|
+
}
|
|
18242
|
+
}
|
|
18178
18243
|
/**
|
|
18179
18244
|
* Setup user microphone analysis for waveform visualization
|
|
18180
18245
|
*/
|
|
@@ -18192,11 +18257,12 @@ class Cc extends Ch {
|
|
|
18192
18257
|
this.logger.log("[OnboardingSDK] 🎤 Mic stream request invalidated (disconnect/reconnect occurred), stopping tracks"), r.getTracks().forEach((i) => i.stop());
|
|
18193
18258
|
return;
|
|
18194
18259
|
}
|
|
18195
|
-
this.userMicStream && this.userMicStream.getTracks().forEach((i) => i.stop()), this.userMicStream = r, this.logger.log("[OnboardingSDK] 🎤 User mic stream captured for visualization"), this.userAudioAnalyzer && this.userAudioAnalyzer.start(r, (i) => {
|
|
18260
|
+
this.userMicStream && this.userMicStream.getTracks().forEach((i) => i.stop()), this.userMicStream = r, this.micPermissionDenied && (this.micPermissionDenied = !1, this.renderReactUI()), this.logger.log("[OnboardingSDK] 🎤 User mic stream captured for visualization"), this.userAudioAnalyzer && this.userAudioAnalyzer.start(r, (i) => {
|
|
18196
18261
|
this.userIsSpeaking && (this.audioLevels = i, this.renderReactUI());
|
|
18197
18262
|
});
|
|
18198
18263
|
} catch (r) {
|
|
18199
|
-
|
|
18264
|
+
if (t !== this.userMicStreamRequestId) return;
|
|
18265
|
+
this.isMicPermissionError(r) ? this.enableTextModeFallback() : this.logger.warn("[OnboardingSDK] Could not capture mic for visualization:", r);
|
|
18200
18266
|
}
|
|
18201
18267
|
}
|
|
18202
18268
|
/**
|
|
@@ -18249,6 +18315,7 @@ class Cc extends Ch {
|
|
|
18249
18315
|
onExpand: () => this.handleExpand(),
|
|
18250
18316
|
// Text mode props
|
|
18251
18317
|
textModeEnabled: this.textModeEnabled,
|
|
18318
|
+
micPermissionDenied: this.micPermissionDenied,
|
|
18252
18319
|
onToggleTextMode: () => this.toggleTextMode(),
|
|
18253
18320
|
onSendText: (o) => this.sendTextMessage(o),
|
|
18254
18321
|
// Nudge props
|
|
@@ -18335,13 +18402,13 @@ class Cc extends Ch {
|
|
|
18335
18402
|
}
|
|
18336
18403
|
this.connectInFlight = !0;
|
|
18337
18404
|
try {
|
|
18338
|
-
this.agentState = "connecting", this._isMinimized = !1, this.setConnectionProgress("initializing", "Initializing...", 10), this.transport = new mt(), this.setConnectionProgress("authenticating", "Authenticating...", 30), this.pipecatClient = new
|
|
18405
|
+
this.agentState = "connecting", this._isMinimized = !1, this.setConnectionProgress("initializing", "Initializing...", 10), this.transport = new mt(), this.setConnectionProgress("authenticating", "Authenticating...", 30), this.pipecatClient = new Ve({
|
|
18339
18406
|
transport: this.transport,
|
|
18340
18407
|
enableMic: this.textModeEnabled ? !1 : this.config.enableAudio !== !1,
|
|
18341
18408
|
enableCam: this.config.enableVideo || !1,
|
|
18342
18409
|
enableScreenShare: this.config.enableScreenCapture || !1,
|
|
18343
18410
|
callbacks: this.createPipecatCallbacks()
|
|
18344
|
-
}), this.setupNavigationDetection(), await this.
|
|
18411
|
+
}), this.setupNavigationDetection(), this.pipecatClient = await this.initDevicesWithMicFallback(this.pipecatClient), this.setupAudioPlayback(), this.setConnectionProgress("connecting", "Connecting to server...", 50);
|
|
18345
18412
|
const t = `${this.config.apiUrl}/sites/start-session`;
|
|
18346
18413
|
this.logger.log("[OnboardingSDK] Starting session via floe-api proxy:", t);
|
|
18347
18414
|
const r = {
|
|
@@ -18611,7 +18678,7 @@ class Cc extends Ch {
|
|
|
18611
18678
|
this.logger.log("[OnboardingSDK] 🎯 Dropdown option selection detected:", t.target.optionText), await this.handleDropdownOptionClick(t);
|
|
18612
18679
|
break;
|
|
18613
18680
|
}
|
|
18614
|
-
let o =
|
|
18681
|
+
let o = le.resolveTarget(t.target);
|
|
18615
18682
|
if (!o) {
|
|
18616
18683
|
this.logger.warn("[OnboardingSDK] ⚠️ Click target not found"), this.overlay.cleanup(), this.sendMetadata({
|
|
18617
18684
|
type: "bot_action_complete",
|
|
@@ -18623,7 +18690,7 @@ class Cc extends Ch {
|
|
|
18623
18690
|
});
|
|
18624
18691
|
break;
|
|
18625
18692
|
}
|
|
18626
|
-
|
|
18693
|
+
le.scrollIntoView(o), setTimeout(async () => {
|
|
18627
18694
|
var f, b;
|
|
18628
18695
|
const a = this.findCollapsedSidebar(o);
|
|
18629
18696
|
if (a) {
|
|
@@ -18635,7 +18702,7 @@ class Cc extends Ch {
|
|
|
18635
18702
|
400
|
|
18636
18703
|
), a.dispatchEvent(new MouseEvent("mouseenter", { bubbles: !0 })), a.dispatchEvent(new MouseEvent("mouseover", { bubbles: !0 })), await new Promise((m) => setTimeout(m, 450)), this.logger.log("[OnboardingSDK] 📂 Sidebar expanded");
|
|
18637
18704
|
}
|
|
18638
|
-
if (!await
|
|
18705
|
+
if (!await le.waitForPositionStability(o, 800)) {
|
|
18639
18706
|
this.logger.error("[OnboardingSDK] ❌ Element disappeared during stability wait"), this.overlay.cleanup(), this.sendMetadata({
|
|
18640
18707
|
type: "bot_action_complete",
|
|
18641
18708
|
action: "click",
|
|
@@ -18646,7 +18713,7 @@ class Cc extends Ch {
|
|
|
18646
18713
|
});
|
|
18647
18714
|
return;
|
|
18648
18715
|
}
|
|
18649
|
-
const d =
|
|
18716
|
+
const d = le.reResolveAndVerify(t.target, o);
|
|
18650
18717
|
d ? (o = d, this.logger.log("[OnboardingSDK] 🔄 Re-resolved element after stability wait")) : this.logger.warn("[OnboardingSDK] ⚠️ Could not re-resolve element, using original"), await this.overlay.moveToElementAndClick(o), await new Promise((y) => setTimeout(y, 150)), this._botActionDepth++;
|
|
18651
18718
|
const u = {
|
|
18652
18719
|
...t,
|
|
@@ -18709,7 +18776,7 @@ class Cc extends Ch {
|
|
|
18709
18776
|
break;
|
|
18710
18777
|
case "type":
|
|
18711
18778
|
this.logger.log("[OnboardingSDK] ⌨️ Executing TYPE action, value:", t.value);
|
|
18712
|
-
const s =
|
|
18779
|
+
const s = le.resolveTarget(t.target);
|
|
18713
18780
|
s && this.overlay.highlightResolvedElement(s, {
|
|
18714
18781
|
color: "rgba(76, 175, 80, 0.6)",
|
|
18715
18782
|
// Green for input
|
|
@@ -19021,7 +19088,7 @@ class Cc extends Ch {
|
|
|
19021
19088
|
c = `Invalid selector for element_visible: "${d}"`;
|
|
19022
19089
|
break;
|
|
19023
19090
|
}
|
|
19024
|
-
a = !!(u &&
|
|
19091
|
+
a = !!(u && le.isVisible(u)), c = a ? `Element "${d}" is visible` : `Element "${d}" is NOT visible or not found`;
|
|
19025
19092
|
}
|
|
19026
19093
|
break;
|
|
19027
19094
|
case "element_enabled":
|
|
@@ -19085,7 +19152,7 @@ class Cc extends Ch {
|
|
|
19085
19152
|
});
|
|
19086
19153
|
return;
|
|
19087
19154
|
}
|
|
19088
|
-
|
|
19155
|
+
le.scrollIntoView(i), await new Promise((c) => setTimeout(c, 200)), await this.overlay.moveToElementAndClick(i), this.logger.log("[OnboardingSDK] 📂 Opening multi-select dropdown..."), this._botActionDepth++;
|
|
19089
19156
|
try {
|
|
19090
19157
|
this.actionExecutor.openDropdown(i);
|
|
19091
19158
|
} finally {
|
|
@@ -19199,7 +19266,7 @@ class Cc extends Ch {
|
|
|
19199
19266
|
this.logger.log("[OnboardingSDK] ⚠️ Typing to filter did not reveal the option");
|
|
19200
19267
|
}
|
|
19201
19268
|
if (!o) {
|
|
19202
|
-
|
|
19269
|
+
le.scrollIntoView(s), await new Promise((b) => setTimeout(b, 200)), await this.overlay.moveToElementAndClick(s), this.logger.log("[OnboardingSDK] 📂 Opening dropdown..."), this._botActionDepth++;
|
|
19203
19270
|
try {
|
|
19204
19271
|
this.actionExecutor.openDropdown(s);
|
|
19205
19272
|
} finally {
|
|
@@ -19252,28 +19319,28 @@ class Cc extends Ch {
|
|
|
19252
19319
|
* Delegates to shared dropdown-helpers module.
|
|
19253
19320
|
*/
|
|
19254
19321
|
isDropdownCurrentlyOpen() {
|
|
19255
|
-
return Oh(
|
|
19322
|
+
return Oh(le.isVisible);
|
|
19256
19323
|
}
|
|
19257
19324
|
/**
|
|
19258
19325
|
* Find the search input within or associated with a dropdown.
|
|
19259
19326
|
* Delegates to shared dropdown-helpers module.
|
|
19260
19327
|
*/
|
|
19261
19328
|
findDropdownSearchInput(t) {
|
|
19262
|
-
return Dh(t,
|
|
19329
|
+
return Dh(t, le.isVisible);
|
|
19263
19330
|
}
|
|
19264
19331
|
/**
|
|
19265
19332
|
* Type text into a dropdown search input to filter options, then find the target option.
|
|
19266
19333
|
* Delegates to shared dropdown-helpers module.
|
|
19267
19334
|
*/
|
|
19268
19335
|
async typeToFilterDropdown(t, r) {
|
|
19269
|
-
return Ph(t, r,
|
|
19336
|
+
return Ph(t, r, le.isVisible);
|
|
19270
19337
|
}
|
|
19271
19338
|
/**
|
|
19272
19339
|
* Find a visible dropdown option by text.
|
|
19273
19340
|
* Delegates to shared dropdown-helpers module.
|
|
19274
19341
|
*/
|
|
19275
19342
|
findVisibleDropdownOption(t) {
|
|
19276
|
-
return Cr(t,
|
|
19343
|
+
return Cr(t, le.isVisible);
|
|
19277
19344
|
}
|
|
19278
19345
|
/**
|
|
19279
19346
|
* Try to scroll within the dropdown to find an option that might be off-screen.
|
|
@@ -19306,7 +19373,7 @@ class Cc extends Ch {
|
|
|
19306
19373
|
}
|
|
19307
19374
|
for (const c of a) {
|
|
19308
19375
|
const d = c;
|
|
19309
|
-
if (!
|
|
19376
|
+
if (!le.isVisible(d) || d.scrollHeight <= d.clientHeight + 5) continue;
|
|
19310
19377
|
const u = window.getComputedStyle(d).overflowY;
|
|
19311
19378
|
if (u === "visible" || u === "hidden") {
|
|
19312
19379
|
this.logger.log(`[OnboardingSDK] Skipping non-scrollable container (${s}), overflow-y: ${u}`);
|
|
@@ -19322,7 +19389,7 @@ class Cc extends Ch {
|
|
|
19322
19389
|
if (E.height === 0 || E.width === 0) continue;
|
|
19323
19390
|
const L = ((o = x.textContent) == null ? void 0 : o.trim().toLowerCase()) || "";
|
|
19324
19391
|
if (L === r || L.includes(r))
|
|
19325
|
-
return this.logger.log(`[OnboardingSDK] ✅ Found option after scrolling to position ${d.scrollTop}: "${t}"`), x.scrollIntoView({ block: "center" }), await new Promise((
|
|
19392
|
+
return this.logger.log(`[OnboardingSDK] ✅ Found option after scrolling to position ${d.scrollTop}: "${t}"`), x.scrollIntoView({ block: "center" }), await new Promise((P) => setTimeout(P, 100)), x;
|
|
19326
19393
|
}
|
|
19327
19394
|
}
|
|
19328
19395
|
d.scrollTop = b;
|
|
@@ -19605,8 +19672,8 @@ class Cc extends Ch {
|
|
|
19605
19672
|
*/
|
|
19606
19673
|
async executeActionFast(t) {
|
|
19607
19674
|
this.logger.log("[OnboardingSDK] ⚡ Fast executing action:", t.action);
|
|
19608
|
-
let r =
|
|
19609
|
-
if (!r && (await new Promise((o) => setTimeout(o, 150)), r =
|
|
19675
|
+
let r = le.resolveTarget(t.target);
|
|
19676
|
+
if (!r && (await new Promise((o) => setTimeout(o, 150)), r = le.resolveTarget(t.target), !r))
|
|
19610
19677
|
return this.logger.warn("[OnboardingSDK] ⚠️ Fast action target not found"), !1;
|
|
19611
19678
|
r.scrollIntoView({ behavior: "auto", block: "center" }), await new Promise((o) => setTimeout(o, 50)), this.overlay.highlightResolvedElement(r, {
|
|
19612
19679
|
color: "rgba(124, 58, 237, 0.4)",
|
|
@@ -19950,7 +20017,7 @@ class Cc extends Ch {
|
|
|
19950
20017
|
*/
|
|
19951
20018
|
toggleTextMode() {
|
|
19952
20019
|
var t, r;
|
|
19953
|
-
this.textModeEnabled = !this.textModeEnabled, this.textModeEnabled ? ((t = this.pipecatClient) == null || t.enableMic(!1), this.micEnabled = !1, this.logger.log("[OnboardingSDK] ⌨️ Text mode enabled — mic muted")) : ((r = this.pipecatClient) == null || r.enableMic(!0), this.micEnabled = !0, this.logger.log("[OnboardingSDK] 🎤 Voice mode enabled — mic unmuted"), this.isConnected && this.setupUserMicAnalysis()), this.pipecatClient && this.isConnected && this.pipecatClient.sendClientMessage("set_text_mode", {
|
|
20020
|
+
this.textModeEnabled = !this.textModeEnabled, this.textModeEnabled ? ((t = this.pipecatClient) == null || t.enableMic(!1), this.micEnabled = !1, this.logger.log("[OnboardingSDK] ⌨️ Text mode enabled — mic muted")) : ((r = this.pipecatClient) == null || r.enableMic(!0), this.micEnabled = !0, this.micPermissionDenied = !1, this.logger.log("[OnboardingSDK] 🎤 Voice mode enabled — mic unmuted"), this.isConnected && this.setupUserMicAnalysis()), this.pipecatClient && this.isConnected && this.pipecatClient.sendClientMessage("set_text_mode", {
|
|
19954
20021
|
enabled: this.textModeEnabled
|
|
19955
20022
|
});
|
|
19956
20023
|
try {
|