hanc-webrtc-widgets 2.2.14 → 2.3.1
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/hanc-webrtc-widgets.es.js +821 -804
- package/dist/hanc-webrtc-widgets.umd.js +24 -24
- package/dist/src/components/floating-call/floating-call.d.ts +1 -0
- package/dist/src/components/inline-call/inline-call.d.ts +1 -0
- package/dist/src/components/pill-call/pill-call.d.ts +1 -0
- package/package.json +1 -1
|
@@ -592,7 +592,7 @@ function ye(i) {
|
|
|
592
592
|
* Copyright 2017 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
594
594
|
*/
|
|
595
|
-
function
|
|
595
|
+
function An(i) {
|
|
596
596
|
return ye({ ...i, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
/**
|
|
@@ -1532,10 +1532,10 @@ function zg(i, e) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
return i.filter((t) => t.no === e.no);
|
|
1534
1534
|
}
|
|
1535
|
-
let
|
|
1536
|
-
for (let i = 0; i <
|
|
1537
|
-
co[45] =
|
|
1538
|
-
co[95] =
|
|
1535
|
+
let vi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), co = [];
|
|
1536
|
+
for (let i = 0; i < vi.length; i++) co[vi[i].charCodeAt(0)] = i;
|
|
1537
|
+
co[45] = vi.indexOf("+");
|
|
1538
|
+
co[95] = vi.indexOf("/");
|
|
1539
1539
|
const Tf = {
|
|
1540
1540
|
/**
|
|
1541
1541
|
* Decodes a base64 string to a byte array.
|
|
@@ -1596,16 +1596,16 @@ const Tf = {
|
|
|
1596
1596
|
for (let r = 0; r < i.length; r++)
|
|
1597
1597
|
switch (n = i[r], t) {
|
|
1598
1598
|
case 0:
|
|
1599
|
-
e +=
|
|
1599
|
+
e += vi[n >> 2], s = (n & 3) << 4, t = 1;
|
|
1600
1600
|
break;
|
|
1601
1601
|
case 1:
|
|
1602
|
-
e +=
|
|
1602
|
+
e += vi[s | n >> 4], s = (n & 15) << 2, t = 2;
|
|
1603
1603
|
break;
|
|
1604
1604
|
case 2:
|
|
1605
|
-
e +=
|
|
1605
|
+
e += vi[s | n >> 6], e += vi[n & 63], t = 0;
|
|
1606
1606
|
break;
|
|
1607
1607
|
}
|
|
1608
|
-
return t && (e +=
|
|
1608
|
+
return t && (e += vi[s], e += "=", t == 1 && (e += "=")), e;
|
|
1609
1609
|
}
|
|
1610
1610
|
};
|
|
1611
1611
|
function Gg(i, e, t) {
|
|
@@ -1682,14 +1682,14 @@ function pu(i, e) {
|
|
|
1682
1682
|
break;
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1685
|
+
function bi(i, e) {
|
|
1686
1686
|
if (i === null || typeof i != "object" || !Object.getOwnPropertyNames(cd.prototype).every((n) => n in i && typeof i[n] == "function"))
|
|
1687
1687
|
return !1;
|
|
1688
1688
|
const t = i.getType();
|
|
1689
1689
|
return t === null || typeof t != "function" || !("typeName" in t) || typeof t.typeName != "string" ? !1 : e === void 0 ? !0 : t.typeName == e.typeName;
|
|
1690
1690
|
}
|
|
1691
1691
|
function wf(i, e) {
|
|
1692
|
-
return
|
|
1692
|
+
return bi(e) || !i.fieldWrapper ? e : i.fieldWrapper.wrapField(e);
|
|
1693
1693
|
}
|
|
1694
1694
|
Z.DOUBLE, Z.FLOAT, Z.INT64, Z.UINT64, Z.INT32, Z.UINT32, Z.BOOL, Z.STRING, Z.BYTES;
|
|
1695
1695
|
const mu = {
|
|
@@ -1713,7 +1713,7 @@ function jg() {
|
|
|
1713
1713
|
makeWriteOptions: qg,
|
|
1714
1714
|
readMessage(i, e, t, n) {
|
|
1715
1715
|
if (e == null || Array.isArray(e) || typeof e != "object")
|
|
1716
|
-
throw new Error("cannot decode message ".concat(i.typeName, " from JSON: ").concat(
|
|
1716
|
+
throw new Error("cannot decode message ".concat(i.typeName, " from JSON: ").concat(Xn(e)));
|
|
1717
1717
|
n = n ?? new i();
|
|
1718
1718
|
const s = /* @__PURE__ */ new Map(), r = t.typeRegistry;
|
|
1719
1719
|
for (const [a, o] of Object.entries(e)) {
|
|
@@ -1780,10 +1780,10 @@ function jg() {
|
|
|
1780
1780
|
if (e !== void 0 && (t || Sf(i, e)))
|
|
1781
1781
|
return ka(i, e);
|
|
1782
1782
|
},
|
|
1783
|
-
debug:
|
|
1783
|
+
debug: Xn
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1786
|
+
function Xn(i) {
|
|
1787
1787
|
if (i === null)
|
|
1788
1788
|
return "null";
|
|
1789
1789
|
switch (typeof i) {
|
|
@@ -1801,11 +1801,11 @@ function vu(i, e, t, n, s) {
|
|
|
1801
1801
|
if (kt(t.kind != "map"), e === null)
|
|
1802
1802
|
return;
|
|
1803
1803
|
if (!Array.isArray(e))
|
|
1804
|
-
throw new Error("cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(
|
|
1804
|
+
throw new Error("cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(Xn(e)));
|
|
1805
1805
|
const a = i[r];
|
|
1806
1806
|
for (const o of e) {
|
|
1807
1807
|
if (o === null)
|
|
1808
|
-
throw new Error("cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(
|
|
1808
|
+
throw new Error("cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(Xn(o)));
|
|
1809
1809
|
switch (t.kind) {
|
|
1810
1810
|
case "message":
|
|
1811
1811
|
a.push(t.T.fromJson(o, n));
|
|
@@ -1818,7 +1818,7 @@ function vu(i, e, t, n, s) {
|
|
|
1818
1818
|
try {
|
|
1819
1819
|
a.push(Nr(t.T, o, t.L, !0));
|
|
1820
1820
|
} catch (l) {
|
|
1821
|
-
let d = "cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(
|
|
1821
|
+
let d = "cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(Xn(o));
|
|
1822
1822
|
throw l instanceof Error && l.message.length > 0 && (d += ": ".concat(l.message)), new Error(d);
|
|
1823
1823
|
}
|
|
1824
1824
|
break;
|
|
@@ -1828,7 +1828,7 @@ function vu(i, e, t, n, s) {
|
|
|
1828
1828
|
if (e === null)
|
|
1829
1829
|
return;
|
|
1830
1830
|
if (typeof e != "object" || Array.isArray(e))
|
|
1831
|
-
throw new Error("cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(
|
|
1831
|
+
throw new Error("cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(Xn(e)));
|
|
1832
1832
|
const a = i[r];
|
|
1833
1833
|
for (const [o, c] of Object.entries(e)) {
|
|
1834
1834
|
if (c === null)
|
|
@@ -1837,7 +1837,7 @@ function vu(i, e, t, n, s) {
|
|
|
1837
1837
|
try {
|
|
1838
1838
|
l = Xg(t.K, o);
|
|
1839
1839
|
} catch (d) {
|
|
1840
|
-
let u = "cannot decode map key for field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(
|
|
1840
|
+
let u = "cannot decode map key for field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(Xn(e));
|
|
1841
1841
|
throw d instanceof Error && d.message.length > 0 && (u += ": ".concat(d.message)), new Error(u);
|
|
1842
1842
|
}
|
|
1843
1843
|
switch (t.V.kind) {
|
|
@@ -1852,7 +1852,7 @@ function vu(i, e, t, n, s) {
|
|
|
1852
1852
|
try {
|
|
1853
1853
|
a[l] = Nr(t.V.T, c, Yi.BIGINT, !0);
|
|
1854
1854
|
} catch (u) {
|
|
1855
|
-
let h = "cannot decode map value for field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(
|
|
1855
|
+
let h = "cannot decode map value for field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(Xn(e));
|
|
1856
1856
|
throw u instanceof Error && u.message.length > 0 && (h += ": ".concat(u.message)), new Error(h);
|
|
1857
1857
|
}
|
|
1858
1858
|
break;
|
|
@@ -1867,7 +1867,7 @@ function vu(i, e, t, n, s) {
|
|
|
1867
1867
|
if (e === null && a.typeName != "google.protobuf.Value")
|
|
1868
1868
|
return;
|
|
1869
1869
|
let o = i[r];
|
|
1870
|
-
|
|
1870
|
+
bi(o) ? o.fromJson(e, n) : (i[r] = o = a.fromJson(e, n), a.fieldWrapper && !t.oneof && (i[r] = a.fieldWrapper.unwrapField(o)));
|
|
1871
1871
|
break;
|
|
1872
1872
|
case "enum":
|
|
1873
1873
|
const c = ko(t.T, e, n.ignoreUnknownFields, !1);
|
|
@@ -1894,7 +1894,7 @@ function vu(i, e, t, n, s) {
|
|
|
1894
1894
|
break;
|
|
1895
1895
|
}
|
|
1896
1896
|
} catch (l) {
|
|
1897
|
-
let d = "cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(
|
|
1897
|
+
let d = "cannot decode field ".concat(s.typeName, ".").concat(t.name, " from JSON: ").concat(Xn(e));
|
|
1898
1898
|
throw l instanceof Error && l.message.length > 0 && (d += ": ".concat(l.message)), new Error(d);
|
|
1899
1899
|
}
|
|
1900
1900
|
break;
|
|
@@ -1989,7 +1989,7 @@ function ko(i, e, t, n) {
|
|
|
1989
1989
|
return Pa;
|
|
1990
1990
|
break;
|
|
1991
1991
|
}
|
|
1992
|
-
throw new Error("cannot decode enum ".concat(i.typeName, " from JSON: ").concat(
|
|
1992
|
+
throw new Error("cannot decode enum ".concat(i.typeName, " from JSON: ").concat(Xn(e)));
|
|
1993
1993
|
}
|
|
1994
1994
|
function $g(i) {
|
|
1995
1995
|
return i.repeated || i.kind == "map" ? !0 : !(i.oneof || i.kind == "message" || i.opt || i.req);
|
|
@@ -2182,7 +2182,7 @@ function Su(i, e, t, n, s) {
|
|
|
2182
2182
|
break;
|
|
2183
2183
|
case "message":
|
|
2184
2184
|
const l = t.T;
|
|
2185
|
-
r ? i[a].push(Ia(e, new l(), s, t)) :
|
|
2185
|
+
r ? i[a].push(Ia(e, new l(), s, t)) : bi(i[a]) ? Ia(e, i[a], s, t) : (i[a] = Ia(e, new l(), s, t), l.fieldWrapper && !t.oneof && !t.repeated && (i[a] = l.fieldWrapper.unwrapField(i[a])));
|
|
2186
2186
|
break;
|
|
2187
2187
|
case "map":
|
|
2188
2188
|
let [d, u] = Zg(t, e, s);
|
|
@@ -2392,7 +2392,7 @@ function nv() {
|
|
|
2392
2392
|
continue;
|
|
2393
2393
|
const c = n.findField(o);
|
|
2394
2394
|
let l = a[s].value;
|
|
2395
|
-
c && c.kind == "message" && !
|
|
2395
|
+
c && c.kind == "message" && !bi(l, c.T) ? l = new c.T(l) : c && c.kind === "scalar" && c.T === Z.BYTES && (l = mr(l)), r[s] = {
|
|
2396
2396
|
case: o,
|
|
2397
2397
|
value: l
|
|
2398
2398
|
};
|
|
@@ -2424,10 +2424,10 @@ function nv() {
|
|
|
2424
2424
|
case "message":
|
|
2425
2425
|
const u = n.T;
|
|
2426
2426
|
if (n.repeated)
|
|
2427
|
-
r[s] = a[s].map((h) =>
|
|
2427
|
+
r[s] = a[s].map((h) => bi(h, u) ? h : new u(h));
|
|
2428
2428
|
else {
|
|
2429
2429
|
const h = a[s];
|
|
2430
|
-
u.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ u.typeName === "google.protobuf.BytesValue" ? r[s] = mr(h) : r[s] = h : r[s] =
|
|
2430
|
+
u.fieldWrapper ? /* We can't use BytesValue.typeName as that will create a circular import */ u.typeName === "google.protobuf.BytesValue" ? r[s] = mr(h) : r[s] = h : r[s] = bi(h, u) ? h : new u(h);
|
|
2431
2431
|
}
|
|
2432
2432
|
break;
|
|
2433
2433
|
}
|
|
@@ -2453,7 +2453,7 @@ function nv() {
|
|
|
2453
2453
|
switch (n.kind) {
|
|
2454
2454
|
case "message":
|
|
2455
2455
|
let a = s, o = r;
|
|
2456
|
-
return n.T.fieldWrapper && (a !== void 0 && !
|
|
2456
|
+
return n.T.fieldWrapper && (a !== void 0 && !bi(a) && (a = n.T.fieldWrapper.wrapField(a)), o !== void 0 && !bi(o) && (o = n.T.fieldWrapper.wrapField(o))), n.T.equals(a, o);
|
|
2457
2457
|
case "enum":
|
|
2458
2458
|
return ki(Z.INT32, s, r);
|
|
2459
2459
|
case "scalar":
|
|
@@ -2518,7 +2518,7 @@ function nv() {
|
|
|
2518
2518
|
function sa(i) {
|
|
2519
2519
|
if (i === void 0)
|
|
2520
2520
|
return i;
|
|
2521
|
-
if (
|
|
2521
|
+
if (bi(i))
|
|
2522
2522
|
return i.clone();
|
|
2523
2523
|
if (i instanceof Uint8Array) {
|
|
2524
2524
|
const e = new Uint8Array(i.byteLength);
|
|
@@ -2915,7 +2915,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
2915
2915
|
}, {
|
|
2916
2916
|
no: 2,
|
|
2917
2917
|
name: "REGRESSION"
|
|
2918
|
-
}]),
|
|
2918
|
+
}]), Nn = /* @__PURE__ */ z.makeEnum("livekit.TrackType", [{
|
|
2919
2919
|
no: 0,
|
|
2920
2920
|
name: "AUDIO"
|
|
2921
2921
|
}, {
|
|
@@ -2972,7 +2972,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
2972
2972
|
}, {
|
|
2973
2973
|
no: 2,
|
|
2974
2974
|
name: "ENABLED"
|
|
2975
|
-
}]),
|
|
2975
|
+
}]), Bn = /* @__PURE__ */ z.makeEnum("livekit.DisconnectReason", [{
|
|
2976
2976
|
no: 0,
|
|
2977
2977
|
name: "UNKNOWN_REASON"
|
|
2978
2978
|
}, {
|
|
@@ -3303,7 +3303,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3303
3303
|
no: 16,
|
|
3304
3304
|
name: "disconnect_reason",
|
|
3305
3305
|
kind: "enum",
|
|
3306
|
-
T: z.getEnumType(
|
|
3306
|
+
T: z.getEnumType(Bn)
|
|
3307
3307
|
}, {
|
|
3308
3308
|
no: 18,
|
|
3309
3309
|
name: "kind_details",
|
|
@@ -3386,7 +3386,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
3386
3386
|
no: 2,
|
|
3387
3387
|
name: "type",
|
|
3388
3388
|
kind: "enum",
|
|
3389
|
-
T: z.getEnumType(
|
|
3389
|
+
T: z.getEnumType(Nn)
|
|
3390
3390
|
}, {
|
|
3391
3391
|
no: 3,
|
|
3392
3392
|
name: "name",
|
|
@@ -4286,7 +4286,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4286
4286
|
}
|
|
4287
4287
|
}], {
|
|
4288
4288
|
localName: "DataStream_Trailer"
|
|
4289
|
-
}),
|
|
4289
|
+
}), Un = /* @__PURE__ */ z.makeEnum("livekit.SignalTarget", [{
|
|
4290
4290
|
no: 0,
|
|
4291
4291
|
name: "PUBLISHER"
|
|
4292
4292
|
}, {
|
|
@@ -4377,7 +4377,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4377
4377
|
no: 13,
|
|
4378
4378
|
name: "simulate",
|
|
4379
4379
|
kind: "message",
|
|
4380
|
-
T:
|
|
4380
|
+
T: jn,
|
|
4381
4381
|
oneof: "message"
|
|
4382
4382
|
}, {
|
|
4383
4383
|
no: 14,
|
|
@@ -4575,7 +4575,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4575
4575
|
no: 3,
|
|
4576
4576
|
name: "type",
|
|
4577
4577
|
kind: "enum",
|
|
4578
|
-
T: z.getEnumType(
|
|
4578
|
+
T: z.getEnumType(Nn)
|
|
4579
4579
|
}, {
|
|
4580
4580
|
no: 4,
|
|
4581
4581
|
name: "width",
|
|
@@ -4667,7 +4667,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4667
4667
|
no: 2,
|
|
4668
4668
|
name: "target",
|
|
4669
4669
|
kind: "enum",
|
|
4670
|
-
T: z.getEnumType(
|
|
4670
|
+
T: z.getEnumType(Un)
|
|
4671
4671
|
}, {
|
|
4672
4672
|
no: 3,
|
|
4673
4673
|
name: "final",
|
|
@@ -4934,7 +4934,7 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
4934
4934
|
no: 2,
|
|
4935
4935
|
name: "reason",
|
|
4936
4936
|
kind: "enum",
|
|
4937
|
-
T: z.getEnumType(
|
|
4937
|
+
T: z.getEnumType(Bn)
|
|
4938
4938
|
}, {
|
|
4939
4939
|
no: 3,
|
|
4940
4940
|
name: "action",
|
|
@@ -5253,8 +5253,8 @@ const fv = /* @__PURE__ */ z.makeMessageType("livekit.MetricsBatch", () => [{
|
|
|
5253
5253
|
no: 3,
|
|
5254
5254
|
name: "target",
|
|
5255
5255
|
kind: "enum",
|
|
5256
|
-
T: z.getEnumType(
|
|
5257
|
-
}]),
|
|
5256
|
+
T: z.getEnumType(Un)
|
|
5257
|
+
}]), jn = /* @__PURE__ */ z.makeMessageType("livekit.SimulateScenario", () => [{
|
|
5258
5258
|
no: 1,
|
|
5259
5259
|
name: "speaker_update",
|
|
5260
5260
|
kind: "scalar",
|
|
@@ -5545,14 +5545,14 @@ var fo = Jv(), Lc;
|
|
|
5545
5545
|
(function(i) {
|
|
5546
5546
|
i[i.trace = 0] = "trace", i[i.debug = 1] = "debug", i[i.info = 2] = "info", i[i.warn = 3] = "warn", i[i.error = 4] = "error", i[i.silent = 5] = "silent";
|
|
5547
5547
|
})(Lc || (Lc = {}));
|
|
5548
|
-
var
|
|
5548
|
+
var zn;
|
|
5549
5549
|
(function(i) {
|
|
5550
5550
|
i.Default = "livekit", i.Room = "livekit-room", i.Participant = "livekit-participant", i.Track = "livekit-track", i.Publication = "livekit-track-publication", i.Engine = "livekit-engine", i.Signal = "livekit-signal", i.PCManager = "livekit-pc-manager", i.PCTransport = "livekit-pc-transport", i.E2EE = "lk-e2ee";
|
|
5551
|
-
})(
|
|
5551
|
+
})(zn || (zn = {}));
|
|
5552
5552
|
let $e = fo.getLogger("livekit");
|
|
5553
|
-
Object.values(
|
|
5553
|
+
Object.values(zn).map((i) => fo.getLogger(i));
|
|
5554
5554
|
$e.setDefaultLevel(Lc.info);
|
|
5555
|
-
function
|
|
5555
|
+
function Ei(i) {
|
|
5556
5556
|
const e = fo.getLogger(i);
|
|
5557
5557
|
return e.setDefaultLevel($e.getLevel()), e;
|
|
5558
5558
|
}
|
|
@@ -5612,7 +5612,7 @@ function wu(i) {
|
|
|
5612
5612
|
};
|
|
5613
5613
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
5614
5614
|
}
|
|
5615
|
-
function
|
|
5615
|
+
function _i(i) {
|
|
5616
5616
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
5617
5617
|
var e = i[Symbol.asyncIterator], t;
|
|
5618
5618
|
return e ? e.call(i) : (i = typeof wu == "function" ? wu(i) : i[Symbol.iterator](), t = {}, n("next"), n("throw"), n("return"), t[Symbol.asyncIterator] = function() {
|
|
@@ -5838,7 +5838,7 @@ function n0() {
|
|
|
5838
5838
|
}
|
|
5839
5839
|
return ra.exports;
|
|
5840
5840
|
}
|
|
5841
|
-
var
|
|
5841
|
+
var ai = n0();
|
|
5842
5842
|
let rp = !0, ap = !0;
|
|
5843
5843
|
function Rr(i, e, t) {
|
|
5844
5844
|
const n = i.match(e);
|
|
@@ -7390,7 +7390,7 @@ function m0() {
|
|
|
7390
7390
|
return typeof window.RTCRtpSender < "u" && // @ts-ignore
|
|
7391
7391
|
typeof window.RTCRtpSender.prototype.createEncodedStreams < "u";
|
|
7392
7392
|
}
|
|
7393
|
-
class zE extends
|
|
7393
|
+
class zE extends ai.EventEmitter {
|
|
7394
7394
|
constructor() {
|
|
7395
7395
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
7396
7396
|
super(), this.onKeyRatcheted = (t, n, s) => {
|
|
@@ -7436,7 +7436,7 @@ var Ye;
|
|
|
7436
7436
|
(function(i) {
|
|
7437
7437
|
i[i.NotAllowed = 0] = "NotAllowed", i[i.ServerUnreachable = 1] = "ServerUnreachable", i[i.InternalError = 2] = "InternalError", i[i.Cancelled = 3] = "Cancelled", i[i.LeaveRequest = 4] = "LeaveRequest", i[i.Timeout = 5] = "Timeout";
|
|
7438
7438
|
})(Ye || (Ye = {}));
|
|
7439
|
-
class
|
|
7439
|
+
class St extends Pi {
|
|
7440
7440
|
constructor(e, t, n, s) {
|
|
7441
7441
|
super(1, e), this.name = "ConnectionError", this.status = n, this.reason = t, this.context = s, this.reasonName = Ye[t];
|
|
7442
7442
|
}
|
|
@@ -7446,7 +7446,7 @@ class vd extends Pi {
|
|
|
7446
7446
|
super(21, e ?? "device is unsupported"), this.name = "DeviceUnsupportedError";
|
|
7447
7447
|
}
|
|
7448
7448
|
}
|
|
7449
|
-
class
|
|
7449
|
+
class yi extends Pi {
|
|
7450
7450
|
constructor(e) {
|
|
7451
7451
|
super(20, e ?? "track is invalid"), this.name = "TrackInvalidError";
|
|
7452
7452
|
}
|
|
@@ -7476,13 +7476,13 @@ class Bu extends Pi {
|
|
|
7476
7476
|
super(15, e), this.reason = t, this.reasonName = typeof t == "string" ? t : md[t];
|
|
7477
7477
|
}
|
|
7478
7478
|
}
|
|
7479
|
-
var
|
|
7479
|
+
var On;
|
|
7480
7480
|
(function(i) {
|
|
7481
7481
|
i[i.AlreadyOpened = 0] = "AlreadyOpened", i[i.AbnormalEnd = 1] = "AbnormalEnd", i[i.DecodeFailed = 2] = "DecodeFailed", i[i.LengthExceeded = 3] = "LengthExceeded", i[i.Incomplete = 4] = "Incomplete", i[i.HandlerAlreadyRegistered = 7] = "HandlerAlreadyRegistered";
|
|
7482
|
-
})(
|
|
7482
|
+
})(On || (On = {}));
|
|
7483
7483
|
class Gi extends Pi {
|
|
7484
7484
|
constructor(e, t) {
|
|
7485
|
-
super(16, e), this.name = "DataStreamError", this.reason = t, this.reasonName =
|
|
7485
|
+
super(16, e), this.name = "DataStreamError", this.reason = t, this.reasonName = On[t];
|
|
7486
7486
|
}
|
|
7487
7487
|
}
|
|
7488
7488
|
var Qa;
|
|
@@ -7603,7 +7603,7 @@ var _n;
|
|
|
7603
7603
|
(function(i) {
|
|
7604
7604
|
i[i.LOW = 0] = "LOW", i[i.MEDIUM = 1] = "MEDIUM", i[i.HIGH = 2] = "HIGH";
|
|
7605
7605
|
})(_n || (_n = {}));
|
|
7606
|
-
class J extends
|
|
7606
|
+
class J extends ai.EventEmitter {
|
|
7607
7607
|
/**
|
|
7608
7608
|
* indicates current state of stream, it'll indicate `paused` if the track
|
|
7609
7609
|
* has been paused by congestion controller
|
|
@@ -7620,7 +7620,7 @@ class J extends ri.EventEmitter {
|
|
|
7620
7620
|
var s;
|
|
7621
7621
|
super(), this.attachedElements = [], this.isMuted = !1, this._streamState = J.StreamState.Active, this.isInBackground = !1, this._currentBitrate = 0, this.log = $e, this.appVisibilityChangedListener = () => {
|
|
7622
7622
|
this.backgroundTimeout && clearTimeout(this.backgroundTimeout), document.visibilityState === "hidden" ? this.backgroundTimeout = setTimeout(() => this.handleAppVisibilityChanged(), T0) : this.handleAppVisibilityChanged();
|
|
7623
|
-
}, this.log =
|
|
7623
|
+
}, this.log = Ei((s = n.loggerName) !== null && s !== void 0 ? s : zn.Track), this.loggerContextCb = n.loggerContextCb, this.setMaxListeners(100), this.kind = t, this._mediaStreamTrack = e, this._mediaStreamID = e.id, this.source = J.Source.Unknown;
|
|
7624
7624
|
}
|
|
7625
7625
|
get logContext() {
|
|
7626
7626
|
var e;
|
|
@@ -7684,7 +7684,7 @@ class J extends ri.EventEmitter {
|
|
|
7684
7684
|
}
|
|
7685
7685
|
/** @internal */
|
|
7686
7686
|
updateLoggerOptions(e) {
|
|
7687
|
-
e.loggerName && (this.log =
|
|
7687
|
+
e.loggerName && (this.log = Ei(e.loggerName)), e.loggerContextCb && (this.loggerContextCb = e.loggerContextCb);
|
|
7688
7688
|
}
|
|
7689
7689
|
recycleElement(e) {
|
|
7690
7690
|
if (e instanceof HTMLAudioElement) {
|
|
@@ -7740,19 +7740,19 @@ function Ys(i, e) {
|
|
|
7740
7740
|
function s(l) {
|
|
7741
7741
|
switch (l) {
|
|
7742
7742
|
case e.Audio:
|
|
7743
|
-
return
|
|
7743
|
+
return Nn.AUDIO;
|
|
7744
7744
|
case e.Video:
|
|
7745
|
-
return
|
|
7745
|
+
return Nn.VIDEO;
|
|
7746
7746
|
default:
|
|
7747
|
-
return
|
|
7747
|
+
return Nn.DATA;
|
|
7748
7748
|
}
|
|
7749
7749
|
}
|
|
7750
7750
|
i.kindToProto = s;
|
|
7751
7751
|
function r(l) {
|
|
7752
7752
|
switch (l) {
|
|
7753
|
-
case
|
|
7753
|
+
case Nn.AUDIO:
|
|
7754
7754
|
return e.Audio;
|
|
7755
|
-
case
|
|
7755
|
+
case Nn.VIDEO:
|
|
7756
7756
|
return e.Video;
|
|
7757
7757
|
default:
|
|
7758
7758
|
return e.Unknown;
|
|
@@ -7916,7 +7916,7 @@ function P0() {
|
|
|
7916
7916
|
return !1;
|
|
7917
7917
|
if (xs()) {
|
|
7918
7918
|
const t = yn();
|
|
7919
|
-
if (t != null && t.version &&
|
|
7919
|
+
if (t != null && t.version && si(t.version, "16") < 0 || (t == null ? void 0 : t.os) === "iOS" && (t != null && t.osVersion) && si(t.osVersion, "16") < 0)
|
|
7920
7920
|
return !1;
|
|
7921
7921
|
}
|
|
7922
7922
|
const i = RTCRtpSender.getCapabilities("video");
|
|
@@ -7930,7 +7930,7 @@ function P0() {
|
|
|
7930
7930
|
}
|
|
7931
7931
|
return e;
|
|
7932
7932
|
}
|
|
7933
|
-
function
|
|
7933
|
+
function Kn(i) {
|
|
7934
7934
|
return i === "av1" || i === "vp9";
|
|
7935
7935
|
}
|
|
7936
7936
|
function Xc(i) {
|
|
@@ -7953,10 +7953,10 @@ function qr() {
|
|
|
7953
7953
|
}
|
|
7954
7954
|
function I0() {
|
|
7955
7955
|
const i = yn();
|
|
7956
|
-
return (i == null ? void 0 : i.name) === "Safari" && i.version.startsWith("17.") || (i == null ? void 0 : i.os) === "iOS" && !!(i != null && i.osVersion) &&
|
|
7956
|
+
return (i == null ? void 0 : i.name) === "Safari" && i.version.startsWith("17.") || (i == null ? void 0 : i.os) === "iOS" && !!(i != null && i.osVersion) && si(i.osVersion, "17") >= 0;
|
|
7957
7957
|
}
|
|
7958
7958
|
function D0(i) {
|
|
7959
|
-
return i || (i = yn()), (i == null ? void 0 : i.name) === "Safari" &&
|
|
7959
|
+
return i || (i = yn()), (i == null ? void 0 : i.name) === "Safari" && si(i.version, "18.3") > 0 || (i == null ? void 0 : i.os) === "iOS" && !!(i != null && i.osVersion) && si(i.osVersion, "18.3") > 0;
|
|
7960
7960
|
}
|
|
7961
7961
|
function Op() {
|
|
7962
7962
|
var i, e;
|
|
@@ -7968,12 +7968,12 @@ function Op() {
|
|
|
7968
7968
|
function L0() {
|
|
7969
7969
|
const i = yn(), e = "17.2";
|
|
7970
7970
|
if (i)
|
|
7971
|
-
return i.name !== "Safari" && i.os !== "iOS" || i.os === "iOS" && i.osVersion &&
|
|
7971
|
+
return i.name !== "Safari" && i.os !== "iOS" || i.os === "iOS" && i.osVersion && si(i.osVersion, e) >= 0 ? !0 : i.name === "Safari" && si(i.version, e) >= 0;
|
|
7972
7972
|
}
|
|
7973
7973
|
function un() {
|
|
7974
7974
|
return typeof document < "u";
|
|
7975
7975
|
}
|
|
7976
|
-
function
|
|
7976
|
+
function ii() {
|
|
7977
7977
|
return navigator.product == "ReactNative";
|
|
7978
7978
|
}
|
|
7979
7979
|
function $c(i) {
|
|
@@ -7984,7 +7984,7 @@ function Fp() {
|
|
|
7984
7984
|
return global.LiveKitReactNativeGlobal;
|
|
7985
7985
|
}
|
|
7986
7986
|
function Bp() {
|
|
7987
|
-
if (!
|
|
7987
|
+
if (!ii())
|
|
7988
7988
|
return;
|
|
7989
7989
|
let i = Fp();
|
|
7990
7990
|
if (i)
|
|
@@ -7993,14 +7993,14 @@ function Bp() {
|
|
|
7993
7993
|
function Hu() {
|
|
7994
7994
|
if (un())
|
|
7995
7995
|
return window.devicePixelRatio;
|
|
7996
|
-
if (
|
|
7996
|
+
if (ii()) {
|
|
7997
7997
|
let i = Fp();
|
|
7998
7998
|
if (i)
|
|
7999
7999
|
return i.devicePixelRatio;
|
|
8000
8000
|
}
|
|
8001
8001
|
return 1;
|
|
8002
8002
|
}
|
|
8003
|
-
function
|
|
8003
|
+
function si(i, e) {
|
|
8004
8004
|
const t = i.split("."), n = e.split("."), s = Math.min(t.length, n.length);
|
|
8005
8005
|
for (let r = 0; r < s; ++r) {
|
|
8006
8006
|
const a = parseInt(t[r], 10), o = parseInt(n[r], 10);
|
|
@@ -8032,7 +8032,7 @@ function O0() {
|
|
|
8032
8032
|
protocol: x0,
|
|
8033
8033
|
version: S0
|
|
8034
8034
|
});
|
|
8035
|
-
return
|
|
8035
|
+
return ii() && (e.os = (i = Bp()) !== null && i !== void 0 ? i : ""), e;
|
|
8036
8036
|
}
|
|
8037
8037
|
function ju() {
|
|
8038
8038
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 16, e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 16, t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
|
@@ -8057,7 +8057,7 @@ function Fo() {
|
|
|
8057
8057
|
}
|
|
8058
8058
|
return _r.clone();
|
|
8059
8059
|
}
|
|
8060
|
-
class
|
|
8060
|
+
class Yn {
|
|
8061
8061
|
get isResolved() {
|
|
8062
8062
|
return this._isResolved;
|
|
8063
8063
|
}
|
|
@@ -8133,13 +8133,13 @@ function Xu(i) {
|
|
|
8133
8133
|
case Ye.LeaveRequest:
|
|
8134
8134
|
return i.context;
|
|
8135
8135
|
case Ye.Cancelled:
|
|
8136
|
-
return
|
|
8136
|
+
return Bn.CLIENT_INITIATED;
|
|
8137
8137
|
case Ye.NotAllowed:
|
|
8138
|
-
return
|
|
8138
|
+
return Bn.USER_REJECTED;
|
|
8139
8139
|
case Ye.ServerUnreachable:
|
|
8140
|
-
return
|
|
8140
|
+
return Bn.JOIN_FAILURE;
|
|
8141
8141
|
default:
|
|
8142
|
-
return
|
|
8142
|
+
return Bn.UNKNOWN_REASON;
|
|
8143
8143
|
}
|
|
8144
8144
|
}
|
|
8145
8145
|
function Va(i) {
|
|
@@ -8151,7 +8151,7 @@ function cs(i) {
|
|
|
8151
8151
|
function Js(i) {
|
|
8152
8152
|
return !!i && !(i instanceof MediaStreamTrack) && i.isLocal;
|
|
8153
8153
|
}
|
|
8154
|
-
function
|
|
8154
|
+
function Qn(i) {
|
|
8155
8155
|
return !!i && i.kind == J.Kind.Audio;
|
|
8156
8156
|
}
|
|
8157
8157
|
function Ji(i) {
|
|
@@ -8160,8 +8160,8 @@ function Ji(i) {
|
|
|
8160
8160
|
function Ii(i) {
|
|
8161
8161
|
return Js(i) && Ji(i);
|
|
8162
8162
|
}
|
|
8163
|
-
function
|
|
8164
|
-
return Js(i) &&
|
|
8163
|
+
function fi(i) {
|
|
8164
|
+
return Js(i) && Qn(i);
|
|
8165
8165
|
}
|
|
8166
8166
|
function Yc(i) {
|
|
8167
8167
|
return !!i && !i.isLocal;
|
|
@@ -8398,7 +8398,7 @@ function J0(i, e) {
|
|
|
8398
8398
|
var t;
|
|
8399
8399
|
return (t = i.layers) === null || t === void 0 ? void 0 : t.find((n) => n.quality === e);
|
|
8400
8400
|
}
|
|
8401
|
-
class Z0 extends
|
|
8401
|
+
class Z0 extends ai.EventEmitter {
|
|
8402
8402
|
constructor(e) {
|
|
8403
8403
|
super(), this.onWorkerMessage = (t) => {
|
|
8404
8404
|
var n, s;
|
|
@@ -8839,7 +8839,7 @@ class yd {
|
|
|
8839
8839
|
var n;
|
|
8840
8840
|
this.rtt = 0, this.state = Mt.DISCONNECTED, this.log = $e, this._requestId = 0, this.resetCallbacks = () => {
|
|
8841
8841
|
this.onAnswer = void 0, this.onLeave = void 0, this.onLocalTrackPublished = void 0, this.onLocalTrackUnpublished = void 0, this.onNegotiateRequested = void 0, this.onOffer = void 0, this.onRemoteMuteChanged = void 0, this.onSubscribedQualityUpdate = void 0, this.onTokenRefresh = void 0, this.onTrickle = void 0, this.onClose = void 0;
|
|
8842
|
-
}, this.log =
|
|
8842
|
+
}, this.log = Ei((n = t.loggerName) !== null && n !== void 0 ? n : zn.Signal), this.loggerContextCb = t.loggerContextCb, this.useJSON = e, this.requestQueue = new Q0(), this.queuedRequests = [], this.closingLock = new hn(), this.connectionLock = new hn(), this.state = Mt.DISCONNECTED;
|
|
8843
8843
|
}
|
|
8844
8844
|
get logContext() {
|
|
8845
8845
|
var e, t;
|
|
@@ -8870,9 +8870,9 @@ class yd {
|
|
|
8870
8870
|
const u = yield this.connectionLock.lock();
|
|
8871
8871
|
try {
|
|
8872
8872
|
const h = () => P(this, void 0, void 0, function* () {
|
|
8873
|
-
this.close(), clearTimeout(f), d(new
|
|
8873
|
+
this.close(), clearTimeout(f), d(new St("room connection has been cancelled (signal)", Ye.Cancelled));
|
|
8874
8874
|
}), f = setTimeout(() => {
|
|
8875
|
-
this.close(), d(new
|
|
8875
|
+
this.close(), d(new St("room connection has timed out (signal)", Ye.ServerUnreachable));
|
|
8876
8876
|
}, n.websocketTimeout);
|
|
8877
8877
|
s != null && s.aborted && h(), s == null || s.addEventListener("abort", h);
|
|
8878
8878
|
const g = new URL(o);
|
|
@@ -8888,11 +8888,11 @@ class yd {
|
|
|
8888
8888
|
const m = yield fetch(c);
|
|
8889
8889
|
if (m.status.toFixed(0).startsWith("4")) {
|
|
8890
8890
|
const p = yield m.text();
|
|
8891
|
-
d(new
|
|
8891
|
+
d(new St(p, Ye.NotAllowed, m.status));
|
|
8892
8892
|
} else
|
|
8893
|
-
d(new
|
|
8893
|
+
d(new St("Encountered unknown websocket error during connection: ".concat(v.toString()), Ye.InternalError, m.status));
|
|
8894
8894
|
} catch (m) {
|
|
8895
|
-
d(new
|
|
8895
|
+
d(new St(m instanceof Error ? m.message : "server was not reachable", Ye.ServerUnreachable));
|
|
8896
8896
|
}
|
|
8897
8897
|
return;
|
|
8898
8898
|
}
|
|
@@ -8916,12 +8916,12 @@ class yd {
|
|
|
8916
8916
|
if (((m = C.message) === null || m === void 0 ? void 0 : m.case) === "join" ? (this.state = Mt.CONNECTED, s == null || s.removeEventListener("abort", h), this.pingTimeoutDuration = C.message.value.pingTimeout, this.pingIntervalDuration = C.message.value.pingInterval, this.pingTimeoutDuration && this.pingTimeoutDuration > 0 && (this.log.debug("ping config", Object.assign(Object.assign({}, this.logContext), {
|
|
8917
8917
|
timeout: this.pingTimeoutDuration,
|
|
8918
8918
|
interval: this.pingIntervalDuration
|
|
8919
|
-
})), this.startPingInterval()), l(C.message.value)) : this.state === Mt.RECONNECTING && C.message.case !== "leave" ? (this.state = Mt.CONNECTED, s == null || s.removeEventListener("abort", h), this.startPingInterval(), ((p = C.message) === null || p === void 0 ? void 0 : p.case) === "reconnect" ? l(C.message.value) : (this.log.debug("declaring signal reconnected without reconnect response received", this.logContext), l(void 0), b = !0)) : this.isEstablishingConnection && C.message.case === "leave" ? d(new
|
|
8919
|
+
})), this.startPingInterval()), l(C.message.value)) : this.state === Mt.RECONNECTING && C.message.case !== "leave" ? (this.state = Mt.CONNECTED, s == null || s.removeEventListener("abort", h), this.startPingInterval(), ((p = C.message) === null || p === void 0 ? void 0 : p.case) === "reconnect" ? l(C.message.value) : (this.log.debug("declaring signal reconnected without reconnect response received", this.logContext), l(void 0), b = !0)) : this.isEstablishingConnection && C.message.case === "leave" ? d(new St("Received leave request while trying to (re)connect", Ye.LeaveRequest, void 0, C.message.value.reason)) : n.reconnect || d(new St("did not receive join response, got ".concat((x = C.message) === null || x === void 0 ? void 0 : x.case, " instead"), Ye.InternalError)), !b)
|
|
8920
8920
|
return;
|
|
8921
8921
|
}
|
|
8922
8922
|
this.signalLatency && (yield fn(this.signalLatency)), this.handleSignalResponse(C);
|
|
8923
8923
|
}), this.ws.onclose = (v) => {
|
|
8924
|
-
this.isEstablishingConnection && d(new
|
|
8924
|
+
this.isEstablishingConnection && d(new St("Websocket got closed during a (re)connection attempt", Ye.InternalError)), this.log.warn("websocket closed", Object.assign(Object.assign({}, this.logContext), {
|
|
8925
8925
|
reason: v.reason,
|
|
8926
8926
|
code: v.code,
|
|
8927
8927
|
wasClean: v.wasClean,
|
|
@@ -9084,7 +9084,7 @@ class yd {
|
|
|
9084
9084
|
return this.sendRequest({
|
|
9085
9085
|
case: "leave",
|
|
9086
9086
|
value: new ho({
|
|
9087
|
-
reason:
|
|
9087
|
+
reason: Bn.CLIENT_INITIATED,
|
|
9088
9088
|
// server doesn't process this field, keeping it here to indicate the intent of a full disconnect
|
|
9089
9089
|
action: $s.DISCONNECT
|
|
9090
9090
|
})
|
|
@@ -9221,7 +9221,7 @@ function eo(i, e) {
|
|
|
9221
9221
|
function rb(i, e, t) {
|
|
9222
9222
|
var n;
|
|
9223
9223
|
const s = new URLSearchParams();
|
|
9224
|
-
return s.set("access_token", i), t.reconnect && (s.set("reconnect", "1"), t.sid && s.set("sid", t.sid)), s.set("auto_subscribe", t.autoSubscribe ? "1" : "0"), s.set("sdk",
|
|
9224
|
+
return s.set("access_token", i), t.reconnect && (s.set("reconnect", "1"), t.sid && s.set("sid", t.sid)), s.set("auto_subscribe", t.autoSubscribe ? "1" : "0"), s.set("sdk", ii() ? "reactnative" : "js"), s.set("version", e.version), s.set("protocol", e.protocol.toString()), e.deviceModel && s.set("device_model", e.deviceModel), e.os && s.set("os", e.os), e.osVersion && s.set("os_version", e.osVersion), e.browser && s.set("browser", e.browser), e.browserVersion && s.set("browser_version", e.browserVersion), t.adaptiveStream && s.set("adaptive_stream", "1"), t.reconnectReason && s.set("reconnect_reason", t.reconnectReason.toString()), !((n = navigator.connection) === null || n === void 0) && n.type && s.set("network", navigator.connection.type), s;
|
|
9225
9225
|
}
|
|
9226
9226
|
class Yu {
|
|
9227
9227
|
constructor() {
|
|
@@ -9317,7 +9317,7 @@ class ab {
|
|
|
9317
9317
|
return e;
|
|
9318
9318
|
}
|
|
9319
9319
|
}
|
|
9320
|
-
var
|
|
9320
|
+
var Rn = {}, zo = {}, Go = { exports: {} }, Ju;
|
|
9321
9321
|
function Sd() {
|
|
9322
9322
|
if (Ju) return Go.exports;
|
|
9323
9323
|
Ju = 1;
|
|
@@ -9902,10 +9902,10 @@ function cb() {
|
|
|
9902
9902
|
}
|
|
9903
9903
|
var eh;
|
|
9904
9904
|
function lb() {
|
|
9905
|
-
if (eh) return
|
|
9905
|
+
if (eh) return Rn;
|
|
9906
9906
|
eh = 1;
|
|
9907
9907
|
var i = ob(), e = cb(), t = Sd();
|
|
9908
|
-
return
|
|
9908
|
+
return Rn.grammar = t, Rn.write = e, Rn.parse = i.parse, Rn.parseParams = i.parseParams, Rn.parseFmtpConfig = i.parseFmtpConfig, Rn.parsePayloads = i.parsePayloads, Rn.parseRemoteCandidates = i.parseRemoteCandidates, Rn.parseImageAttributes = i.parseImageAttributes, Rn.parseSimulcastStreamList = i.parseSimulcastStreamList, Rn;
|
|
9909
9909
|
}
|
|
9910
9910
|
var Vi = lb();
|
|
9911
9911
|
function xd(i, e, t) {
|
|
@@ -9951,7 +9951,7 @@ const db = 0.7, ub = 20, Zs = {
|
|
|
9951
9951
|
NegotiationComplete: "negotiationComplete",
|
|
9952
9952
|
RTPVideoPayloadTypes: "rtpVideoPayloadTypes"
|
|
9953
9953
|
};
|
|
9954
|
-
class th extends
|
|
9954
|
+
class th extends ai.EventEmitter {
|
|
9955
9955
|
get pc() {
|
|
9956
9956
|
return this._pc || (this._pc = this.createPC()), this._pc;
|
|
9957
9957
|
}
|
|
@@ -9970,7 +9970,7 @@ class th extends ri.EventEmitter {
|
|
|
9970
9970
|
}
|
|
9971
9971
|
}), ub), this.close = () => {
|
|
9972
9972
|
this._pc && (this._pc.close(), this._pc.onconnectionstatechange = null, this._pc.oniceconnectionstatechange = null, this._pc.onicegatheringstatechange = null, this._pc.ondatachannel = null, this._pc.onnegotiationneeded = null, this._pc.onsignalingstatechange = null, this._pc.onicecandidate = null, this._pc.ondatachannel = null, this._pc.ontrack = null, this._pc.onconnectionstatechange = null, this._pc.oniceconnectionstatechange = null, this._pc = null);
|
|
9973
|
-
}, this.log =
|
|
9973
|
+
}, this.log = Ei((n = t.loggerName) !== null && n !== void 0 ? n : zn.PCTransport), this.loggerOptions = t, this.config = e, this._pc = this.createPC(), this.offerLock = new hn();
|
|
9974
9974
|
}
|
|
9975
9975
|
createPC() {
|
|
9976
9976
|
const e = new RTCPeerConnection(this.config);
|
|
@@ -10087,7 +10087,7 @@ class th extends ri.EventEmitter {
|
|
|
10087
10087
|
if (!o.msid || !c.cid || !o.msid.includes(c.cid))
|
|
10088
10088
|
return !1;
|
|
10089
10089
|
let l = 0;
|
|
10090
|
-
if (o.rtp.some((u) => u.codec.toUpperCase() === c.codec.toUpperCase() ? (l = u.payload, !0) : !1), l === 0 || (
|
|
10090
|
+
if (o.rtp.some((u) => u.codec.toUpperCase() === c.codec.toUpperCase() ? (l = u.payload, !0) : !1), l === 0 || (Kn(c.codec) && !xs() && this.ensureVideoDDExtensionForSVC(o, a), c.codec !== "av1"))
|
|
10091
10091
|
return !0;
|
|
10092
10092
|
const d = Math.round(c.maxbr * db);
|
|
10093
10093
|
for (const u of o.fmtp)
|
|
@@ -10335,12 +10335,12 @@ class mb {
|
|
|
10335
10335
|
var r;
|
|
10336
10336
|
const a = this.state, o = this.requiredTransports.map((c) => c.getConnectionState());
|
|
10337
10337
|
o.every((c) => c === "connected") ? this.state = Pt.CONNECTED : o.some((c) => c === "failed") ? this.state = Pt.FAILED : o.some((c) => c === "connecting") ? this.state = Pt.CONNECTING : o.every((c) => c === "closed") ? this.state = Pt.CLOSED : o.some((c) => c === "closed") ? this.state = Pt.CLOSING : o.every((c) => c === "new") && (this.state = Pt.NEW), a !== this.state && (this.log.debug("pc state change: from ".concat(Pt[a], " to ").concat(Pt[this.state]), this.logContext), (r = this.onStateChange) === null || r === void 0 || r.call(this, this.state, this.publisher.getConnectionState(), this.subscriber.getConnectionState()));
|
|
10338
|
-
}, this.log =
|
|
10338
|
+
}, this.log = Ei((s = n.loggerName) !== null && s !== void 0 ? s : zn.PCManager), this.loggerOptions = n, this.isPublisherConnectionRequired = !t, this.isSubscriberConnectionRequired = t, this.publisher = new th(e, n), this.subscriber = new th(e, n), this.publisher.onConnectionStateChange = this.updateState, this.subscriber.onConnectionStateChange = this.updateState, this.publisher.onIceConnectionStateChange = this.updateState, this.subscriber.onIceConnectionStateChange = this.updateState, this.publisher.onSignalingStatechange = this.updateState, this.subscriber.onSignalingStatechange = this.updateState, this.publisher.onIceCandidate = (r) => {
|
|
10339
10339
|
var a;
|
|
10340
|
-
(a = this.onIceCandidate) === null || a === void 0 || a.call(this, r,
|
|
10340
|
+
(a = this.onIceCandidate) === null || a === void 0 || a.call(this, r, Un.PUBLISHER);
|
|
10341
10341
|
}, this.subscriber.onIceCandidate = (r) => {
|
|
10342
10342
|
var a;
|
|
10343
|
-
(a = this.onIceCandidate) === null || a === void 0 || a.call(this, r,
|
|
10343
|
+
(a = this.onIceCandidate) === null || a === void 0 || a.call(this, r, Un.SUBSCRIBER);
|
|
10344
10344
|
}, this.subscriber.onDataChannel = (r) => {
|
|
10345
10345
|
var a;
|
|
10346
10346
|
(a = this.onDataChannel) === null || a === void 0 || a.call(this, r);
|
|
@@ -10398,7 +10398,7 @@ class mb {
|
|
|
10398
10398
|
}
|
|
10399
10399
|
addIceCandidate(e, t) {
|
|
10400
10400
|
return P(this, void 0, void 0, function* () {
|
|
10401
|
-
t ===
|
|
10401
|
+
t === Un.PUBLISHER ? yield this.publisher.addIceCandidate(e) : yield this.subscriber.addIceCandidate(e);
|
|
10402
10402
|
});
|
|
10403
10403
|
}
|
|
10404
10404
|
createSubscriberAnswerFromOffer(e, t) {
|
|
@@ -10461,7 +10461,7 @@ class mb {
|
|
|
10461
10461
|
* Returns the first required transport's address if no explicit target is specified
|
|
10462
10462
|
*/
|
|
10463
10463
|
getConnectedAddress(e) {
|
|
10464
|
-
return e ===
|
|
10464
|
+
return e === Un.PUBLISHER ? this.publisher.getConnectedAddress() : e === Un.SUBSCRIBER ? this.publisher.getConnectedAddress() : this.requiredTransports[0].getConnectedAddress();
|
|
10465
10465
|
}
|
|
10466
10466
|
get requiredTransports() {
|
|
10467
10467
|
const e = [];
|
|
@@ -10475,15 +10475,15 @@ class mb {
|
|
|
10475
10475
|
if (n.getConnectionState() !== "connected")
|
|
10476
10476
|
return new Promise((c, l) => P(r, void 0, void 0, function* () {
|
|
10477
10477
|
const d = () => {
|
|
10478
|
-
this.log.warn("abort transport connection", this.logContext), Kt.clearTimeout(u), l(new
|
|
10478
|
+
this.log.warn("abort transport connection", this.logContext), Kt.clearTimeout(u), l(new St("room connection has been cancelled", Ye.Cancelled));
|
|
10479
10479
|
};
|
|
10480
10480
|
s != null && s.signal.aborted && d(), s == null || s.signal.addEventListener("abort", d);
|
|
10481
10481
|
const u = Kt.setTimeout(() => {
|
|
10482
|
-
s == null || s.signal.removeEventListener("abort", d), l(new
|
|
10482
|
+
s == null || s.signal.removeEventListener("abort", d), l(new St("could not establish pc connection", Ye.InternalError));
|
|
10483
10483
|
}, a);
|
|
10484
10484
|
for (; this.state !== Pt.CONNECTED; )
|
|
10485
10485
|
if (yield fn(50), s != null && s.signal.aborted) {
|
|
10486
|
-
l(new
|
|
10486
|
+
l(new St("room connection has been cancelled", Ye.Cancelled));
|
|
10487
10487
|
return;
|
|
10488
10488
|
}
|
|
10489
10489
|
Kt.clearTimeout(u), s == null || s.signal.removeEventListener("abort", d), c();
|
|
@@ -10733,7 +10733,7 @@ class $p extends J {
|
|
|
10733
10733
|
return r;
|
|
10734
10734
|
yield fn(50);
|
|
10735
10735
|
}
|
|
10736
|
-
throw new
|
|
10736
|
+
throw new yi("unable to get track dimensions after timeout");
|
|
10737
10737
|
}();
|
|
10738
10738
|
});
|
|
10739
10739
|
}
|
|
@@ -10775,7 +10775,7 @@ class $p extends J {
|
|
|
10775
10775
|
const n = yield this.trackChangeLock.lock();
|
|
10776
10776
|
try {
|
|
10777
10777
|
if (!this.sender)
|
|
10778
|
-
throw new
|
|
10778
|
+
throw new yi("unable to replace an unpublished track");
|
|
10779
10779
|
let s, r;
|
|
10780
10780
|
return typeof t == "boolean" ? s = t : t !== void 0 && (s = t.userProvidedTrack, r = t.stopProcessor), this.providedByUser = s ?? !0, this.log.debug("replace MediaStreamTrack", this.logContext), yield this.setMediaStreamTrack(e), r && this.processor && (yield this.internalStopProcessor()), this;
|
|
10781
10781
|
} finally {
|
|
@@ -10854,7 +10854,7 @@ class $p extends J {
|
|
|
10854
10854
|
}
|
|
10855
10855
|
this._isUpstreamPaused = !0, this.emit(re.UpstreamPaused, this);
|
|
10856
10856
|
const n = yn();
|
|
10857
|
-
if ((n == null ? void 0 : n.name) === "Safari" &&
|
|
10857
|
+
if ((n == null ? void 0 : n.name) === "Safari" && si(n.version, "12.0") < 0)
|
|
10858
10858
|
throw new vd("pauseUpstream is not supported on Safari < 12.");
|
|
10859
10859
|
((e = this.sender.transport) === null || e === void 0 ? void 0 : e.state) !== "closed" && (yield this.sender.replaceTrack(null));
|
|
10860
10860
|
} finally {
|
|
@@ -11118,7 +11118,7 @@ class to extends $p {
|
|
|
11118
11118
|
var t;
|
|
11119
11119
|
const n = yield this.trackChangeLock.lock();
|
|
11120
11120
|
try {
|
|
11121
|
-
if (!
|
|
11121
|
+
if (!ii() && !this.audioContext)
|
|
11122
11122
|
throw Error("Audio context needs to be set on LocalAudioTrack in order to enable processors");
|
|
11123
11123
|
this.processor && (yield this.internalStopProcessor());
|
|
11124
11124
|
const s = {
|
|
@@ -11175,7 +11175,7 @@ function xb(i, e, t) {
|
|
|
11175
11175
|
case "video":
|
|
11176
11176
|
return new no(i, e, !1, t);
|
|
11177
11177
|
default:
|
|
11178
|
-
throw new
|
|
11178
|
+
throw new yi("unsupported track type: ".concat(i.kind));
|
|
11179
11179
|
}
|
|
11180
11180
|
}
|
|
11181
11181
|
const Tb = Object.values(Wr), Cb = Object.values(Wc), Eb = Object.values(bd), Mb = [Wr.h180, Wr.h360], wb = [Wc.h180, Wc.h360], Ab = (i) => [{
|
|
@@ -11194,7 +11194,7 @@ function tl(i, e, t, n) {
|
|
|
11194
11194
|
return [{}];
|
|
11195
11195
|
a || (a = Pb(i, e, t, l), $e.debug("using video encoding", a));
|
|
11196
11196
|
const d = a.maxFramerate, u = new mt(e, t, a.maxBitrate, a.maxFramerate, a.priority);
|
|
11197
|
-
if (c &&
|
|
11197
|
+
if (c && Kn(l)) {
|
|
11198
11198
|
const g = new Kp(c), v = [];
|
|
11199
11199
|
if (g.spatial > 3)
|
|
11200
11200
|
throw new Error("unsupported scalabilityMode: ".concat(c));
|
|
@@ -11202,7 +11202,7 @@ function tl(i, e, t, n) {
|
|
|
11202
11202
|
if (qr() || // Even tho RN runs M114, it does not produce SVC layers when a single encoding
|
|
11203
11203
|
// is provided. So we'll use the legacy SVC specification for now.
|
|
11204
11204
|
// TODO: when we upstream libwebrtc, this will need additional verification
|
|
11205
|
-
|
|
11205
|
+
ii() || (m == null ? void 0 : m.name) === "Chrome" && si(m == null ? void 0 : m.version, "113") < 0) {
|
|
11206
11206
|
const p = g.suffix == "h" ? 2 : 3, x = D0(m);
|
|
11207
11207
|
for (let C = 0; C < g.spatial; C += 1)
|
|
11208
11208
|
v.push({
|
|
@@ -11301,7 +11301,7 @@ function Wo(i, e, t, n) {
|
|
|
11301
11301
|
d && (l.maxFramerate = d);
|
|
11302
11302
|
const u = Ss() || a === 0;
|
|
11303
11303
|
r.encoding.priority && u && (l.priority = r.encoding.priority, l.networkPriority = r.encoding.priority), s.push(l);
|
|
11304
|
-
}),
|
|
11304
|
+
}), ii() && Bp() === "ios") {
|
|
11305
11305
|
let r;
|
|
11306
11306
|
s.forEach((o) => {
|
|
11307
11307
|
r ? o.maxFramerate && o.maxFramerate > r && (r = o.maxFramerate) : r = o.maxFramerate;
|
|
@@ -11416,7 +11416,7 @@ class no extends $p {
|
|
|
11416
11416
|
var t, n, s, r, a;
|
|
11417
11417
|
yield e.pauseUpstream.call(this);
|
|
11418
11418
|
try {
|
|
11419
|
-
for (var o = !0, c =
|
|
11419
|
+
for (var o = !0, c = _i(this.simulcastCodecs.values()), l; l = yield c.next(), t = l.done, !t; o = !0)
|
|
11420
11420
|
r = l.value, o = !1, yield (a = r.sender) === null || a === void 0 ? void 0 : a.replaceTrack(null);
|
|
11421
11421
|
} catch (d) {
|
|
11422
11422
|
n = {
|
|
@@ -11441,7 +11441,7 @@ class no extends $p {
|
|
|
11441
11441
|
var t, n, s, r, a;
|
|
11442
11442
|
yield e.resumeUpstream.call(this);
|
|
11443
11443
|
try {
|
|
11444
|
-
for (var o = !0, c =
|
|
11444
|
+
for (var o = !0, c = _i(this.simulcastCodecs.values()), l; l = yield c.next(), t = l.done, !t; o = !0) {
|
|
11445
11445
|
r = l.value, o = !1;
|
|
11446
11446
|
const d = r;
|
|
11447
11447
|
yield (a = d.sender) === null || a === void 0 ? void 0 : a.replaceTrack(d.mediaStreamTrack);
|
|
@@ -11538,7 +11538,7 @@ class no extends $p {
|
|
|
11538
11538
|
quality: n,
|
|
11539
11539
|
enabled: n <= e
|
|
11540
11540
|
}));
|
|
11541
|
-
this.log.debug("setting publishing quality. max quality ".concat(e), this.logContext), this.setPublishingLayers(
|
|
11541
|
+
this.log.debug("setting publishing quality. max quality ".concat(e), this.logContext), this.setPublishingLayers(Kn(this.codec), t);
|
|
11542
11542
|
}
|
|
11543
11543
|
restartTrack(e) {
|
|
11544
11544
|
return P(this, void 0, void 0, function* () {
|
|
@@ -11552,7 +11552,7 @@ class no extends $p {
|
|
|
11552
11552
|
}
|
|
11553
11553
|
yield this.restart(o), this.isCpuConstrained = !1;
|
|
11554
11554
|
try {
|
|
11555
|
-
for (var c = !0, l =
|
|
11555
|
+
for (var c = !0, l = _i(this.simulcastCodecs.values()), d; d = yield l.next(), t = d.done, !t; c = !0) {
|
|
11556
11556
|
r = d.value, c = !1;
|
|
11557
11557
|
const u = r;
|
|
11558
11558
|
u.sender && ((a = u.sender.transport) === null || a === void 0 ? void 0 : a.state) !== "closed" && (u.mediaStreamTrack = this.mediaStreamTrack.clone(), yield u.sender.replaceTrack(u.mediaStreamTrack));
|
|
@@ -11583,7 +11583,7 @@ class no extends $p {
|
|
|
11583
11583
|
var a, o, c, l, d, u;
|
|
11584
11584
|
if (yield t.setProcessor.call(s, n, r), !((d = s.processor) === null || d === void 0) && d.processedTrack)
|
|
11585
11585
|
try {
|
|
11586
|
-
for (var h = !0, f =
|
|
11586
|
+
for (var h = !0, f = _i(s.simulcastCodecs.values()), g; g = yield f.next(), a = g.done, !a; h = !0)
|
|
11587
11587
|
l = g.value, h = !1, yield (u = l.sender) === null || u === void 0 ? void 0 : u.replaceTrack(s.processor.processedTrack);
|
|
11588
11588
|
} catch (v) {
|
|
11589
11589
|
o = {
|
|
@@ -11644,15 +11644,15 @@ class no extends $p {
|
|
|
11644
11644
|
codecs: e,
|
|
11645
11645
|
currentCodec: this.codec
|
|
11646
11646
|
})), !this.codec && e.length > 0)
|
|
11647
|
-
return yield this.setPublishingLayers(
|
|
11647
|
+
return yield this.setPublishingLayers(Kn(e[0].codec), e[0].qualities), [];
|
|
11648
11648
|
this.subscribedCodecs = e;
|
|
11649
11649
|
const l = [];
|
|
11650
11650
|
try {
|
|
11651
|
-
for (t = !0, n =
|
|
11651
|
+
for (t = !0, n = _i(e); s = yield n.next(), r = s.done, !r; t = !0) {
|
|
11652
11652
|
c = s.value, t = !1;
|
|
11653
11653
|
const d = c;
|
|
11654
11654
|
if (!this.codec || this.codec === d.codec)
|
|
11655
|
-
yield this.setPublishingLayers(
|
|
11655
|
+
yield this.setPublishingLayers(Kn(d.codec), d.qualities);
|
|
11656
11656
|
else {
|
|
11657
11657
|
const u = this.simulcastCodecs.get(d.codec);
|
|
11658
11658
|
if (this.log.debug("try setPublishingCodec for ".concat(d.codec), Object.assign(Object.assign({}, this.logContext), {
|
|
@@ -11663,7 +11663,7 @@ class no extends $p {
|
|
|
11663
11663
|
l.push(d.codec);
|
|
11664
11664
|
break;
|
|
11665
11665
|
}
|
|
11666
|
-
} else u.encodings && (this.log.debug("try setPublishingLayersForSender ".concat(d.codec), this.logContext), yield oh(u.sender, u.encodings, d.qualities, this.senderLock,
|
|
11666
|
+
} else u.encodings && (this.log.debug("try setPublishingLayersForSender ".concat(d.codec), this.logContext), yield oh(u.sender, u.encodings, d.qualities, this.senderLock, Kn(d.codec), this.log, this.logContext));
|
|
11667
11667
|
}
|
|
11668
11668
|
}
|
|
11669
11669
|
} catch (d) {
|
|
@@ -11714,7 +11714,7 @@ class no extends $p {
|
|
|
11714
11714
|
return Object.assign(Object.assign({}, n), {
|
|
11715
11715
|
active: s === 0,
|
|
11716
11716
|
scaleResolutionDownBy: Math.max(1, Math.ceil(((r = this.mediaStreamTrack.getSettings().height) !== null && r !== void 0 ? r : 360) / 360)),
|
|
11717
|
-
scalabilityMode: s === 0 &&
|
|
11717
|
+
scalabilityMode: s === 0 && Kn(this.codec) ? "L1T3" : void 0,
|
|
11718
11718
|
maxFramerate: s === 0 ? 15 : 0,
|
|
11719
11719
|
maxBitrate: s === 0 ? n.maxBitrate : 0
|
|
11720
11720
|
});
|
|
@@ -11824,11 +11824,11 @@ function ch(i, e, t, n) {
|
|
|
11824
11824
|
});
|
|
11825
11825
|
}
|
|
11826
11826
|
const lh = "_lossy", dh = "_reliable", Lb = 2 * 1e3, qo = "leave-reconnect", Nb = 3e4;
|
|
11827
|
-
var
|
|
11827
|
+
var Dn;
|
|
11828
11828
|
(function(i) {
|
|
11829
11829
|
i[i.New = 0] = "New", i[i.Connected = 1] = "Connected", i[i.Disconnected = 2] = "Disconnected", i[i.Reconnecting = 3] = "Reconnecting", i[i.Closed = 4] = "Closed";
|
|
11830
|
-
})(
|
|
11831
|
-
class Ub extends
|
|
11830
|
+
})(Dn || (Dn = {}));
|
|
11831
|
+
class Ub extends ai.EventEmitter {
|
|
11832
11832
|
get isClosed() {
|
|
11833
11833
|
return this._isClosed;
|
|
11834
11834
|
}
|
|
@@ -11837,7 +11837,7 @@ class Ub extends ri.EventEmitter {
|
|
|
11837
11837
|
}
|
|
11838
11838
|
constructor(e) {
|
|
11839
11839
|
var t;
|
|
11840
|
-
super(), this.options = e, this.rtcConfig = {}, this.peerConnectionTimeout = Td.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.latestRemoteOfferId = 0, this.subscriberPrimary = !1, this.pcState =
|
|
11840
|
+
super(), this.options = e, this.rtcConfig = {}, this.peerConnectionTimeout = Td.peerConnectionTimeout, this.fullReconnectOnNext = !1, this.latestRemoteOfferId = 0, this.subscriberPrimary = !1, this.pcState = Dn.New, this._isClosed = !0, this.pendingTrackResolvers = {}, this.reconnectAttempts = 0, this.reconnectStart = 0, this.attemptingReconnect = !1, this.joinAttempts = 0, this.maxJoinAttempts = 1, this.shouldFailNext = !1, this.log = $e, this.reliableDataSequence = 1, this.reliableMessageBuffer = new Yu(), this.reliableReceivedState = new ab(Nb), this.handleDataChannel = (n) => P(this, [n], void 0, function(s) {
|
|
11841
11841
|
var r = this;
|
|
11842
11842
|
let {
|
|
11843
11843
|
channel: a
|
|
@@ -11912,7 +11912,7 @@ class Ub extends ri.EventEmitter {
|
|
|
11912
11912
|
}
|
|
11913
11913
|
n === qo && (o = 0), this.log.debug("reconnecting in ".concat(o, "ms"), this.logContext), this.clearReconnectTimeout(), this.token && this.regionUrlProvider && this.regionUrlProvider.updateToken(this.token), this.reconnectTimeout = Kt.setTimeout(() => this.attemptReconnect(s).finally(() => this.reconnectTimeout = void 0), o);
|
|
11914
11914
|
}, this.waitForRestarted = () => new Promise((n, s) => {
|
|
11915
|
-
this.pcState ===
|
|
11915
|
+
this.pcState === Dn.Connected && n();
|
|
11916
11916
|
const r = () => {
|
|
11917
11917
|
this.off(ce.Disconnected, a), n();
|
|
11918
11918
|
}, a = () => {
|
|
@@ -11928,7 +11928,7 @@ class Ub extends ri.EventEmitter {
|
|
|
11928
11928
|
return n === qe.RELIABLE && this.reliableMessageBuffer.alignBufferedAmount(s.bufferedAmount), s.bufferedAmount <= s.bufferedAmountLowThreshold;
|
|
11929
11929
|
}, this.handleBrowserOnLine = () => {
|
|
11930
11930
|
this.client.currentState === Mt.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(ws.RR_SIGNAL_DISCONNECTED));
|
|
11931
|
-
}, this.log =
|
|
11931
|
+
}, this.log = Ei((t = e.loggerName) !== null && t !== void 0 ? t : zn.Engine), this.loggerOptions = {
|
|
11932
11932
|
loggerName: e.loggerName,
|
|
11933
11933
|
loggerContextCb: () => this.logContext
|
|
11934
11934
|
}, this.client = new yd(void 0, this.loggerOptions), this.client.signalLatency = this.options.expSignalLatency, this.reconnectPolicy = this.options.reconnectPolicy, this.registerOnLineListener(), this.closingLock = new hn(), this.dataProcessLock = new hn(), this.dcBufferStatus = /* @__PURE__ */ new Map([[qe.LOSSY, !0], [qe.RELIABLE, !0]]), this.client.onParticipantUpdate = (n) => this.emit(ce.ParticipantUpdate, n), this.client.onConnectionQuality = (n) => this.emit(ce.ConnectionQualityUpdate, n), this.client.onRoomUpdate = (n) => this.emit(ce.RoomUpdate, n), this.client.onSubscriptionError = (n) => this.emit(ce.SubscriptionError, n), this.client.onSubscriptionPermissionUpdate = (n) => this.emit(ce.SubscriptionPermissionUpdate, n), this.client.onSpeakersChanged = (n) => this.emit(ce.SpeakersChanged, n), this.client.onStreamStateUpdate = (n) => this.emit(ce.StreamStateChanged, n), this.client.onRequestResponse = (n) => this.emit(ce.SignalRequestResponse, n);
|
|
@@ -11951,7 +11951,7 @@ class Ub extends ri.EventEmitter {
|
|
|
11951
11951
|
const r = yield this.client.join(e, t, n, s);
|
|
11952
11952
|
return this._isClosed = !1, this.latestJoinResponse = r, this.subscriberPrimary = r.subscriberPrimary, this.pcManager || (yield this.configure(r)), (!this.subscriberPrimary || r.fastPublish) && this.negotiate(), this.clientConfiguration = r.clientConfiguration, this.emit(ce.SignalConnected, r), r;
|
|
11953
11953
|
} catch (r) {
|
|
11954
|
-
if (r instanceof
|
|
11954
|
+
if (r instanceof St && r.reason === Ye.ServerUnreachable && (this.log.warn("Couldn't connect to server, attempt ".concat(this.joinAttempts, " of ").concat(this.maxJoinAttempts), this.logContext), this.joinAttempts < this.maxJoinAttempts))
|
|
11955
11955
|
return this.join(e, t, n, s);
|
|
11956
11956
|
throw r;
|
|
11957
11957
|
}
|
|
@@ -11988,10 +11988,10 @@ class Ub extends ri.EventEmitter {
|
|
|
11988
11988
|
}
|
|
11989
11989
|
addTrack(e) {
|
|
11990
11990
|
if (this.pendingTrackResolvers[e.cid])
|
|
11991
|
-
throw new
|
|
11991
|
+
throw new yi("a track with the same ID has already been published");
|
|
11992
11992
|
return new Promise((t, n) => {
|
|
11993
11993
|
const s = setTimeout(() => {
|
|
11994
|
-
delete this.pendingTrackResolvers[e.cid], n(new
|
|
11994
|
+
delete this.pendingTrackResolvers[e.cid], n(new St("publication of local track timed out, no response from server", Ye.Timeout));
|
|
11995
11995
|
}, 1e4);
|
|
11996
11996
|
this.pendingTrackResolvers[e.cid] = {
|
|
11997
11997
|
resolve: (r) => {
|
|
@@ -12055,9 +12055,9 @@ class Ub extends ri.EventEmitter {
|
|
|
12055
12055
|
this.client.sendOffer(r, a);
|
|
12056
12056
|
}, this.pcManager.onDataChannel = this.handleDataChannel, this.pcManager.onStateChange = (r, a, o) => P(this, void 0, void 0, function* () {
|
|
12057
12057
|
if (this.log.debug("primary PC state changed ".concat(r), this.logContext), ["closed", "disconnected", "failed"].includes(a) && (this.publisherConnectionPromise = void 0), r === Pt.CONNECTED) {
|
|
12058
|
-
const d = this.pcState ===
|
|
12059
|
-
this.pcState =
|
|
12060
|
-
} else r === Pt.FAILED && this.pcState ===
|
|
12058
|
+
const d = this.pcState === Dn.New;
|
|
12059
|
+
this.pcState = Dn.Connected, d && this.emit(ce.Connected, e);
|
|
12060
|
+
} else r === Pt.FAILED && this.pcState === Dn.Connected && (this.pcState = Dn.Disconnected, this.handleDisconnect("peerconnection failed", o === "failed" ? ws.RR_SUBSCRIBER_FAILED : ws.RR_PUBLISHER_FAILED));
|
|
12061
12061
|
const c = this.client.isDisconnected || this.client.currentState === Mt.RECONNECTING, l = [Pt.FAILED, Pt.CLOSING, Pt.CLOSED].includes(r);
|
|
12062
12062
|
c && l && !this._isClosed && this.emit(ce.Offline);
|
|
12063
12063
|
}), this.pcManager.onTrack = (r) => {
|
|
@@ -12246,7 +12246,7 @@ class Ub extends ri.EventEmitter {
|
|
|
12246
12246
|
throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new As();
|
|
12247
12247
|
r = yield this.join(e ?? this.url, this.token, this.signalOpts);
|
|
12248
12248
|
} catch (a) {
|
|
12249
|
-
throw a instanceof
|
|
12249
|
+
throw a instanceof St && a.reason === Ye.NotAllowed ? new zt("could not reconnect, token might be expired") : new As();
|
|
12250
12250
|
}
|
|
12251
12251
|
if (this.shouldFailNext)
|
|
12252
12252
|
throw this.shouldFailNext = !1, new Error("simulated failure");
|
|
@@ -12278,7 +12278,7 @@ class Ub extends ri.EventEmitter {
|
|
|
12278
12278
|
let r = "";
|
|
12279
12279
|
throw s instanceof Error && (r = s.message, this.log.error(s.message, Object.assign(Object.assign({}, this.logContext), {
|
|
12280
12280
|
error: s
|
|
12281
|
-
}))), s instanceof
|
|
12281
|
+
}))), s instanceof St && s.reason === Ye.NotAllowed ? new zt("could not reconnect, token might be expired") : s instanceof St && s.reason === Ye.LeaveRequest ? s : new As(r);
|
|
12282
12282
|
}
|
|
12283
12283
|
if (this.emit(ce.SignalResumed), n) {
|
|
12284
12284
|
const s = this.makeRTCConfiguration(n);
|
|
@@ -12301,13 +12301,13 @@ class Ub extends ri.EventEmitter {
|
|
|
12301
12301
|
}
|
|
12302
12302
|
waitForPCReconnected() {
|
|
12303
12303
|
return P(this, void 0, void 0, function* () {
|
|
12304
|
-
this.pcState =
|
|
12304
|
+
this.pcState = Dn.Reconnecting, this.log.debug("waiting for peer connection to reconnect", this.logContext);
|
|
12305
12305
|
try {
|
|
12306
12306
|
if (yield fn(Lb), !this.pcManager)
|
|
12307
12307
|
throw new zt("PC manager is closed");
|
|
12308
|
-
yield this.pcManager.ensurePCTransportConnection(void 0, this.peerConnectionTimeout), this.pcState =
|
|
12308
|
+
yield this.pcManager.ensurePCTransportConnection(void 0, this.peerConnectionTimeout), this.pcState = Dn.Connected;
|
|
12309
12309
|
} catch (e) {
|
|
12310
|
-
throw this.pcState =
|
|
12310
|
+
throw this.pcState = Dn.Disconnected, new St("could not establish PC connection, ".concat(e.message), Ye.InternalError);
|
|
12311
12311
|
}
|
|
12312
12312
|
});
|
|
12313
12313
|
}
|
|
@@ -12400,7 +12400,7 @@ class Ub extends ri.EventEmitter {
|
|
|
12400
12400
|
throw new zt("PC manager is closed");
|
|
12401
12401
|
const a = s ? n.pcManager.subscriber : n.pcManager.publisher, o = s ? "Subscriber" : "Publisher";
|
|
12402
12402
|
if (!a)
|
|
12403
|
-
throw new
|
|
12403
|
+
throw new St("".concat(o, " connection not set"), Ye.InternalError);
|
|
12404
12404
|
let c = !1;
|
|
12405
12405
|
!s && !n.dataChannelForKind(t, s) && (n.createDataChannels(), c = !0), !c && !s && !n.pcManager.publisher.isICEConnected && n.pcManager.publisher.getICEConnectionState() !== "checking" && (c = !0), c && n.negotiate();
|
|
12406
12406
|
const l = n.dataChannelForKind(t, s);
|
|
@@ -12412,7 +12412,7 @@ class Ub extends ri.EventEmitter {
|
|
|
12412
12412
|
return;
|
|
12413
12413
|
yield fn(50);
|
|
12414
12414
|
}
|
|
12415
|
-
throw new
|
|
12415
|
+
throw new St("could not establish ".concat(o, " connection, state: ").concat(a.getICEConnectionState()), Ye.InternalError);
|
|
12416
12416
|
}();
|
|
12417
12417
|
});
|
|
12418
12418
|
}
|
|
@@ -12512,7 +12512,7 @@ class Ub extends ri.EventEmitter {
|
|
|
12512
12512
|
target: s
|
|
12513
12513
|
}));
|
|
12514
12514
|
};
|
|
12515
|
-
return t(this.dataChannelForKind(qe.LOSSY),
|
|
12515
|
+
return t(this.dataChannelForKind(qe.LOSSY), Un.PUBLISHER), t(this.dataChannelForKind(qe.RELIABLE), Un.PUBLISHER), t(this.dataChannelForKind(qe.LOSSY, !0), Un.SUBSCRIBER), t(this.dataChannelForKind(qe.RELIABLE, !0), Un.SUBSCRIBER), e;
|
|
12516
12516
|
}
|
|
12517
12517
|
clearReconnectTimeout() {
|
|
12518
12518
|
this.reconnectTimeout && Kt.clearTimeout(this.reconnectTimeout);
|
|
@@ -12580,7 +12580,7 @@ class nl {
|
|
|
12580
12580
|
const n = yield t.json();
|
|
12581
12581
|
return this.lastUpdateAt = Date.now(), n;
|
|
12582
12582
|
} else
|
|
12583
|
-
throw new
|
|
12583
|
+
throw new St("Could not fetch region settings: ".concat(t.statusText), t.status === 401 ? Ye.NotAllowed : Ye.InternalError, t.status);
|
|
12584
12584
|
});
|
|
12585
12585
|
}
|
|
12586
12586
|
setServerReportedRegions(e) {
|
|
@@ -12599,9 +12599,9 @@ class Jp {
|
|
|
12599
12599
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
12600
12600
|
if (!(typeof this.totalByteSize != "number" || this.totalByteSize === 0)) {
|
|
12601
12601
|
if (e && this.bytesReceived < this.totalByteSize)
|
|
12602
|
-
throw new Gi("Not enough chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, only received ").concat(this.bytesReceived, " bytes"),
|
|
12602
|
+
throw new Gi("Not enough chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, only received ").concat(this.bytesReceived, " bytes"), On.Incomplete);
|
|
12603
12603
|
if (this.bytesReceived > this.totalByteSize)
|
|
12604
|
-
throw new Gi("Extra chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, received ").concat(this.bytesReceived, " bytes"),
|
|
12604
|
+
throw new Gi("Extra chunk(s) received - expected ".concat(this.totalByteSize, " bytes of data total, received ").concat(this.bytesReceived, " bytes"), On.LengthExceeded);
|
|
12605
12605
|
}
|
|
12606
12606
|
}
|
|
12607
12607
|
constructor(e, t, n, s) {
|
|
@@ -12617,7 +12617,7 @@ class Vb extends Jp {
|
|
|
12617
12617
|
}
|
|
12618
12618
|
[Symbol.asyncIterator]() {
|
|
12619
12619
|
const e = this.reader.getReader();
|
|
12620
|
-
let t = new
|
|
12620
|
+
let t = new Yn(), n = null, s = null;
|
|
12621
12621
|
if (this.signal) {
|
|
12622
12622
|
const a = this.signal;
|
|
12623
12623
|
s = () => {
|
|
@@ -12685,7 +12685,7 @@ class Vb extends Jp {
|
|
|
12685
12685
|
let o = /* @__PURE__ */ new Set();
|
|
12686
12686
|
const c = t.signal ? e.withAbortSignal(t.signal) : e;
|
|
12687
12687
|
try {
|
|
12688
|
-
for (var l = !0, d =
|
|
12688
|
+
for (var l = !0, d = _i(c), u; u = yield d.next(), n = u.done, !n; l = !0) {
|
|
12689
12689
|
a = u.value, l = !1;
|
|
12690
12690
|
const h = a;
|
|
12691
12691
|
o.add(h);
|
|
@@ -12732,7 +12732,7 @@ class zb extends Jp {
|
|
|
12732
12732
|
const e = this.reader.getReader(), t = new TextDecoder("utf-8", {
|
|
12733
12733
|
fatal: !0
|
|
12734
12734
|
});
|
|
12735
|
-
let n = new
|
|
12735
|
+
let n = new Yn(), s = null, r = null;
|
|
12736
12736
|
if (this.signal) {
|
|
12737
12737
|
const o = this.signal;
|
|
12738
12738
|
r = () => {
|
|
@@ -12769,7 +12769,7 @@ class zb extends Jp {
|
|
|
12769
12769
|
try {
|
|
12770
12770
|
u = t.decode(d.content);
|
|
12771
12771
|
} catch (h) {
|
|
12772
|
-
throw new Gi("Cannot decode datastream chunk ".concat(d.chunkIndex, " as text: ").concat(h),
|
|
12772
|
+
throw new Gi("Cannot decode datastream chunk ".concat(d.chunkIndex, " as text: ").concat(h), On.DecodeFailed);
|
|
12773
12773
|
}
|
|
12774
12774
|
return {
|
|
12775
12775
|
done: !1,
|
|
@@ -12811,7 +12811,7 @@ class zb extends Jp {
|
|
|
12811
12811
|
let o = "";
|
|
12812
12812
|
const c = t.signal ? e.withAbortSignal(t.signal) : e;
|
|
12813
12813
|
try {
|
|
12814
|
-
for (var l = !0, d =
|
|
12814
|
+
for (var l = !0, d = _i(c), u; u = yield d.next(), n = u.done, !n; l = !0)
|
|
12815
12815
|
a = u.value, l = !1, o += a;
|
|
12816
12816
|
} catch (h) {
|
|
12817
12817
|
s = {
|
|
@@ -12835,7 +12835,7 @@ class Gb {
|
|
|
12835
12835
|
}
|
|
12836
12836
|
registerTextStreamHandler(e, t) {
|
|
12837
12837
|
if (this.textStreamHandlers.has(e))
|
|
12838
|
-
throw new Gi('A text stream handler for topic "'.concat(e, '" has already been set.'),
|
|
12838
|
+
throw new Gi('A text stream handler for topic "'.concat(e, '" has already been set.'), On.HandlerAlreadyRegistered);
|
|
12839
12839
|
this.textStreamHandlers.set(e, t);
|
|
12840
12840
|
}
|
|
12841
12841
|
unregisterTextStreamHandler(e) {
|
|
@@ -12843,7 +12843,7 @@ class Gb {
|
|
|
12843
12843
|
}
|
|
12844
12844
|
registerByteStreamHandler(e, t) {
|
|
12845
12845
|
if (this.byteStreamHandlers.has(e))
|
|
12846
|
-
throw new Gi('A byte stream handler for topic "'.concat(e, '" has already been set.'),
|
|
12846
|
+
throw new Gi('A byte stream handler for topic "'.concat(e, '" has already been set.'), On.HandlerAlreadyRegistered);
|
|
12847
12847
|
this.byteStreamHandlers.set(e, t);
|
|
12848
12848
|
}
|
|
12849
12849
|
unregisterByteStreamHandler(e) {
|
|
@@ -12856,7 +12856,7 @@ class Gb {
|
|
|
12856
12856
|
var t, n, s, r;
|
|
12857
12857
|
const a = Array.from(this.textStreamControllers.entries()).filter((c) => c[1].sendingParticipantIdentity === e), o = Array.from(this.byteStreamControllers.entries()).filter((c) => c[1].sendingParticipantIdentity === e);
|
|
12858
12858
|
if (a.length > 0 || o.length > 0) {
|
|
12859
|
-
const c = new Gi("Participant ".concat(e, " unexpectedly disconnected in the middle of sending data"),
|
|
12859
|
+
const c = new Gi("Participant ".concat(e, " unexpectedly disconnected in the middle of sending data"), On.AbnormalEnd);
|
|
12860
12860
|
for (const [l, d] of o)
|
|
12861
12861
|
(n = (t = d.outOfBandFailureRejectingFuture).reject) === null || n === void 0 || n.call(t, c), this.byteStreamControllers.delete(l);
|
|
12862
12862
|
for (const [l, d] of a)
|
|
@@ -12887,7 +12887,7 @@ class Gb {
|
|
|
12887
12887
|
return;
|
|
12888
12888
|
}
|
|
12889
12889
|
let r;
|
|
12890
|
-
const a = new
|
|
12890
|
+
const a = new Yn(), o = {
|
|
12891
12891
|
id: e.streamId,
|
|
12892
12892
|
name: (n = e.contentHeader.value.name) !== null && n !== void 0 ? n : "unknown",
|
|
12893
12893
|
mimeType: e.mimeType,
|
|
@@ -12898,7 +12898,7 @@ class Gb {
|
|
|
12898
12898
|
}, c = new ReadableStream({
|
|
12899
12899
|
start: (l) => {
|
|
12900
12900
|
if (r = l, this.textStreamControllers.has(e.streamId))
|
|
12901
|
-
throw new Gi("A data stream read is already in progress for a stream with id ".concat(e.streamId, "."),
|
|
12901
|
+
throw new Gi("A data stream read is already in progress for a stream with id ".concat(e.streamId, "."), On.AlreadyOpened);
|
|
12902
12902
|
this.byteStreamControllers.set(e.streamId, {
|
|
12903
12903
|
info: o,
|
|
12904
12904
|
controller: r,
|
|
@@ -12918,7 +12918,7 @@ class Gb {
|
|
|
12918
12918
|
return;
|
|
12919
12919
|
}
|
|
12920
12920
|
let r;
|
|
12921
|
-
const a = new
|
|
12921
|
+
const a = new Yn(), o = {
|
|
12922
12922
|
id: e.streamId,
|
|
12923
12923
|
mimeType: e.mimeType,
|
|
12924
12924
|
size: e.totalLength ? Number(e.totalLength) : void 0,
|
|
@@ -12928,7 +12928,7 @@ class Gb {
|
|
|
12928
12928
|
}, c = new ReadableStream({
|
|
12929
12929
|
start: (l) => {
|
|
12930
12930
|
if (r = l, this.textStreamControllers.has(e.streamId))
|
|
12931
|
-
throw new Gi("A data stream read is already in progress for a stream with id ".concat(e.streamId, "."),
|
|
12931
|
+
throw new Gi("A data stream read is already in progress for a stream with id ".concat(e.streamId, "."), On.AlreadyOpened);
|
|
12932
12932
|
this.textStreamControllers.set(e.streamId, {
|
|
12933
12933
|
info: o,
|
|
12934
12934
|
controller: r,
|
|
@@ -13308,7 +13308,7 @@ class jb extends Qp {
|
|
|
13308
13308
|
var t;
|
|
13309
13309
|
for (const n of this.attachedElements)
|
|
13310
13310
|
this.audioContext ? (t = this.gainNode) === null || t === void 0 || t.gain.setTargetAtTime(e, 0, 0.1) : n.volume = e;
|
|
13311
|
-
|
|
13311
|
+
ii() && this._mediaStreamTrack._setVolume(e), this.elementVolume = e;
|
|
13312
13312
|
}
|
|
13313
13313
|
/**
|
|
13314
13314
|
* gets the volume of attached audio elements (loudest)
|
|
@@ -13316,7 +13316,7 @@ class jb extends Qp {
|
|
|
13316
13316
|
getVolume() {
|
|
13317
13317
|
if (this.elementVolume)
|
|
13318
13318
|
return this.elementVolume;
|
|
13319
|
-
if (
|
|
13319
|
+
if (ii())
|
|
13320
13320
|
return 1;
|
|
13321
13321
|
let e = 0;
|
|
13322
13322
|
return this.attachedElements.forEach((t) => {
|
|
@@ -13611,14 +13611,14 @@ function il(i, e) {
|
|
|
13611
13611
|
i = i.offsetParent, n += i.offsetTop, s += i.offsetLeft;
|
|
13612
13612
|
return n < t.pageYOffset + t.innerHeight && s < t.pageXOffset + t.innerWidth && n + a > t.pageYOffset && s + r > t.pageXOffset && !o && c !== "none";
|
|
13613
13613
|
}
|
|
13614
|
-
class
|
|
13614
|
+
class gi extends ai.EventEmitter {
|
|
13615
13615
|
constructor(e, t, n, s) {
|
|
13616
13616
|
var r;
|
|
13617
13617
|
super(), this.metadataMuted = !1, this.encryption = bn.NONE, this.log = $e, this.handleMuted = () => {
|
|
13618
13618
|
this.emit(re.Muted);
|
|
13619
13619
|
}, this.handleUnmuted = () => {
|
|
13620
13620
|
this.emit(re.Unmuted);
|
|
13621
|
-
}, this.log =
|
|
13621
|
+
}, this.log = Ei((r = s == null ? void 0 : s.loggerName) !== null && r !== void 0 ? r : zn.Publication), this.loggerContextCb = this.loggerContextCb, this.setMaxListeners(100), this.kind = e, this.trackSid = t, this.trackName = n, this.source = J.Source.Unknown;
|
|
13622
13622
|
}
|
|
13623
13623
|
/** @internal */
|
|
13624
13624
|
setTrack(e) {
|
|
@@ -13644,7 +13644,7 @@ class mi extends ri.EventEmitter {
|
|
|
13644
13644
|
* an [AudioTrack] if this publication holds an audio track
|
|
13645
13645
|
*/
|
|
13646
13646
|
get audioTrack() {
|
|
13647
|
-
if (
|
|
13647
|
+
if (Qn(this.track))
|
|
13648
13648
|
return this.track;
|
|
13649
13649
|
}
|
|
13650
13650
|
/**
|
|
@@ -13670,8 +13670,8 @@ class mi extends ri.EventEmitter {
|
|
|
13670
13670
|
})(i.SubscriptionStatus || (i.SubscriptionStatus = {})), function(e) {
|
|
13671
13671
|
e.Allowed = "allowed", e.NotAllowed = "not_allowed";
|
|
13672
13672
|
}(i.PermissionStatus || (i.PermissionStatus = {}));
|
|
13673
|
-
})(
|
|
13674
|
-
class sl extends
|
|
13673
|
+
})(gi || (gi = {}));
|
|
13674
|
+
class sl extends gi {
|
|
13675
13675
|
get isUpstreamPaused() {
|
|
13676
13676
|
var e;
|
|
13677
13677
|
return (e = this.track) === null || e === void 0 ? void 0 : e.isUpstreamPaused;
|
|
@@ -13739,7 +13739,7 @@ class sl extends mi {
|
|
|
13739
13739
|
}
|
|
13740
13740
|
getTrackFeatures() {
|
|
13741
13741
|
var e;
|
|
13742
|
-
if (
|
|
13742
|
+
if (Qn(this.track)) {
|
|
13743
13743
|
const t = this.track.getSourceTrackSettings(), n = /* @__PURE__ */ new Set();
|
|
13744
13744
|
return t.autoGainControl && n.add(jt.TF_AUTO_GAIN_CONTROL), t.echoCancellation && n.add(jt.TF_ECHO_CANCELLATION), t.noiseSuppression && n.add(jt.TF_NOISE_SUPPRESSION), t.channelCount && t.channelCount > 1 && n.add(jt.TF_STEREO), !((e = this.options) === null || e === void 0) && e.dtx || n.add(jt.TF_NO_DTX), this.track.enhancedNoiseCancellation && n.add(jt.TF_ENHANCED_NOISE_CANCELLATION), Array.from(n.values());
|
|
13745
13745
|
} else return [];
|
|
@@ -13796,7 +13796,7 @@ function mo(i, e) {
|
|
|
13796
13796
|
deviceId: p
|
|
13797
13797
|
});
|
|
13798
13798
|
const x = xb(h, v, e);
|
|
13799
|
-
return x.kind === J.Kind.Video ? x.source = J.Source.Camera : x.kind === J.Kind.Audio && (x.source = J.Source.Microphone), x.mediaStream = u,
|
|
13799
|
+
return x.kind === J.Kind.Video ? x.source = J.Source.Camera : x.kind === J.Kind.Audio && (x.source = J.Source.Microphone), x.mediaStream = u, Qn(x) && n ? yield x.setProcessor(n) : Ji(x) && s && (yield x.setProcessor(s)), x;
|
|
13800
13800
|
})));
|
|
13801
13801
|
} catch (u) {
|
|
13802
13802
|
if (!t)
|
|
@@ -13842,7 +13842,7 @@ function Jb(i) {
|
|
|
13842
13842
|
return Hi.Unknown;
|
|
13843
13843
|
}
|
|
13844
13844
|
}
|
|
13845
|
-
class em extends
|
|
13845
|
+
class em extends ai.EventEmitter {
|
|
13846
13846
|
get logContext() {
|
|
13847
13847
|
var e, t;
|
|
13848
13848
|
return Object.assign({}, (t = (e = this.loggerOptions) === null || e === void 0 ? void 0 : e.loggerContextCb) === null || t === void 0 ? void 0 : t.call(e));
|
|
@@ -13869,7 +13869,7 @@ class em extends ri.EventEmitter {
|
|
|
13869
13869
|
constructor(e, t, n, s, r, a) {
|
|
13870
13870
|
let o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : Hr.STANDARD;
|
|
13871
13871
|
var c;
|
|
13872
|
-
super(), this.audioLevel = 0, this.isSpeaking = !1, this._connectionQuality = Hi.Unknown, this.log = $e, this.log =
|
|
13872
|
+
super(), this.audioLevel = 0, this.isSpeaking = !1, this._connectionQuality = Hi.Unknown, this.log = $e, this.log = Ei((c = a == null ? void 0 : a.loggerName) !== null && c !== void 0 ? c : zn.Participant), this.loggerOptions = a, this.setMaxListeners(100), this.sid = e, this.identity = t, this.name = n, this.metadata = s, this.audioTrackPublications = /* @__PURE__ */ new Map(), this.videoTrackPublications = /* @__PURE__ */ new Map(), this.trackPublications = /* @__PURE__ */ new Map(), this._kind = o, this._attributes = r ?? {};
|
|
13873
13873
|
}
|
|
13874
13874
|
getTrackPublications() {
|
|
13875
13875
|
return Array.from(this.trackPublications.values());
|
|
@@ -13896,7 +13896,7 @@ class em extends ri.EventEmitter {
|
|
|
13896
13896
|
* @returns a promise that resolves when the participant is active
|
|
13897
13897
|
*/
|
|
13898
13898
|
waitUntilActive() {
|
|
13899
|
-
return this.isActive ? Promise.resolve() : this.activeFuture ? this.activeFuture.promise : (this.activeFuture = new
|
|
13899
|
+
return this.isActive ? Promise.resolve() : this.activeFuture ? this.activeFuture.promise : (this.activeFuture = new Yn(), this.once(oe.Active, () => {
|
|
13900
13900
|
var e, t;
|
|
13901
13901
|
(t = (e = this.activeFuture) === null || e === void 0 ? void 0 : e.resolve) === null || t === void 0 || t.call(e), this.activeFuture = void 0;
|
|
13902
13902
|
}), this.activeFuture.promise);
|
|
@@ -13976,7 +13976,7 @@ class em extends ri.EventEmitter {
|
|
|
13976
13976
|
* @internal
|
|
13977
13977
|
*/
|
|
13978
13978
|
setAudioContext(e) {
|
|
13979
|
-
this.audioContext = e, this.audioTrackPublications.forEach((t) =>
|
|
13979
|
+
this.audioContext = e, this.audioTrackPublications.forEach((t) => Qn(t.track) && t.track.setAudioContext(e));
|
|
13980
13980
|
}
|
|
13981
13981
|
addTrackPublication(e) {
|
|
13982
13982
|
e.on(re.Muted, () => {
|
|
@@ -14013,7 +14013,7 @@ class Qb extends em {
|
|
|
14013
14013
|
loggerName: s.loggerName,
|
|
14014
14014
|
loggerContextCb: () => this.engine.logContext
|
|
14015
14015
|
}), this.pendingPublishing = /* @__PURE__ */ new Set(), this.pendingPublishPromises = /* @__PURE__ */ new Map(), this.participantTrackPermissions = [], this.allParticipantsAllowedToSubscribe = !0, this.encryptionType = bn.NONE, this.enabledPublishVideoCodecs = [], this.pendingAcks = /* @__PURE__ */ new Map(), this.pendingResponses = /* @__PURE__ */ new Map(), this.handleReconnecting = () => {
|
|
14016
|
-
this.reconnectFuture || (this.reconnectFuture = new
|
|
14016
|
+
this.reconnectFuture || (this.reconnectFuture = new Yn());
|
|
14017
14017
|
}, this.handleReconnected = () => {
|
|
14018
14018
|
var o, c;
|
|
14019
14019
|
(c = (o = this.reconnectFuture) === null || o === void 0 ? void 0 : o.resolve) === null || c === void 0 || c.call(o), this.reconnectFuture = void 0, this.updateTrackSubscriptionPermissions();
|
|
@@ -14022,7 +14022,7 @@ class Qb extends em {
|
|
|
14022
14022
|
this.reconnectFuture && (this.reconnectFuture.promise.catch((f) => this.log.warn(f.message, this.logContext)), (c = (o = this.reconnectFuture) === null || o === void 0 ? void 0 : o.reject) === null || c === void 0 || c.call(o, "Got disconnected during reconnection attempt"), this.reconnectFuture = void 0), this.signalConnectedFuture && ((d = (l = this.signalConnectedFuture).reject) === null || d === void 0 || d.call(l, "Got disconnected without signal connected"), this.signalConnectedFuture = void 0), (h = (u = this.activeAgentFuture) === null || u === void 0 ? void 0 : u.reject) === null || h === void 0 || h.call(u, "Got disconnected without active agent present"), this.activeAgentFuture = void 0, this.firstActiveAgent = void 0;
|
|
14023
14023
|
}, this.handleSignalConnected = (o) => {
|
|
14024
14024
|
var c, l;
|
|
14025
|
-
o.participant && this.updateInfo(o.participant), this.signalConnectedFuture || (this.signalConnectedFuture = new
|
|
14025
|
+
o.participant && this.updateInfo(o.participant), this.signalConnectedFuture || (this.signalConnectedFuture = new Yn()), (l = (c = this.signalConnectedFuture).resolve) === null || l === void 0 || l.call(c);
|
|
14026
14026
|
}, this.handleSignalRequestResponse = (o) => {
|
|
14027
14027
|
const {
|
|
14028
14028
|
requestId: c,
|
|
@@ -14082,7 +14082,7 @@ class Qb extends em {
|
|
|
14082
14082
|
return;
|
|
14083
14083
|
const g = yield f.videoTrack.setPublishingCodecs(o.subscribedCodecs);
|
|
14084
14084
|
try {
|
|
14085
|
-
for (var v = !0, m =
|
|
14085
|
+
for (var v = !0, m = _i(g), p; p = yield m.next(), c = p.done, !c; v = !0) {
|
|
14086
14086
|
u = p.value, v = !1;
|
|
14087
14087
|
const x = u;
|
|
14088
14088
|
M0(x) && (this.log.debug("publish ".concat(x, " for ").concat(f.videoTrack.sid), Object.assign(Object.assign({}, this.logContext), Xe(f))), yield this.publishAdditionalCodecForTrack(f.videoTrack, x, f.options));
|
|
@@ -14112,7 +14112,7 @@ class Qb extends em {
|
|
|
14112
14112
|
this.log.debug("unpublishing local track due to TrackEnded", Object.assign(Object.assign({}, this.logContext), Xe(o))), this.unpublishTrack(o);
|
|
14113
14113
|
else if (o.isUserProvided)
|
|
14114
14114
|
yield o.mute();
|
|
14115
|
-
else if (
|
|
14115
|
+
else if (fi(o) || Ii(o))
|
|
14116
14116
|
try {
|
|
14117
14117
|
if (un())
|
|
14118
14118
|
try {
|
|
@@ -14127,7 +14127,7 @@ class Qb extends em {
|
|
|
14127
14127
|
}, new Error("GetUserMedia Permission denied");
|
|
14128
14128
|
} catch {
|
|
14129
14129
|
}
|
|
14130
|
-
o.isMuted || (this.log.debug("track ended, attempting to use a different device", Object.assign(Object.assign({}, this.logContext), Xe(o))),
|
|
14130
|
+
o.isMuted || (this.log.debug("track ended, attempting to use a different device", Object.assign(Object.assign({}, this.logContext), Xe(o))), fi(o) ? yield o.restartTrack({
|
|
14131
14131
|
deviceId: "default"
|
|
14132
14132
|
}) : yield o.restartTrack());
|
|
14133
14133
|
} catch {
|
|
@@ -14317,7 +14317,7 @@ class Qb extends em {
|
|
|
14317
14317
|
c = yield this.createScreenTracks(Object.assign({}, n));
|
|
14318
14318
|
break;
|
|
14319
14319
|
default:
|
|
14320
|
-
throw new
|
|
14320
|
+
throw new yi(e);
|
|
14321
14321
|
}
|
|
14322
14322
|
} catch (l) {
|
|
14323
14323
|
throw c == null || c.forEach((d) => {
|
|
@@ -14326,7 +14326,7 @@ class Qb extends em {
|
|
|
14326
14326
|
}
|
|
14327
14327
|
for (const l of c) {
|
|
14328
14328
|
const d = Object.assign(Object.assign({}, this.roomOptions.publishDefaults), n);
|
|
14329
|
-
e === J.Source.Microphone &&
|
|
14329
|
+
e === J.Source.Microphone && Qn(l) && d.preConnectBuffer && (this.log.info("starting preconnect buffer for microphone", Object.assign({}, this.logContext)), l.startPreConnectBuffer());
|
|
14330
14330
|
}
|
|
14331
14331
|
try {
|
|
14332
14332
|
const l = [];
|
|
@@ -14387,7 +14387,7 @@ class Qb extends em {
|
|
|
14387
14387
|
return (yield mo(s, {
|
|
14388
14388
|
loggerName: this.roomOptions.loggerName,
|
|
14389
14389
|
loggerContextCb: () => this.logContext
|
|
14390
|
-
})).map((o) => (
|
|
14390
|
+
})).map((o) => (Qn(o) && (this.microphoneError = void 0, o.setAudioContext(this.audioContext), o.source = J.Source.Microphone, this.emit(oe.AudioStreamAcquired)), Ji(o) && (this.cameraError = void 0, o.source = J.Source.Camera), o));
|
|
14391
14391
|
} catch (r) {
|
|
14392
14392
|
throw r instanceof Error && (e.audio && (this.microphoneError = r), e.video && (this.cameraError = r)), r;
|
|
14393
14393
|
}
|
|
@@ -14405,7 +14405,7 @@ class Qb extends em {
|
|
|
14405
14405
|
e.resolution === void 0 && !I0() && (e.resolution = bd.h1080fps30.resolution);
|
|
14406
14406
|
const t = j0(e), n = yield navigator.mediaDevices.getDisplayMedia(t), s = n.getVideoTracks();
|
|
14407
14407
|
if (s.length === 0)
|
|
14408
|
-
throw new
|
|
14408
|
+
throw new yi("no video track found");
|
|
14409
14409
|
const r = new no(s[0], void 0, !1, {
|
|
14410
14410
|
loggerName: this.roomOptions.loggerName,
|
|
14411
14411
|
loggerContextCb: () => this.logContext
|
|
@@ -14439,7 +14439,7 @@ class Qb extends em {
|
|
|
14439
14439
|
let a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
14440
14440
|
return function* () {
|
|
14441
14441
|
var o, c, l, d;
|
|
14442
|
-
|
|
14442
|
+
fi(n) && n.setAudioContext(r.audioContext), yield (o = r.reconnectFuture) === null || o === void 0 ? void 0 : o.promise, r.republishPromise && !a && (yield r.republishPromise), Js(n) && r.pendingPublishPromises.has(n) && (yield r.pendingPublishPromises.get(n));
|
|
14443
14443
|
let u;
|
|
14444
14444
|
if (n instanceof MediaStreamTrack)
|
|
14445
14445
|
u = n.getConstraints();
|
|
@@ -14472,7 +14472,7 @@ class Qb extends em {
|
|
|
14472
14472
|
});
|
|
14473
14473
|
break;
|
|
14474
14474
|
default:
|
|
14475
|
-
throw new
|
|
14475
|
+
throw new yi("unsupported MediaStreamTrack kind ".concat(n.kind));
|
|
14476
14476
|
}
|
|
14477
14477
|
else
|
|
14478
14478
|
n.updateLoggerOptions({
|
|
@@ -14524,7 +14524,7 @@ class Qb extends em {
|
|
|
14524
14524
|
});
|
|
14525
14525
|
}
|
|
14526
14526
|
waitUntilEngineConnected() {
|
|
14527
|
-
return this.signalConnectedFuture || (this.signalConnectedFuture = new
|
|
14527
|
+
return this.signalConnectedFuture || (this.signalConnectedFuture = new Yn()), this.signalConnectedFuture.promise;
|
|
14528
14528
|
}
|
|
14529
14529
|
hasPermissionsToPublish(e) {
|
|
14530
14530
|
if (!this.permissions)
|
|
@@ -14540,11 +14540,11 @@ class Qb extends em {
|
|
|
14540
14540
|
var s, r, a, o, c, l, d, u, h, f;
|
|
14541
14541
|
if (!this.hasPermissionsToPublish(e))
|
|
14542
14542
|
throw new Fu("failed to publish track, insufficient permissions", 403);
|
|
14543
|
-
Array.from(this.trackPublications.values()).find((y) => Js(e) && y.source === e.source) && e.source !== J.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(e.source), Object.assign(Object.assign({}, this.logContext), Xe(e))), t.stopMicTrackOnMute &&
|
|
14543
|
+
Array.from(this.trackPublications.values()).find((y) => Js(e) && y.source === e.source) && e.source !== J.Source.Unknown && this.log.info("publishing a second track with the same source: ".concat(e.source), Object.assign(Object.assign({}, this.logContext), Xe(e))), t.stopMicTrackOnMute && Qn(e) && (e.stopOnMute = !0), e.source === J.Source.ScreenShare && Ss() && (t.simulcast = !1), t.videoCodec === "av1" && !R0() && (t.videoCodec = void 0), t.videoCodec === "vp9" && !P0() && (t.videoCodec = void 0), t.videoCodec === void 0 && (t.videoCodec = Qc), this.enabledPublishVideoCodecs.length > 0 && (this.enabledPublishVideoCodecs.some((y) => t.videoCodec === Or(y.mime)) || (t.videoCodec = Or(this.enabledPublishVideoCodecs[0].mime)));
|
|
14544
14544
|
const v = t.videoCodec;
|
|
14545
14545
|
e.on(re.Muted, this.onTrackMuted), e.on(re.Unmuted, this.onTrackUnmuted), e.on(re.Ended, this.handleTrackEnded), e.on(re.UpstreamPaused, this.onTrackUpstreamPaused), e.on(re.UpstreamResumed, this.onTrackUpstreamResumed), e.on(re.AudioTrackFeatureUpdate, this.onTrackFeatureUpdate);
|
|
14546
14546
|
const m = [], p = !(!((s = t.dtx) !== null && s !== void 0) || s), x = e.getSourceTrackSettings();
|
|
14547
|
-
x.autoGainControl && m.push(jt.TF_AUTO_GAIN_CONTROL), x.echoCancellation && m.push(jt.TF_ECHO_CANCELLATION), x.noiseSuppression && m.push(jt.TF_NOISE_SUPPRESSION), x.channelCount && x.channelCount > 1 && m.push(jt.TF_STEREO), p && m.push(jt.TF_NO_DTX),
|
|
14547
|
+
x.autoGainControl && m.push(jt.TF_AUTO_GAIN_CONTROL), x.echoCancellation && m.push(jt.TF_ECHO_CANCELLATION), x.noiseSuppression && m.push(jt.TF_NOISE_SUPPRESSION), x.channelCount && x.channelCount > 1 && m.push(jt.TF_STEREO), p && m.push(jt.TF_NO_DTX), fi(e) && e.hasPreConnectBuffer && m.push(jt.TF_PRECONNECT_BUFFER);
|
|
14548
14548
|
const C = new Dc({
|
|
14549
14549
|
// get local track id for use during publishing
|
|
14550
14550
|
cid: e.mediaStreamTrack.id,
|
|
@@ -14577,7 +14577,7 @@ class Qb extends em {
|
|
|
14577
14577
|
dims: y
|
|
14578
14578
|
}));
|
|
14579
14579
|
}
|
|
14580
|
-
C.width = y.width, C.height = y.height, Ii(e) && (
|
|
14580
|
+
C.width = y.width, C.height = y.height, Ii(e) && (Kn(v) && (e.source === J.Source.ScreenShare && (t.scalabilityMode = "L1T3", "contentHint" in e.mediaStreamTrack && (e.mediaStreamTrack.contentHint = "motion", this.log.info("forcing contentHint to motion for screenshare with SVC codecs", Object.assign(Object.assign({}, this.logContext), Xe(e))))), t.scalabilityMode = (c = t.scalabilityMode) !== null && c !== void 0 ? c : "L3T3_KEY"), C.simulcastCodecs = [new Ic({
|
|
14581
14581
|
codec: v,
|
|
14582
14582
|
cid: e.mediaStreamTrack.id
|
|
14583
14583
|
})], t.backupCodec === !0 && (t.backupCodec = {
|
|
@@ -14586,7 +14586,7 @@ class Qb extends em {
|
|
|
14586
14586
|
C.encryption === bn.NONE && (this.roomOptions.dynacast || (this.roomOptions.dynacast = !0), C.simulcastCodecs.push(new Ic({
|
|
14587
14587
|
codec: t.backupCodec.codec,
|
|
14588
14588
|
cid: ""
|
|
14589
|
-
})))), b = tl(e.source === J.Source.ScreenShare, C.width, C.height, t), C.layers = ch(C.width, C.height, b,
|
|
14589
|
+
})))), b = tl(e.source === J.Source.ScreenShare, C.width, C.height, t), C.layers = ch(C.width, C.height, b, Kn(t.videoCodec));
|
|
14590
14590
|
} else e.kind === J.Kind.Audio && (b = [{
|
|
14591
14591
|
maxBitrate: (l = t.audioPreset) === null || l === void 0 ? void 0 : l.maxBitrate,
|
|
14592
14592
|
priority: (u = (d = t.audioPreset) === null || d === void 0 ? void 0 : d.priority) !== null && u !== void 0 ? u : "high",
|
|
@@ -14611,7 +14611,7 @@ class Qb extends em {
|
|
|
14611
14611
|
codec: "opus",
|
|
14612
14612
|
maxbr: !((T = b[0]) === null || T === void 0) && T.maxBitrate ? b[0].maxBitrate / 1e3 : 0
|
|
14613
14613
|
});
|
|
14614
|
-
} else e.codec &&
|
|
14614
|
+
} else e.codec && Kn(e.codec) && (!((R = b[0]) === null || R === void 0) && R.maxBitrate) && this.engine.pcManager.publisher.setTrackCodecBitrate({
|
|
14615
14615
|
cid: C.cid,
|
|
14616
14616
|
codec: e.codec,
|
|
14617
14617
|
maxbr: b[0].maxBitrate / 1e3
|
|
@@ -14653,7 +14653,7 @@ class Qb extends em {
|
|
|
14653
14653
|
if (k.on(re.CpuConstrained, (y) => this.onTrackCpuConstrained(y, k)), k.options = t, e.sid = M.sid, this.log.debug("publishing ".concat(e.kind, " with encodings"), Object.assign(Object.assign({}, this.logContext), {
|
|
14654
14654
|
encodings: b,
|
|
14655
14655
|
trackInfo: M
|
|
14656
|
-
})), Ii(e) ? e.startMonitor(this.engine.client) :
|
|
14656
|
+
})), Ii(e) ? e.startMonitor(this.engine.client) : fi(e) && e.startMonitor(), this.addTrackPublication(k), this.emit(oe.LocalTrackPublished, k), fi(e) && M.audioFeatures.includes(jt.TF_PRECONNECT_BUFFER)) {
|
|
14657
14657
|
const y = e.getPreConnectBuffer(), T = e.getPreConnectBufferMimeType();
|
|
14658
14658
|
this.on(oe.LocalTrackSubscribed, (R) => {
|
|
14659
14659
|
if (R.trackSid === M.sid) {
|
|
@@ -14683,7 +14683,7 @@ class Qb extends em {
|
|
|
14683
14683
|
}
|
|
14684
14684
|
});
|
|
14685
14685
|
try {
|
|
14686
|
-
for (var le = !0, be =
|
|
14686
|
+
for (var le = !0, be = _i(y), Be; Be = yield be.next(), q = Be.done, !q; le = !0) {
|
|
14687
14687
|
W = Be.value, le = !1;
|
|
14688
14688
|
const $ = W;
|
|
14689
14689
|
yield ft.write($);
|
|
@@ -14729,9 +14729,9 @@ class Qb extends em {
|
|
|
14729
14729
|
if (this.trackPublications.forEach((f) => {
|
|
14730
14730
|
f.track && f.track === e && (r = f);
|
|
14731
14731
|
}), !r)
|
|
14732
|
-
throw new
|
|
14732
|
+
throw new yi("track is not published");
|
|
14733
14733
|
if (!Ii(e))
|
|
14734
|
-
throw new
|
|
14734
|
+
throw new yi("track is not a video track");
|
|
14735
14735
|
const a = Object.assign(Object.assign({}, (s = this.roomOptions) === null || s === void 0 ? void 0 : s.publishDefaults), n), o = Rb(e, t, a);
|
|
14736
14736
|
if (!o) {
|
|
14737
14737
|
this.log.info("backup codec has been disabled, ignoring request to add additional codec for track", Object.assign(Object.assign({}, this.logContext), Xe(e)));
|
|
@@ -14819,7 +14819,7 @@ class Qb extends em {
|
|
|
14819
14819
|
c.track && (t && (c.options = Object.assign(Object.assign({}, c.options), t)), o.push(c));
|
|
14820
14820
|
}), yield Promise.all(o.map((c) => P(this, void 0, void 0, function* () {
|
|
14821
14821
|
const l = c.track;
|
|
14822
|
-
yield this.unpublishTrack(l, !1), s && !l.isMuted && l.source !== J.Source.ScreenShare && l.source !== J.Source.ScreenShareAudio && (
|
|
14822
|
+
yield this.unpublishTrack(l, !1), s && !l.isMuted && l.source !== J.Source.ScreenShare && l.source !== J.Source.ScreenShareAudio && (fi(l) || Ii(l)) && !l.isUserProvided && (this.log.debug("restarting existing track", Object.assign(Object.assign({}, this.logContext), {
|
|
14823
14823
|
track: c.trackSid
|
|
14824
14824
|
})), yield l.restartTrack()), yield this.publishOrRepublishTrack(l, c.options, !0);
|
|
14825
14825
|
}))), r();
|
|
@@ -14987,7 +14987,7 @@ class Qb extends em {
|
|
|
14987
14987
|
d(It.builtIn("REQUEST_PAYLOAD_TOO_LARGE"));
|
|
14988
14988
|
return;
|
|
14989
14989
|
}
|
|
14990
|
-
if (!((h = (u = this.engine.latestJoinResponse) === null || u === void 0 ? void 0 : u.serverInfo) === null || h === void 0) && h.version &&
|
|
14990
|
+
if (!((h = (u = this.engine.latestJoinResponse) === null || u === void 0 ? void 0 : u.serverInfo) === null || h === void 0) && h.version && si((g = (f = this.engine.latestJoinResponse) === null || f === void 0 ? void 0 : f.serverInfo) === null || g === void 0 ? void 0 : g.version, "1.8.0") < 0) {
|
|
14991
14991
|
d(It.builtIn("UNSUPPORTED_SERVER"));
|
|
14992
14992
|
return;
|
|
14993
14993
|
}
|
|
@@ -15111,13 +15111,13 @@ class Qb extends em {
|
|
|
15111
15111
|
this.firstActiveAgent = e, e && !this.firstActiveAgent && (this.firstActiveAgent = e), e ? (n = (t = this.activeAgentFuture) === null || t === void 0 ? void 0 : t.resolve) === null || n === void 0 || n.call(t, e) : (r = (s = this.activeAgentFuture) === null || s === void 0 ? void 0 : s.reject) === null || r === void 0 || r.call(s, "Agent disconnected"), this.activeAgentFuture = void 0;
|
|
15112
15112
|
}
|
|
15113
15113
|
waitUntilActiveAgentPresent() {
|
|
15114
|
-
return this.firstActiveAgent ? Promise.resolve(this.firstActiveAgent) : (this.activeAgentFuture || (this.activeAgentFuture = new
|
|
15114
|
+
return this.firstActiveAgent ? Promise.resolve(this.firstActiveAgent) : (this.activeAgentFuture || (this.activeAgentFuture = new Yn()), this.activeAgentFuture.promise);
|
|
15115
15115
|
}
|
|
15116
15116
|
getPublicationForTrack(e) {
|
|
15117
15117
|
let t;
|
|
15118
15118
|
return this.trackPublications.forEach((n) => {
|
|
15119
15119
|
const s = n.track;
|
|
15120
|
-
s && (e instanceof MediaStreamTrack ? (
|
|
15120
|
+
s && (e instanceof MediaStreamTrack ? (fi(s) || Ii(s)) && s.mediaStreamTrack === e && (t = n) : e === s && (t = n));
|
|
15121
15121
|
}), t;
|
|
15122
15122
|
}
|
|
15123
15123
|
waitForPendingPublicationOfSource(e) {
|
|
@@ -15135,7 +15135,7 @@ class Qb extends em {
|
|
|
15135
15135
|
});
|
|
15136
15136
|
}
|
|
15137
15137
|
}
|
|
15138
|
-
class e_ extends
|
|
15138
|
+
class e_ extends gi {
|
|
15139
15139
|
constructor(e, t, n, s) {
|
|
15140
15140
|
super(e, t.sid, t.name, s), this.track = void 0, this.allowed = !0, this.requestedDisabled = void 0, this.visible = !0, this.handleEnded = (r) => {
|
|
15141
15141
|
this.setTrack(void 0), this.emit(re.Ended, r);
|
|
@@ -15165,10 +15165,10 @@ class e_ extends mi {
|
|
|
15165
15165
|
this.emit(re.UpdateSubscription, s), this.emitSubscriptionUpdateIfChanged(t), this.emitPermissionUpdateIfChanged(n);
|
|
15166
15166
|
}
|
|
15167
15167
|
get subscriptionStatus() {
|
|
15168
|
-
return this.subscribed === !1 ?
|
|
15168
|
+
return this.subscribed === !1 ? gi.SubscriptionStatus.Unsubscribed : super.isSubscribed ? gi.SubscriptionStatus.Subscribed : gi.SubscriptionStatus.Desired;
|
|
15169
15169
|
}
|
|
15170
15170
|
get permissionStatus() {
|
|
15171
|
-
return this.allowed ?
|
|
15171
|
+
return this.allowed ? gi.PermissionStatus.Allowed : gi.PermissionStatus.NotAllowed;
|
|
15172
15172
|
}
|
|
15173
15173
|
/**
|
|
15174
15174
|
* Returns true if track is subscribed, and ready for playback
|
|
@@ -15372,7 +15372,7 @@ class io extends em {
|
|
|
15372
15372
|
}
|
|
15373
15373
|
const c = e.kind === "video";
|
|
15374
15374
|
let l;
|
|
15375
|
-
return c ? l = new Xb(e, t, s, r) : l = new jb(e, t, s, this.audioContext, this.audioOutput), l.source = o.source, l.isMuted = o.isMuted, l.setMediaStream(n), l.start(), o.setTrack(l), this.volumeMap.has(o.source) && Yc(l) &&
|
|
15375
|
+
return c ? l = new Xb(e, t, s, r) : l = new jb(e, t, s, this.audioContext, this.audioOutput), l.source = o.source, l.isMuted = o.isMuted, l.setMediaStream(n), l.start(), o.setTrack(l), this.volumeMap.has(o.source) && Yc(l) && Qn(l) && l.setVolume(this.volumeMap.get(o.source)), o;
|
|
15376
15376
|
}
|
|
15377
15377
|
/** @internal */
|
|
15378
15378
|
get hasMetadata() {
|
|
@@ -15442,7 +15442,7 @@ class io extends em {
|
|
|
15442
15442
|
const t = [];
|
|
15443
15443
|
this.audioTrackPublications.forEach((n) => {
|
|
15444
15444
|
var s;
|
|
15445
|
-
|
|
15445
|
+
Qn(n.track) && Yc(n.track) && t.push(n.track.setSinkId((s = e.deviceId) !== null && s !== void 0 ? s : "default"));
|
|
15446
15446
|
}), yield Promise.all(t);
|
|
15447
15447
|
});
|
|
15448
15448
|
}
|
|
@@ -15461,7 +15461,7 @@ var it;
|
|
|
15461
15461
|
i.Disconnected = "disconnected", i.Connecting = "connecting", i.Connected = "connected", i.Reconnecting = "reconnecting", i.SignalReconnecting = "signalReconnecting";
|
|
15462
15462
|
})(it || (it = {}));
|
|
15463
15463
|
const t_ = 4 * 1e3;
|
|
15464
|
-
class rr extends
|
|
15464
|
+
class rr extends ai.EventEmitter {
|
|
15465
15465
|
/**
|
|
15466
15466
|
* Creates a new Room, the primary construct for a LiveKit session.
|
|
15467
15467
|
* @param options
|
|
@@ -15471,7 +15471,7 @@ class rr extends ri.EventEmitter {
|
|
|
15471
15471
|
if (super(), t = this, this.state = it.Disconnected, this.activeSpeakers = [], this.isE2EEEnabled = !1, this.audioEnabled = !0, this.isVideoPlaybackBlocked = !1, this.log = $e, this.bufferedEvents = [], this.isResuming = !1, this.rpcHandlers = /* @__PURE__ */ new Map(), this.connect = (a, o, c) => P(this, void 0, void 0, function* () {
|
|
15472
15472
|
var l;
|
|
15473
15473
|
if (!k0())
|
|
15474
|
-
throw
|
|
15474
|
+
throw ii() ? Error("WebRTC isn't detected, have you called registerGlobals?") : Error("LiveKit doesn't seem to be supported on this browser. Try to update your browser and make sure no browser extensions are disabling webRTC.");
|
|
15475
15475
|
const d = yield this.disconnectLock.lock();
|
|
15476
15476
|
if (this.state === it.Connected)
|
|
15477
15477
|
return this.log.info("already connected to room ".concat(this.name), this.logContext), d(), Promise.resolve();
|
|
@@ -15493,24 +15493,24 @@ class rr extends ri.EventEmitter {
|
|
|
15493
15493
|
try {
|
|
15494
15494
|
yield this.attemptConnection(v ?? a, o, c, x), this.abortController = void 0, f();
|
|
15495
15495
|
} catch (C) {
|
|
15496
|
-
if (this.regionUrlProvider && C instanceof
|
|
15496
|
+
if (this.regionUrlProvider && C instanceof St && C.reason !== Ye.Cancelled && C.reason !== Ye.NotAllowed) {
|
|
15497
15497
|
let b = null;
|
|
15498
15498
|
try {
|
|
15499
15499
|
b = yield this.regionUrlProvider.getNextBestRegionUrl((m = this.abortController) === null || m === void 0 ? void 0 : m.signal);
|
|
15500
15500
|
} catch (S) {
|
|
15501
|
-
if (S instanceof
|
|
15501
|
+
if (S instanceof St && (S.status === 401 || S.reason === Ye.Cancelled)) {
|
|
15502
15502
|
this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), g(S);
|
|
15503
15503
|
return;
|
|
15504
15504
|
}
|
|
15505
15505
|
}
|
|
15506
15506
|
b && !(!((p = this.abortController) === null || p === void 0) && p.signal.aborted) ? (this.log.info("Initial connection failed with ConnectionError: ".concat(C.message, ". Retrying with another region: ").concat(b), this.logContext), this.recreateEngine(), yield u(f, g, b)) : (this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, Xu(C)), g(C));
|
|
15507
15507
|
} else {
|
|
15508
|
-
let b =
|
|
15509
|
-
C instanceof
|
|
15508
|
+
let b = Bn.UNKNOWN_REASON;
|
|
15509
|
+
C instanceof St && (b = Xu(C)), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, b), g(C);
|
|
15510
15510
|
}
|
|
15511
15511
|
}
|
|
15512
15512
|
}), h = this.regionUrl;
|
|
15513
|
-
return this.regionUrl = void 0, this.connectFuture = new
|
|
15513
|
+
return this.regionUrl = void 0, this.connectFuture = new Yn((f, g) => {
|
|
15514
15514
|
u(f, g, h);
|
|
15515
15515
|
}, () => {
|
|
15516
15516
|
this.clearConnectionFutures();
|
|
@@ -15557,13 +15557,13 @@ class rr extends ri.EventEmitter {
|
|
|
15557
15557
|
this.applyJoinResponse(h), this.setupLocalParticipantEvents(), this.emit(te.SignalConnected);
|
|
15558
15558
|
} catch (h) {
|
|
15559
15559
|
yield this.engine.close(), this.recreateEngine();
|
|
15560
|
-
const f = new
|
|
15561
|
-
throw h instanceof Error && (f.message = "".concat(f.message, ": ").concat(h.message)), h instanceof
|
|
15560
|
+
const f = new St("could not establish signal connection", Ye.ServerUnreachable);
|
|
15561
|
+
throw h instanceof Error && (f.message = "".concat(f.message, ": ").concat(h.message)), h instanceof St && (f.reason = h.reason, f.status = h.status), this.log.debug("error trying to establish signal connection", Object.assign(Object.assign({}, this.logContext), {
|
|
15562
15562
|
error: h
|
|
15563
15563
|
})), f;
|
|
15564
15564
|
}
|
|
15565
15565
|
if (l.signal.aborted)
|
|
15566
|
-
throw yield this.engine.close(), this.recreateEngine(), new
|
|
15566
|
+
throw yield this.engine.close(), this.recreateEngine(), new St("Connection attempt aborted", Ye.Cancelled);
|
|
15567
15567
|
try {
|
|
15568
15568
|
yield this.engine.waitForPCInitialConnection(this.connOptions.peerConnectionTimeout, l);
|
|
15569
15569
|
} catch (h) {
|
|
@@ -15584,7 +15584,7 @@ class rr extends ri.EventEmitter {
|
|
|
15584
15584
|
l.log.debug("already disconnected", l.logContext);
|
|
15585
15585
|
return;
|
|
15586
15586
|
}
|
|
15587
|
-
l.log.info("disconnect from room", Object.assign({}, l.logContext)), (l.state === it.Connecting || l.state === it.Reconnecting || l.isResuming) && (l.log.warn("abort connection attempt", l.logContext), (u = l.abortController) === null || u === void 0 || u.abort(), (f = (h = l.connectFuture) === null || h === void 0 ? void 0 : h.reject) === null || f === void 0 || f.call(h, new
|
|
15587
|
+
l.log.info("disconnect from room", Object.assign({}, l.logContext)), (l.state === it.Connecting || l.state === it.Reconnecting || l.isResuming) && (l.log.warn("abort connection attempt", l.logContext), (u = l.abortController) === null || u === void 0 || u.abort(), (f = (h = l.connectFuture) === null || h === void 0 ? void 0 : h.reject) === null || f === void 0 || f.call(h, new St("Client initiated disconnect", Ye.Cancelled)), l.connectFuture = void 0), !((g = l.engine) === null || g === void 0) && g.client.isDisconnected || (yield l.engine.client.sendLeave()), l.engine && (yield l.engine.close()), l.handleDisconnect(d, Bn.CLIENT_INITIATED), l.engine = void 0;
|
|
15588
15588
|
} finally {
|
|
15589
15589
|
v();
|
|
15590
15590
|
}
|
|
@@ -15789,7 +15789,7 @@ class rr extends ri.EventEmitter {
|
|
|
15789
15789
|
(o = a == null ? void 0 : a.onPublish) === null || o === void 0 || o.call(a, this);
|
|
15790
15790
|
}, this.onLocalTrackPublished = (a) => P(this, void 0, void 0, function* () {
|
|
15791
15791
|
var o, c, l, d, u, h;
|
|
15792
|
-
(o = a.track) === null || o === void 0 || o.on(re.TrackProcessorUpdate, this.onTrackProcessorUpdate), (c = a.track) === null || c === void 0 || c.on(re.Restarted, this.onLocalTrackRestarted), (u = (d = (l = a.track) === null || l === void 0 ? void 0 : l.getProcessor()) === null || d === void 0 ? void 0 : d.onPublish) === null || u === void 0 || u.call(d, this), this.emit(te.LocalTrackPublished, a, this.localParticipant),
|
|
15792
|
+
(o = a.track) === null || o === void 0 || o.on(re.TrackProcessorUpdate, this.onTrackProcessorUpdate), (c = a.track) === null || c === void 0 || c.on(re.Restarted, this.onLocalTrackRestarted), (u = (d = (l = a.track) === null || l === void 0 ? void 0 : l.getProcessor()) === null || d === void 0 ? void 0 : d.onPublish) === null || u === void 0 || u.call(d, this), this.emit(te.LocalTrackPublished, a, this.localParticipant), fi(a.track) && (yield a.track.checkForSilence()) && this.emit(te.LocalAudioSilenceDetected, a);
|
|
15793
15793
|
const f = yield (h = a.track) === null || h === void 0 ? void 0 : h.getDeviceId(!1), g = Zc(a.source);
|
|
15794
15794
|
g && f && f !== this.localParticipant.activeDeviceMap.get(g) && (this.localParticipant.activeDeviceMap.set(g, f), this.emit(te.ActiveDeviceChanged, g, f));
|
|
15795
15795
|
}), this.onLocalTrackUnpublished = (a) => {
|
|
@@ -15806,7 +15806,7 @@ class rr extends ri.EventEmitter {
|
|
|
15806
15806
|
this.emit(te.ParticipantPermissionsChanged, a, this.localParticipant);
|
|
15807
15807
|
}, this.onLocalChatMessageSent = (a) => {
|
|
15808
15808
|
this.emit(te.ChatMessage, a, this.localParticipant);
|
|
15809
|
-
}, this.setMaxListeners(100), this.remoteParticipants = /* @__PURE__ */ new Map(), this.sidToIdentity = /* @__PURE__ */ new Map(), this.options = Object.assign(Object.assign({}, pb), e), this.log =
|
|
15809
|
+
}, this.setMaxListeners(100), this.remoteParticipants = /* @__PURE__ */ new Map(), this.sidToIdentity = /* @__PURE__ */ new Map(), this.options = Object.assign(Object.assign({}, pb), e), this.log = Ei((n = this.options.loggerName) !== null && n !== void 0 ? n : zn.Room), this.transcriptionReceivedTimes = /* @__PURE__ */ new Map(), this.options.audioCaptureDefaults = Object.assign(Object.assign({}, qp), e == null ? void 0 : e.audioCaptureDefaults), this.options.videoCaptureDefaults = Object.assign(Object.assign({}, jp), e == null ? void 0 : e.videoCaptureDefaults), this.options.publishDefaults = Object.assign(Object.assign({}, fb), e == null ? void 0 : e.publishDefaults), this.maybeCreateEngine(), this.incomingDataStreamManager = new Gb(), this.outgoingDataStreamManager = new qb(this.engine, this.log), this.disconnectLock = new hn(), this.localParticipant = new Qb("", "", this.engine, this.options, this.rpcHandlers, this.outgoingDataStreamManager), this.options.videoCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("videoinput", Ki(this.options.videoCaptureDefaults.deviceId)), this.options.audioCaptureDefaults.deviceId && this.localParticipant.activeDeviceMap.set("audioinput", Ki(this.options.audioCaptureDefaults.deviceId)), !((s = this.options.audioOutput) === null || s === void 0) && s.deviceId && this.switchActiveDevice("audiooutput", Ki(this.options.audioOutput.deviceId)).catch((a) => this.log.warn("Could not set audio output: ".concat(a.message), this.logContext)), this.options.e2ee && this.setupE2EE(), un()) {
|
|
15810
15810
|
const a = new AbortController();
|
|
15811
15811
|
(r = navigator.mediaDevices) === null || r === void 0 || r.addEventListener("devicechange", this.handleDeviceChange, {
|
|
15812
15812
|
signal: a.signal
|
|
@@ -16032,7 +16032,7 @@ class rr extends ri.EventEmitter {
|
|
|
16032
16032
|
yield this.engine.client.handleOnClose("simulate disconnect");
|
|
16033
16033
|
break;
|
|
16034
16034
|
case "speaker":
|
|
16035
|
-
s = new
|
|
16035
|
+
s = new jn({
|
|
16036
16036
|
scenario: {
|
|
16037
16037
|
case: "speakerUpdate",
|
|
16038
16038
|
value: 3
|
|
@@ -16040,7 +16040,7 @@ class rr extends ri.EventEmitter {
|
|
|
16040
16040
|
});
|
|
16041
16041
|
break;
|
|
16042
16042
|
case "node-failure":
|
|
16043
|
-
s = new
|
|
16043
|
+
s = new jn({
|
|
16044
16044
|
scenario: {
|
|
16045
16045
|
case: "nodeFailure",
|
|
16046
16046
|
value: !0
|
|
@@ -16048,7 +16048,7 @@ class rr extends ri.EventEmitter {
|
|
|
16048
16048
|
});
|
|
16049
16049
|
break;
|
|
16050
16050
|
case "server-leave":
|
|
16051
|
-
s = new
|
|
16051
|
+
s = new jn({
|
|
16052
16052
|
scenario: {
|
|
16053
16053
|
case: "serverLeave",
|
|
16054
16054
|
value: !0
|
|
@@ -16056,7 +16056,7 @@ class rr extends ri.EventEmitter {
|
|
|
16056
16056
|
});
|
|
16057
16057
|
break;
|
|
16058
16058
|
case "migration":
|
|
16059
|
-
s = new
|
|
16059
|
+
s = new jn({
|
|
16060
16060
|
scenario: {
|
|
16061
16061
|
case: "migration",
|
|
16062
16062
|
value: !0
|
|
@@ -16069,7 +16069,7 @@ class rr extends ri.EventEmitter {
|
|
|
16069
16069
|
case "disconnect-signal-on-resume":
|
|
16070
16070
|
n = () => P(this, void 0, void 0, function* () {
|
|
16071
16071
|
yield this.engine.client.handleOnClose("simulate resume-disconnect");
|
|
16072
|
-
}), s = new
|
|
16072
|
+
}), s = new jn({
|
|
16073
16073
|
scenario: {
|
|
16074
16074
|
case: "disconnectSignalOnResume",
|
|
16075
16075
|
value: !0
|
|
@@ -16079,7 +16079,7 @@ class rr extends ri.EventEmitter {
|
|
|
16079
16079
|
case "disconnect-signal-on-resume-no-messages":
|
|
16080
16080
|
n = () => P(this, void 0, void 0, function* () {
|
|
16081
16081
|
yield this.engine.client.handleOnClose("simulate resume-disconnect");
|
|
16082
|
-
}), s = new
|
|
16082
|
+
}), s = new jn({
|
|
16083
16083
|
scenario: {
|
|
16084
16084
|
case: "disconnectSignalOnResumeNoMessages",
|
|
16085
16085
|
value: !0
|
|
@@ -16091,7 +16091,7 @@ class rr extends ri.EventEmitter {
|
|
|
16091
16091
|
break;
|
|
16092
16092
|
case "force-tcp":
|
|
16093
16093
|
case "force-tls":
|
|
16094
|
-
s = new
|
|
16094
|
+
s = new jn({
|
|
16095
16095
|
scenario: {
|
|
16096
16096
|
case: "switchCandidateProtocol",
|
|
16097
16097
|
value: e === "force-tls" ? 2 : 1
|
|
@@ -16099,7 +16099,7 @@ class rr extends ri.EventEmitter {
|
|
|
16099
16099
|
}), n = () => P(this, void 0, void 0, function* () {
|
|
16100
16100
|
const r = this.engine.client.onLeave;
|
|
16101
16101
|
r && r(new ho({
|
|
16102
|
-
reason:
|
|
16102
|
+
reason: Bn.CLIENT_INITIATED,
|
|
16103
16103
|
action: $s.RECONNECT
|
|
16104
16104
|
}));
|
|
16105
16105
|
});
|
|
@@ -16107,7 +16107,7 @@ class rr extends ri.EventEmitter {
|
|
|
16107
16107
|
case "subscriber-bandwidth":
|
|
16108
16108
|
if (t === void 0 || typeof t != "number")
|
|
16109
16109
|
throw new Error("subscriber-bandwidth requires a number as argument");
|
|
16110
|
-
s = new
|
|
16110
|
+
s = new jn({
|
|
16111
16111
|
scenario: {
|
|
16112
16112
|
case: "subscriberBandwidth",
|
|
16113
16113
|
value: cs(t)
|
|
@@ -16115,7 +16115,7 @@ class rr extends ri.EventEmitter {
|
|
|
16115
16115
|
});
|
|
16116
16116
|
break;
|
|
16117
16117
|
case "leave-full-reconnect":
|
|
16118
|
-
s = new
|
|
16118
|
+
s = new jn({
|
|
16119
16119
|
scenario: {
|
|
16120
16120
|
case: "leaveRequestFullReconnect",
|
|
16121
16121
|
value: !0
|
|
@@ -16428,7 +16428,7 @@ class rr extends ri.EventEmitter {
|
|
|
16428
16428
|
closed: this.engine.isClosed,
|
|
16429
16429
|
transportsConnected: this.engine.verifyTransport()
|
|
16430
16430
|
} : void 0
|
|
16431
|
-
})), e >= 3 && (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish,
|
|
16431
|
+
})), e >= 3 && (this.recreateEngine(), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, Bn.STATE_MISMATCH))) : e = 0;
|
|
16432
16432
|
}, t_);
|
|
16433
16433
|
}
|
|
16434
16434
|
clearConnectionReconcile() {
|
|
@@ -16489,7 +16489,7 @@ class rr extends ri.EventEmitter {
|
|
|
16489
16489
|
const a = new sl(J.Kind.Video, new Ws({
|
|
16490
16490
|
source: Ft.CAMERA,
|
|
16491
16491
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16492
|
-
type:
|
|
16492
|
+
type: Nn.AUDIO,
|
|
16493
16493
|
name: "video-dummy"
|
|
16494
16494
|
}), new no(s.useRealTracks ? (yield window.navigator.mediaDevices.getUserMedia({
|
|
16495
16495
|
video: !0
|
|
@@ -16506,7 +16506,7 @@ class rr extends ri.EventEmitter {
|
|
|
16506
16506
|
const a = new sl(J.Kind.Audio, new Ws({
|
|
16507
16507
|
source: Ft.MICROPHONE,
|
|
16508
16508
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16509
|
-
type:
|
|
16509
|
+
type: Nn.AUDIO
|
|
16510
16510
|
}), new to(s.useRealTracks ? (yield navigator.mediaDevices.getUserMedia({
|
|
16511
16511
|
audio: !0
|
|
16512
16512
|
})).getAudioTracks()[0] : Fo(), void 0, !1, this.audioContext, {
|
|
@@ -16531,7 +16531,7 @@ class rr extends ri.EventEmitter {
|
|
|
16531
16531
|
const l = ju(160 * ((n = r.aspectRatios[a % r.aspectRatios.length]) !== null && n !== void 0 ? n : 1), 160, !1, !0), d = new Ws({
|
|
16532
16532
|
source: Ft.CAMERA,
|
|
16533
16533
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16534
|
-
type:
|
|
16534
|
+
type: Nn.AUDIO
|
|
16535
16535
|
});
|
|
16536
16536
|
c.addSubscribedMediaTrack(l, d.sid, new MediaStream([l]), new RTCRtpReceiver()), o.tracks = [...o.tracks, d];
|
|
16537
16537
|
}
|
|
@@ -16539,7 +16539,7 @@ class rr extends ri.EventEmitter {
|
|
|
16539
16539
|
const l = Fo(), d = new Ws({
|
|
16540
16540
|
source: Ft.MICROPHONE,
|
|
16541
16541
|
sid: Math.floor(Math.random() * 1e4).toString(),
|
|
16542
|
-
type:
|
|
16542
|
+
type: Nn.AUDIO
|
|
16543
16543
|
});
|
|
16544
16544
|
c.addSubscribedMediaTrack(l, d.sid, new MediaStream([l]), new RTCRtpReceiver()), o.tracks = [...o.tracks, d];
|
|
16545
16545
|
}
|
|
@@ -16570,26 +16570,26 @@ function tm(i) {
|
|
|
16570
16570
|
return Array.isArray(e) ? tm(e) : typeof e == "object" ? "logContext" in e ? e.logContext : void 0 : e;
|
|
16571
16571
|
});
|
|
16572
16572
|
}
|
|
16573
|
-
var
|
|
16573
|
+
var Ln;
|
|
16574
16574
|
(function(i) {
|
|
16575
16575
|
i[i.IDLE = 0] = "IDLE", i[i.RUNNING = 1] = "RUNNING", i[i.SKIPPED = 2] = "SKIPPED", i[i.SUCCESS = 3] = "SUCCESS", i[i.FAILED = 4] = "FAILED";
|
|
16576
|
-
})(
|
|
16577
|
-
class Zi extends
|
|
16576
|
+
})(Ln || (Ln = {}));
|
|
16577
|
+
class Zi extends ai.EventEmitter {
|
|
16578
16578
|
constructor(e, t) {
|
|
16579
16579
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
16580
|
-
super(), this.status =
|
|
16580
|
+
super(), this.status = Ln.IDLE, this.logs = [], this.options = {}, this.url = e, this.token = t, this.name = this.constructor.name, this.room = new rr(n.roomOptions), this.connectOptions = n.connectOptions, this.options = n;
|
|
16581
16581
|
}
|
|
16582
16582
|
run(e) {
|
|
16583
16583
|
return P(this, void 0, void 0, function* () {
|
|
16584
|
-
if (this.status !==
|
|
16584
|
+
if (this.status !== Ln.IDLE)
|
|
16585
16585
|
throw Error("check is running already");
|
|
16586
|
-
this.setStatus(
|
|
16586
|
+
this.setStatus(Ln.RUNNING);
|
|
16587
16587
|
try {
|
|
16588
16588
|
yield this.perform();
|
|
16589
16589
|
} catch (t) {
|
|
16590
16590
|
t instanceof Error && (this.options.errorsAsWarnings ? this.appendWarning(t.message) : this.appendError(t.message));
|
|
16591
16591
|
}
|
|
16592
|
-
return yield this.disconnect(), yield new Promise((t) => setTimeout(t, 500)), this.status !==
|
|
16592
|
+
return yield this.disconnect(), yield new Promise((t) => setTimeout(t, 500)), this.status !== Ln.SKIPPED && this.setStatus(this.isSuccess() ? Ln.SUCCESS : Ln.FAILED), e && e(), this.getInfo();
|
|
16593
16593
|
});
|
|
16594
16594
|
}
|
|
16595
16595
|
isSuccess() {
|
|
@@ -16606,7 +16606,7 @@ class Zi extends ri.EventEmitter {
|
|
|
16606
16606
|
});
|
|
16607
16607
|
}
|
|
16608
16608
|
skip() {
|
|
16609
|
-
this.setStatus(
|
|
16609
|
+
this.setStatus(Ln.SKIPPED);
|
|
16610
16610
|
}
|
|
16611
16611
|
switchProtocol(e) {
|
|
16612
16612
|
return P(this, void 0, void 0, function* () {
|
|
@@ -16953,7 +16953,7 @@ class d_ extends Zi {
|
|
|
16953
16953
|
});
|
|
16954
16954
|
}
|
|
16955
16955
|
}
|
|
16956
|
-
class GE extends
|
|
16956
|
+
class GE extends ai.EventEmitter {
|
|
16957
16957
|
constructor(e, t) {
|
|
16958
16958
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
16959
16959
|
super(), this.options = {}, this.checkResults = /* @__PURE__ */ new Map(), this.url = e, this.token = t, this.options = n;
|
|
@@ -16962,7 +16962,7 @@ class GE extends ri.EventEmitter {
|
|
|
16962
16962
|
const e = this.checkResults.size;
|
|
16963
16963
|
return this.checkResults.set(e, {
|
|
16964
16964
|
logs: [],
|
|
16965
|
-
status:
|
|
16965
|
+
status: Ln.IDLE,
|
|
16966
16966
|
name: "",
|
|
16967
16967
|
description: ""
|
|
16968
16968
|
}), e;
|
|
@@ -16971,7 +16971,7 @@ class GE extends ri.EventEmitter {
|
|
|
16971
16971
|
this.checkResults.set(e, t), this.emit("checkUpdate", e, t);
|
|
16972
16972
|
}
|
|
16973
16973
|
isSuccess() {
|
|
16974
|
-
return Array.from(this.checkResults.values()).every((e) => e.status !==
|
|
16974
|
+
return Array.from(this.checkResults.values()).every((e) => e.status !== Ln.FAILED);
|
|
16975
16975
|
}
|
|
16976
16976
|
getResults() {
|
|
16977
16977
|
return Array.from(this.checkResults.values());
|
|
@@ -17259,26 +17259,24 @@ class wd extends EventTarget {
|
|
|
17259
17259
|
}
|
|
17260
17260
|
async makeCall({ agentId: e }) {
|
|
17261
17261
|
if (this.room && this.room.state === "connected") return;
|
|
17262
|
-
if (this.isAppleDevice)
|
|
17262
|
+
if (this.updateStatus("connecting"), this.isAppleDevice)
|
|
17263
17263
|
try {
|
|
17264
17264
|
const n = new Audio(
|
|
17265
17265
|
"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAABAAEARKwAAIhYAQACABAAZGF0YQAAAAA="
|
|
17266
17266
|
);
|
|
17267
|
-
n.volume = 1e-3,
|
|
17268
|
-
|
|
17267
|
+
n.volume = 1e-3, n.play().then(() => {
|
|
17268
|
+
n.pause(), n.remove(), console.log("[LiveKit] iOS audio playback unlocked");
|
|
17269
|
+
}).catch(() => {
|
|
17270
|
+
n.remove();
|
|
17271
|
+
});
|
|
17269
17272
|
} catch (n) {
|
|
17270
17273
|
console.warn("[LiveKit] Failed to unlock iOS audio:", n);
|
|
17271
17274
|
}
|
|
17272
|
-
|
|
17273
|
-
|
|
17274
|
-
|
|
17275
|
-
|
|
17276
|
-
|
|
17277
|
-
}), console.log("Microphone permission granted");
|
|
17278
|
-
} catch (n) {
|
|
17279
|
-
console.warn("Microphone permission denied or not available:", n);
|
|
17280
|
-
}
|
|
17281
|
-
this.updateStatus("connecting"), this.error = null, this.isReady = !1, this.room && (await this.room.disconnect(), this.room = null);
|
|
17275
|
+
const t = navigator.mediaDevices.getUserMedia({
|
|
17276
|
+
audio: !0,
|
|
17277
|
+
video: !1
|
|
17278
|
+
}).then((n) => (console.log("Microphone permission granted"), n)).catch((n) => (console.warn("Microphone permission denied or not available:", n), null));
|
|
17279
|
+
this.error = null, this.isReady = !1, this.room && (await this.room.disconnect(), this.room = null);
|
|
17282
17280
|
try {
|
|
17283
17281
|
const n = new rr({
|
|
17284
17282
|
webAudioMix: !0
|
|
@@ -17314,51 +17312,61 @@ class wd extends EventTarget {
|
|
|
17314
17312
|
const { token: r, url: a, room_name: o, user_identity: c } = await s.json();
|
|
17315
17313
|
this.roomName = o, this.userIdentity = c, this.reconnectAttempts = 0, this.wasConnectedBeforeHidden = !1, await this.connectWithTimeout(n, a, r, 2e4);
|
|
17316
17314
|
try {
|
|
17317
|
-
|
|
17315
|
+
n.startAudio().then(() => {
|
|
17316
|
+
console.log("[LiveKit] Audio playback started");
|
|
17317
|
+
}).catch((l) => {
|
|
17318
|
+
console.warn("[LiveKit] Failed to start audio:", l);
|
|
17319
|
+
});
|
|
17318
17320
|
} catch (l) {
|
|
17319
17321
|
console.warn("[LiveKit] Failed to start audio:", l);
|
|
17320
17322
|
}
|
|
17321
|
-
this.updateStatus("connected"), this.isReady = !0,
|
|
17322
|
-
this.
|
|
17323
|
-
|
|
17324
|
-
|
|
17325
|
-
|
|
17326
|
-
|
|
17327
|
-
|
|
17328
|
-
|
|
17329
|
-
|
|
17330
|
-
|
|
17331
|
-
|
|
17332
|
-
|
|
17333
|
-
|
|
17334
|
-
|
|
17335
|
-
|
|
17336
|
-
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17340
|
-
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17344
|
-
|
|
17345
|
-
|
|
17346
|
-
|
|
17323
|
+
this.updateStatus("connected"), this.isReady = !0, this.scheduleTimer(async () => {
|
|
17324
|
+
if (this.isDestroyed || !this.room || this.room.state !== "connected") {
|
|
17325
|
+
t.then((d) => {
|
|
17326
|
+
d && d.getTracks().forEach((u) => u.stop());
|
|
17327
|
+
});
|
|
17328
|
+
return;
|
|
17329
|
+
}
|
|
17330
|
+
const l = await Promise.race([
|
|
17331
|
+
t,
|
|
17332
|
+
new Promise((d) => setTimeout(() => d(null), 1500))
|
|
17333
|
+
]);
|
|
17334
|
+
if (l)
|
|
17335
|
+
try {
|
|
17336
|
+
await n.localParticipant.setMicrophoneEnabled(!0, {
|
|
17337
|
+
echoCancellation: !0,
|
|
17338
|
+
noiseSuppression: !0,
|
|
17339
|
+
autoGainControl: !this.isAppleDevice
|
|
17340
|
+
}), this.microphoneEnabled = !0, this.dispatchEvent(new CustomEvent("microphone-enabled")), l.getTracks().forEach((d) => d.stop()), this.scheduleTimer(() => {
|
|
17341
|
+
if (!(this.isDestroyed || !this.room || this.room.state !== "connected"))
|
|
17342
|
+
try {
|
|
17343
|
+
const d = Array.from(n.localParticipant.audioTrackPublications.values()).find((u) => u.kind === "audio");
|
|
17344
|
+
if (d != null && d.track) {
|
|
17345
|
+
const u = d.track.mediaStreamTrack;
|
|
17346
|
+
u && this.dispatchEvent(
|
|
17347
|
+
new CustomEvent("local-audio-track", {
|
|
17348
|
+
detail: u
|
|
17349
|
+
})
|
|
17350
|
+
);
|
|
17347
17351
|
}
|
|
17348
|
-
|
|
17349
|
-
|
|
17350
|
-
|
|
17351
|
-
}
|
|
17352
|
-
|
|
17353
|
-
this.microphoneEnabled = !1, this.dispatchEvent(new CustomEvent("microphone-disabled"));
|
|
17354
|
-
|
|
17355
|
-
|
|
17352
|
+
} catch (d) {
|
|
17353
|
+
console.warn("[LiveKit] Error getting local audio track:", d);
|
|
17354
|
+
}
|
|
17355
|
+
}, 100);
|
|
17356
|
+
} catch (d) {
|
|
17357
|
+
console.warn("Could not enable microphone on connect:", d), this.microphoneEnabled = !1, this.dispatchEvent(new CustomEvent("microphone-disabled"));
|
|
17358
|
+
}
|
|
17359
|
+
else
|
|
17360
|
+
this.microphoneEnabled = !1, this.dispatchEvent(new CustomEvent("microphone-disabled"));
|
|
17361
|
+
}, 0), this.dispatchEvent(
|
|
17356
17362
|
new CustomEvent("room-connected", {
|
|
17357
17363
|
detail: { roomName: o, identity: c }
|
|
17358
17364
|
})
|
|
17359
17365
|
);
|
|
17360
17366
|
} catch (n) {
|
|
17361
|
-
t
|
|
17367
|
+
t.then((s) => {
|
|
17368
|
+
s && s.getTracks().forEach((r) => r.stop());
|
|
17369
|
+
}), this.error = `Connection failed: ${n instanceof Error ? n.message : String(n)}`, this.updateStatus("error"), this.isReady = !1, this.room = null, this.dispatchEvent(
|
|
17362
17370
|
new CustomEvent("error", {
|
|
17363
17371
|
detail: { error: this.error }
|
|
17364
17372
|
})
|
|
@@ -17603,7 +17611,7 @@ class Ad {
|
|
|
17603
17611
|
* Copyright 2010-2025 Three.js Authors
|
|
17604
17612
|
* SPDX-License-Identifier: MIT
|
|
17605
17613
|
*/
|
|
17606
|
-
const Rd = "182", h_ = 0, hh = 1, f_ = 2, za = 1, p_ = 2, Pr = 3,
|
|
17614
|
+
const Rd = "182", h_ = 0, hh = 1, f_ = 2, za = 1, p_ = 2, Pr = 3, Mi = 0, nn = 1, Si = 2, Ti = 0, Qs = 1, rl = 2, fh = 3, ph = 4, m_ = 5, us = 100, g_ = 101, v_ = 102, b_ = 103, __ = 104, y_ = 200, S_ = 201, x_ = 202, T_ = 203, al = 204, ol = 205, C_ = 206, E_ = 207, M_ = 208, w_ = 209, A_ = 210, R_ = 211, P_ = 212, k_ = 213, I_ = 214, cl = 0, ll = 1, dl = 2, ar = 3, ul = 4, hl = 5, fl = 6, pl = 7, nm = 0, D_ = 1, L_ = 2, ei = 0, im = 1, sm = 2, rm = 3, am = 4, om = 5, cm = 6, lm = 7, dm = 300, Ts = 301, or = 302, ml = 303, gl = 304, go = 306, vl = 1e3, xi = 1001, bl = 1002, Yt = 1003, N_ = 1004, aa = 1005, Qt = 1006, $o = 1007, ps = 1008, Mn = 1009, um = 1010, hm = 1011, jr = 1012, Pd = 1013, ri = 1014, Jn = 1015, wi = 1016, kd = 1017, Id = 1018, Xr = 1020, fm = 35902, pm = 35899, mm = 1021, gm = 1022, Vn = 1023, Ai = 1026, ms = 1027, vm = 1028, Dd = 1029, cr = 1030, Ld = 1031, Nd = 1033, Ga = 33776, Ha = 33777, Wa = 33778, qa = 33779, _l = 35840, yl = 35841, Sl = 35842, xl = 35843, Tl = 36196, Cl = 37492, El = 37496, Ml = 37488, wl = 37489, Al = 37490, Rl = 37491, Pl = 37808, kl = 37809, Il = 37810, Dl = 37811, Ll = 37812, Nl = 37813, Ul = 37814, Ol = 37815, Fl = 37816, Bl = 37817, Vl = 37818, zl = 37819, Gl = 37820, Hl = 37821, Wl = 36492, ql = 36494, jl = 36495, Xl = 36283, $l = 36284, Kl = 36285, Yl = 36286, U_ = 3200, O_ = 0, F_ = 1, Wi = "", Cn = "srgb", lr = "srgb-linear", so = "linear", ht = "srgb", Rs = 7680, mh = 519, B_ = 512, V_ = 513, z_ = 514, Ud = 515, G_ = 516, H_ = 517, Od = 518, W_ = 519, gh = 35044, vh = "300 es", Zn = 2e3, ro = 2001;
|
|
17607
17615
|
function bm(i) {
|
|
17608
17616
|
for (let e = i.length - 1; e >= 0; --e)
|
|
17609
17617
|
if (i[e] >= 65535) return !0;
|
|
@@ -19920,7 +19928,7 @@ function $_() {
|
|
|
19920
19928
|
*/
|
|
19921
19929
|
spaces: {},
|
|
19922
19930
|
convert: function(s, r, a) {
|
|
19923
|
-
return this.enabled === !1 || r === a || !r || !a || (this.spaces[r].transfer ===
|
|
19931
|
+
return this.enabled === !1 || r === a || !r || !a || (this.spaces[r].transfer === ht && (s.r = Ci(s.r), s.g = Ci(s.g), s.b = Ci(s.b)), this.spaces[r].primaries !== this.spaces[a].primaries && (s.applyMatrix3(this.spaces[r].toXYZ), s.applyMatrix3(this.spaces[a].fromXYZ)), this.spaces[a].transfer === ht && (s.r = er(s.r), s.g = er(s.g), s.b = er(s.b))), s;
|
|
19924
19932
|
},
|
|
19925
19933
|
workingToColorSpace: function(s, r) {
|
|
19926
19934
|
return this.convert(s, this.workingColorSpace, r);
|
|
@@ -19975,7 +19983,7 @@ function $_() {
|
|
|
19975
19983
|
[Cn]: {
|
|
19976
19984
|
primaries: e,
|
|
19977
19985
|
whitePoint: n,
|
|
19978
|
-
transfer:
|
|
19986
|
+
transfer: ht,
|
|
19979
19987
|
toXYZ: Sh,
|
|
19980
19988
|
fromXYZ: xh,
|
|
19981
19989
|
luminanceCoefficients: t,
|
|
@@ -19984,7 +19992,7 @@ function $_() {
|
|
|
19984
19992
|
}), i;
|
|
19985
19993
|
}
|
|
19986
19994
|
const Qe = /* @__PURE__ */ $_();
|
|
19987
|
-
function
|
|
19995
|
+
function Ci(i) {
|
|
19988
19996
|
return i < 0.04045 ? i * 0.0773993808 : Math.pow(i * 0.9478672986 + 0.0521327014, 2.4);
|
|
19989
19997
|
}
|
|
19990
19998
|
function er(i) {
|
|
@@ -20026,12 +20034,12 @@ class K_ {
|
|
|
20026
20034
|
n.drawImage(e, 0, 0, e.width, e.height);
|
|
20027
20035
|
const s = n.getImageData(0, 0, e.width, e.height), r = s.data;
|
|
20028
20036
|
for (let a = 0; a < r.length; a++)
|
|
20029
|
-
r[a] =
|
|
20037
|
+
r[a] = Ci(r[a] / 255) * 255;
|
|
20030
20038
|
return n.putImageData(s, 0, 0), t;
|
|
20031
20039
|
} else if (e.data) {
|
|
20032
20040
|
const t = e.data.slice(0);
|
|
20033
20041
|
for (let n = 0; n < t.length; n++)
|
|
20034
|
-
t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[n] = Math.floor(
|
|
20042
|
+
t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[n] = Math.floor(Ci(t[n] / 255) * 255) : t[n] = Ci(t[n]);
|
|
20035
20043
|
return {
|
|
20036
20044
|
data: t,
|
|
20037
20045
|
width: e.width,
|
|
@@ -20126,7 +20134,7 @@ class sn extends ur {
|
|
|
20126
20134
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
20127
20135
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
20128
20136
|
*/
|
|
20129
|
-
constructor(e = sn.DEFAULT_IMAGE, t = sn.DEFAULT_MAPPING, n =
|
|
20137
|
+
constructor(e = sn.DEFAULT_IMAGE, t = sn.DEFAULT_MAPPING, n = xi, s = xi, r = Qt, a = ps, o = Vn, c = Mn, l = sn.DEFAULT_ANISOTROPY, d = Wi) {
|
|
20130
20138
|
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: J_++ }), this.uuid = Zr(), this.name = "", this.source = new Fd(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = n, this.wrapT = s, this.magFilter = r, this.minFilter = a, this.anisotropy = l, this.format = o, this.internalFormat = null, this.type = c, this.offset = new st(0, 0), this.repeat = new st(1, 1), this.center = new st(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ze(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = d, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
|
|
20131
20139
|
}
|
|
20132
20140
|
/**
|
|
@@ -20279,7 +20287,7 @@ class sn extends ur {
|
|
|
20279
20287
|
case vl:
|
|
20280
20288
|
e.x = e.x - Math.floor(e.x);
|
|
20281
20289
|
break;
|
|
20282
|
-
case
|
|
20290
|
+
case xi:
|
|
20283
20291
|
e.x = e.x < 0 ? 0 : 1;
|
|
20284
20292
|
break;
|
|
20285
20293
|
case bl:
|
|
@@ -20291,7 +20299,7 @@ class sn extends ur {
|
|
|
20291
20299
|
case vl:
|
|
20292
20300
|
e.y = e.y - Math.floor(e.y);
|
|
20293
20301
|
break;
|
|
20294
|
-
case
|
|
20302
|
+
case xi:
|
|
20295
20303
|
e.y = e.y < 0 ? 0 : 1;
|
|
20296
20304
|
break;
|
|
20297
20305
|
case bl:
|
|
@@ -21013,7 +21021,7 @@ class Z_ extends ur {
|
|
|
21013
21021
|
this.dispatchEvent({ type: "dispose" });
|
|
21014
21022
|
}
|
|
21015
21023
|
}
|
|
21016
|
-
class
|
|
21024
|
+
class ti extends Z_ {
|
|
21017
21025
|
/**
|
|
21018
21026
|
* Constructs a new 3D render target.
|
|
21019
21027
|
*
|
|
@@ -21035,7 +21043,7 @@ class _m extends sn {
|
|
|
21035
21043
|
* @param {number} [depth=1] - The depth of the texture.
|
|
21036
21044
|
*/
|
|
21037
21045
|
constructor(e = null, t = 1, n = 1, s = 1) {
|
|
21038
|
-
super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: n, depth: s }, this.magFilter = Yt, this.minFilter = Yt, this.wrapR =
|
|
21046
|
+
super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: n, depth: s }, this.magFilter = Yt, this.minFilter = Yt, this.wrapR = xi, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.layerUpdates = /* @__PURE__ */ new Set();
|
|
21039
21047
|
}
|
|
21040
21048
|
/**
|
|
21041
21049
|
* Describes that a specific layer of the texture needs to be updated.
|
|
@@ -21066,7 +21074,7 @@ class Q_ extends sn {
|
|
|
21066
21074
|
* @param {number} [depth=1] - The depth of the texture.
|
|
21067
21075
|
*/
|
|
21068
21076
|
constructor(e = null, t = 1, n = 1, s = 1) {
|
|
21069
|
-
super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: n, depth: s }, this.magFilter = Yt, this.minFilter = Yt, this.wrapR =
|
|
21077
|
+
super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: n, depth: s }, this.magFilter = Yt, this.minFilter = Yt, this.wrapR = xi, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
21070
21078
|
}
|
|
21071
21079
|
}
|
|
21072
21080
|
class ea {
|
|
@@ -21100,7 +21108,7 @@ class ea {
|
|
|
21100
21108
|
setFromArray(e) {
|
|
21101
21109
|
this.makeEmpty();
|
|
21102
21110
|
for (let t = 0, n = e.length; t < n; t += 3)
|
|
21103
|
-
this.expandByPoint(
|
|
21111
|
+
this.expandByPoint(Pn.fromArray(e, t));
|
|
21104
21112
|
return this;
|
|
21105
21113
|
}
|
|
21106
21114
|
/**
|
|
@@ -21113,7 +21121,7 @@ class ea {
|
|
|
21113
21121
|
setFromBufferAttribute(e) {
|
|
21114
21122
|
this.makeEmpty();
|
|
21115
21123
|
for (let t = 0, n = e.count; t < n; t++)
|
|
21116
|
-
this.expandByPoint(
|
|
21124
|
+
this.expandByPoint(Pn.fromBufferAttribute(e, t));
|
|
21117
21125
|
return this;
|
|
21118
21126
|
}
|
|
21119
21127
|
/**
|
|
@@ -21138,7 +21146,7 @@ class ea {
|
|
|
21138
21146
|
* @return {Box3} A reference to this bounding box.
|
|
21139
21147
|
*/
|
|
21140
21148
|
setFromCenterAndSize(e, t) {
|
|
21141
|
-
const n =
|
|
21149
|
+
const n = Pn.copy(t).multiplyScalar(0.5);
|
|
21142
21150
|
return this.min.copy(e).sub(n), this.max.copy(e).add(n), this;
|
|
21143
21151
|
}
|
|
21144
21152
|
/**
|
|
@@ -21257,7 +21265,7 @@ class ea {
|
|
|
21257
21265
|
const r = n.getAttribute("position");
|
|
21258
21266
|
if (t === !0 && r !== void 0 && e.isInstancedMesh !== !0)
|
|
21259
21267
|
for (let a = 0, o = r.count; a < o; a++)
|
|
21260
|
-
e.isMesh === !0 ? e.getVertexPosition(a,
|
|
21268
|
+
e.isMesh === !0 ? e.getVertexPosition(a, Pn) : Pn.fromBufferAttribute(r, a), Pn.applyMatrix4(e.matrixWorld), this.expandByPoint(Pn);
|
|
21261
21269
|
else
|
|
21262
21270
|
e.boundingBox !== void 0 ? (e.boundingBox === null && e.computeBoundingBox(), oa.copy(e.boundingBox)) : (n.boundingBox === null && n.computeBoundingBox(), oa.copy(n.boundingBox)), oa.applyMatrix4(e.matrixWorld), this.union(oa);
|
|
21263
21271
|
}
|
|
@@ -21315,7 +21323,7 @@ class ea {
|
|
|
21315
21323
|
* @return {boolean} Whether the given bounding sphere intersects with this bounding box.
|
|
21316
21324
|
*/
|
|
21317
21325
|
intersectsSphere(e) {
|
|
21318
|
-
return this.clampPoint(e.center,
|
|
21326
|
+
return this.clampPoint(e.center, Pn), Pn.distanceToSquared(e.center) <= e.radius * e.radius;
|
|
21319
21327
|
}
|
|
21320
21328
|
/**
|
|
21321
21329
|
* Returns `true` if the given plane intersects with this bounding box.
|
|
@@ -21386,7 +21394,7 @@ class ea {
|
|
|
21386
21394
|
* @return {number} The euclidean distance.
|
|
21387
21395
|
*/
|
|
21388
21396
|
distanceToPoint(e) {
|
|
21389
|
-
return this.clampPoint(e,
|
|
21397
|
+
return this.clampPoint(e, Pn).distanceTo(e);
|
|
21390
21398
|
}
|
|
21391
21399
|
/**
|
|
21392
21400
|
* Returns a bounding sphere that encloses this bounding box.
|
|
@@ -21395,7 +21403,7 @@ class ea {
|
|
|
21395
21403
|
* @return {Sphere} The bounding sphere that encloses this bounding box.
|
|
21396
21404
|
*/
|
|
21397
21405
|
getBoundingSphere(e) {
|
|
21398
|
-
return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center), e.radius = this.getSize(
|
|
21406
|
+
return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center), e.radius = this.getSize(Pn).length() * 0.5), e;
|
|
21399
21407
|
}
|
|
21400
21408
|
/**
|
|
21401
21409
|
* Computes the intersection of this bounding box and the given one, setting the upper
|
|
@@ -21427,7 +21435,7 @@ class ea {
|
|
|
21427
21435
|
* @return {Box3} A reference to this bounding box.
|
|
21428
21436
|
*/
|
|
21429
21437
|
applyMatrix4(e) {
|
|
21430
|
-
return this.isEmpty() ? this : (
|
|
21438
|
+
return this.isEmpty() ? this : (ci[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), ci[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), ci[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), ci[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), ci[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), ci[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), ci[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), ci[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(ci), this);
|
|
21431
21439
|
}
|
|
21432
21440
|
/**
|
|
21433
21441
|
* Adds the given offset to both the upper and lower bounds of this bounding box,
|
|
@@ -21469,7 +21477,7 @@ class ea {
|
|
|
21469
21477
|
return this.min.fromArray(e.min), this.max.fromArray(e.max), this;
|
|
21470
21478
|
}
|
|
21471
21479
|
}
|
|
21472
|
-
const
|
|
21480
|
+
const ci = [
|
|
21473
21481
|
/* @__PURE__ */ new B(),
|
|
21474
21482
|
/* @__PURE__ */ new B(),
|
|
21475
21483
|
/* @__PURE__ */ new B(),
|
|
@@ -21478,7 +21486,7 @@ const oi = [
|
|
|
21478
21486
|
/* @__PURE__ */ new B(),
|
|
21479
21487
|
/* @__PURE__ */ new B(),
|
|
21480
21488
|
/* @__PURE__ */ new B()
|
|
21481
|
-
],
|
|
21489
|
+
], Pn = /* @__PURE__ */ new B(), oa = /* @__PURE__ */ new ea(), ks = /* @__PURE__ */ new B(), Is = /* @__PURE__ */ new B(), Ds = /* @__PURE__ */ new B(), Li = /* @__PURE__ */ new B(), Ni = /* @__PURE__ */ new B(), ns = /* @__PURE__ */ new B(), xr = /* @__PURE__ */ new B(), ca = /* @__PURE__ */ new B(), la = /* @__PURE__ */ new B(), is = /* @__PURE__ */ new B();
|
|
21482
21490
|
function tc(i, e, t, n, s) {
|
|
21483
21491
|
for (let r = 0, a = i.length - 3; r <= a; r += 3) {
|
|
21484
21492
|
is.fromArray(i, r);
|
|
@@ -21708,7 +21716,7 @@ class Bd {
|
|
|
21708
21716
|
return this.radius = e.radius, this.center.fromArray(e.center), this;
|
|
21709
21717
|
}
|
|
21710
21718
|
}
|
|
21711
|
-
const
|
|
21719
|
+
const li = /* @__PURE__ */ new B(), ic = /* @__PURE__ */ new B(), da = /* @__PURE__ */ new B(), Ui = /* @__PURE__ */ new B(), sc = /* @__PURE__ */ new B(), ua = /* @__PURE__ */ new B(), rc = /* @__PURE__ */ new B();
|
|
21712
21720
|
class ty {
|
|
21713
21721
|
/**
|
|
21714
21722
|
* Constructs a new ray.
|
|
@@ -21764,7 +21772,7 @@ class ty {
|
|
|
21764
21772
|
* @return {Ray} A reference to this ray.
|
|
21765
21773
|
*/
|
|
21766
21774
|
recast(e) {
|
|
21767
|
-
return this.origin.copy(this.at(e,
|
|
21775
|
+
return this.origin.copy(this.at(e, li)), this;
|
|
21768
21776
|
}
|
|
21769
21777
|
/**
|
|
21770
21778
|
* Returns the point along this ray that is closest to the given point.
|
|
@@ -21794,8 +21802,8 @@ class ty {
|
|
|
21794
21802
|
* @return {number} The squared distance.
|
|
21795
21803
|
*/
|
|
21796
21804
|
distanceSqToPoint(e) {
|
|
21797
|
-
const t =
|
|
21798
|
-
return t < 0 ? this.origin.distanceToSquared(e) : (
|
|
21805
|
+
const t = li.subVectors(e, this.origin).dot(this.direction);
|
|
21806
|
+
return t < 0 ? this.origin.distanceToSquared(e) : (li.copy(this.origin).addScaledVector(this.direction, t), li.distanceToSquared(e));
|
|
21799
21807
|
}
|
|
21800
21808
|
/**
|
|
21801
21809
|
* Returns the squared distance between this ray and the given line segment.
|
|
@@ -21835,8 +21843,8 @@ class ty {
|
|
|
21835
21843
|
* @return {?Vector3} The intersection point.
|
|
21836
21844
|
*/
|
|
21837
21845
|
intersectSphere(e, t) {
|
|
21838
|
-
|
|
21839
|
-
const n =
|
|
21846
|
+
li.subVectors(e.center, this.origin);
|
|
21847
|
+
const n = li.dot(this.direction), s = li.dot(li) - n * n, r = e.radius * e.radius;
|
|
21840
21848
|
if (s > r) return null;
|
|
21841
21849
|
const a = Math.sqrt(r - s), o = n - a, c = n + a;
|
|
21842
21850
|
return c < 0 ? null : o < 0 ? this.at(c, t) : this.at(o, t);
|
|
@@ -21906,7 +21914,7 @@ class ty {
|
|
|
21906
21914
|
* @return {boolean} Whether this ray intersects with the given box or not.
|
|
21907
21915
|
*/
|
|
21908
21916
|
intersectsBox(e) {
|
|
21909
|
-
return this.intersectBox(e,
|
|
21917
|
+
return this.intersectBox(e, li) !== null;
|
|
21910
21918
|
}
|
|
21911
21919
|
/**
|
|
21912
21920
|
* Intersects this ray with the given triangle, returning the intersection
|
|
@@ -22585,9 +22593,9 @@ class Vt {
|
|
|
22585
22593
|
return n.set(1, 1, 1), t.identity(), this;
|
|
22586
22594
|
let r = Ls.set(s[0], s[1], s[2]).length();
|
|
22587
22595
|
const a = Ls.set(s[4], s[5], s[6]).length(), o = Ls.set(s[8], s[9], s[10]).length();
|
|
22588
|
-
this.determinant() < 0 && (r = -r),
|
|
22596
|
+
this.determinant() < 0 && (r = -r), kn.copy(this);
|
|
22589
22597
|
const l = 1 / r, d = 1 / a, u = 1 / o;
|
|
22590
|
-
return
|
|
22598
|
+
return kn.elements[0] *= l, kn.elements[1] *= l, kn.elements[2] *= l, kn.elements[4] *= d, kn.elements[5] *= d, kn.elements[6] *= d, kn.elements[8] *= u, kn.elements[9] *= u, kn.elements[10] *= u, t.setFromRotationMatrix(kn), n.x = r, n.y = a, n.z = o, this;
|
|
22591
22599
|
}
|
|
22592
22600
|
/**
|
|
22593
22601
|
* Creates a perspective projection matrix. This is used internally by
|
|
@@ -22603,12 +22611,12 @@ class Vt {
|
|
|
22603
22611
|
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
22604
22612
|
* @return {Matrix4} A reference to this matrix.
|
|
22605
22613
|
*/
|
|
22606
|
-
makePerspective(e, t, n, s, r, a, o =
|
|
22614
|
+
makePerspective(e, t, n, s, r, a, o = Zn, c = !1) {
|
|
22607
22615
|
const l = this.elements, d = 2 * r / (t - e), u = 2 * r / (n - s), h = (t + e) / (t - e), f = (n + s) / (n - s);
|
|
22608
22616
|
let g, v;
|
|
22609
22617
|
if (c)
|
|
22610
22618
|
g = r / (a - r), v = a * r / (a - r);
|
|
22611
|
-
else if (o ===
|
|
22619
|
+
else if (o === Zn)
|
|
22612
22620
|
g = -(a + r) / (a - r), v = -2 * a * r / (a - r);
|
|
22613
22621
|
else if (o === ro)
|
|
22614
22622
|
g = -a / (a - r), v = -a * r / (a - r);
|
|
@@ -22630,12 +22638,12 @@ class Vt {
|
|
|
22630
22638
|
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
22631
22639
|
* @return {Matrix4} A reference to this matrix.
|
|
22632
22640
|
*/
|
|
22633
|
-
makeOrthographic(e, t, n, s, r, a, o =
|
|
22641
|
+
makeOrthographic(e, t, n, s, r, a, o = Zn, c = !1) {
|
|
22634
22642
|
const l = this.elements, d = 2 / (t - e), u = 2 / (n - s), h = -(t + e) / (t - e), f = -(n + s) / (n - s);
|
|
22635
22643
|
let g, v;
|
|
22636
22644
|
if (c)
|
|
22637
22645
|
g = 1 / (a - r), v = a / (a - r);
|
|
22638
|
-
else if (o ===
|
|
22646
|
+
else if (o === Zn)
|
|
22639
22647
|
g = -2 / (a - r), v = -(a + r) / (a - r);
|
|
22640
22648
|
else if (o === ro)
|
|
22641
22649
|
g = -1 / (a - r), v = -r / (a - r);
|
|
@@ -22680,8 +22688,8 @@ class Vt {
|
|
|
22680
22688
|
return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e[t + 9] = n[9], e[t + 10] = n[10], e[t + 11] = n[11], e[t + 12] = n[12], e[t + 13] = n[13], e[t + 14] = n[14], e[t + 15] = n[15], e;
|
|
22681
22689
|
}
|
|
22682
22690
|
}
|
|
22683
|
-
const Ls = /* @__PURE__ */ new B(),
|
|
22684
|
-
class
|
|
22691
|
+
const Ls = /* @__PURE__ */ new B(), kn = /* @__PURE__ */ new Vt(), ny = /* @__PURE__ */ new B(0, 0, 0), iy = /* @__PURE__ */ new B(1, 1, 1), Oi = /* @__PURE__ */ new B(), ha = /* @__PURE__ */ new B(), gn = /* @__PURE__ */ new B(), Th = /* @__PURE__ */ new Vt(), Ch = /* @__PURE__ */ new Qr();
|
|
22692
|
+
class Ri {
|
|
22685
22693
|
/**
|
|
22686
22694
|
* Constructs a new euler instance.
|
|
22687
22695
|
*
|
|
@@ -22690,7 +22698,7 @@ class Ai {
|
|
|
22690
22698
|
* @param {number} [z=0] - The angle of the z axis in radians.
|
|
22691
22699
|
* @param {string} [order=Euler.DEFAULT_ORDER] - A string representing the order that the rotations are applied.
|
|
22692
22700
|
*/
|
|
22693
|
-
constructor(e = 0, t = 0, n = 0, s =
|
|
22701
|
+
constructor(e = 0, t = 0, n = 0, s = Ri.DEFAULT_ORDER) {
|
|
22694
22702
|
this.isEuler = !0, this._x = e, this._y = t, this._z = n, this._order = s;
|
|
22695
22703
|
}
|
|
22696
22704
|
/**
|
|
@@ -22878,7 +22886,7 @@ class Ai {
|
|
|
22878
22886
|
yield this._x, yield this._y, yield this._z, yield this._order;
|
|
22879
22887
|
}
|
|
22880
22888
|
}
|
|
22881
|
-
|
|
22889
|
+
Ri.DEFAULT_ORDER = "XYZ";
|
|
22882
22890
|
class ym {
|
|
22883
22891
|
/**
|
|
22884
22892
|
* Constructs a new layers instance, with membership
|
|
@@ -22952,14 +22960,14 @@ class ym {
|
|
|
22952
22960
|
}
|
|
22953
22961
|
}
|
|
22954
22962
|
let sy = 0;
|
|
22955
|
-
const Eh = /* @__PURE__ */ new B(), Ns = /* @__PURE__ */ new Qr(),
|
|
22963
|
+
const Eh = /* @__PURE__ */ new B(), Ns = /* @__PURE__ */ new Qr(), di = /* @__PURE__ */ new Vt(), fa = /* @__PURE__ */ new B(), Cr = /* @__PURE__ */ new B(), ry = /* @__PURE__ */ new B(), ay = /* @__PURE__ */ new Qr(), Mh = /* @__PURE__ */ new B(1, 0, 0), wh = /* @__PURE__ */ new B(0, 1, 0), Ah = /* @__PURE__ */ new B(0, 0, 1), Rh = { type: "added" }, oy = { type: "removed" }, Us = { type: "childadded", child: null }, ac = { type: "childremoved", child: null };
|
|
22956
22964
|
class Sn extends ur {
|
|
22957
22965
|
/**
|
|
22958
22966
|
* Constructs a new 3D object.
|
|
22959
22967
|
*/
|
|
22960
22968
|
constructor() {
|
|
22961
22969
|
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: sy++ }), this.uuid = Zr(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Sn.DEFAULT_UP.clone();
|
|
22962
|
-
const e = new B(), t = new
|
|
22970
|
+
const e = new B(), t = new Ri(), n = new Qr(), s = new B(1, 1, 1);
|
|
22963
22971
|
function r() {
|
|
22964
22972
|
n.setFromEuler(t, !1);
|
|
22965
22973
|
}
|
|
@@ -23236,7 +23244,7 @@ class Sn extends ur {
|
|
|
23236
23244
|
* @return {Vector3} The converted vector.
|
|
23237
23245
|
*/
|
|
23238
23246
|
worldToLocal(e) {
|
|
23239
|
-
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(
|
|
23247
|
+
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(di.copy(this.matrixWorld).invert());
|
|
23240
23248
|
}
|
|
23241
23249
|
/**
|
|
23242
23250
|
* Rotates the object to face a point in world space.
|
|
@@ -23250,7 +23258,7 @@ class Sn extends ur {
|
|
|
23250
23258
|
lookAt(e, t, n) {
|
|
23251
23259
|
e.isVector3 ? fa.copy(e) : fa.set(e, t, n);
|
|
23252
23260
|
const s = this.parent;
|
|
23253
|
-
this.updateWorldMatrix(!0, !1), Cr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ?
|
|
23261
|
+
this.updateWorldMatrix(!0, !1), Cr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? di.lookAt(Cr, fa, this.up) : di.lookAt(fa, Cr, this.up), this.quaternion.setFromRotationMatrix(di), s && (di.extractRotation(s.matrixWorld), Ns.setFromRotationMatrix(di), this.quaternion.premultiply(Ns.invert()));
|
|
23254
23262
|
}
|
|
23255
23263
|
/**
|
|
23256
23264
|
* Adds the given 3D object as a child to this 3D object. An arbitrary number of
|
|
@@ -23319,7 +23327,7 @@ class Sn extends ur {
|
|
|
23319
23327
|
* @return {Object3D} A reference to this instance.
|
|
23320
23328
|
*/
|
|
23321
23329
|
attach(e) {
|
|
23322
|
-
return this.updateWorldMatrix(!0, !1),
|
|
23330
|
+
return this.updateWorldMatrix(!0, !1), di.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), di.multiply(e.parent.matrixWorld)), e.applyMatrix4(di), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Rh), Us.child = e, this.dispatchEvent(Us), Us.child = null, this;
|
|
23323
23331
|
}
|
|
23324
23332
|
/**
|
|
23325
23333
|
* Searches through the 3D object and its children, starting with the 3D object
|
|
@@ -23610,8 +23618,8 @@ class Sn extends ur {
|
|
|
23610
23618
|
Sn.DEFAULT_UP = /* @__PURE__ */ new B(0, 1, 0);
|
|
23611
23619
|
Sn.DEFAULT_MATRIX_AUTO_UPDATE = !0;
|
|
23612
23620
|
Sn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
|
|
23613
|
-
const
|
|
23614
|
-
class
|
|
23621
|
+
const In = /* @__PURE__ */ new B(), ui = /* @__PURE__ */ new B(), oc = /* @__PURE__ */ new B(), hi = /* @__PURE__ */ new B(), Os = /* @__PURE__ */ new B(), Fs = /* @__PURE__ */ new B(), Ph = /* @__PURE__ */ new B(), cc = /* @__PURE__ */ new B(), lc = /* @__PURE__ */ new B(), dc = /* @__PURE__ */ new B(), uc = /* @__PURE__ */ new Lt(), hc = /* @__PURE__ */ new Lt(), fc = /* @__PURE__ */ new Lt();
|
|
23622
|
+
class Fn {
|
|
23615
23623
|
/**
|
|
23616
23624
|
* Constructs a new triangle.
|
|
23617
23625
|
*
|
|
@@ -23632,7 +23640,7 @@ class On {
|
|
|
23632
23640
|
* @return {Vector3} The triangle's normal.
|
|
23633
23641
|
*/
|
|
23634
23642
|
static getNormal(e, t, n, s) {
|
|
23635
|
-
s.subVectors(n, t),
|
|
23643
|
+
s.subVectors(n, t), In.subVectors(e, t), s.cross(In);
|
|
23636
23644
|
const r = s.lengthSq();
|
|
23637
23645
|
return r > 0 ? s.multiplyScalar(1 / Math.sqrt(r)) : s.set(0, 0, 0);
|
|
23638
23646
|
}
|
|
@@ -23648,8 +23656,8 @@ class On {
|
|
|
23648
23656
|
* @return {?Vector3} The barycentric coordinates for the given point
|
|
23649
23657
|
*/
|
|
23650
23658
|
static getBarycoord(e, t, n, s, r) {
|
|
23651
|
-
|
|
23652
|
-
const a =
|
|
23659
|
+
In.subVectors(s, t), ui.subVectors(n, t), oc.subVectors(e, t);
|
|
23660
|
+
const a = In.dot(In), o = In.dot(ui), c = In.dot(oc), l = ui.dot(ui), d = ui.dot(oc), u = a * l - o * o;
|
|
23653
23661
|
if (u === 0)
|
|
23654
23662
|
return r.set(0, 0, 0), null;
|
|
23655
23663
|
const h = 1 / u, f = (l * c - o * d) * h, g = (a * d - o * c) * h;
|
|
@@ -23667,7 +23675,7 @@ class On {
|
|
|
23667
23675
|
* triangle, lies within the triangle or not.
|
|
23668
23676
|
*/
|
|
23669
23677
|
static containsPoint(e, t, n, s) {
|
|
23670
|
-
return this.getBarycoord(e, t, n, s,
|
|
23678
|
+
return this.getBarycoord(e, t, n, s, hi) === null ? !1 : hi.x >= 0 && hi.y >= 0 && hi.x + hi.y <= 1;
|
|
23671
23679
|
}
|
|
23672
23680
|
/**
|
|
23673
23681
|
* Computes the value barycentrically interpolated for the given point on the
|
|
@@ -23684,7 +23692,7 @@ class On {
|
|
|
23684
23692
|
* @return {?Vector3} The interpolated value.
|
|
23685
23693
|
*/
|
|
23686
23694
|
static getInterpolation(e, t, n, s, r, a, o, c) {
|
|
23687
|
-
return this.getBarycoord(e, t, n, s,
|
|
23695
|
+
return this.getBarycoord(e, t, n, s, hi) === null ? (c.x = 0, c.y = 0, "z" in c && (c.z = 0), "w" in c && (c.w = 0), null) : (c.setScalar(0), c.addScaledVector(r, hi.x), c.addScaledVector(a, hi.y), c.addScaledVector(o, hi.z), c);
|
|
23688
23696
|
}
|
|
23689
23697
|
/**
|
|
23690
23698
|
* Computes the value barycentrically interpolated for the given attribute and indices.
|
|
@@ -23710,7 +23718,7 @@ class On {
|
|
|
23710
23718
|
* @return {boolean} Whether the triangle is oriented towards the given direction or not.
|
|
23711
23719
|
*/
|
|
23712
23720
|
static isFrontFacing(e, t, n, s) {
|
|
23713
|
-
return
|
|
23721
|
+
return In.subVectors(n, t), ui.subVectors(e, t), In.cross(ui).dot(s) < 0;
|
|
23714
23722
|
}
|
|
23715
23723
|
/**
|
|
23716
23724
|
* Sets the triangle's vertices by copying the given values.
|
|
@@ -23770,7 +23778,7 @@ class On {
|
|
|
23770
23778
|
* @return {number} The triangle's area.
|
|
23771
23779
|
*/
|
|
23772
23780
|
getArea() {
|
|
23773
|
-
return
|
|
23781
|
+
return In.subVectors(this.c, this.b), ui.subVectors(this.a, this.b), In.cross(ui).length() * 0.5;
|
|
23774
23782
|
}
|
|
23775
23783
|
/**
|
|
23776
23784
|
* Computes the midpoint of the triangle.
|
|
@@ -23788,7 +23796,7 @@ class On {
|
|
|
23788
23796
|
* @return {Vector3} The triangle's normal.
|
|
23789
23797
|
*/
|
|
23790
23798
|
getNormal(e) {
|
|
23791
|
-
return
|
|
23799
|
+
return Fn.getNormal(this.a, this.b, this.c, e);
|
|
23792
23800
|
}
|
|
23793
23801
|
/**
|
|
23794
23802
|
* Computes a plane the triangle lies within.
|
|
@@ -23808,7 +23816,7 @@ class On {
|
|
|
23808
23816
|
* @return {?Vector3} The barycentric coordinates for the given point
|
|
23809
23817
|
*/
|
|
23810
23818
|
getBarycoord(e, t) {
|
|
23811
|
-
return
|
|
23819
|
+
return Fn.getBarycoord(e, this.a, this.b, this.c, t);
|
|
23812
23820
|
}
|
|
23813
23821
|
/**
|
|
23814
23822
|
* Computes the value barycentrically interpolated for the given point on the
|
|
@@ -23822,7 +23830,7 @@ class On {
|
|
|
23822
23830
|
* @return {?Vector3} The interpolated value.
|
|
23823
23831
|
*/
|
|
23824
23832
|
getInterpolation(e, t, n, s, r) {
|
|
23825
|
-
return
|
|
23833
|
+
return Fn.getInterpolation(e, this.a, this.b, this.c, t, n, s, r);
|
|
23826
23834
|
}
|
|
23827
23835
|
/**
|
|
23828
23836
|
* Returns `true` if the given point, when projected onto the plane of the
|
|
@@ -23833,7 +23841,7 @@ class On {
|
|
|
23833
23841
|
* triangle, lies within the triangle or not.
|
|
23834
23842
|
*/
|
|
23835
23843
|
containsPoint(e) {
|
|
23836
|
-
return
|
|
23844
|
+
return Fn.containsPoint(e, this.a, this.b, this.c);
|
|
23837
23845
|
}
|
|
23838
23846
|
/**
|
|
23839
23847
|
* Returns `true` if the triangle is oriented towards the given direction.
|
|
@@ -23842,7 +23850,7 @@ class On {
|
|
|
23842
23850
|
* @return {boolean} Whether the triangle is oriented towards the given direction or not.
|
|
23843
23851
|
*/
|
|
23844
23852
|
isFrontFacing(e) {
|
|
23845
|
-
return
|
|
23853
|
+
return Fn.isFrontFacing(this.a, this.b, this.c, e);
|
|
23846
23854
|
}
|
|
23847
23855
|
/**
|
|
23848
23856
|
* Returns `true` if this triangle intersects with the given box.
|
|
@@ -24238,7 +24246,7 @@ class Je {
|
|
|
24238
24246
|
* @return {Color} A reference to this color.
|
|
24239
24247
|
*/
|
|
24240
24248
|
copySRGBToLinear(e) {
|
|
24241
|
-
return this.r =
|
|
24249
|
+
return this.r = Ci(e.r), this.g = Ci(e.g), this.b = Ci(e.b), this;
|
|
24242
24250
|
}
|
|
24243
24251
|
/**
|
|
24244
24252
|
* Copies the given color into this color, and then converts this color from
|
|
@@ -24526,7 +24534,7 @@ class vo extends ur {
|
|
|
24526
24534
|
* Constructs a new material.
|
|
24527
24535
|
*/
|
|
24528
24536
|
constructor() {
|
|
24529
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: cy++ }), this.uuid = Zr(), this.name = "", this.type = "Material", this.blending = Qs, this.side =
|
|
24537
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: cy++ }), this.uuid = Zr(), this.name = "", this.type = "Material", this.blending = Qs, this.side = Mi, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = al, this.blendDst = ol, this.blendEquation = us, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Je(0, 0, 0), this.blendAlpha = 0, this.depthFunc = ar, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = mh, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Rs, this.stencilZFail = Rs, this.stencilZPass = Rs, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
24530
24538
|
}
|
|
24531
24539
|
/**
|
|
24532
24540
|
* Sets the alpha value to be used when running an alpha test. The material
|
|
@@ -24625,7 +24633,7 @@ class vo extends ur {
|
|
|
24625
24633
|
generator: "Material.toJSON"
|
|
24626
24634
|
}
|
|
24627
24635
|
};
|
|
24628
|
-
n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(e).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(e).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(e).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(e).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(e).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== Qs && (n.blending = this.blending), this.side !==
|
|
24636
|
+
n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(e).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(e).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(e).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(e).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(e).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== Qs && (n.blending = this.blending), this.side !== Mi && (n.side = this.side), this.vertexColors === !0 && (n.vertexColors = !0), this.opacity < 1 && (n.opacity = this.opacity), this.transparent === !0 && (n.transparent = !0), this.blendSrc !== al && (n.blendSrc = this.blendSrc), this.blendDst !== ol && (n.blendDst = this.blendDst), this.blendEquation !== us && (n.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (n.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (n.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (n.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (n.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (n.blendAlpha = this.blendAlpha), this.depthFunc !== ar && (n.depthFunc = this.depthFunc), this.depthTest === !1 && (n.depthTest = this.depthTest), this.depthWrite === !1 && (n.depthWrite = this.depthWrite), this.colorWrite === !1 && (n.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (n.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== mh && (n.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (n.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (n.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Rs && (n.stencilFail = this.stencilFail), this.stencilZFail !== Rs && (n.stencilZFail = this.stencilZFail), this.stencilZPass !== Rs && (n.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (n.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (n.rotation = this.rotation), this.polygonOffset === !0 && (n.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (n.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (n.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (n.linewidth = this.linewidth), this.dashSize !== void 0 && (n.dashSize = this.dashSize), this.gapSize !== void 0 && (n.gapSize = this.gapSize), this.scale !== void 0 && (n.scale = this.scale), this.dithering === !0 && (n.dithering = !0), this.alphaTest > 0 && (n.alphaTest = this.alphaTest), this.alphaHash === !0 && (n.alphaHash = !0), this.alphaToCoverage === !0 && (n.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (n.premultipliedAlpha = !0), this.forceSinglePass === !0 && (n.forceSinglePass = !0), this.allowOverride === !1 && (n.allowOverride = !1), this.wireframe === !0 && (n.wireframe = !0), this.wireframeLinewidth > 1 && (n.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (n.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (n.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (n.flatShading = !0), this.visible === !1 && (n.visible = !1), this.toneMapped === !1 && (n.toneMapped = !1), this.fog === !1 && (n.fog = !1), Object.keys(this.userData).length > 0 && (n.userData = this.userData);
|
|
24629
24637
|
function s(r) {
|
|
24630
24638
|
const a = [];
|
|
24631
24639
|
for (const o in r) {
|
|
@@ -24698,7 +24706,7 @@ class xm extends vo {
|
|
|
24698
24706
|
* by {@link Color#set}.
|
|
24699
24707
|
*/
|
|
24700
24708
|
constructor(e) {
|
|
24701
|
-
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new Je(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new
|
|
24709
|
+
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new Je(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new Ri(), this.combine = nm, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
|
|
24702
24710
|
}
|
|
24703
24711
|
copy(e) {
|
|
24704
24712
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
|
|
@@ -24706,7 +24714,7 @@ class xm extends vo {
|
|
|
24706
24714
|
}
|
|
24707
24715
|
const Ot = /* @__PURE__ */ new B(), ma = /* @__PURE__ */ new st();
|
|
24708
24716
|
let ly = 0;
|
|
24709
|
-
class
|
|
24717
|
+
class ni {
|
|
24710
24718
|
/**
|
|
24711
24719
|
* Constructs a new buffer attribute.
|
|
24712
24720
|
*
|
|
@@ -24717,7 +24725,7 @@ class ti {
|
|
|
24717
24725
|
constructor(e, t, n = !1) {
|
|
24718
24726
|
if (Array.isArray(e))
|
|
24719
24727
|
throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
|
|
24720
|
-
this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: ly++ }), this.name = "", this.array = e, this.itemSize = t, this.count = e !== void 0 ? e.length / t : 0, this.normalized = n, this.usage = gh, this.updateRanges = [], this.gpuType =
|
|
24728
|
+
this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: ly++ }), this.name = "", this.array = e, this.itemSize = t, this.count = e !== void 0 ? e.length / t : 0, this.normalized = n, this.usage = gh, this.updateRanges = [], this.gpuType = Jn, this.version = 0;
|
|
24721
24729
|
}
|
|
24722
24730
|
/**
|
|
24723
24731
|
* A callback function that is executed after the renderer has transferred the attribute
|
|
@@ -25028,7 +25036,7 @@ class ti {
|
|
|
25028
25036
|
return this.name !== "" && (e.name = this.name), this.usage !== gh && (e.usage = this.usage), e;
|
|
25029
25037
|
}
|
|
25030
25038
|
}
|
|
25031
|
-
class Tm extends
|
|
25039
|
+
class Tm extends ni {
|
|
25032
25040
|
/**
|
|
25033
25041
|
* Constructs a new buffer attribute.
|
|
25034
25042
|
*
|
|
@@ -25040,7 +25048,7 @@ class Tm extends ti {
|
|
|
25040
25048
|
super(new Uint16Array(e), t, n);
|
|
25041
25049
|
}
|
|
25042
25050
|
}
|
|
25043
|
-
class Cm extends
|
|
25051
|
+
class Cm extends ni {
|
|
25044
25052
|
/**
|
|
25045
25053
|
* Constructs a new buffer attribute.
|
|
25046
25054
|
*
|
|
@@ -25052,7 +25060,7 @@ class Cm extends ti {
|
|
|
25052
25060
|
super(new Uint32Array(e), t, n);
|
|
25053
25061
|
}
|
|
25054
25062
|
}
|
|
25055
|
-
class rn extends
|
|
25063
|
+
class rn extends ni {
|
|
25056
25064
|
/**
|
|
25057
25065
|
* Constructs a new buffer attribute.
|
|
25058
25066
|
*
|
|
@@ -25066,7 +25074,7 @@ class rn extends ti {
|
|
|
25066
25074
|
}
|
|
25067
25075
|
let dy = 0;
|
|
25068
25076
|
const Tn = /* @__PURE__ */ new Vt(), mc = /* @__PURE__ */ new Sn(), Bs = /* @__PURE__ */ new B(), vn = /* @__PURE__ */ new ea(), Er = /* @__PURE__ */ new ea(), qt = /* @__PURE__ */ new B();
|
|
25069
|
-
class
|
|
25077
|
+
class Hn extends ur {
|
|
25070
25078
|
/**
|
|
25071
25079
|
* Constructs a new geometry.
|
|
25072
25080
|
*/
|
|
@@ -25382,7 +25390,7 @@ class Gn extends ur {
|
|
|
25382
25390
|
return;
|
|
25383
25391
|
}
|
|
25384
25392
|
const n = t.position, s = t.normal, r = t.uv;
|
|
25385
|
-
this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new
|
|
25393
|
+
this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new ni(new Float32Array(4 * n.count), 4));
|
|
25386
25394
|
const a = this.getAttribute("tangent"), o = [], c = [];
|
|
25387
25395
|
for (let k = 0; k < n.count; k++)
|
|
25388
25396
|
o[k] = new B(), c[k] = new B();
|
|
@@ -25431,7 +25439,7 @@ class Gn extends ur {
|
|
|
25431
25439
|
if (t !== void 0) {
|
|
25432
25440
|
let n = this.getAttribute("normal");
|
|
25433
25441
|
if (n === void 0)
|
|
25434
|
-
n = new
|
|
25442
|
+
n = new ni(new Float32Array(t.count * 3), 3), this.setAttribute("normal", n);
|
|
25435
25443
|
else
|
|
25436
25444
|
for (let h = 0, f = n.count; h < f; h++)
|
|
25437
25445
|
n.setXYZ(h, 0, 0, 0);
|
|
@@ -25471,11 +25479,11 @@ class Gn extends ur {
|
|
|
25471
25479
|
for (let p = 0; p < d; p++)
|
|
25472
25480
|
h[g++] = l[f++];
|
|
25473
25481
|
}
|
|
25474
|
-
return new
|
|
25482
|
+
return new ni(h, d, u);
|
|
25475
25483
|
}
|
|
25476
25484
|
if (this.index === null)
|
|
25477
25485
|
return Oe("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
|
|
25478
|
-
const t = new
|
|
25486
|
+
const t = new Hn(), n = this.index.array, s = this.attributes;
|
|
25479
25487
|
for (const o in s) {
|
|
25480
25488
|
const c = s[o], l = e(c, n);
|
|
25481
25489
|
t.setAttribute(o, l);
|
|
@@ -25597,14 +25605,14 @@ class Gn extends ur {
|
|
|
25597
25605
|
}
|
|
25598
25606
|
}
|
|
25599
25607
|
const kh = /* @__PURE__ */ new Vt(), ss = /* @__PURE__ */ new ty(), ga = /* @__PURE__ */ new Bd(), Ih = /* @__PURE__ */ new B(), va = /* @__PURE__ */ new B(), ba = /* @__PURE__ */ new B(), _a = /* @__PURE__ */ new B(), gc = /* @__PURE__ */ new B(), ya = /* @__PURE__ */ new B(), Dh = /* @__PURE__ */ new B(), Sa = /* @__PURE__ */ new B();
|
|
25600
|
-
class
|
|
25608
|
+
class Gn extends Sn {
|
|
25601
25609
|
/**
|
|
25602
25610
|
* Constructs a new mesh.
|
|
25603
25611
|
*
|
|
25604
25612
|
* @param {BufferGeometry} [geometry] - The mesh geometry.
|
|
25605
25613
|
* @param {Material|Array<Material>} [material] - The mesh material.
|
|
25606
25614
|
*/
|
|
25607
|
-
constructor(e = new
|
|
25615
|
+
constructor(e = new Hn(), t = new xm()) {
|
|
25608
25616
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.count = 1, this.updateMorphTargets();
|
|
25609
25617
|
}
|
|
25610
25618
|
copy(e, t) {
|
|
@@ -25698,7 +25706,7 @@ class zn extends Sn {
|
|
|
25698
25706
|
}
|
|
25699
25707
|
function uy(i, e, t, n, s, r, a, o) {
|
|
25700
25708
|
let c;
|
|
25701
|
-
if (e.side === nn ? c = n.intersectTriangle(a, r, s, !0, o) : c = n.intersectTriangle(s, r, a, e.side ===
|
|
25709
|
+
if (e.side === nn ? c = n.intersectTriangle(a, r, s, !0, o) : c = n.intersectTriangle(s, r, a, e.side === Mi, o), c === null) return null;
|
|
25702
25710
|
Sa.copy(o), Sa.applyMatrix4(i.matrixWorld);
|
|
25703
25711
|
const l = t.ray.origin.distanceTo(Sa);
|
|
25704
25712
|
return l < t.near || l > t.far ? null : {
|
|
@@ -25712,7 +25720,7 @@ function xa(i, e, t, n, s, r, a, o, c, l) {
|
|
|
25712
25720
|
const d = uy(i, e, t, n, va, ba, _a, Dh);
|
|
25713
25721
|
if (d) {
|
|
25714
25722
|
const u = new B();
|
|
25715
|
-
|
|
25723
|
+
Fn.getBarycoord(Dh, va, ba, _a, u), s && (d.uv = Fn.getInterpolatedAttribute(s, o, c, l, u, new st())), r && (d.uv1 = Fn.getInterpolatedAttribute(r, o, c, l, u, new st())), a && (d.normal = Fn.getInterpolatedAttribute(a, o, c, l, u, new B()), d.normal.dot(n.direction) > 0 && d.normal.multiplyScalar(-1));
|
|
25716
25724
|
const h = {
|
|
25717
25725
|
a: o,
|
|
25718
25726
|
b: c,
|
|
@@ -25720,11 +25728,11 @@ function xa(i, e, t, n, s, r, a, o, c, l) {
|
|
|
25720
25728
|
normal: new B(),
|
|
25721
25729
|
materialIndex: 0
|
|
25722
25730
|
};
|
|
25723
|
-
|
|
25731
|
+
Fn.getNormal(va, ba, _a, h.normal), d.face = h, d.barycoord = u;
|
|
25724
25732
|
}
|
|
25725
25733
|
return d;
|
|
25726
25734
|
}
|
|
25727
|
-
class ta extends
|
|
25735
|
+
class ta extends Hn {
|
|
25728
25736
|
/**
|
|
25729
25737
|
* Constructs a new box geometry.
|
|
25730
25738
|
*
|
|
@@ -25885,7 +25893,7 @@ class Mm extends Sn {
|
|
|
25885
25893
|
* Constructs a new camera.
|
|
25886
25894
|
*/
|
|
25887
25895
|
constructor() {
|
|
25888
|
-
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Vt(), this.projectionMatrix = new Vt(), this.projectionMatrixInverse = new Vt(), this.coordinateSystem =
|
|
25896
|
+
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Vt(), this.projectionMatrix = new Vt(), this.projectionMatrixInverse = new Vt(), this.coordinateSystem = Zn, this._reversedDepth = !1;
|
|
25889
25897
|
}
|
|
25890
25898
|
/**
|
|
25891
25899
|
* The flag that indicates whether the camera uses a reversed depth buffer.
|
|
@@ -26118,7 +26126,7 @@ class gy extends Sn {
|
|
|
26118
26126
|
updateCoordinateSystem() {
|
|
26119
26127
|
const e = this.coordinateSystem, t = this.children.concat(), [n, s, r, a, o, c] = t;
|
|
26120
26128
|
for (const l of t) this.remove(l);
|
|
26121
|
-
if (e ===
|
|
26129
|
+
if (e === Zn)
|
|
26122
26130
|
n.up.set(0, 1, 0), n.lookAt(1, 0, 0), s.up.set(0, 1, 0), s.lookAt(-1, 0, 0), r.up.set(0, 0, -1), r.lookAt(0, 1, 0), a.up.set(0, 0, 1), a.lookAt(0, -1, 0), o.up.set(0, 1, 0), o.lookAt(0, 0, 1), c.up.set(0, 1, 0), c.lookAt(0, 0, -1);
|
|
26123
26131
|
else if (e === ro)
|
|
26124
26132
|
n.up.set(0, -1, 0), n.lookAt(-1, 0, 0), s.up.set(0, -1, 0), s.lookAt(1, 0, 0), r.up.set(0, 0, 1), r.lookAt(0, 1, 0), a.up.set(0, 0, -1), a.lookAt(0, -1, 0), o.up.set(0, -1, 0), o.lookAt(0, 0, 1), c.up.set(0, -1, 0), c.lookAt(0, 0, -1);
|
|
@@ -26174,7 +26182,7 @@ class wm extends sn {
|
|
|
26174
26182
|
this.image = e;
|
|
26175
26183
|
}
|
|
26176
26184
|
}
|
|
26177
|
-
class Am extends
|
|
26185
|
+
class Am extends ti {
|
|
26178
26186
|
/**
|
|
26179
26187
|
* Constructs a new cube render target.
|
|
26180
26188
|
*
|
|
@@ -26248,10 +26256,10 @@ class Am extends ei {
|
|
|
26248
26256
|
vertexShader: n.vertexShader,
|
|
26249
26257
|
fragmentShader: n.fragmentShader,
|
|
26250
26258
|
side: nn,
|
|
26251
|
-
blending:
|
|
26259
|
+
blending: Ti
|
|
26252
26260
|
});
|
|
26253
26261
|
r.uniforms.tEquirect.value = t;
|
|
26254
|
-
const a = new
|
|
26262
|
+
const a = new Gn(s, r), o = t.minFilter;
|
|
26255
26263
|
return t.minFilter === ps && (t.minFilter = Qt), new gy(1, 10, this).update(e, a), t.minFilter = o, a.geometry.dispose(), a.material.dispose(), this;
|
|
26256
26264
|
}
|
|
26257
26265
|
/**
|
|
@@ -26397,7 +26405,7 @@ class by extends Sn {
|
|
|
26397
26405
|
* Constructs a new scene.
|
|
26398
26406
|
*/
|
|
26399
26407
|
constructor() {
|
|
26400
|
-
super(), this.isScene = !0, this.type = "Scene", this.background = null, this.environment = null, this.fog = null, this.backgroundBlurriness = 0, this.backgroundIntensity = 1, this.backgroundRotation = new
|
|
26408
|
+
super(), this.isScene = !0, this.type = "Scene", this.background = null, this.environment = null, this.fog = null, this.backgroundBlurriness = 0, this.backgroundIntensity = 1, this.backgroundRotation = new Ri(), this.environmentIntensity = 1, this.environmentRotation = new Ri(), this.overrideMaterial = null, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
26401
26409
|
}
|
|
26402
26410
|
copy(e, t) {
|
|
26403
26411
|
return super.copy(e, t), e.background !== null && (this.background = e.background.clone()), e.environment !== null && (this.environment = e.environment.clone()), e.fog !== null && (this.fog = e.fog.clone()), this.backgroundBlurriness = e.backgroundBlurriness, this.backgroundIntensity = e.backgroundIntensity, this.backgroundRotation.copy(e.backgroundRotation), this.environmentIntensity = e.environmentIntensity, this.environmentRotation.copy(e.environmentRotation), e.overrideMaterial !== null && (this.overrideMaterial = e.overrideMaterial.clone()), this.matrixAutoUpdate = e.matrixAutoUpdate, this;
|
|
@@ -26689,11 +26697,11 @@ class Rm {
|
|
|
26689
26697
|
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
26690
26698
|
* @return {Frustum} A reference to this frustum.
|
|
26691
26699
|
*/
|
|
26692
|
-
setFromProjectionMatrix(e, t =
|
|
26700
|
+
setFromProjectionMatrix(e, t = Zn, n = !1) {
|
|
26693
26701
|
const s = this.planes, r = e.elements, a = r[0], o = r[1], c = r[2], l = r[3], d = r[4], u = r[5], h = r[6], f = r[7], g = r[8], v = r[9], m = r[10], p = r[11], x = r[12], C = r[13], b = r[14], S = r[15];
|
|
26694
26702
|
if (s[0].setComponents(l - a, f - d, p - g, S - x).normalize(), s[1].setComponents(l + a, f + d, p + g, S + x).normalize(), s[2].setComponents(l + o, f + u, p + v, S + C).normalize(), s[3].setComponents(l - o, f - u, p - v, S - C).normalize(), n)
|
|
26695
26703
|
s[4].setComponents(c, h, m, b).normalize(), s[5].setComponents(l - c, f - h, p - m, S - b).normalize();
|
|
26696
|
-
else if (s[4].setComponents(l - c, f - h, p - m, S - b).normalize(), t ===
|
|
26704
|
+
else if (s[4].setComponents(l - c, f - h, p - m, S - b).normalize(), t === Zn)
|
|
26697
26705
|
s[5].setComponents(l + c, f + h, p + m, S + b).normalize();
|
|
26698
26706
|
else if (t === ro)
|
|
26699
26707
|
s[5].setComponents(c, h, m, b).normalize();
|
|
@@ -26795,8 +26803,8 @@ class Kr extends sn {
|
|
|
26795
26803
|
* @param {number} [format=DepthFormat] - The texture format.
|
|
26796
26804
|
* @param {number} [depth=1] - The depth of the texture.
|
|
26797
26805
|
*/
|
|
26798
|
-
constructor(e, t, n =
|
|
26799
|
-
if (d !==
|
|
26806
|
+
constructor(e, t, n = ri, s, r, a, o = Yt, c = Yt, l, d = Ai, u = 1) {
|
|
26807
|
+
if (d !== Ai && d !== ms)
|
|
26800
26808
|
throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
26801
26809
|
const h = { width: e, height: t, depth: u };
|
|
26802
26810
|
super(h, s, r, a, o, c, d, n, l), this.isDepthTexture = !0, this.flipY = !1, this.generateMipmaps = !1, this.compareFunction = null;
|
|
@@ -26823,7 +26831,7 @@ class Ty extends Kr {
|
|
|
26823
26831
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
26824
26832
|
* @param {number} [format=DepthFormat] - The texture format.
|
|
26825
26833
|
*/
|
|
26826
|
-
constructor(e, t =
|
|
26834
|
+
constructor(e, t = ri, n = Ts, s, r, a = Yt, o = Yt, c, l = Ai) {
|
|
26827
26835
|
const d = { width: e, height: e, depth: 1 }, u = [d, d, d, d, d, d];
|
|
26828
26836
|
super(e, e, t, n, s, r, a, o, c, l), this.image = u, this.isCubeDepthTexture = !0, this.isCubeTexture = !0;
|
|
26829
26837
|
}
|
|
@@ -26852,7 +26860,7 @@ class Pm extends sn {
|
|
|
26852
26860
|
return super.copy(e), this.sourceTexture = e.sourceTexture, this;
|
|
26853
26861
|
}
|
|
26854
26862
|
}
|
|
26855
|
-
class Vd extends
|
|
26863
|
+
class Vd extends Hn {
|
|
26856
26864
|
/**
|
|
26857
26865
|
* Constructs a new polyhedron geometry.
|
|
26858
26866
|
*
|
|
@@ -27071,7 +27079,7 @@ class zd extends Vd {
|
|
|
27071
27079
|
return new zd(e.radius, e.detail);
|
|
27072
27080
|
}
|
|
27073
27081
|
}
|
|
27074
|
-
class bo extends
|
|
27082
|
+
class bo extends Hn {
|
|
27075
27083
|
/**
|
|
27076
27084
|
* Constructs a new plane geometry.
|
|
27077
27085
|
*
|
|
@@ -27116,7 +27124,7 @@ class bo extends Gn {
|
|
|
27116
27124
|
return new bo(e.width, e.height, e.widthSegments, e.heightSegments);
|
|
27117
27125
|
}
|
|
27118
27126
|
}
|
|
27119
|
-
class Gd extends
|
|
27127
|
+
class Gd extends Hn {
|
|
27120
27128
|
/**
|
|
27121
27129
|
* Constructs a new sphere geometry.
|
|
27122
27130
|
*
|
|
@@ -27357,7 +27365,7 @@ function Uh(i, e, t, n) {
|
|
|
27357
27365
|
return i * e * 2 / s.components * s.byteLength;
|
|
27358
27366
|
case gm:
|
|
27359
27367
|
return i * e * 3 / s.components * s.byteLength;
|
|
27360
|
-
case
|
|
27368
|
+
case Vn:
|
|
27361
27369
|
return i * e * 4 / s.components * s.byteLength;
|
|
27362
27370
|
case Nd:
|
|
27363
27371
|
return i * e * 4 / s.components * s.byteLength;
|
|
@@ -27438,14 +27446,14 @@ function Ry(i) {
|
|
|
27438
27446
|
return { byteLength: 1, components: 1 };
|
|
27439
27447
|
case jr:
|
|
27440
27448
|
case hm:
|
|
27441
|
-
case
|
|
27449
|
+
case wi:
|
|
27442
27450
|
return { byteLength: 2, components: 1 };
|
|
27443
27451
|
case kd:
|
|
27444
27452
|
case Id:
|
|
27445
27453
|
return { byteLength: 2, components: 4 };
|
|
27446
|
-
case
|
|
27454
|
+
case ri:
|
|
27447
27455
|
case Pd:
|
|
27448
|
-
case
|
|
27456
|
+
case Jn:
|
|
27449
27457
|
return { byteLength: 4, components: 1 };
|
|
27450
27458
|
case fm:
|
|
27451
27459
|
case pm:
|
|
@@ -31450,7 +31458,7 @@ void main() {
|
|
|
31450
31458
|
alphaMapTransform: { value: /* @__PURE__ */ new ze() },
|
|
31451
31459
|
alphaTest: { value: 0 }
|
|
31452
31460
|
}
|
|
31453
|
-
},
|
|
31461
|
+
}, $n = {
|
|
31454
31462
|
basic: {
|
|
31455
31463
|
uniforms: /* @__PURE__ */ tn([
|
|
31456
31464
|
me.common,
|
|
@@ -31674,9 +31682,9 @@ void main() {
|
|
|
31674
31682
|
fragmentShader: Ge.shadow_frag
|
|
31675
31683
|
}
|
|
31676
31684
|
};
|
|
31677
|
-
|
|
31685
|
+
$n.physical = {
|
|
31678
31686
|
uniforms: /* @__PURE__ */ tn([
|
|
31679
|
-
|
|
31687
|
+
$n.standard.uniforms,
|
|
31680
31688
|
{
|
|
31681
31689
|
clearcoat: { value: 0 },
|
|
31682
31690
|
clearcoatMap: { value: null },
|
|
@@ -31727,7 +31735,7 @@ Xn.physical = {
|
|
|
31727
31735
|
vertexShader: Ge.meshphysical_vert,
|
|
31728
31736
|
fragmentShader: Ge.meshphysical_frag
|
|
31729
31737
|
};
|
|
31730
|
-
const Ea = { r: 0, b: 0, g: 0 }, as = /* @__PURE__ */ new
|
|
31738
|
+
const Ea = { r: 0, b: 0, g: 0 }, as = /* @__PURE__ */ new Ri(), dT = /* @__PURE__ */ new Vt();
|
|
31731
31739
|
function uT(i, e, t, n, s, r, a) {
|
|
31732
31740
|
const o = new Je(0);
|
|
31733
31741
|
let c = r === !0 ? 0 : 1, l, d, u = null, h = 0, f = null;
|
|
@@ -31744,13 +31752,13 @@ function uT(i, e, t, n, s, r, a) {
|
|
|
31744
31752
|
}
|
|
31745
31753
|
function m(C, b) {
|
|
31746
31754
|
const S = g(b);
|
|
31747
|
-
S && (S.isCubeTexture || S.mapping === go) ? (d === void 0 && (d = new
|
|
31755
|
+
S && (S.isCubeTexture || S.mapping === go) ? (d === void 0 && (d = new Gn(
|
|
31748
31756
|
new ta(1, 1, 1),
|
|
31749
31757
|
new wn({
|
|
31750
31758
|
name: "BackgroundCubeMaterial",
|
|
31751
|
-
uniforms: dr(
|
|
31752
|
-
vertexShader:
|
|
31753
|
-
fragmentShader:
|
|
31759
|
+
uniforms: dr($n.backgroundCube.uniforms),
|
|
31760
|
+
vertexShader: $n.backgroundCube.vertexShader,
|
|
31761
|
+
fragmentShader: $n.backgroundCube.fragmentShader,
|
|
31754
31762
|
side: nn,
|
|
31755
31763
|
depthTest: !1,
|
|
31756
31764
|
depthWrite: !1,
|
|
@@ -31763,14 +31771,14 @@ function uT(i, e, t, n, s, r, a) {
|
|
|
31763
31771
|
get: function() {
|
|
31764
31772
|
return this.uniforms.envMap.value;
|
|
31765
31773
|
}
|
|
31766
|
-
}), s.update(d)), as.copy(b.backgroundRotation), as.x *= -1, as.y *= -1, as.z *= -1, S.isCubeTexture && S.isRenderTargetTexture === !1 && (as.y *= -1, as.z *= -1), d.material.uniforms.envMap.value = S, d.material.uniforms.flipEnvMap.value = S.isCubeTexture && S.isRenderTargetTexture === !1 ? -1 : 1, d.material.uniforms.backgroundBlurriness.value = b.backgroundBlurriness, d.material.uniforms.backgroundIntensity.value = b.backgroundIntensity, d.material.uniforms.backgroundRotation.value.setFromMatrix4(dT.makeRotationFromEuler(as)), d.material.toneMapped = Qe.getTransfer(S.colorSpace) !==
|
|
31774
|
+
}), s.update(d)), as.copy(b.backgroundRotation), as.x *= -1, as.y *= -1, as.z *= -1, S.isCubeTexture && S.isRenderTargetTexture === !1 && (as.y *= -1, as.z *= -1), d.material.uniforms.envMap.value = S, d.material.uniforms.flipEnvMap.value = S.isCubeTexture && S.isRenderTargetTexture === !1 ? -1 : 1, d.material.uniforms.backgroundBlurriness.value = b.backgroundBlurriness, d.material.uniforms.backgroundIntensity.value = b.backgroundIntensity, d.material.uniforms.backgroundRotation.value.setFromMatrix4(dT.makeRotationFromEuler(as)), d.material.toneMapped = Qe.getTransfer(S.colorSpace) !== ht, (u !== S || h !== S.version || f !== i.toneMapping) && (d.material.needsUpdate = !0, u = S, h = S.version, f = i.toneMapping), d.layers.enableAll(), C.unshift(d, d.geometry, d.material, 0, 0, null)) : S && S.isTexture && (l === void 0 && (l = new Gn(
|
|
31767
31775
|
new bo(2, 2),
|
|
31768
31776
|
new wn({
|
|
31769
31777
|
name: "BackgroundMaterial",
|
|
31770
|
-
uniforms: dr(
|
|
31771
|
-
vertexShader:
|
|
31772
|
-
fragmentShader:
|
|
31773
|
-
side:
|
|
31778
|
+
uniforms: dr($n.background.uniforms),
|
|
31779
|
+
vertexShader: $n.background.vertexShader,
|
|
31780
|
+
fragmentShader: $n.background.fragmentShader,
|
|
31781
|
+
side: Mi,
|
|
31774
31782
|
depthTest: !1,
|
|
31775
31783
|
depthWrite: !1,
|
|
31776
31784
|
fog: !1,
|
|
@@ -31780,7 +31788,7 @@ function uT(i, e, t, n, s, r, a) {
|
|
|
31780
31788
|
get: function() {
|
|
31781
31789
|
return this.uniforms.t2D.value;
|
|
31782
31790
|
}
|
|
31783
|
-
}), s.update(l)), l.material.uniforms.t2D.value = S, l.material.uniforms.backgroundIntensity.value = b.backgroundIntensity, l.material.toneMapped = Qe.getTransfer(S.colorSpace) !==
|
|
31791
|
+
}), s.update(l)), l.material.uniforms.t2D.value = S, l.material.uniforms.backgroundIntensity.value = b.backgroundIntensity, l.material.toneMapped = Qe.getTransfer(S.colorSpace) !== ht, S.matrixAutoUpdate === !0 && S.updateMatrix(), l.material.uniforms.uvTransform.value.copy(S.matrix), (u !== S || h !== S.version || f !== i.toneMapping) && (l.material.needsUpdate = !0, u = S, h = S.version, f = i.toneMapping), l.layers.enableAll(), C.unshift(l, l.geometry, l.material, 0, 0, null));
|
|
31784
31792
|
}
|
|
31785
31793
|
function p(C, b) {
|
|
31786
31794
|
C.getRGB(Ea, Em(i)), n.buffers.color.setClear(Ea.r, Ea.g, Ea.b, b, a);
|
|
@@ -32066,12 +32074,12 @@ function pT(i, e, t, n) {
|
|
|
32066
32074
|
return s;
|
|
32067
32075
|
}
|
|
32068
32076
|
function a(A) {
|
|
32069
|
-
return !(A !==
|
|
32077
|
+
return !(A !== Vn && n.convert(A) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT));
|
|
32070
32078
|
}
|
|
32071
32079
|
function o(A) {
|
|
32072
|
-
const k = A ===
|
|
32080
|
+
const k = A === wi && (e.has("EXT_color_buffer_half_float") || e.has("EXT_color_buffer_float"));
|
|
32073
32081
|
return !(A !== Mn && n.convert(A) !== i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
|
|
32074
|
-
A !==
|
|
32082
|
+
A !== Jn && !k);
|
|
32075
32083
|
}
|
|
32076
32084
|
function c(A) {
|
|
32077
32085
|
if (A === "highp") {
|
|
@@ -32294,8 +32302,8 @@ class Bh {
|
|
|
32294
32302
|
magFilter: Qt,
|
|
32295
32303
|
minFilter: Qt,
|
|
32296
32304
|
generateMipmaps: !1,
|
|
32297
|
-
type:
|
|
32298
|
-
format:
|
|
32305
|
+
type: wi,
|
|
32306
|
+
format: Vn,
|
|
32299
32307
|
colorSpace: lr,
|
|
32300
32308
|
depthBuffer: !1
|
|
32301
32309
|
}, s = Vh(e, t, n);
|
|
@@ -32307,12 +32315,12 @@ class Bh {
|
|
|
32307
32315
|
return s;
|
|
32308
32316
|
}
|
|
32309
32317
|
_compileMaterial(e) {
|
|
32310
|
-
const t = new
|
|
32318
|
+
const t = new Gn(new Hn(), e);
|
|
32311
32319
|
this._renderer.compile(t, Mr);
|
|
32312
32320
|
}
|
|
32313
32321
|
_sceneToCubeUV(e, t, n, s, r) {
|
|
32314
32322
|
const c = new En(90, 1, t, n), l = [1, -1, 1, 1, 1, 1], d = [1, 1, 1, -1, -1, -1], u = this._renderer, h = u.autoClear, f = u.toneMapping;
|
|
32315
|
-
u.getClearColor(Fh), u.toneMapping =
|
|
32323
|
+
u.getClearColor(Fh), u.toneMapping = ei, u.autoClear = !1, u.state.buffers.depth.getReversed() && (u.setRenderTarget(s), u.clearDepth(), u.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new Gn(
|
|
32316
32324
|
new ta(),
|
|
32317
32325
|
new xm({
|
|
32318
32326
|
name: "PMREM.Background",
|
|
@@ -32463,13 +32471,13 @@ function _T(i) {
|
|
|
32463
32471
|
const T = [M, M, M, M, M, M];
|
|
32464
32472
|
b.set(T, p * g * M);
|
|
32465
32473
|
}
|
|
32466
|
-
const S = new
|
|
32467
|
-
S.setAttribute("position", new
|
|
32474
|
+
const S = new Hn();
|
|
32475
|
+
S.setAttribute("position", new ni(x, v)), S.setAttribute("uv", new ni(C, m)), S.setAttribute("faceIndex", new ni(b, p)), n.push(new Gn(S, null)), s > ji && s--;
|
|
32468
32476
|
}
|
|
32469
32477
|
return { lodMeshes: n, sizeLods: e, sigmas: t };
|
|
32470
32478
|
}
|
|
32471
32479
|
function Vh(i, e, t) {
|
|
32472
|
-
const n = new
|
|
32480
|
+
const n = new ti(i, e, t);
|
|
32473
32481
|
return n.texture.mapping = go, n.texture.name = "PMREM.cubeUv", n.scissorTest = !0, n;
|
|
32474
32482
|
}
|
|
32475
32483
|
function Gs(i, e, t, n, s) {
|
|
@@ -32602,7 +32610,7 @@ function yT(i, e, t) {
|
|
|
32602
32610
|
}
|
|
32603
32611
|
`
|
|
32604
32612
|
),
|
|
32605
|
-
blending:
|
|
32613
|
+
blending: Ti,
|
|
32606
32614
|
depthTest: !1,
|
|
32607
32615
|
depthWrite: !1
|
|
32608
32616
|
});
|
|
@@ -32691,7 +32699,7 @@ function ST(i, e, t) {
|
|
|
32691
32699
|
}
|
|
32692
32700
|
`
|
|
32693
32701
|
),
|
|
32694
|
-
blending:
|
|
32702
|
+
blending: Ti,
|
|
32695
32703
|
depthTest: !1,
|
|
32696
32704
|
depthWrite: !1
|
|
32697
32705
|
});
|
|
@@ -32726,7 +32734,7 @@ function zh() {
|
|
|
32726
32734
|
}
|
|
32727
32735
|
`
|
|
32728
32736
|
),
|
|
32729
|
-
blending:
|
|
32737
|
+
blending: Ti,
|
|
32730
32738
|
depthTest: !1,
|
|
32731
32739
|
depthWrite: !1
|
|
32732
32740
|
});
|
|
@@ -32759,7 +32767,7 @@ function Gh() {
|
|
|
32759
32767
|
}
|
|
32760
32768
|
`
|
|
32761
32769
|
),
|
|
32762
|
-
blending:
|
|
32770
|
+
blending: Ti,
|
|
32763
32771
|
depthTest: !1,
|
|
32764
32772
|
depthWrite: !1
|
|
32765
32773
|
});
|
|
@@ -33045,7 +33053,7 @@ function wT(i, e, t) {
|
|
|
33045
33053
|
let b = o.attributes.position.count * C, S = 1;
|
|
33046
33054
|
b > e.maxTextureSize && (S = Math.ceil(b / e.maxTextureSize), b = e.maxTextureSize);
|
|
33047
33055
|
const M = new Float32Array(b * S * 4 * u), A = new _m(M, b, S, u);
|
|
33048
|
-
A.type =
|
|
33056
|
+
A.type = Jn, A.needsUpdate = !0;
|
|
33049
33057
|
const k = C * 4;
|
|
33050
33058
|
for (let T = 0; T < u; T++) {
|
|
33051
33059
|
const R = m[T], U = p[T], F = x[T], q = b * S * 4 * T;
|
|
@@ -33107,15 +33115,15 @@ const RT = {
|
|
|
33107
33115
|
[om]: "CUSTOM_TONE_MAPPING"
|
|
33108
33116
|
};
|
|
33109
33117
|
function PT(i, e, t, n, s) {
|
|
33110
|
-
const r = new
|
|
33118
|
+
const r = new ti(e, t, {
|
|
33111
33119
|
type: i,
|
|
33112
33120
|
depthBuffer: n,
|
|
33113
33121
|
stencilBuffer: s
|
|
33114
|
-
}), a = new
|
|
33115
|
-
type:
|
|
33122
|
+
}), a = new ti(e, t, {
|
|
33123
|
+
type: wi,
|
|
33116
33124
|
depthBuffer: !1,
|
|
33117
33125
|
stencilBuffer: !1
|
|
33118
|
-
}), o = new
|
|
33126
|
+
}), o = new Hn();
|
|
33119
33127
|
o.setAttribute("position", new rn([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), o.setAttribute("uv", new rn([0, 2, 0, 0, 2, 0], 2));
|
|
33120
33128
|
const c = new Cy({
|
|
33121
33129
|
uniforms: {
|
|
@@ -33177,7 +33185,7 @@ function PT(i, e, t, n, s) {
|
|
|
33177
33185
|
),
|
|
33178
33186
|
depthTest: !1,
|
|
33179
33187
|
depthWrite: !1
|
|
33180
|
-
}), l = new
|
|
33188
|
+
}), l = new Gn(o, c), d = new km(-1, 1, 1, -1, 0, 1);
|
|
33181
33189
|
let u = null, h = null, f = !1, g, v = null, m = [], p = !1;
|
|
33182
33190
|
this.setSize = function(x, C) {
|
|
33183
33191
|
r.setSize(x, C), a.setSize(x, C);
|
|
@@ -33193,12 +33201,12 @@ function PT(i, e, t, n, s) {
|
|
|
33193
33201
|
M.setSize && M.setSize(C, b);
|
|
33194
33202
|
}
|
|
33195
33203
|
}, this.begin = function(x, C) {
|
|
33196
|
-
if (f || x.toneMapping ===
|
|
33204
|
+
if (f || x.toneMapping === ei && m.length === 0) return !1;
|
|
33197
33205
|
if (v = C, C !== null) {
|
|
33198
33206
|
const b = C.width, S = C.height;
|
|
33199
33207
|
(r.width !== b || r.height !== S) && this.setSize(b, S);
|
|
33200
33208
|
}
|
|
33201
|
-
return p === !1 && x.setRenderTarget(r), g = x.toneMapping, x.toneMapping =
|
|
33209
|
+
return p === !1 && x.setRenderTarget(r), g = x.toneMapping, x.toneMapping = ei, !0;
|
|
33202
33210
|
}, this.hasRenderPass = function() {
|
|
33203
33211
|
return p;
|
|
33204
33212
|
}, this.end = function(x, C) {
|
|
@@ -33212,7 +33220,7 @@ function PT(i, e, t, n, s) {
|
|
|
33212
33220
|
}
|
|
33213
33221
|
}
|
|
33214
33222
|
if (u !== x.outputColorSpace || h !== x.toneMapping) {
|
|
33215
|
-
u = x.outputColorSpace, h = x.toneMapping, c.defines = {}, Qe.getTransfer(u) ===
|
|
33223
|
+
u = x.outputColorSpace, h = x.toneMapping, c.defines = {}, Qe.getTransfer(u) === ht && (c.defines.SRGB_TRANSFER = "");
|
|
33216
33224
|
const M = RT[h];
|
|
33217
33225
|
M && (c.defines[M] = ""), c.needsUpdate = !0;
|
|
33218
33226
|
}
|
|
@@ -33743,7 +33751,7 @@ function CC(i) {
|
|
|
33743
33751
|
switch (Qe.getTransfer(i)) {
|
|
33744
33752
|
case so:
|
|
33745
33753
|
return [e, "LinearTransferOETF"];
|
|
33746
|
-
case
|
|
33754
|
+
case ht:
|
|
33747
33755
|
return [e, "sRGBTransferOETF"];
|
|
33748
33756
|
default:
|
|
33749
33757
|
return Oe("WebGLProgram: Unsupported color space: ", i), [e, "LinearTransferOETF"];
|
|
@@ -34142,10 +34150,10 @@ function jC(i, e, t, n) {
|
|
|
34142
34150
|
"uniform mat4 viewMatrix;",
|
|
34143
34151
|
"uniform vec3 cameraPosition;",
|
|
34144
34152
|
"uniform bool isOrthographic;",
|
|
34145
|
-
t.toneMapping !==
|
|
34146
|
-
t.toneMapping !==
|
|
34153
|
+
t.toneMapping !== ei ? "#define TONE_MAPPING" : "",
|
|
34154
|
+
t.toneMapping !== ei ? Ge.tonemapping_pars_fragment : "",
|
|
34147
34155
|
// this code is required here because it is used by the toneMapping() function defined below
|
|
34148
|
-
t.toneMapping !==
|
|
34156
|
+
t.toneMapping !== ei ? wC("toneMapping", t.toneMapping) : "",
|
|
34149
34157
|
t.dithering ? "#define DITHERING" : "",
|
|
34150
34158
|
t.opaque ? "#define OPAQUE" : "",
|
|
34151
34159
|
Ge.colorspace_pars_fragment,
|
|
@@ -34305,12 +34313,12 @@ function YC(i, e, t, n, s, r, a) {
|
|
|
34305
34313
|
K.morphAttributes.position !== void 0 && (Be = 1), K.morphAttributes.normal !== void 0 && (Be = 2), K.morphAttributes.color !== void 0 && (Be = 3);
|
|
34306
34314
|
let Fe, Et, ft, $;
|
|
34307
34315
|
if (ge) {
|
|
34308
|
-
const
|
|
34309
|
-
Fe =
|
|
34316
|
+
const dt = $n[ge];
|
|
34317
|
+
Fe = dt.vertexShader, Et = dt.fragmentShader;
|
|
34310
34318
|
} else
|
|
34311
34319
|
Fe = y.vertexShader, Et = y.fragmentShader, c.update(y), ft = c.getVertexShaderID(y), $ = c.getFragmentShaderID(y);
|
|
34312
|
-
const ne = i.getRenderTarget(), Te = i.state.buffers.depth.getReversed(), Ve = F.isInstancedMesh === !0, Me = F.isBatchedMesh === !0, et = !!y.map, Wt = !!y.matcap, Ze = !!W,
|
|
34313
|
-
let Ue =
|
|
34320
|
+
const ne = i.getRenderTarget(), Te = i.state.buffers.depth.getReversed(), Ve = F.isInstancedMesh === !0, Me = F.isBatchedMesh === !0, et = !!y.map, Wt = !!y.matcap, Ze = !!W, lt = !!y.aoMap, _t = !!y.lightMap, He = !!y.bumpMap, Nt = !!y.normalMap, I = !!y.displacementMap, Ut = !!y.emissiveMap, rt = !!y.metalnessMap, xt = !!y.roughnessMap, Ae = y.anisotropy > 0, w = y.clearcoat > 0, _ = y.dispersion > 0, L = y.iridescence > 0, X = y.sheen > 0, Q = y.transmission > 0, j = Ae && !!y.anisotropyMap, Pe = w && !!y.clearcoatMap, ue = w && !!y.clearcoatNormalMap, we = w && !!y.clearcoatRoughnessMap, Ne = L && !!y.iridescenceMap, se = L && !!y.iridescenceThicknessMap, fe = X && !!y.sheenColorMap, Ee = X && !!y.sheenRoughnessMap, Re = !!y.specularMap, he = !!y.specularColorMap, We = !!y.specularIntensityMap, D = Q && !!y.transmissionMap, _e = Q && !!y.thicknessMap, ae = !!y.gradientMap, Se = !!y.alphaMap, ie = y.alphaTest > 0, Y = !!y.alphaHash, de = !!y.extensions;
|
|
34321
|
+
let Ue = ei;
|
|
34314
34322
|
y.toneMapped && (ne === null || ne.isXRRenderTarget === !0) && (Ue = i.toneMapping);
|
|
34315
34323
|
const Tt = {
|
|
34316
34324
|
shaderID: ge,
|
|
@@ -34336,8 +34344,8 @@ function YC(i, e, t, n, s, r, a) {
|
|
|
34336
34344
|
envMap: Ze,
|
|
34337
34345
|
envMapMode: Ze && W.mapping,
|
|
34338
34346
|
envMapCubeUVHeight: ee,
|
|
34339
|
-
aoMap:
|
|
34340
|
-
lightMap:
|
|
34347
|
+
aoMap: lt,
|
|
34348
|
+
lightMap: _t,
|
|
34341
34349
|
bumpMap: He,
|
|
34342
34350
|
normalMap: Nt,
|
|
34343
34351
|
displacementMap: I,
|
|
@@ -34373,8 +34381,8 @@ function YC(i, e, t, n, s, r, a) {
|
|
|
34373
34381
|
combine: y.combine,
|
|
34374
34382
|
//
|
|
34375
34383
|
mapUv: et && v(y.map.channel),
|
|
34376
|
-
aoMapUv:
|
|
34377
|
-
lightMapUv:
|
|
34384
|
+
aoMapUv: lt && v(y.aoMap.channel),
|
|
34385
|
+
lightMapUv: _t && v(y.lightMap.channel),
|
|
34378
34386
|
bumpMapUv: He && v(y.bumpMap.channel),
|
|
34379
34387
|
normalMapUv: Nt && v(y.normalMap.channel),
|
|
34380
34388
|
displacementMapUv: I && v(y.displacementMap.channel),
|
|
@@ -34430,10 +34438,10 @@ function YC(i, e, t, n, s, r, a) {
|
|
|
34430
34438
|
shadowMapEnabled: i.shadowMap.enabled && R.length > 0,
|
|
34431
34439
|
shadowMapType: i.shadowMap.type,
|
|
34432
34440
|
toneMapping: Ue,
|
|
34433
|
-
decodeVideoTexture: et && y.map.isVideoTexture === !0 && Qe.getTransfer(y.map.colorSpace) ===
|
|
34434
|
-
decodeVideoTextureEmissive: Ut && y.emissiveMap.isVideoTexture === !0 && Qe.getTransfer(y.emissiveMap.colorSpace) ===
|
|
34441
|
+
decodeVideoTexture: et && y.map.isVideoTexture === !0 && Qe.getTransfer(y.map.colorSpace) === ht,
|
|
34442
|
+
decodeVideoTextureEmissive: Ut && y.emissiveMap.isVideoTexture === !0 && Qe.getTransfer(y.emissiveMap.colorSpace) === ht,
|
|
34435
34443
|
premultipliedAlpha: y.premultipliedAlpha,
|
|
34436
|
-
doubleSided: y.side ===
|
|
34444
|
+
doubleSided: y.side === Si,
|
|
34437
34445
|
flipSided: y.side === nn,
|
|
34438
34446
|
useDepthPacking: y.depthPacking >= 0,
|
|
34439
34447
|
depthPacking: y.depthPacking || 0,
|
|
@@ -34462,7 +34470,7 @@ function YC(i, e, t, n, s, r, a) {
|
|
|
34462
34470
|
const T = g[y.type];
|
|
34463
34471
|
let R;
|
|
34464
34472
|
if (T) {
|
|
34465
|
-
const U =
|
|
34473
|
+
const U = $n[T];
|
|
34466
34474
|
R = fy.clone(U.uniforms);
|
|
34467
34475
|
} else
|
|
34468
34476
|
R = y.uniforms;
|
|
@@ -34900,7 +34908,7 @@ void main() {
|
|
|
34900
34908
|
], af = /* @__PURE__ */ new Vt(), wr = /* @__PURE__ */ new B(), Cc = /* @__PURE__ */ new B();
|
|
34901
34909
|
function dE(i, e, t) {
|
|
34902
34910
|
let n = new Rm();
|
|
34903
|
-
const s = new st(), r = new st(), a = new Lt(), o = new Ey(), c = new My(), l = {}, d = t.maxTextureSize, u = { [
|
|
34911
|
+
const s = new st(), r = new st(), a = new Lt(), o = new Ey(), c = new My(), l = {}, d = t.maxTextureSize, u = { [Mi]: nn, [nn]: Mi, [Si]: Si }, h = new wn({
|
|
34904
34912
|
defines: {
|
|
34905
34913
|
VSM_SAMPLES: 8
|
|
34906
34914
|
},
|
|
@@ -34913,22 +34921,22 @@ function dE(i, e, t) {
|
|
|
34913
34921
|
fragmentShader: oE
|
|
34914
34922
|
}), f = h.clone();
|
|
34915
34923
|
f.defines.HORIZONTAL_PASS = 1;
|
|
34916
|
-
const g = new
|
|
34924
|
+
const g = new Hn();
|
|
34917
34925
|
g.setAttribute(
|
|
34918
34926
|
"position",
|
|
34919
|
-
new
|
|
34927
|
+
new ni(
|
|
34920
34928
|
new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]),
|
|
34921
34929
|
3
|
|
34922
34930
|
)
|
|
34923
34931
|
);
|
|
34924
|
-
const v = new
|
|
34932
|
+
const v = new Gn(g, h), m = this;
|
|
34925
34933
|
this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = za;
|
|
34926
34934
|
let p = this.type;
|
|
34927
34935
|
this.render = function(M, A, k) {
|
|
34928
34936
|
if (m.enabled === !1 || m.autoUpdate === !1 && m.needsUpdate === !1 || M.length === 0) return;
|
|
34929
34937
|
M.type === p_ && (Oe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), M.type = za);
|
|
34930
34938
|
const y = i.getRenderTarget(), T = i.getActiveCubeFace(), R = i.getActiveMipmapLevel(), U = i.state;
|
|
34931
|
-
U.setBlending(
|
|
34939
|
+
U.setBlending(Ti), U.buffers.depth.getReversed() === !0 ? U.buffers.color.setClear(0, 0, 0, 0) : U.buffers.color.setClear(1, 1, 1, 1), U.buffers.depth.setTest(!0), U.setScissorTest(!1);
|
|
34932
34940
|
const F = p !== this.type;
|
|
34933
34941
|
F && A.traverse(function(q) {
|
|
34934
34942
|
q.material && (Array.isArray(q.material) ? q.material.forEach((K) => K.needsUpdate = !0) : q.material.needsUpdate = !0);
|
|
@@ -34948,15 +34956,15 @@ function dE(i, e, t) {
|
|
|
34948
34956
|
Oe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");
|
|
34949
34957
|
continue;
|
|
34950
34958
|
}
|
|
34951
|
-
W.map = new
|
|
34959
|
+
W.map = new ti(s.x, s.y, {
|
|
34952
34960
|
format: cr,
|
|
34953
|
-
type:
|
|
34961
|
+
type: wi,
|
|
34954
34962
|
minFilter: Qt,
|
|
34955
34963
|
magFilter: Qt,
|
|
34956
34964
|
generateMipmaps: !1
|
|
34957
|
-
}), W.map.texture.name = H.name + ".shadowMap", W.map.depthTexture = new Kr(s.x, s.y,
|
|
34965
|
+
}), W.map.texture.name = H.name + ".shadowMap", W.map.depthTexture = new Kr(s.x, s.y, Jn), W.map.depthTexture.name = H.name + ".shadowMapDepth", W.map.depthTexture.format = Ai, W.map.depthTexture.compareFunction = null, W.map.depthTexture.minFilter = Yt, W.map.depthTexture.magFilter = Yt;
|
|
34958
34966
|
} else {
|
|
34959
|
-
H.isPointLight ? (W.map = new Am(s.x), W.map.depthTexture = new Ty(s.x,
|
|
34967
|
+
H.isPointLight ? (W.map = new Am(s.x), W.map.depthTexture = new Ty(s.x, ri)) : (W.map = new ti(s.x, s.y), W.map.depthTexture = new Kr(s.x, s.y, ri)), W.map.depthTexture.name = H.name + ".shadowMap", W.map.depthTexture.format = Ai;
|
|
34960
34968
|
const le = i.state.buffers.depth.getReversed();
|
|
34961
34969
|
this.type === za ? (W.map.depthTexture.compareFunction = le ? Od : Ud, W.map.depthTexture.minFilter = Qt, W.map.depthTexture.magFilter = Qt) : (W.map.depthTexture.compareFunction = null, W.map.depthTexture.minFilter = Yt, W.map.depthTexture.magFilter = Yt);
|
|
34962
34970
|
}
|
|
@@ -34989,9 +34997,9 @@ function dE(i, e, t) {
|
|
|
34989
34997
|
};
|
|
34990
34998
|
function x(M, A) {
|
|
34991
34999
|
const k = e.update(v);
|
|
34992
|
-
h.defines.VSM_SAMPLES !== M.blurSamples && (h.defines.VSM_SAMPLES = M.blurSamples, f.defines.VSM_SAMPLES = M.blurSamples, h.needsUpdate = !0, f.needsUpdate = !0), M.mapPass === null && (M.mapPass = new
|
|
35000
|
+
h.defines.VSM_SAMPLES !== M.blurSamples && (h.defines.VSM_SAMPLES = M.blurSamples, f.defines.VSM_SAMPLES = M.blurSamples, h.needsUpdate = !0, f.needsUpdate = !0), M.mapPass === null && (M.mapPass = new ti(s.x, s.y, {
|
|
34993
35001
|
format: cr,
|
|
34994
|
-
type:
|
|
35002
|
+
type: wi
|
|
34995
35003
|
})), h.uniforms.shadow_pass.value = M.map.depthTexture, h.uniforms.resolution.value = M.mapSize, h.uniforms.radius.value = M.radius, i.setRenderTarget(M.mapPass), i.clear(), i.renderBufferDirect(A, null, k, h, v, null), f.uniforms.shadow_pass.value = M.mapPass.texture, f.uniforms.resolution.value = M.mapSize, f.uniforms.radius.value = M.radius, i.setRenderTarget(M.map), i.clear(), i.renderBufferDirect(A, null, k, f, v, null);
|
|
34996
35004
|
}
|
|
34997
35005
|
function C(M, A, k, y) {
|
|
@@ -35141,23 +35149,23 @@ function hE(i, e) {
|
|
|
35141
35149
|
function s() {
|
|
35142
35150
|
let D = !1, _e = null, ae = null, Se = null, ie = null, Y = null, de = null, Ue = null, Tt = null;
|
|
35143
35151
|
return {
|
|
35144
|
-
setTest: function(
|
|
35145
|
-
D || (
|
|
35152
|
+
setTest: function(dt) {
|
|
35153
|
+
D || (dt ? ne(i.STENCIL_TEST) : Te(i.STENCIL_TEST));
|
|
35146
35154
|
},
|
|
35147
|
-
setMask: function(
|
|
35148
|
-
_e !==
|
|
35155
|
+
setMask: function(dt) {
|
|
35156
|
+
_e !== dt && !D && (i.stencilMask(dt), _e = dt);
|
|
35149
35157
|
},
|
|
35150
|
-
setFunc: function(
|
|
35151
|
-
(ae !==
|
|
35158
|
+
setFunc: function(dt, Wn, oi) {
|
|
35159
|
+
(ae !== dt || Se !== Wn || ie !== oi) && (i.stencilFunc(dt, Wn, oi), ae = dt, Se = Wn, ie = oi);
|
|
35152
35160
|
},
|
|
35153
|
-
setOp: function(
|
|
35154
|
-
(Y !==
|
|
35161
|
+
setOp: function(dt, Wn, oi) {
|
|
35162
|
+
(Y !== dt || de !== Wn || Ue !== oi) && (i.stencilOp(dt, Wn, oi), Y = dt, de = Wn, Ue = oi);
|
|
35155
35163
|
},
|
|
35156
|
-
setLocked: function(
|
|
35157
|
-
D =
|
|
35164
|
+
setLocked: function(dt) {
|
|
35165
|
+
D = dt;
|
|
35158
35166
|
},
|
|
35159
|
-
setClear: function(
|
|
35160
|
-
Tt !==
|
|
35167
|
+
setClear: function(dt) {
|
|
35168
|
+
Tt !== dt && (i.clearStencil(dt), Tt = dt);
|
|
35161
35169
|
},
|
|
35162
35170
|
reset: function() {
|
|
35163
35171
|
D = !1, _e = null, ae = null, Se = null, ie = null, Y = null, de = null, Ue = null, Tt = null;
|
|
@@ -35180,7 +35188,7 @@ function hE(i, e) {
|
|
|
35180
35188
|
return Y;
|
|
35181
35189
|
}
|
|
35182
35190
|
const $ = {};
|
|
35183
|
-
$[i.TEXTURE_2D] = ft(i.TEXTURE_2D, i.TEXTURE_2D, 1), $[i.TEXTURE_CUBE_MAP] = ft(i.TEXTURE_CUBE_MAP, i.TEXTURE_CUBE_MAP_POSITIVE_X, 6), $[i.TEXTURE_2D_ARRAY] = ft(i.TEXTURE_2D_ARRAY, i.TEXTURE_2D_ARRAY, 1, 1), $[i.TEXTURE_3D] = ft(i.TEXTURE_3D, i.TEXTURE_3D, 1, 1), r.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), ne(i.DEPTH_TEST), a.setFunc(ar), He(!1), Nt(hh), ne(i.CULL_FACE),
|
|
35191
|
+
$[i.TEXTURE_2D] = ft(i.TEXTURE_2D, i.TEXTURE_2D, 1), $[i.TEXTURE_CUBE_MAP] = ft(i.TEXTURE_CUBE_MAP, i.TEXTURE_CUBE_MAP_POSITIVE_X, 6), $[i.TEXTURE_2D_ARRAY] = ft(i.TEXTURE_2D_ARRAY, i.TEXTURE_2D_ARRAY, 1, 1), $[i.TEXTURE_3D] = ft(i.TEXTURE_3D, i.TEXTURE_3D, 1, 1), r.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), ne(i.DEPTH_TEST), a.setFunc(ar), He(!1), Nt(hh), ne(i.CULL_FACE), lt(Ti);
|
|
35184
35192
|
function ne(D) {
|
|
35185
35193
|
d[D] !== !0 && (i.enable(D), d[D] = !0);
|
|
35186
35194
|
}
|
|
@@ -35230,14 +35238,14 @@ function hE(i, e) {
|
|
|
35230
35238
|
[k_]: i.CONSTANT_ALPHA,
|
|
35231
35239
|
[I_]: i.ONE_MINUS_CONSTANT_ALPHA
|
|
35232
35240
|
};
|
|
35233
|
-
function
|
|
35234
|
-
if (D ===
|
|
35241
|
+
function lt(D, _e, ae, Se, ie, Y, de, Ue, Tt, dt) {
|
|
35242
|
+
if (D === Ti) {
|
|
35235
35243
|
v === !0 && (Te(i.BLEND), v = !1);
|
|
35236
35244
|
return;
|
|
35237
35245
|
}
|
|
35238
35246
|
if (v === !1 && (ne(i.BLEND), v = !0), D !== m_) {
|
|
35239
|
-
if (D !== m ||
|
|
35240
|
-
if ((p !== us || b !== us) && (i.blendEquation(i.FUNC_ADD), p = us, b = us),
|
|
35247
|
+
if (D !== m || dt !== y) {
|
|
35248
|
+
if ((p !== us || b !== us) && (i.blendEquation(i.FUNC_ADD), p = us, b = us), dt)
|
|
35241
35249
|
switch (D) {
|
|
35242
35250
|
case Qs:
|
|
35243
35251
|
i.blendFuncSeparate(i.ONE, i.ONE_MINUS_SRC_ALPHA, i.ONE, i.ONE_MINUS_SRC_ALPHA);
|
|
@@ -35273,16 +35281,16 @@ function hE(i, e) {
|
|
|
35273
35281
|
nt("WebGLState: Invalid blending: ", D);
|
|
35274
35282
|
break;
|
|
35275
35283
|
}
|
|
35276
|
-
x = null, C = null, S = null, M = null, A.set(0, 0, 0), k = 0, m = D, y =
|
|
35284
|
+
x = null, C = null, S = null, M = null, A.set(0, 0, 0), k = 0, m = D, y = dt;
|
|
35277
35285
|
}
|
|
35278
35286
|
return;
|
|
35279
35287
|
}
|
|
35280
35288
|
ie = ie || _e, Y = Y || ae, de = de || Se, (_e !== p || ie !== b) && (i.blendEquationSeparate(Wt[_e], Wt[ie]), p = _e, b = ie), (ae !== x || Se !== C || Y !== S || de !== M) && (i.blendFuncSeparate(Ze[ae], Ze[Se], Ze[Y], Ze[de]), x = ae, C = Se, S = Y, M = de), (Ue.equals(A) === !1 || Tt !== k) && (i.blendColor(Ue.r, Ue.g, Ue.b, Tt), A.copy(Ue), k = Tt), m = D, y = !1;
|
|
35281
35289
|
}
|
|
35282
|
-
function
|
|
35283
|
-
D.side ===
|
|
35290
|
+
function _t(D, _e) {
|
|
35291
|
+
D.side === Si ? Te(i.CULL_FACE) : ne(i.CULL_FACE);
|
|
35284
35292
|
let ae = D.side === nn;
|
|
35285
|
-
_e && (ae = !ae), He(ae), D.blending === Qs && D.transparent === !1 ?
|
|
35293
|
+
_e && (ae = !ae), He(ae), D.blending === Qs && D.transparent === !1 ? lt(Ti) : lt(D.blending, D.blendEquation, D.blendSrc, D.blendDst, D.blendEquationAlpha, D.blendSrcAlpha, D.blendDstAlpha, D.blendColor, D.blendAlpha, D.premultipliedAlpha), a.setFunc(D.depthFunc), a.setTest(D.depthTest), a.setMask(D.depthWrite), r.setMask(D.colorWrite);
|
|
35286
35294
|
const Se = D.stencilWrite;
|
|
35287
35295
|
o.setTest(Se), Se && (o.setMask(D.stencilWriteMask), o.setFunc(D.stencilFunc, D.stencilRef, D.stencilFuncMask), o.setOp(D.stencilFail, D.stencilZFail, D.stencilZPass)), Ut(D.polygonOffset, D.polygonOffsetFactor, D.polygonOffsetUnits), D.alphaToCoverage === !0 ? ne(i.SAMPLE_ALPHA_TO_COVERAGE) : Te(i.SAMPLE_ALPHA_TO_COVERAGE);
|
|
35288
35296
|
}
|
|
@@ -35413,8 +35421,8 @@ function hE(i, e) {
|
|
|
35413
35421
|
bindFramebuffer: Ve,
|
|
35414
35422
|
drawBuffers: Me,
|
|
35415
35423
|
useProgram: et,
|
|
35416
|
-
setBlending:
|
|
35417
|
-
setMaterial:
|
|
35424
|
+
setBlending: lt,
|
|
35425
|
+
setMaterial: _t,
|
|
35418
35426
|
setFlipSided: He,
|
|
35419
35427
|
setCullFace: Nt,
|
|
35420
35428
|
setLineWidth: I,
|
|
@@ -35482,13 +35490,13 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35482
35490
|
let j = _;
|
|
35483
35491
|
if (_ === i.RED && (L === i.FLOAT && (j = i.R32F), L === i.HALF_FLOAT && (j = i.R16F), L === i.UNSIGNED_BYTE && (j = i.R8)), _ === i.RED_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.R8UI), L === i.UNSIGNED_SHORT && (j = i.R16UI), L === i.UNSIGNED_INT && (j = i.R32UI), L === i.BYTE && (j = i.R8I), L === i.SHORT && (j = i.R16I), L === i.INT && (j = i.R32I)), _ === i.RG && (L === i.FLOAT && (j = i.RG32F), L === i.HALF_FLOAT && (j = i.RG16F), L === i.UNSIGNED_BYTE && (j = i.RG8)), _ === i.RG_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.RG8UI), L === i.UNSIGNED_SHORT && (j = i.RG16UI), L === i.UNSIGNED_INT && (j = i.RG32UI), L === i.BYTE && (j = i.RG8I), L === i.SHORT && (j = i.RG16I), L === i.INT && (j = i.RG32I)), _ === i.RGB_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.RGB8UI), L === i.UNSIGNED_SHORT && (j = i.RGB16UI), L === i.UNSIGNED_INT && (j = i.RGB32UI), L === i.BYTE && (j = i.RGB8I), L === i.SHORT && (j = i.RGB16I), L === i.INT && (j = i.RGB32I)), _ === i.RGBA_INTEGER && (L === i.UNSIGNED_BYTE && (j = i.RGBA8UI), L === i.UNSIGNED_SHORT && (j = i.RGBA16UI), L === i.UNSIGNED_INT && (j = i.RGBA32UI), L === i.BYTE && (j = i.RGBA8I), L === i.SHORT && (j = i.RGBA16I), L === i.INT && (j = i.RGBA32I)), _ === i.RGB && (L === i.UNSIGNED_INT_5_9_9_9_REV && (j = i.RGB9_E5), L === i.UNSIGNED_INT_10F_11F_11F_REV && (j = i.R11F_G11F_B10F)), _ === i.RGBA) {
|
|
35484
35492
|
const Pe = Q ? so : Qe.getTransfer(X);
|
|
35485
|
-
L === i.FLOAT && (j = i.RGBA32F), L === i.HALF_FLOAT && (j = i.RGBA16F), L === i.UNSIGNED_BYTE && (j = Pe ===
|
|
35493
|
+
L === i.FLOAT && (j = i.RGBA32F), L === i.HALF_FLOAT && (j = i.RGBA16F), L === i.UNSIGNED_BYTE && (j = Pe === ht ? i.SRGB8_ALPHA8 : i.RGBA8), L === i.UNSIGNED_SHORT_4_4_4_4 && (j = i.RGBA4), L === i.UNSIGNED_SHORT_5_5_5_1 && (j = i.RGB5_A1);
|
|
35486
35494
|
}
|
|
35487
35495
|
return (j === i.R16F || j === i.R32F || j === i.RG16F || j === i.RG32F || j === i.RGBA16F || j === i.RGBA32F) && e.get("EXT_color_buffer_float"), j;
|
|
35488
35496
|
}
|
|
35489
35497
|
function b(w, _) {
|
|
35490
35498
|
let L;
|
|
35491
|
-
return w ? _ === null || _ ===
|
|
35499
|
+
return w ? _ === null || _ === ri || _ === Xr ? L = i.DEPTH24_STENCIL8 : _ === Jn ? L = i.DEPTH32F_STENCIL8 : _ === jr && (L = i.DEPTH24_STENCIL8, Oe("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : _ === null || _ === ri || _ === Xr ? L = i.DEPTH_COMPONENT24 : _ === Jn ? L = i.DEPTH_COMPONENT32F : _ === jr && (L = i.DEPTH_COMPONENT16), L;
|
|
35492
35500
|
}
|
|
35493
35501
|
function S(w, _) {
|
|
35494
35502
|
return m(w) === !0 || w.isFramebufferTexture && w.minFilter !== Yt && w.minFilter !== Qt ? Math.log2(Math.max(_.width, _.height)) + 1 : w.mipmaps !== void 0 && w.mipmaps.length > 0 ? w.mipmaps.length : w.isCompressedTexture && Array.isArray(w.image) ? _.mipmaps.length : 1;
|
|
@@ -35597,7 +35605,7 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35597
35605
|
}
|
|
35598
35606
|
const ge = {
|
|
35599
35607
|
[vl]: i.REPEAT,
|
|
35600
|
-
[
|
|
35608
|
+
[xi]: i.CLAMP_TO_EDGE,
|
|
35601
35609
|
[bl]: i.MIRRORED_REPEAT
|
|
35602
35610
|
}, le = {
|
|
35603
35611
|
[Yt]: i.NEAREST,
|
|
@@ -35617,8 +35625,8 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35617
35625
|
[H_]: i.NOTEQUAL
|
|
35618
35626
|
};
|
|
35619
35627
|
function Be(w, _) {
|
|
35620
|
-
if (_.type ===
|
|
35621
|
-
if (_.magFilter === Yt || _.minFilter !== aa && _.minFilter !== ps || _.type ===
|
|
35628
|
+
if (_.type === Jn && e.has("OES_texture_float_linear") === !1 && (_.magFilter === Qt || _.magFilter === $o || _.magFilter === aa || _.magFilter === ps || _.minFilter === Qt || _.minFilter === $o || _.minFilter === aa || _.minFilter === ps) && Oe("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), i.texParameteri(w, i.TEXTURE_WRAP_S, ge[_.wrapS]), i.texParameteri(w, i.TEXTURE_WRAP_T, ge[_.wrapT]), (w === i.TEXTURE_3D || w === i.TEXTURE_2D_ARRAY) && i.texParameteri(w, i.TEXTURE_WRAP_R, ge[_.wrapR]), i.texParameteri(w, i.TEXTURE_MAG_FILTER, le[_.magFilter]), i.texParameteri(w, i.TEXTURE_MIN_FILTER, le[_.minFilter]), _.compareFunction && (i.texParameteri(w, i.TEXTURE_COMPARE_MODE, i.COMPARE_REF_TO_TEXTURE), i.texParameteri(w, i.TEXTURE_COMPARE_FUNC, be[_.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
|
|
35629
|
+
if (_.magFilter === Yt || _.minFilter !== aa && _.minFilter !== ps || _.type === Jn && e.has("OES_texture_float_linear") === !1) return;
|
|
35622
35630
|
if (_.anisotropy > 1 || n.get(_).__currentAnisotropy) {
|
|
35623
35631
|
const L = e.get("EXT_texture_filter_anisotropic");
|
|
35624
35632
|
i.texParameterf(w, L.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(_.anisotropy, s.getMaxAnisotropy())), n.get(_).__currentAnisotropy = _.anisotropy;
|
|
@@ -35700,7 +35708,7 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35700
35708
|
if (_.isCompressedArrayTexture) {
|
|
35701
35709
|
D && _e && t.texStorage3D(i.TEXTURE_2D_ARRAY, Se, Re, We[0].width, We[0].height, se.depth);
|
|
35702
35710
|
for (let ie = 0, Y = We.length; ie < Y; ie++)
|
|
35703
|
-
if (he = We[ie], _.format !==
|
|
35711
|
+
if (he = We[ie], _.format !== Vn)
|
|
35704
35712
|
if (fe !== null)
|
|
35705
35713
|
if (D) {
|
|
35706
35714
|
if (ae)
|
|
@@ -35725,7 +35733,7 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35725
35733
|
} else {
|
|
35726
35734
|
D && _e && t.texStorage2D(i.TEXTURE_2D, Se, Re, We[0].width, We[0].height);
|
|
35727
35735
|
for (let ie = 0, Y = We.length; ie < Y; ie++)
|
|
35728
|
-
he = We[ie], _.format !==
|
|
35736
|
+
he = We[ie], _.format !== Vn ? fe !== null ? D ? ae && t.compressedTexSubImage2D(i.TEXTURE_2D, ie, 0, 0, he.width, he.height, fe, he.data) : t.compressedTexImage2D(i.TEXTURE_2D, ie, Re, he.width, he.height, 0, he.data) : Oe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : D ? ae && t.texSubImage2D(i.TEXTURE_2D, ie, 0, 0, he.width, he.height, fe, Ee, he.data) : t.texImage2D(i.TEXTURE_2D, ie, Re, he.width, he.height, 0, fe, Ee, he.data);
|
|
35729
35737
|
}
|
|
35730
35738
|
else if (_.isDataArrayTexture)
|
|
35731
35739
|
if (D) {
|
|
@@ -35797,7 +35805,7 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35797
35805
|
ie = fe[Y].mipmaps;
|
|
35798
35806
|
for (let de = 0; de < ie.length; de++) {
|
|
35799
35807
|
const Ue = ie[de];
|
|
35800
|
-
_.format !==
|
|
35808
|
+
_.format !== Vn ? Re !== null ? D ? ae && t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Y, de, 0, 0, Ue.width, Ue.height, Re, Ue.data) : t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Y, de, We, Ue.width, Ue.height, 0, Ue.data) : Oe("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : D ? ae && t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Y, de, 0, 0, Ue.width, Ue.height, Re, he, Ue.data) : t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Y, de, We, Ue.width, Ue.height, 0, Re, he, Ue.data);
|
|
35801
35809
|
}
|
|
35802
35810
|
}
|
|
35803
35811
|
} else {
|
|
@@ -35856,14 +35864,14 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35856
35864
|
Q.__webglTexture = i.createTexture(), t.bindTexture(i.TEXTURE_CUBE_MAP, Q.__webglTexture), Be(i.TEXTURE_CUBE_MAP, _.depthTexture);
|
|
35857
35865
|
const Ne = r.convert(_.depthTexture.format), se = r.convert(_.depthTexture.type);
|
|
35858
35866
|
let fe;
|
|
35859
|
-
_.depthTexture.format ===
|
|
35867
|
+
_.depthTexture.format === Ai ? fe = i.DEPTH_COMPONENT24 : _.depthTexture.format === ms && (fe = i.DEPTH24_STENCIL8);
|
|
35860
35868
|
for (let Ee = 0; Ee < 6; Ee++)
|
|
35861
35869
|
i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Ee, 0, fe, _.width, _.height, 0, Ne, se, null);
|
|
35862
35870
|
}
|
|
35863
35871
|
} else
|
|
35864
35872
|
K(_.depthTexture, 0);
|
|
35865
35873
|
const j = Q.__webglTexture, Pe = I(_), ue = X ? i.TEXTURE_CUBE_MAP_POSITIVE_X + L : i.TEXTURE_2D, we = _.depthTexture.format === ms ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT;
|
|
35866
|
-
if (_.depthTexture.format ===
|
|
35874
|
+
if (_.depthTexture.format === Ai)
|
|
35867
35875
|
Ut(_) ? o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER, we, ue, j, 0, Pe) : i.framebufferTexture2D(i.FRAMEBUFFER, we, ue, j, 0);
|
|
35868
35876
|
else if (_.depthTexture.format === ms)
|
|
35869
35877
|
Ut(_) ? o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER, we, ue, j, 0, Pe) : i.framebufferTexture2D(i.FRAMEBUFFER, we, ue, j, 0);
|
|
@@ -35977,7 +35985,7 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35977
35985
|
}
|
|
35978
35986
|
w.depthBuffer && et(w);
|
|
35979
35987
|
}
|
|
35980
|
-
function
|
|
35988
|
+
function lt(w) {
|
|
35981
35989
|
const _ = w.textures;
|
|
35982
35990
|
for (let L = 0, X = _.length; L < X; L++) {
|
|
35983
35991
|
const Q = _[L];
|
|
@@ -35987,7 +35995,7 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
35987
35995
|
}
|
|
35988
35996
|
}
|
|
35989
35997
|
}
|
|
35990
|
-
const
|
|
35998
|
+
const _t = [], He = [];
|
|
35991
35999
|
function Nt(w) {
|
|
35992
36000
|
if (w.samples > 0) {
|
|
35993
36001
|
if (Ut(w) === !1) {
|
|
@@ -36006,7 +36014,7 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
36006
36014
|
const se = n.get(_[Ne]).__webglTexture;
|
|
36007
36015
|
i.framebufferTexture2D(i.DRAW_FRAMEBUFFER, i.COLOR_ATTACHMENT0, i.TEXTURE_2D, se, 0);
|
|
36008
36016
|
}
|
|
36009
|
-
i.blitFramebuffer(0, 0, L, X, 0, 0, L, X, Q, i.NEAREST), c === !0 && (
|
|
36017
|
+
i.blitFramebuffer(0, 0, L, X, 0, 0, L, X, Q, i.NEAREST), c === !0 && (_t.length = 0, He.length = 0, _t.push(i.COLOR_ATTACHMENT0 + Ne), w.depthBuffer && w.resolveDepthBuffer === !1 && (_t.push(j), He.push(j), i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER, He)), i.invalidateFramebuffer(i.READ_FRAMEBUFFER, _t));
|
|
36010
36018
|
}
|
|
36011
36019
|
if (t.bindFramebuffer(i.READ_FRAMEBUFFER, null), t.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), ue)
|
|
36012
36020
|
for (let Ne = 0; Ne < _.length; Ne++) {
|
|
@@ -36034,12 +36042,12 @@ function fE(i, e, t, n, s, r, a) {
|
|
|
36034
36042
|
}
|
|
36035
36043
|
function xt(w, _) {
|
|
36036
36044
|
const L = w.colorSpace, X = w.format, Q = w.type;
|
|
36037
|
-
return w.isCompressedTexture === !0 || w.isVideoTexture === !0 || L !== lr && L !== Wi && (Qe.getTransfer(L) ===
|
|
36045
|
+
return w.isCompressedTexture === !0 || w.isVideoTexture === !0 || L !== lr && L !== Wi && (Qe.getTransfer(L) === ht ? (X !== Vn || Q !== Mn) && Oe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : nt("WebGLTextures: Unsupported texture color space:", L)), _;
|
|
36038
36046
|
}
|
|
36039
36047
|
function Ae(w) {
|
|
36040
36048
|
return typeof HTMLImageElement < "u" && w instanceof HTMLImageElement ? (l.width = w.naturalWidth || w.width, l.height = w.naturalHeight || w.height) : typeof VideoFrame < "u" && w instanceof VideoFrame ? (l.width = w.displayWidth, l.height = w.displayHeight) : (l.width = w.width, l.height = w.height), l;
|
|
36041
36049
|
}
|
|
36042
|
-
this.allocateTextureUnit = F, this.resetTextureUnits = U, this.setTexture2D = K, this.setTexture2DArray = H, this.setTexture3D = W, this.setTextureCube = ee, this.rebindTextures = Wt, this.setupRenderTarget = Ze, this.updateRenderTargetMipmap =
|
|
36050
|
+
this.allocateTextureUnit = F, this.resetTextureUnits = U, this.setTexture2D = K, this.setTexture2DArray = H, this.setTexture3D = W, this.setTextureCube = ee, this.rebindTextures = Wt, this.setupRenderTarget = Ze, this.updateRenderTargetMipmap = lt, this.updateMultisampleRenderTarget = Nt, this.setupDepthRenderbuffer = et, this.setupFrameBufferTexture = Te, this.useMultisampledRTT = Ut, this.isReversedDepthBuffer = function() {
|
|
36043
36051
|
return t.buffers.depth.getReversed();
|
|
36044
36052
|
};
|
|
36045
36053
|
}
|
|
@@ -36056,13 +36064,13 @@ function pE(i, e) {
|
|
|
36056
36064
|
if (n === hm) return i.SHORT;
|
|
36057
36065
|
if (n === jr) return i.UNSIGNED_SHORT;
|
|
36058
36066
|
if (n === Pd) return i.INT;
|
|
36059
|
-
if (n ===
|
|
36060
|
-
if (n ===
|
|
36061
|
-
if (n ===
|
|
36067
|
+
if (n === ri) return i.UNSIGNED_INT;
|
|
36068
|
+
if (n === Jn) return i.FLOAT;
|
|
36069
|
+
if (n === wi) return i.HALF_FLOAT;
|
|
36062
36070
|
if (n === mm) return i.ALPHA;
|
|
36063
36071
|
if (n === gm) return i.RGB;
|
|
36064
|
-
if (n ===
|
|
36065
|
-
if (n ===
|
|
36072
|
+
if (n === Vn) return i.RGBA;
|
|
36073
|
+
if (n === Ai) return i.DEPTH_COMPONENT;
|
|
36066
36074
|
if (n === ms) return i.DEPTH_STENCIL;
|
|
36067
36075
|
if (n === vm) return i.RED;
|
|
36068
36076
|
if (n === Dd) return i.RED_INTEGER;
|
|
@@ -36070,7 +36078,7 @@ function pE(i, e) {
|
|
|
36070
36078
|
if (n === Ld) return i.RG_INTEGER;
|
|
36071
36079
|
if (n === Nd) return i.RGBA_INTEGER;
|
|
36072
36080
|
if (n === Ga || n === Ha || n === Wa || n === qa)
|
|
36073
|
-
if (a ===
|
|
36081
|
+
if (a === ht)
|
|
36074
36082
|
if (r = e.get("WEBGL_compressed_texture_s3tc_srgb"), r !== null) {
|
|
36075
36083
|
if (n === Ga) return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;
|
|
36076
36084
|
if (n === Ha) return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
|
|
@@ -36095,8 +36103,8 @@ function pE(i, e) {
|
|
|
36095
36103
|
return null;
|
|
36096
36104
|
if (n === Tl || n === Cl || n === El || n === Ml || n === wl || n === Al || n === Rl)
|
|
36097
36105
|
if (r = e.get("WEBGL_compressed_texture_etc"), r !== null) {
|
|
36098
|
-
if (n === Tl || n === Cl) return a ===
|
|
36099
|
-
if (n === El) return a ===
|
|
36106
|
+
if (n === Tl || n === Cl) return a === ht ? r.COMPRESSED_SRGB8_ETC2 : r.COMPRESSED_RGB8_ETC2;
|
|
36107
|
+
if (n === El) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : r.COMPRESSED_RGBA8_ETC2_EAC;
|
|
36100
36108
|
if (n === Ml) return r.COMPRESSED_R11_EAC;
|
|
36101
36109
|
if (n === wl) return r.COMPRESSED_SIGNED_R11_EAC;
|
|
36102
36110
|
if (n === Al) return r.COMPRESSED_RG11_EAC;
|
|
@@ -36105,25 +36113,25 @@ function pE(i, e) {
|
|
|
36105
36113
|
return null;
|
|
36106
36114
|
if (n === Pl || n === kl || n === Il || n === Dl || n === Ll || n === Nl || n === Ul || n === Ol || n === Fl || n === Bl || n === Vl || n === zl || n === Gl || n === Hl)
|
|
36107
36115
|
if (r = e.get("WEBGL_compressed_texture_astc"), r !== null) {
|
|
36108
|
-
if (n === Pl) return a ===
|
|
36109
|
-
if (n === kl) return a ===
|
|
36110
|
-
if (n === Il) return a ===
|
|
36111
|
-
if (n === Dl) return a ===
|
|
36112
|
-
if (n === Ll) return a ===
|
|
36113
|
-
if (n === Nl) return a ===
|
|
36114
|
-
if (n === Ul) return a ===
|
|
36115
|
-
if (n === Ol) return a ===
|
|
36116
|
-
if (n === Fl) return a ===
|
|
36117
|
-
if (n === Bl) return a ===
|
|
36118
|
-
if (n === Vl) return a ===
|
|
36119
|
-
if (n === zl) return a ===
|
|
36120
|
-
if (n === Gl) return a ===
|
|
36121
|
-
if (n === Hl) return a ===
|
|
36116
|
+
if (n === Pl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : r.COMPRESSED_RGBA_ASTC_4x4_KHR;
|
|
36117
|
+
if (n === kl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : r.COMPRESSED_RGBA_ASTC_5x4_KHR;
|
|
36118
|
+
if (n === Il) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : r.COMPRESSED_RGBA_ASTC_5x5_KHR;
|
|
36119
|
+
if (n === Dl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : r.COMPRESSED_RGBA_ASTC_6x5_KHR;
|
|
36120
|
+
if (n === Ll) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : r.COMPRESSED_RGBA_ASTC_6x6_KHR;
|
|
36121
|
+
if (n === Nl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : r.COMPRESSED_RGBA_ASTC_8x5_KHR;
|
|
36122
|
+
if (n === Ul) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : r.COMPRESSED_RGBA_ASTC_8x6_KHR;
|
|
36123
|
+
if (n === Ol) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : r.COMPRESSED_RGBA_ASTC_8x8_KHR;
|
|
36124
|
+
if (n === Fl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : r.COMPRESSED_RGBA_ASTC_10x5_KHR;
|
|
36125
|
+
if (n === Bl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : r.COMPRESSED_RGBA_ASTC_10x6_KHR;
|
|
36126
|
+
if (n === Vl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : r.COMPRESSED_RGBA_ASTC_10x8_KHR;
|
|
36127
|
+
if (n === zl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : r.COMPRESSED_RGBA_ASTC_10x10_KHR;
|
|
36128
|
+
if (n === Gl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : r.COMPRESSED_RGBA_ASTC_12x10_KHR;
|
|
36129
|
+
if (n === Hl) return a === ht ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : r.COMPRESSED_RGBA_ASTC_12x12_KHR;
|
|
36122
36130
|
} else
|
|
36123
36131
|
return null;
|
|
36124
36132
|
if (n === Wl || n === ql || n === jl)
|
|
36125
36133
|
if (r = e.get("EXT_texture_compression_bptc"), r !== null) {
|
|
36126
|
-
if (n === Wl) return a ===
|
|
36134
|
+
if (n === Wl) return a === ht ? r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : r.COMPRESSED_RGBA_BPTC_UNORM_EXT;
|
|
36127
36135
|
if (n === ql) return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
|
|
36128
36136
|
if (n === jl) return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT;
|
|
36129
36137
|
} else
|
|
@@ -36201,7 +36209,7 @@ class vE {
|
|
|
36201
36209
|
depthHeight: { value: t.w }
|
|
36202
36210
|
}
|
|
36203
36211
|
});
|
|
36204
|
-
this.mesh = new
|
|
36212
|
+
this.mesh = new Gn(new bo(20, 20), n);
|
|
36205
36213
|
}
|
|
36206
36214
|
return this.mesh;
|
|
36207
36215
|
}
|
|
@@ -36289,17 +36297,17 @@ class bE extends ur {
|
|
|
36289
36297
|
if (s = $, s !== null) {
|
|
36290
36298
|
if (C = e.getRenderTarget(), s.addEventListener("select", K), s.addEventListener("selectstart", K), s.addEventListener("selectend", K), s.addEventListener("squeeze", K), s.addEventListener("squeezestart", K), s.addEventListener("squeezeend", K), s.addEventListener("end", H), s.addEventListener("inputsourceschange", W), x.xrCompatible !== !0 && await t.makeXRCompatible(), k = e.getPixelRatio(), e.getSize(A), v && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
36291
36299
|
let Te = null, Ve = null, Me = null;
|
|
36292
|
-
x.depth && (Me = x.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, Te = x.stencil ? ms :
|
|
36300
|
+
x.depth && (Me = x.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, Te = x.stencil ? ms : Ai, Ve = x.stencil ? Xr : ri);
|
|
36293
36301
|
const et = {
|
|
36294
36302
|
colorFormat: t.RGBA8,
|
|
36295
36303
|
depthFormat: Me,
|
|
36296
36304
|
scaleFactor: r
|
|
36297
36305
|
};
|
|
36298
|
-
u = this.getBinding(), h = u.createProjectionLayer(et), s.updateRenderState({ layers: [h] }), e.setPixelRatio(1), e.setSize(h.textureWidth, h.textureHeight, !1), b = new
|
|
36306
|
+
u = this.getBinding(), h = u.createProjectionLayer(et), s.updateRenderState({ layers: [h] }), e.setPixelRatio(1), e.setSize(h.textureWidth, h.textureHeight, !1), b = new ti(
|
|
36299
36307
|
h.textureWidth,
|
|
36300
36308
|
h.textureHeight,
|
|
36301
36309
|
{
|
|
36302
|
-
format:
|
|
36310
|
+
format: Vn,
|
|
36303
36311
|
type: Mn,
|
|
36304
36312
|
depthTexture: new Kr(h.textureWidth, h.textureHeight, Ve, void 0, void 0, void 0, void 0, void 0, void 0, Te),
|
|
36305
36313
|
stencilBuffer: x.stencil,
|
|
@@ -36317,11 +36325,11 @@ class bE extends ur {
|
|
|
36317
36325
|
stencil: x.stencil,
|
|
36318
36326
|
framebufferScaleFactor: r
|
|
36319
36327
|
};
|
|
36320
|
-
f = new XRWebGLLayer(s, t, Te), s.updateRenderState({ baseLayer: f }), e.setPixelRatio(1), e.setSize(f.framebufferWidth, f.framebufferHeight, !1), b = new
|
|
36328
|
+
f = new XRWebGLLayer(s, t, Te), s.updateRenderState({ baseLayer: f }), e.setPixelRatio(1), e.setSize(f.framebufferWidth, f.framebufferHeight, !1), b = new ti(
|
|
36321
36329
|
f.framebufferWidth,
|
|
36322
36330
|
f.framebufferHeight,
|
|
36323
36331
|
{
|
|
36324
|
-
format:
|
|
36332
|
+
format: Vn,
|
|
36325
36333
|
type: Mn,
|
|
36326
36334
|
colorSpace: e.outputColorSpace,
|
|
36327
36335
|
stencilBuffer: x.stencil,
|
|
@@ -36364,11 +36372,11 @@ class bE extends ur {
|
|
|
36364
36372
|
const ee = new B(), ge = new B();
|
|
36365
36373
|
function le($, ne, Te) {
|
|
36366
36374
|
ee.setFromMatrixPosition(ne.matrixWorld), ge.setFromMatrixPosition(Te.matrixWorld);
|
|
36367
|
-
const Ve = ee.distanceTo(ge), Me = ne.projectionMatrix.elements, et = Te.projectionMatrix.elements, Wt = Me[14] / (Me[10] - 1), Ze = Me[14] / (Me[10] + 1),
|
|
36375
|
+
const Ve = ee.distanceTo(ge), Me = ne.projectionMatrix.elements, et = Te.projectionMatrix.elements, Wt = Me[14] / (Me[10] - 1), Ze = Me[14] / (Me[10] + 1), lt = (Me[9] + 1) / Me[5], _t = (Me[9] - 1) / Me[5], He = (Me[8] - 1) / Me[0], Nt = (et[8] + 1) / et[0], I = Wt * He, Ut = Wt * Nt, rt = Ve / (-He + Nt), xt = rt * -He;
|
|
36368
36376
|
if (ne.matrixWorld.decompose($.position, $.quaternion, $.scale), $.translateX(xt), $.translateZ(rt), $.matrixWorld.compose($.position, $.quaternion, $.scale), $.matrixWorldInverse.copy($.matrixWorld).invert(), Me[10] === -1)
|
|
36369
36377
|
$.projectionMatrix.copy(ne.projectionMatrix), $.projectionMatrixInverse.copy(ne.projectionMatrixInverse);
|
|
36370
36378
|
else {
|
|
36371
|
-
const Ae = Wt + rt, w = Ze + rt, _ = I - xt, L = Ut + (Ve - xt), X =
|
|
36379
|
+
const Ae = Wt + rt, w = Ze + rt, _ = I - xt, L = Ut + (Ve - xt), X = lt * Ze / w * Ae, Q = _t * Ze / w * Ae;
|
|
36372
36380
|
$.projectionMatrix.makePerspective(_, L, X, Q, Ae, w), $.projectionMatrixInverse.copy($.projectionMatrix).invert();
|
|
36373
36381
|
}
|
|
36374
36382
|
}
|
|
@@ -36413,20 +36421,20 @@ class bE extends ur {
|
|
|
36413
36421
|
let Ve = !1;
|
|
36414
36422
|
Te.length !== U.cameras.length && (U.cameras.length = 0, Ve = !0);
|
|
36415
36423
|
for (let Ze = 0; Ze < Te.length; Ze++) {
|
|
36416
|
-
const
|
|
36417
|
-
let
|
|
36424
|
+
const lt = Te[Ze];
|
|
36425
|
+
let _t = null;
|
|
36418
36426
|
if (f !== null)
|
|
36419
|
-
|
|
36427
|
+
_t = f.getViewport(lt);
|
|
36420
36428
|
else {
|
|
36421
|
-
const Nt = u.getViewSubImage(h,
|
|
36422
|
-
|
|
36429
|
+
const Nt = u.getViewSubImage(h, lt);
|
|
36430
|
+
_t = Nt.viewport, Ze === 0 && (e.setRenderTargetTextures(
|
|
36423
36431
|
b,
|
|
36424
36432
|
Nt.colorTexture,
|
|
36425
36433
|
Nt.depthStencilTexture
|
|
36426
36434
|
), e.setRenderTarget(b));
|
|
36427
36435
|
}
|
|
36428
36436
|
let He = R[Ze];
|
|
36429
|
-
He === void 0 && (He = new En(), He.layers.enable(Ze), He.viewport = new Lt(), R[Ze] = He), He.matrix.fromArray(
|
|
36437
|
+
He === void 0 && (He = new En(), He.layers.enable(Ze), He.viewport = new Lt(), R[Ze] = He), He.matrix.fromArray(lt.transform.matrix), He.matrix.decompose(He.position, He.quaternion, He.scale), He.projectionMatrix.fromArray(lt.projectionMatrix), He.projectionMatrixInverse.copy(He.projectionMatrix).invert(), He.viewport.set(_t.x, _t.y, _t.width, _t.height), Ze === 0 && (U.matrix.copy(He.matrix), U.matrix.decompose(U.position, U.quaternion, U.scale)), Ve === !0 && U.cameras.push(He);
|
|
36430
36438
|
}
|
|
36431
36439
|
const Me = s.enabledFeatures;
|
|
36432
36440
|
if (Me && Me.includes("depth-sensing") && s.depthUsage == "gpu-optimized" && v) {
|
|
@@ -36437,12 +36445,12 @@ class bE extends ur {
|
|
|
36437
36445
|
if (Me && Me.includes("camera-access") && v) {
|
|
36438
36446
|
e.state.unbindTexture(), u = n.getBinding();
|
|
36439
36447
|
for (let Ze = 0; Ze < Te.length; Ze++) {
|
|
36440
|
-
const
|
|
36441
|
-
if (
|
|
36442
|
-
let
|
|
36443
|
-
|
|
36444
|
-
const He = u.getCameraImage(
|
|
36445
|
-
|
|
36448
|
+
const lt = Te[Ze].camera;
|
|
36449
|
+
if (lt) {
|
|
36450
|
+
let _t = p[lt];
|
|
36451
|
+
_t || (_t = new Pm(), p[lt] = _t);
|
|
36452
|
+
const He = u.getCameraImage(lt);
|
|
36453
|
+
_t.sourceTexture = He;
|
|
36446
36454
|
}
|
|
36447
36455
|
}
|
|
36448
36456
|
}
|
|
@@ -36460,7 +36468,7 @@ class bE extends ur {
|
|
|
36460
36468
|
};
|
|
36461
36469
|
}
|
|
36462
36470
|
}
|
|
36463
|
-
const os = /* @__PURE__ */ new
|
|
36471
|
+
const os = /* @__PURE__ */ new Ri(), _E = /* @__PURE__ */ new Vt();
|
|
36464
36472
|
function yE(i, e) {
|
|
36465
36473
|
function t(m, p) {
|
|
36466
36474
|
m.matrixAutoUpdate === !0 && m.updateMatrix(), p.value.copy(m.matrix);
|
|
@@ -37130,9 +37138,9 @@ const xE = new Uint16Array([
|
|
|
37130
37138
|
13702,
|
|
37131
37139
|
1183
|
|
37132
37140
|
]);
|
|
37133
|
-
let
|
|
37141
|
+
let qn = null;
|
|
37134
37142
|
function TE() {
|
|
37135
|
-
return
|
|
37143
|
+
return qn === null && (qn = new _y(xE, 16, 16, cr, wi), qn.name = "DFG_LUT", qn.minFilter = Qt, qn.magFilter = Qt, qn.wrapS = xi, qn.wrapT = xi, qn.generateMipmaps = !1, qn.needsUpdate = !0), qn;
|
|
37136
37144
|
}
|
|
37137
37145
|
class CE {
|
|
37138
37146
|
/**
|
|
@@ -37169,7 +37177,7 @@ class CE {
|
|
|
37169
37177
|
Dd
|
|
37170
37178
|
]), p = /* @__PURE__ */ new Set([
|
|
37171
37179
|
Mn,
|
|
37172
|
-
|
|
37180
|
+
ri,
|
|
37173
37181
|
jr,
|
|
37174
37182
|
Xr,
|
|
37175
37183
|
kd,
|
|
@@ -37189,7 +37197,7 @@ class CE {
|
|
|
37189
37197
|
* @type {?Function}
|
|
37190
37198
|
*/
|
|
37191
37199
|
onShaderError: null
|
|
37192
|
-
}, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping =
|
|
37200
|
+
}, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping = ei, this.toneMappingExposure = 1, this.transmissionResolutionScale = 1;
|
|
37193
37201
|
const y = this;
|
|
37194
37202
|
let T = !1;
|
|
37195
37203
|
this._outputColorSpace = Cn;
|
|
@@ -37202,7 +37210,7 @@ class CE {
|
|
|
37202
37210
|
let Te = !1;
|
|
37203
37211
|
const Ve = new Rm();
|
|
37204
37212
|
let Me = !1, et = !1;
|
|
37205
|
-
const Wt = new Vt(), Ze = new B(),
|
|
37213
|
+
const Wt = new Vt(), Ze = new B(), lt = new Lt(), _t = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
|
|
37206
37214
|
let He = !1;
|
|
37207
37215
|
function Nt() {
|
|
37208
37216
|
return F === null ? Fe : 1;
|
|
@@ -37222,7 +37230,7 @@ class CE {
|
|
|
37222
37230
|
powerPreference: d,
|
|
37223
37231
|
failIfMajorPerformanceCaveat: u
|
|
37224
37232
|
};
|
|
37225
|
-
if ("setAttribute" in t && t.setAttribute("data-engine", `three.js r${Rd}`), t.addEventListener("webglcontextlost", Ue, !1), t.addEventListener("webglcontextrestored", Tt, !1), t.addEventListener("webglcontextcreationerror",
|
|
37233
|
+
if ("setAttribute" in t && t.setAttribute("data-engine", `three.js r${Rd}`), t.addEventListener("webglcontextlost", Ue, !1), t.addEventListener("webglcontextrestored", Tt, !1), t.addEventListener("webglcontextcreationerror", dt, !1), I === null) {
|
|
37226
37234
|
const N = "webgl2";
|
|
37227
37235
|
if (I = Ut(N, E), I === null)
|
|
37228
37236
|
throw Ut(N) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
|
|
@@ -37323,7 +37331,7 @@ class CE {
|
|
|
37323
37331
|
}, this.clearStencil = function() {
|
|
37324
37332
|
this.clear(!1, !1, !0);
|
|
37325
37333
|
}, this.dispose = function() {
|
|
37326
|
-
t.removeEventListener("webglcontextlost", Ue, !1), t.removeEventListener("webglcontextrestored", Tt, !1), t.removeEventListener("webglcontextcreationerror",
|
|
37334
|
+
t.removeEventListener("webglcontextlost", Ue, !1), t.removeEventListener("webglcontextrestored", Tt, !1), t.removeEventListener("webglcontextcreationerror", dt, !1), he.dispose(), se.dispose(), fe.dispose(), _.dispose(), X.dispose(), Q.dispose(), ue.dispose(), Se.dispose(), ie.dispose(), we.dispose(), de.dispose(), de.removeEventListener("sessionstart", Xd), de.removeEventListener("sessionend", $d), Qi.stop();
|
|
37327
37335
|
};
|
|
37328
37336
|
function Ue(E) {
|
|
37329
37337
|
E.preventDefault(), _h("WebGLRenderer: Context Lost."), T = !0;
|
|
@@ -37333,14 +37341,14 @@ class CE {
|
|
|
37333
37341
|
const E = w.autoReset, N = Re.enabled, G = Re.autoUpdate, V = Re.needsUpdate, O = Re.type;
|
|
37334
37342
|
Y(), w.autoReset = E, Re.enabled = N, Re.autoUpdate = G, Re.needsUpdate = V, Re.type = O;
|
|
37335
37343
|
}
|
|
37336
|
-
function
|
|
37344
|
+
function dt(E) {
|
|
37337
37345
|
nt("WebGLRenderer: A WebGL context could not be created. Reason: ", E.statusMessage);
|
|
37338
37346
|
}
|
|
37339
|
-
function
|
|
37347
|
+
function Wn(E) {
|
|
37340
37348
|
const N = E.target;
|
|
37341
|
-
N.removeEventListener("dispose",
|
|
37349
|
+
N.removeEventListener("dispose", Wn), oi(N);
|
|
37342
37350
|
}
|
|
37343
|
-
function
|
|
37351
|
+
function oi(E) {
|
|
37344
37352
|
Om(E), _.remove(E);
|
|
37345
37353
|
}
|
|
37346
37354
|
function Om(E) {
|
|
@@ -37350,7 +37358,7 @@ class CE {
|
|
|
37350
37358
|
}), E.isShaderMaterial && we.releaseShaderCache(E));
|
|
37351
37359
|
}
|
|
37352
37360
|
this.renderBufferDirect = function(E, N, G, V, O, pe) {
|
|
37353
|
-
N === null && (N =
|
|
37361
|
+
N === null && (N = _t);
|
|
37354
37362
|
const xe = O.isMesh && O.matrixWorld.determinant() < 0, ve = Bm(E, N, G, V, O);
|
|
37355
37363
|
Ae.setMaterial(V, xe);
|
|
37356
37364
|
let Ce = G.index, ke = 1;
|
|
@@ -37364,33 +37372,33 @@ class CE {
|
|
|
37364
37372
|
const At = pt - je;
|
|
37365
37373
|
if (At < 0 || At === 1 / 0) return;
|
|
37366
37374
|
Se.setup(O, V, ve, G, Ce);
|
|
37367
|
-
let Rt,
|
|
37368
|
-
if (Ce !== null && (Rt = j.get(Ce),
|
|
37369
|
-
V.wireframe === !0 ? (Ae.setLineWidth(V.wireframeLinewidth * Nt()),
|
|
37375
|
+
let Rt, yt = D;
|
|
37376
|
+
if (Ce !== null && (Rt = j.get(Ce), yt = _e, yt.setIndex(Rt)), O.isMesh)
|
|
37377
|
+
V.wireframe === !0 ? (Ae.setLineWidth(V.wireframeLinewidth * Nt()), yt.setMode(I.LINES)) : yt.setMode(I.TRIANGLES);
|
|
37370
37378
|
else if (O.isLine) {
|
|
37371
37379
|
let De = V.linewidth;
|
|
37372
|
-
De === void 0 && (De = 1), Ae.setLineWidth(De * Nt()), O.isLineSegments ?
|
|
37373
|
-
} else O.isPoints ?
|
|
37380
|
+
De === void 0 && (De = 1), Ae.setLineWidth(De * Nt()), O.isLineSegments ? yt.setMode(I.LINES) : O.isLineLoop ? yt.setMode(I.LINE_LOOP) : yt.setMode(I.LINE_STRIP);
|
|
37381
|
+
} else O.isPoints ? yt.setMode(I.POINTS) : O.isSprite && yt.setMode(I.TRIANGLES);
|
|
37374
37382
|
if (O.isBatchedMesh)
|
|
37375
37383
|
if (O._multiDrawInstances !== null)
|
|
37376
|
-
$r("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),
|
|
37384
|
+
$r("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), yt.renderMultiDrawInstances(O._multiDrawStarts, O._multiDrawCounts, O._multiDrawCount, O._multiDrawInstances);
|
|
37377
37385
|
else if (rt.get("WEBGL_multi_draw"))
|
|
37378
|
-
|
|
37386
|
+
yt.renderMultiDraw(O._multiDrawStarts, O._multiDrawCounts, O._multiDrawCount);
|
|
37379
37387
|
else {
|
|
37380
|
-
const De = O._multiDrawStarts,
|
|
37388
|
+
const De = O._multiDrawStarts, ut = O._multiDrawCounts, tt = O._multiDrawCount, pn = Ce ? j.get(Ce).bytesPerElement : 1, Es = _.get(V).currentProgram.getUniforms();
|
|
37381
37389
|
for (let mn = 0; mn < tt; mn++)
|
|
37382
|
-
Es.setValue(I, "_gl_DrawID", mn),
|
|
37390
|
+
Es.setValue(I, "_gl_DrawID", mn), yt.render(De[mn] / pn, ut[mn]);
|
|
37383
37391
|
}
|
|
37384
37392
|
else if (O.isInstancedMesh)
|
|
37385
|
-
|
|
37393
|
+
yt.renderInstances(je, At, O.count);
|
|
37386
37394
|
else if (G.isInstancedBufferGeometry) {
|
|
37387
|
-
const De = G._maxInstanceCount !== void 0 ? G._maxInstanceCount : 1 / 0,
|
|
37388
|
-
|
|
37395
|
+
const De = G._maxInstanceCount !== void 0 ? G._maxInstanceCount : 1 / 0, ut = Math.min(G.instanceCount, De);
|
|
37396
|
+
yt.renderInstances(je, At, ut);
|
|
37389
37397
|
} else
|
|
37390
|
-
|
|
37398
|
+
yt.render(je, At);
|
|
37391
37399
|
};
|
|
37392
37400
|
function jd(E, N, G) {
|
|
37393
|
-
E.transparent === !0 && E.side ===
|
|
37401
|
+
E.transparent === !0 && E.side === Si && E.forceSinglePass === !1 ? (E.side = nn, E.needsUpdate = !0, ia(E, N, G), E.side = Mi, E.needsUpdate = !0, ia(E, N, G), E.side = Si) : ia(E, N, G);
|
|
37394
37402
|
}
|
|
37395
37403
|
this.compile = function(E, N, G = null) {
|
|
37396
37404
|
G === null && (G = E), S = fe.get(G), S.init(N), A.push(S), G.traverseVisible(function(O) {
|
|
@@ -37447,7 +37455,7 @@ class CE {
|
|
|
37447
37455
|
}
|
|
37448
37456
|
if (T === !0) return;
|
|
37449
37457
|
const G = de.enabled === !0 && de.isPresenting === !0, V = k !== null && (F === null || G) && k.begin(y, F);
|
|
37450
|
-
if (E.matrixWorldAutoUpdate === !0 && E.updateMatrixWorld(), N.parent === null && N.matrixWorldAutoUpdate === !0 && N.updateMatrixWorld(), de.enabled === !0 && de.isPresenting === !0 && (k === null || k.isCompositing() === !1) && (de.cameraAutoUpdate === !0 && de.updateCamera(N), N = de.getCamera()), E.isScene === !0 && E.onBeforeRender(y, E, N, F), S = fe.get(E, A.length), S.init(N), A.push(S), Wt.multiplyMatrices(N.projectionMatrix, N.matrixWorldInverse), Ve.setFromProjectionMatrix(Wt,
|
|
37458
|
+
if (E.matrixWorldAutoUpdate === !0 && E.updateMatrixWorld(), N.parent === null && N.matrixWorldAutoUpdate === !0 && N.updateMatrixWorld(), de.enabled === !0 && de.isPresenting === !0 && (k === null || k.isCompositing() === !1) && (de.cameraAutoUpdate === !0 && de.updateCamera(N), N = de.getCamera()), E.isScene === !0 && E.onBeforeRender(y, E, N, F), S = fe.get(E, A.length), S.init(N), A.push(S), Wt.multiplyMatrices(N.projectionMatrix, N.matrixWorldInverse), Ve.setFromProjectionMatrix(Wt, Zn, N.reversedDepth), et = this.localClippingEnabled, Me = Ee.init(this.clippingPlanes, et), b = se.get(E, M.length), b.init(), M.push(b), de.enabled === !0 && de.isPresenting === !0) {
|
|
37451
37459
|
const xe = y.xr.getDepthSensingMesh();
|
|
37452
37460
|
xe !== null && To(xe, N, -1 / 0, y.sortObjects);
|
|
37453
37461
|
}
|
|
@@ -37483,19 +37491,19 @@ class CE {
|
|
|
37483
37491
|
S.pushLight(E), E.castShadow && S.pushShadow(E);
|
|
37484
37492
|
else if (E.isSprite) {
|
|
37485
37493
|
if (!E.frustumCulled || Ve.intersectsSprite(E)) {
|
|
37486
|
-
V &&
|
|
37494
|
+
V && lt.setFromMatrixPosition(E.matrixWorld).applyMatrix4(Wt);
|
|
37487
37495
|
const xe = ue.update(E), ve = E.material;
|
|
37488
|
-
ve.visible && b.push(E, xe, ve, G,
|
|
37496
|
+
ve.visible && b.push(E, xe, ve, G, lt.z, null);
|
|
37489
37497
|
}
|
|
37490
37498
|
} else if ((E.isMesh || E.isLine || E.isPoints) && (!E.frustumCulled || Ve.intersectsObject(E))) {
|
|
37491
37499
|
const xe = ue.update(E), ve = E.material;
|
|
37492
|
-
if (V && (E.boundingSphere !== void 0 ? (E.boundingSphere === null && E.computeBoundingSphere(),
|
|
37500
|
+
if (V && (E.boundingSphere !== void 0 ? (E.boundingSphere === null && E.computeBoundingSphere(), lt.copy(E.boundingSphere.center)) : (xe.boundingSphere === null && xe.computeBoundingSphere(), lt.copy(xe.boundingSphere.center)), lt.applyMatrix4(E.matrixWorld).applyMatrix4(Wt)), Array.isArray(ve)) {
|
|
37493
37501
|
const Ce = xe.groups;
|
|
37494
37502
|
for (let ke = 0, Le = Ce.length; ke < Le; ke++) {
|
|
37495
37503
|
const Ie = Ce[ke], je = ve[Ie.materialIndex];
|
|
37496
|
-
je && je.visible && b.push(E, xe, je, G,
|
|
37504
|
+
je && je.visible && b.push(E, xe, je, G, lt.z, Ie);
|
|
37497
37505
|
}
|
|
37498
|
-
} else ve.visible && b.push(E, xe, ve, G,
|
|
37506
|
+
} else ve.visible && b.push(E, xe, ve, G, lt.z, null);
|
|
37499
37507
|
}
|
|
37500
37508
|
}
|
|
37501
37509
|
const pe = E.children;
|
|
@@ -37511,9 +37519,9 @@ class CE {
|
|
|
37511
37519
|
return;
|
|
37512
37520
|
if (S.state.transmissionRenderTarget[V.id] === void 0) {
|
|
37513
37521
|
const je = rt.has("EXT_color_buffer_half_float") || rt.has("EXT_color_buffer_float");
|
|
37514
|
-
S.state.transmissionRenderTarget[V.id] = new
|
|
37522
|
+
S.state.transmissionRenderTarget[V.id] = new ti(1, 1, {
|
|
37515
37523
|
generateMipmaps: !0,
|
|
37516
|
-
type: je ?
|
|
37524
|
+
type: je ? wi : Mn,
|
|
37517
37525
|
minFilter: ps,
|
|
37518
37526
|
samples: xt.samples,
|
|
37519
37527
|
stencilBuffer: r,
|
|
@@ -37527,15 +37535,15 @@ class CE {
|
|
|
37527
37535
|
const ve = y.getRenderTarget(), Ce = y.getActiveCubeFace(), ke = y.getActiveMipmapLevel();
|
|
37528
37536
|
y.setRenderTarget(pe), y.getClearColor(ge), le = y.getClearAlpha(), le < 1 && y.setClearColor(16777215, 0.5), y.clear(), He && he.render(G);
|
|
37529
37537
|
const Le = y.toneMapping;
|
|
37530
|
-
y.toneMapping =
|
|
37538
|
+
y.toneMapping = ei;
|
|
37531
37539
|
const Ie = V.viewport;
|
|
37532
37540
|
if (V.viewport !== void 0 && (V.viewport = void 0), S.setupLightsView(V), Me === !0 && Ee.setGlobalState(y.clippingPlanes, V), na(E, G, V), L.updateMultisampleRenderTarget(pe), L.updateRenderTargetMipmap(pe), rt.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
37533
37541
|
let je = !1;
|
|
37534
37542
|
for (let pt = 0, At = N.length; pt < At; pt++) {
|
|
37535
|
-
const Rt = N[pt], { object:
|
|
37536
|
-
if (
|
|
37537
|
-
const pn =
|
|
37538
|
-
|
|
37543
|
+
const Rt = N[pt], { object: yt, geometry: De, material: ut, group: tt } = Rt;
|
|
37544
|
+
if (ut.side === Si && yt.layers.test(V.layers)) {
|
|
37545
|
+
const pn = ut.side;
|
|
37546
|
+
ut.side = nn, ut.needsUpdate = !0, Jd(yt, G, V, De, ut, tt), ut.side = pn, ut.needsUpdate = !0, je = !0;
|
|
37539
37547
|
}
|
|
37540
37548
|
}
|
|
37541
37549
|
je === !0 && (L.updateMultisampleRenderTarget(pe), L.updateRenderTargetMipmap(pe));
|
|
@@ -37551,13 +37559,13 @@ class CE {
|
|
|
37551
37559
|
}
|
|
37552
37560
|
}
|
|
37553
37561
|
function Jd(E, N, G, V, O, pe) {
|
|
37554
|
-
E.onBeforeRender(y, N, G, V, O, pe), E.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse, E.matrixWorld), E.normalMatrix.getNormalMatrix(E.modelViewMatrix), O.onBeforeRender(y, N, G, V, E, pe), O.transparent === !0 && O.side ===
|
|
37562
|
+
E.onBeforeRender(y, N, G, V, O, pe), E.modelViewMatrix.multiplyMatrices(G.matrixWorldInverse, E.matrixWorld), E.normalMatrix.getNormalMatrix(E.modelViewMatrix), O.onBeforeRender(y, N, G, V, E, pe), O.transparent === !0 && O.side === Si && O.forceSinglePass === !1 ? (O.side = nn, O.needsUpdate = !0, y.renderBufferDirect(G, N, V, O, E, pe), O.side = Mi, O.needsUpdate = !0, y.renderBufferDirect(G, N, V, O, E, pe), O.side = Si) : y.renderBufferDirect(G, N, V, O, E, pe), E.onAfterRender(y, N, G, V, O, pe);
|
|
37555
37563
|
}
|
|
37556
37564
|
function ia(E, N, G) {
|
|
37557
|
-
N.isScene !== !0 && (N =
|
|
37565
|
+
N.isScene !== !0 && (N = _t);
|
|
37558
37566
|
const V = _.get(E), O = S.state.lights, pe = S.state.shadowsArray, xe = O.state.version, ve = we.getParameters(E, O.state, pe, N, G), Ce = we.getProgramCacheKey(ve);
|
|
37559
37567
|
let ke = V.programs;
|
|
37560
|
-
V.environment = E.isMeshStandardMaterial ? N.environment : null, V.fog = N.fog, V.envMap = (E.isMeshStandardMaterial ? Q : X).get(E.envMap || V.environment), V.envMapRotation = V.environment !== null && E.envMap === null ? N.environmentRotation : E.envMapRotation, ke === void 0 && (E.addEventListener("dispose",
|
|
37568
|
+
V.environment = E.isMeshStandardMaterial ? N.environment : null, V.fog = N.fog, V.envMap = (E.isMeshStandardMaterial ? Q : X).get(E.envMap || V.environment), V.envMapRotation = V.environment !== null && E.envMap === null ? N.environmentRotation : E.envMapRotation, ke === void 0 && (E.addEventListener("dispose", Wn), ke = /* @__PURE__ */ new Map(), V.programs = ke);
|
|
37561
37569
|
let Le = ke.get(Ce);
|
|
37562
37570
|
if (Le !== void 0) {
|
|
37563
37571
|
if (V.currentProgram === Le && V.lightsStateVersion === xe)
|
|
@@ -37579,17 +37587,17 @@ class CE {
|
|
|
37579
37587
|
G.outputColorSpace = N.outputColorSpace, G.batching = N.batching, G.batchingColor = N.batchingColor, G.instancing = N.instancing, G.instancingColor = N.instancingColor, G.instancingMorph = N.instancingMorph, G.skinning = N.skinning, G.morphTargets = N.morphTargets, G.morphNormals = N.morphNormals, G.morphColors = N.morphColors, G.morphTargetsCount = N.morphTargetsCount, G.numClippingPlanes = N.numClippingPlanes, G.numIntersection = N.numClipIntersection, G.vertexAlphas = N.vertexAlphas, G.vertexTangents = N.vertexTangents, G.toneMapping = N.toneMapping;
|
|
37580
37588
|
}
|
|
37581
37589
|
function Bm(E, N, G, V, O) {
|
|
37582
|
-
N.isScene !== !0 && (N =
|
|
37590
|
+
N.isScene !== !0 && (N = _t), L.resetTextureUnits();
|
|
37583
37591
|
const pe = N.fog, xe = V.isMeshStandardMaterial ? N.environment : null, ve = F === null ? y.outputColorSpace : F.isXRRenderTarget === !0 ? F.texture.colorSpace : lr, Ce = (V.isMeshStandardMaterial ? Q : X).get(V.envMap || xe), ke = V.vertexColors === !0 && !!G.attributes.color && G.attributes.color.itemSize === 4, Le = !!G.attributes.tangent && (!!V.normalMap || V.anisotropy > 0), Ie = !!G.morphAttributes.position, je = !!G.morphAttributes.normal, pt = !!G.morphAttributes.color;
|
|
37584
|
-
let At =
|
|
37592
|
+
let At = ei;
|
|
37585
37593
|
V.toneMapped && (F === null || F.isXRRenderTarget === !0) && (At = y.toneMapping);
|
|
37586
|
-
const Rt = G.morphAttributes.position || G.morphAttributes.normal || G.morphAttributes.color,
|
|
37594
|
+
const Rt = G.morphAttributes.position || G.morphAttributes.normal || G.morphAttributes.color, yt = Rt !== void 0 ? Rt.length : 0, De = _.get(V), ut = S.state.lights;
|
|
37587
37595
|
if (Me === !0 && (et === !0 || E !== K)) {
|
|
37588
37596
|
const en = E === K && V.id === q;
|
|
37589
37597
|
Ee.setState(V, E, en);
|
|
37590
37598
|
}
|
|
37591
37599
|
let tt = !1;
|
|
37592
|
-
V.version === De.__version ? (De.needsLights && De.lightsStateVersion !==
|
|
37600
|
+
V.version === De.__version ? (De.needsLights && De.lightsStateVersion !== ut.state.version || De.outputColorSpace !== ve || O.isBatchedMesh && De.batching === !1 || !O.isBatchedMesh && De.batching === !0 || O.isBatchedMesh && De.batchingColor === !0 && O.colorTexture === null || O.isBatchedMesh && De.batchingColor === !1 && O.colorTexture !== null || O.isInstancedMesh && De.instancing === !1 || !O.isInstancedMesh && De.instancing === !0 || O.isSkinnedMesh && De.skinning === !1 || !O.isSkinnedMesh && De.skinning === !0 || O.isInstancedMesh && De.instancingColor === !0 && O.instanceColor === null || O.isInstancedMesh && De.instancingColor === !1 && O.instanceColor !== null || O.isInstancedMesh && De.instancingMorph === !0 && O.morphTexture === null || O.isInstancedMesh && De.instancingMorph === !1 && O.morphTexture !== null || De.envMap !== Ce || V.fog === !0 && De.fog !== pe || De.numClippingPlanes !== void 0 && (De.numClippingPlanes !== Ee.numPlanes || De.numIntersection !== Ee.numIntersection) || De.vertexAlphas !== ke || De.vertexTangents !== Le || De.morphTargets !== Ie || De.morphNormals !== je || De.morphColors !== pt || De.toneMapping !== At || De.morphTargetsCount !== yt) && (tt = !0) : (tt = !0, De.__version = V.version);
|
|
37593
37601
|
let pn = De.currentProgram;
|
|
37594
37602
|
tt === !0 && (pn = ia(V, N, O));
|
|
37595
37603
|
let Es = !1, mn = !1, fr = !1;
|
|
@@ -37603,7 +37611,7 @@ class CE {
|
|
|
37603
37611
|
2 / (Math.log(E.far + 1) / Math.LN2)
|
|
37604
37612
|
), (V.isMeshPhongMaterial || V.isMeshToonMaterial || V.isMeshLambertMaterial || V.isMeshBasicMaterial || V.isMeshStandardMaterial || V.isShaderMaterial) && Ct.setValue(I, "isOrthographic", E.isOrthographicCamera === !0), K !== E && (K = E, mn = !0, fr = !0);
|
|
37605
37613
|
}
|
|
37606
|
-
if (De.needsLights && (
|
|
37614
|
+
if (De.needsLights && (ut.state.directionalShadowMap.length > 0 && Ct.setValue(I, "directionalShadowMap", ut.state.directionalShadowMap, L), ut.state.spotShadowMap.length > 0 && Ct.setValue(I, "spotShadowMap", ut.state.spotShadowMap, L), ut.state.pointShadowMap.length > 0 && Ct.setValue(I, "pointShadowMap", ut.state.pointShadowMap, L)), O.isSkinnedMesh) {
|
|
37607
37615
|
Ct.setOptional(I, O, "bindMatrix"), Ct.setOptional(I, O, "bindMatrixInverse");
|
|
37608
37616
|
const en = O.skeleton;
|
|
37609
37617
|
en && (en.boneTexture === null && en.computeBoneTexture(), Ct.setValue(I, "boneTexture", en.boneTexture, L));
|
|
@@ -37739,9 +37747,9 @@ class CE {
|
|
|
37739
37747
|
xe = Math.floor(Rt.width * xn), ve = Math.floor(Rt.height * xn), E.isDataArrayTexture ? Ce = Rt.depth : E.isData3DTexture ? Ce = Math.floor(Rt.depth * xn) : Ce = 1, ke = 0, Le = 0, Ie = 0;
|
|
37740
37748
|
}
|
|
37741
37749
|
V !== null ? (je = V.x, pt = V.y, At = V.z) : (je = 0, pt = 0, At = 0);
|
|
37742
|
-
const
|
|
37743
|
-
let
|
|
37744
|
-
N.isData3DTexture ? (L.setTexture3D(N, 0),
|
|
37750
|
+
const yt = ae.convert(N.format), De = ae.convert(N.type);
|
|
37751
|
+
let ut;
|
|
37752
|
+
N.isData3DTexture ? (L.setTexture3D(N, 0), ut = I.TEXTURE_3D) : N.isDataArrayTexture || N.isCompressedArrayTexture ? (L.setTexture2DArray(N, 0), ut = I.TEXTURE_2D_ARRAY) : (L.setTexture2D(N, 0), ut = I.TEXTURE_2D), I.pixelStorei(I.UNPACK_FLIP_Y_WEBGL, N.flipY), I.pixelStorei(I.UNPACK_PREMULTIPLY_ALPHA_WEBGL, N.premultiplyAlpha), I.pixelStorei(I.UNPACK_ALIGNMENT, N.unpackAlignment);
|
|
37745
37753
|
const tt = I.getParameter(I.UNPACK_ROW_LENGTH), pn = I.getParameter(I.UNPACK_IMAGE_HEIGHT), Es = I.getParameter(I.UNPACK_SKIP_PIXELS), mn = I.getParameter(I.UNPACK_SKIP_ROWS), fr = I.getParameter(I.UNPACK_SKIP_IMAGES);
|
|
37746
37754
|
I.pixelStorei(I.UNPACK_ROW_LENGTH, Rt.width), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, Rt.height), I.pixelStorei(I.UNPACK_SKIP_PIXELS, ke), I.pixelStorei(I.UNPACK_SKIP_ROWS, Le), I.pixelStorei(I.UNPACK_SKIP_IMAGES, Ie);
|
|
37747
37755
|
const Ct = E.isDataArrayTexture || E.isData3DTexture, an = N.isDataArrayTexture || N.isData3DTexture;
|
|
@@ -37755,11 +37763,11 @@ class CE {
|
|
|
37755
37763
|
const xn = _.get(E), en = _.get(N);
|
|
37756
37764
|
Ae.bindFramebuffer(I.READ_FRAMEBUFFER, Hm), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, Wm);
|
|
37757
37765
|
for (let on = 0; on < Ce; on++)
|
|
37758
|
-
Ct ? I.framebufferTextureLayer(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, xn.__webglTexture, O, Ie + on) : I.framebufferTexture2D(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, xn.__webglTexture, O), an ? I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, en.__webglTexture, pe, At + on) : I.framebufferTexture2D(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, en.__webglTexture, pe), O !== 0 ? I.blitFramebuffer(ke, Le, xe, ve, je, pt, xe, ve, I.COLOR_BUFFER_BIT, I.NEAREST) : an ? I.copyTexSubImage3D(
|
|
37766
|
+
Ct ? I.framebufferTextureLayer(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, xn.__webglTexture, O, Ie + on) : I.framebufferTexture2D(I.READ_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, xn.__webglTexture, O), an ? I.framebufferTextureLayer(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, en.__webglTexture, pe, At + on) : I.framebufferTexture2D(I.DRAW_FRAMEBUFFER, I.COLOR_ATTACHMENT0, I.TEXTURE_2D, en.__webglTexture, pe), O !== 0 ? I.blitFramebuffer(ke, Le, xe, ve, je, pt, xe, ve, I.COLOR_BUFFER_BIT, I.NEAREST) : an ? I.copyTexSubImage3D(ut, pe, je, pt, At + on, ke, Le, xe, ve) : I.copyTexSubImage2D(ut, pe, je, pt, ke, Le, xe, ve);
|
|
37759
37767
|
Ae.bindFramebuffer(I.READ_FRAMEBUFFER, null), Ae.bindFramebuffer(I.DRAW_FRAMEBUFFER, null);
|
|
37760
37768
|
} else
|
|
37761
|
-
an ? E.isDataTexture || E.isData3DTexture ? I.texSubImage3D(
|
|
37762
|
-
I.pixelStorei(I.UNPACK_ROW_LENGTH, tt), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, pn), I.pixelStorei(I.UNPACK_SKIP_PIXELS, Es), I.pixelStorei(I.UNPACK_SKIP_ROWS, mn), I.pixelStorei(I.UNPACK_SKIP_IMAGES, fr), pe === 0 && N.generateMipmaps && I.generateMipmap(
|
|
37769
|
+
an ? E.isDataTexture || E.isData3DTexture ? I.texSubImage3D(ut, pe, je, pt, At, xe, ve, Ce, yt, De, Rt.data) : N.isCompressedArrayTexture ? I.compressedTexSubImage3D(ut, pe, je, pt, At, xe, ve, Ce, yt, Rt.data) : I.texSubImage3D(ut, pe, je, pt, At, xe, ve, Ce, yt, De, Rt) : E.isDataTexture ? I.texSubImage2D(I.TEXTURE_2D, pe, je, pt, xe, ve, yt, De, Rt.data) : E.isCompressedTexture ? I.compressedTexSubImage2D(I.TEXTURE_2D, pe, je, pt, Rt.width, Rt.height, yt, Rt.data) : I.texSubImage2D(I.TEXTURE_2D, pe, je, pt, xe, ve, yt, De, Rt);
|
|
37770
|
+
I.pixelStorei(I.UNPACK_ROW_LENGTH, tt), I.pixelStorei(I.UNPACK_IMAGE_HEIGHT, pn), I.pixelStorei(I.UNPACK_SKIP_PIXELS, Es), I.pixelStorei(I.UNPACK_SKIP_ROWS, mn), I.pixelStorei(I.UNPACK_SKIP_IMAGES, fr), pe === 0 && N.generateMipmaps && I.generateMipmap(ut), Ae.unbindTexture();
|
|
37763
37771
|
}, this.initRenderTarget = function(E) {
|
|
37764
37772
|
_.get(E).__webglFramebuffer === void 0 && L.setupRenderTarget(E);
|
|
37765
37773
|
}, this.initTexture = function(E) {
|
|
@@ -37778,7 +37786,7 @@ class CE {
|
|
|
37778
37786
|
* @readonly
|
|
37779
37787
|
*/
|
|
37780
37788
|
get coordinateSystem() {
|
|
37781
|
-
return
|
|
37789
|
+
return Zn;
|
|
37782
37790
|
}
|
|
37783
37791
|
/**
|
|
37784
37792
|
* Defines the output color space of the renderer.
|
|
@@ -38307,8 +38315,8 @@ class Hd {
|
|
|
38307
38315
|
uColorContrast: { value: this.config.colorContrast }
|
|
38308
38316
|
},
|
|
38309
38317
|
transparent: !0,
|
|
38310
|
-
side:
|
|
38311
|
-
}), this.orb = new
|
|
38318
|
+
side: Mi
|
|
38319
|
+
}), this.orb = new Gn(t, this.orbMaterial), this.scene.add(this.orb);
|
|
38312
38320
|
const n = new Gd(
|
|
38313
38321
|
this.config.size,
|
|
38314
38322
|
64,
|
|
@@ -38330,7 +38338,7 @@ class Hd {
|
|
|
38330
38338
|
side: nn,
|
|
38331
38339
|
blending: rl,
|
|
38332
38340
|
depthWrite: !1
|
|
38333
|
-
}), this.glowMesh = new
|
|
38341
|
+
}), this.glowMesh = new Gn(n, this.glowMaterial), this.scene.add(this.glowMesh);
|
|
38334
38342
|
}
|
|
38335
38343
|
/**
|
|
38336
38344
|
* Update audio data with smoothing
|
|
@@ -38816,7 +38824,7 @@ class qd {
|
|
|
38816
38824
|
this.hasAcquired && (tr.release(), this.hasAcquired = !1);
|
|
38817
38825
|
}
|
|
38818
38826
|
}
|
|
38819
|
-
const
|
|
38827
|
+
const pi = {
|
|
38820
38828
|
default: {
|
|
38821
38829
|
primary: "#6366f1",
|
|
38822
38830
|
secondary: "#8b5cf6",
|
|
@@ -38894,7 +38902,7 @@ const fi = {
|
|
|
38894
38902
|
highlight: "#dbeafe"
|
|
38895
38903
|
// Light blue
|
|
38896
38904
|
}
|
|
38897
|
-
},
|
|
38905
|
+
}, mi = {
|
|
38898
38906
|
indigo: {
|
|
38899
38907
|
primary: "#3730a3",
|
|
38900
38908
|
secondary: "#4338ca",
|
|
@@ -38963,93 +38971,93 @@ const fi = {
|
|
|
38963
38971
|
}
|
|
38964
38972
|
};
|
|
38965
38973
|
function HE(i, e = "dark") {
|
|
38966
|
-
const t = e === "dark" ?
|
|
38974
|
+
const t = e === "dark" ? pi : mi;
|
|
38967
38975
|
return t[i] || t[Object.keys(t)[0]];
|
|
38968
38976
|
}
|
|
38969
38977
|
function WE(i = "dark") {
|
|
38970
|
-
return Object.keys(i === "dark" ?
|
|
38978
|
+
return Object.keys(i === "dark" ? pi : mi);
|
|
38971
38979
|
}
|
|
38972
38980
|
const Yr = {
|
|
38973
38981
|
default: {
|
|
38974
38982
|
dark: {
|
|
38975
|
-
colors:
|
|
38983
|
+
colors: pi.default,
|
|
38976
38984
|
glowIntensity: 1.2,
|
|
38977
38985
|
idleGlowMultiplier: 0.6
|
|
38978
38986
|
},
|
|
38979
38987
|
light: {
|
|
38980
|
-
colors:
|
|
38988
|
+
colors: mi.indigo,
|
|
38981
38989
|
glowIntensity: 1.8,
|
|
38982
38990
|
idleGlowMultiplier: 1.2
|
|
38983
38991
|
}
|
|
38984
38992
|
},
|
|
38985
38993
|
emerald: {
|
|
38986
38994
|
dark: {
|
|
38987
|
-
colors:
|
|
38995
|
+
colors: pi.emerald,
|
|
38988
38996
|
glowIntensity: 1.2,
|
|
38989
38997
|
idleGlowMultiplier: 0.6
|
|
38990
38998
|
},
|
|
38991
38999
|
light: {
|
|
38992
|
-
colors:
|
|
39000
|
+
colors: mi.teal,
|
|
38993
39001
|
glowIntensity: 1.8,
|
|
38994
39002
|
idleGlowMultiplier: 1.2
|
|
38995
39003
|
}
|
|
38996
39004
|
},
|
|
38997
39005
|
rose: {
|
|
38998
39006
|
dark: {
|
|
38999
|
-
colors:
|
|
39007
|
+
colors: pi.rose,
|
|
39000
39008
|
glowIntensity: 1.2,
|
|
39001
39009
|
idleGlowMultiplier: 0.6
|
|
39002
39010
|
},
|
|
39003
39011
|
light: {
|
|
39004
|
-
colors:
|
|
39012
|
+
colors: mi.pink,
|
|
39005
39013
|
glowIntensity: 1.8,
|
|
39006
39014
|
idleGlowMultiplier: 1.2
|
|
39007
39015
|
}
|
|
39008
39016
|
},
|
|
39009
39017
|
amber: {
|
|
39010
39018
|
dark: {
|
|
39011
|
-
colors:
|
|
39019
|
+
colors: pi.amber,
|
|
39012
39020
|
glowIntensity: 1.2,
|
|
39013
39021
|
idleGlowMultiplier: 0.6
|
|
39014
39022
|
},
|
|
39015
39023
|
light: {
|
|
39016
|
-
colors:
|
|
39024
|
+
colors: mi.orange,
|
|
39017
39025
|
glowIntensity: 1.8,
|
|
39018
39026
|
idleGlowMultiplier: 1.2
|
|
39019
39027
|
}
|
|
39020
39028
|
},
|
|
39021
39029
|
cyan: {
|
|
39022
39030
|
dark: {
|
|
39023
|
-
colors:
|
|
39031
|
+
colors: pi.cyan,
|
|
39024
39032
|
glowIntensity: 1.2,
|
|
39025
39033
|
idleGlowMultiplier: 0.6
|
|
39026
39034
|
},
|
|
39027
39035
|
light: {
|
|
39028
|
-
colors:
|
|
39036
|
+
colors: mi.blue,
|
|
39029
39037
|
glowIntensity: 1.8,
|
|
39030
39038
|
idleGlowMultiplier: 1.2
|
|
39031
39039
|
}
|
|
39032
39040
|
},
|
|
39033
39041
|
purple: {
|
|
39034
39042
|
dark: {
|
|
39035
|
-
colors:
|
|
39043
|
+
colors: pi.purple,
|
|
39036
39044
|
glowIntensity: 1.2,
|
|
39037
39045
|
idleGlowMultiplier: 0.6
|
|
39038
39046
|
},
|
|
39039
39047
|
light: {
|
|
39040
|
-
colors:
|
|
39048
|
+
colors: mi.violet,
|
|
39041
39049
|
glowIntensity: 1.8,
|
|
39042
39050
|
idleGlowMultiplier: 1.2
|
|
39043
39051
|
}
|
|
39044
39052
|
},
|
|
39045
39053
|
blue: {
|
|
39046
39054
|
dark: {
|
|
39047
|
-
colors:
|
|
39055
|
+
colors: pi.blue,
|
|
39048
39056
|
glowIntensity: 1.2,
|
|
39049
39057
|
idleGlowMultiplier: 0.6
|
|
39050
39058
|
},
|
|
39051
39059
|
light: {
|
|
39052
|
-
colors:
|
|
39060
|
+
colors: mi.blue,
|
|
39053
39061
|
glowIntensity: 1.8,
|
|
39054
39062
|
idleGlowMultiplier: 1.2
|
|
39055
39063
|
}
|
|
@@ -39085,14 +39093,14 @@ function $E(i, e) {
|
|
|
39085
39093
|
t.removeEventListener("change", n);
|
|
39086
39094
|
};
|
|
39087
39095
|
}
|
|
39088
|
-
var IE = Object.defineProperty, DE = Object.getOwnPropertyDescriptor,
|
|
39096
|
+
var IE = Object.defineProperty, DE = Object.getOwnPropertyDescriptor, gt = (i, e, t, n) => {
|
|
39089
39097
|
for (var s = n > 1 ? void 0 : n ? DE(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
39090
39098
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
39091
39099
|
return n && s && IE(e, t, s), s;
|
|
39092
39100
|
};
|
|
39093
|
-
let
|
|
39101
|
+
let at = class extends gs {
|
|
39094
39102
|
constructor() {
|
|
39095
|
-
super(), this.callManager = new wd(), this.healthMonitor = new Ad(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = ad(), this.animationId = null, this.pendingTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.animationStartTime = 0, this.intersectionObserver = null, this.isOrbInitialized = !1, this.intersectionTimeoutId = null, this.callStatus = "idle", this.microphoneEnabled = !1, this.serviceUnavailable = !1, this.buttonStartText = "Try to call", this.buttonConnectingText = "Connecting...", this.size = 370, this.containerPadding = 45, this.theme = "default", this.themeMode = "auto", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (i) => {
|
|
39103
|
+
super(), this.callManager = new wd(), this.healthMonitor = new Ad(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = ad(), this.animationId = null, this.pendingTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.animationStartTime = 0, this.intersectionObserver = null, this.isOrbInitialized = !1, this.intersectionTimeoutId = null, this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.serviceUnavailable = !1, this.buttonStartText = "Try to call", this.buttonConnectingText = "Connecting...", this.size = 370, this.containerPadding = 45, this.theme = "default", this.themeMode = "auto", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (i) => {
|
|
39096
39104
|
const t = i.detail;
|
|
39097
39105
|
if (!(!t || !this.audioAnalyzer))
|
|
39098
39106
|
try {
|
|
@@ -39111,9 +39119,9 @@ let dt = class extends gs {
|
|
|
39111
39119
|
console.error("Failed to connect local audio stream:", n);
|
|
39112
39120
|
}
|
|
39113
39121
|
}, this.handleMicrophoneEnabled = () => {
|
|
39114
|
-
this.microphoneEnabled = !0;
|
|
39122
|
+
this.microphoneEnabled = !0, this.microphoneInitialized = !0;
|
|
39115
39123
|
}, this.handleMicrophoneDisabled = () => {
|
|
39116
|
-
this.microphoneEnabled = !1;
|
|
39124
|
+
this.microphoneEnabled = !1, this.microphoneInitialized = !0;
|
|
39117
39125
|
}, this.handleHealthChange = (i) => {
|
|
39118
39126
|
const e = i.detail;
|
|
39119
39127
|
this.serviceUnavailable = e === "unhealthy";
|
|
@@ -39132,7 +39140,7 @@ let dt = class extends gs {
|
|
|
39132
39140
|
);
|
|
39133
39141
|
break;
|
|
39134
39142
|
case "disconnected":
|
|
39135
|
-
this.callStatus = "idle", (n = this.orbRenderer) == null || n.setActive(!1), (s = this.audioAnalyzer) == null || s.disconnect(), this.startIdleAnimation(), this.scheduleTimer(() => {
|
|
39143
|
+
this.callStatus = "idle", this.microphoneInitialized = !1, (n = this.orbRenderer) == null || n.setActive(!1), (s = this.audioAnalyzer) == null || s.disconnect(), this.startIdleAnimation(), this.scheduleTimer(() => {
|
|
39136
39144
|
var o;
|
|
39137
39145
|
(o = this.soundManager) == null || o.playCallEndSound();
|
|
39138
39146
|
}, 150), this.dispatchEvent(
|
|
@@ -39568,7 +39576,7 @@ let dt = class extends gs {
|
|
|
39568
39576
|
@click=${this.toggleCall}
|
|
39569
39577
|
${od(this.orbContainerRef)}
|
|
39570
39578
|
>
|
|
39571
|
-
${this.callStatus === "connected" && !this.microphoneEnabled ? Xt`
|
|
39579
|
+
${this.callStatus === "connected" && this.microphoneInitialized && !this.microphoneEnabled ? Xt`
|
|
39572
39580
|
<div class="microphone-indicator visible">
|
|
39573
39581
|
<svg viewBox="0 0 24 24" fill="none">
|
|
39574
39582
|
<path
|
|
@@ -39618,101 +39626,104 @@ let dt = class extends gs {
|
|
|
39618
39626
|
`;
|
|
39619
39627
|
}
|
|
39620
39628
|
};
|
|
39621
|
-
|
|
39629
|
+
at.styles = nd`
|
|
39622
39630
|
:host {
|
|
39623
39631
|
display: inline-block;
|
|
39624
39632
|
contain: layout style;
|
|
39625
39633
|
}
|
|
39626
39634
|
`;
|
|
39627
|
-
|
|
39635
|
+
gt([
|
|
39628
39636
|
ye({ type: String, attribute: "agent-id" })
|
|
39629
|
-
],
|
|
39630
|
-
|
|
39637
|
+
], at.prototype, "agentId", 2);
|
|
39638
|
+
gt([
|
|
39631
39639
|
ye({ type: String, attribute: "voice-service-url" })
|
|
39632
|
-
],
|
|
39633
|
-
|
|
39634
|
-
|
|
39635
|
-
],
|
|
39636
|
-
|
|
39637
|
-
|
|
39638
|
-
],
|
|
39639
|
-
|
|
39640
|
-
|
|
39641
|
-
],
|
|
39642
|
-
|
|
39640
|
+
], at.prototype, "voiceServiceUrl", 2);
|
|
39641
|
+
gt([
|
|
39642
|
+
An()
|
|
39643
|
+
], at.prototype, "callStatus", 2);
|
|
39644
|
+
gt([
|
|
39645
|
+
An()
|
|
39646
|
+
], at.prototype, "microphoneEnabled", 2);
|
|
39647
|
+
gt([
|
|
39648
|
+
An()
|
|
39649
|
+
], at.prototype, "microphoneInitialized", 2);
|
|
39650
|
+
gt([
|
|
39651
|
+
An()
|
|
39652
|
+
], at.prototype, "serviceUnavailable", 2);
|
|
39653
|
+
gt([
|
|
39643
39654
|
ye({ type: String, attribute: "button-start-text" })
|
|
39644
|
-
],
|
|
39645
|
-
|
|
39655
|
+
], at.prototype, "buttonStartText", 2);
|
|
39656
|
+
gt([
|
|
39646
39657
|
ye({ type: String, attribute: "button-connecting-text" })
|
|
39647
|
-
],
|
|
39648
|
-
|
|
39658
|
+
], at.prototype, "buttonConnectingText", 2);
|
|
39659
|
+
gt([
|
|
39649
39660
|
ye({ type: Number, attribute: "size" })
|
|
39650
|
-
],
|
|
39651
|
-
|
|
39661
|
+
], at.prototype, "size", 2);
|
|
39662
|
+
gt([
|
|
39652
39663
|
ye({ type: Number, attribute: "container-padding" })
|
|
39653
|
-
],
|
|
39654
|
-
|
|
39664
|
+
], at.prototype, "containerPadding", 2);
|
|
39665
|
+
gt([
|
|
39655
39666
|
ye({ type: String, attribute: "theme", reflect: !0 })
|
|
39656
|
-
],
|
|
39657
|
-
|
|
39667
|
+
], at.prototype, "theme", 2);
|
|
39668
|
+
gt([
|
|
39658
39669
|
ye({ type: String, attribute: "theme-mode" })
|
|
39659
|
-
],
|
|
39660
|
-
|
|
39670
|
+
], at.prototype, "themeMode", 2);
|
|
39671
|
+
gt([
|
|
39661
39672
|
ye({ type: Object, attribute: "orb-colors" })
|
|
39662
|
-
],
|
|
39663
|
-
|
|
39673
|
+
], at.prototype, "orbColors", 2);
|
|
39674
|
+
gt([
|
|
39664
39675
|
ye({ type: Number, attribute: "glow-intensity" })
|
|
39665
|
-
],
|
|
39666
|
-
|
|
39676
|
+
], at.prototype, "glowIntensity", 2);
|
|
39677
|
+
gt([
|
|
39667
39678
|
ye({ type: Number, attribute: "idle-glow-multiplier" })
|
|
39668
|
-
],
|
|
39669
|
-
|
|
39679
|
+
], at.prototype, "idleGlowMultiplier", 2);
|
|
39680
|
+
gt([
|
|
39670
39681
|
ye({ type: Number, attribute: "morph-strength" })
|
|
39671
|
-
],
|
|
39672
|
-
|
|
39682
|
+
], at.prototype, "morphStrength", 2);
|
|
39683
|
+
gt([
|
|
39673
39684
|
ye({ type: Number, attribute: "noise-scale" })
|
|
39674
|
-
],
|
|
39675
|
-
|
|
39685
|
+
], at.prototype, "noiseScale", 2);
|
|
39686
|
+
gt([
|
|
39676
39687
|
ye({ type: Number, attribute: "noise-speed" })
|
|
39677
|
-
],
|
|
39678
|
-
|
|
39688
|
+
], at.prototype, "noiseSpeed", 2);
|
|
39689
|
+
gt([
|
|
39679
39690
|
ye({ type: Number, attribute: "fresnel-power" })
|
|
39680
|
-
],
|
|
39681
|
-
|
|
39691
|
+
], at.prototype, "fresnelPower", 2);
|
|
39692
|
+
gt([
|
|
39682
39693
|
ye({ type: Number, attribute: "rotation-speed" })
|
|
39683
|
-
],
|
|
39684
|
-
|
|
39694
|
+
], at.prototype, "rotationSpeed", 2);
|
|
39695
|
+
gt([
|
|
39685
39696
|
ye({ type: Number, attribute: "audio-reactivity" })
|
|
39686
|
-
],
|
|
39687
|
-
|
|
39697
|
+
], at.prototype, "audioReactivity", 2);
|
|
39698
|
+
gt([
|
|
39688
39699
|
ye({ type: Number, attribute: "audio-smoothing" })
|
|
39689
|
-
],
|
|
39690
|
-
|
|
39700
|
+
], at.prototype, "audioSmoothing", 2);
|
|
39701
|
+
gt([
|
|
39691
39702
|
ye({ type: Number, attribute: "idle-morph-multiplier" })
|
|
39692
|
-
],
|
|
39693
|
-
|
|
39703
|
+
], at.prototype, "idleMorphMultiplier", 2);
|
|
39704
|
+
gt([
|
|
39694
39705
|
ye({ type: Number, attribute: "color-contrast" })
|
|
39695
|
-
],
|
|
39696
|
-
|
|
39706
|
+
], at.prototype, "colorContrast", 2);
|
|
39707
|
+
gt([
|
|
39697
39708
|
ye({ type: Boolean, attribute: "sound-enabled" })
|
|
39698
|
-
],
|
|
39699
|
-
|
|
39709
|
+
], at.prototype, "soundEnabled", 2);
|
|
39710
|
+
gt([
|
|
39700
39711
|
ye({ type: Number, attribute: "sound-volume" })
|
|
39701
|
-
],
|
|
39702
|
-
|
|
39712
|
+
], at.prototype, "soundVolume", 2);
|
|
39713
|
+
gt([
|
|
39703
39714
|
ye({ type: String, attribute: "sound-preset" })
|
|
39704
|
-
],
|
|
39705
|
-
|
|
39715
|
+
], at.prototype, "soundPreset", 2);
|
|
39716
|
+
at = gt([
|
|
39706
39717
|
rd("hanc-ai-inline-call")
|
|
39707
|
-
],
|
|
39708
|
-
var LE = Object.defineProperty, NE = Object.getOwnPropertyDescriptor,
|
|
39718
|
+
], at);
|
|
39719
|
+
var LE = Object.defineProperty, NE = Object.getOwnPropertyDescriptor, vt = (i, e, t, n) => {
|
|
39709
39720
|
for (var s = n > 1 ? void 0 : n ? NE(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
39710
39721
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
39711
39722
|
return n && s && LE(e, t, s), s;
|
|
39712
39723
|
};
|
|
39713
|
-
let
|
|
39724
|
+
let ot = class extends gs {
|
|
39714
39725
|
constructor() {
|
|
39715
|
-
super(), this.callManager = new wd(), this.healthMonitor = new Ad(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = ad(), this.animationId = null, this.pendingTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.animationStartTime = 0, this.intersectionObserver = null, this.isOrbInitialized = !1, this.callStatus = "idle", this.microphoneEnabled = !1, this.serviceUnavailable = !1, this.buttonStartText = "Call", this.buttonConnectingText = "Connecting...", this.position = "bottom-right", this.size = 120, this.theme = "default", this.themeMode = "auto", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (i) => {
|
|
39726
|
+
super(), this.callManager = new wd(), this.healthMonitor = new Ad(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = ad(), this.animationId = null, this.pendingTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.animationStartTime = 0, this.intersectionObserver = null, this.isOrbInitialized = !1, this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.serviceUnavailable = !1, this.buttonStartText = "Call", this.buttonConnectingText = "Connecting...", this.position = "bottom-right", this.size = 120, this.theme = "default", this.themeMode = "auto", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (i) => {
|
|
39716
39727
|
const t = i.detail;
|
|
39717
39728
|
if (!(!t || !this.audioAnalyzer))
|
|
39718
39729
|
try {
|
|
@@ -39731,9 +39742,9 @@ let ut = class extends gs {
|
|
|
39731
39742
|
console.error("Failed to connect local audio stream:", n);
|
|
39732
39743
|
}
|
|
39733
39744
|
}, this.handleMicrophoneEnabled = () => {
|
|
39734
|
-
this.microphoneEnabled = !0;
|
|
39745
|
+
this.microphoneEnabled = !0, this.microphoneInitialized = !0;
|
|
39735
39746
|
}, this.handleMicrophoneDisabled = () => {
|
|
39736
|
-
this.microphoneEnabled = !1;
|
|
39747
|
+
this.microphoneEnabled = !1, this.microphoneInitialized = !0;
|
|
39737
39748
|
}, this.handleHealthChange = (i) => {
|
|
39738
39749
|
const e = i.detail;
|
|
39739
39750
|
this.serviceUnavailable = e === "unhealthy";
|
|
@@ -39752,7 +39763,7 @@ let ut = class extends gs {
|
|
|
39752
39763
|
);
|
|
39753
39764
|
break;
|
|
39754
39765
|
case "disconnected":
|
|
39755
|
-
this.callStatus = "idle", (n = this.orbRenderer) == null || n.setActive(!1), (s = this.audioAnalyzer) == null || s.disconnect(), this.startIdleAnimation(), this.scheduleTimer(() => {
|
|
39766
|
+
this.callStatus = "idle", this.microphoneInitialized = !1, (n = this.orbRenderer) == null || n.setActive(!1), (s = this.audioAnalyzer) == null || s.disconnect(), this.startIdleAnimation(), this.scheduleTimer(() => {
|
|
39756
39767
|
var o;
|
|
39757
39768
|
(o = this.soundManager) == null || o.playCallEndSound();
|
|
39758
39769
|
}, 150), this.dispatchEvent(
|
|
@@ -40171,7 +40182,7 @@ let ut = class extends gs {
|
|
|
40171
40182
|
@click=${this.toggleCall}
|
|
40172
40183
|
${od(this.orbContainerRef)}
|
|
40173
40184
|
>
|
|
40174
|
-
${this.callStatus === "connected" && !this.microphoneEnabled ? Xt`
|
|
40185
|
+
${this.callStatus === "connected" && this.microphoneInitialized && !this.microphoneEnabled ? Xt`
|
|
40175
40186
|
<div class="microphone-indicator visible">
|
|
40176
40187
|
<svg viewBox="0 0 24 24" fill="none">
|
|
40177
40188
|
<path
|
|
@@ -40220,100 +40231,103 @@ let ut = class extends gs {
|
|
|
40220
40231
|
`;
|
|
40221
40232
|
}
|
|
40222
40233
|
};
|
|
40223
|
-
|
|
40234
|
+
ot.styles = nd`
|
|
40224
40235
|
:host {
|
|
40225
40236
|
display: block;
|
|
40226
40237
|
}
|
|
40227
40238
|
`;
|
|
40228
|
-
|
|
40239
|
+
vt([
|
|
40229
40240
|
ye({ type: String, attribute: "agent-id" })
|
|
40230
|
-
],
|
|
40231
|
-
|
|
40241
|
+
], ot.prototype, "agentId", 2);
|
|
40242
|
+
vt([
|
|
40232
40243
|
ye({ type: String, attribute: "voice-service-url" })
|
|
40233
|
-
],
|
|
40234
|
-
|
|
40235
|
-
|
|
40236
|
-
],
|
|
40237
|
-
|
|
40238
|
-
|
|
40239
|
-
],
|
|
40240
|
-
|
|
40241
|
-
|
|
40242
|
-
],
|
|
40243
|
-
|
|
40244
|
+
], ot.prototype, "voiceServiceUrl", 2);
|
|
40245
|
+
vt([
|
|
40246
|
+
An()
|
|
40247
|
+
], ot.prototype, "callStatus", 2);
|
|
40248
|
+
vt([
|
|
40249
|
+
An()
|
|
40250
|
+
], ot.prototype, "microphoneEnabled", 2);
|
|
40251
|
+
vt([
|
|
40252
|
+
An()
|
|
40253
|
+
], ot.prototype, "microphoneInitialized", 2);
|
|
40254
|
+
vt([
|
|
40255
|
+
An()
|
|
40256
|
+
], ot.prototype, "serviceUnavailable", 2);
|
|
40257
|
+
vt([
|
|
40244
40258
|
ye({ type: String, attribute: "button-start-text" })
|
|
40245
|
-
],
|
|
40246
|
-
|
|
40259
|
+
], ot.prototype, "buttonStartText", 2);
|
|
40260
|
+
vt([
|
|
40247
40261
|
ye({ type: String, attribute: "button-connecting-text" })
|
|
40248
|
-
],
|
|
40249
|
-
|
|
40262
|
+
], ot.prototype, "buttonConnectingText", 2);
|
|
40263
|
+
vt([
|
|
40250
40264
|
ye({ type: String, attribute: "position" })
|
|
40251
|
-
],
|
|
40252
|
-
|
|
40265
|
+
], ot.prototype, "position", 2);
|
|
40266
|
+
vt([
|
|
40253
40267
|
ye({ type: Number, attribute: "size" })
|
|
40254
|
-
],
|
|
40255
|
-
|
|
40268
|
+
], ot.prototype, "size", 2);
|
|
40269
|
+
vt([
|
|
40256
40270
|
ye({ type: String, attribute: "theme" })
|
|
40257
|
-
],
|
|
40258
|
-
|
|
40271
|
+
], ot.prototype, "theme", 2);
|
|
40272
|
+
vt([
|
|
40259
40273
|
ye({ type: String, attribute: "theme-mode" })
|
|
40260
|
-
],
|
|
40261
|
-
|
|
40274
|
+
], ot.prototype, "themeMode", 2);
|
|
40275
|
+
vt([
|
|
40262
40276
|
ye({ type: Object, attribute: "orb-colors" })
|
|
40263
|
-
],
|
|
40264
|
-
|
|
40277
|
+
], ot.prototype, "orbColors", 2);
|
|
40278
|
+
vt([
|
|
40265
40279
|
ye({ type: Number, attribute: "glow-intensity" })
|
|
40266
|
-
],
|
|
40267
|
-
|
|
40280
|
+
], ot.prototype, "glowIntensity", 2);
|
|
40281
|
+
vt([
|
|
40268
40282
|
ye({ type: Number, attribute: "idle-glow-multiplier" })
|
|
40269
|
-
],
|
|
40270
|
-
|
|
40283
|
+
], ot.prototype, "idleGlowMultiplier", 2);
|
|
40284
|
+
vt([
|
|
40271
40285
|
ye({ type: Number, attribute: "morph-strength" })
|
|
40272
|
-
],
|
|
40273
|
-
|
|
40286
|
+
], ot.prototype, "morphStrength", 2);
|
|
40287
|
+
vt([
|
|
40274
40288
|
ye({ type: Number, attribute: "noise-scale" })
|
|
40275
|
-
],
|
|
40276
|
-
|
|
40289
|
+
], ot.prototype, "noiseScale", 2);
|
|
40290
|
+
vt([
|
|
40277
40291
|
ye({ type: Number, attribute: "noise-speed" })
|
|
40278
|
-
],
|
|
40279
|
-
|
|
40292
|
+
], ot.prototype, "noiseSpeed", 2);
|
|
40293
|
+
vt([
|
|
40280
40294
|
ye({ type: Number, attribute: "fresnel-power" })
|
|
40281
|
-
],
|
|
40282
|
-
|
|
40295
|
+
], ot.prototype, "fresnelPower", 2);
|
|
40296
|
+
vt([
|
|
40283
40297
|
ye({ type: Number, attribute: "rotation-speed" })
|
|
40284
|
-
],
|
|
40285
|
-
|
|
40298
|
+
], ot.prototype, "rotationSpeed", 2);
|
|
40299
|
+
vt([
|
|
40286
40300
|
ye({ type: Number, attribute: "audio-reactivity" })
|
|
40287
|
-
],
|
|
40288
|
-
|
|
40301
|
+
], ot.prototype, "audioReactivity", 2);
|
|
40302
|
+
vt([
|
|
40289
40303
|
ye({ type: Number, attribute: "audio-smoothing" })
|
|
40290
|
-
],
|
|
40291
|
-
|
|
40304
|
+
], ot.prototype, "audioSmoothing", 2);
|
|
40305
|
+
vt([
|
|
40292
40306
|
ye({ type: Number, attribute: "idle-morph-multiplier" })
|
|
40293
|
-
],
|
|
40294
|
-
|
|
40307
|
+
], ot.prototype, "idleMorphMultiplier", 2);
|
|
40308
|
+
vt([
|
|
40295
40309
|
ye({ type: Number, attribute: "color-contrast" })
|
|
40296
|
-
],
|
|
40297
|
-
|
|
40310
|
+
], ot.prototype, "colorContrast", 2);
|
|
40311
|
+
vt([
|
|
40298
40312
|
ye({ type: Boolean, attribute: "sound-enabled" })
|
|
40299
|
-
],
|
|
40300
|
-
|
|
40313
|
+
], ot.prototype, "soundEnabled", 2);
|
|
40314
|
+
vt([
|
|
40301
40315
|
ye({ type: Number, attribute: "sound-volume" })
|
|
40302
|
-
],
|
|
40303
|
-
|
|
40316
|
+
], ot.prototype, "soundVolume", 2);
|
|
40317
|
+
vt([
|
|
40304
40318
|
ye({ type: String, attribute: "sound-preset" })
|
|
40305
|
-
],
|
|
40306
|
-
|
|
40319
|
+
], ot.prototype, "soundPreset", 2);
|
|
40320
|
+
ot = vt([
|
|
40307
40321
|
rd("hanc-ai-floating-call")
|
|
40308
|
-
],
|
|
40309
|
-
var UE = Object.defineProperty, OE = Object.getOwnPropertyDescriptor,
|
|
40322
|
+
], ot);
|
|
40323
|
+
var UE = Object.defineProperty, OE = Object.getOwnPropertyDescriptor, bt = (i, e, t, n) => {
|
|
40310
40324
|
for (var s = n > 1 ? void 0 : n ? OE(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
40311
40325
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
40312
40326
|
return n && s && UE(e, t, s), s;
|
|
40313
40327
|
};
|
|
40314
|
-
let
|
|
40328
|
+
let ct = class extends gs {
|
|
40315
40329
|
constructor() {
|
|
40316
|
-
super(), this.callManager = new wd(), this.healthMonitor = new Ad(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = ad(), this.animationId = null, this.pendingTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.animationStartTime = 0, this.intersectionObserver = null, this.isOrbInitialized = !1, this.callStatus = "idle", this.microphoneEnabled = !1, this.serviceUnavailable = !1, this.buttonStartText = "Talk to AI Agent", this.buttonConnectingText = "Connecting...", this.buttonEndText = "End call", this.orbSize = 48, this.theme = "default", this.themeMode = "auto", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (i) => {
|
|
40330
|
+
super(), this.callManager = new wd(), this.healthMonitor = new Ad(), this.orbRenderer = null, this.audioAnalyzer = null, this.soundManager = null, this.orbContainerRef = ad(), this.animationId = null, this.pendingTimers = /* @__PURE__ */ new Set(), this.isPageVisible = !0, this.animationStartTime = 0, this.intersectionObserver = null, this.isOrbInitialized = !1, this.callStatus = "idle", this.microphoneEnabled = !1, this.microphoneInitialized = !1, this.serviceUnavailable = !1, this.buttonStartText = "Talk to AI Agent", this.buttonConnectingText = "Connecting...", this.buttonEndText = "End call", this.orbSize = 48, this.theme = "default", this.themeMode = "auto", this.orbColors = {}, this.glowIntensity = 0.8, this.idleGlowMultiplier = 0.4, this.morphStrength = 1, this.noiseScale = 1.5, this.noiseSpeed = 0.3, this.fresnelPower = 2.5, this.rotationSpeed = 0.1, this.audioReactivity = 3, this.audioSmoothing = 0.9, this.idleMorphMultiplier = 0.25, this.colorContrast = 1.5, this.soundEnabled = !0, this.soundVolume = 0.25, this.soundPreset = "1", this.handleAudioTrack = async (i) => {
|
|
40317
40331
|
const t = i.detail;
|
|
40318
40332
|
if (!(!t || !this.audioAnalyzer))
|
|
40319
40333
|
try {
|
|
@@ -40332,9 +40346,9 @@ let ht = class extends gs {
|
|
|
40332
40346
|
console.error("Failed to connect local audio stream:", n);
|
|
40333
40347
|
}
|
|
40334
40348
|
}, this.handleMicrophoneEnabled = () => {
|
|
40335
|
-
this.microphoneEnabled = !0;
|
|
40349
|
+
this.microphoneEnabled = !0, this.microphoneInitialized = !0;
|
|
40336
40350
|
}, this.handleMicrophoneDisabled = () => {
|
|
40337
|
-
this.microphoneEnabled = !1;
|
|
40351
|
+
this.microphoneEnabled = !1, this.microphoneInitialized = !0;
|
|
40338
40352
|
}, this.handleHealthChange = (i) => {
|
|
40339
40353
|
const e = i.detail;
|
|
40340
40354
|
this.serviceUnavailable = e === "unhealthy";
|
|
@@ -40353,7 +40367,7 @@ let ht = class extends gs {
|
|
|
40353
40367
|
);
|
|
40354
40368
|
break;
|
|
40355
40369
|
case "disconnected":
|
|
40356
|
-
this.callStatus = "idle", (n = this.orbRenderer) == null || n.setActive(!1), (s = this.audioAnalyzer) == null || s.disconnect(), this.startIdleAnimation(), this.scheduleTimer(() => {
|
|
40370
|
+
this.callStatus = "idle", this.microphoneInitialized = !1, (n = this.orbRenderer) == null || n.setActive(!1), (s = this.audioAnalyzer) == null || s.disconnect(), this.startIdleAnimation(), this.scheduleTimer(() => {
|
|
40357
40371
|
var o;
|
|
40358
40372
|
(o = this.soundManager) == null || o.playCallEndSound();
|
|
40359
40373
|
}, 150), this.dispatchEvent(
|
|
@@ -40688,7 +40702,7 @@ let ht = class extends gs {
|
|
|
40688
40702
|
part="orb-container"
|
|
40689
40703
|
${od(this.orbContainerRef)}
|
|
40690
40704
|
></div>
|
|
40691
|
-
${this.callStatus === "connected" && !this.microphoneEnabled ? Xt`
|
|
40705
|
+
${this.callStatus === "connected" && this.microphoneInitialized && !this.microphoneEnabled ? Xt`
|
|
40692
40706
|
<div class="microphone-indicator visible">
|
|
40693
40707
|
<svg viewBox="0 0 24 24" fill="none">
|
|
40694
40708
|
<path
|
|
@@ -40720,107 +40734,110 @@ let ht = class extends gs {
|
|
|
40720
40734
|
`;
|
|
40721
40735
|
}
|
|
40722
40736
|
};
|
|
40723
|
-
|
|
40737
|
+
ct.styles = nd`
|
|
40724
40738
|
:host {
|
|
40725
40739
|
display: inline-block;
|
|
40726
40740
|
contain: layout style;
|
|
40727
40741
|
}
|
|
40728
40742
|
`;
|
|
40729
|
-
|
|
40743
|
+
bt([
|
|
40730
40744
|
ye({ type: String, attribute: "agent-id" })
|
|
40731
|
-
],
|
|
40732
|
-
|
|
40745
|
+
], ct.prototype, "agentId", 2);
|
|
40746
|
+
bt([
|
|
40733
40747
|
ye({ type: String, attribute: "voice-service-url" })
|
|
40734
|
-
],
|
|
40735
|
-
|
|
40736
|
-
|
|
40737
|
-
],
|
|
40738
|
-
|
|
40739
|
-
|
|
40740
|
-
],
|
|
40741
|
-
|
|
40742
|
-
|
|
40743
|
-
],
|
|
40744
|
-
|
|
40748
|
+
], ct.prototype, "voiceServiceUrl", 2);
|
|
40749
|
+
bt([
|
|
40750
|
+
An()
|
|
40751
|
+
], ct.prototype, "callStatus", 2);
|
|
40752
|
+
bt([
|
|
40753
|
+
An()
|
|
40754
|
+
], ct.prototype, "microphoneEnabled", 2);
|
|
40755
|
+
bt([
|
|
40756
|
+
An()
|
|
40757
|
+
], ct.prototype, "microphoneInitialized", 2);
|
|
40758
|
+
bt([
|
|
40759
|
+
An()
|
|
40760
|
+
], ct.prototype, "serviceUnavailable", 2);
|
|
40761
|
+
bt([
|
|
40745
40762
|
ye({ type: String, attribute: "button-start-text" })
|
|
40746
|
-
],
|
|
40747
|
-
|
|
40763
|
+
], ct.prototype, "buttonStartText", 2);
|
|
40764
|
+
bt([
|
|
40748
40765
|
ye({ type: String, attribute: "button-connecting-text" })
|
|
40749
|
-
],
|
|
40750
|
-
|
|
40766
|
+
], ct.prototype, "buttonConnectingText", 2);
|
|
40767
|
+
bt([
|
|
40751
40768
|
ye({ type: String, attribute: "button-end-text" })
|
|
40752
|
-
],
|
|
40753
|
-
|
|
40769
|
+
], ct.prototype, "buttonEndText", 2);
|
|
40770
|
+
bt([
|
|
40754
40771
|
ye({ type: Number, attribute: "orb-size" })
|
|
40755
|
-
],
|
|
40756
|
-
|
|
40772
|
+
], ct.prototype, "orbSize", 2);
|
|
40773
|
+
bt([
|
|
40757
40774
|
ye({ type: String, attribute: "theme" })
|
|
40758
|
-
],
|
|
40759
|
-
|
|
40775
|
+
], ct.prototype, "theme", 2);
|
|
40776
|
+
bt([
|
|
40760
40777
|
ye({ type: String, attribute: "theme-mode" })
|
|
40761
|
-
],
|
|
40762
|
-
|
|
40778
|
+
], ct.prototype, "themeMode", 2);
|
|
40779
|
+
bt([
|
|
40763
40780
|
ye({ type: Object, attribute: "orb-colors" })
|
|
40764
|
-
],
|
|
40765
|
-
|
|
40781
|
+
], ct.prototype, "orbColors", 2);
|
|
40782
|
+
bt([
|
|
40766
40783
|
ye({ type: Number, attribute: "glow-intensity" })
|
|
40767
|
-
],
|
|
40768
|
-
|
|
40784
|
+
], ct.prototype, "glowIntensity", 2);
|
|
40785
|
+
bt([
|
|
40769
40786
|
ye({ type: Number, attribute: "idle-glow-multiplier" })
|
|
40770
|
-
],
|
|
40771
|
-
|
|
40787
|
+
], ct.prototype, "idleGlowMultiplier", 2);
|
|
40788
|
+
bt([
|
|
40772
40789
|
ye({ type: Number, attribute: "morph-strength" })
|
|
40773
|
-
],
|
|
40774
|
-
|
|
40790
|
+
], ct.prototype, "morphStrength", 2);
|
|
40791
|
+
bt([
|
|
40775
40792
|
ye({ type: Number, attribute: "noise-scale" })
|
|
40776
|
-
],
|
|
40777
|
-
|
|
40793
|
+
], ct.prototype, "noiseScale", 2);
|
|
40794
|
+
bt([
|
|
40778
40795
|
ye({ type: Number, attribute: "noise-speed" })
|
|
40779
|
-
],
|
|
40780
|
-
|
|
40796
|
+
], ct.prototype, "noiseSpeed", 2);
|
|
40797
|
+
bt([
|
|
40781
40798
|
ye({ type: Number, attribute: "fresnel-power" })
|
|
40782
|
-
],
|
|
40783
|
-
|
|
40799
|
+
], ct.prototype, "fresnelPower", 2);
|
|
40800
|
+
bt([
|
|
40784
40801
|
ye({ type: Number, attribute: "rotation-speed" })
|
|
40785
|
-
],
|
|
40786
|
-
|
|
40802
|
+
], ct.prototype, "rotationSpeed", 2);
|
|
40803
|
+
bt([
|
|
40787
40804
|
ye({ type: Number, attribute: "audio-reactivity" })
|
|
40788
|
-
],
|
|
40789
|
-
|
|
40805
|
+
], ct.prototype, "audioReactivity", 2);
|
|
40806
|
+
bt([
|
|
40790
40807
|
ye({ type: Number, attribute: "audio-smoothing" })
|
|
40791
|
-
],
|
|
40792
|
-
|
|
40808
|
+
], ct.prototype, "audioSmoothing", 2);
|
|
40809
|
+
bt([
|
|
40793
40810
|
ye({ type: Number, attribute: "idle-morph-multiplier" })
|
|
40794
|
-
],
|
|
40795
|
-
|
|
40811
|
+
], ct.prototype, "idleMorphMultiplier", 2);
|
|
40812
|
+
bt([
|
|
40796
40813
|
ye({ type: Number, attribute: "color-contrast" })
|
|
40797
|
-
],
|
|
40798
|
-
|
|
40814
|
+
], ct.prototype, "colorContrast", 2);
|
|
40815
|
+
bt([
|
|
40799
40816
|
ye({ type: Boolean, attribute: "sound-enabled" })
|
|
40800
|
-
],
|
|
40801
|
-
|
|
40817
|
+
], ct.prototype, "soundEnabled", 2);
|
|
40818
|
+
bt([
|
|
40802
40819
|
ye({ type: Number, attribute: "sound-volume" })
|
|
40803
|
-
],
|
|
40804
|
-
|
|
40820
|
+
], ct.prototype, "soundVolume", 2);
|
|
40821
|
+
bt([
|
|
40805
40822
|
ye({ type: String, attribute: "sound-preset" })
|
|
40806
|
-
],
|
|
40807
|
-
|
|
40823
|
+
], ct.prototype, "soundPreset", 2);
|
|
40824
|
+
ct = bt([
|
|
40808
40825
|
rd("hanc-ai-pill-call")
|
|
40809
|
-
],
|
|
40826
|
+
], ct);
|
|
40810
40827
|
export {
|
|
40811
|
-
|
|
40812
|
-
|
|
40813
|
-
|
|
40828
|
+
ot as FloatingCall,
|
|
40829
|
+
at as InlineCall,
|
|
40830
|
+
ct as PillCall,
|
|
40814
40831
|
qd as SoundManager,
|
|
40815
40832
|
kE as applyTheme,
|
|
40816
|
-
|
|
40833
|
+
pi as darkPresets,
|
|
40817
40834
|
qE as darkThemes,
|
|
40818
40835
|
PE as detectSystemTheme,
|
|
40819
40836
|
HE as getColorPreset,
|
|
40820
40837
|
WE as getPresetNames,
|
|
40821
40838
|
So as getTheme,
|
|
40822
40839
|
XE as getThemeNames,
|
|
40823
|
-
|
|
40840
|
+
mi as lightPresets,
|
|
40824
40841
|
jE as lightThemes,
|
|
40825
40842
|
Yr as themes,
|
|
40826
40843
|
$E as watchSystemTheme
|